[英]Why is my minecraft forge mod not working?
I am trying to make a custom biome, but it crashes when I try to export the mod and load it in Minecraft.我正在尝试制作自定义生物群落,但是当我尝试导出 mod 并将其加载到 Minecraft 时它崩溃了。 It works fine in eclipse 'run client' mode.它在 eclipse 'run client' 模式下工作正常。
Here is the code:这是代码:
package com.dadobug1111.FarmlandBiome.world.biome;
import net.minecraft.init.Blocks;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.biome.BiomeForest;
import net.minecraft.world.gen.feature.WorldGenMinable;
public class BiomeFarmland extends Biome {
public BiomeFarmland() {
super(new Biome.BiomeProperties("FarmlandBiome")
.setHeightVariation(0.004F)
.setTemperature(0.8F)
.setRainfall(0.4F)
.setBaseHeight(0F)
);
this.decorator.treesPerChunk = 1/5;
this.decorator.sandPatchesPerChunk = 0;
this.decorator.gravelPatchesPerChunk = 0;
this.decorator.generateFalls = true;
}
}
The crash log is here .崩溃日志在这里。
Relevant message:相关讯息:
net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from Farmland Biome (farmlandbiomemod) Caused by: java.lang.NoSuchMethodError: net.minecraft.world.biome.Biome$BiomeProperties.setHeightVariation(F)Lnet/minecraft/world/biome/Biome$BiomeProperties; net.minecraftforge.fml.common.LoaderExceptionModCrash:从农田生物群系(farmlandbiomemod)捕获异常导致:java.lang.NoSuchMethodError:net.minecraft.world.biome.Biome$BiomeProperties.setHeightVariation(F)Lnet/minecraft/world/biome /Biome$BiomeProperties;
I know it has something to do with how I add biome properties, but I do not know why.我知道这与我如何添加生物群落属性有关,但我不知道为什么。
My Minecraft forge version is forge-1.12.2-14.23.5.2768我的 Minecraft forge 版本是 forge-1.12.2-14.23.5.2768
I was exporting incorrectly.我导出不正确。 I used the export feature of eclipse, instead of opening command prompt and using gradlew build.我使用了 eclipse 的导出功能,而不是打开命令提示符并使用 gradlew build。 It works now.它现在有效。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.