最新版 |
編集中の文章 |
48行目: |
48行目: |
| } | | } |
| } | | } |
− | }
| |
− | </source>
| |
− | *SampleDefaultBiomeFeaturesMixin.java
| |
− | <source lang = "java">
| |
− | package com.example.ore.mixin;
| |
− |
| |
− | import net.minecraft.world.biome.GenerationSettings;
| |
− | import net.minecraft.world.gen.GenerationStep;
| |
− | import net.minecraft.world.gen.feature.DefaultBiomeFeatures;
| |
− |
| |
− | import com.example.ore.SampleMod;
| |
− |
| |
− | import org.spongepowered.asm.mixin.Mixin;
| |
− | import org.spongepowered.asm.mixin.injection.At;
| |
− | import org.spongepowered.asm.mixin.injection.Inject;
| |
− | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
| |
− |
| |
− | @Mixin(DefaultBiomeFeatures.class)
| |
− | public class SampleDefaultBiomeFeaturesMixin {
| |
− | @Inject(method = "addDefaultOres(Lnet/minecraft/world/biome/GenerationSettings$Builder;)V", at = @At("TAIL"))
| |
− | private static void addDefaultOres(GenerationSettings.Builder builder, CallbackInfo ci) {
| |
− | builder.feature(GenerationStep.Feature.UNDERGROUND_ORES, SampleMod.ORE_OAK_LOG_OVERWORLD);
| |
− | }
| |
| } | | } |
| </source> | | </source> |
80行目: |
57行目: |
| "package": "com.example.ore.mixin", | | "package": "com.example.ore.mixin", |
| "compatibilityLevel": "JAVA_8", | | "compatibilityLevel": "JAVA_8", |
− | "$comment": "↓SampleDefaultBiomeFeaturesMixinをミックスインに追加",
| |
| "mixins": [ | | "mixins": [ |
− | "SampleDefaultBiomeFeaturesMixin" | + | "DefaultBiomeFeaturesMixin" |
| ], | | ], |
| "client": [ | | "client": [ |