Fixes
This commit is contained in:
parent
2511122d50
commit
53b34857be
4 changed files with 40 additions and 15 deletions
|
@ -39,6 +39,9 @@ public class BetterEnd implements ModInitializer {
|
|||
public static final Logger LOGGER = Logger.get();
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
TerrainGenerator.init();
|
||||
GeneratorOptions.init();
|
||||
|
||||
EndSounds.register();
|
||||
EndItems.register();
|
||||
EndBlocks.register();
|
||||
|
@ -60,8 +63,6 @@ public class BetterEnd implements ModInitializer {
|
|||
EndStructures.register();
|
||||
Integrations.register();
|
||||
BonemealUtil.init();
|
||||
TerrainGenerator.init();
|
||||
GeneratorOptions.init();
|
||||
|
||||
if (hasGuideBook()) {
|
||||
GuideBookItem.register();
|
||||
|
|
|
@ -103,10 +103,10 @@ public abstract class Config {
|
|||
protected float getFloat(ConfigKey key, float defaultValue) {
|
||||
Float val = keeper.getValue(key, FloatEntry.class);
|
||||
if (val == null) {
|
||||
FloatEntry entry = keeper.registerEntry(key, new FloatEntry(defaultValue));
|
||||
return entry.getValue();
|
||||
keeper.registerEntry(key, new FloatEntry(defaultValue));
|
||||
return defaultValue;
|
||||
}
|
||||
return val != null ? val : defaultValue;
|
||||
return val;
|
||||
}
|
||||
|
||||
protected float getFloat(ConfigKey key) {
|
||||
|
@ -129,10 +129,10 @@ public abstract class Config {
|
|||
protected boolean getBoolean(ConfigKey key, boolean defaultValue) {
|
||||
Boolean val = keeper.getValue(key, BooleanEntry.class);
|
||||
if (val == null) {
|
||||
BooleanEntry entry = keeper.registerEntry(key, new BooleanEntry(defaultValue));
|
||||
return entry.getValue();
|
||||
keeper.registerEntry(key, new BooleanEntry(defaultValue));
|
||||
return defaultValue;
|
||||
}
|
||||
return val != null ? val : defaultValue;
|
||||
return val;
|
||||
}
|
||||
|
||||
protected boolean getBoolean(ConfigKey key) {
|
||||
|
|
|
@ -40,9 +40,12 @@ public abstract class ChorusPlantBlockMixin extends Block {
|
|||
|
||||
@Inject(method = "appendProperties", at = @At("TAIL"))
|
||||
private void beAddProperties(StateManager.Builder<Block, BlockState> builder, CallbackInfo info) {
|
||||
GeneratorOptions.init();
|
||||
if (GeneratorOptions.changeChorusPlant()) {
|
||||
builder.add(BlocksHelper.ROOTS);
|
||||
System.out.println("Added!");
|
||||
}
|
||||
System.out.println("Added? " + GeneratorOptions.changeChorusPlant());
|
||||
}
|
||||
|
||||
@Inject(method = "withConnectionProperties", at = @At("RETURN"), cancellable = true)
|
||||
|
@ -50,11 +53,18 @@ public abstract class ChorusPlantBlockMixin extends Block {
|
|||
BlockState plant = info.getReturnValue();
|
||||
if (plant.isOf(Blocks.CHORUS_PLANT)) {
|
||||
if (world.getBlockState(pos.down()).isIn(EndTags.END_GROUND)) {
|
||||
info.setReturnValue(plant.with(Properties.DOWN, true).with(BlocksHelper.ROOTS, true));
|
||||
if (GeneratorOptions.changeChorusPlant()) {
|
||||
info.setReturnValue(plant.with(Properties.DOWN, true).with(BlocksHelper.ROOTS, true));
|
||||
}
|
||||
else {
|
||||
info.setReturnValue(plant.with(Properties.DOWN, true));
|
||||
}
|
||||
info.cancel();
|
||||
}
|
||||
else {
|
||||
info.setReturnValue(plant.with(BlocksHelper.ROOTS, false));
|
||||
if (GeneratorOptions.changeChorusPlant()) {
|
||||
info.setReturnValue(plant.with(BlocksHelper.ROOTS, false));
|
||||
}
|
||||
info.cancel();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,20 @@
|
|||
{
|
||||
"parent": "minecraft:block/template_wall_post",
|
||||
"textures": {
|
||||
"wall": "betterend:block/%parent%"
|
||||
}
|
||||
}
|
||||
"textures": {
|
||||
"wall": "betterend:block/%parent%",
|
||||
"particle": "#wall"
|
||||
},
|
||||
"elements": [
|
||||
{ "from": [ 4, -0.01, 4 ],
|
||||
"to": [ 12, 16, 12 ],
|
||||
"faces": {
|
||||
"down": { "texture": "#wall", "cullface": "down" },
|
||||
"up": { "texture": "#wall", "cullface": "up" },
|
||||
"north": { "texture": "#wall" },
|
||||
"south": { "texture": "#wall" },
|
||||
"west": { "texture": "#wall" },
|
||||
"east": { "texture": "#wall" }
|
||||
},
|
||||
"__comment": "Center post"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue