diff --git a/gradle.properties b/gradle.properties index 8e8e26ce2..7a45e7b8c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,7 +7,7 @@ mod_version=1.1.52 # Forge game_version=1.16.5 -forge_version=36.2.22 +forge_version=36.2.30 # Parchment (Mappings) parchment_version=2021.10.17 diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/ActuallyAdditions.java b/src/main/java/de/ellpeck/actuallyadditions/mod/ActuallyAdditions.java index 62f538a23..e8083c251 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/ActuallyAdditions.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/ActuallyAdditions.java @@ -141,10 +141,10 @@ public class ActuallyAdditions { } private void onConfigReload(ModConfig.ModConfigEvent event) { - Item item1 = ForgeRegistries.ITEMS.getValue(new ResourceLocation(CommonConfig.OTHER.REDSTONECONFIGURATOR.get())); - Item item2 = ForgeRegistries.ITEMS.getValue(new ResourceLocation(CommonConfig.OTHER.RELAYCONFIGURATOR.get())); - CommonConfig.OTHER.redstoneConfigureItem = item1 != null?item1: Items.AIR; - CommonConfig.OTHER.relayConfigureItem = item2 != null?item2: Items.AIR; + Item item1 = ForgeRegistries.ITEMS.getValue(new ResourceLocation(CommonConfig.Other.REDSTONECONFIGURATOR.get())); + Item item2 = ForgeRegistries.ITEMS.getValue(new ResourceLocation(CommonConfig.Other.RELAYCONFIGURATOR.get())); + CommonConfig.Other.redstoneConfigureItem = item1 != null?item1: Items.AIR; + CommonConfig.Other.relayConfigureItem = item2 != null?item2: Items.AIR; } private void clientSetup(FMLClientSetupEvent event) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java index 9e8dfd81a..30c17bdaa 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java @@ -15,7 +15,6 @@ import de.ellpeck.actuallyadditions.api.lens.ILensItem; import de.ellpeck.actuallyadditions.mod.blocks.base.FullyDirectionalBlock; import de.ellpeck.actuallyadditions.mod.config.CommonConfig; import de.ellpeck.actuallyadditions.mod.tile.TileEntityAtomicReconstructor; -import de.ellpeck.actuallyadditions.mod.tile.TileEntityFermentingBarrel; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.Lang; import de.ellpeck.actuallyadditions.mod.util.StackUtil; @@ -73,7 +72,7 @@ public class BlockAtomicReconstructor extends FullyDirectionalBlock.Container im player.inventory.removeItem(player.inventory.selected, 1); } //Shush, don't tell anyone! - else if (CommonConfig.OTHER.ELEVEN.get() == 11 && item == Items.MUSIC_DISC_11) { + else if (CommonConfig.Other.ELEVEN.get() == 11 && item == Items.MUSIC_DISC_11) { reconstructor.counter++; reconstructor.setChanged(); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java index fc14bd0ca..785b8e684 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java @@ -188,7 +188,7 @@ public class BlockLaserRelay extends FullyDirectionalBlock.Container implements if (compass) { expl = relay.getCompassDisplayString(); } else { - expl = TextFormatting.GRAY.toString() + TextFormatting.ITALIC + StringUtil.localizeFormatted("info." + ActuallyAdditions.MODID + ".laserRelay.mode.noCompasss", StringUtil.localize(CommonConfig.OTHER.relayConfigureItem.getDescriptionId() + ".name")); + expl = TextFormatting.GRAY.toString() + TextFormatting.ITALIC + StringUtil.localizeFormatted("info." + ActuallyAdditions.MODID + ".laserRelay.mode.noCompasss", StringUtil.localize(CommonConfig.Other.relayConfigureItem.getDescriptionId() + ".name")); } StringUtil.drawSplitString(minecraft.font, expl, resolution.getGuiScaledWidth() / 2 + 5, resolution.getGuiScaledHeight() / 2 + 15, Integer.MAX_VALUE, StringUtil.DECIMAL_COLOR_WHITE, true); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/config/CommonConfig.java b/src/main/java/de/ellpeck/actuallyadditions/mod/config/CommonConfig.java index 526ef22d2..c44c422ab 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/config/CommonConfig.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/config/CommonConfig.java @@ -2,20 +2,39 @@ package de.ellpeck.actuallyadditions.mod.config; import net.minecraft.item.Item; import net.minecraft.item.Items; -import net.minecraft.util.ResourceLocation; import net.minecraftforge.common.ForgeConfigSpec; +import java.util.ArrayList; +import java.util.List; + public class CommonConfig { private static final ForgeConfigSpec.Builder BUILDER = new ForgeConfigSpec.Builder(); public static ForgeConfigSpec COMMON_CONFIG; static { - OTHER.build(); - MACHINES.build(); + Other.build(); + Machines.build(); + ItemSettings.build(); COMMON_CONFIG = BUILDER.build(); } - public static class MACHINES { + public static class ItemSettings { + public static ForgeConfigSpec.ConfigValue> DRILL_EXTRA_MINING_WHITELIST; + + public static void build() { + BUILDER.comment("Item settings").push("itemsSettings"); + + DRILL_EXTRA_MINING_WHITELIST = BUILDER + .comment("By default, the Drill can mine certain blocks. If there is one that it can't mine, but should be able to, put its REGISTRY NAME here. These are the actual registered Item Names, the ones you use, for example, when using the /give Command.") + .define("Drill Extra Whitelist", new ArrayList() {{ + add("TConstruct:GravelOre"); + }}); + + BUILDER.pop(); + } + } + + public static class Machines { public static ForgeConfigSpec.IntValue FARMER_AREA; public static ForgeConfigSpec.IntValue RECONSTRUCTOR_POWER; @@ -29,8 +48,7 @@ public class CommonConfig { } } - - public static class OTHER { + public static class Other { public static ForgeConfigSpec.BooleanValue SOLID_XP_ALWAYS_ORBS; public static ForgeConfigSpec.BooleanValue DO_UPDATE_CHECK; public static ForgeConfigSpec.BooleanValue UPDATE_CHECK_VERSION_SPECIFIC; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigStringListValues.java b/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigStringListValues.java index bfcb883cd..e5d5238dc 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigStringListValues.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigStringListValues.java @@ -49,11 +49,7 @@ public enum ConfigStringListValues { ConfigCategories.TOOL_VALUES, new String[] { "TConstruct:GravelOre" }, "By default, the AIOT can mine certain blocks. If there is one that it can't mine, but should be able to, put its REGISTRY NAME here. These are the actual registered Item Names, the ones you use, for example, when using the /give Command."), - DRILL_EXTRA_MINING_WHITELIST( - "Drill Extra Whitelist", - ConfigCategories.TOOL_VALUES, - new String[] { "TConstruct:GravelOre" }, - "By default, the Drill can mine certain blocks. If there is one that it can't mine, but should be able to, put its REGISTRY NAME here. These are the actual registered Item Names, the ones you use, for example, when using the /give Command."), + MINER_EXTRA_WHITELIST( "Vertical Digger Extra Whitelist", ConfigCategories.MACHINE_VALUES, diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/entity/EntityWorm.java b/src/main/java/de/ellpeck/actuallyadditions/mod/entity/EntityWorm.java index 84ab5a55a..2ab90f862 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/entity/EntityWorm.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/entity/EntityWorm.java @@ -104,7 +104,7 @@ public class EntityWorm extends Entity { } } - int dieTime = CommonConfig.OTHER.WORMS_DIE_TIME.get(); + int dieTime = CommonConfig.Other.WORMS_DIE_TIME.get(); if (dieTime > 0 && this.timer >= dieTime) { this.removeAfterChangingDimensions(); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/event/ClientEvents.java b/src/main/java/de/ellpeck/actuallyadditions/mod/event/ClientEvents.java index 6cf9cdb1b..ac273865d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/event/ClientEvents.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/event/ClientEvents.java @@ -200,7 +200,7 @@ public class ClientEvents { if (StackUtil.isValid(stack) && stack.getItem() == ConfigValues.itemRedstoneTorchConfigurator) { expl = TextFormatting.GREEN + StringUtil.localize("info." + ActuallyAdditions.MODID + ".redstoneMode.validItem"); } else { - expl = TextFormatting.GRAY.toString() + TextFormatting.ITALIC + StringUtil.localizeFormatted("info." + ActuallyAdditions.MODID + ".redstoneMode.invalidItem", StringUtil.localize(CommonConfig.OTHER.redstoneConfigureItem.getDescriptionId() + ".name")); + expl = TextFormatting.GRAY.toString() + TextFormatting.ITALIC + StringUtil.localizeFormatted("info." + ActuallyAdditions.MODID + ".redstoneMode.invalidItem", StringUtil.localize(CommonConfig.Other.redstoneConfigureItem.getDescriptionId() + ".name")); } font.drawShadow(event.getMatrixStack(), expl, event.getWindow().getGuiScaledWidth() / 2f + 5, event.getWindow().getGuiScaledHeight() / 2f + 15, StringUtil.DECIMAL_COLOR_WHITE); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/event/CommonEvents.java b/src/main/java/de/ellpeck/actuallyadditions/mod/event/CommonEvents.java index 1a2cb87d7..621d248ba 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/event/CommonEvents.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/event/CommonEvents.java @@ -166,7 +166,7 @@ public class CommonEvents { public void onCraftedEvent(PlayerEvent.ItemCraftedEvent event) { //checkAchievements(event.crafting, event.player, InitAchievements.Type.CRAFTING); - if (CommonConfig.OTHER.GIVE_BOOKLET_ON_FIRST_CRAFT.get()) { + if (CommonConfig.Other.GIVE_BOOKLET_ON_FIRST_CRAFT.get()) { if (!event.getPlayer().level.isClientSide && StackUtil.isValid(event.getCrafting()) && event.getCrafting().getItem() != ActuallyItems.ITEM_BOOKLET.get()) { String name = event.getCrafting().getItem().getRegistryName().toString(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/DrillItem.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/DrillItem.java index 7e482bd5b..ed96d0039 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/DrillItem.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/DrillItem.java @@ -13,7 +13,7 @@ package de.ellpeck.actuallyadditions.mod.items; import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.Multimap; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; -import de.ellpeck.actuallyadditions.mod.config.values.ConfigStringListValues; +import de.ellpeck.actuallyadditions.mod.config.CommonConfig; import de.ellpeck.actuallyadditions.mod.inventory.ContainerDrill; import de.ellpeck.actuallyadditions.mod.items.base.ItemEnergy; import de.ellpeck.actuallyadditions.mod.tile.TileEntityInventoryBase; @@ -458,7 +458,7 @@ public class DrillItem extends ItemEnergy { if (location != null) { String name = location.toString(); if (name != null) { - for (String s : ConfigStringListValues.DRILL_EXTRA_MINING_WHITELIST.getValue()) { + for (String s : CommonConfig.ItemSettings.DRILL_EXTRA_MINING_WHITELIST.get()) { if (s != null && s.equals(name)) { return true; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemHairBall.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemHairBall.java index 4be2aa7f7..5d09f2be5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemHairBall.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemHairBall.java @@ -19,7 +19,6 @@ import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; import net.minecraft.util.*; import net.minecraft.world.World; -import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.living.LivingEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; @@ -42,9 +41,9 @@ public class ItemHairBall extends ItemBase { @SubscribeEvent public void livingUpdateEvent(LivingEvent.LivingUpdateEvent event) { //Ocelots dropping Hair Balls - if (CommonConfig.OTHER.DO_CAT_DROPS.get() && event.getEntityLiving() != null && event.getEntityLiving().level != null && !event.getEntityLiving().level.isClientSide) { + if (CommonConfig.Other.DO_CAT_DROPS.get() && event.getEntityLiving() != null && event.getEntityLiving().level != null && !event.getEntityLiving().level.isClientSide) { if (event.getEntityLiving() instanceof OcelotEntity && catIsTamedReflection((OcelotEntity) event.getEntityLiving()) || event.getEntityLiving() instanceof PlayerEntity && event.getEntityLiving().getUUID().equals(this.KittyVanCatUUID)) { - if (event.getEntityLiving().level.random.nextInt(CommonConfig.OTHER.FUR_CHANCE.get()) == 0) { + if (event.getEntityLiving().level.random.nextInt(CommonConfig.Other.FUR_CHANCE.get()) == 0) { ItemEntity item = new ItemEntity(event.getEntityLiving().level, event.getEntityLiving().getX() + 0.5, event.getEntityLiving().getY() + 0.5, event.getEntityLiving().getZ() + 0.5, new ItemStack(ActuallyItems.HAIRY_BALL.get())); event.getEntityLiving().level.addFreshEntity(item); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemSolidifiedExperience.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemSolidifiedExperience.java index 3ff7e4e08..12c0337a6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemSolidifiedExperience.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemSolidifiedExperience.java @@ -23,7 +23,6 @@ import net.minecraft.util.ActionResult; import net.minecraft.util.Hand; import net.minecraft.world.GameRules; import net.minecraft.world.World; -import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.util.FakePlayer; import net.minecraftforge.event.entity.living.LivingDropsEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; @@ -70,7 +69,7 @@ public class ItemSolidifiedExperience extends ItemBase { } } - if (CommonConfig.OTHER.SOLID_XP_ALWAYS_ORBS.get() || player instanceof FakePlayer) { + if (CommonConfig.Other.SOLID_XP_ALWAYS_ORBS.get() || player instanceof FakePlayer) { ExperienceOrbEntity orb = new ExperienceOrbEntity(world, player.getX() + 0.5, player.getY() + 0.5, player.getZ() + 0.5, amount); orb.getPersistentData().putBoolean(ActuallyAdditions.MODID + "FromSolidified", true); world.addFreshEntity(orb); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWaterBowl.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWaterBowl.java index 4ebae3c3c..483267f5c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWaterBowl.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWaterBowl.java @@ -31,7 +31,6 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.util.math.RayTraceResult; import net.minecraft.world.World; -import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.ForgeEventFactory; import net.minecraftforge.event.entity.player.PlayerInteractEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; @@ -46,7 +45,7 @@ public class ItemWaterBowl extends ItemBase { @SubscribeEvent public void onPlayerInteractEvent(PlayerInteractEvent.RightClickItem event) { if (event.getWorld() != null) { - if (CommonConfig.OTHER.WATER_BOWL.get()) { + if (CommonConfig.Other.WATER_BOWL.get()) { if (StackUtil.isValid(event.getItemStack()) && event.getItemStack().getItem() == Items.BOWL) { RayTraceResult rayTrace = WorldUtil.getNearestBlockWithDefaultReachDistance(event.getWorld(), event.getPlayer(), true, false, false); if (rayTrace.getType() != RayTraceResult.Type.BLOCK) { @@ -126,7 +125,7 @@ public class ItemWaterBowl extends ItemBase { @Override public void inventoryTick(ItemStack stack, World world, Entity entity, int itemSlot, boolean isSelected) { if (!world.isClientSide) { - if (CommonConfig.OTHER.WATER_BOWL_LOSS.get()) { + if (CommonConfig.Other.WATER_BOWL_LOSS.get()) { if (world.getGameTime() % 10 == 0 && world.random.nextFloat() >= 0.5F) { int lastX = 0; int lastY = 0; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWorm.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWorm.java index fddbf2f0c..9e32f75f3 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWorm.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWorm.java @@ -23,7 +23,6 @@ import net.minecraft.util.ActionResultType; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.player.UseHoeEvent; import net.minecraftforge.eventbus.api.Event; import net.minecraftforge.eventbus.api.EventPriority; @@ -68,7 +67,7 @@ public class ItemWorm extends ItemBase { @SubscribeEvent(priority = EventPriority.LOW) public void onHoe(UseHoeEvent event) { - if (CommonConfig.OTHER.WORMS.get() && event.getResult() != Event.Result.DENY) { + if (CommonConfig.Other.WORMS.get() && event.getResult() != Event.Result.DENY) { World world = event.getEntity().level; if (!world.isClientSide) { BlockPos pos = event.getContext().getClickedPos(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDisruption.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDisruption.java index d1a19448e..9d4c32d87 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDisruption.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDisruption.java @@ -35,7 +35,7 @@ public class LensDisruption extends Lens { @Override public boolean invoke(BlockState hitState, BlockPos hitBlock, IAtomicReconstructor tile) { - if (CommonConfig.OTHER.ELEVEN.get() == 11 && tile.getEnergy() >= ENERGY_USE && hitBlock != null && !hitState.getBlock().isAir(hitState, tile.getWorldObject(), hitBlock)) { + if (CommonConfig.Other.ELEVEN.get() == 11 && tile.getEnergy() >= ENERGY_USE && hitBlock != null && !hitState.getBlock().isAir(hitState, tile.getWorldObject(), hitBlock)) { int range = 2; ArrayList items = (ArrayList) tile.getWorldObject().getEntitiesOfClass(ItemEntity.class, new AxisAlignedBB(hitBlock.getX() - range, hitBlock.getY() - range, hitBlock.getZ() - range, hitBlock.getX() + range, hitBlock.getY() + range, hitBlock.getZ() + range)); for (ItemEntity item : items) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityAtomicReconstructor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityAtomicReconstructor.java index 5a9f61c84..61e091aac 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityAtomicReconstructor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityAtomicReconstructor.java @@ -16,11 +16,9 @@ import de.ellpeck.actuallyadditions.api.lens.ILensItem; import de.ellpeck.actuallyadditions.api.lens.Lens; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.config.CommonConfig; -import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues; import de.ellpeck.actuallyadditions.mod.misc.SoundHandler; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IAcceptor; -import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.block.BlockState; import net.minecraft.item.Item; @@ -33,8 +31,6 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.energy.IEnergyStorage; -import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase.NBTType; - public class TileEntityAtomicReconstructor extends TileEntityInventoryBase implements IEnergyDisplay, IAtomicReconstructor { public static final int ENERGY_USE = 1000; @@ -48,7 +44,7 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple public TileEntityAtomicReconstructor() { super(ActuallyBlocks.ATOMIC_RECONSTRUCTOR.getTileEntityType(), 1); - int power = CommonConfig.MACHINES.RECONSTRUCTOR_POWER.get(); + int power = CommonConfig.Machines.RECONSTRUCTOR_POWER.get(); int recieve = MathHelper.ceil(power * 0.016666F); this.storage = new CustomEnergyStorage(power, recieve, 0); this.lazyEnergy = LazyOptional.of(() -> this.storage); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFarmer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFarmer.java index 0a9d37a39..c990692dd 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFarmer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFarmer.java @@ -16,7 +16,6 @@ import de.ellpeck.actuallyadditions.api.farmer.IFarmerBehavior; import de.ellpeck.actuallyadditions.api.internal.IFarmer; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.config.CommonConfig; -import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues; import de.ellpeck.actuallyadditions.mod.inventory.ContainerFarmer; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IAcceptor; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IRemover; @@ -33,7 +32,6 @@ import net.minecraft.state.properties.BlockStateProperties; import net.minecraft.util.Direction; import net.minecraft.util.math.BlockPos; import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.StringTextComponent; import net.minecraft.util.text.TranslationTextComponent; import net.minecraft.world.World; import net.minecraft.world.server.ServerWorld; @@ -95,7 +93,7 @@ public class TileEntityFarmer extends TileEntityInventoryBase implements IFarmer this.waitTime--; if (this.waitTime <= 0) { - int area = CommonConfig.MACHINES.FARMER_AREA.get(); + int area = CommonConfig.Machines.FARMER_AREA.get(); if (area % 2 == 0) { area++; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/update/ThreadUpdateChecker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/update/ThreadUpdateChecker.java index 0200523ac..df830fb91 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/update/ThreadUpdateChecker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/update/ThreadUpdateChecker.java @@ -35,7 +35,7 @@ public class ThreadUpdateChecker extends Thread { updateProperties.load(new InputStreamReader(newestURL.openStream())); String currentMcVersion = Util.getMcVersion(); - if (CommonConfig.OTHER.UPDATE_CHECK_VERSION_SPECIFIC.get()) { + if (CommonConfig.Other.UPDATE_CHECK_VERSION_SPECIFIC.get()) { String newestVersionProp = updateProperties.getProperty(currentMcVersion); UpdateChecker.updateVersionInt = Integer.parseInt(newestVersionProp);