From 3d0dd135bb2fcb864467e49d3949ff20423e5d59 Mon Sep 17 00:00:00 2001 From: luiq54 Date: Mon, 16 Jan 2023 21:21:33 +0530 Subject: [PATCH 001/154] parity with #18 Co-authored-by: agnor99 <36055315+agnor99@users.noreply.github.com> --- .../com/enderio/api/travel/ITravelTarget.java | 16 ++ .../api/travel/TeleportationRenderer.java | 8 + .../com/enderio/api/travel/TravelEntry.java | 8 + .../enderio/api/travel/TravelRegistry.java | 45 +++++ .../com/enderio/api/travel/package-info.java | 5 + .../core/common/sync/ItemDataSlot.java | 28 ++++ .../core/common/sync/StringDataSlot.java | 25 +++ .../enderio/blockstates/travel_anchor.json | 7 + .../resources/assets/enderio/lang/en_ud.json | 2 + .../resources/assets/enderio/lang/en_us.json | 2 + .../models/item/staff_of_travelling.json | 6 + .../enderio/models/item/travel_anchor.json | 3 + .../empty_soul_vial.json | 0 .../loot_tables/blocks/travel_anchor.json | 28 ++++ .../com/enderio/machines/EIOMachines.java | 7 + .../travel/TravelAnchorRenderer.java | 22 +++ .../client/rendering/travel/package-info.java | 5 + .../common/block/TravelAnchorBlock.java | 57 +++++++ .../blockentity/TravelAnchorBlockEntity.java | 94 +++++++++++ .../common/init/MachineBlockEntities.java | 2 + .../machines/common/init/MachineBlocks.java | 15 +- .../common/travel/AnchorTravelTarget.java | 97 +++++++++++ .../com/enderio/base/client/ClientSetup.java | 7 +- .../gui/ClientToServerMenuSyncHandler.java | 20 +++ .../teleportation/RenderTeleportTargets.java | 35 ++++ .../TeleportParticleHandler.java | 68 ++++++++ .../common/config/common/ItemsConfig.java | 25 ++- .../base/common/handler/TeleportHandler.java | 156 ++++++++++++++++++ .../enderio/base/common/init/EIOItems.java | 13 +- .../common/item/darksteel/IDarkSteelItem.java | 10 +- .../darksteel/upgrades/EmpoweredUpgrade.java | 16 +- .../upgrades/EmpoweredUpgradeTier.java | 4 +- .../common/item/tool/TravelStaffItem.java | 130 +++++++++++++++ .../base/common/particle/package-info.java | 5 + .../base/common/travel/TravelSavedData.java | 91 ++++++++++ .../base/common/travel/package-info.java | 5 + .../resources/META-INF/accesstransformer.cfg | 4 +- .../enderio/models/block/travel_anchor.json | 9 + .../enderio/textures/block/ender_still.png | Bin 0 -> 3860 bytes .../textures/block/ender_still.png.mcmeta | 45 +++++ ...avel_staff.png => staff_of_travelling.png} | Bin 41 files changed, 1096 insertions(+), 29 deletions(-) create mode 100644 src/api/java/com/enderio/api/travel/ITravelTarget.java create mode 100644 src/api/java/com/enderio/api/travel/TeleportationRenderer.java create mode 100644 src/api/java/com/enderio/api/travel/TravelEntry.java create mode 100644 src/api/java/com/enderio/api/travel/TravelRegistry.java create mode 100644 src/api/java/com/enderio/api/travel/package-info.java create mode 100644 src/core/java/com/enderio/core/common/sync/ItemDataSlot.java create mode 100644 src/core/java/com/enderio/core/common/sync/StringDataSlot.java create mode 100644 src/generated/resources/assets/enderio/blockstates/travel_anchor.json create mode 100644 src/generated/resources/assets/enderio/models/item/staff_of_travelling.json create mode 100644 src/generated/resources/assets/enderio/models/item/travel_anchor.json rename src/generated/resources/data/enderio/advancements/recipes/{enderio.gear => enderio.souls}/empty_soul_vial.json (100%) create mode 100644 src/generated/resources/data/enderio/loot_tables/blocks/travel_anchor.json create mode 100644 src/machines/java/com/enderio/machines/client/rendering/travel/TravelAnchorRenderer.java create mode 100644 src/machines/java/com/enderio/machines/client/rendering/travel/package-info.java create mode 100644 src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java create mode 100644 src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java create mode 100644 src/machines/java/com/enderio/machines/common/travel/AnchorTravelTarget.java create mode 100644 src/main/java/com/enderio/base/client/gui/ClientToServerMenuSyncHandler.java create mode 100644 src/main/java/com/enderio/base/client/renderer/teleportation/RenderTeleportTargets.java create mode 100644 src/main/java/com/enderio/base/client/renderer/teleportation/TeleportParticleHandler.java create mode 100644 src/main/java/com/enderio/base/common/handler/TeleportHandler.java create mode 100644 src/main/java/com/enderio/base/common/item/tool/TravelStaffItem.java create mode 100644 src/main/java/com/enderio/base/common/particle/package-info.java create mode 100644 src/main/java/com/enderio/base/common/travel/TravelSavedData.java create mode 100644 src/main/java/com/enderio/base/common/travel/package-info.java create mode 100644 src/main/resources/assets/enderio/models/block/travel_anchor.json create mode 100644 src/main/resources/assets/enderio/textures/block/ender_still.png create mode 100644 src/main/resources/assets/enderio/textures/block/ender_still.png.mcmeta rename src/main/resources/assets/enderio/textures/item/{travel_staff.png => staff_of_travelling.png} (100%) diff --git a/src/api/java/com/enderio/api/travel/ITravelTarget.java b/src/api/java/com/enderio/api/travel/ITravelTarget.java new file mode 100644 index 0000000000..b0a306cc91 --- /dev/null +++ b/src/api/java/com/enderio/api/travel/ITravelTarget.java @@ -0,0 +1,16 @@ +package com.enderio.api.travel; + +import net.minecraft.core.BlockPos; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.resources.ResourceLocation; + +// TODO: docs +public interface ITravelTarget { + ResourceLocation getSerializationName(); + + BlockPos getPos(); + + CompoundTag save(); + + int getItem2BlockRange(); +} diff --git a/src/api/java/com/enderio/api/travel/TeleportationRenderer.java b/src/api/java/com/enderio/api/travel/TeleportationRenderer.java new file mode 100644 index 0000000000..25807193f1 --- /dev/null +++ b/src/api/java/com/enderio/api/travel/TeleportationRenderer.java @@ -0,0 +1,8 @@ +package com.enderio.api.travel; + +import com.mojang.blaze3d.vertex.PoseStack; +import net.minecraft.client.renderer.LevelRenderer; + +public interface TeleportationRenderer { + void render(T travelData, LevelRenderer levelRenderer, PoseStack poseStack); +} \ No newline at end of file diff --git a/src/api/java/com/enderio/api/travel/TravelEntry.java b/src/api/java/com/enderio/api/travel/TravelEntry.java new file mode 100644 index 0000000000..6be2d23e11 --- /dev/null +++ b/src/api/java/com/enderio/api/travel/TravelEntry.java @@ -0,0 +1,8 @@ +package com.enderio.api.travel; + +import net.minecraft.nbt.CompoundTag; +import net.minecraft.resources.ResourceLocation; +import net.minecraftforge.common.util.Lazy; + +import java.util.function.Function; +public record TravelEntry(ResourceLocation serializationName, Function constructor, Lazy> renderer) {} diff --git a/src/api/java/com/enderio/api/travel/TravelRegistry.java b/src/api/java/com/enderio/api/travel/TravelRegistry.java new file mode 100644 index 0000000000..1a0ecefce7 --- /dev/null +++ b/src/api/java/com/enderio/api/travel/TravelRegistry.java @@ -0,0 +1,45 @@ +package com.enderio.api.travel; + +import net.minecraft.nbt.CompoundTag; +import net.minecraft.resources.ResourceLocation; +import net.minecraftforge.common.util.Lazy; +import org.jetbrains.annotations.ApiStatus; + +import java.util.HashMap; +import java.util.Map; +import java.util.Optional; +import java.util.function.Function; + +@ApiStatus.Internal +public class TravelRegistry { + + + private static final Map> registry = new HashMap<>(); + + public static void addTravelEntry(ResourceLocation serializationName, Function constructor, Lazy> renderer) { + registry.put(serializationName, new TravelEntry<>(serializationName, constructor, renderer)); + } + + public static void addTravelEntry(TravelEntry travelEntry) { + registry.put(travelEntry.serializationName(), travelEntry); + } + + public static TeleportationRenderer getRenderer(T entry) { + return (TeleportationRenderer) registry.get(entry.getSerializationName()).renderer().get(); + } + + public static Optional deserialize(CompoundTag nbt) { + return Optional.ofNullable(registry.get(new ResourceLocation(nbt.getString("name")))).map(entry -> entry.constructor().apply(nbt.getCompound("data"))); + } + + public static boolean isRegistered(ITravelTarget target) { + return registry.containsKey(target.getSerializationName()); + } + + public static CompoundTag serialize(ITravelTarget travelData) { + CompoundTag nbt = new CompoundTag(); + nbt.putString("name", travelData.getSerializationName().toString()); + nbt.put("data", travelData.save()); + return nbt; + } +} diff --git a/src/api/java/com/enderio/api/travel/package-info.java b/src/api/java/com/enderio/api/travel/package-info.java new file mode 100644 index 0000000000..570ec8e0c4 --- /dev/null +++ b/src/api/java/com/enderio/api/travel/package-info.java @@ -0,0 +1,5 @@ +@javax.annotation.ParametersAreNonnullByDefault +@net.minecraft.MethodsReturnNonnullByDefault +@com.tterrag.registrate.util.nullness.FieldsAreNonnullByDefault + +package com.enderio.api.travel; \ No newline at end of file diff --git a/src/core/java/com/enderio/core/common/sync/ItemDataSlot.java b/src/core/java/com/enderio/core/common/sync/ItemDataSlot.java new file mode 100644 index 0000000000..b6a8b880c4 --- /dev/null +++ b/src/core/java/com/enderio/core/common/sync/ItemDataSlot.java @@ -0,0 +1,28 @@ +package com.enderio.core.common.sync; + +import net.minecraft.nbt.CompoundTag; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.Item; +import net.minecraftforge.registries.ForgeRegistries; + +import java.util.function.Consumer; +import java.util.function.Supplier; + +public class ItemDataSlot extends EnderDataSlot { + + public ItemDataSlot(Supplier getter, Consumer setter, SyncMode mode) { + super(getter, setter, mode); + } + + @Override + public CompoundTag toFullNBT() { + CompoundTag tag = new CompoundTag(); + tag.putString("value", String.valueOf(ForgeRegistries.ITEMS.getKey(getter().get()))); + return tag; + } + + @Override + protected Item fromNBT(CompoundTag nbt) { + return ForgeRegistries.ITEMS.getValue(new ResourceLocation(nbt.getString("value"))); + } +} diff --git a/src/core/java/com/enderio/core/common/sync/StringDataSlot.java b/src/core/java/com/enderio/core/common/sync/StringDataSlot.java new file mode 100644 index 0000000000..1ecda511fa --- /dev/null +++ b/src/core/java/com/enderio/core/common/sync/StringDataSlot.java @@ -0,0 +1,25 @@ +package com.enderio.core.common.sync; + +import net.minecraft.nbt.CompoundTag; + +import java.util.function.Consumer; +import java.util.function.Supplier; + +public class StringDataSlot extends EnderDataSlot { + + public StringDataSlot(Supplier getter, Consumer setter, SyncMode mode) { + super(getter, setter, mode); + } + + @Override + public CompoundTag toFullNBT() { + CompoundTag tag = new CompoundTag(); + tag.putString("value", getter().get()); + return tag; + } + + @Override + protected String fromNBT(CompoundTag nbt) { + return nbt.getString("value"); + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/blockstates/travel_anchor.json b/src/generated/resources/assets/enderio/blockstates/travel_anchor.json new file mode 100644 index 0000000000..36e11dc0b0 --- /dev/null +++ b/src/generated/resources/assets/enderio/blockstates/travel_anchor.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "enderio:block/travel_anchor" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/lang/en_ud.json b/src/generated/resources/assets/enderio/lang/en_ud.json index 5faa3bbc84..099329223d 100644 --- a/src/generated/resources/assets/enderio/lang/en_ud.json +++ b/src/generated/resources/assets/enderio/lang/en_ud.json @@ -797,6 +797,7 @@ "block.enderio.soularium_pressure_plate": "ǝʇɐןԀ ǝɹnssǝɹԀ ɯnıɹɐןnoS", "block.enderio.soulless_machine_chassis": "sıssɐɥƆ ǝuıɥɔɐW ssǝןןnoS", "block.enderio.stirling_generator": "ɹoʇɐɹǝuǝ⅁ buıןɹıʇS", + "block.enderio.travel_anchor": "ɹoɥɔuⱯ ןǝʌɐɹ⟘", "block.enderio.vacuum_chest": "ʇsǝɥƆ ɯnnɔɐΛ", "block.enderio.vapor_of_levity": "ʎʇıʌǝꞀ ɟO ɹodɐΛ", "block.enderio.vibrant_alloy_block": "ʞɔoןᗺ ʎoןןⱯ ʇuɐɹqıΛ", @@ -1004,6 +1005,7 @@ "item.enderio.soularium_ingot": "ʇobuI ɯnıɹɐןnoS", "item.enderio.soularium_nugget": "ʇǝbbnN ɯnıɹɐןnoS", "item.enderio.staff_of_levity": "ʎʇıʌǝꞀ ɟO ɟɟɐʇS", + "item.enderio.staff_of_travelling": "buıןןǝʌɐɹ⟘ ɟO ɟɟɐʇS", "item.enderio.stone_gear": "ɹɐǝ⅁ punodɯoƆ ǝuoʇS", "item.enderio.tin_powder": "ɹǝpʍoԀ uı⟘", "item.enderio.unfired_death_urn": "uɹ∩ ɥʇɐǝᗡ pǝɹıɟu∩", diff --git a/src/generated/resources/assets/enderio/lang/en_us.json b/src/generated/resources/assets/enderio/lang/en_us.json index 063656385d..286c485b7f 100644 --- a/src/generated/resources/assets/enderio/lang/en_us.json +++ b/src/generated/resources/assets/enderio/lang/en_us.json @@ -797,6 +797,7 @@ "block.enderio.soularium_pressure_plate": "Soularium Pressure Plate", "block.enderio.soulless_machine_chassis": "Soulless Machine Chassis", "block.enderio.stirling_generator": "Stirling Generator", + "block.enderio.travel_anchor": "Travel Anchor", "block.enderio.vacuum_chest": "Vacuum Chest", "block.enderio.vapor_of_levity": "Vapor Of Levity", "block.enderio.vibrant_alloy_block": "Vibrant Alloy Block", @@ -1004,6 +1005,7 @@ "item.enderio.soularium_ingot": "Soularium Ingot", "item.enderio.soularium_nugget": "Soularium Nugget", "item.enderio.staff_of_levity": "Staff Of Levity", + "item.enderio.staff_of_travelling": "Staff Of Travelling", "item.enderio.stone_gear": "Stone Compound Gear", "item.enderio.tin_powder": "Tin Powder", "item.enderio.unfired_death_urn": "Unfired Death Urn", diff --git a/src/generated/resources/assets/enderio/models/item/staff_of_travelling.json b/src/generated/resources/assets/enderio/models/item/staff_of_travelling.json new file mode 100644 index 0000000000..4848b3e602 --- /dev/null +++ b/src/generated/resources/assets/enderio/models/item/staff_of_travelling.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "enderio:item/staff_of_travelling" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/item/travel_anchor.json b/src/generated/resources/assets/enderio/models/item/travel_anchor.json new file mode 100644 index 0000000000..cefad22a4b --- /dev/null +++ b/src/generated/resources/assets/enderio/models/item/travel_anchor.json @@ -0,0 +1,3 @@ +{ + "parent": "enderio:block/travel_anchor" +} \ No newline at end of file diff --git a/src/generated/resources/data/enderio/advancements/recipes/enderio.gear/empty_soul_vial.json b/src/generated/resources/data/enderio/advancements/recipes/enderio.souls/empty_soul_vial.json similarity index 100% rename from src/generated/resources/data/enderio/advancements/recipes/enderio.gear/empty_soul_vial.json rename to src/generated/resources/data/enderio/advancements/recipes/enderio.souls/empty_soul_vial.json diff --git a/src/generated/resources/data/enderio/loot_tables/blocks/travel_anchor.json b/src/generated/resources/data/enderio/loot_tables/blocks/travel_anchor.json new file mode 100644 index 0000000000..c305fdf6b2 --- /dev/null +++ b/src/generated/resources/data/enderio/loot_tables/blocks/travel_anchor.json @@ -0,0 +1,28 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:copy_nbt", + "ops": [ + { + "op": "replace", + "source": "", + "target": "BlockEntityTag" + } + ], + "source": "block_entity" + } + ], + "name": "enderio:travel_anchor" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/src/machines/java/com/enderio/machines/EIOMachines.java b/src/machines/java/com/enderio/machines/EIOMachines.java index a40424b540..b4356b19b7 100644 --- a/src/machines/java/com/enderio/machines/EIOMachines.java +++ b/src/machines/java/com/enderio/machines/EIOMachines.java @@ -1,12 +1,15 @@ package com.enderio.machines; import com.enderio.EnderIO; +import com.enderio.api.travel.TravelRegistry; +import com.enderio.machines.client.rendering.travel.TravelAnchorRenderer; import com.enderio.machines.common.config.MachinesConfig; import com.enderio.machines.common.init.MachineBlockEntities; import com.enderio.machines.common.init.MachineBlocks; import com.enderio.machines.common.init.MachineMenus; import com.enderio.machines.common.init.MachineRecipes; import com.enderio.machines.common.lang.MachineLang; +import com.enderio.machines.common.travel.AnchorTravelTarget; import com.enderio.machines.data.recipes.*; import net.minecraft.data.DataGenerator; import net.minecraftforge.data.event.GatherDataEvent; @@ -16,6 +19,8 @@ import net.minecraftforge.fml.config.ModConfig; import net.minecraftforge.fml.event.lifecycle.FMLConstructModEvent; +import static com.enderio.EnderIO.loc; + @Mod.EventBusSubscriber(modid = EnderIO.MODID, bus = Mod.EventBusSubscriber.Bus.MOD) public class EIOMachines { @SubscribeEvent @@ -31,6 +36,8 @@ public static void onConstruct(FMLConstructModEvent event) { MachineMenus.register(); MachineLang.register(); MachineRecipes.register(); + + TravelRegistry.addTravelEntry(loc("travel_anchor"), AnchorTravelTarget::new, TravelAnchorRenderer::new); } @SubscribeEvent diff --git a/src/machines/java/com/enderio/machines/client/rendering/travel/TravelAnchorRenderer.java b/src/machines/java/com/enderio/machines/client/rendering/travel/TravelAnchorRenderer.java new file mode 100644 index 0000000000..b774b498f1 --- /dev/null +++ b/src/machines/java/com/enderio/machines/client/rendering/travel/TravelAnchorRenderer.java @@ -0,0 +1,22 @@ +package com.enderio.machines.client.rendering.travel; + +import com.enderio.api.travel.TeleportationRenderer; +import com.enderio.machines.common.travel.AnchorTravelTarget; +import com.mojang.blaze3d.vertex.PoseStack; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.LevelRenderer; +import net.minecraft.client.renderer.texture.OverlayTexture; +import net.minecraft.world.level.block.Blocks; + +public class TravelAnchorRenderer implements TeleportationRenderer { + @Override + public void render(AnchorTravelTarget travelData, LevelRenderer levelRenderer, PoseStack poseStack) { + poseStack.pushPose(); + poseStack.translate(travelData.getPos().getX(), travelData.getPos().getY(), travelData.getPos().getZ()); + //TODO: Render the Travel Anchor name icon and do some other stuff, pls Crazy, be a rendering genius + Minecraft + .getInstance().getBlockRenderer().renderSingleBlock(Blocks.AMETHYST_BLOCK.defaultBlockState(), poseStack, Minecraft.getInstance().renderBuffers().bufferSource(), 0xF000F0, + OverlayTexture.NO_OVERLAY); + poseStack.popPose(); + } +} diff --git a/src/machines/java/com/enderio/machines/client/rendering/travel/package-info.java b/src/machines/java/com/enderio/machines/client/rendering/travel/package-info.java new file mode 100644 index 0000000000..fb3ef0f691 --- /dev/null +++ b/src/machines/java/com/enderio/machines/client/rendering/travel/package-info.java @@ -0,0 +1,5 @@ +@javax.annotation.ParametersAreNonnullByDefault +@net.minecraft.MethodsReturnNonnullByDefault +@com.tterrag.registrate.util.nullness.FieldsAreNonnullByDefault + +package com.enderio.machines.client.rendering.travel; \ No newline at end of file diff --git a/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java b/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java new file mode 100644 index 0000000000..84602ea03a --- /dev/null +++ b/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java @@ -0,0 +1,57 @@ +package com.enderio.machines.common.block; + +import com.enderio.base.common.handler.TeleportHandler; +import com.enderio.machines.common.init.MachineBlockEntities; +import net.minecraft.core.BlockPos; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.EntityBlock; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraftforge.event.TickEvent; +import net.minecraftforge.event.entity.living.LivingEvent; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import org.apache.commons.lang3.tuple.Pair; +import org.jetbrains.annotations.Nullable; + +import java.util.WeakHashMap; + +public class TravelAnchorBlock extends Block implements EntityBlock { + private static final WeakHashMap> sneakCache = new WeakHashMap<>(); + + public TravelAnchorBlock(Properties props) { + super(props); + } + + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos pPos, BlockState pState) { + return MachineBlockEntities.TRAVEL_ANCHOR.create(pPos, pState); + } + + @SubscribeEvent + public static void jump(LivingEvent.LivingJumpEvent jumpEvent) { + if (!jumpEvent.getEntity().level.isClientSide && jumpEvent.getEntity() instanceof Player player) { + if (player.level.getBlockState(player.blockPosition().below()).getBlock() instanceof TravelAnchorBlock) { + TeleportHandler.blockTeleport(player.level, player); + } + } + } + + @SubscribeEvent + public static void sneak(TickEvent.PlayerTickEvent event) { + if (event.phase == TickEvent.Phase.END + && event.player instanceof ServerPlayer player + && player.level.getBlockState(player.blockPosition().below()).getBlock() instanceof TravelAnchorBlock) { + + Pair sneakEntry = sneakCache.getOrDefault(player, Pair.of(false, player.getLevel().getServer().getTickCount()-1)); + if ((!sneakEntry.getLeft() || sneakEntry.getRight() != player.getLevel().getServer().getTickCount()-1) + && player.isShiftKeyDown()) { + + TeleportHandler.blockTeleport(player.level, player); + } + sneakCache.put(player, Pair.of(player.isShiftKeyDown(), player.getLevel().getServer().getTickCount())); + } + } +} diff --git a/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java new file mode 100644 index 0000000000..50a2d9d09d --- /dev/null +++ b/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java @@ -0,0 +1,94 @@ +package com.enderio.machines.common.blockentity; + +import com.enderio.base.common.travel.TravelSavedData; +import com.enderio.core.common.sync.ItemDataSlot; +import com.enderio.core.common.sync.StringDataSlot; +import com.enderio.core.common.sync.SyncMode; +import com.enderio.machines.common.blockentity.base.MachineBlockEntity; +import com.enderio.machines.common.travel.AnchorTravelTarget; +import net.minecraft.core.BlockPos; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.Items; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import org.jetbrains.annotations.Nullable; + +import java.util.Optional; +import java.util.Random; + +public class TravelAnchorBlockEntity extends MachineBlockEntity { + + private String name = ""; + private Item icon = Items.AIR; + + public TravelAnchorBlockEntity(BlockEntityType pType, BlockPos pWorldPosition, BlockState pBlockState) { + super(pType, pWorldPosition, pBlockState); + add2WayDataSlot(new StringDataSlot(this::getName, this::setName, SyncMode.GUI)); + add2WayDataSlot(new ItemDataSlot(this::getIcon, this::setIcon, SyncMode.GUI)); + name = ('a' + new Random().nextInt(26)) + ""; + } + + @Nullable + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + Optional target = getTravelTarget(); + if (target.isPresent()) { + target.get().setName(name); + } else { + getTravelData().addTravelTarget(createTravelTarget()); + } + } + + public Item getIcon() { + setChanged(); + return icon; + } + + public void setIcon(Item icon) { + setChanged(); + this.icon = icon; + Optional target = getTravelTarget(); + if (target.isPresent()) { + target.get().setIcon(icon != Items.AIR ? icon : null); + } else { + getTravelData().addTravelTarget(createTravelTarget()); + } + } + + @Override + public void onLoad() { + getTravelData().addTravelTarget(createTravelTarget()); + super.onLoad(); + } + + @Override + public void setRemoved() { + getTravelData().removeTravelTargetAt(worldPosition); + super.setRemoved(); + } + + private AnchorTravelTarget createTravelTarget() { + return new AnchorTravelTarget(worldPosition, getName(), getIcon() == Items.AIR ? null: getIcon()); + } + + private Optional getTravelTarget() { + return getTravelData().getTravelTarget(worldPosition).filter(target -> target instanceof AnchorTravelTarget).map(target -> (AnchorTravelTarget)target); + } + + private TravelSavedData getTravelData() { + return TravelSavedData.getTravelData(level); + } + + @Nullable + @Override + public AbstractContainerMenu createMenu(int pContainerId, Inventory pPlayerInventory, Player pPlayer) { + return null; + } +} diff --git a/src/machines/java/com/enderio/machines/common/init/MachineBlockEntities.java b/src/machines/java/com/enderio/machines/common/init/MachineBlockEntities.java index 596b57e0a2..722ff2ee4a 100644 --- a/src/machines/java/com/enderio/machines/common/init/MachineBlockEntities.java +++ b/src/machines/java/com/enderio/machines/common/init/MachineBlockEntities.java @@ -39,6 +39,8 @@ public class MachineBlockEntities { public static final BlockEntityEntry VACUUM_CHEST = register("vacuum_chest", VacuumChestBlockEntity::new, MachineBlocks.VACUUM_CHEST); public static final BlockEntityEntry XP_VACUUM = register("xp_vacuum", XPVacuumBlockEntity::new, MachineBlocks.XP_VACUUM); + public static final BlockEntityEntry TRAVEL_ANCHOR = register("travel_anchor", TravelAnchorBlockEntity::new, + MachineBlocks.TRAVEL_ANCHOR); @SafeVarargs private static BlockEntityEntry register(String name, BlockEntityBuilder.BlockEntityFactory beFactory, diff --git a/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java b/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java index f71ab139e1..9963b9e97d 100644 --- a/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java +++ b/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java @@ -5,6 +5,7 @@ import com.enderio.core.data.model.EIOModel; import com.enderio.machines.common.block.MachineBlock; import com.enderio.machines.common.block.ProgressMachineBlock; +import com.enderio.machines.common.block.TravelAnchorBlock; import com.enderio.machines.common.blockentity.base.MachineBlockEntity; import com.enderio.machines.common.item.FluidTankItem; import com.enderio.machines.data.loot.MachinesLootTable; @@ -15,7 +16,6 @@ import com.tterrag.registrate.util.entry.BlockEntityEntry; import com.tterrag.registrate.util.entry.BlockEntry; import net.minecraft.world.level.block.state.properties.BlockStateProperties; -import net.minecraftforge.client.model.generators.BlockModelBuilder; import net.minecraftforge.client.model.generators.BlockModelBuilder.RootTransformBuilder.TransformOrigin; import net.minecraftforge.client.model.generators.ConfiguredModel; import net.minecraftforge.client.model.generators.ModelFile; @@ -144,7 +144,18 @@ public class MachineBlocks { .build() .register(); - private static BlockBuilder standardMachine(String name, Supplier> blockEntityEntry) { + public static final BlockEntry TRAVEL_ANCHOR = REGISTRATE + .block("travel_anchor", TravelAnchorBlock::new) + .properties(props -> props.strength(2.5f, 8).noOcclusion()) + .loot(MachinesLootTable::copyNBT) + .blockstate((ctx, prov) -> prov.simpleBlock(ctx.get(), prov.models().getExistingFile(EnderIO.loc("block/travel_anchor")))) + .item() + .tab(() -> EIOCreativeTabs.MACHINES) + .build() + .register(); + + private static BlockBuilder standardMachine(String name, + Supplier> blockEntityEntry) { return REGISTRATE .block(name, props -> new ProgressMachineBlock(props, blockEntityEntry.get())) .properties(props -> props.strength(2.5f, 8)) diff --git a/src/machines/java/com/enderio/machines/common/travel/AnchorTravelTarget.java b/src/machines/java/com/enderio/machines/common/travel/AnchorTravelTarget.java new file mode 100644 index 0000000000..8385e7eb14 --- /dev/null +++ b/src/machines/java/com/enderio/machines/common/travel/AnchorTravelTarget.java @@ -0,0 +1,97 @@ +package com.enderio.machines.common.travel; + +import com.enderio.EnderIO; +import com.enderio.api.travel.ITravelTarget; +import com.enderio.base.common.config.BaseConfig; +import net.minecraft.core.BlockPos; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.nbt.NbtUtils; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.Item; +import net.minecraftforge.registries.ForgeRegistries; +import org.jetbrains.annotations.Nullable; + +import java.util.Objects; + +public class AnchorTravelTarget implements ITravelTarget { + + public static final ResourceLocation SERIALIZED_NAME = EnderIO.loc("travel_anchor"); + + private final BlockPos pos; + private String name; + @Nullable + private Item icon; + + public AnchorTravelTarget(BlockPos pos, String name, @Nullable Item icon) { + this.pos = pos; + this.name = name; + this.icon = icon; + } + + public AnchorTravelTarget(CompoundTag tag) { + pos = NbtUtils.readBlockPos(tag.getCompound("pos")); + name = tag.getString("name"); + String iconName = tag.getString("icon"); + icon = iconName.equals("") ? null : ForgeRegistries.ITEMS.getValue(new ResourceLocation(iconName)); + } + + @Override + public CompoundTag save() { + CompoundTag nbt = new CompoundTag(); + nbt.put("pos", NbtUtils.writeBlockPos(pos)); + nbt.putString("name", name); + if (icon != null) + nbt.putString("icon", String.valueOf(ForgeRegistries.ITEMS.getKey(icon))); + return nbt; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + if (!(o instanceof AnchorTravelTarget other)) + return false; + return pos.equals(other.pos) + && name.equals(other.name) + && Objects.equals(icon, other.icon); + } + + @Override + public int hashCode() { + return Objects.hash(pos, name, icon); + } + + @Override + public BlockPos getPos() { + return pos; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @Nullable + public Item getIcon() { + return icon; + } + + public void setIcon(@Nullable Item icon) { + this.icon = icon; + } + + @Override + public int getItem2BlockRange() { + return BaseConfig.COMMON.ITEMS.TRAVELLING_TO_BLOCK_RANGE.get(); + } + + @Override + public ResourceLocation getSerializationName() { + return SERIALIZED_NAME; + } +} diff --git a/src/main/java/com/enderio/base/client/ClientSetup.java b/src/main/java/com/enderio/base/client/ClientSetup.java index 2117d2112e..202bf79783 100644 --- a/src/main/java/com/enderio/base/client/ClientSetup.java +++ b/src/main/java/com/enderio/base/client/ClientSetup.java @@ -2,12 +2,12 @@ import com.enderio.EnderIO; import com.enderio.base.client.particle.RangeParticle; -import com.enderio.base.common.init.EIOParticles; -import com.enderio.core.client.item.EnergyBarDecorator; -import com.enderio.core.client.item.FluidBarDecorator; import com.enderio.base.client.renderer.item.GlassIconDecorator; import com.enderio.base.common.init.EIOBlocks; import com.enderio.base.common.init.EIOItems; +import com.enderio.base.common.init.EIOParticles; +import com.enderio.core.client.item.EnergyBarDecorator; +import com.enderio.core.client.item.FluidBarDecorator; import net.minecraft.client.Minecraft; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.client.event.ModelEvent; @@ -33,6 +33,7 @@ public static void additionalModels(ModelEvent.RegisterAdditional event) { public static void itemDecorators(RegisterItemDecorationsEvent event) { // Register tools event.register(EIOItems.LEVITATION_STAFF.get(), FluidBarDecorator.INSTANCE); + event.register(EIOItems.TRAVEL_STAFF.get(), EnergyBarDecorator.INSTANCE); event.register(EIOItems.DARK_STEEL_AXE.get(), EnergyBarDecorator.INSTANCE); event.register(EIOItems.DARK_STEEL_PICKAXE.get(), EnergyBarDecorator.INSTANCE); diff --git a/src/main/java/com/enderio/base/client/gui/ClientToServerMenuSyncHandler.java b/src/main/java/com/enderio/base/client/gui/ClientToServerMenuSyncHandler.java new file mode 100644 index 0000000000..e4f64009d1 --- /dev/null +++ b/src/main/java/com/enderio/base/client/gui/ClientToServerMenuSyncHandler.java @@ -0,0 +1,20 @@ +package com.enderio.base.client.gui; + +import com.enderio.core.common.menu.SyncedMenu; +import net.minecraft.client.Minecraft; +import net.minecraft.client.player.LocalPlayer; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.event.TickEvent; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.common.Mod; + +@Mod.EventBusSubscriber(value = Dist.CLIENT) +public class ClientToServerMenuSyncHandler { + @SubscribeEvent + public static void clientTick(TickEvent.ClientTickEvent e) { + LocalPlayer player = Minecraft.getInstance().player; + if (e.phase == TickEvent.Phase.END && player != null && player.containerMenu instanceof SyncedMenu syncedMenu) { + syncedMenu.clientTick(); + } + } +} diff --git a/src/main/java/com/enderio/base/client/renderer/teleportation/RenderTeleportTargets.java b/src/main/java/com/enderio/base/client/renderer/teleportation/RenderTeleportTargets.java new file mode 100644 index 0000000000..4bed30f844 --- /dev/null +++ b/src/main/java/com/enderio/base/client/renderer/teleportation/RenderTeleportTargets.java @@ -0,0 +1,35 @@ +package com.enderio.base.client.renderer.teleportation; + +import com.enderio.api.travel.ITravelTarget; +import com.enderio.api.travel.TravelRegistry; +import com.enderio.base.common.travel.TravelSavedData; +import com.mojang.blaze3d.vertex.PoseStack; +import net.minecraft.client.Camera; +import net.minecraft.client.Minecraft; +import net.minecraft.world.phys.Vec3; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.client.event.RenderLevelLastEvent; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.common.Mod; + +@Mod.EventBusSubscriber(value = Dist.CLIENT) +public class RenderTeleportTargets { + + @SubscribeEvent + // TODO : DEPRECATED- REPLACE WITH RenderLevelStageEvent + public static void renderLevel(RenderLevelLastEvent event) { + TravelSavedData data = TravelSavedData.getTravelData(Minecraft.getInstance().level); + for (ITravelTarget target : data.getTravelTargets()) { + PoseStack poseStack = event.getPoseStack(); + poseStack.pushPose(); + Camera mainCamera = Minecraft.getInstance().gameRenderer.getMainCamera(); + Vec3 projectedView = mainCamera.getPosition(); + poseStack.translate(-projectedView.x, -projectedView.y, -projectedView.z); + + //TODO: Scale, View Bobbing, (FOV/Creative Flight offset stuff) + // pls Crazy, be a rendering genius + TravelRegistry.getRenderer(target).render(target, event.getLevelRenderer(), poseStack); + poseStack.popPose(); + } + } +} diff --git a/src/main/java/com/enderio/base/client/renderer/teleportation/TeleportParticleHandler.java b/src/main/java/com/enderio/base/client/renderer/teleportation/TeleportParticleHandler.java new file mode 100644 index 0000000000..b61e9ac716 --- /dev/null +++ b/src/main/java/com/enderio/base/client/renderer/teleportation/TeleportParticleHandler.java @@ -0,0 +1,68 @@ +package com.enderio.base.client.renderer.teleportation; + +import com.enderio.base.common.handler.TeleportHandler; +import net.minecraft.client.Minecraft; +import net.minecraft.client.particle.Particle; +import net.minecraft.client.player.LocalPlayer; +import net.minecraft.core.particles.ParticleTypes; +import net.minecraft.util.Mth; +import net.minecraft.world.phys.Vec3; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.event.TickEvent; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.common.Mod; +import org.apache.commons.lang3.tuple.Triple; +import org.jetbrains.annotations.Nullable; + +import java.util.Calendar; +import java.util.Optional; + +@Mod.EventBusSubscriber(value = Dist.CLIENT) +public class TeleportParticleHandler { + private static int tick = 0; + + @SubscribeEvent + public static void clientTick(TickEvent.ClientTickEvent e) { + LocalPlayer player = Minecraft.getInstance().player; + if (e.phase == TickEvent.Phase.END && player != null) { + tick++; + if (player.isShiftKeyDown() && TeleportHandler.canTeleport(player) && tick%3==0) { + Optional pos = TeleportHandler.teleportPosition(player.getLevel(), player); + if (pos.isPresent()) { + addTravelParticle(pos.get()); + } + } + } + } + + + private static void addTravelParticle(Vec3 pos) { + int time = tick/3%20; + float x = Mth.sin((float)(time*Math.PI)/10f); + float z = Mth.cos((float)(time*Math.PI)/10f); + @Nullable Particle particle = Minecraft.getInstance().levelRenderer.addParticleInternal( + ParticleTypes.TOTEM_OF_UNDYING, false, true, pos.x() + x, pos.y() + 0.4, pos.z() + z, 0, 0, 0); + if (particle != null) { + particle.setLifetime(30); + var color = getTravelParticleColor(); + particle.gravity = 0; + particle.setColor(color.getLeft(), color.getMiddle(), color.getRight()); + } + } + + private static Triple getTravelParticleColor() { + if (Calendar.getInstance().get(Calendar.MONTH) == Calendar.JUNE) { + int halfTick = tick/3%10; + return switch (halfTick) { + case 0: yield Triple.of(228/255f, 3/255f, 3/255f); + case 1: yield Triple.of(255/255f, 140/255f, 0/255f); + case 2: yield Triple.of(255/255f, 237/255f, 0/255f); + case 3: yield Triple.of(0/255f, 128/255f, 38/255f); + case 4: yield Triple.of(0/255f, 77/255f, 255/255f); + case 5: yield Triple.of(117/255f, 7/255f, 135/255f); + default: yield Triple.of(255/255f, 255/255f, 255/255f); + }; + } + return Triple.of(117/255f, 7/255f, 135/255f); + } +} \ No newline at end of file diff --git a/src/main/java/com/enderio/base/common/config/common/ItemsConfig.java b/src/main/java/com/enderio/base/common/config/common/ItemsConfig.java index 333336e217..faac847029 100644 --- a/src/main/java/com/enderio/base/common/config/common/ItemsConfig.java +++ b/src/main/java/com/enderio/base/common/config/common/ItemsConfig.java @@ -19,6 +19,14 @@ public class ItemsConfig { public final ForgeConfigSpec.ConfigValue LEVITATION_STAFF_ENERGY_USE; public final ForgeConfigSpec.ConfigValue LEVITATION_STAFF_MAX_ENERGY; + public final ForgeConfigSpec.ConfigValue TRAVELLING_BLINK_RANGE; + public final ForgeConfigSpec.ConfigValue TRAVELLING_BLINK_DISABLED_TIME; + // public final ForgeConfigSpec.ConfigValue TRAVELLING_STAFF_ENERGY_USE; + // public final ForgeConfigSpec.ConfigValue TRAVELLING_STAFF_MAX_ENERGY; + + public final ForgeConfigSpec.ConfigValue TRAVELLING_TO_BLOCK_RANGE; + public final ForgeConfigSpec.ConfigValue TRAVELLING_BLOCK_TO_BLOCK_RANGE; + public final ForgeConfigSpec.ConfigValue> SOUL_VIAL_BLACKLIST; public ItemsConfig(ForgeConfigSpec.Builder builder) { @@ -41,10 +49,21 @@ public ItemsConfig(ForgeConfigSpec.Builder builder) { LEVITATION_STAFF_MAX_ENERGY = builder.define("maxEnergy", 1000); builder.pop(); + builder.push("travelling"); + TRAVELLING_BLINK_RANGE = builder.defineInRange("blinkRange", 24, 4, 16 * 32); + TRAVELLING_BLINK_DISABLED_TIME = builder.defineInRange("disabledTime", 5, 0, 20 * 60); + // TRAVELLING_STAFF_ENERGY_USE = builder.define("energyUse", 1); + // TRAVELLING_STAFF_MAX_ENERGY = builder.define("maxEnergy", 1000); + builder.comment("the following config values are only used if EIOMachines is loaded"); + TRAVELLING_TO_BLOCK_RANGE = builder.defineInRange("itemToBlockRange", 256, 4, 16 * 32); + TRAVELLING_BLOCK_TO_BLOCK_RANGE = builder.defineInRange("blockToBlockRange", 96, 4, 16 * 32); + builder.pop(); + builder.push("soulvial"); - SOUL_VIAL_BLACKLIST = builder.comment("A list of entities that cannot be captured in the soul vial.") - .defineList("denylist", - List.of(ForgeRegistries.ENTITY_TYPES.getKey(EntityType.WITHER).toString(),ForgeRegistries.ENTITY_TYPES.getKey(EntityType.ELDER_GUARDIAN).toString()), + SOUL_VIAL_BLACKLIST = builder + .comment("A list of entities that cannot be captured in the soul vial.") + .defineList("denylist", List.of(ForgeRegistries.ENTITY_TYPES.getKey(EntityType.WITHER).toString(), + ForgeRegistries.ENTITY_TYPES.getKey(EntityType.ELDER_GUARDIAN).toString()), value -> value instanceof String string && ResourceLocation.isValidResourceLocation(string)); builder.pop(); diff --git a/src/main/java/com/enderio/base/common/handler/TeleportHandler.java b/src/main/java/com/enderio/base/common/handler/TeleportHandler.java new file mode 100644 index 0000000000..0769837c6f --- /dev/null +++ b/src/main/java/com/enderio/base/common/handler/TeleportHandler.java @@ -0,0 +1,156 @@ +package com.enderio.base.common.handler; + +import com.enderio.api.travel.ITravelTarget; +import com.enderio.base.common.config.BaseConfig; +import com.enderio.base.common.init.EIOItems; +import com.enderio.base.common.item.darksteel.IDarkSteelItem; +import com.enderio.base.common.travel.TravelSavedData; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.sounds.SoundSource; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.phys.Vec3; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.entity.EntityTeleportEvent; +import org.jetbrains.annotations.Nullable; + +import java.util.Comparator; +import java.util.Optional; + +/** + * Thanks to the developers of https://github.com/castcrafter/travel_anchors for allowing us to use their code with our license. + * For their agreements look at doc/license/castcrafter/travel-anchors/license.md in the repo root + */ + +public class TeleportHandler { + public static boolean canTeleport(Player player) { + return canTeleport(player, InteractionHand.MAIN_HAND) || canTeleport(player, InteractionHand.OFF_HAND); + } + + public static boolean canTeleport(Player player, InteractionHand hand) { + ItemStack stack = player.getItemInHand(hand); + if (stack.getItem() == EIOItems.TRAVEL_STAFF.get()) + return true; + if (stack.getItem() instanceof IDarkSteelItem darkSteelItem) { + //TODO: Check for upgrade; + } + return false; + } + + public static boolean shortTeleport(Level level, Player player) { + Optional pos = teleportPosition(level, player); + if (pos.isPresent()){ + if (!level.isClientSide) { + Optional eventPos = teleportEvent(player, pos.get()); + if (eventPos.isPresent()) { + player.teleportTo(eventPos.get().x(), eventPos.get().y(), eventPos.get().z()); + player.fallDistance = 0; + player.playNotifySound(SoundEvents.ENDERMAN_TELEPORT, SoundSource.PLAYERS, 1F, 1F); + } else { + player.playNotifySound(SoundEvents.DISPENSER_FAIL, SoundSource.PLAYERS, 1F, 1F); + } + } + return true; + } else { + return false; + } + } + + public static boolean blockTeleport(Level level, Player player) { + Optional target = getAnchorTarget(player); + if (target.isPresent()) { + if (!player.getLevel().isClientSide) { + Optional height = isTeleportPositionClear(level, target.get().getPos()); + if (height.isEmpty()) { + return false; + } + BlockPos blockPos = target.get().getPos(); + Vec3 teleportPosition = new Vec3(blockPos.getX() + 0.5f, blockPos.getY()+height.get()+1, blockPos.getZ() + 0.5f); + teleportPosition = teleportEvent(player, teleportPosition).orElse(null); + if (teleportPosition != null) { + player.fallDistance = 0; + player.teleportTo(teleportPosition.x(), teleportPosition.y(), teleportPosition.z()); + player.playNotifySound(SoundEvents.ENDERMAN_TELEPORT, SoundSource.PLAYERS, 1F, 1F); + return true; + } + } + } + return false; + } + + public static Optional teleportPosition(Level level, Player player) { + Vec3 targetVec = player.position().add(0, player.getEyeHeight(), 0); + Vec3 lookVec = player.getLookAngle().normalize(); + @Nullable BlockPos target = null; + double floorHeight = 0; + for (double i = BaseConfig.COMMON.ITEMS.TRAVELLING_BLINK_RANGE.get(); i >= 2; i -= 0.5) { + Vec3 v3d = targetVec.add(lookVec.scale(i)); + target = new BlockPos(Math.round(v3d.x), Math.round(v3d.y), Math.round(v3d.z)); + Optional ground = isTeleportPositionClear(level, target.below()); + if (ground.isPresent()) { //to use the same check as the anchors use the position below + floorHeight = ground.get(); + break; + } else { + target = null; + } + } + if (target == null) { + return Optional.empty(); + } + return Optional.of(Vec3.atBottomCenterOf(target).add(0, floorHeight, 0)); + } + + private static Optional getAnchorTarget(Player player) { + Vec3 positionVec = player.position().add(0, player.getEyeHeight(), 0); + + return TravelSavedData.getTravelData(player.getLevel()).getTravelTargetsInItemRange(new BlockPos(player.position())) + .filter(target -> target.getPos().distToLowCornerSqr(player.getX(), player.getY(), player.getZ()) > 25) //only teleport to blocks not directly in range + .filter(target -> Math.abs(getAngleRadians(positionVec, target.getPos(), player.getYRot(), player.getXRot())) <= Math.toRadians(15)) + .filter(target -> isTeleportPositionClear(player.getLevel(), target.getPos()).isPresent()) + .min(Comparator.comparingDouble(target -> + Math.abs(getAngleRadians(positionVec, target.getPos(), player.getYRot(), player.getXRot())) + )); + } + + + private static double getAngleRadians(Vec3 positionVec, BlockPos anchor, float yRot, float xRot) { + Vec3 blockVec = new Vec3(anchor.getX() + 0.5 - positionVec.x, anchor.getY() + 1.0 - positionVec.y, anchor.getZ() + 0.5 - positionVec.z).normalize(); + Vec3 lookVec = Vec3.directionFromRotation(xRot, yRot).normalize(); + return Math.acos(lookVec.dot(blockVec)); + } + + /** + * + * @param level + * @param target + * @return Optional.empty if it can't teleport and the height where to place the player. This is so you can tp ontop of carpets up to a whole block + */ + private static Optional isTeleportPositionClear(BlockGetter level, BlockPos target) { + if (level.isOutsideBuildHeight(target)) + return Optional.empty(); + if (!level.getBlockState(target.above(2)).canOcclude()) { + BlockPos above = target.above(); + double height = level.getBlockState(above).getCollisionShape(level, above).max(Direction.Axis.Y); + if (height > 0.2d && !level.getBlockState(target.above(3)).canOcclude() || height <=0.2d) { + if (height == Double.NEGATIVE_INFINITY) { + height = 0; + } + return Optional.of(height); + } + } + return Optional.empty(); + } + + private static Optional teleportEvent(Player player, Vec3 target) { + EntityTeleportEvent event = new EntityTeleportEvent(player, target.x(), target.y(), target.z()); + if (MinecraftForge.EVENT_BUS.post(event)) { + return Optional.empty(); + } + return Optional.of(new Vec3(event.getTargetX(), event.getTargetY(), event.getTargetZ())); + } +} diff --git a/src/main/java/com/enderio/base/common/init/EIOItems.java b/src/main/java/com/enderio/base/common/init/EIOItems.java index 7aebd4dfcf..3a1fc8ed20 100644 --- a/src/main/java/com/enderio/base/common/init/EIOItems.java +++ b/src/main/java/com/enderio/base/common/init/EIOItems.java @@ -4,7 +4,6 @@ import com.enderio.base.common.capacitor.DefaultCapacitorData; import com.enderio.base.common.config.BaseConfig; import com.enderio.base.common.item.EIOCreativeTabs; -import com.enderio.base.common.item.misc.LocationPrintoutItem; import com.enderio.base.common.item.capacitors.FixedCapacitorItem; import com.enderio.base.common.item.capacitors.LootCapacitorItem; import com.enderio.base.common.item.darksteel.DarkSteelAxeItem; @@ -16,11 +15,7 @@ import com.enderio.base.common.item.darksteel.upgrades.explosive.ExplosivePenetrationUpgradeTier; import com.enderio.base.common.item.darksteel.upgrades.explosive.ExplosiveUpgrade; import com.enderio.base.common.item.darksteel.upgrades.explosive.ExplosiveUpgradeTier; -import com.enderio.base.common.item.misc.EnderiosItem; -import com.enderio.base.common.item.misc.EnderfaceItem; -import com.enderio.base.common.item.misc.GearItem; -import com.enderio.base.common.item.misc.MaterialItem; -import com.enderio.base.common.item.misc.BrokenSpawnerItem; +import com.enderio.base.common.item.misc.*; import com.enderio.base.common.item.tool.*; import com.enderio.base.common.tag.EIOTags; import com.enderio.base.data.model.item.RotatingItemModel; @@ -342,6 +337,12 @@ private static ItemBuilder materialItemGlinted(String .tab(() -> EIOCreativeTabs.GEAR) .register(); + public static final ItemEntry TRAVEL_STAFF = REGISTRATE + .item("staff_of_travelling", TravelStaffItem::new) + .properties(props -> props.stacksTo(1)) + .tab(() -> EIOCreativeTabs.GEAR) + .register(); + public static final ItemEntry ELECTROMAGNET = REGISTRATE .item("electromagnet", ElectromagnetItem::new) .tab(() -> EIOCreativeTabs.GEAR) diff --git a/src/main/java/com/enderio/base/common/item/darksteel/IDarkSteelItem.java b/src/main/java/com/enderio/base/common/item/darksteel/IDarkSteelItem.java index e7f6b9281c..7a0bab59fb 100644 --- a/src/main/java/com/enderio/base/common/item/darksteel/IDarkSteelItem.java +++ b/src/main/java/com/enderio/base/common/item/darksteel/IDarkSteelItem.java @@ -23,8 +23,8 @@ import net.minecraftforge.common.capabilities.ForgeCapabilities; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.registries.ForgeRegistries; - import org.jetbrains.annotations.Nullable; + import java.util.*; public interface IDarkSteelItem extends IMultiCapabilityItem, IAdvancedTooltipProvider { @@ -83,10 +83,12 @@ default void addDetailedTooltips(ItemStack itemStack, @Nullable Player player, L } default void addDurabilityTooltips(ItemStack itemStack, List tooltips) { - String durability = (itemStack.getMaxDamage() - itemStack.getDamageValue()) + "/" + itemStack.getMaxDamage(); - tooltips.add(TooltipUtil.withArgs(EIOLang.DURABILITY_AMOUNT, durability).withStyle(ChatFormatting.GRAY)); + if (itemStack.isDamageableItem()) { + String durability = (itemStack.getMaxDamage() - itemStack.getDamageValue()) + "/" + itemStack.getMaxDamage(); + tooltips.add(TooltipUtil.withArgs(EIOLang.DURABILITY_AMOUNT, durability).withStyle(ChatFormatting.GRAY)); + } if (DarkSteelUpgradeable.hasUpgrade(itemStack, EmpoweredUpgrade.NAME)) { - String energy = String.format("%,d",EnergyUtil.getEnergyStored(itemStack)) + "/" + String.format("%,d",EnergyUtil.getMaxEnergyStored(itemStack)); + String energy = String.format("%,d", EnergyUtil.getEnergyStored(itemStack)) + "/" + String.format("%,d", EnergyUtil.getMaxEnergyStored(itemStack)); tooltips.add(TooltipUtil.withArgs(EIOLang.ENERGY_AMOUNT, energy).withStyle(ChatFormatting.GRAY)); } } diff --git a/src/main/java/com/enderio/base/common/item/darksteel/upgrades/EmpoweredUpgrade.java b/src/main/java/com/enderio/base/common/item/darksteel/upgrades/EmpoweredUpgrade.java index 7835f370f0..0e3107a1f1 100644 --- a/src/main/java/com/enderio/base/common/item/darksteel/upgrades/EmpoweredUpgrade.java +++ b/src/main/java/com/enderio/base/common/item/darksteel/upgrades/EmpoweredUpgrade.java @@ -8,6 +8,7 @@ import net.minecraft.network.chat.Component; import net.minecraftforge.common.ForgeConfigSpec; import net.minecraftforge.energy.EnergyStorage; +import org.jetbrains.annotations.Nullable; import java.util.*; @@ -22,7 +23,7 @@ public class EmpoweredUpgrade extends TieredUpgrade { private final ForgeConfigSpec.ConfigValue powerUsePerDamagePoint = BaseConfig.COMMON.DARK_STEEL.EMPOWERED_ENERGY_PER_DAMAGE; - private EnergyStorage storage; + @Nullable private EnergyStorage storage; public EmpoweredUpgrade() { this(EmpoweredUpgradeTier.ONE); @@ -30,11 +31,11 @@ public EmpoweredUpgrade() { public EmpoweredUpgrade(EmpoweredUpgradeTier tier) { super(tier, NAME); - storage = new EnergyStorage(tier.getMaxStorage()); + storage = null; } public float adjustDestroySpeed(float speed) { - if (storage.getEnergyStored() > 0) { + if (getStorage().getEnergyStored() > 0) { speed += speedBoostWhenPowered.get(); } return speed; @@ -42,17 +43,18 @@ public float adjustDestroySpeed(float speed) { public int adjustDamage(int oldDamage, int newDamage) { int damageTaken = newDamage - oldDamage; - if (damageTaken > 0 && storage.getEnergyStored() > 0 && RANDOM.nextDouble() < tier.getDamageAbsorptionChance()) { - storage.extractEnergy(damageTaken * powerUsePerDamagePoint.get(), false); + if (damageTaken > 0 && getStorage().getEnergyStored() > 0 && RANDOM.nextDouble() < tier.getDamageAbsorptionChance()) { + getStorage().extractEnergy(damageTaken * powerUsePerDamagePoint.get(), false); return oldDamage; } return newDamage; } public EnergyStorage getStorage() { - return storage; + return storage != null ? storage : new EnergyStorage(tier.getMaxStorage()); } + @Override public Collection getDescription() { List result = new ArrayList<>(); @@ -78,7 +80,7 @@ protected Optional getTier(int tier) { @Override public CompoundTag serializeNBT() { CompoundTag nbt = super.serializeNBT(); - nbt.put(STORAGE_KEY, storage.serializeNBT()); + nbt.put(STORAGE_KEY, getStorage().serializeNBT()); return nbt; } diff --git a/src/main/java/com/enderio/base/common/item/darksteel/upgrades/EmpoweredUpgradeTier.java b/src/main/java/com/enderio/base/common/item/darksteel/upgrades/EmpoweredUpgradeTier.java index cf0c1f4810..90f38a1eaa 100644 --- a/src/main/java/com/enderio/base/common/item/darksteel/upgrades/EmpoweredUpgradeTier.java +++ b/src/main/java/com/enderio/base/common/item/darksteel/upgrades/EmpoweredUpgradeTier.java @@ -43,9 +43,7 @@ public enum EmpoweredUpgradeTier implements IUpgradeTier { } public int getMaxStorage() { - // TODO: 1.19: config before load - return 100; -// return maxStorage.get(); + return maxStorage.get(); } public float getDamageAbsorptionChance() { diff --git a/src/main/java/com/enderio/base/common/item/tool/TravelStaffItem.java b/src/main/java/com/enderio/base/common/item/tool/TravelStaffItem.java new file mode 100644 index 0000000000..6a4dc25ce6 --- /dev/null +++ b/src/main/java/com/enderio/base/common/item/tool/TravelStaffItem.java @@ -0,0 +1,130 @@ +package com.enderio.base.common.item.tool; + +import com.enderio.api.capability.MultiCapabilityProvider; +import com.enderio.base.common.config.BaseConfig; +import com.enderio.base.common.handler.TeleportHandler; +import com.enderio.base.common.init.EIOCapabilities; +import com.enderio.base.common.item.darksteel.IDarkSteelItem; +import com.enderio.base.common.item.darksteel.upgrades.EmpoweredUpgradeTier; +import com.enderio.core.common.util.EnergyUtil; +import net.minecraft.core.NonNullList; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.InteractionResultHolder; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.CreativeModeTab; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.context.UseOnContext; +import net.minecraft.world.level.Level; +import org.jetbrains.annotations.Nullable; + +public class TravelStaffItem extends Item implements IDarkSteelItem { + public TravelStaffItem(Properties properties) { + super(properties); + } + + @Override + public void fillItemCategory(CreativeModeTab pCategory, NonNullList pItems) { + if (allowedIn(pCategory)) { + addCreativeItems(pItems, this); + } + } + + @Override + public InteractionResultHolder use(Level level, Player player, InteractionHand usedHand) { + ItemStack stack = player.getItemInHand(usedHand); + if (getActivationStatus(stack).isAir()) {if (tryPerformAction(level, player, stack)) { + return InteractionResultHolder.sidedSuccess(stack, level.isClientSide); + } + return InteractionResultHolder.fail(stack); + } + return super.use(level, player, usedHand); + } + + @Override + public InteractionResult useOn(UseOnContext context) {if (getActivationStatus(context.getItemInHand()).isBlock()) { + if (context.getPlayer() != null && tryPerformAction(context.getLevel(), context.getPlayer(), context.getItemInHand())) { + return InteractionResult.sidedSuccess(context.getLevel().isClientSide()); + } + return InteractionResult.FAIL; + } + return super.useOn(context); + } + + private boolean tryPerformAction(Level level, Player player, ItemStack stack) { + if (hasResources(stack)) { + if (performAction(level, player,stack)) { + if (!level.isClientSide()) + consumeResources(stack); + return true; + } + return false; + } + return false; + } + + /** + * Perform your action + * @return true if it was a success and you want to consume the resources + */ + public boolean performAction(Level level, Player player, ItemStack stack) { + if (player.isShiftKeyDown()) { + if (TeleportHandler.shortTeleport(level, player)) { + player.getCooldowns().addCooldown(this, BaseConfig.COMMON.ITEMS.TRAVELLING_BLINK_DISABLED_TIME.get()); + return true; + } + } else { + if (TeleportHandler.blockTeleport(level, player)) { + player.getCooldowns().addCooldown(this, BaseConfig.COMMON.ITEMS.TRAVELLING_BLINK_DISABLED_TIME.get()); + return true; + } + } + return false; + } + + public boolean hasResources(ItemStack stack) { + return EnergyUtil.hasEnergy(stack, 1000); + } + + public void consumeResources(ItemStack stack) { + EnergyUtil.extractEnergy(stack, 1000, false); + } + + @Override + public MultiCapabilityProvider initCapabilities(ItemStack stack, @Nullable CompoundTag nbt, MultiCapabilityProvider provider) { + + IDarkSteelItem.super.initCapabilities(stack, nbt, provider); + //Staff of Travelling always has Empowered I + provider.getCapability(EIOCapabilities.DARK_STEEL_UPGRADABLE).ifPresent( + cap -> cap.addUpgrade(EmpoweredUpgradeTier.ONE.getFactory().get())); + return provider; + } + + protected ActivationStatus getActivationStatus(ItemStack stack) { + return ActivationStatus.ALL; + } + + protected enum ActivationStatus { + BLOCK(true, false), + AIR(false, true), + ALL(true, true); + + private final boolean isBlock, isAir; + + ActivationStatus(boolean isBlock, boolean isAir) { + this.isBlock = isBlock; + this.isAir = isAir; + } + + public boolean isBlock() { + return isBlock; + } + + public boolean isAir() { + return isAir; + } + } + +} diff --git a/src/main/java/com/enderio/base/common/particle/package-info.java b/src/main/java/com/enderio/base/common/particle/package-info.java new file mode 100644 index 0000000000..ed6bc4be88 --- /dev/null +++ b/src/main/java/com/enderio/base/common/particle/package-info.java @@ -0,0 +1,5 @@ +@javax.annotation.ParametersAreNonnullByDefault +@net.minecraft.MethodsReturnNonnullByDefault +@com.tterrag.registrate.util.nullness.FieldsAreNonnullByDefault + +package com.enderio.base.common.particle; \ No newline at end of file diff --git a/src/main/java/com/enderio/base/common/travel/TravelSavedData.java b/src/main/java/com/enderio/base/common/travel/TravelSavedData.java new file mode 100644 index 0000000000..dcba1de0d3 --- /dev/null +++ b/src/main/java/com/enderio/base/common/travel/TravelSavedData.java @@ -0,0 +1,91 @@ +package com.enderio.base.common.travel; + +import com.enderio.EnderIO; +import com.enderio.api.travel.ITravelTarget; +import com.enderio.api.travel.TravelRegistry; +import net.minecraft.core.BlockPos; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.nbt.ListTag; +import net.minecraft.nbt.Tag; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.saveddata.SavedData; +import net.minecraftforge.fml.util.thread.EffectiveSide; + +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; +import java.util.Optional; +import java.util.stream.Stream; + +public class TravelSavedData extends SavedData { + + private static TravelSavedData clientInstance; + + private Map travelTargets = new HashMap<>(); + + public static TravelSavedData getTravelData(Level level) { + if (level instanceof ServerLevel serverLevel) { + return serverLevel.getDataStorage().computeIfAbsent(TravelSavedData::load, TravelSavedData::new, "enderio_machines:traveldata"); + } else { + if (clientInstance == null) { + clientInstance = new TravelSavedData(); + } + return clientInstance; + } + } + + public Optional getTravelTarget(BlockPos pos) { + return Optional.ofNullable(travelTargets.get(pos)); + } + + public Collection getTravelTargets() { + return travelTargets.values(); + } + + public Stream getTravelTargetsInItemRange(BlockPos center) { + return travelTargets.entrySet().stream(). + filter(entry -> center.distSqr(entry.getKey()) < entry.getValue().getItem2BlockRange()*entry.getValue().getItem2BlockRange()) + .map(Map.Entry::getValue); + } + + public void addTravelTarget(ITravelTarget target) { + if (TravelRegistry.isRegistered(target)) { + travelTargets.put(target.getPos(), target); + } else { + EnderIO.LOGGER.warn("Tried to add a not registered TravelTarget to the TravelSavedData with name " + target); + } + } + + public void removeTravelTargetAt(BlockPos pos) { + travelTargets.remove(pos); + } + + @Override + public CompoundTag save(CompoundTag nbt) { + ListTag tag = new ListTag(); + tag.addAll(travelTargets.values().stream().map(TravelRegistry::serialize).toList()); + nbt.put("targets", tag); + return nbt; + } + + private static TravelSavedData load(CompoundTag nbt) { + TravelSavedData data = new TravelSavedData(); + data.load(nbt.getList("targets", Tag.TAG_COMPOUND)); + return data; + } + + private void load(ListTag nbt) { + nbt.stream().map(anchorData -> (CompoundTag)anchorData) + .map(TravelRegistry::deserialize) + .flatMap(Optional::stream) + .forEach(target -> travelTargets.put(target.getPos(), target)); + } + + // Always save this data + @Override + public boolean isDirty() { + return EffectiveSide.get().isServer(); + } + +} diff --git a/src/main/java/com/enderio/base/common/travel/package-info.java b/src/main/java/com/enderio/base/common/travel/package-info.java new file mode 100644 index 0000000000..b45c10b327 --- /dev/null +++ b/src/main/java/com/enderio/base/common/travel/package-info.java @@ -0,0 +1,5 @@ +@javax.annotation.ParametersAreNonnullByDefault +@net.minecraft.MethodsReturnNonnullByDefault +@com.tterrag.registrate.util.nullness.FieldsAreNonnullByDefault + +package com.enderio.base.common.travel; \ No newline at end of file diff --git a/src/main/resources/META-INF/accesstransformer.cfg b/src/main/resources/META-INF/accesstransformer.cfg index 1815091b15..e5b346069f 100644 --- a/src/main/resources/META-INF/accesstransformer.cfg +++ b/src/main/resources/META-INF/accesstransformer.cfg @@ -10,4 +10,6 @@ public net.minecraft.world.level.block.DoublePlantBlock m_52903_(Lnet/minecraft/ public net.minecraft.world.entity.item.FallingBlockEntity (Lnet/minecraft/world/level/Level;DDDLnet/minecraft/world/level/block/state/BlockState;)V public net.minecraft.world.inventory.CraftingMenu f_39350_ # access public net.minecraft.world.entity.item.FallingBlockEntity (Lnet/minecraft/world/level/Level;DDDLnet/minecraft/world/level/block/state/BlockState;)V -public-f net.minecraft.client.renderer.block.model.BakedQuad f_111293_ # tintIndex \ No newline at end of file +public-f net.minecraft.client.renderer.block.model.BakedQuad f_111293_ # tintIndex +public net.minecraft.client.renderer.LevelRenderer m_109804_(Lnet/minecraft/core/particles/ParticleOptions;ZZDDDDDD)Lnet/minecraft/client/particle/Particle; # addParticleInternal +public net.minecraft.client.particle.Particle f_107226_ # gravity \ No newline at end of file diff --git a/src/main/resources/assets/enderio/models/block/travel_anchor.json b/src/main/resources/assets/enderio/models/block/travel_anchor.json new file mode 100644 index 0000000000..edfbe5ecfc --- /dev/null +++ b/src/main/resources/assets/enderio/models/block/travel_anchor.json @@ -0,0 +1,9 @@ +{ + "credit": "Made with Blockbench by luiq54", + "parent": "enderio:block/hollow_core_frame", + "textures": { + "frame": "enderio:block/hollow_core_frame", + "inner": "enderio:block/hollow_core_frame_inner", + "core": "enderio:block/ender_still" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/enderio/textures/block/ender_still.png b/src/main/resources/assets/enderio/textures/block/ender_still.png new file mode 100644 index 0000000000000000000000000000000000000000..3865c35185afbd43532946ede29993b22d965e8f GIT binary patch literal 3860 zcmeHK={uB<-@UD4tFe!<+;)ZRyKei~o)BV^Y=yo?WKCl&24l^dZ1IR}p`u0h!8Dd^ zp$K2Y2$h(zjHU4O`!AjszjIyZI_LB5T<6WXKB@M0mS;GGIRF4SV{L_U{Hxpmz+lYA z^w%X!as53232!S$TL6fX1%L-Q060ATtLp&Z$ObS7xB!6uV*o$|eQ_1f1^_0&-p0wC zSzVu56UA&~#%y+x+18ZV)`l5v&4IqejCN%9bm8#4#^HCF!^@Gw&xJD>%@OR03~}Y~ z^AZZaAr$F_jPge&{38?}C=-v7O$(Aq!^-AI$mYe$mPD(T-dC-RQ7K7Qsn1reOjNB* zSFKNlo@YYMxlnV_-=P1+e;fG!&;X}@pwZtP?7>#o!T^Ai_djI#v=H~_uX$*VGI4UT zv@J}HplI`&OY#C5X2!-T<}$v-0@CE^X=<2wRaw=Tb%29Q{hdx%zdS^@!RWHes7grs z^pue4<>}v17b+Hls`pzD23bqeJs)m~Pv*UgI2+lLmuX~VB=?)>y136 ziQ`;C9}iWiHH2I&kF;AHsm`@wBRuvrihVmMveh{VtDzgb$85Kai0*6Xi#Mpz*M`5| zq#r9@k5-%H?~2UMT+5!T(Hd>zm%DB25`g`4VWa6Jlr|Bw(5hpn+`rn$d3opO)mgpJ zX2X8zqlKwl@psehv&zQ-lEo{r`uiE|)PcHUr4RO>H%{G);l5kdbgco?Zs(tK`|s-H zvDg51aOp56m=#XGddfvTKZ2sUWC@-)t3%DHoGAJjL~5DSvb2F6jJ4>tD+5%yH|wY8 z1Mg05Fp1i9FIMh3KxLQLizA@CH=B%Er-pGm>-WYY5KBuHn|+77t>r}NqJPp;Utq_H zlp9@f!jLk~5`J~pCkis6daX{{2BR?7m$Jj@gc+g6i+1!R%lkA#c~ibRqF;|%Lt)O2SG zT`G?&ciFOf=w3fgO7PK8%s}-#ILOP!ynEMmxPsFHOrLBtKC}F4qkP=D{~qH~Weq=T z){w<11{|ZXNeE;K$LPqfG41zDiwl4gb2I*?m>IY9DzQGn9OJEjgA7WhZs!`BNg`BK63Pivx)J=~NdY6Eauj#^QyZ5z`@g&r-^Th>~pFn_m*1 zt1o%6En@BAQnB;mZg)bXQSHnR4oDB1`ZZSsTLD^{rRm+keQo(iL`nnFvR^un_vFrI z)-g3#f;N~=oXfwSfPXXmdAymBX0M}=*#G&uY)i<4Q`4H{2Cbr*XtW(K`kzUh#!Xio zXH047q67D=>b7j)yhj2#{nQ z?ZX!HtIB_Ji?Qx^x!B2`B)h?_Z_U57Kq*AIE#YIA9hF82iV#H@<&c{>mfa{FJ_lzB-p)OCZdhu)bTSA^@v`}6gi9o~*-@{yRg}hWNV|L;E8QxM84a0 zQo5<#P|8RTi&k1z^JcSfq|Zk=re;)jhrH}`qh_201$3#2kfFyJ^t9&+>AxCYFX?52 z^&`xy@n=Nu>*yIaGcoTyfN3bTouuH!kfUI4c3%dx?i`hW=4VR%84*hALU~fCU5Lb^ zAkunG#>G8?Poh@NhhK8LB3aT`a*kt`?lGnmx56WIzi-`0CVl*rO%pzMj@#}rXRKN? zAn8_3=)2lbKF+X{y|j|*&!Ff}zt&l#a9q}b$9GF=eX7Qwf5hF4m^yf*RKfK~A~!ay zqeu*S5Siu)H+5|;@t_?iCU@|uLf{%j{ALLg( z>T!udi-2lc+f3Cizjo1m+(kY|mid@*E;YB$;Uyn@SjOs2>3ad+b%r;%>&pJ2PQ$6O zlL6zL2}{^DZG9!^R?+vF^Q6q&Sa(-rQ| zXpxj9R^;%b&RaaE^MlLmsATfi`oe9=q;bm`n~52UT(^#a*ViA~4xu!=FX0%7L{{)LY!0bvARbv5$hw4UwdQh3y~6?D zR-e+s(2-D+v#)~z3g5?sI9aXOK7@l@8p{O9Ah6lnNq$vHMh;wef>Q9T?K<#3a@>FH z=ft2^t2XIS9ITuz)3sj83R&)4Npbx_<{6={IyB+%t1D6^CxhN!68mz57|=hyFG8(* zM5ZBONuev49S)HuCx7)1X?RaPan_B;xKK|sRZ9hdM+3|8IyjOrX*}wba2#R9q)_D2~0fu*WM~)lh z({ZF)){gYdBGV<}V5SfMhA z3J=_^vN%evt=3X2cQolY%U*YQ=idP?%5^(<>FB67G1y2aL zbValBU@q_vpTRsj2i+}|h=X~rr<3k>yKXp56v46-56#x1X+6f;IUDP)CA-T8*a1hu z9wr_({Kx5wTO}}tB+p2iePQjB_*V~~@2v@vsET0bEm^Q&vz`Tq*Knk)mn>Hh4(lmS z;k$3fY#|GFLHJw2N+Z1<$^{%uzyckL(&Hpi$IjP1X%7}H>%fwG>fd{&@xZ&Dzn(h? zInrw^{;u4$9d~IyIjcAU2A}plsY&(7M1UNkoSvKTVWf-x#ML?>0e9aRu{?&~NSki-6xeSS5(+W3y+(pQLhu zKgom^`h-9|!Av-s#(ig=#F!jLGwuPT5S)28V&W1H+iXiiXi4|{7@r&P^E*kHXHMmL zVUt*3vdDuVu=3OQgh=0?C9oh8vLku;bZ30P zQbbt0$3U2fE%+9r#utWV&OE@8G>Ptz)4{1fwb1=5E8L=+el-u%9ch)}ZSjo}^4j#( zwf~KTl&=JchoqfGCfE6(-IR~QUEdHgX Date: Mon, 16 Jan 2023 22:38:56 +0530 Subject: [PATCH 002/154] missed an EventSubscriber annotation --- .../enderio/machines/common/block/TravelAnchorBlock.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java b/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java index 84602ea03a..2ec7562ab3 100644 --- a/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java +++ b/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java @@ -12,11 +12,13 @@ import net.minecraftforge.event.TickEvent; import net.minecraftforge.event.entity.living.LivingEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.common.Mod; import org.apache.commons.lang3.tuple.Pair; import org.jetbrains.annotations.Nullable; import java.util.WeakHashMap; +@Mod.EventBusSubscriber public class TravelAnchorBlock extends Block implements EntityBlock { private static final WeakHashMap> sneakCache = new WeakHashMap<>(); @@ -41,13 +43,10 @@ public static void jump(LivingEvent.LivingJumpEvent jumpEvent) { @SubscribeEvent public static void sneak(TickEvent.PlayerTickEvent event) { - if (event.phase == TickEvent.Phase.END - && event.player instanceof ServerPlayer player - && player.level.getBlockState(player.blockPosition().below()).getBlock() instanceof TravelAnchorBlock) { + if (event.phase == TickEvent.Phase.END && event.player instanceof ServerPlayer player && player.level.getBlockState(player.blockPosition().below()).getBlock() instanceof TravelAnchorBlock) { Pair sneakEntry = sneakCache.getOrDefault(player, Pair.of(false, player.getLevel().getServer().getTickCount()-1)); - if ((!sneakEntry.getLeft() || sneakEntry.getRight() != player.getLevel().getServer().getTickCount()-1) - && player.isShiftKeyDown()) { + if ((!sneakEntry.getLeft() || sneakEntry.getRight() != player.getLevel().getServer().getTickCount()-1) && player.isShiftKeyDown()) { TeleportHandler.blockTeleport(player.level, player); } From e84ea54b88cd34ca5cd0e8c9ee5dbc687c632abf Mon Sep 17 00:00:00 2001 From: luiq54 Date: Mon, 16 Jan 2023 23:09:51 +0530 Subject: [PATCH 003/154] Change RenderLevelStageEvent and fixed RenderTeleportTargets offset issues --- .../client/rendering/travel/TravelAnchorRenderer.java | 8 +++++--- .../renderer/teleportation/RenderTeleportTargets.java | 7 ++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/machines/java/com/enderio/machines/client/rendering/travel/TravelAnchorRenderer.java b/src/machines/java/com/enderio/machines/client/rendering/travel/TravelAnchorRenderer.java index b774b498f1..b88d01669b 100644 --- a/src/machines/java/com/enderio/machines/client/rendering/travel/TravelAnchorRenderer.java +++ b/src/machines/java/com/enderio/machines/client/rendering/travel/TravelAnchorRenderer.java @@ -5,6 +5,7 @@ import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.LevelRenderer; +import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.world.level.block.Blocks; @@ -14,9 +15,10 @@ public void render(AnchorTravelTarget travelData, LevelRenderer levelRenderer, P poseStack.pushPose(); poseStack.translate(travelData.getPos().getX(), travelData.getPos().getY(), travelData.getPos().getZ()); //TODO: Render the Travel Anchor name icon and do some other stuff, pls Crazy, be a rendering genius - Minecraft - .getInstance().getBlockRenderer().renderSingleBlock(Blocks.AMETHYST_BLOCK.defaultBlockState(), poseStack, Minecraft.getInstance().renderBuffers().bufferSource(), 0xF000F0, - OverlayTexture.NO_OVERLAY); + Minecraft mc = Minecraft.getInstance(); + MultiBufferSource.BufferSource bs = mc.renderBuffers().bufferSource(); + mc.getBlockRenderer().renderSingleBlock(Blocks.AMETHYST_BLOCK.defaultBlockState(), poseStack, bs, 0xF000F0, OverlayTexture.NO_OVERLAY); + bs.endBatch(); poseStack.popPose(); } } diff --git a/src/main/java/com/enderio/base/client/renderer/teleportation/RenderTeleportTargets.java b/src/main/java/com/enderio/base/client/renderer/teleportation/RenderTeleportTargets.java index 4bed30f844..e51ab633fa 100644 --- a/src/main/java/com/enderio/base/client/renderer/teleportation/RenderTeleportTargets.java +++ b/src/main/java/com/enderio/base/client/renderer/teleportation/RenderTeleportTargets.java @@ -8,7 +8,7 @@ import net.minecraft.client.Minecraft; import net.minecraft.world.phys.Vec3; import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.client.event.RenderLevelLastEvent; +import net.minecraftforge.client.event.RenderLevelStageEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; @@ -16,8 +16,9 @@ public class RenderTeleportTargets { @SubscribeEvent - // TODO : DEPRECATED- REPLACE WITH RenderLevelStageEvent - public static void renderLevel(RenderLevelLastEvent event) { + public static void renderLevel(RenderLevelStageEvent event) { + if (event.getStage() != RenderLevelStageEvent.Stage.AFTER_PARTICLES) + return; TravelSavedData data = TravelSavedData.getTravelData(Minecraft.getInstance().level); for (ITravelTarget target : data.getTravelTargets()) { PoseStack poseStack = event.getPoseStack(); From a3e7db16de53d0f3dc8d290d9ebac14eda6718cc Mon Sep 17 00:00:00 2001 From: luiq54 Date: Sat, 4 Mar 2023 22:49:50 +0530 Subject: [PATCH 004/154] added Integration and changes rendering --- .../com/enderio/api/integration/Integration.java | 8 ++++++++ .../api/integration/IntegrationManager.java | 13 +++++++++---- .../com/enderio/api/travel/ITravelTarget.java | 2 ++ .../java/com/enderio/machines/EIOMachines.java | 3 +++ .../machines/common/block/TravelAnchorBlock.java | 11 ++++++++--- .../EnderIOMachinesSelfIntegration.java | 15 +++++++++++++++ .../common/travel/AnchorTravelTarget.java | 5 +++++ .../teleportation/RenderTeleportTargets.java | 13 ++++++++++++- .../teleportation/TeleportParticleHandler.java | 2 +- .../base/common/handler/TeleportHandler.java | 15 ++++++++++++--- .../enderio/models/block/hollow_core_frame.json | 3 ++- 11 files changed, 77 insertions(+), 13 deletions(-) create mode 100644 src/machines/java/com/enderio/machines/common/integrations/EnderIOMachinesSelfIntegration.java diff --git a/src/api/java/com/enderio/api/integration/Integration.java b/src/api/java/com/enderio/api/integration/Integration.java index 2f34e71dea..410e63f525 100644 --- a/src/api/java/com/enderio/api/integration/Integration.java +++ b/src/api/java/com/enderio/api/integration/Integration.java @@ -54,4 +54,12 @@ default Optional hangGliderDisabledReason(Player player) { default ClientIntegration getClientIntegration() { return ClientIntegration.NOOP; } + + /** + * @param player The Player that wants to teleport + * @return whether the player can teleport to a nearby block + */ + default boolean canBlockTeleport(Player player) { + return false; + } } \ No newline at end of file diff --git a/src/api/java/com/enderio/api/integration/IntegrationManager.java b/src/api/java/com/enderio/api/integration/IntegrationManager.java index c5f08ec535..75575302ec 100644 --- a/src/api/java/com/enderio/api/integration/IntegrationManager.java +++ b/src/api/java/com/enderio/api/integration/IntegrationManager.java @@ -3,10 +3,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Optional; -import java.util.function.Consumer; -import java.util.function.Function; -import java.util.function.Predicate; -import java.util.function.Supplier; +import java.util.function.*; public class IntegrationManager { @@ -46,6 +43,7 @@ public static void executeIf(Predicate condition, Consumer List getIf(Predicate condition, Function mapper) { List list = new ArrayList<>(); for (Integration integration : ALL_INTEGRATIONS) { @@ -54,4 +52,11 @@ public static List getIf(Predicate condition, Function T collectAll(T empty, Function function, BiConsumer merge) { + for (Integration integration : ALL_INTEGRATIONS) { + merge.accept(empty, function.apply(integration)); + } + return empty; + } } diff --git a/src/api/java/com/enderio/api/travel/ITravelTarget.java b/src/api/java/com/enderio/api/travel/ITravelTarget.java index b0a306cc91..caa2c10110 100644 --- a/src/api/java/com/enderio/api/travel/ITravelTarget.java +++ b/src/api/java/com/enderio/api/travel/ITravelTarget.java @@ -13,4 +13,6 @@ public interface ITravelTarget { CompoundTag save(); int getItem2BlockRange(); + + int getBlock2BlockRange(); } diff --git a/src/machines/java/com/enderio/machines/EIOMachines.java b/src/machines/java/com/enderio/machines/EIOMachines.java index b4356b19b7..2eacea6123 100644 --- a/src/machines/java/com/enderio/machines/EIOMachines.java +++ b/src/machines/java/com/enderio/machines/EIOMachines.java @@ -1,6 +1,7 @@ package com.enderio.machines; import com.enderio.EnderIO; +import com.enderio.api.integration.IntegrationManager; import com.enderio.api.travel.TravelRegistry; import com.enderio.machines.client.rendering.travel.TravelAnchorRenderer; import com.enderio.machines.common.config.MachinesConfig; @@ -8,6 +9,7 @@ import com.enderio.machines.common.init.MachineBlocks; import com.enderio.machines.common.init.MachineMenus; import com.enderio.machines.common.init.MachineRecipes; +import com.enderio.machines.common.integrations.EnderIOMachinesSelfIntegration; import com.enderio.machines.common.lang.MachineLang; import com.enderio.machines.common.travel.AnchorTravelTarget; import com.enderio.machines.data.recipes.*; @@ -37,6 +39,7 @@ public static void onConstruct(FMLConstructModEvent event) { MachineLang.register(); MachineRecipes.register(); + IntegrationManager.addIntegration(EnderIOMachinesSelfIntegration.INSTANCE); TravelRegistry.addTravelEntry(loc("travel_anchor"), AnchorTravelTarget::new, TravelAnchorRenderer::new); } diff --git a/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java b/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java index 2ec7562ab3..990464c577 100644 --- a/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java +++ b/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java @@ -35,6 +35,7 @@ public BlockEntity newBlockEntity(BlockPos pPos, BlockState pState) { @SubscribeEvent public static void jump(LivingEvent.LivingJumpEvent jumpEvent) { if (!jumpEvent.getEntity().level.isClientSide && jumpEvent.getEntity() instanceof Player player) { + // TODO: Change if (player.level.getBlockState(player.blockPosition().below()).getBlock() instanceof TravelAnchorBlock) { TeleportHandler.blockTeleport(player.level, player); } @@ -43,14 +44,18 @@ public static void jump(LivingEvent.LivingJumpEvent jumpEvent) { @SubscribeEvent public static void sneak(TickEvent.PlayerTickEvent event) { - if (event.phase == TickEvent.Phase.END && event.player instanceof ServerPlayer player && player.level.getBlockState(player.blockPosition().below()).getBlock() instanceof TravelAnchorBlock) { + // TODO: Change + if (event.phase == TickEvent.Phase.END && event.player instanceof ServerPlayer player && player.level + .getBlockState(player.blockPosition().below()) + .getBlock() instanceof TravelAnchorBlock) { - Pair sneakEntry = sneakCache.getOrDefault(player, Pair.of(false, player.getLevel().getServer().getTickCount()-1)); - if ((!sneakEntry.getLeft() || sneakEntry.getRight() != player.getLevel().getServer().getTickCount()-1) && player.isShiftKeyDown()) { + Pair sneakEntry = sneakCache.getOrDefault(player, Pair.of(false, player.getLevel().getServer().getTickCount() - 1)); + if ((!sneakEntry.getLeft() || sneakEntry.getRight() != player.getLevel().getServer().getTickCount() - 1) && player.isShiftKeyDown()) { TeleportHandler.blockTeleport(player.level, player); } sneakCache.put(player, Pair.of(player.isShiftKeyDown(), player.getLevel().getServer().getTickCount())); } } + } diff --git a/src/machines/java/com/enderio/machines/common/integrations/EnderIOMachinesSelfIntegration.java b/src/machines/java/com/enderio/machines/common/integrations/EnderIOMachinesSelfIntegration.java new file mode 100644 index 0000000000..3286ad65f6 --- /dev/null +++ b/src/machines/java/com/enderio/machines/common/integrations/EnderIOMachinesSelfIntegration.java @@ -0,0 +1,15 @@ +package com.enderio.machines.common.integrations; + +import com.enderio.api.integration.Integration; +import com.enderio.machines.common.block.TravelAnchorBlock; +import net.minecraft.world.entity.player.Player; + +public class EnderIOMachinesSelfIntegration implements Integration { + + public static final EnderIOMachinesSelfIntegration INSTANCE = new EnderIOMachinesSelfIntegration(); + + @Override + public boolean canBlockTeleport(Player player) { + return player.level.getBlockState(player.blockPosition().below()).getBlock() instanceof TravelAnchorBlock; + } +} diff --git a/src/machines/java/com/enderio/machines/common/travel/AnchorTravelTarget.java b/src/machines/java/com/enderio/machines/common/travel/AnchorTravelTarget.java index 8385e7eb14..6746893738 100644 --- a/src/machines/java/com/enderio/machines/common/travel/AnchorTravelTarget.java +++ b/src/machines/java/com/enderio/machines/common/travel/AnchorTravelTarget.java @@ -90,6 +90,11 @@ public int getItem2BlockRange() { return BaseConfig.COMMON.ITEMS.TRAVELLING_TO_BLOCK_RANGE.get(); } + @Override + public int getBlock2BlockRange() { + return BaseConfig.COMMON.ITEMS.TRAVELLING_BLOCK_TO_BLOCK_RANGE.get(); + } + @Override public ResourceLocation getSerializationName() { return SERIALIZED_NAME; diff --git a/src/main/java/com/enderio/base/client/renderer/teleportation/RenderTeleportTargets.java b/src/main/java/com/enderio/base/client/renderer/teleportation/RenderTeleportTargets.java index e51ab633fa..6c7e15e4db 100644 --- a/src/main/java/com/enderio/base/client/renderer/teleportation/RenderTeleportTargets.java +++ b/src/main/java/com/enderio/base/client/renderer/teleportation/RenderTeleportTargets.java @@ -2,10 +2,13 @@ import com.enderio.api.travel.ITravelTarget; import com.enderio.api.travel.TravelRegistry; +import com.enderio.base.common.handler.TeleportHandler; import com.enderio.base.common.travel.TravelSavedData; import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.Camera; import net.minecraft.client.Minecraft; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.client.player.LocalPlayer; import net.minecraft.world.phys.Vec3; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.client.event.RenderLevelStageEvent; @@ -17,10 +20,18 @@ public class RenderTeleportTargets { @SubscribeEvent public static void renderLevel(RenderLevelStageEvent event) { - if (event.getStage() != RenderLevelStageEvent.Stage.AFTER_PARTICLES) + ClientLevel level = Minecraft.getInstance().level; + LocalPlayer player = Minecraft.getInstance().player; + if (level == null || player == null || event.getStage() != RenderLevelStageEvent.Stage.AFTER_TRIPWIRE_BLOCKS) return; + if (!TeleportHandler.canTeleport(player)) + return; + boolean itemTeleport = TeleportHandler.canItemTeleport(player); TravelSavedData data = TravelSavedData.getTravelData(Minecraft.getInstance().level); for (ITravelTarget target : data.getTravelTargets()) { + double range = itemTeleport ? target.getItem2BlockRange() : target.getBlock2BlockRange(); + if (range * range < target.getPos().distToCenterSqr(player.position())) + continue; PoseStack poseStack = event.getPoseStack(); poseStack.pushPose(); Camera mainCamera = Minecraft.getInstance().gameRenderer.getMainCamera(); diff --git a/src/main/java/com/enderio/base/client/renderer/teleportation/TeleportParticleHandler.java b/src/main/java/com/enderio/base/client/renderer/teleportation/TeleportParticleHandler.java index b61e9ac716..67b1b4734e 100644 --- a/src/main/java/com/enderio/base/client/renderer/teleportation/TeleportParticleHandler.java +++ b/src/main/java/com/enderio/base/client/renderer/teleportation/TeleportParticleHandler.java @@ -26,7 +26,7 @@ public static void clientTick(TickEvent.ClientTickEvent e) { LocalPlayer player = Minecraft.getInstance().player; if (e.phase == TickEvent.Phase.END && player != null) { tick++; - if (player.isShiftKeyDown() && TeleportHandler.canTeleport(player) && tick%3==0) { + if (player.isShiftKeyDown() && TeleportHandler.canTeleport(player) && tick % 3 == 0) { Optional pos = TeleportHandler.teleportPosition(player.getLevel(), player); if (pos.isPresent()) { addTravelParticle(pos.get()); diff --git a/src/main/java/com/enderio/base/common/handler/TeleportHandler.java b/src/main/java/com/enderio/base/common/handler/TeleportHandler.java index 0769837c6f..fec99540e3 100644 --- a/src/main/java/com/enderio/base/common/handler/TeleportHandler.java +++ b/src/main/java/com/enderio/base/common/handler/TeleportHandler.java @@ -1,5 +1,6 @@ package com.enderio.base.common.handler; +import com.enderio.api.integration.IntegrationManager; import com.enderio.api.travel.ITravelTarget; import com.enderio.base.common.config.BaseConfig; import com.enderio.base.common.init.EIOItems; @@ -29,10 +30,14 @@ public class TeleportHandler { public static boolean canTeleport(Player player) { - return canTeleport(player, InteractionHand.MAIN_HAND) || canTeleport(player, InteractionHand.OFF_HAND); + return canItemTeleport(player) || canBlockTeleport(player); } - public static boolean canTeleport(Player player, InteractionHand hand) { + public static boolean canItemTeleport(Player player) { + return canItemTeleport(player, InteractionHand.MAIN_HAND) || canItemTeleport(player, InteractionHand.OFF_HAND); + } + + public static boolean canItemTeleport(Player player, InteractionHand hand) { ItemStack stack = player.getItemInHand(hand); if (stack.getItem() == EIOItems.TRAVEL_STAFF.get()) return true; @@ -42,9 +47,13 @@ public static boolean canTeleport(Player player, InteractionHand hand) { return false; } + public static boolean canBlockTeleport(Player player) { + return IntegrationManager.anyMatch(integration -> integration.canBlockTeleport(player)); + } + public static boolean shortTeleport(Level level, Player player) { Optional pos = teleportPosition(level, player); - if (pos.isPresent()){ + if (pos.isPresent()) { if (!level.isClientSide) { Optional eventPos = teleportEvent(player, pos.get()); if (eventPos.isPresent()) { diff --git a/src/main/resources/assets/enderio/models/block/hollow_core_frame.json b/src/main/resources/assets/enderio/models/block/hollow_core_frame.json index 2859f82256..3f3fa281ea 100644 --- a/src/main/resources/assets/enderio/models/block/hollow_core_frame.json +++ b/src/main/resources/assets/enderio/models/block/hollow_core_frame.json @@ -4,7 +4,8 @@ "textures": { "frame": "enderio:block/hollow_core_frame", "inner": "enderio:block/hollow_core_frame_inner", - "core": "enderio:block/vacuum_portal" + "core": "enderio:block/vacuum_portal", + "particle": "enderio:block/machine_side" }, "elements": [ { From adb96b33dba162ceee47044c1294d7cf20920479 Mon Sep 17 00:00:00 2001 From: luiq54 Date: Sat, 10 Jun 2023 16:36:44 +0530 Subject: [PATCH 005/154] add configs and fix creative tab entry --- .../enderio/base/common/config/common/ItemsConfig.java | 8 ++++---- src/main/java/com/enderio/base/common/init/EIOItems.java | 3 +++ .../enderio/base/common/item/tool/TravelStaffItem.java | 4 ++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/enderio/base/common/config/common/ItemsConfig.java b/src/main/java/com/enderio/base/common/config/common/ItemsConfig.java index faac847029..93426d2fcd 100644 --- a/src/main/java/com/enderio/base/common/config/common/ItemsConfig.java +++ b/src/main/java/com/enderio/base/common/config/common/ItemsConfig.java @@ -21,8 +21,8 @@ public class ItemsConfig { public final ForgeConfigSpec.ConfigValue TRAVELLING_BLINK_RANGE; public final ForgeConfigSpec.ConfigValue TRAVELLING_BLINK_DISABLED_TIME; - // public final ForgeConfigSpec.ConfigValue TRAVELLING_STAFF_ENERGY_USE; - // public final ForgeConfigSpec.ConfigValue TRAVELLING_STAFF_MAX_ENERGY; + public final ForgeConfigSpec.ConfigValue TRAVELLING_STAFF_ENERGY_USE; + public final ForgeConfigSpec.ConfigValue TRAVELLING_STAFF_MAX_ENERGY; public final ForgeConfigSpec.ConfigValue TRAVELLING_TO_BLOCK_RANGE; public final ForgeConfigSpec.ConfigValue TRAVELLING_BLOCK_TO_BLOCK_RANGE; @@ -52,8 +52,8 @@ public ItemsConfig(ForgeConfigSpec.Builder builder) { builder.push("travelling"); TRAVELLING_BLINK_RANGE = builder.defineInRange("blinkRange", 24, 4, 16 * 32); TRAVELLING_BLINK_DISABLED_TIME = builder.defineInRange("disabledTime", 5, 0, 20 * 60); - // TRAVELLING_STAFF_ENERGY_USE = builder.define("energyUse", 1); - // TRAVELLING_STAFF_MAX_ENERGY = builder.define("maxEnergy", 1000); + TRAVELLING_STAFF_ENERGY_USE = builder.define("energyUse", 1000); + TRAVELLING_STAFF_MAX_ENERGY = builder.define("maxEnergy", 100000); // TODO: CHECK VALUES builder.comment("the following config values are only used if EIOMachines is loaded"); TRAVELLING_TO_BLOCK_RANGE = builder.defineInRange("itemToBlockRange", 256, 4, 16 * 32); TRAVELLING_BLOCK_TO_BLOCK_RANGE = builder.defineInRange("blockToBlockRange", 96, 4, 16 * 32); diff --git a/src/main/java/com/enderio/base/common/init/EIOItems.java b/src/main/java/com/enderio/base/common/init/EIOItems.java index 1a5d6d8416..1a0f9b2cf6 100644 --- a/src/main/java/com/enderio/base/common/init/EIOItems.java +++ b/src/main/java/com/enderio/base/common/init/EIOItems.java @@ -358,6 +358,9 @@ private static ItemBuilder materialItemGlinted(String .item("staff_of_travelling", TravelStaffItem::new) .properties(props -> props.stacksTo(1)) .tab(NonNullSupplier.lazy(EIOCreativeTabs.GEAR), modifier -> EIOItems.TRAVEL_STAFF.get().addAllVariants(modifier)) + .onRegister(item -> DarkSteelUpgradeRegistry + .instance() + .addUpgradesForItem(Objects.requireNonNull(ForgeRegistries.ITEMS.getKey(item)), EmpoweredUpgrade.NAME)) .register(); public static final ItemEntry ELECTROMAGNET = REGISTRATE diff --git a/src/main/java/com/enderio/base/common/item/tool/TravelStaffItem.java b/src/main/java/com/enderio/base/common/item/tool/TravelStaffItem.java index a3bf6f40a6..99251673c8 100644 --- a/src/main/java/com/enderio/base/common/item/tool/TravelStaffItem.java +++ b/src/main/java/com/enderio/base/common/item/tool/TravelStaffItem.java @@ -79,11 +79,11 @@ public boolean performAction(Level level, Player player, ItemStack stack) { } public boolean hasResources(ItemStack stack) { - return EnergyUtil.hasEnergy(stack, 1000); + return EnergyUtil.hasEnergy(stack, BaseConfig.COMMON.ITEMS.TRAVELLING_STAFF_ENERGY_USE.get()); } public void consumeResources(ItemStack stack) { - EnergyUtil.extractEnergy(stack, 1000, false); + EnergyUtil.extractEnergy(stack, BaseConfig.COMMON.ITEMS.TRAVELLING_STAFF_ENERGY_USE.get(), false); } @Override From f891a645ee004c550f1dfb79bba0cdd8508ff468 Mon Sep 17 00:00:00 2001 From: mystchonky Date: Thu, 13 Jul 2023 17:47:16 +0530 Subject: [PATCH 006/154] move away from IDarkSteelItem and upgrades --- .../com/enderio/base/client/ClientSetup.java | 2 - .../enderio/base/common/init/EIOItems.java | 3 - .../common/item/tool/TravelStaffItem.java | 62 ++++++++++++++----- 3 files changed, 47 insertions(+), 20 deletions(-) diff --git a/src/main/java/com/enderio/base/client/ClientSetup.java b/src/main/java/com/enderio/base/client/ClientSetup.java index c6f0550a0d..0b7dd309c2 100644 --- a/src/main/java/com/enderio/base/client/ClientSetup.java +++ b/src/main/java/com/enderio/base/client/ClientSetup.java @@ -8,7 +8,6 @@ import com.enderio.base.common.init.EIOBlocks; import com.enderio.base.common.init.EIOItems; import com.enderio.base.common.init.EIOParticles; -import com.enderio.core.client.item.EnergyBarDecorator; import com.enderio.core.client.item.FluidBarDecorator; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.entity.player.PlayerRenderer; @@ -64,7 +63,6 @@ public static void itemDecorators(RegisterItemDecorationsEvent event) { event.register(EIOItems.LEVITATION_STAFF.get(), FluidBarDecorator.INSTANCE); // event.register(EIOItems.DARK_STEEL_AXE.get(), EnergyBarDecorator.INSTANCE); // event.register(EIOItems.DARK_STEEL_PICKAXE.get(), EnergyBarDecorator.INSTANCE); - event.register(EIOItems.TRAVEL_STAFF.get(), EnergyBarDecorator.INSTANCE); // Register all glass blocks EIOBlocks.GLASS_BLOCKS.values().forEach(blocks -> blocks.getAllBlocks().forEach(block -> event.register(block.get(), GlassIconDecorator.INSTANCE))); diff --git a/src/main/java/com/enderio/base/common/init/EIOItems.java b/src/main/java/com/enderio/base/common/init/EIOItems.java index 62cea83c2a..3db64150f8 100644 --- a/src/main/java/com/enderio/base/common/init/EIOItems.java +++ b/src/main/java/com/enderio/base/common/init/EIOItems.java @@ -324,9 +324,6 @@ private static ItemBuilder materialItemGlinted(String .item("staff_of_travelling", TravelStaffItem::new) .properties(props -> props.stacksTo(1)) .tab(EIOCreativeTabs.GEAR, modifier -> EIOItems.TRAVEL_STAFF.get().addAllVariants(modifier)) - // .onRegister(item -> DarkSteelUpgradeRegistry - // .instance() - // .addUpgradesForItem(Objects.requireNonNull(ForgeRegistries.ITEMS.getKey(item)), EmpoweredUpgrade.NAME)) .register(); public static final ItemEntry ELECTROMAGNET = REGISTRATE diff --git a/src/main/java/com/enderio/base/common/item/tool/TravelStaffItem.java b/src/main/java/com/enderio/base/common/item/tool/TravelStaffItem.java index 115ebebaa6..49f75ff265 100644 --- a/src/main/java/com/enderio/base/common/item/tool/TravelStaffItem.java +++ b/src/main/java/com/enderio/base/common/item/tool/TravelStaffItem.java @@ -1,14 +1,19 @@ package com.enderio.base.common.item.tool; +import com.enderio.api.capability.IMultiCapabilityItem; import com.enderio.api.capability.MultiCapabilityProvider; +import com.enderio.base.common.capability.EnergyStorageItemStack; import com.enderio.base.common.config.BaseConfig; import com.enderio.base.common.handler.TeleportHandler; -import com.enderio.base.common.init.EIOCapabilities; -import com.enderio.base.common.item.darksteel.IDarkSteelItem; -import com.enderio.base.common.item.darksteel.upgrades.EmpoweredUpgradeTier; +import com.enderio.base.common.lang.EIOLang; +import com.enderio.core.client.item.EnergyBarDecorator; +import com.enderio.core.client.item.IAdvancedTooltipProvider; +import com.enderio.core.common.item.ITabVariants; import com.enderio.core.common.util.EnergyUtil; +import com.enderio.core.common.util.TooltipUtil; import com.tterrag.registrate.util.CreativeModeTabModifier; import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.InteractionResultHolder; @@ -17,9 +22,13 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.context.UseOnContext; import net.minecraft.world.level.Level; +import net.minecraftforge.common.capabilities.ForgeCapabilities; +import net.minecraftforge.common.util.LazyOptional; import org.jetbrains.annotations.Nullable; -public class TravelStaffItem extends Item implements IDarkSteelItem { +import java.util.List; + +public class TravelStaffItem extends Item implements IMultiCapabilityItem, IAdvancedTooltipProvider, ITabVariants { public TravelStaffItem(Properties properties) { super(properties); } @@ -27,9 +36,10 @@ public TravelStaffItem(Properties properties) { @Override public InteractionResultHolder use(Level level, Player player, InteractionHand usedHand) { ItemStack stack = player.getItemInHand(usedHand); - if (getActivationStatus(stack).isAir()) {if (tryPerformAction(level, player, stack)) { - return InteractionResultHolder.sidedSuccess(stack, level.isClientSide); - } + if (getActivationStatus(stack).isAir()) { + if (tryPerformAction(level, player, stack)) { + return InteractionResultHolder.sidedSuccess(stack, level.isClientSide); + } return InteractionResultHolder.fail(stack); } return super.use(level, player, usedHand); @@ -76,6 +86,10 @@ public boolean performAction(Level level, Player player, ItemStack stack) { return false; } + public int getMaxEnergy() { + return BaseConfig.COMMON.ITEMS.TRAVELLING_STAFF_MAX_ENERGY.get(); + } + public boolean hasResources(ItemStack stack) { return EnergyUtil.hasEnergy(stack, BaseConfig.COMMON.ITEMS.TRAVELLING_STAFF_ENERGY_USE.get()); } @@ -86,11 +100,7 @@ public void consumeResources(ItemStack stack) { @Override public MultiCapabilityProvider initCapabilities(ItemStack stack, @Nullable CompoundTag nbt, MultiCapabilityProvider provider) { - - IDarkSteelItem.super.initCapabilities(stack, nbt, provider); - //Staff of Travelling always has Empowered I - provider.getCapability(EIOCapabilities.DARK_STEEL_UPGRADABLE).ifPresent( - cap -> cap.addUpgrade(EmpoweredUpgradeTier.ONE.getFactory().get())); + provider.addSimple(ForgeCapabilities.ENERGY, LazyOptional.of(() -> new EnergyStorageItemStack(stack, getMaxEnergy()))); return provider; } @@ -106,10 +116,32 @@ public void addAllVariants(CreativeModeTabModifier modifier) { modifier.accept(is); } + @Override + public boolean isBarVisible(ItemStack stack) { + return true; + } + + @Override + public int getBarWidth(ItemStack stack) { + return stack + .getCapability(ForgeCapabilities.ENERGY) + .map(energyStorage -> Math.round(energyStorage.getEnergyStored() * 13.0F / energyStorage.getMaxEnergyStored())) + .orElse(0); + } + + @Override + public int getBarColor(ItemStack pStack) { + return EnergyBarDecorator.BAR_COLOR; + } + + @Override + public void addCommonTooltips(ItemStack itemStack, @org.jetbrains.annotations.Nullable Player player, List tooltips) { + String energy = String.format("%,d", EnergyUtil.getEnergyStored(itemStack)) + "/" + String.format("%,d", EnergyUtil.getMaxEnergyStored(itemStack)); + tooltips.add(TooltipUtil.styledWithArgs(EIOLang.ENERGY_AMOUNT, energy)); + } + protected enum ActivationStatus { - BLOCK(true, false), - AIR(false, true), - ALL(true, true); + BLOCK(true, false), AIR(false, true), ALL(true, true); private final boolean isBlock, isAir; From 67a4cda4eb997712e163760e3b9631f61d647430 Mon Sep 17 00:00:00 2001 From: mystchonky Date: Thu, 13 Jul 2023 17:57:30 +0530 Subject: [PATCH 007/154] missed datagen file --- .../data/enderio/loot_tables/blocks/travel_anchor.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/generated/resources/data/enderio/loot_tables/blocks/travel_anchor.json b/src/generated/resources/data/enderio/loot_tables/blocks/travel_anchor.json index c305fdf6b2..1e204403da 100644 --- a/src/generated/resources/data/enderio/loot_tables/blocks/travel_anchor.json +++ b/src/generated/resources/data/enderio/loot_tables/blocks/travel_anchor.json @@ -24,5 +24,6 @@ ], "rolls": 1.0 } - ] + ], + "random_sequence": "enderio:blocks/travel_anchor" } \ No newline at end of file From 44061f4d4577b7153ec28559298e9d33e2624566 Mon Sep 17 00:00:00 2001 From: GotoFinal Date: Sat, 22 Jul 2023 20:59:49 +0200 Subject: [PATCH 008/154] Fix multiblock energy storage charging when reaching int.max --- .../MultiEnergyStorageWrapper.java | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/machines/java/com/enderio/machines/common/blockentity/multienergy/MultiEnergyStorageWrapper.java b/src/machines/java/com/enderio/machines/common/blockentity/multienergy/MultiEnergyStorageWrapper.java index 1d89a7c02d..d3baddd438 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/multienergy/MultiEnergyStorageWrapper.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/multienergy/MultiEnergyStorageWrapper.java @@ -66,9 +66,20 @@ public long getLargeMaxEnergyStored() { return graph.getObjects().size() * (long)tier.get().getStorageCapacity(); } + @Override + public int receiveEnergy(int maxReceive, boolean simulate) { + if (!canReceive()) + return 0; + int energyReceived = (int) Math.min(getLargeMaxEnergyStored() - getLargeEnergyStored(), Math.min(getMaxEnergyUse() * 2, maxReceive)); + if (!simulate) { + addEnergy(energyReceived); + } + return energyReceived; + } + @Override public int takeEnergy(int energy) { - if (graph == null) + if (graph == null || energy == 0) return 0; int cumulativeEnergy = 0; @@ -78,6 +89,9 @@ public int takeEnergy(int energy) { for (GraphObject object : nodes) { if (object instanceof MultiEnergyNode node) { cumulativeEnergy += node.getInternal().get().extractEnergy(energy - cumulativeEnergy, false); + if (energy - cumulativeEnergy <= 0) { + break; + } } } removedEnergy += cumulativeEnergy; @@ -86,7 +100,7 @@ public int takeEnergy(int energy) { @Override public int addEnergy(int energy) { - if (graph == null) + if (graph == null || energy == 0) return 0; int cumulativeEnergy = 0; @@ -96,6 +110,9 @@ public int addEnergy(int energy) { for (GraphObject object : nodes) { if (object instanceof MultiEnergyNode node) { cumulativeEnergy += node.getInternal().get().receiveEnergy(energy - cumulativeEnergy, false); + if (energy - cumulativeEnergy <= 0) { + break; + } } } addedEnergy += cumulativeEnergy; From 52c5d68f32be6a0d7e3ce7649e6ab8d208466e53 Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Wed, 26 Jul 2023 20:50:50 +0200 Subject: [PATCH 009/154] add lava/blaze generator --- .../enderio/blockstates/mob_generator.json | 34 +++++ .../resources/assets/enderio/lang/en_ud.json | 1 + .../resources/assets/enderio/lang/en_us.json | 1 + .../enderio/models/block/mob_generator.json | 23 +++ .../models/block/mob_generator_front_on.json | 6 + .../models/block/mob_generator_on.json | 26 ++++ .../models/block/wired_charger_front_on.json | 2 +- .../enderio/models/item/mob_generator.json | 3 + .../eio_soul/generator/minecraft_blaze.json | 6 + .../loot_tables/blocks/mob_generator.json | 49 ++++++ .../recipes/soulbinding/mob_generator.json | 9 ++ .../client/gui/screen/MobGeneratorScreen.java | 44 ++++++ .../blockentity/MobGeneratorBlockEntity.java | 144 ++++++++++++++++++ .../common/config/common/EnergyConfig.java | 5 + .../common/init/MachineBlockEntities.java | 3 + .../machines/common/init/MachineBlocks.java | 18 ++- .../machines/common/init/MachineMenus.java | 1 + .../io/energy/IMachineEnergyStorage.java | 7 + .../energy/ImmutableMachineEnergyStorage.java | 9 ++ .../LargeImmutableMachineEnergyStorage.java | 9 ++ .../io/energy/MachineEnergyStorage.java | 14 +- ...redSpawnerItem.java => SoulBoundItem.java} | 4 +- .../common/menu/MobGeneratorMenu.java | 32 ++++ .../common/souldata/GeneratorSoul.java | 34 +++++ .../recipes/SoulBindingRecipeProvider.java | 2 + .../data/souldata/SoulDataProvider.java | 12 ++ .../models/block/mob_generator_front.json | 129 ++++++++++++++++ 27 files changed, 618 insertions(+), 9 deletions(-) create mode 100644 src/generated/resources/assets/enderio/blockstates/mob_generator.json create mode 100644 src/generated/resources/assets/enderio/models/block/mob_generator.json create mode 100644 src/generated/resources/assets/enderio/models/block/mob_generator_front_on.json create mode 100644 src/generated/resources/assets/enderio/models/block/mob_generator_on.json create mode 100644 src/generated/resources/assets/enderio/models/item/mob_generator.json create mode 100644 src/generated/resources/data/enderio/eio_soul/generator/minecraft_blaze.json create mode 100644 src/generated/resources/data/enderio/loot_tables/blocks/mob_generator.json create mode 100644 src/generated/resources/data/enderio/recipes/soulbinding/mob_generator.json create mode 100644 src/machines/java/com/enderio/machines/client/gui/screen/MobGeneratorScreen.java create mode 100644 src/machines/java/com/enderio/machines/common/blockentity/MobGeneratorBlockEntity.java rename src/machines/java/com/enderio/machines/common/item/{PoweredSpawnerItem.java => SoulBoundItem.java} (90%) create mode 100644 src/machines/java/com/enderio/machines/common/menu/MobGeneratorMenu.java create mode 100644 src/machines/java/com/enderio/machines/common/souldata/GeneratorSoul.java create mode 100644 src/main/resources/assets/enderio/models/block/mob_generator_front.json diff --git a/src/generated/resources/assets/enderio/blockstates/mob_generator.json b/src/generated/resources/assets/enderio/blockstates/mob_generator.json new file mode 100644 index 0000000000..087bbb306a --- /dev/null +++ b/src/generated/resources/assets/enderio/blockstates/mob_generator.json @@ -0,0 +1,34 @@ +{ + "variants": { + "facing=east,powered=false": { + "model": "enderio:block/mob_generator", + "y": 90 + }, + "facing=east,powered=true": { + "model": "enderio:block/mob_generator_on", + "y": 90 + }, + "facing=north,powered=false": { + "model": "enderio:block/mob_generator" + }, + "facing=north,powered=true": { + "model": "enderio:block/mob_generator_on" + }, + "facing=south,powered=false": { + "model": "enderio:block/mob_generator", + "y": 180 + }, + "facing=south,powered=true": { + "model": "enderio:block/mob_generator_on", + "y": 180 + }, + "facing=west,powered=false": { + "model": "enderio:block/mob_generator", + "y": 270 + }, + "facing=west,powered=true": { + "model": "enderio:block/mob_generator_on", + "y": 270 + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/lang/en_ud.json b/src/generated/resources/assets/enderio/lang/en_ud.json index a3c9081cf5..93ca905636 100644 --- a/src/generated/resources/assets/enderio/lang/en_ud.json +++ b/src/generated/resources/assets/enderio/lang/en_ud.json @@ -756,6 +756,7 @@ "block.enderio.light_inverted": "pǝʇɹǝʌuI ʇɥbıꞀ", "block.enderio.light_node": "ǝpoN ʇɥbıꞀ", "block.enderio.liquid_sunshine": "ǝuıɥsunS pınbıꞀ", + "block.enderio.mob_generator": "ɹoʇɐɹǝuǝ⅁ qoW", "block.enderio.nutrient_distillation": "uoıʇɐןןıʇsıᗡ ʇuǝıɹʇnN", "block.enderio.painted_crafting_table": "ǝןqɐ⟘ buıʇɟɐɹƆ pǝʇuıɐԀ", "block.enderio.painted_fence": "ǝɔuǝℲ pǝʇuıɐԀ", diff --git a/src/generated/resources/assets/enderio/lang/en_us.json b/src/generated/resources/assets/enderio/lang/en_us.json index f0263aa2f6..67ce621ab5 100644 --- a/src/generated/resources/assets/enderio/lang/en_us.json +++ b/src/generated/resources/assets/enderio/lang/en_us.json @@ -756,6 +756,7 @@ "block.enderio.light_inverted": "Light Inverted", "block.enderio.light_node": "Light Node", "block.enderio.liquid_sunshine": "Liquid Sunshine", + "block.enderio.mob_generator": "Mob Generator", "block.enderio.nutrient_distillation": "Nutrient Distillation", "block.enderio.painted_crafting_table": "Painted Crafting Table", "block.enderio.painted_fence": "Painted Fence", diff --git a/src/generated/resources/assets/enderio/models/block/mob_generator.json b/src/generated/resources/assets/enderio/models/block/mob_generator.json new file mode 100644 index 0000000000..02da3cc84c --- /dev/null +++ b/src/generated/resources/assets/enderio/models/block/mob_generator.json @@ -0,0 +1,23 @@ +{ + "parent": "minecraft:block/block", + "children": { + "frame": { + "parent": "enderio:block/soul_machine_frame" + }, + "front": { + "parent": "enderio:block/mob_generator_front" + }, + "overlay": { + "parent": "enderio:block/io_overlay" + } + }, + "item_render_order": [ + "frame", + "overlay", + "front" + ], + "loader": "forge:composite", + "textures": { + "particle": "enderio:block/soul_machine_side" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/mob_generator_front_on.json b/src/generated/resources/assets/enderio/models/block/mob_generator_front_on.json new file mode 100644 index 0000000000..944c537eab --- /dev/null +++ b/src/generated/resources/assets/enderio/models/block/mob_generator_front_on.json @@ -0,0 +1,6 @@ +{ + "parent": "enderio:block/mob_generator_front", + "textures": { + "front": "enderio:block/mob_generator_front_on" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/mob_generator_on.json b/src/generated/resources/assets/enderio/models/block/mob_generator_on.json new file mode 100644 index 0000000000..f3a20a3664 --- /dev/null +++ b/src/generated/resources/assets/enderio/models/block/mob_generator_on.json @@ -0,0 +1,26 @@ +{ + "parent": "minecraft:block/block", + "children": { + "frame": { + "parent": "enderio:block/soul_machine_frame" + }, + "front": { + "parent": "enderio:block/mob_generator_front", + "textures": { + "front": "enderio:block/mob_generator_front_on" + } + }, + "overlay": { + "parent": "enderio:block/io_overlay" + } + }, + "item_render_order": [ + "frame", + "overlay", + "front" + ], + "loader": "forge:composite", + "textures": { + "particle": "enderio:block/soul_machine_side" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/wired_charger_front_on.json b/src/generated/resources/assets/enderio/models/block/wired_charger_front_on.json index b897ebc1af..1025ace775 100644 --- a/src/generated/resources/assets/enderio/models/block/wired_charger_front_on.json +++ b/src/generated/resources/assets/enderio/models/block/wired_charger_front_on.json @@ -1,6 +1,6 @@ { "parent": "enderio:block/wired_charger_front", "textures": { - "front": "enderio:block/wired_charger_front" + "front": "enderio:block/wired_charger_front_on" } } \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/item/mob_generator.json b/src/generated/resources/assets/enderio/models/item/mob_generator.json new file mode 100644 index 0000000000..e051f96af9 --- /dev/null +++ b/src/generated/resources/assets/enderio/models/item/mob_generator.json @@ -0,0 +1,3 @@ +{ + "parent": "enderio:block/mob_generator" +} \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/generator/minecraft_blaze.json b/src/generated/resources/data/enderio/eio_soul/generator/minecraft_blaze.json new file mode 100644 index 0000000000..03aea8ae7a --- /dev/null +++ b/src/generated/resources/data/enderio/eio_soul/generator/minecraft_blaze.json @@ -0,0 +1,6 @@ +{ + "entity": "minecraft:blaze", + "fluid": "minecraft:lava", + "power/mb": 800, + "tick/mb": 20 +} \ No newline at end of file diff --git a/src/generated/resources/data/enderio/loot_tables/blocks/mob_generator.json b/src/generated/resources/data/enderio/loot_tables/blocks/mob_generator.json new file mode 100644 index 0000000000..53f4ebf249 --- /dev/null +++ b/src/generated/resources/data/enderio/loot_tables/blocks/mob_generator.json @@ -0,0 +1,49 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:copy_nbt", + "ops": [ + { + "op": "replace", + "source": "EntityStorage", + "target": "BlockEntityTag.EntityStorage" + }, + { + "op": "replace", + "source": "Energy", + "target": "BlockEntityTag.Energy" + }, + { + "op": "replace", + "source": "IoConfig", + "target": "BlockEntityTag.IoConfig" + }, + { + "op": "replace", + "source": "RedstoneControl", + "target": "BlockEntityTag.RedstoneControl" + }, + { + "op": "replace", + "source": "Items", + "target": "BlockEntityTag.Items" + } + ], + "source": "block_entity" + } + ], + "name": "enderio:mob_generator" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "enderio:blocks/mob_generator" +} \ No newline at end of file diff --git a/src/generated/resources/data/enderio/recipes/soulbinding/mob_generator.json b/src/generated/resources/data/enderio/recipes/soulbinding/mob_generator.json new file mode 100644 index 0000000000..f9997258bf --- /dev/null +++ b/src/generated/resources/data/enderio/recipes/soulbinding/mob_generator.json @@ -0,0 +1,9 @@ +{ + "type": "enderio:soul_binding", + "energy": 25000, + "exp": 1, + "input": { + "item": "enderio:mob_generator" + }, + "output": "enderio:mob_generator" +} \ No newline at end of file diff --git a/src/machines/java/com/enderio/machines/client/gui/screen/MobGeneratorScreen.java b/src/machines/java/com/enderio/machines/client/gui/screen/MobGeneratorScreen.java new file mode 100644 index 0000000000..f8cae8fe07 --- /dev/null +++ b/src/machines/java/com/enderio/machines/client/gui/screen/MobGeneratorScreen.java @@ -0,0 +1,44 @@ +package com.enderio.machines.client.gui.screen; + +import com.enderio.EnderIO; +import com.enderio.api.misc.Vector2i; +import com.enderio.base.common.lang.EIOLang; +import com.enderio.core.client.gui.screen.EIOScreen; +import com.enderio.core.client.gui.widgets.EnumIconWidget; +import com.enderio.machines.client.gui.widget.CapacitorEnergyWidget; +import com.enderio.machines.client.gui.widget.ioconfig.IOConfigButton; +import com.enderio.machines.common.menu.MobGeneratorMenu; +import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.player.Inventory; + +public class MobGeneratorScreen extends EIOScreen{ + + public static final ResourceLocation BG_TEXTURE = EnderIO.loc("textures/gui/alloy_smelter_auto.png"); + + public MobGeneratorScreen(MobGeneratorMenu pMenu, Inventory pPlayerInventory, Component pTitle) { + super(pMenu, pPlayerInventory, pTitle); + } + + @Override + protected void init() { + super.init(); + + addRenderableOnly(new CapacitorEnergyWidget(this, getMenu().getBlockEntity()::getEnergyStorage, getMenu().getBlockEntity()::isCapacitorInstalled, 16 + leftPos, 14 + topPos, 9, 42)); + + addRenderableWidget(new EnumIconWidget<>(this, leftPos + imageWidth - 8 - 12, topPos + 6, () -> menu.getBlockEntity().getRedstoneControl(), + control -> menu.getBlockEntity().setRedstoneControl(control), EIOLang.REDSTONE_MODE)); + + addRenderableWidget(new IOConfigButton<>(this, leftPos + imageWidth - 6 - 16, topPos + 22, 16, 16, menu, this::addRenderableWidget, font)); + } + + @Override + public ResourceLocation getBackgroundImage() { + return BG_TEXTURE; + } + + @Override + protected Vector2i getBackgroundImageSize() { + return new Vector2i(176, 166); + } +} diff --git a/src/machines/java/com/enderio/machines/common/blockentity/MobGeneratorBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/MobGeneratorBlockEntity.java new file mode 100644 index 0000000000..32c0ee0253 --- /dev/null +++ b/src/machines/java/com/enderio/machines/common/blockentity/MobGeneratorBlockEntity.java @@ -0,0 +1,144 @@ +package com.enderio.machines.common.blockentity; + +import com.enderio.api.capability.StoredEntityData; +import com.enderio.api.capacitor.CapacitorModifier; +import com.enderio.api.capacitor.FixedScalable; +import com.enderio.api.capacitor.QuadraticScalable; +import com.enderio.api.io.energy.EnergyIOMode; +import com.enderio.core.common.network.slot.ResourceLocationNetworkDataSlot; +import com.enderio.machines.common.MachineNBTKeys; +import com.enderio.machines.common.blockentity.base.PoweredMachineBlockEntity; +import com.enderio.machines.common.config.MachinesConfig; +import com.enderio.machines.common.io.fluid.MachineFluidTank; +import com.enderio.machines.common.io.item.MachineInventoryLayout; +import com.enderio.machines.common.menu.MobGeneratorMenu; +import com.enderio.machines.common.souldata.GeneratorSoul; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Holder; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidType; +import net.minecraftforge.fluids.capability.IFluidHandler; +import net.minecraftforge.fluids.capability.templates.FluidTank; +import net.minecraftforge.registries.ForgeRegistries; +import org.jetbrains.annotations.Nullable; + +import java.util.Optional; +import java.util.function.Predicate; + +import static com.enderio.machines.common.blockentity.PoweredSpawnerBlockEntity.NO_MOB; + +public class MobGeneratorBlockEntity extends PoweredMachineBlockEntity { + + public static final QuadraticScalable CAPACITY = new QuadraticScalable(CapacitorModifier.ENERGY_CAPACITY, MachinesConfig.COMMON.ENERGY.MOB_GENERATOR_CAPACITY); + public static final String BURNED_TICKS = "burnedTicks"; + private StoredEntityData entityData = StoredEntityData.empty(); + public static final int FLUID_CAPACITY = 16 * FluidType.BUCKET_VOLUME; + private GeneratorSoul.SoulData soulData; + private int burnedTicks = 0; + + public MobGeneratorBlockEntity(BlockEntityType type, + BlockPos worldPosition, BlockState blockState) { + super(EnergyIOMode.Output, CAPACITY, FixedScalable.ZERO, type, worldPosition, blockState); + addDataSlot(new ResourceLocationNetworkDataSlot(() -> this.getEntityType().orElse(NO_MOB),this::setEntityType)); + } + + @Override + public MachineInventoryLayout getInventoryLayout() { + return MachineInventoryLayout.builder() + .capacitor() + .build(); + } + + @Override + public void serverTick() { + if (entityData != StoredEntityData.empty() && entityData.getEntityType().isPresent()) { + Optional op = GeneratorSoul.GENERATOR.matches(entityData.getEntityType().get()); + op.ifPresent(data -> soulData = data); + } else { + return; + } + + if (isActive()) { + producePower(); + } + } + + public Optional getEntityType() { + return entityData.getEntityType(); + } + + public void setEntityType(ResourceLocation entityType) { + entityData = StoredEntityData.of(entityType); + } + + @Override + protected boolean isActive() { + return getFluidTankNN().getFluidAmount() > 0; + } + + public void producePower() { + if (burnedTicks == soulData.tickpermb()) { + if (!getFluidTankNN().isEmpty() && getEnergyStorage().addEnergy(soulData.powerpermb(), true) == soulData.powerpermb()) { + getFluidTankNN().drain(1, IFluidHandler.FluidAction.EXECUTE); + getEnergyStorage().addEnergy(soulData.powerpermb()); + burnedTicks = 0; + } + } else { + burnedTicks ++; + } + } + + @Override + protected @Nullable FluidTank createFluidTank() { + return new MachineFluidTank(FLUID_CAPACITY, isFluidValid(), this) { + @Override + protected void onContentsChanged() { + super.onContentsChanged(); + } + }; + } + + //TODO add tag support + private Predicate isFluidValid() { + return fluidStack -> { + if (soulData == null) { + return false; + } + ResourceLocation fluid = soulData.fluid(); + Optional> delegate = ForgeRegistries.FLUIDS.getDelegate(fluid); + if (delegate.isPresent()) { + return fluidStack.getFluid().isSame(delegate.get().get()); + } + return false; + }; + + } + + @Nullable + @Override + public AbstractContainerMenu createMenu(int containerId, Inventory playerInventory, Player player) { + return new MobGeneratorMenu(this, playerInventory, containerId); + } + + @Override + public void saveAdditional(CompoundTag pTag) { + super.saveAdditional(pTag); + pTag.putInt(BURNED_TICKS, burnedTicks); + pTag.put(MachineNBTKeys.ENTITY_STORAGE, entityData.serializeNBT()); + } + + @Override + public void load(CompoundTag pTag) { + super.load(pTag); + burnedTicks = pTag.getInt(BURNED_TICKS); + entityData.deserializeNBT(pTag.getCompound(MachineNBTKeys.ENTITY_STORAGE)); + } +} diff --git a/src/machines/java/com/enderio/machines/common/config/common/EnergyConfig.java b/src/machines/java/com/enderio/machines/common/config/common/EnergyConfig.java index e16959c3ba..2c41a3b245 100644 --- a/src/machines/java/com/enderio/machines/common/config/common/EnergyConfig.java +++ b/src/machines/java/com/enderio/machines/common/config/common/EnergyConfig.java @@ -29,6 +29,7 @@ public class EnergyConfig { public final ForgeConfigSpec.ConfigValue VIBRANT_SOLAR_PANEL_MAX_PRODUCTION; public final ForgeConfigSpec.ConfigValue WIRED_CHARGER_CAPACITY; public final ForgeConfigSpec.ConfigValue WIRED_CHARGER_USAGE; + public final ForgeConfigSpec.ConfigValue MOB_GENERATOR_CAPACITY; public EnergyConfig(ForgeConfigSpec.Builder builder) { builder.push("energy"); @@ -94,6 +95,10 @@ public EnergyConfig(ForgeConfigSpec.Builder builder) { WIRED_CHARGER_USAGE = builder.comment("The base energy consumption in uI/t.").defineInRange("usage", 100, 1, Integer.MAX_VALUE); builder.pop(); + builder.push("mob_generator"); + MOB_GENERATOR_CAPACITY = builder.defineInRange("capacity",100000, 1, Integer.MAX_VALUE); + builder.pop(); + builder.pop(); } } diff --git a/src/machines/java/com/enderio/machines/common/init/MachineBlockEntities.java b/src/machines/java/com/enderio/machines/common/init/MachineBlockEntities.java index b6062d646f..89ea1a136e 100644 --- a/src/machines/java/com/enderio/machines/common/init/MachineBlockEntities.java +++ b/src/machines/java/com/enderio/machines/common/init/MachineBlockEntities.java @@ -70,6 +70,7 @@ public class MachineBlockEntities { } return ImmutableMap.copyOf(map); }); + public static final Map> CAPACITOR_BANKS = Util.make(() -> { Map> map = new HashMap<>(); for (CapacitorTier tier : CapacitorTier.values()) { @@ -79,6 +80,8 @@ public class MachineBlockEntities { return ImmutableMap.copyOf(map); }); + public static final BlockEntityEntry MOB_GENERATOR = register("mob_generator", MobGeneratorBlockEntity::new, MachineBlocks.MOB_GENERATOR); + @SafeVarargs private static BlockEntityEntry register(String name, BlockEntityBuilder.BlockEntityFactory beFactory, NonNullSupplier... blocks) { diff --git a/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java b/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java index 7aff20f735..7d02f06ef5 100644 --- a/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java +++ b/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java @@ -3,6 +3,7 @@ import com.enderio.EnderIO; import com.enderio.base.common.init.EIOCreativeTabs; import com.enderio.core.data.model.EIOModel; +import com.enderio.machines.common.MachineNBTKeys; import com.enderio.machines.common.block.CapacitorBankBlock; import com.enderio.machines.common.block.MachineBlock; import com.enderio.machines.common.block.ProgressMachineBlock; @@ -14,7 +15,7 @@ import com.enderio.machines.common.blockentity.solar.SolarPanelTier; import com.enderio.machines.common.item.CapacitorBankItem; import com.enderio.machines.common.item.FluidTankItem; -import com.enderio.machines.common.item.PoweredSpawnerItem; +import com.enderio.machines.common.item.SoulBoundItem; import com.enderio.machines.data.loot.MachinesLootTable; import com.enderio.machines.data.model.MachineModelUtil; import com.google.common.collect.ImmutableMap; @@ -154,9 +155,9 @@ public class MachineBlocks { public static final BlockEntry POWERED_SPAWNER = REGISTRATE .block("powered_spawner", props -> new ProgressMachineBlock(props, MachineBlockEntities.POWERED_SPAWNER)) - .loot((l,t) -> MachinesLootTable.copyNBTSingleCap(l, t, "EntityStorage")) + .loot((l,t) -> MachinesLootTable.copyNBTSingleCap(l, t, MachineNBTKeys.ENTITY_STORAGE)) .blockstate(MachineModelUtil::soulMachineBlock) - .item(PoweredSpawnerItem::new) + .item(SoulBoundItem::new) .tab(EIOCreativeTabs.MACHINES) .build() .register(); @@ -188,6 +189,7 @@ public class MachineBlocks { } return ImmutableMap.copyOf(panels); }); + public static final Map> CAPACITOR_BANKS = Util.make(() -> { Map> banks = new HashMap<>(); for (CapacitorTier tier: CapacitorTier.values()) { @@ -195,6 +197,16 @@ public class MachineBlocks { } return ImmutableMap.copyOf(banks); }); + + public static final BlockEntry MOB_GENERATOR = REGISTRATE + .block("mob_generator", props -> new ProgressMachineBlock(props, MachineBlockEntities.MOB_GENERATOR)) + .loot((l,t) -> MachinesLootTable.copyNBTSingleCap(l, t, MachineNBTKeys.ENTITY_STORAGE)) + .blockstate(MachineModelUtil::soulMachineBlock) + .item(SoulBoundItem::new) + .tab(EIOCreativeTabs.MACHINES) + .build() + .register(); + public static final BlockEntry CRAFTER = standardMachine("crafter", () -> MachineBlockEntities.CRAFTER) .lang("Crafter") .blockstate((ctx, prov) -> MachineModelUtil.customMachineBlock(ctx, prov, "crafter")) diff --git a/src/machines/java/com/enderio/machines/common/init/MachineMenus.java b/src/machines/java/com/enderio/machines/common/init/MachineMenus.java index e800f40a11..d54d93cc71 100644 --- a/src/machines/java/com/enderio/machines/common/init/MachineMenus.java +++ b/src/machines/java/com/enderio/machines/common/init/MachineMenus.java @@ -27,6 +27,7 @@ private MachineMenus() {} public static final MenuEntry WIRED_CHARGER = REGISTRATE.menu("wired_charger", WiredChargerMenu::factory, () -> WiredChargerScreen::new).register(); public static final MenuEntry PAINTING_MACHINE = REGISTRATE.menu("painting_machine", PaintingMachineMenu::factory, () -> PaintingMachineScreen::new).register(); public static final MenuEntry CAPACITOR_BANK = REGISTRATE.menu("capacitor_bank", CapacitorBankMenu::factory, () -> CapacitorBankScreen::new).register(); + public static final MenuEntry MOB_GENERATOR = REGISTRATE.menu("mob_generator", MobGeneratorMenu::factory, () -> MobGeneratorScreen::new).register(); public static void register() {} } diff --git a/src/machines/java/com/enderio/machines/common/io/energy/IMachineEnergyStorage.java b/src/machines/java/com/enderio/machines/common/io/energy/IMachineEnergyStorage.java index c9ea3a45be..28e9c3e601 100644 --- a/src/machines/java/com/enderio/machines/common/io/energy/IMachineEnergyStorage.java +++ b/src/machines/java/com/enderio/machines/common/io/energy/IMachineEnergyStorage.java @@ -20,6 +20,13 @@ public interface IMachineEnergyStorage extends IEnergyStorage { */ int addEnergy(int energy); + /** + * Add energy into storage. + * + * @return Amount of energy added. + */ + public int addEnergy(int energy, boolean simulate); + /** * Remove energy from storage. * diff --git a/src/machines/java/com/enderio/machines/common/io/energy/ImmutableMachineEnergyStorage.java b/src/machines/java/com/enderio/machines/common/io/energy/ImmutableMachineEnergyStorage.java index 7fb5b978cd..913e18398f 100644 --- a/src/machines/java/com/enderio/machines/common/io/energy/ImmutableMachineEnergyStorage.java +++ b/src/machines/java/com/enderio/machines/common/io/energy/ImmutableMachineEnergyStorage.java @@ -101,6 +101,15 @@ public int addEnergy(int energy) { throw new UnsupportedOperationException(); } + /** + * @deprecated This storage is immutable. + */ + @Deprecated + @Override + public int addEnergy(int energy, boolean simulate) { + throw new UnsupportedOperationException(); + } + /** * @deprecated This storage is immutable. */ diff --git a/src/machines/java/com/enderio/machines/common/io/energy/LargeImmutableMachineEnergyStorage.java b/src/machines/java/com/enderio/machines/common/io/energy/LargeImmutableMachineEnergyStorage.java index c6136fbbb6..54555e60f2 100644 --- a/src/machines/java/com/enderio/machines/common/io/energy/LargeImmutableMachineEnergyStorage.java +++ b/src/machines/java/com/enderio/machines/common/io/energy/LargeImmutableMachineEnergyStorage.java @@ -104,6 +104,15 @@ public int addEnergy(int energy) { throw new UnsupportedOperationException(); } + /** + * @deprecated This storage is immutable. + */ + @Deprecated + @Override + public int addEnergy(int energy, boolean simulate) { + throw new UnsupportedOperationException(); + } + /** * @deprecated This storage is immutable. */ diff --git a/src/machines/java/com/enderio/machines/common/io/energy/MachineEnergyStorage.java b/src/machines/java/com/enderio/machines/common/io/energy/MachineEnergyStorage.java index 8a43159578..9e4339b04a 100644 --- a/src/machines/java/com/enderio/machines/common/io/energy/MachineEnergyStorage.java +++ b/src/machines/java/com/enderio/machines/common/io/energy/MachineEnergyStorage.java @@ -68,10 +68,18 @@ public void setEnergyStored(int energy) { @Override public int addEnergy(int energy) { + return addEnergy(energy, false); + } + + @Override + public int addEnergy(int energy, boolean simulate) { int energyBefore = energyStored; - energyStored = Math.min(energyStored + energy, getMaxEnergyStored()); - onContentsChanged(); - return energyStored - energyBefore; + int newEnergyStored = Math.min(energyStored + energy, getMaxEnergyStored()); + if (!simulate) { + energyStored = newEnergyStored; + onContentsChanged(); + } + return newEnergyStored - energyBefore; } @Override diff --git a/src/machines/java/com/enderio/machines/common/item/PoweredSpawnerItem.java b/src/machines/java/com/enderio/machines/common/item/SoulBoundItem.java similarity index 90% rename from src/machines/java/com/enderio/machines/common/item/PoweredSpawnerItem.java rename to src/machines/java/com/enderio/machines/common/item/SoulBoundItem.java index d6d15a8555..4969d0236b 100644 --- a/src/machines/java/com/enderio/machines/common/item/PoweredSpawnerItem.java +++ b/src/machines/java/com/enderio/machines/common/item/SoulBoundItem.java @@ -18,9 +18,9 @@ import java.util.List; -public class PoweredSpawnerItem extends BlockItem implements IMultiCapabilityItem, IAdvancedTooltipProvider { +public class SoulBoundItem extends BlockItem implements IMultiCapabilityItem, IAdvancedTooltipProvider { - public PoweredSpawnerItem(Block pBlock, Properties pProperties) { + public SoulBoundItem(Block pBlock, Properties pProperties) { super(pBlock, pProperties); } diff --git a/src/machines/java/com/enderio/machines/common/menu/MobGeneratorMenu.java b/src/machines/java/com/enderio/machines/common/menu/MobGeneratorMenu.java new file mode 100644 index 0000000000..cc99396a84 --- /dev/null +++ b/src/machines/java/com/enderio/machines/common/menu/MobGeneratorMenu.java @@ -0,0 +1,32 @@ +package com.enderio.machines.common.menu; + +import com.enderio.machines.common.blockentity.MobGeneratorBlockEntity; +import com.enderio.machines.common.init.MachineMenus; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.inventory.MenuType; +import net.minecraft.world.level.block.entity.BlockEntity; +import org.apache.logging.log4j.LogManager; +import org.jetbrains.annotations.Nullable; + +public class MobGeneratorMenu extends MachineMenu{ + + public MobGeneratorMenu(@Nullable MobGeneratorBlockEntity blockEntity, Inventory inventory, int pContainerId) { + super(blockEntity, inventory, MachineMenus.MOB_GENERATOR.get(), pContainerId); + if (blockEntity != null) { + // Capacitor slot + if (blockEntity.requiresCapacitor()) { + addSlot(new MachineSlot(blockEntity.getInventory(), blockEntity.getCapacitorSlot(), 12, 60)); + } + } + addInventorySlots(8, 84); + } + + public static MobGeneratorMenu factory(@Nullable MenuType pMenuType, int pContainerId, Inventory inventory, FriendlyByteBuf buf) { + BlockEntity entity = inventory.player.level().getBlockEntity(buf.readBlockPos()); + if (entity instanceof MobGeneratorBlockEntity castBlockEntity) + return new MobGeneratorMenu(castBlockEntity, inventory, pContainerId); + LogManager.getLogger().warn("couldn't find BlockEntity"); + return new MobGeneratorMenu(null, inventory, pContainerId); + } +} diff --git a/src/machines/java/com/enderio/machines/common/souldata/GeneratorSoul.java b/src/machines/java/com/enderio/machines/common/souldata/GeneratorSoul.java new file mode 100644 index 0000000000..bff3938f9d --- /dev/null +++ b/src/machines/java/com/enderio/machines/common/souldata/GeneratorSoul.java @@ -0,0 +1,34 @@ +package com.enderio.machines.common.souldata; + +import com.mojang.serialization.Codec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import net.minecraft.resources.ResourceLocation; +import net.minecraftforge.event.AddReloadListenerEvent; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.common.Mod; + +@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.FORGE) +public class GeneratorSoul { + + //TODO add tag support for fluids + public record SoulData(ResourceLocation entitytype, ResourceLocation fluid, int powerpermb, int tickpermb) implements ISoulData { + @Override + public ResourceLocation getKey() { + return entitytype(); + } + } + + public static final Codec CODEC = RecordCodecBuilder.create(soulDataInstance -> + soulDataInstance.group(ResourceLocation.CODEC.fieldOf("entity").forGetter(SoulData::entitytype), + ResourceLocation.CODEC.fieldOf("fluid").forGetter(SoulData::fluid), + Codec.INT.fieldOf("power/mb").forGetter(SoulData::powerpermb), + Codec.INT.fieldOf("tick/mb").forGetter(SoulData::tickpermb)) + .apply(soulDataInstance, SoulData::new)); + + public static final SoulDataReloadListner GENERATOR = new SoulDataReloadListner<>("eio_soul/generator", CODEC); + + @SubscribeEvent + static void addResource(AddReloadListenerEvent event) { + event.addListener(GENERATOR); + } +} diff --git a/src/machines/java/com/enderio/machines/data/recipes/SoulBindingRecipeProvider.java b/src/machines/java/com/enderio/machines/data/recipes/SoulBindingRecipeProvider.java index a0bcc17e2b..dd0ae89e05 100644 --- a/src/machines/java/com/enderio/machines/data/recipes/SoulBindingRecipeProvider.java +++ b/src/machines/java/com/enderio/machines/data/recipes/SoulBindingRecipeProvider.java @@ -4,6 +4,7 @@ import com.enderio.base.common.init.EIOItems; import com.enderio.base.data.recipe.RecipeDataUtil; import com.enderio.core.data.recipes.EnderRecipeProvider; +import com.enderio.machines.common.init.MachineBlocks; import com.enderio.machines.common.init.MachineRecipes; import com.google.gson.JsonObject; import net.minecraft.data.PackOutput; @@ -41,6 +42,7 @@ protected void buildRecipes(Consumer pFinishedRecipeConsumer) { build(EIOItems.PLAYER_TOKEN, Ingredient.of(EIOItems.DARK_STEEL_BALL), 25000, 1, EntityType.VILLAGER, pFinishedRecipeConsumer); build(EIOItems.MONSTER_TOKEN, Ingredient.of(EIOItems.SOULARIUM_BALL), 25000, 1, EntityType.GHAST, pFinishedRecipeConsumer); build(EIOItems.ANIMAL_TOKEN, Ingredient.of(EIOItems.SOULARIUM_BALL), 25000, 1, MobCategory.CREATURE, pFinishedRecipeConsumer); + build(MachineBlocks.MOB_GENERATOR, Ingredient.of(MachineBlocks.MOB_GENERATOR), 25000, 1, pFinishedRecipeConsumer); } protected void build(ItemLike output, Ingredient input, int energy, int exp, EntityType entityType, Consumer finishedRecipeConsumer) { diff --git a/src/machines/java/com/enderio/machines/data/souldata/SoulDataProvider.java b/src/machines/java/com/enderio/machines/data/souldata/SoulDataProvider.java index a7a6c00f62..642fbc7d77 100644 --- a/src/machines/java/com/enderio/machines/data/souldata/SoulDataProvider.java +++ b/src/machines/java/com/enderio/machines/data/souldata/SoulDataProvider.java @@ -2,6 +2,7 @@ import com.enderio.EnderIO; import com.enderio.machines.common.blockentity.task.SpawnerMachineTask; +import com.enderio.machines.common.souldata.GeneratorSoul; import com.enderio.machines.common.souldata.ISoulData; import com.enderio.machines.common.souldata.SpawnerSoul; import com.google.common.collect.Sets; @@ -17,6 +18,8 @@ import net.minecraft.data.PackOutput; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.EntityType; +import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.Fluids; import net.minecraftforge.registries.ForgeRegistries; import java.util.ArrayList; @@ -109,6 +112,8 @@ public void buildSoulData(Consumer> finshedSoulDataConsumer) addSpawnerData(EntityType.ZOMBIE_VILLAGER, 4000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); addSpawnerData(EntityType.ZOMBIFIED_PIGLIN, 4000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addGeneratorData(EntityType.BLAZE, Fluids.LAVA, 800, 20, finshedSoulDataConsumer); + } @Override @@ -136,6 +141,13 @@ private void addSpawnerData(EntityType entityType, int power, SpawnerMachineT finshedSoulDataConsumer.accept(new FinshedSoulData<>(SpawnerSoul.CODEC, data, "spawner/" + key.getNamespace() + "_" + key.getPath())); } + private void addGeneratorData(EntityType entityType, Fluid fluid, int powerpermb, int tickpermb, Consumer> finshedSoulDataConsumer) { + ResourceLocation entityRL = ForgeRegistries.ENTITY_TYPES.getKey(entityType); + ResourceLocation fluidRL = ForgeRegistries.FLUIDS.getKey(fluid); + GeneratorSoul.SoulData data = new GeneratorSoul.SoulData(entityRL, fluidRL, powerpermb, tickpermb); + finshedSoulDataConsumer.accept(new FinshedSoulData<>(GeneratorSoul.CODEC, data, "generator/" + entityRL.getNamespace() + "_" + entityRL.getPath())); + } + static class FinshedSoulData { private final Codec codec; diff --git a/src/main/resources/assets/enderio/models/block/mob_generator_front.json b/src/main/resources/assets/enderio/models/block/mob_generator_front.json new file mode 100644 index 0000000000..15bd0f3464 --- /dev/null +++ b/src/main/resources/assets/enderio/models/block/mob_generator_front.json @@ -0,0 +1,129 @@ +{ + "credit": "Made with Blockbench by Rover656", + "textures": { + "front": "enderio:block/stirling_generator_front_off" + }, + "elements": [ + { + "from": [1, 1, 0.25], + "to": [15, 2, 1.25], + "faces": { + "north": {"uv": [1, 14, 15, 15], "texture": "#front"}, + "up": {"uv": [1, 14, 15, 15], "texture": "#front"} + } + }, + { + "name": "Back", + "from": [1, 1, 1.25], + "to": [15, 15, 1.25], + "faces": { + "north": {"uv": [1, 1, 15, 15], "texture": "#front"} + } + }, + { + "from": [1, 6, 0.25], + "to": [15, 9, 1.25], + "faces": { + "north": {"uv": [1, 7, 15, 10], "texture": "#front"}, + "up": {"uv": [1, 7, 15, 8], "texture": "#front"}, + "down": {"uv": [1, 9, 15, 10], "texture": "#front"} + } + }, + { + "from": [13, 9, 0.25], + "to": [15, 13, 1.25], + "faces": { + "north": {"uv": [1, 3, 3, 7], "texture": "#front"}, + "west": {"uv": [2, 3, 3, 7], "texture": "#front"} + } + }, + { + "from": [1, 9, 0.25], + "to": [3, 13, 1.25], + "faces": { + "north": {"uv": [13, 3, 15, 7], "texture": "#front"}, + "east": {"uv": [13, 3, 14, 7], "texture": "#front"} + } + }, + { + "from": [1, 13, 0.25], + "to": [15, 15, 1.25], + "faces": { + "north": {"uv": [1, 1, 15, 3], "texture": "#front"}, + "down": {"uv": [1, 3, 15, 4], "texture": "#front"} + } + }, + { + "from": [13, 2, 0.25], + "to": [15, 6, 1.25], + "faces": { + "north": {"uv": [1, 10, 3, 14], "texture": "#front"}, + "west": {"uv": [2, 10, 3, 14], "texture": "#front"} + } + }, + { + "from": [1, 2, 0.25], + "to": [3, 6, 1.25], + "faces": { + "north": {"uv": [13, 10, 15, 14], "texture": "#front"}, + "east": {"uv": [13, 10, 14, 14], "texture": "#front"} + } + }, + { + "from": [4.5, 5, 0.25], + "to": [11.5, 6, 1.25], + "faces": { + "north": {"uv": [4.5, 10, 11.5, 11], "texture": "#front"}, + "east": {"uv": [4.5, 10, 5.5, 11], "texture": "#front"}, + "west": {"uv": [10.5, 10, 11.5, 11], "texture": "#front"}, + "down": {"uv": [4.5, 10, 11.5, 11], "texture": "#front"} + } + }, + { + "from": [6.5, 4, 0.25], + "to": [9.5, 5, 1.25], + "faces": { + "north": {"uv": [6.5, 11, 9.5, 12], "texture": "#front"}, + "east": {"uv": [6.5, 11, 7.5, 12], "texture": "#front"}, + "west": {"uv": [8.5, 11, 9.5, 12], "texture": "#front"}, + "down": {"uv": [6.5, 11, 9.5, 12], "texture": "#front"} + } + }, + { + "from": [10.5, 2, 0.25], + "to": [11.5, 5, 1.25], + "faces": { + "north": {"uv": [4.5, 11, 5.5, 14], "texture": "#front"}, + "east": {"uv": [4.5, 11, 5.5, 14], "texture": "#front"}, + "west": {"uv": [4.5, 11, 5.5, 14], "texture": "#front"} + } + }, + { + "from": [4.5, 2, 0.25], + "to": [5.5, 5, 1.25], + "faces": { + "north": {"uv": [10.5, 11, 11.5, 14], "texture": "#front"}, + "east": {"uv": [10.5, 11, 11.5, 14], "texture": "#front"}, + "west": {"uv": [10.5, 11, 11.5, 14], "texture": "#front"} + } + }, + { + "from": [6.5, 2, 0.25], + "to": [7.5, 4, 1.25], + "faces": { + "north": {"uv": [8.5, 12, 9.5, 14], "texture": "#front"}, + "east": {"uv": [8.5, 12, 9.5, 14], "texture": "#front"}, + "west": {"uv": [8.5, 12, 9.5, 14], "texture": "#front"} + } + }, + { + "from": [8.5, 2, 0.25], + "to": [9.5, 4, 1.25], + "faces": { + "north": {"uv": [6.5, 12, 7.5, 14], "texture": "#front"}, + "east": {"uv": [6.5, 12, 7.5, 14], "texture": "#front"}, + "west": {"uv": [6.5, 12, 7.5, 14], "texture": "#front"} + } + } + ] +} \ No newline at end of file From 7293e6c79da09c4aa4f2e6311cedd2c24c997283 Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Wed, 26 Jul 2023 21:50:28 +0200 Subject: [PATCH 010/154] fix syncing issue --- .../loot_tables/blocks/mob_generator.json | 24 ++----------------- .../blockentity/MobGeneratorBlockEntity.java | 2 ++ .../machines/common/init/MachineBlocks.java | 2 +- 3 files changed, 5 insertions(+), 23 deletions(-) diff --git a/src/generated/resources/data/enderio/loot_tables/blocks/mob_generator.json b/src/generated/resources/data/enderio/loot_tables/blocks/mob_generator.json index 53f4ebf249..5ccc5044f2 100644 --- a/src/generated/resources/data/enderio/loot_tables/blocks/mob_generator.json +++ b/src/generated/resources/data/enderio/loot_tables/blocks/mob_generator.json @@ -12,28 +12,8 @@ "ops": [ { "op": "replace", - "source": "EntityStorage", - "target": "BlockEntityTag.EntityStorage" - }, - { - "op": "replace", - "source": "Energy", - "target": "BlockEntityTag.Energy" - }, - { - "op": "replace", - "source": "IoConfig", - "target": "BlockEntityTag.IoConfig" - }, - { - "op": "replace", - "source": "RedstoneControl", - "target": "BlockEntityTag.RedstoneControl" - }, - { - "op": "replace", - "source": "Items", - "target": "BlockEntityTag.Items" + "source": "", + "target": "BlockEntityTag" } ], "source": "block_entity" diff --git a/src/machines/java/com/enderio/machines/common/blockentity/MobGeneratorBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/MobGeneratorBlockEntity.java index 32c0ee0253..e61f06e2ae 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/MobGeneratorBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/MobGeneratorBlockEntity.java @@ -69,6 +69,8 @@ public void serverTick() { if (isActive()) { producePower(); } + + super.serverTick(); } public Optional getEntityType() { diff --git a/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java b/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java index 7d02f06ef5..facfc98c31 100644 --- a/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java +++ b/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java @@ -200,7 +200,7 @@ public class MachineBlocks { public static final BlockEntry MOB_GENERATOR = REGISTRATE .block("mob_generator", props -> new ProgressMachineBlock(props, MachineBlockEntities.MOB_GENERATOR)) - .loot((l,t) -> MachinesLootTable.copyNBTSingleCap(l, t, MachineNBTKeys.ENTITY_STORAGE)) + .loot(MachinesLootTable::copyNBT) .blockstate(MachineModelUtil::soulMachineBlock) .item(SoulBoundItem::new) .tab(EIOCreativeTabs.MACHINES) From c57ed5e9d7f185121f5851ff7292ccbddb2dc8cf Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Wed, 26 Jul 2023 22:29:16 +0200 Subject: [PATCH 011/154] add more mob souls --- .../enderio/eio_soul/generator/minecraft_enderman.json | 6 ++++++ .../enderio/eio_soul/generator/minecraft_husk.json | 6 ++++++ .../enderio/eio_soul/generator/minecraft_shulker.json | 6 ++++++ .../enderio/eio_soul/generator/minecraft_zombie.json | 6 ++++++ .../eio_soul/generator/minecraft_zombie_villager.json | 6 ++++++ .../common/blockentity/MobGeneratorBlockEntity.java | 10 ++++------ .../machines/data/souldata/SoulDataProvider.java | 6 ++++++ 7 files changed, 40 insertions(+), 6 deletions(-) create mode 100644 src/generated/resources/data/enderio/eio_soul/generator/minecraft_enderman.json create mode 100644 src/generated/resources/data/enderio/eio_soul/generator/minecraft_husk.json create mode 100644 src/generated/resources/data/enderio/eio_soul/generator/minecraft_shulker.json create mode 100644 src/generated/resources/data/enderio/eio_soul/generator/minecraft_zombie.json create mode 100644 src/generated/resources/data/enderio/eio_soul/generator/minecraft_zombie_villager.json diff --git a/src/generated/resources/data/enderio/eio_soul/generator/minecraft_enderman.json b/src/generated/resources/data/enderio/eio_soul/generator/minecraft_enderman.json new file mode 100644 index 0000000000..66fdf50af4 --- /dev/null +++ b/src/generated/resources/data/enderio/eio_soul/generator/minecraft_enderman.json @@ -0,0 +1,6 @@ +{ + "entity": "minecraft:enderman", + "fluid": "enderio:flowing_dew_of_the_void", + "power/mb": 2000, + "tick/mb": 10 +} \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/generator/minecraft_husk.json b/src/generated/resources/data/enderio/eio_soul/generator/minecraft_husk.json new file mode 100644 index 0000000000..a4c396f2cf --- /dev/null +++ b/src/generated/resources/data/enderio/eio_soul/generator/minecraft_husk.json @@ -0,0 +1,6 @@ +{ + "entity": "minecraft:husk", + "fluid": "enderio:flowing_nutrient_distillation", + "power/mb": 900, + "tick/mb": 20 +} \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/generator/minecraft_shulker.json b/src/generated/resources/data/enderio/eio_soul/generator/minecraft_shulker.json new file mode 100644 index 0000000000..272c397a65 --- /dev/null +++ b/src/generated/resources/data/enderio/eio_soul/generator/minecraft_shulker.json @@ -0,0 +1,6 @@ +{ + "entity": "minecraft:shulker", + "fluid": "enderio:flowing_vapor_of_levity", + "power/mb": 1500, + "tick/mb": 20 +} \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/generator/minecraft_zombie.json b/src/generated/resources/data/enderio/eio_soul/generator/minecraft_zombie.json new file mode 100644 index 0000000000..41e97320ca --- /dev/null +++ b/src/generated/resources/data/enderio/eio_soul/generator/minecraft_zombie.json @@ -0,0 +1,6 @@ +{ + "entity": "minecraft:zombie", + "fluid": "enderio:flowing_nutrient_distillation", + "power/mb": 900, + "tick/mb": 20 +} \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/generator/minecraft_zombie_villager.json b/src/generated/resources/data/enderio/eio_soul/generator/minecraft_zombie_villager.json new file mode 100644 index 0000000000..06b5b3049f --- /dev/null +++ b/src/generated/resources/data/enderio/eio_soul/generator/minecraft_zombie_villager.json @@ -0,0 +1,6 @@ +{ + "entity": "minecraft:zombie_villager", + "fluid": "enderio:flowing_nutrient_distillation", + "power/mb": 900, + "tick/mb": 20 +} \ No newline at end of file diff --git a/src/machines/java/com/enderio/machines/common/blockentity/MobGeneratorBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/MobGeneratorBlockEntity.java index e61f06e2ae..5973fbf9db 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/MobGeneratorBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/MobGeneratorBlockEntity.java @@ -62,12 +62,10 @@ public void serverTick() { if (entityData != StoredEntityData.empty() && entityData.getEntityType().isPresent()) { Optional op = GeneratorSoul.GENERATOR.matches(entityData.getEntityType().get()); op.ifPresent(data -> soulData = data); - } else { - return; - } - if (isActive()) { - producePower(); + if (isActive()) { + producePower(); + } } super.serverTick(); @@ -83,7 +81,7 @@ public void setEntityType(ResourceLocation entityType) { @Override protected boolean isActive() { - return getFluidTankNN().getFluidAmount() > 0; + return canAct() && getFluidTankNN().getFluidAmount() > 0; } public void producePower() { diff --git a/src/machines/java/com/enderio/machines/data/souldata/SoulDataProvider.java b/src/machines/java/com/enderio/machines/data/souldata/SoulDataProvider.java index 642fbc7d77..a217f6301a 100644 --- a/src/machines/java/com/enderio/machines/data/souldata/SoulDataProvider.java +++ b/src/machines/java/com/enderio/machines/data/souldata/SoulDataProvider.java @@ -1,6 +1,7 @@ package com.enderio.machines.data.souldata; import com.enderio.EnderIO; +import com.enderio.base.common.init.EIOFluids; import com.enderio.machines.common.blockentity.task.SpawnerMachineTask; import com.enderio.machines.common.souldata.GeneratorSoul; import com.enderio.machines.common.souldata.ISoulData; @@ -113,6 +114,11 @@ public void buildSoulData(Consumer> finshedSoulDataConsumer) addSpawnerData(EntityType.ZOMBIFIED_PIGLIN, 4000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); addGeneratorData(EntityType.BLAZE, Fluids.LAVA, 800, 20, finshedSoulDataConsumer); + addGeneratorData(EntityType.ZOMBIE, EIOFluids.NUTRIENT_DISTILLATION.get(), 900, 20, finshedSoulDataConsumer); + addGeneratorData(EntityType.ZOMBIE_VILLAGER, EIOFluids.NUTRIENT_DISTILLATION.get(), 900, 20, finshedSoulDataConsumer); + addGeneratorData(EntityType.HUSK, EIOFluids.NUTRIENT_DISTILLATION.get(), 900, 20, finshedSoulDataConsumer); + addGeneratorData(EntityType.ENDERMAN, EIOFluids.DEW_OF_THE_VOID.get(), 2000, 10, finshedSoulDataConsumer); + addGeneratorData(EntityType.SHULKER, EIOFluids.VAPOR_OF_LEVITY.get(), 1500, 20, finshedSoulDataConsumer); } From 3ae3b8f76574e3cd6f47f03fec2a7a48cd40828c Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Wed, 26 Jul 2023 23:19:45 +0200 Subject: [PATCH 012/154] change soulbinder recipe to only work if souldata is found --- .../recipes/soulbinding/mob_generator.json | 3 +- .../blockentity/MobGeneratorBlockEntity.java | 11 ++-- .../common/recipe/SoulBindingRecipe.java | 57 +++++++++++++++---- .../common/souldata/GeneratorSoul.java | 3 +- ...stner.java => SoulDataReloadListener.java} | 18 ++++-- .../machines/common/souldata/SpawnerSoul.java | 3 +- .../recipes/SoulBindingRecipeProvider.java | 24 ++++++-- 7 files changed, 88 insertions(+), 31 deletions(-) rename src/machines/java/com/enderio/machines/common/souldata/{SoulDataReloadListner.java => SoulDataReloadListener.java} (88%) diff --git a/src/generated/resources/data/enderio/recipes/soulbinding/mob_generator.json b/src/generated/resources/data/enderio/recipes/soulbinding/mob_generator.json index f9997258bf..8339353530 100644 --- a/src/generated/resources/data/enderio/recipes/soulbinding/mob_generator.json +++ b/src/generated/resources/data/enderio/recipes/soulbinding/mob_generator.json @@ -5,5 +5,6 @@ "input": { "item": "enderio:mob_generator" }, - "output": "enderio:mob_generator" + "output": "enderio:mob_generator", + "souldata": "generator" } \ No newline at end of file diff --git a/src/machines/java/com/enderio/machines/common/blockentity/MobGeneratorBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/MobGeneratorBlockEntity.java index 5973fbf9db..12f8cb3c79 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/MobGeneratorBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/MobGeneratorBlockEntity.java @@ -61,11 +61,12 @@ public MachineInventoryLayout getInventoryLayout() { public void serverTick() { if (entityData != StoredEntityData.empty() && entityData.getEntityType().isPresent()) { Optional op = GeneratorSoul.GENERATOR.matches(entityData.getEntityType().get()); - op.ifPresent(data -> soulData = data); - - if (isActive()) { - producePower(); - } + op.ifPresent(data -> { + soulData = data; + if (isActive()) { + producePower(); + } + }); } super.serverTick(); diff --git a/src/machines/java/com/enderio/machines/common/recipe/SoulBindingRecipe.java b/src/machines/java/com/enderio/machines/common/recipe/SoulBindingRecipe.java index 6225824e84..b1d0c93d1f 100644 --- a/src/machines/java/com/enderio/machines/common/recipe/SoulBindingRecipe.java +++ b/src/machines/java/com/enderio/machines/common/recipe/SoulBindingRecipe.java @@ -7,6 +7,7 @@ import com.enderio.base.common.util.ExperienceUtil; import com.enderio.core.common.recipes.OutputStack; import com.enderio.machines.common.init.MachineRecipes; +import com.enderio.machines.common.souldata.SoulDataReloadListener; import com.google.gson.JsonObject; import net.minecraft.ResourceLocationException; import net.minecraft.core.NonNullList; @@ -35,13 +36,14 @@ public class SoulBindingRecipe implements MachineRecipe craft(SoulBindingRecipe.Container container, RegistryAc ItemStack vial = container.getItem(0); List results = getResultStacks(registryAccess); results.forEach(o -> { - ItemStack result = o.getItem(); //TODO will this auto update since the stack is updated? + ItemStack result = o.getItem(); vial.getCapability(EIOCapabilities.ENTITY_STORAGE).ifPresent(inputEntity -> { result.getCapability(EIOCapabilities.ENTITY_STORAGE).ifPresent(resultEntity -> { resultEntity.setStoredEntityData(inputEntity.getStoredEntityData()); @@ -115,7 +126,16 @@ public boolean matches(SoulBindingRecipe.Container container, Level pLevel) { if (!capability.isPresent()) { //vial (or other entity storage return false; } - if (entityType == null && mobCategory == null) { //type doesn't matter + if (souldata != null) { //is in the selected souldata + if (SoulDataReloadListener.fromString(souldata).matches( + container.getItem(0).getCapability(EIOCapabilities.ENTITY_STORAGE).resolve().get() + .getStoredEntityData().getEntityType().get()).isEmpty()) { + return false; + }; + container.setNeededXP(exp); + return ExperienceUtil.getLevelFromFluid(container.getFluidTank().getFluidAmount()) >= exp; + } + if (mobCategory == null && entityType == null) { //No souldata, entity type or mob category container.setNeededXP(exp); return ExperienceUtil.getLevelFromFluid(container.getFluidTank().getFluidAmount()) >= exp; } @@ -202,7 +222,12 @@ public SoulBindingRecipe fromJson(ResourceLocation pRecipeId, JsonObject seriali mobCategory = MobCategory.byName(serializedRecipe.get("mob_category").getAsString()); } - return new SoulBindingRecipe(pRecipeId, output, input, energy, exp, entityType, mobCategory); + String souldata = null; + if (serializedRecipe.has("souldata")) { + souldata = serializedRecipe.get("souldata").getAsString(); + } + + return new SoulBindingRecipe(pRecipeId, output, input, energy, exp, entityType, mobCategory, souldata); } @Nullable @@ -217,18 +242,23 @@ public SoulBindingRecipe fromNetwork(ResourceLocation recipeId, FriendlyByteBuf Ingredient input = Ingredient.fromNetwork(buffer); int energy = buffer.readInt(); int exp = buffer.readInt(); - + int mode = buffer.readInt(); ResourceLocation entityType = null; - if (buffer.readBoolean()) { + if (mode == 0) { entityType = buffer.readResourceLocation(); } MobCategory mobCategory = null; - if (buffer.readBoolean()) { + if (mode == 1) { mobCategory = MobCategory.byName(buffer.readUtf()); } - return new SoulBindingRecipe(recipeId, output, input, energy, exp, entityType, mobCategory); + String souldata = null; + if (mode == 2) { + souldata = buffer.readUtf(); + } + + return new SoulBindingRecipe(recipeId, output, input, energy, exp, entityType, mobCategory, souldata); } catch (Exception ex) { EnderIO.LOGGER.error("Error reading soul binding recipe from packet.", ex); throw ex; @@ -243,15 +273,20 @@ public void toNetwork(FriendlyByteBuf buffer, SoulBindingRecipe recipe) { buffer.writeInt(recipe.energy); buffer.writeInt(recipe.exp); - buffer.writeBoolean(recipe.entityType != null); if (recipe.entityType != null) { //don't write null + buffer.writeInt(0); buffer.writeResourceLocation(recipe.entityType); } - buffer.writeBoolean(recipe.mobCategory != null); if (recipe.mobCategory != null) { //don't write null + buffer.writeInt(1); buffer.writeUtf(recipe.mobCategory.getName()); } + + if (recipe.souldata != null) { //don't write null + buffer.writeInt(2); + buffer.writeUtf(recipe.souldata); + } } catch (Exception ex) { EnderIO.LOGGER.error("Error writing soul binding recipe to packet.", ex); throw ex; diff --git a/src/machines/java/com/enderio/machines/common/souldata/GeneratorSoul.java b/src/machines/java/com/enderio/machines/common/souldata/GeneratorSoul.java index bff3938f9d..bce5acd318 100644 --- a/src/machines/java/com/enderio/machines/common/souldata/GeneratorSoul.java +++ b/src/machines/java/com/enderio/machines/common/souldata/GeneratorSoul.java @@ -25,7 +25,8 @@ public ResourceLocation getKey() { Codec.INT.fieldOf("tick/mb").forGetter(SoulData::tickpermb)) .apply(soulDataInstance, SoulData::new)); - public static final SoulDataReloadListner GENERATOR = new SoulDataReloadListner<>("eio_soul/generator", CODEC); + public static final String NAME = "generator"; + public static final SoulDataReloadListener GENERATOR = new SoulDataReloadListener<>(NAME, CODEC); @SubscribeEvent static void addResource(AddReloadListenerEvent event) { diff --git a/src/machines/java/com/enderio/machines/common/souldata/SoulDataReloadListner.java b/src/machines/java/com/enderio/machines/common/souldata/SoulDataReloadListener.java similarity index 88% rename from src/machines/java/com/enderio/machines/common/souldata/SoulDataReloadListner.java rename to src/machines/java/com/enderio/machines/common/souldata/SoulDataReloadListener.java index 7c6b3c8d7e..e6408935cd 100644 --- a/src/machines/java/com/enderio/machines/common/souldata/SoulDataReloadListner.java +++ b/src/machines/java/com/enderio/machines/common/souldata/SoulDataReloadListener.java @@ -49,11 +49,12 @@ of this software and associated documentation files (the "Software"), to deal * to the forge events necessary for syncing datapack data to clients. * @param The type of the objects that the codec is parsing jsons as */ -public class SoulDataReloadListner extends SimpleJsonResourceReloadListener { +public class SoulDataReloadListener extends SimpleJsonResourceReloadListener { private static final Gson GSON = new Gson(); public Map map = new HashMap<>(); private final Codec codec; private final String folderName; + private static final Map> loadedSoulData = new HashMap<>(); /** * Creates a data manager with a custom gson parser @@ -64,10 +65,11 @@ public class SoulDataReloadListner extends SimpleJsonResour * @param gson A gson for parsing the raw json data into JsonElements. JsonElement-to-T conversion will be done by the codec, * so gson type adapters shouldn't be necessary here */ - public SoulDataReloadListner(Gson gson, String folder, Codec codec){ - super(gson, folder); + public SoulDataReloadListener(Gson gson, String folder, Codec codec){ + super(gson, "eio_soul/" + folder); this.codec = codec; - this.folderName = folder; + this.folderName = "eio_soul/" + folder; + loadedSoulData.put(folder, this); } /** @@ -77,7 +79,7 @@ public SoulDataReloadListner(Gson gson, String folder, Codec codec){ * folderName can include subfolders, e.g. "some_mod_that_adds_lots_of_data_loaders/cheeses" * @param codec A codec to deserialize the json into your T, see javadocs above class */ - public SoulDataReloadListner(String folder, Codec codec) { + public SoulDataReloadListener(String folder, Codec codec) { this(GSON, folder, codec); } @@ -103,7 +105,7 @@ protected void apply(Map pObject, ResourceManager * @param packetFactory A packet constructor or factory method that converts the given map to a packet object to send on the given channel * @return this manager object */ - public

SoulDataReloadListner subscribeAsSyncable(final Function, P> packetFactory) { + public

SoulDataReloadListener subscribeAsSyncable(final Function, P> packetFactory) { MinecraftForge.EVENT_BUS.addListener(this.getDatapackSyncListener(packetFactory)); return this; } @@ -130,4 +132,8 @@ public Optional matches(ResourceLocation entitytype) { return Optional.empty(); } + public static SoulDataReloadListener fromString(String name) { + return loadedSoulData.get(name); + } + } diff --git a/src/machines/java/com/enderio/machines/common/souldata/SpawnerSoul.java b/src/machines/java/com/enderio/machines/common/souldata/SpawnerSoul.java index f241902b80..53a61da309 100644 --- a/src/machines/java/com/enderio/machines/common/souldata/SpawnerSoul.java +++ b/src/machines/java/com/enderio/machines/common/souldata/SpawnerSoul.java @@ -36,8 +36,9 @@ public ResourceLocation getKey() { Codec.STRING.comapFlatMap(SpawnerMachineTask.SpawnType::byName, SpawnerMachineTask.SpawnType::getName).stable().fieldOf("type").forGetter(SoulData::spawnType)) .apply(soulDataInstance, SoulData::new)); + public static final String NAME = "spawner"; //SoulData Manger for the spawner data - public static final SoulDataReloadListner SPAWNER = new SoulDataReloadListner<>("eio_soul/spawner", CODEC); + public static final SoulDataReloadListener SPAWNER = new SoulDataReloadListener<>(NAME, CODEC); @SubscribeEvent static void addResource(AddReloadListenerEvent event) { diff --git a/src/machines/java/com/enderio/machines/data/recipes/SoulBindingRecipeProvider.java b/src/machines/java/com/enderio/machines/data/recipes/SoulBindingRecipeProvider.java index dd0ae89e05..3adce90a71 100644 --- a/src/machines/java/com/enderio/machines/data/recipes/SoulBindingRecipeProvider.java +++ b/src/machines/java/com/enderio/machines/data/recipes/SoulBindingRecipeProvider.java @@ -6,6 +6,7 @@ import com.enderio.core.data.recipes.EnderRecipeProvider; import com.enderio.machines.common.init.MachineBlocks; import com.enderio.machines.common.init.MachineRecipes; +import com.enderio.machines.common.souldata.GeneratorSoul; import com.google.gson.JsonObject; import net.minecraft.data.PackOutput; import net.minecraft.data.recipes.FinishedRecipe; @@ -38,23 +39,27 @@ protected void buildRecipes(Consumer pFinishedRecipeConsumer) { build(EIOItems.PRESCIENT_CRYSTAL, Ingredient.of(EIOItems.VIBRANT_CRYSTAL), 200000, 8, EntityType.SHULKER, pFinishedRecipeConsumer); build(EIOItems.FRANK_N_ZOMBIE, Ingredient.of(EIOItems.Z_LOGIC_CONTROLLER), 100000, 4, EntityType.ZOMBIE, pFinishedRecipeConsumer); build(EIOItems.SENTIENT_ENDER, Ingredient.of(EIOItems.ENDER_RESONATOR), 100000, 4, EntityType.WITCH, pFinishedRecipeConsumer); - build(EIOItems.BROKEN_SPAWNER, Ingredient.of(EIOItems.BROKEN_SPAWNER), 2500000, 8, pFinishedRecipeConsumer); + build(EIOItems.BROKEN_SPAWNER, Ingredient.of(EIOItems.BROKEN_SPAWNER), 2500000, 8, pFinishedRecipeConsumer); //TODO if we add SpawnerSoul.NAME, no modded mob will work without a config build(EIOItems.PLAYER_TOKEN, Ingredient.of(EIOItems.DARK_STEEL_BALL), 25000, 1, EntityType.VILLAGER, pFinishedRecipeConsumer); build(EIOItems.MONSTER_TOKEN, Ingredient.of(EIOItems.SOULARIUM_BALL), 25000, 1, EntityType.GHAST, pFinishedRecipeConsumer); build(EIOItems.ANIMAL_TOKEN, Ingredient.of(EIOItems.SOULARIUM_BALL), 25000, 1, MobCategory.CREATURE, pFinishedRecipeConsumer); - build(MachineBlocks.MOB_GENERATOR, Ingredient.of(MachineBlocks.MOB_GENERATOR), 25000, 1, pFinishedRecipeConsumer); + build(MachineBlocks.MOB_GENERATOR, Ingredient.of(MachineBlocks.MOB_GENERATOR), 25000, 1, GeneratorSoul.NAME, pFinishedRecipeConsumer); } protected void build(ItemLike output, Ingredient input, int energy, int exp, EntityType entityType, Consumer finishedRecipeConsumer) { - finishedRecipeConsumer.accept(new FinishedSoulBindingRecipe(EnderIO.loc("soulbinding/" + ForgeRegistries.ITEMS.getKey(output.asItem()).getPath()), output, input, energy, exp, ForgeRegistries.ENTITY_TYPES.getKey(entityType), null)); + finishedRecipeConsumer.accept(new FinishedSoulBindingRecipe(EnderIO.loc("soulbinding/" + ForgeRegistries.ITEMS.getKey(output.asItem()).getPath()), output, input, energy, exp, ForgeRegistries.ENTITY_TYPES.getKey(entityType), null, null)); } protected void build(ItemLike output, Ingredient input, int energy, int exp, MobCategory mobCategory, Consumer finishedRecipeConsumer) { - finishedRecipeConsumer.accept(new FinishedSoulBindingRecipe(EnderIO.loc("soulbinding/" + ForgeRegistries.ITEMS.getKey(output.asItem()).getPath()), output, input, energy, exp, null, mobCategory)); + finishedRecipeConsumer.accept(new FinishedSoulBindingRecipe(EnderIO.loc("soulbinding/" + ForgeRegistries.ITEMS.getKey(output.asItem()).getPath()), output, input, energy, exp, null, mobCategory, null)); + } + + protected void build(ItemLike output, Ingredient input, int energy, int exp, String souldata, Consumer finishedRecipeConsumer) { + finishedRecipeConsumer.accept(new FinishedSoulBindingRecipe(EnderIO.loc("soulbinding/" + ForgeRegistries.ITEMS.getKey(output.asItem()).getPath()), output, input, energy, exp, null, null, souldata)); } protected void build(ItemLike output, Ingredient input, int energy, int exp, Consumer finishedRecipeConsumer) { - finishedRecipeConsumer.accept(new FinishedSoulBindingRecipe(EnderIO.loc("soulbinding/" + ForgeRegistries.ITEMS.getKey(output.asItem()).getPath()), output, input, energy, exp, null, null)); + finishedRecipeConsumer.accept(new FinishedSoulBindingRecipe(EnderIO.loc("soulbinding/" + ForgeRegistries.ITEMS.getKey(output.asItem()).getPath()), output, input, energy, exp, null, null, null)); } protected static class FinishedSoulBindingRecipe extends EnderFinishedRecipe { @@ -67,8 +72,10 @@ protected static class FinishedSoulBindingRecipe extends EnderFinishedRecipe { private final ResourceLocation entityType; @Nullable private final MobCategory mobCategory; + @Nullable + private final String souldata; - public FinishedSoulBindingRecipe(ResourceLocation id, ItemLike output, Ingredient input, int energy, int exp, @Nullable ResourceLocation entityType, @Nullable MobCategory mobCategory) { + public FinishedSoulBindingRecipe(ResourceLocation id, ItemLike output, Ingredient input, int energy, int exp, @Nullable ResourceLocation entityType, @Nullable MobCategory mobCategory, @Nullable String souldata) { super(id); this.output = output.asItem(); this.input = input; @@ -81,6 +88,7 @@ public FinishedSoulBindingRecipe(ResourceLocation id, ItemLike output, Ingredien this.entityType = entityType; this.mobCategory = mobCategory; + this.souldata = souldata; } @Override @@ -99,6 +107,10 @@ public void serializeRecipeData(JsonObject json) { json.addProperty("mob_category", mobCategory.getName()); } + if (souldata != null) { + json.addProperty("souldata", souldata); + } + super.serializeRecipeData(json); } From 0041d18cd2d798530fb7f585ce5390ba257404db Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Thu, 27 Jul 2023 01:43:22 +0200 Subject: [PATCH 013/154] fix networking + gui stuff --- .../client/gui/screen/MobGeneratorScreen.java | 6 ++++- .../blockentity/MobGeneratorBlockEntity.java | 8 +++--- .../common/recipe/SoulBindingRecipe.java | 23 +++++++++--------- ...zombie_generator.png => mob_generator.png} | Bin 4 files changed, 21 insertions(+), 16 deletions(-) rename src/main/resources/assets/enderio/textures/gui/{zombie_generator.png => mob_generator.png} (100%) diff --git a/src/machines/java/com/enderio/machines/client/gui/screen/MobGeneratorScreen.java b/src/machines/java/com/enderio/machines/client/gui/screen/MobGeneratorScreen.java index f8cae8fe07..aa7c7ebc76 100644 --- a/src/machines/java/com/enderio/machines/client/gui/screen/MobGeneratorScreen.java +++ b/src/machines/java/com/enderio/machines/client/gui/screen/MobGeneratorScreen.java @@ -6,6 +6,7 @@ import com.enderio.core.client.gui.screen.EIOScreen; import com.enderio.core.client.gui.widgets.EnumIconWidget; import com.enderio.machines.client.gui.widget.CapacitorEnergyWidget; +import com.enderio.machines.client.gui.widget.FluidStackWidget; import com.enderio.machines.client.gui.widget.ioconfig.IOConfigButton; import com.enderio.machines.common.menu.MobGeneratorMenu; import net.minecraft.network.chat.Component; @@ -14,7 +15,7 @@ public class MobGeneratorScreen extends EIOScreen{ - public static final ResourceLocation BG_TEXTURE = EnderIO.loc("textures/gui/alloy_smelter_auto.png"); + public static final ResourceLocation BG_TEXTURE = EnderIO.loc("textures/gui/mob_generator.png"); public MobGeneratorScreen(MobGeneratorMenu pMenu, Inventory pPlayerInventory, Component pTitle) { super(pMenu, pPlayerInventory, pTitle); @@ -29,7 +30,10 @@ protected void init() { addRenderableWidget(new EnumIconWidget<>(this, leftPos + imageWidth - 8 - 12, topPos + 6, () -> menu.getBlockEntity().getRedstoneControl(), control -> menu.getBlockEntity().setRedstoneControl(control), EIOLang.REDSTONE_MODE)); + addRenderableOnly(new FluidStackWidget(this, getMenu().getBlockEntity()::getFluidTank, 80 + leftPos, 21 + topPos, 16, 47)); + addRenderableWidget(new IOConfigButton<>(this, leftPos + imageWidth - 6 - 16, topPos + 22, 16, 16, menu, this::addRenderableWidget, font)); + } @Override diff --git a/src/machines/java/com/enderio/machines/common/blockentity/MobGeneratorBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/MobGeneratorBlockEntity.java index 12f8cb3c79..4ddebfed50 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/MobGeneratorBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/MobGeneratorBlockEntity.java @@ -5,6 +5,7 @@ import com.enderio.api.capacitor.FixedScalable; import com.enderio.api.capacitor.QuadraticScalable; import com.enderio.api.io.energy.EnergyIOMode; +import com.enderio.core.common.network.slot.FluidStackNetworkDataSlot; import com.enderio.core.common.network.slot.ResourceLocationNetworkDataSlot; import com.enderio.machines.common.MachineNBTKeys; import com.enderio.machines.common.blockentity.base.PoweredMachineBlockEntity; @@ -37,10 +38,10 @@ public class MobGeneratorBlockEntity extends PoweredMachineBlockEntity { - public static final QuadraticScalable CAPACITY = new QuadraticScalable(CapacitorModifier.ENERGY_CAPACITY, MachinesConfig.COMMON.ENERGY.MOB_GENERATOR_CAPACITY); - public static final String BURNED_TICKS = "burnedTicks"; + private static final QuadraticScalable CAPACITY = new QuadraticScalable(CapacitorModifier.ENERGY_CAPACITY, MachinesConfig.COMMON.ENERGY.MOB_GENERATOR_CAPACITY); + private static final String BURNED_TICKS = "burnedTicks"; private StoredEntityData entityData = StoredEntityData.empty(); - public static final int FLUID_CAPACITY = 16 * FluidType.BUCKET_VOLUME; + private static final int FLUID_CAPACITY = 2 * FluidType.BUCKET_VOLUME; private GeneratorSoul.SoulData soulData; private int burnedTicks = 0; @@ -48,6 +49,7 @@ public MobGeneratorBlockEntity(BlockEntityType type, BlockPos worldPosition, BlockState blockState) { super(EnergyIOMode.Output, CAPACITY, FixedScalable.ZERO, type, worldPosition, blockState); addDataSlot(new ResourceLocationNetworkDataSlot(() -> this.getEntityType().orElse(NO_MOB),this::setEntityType)); + addDataSlot(new FluidStackNetworkDataSlot(getFluidTankNN()::getFluid, getFluidTankNN()::setFluid)); } @Override diff --git a/src/machines/java/com/enderio/machines/common/recipe/SoulBindingRecipe.java b/src/machines/java/com/enderio/machines/common/recipe/SoulBindingRecipe.java index b1d0c93d1f..4b8154e763 100644 --- a/src/machines/java/com/enderio/machines/common/recipe/SoulBindingRecipe.java +++ b/src/machines/java/com/enderio/machines/common/recipe/SoulBindingRecipe.java @@ -243,18 +243,19 @@ public SoulBindingRecipe fromNetwork(ResourceLocation recipeId, FriendlyByteBuf int energy = buffer.readInt(); int exp = buffer.readInt(); int mode = buffer.readInt(); + ResourceLocation entityType = null; - if (mode == 0) { + if (mode == 1) { entityType = buffer.readResourceLocation(); } MobCategory mobCategory = null; - if (mode == 1) { + if (mode == 2) { mobCategory = MobCategory.byName(buffer.readUtf()); } String souldata = null; - if (mode == 2) { + if (mode == 3) { souldata = buffer.readUtf(); } @@ -274,18 +275,16 @@ public void toNetwork(FriendlyByteBuf buffer, SoulBindingRecipe recipe) { buffer.writeInt(recipe.exp); if (recipe.entityType != null) { //don't write null - buffer.writeInt(0); - buffer.writeResourceLocation(recipe.entityType); - } - - if (recipe.mobCategory != null) { //don't write null buffer.writeInt(1); - buffer.writeUtf(recipe.mobCategory.getName()); - } - - if (recipe.souldata != null) { //don't write null + buffer.writeResourceLocation(recipe.entityType); + } else if (recipe.mobCategory != null) { //don't write null buffer.writeInt(2); + buffer.writeUtf(recipe.mobCategory.getName()); + } else if (recipe.souldata != null) { //don't write null + buffer.writeInt(3); buffer.writeUtf(recipe.souldata); + } else { + buffer.writeInt(0); } } catch (Exception ex) { EnderIO.LOGGER.error("Error writing soul binding recipe to packet.", ex); diff --git a/src/main/resources/assets/enderio/textures/gui/zombie_generator.png b/src/main/resources/assets/enderio/textures/gui/mob_generator.png similarity index 100% rename from src/main/resources/assets/enderio/textures/gui/zombie_generator.png rename to src/main/resources/assets/enderio/textures/gui/mob_generator.png From 83c84abceb99e5224cde20786b2759825bb6370f Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Fri, 28 Jul 2023 14:49:03 +0200 Subject: [PATCH 014/154] Add Drain --- .../client/gui/screen/DrainScreen.java | 46 ++++++ .../common/blockentity/DrainBlockEntity.java | 147 ++++++++++++++++++ .../common/config/common/EnergyConfig.java | 7 + .../common/init/MachineBlockEntities.java | 2 + .../machines/common/init/MachineBlocks.java | 4 + .../machines/common/init/MachineMenus.java | 1 + .../machines/common/menu/DrainMenu.java | 31 ++++ .../assets/enderio/textures/gui/drain.png | Bin 0 -> 1573 bytes 8 files changed, 238 insertions(+) create mode 100644 src/machines/java/com/enderio/machines/client/gui/screen/DrainScreen.java create mode 100644 src/machines/java/com/enderio/machines/common/blockentity/DrainBlockEntity.java create mode 100644 src/machines/java/com/enderio/machines/common/menu/DrainMenu.java create mode 100644 src/main/resources/assets/enderio/textures/gui/drain.png diff --git a/src/machines/java/com/enderio/machines/client/gui/screen/DrainScreen.java b/src/machines/java/com/enderio/machines/client/gui/screen/DrainScreen.java new file mode 100644 index 0000000000..ebd980e185 --- /dev/null +++ b/src/machines/java/com/enderio/machines/client/gui/screen/DrainScreen.java @@ -0,0 +1,46 @@ +package com.enderio.machines.client.gui.screen; + +import com.enderio.EnderIO; +import com.enderio.api.misc.Vector2i; +import com.enderio.base.common.lang.EIOLang; +import com.enderio.core.client.gui.screen.EIOScreen; +import com.enderio.core.client.gui.widgets.EnumIconWidget; +import com.enderio.machines.client.gui.widget.CapacitorEnergyWidget; +import com.enderio.machines.client.gui.widget.FluidStackWidget; +import com.enderio.machines.client.gui.widget.ioconfig.IOConfigButton; +import com.enderio.machines.common.menu.DrainMenu; +import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.player.Inventory; + +public class DrainScreen extends EIOScreen { + + public static final ResourceLocation BG_TEXTURE = EnderIO.loc("textures/gui/drain.png"); + public DrainScreen(DrainMenu pMenu, Inventory pPlayerInventory, Component pTitle) { + super(pMenu, pPlayerInventory, pTitle); + } + + @Override + protected void init() { + super.init(); + + addRenderableOnly(new CapacitorEnergyWidget(this, getMenu().getBlockEntity()::getEnergyStorage, getMenu().getBlockEntity()::isCapacitorInstalled, 16 + leftPos, 14 + topPos, 9, 42)); + + addRenderableWidget(new EnumIconWidget<>(this, leftPos + imageWidth - 8 - 12, topPos + 6, () -> menu.getBlockEntity().getRedstoneControl(), + control -> menu.getBlockEntity().setRedstoneControl(control), EIOLang.REDSTONE_MODE)); + + addRenderableOnly(new FluidStackWidget(this, getMenu().getBlockEntity()::getFluidTank, 80 + leftPos, 21 + topPos, 16, 47)); + + addRenderableWidget(new IOConfigButton<>(this, leftPos + imageWidth - 6 - 16, topPos + 22, 16, 16, menu, this::addRenderableWidget, font)); + } + + @Override + public ResourceLocation getBackgroundImage() { + return BG_TEXTURE; + } + + @Override + protected Vector2i getBackgroundImageSize() { + return new Vector2i(176, 166); + } +} diff --git a/src/machines/java/com/enderio/machines/common/blockentity/DrainBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/DrainBlockEntity.java new file mode 100644 index 0000000000..11c8957541 --- /dev/null +++ b/src/machines/java/com/enderio/machines/common/blockentity/DrainBlockEntity.java @@ -0,0 +1,147 @@ +package com.enderio.machines.common.blockentity; + +import com.enderio.api.capacitor.CapacitorModifier; +import com.enderio.api.capacitor.QuadraticScalable; +import com.enderio.api.io.energy.EnergyIOMode; +import com.enderio.core.common.network.slot.FluidStackNetworkDataSlot; +import com.enderio.machines.common.blockentity.base.PoweredMachineBlockEntity; +import com.enderio.machines.common.config.MachinesConfig; +import com.enderio.machines.common.io.fluid.MachineFluidTank; +import com.enderio.machines.common.io.item.MachineInventoryLayout; +import com.enderio.machines.common.menu.DrainMenu; +import net.minecraft.core.BlockPos; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.material.FluidState; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidType; +import net.minecraftforge.fluids.capability.IFluidHandler; +import net.minecraftforge.fluids.capability.templates.FluidTank; +import org.jetbrains.annotations.Nullable; + +import java.util.ArrayList; +import java.util.List; + +public class DrainBlockEntity extends PoweredMachineBlockEntity { + public static final String CONSUMED = "consumed"; + private static final QuadraticScalable ENERGY_CAPACITY = new QuadraticScalable(CapacitorModifier.ENERGY_CAPACITY, MachinesConfig.COMMON.ENERGY.DRAIN_CAPACITY); + private static final QuadraticScalable ENERGY_USAGE = new QuadraticScalable(CapacitorModifier.ENERGY_USE, MachinesConfig.COMMON.ENERGY.DRAIN_USAGE); + private static final int CAPACITY = 3 * FluidType.BUCKET_VOLUME; + private static final int ENERGY_PER_BUCKET = 16000; //TODO balance + private List positions; + private int currentIndex = 0; + private boolean fluidFound = false; + private int consumed = 0; + + public DrainBlockEntity(BlockEntityType type, + BlockPos worldPosition, BlockState blockState) { + super(EnergyIOMode.Input, ENERGY_CAPACITY, ENERGY_USAGE, type, worldPosition, blockState); + addDataSlot(new FluidStackNetworkDataSlot(getFluidTankNN()::getFluid, getFluidTankNN()::setFluid)); + } + + @Override + public @Nullable MachineInventoryLayout getInventoryLayout() { + return MachineInventoryLayout.builder() + .capacitor() + .build(); + } + + @Override + public void serverTick() { + if (isActive()) { + drainFluids(); + } + + super.serverTick(); + } + + @Override + protected boolean isActive() { + if (!canAct()) { + return false; + } + FluidState fluidState = level.getFluidState(worldPosition.below()); + if (fluidState.isEmpty() || !fluidState.isSource()) { + return false; + } + return getFluidTankNN().fill(new FluidStack(fluidState.getType(), FluidType.BUCKET_VOLUME), IFluidHandler.FluidAction.SIMULATE) == FluidType.BUCKET_VOLUME; + } + + //TODO logic for ending on the block below the drain. That should be the last one to go. + public void drainFluids() { + for (int i = currentIndex; i < Math.min(currentIndex + 3, positions.size()); i++) { + currentIndex = i; + BlockPos pos = positions.get(i); + + //Skip, as this is the last checked block + if (pos.equals(worldPosition.below())) { + continue; + } + + //Last block, so reset + if (currentIndex + 1 == positions.size()) { + if (!fluidFound) { + pos = worldPosition.below(); //No fluids found, so consume the last block under the drain + } + currentIndex = 0; + fluidFound = false; + } + + //Not a valid fluid + FluidState fluidState = level.getFluidState(pos); + if (fluidState.isEmpty() || !fluidState.isSource() || getFluidTankNN().getFluid().getFluid().isSame(fluidState.getType())) { + continue; + } + + //Fluid found, try to consume it + fluidFound = true; + if (getFluidTankNN().fill(new FluidStack(fluidState.getType(), FluidType.BUCKET_VOLUME), IFluidHandler.FluidAction.SIMULATE) == FluidType.BUCKET_VOLUME) { + if (consumed == ENERGY_PER_BUCKET) { + level.setBlock(pos, Blocks.AIR.defaultBlockState(), Block.UPDATE_ALL); + getFluidTankNN().fill(new FluidStack(fluidState.getType(), FluidType.BUCKET_VOLUME), IFluidHandler.FluidAction.EXECUTE); + consumed = 0; + } else { + consumed += getEnergyStorage().consumeEnergy(ENERGY_PER_BUCKET-consumed, false); + } + } + } + } + + @Override + public void onLoad() { + super.onLoad(); + positions = new ArrayList<>(); + for (BlockPos pos : BlockPos.betweenClosed(worldPosition.offset(-10,-21,-10), worldPosition.offset(10,-1,10))) { + positions.add(pos.immutable()); //Need to make it immutable + } + } + + @Override + protected @Nullable FluidTank createFluidTank() { + return new MachineFluidTank(CAPACITY, this); + } + + @Nullable + @Override + public AbstractContainerMenu createMenu(int containerId, Inventory playerInventory, Player player) { + return new DrainMenu(this, playerInventory, containerId); + } + + @Override + public void saveAdditional(CompoundTag pTag) { + super.saveAdditional(pTag); + pTag.putInt(CONSUMED, consumed); + } + + @Override + public void load(CompoundTag pTag) { + super.load(pTag); + consumed = pTag.getInt(CONSUMED); + } +} diff --git a/src/machines/java/com/enderio/machines/common/config/common/EnergyConfig.java b/src/machines/java/com/enderio/machines/common/config/common/EnergyConfig.java index e16959c3ba..dfb101c2bd 100644 --- a/src/machines/java/com/enderio/machines/common/config/common/EnergyConfig.java +++ b/src/machines/java/com/enderio/machines/common/config/common/EnergyConfig.java @@ -29,6 +29,8 @@ public class EnergyConfig { public final ForgeConfigSpec.ConfigValue VIBRANT_SOLAR_PANEL_MAX_PRODUCTION; public final ForgeConfigSpec.ConfigValue WIRED_CHARGER_CAPACITY; public final ForgeConfigSpec.ConfigValue WIRED_CHARGER_USAGE; + public final ForgeConfigSpec.ConfigValue DRAIN_CAPACITY; + public final ForgeConfigSpec.ConfigValue DRAIN_USAGE; public EnergyConfig(ForgeConfigSpec.Builder builder) { builder.push("energy"); @@ -94,6 +96,11 @@ public EnergyConfig(ForgeConfigSpec.Builder builder) { WIRED_CHARGER_USAGE = builder.comment("The base energy consumption in uI/t.").defineInRange("usage", 100, 1, Integer.MAX_VALUE); builder.pop(); + builder.push("drain"); + DRAIN_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 1000000, 1, Integer.MAX_VALUE); + DRAIN_USAGE = builder.comment("The base energy consumption in uI/t.").defineInRange("usage", 100, 1, Integer.MAX_VALUE); + builder.pop(); + builder.pop(); } } diff --git a/src/machines/java/com/enderio/machines/common/init/MachineBlockEntities.java b/src/machines/java/com/enderio/machines/common/init/MachineBlockEntities.java index b6062d646f..136d3dfdaa 100644 --- a/src/machines/java/com/enderio/machines/common/init/MachineBlockEntities.java +++ b/src/machines/java/com/enderio/machines/common/init/MachineBlockEntities.java @@ -53,6 +53,8 @@ public class MachineBlockEntities { public static final BlockEntityEntry CRAFTER = register("crafter", CrafterBlockEntity::new, MachineBlocks.CRAFTER); + public static final BlockEntityEntry DRAIN = register("drain", DrainBlockEntity::new, MachineBlocks.DRAIN); + public static final BlockEntityEntry SOUL_BINDER = register("soul_binder", SoulBinderBlockEntity::new, MachineBlocks.SOUL_BINDER); public static final BlockEntityEntry WIRED_CHARGER = register("wired_charger", diff --git a/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java b/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java index 7aff20f735..f1ef86211d 100644 --- a/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java +++ b/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java @@ -200,6 +200,10 @@ public class MachineBlocks { .blockstate((ctx, prov) -> MachineModelUtil.customMachineBlock(ctx, prov, "crafter")) .register(); + public static final BlockEntry DRAIN = standardMachine("drain", () -> MachineBlockEntities.DRAIN) + .lang("Drain") + .register(); + //used when single methods needs to be overridden in the block class private static BlockBuilder standardMachine(BlockBuilder machineBlock) { return machineBlock diff --git a/src/machines/java/com/enderio/machines/common/init/MachineMenus.java b/src/machines/java/com/enderio/machines/common/init/MachineMenus.java index e800f40a11..8a65311d3e 100644 --- a/src/machines/java/com/enderio/machines/common/init/MachineMenus.java +++ b/src/machines/java/com/enderio/machines/common/init/MachineMenus.java @@ -24,6 +24,7 @@ private MachineMenus() {} public static final MenuEntry VACUUM_CHEST = REGISTRATE.menu("vacuum_chest", VacuumChestMenu::factory, () -> VacuumChestScreen::new).register(); public static final MenuEntry XP_VACUUM = REGISTRATE.menu("xp_vacuum", XPVacuumMenu::factory, () -> XPVacuumScreen::new).register(); public static final MenuEntry CRAFTER = REGISTRATE.menu("crafter", CrafterMenu::factory, () -> CrafterScreen::new).register(); + public static final MenuEntry DRAIN = REGISTRATE.menu("crafter", DrainMenu::factory, () -> DrainScreen::new).register(); public static final MenuEntry WIRED_CHARGER = REGISTRATE.menu("wired_charger", WiredChargerMenu::factory, () -> WiredChargerScreen::new).register(); public static final MenuEntry PAINTING_MACHINE = REGISTRATE.menu("painting_machine", PaintingMachineMenu::factory, () -> PaintingMachineScreen::new).register(); public static final MenuEntry CAPACITOR_BANK = REGISTRATE.menu("capacitor_bank", CapacitorBankMenu::factory, () -> CapacitorBankScreen::new).register(); diff --git a/src/machines/java/com/enderio/machines/common/menu/DrainMenu.java b/src/machines/java/com/enderio/machines/common/menu/DrainMenu.java new file mode 100644 index 0000000000..fd26fa4d87 --- /dev/null +++ b/src/machines/java/com/enderio/machines/common/menu/DrainMenu.java @@ -0,0 +1,31 @@ +package com.enderio.machines.common.menu; + +import com.enderio.machines.common.blockentity.DrainBlockEntity; +import com.enderio.machines.common.init.MachineMenus; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.inventory.MenuType; +import net.minecraft.world.level.block.entity.BlockEntity; +import org.apache.logging.log4j.LogManager; +import org.jetbrains.annotations.Nullable; + +public class DrainMenu extends MachineMenu { + public DrainMenu(@Nullable DrainBlockEntity blockEntity, Inventory inventory, int pContainerId) { + super(blockEntity, inventory, MachineMenus.DRAIN.get(), pContainerId); + + if (blockEntity != null && blockEntity.requiresCapacitor()) { + addSlot(new MachineSlot(blockEntity.getInventory(), blockEntity.getCapacitorSlot(), 12, 60)); + } + + addInventorySlots(8, 84); + } + + public static DrainMenu factory(@Nullable MenuType pMenuType, int pContainerId, Inventory inventory, + FriendlyByteBuf buf) { + BlockEntity entity = inventory.player.level().getBlockEntity(buf.readBlockPos()); + if (entity instanceof DrainBlockEntity castBlockEntity) + return new DrainMenu(castBlockEntity, inventory, pContainerId); + LogManager.getLogger().warn("couldn't find BlockEntity"); + return new DrainMenu(null, inventory, pContainerId); + } +} diff --git a/src/main/resources/assets/enderio/textures/gui/drain.png b/src/main/resources/assets/enderio/textures/gui/drain.png new file mode 100644 index 0000000000000000000000000000000000000000..e48b87c646896b2ad8102c1ee8acb56f0d47ac4e GIT binary patch literal 1573 zcmbtUZA?>F7=F&}#g?xkC@YLoiBlV44zp|o1J=t{gql$ijJQa!tci-cNQD8@30D&q zhk&S?L4mkrI#^6djTmYayqRBPQ!(9C)IpmLtvD=hb3>iL-nt)Kmu#u-$9vAb=RP^l z$9vEDDBGA38uVfifKWrGJ_lg*$e@@+Q~t)bRW!*<4O!`O7q5v(iq(Fu9;Kzg;>@>8 z0Oc`nF|(!dD_Z1Nr)8x9M|K83DGUGtIt==>r4={s^)E3_DU7NvOd5PWVQWg>nVRo$ z(>^uU{EoG{>i&e%y>GCtTzl+WUG&SjBc4i)HDgsOa|{3lC@! z!a0Aw-M#m4Ff*+}cK%Zkuv86v>LL@7a-jCk)tzZu^g-em%oHxJ7$2|e4aKV*;G$Z{ z0|yCohAh@9fXp!LK&npHP3toziRs8^h?_^MUI9#cK-fe@G}3mWdH}0JT6fA3Mp)ht zthkw>L5&w!aR9_Y+Q3E?PJV}|EL1O%BD+kQ4o?7tjabf0k-%=*e@L~dfFAONJkm}% zZ4U;b!hr@2Fqyv1ole@jW};qof6jT2>S6|S7LeLbUfA6J57c}gm&8%Rpa< zbgQSTH?d0)(0IijDIMtivf!Jhm1w+XKgHBq*Nqs5_w9PogyN37lEo!Xlf_djgtLE= zOazM8#(zBAS^DTOJ}k%4*7KOgWoEaksc)se8ts zNT8{;f;w-_JxKxg%_f@!AMpn+W4>DA#%I$FRl+ zmWGx~|3Bb=)78gI7H(NsO4%|c)^o!CsJ|WawvHbzhKYOd@Q}1}arIIR#hRC`hSx@0|BXduhS13 a2NT9%n Date: Sat, 29 Jul 2023 15:47:17 +0100 Subject: [PATCH 015/154] Initial work, read desc Touched on: - Stirling generator - Photovoltaic modules - Alloy smelter - SAG mill --- ...son => energetic_photovoltaic_module.json} | 18 ++-- ...son => pulsating_photovoltaic_module.json} | 18 ++-- .../blockstates/simple_photovoltaic_cell.json | 79 ------------------ ....json => vibrant_photovoltaic_module.json} | 18 ++-- .../resources/assets/enderio/lang/en_ud.json | 7 +- .../resources/assets/enderio/lang/en_us.json | 7 +- .../advanced_photovoltaic_cell_base.json | 7 -- .../block/basic_photovoltaic_cell_base.json | 7 -- .../block/basic_photovoltaic_cell_side.json | 6 -- .../energetic_photovoltaic_module_base.json | 7 ++ ...energetic_photovoltaic_module_corner.json} | 2 +- ...> energetic_photovoltaic_module_side.json} | 2 +- .../pulsating_photovoltaic_module_base.json | 7 ++ ...pulsating_photovoltaic_module_corner.json} | 2 +- ...> pulsating_photovoltaic_module_side.json} | 2 +- .../block/simple_photovoltaic_cell_base.json | 7 -- .../simple_photovoltaic_cell_corner.json | 6 -- ... => vibrant_photovoltaic_module_base.json} | 0 ...> vibrant_photovoltaic_module_corner.json} | 0 ... => vibrant_photovoltaic_module_side.json} | 0 .../item/advanced_photovoltaic_cell.json | 7 -- .../models/item/basic_photovoltaic_cell.json | 7 -- .../item/energetic_photovoltaic_module.json | 7 ++ .../item/pulsating_photovoltaic_module.json | 7 ++ .../models/item/simple_photovoltaic_cell.json | 7 -- ....json => vibrant_photovoltaic_module.json} | 0 .../advanced_photovoltaic_cell_upgrade.json | 35 -------- .../misc/basic_photovoltaic_cell_upgrade.json | 35 -------- ...son => energetic_photovoltaic_module.json} | 4 +- ...son => pulsating_photovoltaic_module.json} | 6 +- .../misc/vibrant_photovoltaic_cell.json | 35 -------- .../vibrant_photovoltaic_cell_upgrade.json | 35 -------- ....json => vibrant_photovoltaic_module.json} | 6 +- .../blocks/basic_photovoltaic_cell.json | 21 ----- ...son => energetic_photovoltaic_module.json} | 4 +- ...son => pulsating_photovoltaic_module.json} | 4 +- ....json => vibrant_photovoltaic_module.json} | 4 +- .../advanced_photovoltaic_cell_upgrade.json | 33 -------- .../alloy_smelting/clayed_glowstone.json | 2 +- .../recipes/alloy_smelting/clear_glass.json | 2 +- .../clear_glass_d_from_base.json | 2 +- .../clear_glass_d_from_base_alt.json | 2 +- .../clear_glass_d_from_main.json | 2 +- .../clear_glass_d_from_main_alt.json | 2 +- .../clear_glass_e_from_base.json | 2 +- .../clear_glass_e_from_base_alt.json | 2 +- .../clear_glass_e_from_main.json | 2 +- .../clear_glass_e_from_main_alt.json | 2 +- .../conductive_alloy_ingot.json | 2 +- .../alloy_smelting/copper_alloy_ingot.json | 2 +- .../alloy_smelting/dark_steel_ingot.json | 2 +- .../recipes/alloy_smelting/dead_bush.json | 2 +- .../alloy_smelting/end_steel_ingot.json | 2 +- .../alloy_smelting/energetic_alloy_ingot.json | 2 +- .../recipes/alloy_smelting/fused_quartz.json | 2 +- .../alloy_smelting/fused_quartz_alt.json | 2 +- .../fused_quartz_d_from_base.json | 2 +- .../fused_quartz_d_from_base_alt.json | 2 +- .../fused_quartz_d_from_main.json | 2 +- .../fused_quartz_d_from_main_alt.json | 2 +- .../fused_quartz_d_from_storage.json | 2 +- .../fused_quartz_d_from_storage_alt.json | 2 +- .../fused_quartz_e_from_base.json | 2 +- .../fused_quartz_e_from_base_alt.json | 2 +- .../fused_quartz_e_from_main.json | 2 +- .../fused_quartz_e_from_main_alt.json | 2 +- .../fused_quartz_e_from_storage.json | 2 +- .../fused_quartz_e_from_storage_alt.json | 2 +- .../industrial_insulation_block.json | 2 +- .../recipes/alloy_smelting/nethercotta.json | 2 +- .../alloy_smelting/organic_brown_dye.json | 28 +++++++ .../organic_brown_dye_double.json | 29 +++++++ .../alloy_smelting/organic_green_dye.json | 28 +++++++ .../organic_green_dye_double.json | 29 +++++++ .../alloy_smelting/photovoltaic_plate.json | 2 +- .../alloy_smelting/pulsating_alloy_ingot.json | 2 +- .../alloy_smelting/redstone_alloy_ingot.json | 2 +- .../alloy_smelting/soularium_ingot.json | 2 +- .../alloy_smelting/vibrant_alloy_ingot.json | 2 +- .../basic_photovoltaic_cell_upgrade.json | 30 ------- ...son => energetic_photovoltaic_module.json} | 2 +- ...son => pulsating_photovoltaic_module.json} | 11 ++- .../recipes/simple_photovoltaic_cell.json | 30 ------- .../vibrant_photovoltaic_cell_upgrade.json | 30 ------- ....json => vibrant_photovoltaic_module.json} | 15 ++-- .../tags/blocks/mineable/pickaxe.json | 7 +- .../com/enderio/machines/EIOMachines.java | 33 ++++++++ .../PrimitiveAlloySmelterBlockEntity.java | 2 +- .../StirlingGeneratorBlockEntity.java | 4 +- .../blockentity/solar/SolarPanelTier.java | 5 +- .../common/config/common/EnergyConfig.java | 37 ++++---- .../machines/common/init/MachineBlocks.java | 2 +- .../vanilla/VanillaAlloySmeltingRecipe.java | 7 +- .../data/recipes/AlloyRecipeProvider.java | 43 +++++----- .../data/recipes/MachineRecipeProvider.java | 76 ++++------------- .../data/recipes/SagMillRecipeProvider.java | 2 +- .../{basic_side.png => energetic_side.png} | Bin .../{basic_top.png => energetic_top.png} | Bin .../{advanced_side.png => pulsating_side.png} | Bin .../{advanced_top.png => pulsating_top.png} | Bin .../enderio/textures/block/simple_side.png | Bin 109 -> 0 bytes .../enderio/textures/block/simple_top.png | Bin 2286 -> 0 bytes 102 files changed, 351 insertions(+), 632 deletions(-) rename src/generated/resources/assets/enderio/blockstates/{advanced_photovoltaic_cell.json => energetic_photovoltaic_module.json} (58%) rename src/generated/resources/assets/enderio/blockstates/{basic_photovoltaic_cell.json => pulsating_photovoltaic_module.json} (58%) delete mode 100644 src/generated/resources/assets/enderio/blockstates/simple_photovoltaic_cell.json rename src/generated/resources/assets/enderio/blockstates/{vibrant_photovoltaic_cell.json => vibrant_photovoltaic_module.json} (59%) delete mode 100644 src/generated/resources/assets/enderio/models/block/advanced_photovoltaic_cell_base.json delete mode 100644 src/generated/resources/assets/enderio/models/block/basic_photovoltaic_cell_base.json delete mode 100644 src/generated/resources/assets/enderio/models/block/basic_photovoltaic_cell_side.json create mode 100644 src/generated/resources/assets/enderio/models/block/energetic_photovoltaic_module_base.json rename src/generated/resources/assets/enderio/models/block/{basic_photovoltaic_cell_corner.json => energetic_photovoltaic_module_corner.json} (64%) rename src/generated/resources/assets/enderio/models/block/{simple_photovoltaic_cell_side.json => energetic_photovoltaic_module_side.json} (63%) create mode 100644 src/generated/resources/assets/enderio/models/block/pulsating_photovoltaic_module_base.json rename src/generated/resources/assets/enderio/models/block/{advanced_photovoltaic_cell_corner.json => pulsating_photovoltaic_module_corner.json} (64%) rename src/generated/resources/assets/enderio/models/block/{advanced_photovoltaic_cell_side.json => pulsating_photovoltaic_module_side.json} (63%) delete mode 100644 src/generated/resources/assets/enderio/models/block/simple_photovoltaic_cell_base.json delete mode 100644 src/generated/resources/assets/enderio/models/block/simple_photovoltaic_cell_corner.json rename src/generated/resources/assets/enderio/models/block/{vibrant_photovoltaic_cell_base.json => vibrant_photovoltaic_module_base.json} (100%) rename src/generated/resources/assets/enderio/models/block/{vibrant_photovoltaic_cell_corner.json => vibrant_photovoltaic_module_corner.json} (100%) rename src/generated/resources/assets/enderio/models/block/{vibrant_photovoltaic_cell_side.json => vibrant_photovoltaic_module_side.json} (100%) delete mode 100644 src/generated/resources/assets/enderio/models/item/advanced_photovoltaic_cell.json delete mode 100644 src/generated/resources/assets/enderio/models/item/basic_photovoltaic_cell.json create mode 100644 src/generated/resources/assets/enderio/models/item/energetic_photovoltaic_module.json create mode 100644 src/generated/resources/assets/enderio/models/item/pulsating_photovoltaic_module.json delete mode 100644 src/generated/resources/assets/enderio/models/item/simple_photovoltaic_cell.json rename src/generated/resources/assets/enderio/models/item/{vibrant_photovoltaic_cell.json => vibrant_photovoltaic_module.json} (100%) delete mode 100644 src/generated/resources/data/enderio/advancements/recipes/misc/advanced_photovoltaic_cell_upgrade.json delete mode 100644 src/generated/resources/data/enderio/advancements/recipes/misc/basic_photovoltaic_cell_upgrade.json rename src/generated/resources/data/enderio/advancements/recipes/misc/{advanced_photovoltaic_cell.json => energetic_photovoltaic_module.json} (84%) rename src/generated/resources/data/enderio/advancements/recipes/misc/{basic_photovoltaic_cell.json => pulsating_photovoltaic_module.json} (76%) delete mode 100644 src/generated/resources/data/enderio/advancements/recipes/misc/vibrant_photovoltaic_cell.json delete mode 100644 src/generated/resources/data/enderio/advancements/recipes/misc/vibrant_photovoltaic_cell_upgrade.json rename src/generated/resources/data/enderio/advancements/recipes/misc/{simple_photovoltaic_cell.json => vibrant_photovoltaic_module.json} (77%) delete mode 100644 src/generated/resources/data/enderio/loot_tables/blocks/basic_photovoltaic_cell.json rename src/generated/resources/data/enderio/loot_tables/blocks/{simple_photovoltaic_cell.json => energetic_photovoltaic_module.json} (70%) rename src/generated/resources/data/enderio/loot_tables/blocks/{vibrant_photovoltaic_cell.json => pulsating_photovoltaic_module.json} (70%) rename src/generated/resources/data/enderio/loot_tables/blocks/{advanced_photovoltaic_cell.json => vibrant_photovoltaic_module.json} (70%) delete mode 100644 src/generated/resources/data/enderio/recipes/advanced_photovoltaic_cell_upgrade.json create mode 100644 src/generated/resources/data/enderio/recipes/alloy_smelting/organic_brown_dye.json create mode 100644 src/generated/resources/data/enderio/recipes/alloy_smelting/organic_brown_dye_double.json create mode 100644 src/generated/resources/data/enderio/recipes/alloy_smelting/organic_green_dye.json create mode 100644 src/generated/resources/data/enderio/recipes/alloy_smelting/organic_green_dye_double.json delete mode 100644 src/generated/resources/data/enderio/recipes/basic_photovoltaic_cell_upgrade.json rename src/generated/resources/data/enderio/recipes/{basic_photovoltaic_cell.json => energetic_photovoltaic_module.json} (90%) rename src/generated/resources/data/enderio/recipes/{advanced_photovoltaic_cell.json => pulsating_photovoltaic_module.json} (70%) delete mode 100644 src/generated/resources/data/enderio/recipes/simple_photovoltaic_cell.json delete mode 100644 src/generated/resources/data/enderio/recipes/vibrant_photovoltaic_cell_upgrade.json rename src/generated/resources/data/enderio/recipes/{vibrant_photovoltaic_cell.json => vibrant_photovoltaic_module.json} (68%) rename src/machines/resources/assets/enderio/textures/block/{basic_side.png => energetic_side.png} (100%) rename src/machines/resources/assets/enderio/textures/block/{basic_top.png => energetic_top.png} (100%) rename src/machines/resources/assets/enderio/textures/block/{advanced_side.png => pulsating_side.png} (100%) rename src/machines/resources/assets/enderio/textures/block/{advanced_top.png => pulsating_top.png} (100%) delete mode 100644 src/machines/resources/assets/enderio/textures/block/simple_side.png delete mode 100644 src/machines/resources/assets/enderio/textures/block/simple_top.png diff --git a/src/generated/resources/assets/enderio/blockstates/advanced_photovoltaic_cell.json b/src/generated/resources/assets/enderio/blockstates/energetic_photovoltaic_module.json similarity index 58% rename from src/generated/resources/assets/enderio/blockstates/advanced_photovoltaic_cell.json rename to src/generated/resources/assets/enderio/blockstates/energetic_photovoltaic_module.json index e309e978cf..7cec00fa7a 100644 --- a/src/generated/resources/assets/enderio/blockstates/advanced_photovoltaic_cell.json +++ b/src/generated/resources/assets/enderio/blockstates/energetic_photovoltaic_module.json @@ -2,12 +2,12 @@ "multipart": [ { "apply": { - "model": "enderio:block/advanced_photovoltaic_cell_base" + "model": "enderio:block/energetic_photovoltaic_module_base" } }, { "apply": { - "model": "enderio:block/advanced_photovoltaic_cell_side" + "model": "enderio:block/energetic_photovoltaic_module_side" }, "when": { "north": "true" @@ -15,7 +15,7 @@ }, { "apply": { - "model": "enderio:block/advanced_photovoltaic_cell_side", + "model": "enderio:block/energetic_photovoltaic_module_side", "y": 90 }, "when": { @@ -24,7 +24,7 @@ }, { "apply": { - "model": "enderio:block/advanced_photovoltaic_cell_side", + "model": "enderio:block/energetic_photovoltaic_module_side", "y": 180 }, "when": { @@ -33,7 +33,7 @@ }, { "apply": { - "model": "enderio:block/advanced_photovoltaic_cell_side", + "model": "enderio:block/energetic_photovoltaic_module_side", "y": 270 }, "when": { @@ -42,7 +42,7 @@ }, { "apply": { - "model": "enderio:block/advanced_photovoltaic_cell_corner" + "model": "enderio:block/energetic_photovoltaic_module_corner" }, "when": { "north_east": "true" @@ -50,7 +50,7 @@ }, { "apply": { - "model": "enderio:block/advanced_photovoltaic_cell_corner", + "model": "enderio:block/energetic_photovoltaic_module_corner", "y": 90 }, "when": { @@ -59,7 +59,7 @@ }, { "apply": { - "model": "enderio:block/advanced_photovoltaic_cell_corner", + "model": "enderio:block/energetic_photovoltaic_module_corner", "y": 180 }, "when": { @@ -68,7 +68,7 @@ }, { "apply": { - "model": "enderio:block/advanced_photovoltaic_cell_corner", + "model": "enderio:block/energetic_photovoltaic_module_corner", "y": 270 }, "when": { diff --git a/src/generated/resources/assets/enderio/blockstates/basic_photovoltaic_cell.json b/src/generated/resources/assets/enderio/blockstates/pulsating_photovoltaic_module.json similarity index 58% rename from src/generated/resources/assets/enderio/blockstates/basic_photovoltaic_cell.json rename to src/generated/resources/assets/enderio/blockstates/pulsating_photovoltaic_module.json index 0b455b51d0..7c57c0838f 100644 --- a/src/generated/resources/assets/enderio/blockstates/basic_photovoltaic_cell.json +++ b/src/generated/resources/assets/enderio/blockstates/pulsating_photovoltaic_module.json @@ -2,12 +2,12 @@ "multipart": [ { "apply": { - "model": "enderio:block/basic_photovoltaic_cell_base" + "model": "enderio:block/pulsating_photovoltaic_module_base" } }, { "apply": { - "model": "enderio:block/basic_photovoltaic_cell_side" + "model": "enderio:block/pulsating_photovoltaic_module_side" }, "when": { "north": "true" @@ -15,7 +15,7 @@ }, { "apply": { - "model": "enderio:block/basic_photovoltaic_cell_side", + "model": "enderio:block/pulsating_photovoltaic_module_side", "y": 90 }, "when": { @@ -24,7 +24,7 @@ }, { "apply": { - "model": "enderio:block/basic_photovoltaic_cell_side", + "model": "enderio:block/pulsating_photovoltaic_module_side", "y": 180 }, "when": { @@ -33,7 +33,7 @@ }, { "apply": { - "model": "enderio:block/basic_photovoltaic_cell_side", + "model": "enderio:block/pulsating_photovoltaic_module_side", "y": 270 }, "when": { @@ -42,7 +42,7 @@ }, { "apply": { - "model": "enderio:block/basic_photovoltaic_cell_corner" + "model": "enderio:block/pulsating_photovoltaic_module_corner" }, "when": { "north_east": "true" @@ -50,7 +50,7 @@ }, { "apply": { - "model": "enderio:block/basic_photovoltaic_cell_corner", + "model": "enderio:block/pulsating_photovoltaic_module_corner", "y": 90 }, "when": { @@ -59,7 +59,7 @@ }, { "apply": { - "model": "enderio:block/basic_photovoltaic_cell_corner", + "model": "enderio:block/pulsating_photovoltaic_module_corner", "y": 180 }, "when": { @@ -68,7 +68,7 @@ }, { "apply": { - "model": "enderio:block/basic_photovoltaic_cell_corner", + "model": "enderio:block/pulsating_photovoltaic_module_corner", "y": 270 }, "when": { diff --git a/src/generated/resources/assets/enderio/blockstates/simple_photovoltaic_cell.json b/src/generated/resources/assets/enderio/blockstates/simple_photovoltaic_cell.json deleted file mode 100644 index 0f53c971ab..0000000000 --- a/src/generated/resources/assets/enderio/blockstates/simple_photovoltaic_cell.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "multipart": [ - { - "apply": { - "model": "enderio:block/simple_photovoltaic_cell_base" - } - }, - { - "apply": { - "model": "enderio:block/simple_photovoltaic_cell_side" - }, - "when": { - "north": "true" - } - }, - { - "apply": { - "model": "enderio:block/simple_photovoltaic_cell_side", - "y": 90 - }, - "when": { - "east": "true" - } - }, - { - "apply": { - "model": "enderio:block/simple_photovoltaic_cell_side", - "y": 180 - }, - "when": { - "south": "true" - } - }, - { - "apply": { - "model": "enderio:block/simple_photovoltaic_cell_side", - "y": 270 - }, - "when": { - "west": "true" - } - }, - { - "apply": { - "model": "enderio:block/simple_photovoltaic_cell_corner" - }, - "when": { - "north_east": "true" - } - }, - { - "apply": { - "model": "enderio:block/simple_photovoltaic_cell_corner", - "y": 90 - }, - "when": { - "south_east": "true" - } - }, - { - "apply": { - "model": "enderio:block/simple_photovoltaic_cell_corner", - "y": 180 - }, - "when": { - "south_west": "true" - } - }, - { - "apply": { - "model": "enderio:block/simple_photovoltaic_cell_corner", - "y": 270 - }, - "when": { - "north_west": "true" - } - } - ] -} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/blockstates/vibrant_photovoltaic_cell.json b/src/generated/resources/assets/enderio/blockstates/vibrant_photovoltaic_module.json similarity index 59% rename from src/generated/resources/assets/enderio/blockstates/vibrant_photovoltaic_cell.json rename to src/generated/resources/assets/enderio/blockstates/vibrant_photovoltaic_module.json index 31f64b86b8..f9a7b4a022 100644 --- a/src/generated/resources/assets/enderio/blockstates/vibrant_photovoltaic_cell.json +++ b/src/generated/resources/assets/enderio/blockstates/vibrant_photovoltaic_module.json @@ -2,12 +2,12 @@ "multipart": [ { "apply": { - "model": "enderio:block/vibrant_photovoltaic_cell_base" + "model": "enderio:block/vibrant_photovoltaic_module_base" } }, { "apply": { - "model": "enderio:block/vibrant_photovoltaic_cell_side" + "model": "enderio:block/vibrant_photovoltaic_module_side" }, "when": { "north": "true" @@ -15,7 +15,7 @@ }, { "apply": { - "model": "enderio:block/vibrant_photovoltaic_cell_side", + "model": "enderio:block/vibrant_photovoltaic_module_side", "y": 90 }, "when": { @@ -24,7 +24,7 @@ }, { "apply": { - "model": "enderio:block/vibrant_photovoltaic_cell_side", + "model": "enderio:block/vibrant_photovoltaic_module_side", "y": 180 }, "when": { @@ -33,7 +33,7 @@ }, { "apply": { - "model": "enderio:block/vibrant_photovoltaic_cell_side", + "model": "enderio:block/vibrant_photovoltaic_module_side", "y": 270 }, "when": { @@ -42,7 +42,7 @@ }, { "apply": { - "model": "enderio:block/vibrant_photovoltaic_cell_corner" + "model": "enderio:block/vibrant_photovoltaic_module_corner" }, "when": { "north_east": "true" @@ -50,7 +50,7 @@ }, { "apply": { - "model": "enderio:block/vibrant_photovoltaic_cell_corner", + "model": "enderio:block/vibrant_photovoltaic_module_corner", "y": 90 }, "when": { @@ -59,7 +59,7 @@ }, { "apply": { - "model": "enderio:block/vibrant_photovoltaic_cell_corner", + "model": "enderio:block/vibrant_photovoltaic_module_corner", "y": 180 }, "when": { @@ -68,7 +68,7 @@ }, { "apply": { - "model": "enderio:block/vibrant_photovoltaic_cell_corner", + "model": "enderio:block/vibrant_photovoltaic_module_corner", "y": 270 }, "when": { diff --git a/src/generated/resources/assets/enderio/lang/en_ud.json b/src/generated/resources/assets/enderio/lang/en_ud.json index 059b77a3eb..8fb0e205be 100644 --- a/src/generated/resources/assets/enderio/lang/en_ud.json +++ b/src/generated/resources/assets/enderio/lang/en_ud.json @@ -8,10 +8,8 @@ "advancements.enderio.use_glider.description": "¿ɹǝɥʇɐǝן ǝɯos ʇsnɹʇ ʎןןɐǝɹ noʎ oᗡ", "advancements.enderio.use_glider.title": "ɔıʇsǝظɐW", "block.enderio.advanced_capacitor_bank": "ʞuɐᗺ ɹoʇıɔɐdɐƆ pǝɔuɐʌpⱯ", - "block.enderio.advanced_photovoltaic_cell": "ןןǝƆ ɔıɐʇןoʌoʇoɥԀ pǝɔuɐʌpⱯ", "block.enderio.alloy_smelter": "ɹǝʇןǝɯS ʎoןןⱯ", "block.enderio.basic_capacitor_bank": "ʞuɐᗺ ɹoʇıɔɐdɐƆ ɔısɐᗺ", - "block.enderio.basic_photovoltaic_cell": "ןןǝƆ ɔıɐʇןoʌoʇoɥԀ ɔısɐᗺ", "block.enderio.clear_glass": "ssɐן⅁ ɹɐǝןƆ", "block.enderio.clear_glass_a": "ssɐן⅁ ɹɐǝןƆ", "block.enderio.clear_glass_a_black": "ssɐן⅁ ɹɐǝןƆ ʞɔɐןᗺ", @@ -389,6 +387,7 @@ "block.enderio.end_steel_block": "ʞɔoןᗺ ןǝǝʇS puƎ", "block.enderio.enderman_head": "pɐǝH uɐɯɹǝpuƎ", "block.enderio.energetic_alloy_block": "ʞɔoןᗺ ʎoןןⱯ ɔıʇǝbɹǝuƎ", + "block.enderio.energetic_photovoltaic_module": "ǝןnpoW ɔıɐʇןoʌoʇoɥԀ ɔıʇǝbɹǝuƎ", "block.enderio.ensouled_chassis": "sıssɐɥƆ pǝןnosuƎ", "block.enderio.fire_water": "ɹǝʇɐM ǝɹıℲ", "block.enderio.fluid_tank": "ʞuɐ⟘ pınןℲ", @@ -776,6 +775,7 @@ "block.enderio.pressurized_fluid_tank": "ʞuɐ⟘ pınןℲ pǝzıɹnssǝɹԀ", "block.enderio.primitive_alloy_smelter": "ɹǝʇןǝɯS ʎoןןⱯ ǝʌıʇıɯıɹԀ", "block.enderio.pulsating_alloy_block": "ʞɔoןᗺ ʎoןןⱯ buıʇɐsןnԀ", + "block.enderio.pulsating_photovoltaic_module": "ǝןnpoW ɔıɐʇןoʌoʇoɥԀ buıʇɐsןnԀ", "block.enderio.redstone_alloy_block": "ʞɔoןᗺ ʎoןןⱯ ǝuoʇspǝᴚ", "block.enderio.reinforced_obsidian_block": "ʞɔoןᗺ uɐıpısqO pǝɔɹoɟuıǝᴚ", "block.enderio.resetting_lever_five": ")spuoɔǝs ϛ( ɹǝʌǝꞀ buıʇʇǝsǝᴚ", @@ -804,7 +804,6 @@ "block.enderio.silent_spruce_pressure_plate": "ǝʇɐןԀ ǝɹnssǝɹԀ ǝɔnɹdS ʇuǝןıS", "block.enderio.silent_stone_pressure_plate": "ǝʇɐןԀ ǝɹnssǝɹԀ ǝuoʇS ʇuǝןıS", "block.enderio.silent_warped_pressure_plate": "ǝʇɐןԀ ǝɹnssǝɹԀ pǝdɹɐM ʇuǝןıS", - "block.enderio.simple_photovoltaic_cell": "ןןǝƆ ɔıɐʇןoʌoʇoɥԀ ǝןdɯıS", "block.enderio.slice_and_splice": "ǝɔıןdS,N,ǝɔıןS", "block.enderio.soul_binder": "ɹǝpuıᗺ ןnoS", "block.enderio.soul_chain": "uıɐɥƆ ןnoS", @@ -815,7 +814,7 @@ "block.enderio.vapor_of_levity": "ʎʇıʌǝꞀ ɟO ɹodɐΛ", "block.enderio.vibrant_alloy_block": "ʞɔoןᗺ ʎoןןⱯ ʇuɐɹqıΛ", "block.enderio.vibrant_capacitor_bank": "ʞuɐᗺ ɹoʇıɔɐdɐƆ ʇuɐɹqıΛ", - "block.enderio.vibrant_photovoltaic_cell": "ןןǝƆ ɔıɐʇןoʌoʇoɥԀ ʇuɐɹqıΛ", + "block.enderio.vibrant_photovoltaic_module": "ǝןnpoW ɔıɐʇןoʌoʇoɥԀ ʇuɐɹqıΛ", "block.enderio.void_chassis": "sıssɐɥƆ pıoΛ", "block.enderio.xp_juice": "ǝɔınſ dX", "block.enderio.xp_vacuum": "ɯnnɔɐΛ dX", diff --git a/src/generated/resources/assets/enderio/lang/en_us.json b/src/generated/resources/assets/enderio/lang/en_us.json index d7fc409805..051fb69da0 100644 --- a/src/generated/resources/assets/enderio/lang/en_us.json +++ b/src/generated/resources/assets/enderio/lang/en_us.json @@ -8,10 +8,8 @@ "advancements.enderio.use_glider.description": "Do you really trust some leather?", "advancements.enderio.use_glider.title": "Majestic", "block.enderio.advanced_capacitor_bank": "Advanced Capacitor Bank", - "block.enderio.advanced_photovoltaic_cell": "Advanced Photovoltaic Cell", "block.enderio.alloy_smelter": "Alloy Smelter", "block.enderio.basic_capacitor_bank": "Basic Capacitor Bank", - "block.enderio.basic_photovoltaic_cell": "Basic Photovoltaic Cell", "block.enderio.clear_glass": "Clear Glass", "block.enderio.clear_glass_a": "Clear Glass", "block.enderio.clear_glass_a_black": "Black Clear Glass", @@ -389,6 +387,7 @@ "block.enderio.end_steel_block": "End Steel Block", "block.enderio.enderman_head": "Enderman Head", "block.enderio.energetic_alloy_block": "Energetic Alloy Block", + "block.enderio.energetic_photovoltaic_module": "Energetic Photovoltaic Module", "block.enderio.ensouled_chassis": "Ensouled Chassis", "block.enderio.fire_water": "Fire Water", "block.enderio.fluid_tank": "Fluid Tank", @@ -776,6 +775,7 @@ "block.enderio.pressurized_fluid_tank": "Pressurized Fluid Tank", "block.enderio.primitive_alloy_smelter": "Primitive Alloy Smelter", "block.enderio.pulsating_alloy_block": "Pulsating Alloy Block", + "block.enderio.pulsating_photovoltaic_module": "Pulsating Photovoltaic Module", "block.enderio.redstone_alloy_block": "Redstone Alloy Block", "block.enderio.reinforced_obsidian_block": "Reinforced Obsidian Block", "block.enderio.resetting_lever_five": "Resetting Lever (5 seconds)", @@ -804,7 +804,6 @@ "block.enderio.silent_spruce_pressure_plate": "Silent Spruce Pressure Plate", "block.enderio.silent_stone_pressure_plate": "Silent Stone Pressure Plate", "block.enderio.silent_warped_pressure_plate": "Silent Warped Pressure Plate", - "block.enderio.simple_photovoltaic_cell": "Simple Photovoltaic Cell", "block.enderio.slice_and_splice": "Slice'N'Splice", "block.enderio.soul_binder": "Soul Binder", "block.enderio.soul_chain": "Soul Chain", @@ -815,7 +814,7 @@ "block.enderio.vapor_of_levity": "Vapor Of Levity", "block.enderio.vibrant_alloy_block": "Vibrant Alloy Block", "block.enderio.vibrant_capacitor_bank": "Vibrant Capacitor Bank", - "block.enderio.vibrant_photovoltaic_cell": "Vibrant Photovoltaic Cell", + "block.enderio.vibrant_photovoltaic_module": "Vibrant Photovoltaic Module", "block.enderio.void_chassis": "Void Chassis", "block.enderio.xp_juice": "Xp Juice", "block.enderio.xp_vacuum": "Xp Vacuum", diff --git a/src/generated/resources/assets/enderio/models/block/advanced_photovoltaic_cell_base.json b/src/generated/resources/assets/enderio/models/block/advanced_photovoltaic_cell_base.json deleted file mode 100644 index 628510a02a..0000000000 --- a/src/generated/resources/assets/enderio/models/block/advanced_photovoltaic_cell_base.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "parent": "enderio:block/photovoltaic_cell_base", - "textures": { - "panel": "enderio:block/advanced_top", - "side": "enderio:block/advanced_side" - } -} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/basic_photovoltaic_cell_base.json b/src/generated/resources/assets/enderio/models/block/basic_photovoltaic_cell_base.json deleted file mode 100644 index f0bbd6ed34..0000000000 --- a/src/generated/resources/assets/enderio/models/block/basic_photovoltaic_cell_base.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "parent": "enderio:block/photovoltaic_cell_base", - "textures": { - "panel": "enderio:block/basic_top", - "side": "enderio:block/basic_side" - } -} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/basic_photovoltaic_cell_side.json b/src/generated/resources/assets/enderio/models/block/basic_photovoltaic_cell_side.json deleted file mode 100644 index a2bc1d2d15..0000000000 --- a/src/generated/resources/assets/enderio/models/block/basic_photovoltaic_cell_side.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "enderio:block/photovoltaic_cell_side", - "textures": { - "side": "enderio:block/basic_side" - } -} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/energetic_photovoltaic_module_base.json b/src/generated/resources/assets/enderio/models/block/energetic_photovoltaic_module_base.json new file mode 100644 index 0000000000..a2ffda7974 --- /dev/null +++ b/src/generated/resources/assets/enderio/models/block/energetic_photovoltaic_module_base.json @@ -0,0 +1,7 @@ +{ + "parent": "enderio:block/photovoltaic_cell_base", + "textures": { + "panel": "enderio:block/energetic_top", + "side": "enderio:block/energetic_side" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/basic_photovoltaic_cell_corner.json b/src/generated/resources/assets/enderio/models/block/energetic_photovoltaic_module_corner.json similarity index 64% rename from src/generated/resources/assets/enderio/models/block/basic_photovoltaic_cell_corner.json rename to src/generated/resources/assets/enderio/models/block/energetic_photovoltaic_module_corner.json index 7bfe507141..a52601ac9c 100644 --- a/src/generated/resources/assets/enderio/models/block/basic_photovoltaic_cell_corner.json +++ b/src/generated/resources/assets/enderio/models/block/energetic_photovoltaic_module_corner.json @@ -1,6 +1,6 @@ { "parent": "enderio:block/photovoltaic_cell_corner", "textures": { - "side": "enderio:block/basic_side" + "side": "enderio:block/energetic_side" } } \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/simple_photovoltaic_cell_side.json b/src/generated/resources/assets/enderio/models/block/energetic_photovoltaic_module_side.json similarity index 63% rename from src/generated/resources/assets/enderio/models/block/simple_photovoltaic_cell_side.json rename to src/generated/resources/assets/enderio/models/block/energetic_photovoltaic_module_side.json index d3d72ef13b..3898f43826 100644 --- a/src/generated/resources/assets/enderio/models/block/simple_photovoltaic_cell_side.json +++ b/src/generated/resources/assets/enderio/models/block/energetic_photovoltaic_module_side.json @@ -1,6 +1,6 @@ { "parent": "enderio:block/photovoltaic_cell_side", "textures": { - "side": "enderio:block/simple_side" + "side": "enderio:block/energetic_side" } } \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/pulsating_photovoltaic_module_base.json b/src/generated/resources/assets/enderio/models/block/pulsating_photovoltaic_module_base.json new file mode 100644 index 0000000000..06fef57e2f --- /dev/null +++ b/src/generated/resources/assets/enderio/models/block/pulsating_photovoltaic_module_base.json @@ -0,0 +1,7 @@ +{ + "parent": "enderio:block/photovoltaic_cell_base", + "textures": { + "panel": "enderio:block/pulsating_top", + "side": "enderio:block/pulsating_side" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/advanced_photovoltaic_cell_corner.json b/src/generated/resources/assets/enderio/models/block/pulsating_photovoltaic_module_corner.json similarity index 64% rename from src/generated/resources/assets/enderio/models/block/advanced_photovoltaic_cell_corner.json rename to src/generated/resources/assets/enderio/models/block/pulsating_photovoltaic_module_corner.json index e3bdb9cd24..970093953c 100644 --- a/src/generated/resources/assets/enderio/models/block/advanced_photovoltaic_cell_corner.json +++ b/src/generated/resources/assets/enderio/models/block/pulsating_photovoltaic_module_corner.json @@ -1,6 +1,6 @@ { "parent": "enderio:block/photovoltaic_cell_corner", "textures": { - "side": "enderio:block/advanced_side" + "side": "enderio:block/pulsating_side" } } \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/advanced_photovoltaic_cell_side.json b/src/generated/resources/assets/enderio/models/block/pulsating_photovoltaic_module_side.json similarity index 63% rename from src/generated/resources/assets/enderio/models/block/advanced_photovoltaic_cell_side.json rename to src/generated/resources/assets/enderio/models/block/pulsating_photovoltaic_module_side.json index 8f6453bb55..1b5b160a04 100644 --- a/src/generated/resources/assets/enderio/models/block/advanced_photovoltaic_cell_side.json +++ b/src/generated/resources/assets/enderio/models/block/pulsating_photovoltaic_module_side.json @@ -1,6 +1,6 @@ { "parent": "enderio:block/photovoltaic_cell_side", "textures": { - "side": "enderio:block/advanced_side" + "side": "enderio:block/pulsating_side" } } \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/simple_photovoltaic_cell_base.json b/src/generated/resources/assets/enderio/models/block/simple_photovoltaic_cell_base.json deleted file mode 100644 index faea69d0f7..0000000000 --- a/src/generated/resources/assets/enderio/models/block/simple_photovoltaic_cell_base.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "parent": "enderio:block/photovoltaic_cell_base", - "textures": { - "panel": "enderio:block/simple_top", - "side": "enderio:block/simple_side" - } -} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/simple_photovoltaic_cell_corner.json b/src/generated/resources/assets/enderio/models/block/simple_photovoltaic_cell_corner.json deleted file mode 100644 index 4354800073..0000000000 --- a/src/generated/resources/assets/enderio/models/block/simple_photovoltaic_cell_corner.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "enderio:block/photovoltaic_cell_corner", - "textures": { - "side": "enderio:block/simple_side" - } -} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/vibrant_photovoltaic_cell_base.json b/src/generated/resources/assets/enderio/models/block/vibrant_photovoltaic_module_base.json similarity index 100% rename from src/generated/resources/assets/enderio/models/block/vibrant_photovoltaic_cell_base.json rename to src/generated/resources/assets/enderio/models/block/vibrant_photovoltaic_module_base.json diff --git a/src/generated/resources/assets/enderio/models/block/vibrant_photovoltaic_cell_corner.json b/src/generated/resources/assets/enderio/models/block/vibrant_photovoltaic_module_corner.json similarity index 100% rename from src/generated/resources/assets/enderio/models/block/vibrant_photovoltaic_cell_corner.json rename to src/generated/resources/assets/enderio/models/block/vibrant_photovoltaic_module_corner.json diff --git a/src/generated/resources/assets/enderio/models/block/vibrant_photovoltaic_cell_side.json b/src/generated/resources/assets/enderio/models/block/vibrant_photovoltaic_module_side.json similarity index 100% rename from src/generated/resources/assets/enderio/models/block/vibrant_photovoltaic_cell_side.json rename to src/generated/resources/assets/enderio/models/block/vibrant_photovoltaic_module_side.json diff --git a/src/generated/resources/assets/enderio/models/item/advanced_photovoltaic_cell.json b/src/generated/resources/assets/enderio/models/item/advanced_photovoltaic_cell.json deleted file mode 100644 index cd4c51cba8..0000000000 --- a/src/generated/resources/assets/enderio/models/item/advanced_photovoltaic_cell.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "parent": "enderio:item/photovoltaic_cell", - "textures": { - "panel": "enderio:block/advanced_top", - "side": "enderio:block/advanced_side" - } -} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/item/basic_photovoltaic_cell.json b/src/generated/resources/assets/enderio/models/item/basic_photovoltaic_cell.json deleted file mode 100644 index 025ed714ef..0000000000 --- a/src/generated/resources/assets/enderio/models/item/basic_photovoltaic_cell.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "parent": "enderio:item/photovoltaic_cell", - "textures": { - "panel": "enderio:block/basic_top", - "side": "enderio:block/basic_side" - } -} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/item/energetic_photovoltaic_module.json b/src/generated/resources/assets/enderio/models/item/energetic_photovoltaic_module.json new file mode 100644 index 0000000000..f5a86d9dba --- /dev/null +++ b/src/generated/resources/assets/enderio/models/item/energetic_photovoltaic_module.json @@ -0,0 +1,7 @@ +{ + "parent": "enderio:item/photovoltaic_cell", + "textures": { + "panel": "enderio:block/energetic_top", + "side": "enderio:block/energetic_side" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/item/pulsating_photovoltaic_module.json b/src/generated/resources/assets/enderio/models/item/pulsating_photovoltaic_module.json new file mode 100644 index 0000000000..75c617e030 --- /dev/null +++ b/src/generated/resources/assets/enderio/models/item/pulsating_photovoltaic_module.json @@ -0,0 +1,7 @@ +{ + "parent": "enderio:item/photovoltaic_cell", + "textures": { + "panel": "enderio:block/pulsating_top", + "side": "enderio:block/pulsating_side" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/item/simple_photovoltaic_cell.json b/src/generated/resources/assets/enderio/models/item/simple_photovoltaic_cell.json deleted file mode 100644 index 1eccbbb8a4..0000000000 --- a/src/generated/resources/assets/enderio/models/item/simple_photovoltaic_cell.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "parent": "enderio:item/photovoltaic_cell", - "textures": { - "panel": "enderio:block/simple_top", - "side": "enderio:block/simple_side" - } -} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/item/vibrant_photovoltaic_cell.json b/src/generated/resources/assets/enderio/models/item/vibrant_photovoltaic_module.json similarity index 100% rename from src/generated/resources/assets/enderio/models/item/vibrant_photovoltaic_cell.json rename to src/generated/resources/assets/enderio/models/item/vibrant_photovoltaic_module.json diff --git a/src/generated/resources/data/enderio/advancements/recipes/misc/advanced_photovoltaic_cell_upgrade.json b/src/generated/resources/data/enderio/advancements/recipes/misc/advanced_photovoltaic_cell_upgrade.json deleted file mode 100644 index cba832156b..0000000000 --- a/src/generated/resources/data/enderio/advancements/recipes/misc/advanced_photovoltaic_cell_upgrade.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "parent": "minecraft:recipes/root", - "criteria": { - "has_ingredient": { - "conditions": { - "items": [ - { - "items": [ - "enderio:basic_photovoltaic_cell" - ] - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "enderio:advanced_photovoltaic_cell_upgrade" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_ingredient", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "enderio:advanced_photovoltaic_cell_upgrade" - ] - }, - "sends_telemetry_event": false -} \ No newline at end of file diff --git a/src/generated/resources/data/enderio/advancements/recipes/misc/basic_photovoltaic_cell_upgrade.json b/src/generated/resources/data/enderio/advancements/recipes/misc/basic_photovoltaic_cell_upgrade.json deleted file mode 100644 index a7b77db5ee..0000000000 --- a/src/generated/resources/data/enderio/advancements/recipes/misc/basic_photovoltaic_cell_upgrade.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "parent": "minecraft:recipes/root", - "criteria": { - "has_ingredient": { - "conditions": { - "items": [ - { - "items": [ - "enderio:simple_photovoltaic_cell" - ] - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "enderio:basic_photovoltaic_cell_upgrade" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_ingredient", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "enderio:basic_photovoltaic_cell_upgrade" - ] - }, - "sends_telemetry_event": false -} \ No newline at end of file diff --git a/src/generated/resources/data/enderio/advancements/recipes/misc/advanced_photovoltaic_cell.json b/src/generated/resources/data/enderio/advancements/recipes/misc/energetic_photovoltaic_module.json similarity index 84% rename from src/generated/resources/data/enderio/advancements/recipes/misc/advanced_photovoltaic_cell.json rename to src/generated/resources/data/enderio/advancements/recipes/misc/energetic_photovoltaic_module.json index 81469465d3..e07def112a 100644 --- a/src/generated/resources/data/enderio/advancements/recipes/misc/advanced_photovoltaic_cell.json +++ b/src/generated/resources/data/enderio/advancements/recipes/misc/energetic_photovoltaic_module.json @@ -15,7 +15,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "enderio:advanced_photovoltaic_cell" + "recipe": "enderio:energetic_photovoltaic_module" }, "trigger": "minecraft:recipe_unlocked" } @@ -28,7 +28,7 @@ ], "rewards": { "recipes": [ - "enderio:advanced_photovoltaic_cell" + "enderio:energetic_photovoltaic_module" ] }, "sends_telemetry_event": false diff --git a/src/generated/resources/data/enderio/advancements/recipes/misc/basic_photovoltaic_cell.json b/src/generated/resources/data/enderio/advancements/recipes/misc/pulsating_photovoltaic_module.json similarity index 76% rename from src/generated/resources/data/enderio/advancements/recipes/misc/basic_photovoltaic_cell.json rename to src/generated/resources/data/enderio/advancements/recipes/misc/pulsating_photovoltaic_module.json index 0e611aa7c2..7a4a1e7642 100644 --- a/src/generated/resources/data/enderio/advancements/recipes/misc/basic_photovoltaic_cell.json +++ b/src/generated/resources/data/enderio/advancements/recipes/misc/pulsating_photovoltaic_module.json @@ -6,7 +6,7 @@ "items": [ { "items": [ - "enderio:photovoltaic_plate" + "enderio:energetic_photovoltaic_module" ] } ] @@ -15,7 +15,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "enderio:basic_photovoltaic_cell" + "recipe": "enderio:pulsating_photovoltaic_module" }, "trigger": "minecraft:recipe_unlocked" } @@ -28,7 +28,7 @@ ], "rewards": { "recipes": [ - "enderio:basic_photovoltaic_cell" + "enderio:pulsating_photovoltaic_module" ] }, "sends_telemetry_event": false diff --git a/src/generated/resources/data/enderio/advancements/recipes/misc/vibrant_photovoltaic_cell.json b/src/generated/resources/data/enderio/advancements/recipes/misc/vibrant_photovoltaic_cell.json deleted file mode 100644 index 0033735e96..0000000000 --- a/src/generated/resources/data/enderio/advancements/recipes/misc/vibrant_photovoltaic_cell.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "parent": "minecraft:recipes/root", - "criteria": { - "has_ingredient": { - "conditions": { - "items": [ - { - "items": [ - "enderio:photovoltaic_plate" - ] - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "enderio:vibrant_photovoltaic_cell" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_ingredient", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "enderio:vibrant_photovoltaic_cell" - ] - }, - "sends_telemetry_event": false -} \ No newline at end of file diff --git a/src/generated/resources/data/enderio/advancements/recipes/misc/vibrant_photovoltaic_cell_upgrade.json b/src/generated/resources/data/enderio/advancements/recipes/misc/vibrant_photovoltaic_cell_upgrade.json deleted file mode 100644 index 76d9b3df39..0000000000 --- a/src/generated/resources/data/enderio/advancements/recipes/misc/vibrant_photovoltaic_cell_upgrade.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "parent": "minecraft:recipes/root", - "criteria": { - "has_ingredient": { - "conditions": { - "items": [ - { - "items": [ - "enderio:advanced_photovoltaic_cell" - ] - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "enderio:vibrant_photovoltaic_cell_upgrade" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_ingredient", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "enderio:vibrant_photovoltaic_cell_upgrade" - ] - }, - "sends_telemetry_event": false -} \ No newline at end of file diff --git a/src/generated/resources/data/enderio/advancements/recipes/misc/simple_photovoltaic_cell.json b/src/generated/resources/data/enderio/advancements/recipes/misc/vibrant_photovoltaic_module.json similarity index 77% rename from src/generated/resources/data/enderio/advancements/recipes/misc/simple_photovoltaic_cell.json rename to src/generated/resources/data/enderio/advancements/recipes/misc/vibrant_photovoltaic_module.json index 7a011a2a3f..b893e22efb 100644 --- a/src/generated/resources/data/enderio/advancements/recipes/misc/simple_photovoltaic_cell.json +++ b/src/generated/resources/data/enderio/advancements/recipes/misc/vibrant_photovoltaic_module.json @@ -6,7 +6,7 @@ "items": [ { "items": [ - "enderio:photovoltaic_plate" + "enderio:pulsating_photovoltaic_module" ] } ] @@ -15,7 +15,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "enderio:simple_photovoltaic_cell" + "recipe": "enderio:vibrant_photovoltaic_module" }, "trigger": "minecraft:recipe_unlocked" } @@ -28,7 +28,7 @@ ], "rewards": { "recipes": [ - "enderio:simple_photovoltaic_cell" + "enderio:vibrant_photovoltaic_module" ] }, "sends_telemetry_event": false diff --git a/src/generated/resources/data/enderio/loot_tables/blocks/basic_photovoltaic_cell.json b/src/generated/resources/data/enderio/loot_tables/blocks/basic_photovoltaic_cell.json deleted file mode 100644 index a257b7e583..0000000000 --- a/src/generated/resources/data/enderio/loot_tables/blocks/basic_photovoltaic_cell.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "bonus_rolls": 0.0, - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ], - "entries": [ - { - "type": "minecraft:item", - "name": "enderio:basic_photovoltaic_cell" - } - ], - "rolls": 1.0 - } - ], - "random_sequence": "enderio:blocks/basic_photovoltaic_cell" -} \ No newline at end of file diff --git a/src/generated/resources/data/enderio/loot_tables/blocks/simple_photovoltaic_cell.json b/src/generated/resources/data/enderio/loot_tables/blocks/energetic_photovoltaic_module.json similarity index 70% rename from src/generated/resources/data/enderio/loot_tables/blocks/simple_photovoltaic_cell.json rename to src/generated/resources/data/enderio/loot_tables/blocks/energetic_photovoltaic_module.json index e3c83f19ef..56535f85d5 100644 --- a/src/generated/resources/data/enderio/loot_tables/blocks/simple_photovoltaic_cell.json +++ b/src/generated/resources/data/enderio/loot_tables/blocks/energetic_photovoltaic_module.json @@ -11,11 +11,11 @@ "entries": [ { "type": "minecraft:item", - "name": "enderio:simple_photovoltaic_cell" + "name": "enderio:energetic_photovoltaic_module" } ], "rolls": 1.0 } ], - "random_sequence": "enderio:blocks/simple_photovoltaic_cell" + "random_sequence": "enderio:blocks/energetic_photovoltaic_module" } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/loot_tables/blocks/vibrant_photovoltaic_cell.json b/src/generated/resources/data/enderio/loot_tables/blocks/pulsating_photovoltaic_module.json similarity index 70% rename from src/generated/resources/data/enderio/loot_tables/blocks/vibrant_photovoltaic_cell.json rename to src/generated/resources/data/enderio/loot_tables/blocks/pulsating_photovoltaic_module.json index acb5015f97..80b2260980 100644 --- a/src/generated/resources/data/enderio/loot_tables/blocks/vibrant_photovoltaic_cell.json +++ b/src/generated/resources/data/enderio/loot_tables/blocks/pulsating_photovoltaic_module.json @@ -11,11 +11,11 @@ "entries": [ { "type": "minecraft:item", - "name": "enderio:vibrant_photovoltaic_cell" + "name": "enderio:pulsating_photovoltaic_module" } ], "rolls": 1.0 } ], - "random_sequence": "enderio:blocks/vibrant_photovoltaic_cell" + "random_sequence": "enderio:blocks/pulsating_photovoltaic_module" } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/loot_tables/blocks/advanced_photovoltaic_cell.json b/src/generated/resources/data/enderio/loot_tables/blocks/vibrant_photovoltaic_module.json similarity index 70% rename from src/generated/resources/data/enderio/loot_tables/blocks/advanced_photovoltaic_cell.json rename to src/generated/resources/data/enderio/loot_tables/blocks/vibrant_photovoltaic_module.json index d1fe778967..b68c6bb6d5 100644 --- a/src/generated/resources/data/enderio/loot_tables/blocks/advanced_photovoltaic_cell.json +++ b/src/generated/resources/data/enderio/loot_tables/blocks/vibrant_photovoltaic_module.json @@ -11,11 +11,11 @@ "entries": [ { "type": "minecraft:item", - "name": "enderio:advanced_photovoltaic_cell" + "name": "enderio:vibrant_photovoltaic_module" } ], "rolls": 1.0 } ], - "random_sequence": "enderio:blocks/advanced_photovoltaic_cell" + "random_sequence": "enderio:blocks/vibrant_photovoltaic_module" } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/recipes/advanced_photovoltaic_cell_upgrade.json b/src/generated/resources/data/enderio/recipes/advanced_photovoltaic_cell_upgrade.json deleted file mode 100644 index c262b5f6e6..0000000000 --- a/src/generated/resources/data/enderio/recipes/advanced_photovoltaic_cell_upgrade.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "category": "misc", - "key": { - "C": { - "item": "enderio:basic_capacitor" - }, - "E": { - "item": "enderio:energetic_alloy_ingot" - }, - "F": { - "tag": "enderio:enlighted_fused_quartz" - }, - "I": { - "item": "enderio:pulsating_alloy_ingot" - }, - "P": { - "item": "enderio:powdered_coal" - }, - "S": { - "item": "enderio:basic_photovoltaic_cell" - } - }, - "pattern": [ - "IFI", - "EPE", - "CSC" - ], - "result": { - "item": "enderio:advanced_photovoltaic_cell" - }, - "show_notification": true -} \ No newline at end of file diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/clayed_glowstone.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/clayed_glowstone.json index efbdb8f41b..a4917423b2 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/clayed_glowstone.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/clayed_glowstone.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 5000, + "energy": 3200, "experience": 0.3, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/clear_glass.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/clear_glass.json index 063ef50c85..6abb9c3d68 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/clear_glass.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/clear_glass.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 2500, + "energy": 3200, "experience": 0.3, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/clear_glass_d_from_base.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/clear_glass_d_from_base.json index 778fd3a4db..3912dd868a 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/clear_glass_d_from_base.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/clear_glass_d_from_base.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 1250, + "energy": 1600, "experience": 0.3, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/clear_glass_d_from_base_alt.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/clear_glass_d_from_base_alt.json index a9eea9cd9c..5b3dce61d8 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/clear_glass_d_from_base_alt.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/clear_glass_d_from_base_alt.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 1250, + "energy": 1600, "experience": 0.3, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/clear_glass_d_from_main.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/clear_glass_d_from_main.json index 2e09907a00..89e3c2a1f7 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/clear_glass_d_from_main.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/clear_glass_d_from_main.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 2500, + "energy": 3200, "experience": 0.3, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/clear_glass_d_from_main_alt.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/clear_glass_d_from_main_alt.json index a9e034f9c2..b3babbd6cc 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/clear_glass_d_from_main_alt.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/clear_glass_d_from_main_alt.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 2500, + "energy": 3200, "experience": 0.3, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/clear_glass_e_from_base.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/clear_glass_e_from_base.json index 51ad62096d..b9e39286ea 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/clear_glass_e_from_base.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/clear_glass_e_from_base.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 1250, + "energy": 1600, "experience": 0.3, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/clear_glass_e_from_base_alt.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/clear_glass_e_from_base_alt.json index 6e9b2b6d23..6b13ea5cba 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/clear_glass_e_from_base_alt.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/clear_glass_e_from_base_alt.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 1250, + "energy": 1600, "experience": 0.3, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/clear_glass_e_from_main.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/clear_glass_e_from_main.json index 25b9d99d7f..034ae9f43c 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/clear_glass_e_from_main.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/clear_glass_e_from_main.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 2500, + "energy": 3200, "experience": 0.3, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/clear_glass_e_from_main_alt.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/clear_glass_e_from_main_alt.json index 359b74f9fe..6fdc734f3b 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/clear_glass_e_from_main_alt.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/clear_glass_e_from_main_alt.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 2500, + "energy": 3200, "experience": 0.3, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/conductive_alloy_ingot.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/conductive_alloy_ingot.json index 8d05c83fef..90c053266f 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/conductive_alloy_ingot.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/conductive_alloy_ingot.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 10000, + "energy": 4800, "experience": 0.3, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/copper_alloy_ingot.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/copper_alloy_ingot.json index 281efa70c0..e413286214 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/copper_alloy_ingot.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/copper_alloy_ingot.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 10000, + "energy": 3200, "experience": 0.3, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/dark_steel_ingot.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/dark_steel_ingot.json index a68cb47e05..8bca207cfb 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/dark_steel_ingot.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/dark_steel_ingot.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 20000, + "energy": 6400, "experience": 0.3, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/dead_bush.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/dead_bush.json index 64d5eb5564..b511e92ad9 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/dead_bush.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/dead_bush.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 2000, + "energy": 500, "experience": 0.3, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/end_steel_ingot.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/end_steel_ingot.json index 97155975b4..84eaa2aa1c 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/end_steel_ingot.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/end_steel_ingot.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 20000, + "energy": 6400, "experience": 0.3, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/energetic_alloy_ingot.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/energetic_alloy_ingot.json index 525a3a9502..d0ef890469 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/energetic_alloy_ingot.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/energetic_alloy_ingot.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 10000, + "energy": 4800, "experience": 0.3, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz.json index c5be336932..a25187823b 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 5000, + "energy": 6400, "experience": 0.3, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_alt.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_alt.json index edec43e047..171e01e867 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_alt.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_alt.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 5000, + "energy": 6400, "experience": 0.3, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_d_from_base.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_d_from_base.json index a880dfd5ea..331ed559f9 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_d_from_base.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_d_from_base.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 2500, + "energy": 3200, "experience": 0.3, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_d_from_base_alt.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_d_from_base_alt.json index 2911a107bf..3c634ba06a 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_d_from_base_alt.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_d_from_base_alt.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 2500, + "energy": 3200, "experience": 0.3, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_d_from_main.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_d_from_main.json index 2229e1372d..890dfa5ea8 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_d_from_main.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_d_from_main.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 5000, + "energy": 6400, "experience": 0.3, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_d_from_main_alt.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_d_from_main_alt.json index a8242685f8..00b23e7359 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_d_from_main_alt.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_d_from_main_alt.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 5000, + "energy": 6400, "experience": 0.3, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_d_from_storage.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_d_from_storage.json index 21e44ec261..5f0b79f9ce 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_d_from_storage.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_d_from_storage.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 5000, + "energy": 6400, "experience": 0.3, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_d_from_storage_alt.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_d_from_storage_alt.json index ab44debb4a..decdadd5cd 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_d_from_storage_alt.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_d_from_storage_alt.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 5000, + "energy": 6400, "experience": 0.3, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_e_from_base.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_e_from_base.json index 64ba28a15e..127f8e0d86 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_e_from_base.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_e_from_base.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 2500, + "energy": 3200, "experience": 0.3, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_e_from_base_alt.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_e_from_base_alt.json index c39aeff882..8ab6c20469 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_e_from_base_alt.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_e_from_base_alt.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 2500, + "energy": 3200, "experience": 0.3, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_e_from_main.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_e_from_main.json index e3b2b251a8..b4037c9c20 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_e_from_main.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_e_from_main.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 5000, + "energy": 6400, "experience": 0.3, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_e_from_main_alt.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_e_from_main_alt.json index f3e50cece4..0428d44da3 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_e_from_main_alt.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_e_from_main_alt.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 5000, + "energy": 6400, "experience": 0.3, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_e_from_storage.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_e_from_storage.json index 1675e89f94..27c7a4c545 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_e_from_storage.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_e_from_storage.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 5000, + "energy": 6400, "experience": 0.3, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_e_from_storage_alt.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_e_from_storage_alt.json index 573e94a277..73266c1a7d 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_e_from_storage_alt.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/fused_quartz_e_from_storage_alt.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 5000, + "energy": 6400, "experience": 0.3, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/industrial_insulation_block.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/industrial_insulation_block.json index 4e80f1a52e..c57c1b067e 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/industrial_insulation_block.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/industrial_insulation_block.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 5000, + "energy": 3200, "experience": 0.5, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/nethercotta.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/nethercotta.json index 10a409601b..00d0f2b775 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/nethercotta.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/nethercotta.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 20000, + "energy": 7600, "experience": 0.3, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_brown_dye.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_brown_dye.json new file mode 100644 index 0000000000..b7500f6383 --- /dev/null +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_brown_dye.json @@ -0,0 +1,28 @@ +{ + "type": "enderio:alloy_smelting", + "energy": 1500, + "experience": 0.3, + "inputs": [ + { + "count": 1, + "ingredient": { + "item": "minecraft:brown_dye" + } + }, + { + "count": 1, + "ingredient": { + "item": "minecraft:egg" + } + }, + { + "count": 1, + "ingredient": { + "tag": "forge:dusts/coal" + } + } + ], + "result": { + "item": "enderio:organic_brown_dye" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_brown_dye_double.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_brown_dye_double.json new file mode 100644 index 0000000000..7562ee8291 --- /dev/null +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_brown_dye_double.json @@ -0,0 +1,29 @@ +{ + "type": "enderio:alloy_smelting", + "energy": 2000, + "experience": 0.3, + "inputs": [ + { + "count": 2, + "ingredient": { + "item": "minecraft:brown_dye" + } + }, + { + "count": 1, + "ingredient": { + "tag": "forge:slimeballs" + } + }, + { + "count": 2, + "ingredient": { + "tag": "forge:dusts/coal" + } + } + ], + "result": { + "count": 2, + "item": "enderio:organic_brown_dye" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_green_dye.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_green_dye.json new file mode 100644 index 0000000000..a2b5d7ffe4 --- /dev/null +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_green_dye.json @@ -0,0 +1,28 @@ +{ + "type": "enderio:alloy_smelting", + "energy": 1500, + "experience": 0.3, + "inputs": [ + { + "count": 1, + "ingredient": { + "tag": "forge:dyes/green" + } + }, + { + "count": 1, + "ingredient": { + "item": "minecraft:egg" + } + }, + { + "count": 1, + "ingredient": { + "tag": "forge:dusts/coal" + } + } + ], + "result": { + "item": "enderio:organic_green_dye" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_green_dye_double.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_green_dye_double.json new file mode 100644 index 0000000000..708d2a9210 --- /dev/null +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_green_dye_double.json @@ -0,0 +1,29 @@ +{ + "type": "enderio:alloy_smelting", + "energy": 2000, + "experience": 0.3, + "inputs": [ + { + "count": 2, + "ingredient": { + "tag": "forge:dyes/green" + } + }, + { + "count": 1, + "ingredient": { + "tag": "forge:slimeballs" + } + }, + { + "count": 2, + "ingredient": { + "tag": "forge:dusts/coal" + } + } + ], + "result": { + "count": 2, + "item": "enderio:organic_green_dye" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/photovoltaic_plate.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/photovoltaic_plate.json index 7e6273e6f4..50f7f6660b 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/photovoltaic_plate.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/photovoltaic_plate.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 15000, + "energy": 5600, "experience": 0.3, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/pulsating_alloy_ingot.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/pulsating_alloy_ingot.json index 99259e5b96..a639e44b3a 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/pulsating_alloy_ingot.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/pulsating_alloy_ingot.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 10000, + "energy": 4800, "experience": 0.3, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/redstone_alloy_ingot.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/redstone_alloy_ingot.json index 88ae34435d..312ba0cb2b 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/redstone_alloy_ingot.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/redstone_alloy_ingot.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 10000, + "energy": 3200, "experience": 0.3, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/soularium_ingot.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/soularium_ingot.json index 21a5324bc6..22cccacb64 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/soularium_ingot.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/soularium_ingot.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 10000, + "energy": 5600, "experience": 0.3, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/vibrant_alloy_ingot.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/vibrant_alloy_ingot.json index 8d7aebd8c2..94666ad1dc 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/vibrant_alloy_ingot.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/vibrant_alloy_ingot.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 10000, + "energy": 4800, "experience": 0.3, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/basic_photovoltaic_cell_upgrade.json b/src/generated/resources/data/enderio/recipes/basic_photovoltaic_cell_upgrade.json deleted file mode 100644 index 13af143b75..0000000000 --- a/src/generated/resources/data/enderio/recipes/basic_photovoltaic_cell_upgrade.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "category": "misc", - "key": { - "C": { - "item": "enderio:basic_capacitor" - }, - "D": { - "item": "minecraft:daylight_detector" - }, - "E": { - "item": "enderio:energetic_alloy_ingot" - }, - "F": { - "tag": "enderio:fused_quartz" - }, - "P": { - "item": "enderio:simple_photovoltaic_cell" - } - }, - "pattern": [ - "EFE", - " P ", - "CDC" - ], - "result": { - "item": "enderio:basic_photovoltaic_cell" - }, - "show_notification": true -} \ No newline at end of file diff --git a/src/generated/resources/data/enderio/recipes/basic_photovoltaic_cell.json b/src/generated/resources/data/enderio/recipes/energetic_photovoltaic_module.json similarity index 90% rename from src/generated/resources/data/enderio/recipes/basic_photovoltaic_cell.json rename to src/generated/resources/data/enderio/recipes/energetic_photovoltaic_module.json index b70378ab3d..61a299e660 100644 --- a/src/generated/resources/data/enderio/recipes/basic_photovoltaic_cell.json +++ b/src/generated/resources/data/enderio/recipes/energetic_photovoltaic_module.json @@ -24,7 +24,7 @@ "CDC" ], "result": { - "item": "enderio:basic_photovoltaic_cell" + "item": "enderio:energetic_photovoltaic_module" }, "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/recipes/advanced_photovoltaic_cell.json b/src/generated/resources/data/enderio/recipes/pulsating_photovoltaic_module.json similarity index 70% rename from src/generated/resources/data/enderio/recipes/advanced_photovoltaic_cell.json rename to src/generated/resources/data/enderio/recipes/pulsating_photovoltaic_module.json index e686b5397c..75e9633507 100644 --- a/src/generated/resources/data/enderio/recipes/advanced_photovoltaic_cell.json +++ b/src/generated/resources/data/enderio/recipes/pulsating_photovoltaic_module.json @@ -6,7 +6,7 @@ "item": "enderio:double_layer_capacitor" }, "D": { - "item": "minecraft:daylight_detector" + "item": "enderio:powdered_coal" }, "F": { "tag": "enderio:enlighted_fused_quartz" @@ -16,15 +16,18 @@ }, "P": { "item": "enderio:photovoltaic_plate" + }, + "S": { + "item": "enderio:energetic_photovoltaic_module" } }, "pattern": [ "IFI", - "PPP", - "CDC" + "PDP", + "CSC" ], "result": { - "item": "enderio:advanced_photovoltaic_cell" + "item": "enderio:pulsating_photovoltaic_module" }, "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/recipes/simple_photovoltaic_cell.json b/src/generated/resources/data/enderio/recipes/simple_photovoltaic_cell.json deleted file mode 100644 index 7f40718aad..0000000000 --- a/src/generated/resources/data/enderio/recipes/simple_photovoltaic_cell.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "category": "misc", - "key": { - "C": { - "item": "enderio:copper_alloy_ingot" - }, - "F": { - "tag": "enderio:clear_glass" - }, - "G": { - "item": "enderio:iron_gear" - }, - "I": { - "item": "enderio:grains_of_infinity" - }, - "P": { - "item": "enderio:photovoltaic_plate" - } - }, - "pattern": [ - "CFC", - "PPP", - "IGI" - ], - "result": { - "item": "enderio:simple_photovoltaic_cell" - }, - "show_notification": true -} \ No newline at end of file diff --git a/src/generated/resources/data/enderio/recipes/vibrant_photovoltaic_cell_upgrade.json b/src/generated/resources/data/enderio/recipes/vibrant_photovoltaic_cell_upgrade.json deleted file mode 100644 index 6fdb3829d5..0000000000 --- a/src/generated/resources/data/enderio/recipes/vibrant_photovoltaic_cell_upgrade.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "category": "misc", - "key": { - "C": { - "item": "enderio:double_layer_capacitor" - }, - "F": { - "tag": "enderio:dark_fused_quartz" - }, - "G": { - "item": "minecraft:glowstone" - }, - "I": { - "item": "enderio:vibrant_alloy_ingot" - }, - "P": { - "item": "enderio:advanced_photovoltaic_cell" - } - }, - "pattern": [ - "IFI", - "IGI", - "CPC" - ], - "result": { - "item": "enderio:vibrant_photovoltaic_cell" - }, - "show_notification": true -} \ No newline at end of file diff --git a/src/generated/resources/data/enderio/recipes/vibrant_photovoltaic_cell.json b/src/generated/resources/data/enderio/recipes/vibrant_photovoltaic_module.json similarity index 68% rename from src/generated/resources/data/enderio/recipes/vibrant_photovoltaic_cell.json rename to src/generated/resources/data/enderio/recipes/vibrant_photovoltaic_module.json index 3850d16557..e4ebf9cf41 100644 --- a/src/generated/resources/data/enderio/recipes/vibrant_photovoltaic_cell.json +++ b/src/generated/resources/data/enderio/recipes/vibrant_photovoltaic_module.json @@ -5,26 +5,29 @@ "C": { "item": "enderio:octadic_capacitor" }, - "D": { - "item": "minecraft:daylight_detector" - }, "F": { "tag": "enderio:dark_fused_quartz" }, + "G": { + "item": "minecraft:glowstone" + }, "I": { "item": "enderio:vibrant_alloy_ingot" }, "P": { "item": "enderio:photovoltaic_plate" + }, + "S": { + "item": "enderio:pulsating_photovoltaic_module" } }, "pattern": [ "IFI", - "PPP", - "CDC" + "PGP", + "CSC" ], "result": { - "item": "enderio:vibrant_photovoltaic_cell" + "item": "enderio:vibrant_photovoltaic_module" }, "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json b/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json index 3e54f2931c..43d9ade40c 100644 --- a/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json +++ b/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json @@ -41,10 +41,9 @@ "enderio:stirling_generator", "enderio:sag_mill", "enderio:impulse_hopper", - "enderio:simple_photovoltaic_cell", - "enderio:basic_photovoltaic_cell", - "enderio:advanced_photovoltaic_cell", - "enderio:vibrant_photovoltaic_cell", + "enderio:energetic_photovoltaic_module", + "enderio:pulsating_photovoltaic_module", + "enderio:vibrant_photovoltaic_module", "enderio:basic_capacitor_bank", "enderio:advanced_capacitor_bank", "enderio:vibrant_capacitor_bank", diff --git a/src/machines/java/com/enderio/machines/EIOMachines.java b/src/machines/java/com/enderio/machines/EIOMachines.java index 30bb0c1427..119364593d 100644 --- a/src/machines/java/com/enderio/machines/EIOMachines.java +++ b/src/machines/java/com/enderio/machines/EIOMachines.java @@ -2,6 +2,7 @@ import com.enderio.EnderIO; import com.enderio.base.data.EIODataProvider; +import com.enderio.machines.common.blockentity.solar.SolarPanelTier; import com.enderio.machines.common.config.MachinesConfig; import com.enderio.machines.common.init.*; import com.enderio.machines.common.lang.MachineLang; @@ -13,9 +14,11 @@ import com.enderio.machines.data.tag.MachineEntityTypeTagsProvider; import net.minecraft.Util; import net.minecraft.core.HolderLookup; +import net.minecraft.core.registries.Registries; import net.minecraft.data.DataGenerator; import net.minecraft.data.PackOutput; import net.minecraft.data.registries.VanillaRegistries; +import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.data.ForgeAdvancementProvider; import net.minecraftforge.data.event.GatherDataEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; @@ -23,6 +26,7 @@ import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.config.ModConfig; import net.minecraftforge.fml.event.lifecycle.FMLConstructModEvent; +import net.minecraftforge.registries.MissingMappingsEvent; import java.util.List; import java.util.concurrent.CompletableFuture; @@ -46,6 +50,9 @@ public static void onConstruct(FMLConstructModEvent event) { MachineRecipes.register(); MachineTags.register(); MachineNetwork.networkInit(); + + // Remap + MinecraftForge.EVENT_BUS.addListener(EIOMachines::missingMappings); } @SubscribeEvent @@ -71,4 +78,30 @@ public static void gatherData(GatherDataEvent event) { provider.addSubProvider(event.includeServer(), new ForgeAdvancementProvider(packOutput, event.getLookupProvider(), event.getExistingFileHelper(), List.of(new MachinesAdvancementGenerator()))); } + + public static void missingMappings(MissingMappingsEvent event) { + event.getMappings(Registries.BLOCK, EnderIO.MODID).forEach(mapping -> { + if (mapping.getKey().equals(EnderIO.loc("simple_photovoltaic_cell"))) { + mapping.remap(MachineBlocks.SOLAR_PANELS.get(SolarPanelTier.ENERGETIC).get()); + } else if (mapping.getKey().equals(EnderIO.loc("basic_photovoltaic_cell"))) { + mapping.remap(MachineBlocks.SOLAR_PANELS.get(SolarPanelTier.ENERGETIC).get()); + } else if (mapping.getKey().equals(EnderIO.loc("advanced_photovoltaic_cell"))) { + mapping.remap(MachineBlocks.SOLAR_PANELS.get(SolarPanelTier.PULSATING).get()); + } else if (mapping.getKey().equals(EnderIO.loc("vibrant_photovoltaic_cell"))) { + mapping.remap(MachineBlocks.SOLAR_PANELS.get(SolarPanelTier.VIBRANT).get()); + } + }); + + event.getMappings(Registries.ITEM, EnderIO.MODID).forEach(mapping -> { + if (mapping.getKey().equals(EnderIO.loc("simple_photovoltaic_cell"))) { + mapping.remap(MachineBlocks.SOLAR_PANELS.get(SolarPanelTier.ENERGETIC).get().asItem()); + } else if (mapping.getKey().equals(EnderIO.loc("basic_photovoltaic_cell"))) { + mapping.remap(MachineBlocks.SOLAR_PANELS.get(SolarPanelTier.ENERGETIC).get().asItem()); + } else if (mapping.getKey().equals(EnderIO.loc("advanced_photovoltaic_cell"))) { + mapping.remap(MachineBlocks.SOLAR_PANELS.get(SolarPanelTier.PULSATING).get().asItem()); + } else if (mapping.getKey().equals(EnderIO.loc("vibrant_photovoltaic_cell"))) { + mapping.remap(MachineBlocks.SOLAR_PANELS.get(SolarPanelTier.VIBRANT).get().asItem()); + } + }); + } } diff --git a/src/machines/java/com/enderio/machines/common/blockentity/PrimitiveAlloySmelterBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/PrimitiveAlloySmelterBlockEntity.java index aade9b4586..6c8fe270cd 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/PrimitiveAlloySmelterBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/PrimitiveAlloySmelterBlockEntity.java @@ -171,7 +171,7 @@ public float getBurnProgress() { } public int getBurnToFE() { - return MachinesConfig.COMMON.ENERGY.STIRLING_GENERATOR_PRODUCTION.get(); + return MachinesConfig.COMMON.ENERGY.STIRLING_GENERATOR_PRODUCTION.get() / 4; } @Override diff --git a/src/machines/java/com/enderio/machines/common/blockentity/StirlingGeneratorBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/StirlingGeneratorBlockEntity.java index 4e809e24af..87e6044de3 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/StirlingGeneratorBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/StirlingGeneratorBlockEntity.java @@ -29,7 +29,7 @@ public class StirlingGeneratorBlockEntity extends PoweredMachineBlockEntity { public static final QuadraticScalable CAPACITY = new QuadraticScalable(CapacitorModifier.ENERGY_CAPACITY, MachinesConfig.COMMON.ENERGY.STIRLING_GENERATOR_CAPACITY); // TODO: Capacitor modifiers for efficiency and output rates. - public static final LinearScalable BURN_SPEED = new LinearScalable(CapacitorModifier.FIXED, MachinesConfig.COMMON.ENERGY.STIRLING_GENERATOR_BURN_SPEED); + public static final LinearScalable BURN_SPEED = new LinearScalable(CapacitorModifier.FIXED, () -> 1); public static final LinearScalable GENERATION_SPEED = new LinearScalable(CapacitorModifier.FIXED, MachinesConfig.COMMON.ENERGY.STIRLING_GENERATOR_PRODUCTION); public static final SingleSlotAccess FUEL = new SingleSlotAccess(); @@ -84,7 +84,7 @@ public void serverTick() { int burningTime = ForgeHooks.getBurnTime(fuel, RecipeType.SMELTING); if (burningTime > 0) { - burnTime = burningTime; + burnTime = (int) Math.floor(burningTime * MachinesConfig.COMMON.ENERGY.STIRLING_GENERATOR_BURN_SPEED.get()); burnDuration = burnTime; // Remove the fuel diff --git a/src/machines/java/com/enderio/machines/common/blockentity/solar/SolarPanelTier.java b/src/machines/java/com/enderio/machines/common/blockentity/solar/SolarPanelTier.java index 47cfb1090b..766c056c81 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/solar/SolarPanelTier.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/solar/SolarPanelTier.java @@ -5,9 +5,8 @@ public enum SolarPanelTier implements ISolarPanelTier { - SIMPLE(MachinesConfig.COMMON.ENERGY.SIMPLE_SOLAR_PANEL_MAX_PRODUCTION), - BASIC(MachinesConfig.COMMON.ENERGY.BASIC_SOLAR_PANEL_MAX_PRODUCTION), - ADVANCED(MachinesConfig.COMMON.ENERGY.ADVANCED_SOLAR_PANEL_MAX_PRODUCTION), + ENERGETIC(MachinesConfig.COMMON.ENERGY.ENERGETIC_SOLAR_PANEL_MAX_PRODUCTION), + PULSATING(MachinesConfig.COMMON.ENERGY.PULSATING_SOLAR_PANEL_MAX_PRODUCTION), VIBRANT(MachinesConfig.COMMON.ENERGY.VIBRANT_SOLAR_PANEL_MAX_PRODUCTION); private final ForgeConfigSpec.ConfigValue productionRate; diff --git a/src/machines/java/com/enderio/machines/common/config/common/EnergyConfig.java b/src/machines/java/com/enderio/machines/common/config/common/EnergyConfig.java index 9b17553d5f..9406f632d9 100644 --- a/src/machines/java/com/enderio/machines/common/config/common/EnergyConfig.java +++ b/src/machines/java/com/enderio/machines/common/config/common/EnergyConfig.java @@ -5,6 +5,7 @@ public class EnergyConfig { public final ForgeConfigSpec.ConfigValue ALLOY_SMELTER_CAPACITY; public final ForgeConfigSpec.ConfigValue ALLOY_SMELTER_USAGE; + public final ForgeConfigSpec.ConfigValue ALLOY_SMELTER_VANILLA_ITEM_ENERGY; public final ForgeConfigSpec.ConfigValue CRAFTER_CAPACITY; public final ForgeConfigSpec.ConfigValue CRAFTER_USAGE; public final ForgeConfigSpec.ConfigValue IMPULSE_HOPPER_CAPACITY; @@ -18,22 +19,29 @@ public class EnergyConfig { public final ForgeConfigSpec.ConfigValue SOUL_BINDER_CAPACITY; public final ForgeConfigSpec.ConfigValue SOUL_BINDER_USAGE; public final ForgeConfigSpec.ConfigValue STIRLING_GENERATOR_CAPACITY; - public final ForgeConfigSpec.ConfigValue STIRLING_GENERATOR_BURN_SPEED; + public final ForgeConfigSpec.ConfigValue STIRLING_GENERATOR_BURN_SPEED; public final ForgeConfigSpec.ConfigValue STIRLING_GENERATOR_PRODUCTION; public final ForgeConfigSpec.ConfigValue PAINTING_MACHINE_CAPACITY; public final ForgeConfigSpec.ConfigValue PAINTING_MACHINE_USAGE; public final ForgeConfigSpec.ConfigValue PAINTING_MACHINE_ENERGY_COST; - public final ForgeConfigSpec.ConfigValue SIMPLE_SOLAR_PANEL_MAX_PRODUCTION; - public final ForgeConfigSpec.ConfigValue BASIC_SOLAR_PANEL_MAX_PRODUCTION; - public final ForgeConfigSpec.ConfigValue ADVANCED_SOLAR_PANEL_MAX_PRODUCTION; + public final ForgeConfigSpec.ConfigValue ENERGETIC_SOLAR_PANEL_MAX_PRODUCTION; + public final ForgeConfigSpec.ConfigValue PULSATING_SOLAR_PANEL_MAX_PRODUCTION; public final ForgeConfigSpec.ConfigValue VIBRANT_SOLAR_PANEL_MAX_PRODUCTION; public EnergyConfig(ForgeConfigSpec.Builder builder) { builder.push("energy"); builder.push("alloySmelter"); - ALLOY_SMELTER_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 100000, 1, Integer.MAX_VALUE); - ALLOY_SMELTER_USAGE = builder.comment("The base energy consumption in uI/t.").defineInRange("usage", 30, 1, Integer.MAX_VALUE); + ALLOY_SMELTER_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 64000, 1, Integer.MAX_VALUE); + ALLOY_SMELTER_USAGE = builder.comment("The base energy consumption in uI/t.").defineInRange("usage", 20, 1, Integer.MAX_VALUE); + + // coal burn time = 1600 + // expected burn rate = 0.375 + // coal -> fe/t = 40 + // number of items per coal = 16 + // 1600 * 0.375 * 40 / 16 + ALLOY_SMELTER_VANILLA_ITEM_ENERGY = builder.comment("The amount of energy to consume per vanilla smelting item in uI.") + .defineInRange("vanillaItemEnergy", 1500, 1, Integer.MAX_VALUE); builder.pop(); builder.push("crafter"); @@ -52,8 +60,8 @@ public EnergyConfig(ForgeConfigSpec.Builder builder) { builder.pop(); builder.push("sagMill"); - SAG_MILL_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 100000, 1, Integer.MAX_VALUE); - SAG_MILL_USAGE = builder.comment("The base energy consumption in uI/t.").defineInRange("usage", 30, 1, Integer.MAX_VALUE); + SAG_MILL_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 64000, 1, Integer.MAX_VALUE); + SAG_MILL_USAGE = builder.comment("The base energy consumption in uI/t.").defineInRange("usage", 20, 1, Integer.MAX_VALUE); builder.pop(); builder.push("slicer"); @@ -67,8 +75,8 @@ public EnergyConfig(ForgeConfigSpec.Builder builder) { builder.pop(); builder.push("stirlingGenerator"); - STIRLING_GENERATOR_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 100000, 1, Integer.MAX_VALUE); - STIRLING_GENERATOR_BURN_SPEED = builder.comment("The base number of 'burn ticks' performed per machine tick.").defineInRange("burnSpeed", 1, 1, Integer.MAX_VALUE); + STIRLING_GENERATOR_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 64000, 1, Integer.MAX_VALUE); + STIRLING_GENERATOR_BURN_SPEED = builder.comment("The base number of 'burn ticks' performed per machine tick.").defineInRange("burnSpeed", 0.375, 0.001, Double.MAX_VALUE); STIRLING_GENERATOR_PRODUCTION = builder.comment("The base amount of energy produced in uI/t.").defineInRange("generation", 40, 1, Integer.MAX_VALUE); builder.pop(); @@ -79,12 +87,11 @@ public EnergyConfig(ForgeConfigSpec.Builder builder) { .defineInRange("energyCost", 2000, 1, Integer.MAX_VALUE); builder.pop(); - builder.push("phtovoltaic_cell_rates"); + builder.push("photovoltaicCellRates"); builder.comment("Production rate at midday without rain or thunder"); - SIMPLE_SOLAR_PANEL_MAX_PRODUCTION = builder.defineInRange("simple", 10, 1, Integer.MAX_VALUE); - BASIC_SOLAR_PANEL_MAX_PRODUCTION = builder.defineInRange("basic", 40, 1, Integer.MAX_VALUE); - ADVANCED_SOLAR_PANEL_MAX_PRODUCTION = builder.defineInRange("advanced", 80, 1, Integer.MAX_VALUE); - VIBRANT_SOLAR_PANEL_MAX_PRODUCTION = builder.defineInRange("vibrant", 160, 1, Integer.MAX_VALUE); + ENERGETIC_SOLAR_PANEL_MAX_PRODUCTION = builder.defineInRange("energetic", 4, 1, Integer.MAX_VALUE); + PULSATING_SOLAR_PANEL_MAX_PRODUCTION = builder.defineInRange("pulsating", 16, 1, Integer.MAX_VALUE); + VIBRANT_SOLAR_PANEL_MAX_PRODUCTION = builder.defineInRange("vibrant", 64, 1, Integer.MAX_VALUE); builder.pop(); builder.pop(); diff --git a/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java b/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java index 6111dbbfca..6345f04bfa 100644 --- a/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java +++ b/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java @@ -181,7 +181,7 @@ public class MachineBlocks { public static final Map> SOLAR_PANELS = Util.make(() -> { Map> panels = new HashMap<>(); for (SolarPanelTier tier: SolarPanelTier.values()) { - panels.put(tier, solarPanel(tier.name().toLowerCase(Locale.ROOT) + "_photovoltaic_cell", () -> MachineBlockEntities.SOLAR_PANELS.get(tier), tier).register()); + panels.put(tier, solarPanel(tier.name().toLowerCase(Locale.ROOT) + "_photovoltaic_module", () -> MachineBlockEntities.SOLAR_PANELS.get(tier), tier).register()); } return ImmutableMap.copyOf(panels); }); diff --git a/src/machines/java/com/enderio/machines/common/integrations/vanilla/VanillaAlloySmeltingRecipe.java b/src/machines/java/com/enderio/machines/common/integrations/vanilla/VanillaAlloySmeltingRecipe.java index dba956da55..3759488a5c 100644 --- a/src/machines/java/com/enderio/machines/common/integrations/vanilla/VanillaAlloySmeltingRecipe.java +++ b/src/machines/java/com/enderio/machines/common/integrations/vanilla/VanillaAlloySmeltingRecipe.java @@ -3,6 +3,7 @@ import com.enderio.core.common.recipes.CountedIngredient; import com.enderio.core.common.recipes.OutputStack; import com.enderio.machines.common.blockentity.AlloySmelterBlockEntity; +import com.enderio.machines.common.config.MachinesConfig; import com.enderio.machines.common.recipe.AlloySmeltingRecipe; import net.minecraft.core.RegistryAccess; import net.minecraft.world.item.ItemStack; @@ -16,8 +17,6 @@ import java.util.List; public class VanillaAlloySmeltingRecipe extends AlloySmeltingRecipe { - public static final int RF_PER_ITEM = ForgeHooks.getBurnTime(new ItemStack(Items.COAL, 1), RecipeType.SMELTING) * 10 / 8; - private final SmeltingRecipe vanillaRecipe; public VanillaAlloySmeltingRecipe(SmeltingRecipe vanillaRecipe) { @@ -35,12 +34,12 @@ public List getInputs() { @Override public int getBaseEnergyCost() { - return RF_PER_ITEM; + return MachinesConfig.COMMON.ENERGY.ALLOY_SMELTER_VANILLA_ITEM_ENERGY.get(); } @Override public int getEnergyCost(ContainerWrapper container) { - return RF_PER_ITEM * container.getInputsTaken(); + return MachinesConfig.COMMON.ENERGY.ALLOY_SMELTER_VANILLA_ITEM_ENERGY.get() * container.getInputsTaken(); } @Override diff --git a/src/machines/java/com/enderio/machines/data/recipes/AlloyRecipeProvider.java b/src/machines/java/com/enderio/machines/data/recipes/AlloyRecipeProvider.java index d510597359..f97a21e865 100644 --- a/src/machines/java/com/enderio/machines/data/recipes/AlloyRecipeProvider.java +++ b/src/machines/java/com/enderio/machines/data/recipes/AlloyRecipeProvider.java @@ -43,30 +43,29 @@ protected void buildRecipes(Consumer pFinishedRecipeConsumer) { // region Metal Alloys - // TODO: Re-enable new alloys once we re-apply those changes - build(new ItemStack(EIOItems.ENERGETIC_ALLOY_INGOT.get()), List.of(CountedIngredient.of(Tags.Items.DUSTS_REDSTONE), CountedIngredient.of(Tags.Items.INGOTS_GOLD), CountedIngredient.of(Tags.Items.DUSTS_GLOWSTONE)), 10000, 0.3f, pFinishedRecipeConsumer); - - // TODO: Consider renaming copper alloy to electric alloy or something idk - build(new ItemStack(EIOItems.COPPER_ALLOY_INGOT.get()), List.of(CountedIngredient.of(Tags.Items.INGOTS_COPPER), CountedIngredient.of(EIOTags.Items.SILICON)), 10000, 0.3f, pFinishedRecipeConsumer); - build(new ItemStack(EIOItems.VIBRANT_ALLOY_INGOT.get()), List.of(CountedIngredient.of(EIOItems.ENERGETIC_ALLOY_INGOT.get()), CountedIngredient.of(Tags.Items.ENDER_PEARLS)), 10000, 0.3f, pFinishedRecipeConsumer); - build(new ItemStack(EIOItems.REDSTONE_ALLOY_INGOT.get()), List.of(CountedIngredient.of(Tags.Items.DUSTS_REDSTONE), CountedIngredient.of(EIOTags.Items.SILICON)), 10000, 0.3f, pFinishedRecipeConsumer); - build(new ItemStack(EIOItems.CONDUCTIVE_ALLOY_INGOT.get()), List.of(CountedIngredient.of(EIOItems.COPPER_ALLOY_INGOT.get()), CountedIngredient.of(Tags.Items.INGOTS_IRON), CountedIngredient.of(Tags.Items.DUSTS_REDSTONE)), 10000, 0.3f, pFinishedRecipeConsumer); - build(new ItemStack(EIOItems.PULSATING_ALLOY_INGOT.get()), List.of(CountedIngredient.of(Tags.Items.INGOTS_IRON), CountedIngredient.of(Tags.Items.ENDER_PEARLS)), 10000, 0.3f, pFinishedRecipeConsumer); - build(new ItemStack(EIOItems.DARK_STEEL_INGOT.get()), List.of(CountedIngredient.of(Tags.Items.INGOTS_IRON), CountedIngredient.of(EIOTags.Items.DUSTS_COAL), CountedIngredient.of(Tags.Items.OBSIDIAN)), 20000, 0.3f, pFinishedRecipeConsumer); - build(new ItemStack(EIOItems.SOULARIUM_INGOT.get()), List.of(CountedIngredient.of(Items.SOUL_SAND, Items.SOUL_SOIL), CountedIngredient.of(Tags.Items.INGOTS_GOLD)), 10000, 0.3f, pFinishedRecipeConsumer); - build(new ItemStack(EIOItems.END_STEEL_INGOT.get()), List.of(CountedIngredient.of(Tags.Items.END_STONES), CountedIngredient.of(EIOItems.DARK_STEEL_INGOT.get()), CountedIngredient.of(Tags.Items.OBSIDIAN)), 20000, 0.3f, pFinishedRecipeConsumer); + build(new ItemStack(EIOItems.ENERGETIC_ALLOY_INGOT.get()), List.of(CountedIngredient.of(Tags.Items.DUSTS_REDSTONE), CountedIngredient.of(Tags.Items.INGOTS_GOLD), CountedIngredient.of(Tags.Items.DUSTS_GLOWSTONE)), 4800, 0.3f, pFinishedRecipeConsumer); + build(new ItemStack(EIOItems.COPPER_ALLOY_INGOT.get()), List.of(CountedIngredient.of(Tags.Items.INGOTS_COPPER), CountedIngredient.of(EIOTags.Items.SILICON)), 3200, 0.3f, pFinishedRecipeConsumer); + build(new ItemStack(EIOItems.VIBRANT_ALLOY_INGOT.get()), List.of(CountedIngredient.of(EIOItems.ENERGETIC_ALLOY_INGOT.get()), CountedIngredient.of(Tags.Items.ENDER_PEARLS)), 4800, 0.3f, pFinishedRecipeConsumer); + build(new ItemStack(EIOItems.REDSTONE_ALLOY_INGOT.get()), List.of(CountedIngredient.of(Tags.Items.DUSTS_REDSTONE), CountedIngredient.of(EIOTags.Items.SILICON)), 3200, 0.3f, pFinishedRecipeConsumer); + build(new ItemStack(EIOItems.CONDUCTIVE_ALLOY_INGOT.get()), List.of(CountedIngredient.of(EIOItems.COPPER_ALLOY_INGOT.get()), CountedIngredient.of(Tags.Items.INGOTS_IRON), CountedIngredient.of(Tags.Items.DUSTS_REDSTONE)), 4800, 0.3f, pFinishedRecipeConsumer); + build(new ItemStack(EIOItems.PULSATING_ALLOY_INGOT.get()), List.of(CountedIngredient.of(Tags.Items.INGOTS_IRON), CountedIngredient.of(Tags.Items.ENDER_PEARLS)), 4800, 0.3f, pFinishedRecipeConsumer); + build(new ItemStack(EIOItems.DARK_STEEL_INGOT.get()), List.of(CountedIngredient.of(Tags.Items.INGOTS_IRON), CountedIngredient.of(EIOTags.Items.DUSTS_COAL), CountedIngredient.of(Tags.Items.OBSIDIAN)), 6400, 0.3f, pFinishedRecipeConsumer); + build(new ItemStack(EIOItems.SOULARIUM_INGOT.get()), List.of(CountedIngredient.of(Items.SOUL_SAND, Items.SOUL_SOIL), CountedIngredient.of(Tags.Items.INGOTS_GOLD)), 5600, 0.3f, pFinishedRecipeConsumer); + build(new ItemStack(EIOItems.END_STEEL_INGOT.get()), List.of(CountedIngredient.of(Tags.Items.END_STONES), CountedIngredient.of(EIOItems.DARK_STEEL_INGOT.get()), CountedIngredient.of(Tags.Items.OBSIDIAN)), 6400, 0.3f, pFinishedRecipeConsumer); // endregion + // TODO: Balance below energies: + // region Dyes - //build(new ItemStack(EIOItems.DYE_GREEN.get()), List.of(CountedIngredient.of(Tags.Items.DYES_GREEN), CountedIngredient.of(Items.EGG), CountedIngredient.of(EIOTags.Items.DUSTS_COAL)), 1500, 0.3f, pFinishedRecipeConsumer); - //build(new ItemStack(EIOItems.DYE_GREEN.get(), 2), "double", List.of(CountedIngredient.of(2, Tags.Items.DYES_GREEN), CountedIngredient.of(Tags.Items.SLIMEBALLS), CountedIngredient.of(2, EIOTags.Items.DUSTS_COAL)), 2000, 0.3f, pFinishedRecipeConsumer); + build(new ItemStack(EIOItems.DYE_GREEN.get()), List.of(CountedIngredient.of(Tags.Items.DYES_GREEN), CountedIngredient.of(Items.EGG), CountedIngredient.of(EIOTags.Items.DUSTS_COAL)), 1500, 0.3f, pFinishedRecipeConsumer); + build(new ItemStack(EIOItems.DYE_GREEN.get(), 2), "double", List.of(CountedIngredient.of(2, Tags.Items.DYES_GREEN), CountedIngredient.of(Tags.Items.SLIMEBALLS), CountedIngredient.of(2, EIOTags.Items.DUSTS_COAL)), 2000, 0.3f, pFinishedRecipeConsumer); build(new ItemStack(EIOItems.DYE_GREEN.get()), "clippings", List.of(CountedIngredient.of(6, EIOItems.PLANT_MATTER_GREEN.get()), CountedIngredient.of(Items.EGG)), 1500, 0.3f, pFinishedRecipeConsumer); build(new ItemStack(EIOItems.DYE_GREEN.get(), 2), "double_clippings", List.of(CountedIngredient.of(12, EIOItems.PLANT_MATTER_GREEN.get()), CountedIngredient.of(Tags.Items.SLIMEBALLS)), 2000, 0.3f, pFinishedRecipeConsumer); - //build(new ItemStack(EIOItems.DYE_BROWN.get()), List.of(CountedIngredient.of(Items.BROWN_DYE), CountedIngredient.of(Items.EGG), CountedIngredient.of(EIOTags.Items.DUSTS_COAL)), 1500, 0.3f, pFinishedRecipeConsumer); - //build(new ItemStack(EIOItems.DYE_BROWN.get(), 2), "double", List.of(CountedIngredient.of(2, Items.BROWN_DYE), CountedIngredient.of(Tags.Items.SLIMEBALLS), CountedIngredient.of(2, EIOTags.Items.DUSTS_COAL)), 2000, 0.3f, pFinishedRecipeConsumer); + build(new ItemStack(EIOItems.DYE_BROWN.get()), List.of(CountedIngredient.of(Items.BROWN_DYE), CountedIngredient.of(Items.EGG), CountedIngredient.of(EIOTags.Items.DUSTS_COAL)), 1500, 0.3f, pFinishedRecipeConsumer); + build(new ItemStack(EIOItems.DYE_BROWN.get(), 2), "double", List.of(CountedIngredient.of(2, Items.BROWN_DYE), CountedIngredient.of(Tags.Items.SLIMEBALLS), CountedIngredient.of(2, EIOTags.Items.DUSTS_COAL)), 2000, 0.3f, pFinishedRecipeConsumer); build(new ItemStack(EIOItems.DYE_BROWN.get()), "twigs", List.of(CountedIngredient.of(6, EIOItems.PLANT_MATTER_BROWN.get()), CountedIngredient.of(Items.EGG)), 1500, 0.3f, pFinishedRecipeConsumer); build(new ItemStack(EIOItems.DYE_BROWN.get(), 2), "twigs_double", List.of(CountedIngredient.of(12, EIOItems.PLANT_MATTER_BROWN.get()), CountedIngredient.of(Tags.Items.SLIMEBALLS)), 2000, 0.3f, pFinishedRecipeConsumer); @@ -86,7 +85,7 @@ protected void buildRecipes(Consumer pFinishedRecipeConsumer) { var mainIngredient = identifier.explosion_resistance() ? CountedIngredient.of(4, Tags.Items.GEMS_QUARTZ) : CountedIngredient.of(Tags.Items.GLASS_COLORLESS); @Nullable var altIngredient = identifier.explosion_resistance() ? CountedIngredient.of(Tags.Items.STORAGE_BLOCKS_QUARTZ) : null; - var energy = identifier.explosion_resistance() ? 5000 : 2500; + var energy = identifier.explosion_resistance() ? 6400 : 3200; if (identifier.lighting() == GlassLighting.NONE) { glass(clear, mainIngredient, altIngredient, energy, 0.3f, pFinishedRecipeConsumer); } else { @@ -106,25 +105,25 @@ protected void buildRecipes(Consumer pFinishedRecipeConsumer) { // region Misc - build(new ItemStack(EIOItems.NETHERCOTTA.get()), List.of(CountedIngredient.of(Tags.Items.INGOTS_NETHER_BRICK), CountedIngredient.of(4, Items.NETHER_WART), CountedIngredient.of(6, Items.CLAY_BALL)), 20000, 0.3f, pFinishedRecipeConsumer); + build(new ItemStack(EIOItems.NETHERCOTTA.get()), List.of(CountedIngredient.of(Tags.Items.INGOTS_NETHER_BRICK), CountedIngredient.of(4, Items.NETHER_WART), CountedIngredient.of(6, Items.CLAY_BALL)), 7600, 0.3f, pFinishedRecipeConsumer); build(new ItemStack(EIOItems.CAKE_BASE.get(), 2), List.of(CountedIngredient.of(3, EIOItems.FLOUR.get()), CountedIngredient.of(Items.EGG)), 2000, 0.3f, pFinishedRecipeConsumer); build(new ItemStack(Items.COOKIE, 8), List.of(CountedIngredient.of(EIOItems.FLOUR.get()), CountedIngredient.of(Items.COCOA_BEANS)), 2000, 0.3f, pFinishedRecipeConsumer); - build(new ItemStack(EIOItems.PHOTOVOLTAIC_PLATE.get()), List.of(CountedIngredient.of(3, EIOItems.PHOTOVOLTAIC_COMPOSITE.get())), 15000, 0.3f, pFinishedRecipeConsumer); + build(new ItemStack(EIOItems.PHOTOVOLTAIC_PLATE.get()), List.of(CountedIngredient.of(3, EIOItems.PHOTOVOLTAIC_COMPOSITE.get())), 5600, 0.3f, pFinishedRecipeConsumer); build(new ItemStack(Items.ENDER_PEARL), List.of(CountedIngredient.of(9, EIOTags.Items.DUSTS_ENDER)), 2000, 0.3f, pFinishedRecipeConsumer); // build(new ItemStack(), List.of(EnderIngredient.of(EIOItems.GRAINS_OF_INFINITY.get()), EnderIngredient.of(EIOTags.Items.DUSTS_COAL)), 5000, 0.3f, pFinishedRecipeConsumer); - build(new ItemStack(Items.DEAD_BUSH), List.of(CountedIngredient.of(ItemTags.SAPLINGS)), 2000, 0.3f, pFinishedRecipeConsumer); + build(new ItemStack(Items.DEAD_BUSH), List.of(CountedIngredient.of(ItemTags.SAPLINGS)), 500, 0.3f, pFinishedRecipeConsumer); // build(new ItemStack(EIOItems.DARK_STEEL_UPGRADE_BLANK.get()), List.of(CountedIngredient.of(EIOBlocks.DARK_STEEL_BARS.get()), CountedIngredient.of(Items.CLAY_BALL), CountedIngredient.of(4, Tags.Items.STRING)), 30000, 0.3f, pFinishedRecipeConsumer); - build(new ItemStack(EIOItems.CLAYED_GLOWSTONE.get(), 2), List.of(CountedIngredient.of(Tags.Items.DUSTS_GLOWSTONE), CountedIngredient.of(Items.CLAY_BALL)), 5000, 0.3f, pFinishedRecipeConsumer); + build(new ItemStack(EIOItems.CLAYED_GLOWSTONE.get(), 2), List.of(CountedIngredient.of(Tags.Items.DUSTS_GLOWSTONE), CountedIngredient.of(Items.CLAY_BALL)), 3200, 0.3f, pFinishedRecipeConsumer); - build(new ItemStack(EIOBlocks.INDUSTRIAL_INSULATION.get()), List.of(CountedIngredient.of(EIOTags.Items.DUSTS_LAPIS), CountedIngredient.of(ItemTags.WOOL), CountedIngredient.of(EIOTags.Items.INSULATION_METAL)), 5000, 0.5f, pFinishedRecipeConsumer); + build(new ItemStack(EIOBlocks.INDUSTRIAL_INSULATION.get()), List.of(CountedIngredient.of(EIOTags.Items.DUSTS_LAPIS), CountedIngredient.of(ItemTags.WOOL), CountedIngredient.of(EIOTags.Items.INSULATION_METAL)), 3200, 0.5f, pFinishedRecipeConsumer); // endregion } diff --git a/src/machines/java/com/enderio/machines/data/recipes/MachineRecipeProvider.java b/src/machines/java/com/enderio/machines/data/recipes/MachineRecipeProvider.java index 77b111baa5..a2a8daae9f 100644 --- a/src/machines/java/com/enderio/machines/data/recipes/MachineRecipeProvider.java +++ b/src/machines/java/com/enderio/machines/data/recipes/MachineRecipeProvider.java @@ -255,20 +255,7 @@ protected void buildRecipes(Consumer finishedRecipeConsumer) { .save(finishedRecipeConsumer); ShapedRecipeBuilder - .shaped(RecipeCategory.MISC, MachineBlocks.SOLAR_PANELS.get(SolarPanelTier.SIMPLE)) - .define('C', EIOItems.COPPER_ALLOY_INGOT) - .define('F', EIOTags.Items.CLEAR_GLASS) - .define('P', EIOItems.PHOTOVOLTAIC_PLATE) - .define('I', EIOItems.GRAINS_OF_INFINITY) - .define('G', EIOItems.GEAR_IRON) - .pattern("CFC") - .pattern("PPP") - .pattern("IGI") - .unlockedBy("has_ingredient", InventoryChangeTrigger.TriggerInstance.hasItems(EIOItems.PHOTOVOLTAIC_PLATE.get())) - .save(finishedRecipeConsumer); - - ShapedRecipeBuilder - .shaped(RecipeCategory.MISC, MachineBlocks.SOLAR_PANELS.get(SolarPanelTier.BASIC)) + .shaped(RecipeCategory.MISC, MachineBlocks.SOLAR_PANELS.get(SolarPanelTier.ENERGETIC)) .define('E', EIOItems.ENERGETIC_ALLOY_INGOT) .define('F', EIOTags.Items.FUSED_QUARTZ) .define('P', EIOItems.PHOTOVOLTAIC_PLATE) @@ -279,67 +266,34 @@ protected void buildRecipes(Consumer finishedRecipeConsumer) { .pattern("CDC") .unlockedBy("has_ingredient", InventoryChangeTrigger.TriggerInstance.hasItems(EIOItems.PHOTOVOLTAIC_PLATE.get())) .save(finishedRecipeConsumer); + ShapedRecipeBuilder - .shaped(RecipeCategory.MISC, MachineBlocks.SOLAR_PANELS.get(SolarPanelTier.BASIC)) - .define('E', EIOItems.ENERGETIC_ALLOY_INGOT) - .define('F', EIOTags.Items.FUSED_QUARTZ) - .define('P', MachineBlocks.SOLAR_PANELS.get(SolarPanelTier.SIMPLE)) - .define('C', EIOItems.BASIC_CAPACITOR) - .define('D', Items.DAYLIGHT_DETECTOR) - .pattern("EFE") - .pattern(" P ") - .pattern("CDC") - .unlockedBy("has_ingredient", InventoryChangeTrigger.TriggerInstance.hasItems(MachineBlocks.SOLAR_PANELS.get(SolarPanelTier.SIMPLE))) - .save(finishedRecipeConsumer, EnderIO.loc(RecipeBuilder.getDefaultRecipeId(MachineBlocks.SOLAR_PANELS.get(SolarPanelTier.BASIC)).getPath() + "_upgrade")); - ShapedRecipeBuilder - .shaped(RecipeCategory.MISC, MachineBlocks.SOLAR_PANELS.get(SolarPanelTier.ADVANCED)) + .shaped(RecipeCategory.MISC, MachineBlocks.SOLAR_PANELS.get(SolarPanelTier.PULSATING)) .define('I', EIOItems.PULSATING_ALLOY_INGOT) .define('F', EIOTags.Items.ENLIGHTENED_FUSED_QUARTZ) .define('P', EIOItems.PHOTOVOLTAIC_PLATE) + .define('D', EIOItems.POWDERED_COAL) .define('C', EIOItems.DOUBLE_LAYER_CAPACITOR) - .define('D', Items.DAYLIGHT_DETECTOR) - .pattern("IFI") - .pattern("PPP") - .pattern("CDC") - .unlockedBy("has_ingredient", InventoryChangeTrigger.TriggerInstance.hasItems(EIOItems.PHOTOVOLTAIC_PLATE)) - .save(finishedRecipeConsumer); - ShapedRecipeBuilder - .shaped(RecipeCategory.MISC, MachineBlocks.SOLAR_PANELS.get(SolarPanelTier.ADVANCED)) - .define('I', EIOItems.PULSATING_ALLOY_INGOT) - .define('F', EIOTags.Items.ENLIGHTENED_FUSED_QUARTZ) - .define('E', EIOItems.ENERGETIC_ALLOY_INGOT) - .define('P', EIOItems.POWDERED_COAL) - .define('C', EIOItems.BASIC_CAPACITOR) - .define('S', MachineBlocks.SOLAR_PANELS.get(SolarPanelTier.BASIC)) + .define('S', MachineBlocks.SOLAR_PANELS.get(SolarPanelTier.ENERGETIC)) .pattern("IFI") - .pattern("EPE") + .pattern("PDP") .pattern("CSC") - .unlockedBy("has_ingredient", InventoryChangeTrigger.TriggerInstance.hasItems(MachineBlocks.SOLAR_PANELS.get(SolarPanelTier.BASIC))) - .save(finishedRecipeConsumer, EnderIO.loc(RecipeBuilder.getDefaultRecipeId(MachineBlocks.SOLAR_PANELS.get(SolarPanelTier.ADVANCED)).getPath() + "_upgrade")); + .unlockedBy("has_ingredient", InventoryChangeTrigger.TriggerInstance.hasItems(MachineBlocks.SOLAR_PANELS.get(SolarPanelTier.ENERGETIC))) + .save(finishedRecipeConsumer, EnderIO.loc(RecipeBuilder.getDefaultRecipeId(MachineBlocks.SOLAR_PANELS.get(SolarPanelTier.PULSATING)).getPath())); + ShapedRecipeBuilder .shaped(RecipeCategory.MISC, MachineBlocks.SOLAR_PANELS.get(SolarPanelTier.VIBRANT)) .define('I', EIOItems.VIBRANT_ALLOY_INGOT) .define('F', EIOTags.Items.DARK_FUSED_QUARTZ) .define('P', EIOItems.PHOTOVOLTAIC_PLATE) - .define('C', EIOItems.OCTADIC_CAPACITOR) - .define('D', Items.DAYLIGHT_DETECTOR) - .pattern("IFI") - .pattern("PPP") - .pattern("CDC") - .unlockedBy("has_ingredient", InventoryChangeTrigger.TriggerInstance.hasItems(EIOItems.PHOTOVOLTAIC_PLATE)) - .save(finishedRecipeConsumer); - ShapedRecipeBuilder - .shaped(RecipeCategory.MISC, MachineBlocks.SOLAR_PANELS.get(SolarPanelTier.VIBRANT)) - .define('I', EIOItems.VIBRANT_ALLOY_INGOT) - .define('F', EIOTags.Items.DARK_FUSED_QUARTZ) .define('G', Items.GLOWSTONE) - .define('C', EIOItems.DOUBLE_LAYER_CAPACITOR) - .define('P', MachineBlocks.SOLAR_PANELS.get(SolarPanelTier.ADVANCED)) + .define('C', EIOItems.OCTADIC_CAPACITOR) + .define('S', MachineBlocks.SOLAR_PANELS.get(SolarPanelTier.PULSATING)) .pattern("IFI") - .pattern("IGI") - .pattern("CPC") - .unlockedBy("has_ingredient", InventoryChangeTrigger.TriggerInstance.hasItems(MachineBlocks.SOLAR_PANELS.get(SolarPanelTier.ADVANCED))) - .save(finishedRecipeConsumer, EnderIO.loc(RecipeBuilder.getDefaultRecipeId(MachineBlocks.SOLAR_PANELS.get(SolarPanelTier.VIBRANT)).getPath() + "_upgrade")); + .pattern("PGP") + .pattern("CSC") + .unlockedBy("has_ingredient", InventoryChangeTrigger.TriggerInstance.hasItems(MachineBlocks.SOLAR_PANELS.get(SolarPanelTier.PULSATING))) + .save(finishedRecipeConsumer, EnderIO.loc(RecipeBuilder.getDefaultRecipeId(MachineBlocks.SOLAR_PANELS.get(SolarPanelTier.VIBRANT)).getPath())); ShapedRecipeBuilder .shaped(RecipeCategory.MISC, MachineBlocks.PAINTING_MACHINE.get()) diff --git a/src/machines/java/com/enderio/machines/data/recipes/SagMillRecipeProvider.java b/src/machines/java/com/enderio/machines/data/recipes/SagMillRecipeProvider.java index ab0893b5b9..9975dd8f8e 100644 --- a/src/machines/java/com/enderio/machines/data/recipes/SagMillRecipeProvider.java +++ b/src/machines/java/com/enderio/machines/data/recipes/SagMillRecipeProvider.java @@ -114,7 +114,7 @@ protected void buildRecipes(Consumer finishedRecipeConsumer) { build("lapis_block", Ingredient.of(Tags.Items.STORAGE_BLOCKS_LAPIS), List.of( output(POWDERED_LAPIS_LAZULI.get(), 9) - ), 3600, finishedRecipeConsumer); + ), Math.round(BASE_ENERGY_PER_OPERATION * 1.5f), finishedRecipeConsumer); build("quartz_ore", Ingredient.of(Tags.Items.ORES_QUARTZ), List.of( output(QUARTZ, 2), diff --git a/src/machines/resources/assets/enderio/textures/block/basic_side.png b/src/machines/resources/assets/enderio/textures/block/energetic_side.png similarity index 100% rename from src/machines/resources/assets/enderio/textures/block/basic_side.png rename to src/machines/resources/assets/enderio/textures/block/energetic_side.png diff --git a/src/machines/resources/assets/enderio/textures/block/basic_top.png b/src/machines/resources/assets/enderio/textures/block/energetic_top.png similarity index 100% rename from src/machines/resources/assets/enderio/textures/block/basic_top.png rename to src/machines/resources/assets/enderio/textures/block/energetic_top.png diff --git a/src/machines/resources/assets/enderio/textures/block/advanced_side.png b/src/machines/resources/assets/enderio/textures/block/pulsating_side.png similarity index 100% rename from src/machines/resources/assets/enderio/textures/block/advanced_side.png rename to src/machines/resources/assets/enderio/textures/block/pulsating_side.png diff --git a/src/machines/resources/assets/enderio/textures/block/advanced_top.png b/src/machines/resources/assets/enderio/textures/block/pulsating_top.png similarity index 100% rename from src/machines/resources/assets/enderio/textures/block/advanced_top.png rename to src/machines/resources/assets/enderio/textures/block/pulsating_top.png diff --git a/src/machines/resources/assets/enderio/textures/block/simple_side.png b/src/machines/resources/assets/enderio/textures/block/simple_side.png deleted file mode 100644 index 116a032f6abe3df4b5c543b05c444b74774b96a2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 109 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`CY~;iAr*1SFW$WS$A2i+*483} zL;9HeaUKq4fu*?e~QZ{6F0`WZZ3{an^L HB{Ts5AHpEo diff --git a/src/machines/resources/assets/enderio/textures/block/simple_top.png b/src/machines/resources/assets/enderio/textures/block/simple_top.png deleted file mode 100644 index 6b945c83187f7fc4830d7ac67b19d7507a348aa7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2286 zcmVx7S1IA!L2nlp`OX@@SeV|+F)(y7b?#$oHjmVO)_w9$Egt}E3l}BV& zq@22z(({#+lh+cAED6SztaRu_YMT;wQg|`+Omp*e7|q z{g))~KS&mzPtWu5&ys)qECsAi{6f6Mg*cBFvgl?Mx%*FwTKYyJ*4+p36PGaX<(+^B zgB|Z#e5|F^S1AJ3>^E6Y@`_R#q%+qbaVZt++dJ0N0-hJ7jOP`ghTrh_mCTLqxg1yu zKk-GJ*twF3lvjhSd{2g-;oEnlV0{;gSgk@|?$dv~KR(NNH!z^L@{|GGlX|T*F zf|uV2;GIwjz`)VC5(u$|W?e7L#%g>C1RyZ8)vLPB4fHwoTEb?8$wikkPT|N_&~0>C z28rlAor|3~ljrCk?=NY{OoS>2L(!y%sP1MXJud)ZGVZ7oX&9SChAWO(soS4)eCGdY%l+ zDS0U;Wde6^XRhoPzVr~9KKAQ4G3nrQn=3rVT-mH#d4auw|D>Ua@J}EAbiE@1lu{!f z1%a>Pq%Wo6#iR~&OV9GQsVQC;9a;5#*$hfD0)YX@jVo!{&ON}@(2xL)=x6Q^B7glH zfP|yp4?sc*G~fLg&@h?~Ar0xdr-{YpyS);0O-$3TLvDRw6t$@X0#ieP z$+HiBBd`L2wIM+K*tcZ6Fk}t^36%7mR}dhH11jL{6~?zm<3|F2|NBLD8((%?U$x;~ ztUzEh1A!4-#0*|G^DqE6%^k!ot~pUfsq~OwJ;Z;6Y-a*85f9TE%C90jAn3a??-pd( z%z~(^A*e$qYLMv(s-atmNfUBScT;ufzU&pJMyAQ6IY#Q z@^uj3K{YLJhniwPsYp2RWC`Pw7V5oa$)Z;{=71*-M2A&Fv8sbe3pqss>mvb{Bnh(e zB21Dg>X@~=4dH>nlu3&}&fQ59N!aip9K|?XY|3!acVyhLWeCH)8cML80|{G=GeJHfS0^d0_&wAK;@;ERR@ArLBh6!IF>b*`(Z`PY}m+3zm5#Ar)AJUquL>^ z+p5%{4PF*4HG?i`T}$10kfs||_Y>(yC@2U}f<3fs&JWJh1^Pu^Nz_nz3;{zEp^NB# z=7DB4uze{jff3^R(ljI(V;X0&)CV`F*bwg;FoIHKYgYuQ0OcDkj z^dB0MLK6b=^aM`NP_SDPHTD4vD$Iij<@0sLjjQGaEW6+rSe7TS^i(Sr$M06Y*7@mO z6&mCbX9N9==B4${7S8%-8%7DL4V3hD=79hb=YI*fS`F_6!e55=VM#@3w>%QyGpr}A z*eo4G0B$y|+c8rT37m!$5}$kb2(4kTcy+2o9z5)NWall+Gb4!~D>d9=`7a zZ8jQ|65sFp3DppG%pQM(@DLq5=ld%43qE(WHCNCj8%)9~;>8VGg{b`4HnkT}$6I+b zaGW~V0Gphcvvg^YLc&fugNX4rRJIKX;=3MnfX}G;e4qVB2?A`nnCoPyJW;+baVs^Jc5{N#lZI^{b7Ham1dCLjeW zQiUuIN-6z^!(%YDb%f?P&8e2(H*6!NoOl@~x|1z9=oMvzIe-|l9WP80SB_IMf5-bk z5%&%cgOARdgN)u8iV!B2Vq{QE>gJqMXq>~NgAv`w3ng4y8rX?jn=`!o8;09 z5#r#$8G!^SKq|!`!C~bDmL(I9*{{7GN=HvB0pN5fuDo+Bx@q~oqVcRElEvMSF=IlQ zEOw-cjBdfr4Xhl`=<-FkDC-dnjBz*Qq?<8UGrHM>mgJ%LX41)-F`V~9ymz|Xx>(KC zEGrg5pt%1ik<{&<=CTQFkmZ|+qa{Q!VV$>7ib1cWnZF_dfI5Ea>5MloGByc}&A3HE z6%n2|P;ncGK+>LnAWI9wlQ%K;rhFlER%Lhkd-`&706LAQ5>ZCp>)jU%J^`3N9)!>;M1&07*qo IM6N<$f`e^4od5s; From 11dc47265d80b49326acd5f977b646b5e7a595b3 Mon Sep 17 00:00:00 2001 From: Lemon-Juiced Date: Sun, 30 Jul 2023 14:55:20 -0400 Subject: [PATCH 016/154] Raw Ore Outputs in Sag Mill, corresponding to issue 327 in main repo. --- .../recipes/sagmilling/raw_copper.json | 20 +++++++++++++++++++ .../enderio/recipes/sagmilling/raw_gold.json | 20 +++++++++++++++++++ .../enderio/recipes/sagmilling/raw_iron.json | 20 +++++++++++++++++++ .../data/recipes/SagMillRecipeProvider.java | 19 ++++++++++++++++++ 4 files changed, 79 insertions(+) create mode 100644 src/generated/resources/data/enderio/recipes/sagmilling/raw_copper.json create mode 100644 src/generated/resources/data/enderio/recipes/sagmilling/raw_gold.json create mode 100644 src/generated/resources/data/enderio/recipes/sagmilling/raw_iron.json diff --git a/src/generated/resources/data/enderio/recipes/sagmilling/raw_copper.json b/src/generated/resources/data/enderio/recipes/sagmilling/raw_copper.json new file mode 100644 index 0000000000..d18b778f5f --- /dev/null +++ b/src/generated/resources/data/enderio/recipes/sagmilling/raw_copper.json @@ -0,0 +1,20 @@ +{ + "type": "enderio:sagmilling", + "energy": 2400, + "input": { + "tag": "forge:raw_materials/copper" + }, + "outputs": [ + { + "item": "enderio:powdered_copper" + }, + { + "chance": 0.25, + "item": "enderio:powdered_copper" + }, + { + "chance": 0.12, + "item": "enderio:powdered_gold" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/enderio/recipes/sagmilling/raw_gold.json b/src/generated/resources/data/enderio/recipes/sagmilling/raw_gold.json new file mode 100644 index 0000000000..184fd6cd8d --- /dev/null +++ b/src/generated/resources/data/enderio/recipes/sagmilling/raw_gold.json @@ -0,0 +1,20 @@ +{ + "type": "enderio:sagmilling", + "energy": 2400, + "input": { + "tag": "forge:raw_materials/gold" + }, + "outputs": [ + { + "item": "enderio:powdered_gold" + }, + { + "chance": 0.25, + "item": "enderio:powdered_gold" + }, + { + "chance": 0.2, + "item": "enderio:powdered_copper" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/enderio/recipes/sagmilling/raw_iron.json b/src/generated/resources/data/enderio/recipes/sagmilling/raw_iron.json new file mode 100644 index 0000000000..b8f6696ade --- /dev/null +++ b/src/generated/resources/data/enderio/recipes/sagmilling/raw_iron.json @@ -0,0 +1,20 @@ +{ + "type": "enderio:sagmilling", + "energy": 2400, + "input": { + "tag": "forge:raw_materials/iron" + }, + "outputs": [ + { + "item": "enderio:powdered_iron" + }, + { + "chance": 0.25, + "item": "enderio:powdered_iron" + }, + { + "chance": 0.05, + "item": "enderio:powdered_tin" + } + ] +} \ No newline at end of file diff --git a/src/machines/java/com/enderio/machines/data/recipes/SagMillRecipeProvider.java b/src/machines/java/com/enderio/machines/data/recipes/SagMillRecipeProvider.java index ab0893b5b9..3dfd505fb4 100644 --- a/src/machines/java/com/enderio/machines/data/recipes/SagMillRecipeProvider.java +++ b/src/machines/java/com/enderio/machines/data/recipes/SagMillRecipeProvider.java @@ -69,6 +69,25 @@ protected void buildRecipes(Consumer finishedRecipeConsumer) { build1toN("stone", STONE, COBBLESTONE, 1, finishedRecipeConsumer); + build("raw_iron", Ingredient.of(Tags.Items.RAW_MATERIALS_IRON), List.of( + output(POWDERED_IRON.get(), 1), + output(POWDERED_IRON.get(), .25f), // This number is temporarily being borrowed from Thermal + output(POWDERED_TIN.get(), .05f) // This is borrowed from Ender IO 1.12.2 + // Ideally there would be a line here with a 10% chance for Powdered Nickel + ), BASE_ENERGY_PER_OPERATION, finishedRecipeConsumer); + + build("raw_gold", Ingredient.of(Tags.Items.RAW_MATERIALS_GOLD), List.of( + output(POWDERED_GOLD.get(), 1), + output(POWDERED_GOLD.get(), .25f), // This number is temporarily being borrowed from Thermal + output(POWDERED_COPPER.get(), .2f) // This is borrowed from Ender IO 1.12.2 + ), BASE_ENERGY_PER_OPERATION, finishedRecipeConsumer); + + build("raw_copper", Ingredient.of(Tags.Items.RAW_MATERIALS_COPPER), List.of( + output(POWDERED_COPPER.get(), 1), + output(POWDERED_COPPER.get(), .25f), // This number is temporarily being borrowed from Thermal + output(POWDERED_GOLD.get(), .12f) // This is borrowed from Ender IO 1.12.2 + ), BASE_ENERGY_PER_OPERATION, finishedRecipeConsumer); + build("coal", Ingredient.of(COAL), List.of( output(POWDERED_COAL.get()), output(POWDERED_COAL.get(), 0.1f), From f34c666110d62369a0ba5e483f8ad7d15ed9861e Mon Sep 17 00:00:00 2001 From: mystchonky Date: Mon, 31 Jul 2023 01:13:13 +0530 Subject: [PATCH 017/154] add GUI for travel anchor --- .../client/gui/screen/TravelAnchorScreen.java | 28 ++++++++++++++++++ .../common/block/TravelAnchorBlock.java | 6 ++-- .../blockentity/TravelAnchorBlockEntity.java | 20 +++++++++---- .../machines/common/init/MachineMenus.java | 7 ++++- .../common/menu/TravelAnchorMenu.java | 26 ++++++++++++++++ .../common/item/tool/TravelStaffItem.java | 2 +- ...l_accessable.png => travel_accessible.png} | Bin 7 files changed, 78 insertions(+), 11 deletions(-) create mode 100644 src/machines/java/com/enderio/machines/client/gui/screen/TravelAnchorScreen.java create mode 100644 src/machines/java/com/enderio/machines/common/menu/TravelAnchorMenu.java rename src/main/resources/assets/enderio/textures/gui/{travel_accessable.png => travel_accessible.png} (100%) diff --git a/src/machines/java/com/enderio/machines/client/gui/screen/TravelAnchorScreen.java b/src/machines/java/com/enderio/machines/client/gui/screen/TravelAnchorScreen.java new file mode 100644 index 0000000000..0faf9c8e70 --- /dev/null +++ b/src/machines/java/com/enderio/machines/client/gui/screen/TravelAnchorScreen.java @@ -0,0 +1,28 @@ +package com.enderio.machines.client.gui.screen; + +import com.enderio.EnderIO; +import com.enderio.api.misc.Vector2i; +import com.enderio.core.client.gui.screen.EIOScreen; +import com.enderio.machines.common.menu.TravelAnchorMenu; +import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.player.Inventory; + +public class TravelAnchorScreen extends EIOScreen { + + private static final ResourceLocation TRAVEL_ANCHOR_BG = EnderIO.loc("textures/gui/travel_accessible.png"); + + public TravelAnchorScreen(TravelAnchorMenu pMenu, Inventory pPlayerInventory, Component pTitle) { + super(pMenu, pPlayerInventory, pTitle, false); + } + + @Override + public ResourceLocation getBackgroundImage() { + return TRAVEL_ANCHOR_BG; + } + + @Override + protected Vector2i getBackgroundImageSize() { + return new Vector2i(176, 184); + } +} diff --git a/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java b/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java index 7f138d34b7..9a237ff5e5 100644 --- a/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java +++ b/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java @@ -5,8 +5,6 @@ import net.minecraft.core.BlockPos; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.player.Player; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.EntityBlock; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.event.TickEvent; @@ -19,11 +17,11 @@ import java.util.WeakHashMap; @Mod.EventBusSubscriber -public class TravelAnchorBlock extends Block implements EntityBlock { +public class TravelAnchorBlock extends MachineBlock { private static final WeakHashMap> sneakCache = new WeakHashMap<>(); public TravelAnchorBlock(Properties props) { - super(props); + super(props, MachineBlockEntities.TRAVEL_ANCHOR); } @Nullable diff --git a/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java index 6d2cec818e..e4ac114178 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java @@ -4,6 +4,9 @@ import com.enderio.core.common.network.slot.ResourceLocationNetworkDataSlot; import com.enderio.core.common.network.slot.StringNetworkDataSlot; import com.enderio.machines.common.blockentity.base.MachineBlockEntity; +import com.enderio.machines.common.io.item.MachineInventoryLayout; +import com.enderio.machines.common.io.item.SingleSlotAccess; +import com.enderio.machines.common.menu.TravelAnchorMenu; import com.enderio.machines.common.travel.AnchorTravelTarget; import net.minecraft.core.BlockPos; import net.minecraft.world.entity.player.Inventory; @@ -23,6 +26,7 @@ public class TravelAnchorBlockEntity extends MachineBlockEntity { private String name = ""; private Item icon = Items.AIR; + public static final SingleSlotAccess GHOST = new SingleSlotAccess(); public TravelAnchorBlockEntity(BlockEntityType pType, BlockPos pWorldPosition, BlockState pBlockState) { super(pType, pWorldPosition, pBlockState); @@ -31,6 +35,17 @@ public TravelAnchorBlockEntity(BlockEntityType pType, BlockPos pWorldPosition name = ('a' + new Random().nextInt(26)) + ""; } + @Nullable + @Override + public AbstractContainerMenu createMenu(int containerId, Inventory inventory, Player player) { + return new TravelAnchorMenu(this, inventory, containerId); + } + + @Override + public @Nullable MachineInventoryLayout getInventoryLayout() { + return MachineInventoryLayout.builder().setStackLimit(1).ghostSlot().slotAccess(GHOST).build(); + } + @Nullable public String getName() { return name; @@ -86,9 +101,4 @@ private TravelSavedData getTravelData() { return TravelSavedData.getTravelData(level); } - @Nullable - @Override - public AbstractContainerMenu createMenu(int pContainerId, Inventory pPlayerInventory, Player pPlayer) { - return null; - } } diff --git a/src/machines/java/com/enderio/machines/common/init/MachineMenus.java b/src/machines/java/com/enderio/machines/common/init/MachineMenus.java index e800f40a11..53b840b5bd 100644 --- a/src/machines/java/com/enderio/machines/common/init/MachineMenus.java +++ b/src/machines/java/com/enderio/machines/common/init/MachineMenus.java @@ -26,7 +26,12 @@ private MachineMenus() {} public static final MenuEntry CRAFTER = REGISTRATE.menu("crafter", CrafterMenu::factory, () -> CrafterScreen::new).register(); public static final MenuEntry WIRED_CHARGER = REGISTRATE.menu("wired_charger", WiredChargerMenu::factory, () -> WiredChargerScreen::new).register(); public static final MenuEntry PAINTING_MACHINE = REGISTRATE.menu("painting_machine", PaintingMachineMenu::factory, () -> PaintingMachineScreen::new).register(); - public static final MenuEntry CAPACITOR_BANK = REGISTRATE.menu("capacitor_bank", CapacitorBankMenu::factory, () -> CapacitorBankScreen::new).register(); + public static final MenuEntry CAPACITOR_BANK = REGISTRATE + .menu("capacitor_bank", CapacitorBankMenu::factory, () -> CapacitorBankScreen::new) + .register(); + public static final MenuEntry TRAVEL_ANCHOR = REGISTRATE + .menu("travel_anchor", TravelAnchorMenu::factory, () -> TravelAnchorScreen::new) + .register(); public static void register() {} } diff --git a/src/machines/java/com/enderio/machines/common/menu/TravelAnchorMenu.java b/src/machines/java/com/enderio/machines/common/menu/TravelAnchorMenu.java new file mode 100644 index 0000000000..5dc157caf6 --- /dev/null +++ b/src/machines/java/com/enderio/machines/common/menu/TravelAnchorMenu.java @@ -0,0 +1,26 @@ +package com.enderio.machines.common.menu; + +import com.enderio.machines.common.blockentity.TravelAnchorBlockEntity; +import com.enderio.machines.common.init.MachineMenus; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.inventory.MenuType; +import net.minecraft.world.level.block.entity.BlockEntity; +import org.apache.logging.log4j.LogManager; +import org.jetbrains.annotations.Nullable; + +public class TravelAnchorMenu extends MachineMenu { + public TravelAnchorMenu(@Nullable TravelAnchorBlockEntity blockEntity, Inventory inventory, int pContainerId) { + super(blockEntity, inventory, MachineMenus.TRAVEL_ANCHOR.get(), pContainerId); + addInventorySlots(8, 103); + } + + public static TravelAnchorMenu factory(@Nullable MenuType pMenuType, int pContainerId, Inventory inventory, FriendlyByteBuf buf) { + BlockEntity entity = inventory.player.level().getBlockEntity(buf.readBlockPos()); + if (entity instanceof TravelAnchorBlockEntity castBlockEntity) + return new TravelAnchorMenu(castBlockEntity, inventory, pContainerId); + LogManager.getLogger().warn("couldn't find BlockEntity"); + return new TravelAnchorMenu(null, inventory, pContainerId); + } + +} diff --git a/src/main/java/com/enderio/base/common/item/tool/TravelStaffItem.java b/src/main/java/com/enderio/base/common/item/tool/TravelStaffItem.java index 49f75ff265..b28a881fb9 100644 --- a/src/main/java/com/enderio/base/common/item/tool/TravelStaffItem.java +++ b/src/main/java/com/enderio/base/common/item/tool/TravelStaffItem.java @@ -100,7 +100,7 @@ public void consumeResources(ItemStack stack) { @Override public MultiCapabilityProvider initCapabilities(ItemStack stack, @Nullable CompoundTag nbt, MultiCapabilityProvider provider) { - provider.addSimple(ForgeCapabilities.ENERGY, LazyOptional.of(() -> new EnergyStorageItemStack(stack, getMaxEnergy()))); + provider.add(ForgeCapabilities.ENERGY, LazyOptional.of(() -> new EnergyStorageItemStack(stack, getMaxEnergy()))); return provider; } diff --git a/src/main/resources/assets/enderio/textures/gui/travel_accessable.png b/src/main/resources/assets/enderio/textures/gui/travel_accessible.png similarity index 100% rename from src/main/resources/assets/enderio/textures/gui/travel_accessable.png rename to src/main/resources/assets/enderio/textures/gui/travel_accessible.png From 94033093b1428951022d561d664a599f672c6c13 Mon Sep 17 00:00:00 2001 From: mystchonky Date: Mon, 31 Jul 2023 16:39:12 +0530 Subject: [PATCH 018/154] finished gui --- .../resources/assets/enderio/lang/en_ud.json | 2 + .../resources/assets/enderio/lang/en_us.json | 2 + .../client/gui/screen/TravelAnchorScreen.java | 26 ++++++++- .../travel/TravelAnchorRenderer.java | 2 + .../blockentity/TravelAnchorBlockEntity.java | 53 +++++++++++------- .../common/menu/TravelAnchorMenu.java | 3 + .../common/travel/AnchorTravelTarget.java | 23 ++++++-- .../com/enderio/base/common/lang/EIOLang.java | 11 +++- .../textures/gui/icons/visibility_buttons.png | Bin 0 -> 564 bytes .../enderio/textures/gui/travel_anchor.png | Bin 0 -> 5062 bytes 10 files changed, 93 insertions(+), 29 deletions(-) create mode 100644 src/main/resources/assets/enderio/textures/gui/icons/visibility_buttons.png create mode 100644 src/main/resources/assets/enderio/textures/gui/travel_anchor.png diff --git a/src/generated/resources/assets/enderio/lang/en_ud.json b/src/generated/resources/assets/enderio/lang/en_ud.json index 818581cec3..03dd575e26 100644 --- a/src/generated/resources/assets/enderio/lang/en_ud.json +++ b/src/generated/resources/assets/enderio/lang/en_ud.json @@ -294,6 +294,8 @@ "gui.enderio.spawner.too_many_mob": "sqoɯ ʎuɐɯ oo⟘", "gui.enderio.spawner.too_many_spawner": "sɹǝuʍɐds ʎuɐɯ oo⟘", "gui.enderio.spawner.unknown": "qoɯ uʍouʞu∩", + "gui.enderio.visible.false": "uǝppıH", + "gui.enderio.visible.true": "ǝןqısıΛ", "guidebook.enderio.book_title": "ǝןʇı⟘ ʞooᗺ", "guidebook.enderio.landing_text": "ʇxǝ⟘ buıpuɐꞀ", "hint.enderio.connected_textures.text": "ʇuǝıןɔ ɹnoʎ uo ɐuǝɥʇⱯ ןןɐʇsuı oʇ ʇuɐʍ ʇɥbıɯ noʎ 'ʞuɐq ɹoʇıɔɐdɐɔ ǝɥʇ uo sǝɹnʇxǝʇ pǝʇɔǝuuoɔ ɹoɟ buıʞooן ǝɹɐ noʎ ɟI", diff --git a/src/generated/resources/assets/enderio/lang/en_us.json b/src/generated/resources/assets/enderio/lang/en_us.json index 6456348889..a2a119880c 100644 --- a/src/generated/resources/assets/enderio/lang/en_us.json +++ b/src/generated/resources/assets/enderio/lang/en_us.json @@ -294,6 +294,8 @@ "gui.enderio.spawner.too_many_mob": "Too many mobs", "gui.enderio.spawner.too_many_spawner": "Too many spawners", "gui.enderio.spawner.unknown": "Unknown mob", + "gui.enderio.visible.false": "Hidden", + "gui.enderio.visible.true": "Visible", "guidebook.enderio.book_title": "Book Title", "guidebook.enderio.landing_text": "Landing Text", "hint.enderio.connected_textures.text": "If you are looking for connected textures on the capacitor bank, you might want to install Athena on your client", diff --git a/src/machines/java/com/enderio/machines/client/gui/screen/TravelAnchorScreen.java b/src/machines/java/com/enderio/machines/client/gui/screen/TravelAnchorScreen.java index 0faf9c8e70..13170acafe 100644 --- a/src/machines/java/com/enderio/machines/client/gui/screen/TravelAnchorScreen.java +++ b/src/machines/java/com/enderio/machines/client/gui/screen/TravelAnchorScreen.java @@ -2,20 +2,44 @@ import com.enderio.EnderIO; import com.enderio.api.misc.Vector2i; +import com.enderio.base.common.lang.EIOLang; import com.enderio.core.client.gui.screen.EIOScreen; +import com.enderio.core.client.gui.widgets.ToggleImageButton; import com.enderio.machines.common.menu.TravelAnchorMenu; +import net.minecraft.client.gui.components.EditBox; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Inventory; public class TravelAnchorScreen extends EIOScreen { - private static final ResourceLocation TRAVEL_ANCHOR_BG = EnderIO.loc("textures/gui/travel_accessible.png"); + private static final ResourceLocation TRAVEL_ANCHOR_BG = EnderIO.loc("textures/gui/travel_anchor.png"); + private static final ResourceLocation VISIBILITY_BTNS = EnderIO.loc("textures/gui/icons/visibility_buttons.png"); public TravelAnchorScreen(TravelAnchorMenu pMenu, Inventory pPlayerInventory, Component pTitle) { super(pMenu, pPlayerInventory, pTitle, false); } + @Override + protected void init() { + super.init(); + EditBox name = new EditBox(this.font, leftPos + 25, topPos + 14, 87, 18, Component.literal("name")); + name.setCanLoseFocus(true); + name.setTextColor(0xFFFFFFFF); + name.setTextColorUneditable(0xFFFFFFFF); + name.setBordered(false); + name.setMaxLength(50); + name.setResponder(getMenu().getBlockEntity()::setName); + name.setValue(getMenu().getBlockEntity().getName()); + this.addRenderableWidget(name); + this.setInitialFocus(name); + name.setEditable(true); + + addRenderableWidget( + new ToggleImageButton<>(this, leftPos + 150, topPos + 10, 16, 16, 0, 0, 16, 0, VISIBILITY_BTNS, 32, 16, () -> menu.getBlockEntity().getVisibility(), + menu.getBlockEntity()::setVisibility, () -> menu.getBlockEntity().getVisibility() ? EIOLang.VISIBLE : EIOLang.NOT_VISIBLE)); + } + @Override public ResourceLocation getBackgroundImage() { return TRAVEL_ANCHOR_BG; diff --git a/src/machines/java/com/enderio/machines/client/rendering/travel/TravelAnchorRenderer.java b/src/machines/java/com/enderio/machines/client/rendering/travel/TravelAnchorRenderer.java index b88d01669b..b84e073d7f 100644 --- a/src/machines/java/com/enderio/machines/client/rendering/travel/TravelAnchorRenderer.java +++ b/src/machines/java/com/enderio/machines/client/rendering/travel/TravelAnchorRenderer.java @@ -12,6 +12,8 @@ public class TravelAnchorRenderer implements TeleportationRenderer { @Override public void render(AnchorTravelTarget travelData, LevelRenderer levelRenderer, PoseStack poseStack) { + if (!travelData.getVisibility()) + return; poseStack.pushPose(); poseStack.translate(travelData.getPos().getX(), travelData.getPos().getY(), travelData.getPos().getZ()); //TODO: Render the Travel Anchor name icon and do some other stuff, pls Crazy, be a rendering genius diff --git a/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java index e4ac114178..1043e6774f 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java @@ -1,8 +1,6 @@ package com.enderio.machines.common.blockentity; import com.enderio.base.common.travel.TravelSavedData; -import com.enderio.core.common.network.slot.ResourceLocationNetworkDataSlot; -import com.enderio.core.common.network.slot.StringNetworkDataSlot; import com.enderio.machines.common.blockentity.base.MachineBlockEntity; import com.enderio.machines.common.io.item.MachineInventoryLayout; import com.enderio.machines.common.io.item.SingleSlotAccess; @@ -13,10 +11,10 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.registries.ForgeRegistries; import org.jetbrains.annotations.Nullable; import java.util.Optional; @@ -26,12 +24,13 @@ public class TravelAnchorBlockEntity extends MachineBlockEntity { private String name = ""; private Item icon = Items.AIR; + private boolean visible = true; public static final SingleSlotAccess GHOST = new SingleSlotAccess(); public TravelAnchorBlockEntity(BlockEntityType pType, BlockPos pWorldPosition, BlockState pBlockState) { super(pType, pWorldPosition, pBlockState); - addDataSlot(new StringNetworkDataSlot(() -> getName(), name -> setName(name))); - addDataSlot(new ResourceLocationNetworkDataSlot(() -> ForgeRegistries.ITEMS.getKey(getIcon()), (loc) -> setIcon(ForgeRegistries.ITEMS.getValue(loc)))); + // addDataSlot(new StringNetworkDataSlot(() -> getName(), name -> setName(name))); + // addDataSlot(new ResourceLocationNetworkDataSlot(() -> ForgeRegistries.ITEMS.getKey(getIcon()), (loc) -> setIcon(ForgeRegistries.ITEMS.getValue(loc)))); name = ('a' + new Random().nextInt(26)) + ""; } @@ -46,6 +45,15 @@ public AbstractContainerMenu createMenu(int containerId, Inventory inventory, Pl return MachineInventoryLayout.builder().setStackLimit(1).ghostSlot().slotAccess(GHOST).build(); } + @Override + protected void onInventoryContentsChanged(int slot) { + super.onInventoryContentsChanged(slot); + ItemStack stack = GHOST.getItemStack(getInventory()); + if (!stack.isEmpty()) { + setIcon(stack.getItem()); + } + } + @Nullable public String getName() { return name; @@ -53,12 +61,8 @@ public String getName() { public void setName(String name) { this.name = name; - Optional target = getTravelTarget(); - if (target.isPresent()) { - target.get().setName(name); - } else { - getTravelData().addTravelTarget(createTravelTarget()); - } + AnchorTravelTarget target = getOrCreateTravelTarget(); + target.setName(name); } public Item getIcon() { @@ -69,12 +73,19 @@ public Item getIcon() { public void setIcon(Item icon) { setChanged(); this.icon = icon; - Optional target = getTravelTarget(); - if (target.isPresent()) { - target.get().setIcon(icon != Items.AIR ? icon : null); - } else { - getTravelData().addTravelTarget(createTravelTarget()); - } + AnchorTravelTarget target = getOrCreateTravelTarget(); + target.setIcon(icon != Items.AIR ? icon : null); + } + + public boolean getVisibility() { + return visible; + } + + public void setVisibility(boolean visible) { + setChanged(); + this.visible = visible; + AnchorTravelTarget target = getOrCreateTravelTarget(); + target.setVisibility(visible); } @Override @@ -90,11 +101,15 @@ public void setRemoved() { } private AnchorTravelTarget createTravelTarget() { - return new AnchorTravelTarget(worldPosition, getName(), getIcon() == Items.AIR ? null: getIcon()); + return new AnchorTravelTarget(worldPosition, getName(), getIcon() == Items.AIR ? null : getIcon(), getVisibility()); } private Optional getTravelTarget() { - return getTravelData().getTravelTarget(worldPosition).filter(target -> target instanceof AnchorTravelTarget).map(target -> (AnchorTravelTarget)target); + return getTravelData().getTravelTarget(worldPosition).filter(target -> target instanceof AnchorTravelTarget).map(target -> (AnchorTravelTarget) target); + } + + private AnchorTravelTarget getOrCreateTravelTarget() { + return getTravelTarget().orElse(createTravelTarget()); } private TravelSavedData getTravelData() { diff --git a/src/machines/java/com/enderio/machines/common/menu/TravelAnchorMenu.java b/src/machines/java/com/enderio/machines/common/menu/TravelAnchorMenu.java index 5dc157caf6..a6798d7a99 100644 --- a/src/machines/java/com/enderio/machines/common/menu/TravelAnchorMenu.java +++ b/src/machines/java/com/enderio/machines/common/menu/TravelAnchorMenu.java @@ -12,6 +12,9 @@ public class TravelAnchorMenu extends MachineMenu { public TravelAnchorMenu(@Nullable TravelAnchorBlockEntity blockEntity, Inventory inventory, int pContainerId) { super(blockEntity, inventory, MachineMenus.TRAVEL_ANCHOR.get(), pContainerId); + if (blockEntity != null) { + addSlot(new GhostMachineSlot(blockEntity.getInventory(), TravelAnchorBlockEntity.GHOST, 125, 10)); + } addInventorySlots(8, 103); } diff --git a/src/machines/java/com/enderio/machines/common/travel/AnchorTravelTarget.java b/src/machines/java/com/enderio/machines/common/travel/AnchorTravelTarget.java index 6746893738..c7bd1b30d8 100644 --- a/src/machines/java/com/enderio/machines/common/travel/AnchorTravelTarget.java +++ b/src/machines/java/com/enderio/machines/common/travel/AnchorTravelTarget.java @@ -19,13 +19,15 @@ public class AnchorTravelTarget implements ITravelTarget { private final BlockPos pos; private String name; - @Nullable - private Item icon; + @Nullable private Item icon; + + private boolean visible; - public AnchorTravelTarget(BlockPos pos, String name, @Nullable Item icon) { + public AnchorTravelTarget(BlockPos pos, String name, @Nullable Item icon, boolean visible) { this.pos = pos; this.name = name; this.icon = icon; + this.visible = visible; } public AnchorTravelTarget(CompoundTag tag) { @@ -33,6 +35,7 @@ public AnchorTravelTarget(CompoundTag tag) { name = tag.getString("name"); String iconName = tag.getString("icon"); icon = iconName.equals("") ? null : ForgeRegistries.ITEMS.getValue(new ResourceLocation(iconName)); + visible = tag.getBoolean("visible"); } @Override @@ -42,6 +45,7 @@ public CompoundTag save() { nbt.putString("name", name); if (icon != null) nbt.putString("icon", String.valueOf(ForgeRegistries.ITEMS.getKey(icon))); + nbt.putBoolean("visible", visible); return nbt; } @@ -53,9 +57,8 @@ public boolean equals(Object o) { return true; if (!(o instanceof AnchorTravelTarget other)) return false; - return pos.equals(other.pos) - && name.equals(other.name) - && Objects.equals(icon, other.icon); + return pos.equals(other.pos) && name.equals(other.name) && visible == (other.visible) && Objects.equals(icon, other.icon); + } @Override @@ -85,6 +88,14 @@ public void setIcon(@Nullable Item icon) { this.icon = icon; } + public boolean getVisibility() { + return visible; + } + + public void setVisibility(boolean visible) { + this.visible = visible; + } + @Override public int getItem2BlockRange() { return BaseConfig.COMMON.ITEMS.TRAVELLING_TO_BLOCK_RANGE.get(); diff --git a/src/main/java/com/enderio/base/common/lang/EIOLang.java b/src/main/java/com/enderio/base/common/lang/EIOLang.java index ea1cf582d7..db1a61d197 100644 --- a/src/main/java/com/enderio/base/common/lang/EIOLang.java +++ b/src/main/java/com/enderio/base/common/lang/EIOLang.java @@ -220,18 +220,23 @@ private static Component enchantmentDescription(String enchantmentname, String d public static final MutableComponent NOCAP_TITLE = REGISTRATE.addLang("gui", EnderIO.loc("nocap.title"), "Capacitor Missing"); public static final MutableComponent NOCAP_DESC = REGISTRATE.addLang("gui", EnderIO.loc("nocap.desc"), "Insert any capacitor so \n this machine can work!"); + public static Component VISIBLE = REGISTRATE.addLang("gui", EnderIO.loc("visible.true"), "Visible"); + public static Component NOT_VISIBLE = REGISTRATE.addLang("gui", EnderIO.loc("visible.false"), "Hidden"); // endregion // region Glider public static final Component USE_GLIDER_ADVANCEMENT_TITLE = REGISTRATE.addLang("advancements", EnderIO.loc("use_glider.title"), "Majestic"); - public static final Component USE_GLIDER_ADVANCEMENT_DESCRIPTION = REGISTRATE.addLang("advancements", EnderIO.loc("use_glider.description"), "Do you really trust some leather?"); + public static final Component USE_GLIDER_ADVANCEMENT_DESCRIPTION = REGISTRATE.addLang("advancements", EnderIO.loc("use_glider.description"), + "Do you really trust some leather?"); public static final Component RICH_ADVANCEMENT_TITLE = REGISTRATE.addLang("advancements", EnderIO.loc("rich.title"), "Don't tell the others"); - public static final Component RICH_ADVANCEMENT_DESCRIPTION = REGISTRATE.addLang("advancements", EnderIO.loc("rich.description"), "Make others think you are rich"); + public static final Component RICH_ADVANCEMENT_DESCRIPTION = REGISTRATE.addLang("advancements", EnderIO.loc("rich.description"), + "Make others think you are rich"); public static final Component RICHER_ADVANCEMENT_TITLE = REGISTRATE.addLang("advancements", EnderIO.loc("richer.title"), "Is this real?"); - public static final Component RICHER_ADVANCEMENT_DESCRIPTION = REGISTRATE.addLang("advancements", EnderIO.loc("richer.description"), "Make others think you are richer"); + public static final Component RICHER_ADVANCEMENT_DESCRIPTION = REGISTRATE.addLang("advancements", EnderIO.loc("richer.description"), + "Make others think you are richer"); // endregion diff --git a/src/main/resources/assets/enderio/textures/gui/icons/visibility_buttons.png b/src/main/resources/assets/enderio/textures/gui/icons/visibility_buttons.png new file mode 100644 index 0000000000000000000000000000000000000000..cc3274a9b86141601d7c7f7d7ad39fd4df787f35 GIT binary patch literal 564 zcmV-40?Yl0P)Px$?ny*JRA_exp8pK8o$&GY#&z#M4+m?T_vHEB z3m5|-M41G}n04@t0gyBPI-gsOcfBGWq5|ZM_howMxNCX?ATs$fo3)RP*iWf&^$ zxLOI;6`+eMV+=tYYemuqk

OEsq;A|H*by`y}D}B0jB;d%MwHu zvMg(jWsD)vv`ZhR-WC4JvTXfU`Zw4cEP|^%M*!!{!=)0|Q3Se5aGgmS@E5QSz$(vC ziZLvL02V<2$EJZ})4+RGfo^wj6<+~kC#D#~uC6yp2UPWf4|55APDl;#cPuwhzCR-#GeH&X^tZ%aJfXL>P$M_a)=LZ zfF*ARXT<*DO^|(fzK}1lcoCeB0@(`$L67rha`IlF4;qmV06BET#s|n^o)6>?uI1pA z067p`E5S+a^3HV%$n3%AKJh?e(MPXwI(?!*A`+t_sSNm|5~&(hs-_x3j175C0PW=2}VM z=CeZ`->hnSzT4iu&7FuyFZAs8Ewz8rE4w{`MYe7t-R8$7P_e>B38J~*_`*-RFi zS9{jw7ptP5TJ%LKMWjgNonf6vDz6_vjG7dTe(v)5jhB1(*P-RDB_+ob+DeZjhW zjuMaOFE&tvF3OO~r0UnH3EC>cjdTVna#`(c!l3X7mmMdvNJfxBnkkz``1Q#;p@1@K zgq!4gRBw+VGpYD|2br9oU?B3d2+SyqSmhV)QUd@h$>0K))naq1T^b>Ws|GTwMuY;+ zgvrtfQ$ZcY&<;`{6Ujs<9P6TTB*ImGf^dh?q)yVV9)SRN8et~G*wqMG8hzuHI>lu^xzN>VPv2$>X?<6;RcLuCpWlgkKLu2QIE zgiK{JDU}nTbT%i0+X#|{0^lMF;Hbo?1T&H*7*m)~SSHWFV3kRQ!z!s#iK$S9I72~B zfLQOKKvm+FiBYjoMgT?PN*u#76tId=X23E+jKMh2!30jADx(UQp%~6V842}j+F`{( zIw>n|CK0>M%nh)FtD_Qi8lgmlj%yMvIAa118sR$1mhBoJFi=)9nZa2$#R?2ng0E68 z5vydVYTPJ=bT~mJvY1@&Zu2m0&2n(86a68YZ56e zlW|obCSfV6B*Z8vDTPTf8Qn>nm|WaJMwtPRfGbd*+%J?MluK0DWb52alFb4j3`Ui( zRD3^S$jE{bwr7m4I2`#ePQp2Z2~7t0d3B(9fnJD=HNz3k*tYXC9wWK<8D{{{)00ez z-)Xw0>6#J)Q!<{eu4%fa#K4q{r>pBHqswpnaf-Bo|AKPC!_uu=iX!l!H7jFnoEBOH zJqbmo-Fy2G(9E&NKkbB|xeM8o2bGpD2FlrtP9HnFd-hWPtOYgLU@rvu5;|>^!F9E- zt$ANrWME`-+*g~^iYUU*J~zH)HaxVn$GxO&-ks{umqMOCxn$ssqltdoOj)Yjq3^#` zSK%H$5*&4+<%PlZ`)?e2EA95dtb(wDw7b0*(0Mn1b#!UJPwj?#GqwiD{qamijWsAB zAiXs&FtuZTeZvAD@K!(oxgn_T3iaOU@9ung{Z#Yq7k>Chdsb=1P<7Ip4XrgXkGZ?6 zT8}RL?T#<{zU`ZPT-)?{-Qv6%&(HO#ZjK^euq}k!!-fKc#FeFX{d?yKl|#9?0`- z(hs8FX7>eqW5aM4m1rq zu7-Fk=)Ryv;^n(T0K)upDO;V2h+Vg?_<8!T`1N|pQnmF(e4>igZru2pY~GHKcJ8>w yGn9PNKz$Ij1rq&p5Ly;@CZXUY^phO*l2y<^=jpw-LxU|Wpe{B+TNS-^`+oprIE1$V literal 0 HcmV?d00001 From 182f609f55a7ddae39dde1040a48c116433834d0 Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Mon, 31 Jul 2023 13:39:57 +0200 Subject: [PATCH 019/154] update and add fluid tag support --- .../enderio/blockstates/mob_generator.json | 8 ++-- .../enderio/models/block/mob_generator.json | 23 ----------- .../models/block/mob_generator_front_on.json | 6 --- .../models/block/mob_generator_on.json | 26 ------------- .../eio_soul/generator/minecraft_blaze.json | 2 +- .../eio_soul/generator/minecraft_shulker.json | 6 --- .../tags/blocks/mineable/pickaxe.json | 1 + .../tags/blocks/needs_iron_tool.json | 3 +- .../blockentity/MobGeneratorBlockEntity.java | 38 ++++++++++++++++--- .../machines/common/init/MachineBlocks.java | 23 +++-------- .../common/souldata/GeneratorSoul.java | 5 +-- .../data/souldata/SoulDataProvider.java | 19 ++++++---- .../enderio/models/block/mob_generator.json | 12 ++++++ .../models/block/mob_generator_active.json | 6 +++ 14 files changed, 78 insertions(+), 100 deletions(-) delete mode 100644 src/generated/resources/assets/enderio/models/block/mob_generator.json delete mode 100644 src/generated/resources/assets/enderio/models/block/mob_generator_front_on.json delete mode 100644 src/generated/resources/assets/enderio/models/block/mob_generator_on.json delete mode 100644 src/generated/resources/data/enderio/eio_soul/generator/minecraft_shulker.json create mode 100644 src/machines/resources/assets/enderio/models/block/mob_generator.json create mode 100644 src/machines/resources/assets/enderio/models/block/mob_generator_active.json diff --git a/src/generated/resources/assets/enderio/blockstates/mob_generator.json b/src/generated/resources/assets/enderio/blockstates/mob_generator.json index 087bbb306a..8d77b0a7db 100644 --- a/src/generated/resources/assets/enderio/blockstates/mob_generator.json +++ b/src/generated/resources/assets/enderio/blockstates/mob_generator.json @@ -5,21 +5,21 @@ "y": 90 }, "facing=east,powered=true": { - "model": "enderio:block/mob_generator_on", + "model": "enderio:block/mob_generator_active", "y": 90 }, "facing=north,powered=false": { "model": "enderio:block/mob_generator" }, "facing=north,powered=true": { - "model": "enderio:block/mob_generator_on" + "model": "enderio:block/mob_generator_active" }, "facing=south,powered=false": { "model": "enderio:block/mob_generator", "y": 180 }, "facing=south,powered=true": { - "model": "enderio:block/mob_generator_on", + "model": "enderio:block/mob_generator_active", "y": 180 }, "facing=west,powered=false": { @@ -27,7 +27,7 @@ "y": 270 }, "facing=west,powered=true": { - "model": "enderio:block/mob_generator_on", + "model": "enderio:block/mob_generator_active", "y": 270 } } diff --git a/src/generated/resources/assets/enderio/models/block/mob_generator.json b/src/generated/resources/assets/enderio/models/block/mob_generator.json deleted file mode 100644 index 02da3cc84c..0000000000 --- a/src/generated/resources/assets/enderio/models/block/mob_generator.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "parent": "minecraft:block/block", - "children": { - "frame": { - "parent": "enderio:block/soul_machine_frame" - }, - "front": { - "parent": "enderio:block/mob_generator_front" - }, - "overlay": { - "parent": "enderio:block/io_overlay" - } - }, - "item_render_order": [ - "frame", - "overlay", - "front" - ], - "loader": "forge:composite", - "textures": { - "particle": "enderio:block/soul_machine_side" - } -} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/mob_generator_front_on.json b/src/generated/resources/assets/enderio/models/block/mob_generator_front_on.json deleted file mode 100644 index 944c537eab..0000000000 --- a/src/generated/resources/assets/enderio/models/block/mob_generator_front_on.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "enderio:block/mob_generator_front", - "textures": { - "front": "enderio:block/mob_generator_front_on" - } -} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/mob_generator_on.json b/src/generated/resources/assets/enderio/models/block/mob_generator_on.json deleted file mode 100644 index f3a20a3664..0000000000 --- a/src/generated/resources/assets/enderio/models/block/mob_generator_on.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "parent": "minecraft:block/block", - "children": { - "frame": { - "parent": "enderio:block/soul_machine_frame" - }, - "front": { - "parent": "enderio:block/mob_generator_front", - "textures": { - "front": "enderio:block/mob_generator_front_on" - } - }, - "overlay": { - "parent": "enderio:block/io_overlay" - } - }, - "item_render_order": [ - "frame", - "overlay", - "front" - ], - "loader": "forge:composite", - "textures": { - "particle": "enderio:block/soul_machine_side" - } -} \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/generator/minecraft_blaze.json b/src/generated/resources/data/enderio/eio_soul/generator/minecraft_blaze.json index 03aea8ae7a..1c26396a8b 100644 --- a/src/generated/resources/data/enderio/eio_soul/generator/minecraft_blaze.json +++ b/src/generated/resources/data/enderio/eio_soul/generator/minecraft_blaze.json @@ -1,6 +1,6 @@ { "entity": "minecraft:blaze", - "fluid": "minecraft:lava", + "fluid": "#minecraft:lava", "power/mb": 800, "tick/mb": 20 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/generator/minecraft_shulker.json b/src/generated/resources/data/enderio/eio_soul/generator/minecraft_shulker.json deleted file mode 100644 index 272c397a65..0000000000 --- a/src/generated/resources/data/enderio/eio_soul/generator/minecraft_shulker.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "entity": "minecraft:shulker", - "fluid": "enderio:flowing_vapor_of_levity", - "power/mb": 1500, - "tick/mb": 20 -} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json b/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json index 7dcdaf77e5..9f11a1947d 100644 --- a/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json +++ b/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json @@ -53,6 +53,7 @@ "enderio:advanced_capacitor_bank", "enderio:vibrant_capacitor_bank", "enderio:crafter", + "enderio:mob_generator", "enderio:conduit" ] } \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/blocks/needs_iron_tool.json b/src/generated/resources/data/minecraft/tags/blocks/needs_iron_tool.json index e33f8875f8..963698a7f7 100644 --- a/src/generated/resources/data/minecraft/tags/blocks/needs_iron_tool.json +++ b/src/generated/resources/data/minecraft/tags/blocks/needs_iron_tool.json @@ -16,6 +16,7 @@ "enderio:impulse_hopper", "enderio:soul_binder", "enderio:powered_spawner", - "enderio:crafter" + "enderio:crafter", + "enderio:mob_generator" ] } \ No newline at end of file diff --git a/src/machines/java/com/enderio/machines/common/blockentity/MobGeneratorBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/MobGeneratorBlockEntity.java index 4ddebfed50..f95c83ac99 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/MobGeneratorBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/MobGeneratorBlockEntity.java @@ -16,14 +16,17 @@ import com.enderio.machines.common.souldata.GeneratorSoul; import net.minecraft.core.BlockPos; import net.minecraft.core.Holder; +import net.minecraft.core.registries.Registries; import net.minecraft.nbt.CompoundTag; import net.minecraft.resources.ResourceLocation; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.Fluids; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidType; import net.minecraftforge.fluids.capability.IFluidHandler; @@ -42,6 +45,7 @@ public class MobGeneratorBlockEntity extends PoweredMachineBlockEntity { private static final String BURNED_TICKS = "burnedTicks"; private StoredEntityData entityData = StoredEntityData.empty(); private static final int FLUID_CAPACITY = 2 * FluidType.BUCKET_VOLUME; + @Nullable private GeneratorSoul.SoulData soulData; private int burnedTicks = 0; @@ -105,20 +109,44 @@ public void producePower() { @Override protected void onContentsChanged() { super.onContentsChanged(); + setChanged(); + } + + @Override + public int fill(FluidStack resource, FluidAction action) { + // Convert into tagged fluid + if (this.isFluidValid(resource)) { + var currentFluid = this.getFluid().getFluid(); + if (currentFluid == Fluids.EMPTY || resource.getFluid().isSame(currentFluid)) { + return super.fill(resource, action); + } else { + return super.fill(new FluidStack(currentFluid, resource.getAmount()), action); + } + } + + // Non-tagged fluid. + return 0; } }; } - //TODO add tag support private Predicate isFluidValid() { return fluidStack -> { if (soulData == null) { return false; } - ResourceLocation fluid = soulData.fluid(); - Optional> delegate = ForgeRegistries.FLUIDS.getDelegate(fluid); - if (delegate.isPresent()) { - return fluidStack.getFluid().isSame(delegate.get().get()); + String fluid = soulData.fluid(); + if (fluid.startsWith("#")) { //We have a fluid tag instead + TagKey tag = TagKey.create(Registries.FLUID, new ResourceLocation(fluid.substring(1))); + Optional optional = ForgeRegistries.FLUIDS.tags().getTag(tag).stream().findFirst(); + if (optional.isPresent()) { + return fluidStack.getFluid().isSame(optional.get()); + } + } else { + Optional> delegate = ForgeRegistries.FLUIDS.getDelegate(new ResourceLocation(fluid)); + if (delegate.isPresent()) { + return fluidStack.getFluid().isSame(delegate.get().get()); + } } return false; }; diff --git a/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java b/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java index 87b01d9a52..0780215bbd 100644 --- a/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java +++ b/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java @@ -30,13 +30,7 @@ import net.minecraft.tags.BlockTags; import net.minecraft.world.item.Item; import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.state.properties.BlockStateProperties; -import net.minecraftforge.client.model.generators.BlockModelBuilder; -import net.minecraftforge.client.model.generators.ConfiguredModel; -import net.minecraftforge.client.model.generators.ModelFile; import net.minecraftforge.client.model.generators.loaders.CompositeModelBuilder; -import net.minecraftforge.common.util.TransformationHelper; -import org.joml.Vector3f; import java.util.HashMap; import java.util.Locale; @@ -130,10 +124,8 @@ public class MachineBlocks { .lang("Soul Binder") .register(); - public static final BlockEntry POWERED_SPAWNER = REGISTRATE - .block("powered_spawner", props -> new ProgressMachineBlock(props, MachineBlockEntities.POWERED_SPAWNER)) + public static final BlockEntry POWERED_SPAWNER = progressMachine("powered_spawner", () -> MachineBlockEntities.POWERED_SPAWNER) .loot((l,t) -> MachinesLootTable.copyNBTSingleCap(l, t, MachineNBTKeys.ENTITY_STORAGE)) - .blockstate(MachineModelUtil::soulMachineBlock) .item(SoulBoundItem::new) .tab(EIOCreativeTabs.MACHINES) .build() @@ -175,20 +167,15 @@ public class MachineBlocks { return ImmutableMap.copyOf(banks); }); - public static final BlockEntry MOB_GENERATOR = REGISTRATE - .block("mob_generator", props -> new ProgressMachineBlock(props, MachineBlockEntities.MOB_GENERATOR)) - .loot(MachinesLootTable::copyNBT) - .blockstate(MachineModelUtil::soulMachineBlock) + public static final BlockEntry CRAFTER = progressMachine("crafter", () -> MachineBlockEntities.CRAFTER) + .register(); + + public static final BlockEntry MOB_GENERATOR = progressMachine("mob_generator", () -> MachineBlockEntities.MOB_GENERATOR) .item(SoulBoundItem::new) .tab(EIOCreativeTabs.MACHINES) .build() .register(); - public static final BlockEntry CRAFTER = standardMachine("crafter", () -> MachineBlockEntities.CRAFTER) - .lang("Crafter") - .blockstate((ctx, prov) -> MachineModelUtil.customMachineBlock(ctx, prov, "crafter")) - .register(); - //used when single methods needs to be overridden in the block class private static BlockBuilder baseMachine(BlockBuilder machineBlock, NonNullBiConsumer, RegistrateBlockstateProvider> blockStateProvider) { diff --git a/src/machines/java/com/enderio/machines/common/souldata/GeneratorSoul.java b/src/machines/java/com/enderio/machines/common/souldata/GeneratorSoul.java index bce5acd318..8881970ab0 100644 --- a/src/machines/java/com/enderio/machines/common/souldata/GeneratorSoul.java +++ b/src/machines/java/com/enderio/machines/common/souldata/GeneratorSoul.java @@ -10,8 +10,7 @@ @Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.FORGE) public class GeneratorSoul { - //TODO add tag support for fluids - public record SoulData(ResourceLocation entitytype, ResourceLocation fluid, int powerpermb, int tickpermb) implements ISoulData { + public record SoulData(ResourceLocation entitytype, String fluid, int powerpermb, int tickpermb) implements ISoulData { @Override public ResourceLocation getKey() { return entitytype(); @@ -20,7 +19,7 @@ public ResourceLocation getKey() { public static final Codec CODEC = RecordCodecBuilder.create(soulDataInstance -> soulDataInstance.group(ResourceLocation.CODEC.fieldOf("entity").forGetter(SoulData::entitytype), - ResourceLocation.CODEC.fieldOf("fluid").forGetter(SoulData::fluid), + Codec.STRING.fieldOf("fluid").forGetter(SoulData::fluid), Codec.INT.fieldOf("power/mb").forGetter(SoulData::powerpermb), Codec.INT.fieldOf("tick/mb").forGetter(SoulData::tickpermb)) .apply(soulDataInstance, SoulData::new)); diff --git a/src/machines/java/com/enderio/machines/data/souldata/SoulDataProvider.java b/src/machines/java/com/enderio/machines/data/souldata/SoulDataProvider.java index a217f6301a..88f0046217 100644 --- a/src/machines/java/com/enderio/machines/data/souldata/SoulDataProvider.java +++ b/src/machines/java/com/enderio/machines/data/souldata/SoulDataProvider.java @@ -7,8 +7,6 @@ import com.enderio.machines.common.souldata.ISoulData; import com.enderio.machines.common.souldata.SpawnerSoul; import com.google.common.collect.Sets; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.mojang.serialization.Codec; @@ -18,10 +16,12 @@ import net.minecraft.data.DataProvider; import net.minecraft.data.PackOutput; import net.minecraft.resources.ResourceLocation; +import net.minecraft.tags.FluidTags; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.EntityType; import net.minecraft.world.level.material.Fluid; -import net.minecraft.world.level.material.Fluids; import net.minecraftforge.registries.ForgeRegistries; +import org.jetbrains.annotations.NotNull; import java.util.ArrayList; import java.util.List; @@ -32,8 +32,6 @@ public class SoulDataProvider implements DataProvider { private final PackOutput.PathProvider souldataprovider; - private static final Gson GSON = (new GsonBuilder()).setPrettyPrinting().create(); - public SoulDataProvider(PackOutput packOutput) { this.souldataprovider = packOutput.createPathProvider(PackOutput.Target.DATA_PACK, "eio_soul"); } @@ -113,12 +111,11 @@ public void buildSoulData(Consumer> finshedSoulDataConsumer) addSpawnerData(EntityType.ZOMBIE_VILLAGER, 4000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); addSpawnerData(EntityType.ZOMBIFIED_PIGLIN, 4000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addGeneratorData(EntityType.BLAZE, Fluids.LAVA, 800, 20, finshedSoulDataConsumer); + addGeneratorData(EntityType.BLAZE, FluidTags.LAVA, 800, 20, finshedSoulDataConsumer); addGeneratorData(EntityType.ZOMBIE, EIOFluids.NUTRIENT_DISTILLATION.get(), 900, 20, finshedSoulDataConsumer); addGeneratorData(EntityType.ZOMBIE_VILLAGER, EIOFluids.NUTRIENT_DISTILLATION.get(), 900, 20, finshedSoulDataConsumer); addGeneratorData(EntityType.HUSK, EIOFluids.NUTRIENT_DISTILLATION.get(), 900, 20, finshedSoulDataConsumer); addGeneratorData(EntityType.ENDERMAN, EIOFluids.DEW_OF_THE_VOID.get(), 2000, 10, finshedSoulDataConsumer); - addGeneratorData(EntityType.SHULKER, EIOFluids.VAPOR_OF_LEVITY.get(), 1500, 20, finshedSoulDataConsumer); } @@ -136,6 +133,7 @@ public CompletableFuture run(CachedOutput cachedOutput) { return CompletableFuture.allOf(list.toArray((p_253414_) -> new CompletableFuture[p_253414_])); } + @NotNull @Override public String getName() { return "Souldata"; @@ -150,6 +148,13 @@ private void addSpawnerData(EntityType entityType, int power, SpawnerMachineT private void addGeneratorData(EntityType entityType, Fluid fluid, int powerpermb, int tickpermb, Consumer> finshedSoulDataConsumer) { ResourceLocation entityRL = ForgeRegistries.ENTITY_TYPES.getKey(entityType); ResourceLocation fluidRL = ForgeRegistries.FLUIDS.getKey(fluid); + GeneratorSoul.SoulData data = new GeneratorSoul.SoulData(entityRL, fluidRL.toString(), powerpermb, tickpermb); + finshedSoulDataConsumer.accept(new FinshedSoulData<>(GeneratorSoul.CODEC, data, "generator/" + entityRL.getNamespace() + "_" + entityRL.getPath())); + } + + private void addGeneratorData(EntityType entityType, TagKey fluid, int powerpermb, int tickpermb, Consumer> finshedSoulDataConsumer) { + ResourceLocation entityRL = ForgeRegistries.ENTITY_TYPES.getKey(entityType); + String fluidRL = "#" + fluid.location(); GeneratorSoul.SoulData data = new GeneratorSoul.SoulData(entityRL, fluidRL, powerpermb, tickpermb); finshedSoulDataConsumer.accept(new FinshedSoulData<>(GeneratorSoul.CODEC, data, "generator/" + entityRL.getNamespace() + "_" + entityRL.getPath())); } diff --git a/src/machines/resources/assets/enderio/models/block/mob_generator.json b/src/machines/resources/assets/enderio/models/block/mob_generator.json new file mode 100644 index 0000000000..7e5c75f71e --- /dev/null +++ b/src/machines/resources/assets/enderio/models/block/mob_generator.json @@ -0,0 +1,12 @@ +{ + "parent": "minecraft:block/cube", + "textures": { + "down": "enderio:block/machine_bottom", + "east": "enderio:block/machine_side", + "north": "enderio:block/stirling_generator_front", + "particle": "enderio:block/stirling_generator_front", + "south": "enderio:block/machine_back", + "up": "enderio:block/machine_top", + "west": "enderio:block/machine_side" + } +} \ No newline at end of file diff --git a/src/machines/resources/assets/enderio/models/block/mob_generator_active.json b/src/machines/resources/assets/enderio/models/block/mob_generator_active.json new file mode 100644 index 0000000000..f7c9e41a64 --- /dev/null +++ b/src/machines/resources/assets/enderio/models/block/mob_generator_active.json @@ -0,0 +1,6 @@ +{ + "parent": "enderio:block/stirling_generator", + "textures": { + "north": "enderio:block/stirling_generator_front_active" + } +} \ No newline at end of file From 7d638cc695b6c84bf3d745de26e1ba2f653105b6 Mon Sep 17 00:00:00 2001 From: mystchonky Date: Mon, 31 Jul 2023 17:38:35 +0530 Subject: [PATCH 020/154] try fix teleport for hidden anchors --- src/api/java/com/enderio/api/travel/ITravelTarget.java | 4 ++++ .../enderio/machines/common/travel/AnchorTravelTarget.java | 5 +++++ .../com/enderio/base/common/handler/TeleportHandler.java | 4 +--- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/api/java/com/enderio/api/travel/ITravelTarget.java b/src/api/java/com/enderio/api/travel/ITravelTarget.java index caa2c10110..3aeb028ae7 100644 --- a/src/api/java/com/enderio/api/travel/ITravelTarget.java +++ b/src/api/java/com/enderio/api/travel/ITravelTarget.java @@ -15,4 +15,8 @@ public interface ITravelTarget { int getItem2BlockRange(); int getBlock2BlockRange(); + + default boolean canTravelTo() { + return true; + } } diff --git a/src/machines/java/com/enderio/machines/common/travel/AnchorTravelTarget.java b/src/machines/java/com/enderio/machines/common/travel/AnchorTravelTarget.java index c7bd1b30d8..7e0b5de245 100644 --- a/src/machines/java/com/enderio/machines/common/travel/AnchorTravelTarget.java +++ b/src/machines/java/com/enderio/machines/common/travel/AnchorTravelTarget.java @@ -96,6 +96,11 @@ public void setVisibility(boolean visible) { this.visible = visible; } + @Override + public boolean canTravelTo() { + return getVisibility(); + } + @Override public int getItem2BlockRange() { return BaseConfig.COMMON.ITEMS.TRAVELLING_TO_BLOCK_RANGE.get(); diff --git a/src/main/java/com/enderio/base/common/handler/TeleportHandler.java b/src/main/java/com/enderio/base/common/handler/TeleportHandler.java index 4a0b2c6c39..3bfe66973f 100644 --- a/src/main/java/com/enderio/base/common/handler/TeleportHandler.java +++ b/src/main/java/com/enderio/base/common/handler/TeleportHandler.java @@ -117,9 +117,7 @@ public static Optional teleportPosition(Level level, Player player) { private static Optional getAnchorTarget(Player player) { Vec3 positionVec = player.position().add(0, player.getEyeHeight(), 0); - return TravelSavedData - .getTravelData(player.level()) - .getTravelTargetsInItemRange(player.blockPosition()) + return TravelSavedData.getTravelData(player.level()).getTravelTargetsInItemRange(player.blockPosition()).filter(target -> target.canTravelTo()) .filter( target -> target.getPos().distToLowCornerSqr(player.getX(), player.getY(), player.getZ()) > 25) //only teleport to blocks not directly in range .filter(target -> Math.abs(getAngleRadians(positionVec, target.getPos(), player.getYRot(), player.getXRot())) <= Math.toRadians(15)) From d29dacd3f33055f9a408f6370a29556a9da7c99f Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Mon, 31 Jul 2023 14:39:04 +0200 Subject: [PATCH 021/154] update drain and fix range --- .../common/blockentity/EnderBlockEntity.java | 1 + .../common/network/slot/NetworkDataSlot.java | 4 ++ .../assets/enderio/blockstates/drain.json | 34 +++++++++++++++ .../resources/assets/enderio/lang/en_ud.json | 1 + .../resources/assets/enderio/lang/en_us.json | 1 + .../assets/enderio/models/item/drain.json | 3 ++ .../enderio/loot_tables/blocks/drain.json | 29 +++++++++++++ .../tags/blocks/mineable/pickaxe.json | 1 + .../tags/blocks/needs_iron_tool.json | 3 +- .../client/gui/screen/DrainScreen.java | 24 +++++++++++ .../common/blockentity/DrainBlockEntity.java | 43 ++++++++++++++++++- .../blockentity/base/MachineBlockEntity.java | 8 +++- .../client/MachinesClientBlocksConfig.java | 8 ++-- .../machines/common/init/MachineBlocks.java | 9 +--- 14 files changed, 153 insertions(+), 16 deletions(-) create mode 100644 src/generated/resources/assets/enderio/blockstates/drain.json create mode 100644 src/generated/resources/assets/enderio/models/item/drain.json create mode 100644 src/generated/resources/data/enderio/loot_tables/blocks/drain.json diff --git a/src/core/java/com/enderio/core/common/blockentity/EnderBlockEntity.java b/src/core/java/com/enderio/core/common/blockentity/EnderBlockEntity.java index 51eb56791d..6ce2004a5a 100644 --- a/src/core/java/com/enderio/core/common/blockentity/EnderBlockEntity.java +++ b/src/core/java/com/enderio/core/common/blockentity/EnderBlockEntity.java @@ -173,6 +173,7 @@ public void serverHandleDataChange(CompoundTag data) { if (data.contains("Index", Tag.TAG_INT) && data.contains("Data")) { int slotIdx = data.getInt("Index"); dataSlots.get(slotIdx).fromNBT(data.get("Data")); + dataSlots.get(slotIdx).updateServerCallback(); } } diff --git a/src/core/java/com/enderio/core/common/network/slot/NetworkDataSlot.java b/src/core/java/com/enderio/core/common/network/slot/NetworkDataSlot.java index b0f4edb9a8..444bde0d70 100644 --- a/src/core/java/com/enderio/core/common/network/slot/NetworkDataSlot.java +++ b/src/core/java/com/enderio/core/common/network/slot/NetworkDataSlot.java @@ -38,4 +38,8 @@ public void fromNBT(Tag nbt) { protected int hashCode(T value) { return value.hashCode(); } + + //Called after the server is updated with the new data + public void updateServerCallback() { + } } diff --git a/src/generated/resources/assets/enderio/blockstates/drain.json b/src/generated/resources/assets/enderio/blockstates/drain.json new file mode 100644 index 0000000000..60dc428f7e --- /dev/null +++ b/src/generated/resources/assets/enderio/blockstates/drain.json @@ -0,0 +1,34 @@ +{ + "variants": { + "facing=east,powered=false": { + "model": "enderio:block/drain", + "y": 90 + }, + "facing=east,powered=true": { + "model": "enderio:block/drain_active", + "y": 90 + }, + "facing=north,powered=false": { + "model": "enderio:block/drain" + }, + "facing=north,powered=true": { + "model": "enderio:block/drain_active" + }, + "facing=south,powered=false": { + "model": "enderio:block/drain", + "y": 180 + }, + "facing=south,powered=true": { + "model": "enderio:block/drain_active", + "y": 180 + }, + "facing=west,powered=false": { + "model": "enderio:block/drain", + "y": 270 + }, + "facing=west,powered=true": { + "model": "enderio:block/drain_active", + "y": 270 + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/lang/en_ud.json b/src/generated/resources/assets/enderio/lang/en_ud.json index 5407e4c275..cf35a88b01 100644 --- a/src/generated/resources/assets/enderio/lang/en_ud.json +++ b/src/generated/resources/assets/enderio/lang/en_ud.json @@ -78,6 +78,7 @@ "block.enderio.dark_steel_pressure_plate": "ǝʇɐןԀ ǝɹnssǝɹԀ ןǝǝʇS ʞɹɐᗡ", "block.enderio.dark_steel_trapdoor": "ɹoopdɐɹ⟘ ןǝǝʇS ʞɹɐᗡ", "block.enderio.dew_of_the_void": "pıoΛ ǝɥ⟘ ɟO ʍǝᗡ", + "block.enderio.drain": "uıɐɹᗡ", "block.enderio.enchanter": "ɹǝʇuɐɥɔuƎ", "block.enderio.end_steel_bars": "sɹɐᗺ ןǝǝʇS puƎ", "block.enderio.end_steel_block": "ʞɔoןᗺ ןǝǝʇS puƎ", diff --git a/src/generated/resources/assets/enderio/lang/en_us.json b/src/generated/resources/assets/enderio/lang/en_us.json index ebf6107a16..befb3a2606 100644 --- a/src/generated/resources/assets/enderio/lang/en_us.json +++ b/src/generated/resources/assets/enderio/lang/en_us.json @@ -78,6 +78,7 @@ "block.enderio.dark_steel_pressure_plate": "Dark Steel Pressure Plate", "block.enderio.dark_steel_trapdoor": "Dark Steel Trapdoor", "block.enderio.dew_of_the_void": "Dew Of The Void", + "block.enderio.drain": "Drain", "block.enderio.enchanter": "Enchanter", "block.enderio.end_steel_bars": "End Steel Bars", "block.enderio.end_steel_block": "End Steel Block", diff --git a/src/generated/resources/assets/enderio/models/item/drain.json b/src/generated/resources/assets/enderio/models/item/drain.json new file mode 100644 index 0000000000..4cc58a1806 --- /dev/null +++ b/src/generated/resources/assets/enderio/models/item/drain.json @@ -0,0 +1,3 @@ +{ + "parent": "enderio:block/drain" +} \ No newline at end of file diff --git a/src/generated/resources/data/enderio/loot_tables/blocks/drain.json b/src/generated/resources/data/enderio/loot_tables/blocks/drain.json new file mode 100644 index 0000000000..9a17179b25 --- /dev/null +++ b/src/generated/resources/data/enderio/loot_tables/blocks/drain.json @@ -0,0 +1,29 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:copy_nbt", + "ops": [ + { + "op": "replace", + "source": "", + "target": "BlockEntityTag" + } + ], + "source": "block_entity" + } + ], + "name": "enderio:drain" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "enderio:blocks/drain" +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json b/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json index 7dcdaf77e5..631e408226 100644 --- a/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json +++ b/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json @@ -53,6 +53,7 @@ "enderio:advanced_capacitor_bank", "enderio:vibrant_capacitor_bank", "enderio:crafter", + "enderio:drain", "enderio:conduit" ] } \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/blocks/needs_iron_tool.json b/src/generated/resources/data/minecraft/tags/blocks/needs_iron_tool.json index e33f8875f8..286be1fcad 100644 --- a/src/generated/resources/data/minecraft/tags/blocks/needs_iron_tool.json +++ b/src/generated/resources/data/minecraft/tags/blocks/needs_iron_tool.json @@ -16,6 +16,7 @@ "enderio:impulse_hopper", "enderio:soul_binder", "enderio:powered_spawner", - "enderio:crafter" + "enderio:crafter", + "enderio:drain" ] } \ No newline at end of file diff --git a/src/machines/java/com/enderio/machines/client/gui/screen/DrainScreen.java b/src/machines/java/com/enderio/machines/client/gui/screen/DrainScreen.java index ebd980e185..46ca454f3c 100644 --- a/src/machines/java/com/enderio/machines/client/gui/screen/DrainScreen.java +++ b/src/machines/java/com/enderio/machines/client/gui/screen/DrainScreen.java @@ -5,10 +5,13 @@ import com.enderio.base.common.lang.EIOLang; import com.enderio.core.client.gui.screen.EIOScreen; import com.enderio.core.client.gui.widgets.EnumIconWidget; +import com.enderio.core.client.gui.widgets.ToggleImageButton; import com.enderio.machines.client.gui.widget.CapacitorEnergyWidget; import com.enderio.machines.client.gui.widget.FluidStackWidget; import com.enderio.machines.client.gui.widget.ioconfig.IOConfigButton; import com.enderio.machines.common.menu.DrainMenu; +import net.minecraft.client.gui.GuiGraphics; +import net.minecraft.client.gui.components.ImageButton; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Inventory; @@ -16,6 +19,8 @@ public class DrainScreen extends EIOScreen { public static final ResourceLocation BG_TEXTURE = EnderIO.loc("textures/gui/drain.png"); + private static final ResourceLocation BUTTONS = EnderIO.loc("textures/gui/icons/buttons.png"); + private static final ResourceLocation RANGE_BUTTON_TEXTURE = EnderIO.loc("textures/gui/icons/range_buttons.png"); public DrainScreen(DrainMenu pMenu, Inventory pPlayerInventory, Component pTitle) { super(pMenu, pPlayerInventory, pTitle); } @@ -31,9 +36,28 @@ protected void init() { addRenderableOnly(new FluidStackWidget(this, getMenu().getBlockEntity()::getFluidTank, 80 + leftPos, 21 + topPos, 16, 47)); + addRenderableWidget(new ToggleImageButton<>(this, leftPos + imageWidth - 8 - 14, topPos + 22 + 2 + 16, 16, 16, 0, 0, 16, 0, RANGE_BUTTON_TEXTURE, + () -> menu.getBlockEntity().isRangeVisible(), state -> menu.getBlockEntity().setIsRangeVisible(state), + () -> menu.getBlockEntity().isRangeVisible() ? EIOLang.HIDE_RANGE : EIOLang.SHOW_RANGE)); + addRenderableWidget(new ImageButton(leftPos + imageWidth - 8 - 8, topPos + 66, 8, 8, 8, 0, 16, BUTTONS, (b) -> menu.getBlockEntity().increaseRange())); + addRenderableWidget(new ImageButton(leftPos + imageWidth - 8 - 8, topPos + 74, 8, 8, 8, 8, 16, BUTTONS, (b) -> menu.getBlockEntity().decreaseRange())); + + addRenderableWidget(new IOConfigButton<>(this, leftPos + imageWidth - 6 - 16, topPos + 22, 16, 16, menu, this::addRenderableWidget, font)); } + @Override + protected void renderLabels(GuiGraphics guiGraphics, int pMouseX, int pMouseY) { + super.renderLabels(guiGraphics, pMouseX, pMouseY); + guiGraphics.drawString(font, EIOLang.RANGE, imageWidth - 8 - font.width(EIOLang.RANGE), 56, 4210752, false); + } + + @Override + public void render(GuiGraphics guiGraphics, int pMouseX, int pMouseY, float pPartialTicks) { + super.render(guiGraphics, pMouseX, pMouseY, pPartialTicks); + guiGraphics.drawString(font, getMenu().getBlockEntity().getRange() + "", leftPos + imageWidth - 8 - font.width(getMenu().getBlockEntity().getRange() + "") - 10, topPos + 70, 0, false); + } + @Override public ResourceLocation getBackgroundImage() { return BG_TEXTURE; diff --git a/src/machines/java/com/enderio/machines/common/blockentity/DrainBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/DrainBlockEntity.java index 11c8957541..6b637d5fb3 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/DrainBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/DrainBlockEntity.java @@ -3,7 +3,9 @@ import com.enderio.api.capacitor.CapacitorModifier; import com.enderio.api.capacitor.QuadraticScalable; import com.enderio.api.io.energy.EnergyIOMode; +import com.enderio.core.common.network.slot.BooleanNetworkDataSlot; import com.enderio.core.common.network.slot.FluidStackNetworkDataSlot; +import com.enderio.core.common.network.slot.IntegerNetworkDataSlot; import com.enderio.machines.common.blockentity.base.PoweredMachineBlockEntity; import com.enderio.machines.common.config.MachinesConfig; import com.enderio.machines.common.io.fluid.MachineFluidTank; @@ -43,6 +45,19 @@ public DrainBlockEntity(BlockEntityType type, BlockPos worldPosition, BlockState blockState) { super(EnergyIOMode.Input, ENERGY_CAPACITY, ENERGY_USAGE, type, worldPosition, blockState); addDataSlot(new FluidStackNetworkDataSlot(getFluidTankNN()::getFluid, getFluidTankNN()::setFluid)); + + this.range = 5; + + rangeDataSlot = new IntegerNetworkDataSlot(this::getRange, r -> this.range = r) { + @Override + public void updateServerCallback() { + updateLocations(); + } + }; + addDataSlot(rangeDataSlot); + + rangeVisibleDataSlot = new BooleanNetworkDataSlot(this::isRangeVisible, b -> this.rangeVisible = b); + addDataSlot(rangeVisibleDataSlot); } @Override @@ -73,7 +88,6 @@ protected boolean isActive() { return getFluidTankNN().fill(new FluidStack(fluidState.getType(), FluidType.BUCKET_VOLUME), IFluidHandler.FluidAction.SIMULATE) == FluidType.BUCKET_VOLUME; } - //TODO logic for ending on the block below the drain. That should be the last one to go. public void drainFluids() { for (int i = currentIndex; i < Math.min(currentIndex + 3, positions.size()); i++) { currentIndex = i; @@ -113,11 +127,36 @@ public void drainFluids() { } } + @Override + public int getMaxRange() { + return 10; + } + + @Override + public String getColor() { + return MachinesConfig.CLIENT.BLOCKS.DRAIN_RANGE_COLOR.get(); + } + + @Override + public BlockPos getParticleLocation() { + return worldPosition.below(range + 1); + } + + @Override + public void setRange(int range) { + super.setRange(range); + updateLocations(); + } + @Override public void onLoad() { super.onLoad(); + updateLocations(); + } + + private void updateLocations() { positions = new ArrayList<>(); - for (BlockPos pos : BlockPos.betweenClosed(worldPosition.offset(-10,-21,-10), worldPosition.offset(10,-1,10))) { + for (BlockPos pos : BlockPos.betweenClosed(worldPosition.offset(-range,-range*2 - 1,-range), worldPosition.offset(range,-1,range))) { positions.add(pos.immutable()); //Need to make it immutable } } diff --git a/src/machines/java/com/enderio/machines/common/blockentity/base/MachineBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/base/MachineBlockEntity.java index 426d9cc3e6..d7d97b300f 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/base/MachineBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/base/MachineBlockEntity.java @@ -273,13 +273,17 @@ public void setRange(int range) { public void decreaseRange() { if (this.range > 0) { - this.range--; + if (level != null && level.isClientSide()) { + clientUpdateSlot(rangeDataSlot, range-1); + } else this.range--; } } public void increaseRange() { if (this.range < getMaxRange()) { - this.range++; + if (level != null && level.isClientSide()) { + clientUpdateSlot(rangeDataSlot, range+1); + } this.range++; } } diff --git a/src/machines/java/com/enderio/machines/common/config/client/MachinesClientBlocksConfig.java b/src/machines/java/com/enderio/machines/common/config/client/MachinesClientBlocksConfig.java index 8789259fa9..1ba0d5ad4d 100644 --- a/src/machines/java/com/enderio/machines/common/config/client/MachinesClientBlocksConfig.java +++ b/src/machines/java/com/enderio/machines/common/config/client/MachinesClientBlocksConfig.java @@ -7,13 +7,15 @@ public class MachinesClientBlocksConfig { public final ForgeConfigSpec.ConfigValue VACUUM_CHEST_RANGE_COLOR; public final ForgeConfigSpec.ConfigValue XP_VACUUM_RANGE_COLOR; public final ForgeConfigSpec.ConfigValue POWERED_SPAWNER_RANGE_COLOR; + public final ForgeConfigSpec.ConfigValue DRAIN_RANGE_COLOR; public MachinesClientBlocksConfig(ForgeConfigSpec.Builder builder) { builder.push("blocks"); - VACUUM_CHEST_RANGE_COLOR = builder.comment("The color of the range box of Vacuum Chest").define("vacuumChestRangeColor", "0000FF"); - XP_VACUUM_RANGE_COLOR = builder.comment("The color of the range box of XP Vacuum").define("vacuumXpRangeColor", "00FF00"); - POWERED_SPAWNER_RANGE_COLOR = builder.comment("The color of the range box of Powered Spawner").define("poweredSpawnerRangeColor", "FF0000"); + VACUUM_CHEST_RANGE_COLOR = builder.comment("The color of the range box of the Vacuum Chest").define("vacuumChestRangeColor", "0000FF"); + XP_VACUUM_RANGE_COLOR = builder.comment("The color of the range box of the XP Vacuum").define("vacuumXpRangeColor", "00FF00"); + POWERED_SPAWNER_RANGE_COLOR = builder.comment("The color of the range box of the Powered Spawner").define("poweredSpawnerRangeColor", "FF0000"); + DRAIN_RANGE_COLOR = builder.comment("The color of the range box of the Drain").define("drainRangeColor", "FFA500"); builder.pop(); } } diff --git a/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java b/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java index fb2e166a0d..0261dad329 100644 --- a/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java +++ b/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java @@ -29,13 +29,7 @@ import net.minecraft.tags.BlockTags; import net.minecraft.world.item.Item; import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.state.properties.BlockStateProperties; -import net.minecraftforge.client.model.generators.BlockModelBuilder; -import net.minecraftforge.client.model.generators.ConfiguredModel; -import net.minecraftforge.client.model.generators.ModelFile; import net.minecraftforge.client.model.generators.loaders.CompositeModelBuilder; -import net.minecraftforge.common.util.TransformationHelper; -import org.joml.Vector3f; import java.util.HashMap; import java.util.Locale; @@ -173,8 +167,7 @@ public class MachineBlocks { public static final BlockEntry CRAFTER = progressMachine("crafter", () -> MachineBlockEntities.CRAFTER) .register(); - public static final BlockEntry DRAIN = standardMachine("drain", () -> MachineBlockEntities.DRAIN) - .lang("Drain") + public static final BlockEntry DRAIN = progressMachine("drain", () -> MachineBlockEntities.DRAIN) .register(); //used when single methods needs to be overridden in the block class From 7072b0d676837678ed34df92cb2d62419d539161 Mon Sep 17 00:00:00 2001 From: mystchonky Date: Mon, 31 Jul 2023 22:33:19 +0530 Subject: [PATCH 022/154] Change TravelSavedData location and load the correct vars --- .../machines/common/blockentity/TravelAnchorBlockEntity.java | 5 ++++- .../java/com/enderio/base/common/travel/TravelSavedData.java | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java index 1043e6774f..2c0cee6e88 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java @@ -90,7 +90,10 @@ public void setVisibility(boolean visible) { @Override public void onLoad() { - getTravelData().addTravelTarget(createTravelTarget()); + AnchorTravelTarget target = getOrCreateTravelTarget(); + setName(target.getName()); + setIcon(target.getIcon()); + setVisibility(target.getVisibility()); super.onLoad(); } diff --git a/src/main/java/com/enderio/base/common/travel/TravelSavedData.java b/src/main/java/com/enderio/base/common/travel/TravelSavedData.java index dcba1de0d3..6e3aa7649a 100644 --- a/src/main/java/com/enderio/base/common/travel/TravelSavedData.java +++ b/src/main/java/com/enderio/base/common/travel/TravelSavedData.java @@ -26,7 +26,7 @@ public class TravelSavedData extends SavedData { public static TravelSavedData getTravelData(Level level) { if (level instanceof ServerLevel serverLevel) { - return serverLevel.getDataStorage().computeIfAbsent(TravelSavedData::load, TravelSavedData::new, "enderio_machines:traveldata"); + return serverLevel.getDataStorage().computeIfAbsent(TravelSavedData::load, TravelSavedData::new, "enderio_traveldata"); } else { if (clientInstance == null) { clientInstance = new TravelSavedData(); From 7c5c948e6e336c5de2d8d26531471c854c5ec2b5 Mon Sep 17 00:00:00 2001 From: mystchonky Date: Tue, 1 Aug 2023 00:34:13 +0530 Subject: [PATCH 023/154] try sync but it no sync --- .../blockentity/TravelAnchorBlockEntity.java | 51 ++++++++++--------- .../common/travel/AnchorTravelTarget.java | 8 ++- 2 files changed, 30 insertions(+), 29 deletions(-) diff --git a/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java index 2c0cee6e88..270e6f64d3 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java @@ -1,6 +1,8 @@ package com.enderio.machines.common.blockentity; import com.enderio.base.common.travel.TravelSavedData; +import com.enderio.core.common.network.slot.BooleanNetworkDataSlot; +import com.enderio.core.common.network.slot.StringNetworkDataSlot; import com.enderio.machines.common.blockentity.base.MachineBlockEntity; import com.enderio.machines.common.io.item.MachineInventoryLayout; import com.enderio.machines.common.io.item.SingleSlotAccess; @@ -18,20 +20,22 @@ import org.jetbrains.annotations.Nullable; import java.util.Optional; -import java.util.Random; public class TravelAnchorBlockEntity extends MachineBlockEntity { - private String name = ""; - private Item icon = Items.AIR; - private boolean visible = true; + AnchorTravelTarget target; public static final SingleSlotAccess GHOST = new SingleSlotAccess(); + private final StringNetworkDataSlot nameDataSlot; + private final BooleanNetworkDataSlot visibilityDataSlot; + public TravelAnchorBlockEntity(BlockEntityType pType, BlockPos pWorldPosition, BlockState pBlockState) { super(pType, pWorldPosition, pBlockState); - // addDataSlot(new StringNetworkDataSlot(() -> getName(), name -> setName(name))); - // addDataSlot(new ResourceLocationNetworkDataSlot(() -> ForgeRegistries.ITEMS.getKey(getIcon()), (loc) -> setIcon(ForgeRegistries.ITEMS.getValue(loc)))); - name = ('a' + new Random().nextInt(26)) + ""; + nameDataSlot = new StringNetworkDataSlot(() -> getName(), name -> setName(name)); + visibilityDataSlot = new BooleanNetworkDataSlot(() -> getVisibility(), visible -> setVisibility(visible)); + addDataSlot(nameDataSlot); + addDataSlot(visibilityDataSlot); + target = getOrCreateTravelTarget(); } @Nullable @@ -56,44 +60,43 @@ protected void onInventoryContentsChanged(int slot) { @Nullable public String getName() { - return name; + return target.getName(); } public void setName(String name) { - this.name = name; - AnchorTravelTarget target = getOrCreateTravelTarget(); - target.setName(name); + setChanged(); + if (level != null && level.isClientSide()) { + clientUpdateSlot(nameDataSlot, name); + } else { + target.setName(name); + } } public Item getIcon() { - setChanged(); - return icon; + return target.getIcon(); } public void setIcon(Item icon) { setChanged(); - this.icon = icon; - AnchorTravelTarget target = getOrCreateTravelTarget(); target.setIcon(icon != Items.AIR ? icon : null); } public boolean getVisibility() { - return visible; + return target.getVisibility(); } public void setVisibility(boolean visible) { setChanged(); - this.visible = visible; - AnchorTravelTarget target = getOrCreateTravelTarget(); - target.setVisibility(visible); + if (level != null && level.isClientSide()) { + clientUpdateSlot(visibilityDataSlot, visible); + } else { + target.setVisibility(visible); + } } @Override public void onLoad() { - AnchorTravelTarget target = getOrCreateTravelTarget(); - setName(target.getName()); - setIcon(target.getIcon()); - setVisibility(target.getVisibility()); + target = getOrCreateTravelTarget(); super.onLoad(); } @@ -104,7 +107,7 @@ public void setRemoved() { } private AnchorTravelTarget createTravelTarget() { - return new AnchorTravelTarget(worldPosition, getName(), getIcon() == Items.AIR ? null : getIcon(), getVisibility()); + return new AnchorTravelTarget(worldPosition, "", Items.AIR, true); } private Optional getTravelTarget() { diff --git a/src/machines/java/com/enderio/machines/common/travel/AnchorTravelTarget.java b/src/machines/java/com/enderio/machines/common/travel/AnchorTravelTarget.java index 7e0b5de245..6c554f0d29 100644 --- a/src/machines/java/com/enderio/machines/common/travel/AnchorTravelTarget.java +++ b/src/machines/java/com/enderio/machines/common/travel/AnchorTravelTarget.java @@ -9,7 +9,6 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.Item; import net.minecraftforge.registries.ForgeRegistries; -import org.jetbrains.annotations.Nullable; import java.util.Objects; @@ -19,11 +18,11 @@ public class AnchorTravelTarget implements ITravelTarget { private final BlockPos pos; private String name; - @Nullable private Item icon; + private Item icon; private boolean visible; - public AnchorTravelTarget(BlockPos pos, String name, @Nullable Item icon, boolean visible) { + public AnchorTravelTarget(BlockPos pos, String name, Item icon, boolean visible) { this.pos = pos; this.name = name; this.icon = icon; @@ -79,12 +78,11 @@ public void setName(String name) { this.name = name; } - @Nullable public Item getIcon() { return icon; } - public void setIcon(@Nullable Item icon) { + public void setIcon(Item icon) { this.icon = icon; } From 4b5e64b1f6a15e63f7cf52968e2ca89c82009131 Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Tue, 1 Aug 2023 00:39:04 +0200 Subject: [PATCH 024/154] Fix syncing? --- .../common/block/TravelAnchorBlock.java | 9 ++++ .../blockentity/TravelAnchorBlockEntity.java | 43 ++++++++++--------- .../base/common/travel/TravelSavedData.java | 42 ++++++++---------- 3 files changed, 49 insertions(+), 45 deletions(-) diff --git a/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java b/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java index 9a237ff5e5..98bfccb3d6 100644 --- a/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java +++ b/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java @@ -1,10 +1,12 @@ package com.enderio.machines.common.block; import com.enderio.base.common.handler.TeleportHandler; +import com.enderio.machines.common.blockentity.TravelAnchorBlockEntity; import com.enderio.machines.common.init.MachineBlockEntities; import net.minecraft.core.BlockPos; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.player.Player; +import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.event.TickEvent; @@ -57,4 +59,11 @@ public static void sneak(TickEvent.PlayerTickEvent event) { } } + @Override + public void onRemove(BlockState state, Level level, BlockPos pos, BlockState newState, boolean movedByPiston) { + if (level.getBlockEntity(pos) instanceof TravelAnchorBlockEntity entity) { + entity.remove(); + } + super.onRemove(state, level, pos, newState, movedByPiston); + } } diff --git a/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java index 270e6f64d3..6252d5d3f7 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java @@ -1,5 +1,6 @@ package com.enderio.machines.common.blockentity; +import com.enderio.api.travel.ITravelTarget; import com.enderio.base.common.travel.TravelSavedData; import com.enderio.core.common.network.slot.BooleanNetworkDataSlot; import com.enderio.core.common.network.slot.StringNetworkDataSlot; @@ -31,11 +32,22 @@ public class TravelAnchorBlockEntity extends MachineBlockEntity { public TravelAnchorBlockEntity(BlockEntityType pType, BlockPos pWorldPosition, BlockState pBlockState) { super(pType, pWorldPosition, pBlockState); - nameDataSlot = new StringNetworkDataSlot(() -> getName(), name -> setName(name)); - visibilityDataSlot = new BooleanNetworkDataSlot(() -> getVisibility(), visible -> setVisibility(visible)); + nameDataSlot = new StringNetworkDataSlot(this::getName, name -> target.setName(name)); + visibilityDataSlot = new BooleanNetworkDataSlot(this::getVisibility, visible -> target.setVisibility(visible)); addDataSlot(nameDataSlot); addDataSlot(visibilityDataSlot); - target = getOrCreateTravelTarget(); + } + + public void remove() { + getTravelData().removeTravelTargetAt(worldPosition); + } + + @Override + public void setRemoved() { + if (level != null && level.isClientSide) { + remove(); + } + super.setRemoved(); } @Nullable @@ -64,7 +76,6 @@ public String getName() { } public void setName(String name) { - setChanged(); if (level != null && level.isClientSide()) { clientUpdateSlot(nameDataSlot, name); } else { @@ -77,7 +88,6 @@ public Item getIcon() { } public void setIcon(Item icon) { - setChanged(); target.setIcon(icon != Items.AIR ? icon : null); } @@ -86,7 +96,6 @@ public boolean getVisibility() { } public void setVisibility(boolean visible) { - setChanged(); if (level != null && level.isClientSide()) { clientUpdateSlot(visibilityDataSlot, visible); } else { @@ -100,22 +109,14 @@ public void onLoad() { super.onLoad(); } - @Override - public void setRemoved() { - getTravelData().removeTravelTargetAt(worldPosition); - super.setRemoved(); - } - - private AnchorTravelTarget createTravelTarget() { - return new AnchorTravelTarget(worldPosition, "", Items.AIR, true); - } - - private Optional getTravelTarget() { - return getTravelData().getTravelTarget(worldPosition).filter(target -> target instanceof AnchorTravelTarget).map(target -> (AnchorTravelTarget) target); - } - private AnchorTravelTarget getOrCreateTravelTarget() { - return getTravelTarget().orElse(createTravelTarget()); + Optional travelTarget = getTravelData().getTravelTarget(worldPosition); + if (travelTarget.isPresent() && travelTarget.get() instanceof AnchorTravelTarget anchorTravelTarget) { + return anchorTravelTarget; + } + AnchorTravelTarget anchorTravelTarget = new AnchorTravelTarget(worldPosition, "", Items.AIR, true); + getTravelData().addTravelTarget(anchorTravelTarget); + return anchorTravelTarget; } private TravelSavedData getTravelData() { diff --git a/src/main/java/com/enderio/base/common/travel/TravelSavedData.java b/src/main/java/com/enderio/base/common/travel/TravelSavedData.java index 6e3aa7649a..aab38b659b 100644 --- a/src/main/java/com/enderio/base/common/travel/TravelSavedData.java +++ b/src/main/java/com/enderio/base/common/travel/TravelSavedData.java @@ -10,7 +10,6 @@ import net.minecraft.server.level.ServerLevel; import net.minecraft.world.level.Level; import net.minecraft.world.level.saveddata.SavedData; -import net.minecraftforge.fml.util.thread.EffectiveSide; import java.util.Collection; import java.util.HashMap; @@ -20,22 +19,32 @@ public class TravelSavedData extends SavedData { - private static TravelSavedData clientInstance; + private static final TravelSavedData INSTANCE = new TravelSavedData(); - private Map travelTargets = new HashMap<>(); + private final Map travelTargets = new HashMap<>(); + + public TravelSavedData() { + + } + + public TravelSavedData(CompoundTag nbt) { + ListTag targets = nbt.getList("targets", Tag.TAG_COMPOUND); + targets.stream().map(anchorData -> (CompoundTag)anchorData) + .map(TravelRegistry::deserialize) + .flatMap(Optional::stream) + .forEach(target -> travelTargets.put(target.getPos(), target)); + } public static TravelSavedData getTravelData(Level level) { if (level instanceof ServerLevel serverLevel) { - return serverLevel.getDataStorage().computeIfAbsent(TravelSavedData::load, TravelSavedData::new, "enderio_traveldata"); + return serverLevel.getDataStorage().computeIfAbsent(TravelSavedData::new, TravelSavedData::new, "enderio_traveldata"); } else { - if (clientInstance == null) { - clientInstance = new TravelSavedData(); - } - return clientInstance; + return INSTANCE; } } public Optional getTravelTarget(BlockPos pos) { + boolean test = travelTargets.keySet().contains(pos); return Optional.ofNullable(travelTargets.get(pos)); } @@ -69,23 +78,8 @@ public CompoundTag save(CompoundTag nbt) { return nbt; } - private static TravelSavedData load(CompoundTag nbt) { - TravelSavedData data = new TravelSavedData(); - data.load(nbt.getList("targets", Tag.TAG_COMPOUND)); - return data; - } - - private void load(ListTag nbt) { - nbt.stream().map(anchorData -> (CompoundTag)anchorData) - .map(TravelRegistry::deserialize) - .flatMap(Optional::stream) - .forEach(target -> travelTargets.put(target.getPos(), target)); - } - - // Always save this data @Override public boolean isDirty() { - return EffectiveSide.get().isServer(); + return true; } - } From 5e460edca1bdeb898cf52cb34bc3746a7c97207c Mon Sep 17 00:00:00 2001 From: mystchonky Date: Tue, 1 Aug 2023 12:31:20 +0530 Subject: [PATCH 025/154] add slot for icon --- .../common/blockentity/TravelAnchorBlockEntity.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java index 6252d5d3f7..e9a07f2015 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java @@ -3,6 +3,7 @@ import com.enderio.api.travel.ITravelTarget; import com.enderio.base.common.travel.TravelSavedData; import com.enderio.core.common.network.slot.BooleanNetworkDataSlot; +import com.enderio.core.common.network.slot.ResourceLocationNetworkDataSlot; import com.enderio.core.common.network.slot.StringNetworkDataSlot; import com.enderio.machines.common.blockentity.base.MachineBlockEntity; import com.enderio.machines.common.io.item.MachineInventoryLayout; @@ -18,6 +19,7 @@ import net.minecraft.world.item.Items; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; +import net.minecraftforge.registries.ForgeRegistries; import org.jetbrains.annotations.Nullable; import java.util.Optional; @@ -29,13 +31,17 @@ public class TravelAnchorBlockEntity extends MachineBlockEntity { private final StringNetworkDataSlot nameDataSlot; private final BooleanNetworkDataSlot visibilityDataSlot; + private final ResourceLocationNetworkDataSlot iconDataSlot; public TravelAnchorBlockEntity(BlockEntityType pType, BlockPos pWorldPosition, BlockState pBlockState) { super(pType, pWorldPosition, pBlockState); nameDataSlot = new StringNetworkDataSlot(this::getName, name -> target.setName(name)); visibilityDataSlot = new BooleanNetworkDataSlot(this::getVisibility, visible -> target.setVisibility(visible)); + iconDataSlot = new ResourceLocationNetworkDataSlot(() -> ForgeRegistries.ITEMS.getKey(getIcon()), + loc -> target.setIcon(ForgeRegistries.ITEMS.getValue(loc))); addDataSlot(nameDataSlot); addDataSlot(visibilityDataSlot); + addDataSlot(iconDataSlot); } public void remove() { @@ -88,7 +94,12 @@ public Item getIcon() { } public void setIcon(Item icon) { - target.setIcon(icon != Items.AIR ? icon : null); + if (level != null && level.isClientSide()) { + clientUpdateSlot(iconDataSlot, ForgeRegistries.ITEMS.getKey(icon)); + } else { + target.setIcon(icon); + } + } public boolean getVisibility() { From aaf6c94d798e1360f95a578487fbe3ef76263e4d Mon Sep 17 00:00:00 2001 From: mystchonky Date: Tue, 1 Aug 2023 12:38:29 +0530 Subject: [PATCH 026/154] remove unnecessary import --- .../java/com/enderio/machines/EIOMachines.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/machines/java/com/enderio/machines/EIOMachines.java b/src/machines/java/com/enderio/machines/EIOMachines.java index ec74025049..925d8fc03e 100644 --- a/src/machines/java/com/enderio/machines/EIOMachines.java +++ b/src/machines/java/com/enderio/machines/EIOMachines.java @@ -1,22 +1,18 @@ package com.enderio.machines; import com.enderio.EnderIO; -import com.enderio.base.data.EIODataProvider; import com.enderio.api.integration.IntegrationManager; import com.enderio.api.travel.TravelRegistry; +import com.enderio.base.data.EIODataProvider; import com.enderio.machines.client.rendering.travel.TravelAnchorRenderer; import com.enderio.machines.common.config.MachinesConfig; import com.enderio.machines.common.init.*; -import com.enderio.machines.common.init.MachineBlockEntities; -import com.enderio.machines.common.init.MachineBlocks; -import com.enderio.machines.common.init.MachineMenus; -import com.enderio.machines.common.init.MachineRecipes; import com.enderio.machines.common.integrations.EnderIOMachinesSelfIntegration; import com.enderio.machines.common.lang.MachineLang; import com.enderio.machines.common.network.MachineNetwork; import com.enderio.machines.common.tag.MachineTags; -import com.enderio.machines.data.advancements.MachinesAdvancementGenerator; import com.enderio.machines.common.travel.AnchorTravelTarget; +import com.enderio.machines.data.advancements.MachinesAdvancementGenerator; import com.enderio.machines.data.recipes.*; import com.enderio.machines.data.souldata.SoulDataProvider; import com.enderio.machines.data.tag.MachineEntityTypeTagsProvider; @@ -36,7 +32,6 @@ import java.util.List; import java.util.concurrent.CompletableFuture; -import static com.enderio.EnderIO.loc; @Mod.EventBusSubscriber(modid = EnderIO.MODID, bus = Mod.EventBusSubscriber.Bus.MOD) public class EIOMachines { @@ -59,7 +54,7 @@ public static void onConstruct(FMLConstructModEvent event) { MachineNetwork.networkInit(); IntegrationManager.addIntegration(EnderIOMachinesSelfIntegration.INSTANCE); - TravelRegistry.addTravelEntry(loc("travel_anchor"), AnchorTravelTarget::new, TravelAnchorRenderer::new); + TravelRegistry.addTravelEntry(EnderIO.loc("travel_anchor"), AnchorTravelTarget::new, TravelAnchorRenderer::new); } @SubscribeEvent From f84eed782c425929c536df337c39ce7adae20621 Mon Sep 17 00:00:00 2001 From: mystchonky Date: Tue, 1 Aug 2023 12:38:58 +0530 Subject: [PATCH 027/154] Revert "remove unnecessary import" This reverts commit aaf6c94d798e1360f95a578487fbe3ef76263e4d. --- .../java/com/enderio/machines/EIOMachines.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/machines/java/com/enderio/machines/EIOMachines.java b/src/machines/java/com/enderio/machines/EIOMachines.java index 925d8fc03e..ec74025049 100644 --- a/src/machines/java/com/enderio/machines/EIOMachines.java +++ b/src/machines/java/com/enderio/machines/EIOMachines.java @@ -1,18 +1,22 @@ package com.enderio.machines; import com.enderio.EnderIO; +import com.enderio.base.data.EIODataProvider; import com.enderio.api.integration.IntegrationManager; import com.enderio.api.travel.TravelRegistry; -import com.enderio.base.data.EIODataProvider; import com.enderio.machines.client.rendering.travel.TravelAnchorRenderer; import com.enderio.machines.common.config.MachinesConfig; import com.enderio.machines.common.init.*; +import com.enderio.machines.common.init.MachineBlockEntities; +import com.enderio.machines.common.init.MachineBlocks; +import com.enderio.machines.common.init.MachineMenus; +import com.enderio.machines.common.init.MachineRecipes; import com.enderio.machines.common.integrations.EnderIOMachinesSelfIntegration; import com.enderio.machines.common.lang.MachineLang; import com.enderio.machines.common.network.MachineNetwork; import com.enderio.machines.common.tag.MachineTags; -import com.enderio.machines.common.travel.AnchorTravelTarget; import com.enderio.machines.data.advancements.MachinesAdvancementGenerator; +import com.enderio.machines.common.travel.AnchorTravelTarget; import com.enderio.machines.data.recipes.*; import com.enderio.machines.data.souldata.SoulDataProvider; import com.enderio.machines.data.tag.MachineEntityTypeTagsProvider; @@ -32,6 +36,7 @@ import java.util.List; import java.util.concurrent.CompletableFuture; +import static com.enderio.EnderIO.loc; @Mod.EventBusSubscriber(modid = EnderIO.MODID, bus = Mod.EventBusSubscriber.Bus.MOD) public class EIOMachines { @@ -54,7 +59,7 @@ public static void onConstruct(FMLConstructModEvent event) { MachineNetwork.networkInit(); IntegrationManager.addIntegration(EnderIOMachinesSelfIntegration.INSTANCE); - TravelRegistry.addTravelEntry(EnderIO.loc("travel_anchor"), AnchorTravelTarget::new, TravelAnchorRenderer::new); + TravelRegistry.addTravelEntry(loc("travel_anchor"), AnchorTravelTarget::new, TravelAnchorRenderer::new); } @SubscribeEvent From 0398554c5efcb1dbbf2ff7157a97c080870d0335 Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Tue, 1 Aug 2023 13:03:39 +0200 Subject: [PATCH 028/154] Update mob_generator.json --- .../assets/enderio/models/block/mob_generator.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/machines/resources/assets/enderio/models/block/mob_generator.json b/src/machines/resources/assets/enderio/models/block/mob_generator.json index 7e5c75f71e..3079f88620 100644 --- a/src/machines/resources/assets/enderio/models/block/mob_generator.json +++ b/src/machines/resources/assets/enderio/models/block/mob_generator.json @@ -1,12 +1,12 @@ { "parent": "minecraft:block/cube", "textures": { - "down": "enderio:block/machine_bottom", - "east": "enderio:block/machine_side", + "down": "enderio:block/soul_machine_bottom", + "east": "enderio:block/soul_machine_side", "north": "enderio:block/stirling_generator_front", "particle": "enderio:block/stirling_generator_front", - "south": "enderio:block/machine_back", - "up": "enderio:block/machine_top", - "west": "enderio:block/machine_side" + "south": "enderio:block/soul_machine_back", + "up": "enderio:block/soul_machine_top", + "west": "enderio:block/soul_machine_side" } } \ No newline at end of file From 51f4b402ce7a4f2d50ec523ea97a155176f40435 Mon Sep 17 00:00:00 2001 From: mystchonky Date: Tue, 1 Aug 2023 17:14:43 +0530 Subject: [PATCH 029/154] small refactor --- .../java/com/enderio/api/travel/TravelEntry.java | 3 ++- .../com/enderio/api/travel/TravelRegistry.java | 8 ++++---- ...ortationRenderer.java => TravelRenderer.java} | 2 +- .../rendering/travel/TravelAnchorRenderer.java | 16 +++++++++++----- .../RenderTravelTargets.java} | 4 ++-- .../TeleportParticleHandler.java | 2 +- 6 files changed, 21 insertions(+), 14 deletions(-) rename src/api/java/com/enderio/api/travel/{TeleportationRenderer.java => TravelRenderer.java} (76%) rename src/main/java/com/enderio/base/client/renderer/{teleportation/RenderTeleportTargets.java => travel/RenderTravelTargets.java} (95%) rename src/main/java/com/enderio/base/client/renderer/{teleportation => travel}/TeleportParticleHandler.java (98%) diff --git a/src/api/java/com/enderio/api/travel/TravelEntry.java b/src/api/java/com/enderio/api/travel/TravelEntry.java index 6be2d23e11..659205583d 100644 --- a/src/api/java/com/enderio/api/travel/TravelEntry.java +++ b/src/api/java/com/enderio/api/travel/TravelEntry.java @@ -5,4 +5,5 @@ import net.minecraftforge.common.util.Lazy; import java.util.function.Function; -public record TravelEntry(ResourceLocation serializationName, Function constructor, Lazy> renderer) {} +public record TravelEntry(ResourceLocation serializationName, Function constructor, + Lazy> renderer) {} diff --git a/src/api/java/com/enderio/api/travel/TravelRegistry.java b/src/api/java/com/enderio/api/travel/TravelRegistry.java index 1a0ecefce7..b74ff9a784 100644 --- a/src/api/java/com/enderio/api/travel/TravelRegistry.java +++ b/src/api/java/com/enderio/api/travel/TravelRegistry.java @@ -13,10 +13,10 @@ @ApiStatus.Internal public class TravelRegistry { - private static final Map> registry = new HashMap<>(); - public static void addTravelEntry(ResourceLocation serializationName, Function constructor, Lazy> renderer) { + public static void addTravelEntry(ResourceLocation serializationName, Function constructor, + Lazy> renderer) { registry.put(serializationName, new TravelEntry<>(serializationName, constructor, renderer)); } @@ -24,8 +24,8 @@ public static void addTravelEntry(TravelEntry trave registry.put(travelEntry.serializationName(), travelEntry); } - public static TeleportationRenderer getRenderer(T entry) { - return (TeleportationRenderer) registry.get(entry.getSerializationName()).renderer().get(); + public static TravelRenderer getRenderer(T entry) { + return (TravelRenderer) registry.get(entry.getSerializationName()).renderer().get(); } public static Optional deserialize(CompoundTag nbt) { diff --git a/src/api/java/com/enderio/api/travel/TeleportationRenderer.java b/src/api/java/com/enderio/api/travel/TravelRenderer.java similarity index 76% rename from src/api/java/com/enderio/api/travel/TeleportationRenderer.java rename to src/api/java/com/enderio/api/travel/TravelRenderer.java index 25807193f1..0bc8e0c9e6 100644 --- a/src/api/java/com/enderio/api/travel/TeleportationRenderer.java +++ b/src/api/java/com/enderio/api/travel/TravelRenderer.java @@ -3,6 +3,6 @@ import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.renderer.LevelRenderer; -public interface TeleportationRenderer { +public interface TravelRenderer { void render(T travelData, LevelRenderer levelRenderer, PoseStack poseStack); } \ No newline at end of file diff --git a/src/machines/java/com/enderio/machines/client/rendering/travel/TravelAnchorRenderer.java b/src/machines/java/com/enderio/machines/client/rendering/travel/TravelAnchorRenderer.java index b84e073d7f..bc9bb04769 100644 --- a/src/machines/java/com/enderio/machines/client/rendering/travel/TravelAnchorRenderer.java +++ b/src/machines/java/com/enderio/machines/client/rendering/travel/TravelAnchorRenderer.java @@ -1,25 +1,31 @@ package com.enderio.machines.client.rendering.travel; -import com.enderio.api.travel.TeleportationRenderer; +import com.enderio.api.travel.TravelRenderer; import com.enderio.machines.common.travel.AnchorTravelTarget; import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.blaze3d.vertex.VertexConsumer; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.LevelRenderer; import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.texture.OverlayTexture; -import net.minecraft.world.level.block.Blocks; +import net.minecraft.client.resources.model.BakedModel; +import net.minecraft.world.level.block.state.BlockState; -public class TravelAnchorRenderer implements TeleportationRenderer { +public class TravelAnchorRenderer implements TravelRenderer { @Override public void render(AnchorTravelTarget travelData, LevelRenderer levelRenderer, PoseStack poseStack) { if (!travelData.getVisibility()) return; poseStack.pushPose(); poseStack.translate(travelData.getPos().getX(), travelData.getPos().getY(), travelData.getPos().getZ()); - //TODO: Render the Travel Anchor name icon and do some other stuff, pls Crazy, be a rendering genius Minecraft mc = Minecraft.getInstance(); MultiBufferSource.BufferSource bs = mc.renderBuffers().bufferSource(); - mc.getBlockRenderer().renderSingleBlock(Blocks.AMETHYST_BLOCK.defaultBlockState(), poseStack, bs, 0xF000F0, OverlayTexture.NO_OVERLAY); + BlockState state = mc.level.getBlockState(travelData.getPos()); + BakedModel model = mc.getBlockRenderer().getBlockModel(state); + VertexConsumer vertex = bs.getBuffer(RenderType.solid()); + mc.getBlockRenderer().getModelRenderer().renderModel(poseStack.last(), vertex, state, model, 1, 1, 1, 0xF000F0, OverlayTexture.NO_OVERLAY); + // mc.getBlockRenderer().renderSingleBlock(state, poseStack, bs, 0xF000F0, OverlayTexture.NO_OVERLAY); bs.endBatch(); poseStack.popPose(); } diff --git a/src/main/java/com/enderio/base/client/renderer/teleportation/RenderTeleportTargets.java b/src/main/java/com/enderio/base/client/renderer/travel/RenderTravelTargets.java similarity index 95% rename from src/main/java/com/enderio/base/client/renderer/teleportation/RenderTeleportTargets.java rename to src/main/java/com/enderio/base/client/renderer/travel/RenderTravelTargets.java index 6c7e15e4db..ab9f57030e 100644 --- a/src/main/java/com/enderio/base/client/renderer/teleportation/RenderTeleportTargets.java +++ b/src/main/java/com/enderio/base/client/renderer/travel/RenderTravelTargets.java @@ -1,4 +1,4 @@ -package com.enderio.base.client.renderer.teleportation; +package com.enderio.base.client.renderer.travel; import com.enderio.api.travel.ITravelTarget; import com.enderio.api.travel.TravelRegistry; @@ -16,7 +16,7 @@ import net.minecraftforge.fml.common.Mod; @Mod.EventBusSubscriber(value = Dist.CLIENT) -public class RenderTeleportTargets { +public class RenderTravelTargets { @SubscribeEvent public static void renderLevel(RenderLevelStageEvent event) { diff --git a/src/main/java/com/enderio/base/client/renderer/teleportation/TeleportParticleHandler.java b/src/main/java/com/enderio/base/client/renderer/travel/TeleportParticleHandler.java similarity index 98% rename from src/main/java/com/enderio/base/client/renderer/teleportation/TeleportParticleHandler.java rename to src/main/java/com/enderio/base/client/renderer/travel/TeleportParticleHandler.java index 69c42bde69..7aaccb5f10 100644 --- a/src/main/java/com/enderio/base/client/renderer/teleportation/TeleportParticleHandler.java +++ b/src/main/java/com/enderio/base/client/renderer/travel/TeleportParticleHandler.java @@ -1,4 +1,4 @@ -package com.enderio.base.client.renderer.teleportation; +package com.enderio.base.client.renderer.travel; import com.enderio.base.common.handler.TeleportHandler; import net.minecraft.client.Minecraft; From aab2503c5708fad76ab7747d520f2067fecd82f6 Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Tue, 1 Aug 2023 15:56:39 +0200 Subject: [PATCH 030/154] Update MachineBlocks.java --- .../enderio/machines/common/init/MachineBlocks.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java b/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java index 0780215bbd..7b11410c05 100644 --- a/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java +++ b/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java @@ -124,8 +124,12 @@ public class MachineBlocks { .lang("Soul Binder") .register(); - public static final BlockEntry POWERED_SPAWNER = progressMachine("powered_spawner", () -> MachineBlockEntities.POWERED_SPAWNER) + public static final BlockEntry POWERED_SPAWNER = REGISTRATE + .block("powered_spawner", p -> new ProgressMachineBlock(p, MachineBlockEntities.POWERED_SPAWNER)) + .properties(props -> props.strength(2.5f, 8).noOcclusion()) .loot((l,t) -> MachinesLootTable.copyNBTSingleCap(l, t, MachineNBTKeys.ENTITY_STORAGE)) + .tag(BlockTags.NEEDS_IRON_TOOL, BlockTags.MINEABLE_WITH_PICKAXE) + .blockstate(MachineModelUtil::progressMachineBlock) .item(SoulBoundItem::new) .tab(EIOCreativeTabs.MACHINES) .build() @@ -170,7 +174,12 @@ public class MachineBlocks { public static final BlockEntry CRAFTER = progressMachine("crafter", () -> MachineBlockEntities.CRAFTER) .register(); - public static final BlockEntry MOB_GENERATOR = progressMachine("mob_generator", () -> MachineBlockEntities.MOB_GENERATOR) + public static final BlockEntry MOB_GENERATOR = REGISTRATE + .block("mob_generator", p -> new ProgressMachineBlock(p, MachineBlockEntities.MOB_GENERATOR)) + .properties(props -> props.strength(2.5f, 8).noOcclusion()) + .loot(MachinesLootTable::copyNBT) + .tag(BlockTags.NEEDS_IRON_TOOL, BlockTags.MINEABLE_WITH_PICKAXE) + .blockstate(MachineModelUtil::progressMachineBlock) .item(SoulBoundItem::new) .tab(EIOCreativeTabs.MACHINES) .build() From d7073f87d5b24ca13d885cc92822b2806e39d53a Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Tue, 1 Aug 2023 23:22:43 +0200 Subject: [PATCH 031/154] Rename soulbounditem --- .../com/enderio/machines/common/init/MachineBlocks.java | 6 +++--- .../item/{SoulBoundItem.java => BoundSoulBlockItem.java} | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) rename src/machines/java/com/enderio/machines/common/item/{SoulBoundItem.java => BoundSoulBlockItem.java} (90%) diff --git a/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java b/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java index 7b11410c05..bfbe634c57 100644 --- a/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java +++ b/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java @@ -15,7 +15,7 @@ import com.enderio.machines.common.blockentity.solar.SolarPanelTier; import com.enderio.machines.common.item.CapacitorBankItem; import com.enderio.machines.common.item.FluidTankItem; -import com.enderio.machines.common.item.SoulBoundItem; +import com.enderio.machines.common.item.BoundSoulBlockItem; import com.enderio.machines.data.loot.MachinesLootTable; import com.enderio.machines.data.model.MachineModelUtil; import com.google.common.collect.ImmutableMap; @@ -130,7 +130,7 @@ public class MachineBlocks { .loot((l,t) -> MachinesLootTable.copyNBTSingleCap(l, t, MachineNBTKeys.ENTITY_STORAGE)) .tag(BlockTags.NEEDS_IRON_TOOL, BlockTags.MINEABLE_WITH_PICKAXE) .blockstate(MachineModelUtil::progressMachineBlock) - .item(SoulBoundItem::new) + .item(BoundSoulBlockItem::new) .tab(EIOCreativeTabs.MACHINES) .build() .register(); @@ -180,7 +180,7 @@ public class MachineBlocks { .loot(MachinesLootTable::copyNBT) .tag(BlockTags.NEEDS_IRON_TOOL, BlockTags.MINEABLE_WITH_PICKAXE) .blockstate(MachineModelUtil::progressMachineBlock) - .item(SoulBoundItem::new) + .item(BoundSoulBlockItem::new) .tab(EIOCreativeTabs.MACHINES) .build() .register(); diff --git a/src/machines/java/com/enderio/machines/common/item/SoulBoundItem.java b/src/machines/java/com/enderio/machines/common/item/BoundSoulBlockItem.java similarity index 90% rename from src/machines/java/com/enderio/machines/common/item/SoulBoundItem.java rename to src/machines/java/com/enderio/machines/common/item/BoundSoulBlockItem.java index 4969d0236b..ac3d0ea4f6 100644 --- a/src/machines/java/com/enderio/machines/common/item/SoulBoundItem.java +++ b/src/machines/java/com/enderio/machines/common/item/BoundSoulBlockItem.java @@ -18,9 +18,9 @@ import java.util.List; -public class SoulBoundItem extends BlockItem implements IMultiCapabilityItem, IAdvancedTooltipProvider { +public class BoundSoulBlockItem extends BlockItem implements IMultiCapabilityItem, IAdvancedTooltipProvider { - public SoulBoundItem(Block pBlock, Properties pProperties) { + public BoundSoulBlockItem(Block pBlock, Properties pProperties) { super(pBlock, pProperties); } From cc55e9f4005ae726b1bfdfbfdfb44e5de766c087 Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Wed, 2 Aug 2023 00:39:34 +0200 Subject: [PATCH 032/154] Update MachineBlockEntity.java --- .../machines/common/blockentity/base/MachineBlockEntity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/machines/java/com/enderio/machines/common/blockentity/base/MachineBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/base/MachineBlockEntity.java index d7d97b300f..58563698de 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/base/MachineBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/base/MachineBlockEntity.java @@ -283,7 +283,7 @@ public void increaseRange() { if (this.range < getMaxRange()) { if (level != null && level.isClientSide()) { clientUpdateSlot(rangeDataSlot, range+1); - } this.range++; + } else this.range++; } } From ba4c5cb339e524f9667fe09c300069d1acf6e435 Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Wed, 2 Aug 2023 00:43:59 +0200 Subject: [PATCH 033/154] add temp model --- .../resources/assets/enderio/models/block/drain.json | 12 ++++++++++++ .../assets/enderio/models/block/drain_active.json | 6 ++++++ 2 files changed, 18 insertions(+) create mode 100644 src/machines/resources/assets/enderio/models/block/drain.json create mode 100644 src/machines/resources/assets/enderio/models/block/drain_active.json diff --git a/src/machines/resources/assets/enderio/models/block/drain.json b/src/machines/resources/assets/enderio/models/block/drain.json new file mode 100644 index 0000000000..25c3fff54d --- /dev/null +++ b/src/machines/resources/assets/enderio/models/block/drain.json @@ -0,0 +1,12 @@ +{ + "parent": "minecraft:block/cube", + "textures": { + "down": "enderio:block/machine_bottom", + "east": "enderio:block/machine_side", + "north": "enderio:block/impulse_hopper_front", + "particle": "enderio:block/impulse_hopper_front", + "south": "enderio:block/machine_back", + "up": "enderio:block/machine_top", + "west": "enderio:block/machine_side" + } +} \ No newline at end of file diff --git a/src/machines/resources/assets/enderio/models/block/drain_active.json b/src/machines/resources/assets/enderio/models/block/drain_active.json new file mode 100644 index 0000000000..9ad8f0b6bc --- /dev/null +++ b/src/machines/resources/assets/enderio/models/block/drain_active.json @@ -0,0 +1,6 @@ +{ + "parent": "enderio:block/impulse_hopper", + "textures": { + "north": "enderio:block/impulse_hopper_front_active" + } +} \ No newline at end of file From 97dec3a0d961cd26805030df385fb7379b5cc50a Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Wed, 2 Aug 2023 01:08:43 +0200 Subject: [PATCH 034/154] Update DrainBlockEntity.java --- .../enderio/machines/common/blockentity/DrainBlockEntity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/machines/java/com/enderio/machines/common/blockentity/DrainBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/DrainBlockEntity.java index 6b637d5fb3..6a6d67ea62 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/DrainBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/DrainBlockEntity.java @@ -109,7 +109,7 @@ public void drainFluids() { //Not a valid fluid FluidState fluidState = level.getFluidState(pos); - if (fluidState.isEmpty() || !fluidState.isSource() || getFluidTankNN().getFluid().getFluid().isSame(fluidState.getType())) { + if (fluidState.isEmpty() || !fluidState.isSource() || !getFluidTankNN().getFluid().getFluid().isSame(fluidState.getType())) { continue; } From 97f1131235f0aec9eec5a939430be39ac2910f25 Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Wed, 2 Aug 2023 14:33:16 +0200 Subject: [PATCH 035/154] Update DrainBlockEntity.java --- .../common/blockentity/DrainBlockEntity.java | 72 +++++++++++-------- 1 file changed, 43 insertions(+), 29 deletions(-) diff --git a/src/machines/java/com/enderio/machines/common/blockentity/DrainBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/DrainBlockEntity.java index 6a6d67ea62..b1369cbf50 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/DrainBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/DrainBlockEntity.java @@ -2,12 +2,15 @@ import com.enderio.api.capacitor.CapacitorModifier; import com.enderio.api.capacitor.QuadraticScalable; +import com.enderio.api.io.IIOConfig; +import com.enderio.api.io.IOMode; import com.enderio.api.io.energy.EnergyIOMode; import com.enderio.core.common.network.slot.BooleanNetworkDataSlot; import com.enderio.core.common.network.slot.FluidStackNetworkDataSlot; import com.enderio.core.common.network.slot.IntegerNetworkDataSlot; import com.enderio.machines.common.blockentity.base.PoweredMachineBlockEntity; import com.enderio.machines.common.config.MachinesConfig; +import com.enderio.machines.common.io.FixedIOConfig; import com.enderio.machines.common.io.fluid.MachineFluidTank; import com.enderio.machines.common.io.item.MachineInventoryLayout; import com.enderio.machines.common.menu.DrainMenu; @@ -20,7 +23,9 @@ import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.level.material.FluidState; +import net.minecraft.world.level.material.Fluids; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidType; import net.minecraftforge.fluids.capability.IFluidHandler; @@ -40,6 +45,7 @@ public class DrainBlockEntity extends PoweredMachineBlockEntity { private int currentIndex = 0; private boolean fluidFound = false; private int consumed = 0; + private Fluid type = Fluids.EMPTY; public DrainBlockEntity(BlockEntityType type, BlockPos worldPosition, BlockState blockState) { @@ -76,6 +82,11 @@ public void serverTick() { super.serverTick(); } + @Override + protected IIOConfig createIOConfig() { + return new FixedIOConfig(IOMode.PUSH); + } + @Override protected boolean isActive() { if (!canAct()) { @@ -85,44 +96,46 @@ protected boolean isActive() { if (fluidState.isEmpty() || !fluidState.isSource()) { return false; } - return getFluidTankNN().fill(new FluidStack(fluidState.getType(), FluidType.BUCKET_VOLUME), IFluidHandler.FluidAction.SIMULATE) == FluidType.BUCKET_VOLUME; + type = fluidState.getType(); + return getFluidTankNN().fill(new FluidStack(type, FluidType.BUCKET_VOLUME), IFluidHandler.FluidAction.SIMULATE) == FluidType.BUCKET_VOLUME; } public void drainFluids() { - for (int i = currentIndex; i < Math.min(currentIndex + 3, positions.size()); i++) { - currentIndex = i; - BlockPos pos = positions.get(i); + BlockPos pos = positions.get(currentIndex); - //Skip, as this is the last checked block - if (pos.equals(worldPosition.below())) { - continue; - } + //Skip, as this is the last checked block + if (pos.equals(worldPosition.below())) { + currentIndex++; + return; + } - //Last block, so reset - if (currentIndex + 1 == positions.size()) { - if (!fluidFound) { - pos = worldPosition.below(); //No fluids found, so consume the last block under the drain - } + //Last block, so reset + if (currentIndex + 1 == positions.size()) { + if (!fluidFound) { + pos = worldPosition.below(); //No fluids found, so consume the last block under the drain + } else { currentIndex = 0; fluidFound = false; } + } - //Not a valid fluid - FluidState fluidState = level.getFluidState(pos); - if (fluidState.isEmpty() || !fluidState.isSource() || !getFluidTankNN().getFluid().getFluid().isSame(fluidState.getType())) { - continue; - } + //Not a valid fluid + FluidState fluidState = level.getFluidState(pos); + if (fluidState.isEmpty() || !fluidState.isSource() || !getFluidTankNN().isFluidValid(new FluidStack(fluidState.getType(),1))) { + currentIndex++; + return; + } - //Fluid found, try to consume it - fluidFound = true; - if (getFluidTankNN().fill(new FluidStack(fluidState.getType(), FluidType.BUCKET_VOLUME), IFluidHandler.FluidAction.SIMULATE) == FluidType.BUCKET_VOLUME) { - if (consumed == ENERGY_PER_BUCKET) { - level.setBlock(pos, Blocks.AIR.defaultBlockState(), Block.UPDATE_ALL); - getFluidTankNN().fill(new FluidStack(fluidState.getType(), FluidType.BUCKET_VOLUME), IFluidHandler.FluidAction.EXECUTE); - consumed = 0; - } else { - consumed += getEnergyStorage().consumeEnergy(ENERGY_PER_BUCKET-consumed, false); - } + //Fluid found, try to consume it + fluidFound = true; + if (getFluidTankNN().fill(new FluidStack(fluidState.getType(), FluidType.BUCKET_VOLUME), IFluidHandler.FluidAction.SIMULATE) == FluidType.BUCKET_VOLUME) { + if (consumed == ENERGY_PER_BUCKET) { + level.setBlock(pos, Blocks.AIR.defaultBlockState(), Block.UPDATE_ALL); + getFluidTankNN().fill(new FluidStack(fluidState.getType(), FluidType.BUCKET_VOLUME), IFluidHandler.FluidAction.EXECUTE); + consumed = 0; + currentIndex++; + } else { + consumed += getEnergyStorage().consumeEnergy(ENERGY_PER_BUCKET-consumed, false); } } } @@ -159,11 +172,12 @@ private void updateLocations() { for (BlockPos pos : BlockPos.betweenClosed(worldPosition.offset(-range,-range*2 - 1,-range), worldPosition.offset(range,-1,range))) { positions.add(pos.immutable()); //Need to make it immutable } + currentIndex = 0; } @Override protected @Nullable FluidTank createFluidTank() { - return new MachineFluidTank(CAPACITY, this); + return new MachineFluidTank(CAPACITY, f-> type.isSame(f.getFluid()),this); } @Nullable From b29d8614e36d4bcd2d804f0d45f5b6a2002029a6 Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Wed, 2 Aug 2023 17:56:24 +0200 Subject: [PATCH 036/154] Update DrainBlockEntity.java --- .../enderio/machines/common/blockentity/DrainBlockEntity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/machines/java/com/enderio/machines/common/blockentity/DrainBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/DrainBlockEntity.java index b1369cbf50..67ba06e8dc 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/DrainBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/DrainBlockEntity.java @@ -36,7 +36,7 @@ import java.util.List; public class DrainBlockEntity extends PoweredMachineBlockEntity { - public static final String CONSUMED = "consumed"; + public static final String CONSUMED = "Consumed"; private static final QuadraticScalable ENERGY_CAPACITY = new QuadraticScalable(CapacitorModifier.ENERGY_CAPACITY, MachinesConfig.COMMON.ENERGY.DRAIN_CAPACITY); private static final QuadraticScalable ENERGY_USAGE = new QuadraticScalable(CapacitorModifier.ENERGY_USE, MachinesConfig.COMMON.ENERGY.DRAIN_USAGE); private static final int CAPACITY = 3 * FluidType.BUCKET_VOLUME; From b90f16ad0b27ab914e5c29fb6ea9466057dfda1f Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Wed, 2 Aug 2023 20:45:00 +0200 Subject: [PATCH 037/154] Update MachineBlocks.java --- .../java/com/enderio/machines/common/init/MachineBlocks.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java b/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java index e90b9fa328..7e669e0be2 100644 --- a/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java +++ b/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java @@ -3,7 +3,6 @@ import com.enderio.EnderIO; import com.enderio.base.common.init.EIOCreativeTabs; import com.enderio.core.data.model.EIOModel; -import com.enderio.machines.common.MachineNBTKeys; import com.enderio.machines.common.block.CapacitorBankBlock; import com.enderio.machines.common.block.MachineBlock; import com.enderio.machines.common.block.ProgressMachineBlock; @@ -13,9 +12,9 @@ import com.enderio.machines.common.blockentity.capacitorbank.CapacitorTier; import com.enderio.machines.common.blockentity.solar.SolarPanelBlockEntity; import com.enderio.machines.common.blockentity.solar.SolarPanelTier; +import com.enderio.machines.common.item.BoundSoulBlockItem; import com.enderio.machines.common.item.CapacitorBankItem; import com.enderio.machines.common.item.FluidTankItem; -import com.enderio.machines.common.item.BoundSoulBlockItem; import com.enderio.machines.data.loot.MachinesLootTable; import com.enderio.machines.data.model.MachineModelUtil; import com.google.common.collect.ImmutableMap; @@ -130,7 +129,7 @@ public class MachineBlocks { .properties(props -> props.strength(2.5f, 8)) .blockstate(MachineModelUtil::progressMachineBlock) .tag(BlockTags.NEEDS_IRON_TOOL, BlockTags.MINEABLE_WITH_PICKAXE) - .item(PoweredSpawnerItem::new) + .item(BoundSoulBlockItem::new) .tab(EIOCreativeTabs.MACHINES) .build() .register(); From 61c45f6e848f25dae550c7823b5c7708d889dc5f Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Wed, 2 Aug 2023 20:51:14 +0200 Subject: [PATCH 038/154] add recipe --- .../recipes/misc/mob_generator.json | 35 +++++++++++++++++++ .../data/enderio/recipes/mob_generator.json | 30 ++++++++++++++++ .../data/recipes/MachineRecipeProvider.java | 13 +++++++ 3 files changed, 78 insertions(+) create mode 100644 src/generated/resources/data/enderio/advancements/recipes/misc/mob_generator.json create mode 100644 src/generated/resources/data/enderio/recipes/mob_generator.json diff --git a/src/generated/resources/data/enderio/advancements/recipes/misc/mob_generator.json b/src/generated/resources/data/enderio/advancements/recipes/misc/mob_generator.json new file mode 100644 index 0000000000..8faf170b61 --- /dev/null +++ b/src/generated/resources/data/enderio/advancements/recipes/misc/mob_generator.json @@ -0,0 +1,35 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient": { + "conditions": { + "items": [ + { + "items": [ + "enderio:ensouled_chassis" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "enderio:mob_generator" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_ingredient", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "enderio:mob_generator" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/src/generated/resources/data/enderio/recipes/mob_generator.json b/src/generated/resources/data/enderio/recipes/mob_generator.json new file mode 100644 index 0000000000..617079c577 --- /dev/null +++ b/src/generated/resources/data/enderio/recipes/mob_generator.json @@ -0,0 +1,30 @@ +{ + "type": "enderio:shaped_entity_storage", + "category": "misc", + "key": { + "B": { + "item": "minecraft:bucket" + }, + "C": { + "item": "enderio:ensouled_chassis" + }, + "G": { + "tag": "enderio:fused_quartz" + }, + "I": { + "item": "enderio:soularium_ingot" + }, + "Z": { + "item": "enderio:zombie_electrode" + } + }, + "pattern": [ + "IGI", + "BCB", + "IZI" + ], + "result": { + "item": "enderio:mob_generator" + }, + "show_notification": true +} \ No newline at end of file diff --git a/src/machines/java/com/enderio/machines/data/recipes/MachineRecipeProvider.java b/src/machines/java/com/enderio/machines/data/recipes/MachineRecipeProvider.java index d61857fede..1b896c5aba 100644 --- a/src/machines/java/com/enderio/machines/data/recipes/MachineRecipeProvider.java +++ b/src/machines/java/com/enderio/machines/data/recipes/MachineRecipeProvider.java @@ -229,6 +229,19 @@ protected void buildRecipes(Consumer finishedRecipeConsumer) { .unlockedBy("has_ingredient", InventoryChangeTrigger.TriggerInstance.hasItems(EIOBlocks.ENSOULED_CHASSIS)) .save(finishedRecipeConsumer); + ShapedEntityStorageRecipeBuilder + .shaped(RecipeCategory.MISC, MachineBlocks.MOB_GENERATOR) + .define('I', EIOItems.SOULARIUM_INGOT) //TODO Maybe also soulchains? + .define('B', Items.BUCKET) + .define('C', EIOBlocks.ENSOULED_CHASSIS) + .define('Z', EIOItems.ZOMBIE_ELECTRODE) + .define('G', EIOTags.Items.FUSED_QUARTZ) + .pattern("IGI") + .pattern("BCB") + .pattern("IZI") + .unlockedBy("has_ingredient", InventoryChangeTrigger.TriggerInstance.hasItems(EIOBlocks.ENSOULED_CHASSIS)) + .save(finishedRecipeConsumer); + ShapedRecipeBuilder .shaped(RecipeCategory.MISC, MachineBlocks.VACUUM_CHEST.get()) .define('I', Tags.Items.INGOTS_IRON) From 35cdc3c861a1ac24aeaf4125f03977573ca08333 Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Wed, 2 Aug 2023 22:38:06 +0200 Subject: [PATCH 039/154] Add more info in the gui --- .../client/gui/screen/MobGeneratorScreen.java | 30 +++++++++ .../common/network/MachineNetwork.java | 3 + .../network/MobGeneratorSoulPacket.java | 66 +++++++++++++++++++ .../network/PoweredSpawnerSoulPacket.java | 4 +- .../souldata/SoulDataReloadListener.java | 1 - 5 files changed, 100 insertions(+), 4 deletions(-) create mode 100644 src/machines/java/com/enderio/machines/common/network/MobGeneratorSoulPacket.java diff --git a/src/machines/java/com/enderio/machines/client/gui/screen/MobGeneratorScreen.java b/src/machines/java/com/enderio/machines/client/gui/screen/MobGeneratorScreen.java index aa7c7ebc76..be52b9cd62 100644 --- a/src/machines/java/com/enderio/machines/client/gui/screen/MobGeneratorScreen.java +++ b/src/machines/java/com/enderio/machines/client/gui/screen/MobGeneratorScreen.java @@ -9,9 +9,16 @@ import com.enderio.machines.client.gui.widget.FluidStackWidget; import com.enderio.machines.client.gui.widget.ioconfig.IOConfigButton; import com.enderio.machines.common.menu.MobGeneratorMenu; +import com.enderio.machines.common.network.MobGeneratorSoulPacket; +import com.enderio.machines.common.souldata.GeneratorSoul; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.player.Inventory; +import net.minecraftforge.registries.ForgeRegistries; + +import java.util.Optional; public class MobGeneratorScreen extends EIOScreen{ @@ -36,6 +43,29 @@ protected void init() { } + @Override + protected void renderLabels(GuiGraphics guiGraphics, int pMouseX, int pMouseY) { + super.renderLabels(guiGraphics, pMouseX, pMouseY); + Optional rl = getMenu().getBlockEntity().getEntityType(); + if (rl.isPresent()) { + EntityType type = ForgeRegistries.ENTITY_TYPES.getValue(rl.get()); + if (type != null && ForgeRegistries.ENTITY_TYPES.getKey(type).equals(rl.get())) { // check we don't get the default pig + String name = type.getDescription().getString(); + guiGraphics.drawString(font, name, imageWidth / 2f - font.width(name) / 2f, 10, 4210752, false); + } else { + guiGraphics.drawString(font, rl.get().toString(), imageWidth / 2f - font.width(rl.get().toString()) / 2f, 10, 4210752, false); + } + GeneratorSoul.SoulData data = MobGeneratorSoulPacket.SYNCED_DATA.get(rl.get()); + if (data != null) { + guiGraphics.drawString(font, data.tickpermb() + " t/mb", imageWidth / 2f + 20 - font.width(data.tickpermb() + "") / 2f, 50, 4210752, false); + guiGraphics.drawString(font, data.powerpermb() + " µI/mb", imageWidth / 2f + 20 - font.width(data.powerpermb() + "") / 2f, 60, 4210752, false); + + } + } + + + } + @Override public ResourceLocation getBackgroundImage() { return BG_TEXTURE; diff --git a/src/machines/java/com/enderio/machines/common/network/MachineNetwork.java b/src/machines/java/com/enderio/machines/common/network/MachineNetwork.java index eb3660b222..8e2716b052 100644 --- a/src/machines/java/com/enderio/machines/common/network/MachineNetwork.java +++ b/src/machines/java/com/enderio/machines/common/network/MachineNetwork.java @@ -1,6 +1,7 @@ package com.enderio.machines.common.network; import com.enderio.core.common.network.CoreNetwork; +import com.enderio.machines.common.souldata.GeneratorSoul; import com.enderio.machines.common.souldata.SpawnerSoul; public class MachineNetwork { @@ -8,8 +9,10 @@ public class MachineNetwork { public static void networkInit() { //Sync soul data (optional) SpawnerSoul.SPAWNER.subscribeAsSyncable(PoweredSpawnerSoulPacket::new); + GeneratorSoul.GENERATOR.subscribeAsSyncable(MobGeneratorSoulPacket::new); //packets CoreNetwork.registerPacket(new PoweredSpawnerSoulPacket.Handler(), PoweredSpawnerSoulPacket.class); + CoreNetwork.registerPacket(new MobGeneratorSoulPacket.Handler(), MobGeneratorSoulPacket.class); } } diff --git a/src/machines/java/com/enderio/machines/common/network/MobGeneratorSoulPacket.java b/src/machines/java/com/enderio/machines/common/network/MobGeneratorSoulPacket.java new file mode 100644 index 0000000000..066af3d271 --- /dev/null +++ b/src/machines/java/com/enderio/machines/common/network/MobGeneratorSoulPacket.java @@ -0,0 +1,66 @@ +package com.enderio.machines.common.network; + +import com.enderio.core.common.network.Packet; +import com.enderio.machines.common.souldata.GeneratorSoul; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.resources.ResourceLocation; +import net.minecraftforge.network.NetworkDirection; +import net.minecraftforge.network.NetworkEvent; + +import java.util.HashMap; +import java.util.Map; +import java.util.Optional; + +public class MobGeneratorSoulPacket implements Packet { + + public static Map SYNCED_DATA = new HashMap<>(); + + private final Map map; + + public MobGeneratorSoulPacket(Map map) { + this.map = map; + } + + public MobGeneratorSoulPacket(FriendlyByteBuf buf) { + this.map = buf.readMap(FriendlyByteBuf::readResourceLocation, buff -> + new GeneratorSoul.SoulData(buff.readResourceLocation(), buff.readUtf(), buff.readInt(), buff.readInt()) + ); + } + + protected void write(FriendlyByteBuf writeInto) { + writeInto.writeMap(map, FriendlyByteBuf::writeResourceLocation, (buf, soulData) -> { + buf.writeResourceLocation(soulData.entitytype()); + buf.writeUtf(soulData.fluid()); + buf.writeInt(soulData.powerpermb()); + buf.writeInt(soulData.tickpermb()); + }); + } + @Override + public boolean isValid(NetworkEvent.Context context) { + return context.getDirection() == NetworkDirection.PLAY_TO_CLIENT; + } + + @Override + public void handle(NetworkEvent.Context context) { + context.enqueueWork(() -> SYNCED_DATA = this.map); + context.setPacketHandled(true); + } + + public static class Handler extends PacketHandler { + + @Override + public MobGeneratorSoulPacket fromNetwork(FriendlyByteBuf buf) { + return new MobGeneratorSoulPacket(buf); + } + + @Override + public void toNetwork(MobGeneratorSoulPacket packet, FriendlyByteBuf buf) { + packet.write(buf); + } + + @Override + public Optional getDirection() { + return Optional.of(NetworkDirection.PLAY_TO_CLIENT); + } + } +} diff --git a/src/machines/java/com/enderio/machines/common/network/PoweredSpawnerSoulPacket.java b/src/machines/java/com/enderio/machines/common/network/PoweredSpawnerSoulPacket.java index 39c17c9fc5..916c63da8c 100644 --- a/src/machines/java/com/enderio/machines/common/network/PoweredSpawnerSoulPacket.java +++ b/src/machines/java/com/enderio/machines/common/network/PoweredSpawnerSoulPacket.java @@ -22,11 +22,9 @@ public PoweredSpawnerSoulPacket(Map map) } public PoweredSpawnerSoulPacket(FriendlyByteBuf buf) { - Map newMap = new HashMap<>(); - buf.readMap(FriendlyByteBuf::readResourceLocation, buff -> + this.map = buf.readMap(FriendlyByteBuf::readResourceLocation, buff -> new SpawnerSoul.SoulData(buff.readResourceLocation(), buff.readInt(), buff.readEnum(SpawnerMachineTask.SpawnType.class)) ); - this.map = newMap; } protected void write(FriendlyByteBuf writeInto) { diff --git a/src/machines/java/com/enderio/machines/common/souldata/SoulDataReloadListener.java b/src/machines/java/com/enderio/machines/common/souldata/SoulDataReloadListener.java index e6408935cd..8f5364e5d1 100644 --- a/src/machines/java/com/enderio/machines/common/souldata/SoulDataReloadListener.java +++ b/src/machines/java/com/enderio/machines/common/souldata/SoulDataReloadListener.java @@ -135,5 +135,4 @@ public Optional matches(ResourceLocation entitytype) { public static SoulDataReloadListener fromString(String name) { return loadedSoulData.get(name); } - } From bbe85cacbfc9a55d310e919bd162ab0997227088 Mon Sep 17 00:00:00 2001 From: Reece Mackie <20544390+Rover656@users.noreply.github.com> Date: Wed, 2 Aug 2023 22:45:05 +0100 Subject: [PATCH 040/154] Use Enchantment Descriptions. Uses the enchantment descriptions mod instead of rolling our own. Continues to display the tool types for the withering enchantments. --- build.gradle | 6 +- gradle.properties | 2 + .../resources/assets/enderio/lang/en_ud.json | 29 +++----- .../resources/assets/enderio/lang/en_us.json | 29 +++----- .../base/common/init/EIOEnchantments.java | 20 +++--- .../com/enderio/base/common/lang/EIOLang.java | 69 ++++++++----------- 6 files changed, 68 insertions(+), 87 deletions(-) diff --git a/build.gradle b/build.gradle index abae814f10..78b9ea89c4 100644 --- a/build.gradle +++ b/build.gradle @@ -202,7 +202,7 @@ repositories { RepositoryHandler handler -> exclusiveRepo(handler, 'https://maven.tterrag.com/', 'com.tterrag.registrate') exclusiveRepo(handler, 'https://modmaven.dev/', 'mezz.jei', 'mcjty.theoneprobe', 'appeng') exclusiveRepo(handler, 'https://cursemaven.com', 'curse.maven') - exclusiveRepo(handler, 'https://maven.blamejared.com', 'vazkii.patchouli') + exclusiveRepo(handler, 'https://maven.blamejared.com', 'vazkii.patchouli', 'net.darkhax.bookshelf', 'net.darkhax.enchdesc') exclusiveRepo(handler, 'https://dogforce-games.com/maven', 'dev.gigaherz.graph') exclusiveRepo(handler, 'https://api.modrinth.com/maven', 'maven.modrinth') @@ -245,6 +245,10 @@ dependencies { compileOnly "appeng:appliedenergistics2-forge:${ae2_version}:api" runtimeOnly fg.deobf("appeng:appliedenergistics2-forge:${ae2_version}") + // Enchantment descriptions + runtimeOnly fg.deobf("net.darkhax.bookshelf:Bookshelf-Forge-${minecraft_version}:${bookshelf_version}") + runtimeOnly fg.deobf("net.darkhax.enchdesc:EnchantmentDescriptions-Forge-${minecraft_version}:${ench_desc_version}") + // The One Probe https://github.com/McJtyMods/TheOneProbe/issues/548 // compileOnly fg.deobf("mcjty.theoneprobe:theoneprobe:${top_version}:api") { // transitive = false diff --git a/gradle.properties b/gradle.properties index 06db4a41ed..7cd8a611db 100644 --- a/gradle.properties +++ b/gradle.properties @@ -36,6 +36,8 @@ top_version=1.20.0-10.0.0 patchouli_version=1.19.3-78 mekanism_cf_id=3922056 jade_cf_id=4614153 +ench_desc_version=17.0.3 +bookshelf_version=20.0.2 # =========================== # Combined Project Properties diff --git a/src/generated/resources/assets/enderio/lang/en_ud.json b/src/generated/resources/assets/enderio/lang/en_ud.json index 5407e4c275..790cba9698 100644 --- a/src/generated/resources/assets/enderio/lang/en_ud.json +++ b/src/generated/resources/assets/enderio/lang/en_ud.json @@ -208,32 +208,25 @@ "block.enderio.wired_charger": "ɹǝbɹɐɥƆ pǝɹıM", "block.enderio.xp_juice": "ǝɔınſ dX", "block.enderio.xp_vacuum": "ɯnnɔɐΛ dX", - "description.enderio.enchantment.auto_smelt": "pǝuıɯ sı ɹǝʌǝʇɐɥʍ sʇןǝɯs ʎןןɐɔıʇɐɯoʇnⱯ", - "description.enderio.enchantment.repellent1": "ʎɐʍɐ sɹǝʞɔɐʇʇɐ ʇɹodǝןǝʇ oʇ ǝɔuɐɥƆ", - "description.enderio.enchantment.repellent2": "ɹǝɥʇɹɐɟ puɐ uǝʇɟo ǝɹoɯ ʇɹodǝןǝʇ sןǝʌǝן ɹǝɥbıH", - "description.enderio.enchantment.shimmer1": "˙pǝʇuɐɥɔuǝ sɐʍ ʇı ɟı sɐ ɹǝɯɯıɥs ɯǝʇı ǝɥʇ sǝʞɐW", - "description.enderio.enchantment.shimmer2": "˙ןןɐ s,ʇɐɥ⟘", - "description.enderio.enchantment.shimmer3": "˙ʎןןɐǝᴚ", - "description.enderio.enchantment.shimmer4": "˙ǝɹoɯ buıɥʇoN", - "description.enderio.enchantment.shimmer5": "˙ssǝןǝsn sı ʇı 'sǝʎ", - "description.enderio.enchantment.shimmer6": "˙ʍouʞ I", - "description.enderio.enchantment.soulbound1": "˙ɥʇɐǝp uo ʇsoן buıǝq ɯoɹɟ ɯǝʇı sʇuǝʌǝɹԀ", - "description.enderio.enchantment.soulbound2": "¡buıʞɹoʍ ɯoɹɟ sıɥʇ ʇuǝʌǝɹd puɐ pıdnʇs ǝɹɐ spoɯ ǝuoʇsǝʌɐɹb ʇsoW :ǝʇoN", - "description.enderio.enchantment.withering_arrow1": "ʇǝbɹɐʇ ǝɥʇ oʇ ɹǝɥʇıʍ sǝıןddⱯ", - "description.enderio.enchantment.withering_arrow2": "˙sʍoq oʇ sǝıןddⱯ", - "description.enderio.enchantment.withering_blade1": "ʇǝbɹɐʇ ǝɥʇ oʇ ɹǝɥʇıʍ sǝıןddⱯ", - "description.enderio.enchantment.withering_blade2": "suodɐǝʍ pǝpɐןq oʇ sǝıןddⱯ", - "description.enderio.enchantment.withering_bolt1": "ʇǝbɹɐʇ ǝɥʇ oʇ ɹǝɥʇıʍ sǝıןddⱯ", - "description.enderio.enchantment.withering_bolt2": "˙sʍoqssoɹɔ oʇ sǝıןddⱯ", - "description.enderio.enchantment.xp_boost": "sʞɔoןq puɐ sqoɯ ɯoɹɟ ԀX ɐɹʇxƎ", "enchantment.enderio.auto_smelt": "ʇןǝɯS oʇnⱯ", + "enchantment.enderio.auto_smelt.desc": "˙pǝuıɯ sı ɹǝʌǝʇɐɥʍ sʇןǝɯs ʎןןɐɔıʇɐɯoʇnⱯ", "enchantment.enderio.repellent": "ʇuǝןןǝdǝᴚ", + "enchantment.enderio.repellent.desc": "˙ɹǝɥʇɹɐɟ puɐ uǝʇɟo ǝɹoɯ ʇɹodǝןǝʇ sןǝʌǝן ɹǝɥbıH ˙ʎɐʍɐ sɹǝʞɔɐʇʇɐ ʇɹodǝןǝʇ oʇ ǝɔuɐɥƆ", "enchantment.enderio.shimmer": "ɹǝɯɯıɥS", + "enchantment.enderio.shimmer.desc": "˙˙˙ʎןןɐǝᴚ ˙˙˙ןןɐ s,ʇɐɥ⟘ ˙˙˙pǝʇuɐɥɔuǝ sɐʍ ʇı ɟı sɐ ɹǝɯɯıɥs ɯǝʇı ǝɥʇ sǝʞɐW", "enchantment.enderio.soulbound": "punoqןnoS", + "enchantment.enderio.soulbound.desc": "¡buıʞɹoʍ ɯoɹɟ sıɥʇ ʇuǝʌǝɹd puɐ pıdnʇs ǝɹɐ spoɯ ǝuoʇsǝʌɐɹb ʇsoW :ǝʇoN ˙ɥʇɐǝp uo ʇsoן buıǝq ɯoɹɟ ɯǝʇı sʇuǝʌǝɹԀ", "enchantment.enderio.withering_arrow": "ʍoɹɹⱯ buıɹǝɥʇıM", + "enchantment.enderio.withering_arrow.desc": "˙ʇǝbɹɐʇ ǝɥʇ oʇ ɹǝɥʇıʍ sǝıןddⱯ", + "enchantment.enderio.withering_arrow.type": "˙sʍoq oʇ sǝıןddⱯ", "enchantment.enderio.withering_blade": "ǝpɐןᗺ buıɹǝɥʇıM", + "enchantment.enderio.withering_blade.desc": "˙ʇǝbɹɐʇ ǝɥʇ oʇ ɹǝɥʇıʍ sǝıןddⱯ", + "enchantment.enderio.withering_blade.type": "˙suodɐǝʍ pǝpɐןq oʇ sǝıןddⱯ", "enchantment.enderio.withering_bolt": "ʇןoᗺ buıɹǝɥʇıM", + "enchantment.enderio.withering_bolt.desc": "˙ʇǝbɹɐʇ ǝɥʇ oʇ ɹǝɥʇıʍ sǝıןddⱯ", + "enchantment.enderio.withering_bolt.type": "˙sʍoqssoɹɔ oʇ sǝıןddⱯ", "enchantment.enderio.xp_boost": "ʇsooᗺ ԀX", + "enchantment.enderio.xp_boost.desc": "sʞɔoןq puɐ sqoɯ ɯoɹɟ ԀX ɐɹʇxƎ", "entity.enderio.painted_sand": "puɐS pǝʇuıɐԀ", "fluid.enderio.cloud_seed": "pǝǝS pnoןƆ", "fluid.enderio.cloud_seed_concentrated": "pǝʇɐɹʇuǝɔuoƆ pǝǝS pnoןƆ", diff --git a/src/generated/resources/assets/enderio/lang/en_us.json b/src/generated/resources/assets/enderio/lang/en_us.json index ebf6107a16..0c0f21023b 100644 --- a/src/generated/resources/assets/enderio/lang/en_us.json +++ b/src/generated/resources/assets/enderio/lang/en_us.json @@ -208,32 +208,25 @@ "block.enderio.wired_charger": "Wired Charger", "block.enderio.xp_juice": "Xp Juice", "block.enderio.xp_vacuum": "Xp Vacuum", - "description.enderio.enchantment.auto_smelt": "Automatically smelts whatever is mined", - "description.enderio.enchantment.repellent1": "Chance to teleport attackers away", - "description.enderio.enchantment.repellent2": "Higher levels teleport more often and farther", - "description.enderio.enchantment.shimmer1": "Makes the item shimmer as if it was enchanted.", - "description.enderio.enchantment.shimmer2": "That's all.", - "description.enderio.enchantment.shimmer3": "Really.", - "description.enderio.enchantment.shimmer4": "Nothing more.", - "description.enderio.enchantment.shimmer5": "Yes, it is useless.", - "description.enderio.enchantment.shimmer6": "I know.", - "description.enderio.enchantment.soulbound1": "Prevents item from being lost on death.", - "description.enderio.enchantment.soulbound2": "Note: Most gravestone mods are stupid and prevent this from working!", - "description.enderio.enchantment.withering_arrow1": "Applies wither to the target", - "description.enderio.enchantment.withering_arrow2": "Applies to bows.", - "description.enderio.enchantment.withering_blade1": "Applies wither to the target", - "description.enderio.enchantment.withering_blade2": "Applies to bladed weapons", - "description.enderio.enchantment.withering_bolt1": "Applies wither to the target", - "description.enderio.enchantment.withering_bolt2": "Applies to crossbows.", - "description.enderio.enchantment.xp_boost": "Extra XP from mobs and blocks", "enchantment.enderio.auto_smelt": "Auto Smelt", + "enchantment.enderio.auto_smelt.desc": "Automatically smelts whatever is mined.", "enchantment.enderio.repellent": "Repellent", + "enchantment.enderio.repellent.desc": "Chance to teleport attackers away. Higher levels teleport more often and farther.", "enchantment.enderio.shimmer": "Shimmer", + "enchantment.enderio.shimmer.desc": "Makes the item shimmer as if it was enchanted... That's all... Really...", "enchantment.enderio.soulbound": "Soulbound", + "enchantment.enderio.soulbound.desc": "Prevents item from being lost on death. Note: Most gravestone mods are stupid and prevent this from working!", "enchantment.enderio.withering_arrow": "Withering Arrow", + "enchantment.enderio.withering_arrow.desc": "Applies wither to the target.", + "enchantment.enderio.withering_arrow.type": "Applies to bows.", "enchantment.enderio.withering_blade": "Withering Blade", + "enchantment.enderio.withering_blade.desc": "Applies wither to the target.", + "enchantment.enderio.withering_blade.type": "Applies to bladed weapons.", "enchantment.enderio.withering_bolt": "Withering Bolt", + "enchantment.enderio.withering_bolt.desc": "Applies wither to the target.", + "enchantment.enderio.withering_bolt.type": "Applies to crossbows.", "enchantment.enderio.xp_boost": "XP Boost", + "enchantment.enderio.xp_boost.desc": "Extra XP from mobs and blocks", "entity.enderio.painted_sand": "Painted Sand", "fluid.enderio.cloud_seed": "Cloud Seed", "fluid.enderio.cloud_seed_concentrated": "Cloud Seed Concentrated", diff --git a/src/main/java/com/enderio/base/common/init/EIOEnchantments.java b/src/main/java/com/enderio/base/common/init/EIOEnchantments.java index 664552e7a8..5c029032dc 100644 --- a/src/main/java/com/enderio/base/common/init/EIOEnchantments.java +++ b/src/main/java/com/enderio/base/common/init/EIOEnchantments.java @@ -7,6 +7,7 @@ import com.tterrag.registrate.builders.EnchantmentBuilder; import com.tterrag.registrate.util.entry.RegistryEntry; import net.minecraft.network.chat.Component; +import net.minecraft.world.item.Items; import net.minecraft.world.item.enchantment.Enchantment; import net.minecraft.world.item.enchantment.EnchantmentHelper; import net.minecraftforge.event.entity.player.ItemTooltipEvent; @@ -79,17 +80,14 @@ private static void addTooltip(ItemTooltipEvent event, Map // Renders Enchantment tooltips. @SubscribeEvent static void tooltip(ItemTooltipEvent event) { - Map enchantments = EnchantmentHelper.getEnchantments(event.getItemStack()); - List toolTip = new ArrayList<>(event.getToolTip()); - if (!enchantments.isEmpty()) { - addTooltip(event, enchantments, toolTip, AUTO_SMELT.get(), EIOLang.AUTO_SMELT_DESC); - addTooltip(event, enchantments, toolTip, REPELLENT.get(), EIOLang.REPELLENT_DESC1, EIOLang.REPELLENT_DESC2); - addTooltip(event, enchantments, toolTip, SHIMMER.get(), EIOLang.SHIMMER_DESC1, EIOLang.SHIMMER_DESC2, EIOLang.SHIMMER_DESC3, EIOLang.SHIMMER_DESC4, EIOLang.SHIMMER_DESC5, EIOLang.SHIMMER_DESC6); - addTooltip(event, enchantments, toolTip, SOULBOUND.get(), EIOLang.SOULBOUND_DESC1, EIOLang.SOULBOUND_DESC2); - addTooltip(event, enchantments, toolTip, WITHERING_BLADE.get(), EIOLang.WITHERING_BLADE_DESC1, EIOLang.WITHERING_BLADE_DESC2); - addTooltip(event, enchantments, toolTip, WITHERING_ARROW.get(), EIOLang.WITHERING_ARROW_DESC1, EIOLang.WITHERING_ARROW_DESC2); - addTooltip(event, enchantments, toolTip, WITHERING_BOLT.get(), EIOLang.WITHERING_BOLT_DESC1, EIOLang.WITHERING_BOLT_DESC2); - addTooltip(event, enchantments, toolTip, XP_BOOST.get(), EIOLang.XP_BOOST_DESC); + if (event.getItemStack().getItem() == Items.ENCHANTED_BOOK) { + Map enchantments = EnchantmentHelper.getEnchantments(event.getItemStack()); + List toolTip = new ArrayList<>(event.getToolTip()); + if (!enchantments.isEmpty()) { + addTooltip(event, enchantments, toolTip, WITHERING_BLADE.get(), EIOLang.WITHERING_BLADE_TYPES); + addTooltip(event, enchantments, toolTip, WITHERING_ARROW.get(), EIOLang.WITHERING_ARROW_TYPES); + addTooltip(event, enchantments, toolTip, WITHERING_BOLT.get(), EIOLang.WITHERING_BOLT_TYPES); + } } } diff --git a/src/main/java/com/enderio/base/common/lang/EIOLang.java b/src/main/java/com/enderio/base/common/lang/EIOLang.java index ea1cf582d7..dbb4098ff8 100644 --- a/src/main/java/com/enderio/base/common/lang/EIOLang.java +++ b/src/main/java/com/enderio/base/common/lang/EIOLang.java @@ -134,50 +134,41 @@ public class EIOLang { // region Enchantments - public static final Component AUTO_SMELT_DESC = enchantmentDescription("auto_smelt", "Automatically smelts whatever is mined"); - - public static final Component REPELLENT_DESC1 = enchantmentDescription("repellent1", - "Chance to teleport attackers away"); - public static final Component REPELLENT_DESC2 = enchantmentDescription("repellent2", - "Higher levels teleport more often and farther"); - - public static final Component SHIMMER_DESC1 = enchantmentDescription("shimmer1", - "Makes the item shimmer as if it was enchanted."); - public static final Component SHIMMER_DESC2 = enchantmentDescription("shimmer2", - "That's all."); - public static final Component SHIMMER_DESC3 = enchantmentDescription("shimmer3", - "Really."); - public static final Component SHIMMER_DESC4 = enchantmentDescription("shimmer4", - "Nothing more."); - public static final Component SHIMMER_DESC5 = enchantmentDescription("shimmer5", - "Yes, it is useless."); - public static final Component SHIMMER_DESC6 = enchantmentDescription("shimmer6", - "I know."); - - public static final Component SOULBOUND_DESC1 = enchantmentDescription("soulbound1", - "Prevents item from being lost on death."); - public static final Component SOULBOUND_DESC2 = enchantmentDescription("soulbound2", - "Note: Most gravestone mods are stupid and prevent this from working!"); - - public static final Component WITHERING_BLADE_DESC1 = enchantmentDescription("withering_blade1", - "Applies wither to the target"); - public static final Component WITHERING_BLADE_DESC2 = enchantmentDescription("withering_blade2", - "Applies to bladed weapons"); - - public static final Component WITHERING_ARROW_DESC1 = enchantmentDescription("withering_arrow1", - "Applies wither to the target"); - public static final Component WITHERING_ARROW_DESC2 = enchantmentDescription("withering_arrow2", + public static final Component AUTO_SMELT_DESC = enchantmentDescription("auto_smelt", "desc", + "Automatically smelts whatever is mined."); + + public static final Component REPELLENT_DESC = enchantmentDescription("repellent", "desc", + "Chance to teleport attackers away. Higher levels teleport more often and farther."); + + public static final Component SHIMMER_DESC = enchantmentDescription("shimmer", "desc", + "Makes the item shimmer as if it was enchanted... That's all... Really..."); + + public static final Component SOULBOUND_DESC = enchantmentDescription("soulbound", "desc", + "Prevents item from being lost on death. Note: Most gravestone mods are stupid and prevent this from working!"); + + public static final Component WITHERING_BLADE_DESC = enchantmentDescription("withering_blade", "desc", + "Applies wither to the target."); + + public static final Component WITHERING_BLADE_TYPES = enchantmentDescription("withering_blade", "type", + "Applies to bladed weapons."); + + public static final Component WITHERING_ARROW_DESC = enchantmentDescription("withering_arrow", "desc", + "Applies wither to the target."); + + public static final Component WITHERING_ARROW_TYPES = enchantmentDescription("withering_arrow", "type", "Applies to bows."); - public static final Component WITHERING_BOLT_DESC1 = enchantmentDescription("withering_bolt1", - "Applies wither to the target"); - public static final Component WITHERING_BOLT_DESC2 = enchantmentDescription("withering_bolt2", + public static final Component WITHERING_BOLT_DESC = enchantmentDescription("withering_bolt", "desc", + "Applies wither to the target."); + + public static final Component WITHERING_BOLT_TYPES = enchantmentDescription("withering_bolt", "type", "Applies to crossbows."); - public static final Component XP_BOOST_DESC = enchantmentDescription("xp_boost", "Extra XP from mobs and blocks"); + public static final Component XP_BOOST_DESC = enchantmentDescription("xp_boost", "desc", + "Extra XP from mobs and blocks"); - private static Component enchantmentDescription(String enchantmentname, String description) { - return TooltipUtil.style(REGISTRATE.addLang("description", EnderIO.loc("enchantment." + enchantmentname), description)); + private static Component enchantmentDescription(String enchantmentName, String suffix, String description) { + return TooltipUtil.style(REGISTRATE.addLang("enchantment", EnderIO.loc(String.format("%s.%s", enchantmentName, suffix)), description)); } // endregion From 23a5c23cae2de976e7c024fea13ba81d2921cdcd Mon Sep 17 00:00:00 2001 From: Reece Mackie <20544390+Rover656@users.noreply.github.com> Date: Wed, 2 Aug 2023 22:45:20 +0100 Subject: [PATCH 041/154] Style changes to make tooltips stand out --- .../enderio/core/common/util/TooltipUtil.java | 2 +- .../base/client/tooltip/TooltipHandler.java | 18 ++++++++---------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/core/java/com/enderio/core/common/util/TooltipUtil.java b/src/core/java/com/enderio/core/common/util/TooltipUtil.java index 477c83259e..055efc60ba 100644 --- a/src/core/java/com/enderio/core/common/util/TooltipUtil.java +++ b/src/core/java/com/enderio/core/common/util/TooltipUtil.java @@ -12,7 +12,7 @@ public class TooltipUtil { * Style a component italic and gray */ public static Component style(MutableComponent component) { - return component.withStyle(ChatFormatting.ITALIC, ChatFormatting.GRAY); + return component.withStyle(ChatFormatting.AQUA); } /** diff --git a/src/main/java/com/enderio/base/client/tooltip/TooltipHandler.java b/src/main/java/com/enderio/base/client/tooltip/TooltipHandler.java index dfd6a93eb8..67d504c400 100644 --- a/src/main/java/com/enderio/base/client/tooltip/TooltipHandler.java +++ b/src/main/java/com/enderio/base/client/tooltip/TooltipHandler.java @@ -28,7 +28,7 @@ @Mod.EventBusSubscriber(value = Dist.CLIENT, bus = Mod.EventBusSubscriber.Bus.FORGE) public class TooltipHandler { - private static final Component DETAIL_TOOLTIP = EIOLang.SHOW_DETAIL_TOOLTIP.copy().withStyle(ChatFormatting.WHITE, ChatFormatting.ITALIC); + private static final Component DETAIL_TOOLTIP = EIOLang.SHOW_DETAIL_TOOLTIP.copy().withStyle(ChatFormatting.GRAY, ChatFormatting.ITALIC); @SubscribeEvent public static void addAdvancedTooltips(ItemTooltipEvent evt) { @@ -49,15 +49,13 @@ public static void addAdvancedTooltips(ItemTooltipEvent evt) { private static void addCapacitorTooltips(ItemStack itemStack, List components, boolean showAdvanced) { if (CapacitorUtil.isCapacitor(itemStack)) { - if (showAdvanced) { - CapacitorUtil.getCapacitorData(itemStack).ifPresent(data -> { - NumberFormat fmt = NumberFormat.getInstance(Locale.ENGLISH); - components.add(TooltipUtil.styledWithArgs(EIOLang.CAPACITOR_TOOLTIP_BASE, fmt.format(data.getBase()))); - for (Map.Entry modifier : data.getAllModifiers().entrySet()) { - components.add(TooltipUtil.styledWithArgs(new ResourceLocation("tooltip", modifier.getKey().id.toLanguageKey()), fmt.format(modifier.getValue()))); - } - }); - } else addShowDetailsTooltip(components); + CapacitorUtil.getCapacitorData(itemStack).ifPresent(data -> { + NumberFormat fmt = NumberFormat.getInstance(Locale.ENGLISH); + components.add(TooltipUtil.styledWithArgs(EIOLang.CAPACITOR_TOOLTIP_BASE, fmt.format(data.getBase()))); + for (Map.Entry modifier : data.getAllModifiers().entrySet()) { + components.add(TooltipUtil.styledWithArgs(new ResourceLocation("tooltip", modifier.getKey().id.toLanguageKey()), fmt.format(modifier.getValue()))); + } + }); } } From 27ca7af7a78f2edc3a198c884ebf1716139d0cea Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Wed, 2 Aug 2023 23:54:48 +0200 Subject: [PATCH 042/154] Update MobGeneratorScreen.java --- .../machines/client/gui/screen/MobGeneratorScreen.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/machines/java/com/enderio/machines/client/gui/screen/MobGeneratorScreen.java b/src/machines/java/com/enderio/machines/client/gui/screen/MobGeneratorScreen.java index be52b9cd62..cdc7787df7 100644 --- a/src/machines/java/com/enderio/machines/client/gui/screen/MobGeneratorScreen.java +++ b/src/machines/java/com/enderio/machines/client/gui/screen/MobGeneratorScreen.java @@ -57,8 +57,8 @@ protected void renderLabels(GuiGraphics guiGraphics, int pMouseX, int pMouseY) { } GeneratorSoul.SoulData data = MobGeneratorSoulPacket.SYNCED_DATA.get(rl.get()); if (data != null) { - guiGraphics.drawString(font, data.tickpermb() + " t/mb", imageWidth / 2f + 20 - font.width(data.tickpermb() + "") / 2f, 50, 4210752, false); - guiGraphics.drawString(font, data.powerpermb() + " µI/mb", imageWidth / 2f + 20 - font.width(data.powerpermb() + "") / 2f, 60, 4210752, false); + guiGraphics.drawString(font, data.tickpermb() + " t/mb", imageWidth / 2f + 20 - font.width(data.tickpermb() + "") / 2f, 40, 4210752, false); + guiGraphics.drawString(font, data.powerpermb() + " µI/mb", imageWidth / 2f + 20 - font.width(data.powerpermb() + "") / 2f, 50, 4210752, false); } } From 13226ec156c77dae3dcb2e439f9043420c7fddc5 Mon Sep 17 00:00:00 2001 From: Reece Mackie <20544390+Rover656@users.noreply.github.com> Date: Wed, 2 Aug 2023 22:59:10 +0100 Subject: [PATCH 043/154] Touch on the other machines. Needs reviewing --- build.gradle | 11 +++++++-- .../recipes/soulbinding/animal_token.json | 2 +- .../recipes/soulbinding/broken_spawner.json | 2 +- .../recipes/soulbinding/ender_crystal.json | 2 +- .../recipes/soulbinding/enticing_crystal.json | 2 +- .../recipes/soulbinding/frank_n_zombie.json | 2 +- .../recipes/soulbinding/monster_token.json | 2 +- .../recipes/soulbinding/player_token.json | 2 +- .../soulbinding/prescient_crystal.json | 2 +- .../recipes/soulbinding/sentient_ender.json | 2 +- .../blockentity/CrafterBlockEntity.java | 6 ++--- .../common/config/common/EnergyConfig.java | 24 ++++++++++--------- .../recipes/SoulBindingRecipeProvider.java | 18 +++++++------- .../data/souldata/SoulDataProvider.java | 1 + 14 files changed, 43 insertions(+), 35 deletions(-) diff --git a/build.gradle b/build.gradle index abae814f10..96e29cbf88 100644 --- a/build.gradle +++ b/build.gradle @@ -436,14 +436,21 @@ String getVersionString() { } def version_hash = '' + def branch_name = '' if (!build_server) { try { - version_hash = "git rev-parse --short HEAD".execute().text.trim() + version_hash = "-" + "git rev-parse --short HEAD".execute().text.trim() + } catch (ignored) { + } + + try { + branch_name = "git rev-parse --abbrev-ref HEAD".execute().text.trim() + branch_name = "-" + branch_name.substring(branch_name.lastIndexOf('/') + 1) } catch (ignored) { } } - return "${mod_version_series}-dev-${version_hash}" + return "${mod_version_series}-dev${branch_name}${version_hash}" } String getReleaseType() { diff --git a/src/generated/resources/data/enderio/recipes/soulbinding/animal_token.json b/src/generated/resources/data/enderio/recipes/soulbinding/animal_token.json index 1b344a1ec9..70aa474522 100644 --- a/src/generated/resources/data/enderio/recipes/soulbinding/animal_token.json +++ b/src/generated/resources/data/enderio/recipes/soulbinding/animal_token.json @@ -1,6 +1,6 @@ { "type": "enderio:soul_binding", - "energy": 25000, + "energy": 12800, "exp": 1, "input": { "item": "enderio:soularium_grinding_ball" diff --git a/src/generated/resources/data/enderio/recipes/soulbinding/broken_spawner.json b/src/generated/resources/data/enderio/recipes/soulbinding/broken_spawner.json index 889413c45f..bce7a6f6d4 100644 --- a/src/generated/resources/data/enderio/recipes/soulbinding/broken_spawner.json +++ b/src/generated/resources/data/enderio/recipes/soulbinding/broken_spawner.json @@ -1,6 +1,6 @@ { "type": "enderio:soul_binding", - "energy": 2500000, + "energy": 1000000, "exp": 8, "input": { "item": "enderio:broken_spawner" diff --git a/src/generated/resources/data/enderio/recipes/soulbinding/ender_crystal.json b/src/generated/resources/data/enderio/recipes/soulbinding/ender_crystal.json index 17e287c9ff..c2264518dc 100644 --- a/src/generated/resources/data/enderio/recipes/soulbinding/ender_crystal.json +++ b/src/generated/resources/data/enderio/recipes/soulbinding/ender_crystal.json @@ -1,6 +1,6 @@ { "type": "enderio:soul_binding", - "energy": 150000, + "energy": 76800, "entity_type": "minecraft:enderman", "exp": 6, "input": { diff --git a/src/generated/resources/data/enderio/recipes/soulbinding/enticing_crystal.json b/src/generated/resources/data/enderio/recipes/soulbinding/enticing_crystal.json index b270eea982..d355dd1e81 100644 --- a/src/generated/resources/data/enderio/recipes/soulbinding/enticing_crystal.json +++ b/src/generated/resources/data/enderio/recipes/soulbinding/enticing_crystal.json @@ -1,6 +1,6 @@ { "type": "enderio:soul_binding", - "energy": 100000, + "energy": 51200, "entity_type": "minecraft:villager", "exp": 4, "input": { diff --git a/src/generated/resources/data/enderio/recipes/soulbinding/frank_n_zombie.json b/src/generated/resources/data/enderio/recipes/soulbinding/frank_n_zombie.json index cd5836716d..3e56f729c9 100644 --- a/src/generated/resources/data/enderio/recipes/soulbinding/frank_n_zombie.json +++ b/src/generated/resources/data/enderio/recipes/soulbinding/frank_n_zombie.json @@ -1,6 +1,6 @@ { "type": "enderio:soul_binding", - "energy": 100000, + "energy": 51200, "entity_type": "minecraft:zombie", "exp": 4, "input": { diff --git a/src/generated/resources/data/enderio/recipes/soulbinding/monster_token.json b/src/generated/resources/data/enderio/recipes/soulbinding/monster_token.json index 816c309e00..9b0b0d363e 100644 --- a/src/generated/resources/data/enderio/recipes/soulbinding/monster_token.json +++ b/src/generated/resources/data/enderio/recipes/soulbinding/monster_token.json @@ -1,6 +1,6 @@ { "type": "enderio:soul_binding", - "energy": 25000, + "energy": 12800, "exp": 1, "input": { "item": "enderio:soularium_grinding_ball" diff --git a/src/generated/resources/data/enderio/recipes/soulbinding/player_token.json b/src/generated/resources/data/enderio/recipes/soulbinding/player_token.json index b20fa92b85..2782b9681b 100644 --- a/src/generated/resources/data/enderio/recipes/soulbinding/player_token.json +++ b/src/generated/resources/data/enderio/recipes/soulbinding/player_token.json @@ -1,6 +1,6 @@ { "type": "enderio:soul_binding", - "energy": 25000, + "energy": 12800, "entity_type": "minecraft:villager", "exp": 1, "input": { diff --git a/src/generated/resources/data/enderio/recipes/soulbinding/prescient_crystal.json b/src/generated/resources/data/enderio/recipes/soulbinding/prescient_crystal.json index b501c471f5..0015d16110 100644 --- a/src/generated/resources/data/enderio/recipes/soulbinding/prescient_crystal.json +++ b/src/generated/resources/data/enderio/recipes/soulbinding/prescient_crystal.json @@ -1,6 +1,6 @@ { "type": "enderio:soul_binding", - "energy": 200000, + "energy": 100000, "entity_type": "minecraft:shulker", "exp": 8, "input": { diff --git a/src/generated/resources/data/enderio/recipes/soulbinding/sentient_ender.json b/src/generated/resources/data/enderio/recipes/soulbinding/sentient_ender.json index c3d3917209..e09d423af3 100644 --- a/src/generated/resources/data/enderio/recipes/soulbinding/sentient_ender.json +++ b/src/generated/resources/data/enderio/recipes/soulbinding/sentient_ender.json @@ -1,6 +1,6 @@ { "type": "enderio:soul_binding", - "energy": 100000, + "energy": 51200, "entity_type": "minecraft:witch", "exp": 4, "input": { diff --git a/src/machines/java/com/enderio/machines/common/blockentity/CrafterBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/CrafterBlockEntity.java index 7f8f293b75..3fcf211890 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/CrafterBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/CrafterBlockEntity.java @@ -30,8 +30,6 @@ public class CrafterBlockEntity extends PoweredMachineBlockEntity { public static final QuadraticScalable ENERGY_CAPACITY = new QuadraticScalable(CapacitorModifier.ENERGY_CAPACITY, MachinesConfig.COMMON.ENERGY.CRAFTER_CAPACITY); public static final QuadraticScalable ENERGY_USAGE = new QuadraticScalable(CapacitorModifier.ENERGY_USE, MachinesConfig.COMMON.ENERGY.CRAFTER_USAGE); - private static final int ENERGY_USAGE_PER_ITEM = 10; - public static final MultiSlotAccess INPUT = new MultiSlotAccess(); public static final SingleSlotAccess OUTPUT = new SingleSlotAccess(); public static final MultiSlotAccess GHOST = new MultiSlotAccess(); @@ -120,7 +118,7 @@ private int ticksForAction() { } private boolean hasPowerToCraft() { - return this.energyStorage.consumeEnergy(ENERGY_USAGE_PER_ITEM, true) > 0; + return this.energyStorage.consumeEnergy(MachinesConfig.COMMON.ENERGY.CRAFTING_RECIPE_COST.get(), true) > 0; } private void processOutputBuffer() { @@ -174,7 +172,7 @@ private void craftItem() { // clean buffer outputBuffer.removeIf(ItemStack::isEmpty); // consume power - this.energyStorage.consumeEnergy(ENERGY_USAGE_PER_ITEM, false); + this.energyStorage.consumeEnergy(MachinesConfig.COMMON.ENERGY.CRAFTING_RECIPE_COST.get(), false); } diff --git a/src/machines/java/com/enderio/machines/common/config/common/EnergyConfig.java b/src/machines/java/com/enderio/machines/common/config/common/EnergyConfig.java index ed9b72b6d3..6483b36099 100644 --- a/src/machines/java/com/enderio/machines/common/config/common/EnergyConfig.java +++ b/src/machines/java/com/enderio/machines/common/config/common/EnergyConfig.java @@ -8,6 +8,7 @@ public class EnergyConfig { public final ForgeConfigSpec.ConfigValue ALLOY_SMELTER_VANILLA_ITEM_ENERGY; public final ForgeConfigSpec.ConfigValue CRAFTER_CAPACITY; public final ForgeConfigSpec.ConfigValue CRAFTER_USAGE; + public final ForgeConfigSpec.ConfigValue CRAFTING_RECIPE_COST; public final ForgeConfigSpec.ConfigValue IMPULSE_HOPPER_CAPACITY; public final ForgeConfigSpec.ConfigValue IMPULSE_HOPPER_USAGE; public final ForgeConfigSpec.ConfigValue POWERED_SPAWNER_CAPACITY; @@ -47,18 +48,19 @@ public EnergyConfig(ForgeConfigSpec.Builder builder) { builder.pop(); builder.push("crafter"); - CRAFTER_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 100000, 1, Integer.MAX_VALUE); - CRAFTER_USAGE = builder.comment("The base energy consumption in uI/t.").defineInRange("usage", 10, 1, Integer.MAX_VALUE); + CRAFTER_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 64000, 1, Integer.MAX_VALUE); + CRAFTER_USAGE = builder.comment("The base energy consumption in uI/t.").defineInRange("usage", 80, 1, Integer.MAX_VALUE); + CRAFTING_RECIPE_COST = builder.comment("The energy cost in uI for a crafting recipe.").defineInRange("usage", 3200, 1, Integer.MAX_VALUE); builder.pop(); builder.push("impulseHopper"); - IMPULSE_HOPPER_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 100000, 1, Integer.MAX_VALUE); + IMPULSE_HOPPER_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 64000, 1, Integer.MAX_VALUE); IMPULSE_HOPPER_USAGE = builder.comment("The base energy consumption in uI/t.").defineInRange("usage", 16, 1, Integer.MAX_VALUE); builder.pop(); builder.push("poweredSpawner"); - POWERED_SPAWNER_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 100000, 1, Integer.MAX_VALUE); - POWERED_SPAWNER_USAGE = builder.comment("The base energy consumption in uI/t.").defineInRange("usage", 160, 1, Integer.MAX_VALUE); + POWERED_SPAWNER_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 64000, 1, Integer.MAX_VALUE); + POWERED_SPAWNER_USAGE = builder.comment("The base energy consumption in uI/t.").defineInRange("usage", 120, 1, Integer.MAX_VALUE); builder.pop(); builder.push("sagMill"); @@ -72,8 +74,8 @@ public EnergyConfig(ForgeConfigSpec.Builder builder) { builder.pop(); builder.push("soulBinder"); - SOUL_BINDER_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 100000, 1, Integer.MAX_VALUE); - SOUL_BINDER_USAGE = builder.comment("The base energy consumption in uI/t.").defineInRange("usage", 30, 1, Integer.MAX_VALUE); + SOUL_BINDER_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 128000, 1, Integer.MAX_VALUE); + SOUL_BINDER_USAGE = builder.comment("The base energy consumption in uI/t.").defineInRange("usage", 60, 1, Integer.MAX_VALUE); builder.pop(); builder.push("stirlingGenerator"); @@ -83,10 +85,10 @@ public EnergyConfig(ForgeConfigSpec.Builder builder) { builder.pop(); builder.push("paintingMachine"); - PAINTING_MACHINE_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 100000, 1, Integer.MAX_VALUE); + PAINTING_MACHINE_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 64000, 1, Integer.MAX_VALUE); PAINTING_MACHINE_USAGE = builder.comment("The base energy consumption in uI/t.").defineInRange("usage", 30, 1, Integer.MAX_VALUE); PAINTING_MACHINE_ENERGY_COST = builder.comment("The energy required for each painting operation") - .defineInRange("energyCost", 2000, 1, Integer.MAX_VALUE); + .defineInRange("energyCost", 2400, 1, Integer.MAX_VALUE); builder.pop(); builder.push("photovoltaicCellRates"); @@ -97,8 +99,8 @@ public EnergyConfig(ForgeConfigSpec.Builder builder) { builder.pop(); builder.push("wiredCharger"); - WIRED_CHARGER_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 1000000, 1, Integer.MAX_VALUE); - WIRED_CHARGER_USAGE = builder.comment("The base energy consumption in uI/t.").defineInRange("usage", 100, 1, Integer.MAX_VALUE); + WIRED_CHARGER_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 128000, 1, Integer.MAX_VALUE); + WIRED_CHARGER_USAGE = builder.comment("The base energy consumption in uI/t.").defineInRange("usage", 64, 1, Integer.MAX_VALUE); builder.pop(); builder.pop(); diff --git a/src/machines/java/com/enderio/machines/data/recipes/SoulBindingRecipeProvider.java b/src/machines/java/com/enderio/machines/data/recipes/SoulBindingRecipeProvider.java index 2307fde6c8..54a8c72678 100644 --- a/src/machines/java/com/enderio/machines/data/recipes/SoulBindingRecipeProvider.java +++ b/src/machines/java/com/enderio/machines/data/recipes/SoulBindingRecipeProvider.java @@ -32,15 +32,15 @@ public SoulBindingRecipeProvider(PackOutput packOutput) { @Override protected void buildRecipes(Consumer pFinishedRecipeConsumer) { - build(EIOItems.ENTICING_CRYSTAL, Ingredient.of(Items.EMERALD), 100000, 4, EntityType.VILLAGER, pFinishedRecipeConsumer); - build(EIOItems.ENDER_CRYSTAL, Ingredient.of(EIOItems.VIBRANT_CRYSTAL), 150000, 6, EntityType.ENDERMAN, pFinishedRecipeConsumer); - build(EIOItems.PRESCIENT_CRYSTAL, Ingredient.of(EIOItems.VIBRANT_CRYSTAL), 200000, 8, EntityType.SHULKER, pFinishedRecipeConsumer); - build(EIOItems.FRANK_N_ZOMBIE, Ingredient.of(EIOItems.Z_LOGIC_CONTROLLER), 100000, 4, EntityType.ZOMBIE, pFinishedRecipeConsumer); - build(EIOItems.SENTIENT_ENDER, Ingredient.of(EIOItems.ENDER_RESONATOR), 100000, 4, EntityType.WITCH, pFinishedRecipeConsumer); - build(EIOItems.BROKEN_SPAWNER, Ingredient.of(EIOItems.BROKEN_SPAWNER), 2500000, 8, pFinishedRecipeConsumer); - build(EIOItems.PLAYER_TOKEN, Ingredient.of(EIOItems.DARK_STEEL_BALL), 25000, 1, EntityType.VILLAGER, pFinishedRecipeConsumer); - build(EIOItems.MONSTER_TOKEN, Ingredient.of(EIOItems.SOULARIUM_BALL), 25000, 1, MobCategory.MONSTER, pFinishedRecipeConsumer); - build(EIOItems.ANIMAL_TOKEN, Ingredient.of(EIOItems.SOULARIUM_BALL), 25000, 1, MobCategory.CREATURE, pFinishedRecipeConsumer); + build(EIOItems.ENTICING_CRYSTAL, Ingredient.of(Items.EMERALD), 51200, 4, EntityType.VILLAGER, pFinishedRecipeConsumer); + build(EIOItems.ENDER_CRYSTAL, Ingredient.of(EIOItems.VIBRANT_CRYSTAL), 76800, 6, EntityType.ENDERMAN, pFinishedRecipeConsumer); + build(EIOItems.PRESCIENT_CRYSTAL, Ingredient.of(EIOItems.VIBRANT_CRYSTAL), 100000, 8, EntityType.SHULKER, pFinishedRecipeConsumer); + build(EIOItems.FRANK_N_ZOMBIE, Ingredient.of(EIOItems.Z_LOGIC_CONTROLLER), 51200, 4, EntityType.ZOMBIE, pFinishedRecipeConsumer); + build(EIOItems.SENTIENT_ENDER, Ingredient.of(EIOItems.ENDER_RESONATOR), 51200, 4, EntityType.WITCH, pFinishedRecipeConsumer); + build(EIOItems.BROKEN_SPAWNER, Ingredient.of(EIOItems.BROKEN_SPAWNER), 288000, 8, pFinishedRecipeConsumer); + build(EIOItems.PLAYER_TOKEN, Ingredient.of(EIOItems.DARK_STEEL_BALL), 12800, 1, EntityType.VILLAGER, pFinishedRecipeConsumer); + build(EIOItems.MONSTER_TOKEN, Ingredient.of(EIOItems.SOULARIUM_BALL), 12800, 1, MobCategory.MONSTER, pFinishedRecipeConsumer); + build(EIOItems.ANIMAL_TOKEN, Ingredient.of(EIOItems.SOULARIUM_BALL), 12800, 1, MobCategory.CREATURE, pFinishedRecipeConsumer); } protected void build(ItemLike output, Ingredient input, int energy, int exp, EntityType entityType, Consumer finishedRecipeConsumer) { diff --git a/src/machines/java/com/enderio/machines/data/souldata/SoulDataProvider.java b/src/machines/java/com/enderio/machines/data/souldata/SoulDataProvider.java index a7a6c00f62..38547e7d02 100644 --- a/src/machines/java/com/enderio/machines/data/souldata/SoulDataProvider.java +++ b/src/machines/java/com/enderio/machines/data/souldata/SoulDataProvider.java @@ -35,6 +35,7 @@ public SoulDataProvider(PackOutput packOutput) { } public void buildSoulData(Consumer> finshedSoulDataConsumer) { + // TODO: Energy values might need reviewing. addSpawnerData(EntityType.ALLAY, 1000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); addSpawnerData(EntityType.AXOLOTL, 1000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); addSpawnerData(EntityType.BAT, 1000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); From 651b37364ef2e3bc3bea4f98b62ec20967c4d586 Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Thu, 3 Aug 2023 01:31:26 +0200 Subject: [PATCH 044/154] small tweaks - remove and balance dye recipes - change alloy and sagmill recipe - change solar panel recipe - --- .../data/enderio/recipes/alloy_smelter.json | 2 +- .../alloy_smelting/organic_black_dye.json | 2 +- .../organic_black_dye_double.json | 2 +- .../alloy_smelting/organic_brown_dye.json | 28 ------------------ .../organic_brown_dye_double.json | 29 ------------------- .../organic_brown_dye_twigs.json | 2 +- .../organic_brown_dye_twigs_double.json | 2 +- .../alloy_smelting/organic_green_dye.json | 28 ------------------ .../organic_green_dye_clippings.json | 2 +- .../organic_green_dye_double.json | 29 ------------------- .../organic_green_dye_double_clippings.json | 2 +- .../recipes/alloy_smelting/red_dye.json | 2 +- .../energetic_photovoltaic_module.json | 6 ++-- .../data/enderio/recipes/sag_mill.json | 2 +- .../recipes/sagmilling/lapis_block.json | 2 +- .../recipes/soulbinding/broken_spawner.json | 2 +- .../data/recipes/AlloyRecipeProvider.java | 18 +++++------- .../data/recipes/MachineRecipeProvider.java | 10 +++---- .../data/recipes/SagMillRecipeProvider.java | 2 +- 19 files changed, 27 insertions(+), 145 deletions(-) delete mode 100644 src/generated/resources/data/enderio/recipes/alloy_smelting/organic_brown_dye.json delete mode 100644 src/generated/resources/data/enderio/recipes/alloy_smelting/organic_brown_dye_double.json delete mode 100644 src/generated/resources/data/enderio/recipes/alloy_smelting/organic_green_dye.json delete mode 100644 src/generated/resources/data/enderio/recipes/alloy_smelting/organic_green_dye_double.json diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelter.json b/src/generated/resources/data/enderio/recipes/alloy_smelter.json index e7ea46e45e..c58e129a17 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelter.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelter.json @@ -9,7 +9,7 @@ "item": "minecraft:furnace" }, "G": { - "item": "enderio:dark_bimetal_gear" + "item": "enderio:iron_gear" }, "I": { "item": "enderio:dark_steel_ingot" diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_black_dye.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_black_dye.json index 9b5ca962cd..67024fc09d 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_black_dye.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_black_dye.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 1500, + "energy": 1000, "experience": 0.3, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_black_dye_double.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_black_dye_double.json index b3f824b242..285a13915c 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_black_dye_double.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_black_dye_double.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 2000, + "energy": 1600, "experience": 0.3, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_brown_dye.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_brown_dye.json deleted file mode 100644 index b7500f6383..0000000000 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_brown_dye.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "type": "enderio:alloy_smelting", - "energy": 1500, - "experience": 0.3, - "inputs": [ - { - "count": 1, - "ingredient": { - "item": "minecraft:brown_dye" - } - }, - { - "count": 1, - "ingredient": { - "item": "minecraft:egg" - } - }, - { - "count": 1, - "ingredient": { - "tag": "forge:dusts/coal" - } - } - ], - "result": { - "item": "enderio:organic_brown_dye" - } -} \ No newline at end of file diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_brown_dye_double.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_brown_dye_double.json deleted file mode 100644 index 7562ee8291..0000000000 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_brown_dye_double.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "type": "enderio:alloy_smelting", - "energy": 2000, - "experience": 0.3, - "inputs": [ - { - "count": 2, - "ingredient": { - "item": "minecraft:brown_dye" - } - }, - { - "count": 1, - "ingredient": { - "tag": "forge:slimeballs" - } - }, - { - "count": 2, - "ingredient": { - "tag": "forge:dusts/coal" - } - } - ], - "result": { - "count": 2, - "item": "enderio:organic_brown_dye" - } -} \ No newline at end of file diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_brown_dye_twigs.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_brown_dye_twigs.json index 978d6c6650..f1321f162e 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_brown_dye_twigs.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_brown_dye_twigs.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 1500, + "energy": 1000, "experience": 0.3, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_brown_dye_twigs_double.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_brown_dye_twigs_double.json index 280a2de3a1..a63e464127 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_brown_dye_twigs_double.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_brown_dye_twigs_double.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 2000, + "energy": 1600, "experience": 0.3, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_green_dye.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_green_dye.json deleted file mode 100644 index a2b5d7ffe4..0000000000 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_green_dye.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "type": "enderio:alloy_smelting", - "energy": 1500, - "experience": 0.3, - "inputs": [ - { - "count": 1, - "ingredient": { - "tag": "forge:dyes/green" - } - }, - { - "count": 1, - "ingredient": { - "item": "minecraft:egg" - } - }, - { - "count": 1, - "ingredient": { - "tag": "forge:dusts/coal" - } - } - ], - "result": { - "item": "enderio:organic_green_dye" - } -} \ No newline at end of file diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_green_dye_clippings.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_green_dye_clippings.json index 529cb30751..0cfd5d6f8a 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_green_dye_clippings.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_green_dye_clippings.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 1500, + "energy": 1000, "experience": 0.3, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_green_dye_double.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_green_dye_double.json deleted file mode 100644 index 708d2a9210..0000000000 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_green_dye_double.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "type": "enderio:alloy_smelting", - "energy": 2000, - "experience": 0.3, - "inputs": [ - { - "count": 2, - "ingredient": { - "tag": "forge:dyes/green" - } - }, - { - "count": 1, - "ingredient": { - "tag": "forge:slimeballs" - } - }, - { - "count": 2, - "ingredient": { - "tag": "forge:dusts/coal" - } - } - ], - "result": { - "count": 2, - "item": "enderio:organic_green_dye" - } -} \ No newline at end of file diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_green_dye_double_clippings.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_green_dye_double_clippings.json index 8433642499..73401cc7fb 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_green_dye_double_clippings.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/organic_green_dye_double_clippings.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 2000, + "energy": 1600, "experience": 0.3, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/alloy_smelting/red_dye.json b/src/generated/resources/data/enderio/recipes/alloy_smelting/red_dye.json index 572ffd5b4a..5b2cee5114 100644 --- a/src/generated/resources/data/enderio/recipes/alloy_smelting/red_dye.json +++ b/src/generated/resources/data/enderio/recipes/alloy_smelting/red_dye.json @@ -1,6 +1,6 @@ { "type": "enderio:alloy_smelting", - "energy": 15000, + "energy": 1600, "experience": 0.3, "inputs": [ { diff --git a/src/generated/resources/data/enderio/recipes/energetic_photovoltaic_module.json b/src/generated/resources/data/enderio/recipes/energetic_photovoltaic_module.json index 61a299e660..eeb0f02605 100644 --- a/src/generated/resources/data/enderio/recipes/energetic_photovoltaic_module.json +++ b/src/generated/resources/data/enderio/recipes/energetic_photovoltaic_module.json @@ -6,13 +6,13 @@ "item": "enderio:basic_capacitor" }, "D": { - "item": "minecraft:daylight_detector" + "item": "minecraft:redstone" }, "E": { - "item": "enderio:energetic_alloy_ingot" + "tag": "forge:ingots/gold" }, "F": { - "tag": "enderio:fused_quartz" + "tag": "forge:glass" }, "P": { "item": "enderio:photovoltaic_plate" diff --git a/src/generated/resources/data/enderio/recipes/sag_mill.json b/src/generated/resources/data/enderio/recipes/sag_mill.json index 5be03bc190..617e88309f 100644 --- a/src/generated/resources/data/enderio/recipes/sag_mill.json +++ b/src/generated/resources/data/enderio/recipes/sag_mill.json @@ -6,7 +6,7 @@ "item": "minecraft:flint" }, "G": { - "item": "enderio:dark_bimetal_gear" + "item": "enderio:iron_gear" }, "I": { "item": "enderio:dark_steel_ingot" diff --git a/src/generated/resources/data/enderio/recipes/sagmilling/lapis_block.json b/src/generated/resources/data/enderio/recipes/sagmilling/lapis_block.json index 6c11e3d90f..2a75bfda38 100644 --- a/src/generated/resources/data/enderio/recipes/sagmilling/lapis_block.json +++ b/src/generated/resources/data/enderio/recipes/sagmilling/lapis_block.json @@ -1,6 +1,6 @@ { "type": "enderio:sagmilling", - "energy": 3600, + "energy": 14400, "input": { "tag": "forge:storage_blocks/lapis" }, diff --git a/src/generated/resources/data/enderio/recipes/soulbinding/broken_spawner.json b/src/generated/resources/data/enderio/recipes/soulbinding/broken_spawner.json index bce7a6f6d4..886f9c154d 100644 --- a/src/generated/resources/data/enderio/recipes/soulbinding/broken_spawner.json +++ b/src/generated/resources/data/enderio/recipes/soulbinding/broken_spawner.json @@ -1,6 +1,6 @@ { "type": "enderio:soul_binding", - "energy": 1000000, + "energy": 288000, "exp": 8, "input": { "item": "enderio:broken_spawner" diff --git a/src/machines/java/com/enderio/machines/data/recipes/AlloyRecipeProvider.java b/src/machines/java/com/enderio/machines/data/recipes/AlloyRecipeProvider.java index f97a21e865..524dc2a3d2 100644 --- a/src/machines/java/com/enderio/machines/data/recipes/AlloyRecipeProvider.java +++ b/src/machines/java/com/enderio/machines/data/recipes/AlloyRecipeProvider.java @@ -59,20 +59,16 @@ protected void buildRecipes(Consumer pFinishedRecipeConsumer) { // region Dyes - build(new ItemStack(EIOItems.DYE_GREEN.get()), List.of(CountedIngredient.of(Tags.Items.DYES_GREEN), CountedIngredient.of(Items.EGG), CountedIngredient.of(EIOTags.Items.DUSTS_COAL)), 1500, 0.3f, pFinishedRecipeConsumer); - build(new ItemStack(EIOItems.DYE_GREEN.get(), 2), "double", List.of(CountedIngredient.of(2, Tags.Items.DYES_GREEN), CountedIngredient.of(Tags.Items.SLIMEBALLS), CountedIngredient.of(2, EIOTags.Items.DUSTS_COAL)), 2000, 0.3f, pFinishedRecipeConsumer); - build(new ItemStack(EIOItems.DYE_GREEN.get()), "clippings", List.of(CountedIngredient.of(6, EIOItems.PLANT_MATTER_GREEN.get()), CountedIngredient.of(Items.EGG)), 1500, 0.3f, pFinishedRecipeConsumer); - build(new ItemStack(EIOItems.DYE_GREEN.get(), 2), "double_clippings", List.of(CountedIngredient.of(12, EIOItems.PLANT_MATTER_GREEN.get()), CountedIngredient.of(Tags.Items.SLIMEBALLS)), 2000, 0.3f, pFinishedRecipeConsumer); + build(new ItemStack(EIOItems.DYE_GREEN.get()), "clippings", List.of(CountedIngredient.of(6, EIOItems.PLANT_MATTER_GREEN.get()), CountedIngredient.of(Items.EGG)), 1000, 0.3f, pFinishedRecipeConsumer); + build(new ItemStack(EIOItems.DYE_GREEN.get(), 2), "double_clippings", List.of(CountedIngredient.of(12, EIOItems.PLANT_MATTER_GREEN.get()), CountedIngredient.of(Tags.Items.SLIMEBALLS)), 1600, 0.3f, pFinishedRecipeConsumer); - build(new ItemStack(EIOItems.DYE_BROWN.get()), List.of(CountedIngredient.of(Items.BROWN_DYE), CountedIngredient.of(Items.EGG), CountedIngredient.of(EIOTags.Items.DUSTS_COAL)), 1500, 0.3f, pFinishedRecipeConsumer); - build(new ItemStack(EIOItems.DYE_BROWN.get(), 2), "double", List.of(CountedIngredient.of(2, Items.BROWN_DYE), CountedIngredient.of(Tags.Items.SLIMEBALLS), CountedIngredient.of(2, EIOTags.Items.DUSTS_COAL)), 2000, 0.3f, pFinishedRecipeConsumer); - build(new ItemStack(EIOItems.DYE_BROWN.get()), "twigs", List.of(CountedIngredient.of(6, EIOItems.PLANT_MATTER_BROWN.get()), CountedIngredient.of(Items.EGG)), 1500, 0.3f, pFinishedRecipeConsumer); - build(new ItemStack(EIOItems.DYE_BROWN.get(), 2), "twigs_double", List.of(CountedIngredient.of(12, EIOItems.PLANT_MATTER_BROWN.get()), CountedIngredient.of(Tags.Items.SLIMEBALLS)), 2000, 0.3f, pFinishedRecipeConsumer); + build(new ItemStack(EIOItems.DYE_BROWN.get()), "twigs", List.of(CountedIngredient.of(6, EIOItems.PLANT_MATTER_BROWN.get()), CountedIngredient.of(Items.EGG)), 1000, 0.3f, pFinishedRecipeConsumer); + build(new ItemStack(EIOItems.DYE_BROWN.get(), 2), "twigs_double", List.of(CountedIngredient.of(12, EIOItems.PLANT_MATTER_BROWN.get()), CountedIngredient.of(Tags.Items.SLIMEBALLS)), 1600, 0.3f, pFinishedRecipeConsumer); - build(new ItemStack(EIOItems.DYE_BLACK.get()), List.of(CountedIngredient.of(1, EIOTags.Items.DUSTS_COAL), CountedIngredient.of(Items.EGG)), 1500, 0.3f, pFinishedRecipeConsumer); - build(new ItemStack(EIOItems.DYE_BLACK.get(), 2), "double", List.of(CountedIngredient.of(2, EIOTags.Items.DUSTS_COAL), CountedIngredient.of(Tags.Items.SLIMEBALLS)), 2000, 0.3f, pFinishedRecipeConsumer); + build(new ItemStack(EIOItems.DYE_BLACK.get()), List.of(CountedIngredient.of(1, EIOTags.Items.DUSTS_COAL), CountedIngredient.of(Items.EGG)), 1000, 0.3f, pFinishedRecipeConsumer); + build(new ItemStack(EIOItems.DYE_BLACK.get(), 2), "double", List.of(CountedIngredient.of(2, EIOTags.Items.DUSTS_COAL), CountedIngredient.of(Tags.Items.SLIMEBALLS)), 1600, 0.3f, pFinishedRecipeConsumer); - build(new ItemStack(Items.RED_DYE, 12), List.of(CountedIngredient.of(Items.BEETROOT), CountedIngredient.of(3, Items.CLAY_BALL), CountedIngredient.of(6, Items.EGG)), 15000, 0.3f, pFinishedRecipeConsumer); + build(new ItemStack(Items.RED_DYE, 12), List.of(CountedIngredient.of(Items.BEETROOT), CountedIngredient.of(3, Items.CLAY_BALL), CountedIngredient.of(6, Items.EGG)), 1600, 0.3f, pFinishedRecipeConsumer); // endregion diff --git a/src/machines/java/com/enderio/machines/data/recipes/MachineRecipeProvider.java b/src/machines/java/com/enderio/machines/data/recipes/MachineRecipeProvider.java index 8aa52f2adb..efbe51ba3b 100644 --- a/src/machines/java/com/enderio/machines/data/recipes/MachineRecipeProvider.java +++ b/src/machines/java/com/enderio/machines/data/recipes/MachineRecipeProvider.java @@ -130,7 +130,7 @@ protected void buildRecipes(Consumer finishedRecipeConsumer) { .shaped(RecipeCategory.MISC, MachineBlocks.ALLOY_SMELTER.get()) .define('F', Blocks.FURNACE) .define('I', EIOItems.DARK_STEEL_INGOT.get()) - .define('G', EIOItems.GEAR_DARK_STEEL.get()) + .define('G', EIOItems.GEAR_IRON.get()) .define('C', Items.CAULDRON) .define('V', EIOBlocks.VOID_CHASSIS.get()) .pattern("IFI") @@ -157,7 +157,7 @@ protected void buildRecipes(Consumer finishedRecipeConsumer) { .shaped(RecipeCategory.MISC, MachineBlocks.SAG_MILL.get()) .define('F', Items.FLINT) .define('I', EIOItems.DARK_STEEL_INGOT.get()) - .define('G', EIOItems.GEAR_DARK_STEEL.get()) + .define('G', EIOItems.GEAR_IRON.get()) .define('V', EIOBlocks.VOID_CHASSIS.get()) .define('P', Items.PISTON) .pattern("FFF") @@ -266,11 +266,11 @@ protected void buildRecipes(Consumer finishedRecipeConsumer) { ShapedRecipeBuilder .shaped(RecipeCategory.MISC, MachineBlocks.SOLAR_PANELS.get(SolarPanelTier.ENERGETIC)) - .define('E', EIOItems.ENERGETIC_ALLOY_INGOT) - .define('F', EIOTags.Items.FUSED_QUARTZ) + .define('E', Tags.Items.INGOTS_GOLD) + .define('F', Tags.Items.GLASS) .define('P', EIOItems.PHOTOVOLTAIC_PLATE) .define('C', EIOItems.BASIC_CAPACITOR) - .define('D', Items.DAYLIGHT_DETECTOR) + .define('D', Items.REDSTONE) .pattern("EFE") .pattern("PPP") .pattern("CDC") diff --git a/src/machines/java/com/enderio/machines/data/recipes/SagMillRecipeProvider.java b/src/machines/java/com/enderio/machines/data/recipes/SagMillRecipeProvider.java index 9975dd8f8e..63e999177a 100644 --- a/src/machines/java/com/enderio/machines/data/recipes/SagMillRecipeProvider.java +++ b/src/machines/java/com/enderio/machines/data/recipes/SagMillRecipeProvider.java @@ -114,7 +114,7 @@ protected void buildRecipes(Consumer finishedRecipeConsumer) { build("lapis_block", Ingredient.of(Tags.Items.STORAGE_BLOCKS_LAPIS), List.of( output(POWDERED_LAPIS_LAZULI.get(), 9) - ), Math.round(BASE_ENERGY_PER_OPERATION * 1.5f), finishedRecipeConsumer); + ), Math.round(BASE_ENERGY_PER_OPERATION * 6f), finishedRecipeConsumer); build("quartz_ore", Ingredient.of(Tags.Items.ORES_QUARTZ), List.of( output(QUARTZ, 2), From 41ee1907bc72847b6efed3e9305a309bbd3c90e6 Mon Sep 17 00:00:00 2001 From: mystchonky Date: Thu, 3 Aug 2023 13:12:50 +0530 Subject: [PATCH 045/154] finish basic rendering of anchors --- .../enderio/api/travel/TravelRenderer.java | 2 +- .../rendering/travel/OutlineBuffer.java | 21 ++++++ .../rendering/travel/OutlineRenderType.java | 72 +++++++++++++++++++ .../travel/TravelAnchorRenderer.java | 24 +++++-- .../renderer/travel/RenderTravelTargets.java | 7 +- .../resources/META-INF/accesstransformer.cfg | 6 +- 6 files changed, 120 insertions(+), 12 deletions(-) create mode 100644 src/machines/java/com/enderio/machines/client/rendering/travel/OutlineBuffer.java create mode 100644 src/machines/java/com/enderio/machines/client/rendering/travel/OutlineRenderType.java diff --git a/src/api/java/com/enderio/api/travel/TravelRenderer.java b/src/api/java/com/enderio/api/travel/TravelRenderer.java index 0bc8e0c9e6..6b88753d06 100644 --- a/src/api/java/com/enderio/api/travel/TravelRenderer.java +++ b/src/api/java/com/enderio/api/travel/TravelRenderer.java @@ -4,5 +4,5 @@ import net.minecraft.client.renderer.LevelRenderer; public interface TravelRenderer { - void render(T travelData, LevelRenderer levelRenderer, PoseStack poseStack); + void render(T travelData, LevelRenderer levelRenderer, PoseStack poseStack, double distanceSquared); } \ No newline at end of file diff --git a/src/machines/java/com/enderio/machines/client/rendering/travel/OutlineBuffer.java b/src/machines/java/com/enderio/machines/client/rendering/travel/OutlineBuffer.java new file mode 100644 index 0000000000..848408186e --- /dev/null +++ b/src/machines/java/com/enderio/machines/client/rendering/travel/OutlineBuffer.java @@ -0,0 +1,21 @@ +package com.enderio.machines.client.rendering.travel; + +import com.mojang.blaze3d.vertex.VertexConsumer; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.RenderType; +import org.jetbrains.annotations.NotNull; + +public class OutlineBuffer implements MultiBufferSource { + + public static final OutlineBuffer INSTANCE = new OutlineBuffer(); + + private OutlineBuffer() {} + + @NotNull + @Override + public VertexConsumer getBuffer(@NotNull RenderType type) { + return Minecraft.getInstance().renderBuffers().bufferSource().getBuffer(OutlineRenderType.get(type)); + } +} + diff --git a/src/machines/java/com/enderio/machines/client/rendering/travel/OutlineRenderType.java b/src/machines/java/com/enderio/machines/client/rendering/travel/OutlineRenderType.java new file mode 100644 index 0000000000..7855a37e35 --- /dev/null +++ b/src/machines/java/com/enderio/machines/client/rendering/travel/OutlineRenderType.java @@ -0,0 +1,72 @@ +package com.enderio.machines.client.rendering.travel; + +import com.enderio.EnderIO; +import com.mojang.blaze3d.vertex.DefaultVertexFormat; +import com.mojang.blaze3d.vertex.VertexFormat; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.RenderStateShard; +import net.minecraft.client.renderer.RenderType; +import org.jetbrains.annotations.NotNull; + +import java.util.HashMap; +import java.util.Map; +import java.util.OptionalDouble; + +public class OutlineRenderType extends RenderType { + + private static final Map TYPES = new HashMap<>(); + + private final RenderType parent; + + private OutlineRenderType(RenderType parent) { + super("Outline" + parent.name, parent.format(), parent.mode(), parent.bufferSize(), parent.affectsCrumbling(), parent.sortOnUpload, + parent::setupRenderState, parent::clearRenderState); + this.parent = parent; + } + + public static OutlineRenderType get(RenderType parent) { + if (parent instanceof OutlineRenderType) { + return (OutlineRenderType) parent; + } else { + if (!TYPES.containsKey(parent)) { + TYPES.put(parent, new OutlineRenderType(parent)); + } + return TYPES.get(parent); + } + } + + @NotNull + @Override + public String toString() { + return "Outline" + this.parent; + } + + @Override + public void setupRenderState() { + this.parent.setupRenderState(); + if (Minecraft.getInstance().levelRenderer.entityTarget() != null) { + //noinspection ConstantConditions + Minecraft.getInstance().levelRenderer.entityTarget().bindWrite(false); + } + } + + @Override + public void clearRenderState() { + Minecraft.getInstance().getMainRenderTarget().bindWrite(false); + this.parent.clearRenderState(); + } + + public static RenderType createLines(String name, int strength) { + return RenderType.create(EnderIO.MODID + "_" + name, DefaultVertexFormat.POSITION_COLOR_NORMAL, VertexFormat.Mode.LINES, 256, false, false, + RenderType.CompositeState + .builder() + .setShaderState(RenderStateShard.RENDERTYPE_LINES_SHADER) + .setLineState(new RenderStateShard.LineStateShard(OptionalDouble.of(strength))) + .setLayeringState(RenderStateShard.VIEW_OFFSET_Z_LAYERING) + .setTransparencyState(RenderStateShard.TRANSLUCENT_TRANSPARENCY) + .setOutputState(RenderStateShard.ITEM_ENTITY_TARGET) + .setWriteMaskState(RenderStateShard.COLOR_DEPTH_WRITE) + .setCullState(RenderStateShard.NO_CULL) + .createCompositeState(false)); + } +} diff --git a/src/machines/java/com/enderio/machines/client/rendering/travel/TravelAnchorRenderer.java b/src/machines/java/com/enderio/machines/client/rendering/travel/TravelAnchorRenderer.java index bc9bb04769..268e595ccb 100644 --- a/src/machines/java/com/enderio/machines/client/rendering/travel/TravelAnchorRenderer.java +++ b/src/machines/java/com/enderio/machines/client/rendering/travel/TravelAnchorRenderer.java @@ -6,27 +6,39 @@ import com.mojang.blaze3d.vertex.VertexConsumer; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.LevelRenderer; -import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.client.resources.model.BakedModel; import net.minecraft.world.level.block.state.BlockState; public class TravelAnchorRenderer implements TravelRenderer { + public static final RenderType BOLD_LINES = OutlineRenderType.createLines("bold_lines", 3); + public static final RenderType VERY_BOLD_LINES = OutlineRenderType.createLines("very_bold_lines", 5); + @Override - public void render(AnchorTravelTarget travelData, LevelRenderer levelRenderer, PoseStack poseStack) { + public void render(AnchorTravelTarget travelData, LevelRenderer levelRenderer, PoseStack poseStack, double distanceSquared) { if (!travelData.getVisibility()) return; poseStack.pushPose(); poseStack.translate(travelData.getPos().getX(), travelData.getPos().getY(), travelData.getPos().getZ()); Minecraft mc = Minecraft.getInstance(); - MultiBufferSource.BufferSource bs = mc.renderBuffers().bufferSource(); + OutlineBuffer buffer = OutlineBuffer.INSTANCE; BlockState state = mc.level.getBlockState(travelData.getPos()); BakedModel model = mc.getBlockRenderer().getBlockModel(state); - VertexConsumer vertex = bs.getBuffer(RenderType.solid()); + VertexConsumer vertex = buffer.getBuffer(RenderType.solid()); mc.getBlockRenderer().getModelRenderer().renderModel(poseStack.last(), vertex, state, model, 1, 1, 1, 0xF000F0, OverlayTexture.NO_OVERLAY); - // mc.getBlockRenderer().renderSingleBlock(state, poseStack, bs, 0xF000F0, OverlayTexture.NO_OVERLAY); - bs.endBatch(); + RenderType type; + if (distanceSquared > 85 * 85) { + type = RenderType.lines(); + } else if (distanceSquared > 38 * 38) { + type = BOLD_LINES; + } else { + type = VERY_BOLD_LINES; + } + VertexConsumer vert = buffer.getBuffer(type); + LevelRenderer.renderLineBox(poseStack, vert, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1); poseStack.popPose(); + mc.renderBuffers().bufferSource().endBatch(); + } } diff --git a/src/main/java/com/enderio/base/client/renderer/travel/RenderTravelTargets.java b/src/main/java/com/enderio/base/client/renderer/travel/RenderTravelTargets.java index ab9f57030e..3adafc6ad3 100644 --- a/src/main/java/com/enderio/base/client/renderer/travel/RenderTravelTargets.java +++ b/src/main/java/com/enderio/base/client/renderer/travel/RenderTravelTargets.java @@ -30,7 +30,8 @@ public static void renderLevel(RenderLevelStageEvent event) { TravelSavedData data = TravelSavedData.getTravelData(Minecraft.getInstance().level); for (ITravelTarget target : data.getTravelTargets()) { double range = itemTeleport ? target.getItem2BlockRange() : target.getBlock2BlockRange(); - if (range * range < target.getPos().distToCenterSqr(player.position())) + double distanceSquared = target.getPos().distToCenterSqr(player.position()); + if (range * range < distanceSquared || distanceSquared < 25) continue; PoseStack poseStack = event.getPoseStack(); poseStack.pushPose(); @@ -38,9 +39,7 @@ public static void renderLevel(RenderLevelStageEvent event) { Vec3 projectedView = mainCamera.getPosition(); poseStack.translate(-projectedView.x, -projectedView.y, -projectedView.z); - //TODO: Scale, View Bobbing, (FOV/Creative Flight offset stuff) - // pls Crazy, be a rendering genius - TravelRegistry.getRenderer(target).render(target, event.getLevelRenderer(), poseStack); + TravelRegistry.getRenderer(target).render(target, event.getLevelRenderer(), poseStack, distanceSquared); poseStack.popPose(); } } diff --git a/src/main/resources/META-INF/accesstransformer.cfg b/src/main/resources/META-INF/accesstransformer.cfg index 2ddb50b669..843d22f4a2 100644 --- a/src/main/resources/META-INF/accesstransformer.cfg +++ b/src/main/resources/META-INF/accesstransformer.cfg @@ -34,4 +34,8 @@ public net.minecraft.world.item.crafting.Ingredient f_43902_ # values public-f net.minecraft.world.item.crafting.ShapedRecipe f_44149_ # result public net.minecraft.client.renderer.LevelRenderer m_109804_(Lnet/minecraft/core/particles/ParticleOptions;ZZDDDDDD)Lnet/minecraft/client/particle/Particle; # addParticleInternal -public net.minecraft.client.particle.Particle f_107226_ # gravity \ No newline at end of file +public net.minecraft.client.particle.Particle f_107226_ # gravity + +# RenderTypes +public net.minecraft.client.renderer.RenderType f_110393_ # sortOnUpload +public net.minecraft.client.renderer.RenderStateShard f_110133_ # name \ No newline at end of file From 3180c8cba35a5ada1ad949f2bf7c4a40675ce7cd Mon Sep 17 00:00:00 2001 From: mystchonky Date: Thu, 3 Aug 2023 14:50:08 +0530 Subject: [PATCH 046/154] render Text and active highlights --- .../enderio/api/travel/TravelRenderer.java | 2 +- .../travel/TravelAnchorRenderer.java | 67 ++++++++++++++++--- .../renderer/travel/RenderTravelTargets.java | 6 +- .../base/common/handler/TeleportHandler.java | 7 +- 4 files changed, 67 insertions(+), 15 deletions(-) diff --git a/src/api/java/com/enderio/api/travel/TravelRenderer.java b/src/api/java/com/enderio/api/travel/TravelRenderer.java index 6b88753d06..31aed79793 100644 --- a/src/api/java/com/enderio/api/travel/TravelRenderer.java +++ b/src/api/java/com/enderio/api/travel/TravelRenderer.java @@ -4,5 +4,5 @@ import net.minecraft.client.renderer.LevelRenderer; public interface TravelRenderer { - void render(T travelData, LevelRenderer levelRenderer, PoseStack poseStack, double distanceSquared); + void render(T travelData, LevelRenderer levelRenderer, PoseStack poseStack, double distanceSquared, boolean active); } \ No newline at end of file diff --git a/src/machines/java/com/enderio/machines/client/rendering/travel/TravelAnchorRenderer.java b/src/machines/java/com/enderio/machines/client/rendering/travel/TravelAnchorRenderer.java index 268e595ccb..e5a12dd881 100644 --- a/src/machines/java/com/enderio/machines/client/rendering/travel/TravelAnchorRenderer.java +++ b/src/machines/java/com/enderio/machines/client/rendering/travel/TravelAnchorRenderer.java @@ -4,39 +4,84 @@ import com.enderio.machines.common.travel.AnchorTravelTarget; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; +import net.minecraft.ChatFormatting; import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.Font; import net.minecraft.client.renderer.LevelRenderer; +import net.minecraft.client.renderer.LightTexture; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.client.resources.model.BakedModel; +import net.minecraft.network.chat.Component; +import net.minecraft.util.FastColor; import net.minecraft.world.level.block.state.BlockState; +import org.joml.Matrix4f; public class TravelAnchorRenderer implements TravelRenderer { public static final RenderType BOLD_LINES = OutlineRenderType.createLines("bold_lines", 3); public static final RenderType VERY_BOLD_LINES = OutlineRenderType.createLines("very_bold_lines", 5); @Override - public void render(AnchorTravelTarget travelData, LevelRenderer levelRenderer, PoseStack poseStack, double distanceSquared) { + public void render(AnchorTravelTarget travelData, LevelRenderer levelRenderer, PoseStack poseStack, double distanceSquared, boolean active) { if (!travelData.getVisibility()) return; poseStack.pushPose(); poseStack.translate(travelData.getPos().getX(), travelData.getPos().getY(), travelData.getPos().getZ()); Minecraft mc = Minecraft.getInstance(); OutlineBuffer buffer = OutlineBuffer.INSTANCE; - BlockState state = mc.level.getBlockState(travelData.getPos()); - BakedModel model = mc.getBlockRenderer().getBlockModel(state); - VertexConsumer vertex = buffer.getBuffer(RenderType.solid()); - mc.getBlockRenderer().getModelRenderer().renderModel(poseStack.last(), vertex, state, model, 1, 1, 1, 0xF000F0, OverlayTexture.NO_OVERLAY); - RenderType type; + int color = 0xFFFFFF; + if (active) { + color = ChatFormatting.GOLD.getColor() == null ? 0xFFFFFF : ChatFormatting.GOLD.getColor(); + } + + // Render Model + BlockState blockState = mc.level.getBlockState(travelData.getPos()); + BakedModel blockModel = mc.getBlockRenderer().getBlockModel(blockState); + VertexConsumer solid = buffer.getBuffer(RenderType.solid()); + mc.getBlockRenderer().getModelRenderer().renderModel(poseStack.last(), solid, blockState, blockModel, 1, 1, 1, 0xF000F0, OverlayTexture.NO_OVERLAY); + + // Render line + RenderType lineType; if (distanceSquared > 85 * 85) { - type = RenderType.lines(); + lineType = RenderType.lines(); } else if (distanceSquared > 38 * 38) { - type = BOLD_LINES; + lineType = BOLD_LINES; } else { - type = VERY_BOLD_LINES; + lineType = VERY_BOLD_LINES; + } + VertexConsumer lines = buffer.getBuffer(lineType); + LevelRenderer.renderLineBox(poseStack, lines, 0, 0, 0, 1, 1, 1, FastColor.ARGB32.red(color) / 255F, FastColor.ARGB32.green(color) / 255F, + FastColor.ARGB32.blue(color) / 255F, 1); + + //Render Text + if (!travelData.getName().trim().isEmpty()) { + double doubleScale = Math.sqrt(0.0035 * Math.sqrt(distanceSquared)); + if (doubleScale < 0.1f) { + doubleScale = 0.1f; + } + doubleScale = doubleScale * (Math.sin(Math.toRadians(Minecraft.getInstance().options.fov().get() / 4d))); + if (active) { + doubleScale *= 1.3; + } + float scale = (float) doubleScale; + + poseStack.pushPose(); + poseStack.translate(0.5, 1.05 + (doubleScale * Minecraft.getInstance().font.lineHeight), 0.5); + poseStack.mulPose(Minecraft.getInstance().getEntityRenderDispatcher().cameraOrientation()); + poseStack.scale(-scale, -scale, scale); + + Matrix4f matrix4f = poseStack.last().pose(); + Component tc = Component.literal(travelData.getName().trim()); + + float textOpacitySetting = Minecraft.getInstance().options.getBackgroundOpacity(0.5f); + int alpha = (int) (textOpacitySetting * 255) << 24; + float halfWidth = (float) (-Minecraft.getInstance().font.width(tc) / 2); + + Minecraft.getInstance().font.drawInBatch(tc, halfWidth, 0, color, false, matrix4f, buffer, Font.DisplayMode.SEE_THROUGH, alpha, + LightTexture.pack(15, 15)); + Minecraft.getInstance().font.drawInBatch(tc, halfWidth, 0, color, false, matrix4f, buffer, Font.DisplayMode.NORMAL, 0, LightTexture.pack(15, 15)); + poseStack.popPose(); } - VertexConsumer vert = buffer.getBuffer(type); - LevelRenderer.renderLineBox(poseStack, vert, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1); poseStack.popPose(); mc.renderBuffers().bufferSource().endBatch(); diff --git a/src/main/java/com/enderio/base/client/renderer/travel/RenderTravelTargets.java b/src/main/java/com/enderio/base/client/renderer/travel/RenderTravelTargets.java index 3adafc6ad3..c491521797 100644 --- a/src/main/java/com/enderio/base/client/renderer/travel/RenderTravelTargets.java +++ b/src/main/java/com/enderio/base/client/renderer/travel/RenderTravelTargets.java @@ -15,6 +15,8 @@ import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; +import java.util.Optional; + @Mod.EventBusSubscriber(value = Dist.CLIENT) public class RenderTravelTargets { @@ -28,6 +30,7 @@ public static void renderLevel(RenderLevelStageEvent event) { return; boolean itemTeleport = TeleportHandler.canItemTeleport(player); TravelSavedData data = TravelSavedData.getTravelData(Minecraft.getInstance().level); + Optional activeTarget = TeleportHandler.getAnchorTarget(player); for (ITravelTarget target : data.getTravelTargets()) { double range = itemTeleport ? target.getItem2BlockRange() : target.getBlock2BlockRange(); double distanceSquared = target.getPos().distToCenterSqr(player.position()); @@ -39,7 +42,8 @@ public static void renderLevel(RenderLevelStageEvent event) { Vec3 projectedView = mainCamera.getPosition(); poseStack.translate(-projectedView.x, -projectedView.y, -projectedView.z); - TravelRegistry.getRenderer(target).render(target, event.getLevelRenderer(), poseStack, distanceSquared); + boolean active = activeTarget.map(act -> act == target).orElse(false); + TravelRegistry.getRenderer(target).render(target, event.getLevelRenderer(), poseStack, distanceSquared, active); poseStack.popPose(); } } diff --git a/src/main/java/com/enderio/base/common/handler/TeleportHandler.java b/src/main/java/com/enderio/base/common/handler/TeleportHandler.java index 3bfe66973f..12165ceb0b 100644 --- a/src/main/java/com/enderio/base/common/handler/TeleportHandler.java +++ b/src/main/java/com/enderio/base/common/handler/TeleportHandler.java @@ -114,10 +114,13 @@ public static Optional teleportPosition(Level level, Player player) { return Optional.of(Vec3.atBottomCenterOf(target).add(0, floorHeight, 0)); } - private static Optional getAnchorTarget(Player player) { + public static Optional getAnchorTarget(Player player) { Vec3 positionVec = player.position().add(0, player.getEyeHeight(), 0); - return TravelSavedData.getTravelData(player.level()).getTravelTargetsInItemRange(player.blockPosition()).filter(target -> target.canTravelTo()) + return TravelSavedData + .getTravelData(player.level()) + .getTravelTargetsInItemRange(player.blockPosition()) + .filter(target -> target.canTravelTo()) .filter( target -> target.getPos().distToLowCornerSqr(player.getX(), player.getY(), player.getZ()) > 25) //only teleport to blocks not directly in range .filter(target -> Math.abs(getAngleRadians(positionVec, target.getPos(), player.getYRot(), player.getXRot())) <= Math.toRadians(15)) From cf1b243a9abe03f4df45624482364b6189d4a7c3 Mon Sep 17 00:00:00 2001 From: mystchonky Date: Thu, 3 Aug 2023 15:52:05 +0530 Subject: [PATCH 047/154] rename and remove extra particles --- .../machines/common/block/TravelAnchorBlock.java | 6 +++--- .../client/renderer/travel/RenderTravelTargets.java | 8 ++++---- .../renderer/travel/TeleportParticleHandler.java | 10 ++++------ .../{TeleportHandler.java => TravelHandler.java} | 2 +- .../enderio/base/common/item/tool/TravelStaffItem.java | 6 +++--- 5 files changed, 15 insertions(+), 17 deletions(-) rename src/main/java/com/enderio/base/common/handler/{TeleportHandler.java => TravelHandler.java} (99%) diff --git a/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java b/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java index 98bfccb3d6..c98db65ca4 100644 --- a/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java +++ b/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java @@ -1,6 +1,6 @@ package com.enderio.machines.common.block; -import com.enderio.base.common.handler.TeleportHandler; +import com.enderio.base.common.handler.TravelHandler; import com.enderio.machines.common.blockentity.TravelAnchorBlockEntity; import com.enderio.machines.common.init.MachineBlockEntities; import net.minecraft.core.BlockPos; @@ -37,7 +37,7 @@ public static void jump(LivingEvent.LivingJumpEvent jumpEvent) { if (!jumpEvent.getEntity().level().isClientSide && jumpEvent.getEntity() instanceof Player player) { // TODO: Change if (player.level().getBlockState(player.blockPosition().below()).getBlock() instanceof TravelAnchorBlock) { - TeleportHandler.blockTeleport(player.level(), player); + TravelHandler.blockTeleport(player.level(), player); } } } @@ -53,7 +53,7 @@ public static void sneak(TickEvent.PlayerTickEvent event) { Pair sneakEntry = sneakCache.getOrDefault(player, Pair.of(false, player.level().getServer().getTickCount() - 1)); if ((!sneakEntry.getLeft() || sneakEntry.getRight() != player.level().getServer().getTickCount() - 1) && player.isShiftKeyDown()) { - TeleportHandler.blockTeleport(player.level(), player); + TravelHandler.blockTeleport(player.level(), player); } sneakCache.put(player, Pair.of(player.isShiftKeyDown(), player.level().getServer().getTickCount())); } diff --git a/src/main/java/com/enderio/base/client/renderer/travel/RenderTravelTargets.java b/src/main/java/com/enderio/base/client/renderer/travel/RenderTravelTargets.java index c491521797..828d09910f 100644 --- a/src/main/java/com/enderio/base/client/renderer/travel/RenderTravelTargets.java +++ b/src/main/java/com/enderio/base/client/renderer/travel/RenderTravelTargets.java @@ -2,7 +2,7 @@ import com.enderio.api.travel.ITravelTarget; import com.enderio.api.travel.TravelRegistry; -import com.enderio.base.common.handler.TeleportHandler; +import com.enderio.base.common.handler.TravelHandler; import com.enderio.base.common.travel.TravelSavedData; import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.Camera; @@ -26,11 +26,11 @@ public static void renderLevel(RenderLevelStageEvent event) { LocalPlayer player = Minecraft.getInstance().player; if (level == null || player == null || event.getStage() != RenderLevelStageEvent.Stage.AFTER_TRIPWIRE_BLOCKS) return; - if (!TeleportHandler.canTeleport(player)) + if (!TravelHandler.canTeleport(player)) return; - boolean itemTeleport = TeleportHandler.canItemTeleport(player); + boolean itemTeleport = TravelHandler.canItemTeleport(player); TravelSavedData data = TravelSavedData.getTravelData(Minecraft.getInstance().level); - Optional activeTarget = TeleportHandler.getAnchorTarget(player); + Optional activeTarget = TravelHandler.getAnchorTarget(player); for (ITravelTarget target : data.getTravelTargets()) { double range = itemTeleport ? target.getItem2BlockRange() : target.getBlock2BlockRange(); double distanceSquared = target.getPos().distToCenterSqr(player.position()); diff --git a/src/main/java/com/enderio/base/client/renderer/travel/TeleportParticleHandler.java b/src/main/java/com/enderio/base/client/renderer/travel/TeleportParticleHandler.java index 7aaccb5f10..7d2f7a4cfd 100644 --- a/src/main/java/com/enderio/base/client/renderer/travel/TeleportParticleHandler.java +++ b/src/main/java/com/enderio/base/client/renderer/travel/TeleportParticleHandler.java @@ -1,6 +1,6 @@ package com.enderio.base.client.renderer.travel; -import com.enderio.base.common.handler.TeleportHandler; +import com.enderio.base.common.handler.TravelHandler; import net.minecraft.client.Minecraft; import net.minecraft.client.particle.Particle; import net.minecraft.client.player.LocalPlayer; @@ -26,11 +26,9 @@ public static void clientTick(TickEvent.ClientTickEvent e) { LocalPlayer player = Minecraft.getInstance().player; if (e.phase == TickEvent.Phase.END && player != null) { tick++; - if (player.isShiftKeyDown() && TeleportHandler.canTeleport(player) && tick % 3 == 0) { - Optional pos = TeleportHandler.teleportPosition(player.level(), player); - if (pos.isPresent()) { - addTravelParticle(pos.get()); - } + if (player.isShiftKeyDown() && TravelHandler.canItemTeleport(player) && tick % 3 == 0) { + Optional pos = TravelHandler.teleportPosition(player.level(), player); + pos.ifPresent(TeleportParticleHandler::addTravelParticle); } } } diff --git a/src/main/java/com/enderio/base/common/handler/TeleportHandler.java b/src/main/java/com/enderio/base/common/handler/TravelHandler.java similarity index 99% rename from src/main/java/com/enderio/base/common/handler/TeleportHandler.java rename to src/main/java/com/enderio/base/common/handler/TravelHandler.java index 12165ceb0b..bb8a128241 100644 --- a/src/main/java/com/enderio/base/common/handler/TeleportHandler.java +++ b/src/main/java/com/enderio/base/common/handler/TravelHandler.java @@ -28,7 +28,7 @@ * For their agreements look at doc/license/castcrafter/travel-anchors/license.md in the repo root */ -public class TeleportHandler { +public class TravelHandler { public static boolean canTeleport(Player player) { return canItemTeleport(player) || canBlockTeleport(player); } diff --git a/src/main/java/com/enderio/base/common/item/tool/TravelStaffItem.java b/src/main/java/com/enderio/base/common/item/tool/TravelStaffItem.java index b28a881fb9..e95a0cbfe4 100644 --- a/src/main/java/com/enderio/base/common/item/tool/TravelStaffItem.java +++ b/src/main/java/com/enderio/base/common/item/tool/TravelStaffItem.java @@ -4,7 +4,7 @@ import com.enderio.api.capability.MultiCapabilityProvider; import com.enderio.base.common.capability.EnergyStorageItemStack; import com.enderio.base.common.config.BaseConfig; -import com.enderio.base.common.handler.TeleportHandler; +import com.enderio.base.common.handler.TravelHandler; import com.enderio.base.common.lang.EIOLang; import com.enderio.core.client.item.EnergyBarDecorator; import com.enderio.core.client.item.IAdvancedTooltipProvider; @@ -73,12 +73,12 @@ private boolean tryPerformAction(Level level, Player player, ItemStack stack) { */ public boolean performAction(Level level, Player player, ItemStack stack) { if (player.isShiftKeyDown()) { - if (TeleportHandler.shortTeleport(level, player)) { + if (TravelHandler.shortTeleport(level, player)) { player.getCooldowns().addCooldown(this, BaseConfig.COMMON.ITEMS.TRAVELLING_BLINK_DISABLED_TIME.get()); return true; } } else { - if (TeleportHandler.blockTeleport(level, player)) { + if (TravelHandler.blockTeleport(level, player)) { player.getCooldowns().addCooldown(this, BaseConfig.COMMON.ITEMS.TRAVELLING_BLINK_DISABLED_TIME.get()); return true; } From c37ba457ff1ed7d21ed6e73b33741e9e2b993d7e Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Thu, 3 Aug 2023 13:57:34 +0200 Subject: [PATCH 048/154] spawner changes --- .../eio_soul/spawner/minecraft_allay.json | 2 +- .../eio_soul/spawner/minecraft_axolotl.json | 2 +- .../eio_soul/spawner/minecraft_bat.json | 2 +- .../eio_soul/spawner/minecraft_bee.json | 2 +- .../eio_soul/spawner/minecraft_blaze.json | 2 +- .../eio_soul/spawner/minecraft_cat.json | 2 +- .../spawner/minecraft_cave_spider.json | 2 +- .../eio_soul/spawner/minecraft_chicken.json | 2 +- .../eio_soul/spawner/minecraft_cod.json | 2 +- .../eio_soul/spawner/minecraft_cow.json | 2 +- .../eio_soul/spawner/minecraft_creeper.json | 2 +- .../eio_soul/spawner/minecraft_dolphin.json | 2 +- .../eio_soul/spawner/minecraft_donkey.json | 2 +- .../eio_soul/spawner/minecraft_drowned.json | 2 +- .../spawner/minecraft_elder_guardian.json | 2 +- .../eio_soul/spawner/minecraft_enderman.json | 2 +- .../eio_soul/spawner/minecraft_endermite.json | 2 +- .../eio_soul/spawner/minecraft_evoker.json | 2 +- .../eio_soul/spawner/minecraft_fox.json | 2 +- .../eio_soul/spawner/minecraft_frog.json | 2 +- .../eio_soul/spawner/minecraft_ghast.json | 2 +- .../eio_soul/spawner/minecraft_goat.json | 2 +- .../eio_soul/spawner/minecraft_guardian.json | 2 +- .../eio_soul/spawner/minecraft_hoglin.json | 2 +- .../eio_soul/spawner/minecraft_horse.json | 2 +- .../eio_soul/spawner/minecraft_husk.json | 2 +- .../spawner/minecraft_illusioner.json | 2 +- .../spawner/minecraft_iron_golem.json | 2 +- .../eio_soul/spawner/minecraft_llama.json | 2 +- .../spawner/minecraft_magma_cube.json | 2 +- .../eio_soul/spawner/minecraft_mooshroom.json | 2 +- .../eio_soul/spawner/minecraft_mule.json | 2 +- .../eio_soul/spawner/minecraft_ocelot.json | 2 +- .../eio_soul/spawner/minecraft_panda.json | 2 +- .../eio_soul/spawner/minecraft_parrot.json | 2 +- .../eio_soul/spawner/minecraft_phantom.json | 2 +- .../eio_soul/spawner/minecraft_pig.json | 2 +- .../eio_soul/spawner/minecraft_piglin.json | 2 +- .../spawner/minecraft_piglin_brute.json | 2 +- .../eio_soul/spawner/minecraft_pillager.json | 2 +- .../spawner/minecraft_polar_bear.json | 2 +- .../spawner/minecraft_pufferfish.json | 2 +- .../eio_soul/spawner/minecraft_rabbit.json | 2 +- .../eio_soul/spawner/minecraft_ravager.json | 2 +- .../eio_soul/spawner/minecraft_salmon.json | 2 +- .../eio_soul/spawner/minecraft_sheep.json | 2 +- .../eio_soul/spawner/minecraft_shulker.json | 2 +- .../spawner/minecraft_silverfish.json | 2 +- .../eio_soul/spawner/minecraft_skeleton.json | 2 +- .../spawner/minecraft_skeleton_horse.json | 2 +- .../eio_soul/spawner/minecraft_slime.json | 2 +- .../spawner/minecraft_snow_golem.json | 2 +- .../eio_soul/spawner/minecraft_spider.json | 2 +- .../eio_soul/spawner/minecraft_squid.json | 2 +- .../eio_soul/spawner/minecraft_strider.json | 2 +- .../eio_soul/spawner/minecraft_tadpole.json | 2 +- .../spawner/minecraft_trader_llama.json | 2 +- .../spawner/minecraft_tropical_fish.json | 2 +- .../eio_soul/spawner/minecraft_turtle.json | 2 +- .../eio_soul/spawner/minecraft_vex.json | 2 +- .../eio_soul/spawner/minecraft_villager.json | 2 +- .../spawner/minecraft_vindicator.json | 2 +- .../eio_soul/spawner/minecraft_witch.json | 2 +- .../eio_soul/spawner/minecraft_wolf.json | 2 +- .../eio_soul/spawner/minecraft_zoglin.json | 2 +- .../eio_soul/spawner/minecraft_zombie.json | 2 +- .../spawner/minecraft_zombie_horse.json | 2 +- .../spawner/minecraft_zombie_villager.json | 2 +- .../spawner/minecraft_zombified_piglin.json | 2 +- .../recipes/sagmilling/lapis_block.json | 13 -- .../common/config/common/EnergyConfig.java | 2 +- .../data/recipes/SagMillRecipeProvider.java | 4 - .../data/souldata/SoulDataProvider.java | 139 +++++++++--------- 73 files changed, 139 insertions(+), 157 deletions(-) delete mode 100644 src/generated/resources/data/enderio/recipes/sagmilling/lapis_block.json diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_allay.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_allay.json index c3ba1f5c92..3f432037e6 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_allay.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_allay.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:allay", - "power": 1000 + "power": 15000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_axolotl.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_axolotl.json index 36a92fbc1d..d0af6cde97 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_axolotl.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_axolotl.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:axolotl", - "power": 1000 + "power": 12000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_bat.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_bat.json index 90b0b1cb9c..e2af530a38 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_bat.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_bat.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:bat", - "power": 1000 + "power": 12000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_bee.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_bee.json index e827d6df5b..f7984e3a61 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_bee.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_bee.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:bee", - "power": 1000 + "power": 12000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_blaze.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_blaze.json index e60e05f97f..75da97c725 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_blaze.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_blaze.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:blaze", - "power": 6000 + "power": 60000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_cat.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_cat.json index 04bb874868..e5989b34cb 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_cat.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_cat.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:cat", - "power": 1000 + "power": 12000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_cave_spider.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_cave_spider.json index df3b4f8858..1e984a8787 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_cave_spider.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_cave_spider.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:cave_spider", - "power": 3000 + "power": 51200 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_chicken.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_chicken.json index 99ed3cab62..8d902b5969 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_chicken.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_chicken.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:chicken", - "power": 1000 + "power": 12000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_cod.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_cod.json index 407829c471..53b265e0ba 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_cod.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_cod.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:cod", - "power": 1000 + "power": 12000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_cow.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_cow.json index e3f7efd871..27bcd5e694 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_cow.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_cow.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:cow", - "power": 1000 + "power": 12000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_creeper.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_creeper.json index 7fb150f2f0..cf95162f66 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_creeper.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_creeper.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:creeper", - "power": 3000 + "power": 51200 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_dolphin.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_dolphin.json index 6eadd1c489..e48a03abdd 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_dolphin.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_dolphin.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:dolphin", - "power": 1500 + "power": 15000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_donkey.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_donkey.json index 9ce57dc1e5..28f3d4938b 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_donkey.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_donkey.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:donkey", - "power": 3000 + "power": 15000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_drowned.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_drowned.json index 6193a14efd..0cb47e0ea1 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_drowned.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_drowned.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:drowned", - "power": 4000 + "power": 51200 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_elder_guardian.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_elder_guardian.json index cd7859c6d6..2247754672 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_elder_guardian.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_elder_guardian.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:elder_guardian", - "power": 8000 + "power": 51200 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_enderman.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_enderman.json index b9dc7cef8c..8801074b81 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_enderman.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_enderman.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:enderman", - "power": 6000 + "power": 60000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_endermite.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_endermite.json index e43fce3857..452684e431 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_endermite.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_endermite.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:endermite", - "power": 800 + "power": 51200 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_evoker.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_evoker.json index 3c6fc57ffc..05ed0673d6 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_evoker.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_evoker.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:evoker", - "power": 6000 + "power": 51200 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_fox.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_fox.json index f2246ab39f..357bda29e4 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_fox.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_fox.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:fox", - "power": 1000 + "power": 12000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_frog.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_frog.json index 737778eb12..ce455b5ff1 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_frog.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_frog.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:frog", - "power": 1000 + "power": 12000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_ghast.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_ghast.json index ecdd412502..c6da1fcae3 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_ghast.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_ghast.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:ghast", - "power": 6000 + "power": 51200 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_goat.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_goat.json index 94e4048682..a1af17ab50 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_goat.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_goat.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:goat", - "power": 3000 + "power": 12000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_guardian.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_guardian.json index 4e45558bbc..76c1ecf12f 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_guardian.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_guardian.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:guardian", - "power": 5000 + "power": 51200 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_hoglin.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_hoglin.json index 9aa7afed30..c2f3ce48c6 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_hoglin.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_hoglin.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:hoglin", - "power": 6000 + "power": 51200 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_horse.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_horse.json index ebdb78ea19..9184f02f8d 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_horse.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_horse.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:horse", - "power": 3000 + "power": 15000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_husk.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_husk.json index 597ac64f4b..20b0c57697 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_husk.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_husk.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:husk", - "power": 4000 + "power": 51200 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_illusioner.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_illusioner.json index 0a8a127f57..3d24f04dbb 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_illusioner.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_illusioner.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:illusioner", - "power": 6000 + "power": 51200 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_iron_golem.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_iron_golem.json index 4eeb119ddb..428782c47c 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_iron_golem.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_iron_golem.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:iron_golem", - "power": 7000 + "power": 60000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_llama.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_llama.json index 502fcbf327..332ee0cdd8 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_llama.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_llama.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:llama", - "power": 3000 + "power": 15000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_magma_cube.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_magma_cube.json index 5fe14e435e..7694e53fc0 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_magma_cube.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_magma_cube.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:magma_cube", - "power": 3000 + "power": 51200 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_mooshroom.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_mooshroom.json index a7b3a11bdc..b81d43557e 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_mooshroom.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_mooshroom.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:mooshroom", - "power": 3000 + "power": 12000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_mule.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_mule.json index b843958349..02eea675b0 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_mule.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_mule.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:mule", - "power": 3000 + "power": 15000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_ocelot.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_ocelot.json index e2dca9bd19..af713a822a 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_ocelot.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_ocelot.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:ocelot", - "power": 1000 + "power": 12000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_panda.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_panda.json index 713f782499..86d101151a 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_panda.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_panda.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:panda", - "power": 3000 + "power": 12000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_parrot.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_parrot.json index a3931ebd58..d8f12e0ea0 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_parrot.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_parrot.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:parrot", - "power": 1000 + "power": 12000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_phantom.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_phantom.json index 9c715534b6..0f0a7eb32f 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_phantom.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_phantom.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:phantom", - "power": 5000 + "power": 51200 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_pig.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_pig.json index bf60d29db9..7b45f197a8 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_pig.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_pig.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:pig", - "power": 1000 + "power": 12000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_piglin.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_piglin.json index 2c1be4d3c4..a45f2ecbae 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_piglin.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_piglin.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:piglin", - "power": 4000 + "power": 51200 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_piglin_brute.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_piglin_brute.json index 473c7a5b0f..0f90d845d4 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_piglin_brute.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_piglin_brute.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:piglin_brute", - "power": 4500 + "power": 51200 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_pillager.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_pillager.json index 1f3f13ba39..da988d37cb 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_pillager.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_pillager.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:pillager", - "power": 4000 + "power": 51200 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_polar_bear.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_polar_bear.json index f66ef563b9..b0f237e790 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_polar_bear.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_polar_bear.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:polar_bear", - "power": 4000 + "power": 18000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_pufferfish.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_pufferfish.json index bc13316f17..b3df785821 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_pufferfish.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_pufferfish.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:pufferfish", - "power": 1000 + "power": 12000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_rabbit.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_rabbit.json index 9d9088cef6..2afff59113 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_rabbit.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_rabbit.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:rabbit", - "power": 1000 + "power": 12000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_ravager.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_ravager.json index aafc213704..e7fd0e232b 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_ravager.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_ravager.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:ravager", - "power": 8000 + "power": 60000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_salmon.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_salmon.json index a0b5f4e06e..c935cd59e7 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_salmon.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_salmon.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:salmon", - "power": 1000 + "power": 12000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_sheep.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_sheep.json index 660b654f9d..665bc6cae4 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_sheep.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_sheep.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:sheep", - "power": 1000 + "power": 12000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_shulker.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_shulker.json index 84c905638c..3b04e06ff5 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_shulker.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_shulker.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:shulker", - "power": 6000 + "power": 51200 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_silverfish.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_silverfish.json index 9b8dc2f24e..bf429b7161 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_silverfish.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_silverfish.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:silverfish", - "power": 1000 + "power": 12000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_skeleton.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_skeleton.json index 067e35c8b2..3dcbffb240 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_skeleton.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_skeleton.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:skeleton", - "power": 4000 + "power": 51200 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_skeleton_horse.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_skeleton_horse.json index f77d61161f..b494c4a4b2 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_skeleton_horse.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_skeleton_horse.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:skeleton_horse", - "power": 3000 + "power": 18000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_slime.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_slime.json index 0d7a729356..3b48b3719e 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_slime.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_slime.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:slime", - "power": 2000 + "power": 51200 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_snow_golem.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_snow_golem.json index 9d38f855eb..8a565f1e55 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_snow_golem.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_snow_golem.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:snow_golem", - "power": 3000 + "power": 18000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_spider.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_spider.json index ee6ec3db77..3725e74fa1 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_spider.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_spider.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:spider", - "power": 4000 + "power": 51200 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_squid.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_squid.json index 60e9d2deae..b2434d3677 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_squid.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_squid.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:squid", - "power": 1000 + "power": 12000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_strider.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_strider.json index d2de4de5a9..b55efc431a 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_strider.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_strider.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:strider", - "power": 3000 + "power": 15000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_tadpole.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_tadpole.json index 6ebb17aac6..084a22e110 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_tadpole.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_tadpole.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:tadpole", - "power": 1000 + "power": 12000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_trader_llama.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_trader_llama.json index 04f5409364..4be3eca0ac 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_trader_llama.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_trader_llama.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:trader_llama", - "power": 3000 + "power": 15000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_tropical_fish.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_tropical_fish.json index f0811579e2..cbbb264d19 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_tropical_fish.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_tropical_fish.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:tropical_fish", - "power": 1000 + "power": 12000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_turtle.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_turtle.json index 5fd5f0a10b..76daccb25e 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_turtle.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_turtle.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:turtle", - "power": 1000 + "power": 12000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_vex.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_vex.json index a0b36f92ed..c32cea3c5a 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_vex.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_vex.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:vex", - "power": 1000 + "power": 12000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_villager.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_villager.json index 7745eb55c9..09f9689286 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_villager.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_villager.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:villager", - "power": 4000 + "power": 51200 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_vindicator.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_vindicator.json index 76b458d6bc..7ebb89a6e4 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_vindicator.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_vindicator.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:vindicator", - "power": 4000 + "power": 51200 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_witch.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_witch.json index a2ba592c73..74bf656fbc 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_witch.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_witch.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:witch", - "power": 4000 + "power": 51200 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_wolf.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_wolf.json index 53ae7d5dd8..ab47af22d9 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_wolf.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_wolf.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:wolf", - "power": 4000 + "power": 18000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_zoglin.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_zoglin.json index 323089617b..31fd939882 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_zoglin.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_zoglin.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:zoglin", - "power": 4000 + "power": 51200 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_zombie.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_zombie.json index 4cc730fce8..be303e0440 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_zombie.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_zombie.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:zombie", - "power": 4000 + "power": 51200 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_zombie_horse.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_zombie_horse.json index 48e55d93dd..f9e5ee1e16 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_zombie_horse.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_zombie_horse.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:zombie_horse", - "power": 3000 + "power": 18000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_zombie_villager.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_zombie_villager.json index 7b2394068b..c607380cdd 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_zombie_villager.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_zombie_villager.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:zombie_villager", - "power": 4000 + "power": 51200 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_zombified_piglin.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_zombified_piglin.json index 77da44da57..0bedef9262 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_zombified_piglin.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_zombified_piglin.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:zombified_piglin", - "power": 4000 + "power": 51200 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/recipes/sagmilling/lapis_block.json b/src/generated/resources/data/enderio/recipes/sagmilling/lapis_block.json deleted file mode 100644 index 2a75bfda38..0000000000 --- a/src/generated/resources/data/enderio/recipes/sagmilling/lapis_block.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "type": "enderio:sagmilling", - "energy": 14400, - "input": { - "tag": "forge:storage_blocks/lapis" - }, - "outputs": [ - { - "count": 9, - "item": "enderio:powdered_lapis_lazuli" - } - ] -} \ No newline at end of file diff --git a/src/machines/java/com/enderio/machines/common/config/common/EnergyConfig.java b/src/machines/java/com/enderio/machines/common/config/common/EnergyConfig.java index 6483b36099..0aa5c6ed94 100644 --- a/src/machines/java/com/enderio/machines/common/config/common/EnergyConfig.java +++ b/src/machines/java/com/enderio/machines/common/config/common/EnergyConfig.java @@ -60,7 +60,7 @@ public EnergyConfig(ForgeConfigSpec.Builder builder) { builder.push("poweredSpawner"); POWERED_SPAWNER_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 64000, 1, Integer.MAX_VALUE); - POWERED_SPAWNER_USAGE = builder.comment("The base energy consumption in uI/t.").defineInRange("usage", 120, 1, Integer.MAX_VALUE); + POWERED_SPAWNER_USAGE = builder.comment("The base energy consumption in uI/t.").defineInRange("usage", 20, 1, Integer.MAX_VALUE); builder.pop(); builder.push("sagMill"); diff --git a/src/machines/java/com/enderio/machines/data/recipes/SagMillRecipeProvider.java b/src/machines/java/com/enderio/machines/data/recipes/SagMillRecipeProvider.java index 63e999177a..b009bbfad5 100644 --- a/src/machines/java/com/enderio/machines/data/recipes/SagMillRecipeProvider.java +++ b/src/machines/java/com/enderio/machines/data/recipes/SagMillRecipeProvider.java @@ -111,10 +111,6 @@ protected void buildRecipes(Consumer finishedRecipeConsumer) { build("lapis", Ingredient.of(Tags.Items.GEMS_LAPIS), List.of( output(POWDERED_LAPIS_LAZULI.get(), 1) ),BASE_ENERGY_PER_OPERATION, finishedRecipeConsumer); - - build("lapis_block", Ingredient.of(Tags.Items.STORAGE_BLOCKS_LAPIS), List.of( - output(POWDERED_LAPIS_LAZULI.get(), 9) - ), Math.round(BASE_ENERGY_PER_OPERATION * 6f), finishedRecipeConsumer); build("quartz_ore", Ingredient.of(Tags.Items.ORES_QUARTZ), List.of( output(QUARTZ, 2), diff --git a/src/machines/java/com/enderio/machines/data/souldata/SoulDataProvider.java b/src/machines/java/com/enderio/machines/data/souldata/SoulDataProvider.java index 38547e7d02..4c6563f740 100644 --- a/src/machines/java/com/enderio/machines/data/souldata/SoulDataProvider.java +++ b/src/machines/java/com/enderio/machines/data/souldata/SoulDataProvider.java @@ -35,80 +35,79 @@ public SoulDataProvider(PackOutput packOutput) { } public void buildSoulData(Consumer> finshedSoulDataConsumer) { - // TODO: Energy values might need reviewing. - addSpawnerData(EntityType.ALLAY, 1000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.AXOLOTL, 1000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.BAT, 1000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.BEE, 1000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.BLAZE, 6000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.CAT, 1000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.CAVE_SPIDER, 3000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.CHICKEN, 1000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.COD, 1000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.COW, 1000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.CREEPER, 3000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.DOLPHIN, 1500, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.DONKEY, 3000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.DROWNED, 4000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.ELDER_GUARDIAN, 8000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.ENDERMAN, 6000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.ENDERMITE, 800, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.ALLAY, 15000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.AXOLOTL, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.BAT, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.BEE, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.BLAZE, 60000 , SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.CAT, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.CAVE_SPIDER, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.CHICKEN, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.COD, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.COW, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.CREEPER, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.DOLPHIN, 15000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.DONKEY, 15000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.DROWNED, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.ELDER_GUARDIAN, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.ENDERMAN, 60000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.ENDERMITE, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); addSpawnerData(EntityType.ENDER_DRAGON, 1000000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.EVOKER, 6000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.FOX, 1000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.FROG, 1000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.GHAST, 6000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.EVOKER, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.FOX, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.FROG, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.GHAST, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); addSpawnerData(EntityType.GIANT, 10000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.GOAT, 3000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.GUARDIAN, 5000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.HOGLIN, 6000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.HUSK, 4000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.HORSE, 3000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.ILLUSIONER, 6000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.IRON_GOLEM, 7000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.LLAMA, 3000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.MAGMA_CUBE, 3000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.MULE, 3000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.MOOSHROOM, 3000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.OCELOT, 1000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.PANDA, 3000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.PARROT, 1000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.PHANTOM, 5000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.PIG, 1000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.PIGLIN, 4000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.PIGLIN_BRUTE, 4500, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.PILLAGER, 4000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.POLAR_BEAR, 4000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.PUFFERFISH, 1000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.RABBIT, 1000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.RAVAGER, 8000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.SALMON, 1000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.SHEEP, 1000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.SHULKER, 6000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.SKELETON, 4000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.SILVERFISH, 1000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.SKELETON_HORSE, 3000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.SLIME, 2000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.SNOW_GOLEM, 3000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.SPIDER, 4000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.SQUID, 1000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.STRIDER, 3000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.TADPOLE, 1000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.TURTLE, 1000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.TRADER_LLAMA, 3000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.TROPICAL_FISH, 1000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.VEX, 1000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.VILLAGER, 4000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.VINDICATOR, 4000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.GOAT, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.GUARDIAN, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.HOGLIN, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.HUSK, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.HORSE, 15000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.ILLUSIONER, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.IRON_GOLEM, 60000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.LLAMA, 15000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.MAGMA_CUBE, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.MULE, 15000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.MOOSHROOM, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.OCELOT, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.PANDA, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.PARROT, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.PHANTOM, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.PIG, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.PIGLIN, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.PIGLIN_BRUTE, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.PILLAGER, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.POLAR_BEAR, 18000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.PUFFERFISH, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.RABBIT, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.RAVAGER, 60000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.SALMON, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.SHEEP, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.SHULKER, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.SKELETON, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.SILVERFISH, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.SKELETON_HORSE, 18000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.SLIME, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.SNOW_GOLEM, 18000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.SPIDER, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.SQUID, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.STRIDER, 15000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.TADPOLE, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.TURTLE, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.TRADER_LLAMA, 15000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.TROPICAL_FISH, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.VEX, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.VILLAGER, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.VINDICATOR, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); addSpawnerData(EntityType.WARDEN, 100000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.WITCH, 4000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.WITCH, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); addSpawnerData(EntityType.WITHER, 100000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.WOLF, 4000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.ZOGLIN, 4000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.ZOMBIE, 4000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.ZOMBIE_HORSE, 3000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.ZOMBIE_VILLAGER, 4000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.ZOMBIFIED_PIGLIN, 4000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.WOLF, 18000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.ZOGLIN, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.ZOMBIE, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.ZOMBIE_HORSE, 18000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.ZOMBIE_VILLAGER, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.ZOMBIFIED_PIGLIN, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); } From b2447cbb6280263bcbf5f286c4ab478ac5abe2ac Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Thu, 3 Aug 2023 14:12:16 +0200 Subject: [PATCH 049/154] Update spawner max energy --- .../com/enderio/machines/common/config/common/EnergyConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/machines/java/com/enderio/machines/common/config/common/EnergyConfig.java b/src/machines/java/com/enderio/machines/common/config/common/EnergyConfig.java index 0aa5c6ed94..b27c9e9e85 100644 --- a/src/machines/java/com/enderio/machines/common/config/common/EnergyConfig.java +++ b/src/machines/java/com/enderio/machines/common/config/common/EnergyConfig.java @@ -59,7 +59,7 @@ public EnergyConfig(ForgeConfigSpec.Builder builder) { builder.pop(); builder.push("poweredSpawner"); - POWERED_SPAWNER_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 64000, 1, Integer.MAX_VALUE); + POWERED_SPAWNER_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 100000, 1, Integer.MAX_VALUE); POWERED_SPAWNER_USAGE = builder.comment("The base energy consumption in uI/t.").defineInRange("usage", 20, 1, Integer.MAX_VALUE); builder.pop(); From 44832752feb26fc9aced209d7fd0222ef040d5c3 Mon Sep 17 00:00:00 2001 From: mystchonky Date: Thu, 3 Aug 2023 20:14:35 +0530 Subject: [PATCH 050/154] try render icon --- .../travel/TravelAnchorRenderer.java | 41 ++++++++++++++----- ...andler.java => TravelParticleHandler.java} | 6 +-- 2 files changed, 33 insertions(+), 14 deletions(-) rename src/main/java/com/enderio/base/client/renderer/travel/{TeleportParticleHandler.java => TravelParticleHandler.java} (91%) diff --git a/src/machines/java/com/enderio/machines/client/rendering/travel/TravelAnchorRenderer.java b/src/machines/java/com/enderio/machines/client/rendering/travel/TravelAnchorRenderer.java index e5a12dd881..7edccbe62b 100644 --- a/src/machines/java/com/enderio/machines/client/rendering/travel/TravelAnchorRenderer.java +++ b/src/machines/java/com/enderio/machines/client/rendering/travel/TravelAnchorRenderer.java @@ -14,6 +14,9 @@ import net.minecraft.client.resources.model.BakedModel; import net.minecraft.network.chat.Component; import net.minecraft.util.FastColor; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; import net.minecraft.world.level.block.state.BlockState; import org.joml.Matrix4f; @@ -27,7 +30,7 @@ public void render(AnchorTravelTarget travelData, LevelRenderer levelRenderer, P return; poseStack.pushPose(); poseStack.translate(travelData.getPos().getX(), travelData.getPos().getY(), travelData.getPos().getZ()); - Minecraft mc = Minecraft.getInstance(); + Minecraft minecraft = Minecraft.getInstance(); OutlineBuffer buffer = OutlineBuffer.INSTANCE; int color = 0xFFFFFF; if (active) { @@ -35,10 +38,13 @@ public void render(AnchorTravelTarget travelData, LevelRenderer levelRenderer, P } // Render Model - BlockState blockState = mc.level.getBlockState(travelData.getPos()); - BakedModel blockModel = mc.getBlockRenderer().getBlockModel(blockState); + BlockState blockState = minecraft.level.getBlockState(travelData.getPos()); + BakedModel blockModel = minecraft.getBlockRenderer().getBlockModel(blockState); VertexConsumer solid = buffer.getBuffer(RenderType.solid()); - mc.getBlockRenderer().getModelRenderer().renderModel(poseStack.last(), solid, blockState, blockModel, 1, 1, 1, 0xF000F0, OverlayTexture.NO_OVERLAY); + minecraft + .getBlockRenderer() + .getModelRenderer() + .renderModel(poseStack.last(), solid, blockState, blockModel, 1, 1, 1, 0xF000F0, OverlayTexture.NO_OVERLAY); // Render line RenderType lineType; @@ -53,7 +59,7 @@ public void render(AnchorTravelTarget travelData, LevelRenderer levelRenderer, P LevelRenderer.renderLineBox(poseStack, lines, 0, 0, 0, 1, 1, 1, FastColor.ARGB32.red(color) / 255F, FastColor.ARGB32.green(color) / 255F, FastColor.ARGB32.blue(color) / 255F, 1); - //Render Text + // Render Text if (!travelData.getName().trim().isEmpty()) { double doubleScale = Math.sqrt(0.0035 * Math.sqrt(distanceSquared)); if (doubleScale < 0.1f) { @@ -71,19 +77,32 @@ public void render(AnchorTravelTarget travelData, LevelRenderer levelRenderer, P poseStack.scale(-scale, -scale, scale); Matrix4f matrix4f = poseStack.last().pose(); + Component tc = Component.literal(travelData.getName().trim()); - float textOpacitySetting = Minecraft.getInstance().options.getBackgroundOpacity(0.5f); + float textOpacitySetting = minecraft.options.getBackgroundOpacity(0.5f); int alpha = (int) (textOpacitySetting * 255) << 24; - float halfWidth = (float) (-Minecraft.getInstance().font.width(tc) / 2); + float halfWidth = (float) (-minecraft.font.width(tc) / 2); + + minecraft.font.drawInBatch(tc, halfWidth, 0, color, false, matrix4f, buffer, Font.DisplayMode.SEE_THROUGH, alpha, LightTexture.pack(15, 15)); + minecraft.font.drawInBatch(tc, halfWidth, 0, color, false, matrix4f, buffer, Font.DisplayMode.NORMAL, 0, LightTexture.pack(15, 15)); + poseStack.popPose(); + } - Minecraft.getInstance().font.drawInBatch(tc, halfWidth, 0, color, false, matrix4f, buffer, Font.DisplayMode.SEE_THROUGH, alpha, - LightTexture.pack(15, 15)); - Minecraft.getInstance().font.drawInBatch(tc, halfWidth, 0, color, false, matrix4f, buffer, Font.DisplayMode.NORMAL, 0, LightTexture.pack(15, 15)); + // Render Icon + if (travelData.getIcon() != Items.AIR) { + poseStack.pushPose(); + poseStack.mulPose(minecraft.getEntityRenderDispatcher().cameraOrientation()); + ItemStack stack = new ItemStack(travelData.getIcon()); + BakedModel bakedmodel = minecraft.getItemRenderer().getModel(stack, minecraft.level, null, 0); + minecraft + .getItemRenderer() + .render(stack, ItemDisplayContext.GUI, false, poseStack, OutlineBuffer.INSTANCE, 15728880, OverlayTexture.NO_OVERLAY, bakedmodel); poseStack.popPose(); } + poseStack.popPose(); - mc.renderBuffers().bufferSource().endBatch(); + minecraft.renderBuffers().bufferSource().endBatch(); } } diff --git a/src/main/java/com/enderio/base/client/renderer/travel/TeleportParticleHandler.java b/src/main/java/com/enderio/base/client/renderer/travel/TravelParticleHandler.java similarity index 91% rename from src/main/java/com/enderio/base/client/renderer/travel/TeleportParticleHandler.java rename to src/main/java/com/enderio/base/client/renderer/travel/TravelParticleHandler.java index 7d2f7a4cfd..00876cb9ec 100644 --- a/src/main/java/com/enderio/base/client/renderer/travel/TeleportParticleHandler.java +++ b/src/main/java/com/enderio/base/client/renderer/travel/TravelParticleHandler.java @@ -18,7 +18,7 @@ import java.util.Optional; @Mod.EventBusSubscriber(value = Dist.CLIENT) -public class TeleportParticleHandler { +public class TravelParticleHandler { private static int tick = 0; @SubscribeEvent @@ -26,9 +26,9 @@ public static void clientTick(TickEvent.ClientTickEvent e) { LocalPlayer player = Minecraft.getInstance().player; if (e.phase == TickEvent.Phase.END && player != null) { tick++; - if (player.isShiftKeyDown() && TravelHandler.canItemTeleport(player) && tick % 3 == 0) { + if (player.isShiftKeyDown() && player.onGround() && TravelHandler.canItemTeleport(player) && tick % 3 == 0) { Optional pos = TravelHandler.teleportPosition(player.level(), player); - pos.ifPresent(TeleportParticleHandler::addTravelParticle); + pos.ifPresent(TravelParticleHandler::addTravelParticle); } } } From fe5211bdd5e9d4df847fe4f0abe21a52f82d8f6a Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Thu, 3 Aug 2023 19:41:29 +0200 Subject: [PATCH 051/154] capacitor banks and formatting --- .../eio_soul/spawner/minecraft_giant.json | 2 +- .../eio_soul/spawner/minecraft_warden.json | 2 +- .../eio_soul/spawner/minecraft_wither.json | 2 +- .../recipes/sagmilling/coal_block.json | 13 -- .../recipes/sagmilling/copper_block.json | 13 -- .../recipes/sagmilling/gold_block.json | 13 -- .../recipes/sagmilling/iron_block.json | 13 -- .../recipes/sagmilling/soularium_block.json | 13 -- .../enderio/recipes/stirling_generator.json | 2 +- .../capacitorbank/CapacitorTier.java | 6 +- .../blockentity/task/SpawnerMachineTask.java | 2 +- .../common/config/common/EnergyConfig.java | 36 +++-- .../config/common/MachinesCommonConfig.java | 24 +-- .../data/recipes/MachineRecipeProvider.java | 2 +- .../data/recipes/SagMillRecipeProvider.java | 10 -- .../data/souldata/SoulDataProvider.java | 144 +++++++++--------- 16 files changed, 105 insertions(+), 192 deletions(-) delete mode 100644 src/generated/resources/data/enderio/recipes/sagmilling/coal_block.json delete mode 100644 src/generated/resources/data/enderio/recipes/sagmilling/copper_block.json delete mode 100644 src/generated/resources/data/enderio/recipes/sagmilling/gold_block.json delete mode 100644 src/generated/resources/data/enderio/recipes/sagmilling/iron_block.json delete mode 100644 src/generated/resources/data/enderio/recipes/sagmilling/soularium_block.json diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_giant.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_giant.json index cdc0da24da..319065f745 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_giant.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_giant.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:giant", - "power": 10000 + "power": 60000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_warden.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_warden.json index c18abbd31b..949d95d644 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_warden.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_warden.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:warden", - "power": 100000 + "power": 1000000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_wither.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_wither.json index ef339cc87c..d10c135f7f 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_wither.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_wither.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:wither", - "power": 100000 + "power": 1000000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/recipes/sagmilling/coal_block.json b/src/generated/resources/data/enderio/recipes/sagmilling/coal_block.json deleted file mode 100644 index 4271af31f5..0000000000 --- a/src/generated/resources/data/enderio/recipes/sagmilling/coal_block.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "type": "enderio:sagmilling", - "energy": 2400, - "input": { - "tag": "forge:storage_blocks/coal" - }, - "outputs": [ - { - "count": 9, - "item": "enderio:powdered_coal" - } - ] -} \ No newline at end of file diff --git a/src/generated/resources/data/enderio/recipes/sagmilling/copper_block.json b/src/generated/resources/data/enderio/recipes/sagmilling/copper_block.json deleted file mode 100644 index a452044dcc..0000000000 --- a/src/generated/resources/data/enderio/recipes/sagmilling/copper_block.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "type": "enderio:sagmilling", - "energy": 2400, - "input": { - "tag": "forge:storage_blocks/copper" - }, - "outputs": [ - { - "count": 9, - "item": "enderio:powdered_copper" - } - ] -} \ No newline at end of file diff --git a/src/generated/resources/data/enderio/recipes/sagmilling/gold_block.json b/src/generated/resources/data/enderio/recipes/sagmilling/gold_block.json deleted file mode 100644 index 4201581f86..0000000000 --- a/src/generated/resources/data/enderio/recipes/sagmilling/gold_block.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "type": "enderio:sagmilling", - "energy": 2400, - "input": { - "tag": "forge:storage_blocks/gold" - }, - "outputs": [ - { - "count": 9, - "item": "enderio:powdered_gold" - } - ] -} \ No newline at end of file diff --git a/src/generated/resources/data/enderio/recipes/sagmilling/iron_block.json b/src/generated/resources/data/enderio/recipes/sagmilling/iron_block.json deleted file mode 100644 index bfd1b9c7f8..0000000000 --- a/src/generated/resources/data/enderio/recipes/sagmilling/iron_block.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "type": "enderio:sagmilling", - "energy": 2400, - "input": { - "tag": "forge:storage_blocks/iron" - }, - "outputs": [ - { - "count": 9, - "item": "enderio:powdered_iron" - } - ] -} \ No newline at end of file diff --git a/src/generated/resources/data/enderio/recipes/sagmilling/soularium_block.json b/src/generated/resources/data/enderio/recipes/sagmilling/soularium_block.json deleted file mode 100644 index a2f6c83a08..0000000000 --- a/src/generated/resources/data/enderio/recipes/sagmilling/soularium_block.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "type": "enderio:sagmilling", - "energy": 2400, - "input": { - "item": "enderio:soularium_block" - }, - "outputs": [ - { - "count": 9, - "item": "enderio:soul_powder" - } - ] -} \ No newline at end of file diff --git a/src/generated/resources/data/enderio/recipes/stirling_generator.json b/src/generated/resources/data/enderio/recipes/stirling_generator.json index 69563b3bbb..86b3e3e4e5 100644 --- a/src/generated/resources/data/enderio/recipes/stirling_generator.json +++ b/src/generated/resources/data/enderio/recipes/stirling_generator.json @@ -9,7 +9,7 @@ "item": "minecraft:furnace" }, "G": { - "item": "enderio:dark_bimetal_gear" + "item": "enderio:iron_gear" }, "I": { "item": "enderio:dark_steel_ingot" diff --git a/src/machines/java/com/enderio/machines/common/blockentity/capacitorbank/CapacitorTier.java b/src/machines/java/com/enderio/machines/common/blockentity/capacitorbank/CapacitorTier.java index eaf29fd2cf..6da0b9ff62 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/capacitorbank/CapacitorTier.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/capacitorbank/CapacitorTier.java @@ -6,9 +6,9 @@ public enum CapacitorTier implements ICapacityTier { - BASIC(MachinesConfig.COMMON.BASIC_CAPACITOR_BANK_CAPACITY), - ADVANCED(MachinesConfig.COMMON.ADVANCED_CAPACITOR_BANK_CAPACITY), - VIBRANT(MachinesConfig.COMMON.VIBRANT_CAPACITOR_BANK_CAPACITY); + BASIC(MachinesConfig.COMMON.ENERGY.BASIC_CAPACITOR_BANK_CAPACITY), + ADVANCED(MachinesConfig.COMMON.ENERGY.ADVANCED_CAPACITOR_BANK_CAPACITY), + VIBRANT(MachinesConfig.COMMON.ENERGY.VIBRANT_CAPACITOR_BANK_CAPACITY); private final ForgeConfigSpec.ConfigValue capacity; diff --git a/src/machines/java/com/enderio/machines/common/blockentity/task/SpawnerMachineTask.java b/src/machines/java/com/enderio/machines/common/blockentity/task/SpawnerMachineTask.java index 04d25335ec..b92fb8f970 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/task/SpawnerMachineTask.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/task/SpawnerMachineTask.java @@ -126,7 +126,7 @@ private void loadSoulData(Optional rl) { Optional opData = SpawnerSoul.SPAWNER.matches(rl.get()); if (opData.isEmpty()) { //Fallback this.entityType = optionalEntity.get().get(); - this.energyCost = 4000; + this.energyCost = 50000; if (entityType.create(this.blockEntity.getLevel()) instanceof LivingEntity entity) { //Are we 100% guaranteed this is a living entity? this.energyCost += entity.getMaxHealth()*50; //TODO actually balance based on health } diff --git a/src/machines/java/com/enderio/machines/common/config/common/EnergyConfig.java b/src/machines/java/com/enderio/machines/common/config/common/EnergyConfig.java index b27c9e9e85..38e0553a6a 100644 --- a/src/machines/java/com/enderio/machines/common/config/common/EnergyConfig.java +++ b/src/machines/java/com/enderio/machines/common/config/common/EnergyConfig.java @@ -28,6 +28,9 @@ public class EnergyConfig { public final ForgeConfigSpec.ConfigValue ENERGETIC_SOLAR_PANEL_MAX_PRODUCTION; public final ForgeConfigSpec.ConfigValue PULSATING_SOLAR_PANEL_MAX_PRODUCTION; public final ForgeConfigSpec.ConfigValue VIBRANT_SOLAR_PANEL_MAX_PRODUCTION; + public final ForgeConfigSpec.ConfigValue BASIC_CAPACITOR_BANK_CAPACITY; + public final ForgeConfigSpec.ConfigValue ADVANCED_CAPACITOR_BANK_CAPACITY; + public final ForgeConfigSpec.ConfigValue VIBRANT_CAPACITOR_BANK_CAPACITY; public final ForgeConfigSpec.ConfigValue WIRED_CHARGER_CAPACITY; public final ForgeConfigSpec.ConfigValue WIRED_CHARGER_USAGE; @@ -35,7 +38,7 @@ public EnergyConfig(ForgeConfigSpec.Builder builder) { builder.push("energy"); builder.push("alloySmelter"); - ALLOY_SMELTER_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 64000, 1, Integer.MAX_VALUE); + ALLOY_SMELTER_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 64_000, 1, Integer.MAX_VALUE); ALLOY_SMELTER_USAGE = builder.comment("The base energy consumption in uI/t.").defineInRange("usage", 20, 1, Integer.MAX_VALUE); // coal burn time = 1600 @@ -44,51 +47,51 @@ public EnergyConfig(ForgeConfigSpec.Builder builder) { // number of items per coal = 16 // 1600 * 0.375 * 40 / 16 ALLOY_SMELTER_VANILLA_ITEM_ENERGY = builder.comment("The amount of energy to consume per vanilla smelting item in uI.") - .defineInRange("vanillaItemEnergy", 1500, 1, Integer.MAX_VALUE); + .defineInRange("vanillaItemEnergy", 1_500, 1, Integer.MAX_VALUE); builder.pop(); builder.push("crafter"); - CRAFTER_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 64000, 1, Integer.MAX_VALUE); + CRAFTER_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 64_000, 1, Integer.MAX_VALUE); CRAFTER_USAGE = builder.comment("The base energy consumption in uI/t.").defineInRange("usage", 80, 1, Integer.MAX_VALUE); - CRAFTING_RECIPE_COST = builder.comment("The energy cost in uI for a crafting recipe.").defineInRange("usage", 3200, 1, Integer.MAX_VALUE); + CRAFTING_RECIPE_COST = builder.comment("The energy cost in uI for a crafting recipe.").defineInRange("usage", 3_200, 1, Integer.MAX_VALUE); builder.pop(); builder.push("impulseHopper"); - IMPULSE_HOPPER_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 64000, 1, Integer.MAX_VALUE); + IMPULSE_HOPPER_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 64_000, 1, Integer.MAX_VALUE); IMPULSE_HOPPER_USAGE = builder.comment("The base energy consumption in uI/t.").defineInRange("usage", 16, 1, Integer.MAX_VALUE); builder.pop(); builder.push("poweredSpawner"); - POWERED_SPAWNER_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 100000, 1, Integer.MAX_VALUE); + POWERED_SPAWNER_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 100_000, 1, Integer.MAX_VALUE); POWERED_SPAWNER_USAGE = builder.comment("The base energy consumption in uI/t.").defineInRange("usage", 20, 1, Integer.MAX_VALUE); builder.pop(); builder.push("sagMill"); - SAG_MILL_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 64000, 1, Integer.MAX_VALUE); + SAG_MILL_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 64_000, 1, Integer.MAX_VALUE); SAG_MILL_USAGE = builder.comment("The base energy consumption in uI/t.").defineInRange("usage", 20, 1, Integer.MAX_VALUE); builder.pop(); builder.push("slicer"); - SLICER_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 100000, 1, Integer.MAX_VALUE); + SLICER_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 100_000, 1, Integer.MAX_VALUE); SLICER_USAGE = builder.comment("The base energy consumption in uI/t.").defineInRange("usage", 30, 1, Integer.MAX_VALUE); builder.pop(); builder.push("soulBinder"); - SOUL_BINDER_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 128000, 1, Integer.MAX_VALUE); + SOUL_BINDER_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 128_000, 1, Integer.MAX_VALUE); SOUL_BINDER_USAGE = builder.comment("The base energy consumption in uI/t.").defineInRange("usage", 60, 1, Integer.MAX_VALUE); builder.pop(); builder.push("stirlingGenerator"); - STIRLING_GENERATOR_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 64000, 1, Integer.MAX_VALUE); + STIRLING_GENERATOR_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 64_000, 1, Integer.MAX_VALUE); STIRLING_GENERATOR_BURN_SPEED = builder.comment("The base number of 'burn ticks' performed per machine tick.").defineInRange("burnSpeed", 0.375, 0.001, Double.MAX_VALUE); STIRLING_GENERATOR_PRODUCTION = builder.comment("The base amount of energy produced in uI/t.").defineInRange("generation", 40, 1, Integer.MAX_VALUE); builder.pop(); builder.push("paintingMachine"); - PAINTING_MACHINE_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 64000, 1, Integer.MAX_VALUE); + PAINTING_MACHINE_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 64_000, 1, Integer.MAX_VALUE); PAINTING_MACHINE_USAGE = builder.comment("The base energy consumption in uI/t.").defineInRange("usage", 30, 1, Integer.MAX_VALUE); PAINTING_MACHINE_ENERGY_COST = builder.comment("The energy required for each painting operation") - .defineInRange("energyCost", 2400, 1, Integer.MAX_VALUE); + .defineInRange("energyCost", 2_400, 1, Integer.MAX_VALUE); builder.pop(); builder.push("photovoltaicCellRates"); @@ -98,8 +101,15 @@ public EnergyConfig(ForgeConfigSpec.Builder builder) { VIBRANT_SOLAR_PANEL_MAX_PRODUCTION = builder.defineInRange("vibrant", 64, 1, Integer.MAX_VALUE); builder.pop(); + builder.push("capacitor_bank_capacity"); + builder.comment("Capacity for capacitor banks"); + BASIC_CAPACITOR_BANK_CAPACITY = builder.defineInRange("basic", 500_000 , 1, Integer.MAX_VALUE); + ADVANCED_CAPACITOR_BANK_CAPACITY = builder.defineInRange("advanced", 2_000_000 , 1, Integer.MAX_VALUE); + VIBRANT_CAPACITOR_BANK_CAPACITY = builder.defineInRange("vibrant", 4_000_000, 1, Integer.MAX_VALUE); + builder.pop(); + builder.push("wiredCharger"); - WIRED_CHARGER_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 128000, 1, Integer.MAX_VALUE); + WIRED_CHARGER_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 128_000, 1, Integer.MAX_VALUE); WIRED_CHARGER_USAGE = builder.comment("The base energy consumption in uI/t.").defineInRange("usage", 64, 1, Integer.MAX_VALUE); builder.pop(); diff --git a/src/machines/java/com/enderio/machines/common/config/common/MachinesCommonConfig.java b/src/machines/java/com/enderio/machines/common/config/common/MachinesCommonConfig.java index dddb3dfc5f..f36da3073b 100644 --- a/src/machines/java/com/enderio/machines/common/config/common/MachinesCommonConfig.java +++ b/src/machines/java/com/enderio/machines/common/config/common/MachinesCommonConfig.java @@ -12,16 +12,6 @@ public class MachinesCommonConfig { public final ForgeConfigSpec.ConfigValue MAX_SPAWNERS; public final ForgeConfigSpec.ConfigValue SPAWN_TYPE; - public final ForgeConfigSpec.ConfigValue PAINTING_MACHINE_ENERGY_COST; - public final ForgeConfigSpec.ConfigValue SIMPLE_SOLAR_PANEL_MAX_PRODUCTION; - public final ForgeConfigSpec.ConfigValue BASIC_SOLAR_PANEL_MAX_PRODUCTION; - public final ForgeConfigSpec.ConfigValue ADVANCED_SOLAR_PANEL_MAX_PRODUCTION; - public final ForgeConfigSpec.ConfigValue VIBRANT_SOLAR_PANEL_MAX_PRODUCTION; - public final ForgeConfigSpec.ConfigValue BASIC_CAPACITOR_BANK_CAPACITY; - public final ForgeConfigSpec.ConfigValue ADVANCED_CAPACITOR_BANK_CAPACITY; - public final ForgeConfigSpec.ConfigValue VIBRANT_CAPACITOR_BANK_CAPACITY; - - public MachinesCommonConfig(ForgeConfigSpec.Builder builder) { ENERGY = new EnergyConfig(builder); @@ -31,22 +21,10 @@ public MachinesCommonConfig(ForgeConfigSpec.Builder builder) { ENCHANTER_BASE_LEVEL_COST = builder.comment("Base level cost added to all recipes in the enchanter.").define("baseLevelCost", 2); builder.pop(); + builder.push("poweredSpawner"); MAX_SPAWNER_ENTITIES = builder.comment("The amount of entities that will turn off powered spawner if in range.").define("maxentities", 2); SPAWN_TYPE = builder.comment("The way a powered spawner spawns an entity. Possible options: 'ENTITYPE' Spawns the same entity types as the soul vial. 'COPY' Spawns an exact copy of the mob in the soul vial").define("Spawn Type", SpawnerMachineTask.SpawnType.ENTITYTYPE); MAX_SPAWNERS = builder.comment("The maximum amount of spawners before the spawners suffers a loss of efficiency").define("maxspawners", 10); -PAINTING_MACHINE_ENERGY_COST = builder.comment("The energy required for each painting operation").defineInRange("paintingMachineEnergyCost", 2000, 1, Integer.MAX_VALUE); - builder.push("phtovoltaic_cell_rates"); - builder.comment("Production rate at midday without rain or thunder"); - SIMPLE_SOLAR_PANEL_MAX_PRODUCTION = builder.defineInRange("simple", 10, 1, Integer.MAX_VALUE); - BASIC_SOLAR_PANEL_MAX_PRODUCTION = builder.defineInRange("basic", 40, 1, Integer.MAX_VALUE); - ADVANCED_SOLAR_PANEL_MAX_PRODUCTION = builder.defineInRange("advanced", 80, 1, Integer.MAX_VALUE); - VIBRANT_SOLAR_PANEL_MAX_PRODUCTION = builder.defineInRange("vibrant", 160, 1, Integer.MAX_VALUE); - builder.pop(); - builder.push("capacitor_bank_capacity"); - builder.comment("Capacity for capacitor banks"); - BASIC_CAPACITOR_BANK_CAPACITY = builder.defineInRange("basic", 1_000_000, 1, Integer.MAX_VALUE); - ADVANCED_CAPACITOR_BANK_CAPACITY = builder.defineInRange("advanced", 5_000_000, 1, Integer.MAX_VALUE); - VIBRANT_CAPACITOR_BANK_CAPACITY = builder.defineInRange("vibrant", 25_000_000, 1, Integer.MAX_VALUE); builder.pop(); } } diff --git a/src/machines/java/com/enderio/machines/data/recipes/MachineRecipeProvider.java b/src/machines/java/com/enderio/machines/data/recipes/MachineRecipeProvider.java index efbe51ba3b..609f6160bf 100644 --- a/src/machines/java/com/enderio/machines/data/recipes/MachineRecipeProvider.java +++ b/src/machines/java/com/enderio/machines/data/recipes/MachineRecipeProvider.java @@ -144,7 +144,7 @@ protected void buildRecipes(Consumer finishedRecipeConsumer) { .define('B', Blocks.STONE_BRICKS) .define('F', Blocks.FURNACE) .define('I', EIOItems.DARK_STEEL_INGOT.get()) - .define('G', EIOItems.GEAR_DARK_STEEL.get()) + .define('G', EIOItems.GEAR_IRON.get()) .define('V', EIOBlocks.VOID_CHASSIS.get()) .define('P', Items.PISTON) .pattern("BFB") diff --git a/src/machines/java/com/enderio/machines/data/recipes/SagMillRecipeProvider.java b/src/machines/java/com/enderio/machines/data/recipes/SagMillRecipeProvider.java index b009bbfad5..abc640792b 100644 --- a/src/machines/java/com/enderio/machines/data/recipes/SagMillRecipeProvider.java +++ b/src/machines/java/com/enderio/machines/data/recipes/SagMillRecipeProvider.java @@ -1,7 +1,6 @@ package com.enderio.machines.data.recipes; import com.enderio.EnderIO; -import com.enderio.base.common.init.EIOBlocks; import com.enderio.base.common.tag.EIOTags; import com.enderio.base.data.recipe.RecipeDataUtil; import com.enderio.core.data.recipes.EnderRecipeProvider; @@ -62,11 +61,6 @@ protected void buildRecipes(Consumer finishedRecipeConsumer) { buildOre("gold_ore", Ingredient.of(Tags.Items.ORES_GOLD), POWDERED_GOLD.get(), finishedRecipeConsumer); buildOre("copper_ore", Ingredient.of(Tags.Items.ORES_COPPER), POWDERED_COPPER.get(), finishedRecipeConsumer); - build1toN("iron_block", Tags.Items.STORAGE_BLOCKS_IRON, POWDERED_IRON.get(), 9, finishedRecipeConsumer); - build1toN("gold_block", Tags.Items.STORAGE_BLOCKS_GOLD, POWDERED_GOLD.get(), 9, finishedRecipeConsumer); - build1toN("copper_block", Tags.Items.STORAGE_BLOCKS_COPPER, POWDERED_COPPER.get(), 9, finishedRecipeConsumer); - build1toN("coal_block", Tags.Items.STORAGE_BLOCKS_COAL, POWDERED_COAL.get(), 9, finishedRecipeConsumer); - build1toN("stone", STONE, COBBLESTONE, 1, finishedRecipeConsumer); build("coal", Ingredient.of(COAL), List.of( @@ -300,10 +294,6 @@ protected void buildRecipes(Consumer finishedRecipeConsumer) { output(PRISMARINE_CRYSTALS), output(PRISMARINE_CRYSTALS, 0.1f)), BASE_ENERGY_PER_OPERATION, BonusType.NONE, finishedRecipeConsumer); - - build("soularium_block", Ingredient.of(EIOBlocks.SOULARIUM_BLOCK.get()), List.of( - output(SOUL_POWDER.get(), 9) - ), BASE_ENERGY_PER_OPERATION, finishedRecipeConsumer); build("wither_rose", Ingredient.of(WITHER_ROSE), List.of( output(WITHERING_POWDER.get(), 1, 0.4f) diff --git a/src/machines/java/com/enderio/machines/data/souldata/SoulDataProvider.java b/src/machines/java/com/enderio/machines/data/souldata/SoulDataProvider.java index 4c6563f740..31e9695b7e 100644 --- a/src/machines/java/com/enderio/machines/data/souldata/SoulDataProvider.java +++ b/src/machines/java/com/enderio/machines/data/souldata/SoulDataProvider.java @@ -35,79 +35,79 @@ public SoulDataProvider(PackOutput packOutput) { } public void buildSoulData(Consumer> finshedSoulDataConsumer) { - addSpawnerData(EntityType.ALLAY, 15000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.AXOLOTL, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.BAT, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.BEE, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.BLAZE, 60000 , SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.CAT, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.CAVE_SPIDER, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.CHICKEN, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.COD, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.COW, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.CREEPER, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.DOLPHIN, 15000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.DONKEY, 15000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.DROWNED, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.ELDER_GUARDIAN, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.ENDERMAN, 60000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.ENDERMITE, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.ENDER_DRAGON, 1000000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.EVOKER, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.FOX, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.FROG, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.GHAST, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.GIANT, 10000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.GOAT, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.GUARDIAN, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.HOGLIN, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.HUSK, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.HORSE, 15000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.ILLUSIONER, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.IRON_GOLEM, 60000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.LLAMA, 15000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.MAGMA_CUBE, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.MULE, 15000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.MOOSHROOM, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.OCELOT, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.PANDA, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.PARROT, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.PHANTOM, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.PIG, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.PIGLIN, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.PIGLIN_BRUTE, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.PILLAGER, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.POLAR_BEAR, 18000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.PUFFERFISH, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.RABBIT, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.RAVAGER, 60000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.SALMON, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.SHEEP, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.SHULKER, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.SKELETON, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.SILVERFISH, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.SKELETON_HORSE, 18000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.SLIME, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.SNOW_GOLEM, 18000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.SPIDER, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.SQUID, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.STRIDER, 15000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.TADPOLE, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.TURTLE, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.TRADER_LLAMA, 15000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.TROPICAL_FISH, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.VEX, 12000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.VILLAGER, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.VINDICATOR, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.WARDEN, 100000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.ALLAY, 15_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.AXOLOTL, 12_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.BAT, 12_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.BEE, 12_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.BLAZE, 60_000 , SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.CAT, 12_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.CAVE_SPIDER, 51_200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.CHICKEN, 12_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.COD, 12_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.COW, 12_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.CREEPER, 51_200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.DOLPHIN, 15_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.DONKEY, 15_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.DROWNED, 51_200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.ELDER_GUARDIAN, 51_200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.ENDERMAN, 60_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.ENDERMITE, 51_200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.ENDER_DRAGON, 1_000_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.EVOKER, 51_200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.FOX, 12_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.FROG, 12_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.GHAST, 51_200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.GIANT, 60_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.GOAT, 12_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.GUARDIAN, 51_200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.HOGLIN, 51_200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.HUSK, 51_200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.HORSE, 15_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.ILLUSIONER, 51_200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.IRON_GOLEM, 60_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.LLAMA, 15_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.MAGMA_CUBE, 51_200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.MULE, 15_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.MOOSHROOM, 12_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.OCELOT, 12_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.PANDA, 12_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.PARROT, 12_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.PHANTOM, 51_200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.PIG, 12_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.PIGLIN, 51_200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.PIGLIN_BRUTE, 51_200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.PILLAGER, 51_200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.POLAR_BEAR, 18_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.PUFFERFISH, 12_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.RABBIT, 12_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.RAVAGER, 60_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.SALMON, 12_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.SHEEP, 12_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.SHULKER, 51_200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.SKELETON, 51_200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.SILVERFISH, 12_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.SKELETON_HORSE, 18_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.SLIME, 51_200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.SNOW_GOLEM, 18_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.SPIDER, 51_200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.SQUID, 12_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.STRIDER, 15_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.TADPOLE, 12_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.TURTLE, 12_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.TRADER_LLAMA, 15_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.TROPICAL_FISH, 12_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.VEX, 12_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.VILLAGER, 51_200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.VINDICATOR, 51_200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.WARDEN, 1_000_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); addSpawnerData(EntityType.WITCH, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.WITHER, 100000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.WOLF, 18000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.ZOGLIN, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.ZOMBIE, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.ZOMBIE_HORSE, 18000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.ZOMBIE_VILLAGER, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.ZOMBIFIED_PIGLIN, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.WITHER, 1_000_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.WOLF, 18_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.ZOGLIN, 51_200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.ZOMBIE, 51_200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.ZOMBIE_HORSE, 18_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.ZOMBIE_VILLAGER, 51_200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.ZOMBIFIED_PIGLIN, 51_200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); } From 16f912baec347c042db3b400afa3ff90a1ca0b42 Mon Sep 17 00:00:00 2001 From: agnor99 <36055315+agnor99@users.noreply.github.com> Date: Thu, 3 Aug 2023 20:26:07 +0200 Subject: [PATCH 052/154] improve crafter performanc --- .../blockentity/CrafterBlockEntity.java | 57 ++++++++++++++----- .../common/io/item/MachineInventory.java | 39 ++++++++++++- .../common/io/item/MultiSlotAccess.java | 4 ++ .../models/item/advanced_capacitor_bank.json | 15 ++++- 4 files changed, 97 insertions(+), 18 deletions(-) diff --git a/src/machines/java/com/enderio/machines/common/blockentity/CrafterBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/CrafterBlockEntity.java index 7f8f293b75..bbe3c0ab74 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/CrafterBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/CrafterBlockEntity.java @@ -10,6 +10,7 @@ import com.enderio.machines.common.io.item.SingleSlotAccess; import com.enderio.machines.common.menu.CrafterMenu; import net.minecraft.core.BlockPos; +import net.minecraft.nbt.CompoundTag; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; @@ -20,6 +21,7 @@ import net.minecraft.world.item.crafting.RecipeType; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; +import org.jetbrains.annotations.Nullable; import java.util.ArrayDeque; import java.util.Optional; @@ -37,6 +39,7 @@ public class CrafterBlockEntity extends PoweredMachineBlockEntity { public static final MultiSlotAccess GHOST = new MultiSlotAccess(); public static final SingleSlotAccess PREVIEW = new SingleSlotAccess(); + @Nullable private CraftingRecipe recipe; private final Queue outputBuffer = new ArrayDeque<>(); @@ -55,6 +58,25 @@ public boolean stillValid(Player pPlayer) { public CrafterBlockEntity(BlockEntityType type, BlockPos worldPosition, BlockState blockState) { super(EnergyIOMode.Input, ENERGY_CAPACITY, ENERGY_USAGE, type, worldPosition, blockState); + getInventoryNN().addSlotChangedCallback(this::onSlotChanged); + } + + private void onSlotChanged(int slot) { + if (GHOST.contains(slot)) { + updateRecipe(); + } + } + + private void updateRecipe() { + for (int i = 0; i < 9; i++) { + dummyCContainer.setItem(i, GHOST.get(i).getItemStack(this).copy()); + } + recipe = getLevel() + .getRecipeManager() + .getRecipeFor(RecipeType.CRAFTING, dummyCContainer, getLevel()).orElse(null); + PREVIEW.setStackInSlot(this, ItemStack.EMPTY); + if (recipe != null) + PREVIEW.setStackInSlot(this, recipe.getResultItem(getLevel().registryAccess())); } @Override @@ -85,6 +107,19 @@ private boolean acceptSlotInput(int slot, ItemStack stack) { return ItemStack.isSameItem(this.getInventoryNN().getStackInSlot(slot + 10), stack); } + @Override + public void onLoad() { + super.onLoad(); + updateRecipe(); + } + + @Override + public void load(CompoundTag pTag) { + super.load(pTag); + if (level != null && !level.isClientSide()) + updateRecipe(); + } + @Override public void serverTick() { tryCraft(); @@ -94,21 +129,15 @@ public void serverTick() { @Override protected boolean isActive() { - // TODO: How to determine active state beyond power. return canAct() && hasEnergy(); } private void tryCraft() { - Optional opt = getRecipeResult(); - if (opt.isPresent()) { - ItemStack result = opt.get(); - PREVIEW.setStackInSlot(this, result); + getRecipeResult().ifPresent(result -> { if (shouldActTick() && hasPowerToCraft() && canMergeOutput(result) && outputBuffer.isEmpty()) { craftItem(); } - } else { - PREVIEW.setStackInSlot(this, ItemStack.EMPTY); - } + }); } private boolean shouldActTick() { @@ -141,12 +170,7 @@ private void processOutputBuffer() { } private Optional getRecipeResult() { - for (int i = 0; i < 9; i++) { - dummyCContainer.setItem(i, GHOST.get(i).getItemStack(this).copy()); - } - Optional opt = getLevel().getRecipeManager().getRecipeFor(RecipeType.CRAFTING, dummyCContainer, getLevel()); - if (opt.isPresent()) { - recipe = opt.get(); + if (recipe != null) { return Optional.of(recipe.assemble(dummyCContainer, getLevel().registryAccess())); } return Optional.empty(); @@ -175,7 +199,10 @@ private void craftItem() { outputBuffer.removeIf(ItemStack::isEmpty); // consume power this.energyStorage.consumeEnergy(ENERGY_USAGE_PER_ITEM, false); - + //ceck resource reload + if (level.getRecipeManager().byKey(recipe.getId()).orElse(null) != recipe) { + recipe = null; + } } private void clearInput() { diff --git a/src/machines/java/com/enderio/machines/common/io/item/MachineInventory.java b/src/machines/java/com/enderio/machines/common/io/item/MachineInventory.java index 7df650480d..5254c7c357 100644 --- a/src/machines/java/com/enderio/machines/common/io/item/MachineInventory.java +++ b/src/machines/java/com/enderio/machines/common/io/item/MachineInventory.java @@ -12,6 +12,8 @@ import org.jetbrains.annotations.Nullable; import java.util.EnumMap; +import java.util.function.Consumer; +import java.util.function.IntConsumer; /** * A machine inventory. @@ -24,6 +26,8 @@ public class MachineInventory extends ItemStackHandler implements IEnderCapabili private final EnumMap> sideCache = new EnumMap<>(Direction.class); private LazyOptional selfCache = LazyOptional.empty(); + private Consumer changeListener = i -> {}; + /** * Create a new machine inventory. */ @@ -32,6 +36,12 @@ public MachineInventory(IIOConfig config, MachineInventoryLayout layout) { this.config = config; this.layout = layout; } + public void addSlotChangedCallback(IntConsumer callback) { + changeListener = i -> { + changeListener.accept(i); + callback.accept(i); + }; + } /** * Get the IO config for the machine. @@ -63,7 +73,7 @@ public Capability getCapabilityType() { } @Override - public LazyOptional getCapability(Direction side) { + public LazyOptional getCapability(@Nullable Direction side) { if (side == null) { // Create own cache if its been invalidated or not created yet. if (!selfCache.isPresent()) @@ -77,7 +87,7 @@ public LazyOptional getCapability(Direction side) { } @Override - public void invalidateSide(Direction side) { + public void invalidateSide(@Nullable Direction side) { if (side != null) { if (sideCache.containsKey(side)) { sideCache.get(side).invalidate(); @@ -95,6 +105,31 @@ public void invalidateCaps() { } } + @Override + public ItemStack insertItem(int slot, ItemStack stack, boolean simulate) { + boolean wasEmpty = !simulate && getStackInSlot(slot).isEmpty(); + ItemStack itemStack = super.insertItem(slot, stack, simulate); + if (wasEmpty && itemStack.getCount() != stack.getCount()) + changeListener.accept(slot); + return itemStack; + } + + @Override + public ItemStack extractItem(int slot, int amount, boolean simulate) { + ItemStack itemStack = super.extractItem(slot, amount, simulate); + if (!itemStack.isEmpty() && !simulate && getStackInSlot(slot).isEmpty()) + changeListener.accept(slot); + return itemStack; + } + + @Override + public void setStackInSlot(int slot, ItemStack stack) { + boolean changed = stack.getItem() != getStackInSlot(slot).getItem(); + super.setStackInSlot(slot, stack); + if (changed) + this.changeListener.accept(slot); + } + private record Wrapped(MachineInventory master, @Nullable Direction side) implements IItemHandler { @Override diff --git a/src/machines/java/com/enderio/machines/common/io/item/MultiSlotAccess.java b/src/machines/java/com/enderio/machines/common/io/item/MultiSlotAccess.java index 6711a77175..237477f233 100644 --- a/src/machines/java/com/enderio/machines/common/io/item/MultiSlotAccess.java +++ b/src/machines/java/com/enderio/machines/common/io/item/MultiSlotAccess.java @@ -28,6 +28,10 @@ public List getAccesses() { return accesses; } + public boolean contains(int slotIndex) { + return slotIndex >= accesses.get(0).getIndex() && slotIndex <= accesses.get(accesses.size() - 1).getIndex(); + } + public static MultiSlotAccess wrap(SingleSlotAccess access) { MultiSlotAccess multi = new MultiSlotAccess(); multi.accesses = List.of(access); diff --git a/src/machines/resources/assets/enderio/models/item/advanced_capacitor_bank.json b/src/machines/resources/assets/enderio/models/item/advanced_capacitor_bank.json index 11f96fd315..e92a595e3c 100644 --- a/src/machines/resources/assets/enderio/models/item/advanced_capacitor_bank.json +++ b/src/machines/resources/assets/enderio/models/item/advanced_capacitor_bank.json @@ -36,5 +36,18 @@ "east": {"uv": [0, 8, 16, 16], "texture": "#1"} } } - ] + ], + "connects": [ + { + "type": "self" + }, + { + "type": "tag", + "tag": "minecraft:planks" + }, + { + "type": "block", + "tag": "minecraft:respawn_anchor" + } + ] } \ No newline at end of file From ea182e399f0bc68a1c1f02430967924c667cd747 Mon Sep 17 00:00:00 2001 From: agnor99 <36055315+agnor99@users.noreply.github.com> Date: Thu, 3 Aug 2023 21:04:02 +0200 Subject: [PATCH 053/154] undo model change --- .../models/item/advanced_capacitor_bank.json | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/machines/resources/assets/enderio/models/item/advanced_capacitor_bank.json b/src/machines/resources/assets/enderio/models/item/advanced_capacitor_bank.json index e92a595e3c..11f96fd315 100644 --- a/src/machines/resources/assets/enderio/models/item/advanced_capacitor_bank.json +++ b/src/machines/resources/assets/enderio/models/item/advanced_capacitor_bank.json @@ -36,18 +36,5 @@ "east": {"uv": [0, 8, 16, 16], "texture": "#1"} } } - ], - "connects": [ - { - "type": "self" - }, - { - "type": "tag", - "tag": "minecraft:planks" - }, - { - "type": "block", - "tag": "minecraft:respawn_anchor" - } - ] + ] } \ No newline at end of file From a40bb9fd2b20db761a2d393dbb0a150197d80bd7 Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Fri, 4 Aug 2023 00:25:26 +0200 Subject: [PATCH 054/154] Update pickaxe.json --- .../data/minecraft/tags/blocks/mineable/pickaxe.json | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json b/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json index ebe259c7e5..d679beb1f9 100644 --- a/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json +++ b/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json @@ -50,10 +50,9 @@ "enderio:powered_spawner", "enderio:vacuum_chest", "enderio:xp_vacuum", - "enderio:simple_photovoltaic_cell", - "enderio:basic_photovoltaic_cell", - "enderio:advanced_photovoltaic_cell", - "enderio:vibrant_photovoltaic_cell", + "enderio:energetic_photovoltaic_module", + "enderio:pulsating_photovoltaic_module", + "enderio:vibrant_photovoltaic_module", "enderio:basic_capacitor_bank", "enderio:advanced_capacitor_bank", "enderio:vibrant_capacitor_bank", From 51ea03782bc0192d64a22348eb4379978d286dfa Mon Sep 17 00:00:00 2001 From: mystchonky Date: Fri, 4 Aug 2023 12:50:38 +0530 Subject: [PATCH 055/154] fix slots and rearrange block init --- .../network/slot/StringNetworkDataSlot.java | 15 ++++++++++++++ .../machines/common/init/MachineBlocks.java | 20 ++++++++++--------- 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/src/core/java/com/enderio/core/common/network/slot/StringNetworkDataSlot.java b/src/core/java/com/enderio/core/common/network/slot/StringNetworkDataSlot.java index c09a31832a..7831927ed5 100644 --- a/src/core/java/com/enderio/core/common/network/slot/StringNetworkDataSlot.java +++ b/src/core/java/com/enderio/core/common/network/slot/StringNetworkDataSlot.java @@ -2,6 +2,7 @@ import net.minecraft.nbt.StringTag; import net.minecraft.nbt.Tag; +import net.minecraft.network.FriendlyByteBuf; import java.util.function.Consumer; import java.util.function.Supplier; @@ -24,4 +25,18 @@ protected String valueFromNBT(Tag nbt) { throw new IllegalStateException("Invalid string tag was passed over the network."); } } + + @Override + public void toBuffer(FriendlyByteBuf buf, String value) { + buf.writeUtf(value); + } + + @Override + public String valueFromBuffer(FriendlyByteBuf buf) { + try { + return buf.readUtf(); + } catch (Exception e) { + throw new IllegalStateException("Invalid string buffer was passed over the network."); + } + } } diff --git a/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java b/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java index 2585f5139b..4a9c4a733c 100644 --- a/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java +++ b/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java @@ -154,6 +154,17 @@ public class MachineBlocks { .build() .register(); + public static final BlockEntry TRAVEL_ANCHOR = REGISTRATE + .block("travel_anchor", TravelAnchorBlock::new) + .properties(props -> props.strength(2.5f, 8).noOcclusion()) + .tag(BlockTags.NEEDS_IRON_TOOL, BlockTags.MINEABLE_WITH_PICKAXE) + .loot(MachinesLootTable::copyNBT) + .blockstate((ctx, prov) -> prov.simpleBlock(ctx.get(), prov.models().getExistingFile(EnderIO.loc("block/" + ctx.getName())))) + .item() + .tab(EIOCreativeTabs.MACHINES) + .build() + .register(); + public static final Map> SOLAR_PANELS = Util.make(() -> { Map> panels = new HashMap<>(); for (SolarPanelTier tier : SolarPanelTier.values()) { @@ -172,15 +183,6 @@ public class MachineBlocks { }); public static final BlockEntry CRAFTER = progressMachine("crafter", () -> MachineBlockEntities.CRAFTER).register(); - public static final BlockEntry TRAVEL_ANCHOR = REGISTRATE - .block("travel_anchor", TravelAnchorBlock::new) - .properties(props -> props.strength(2.5f, 8).noOcclusion()) - .loot(MachinesLootTable::copyNBT) - .blockstate((ctx, prov) -> prov.simpleBlock(ctx.get(), prov.models().getExistingFile(EnderIO.loc("block/travel_anchor")))) - .item() - .tab(EIOCreativeTabs.MACHINES) - .build() - .register(); //used when single methods needs to be overridden in the block class private static BlockBuilder baseMachine(BlockBuilder machineBlock, From b40c8023e6f9cc0f536094ac2cf3f328f99514f0 Mon Sep 17 00:00:00 2001 From: mystchonky Date: Fri, 4 Aug 2023 13:00:49 +0530 Subject: [PATCH 056/154] run datagen --- .../resources/data/minecraft/tags/blocks/mineable/pickaxe.json | 1 + .../resources/data/minecraft/tags/blocks/needs_iron_tool.json | 1 + 2 files changed, 2 insertions(+) diff --git a/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json b/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json index ebe259c7e5..1b9cc49caa 100644 --- a/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json +++ b/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json @@ -50,6 +50,7 @@ "enderio:powered_spawner", "enderio:vacuum_chest", "enderio:xp_vacuum", + "enderio:travel_anchor", "enderio:simple_photovoltaic_cell", "enderio:basic_photovoltaic_cell", "enderio:advanced_photovoltaic_cell", diff --git a/src/generated/resources/data/minecraft/tags/blocks/needs_iron_tool.json b/src/generated/resources/data/minecraft/tags/blocks/needs_iron_tool.json index 827c201f8f..a7e24fbdce 100644 --- a/src/generated/resources/data/minecraft/tags/blocks/needs_iron_tool.json +++ b/src/generated/resources/data/minecraft/tags/blocks/needs_iron_tool.json @@ -21,6 +21,7 @@ "enderio:powered_spawner", "enderio:vacuum_chest", "enderio:xp_vacuum", + "enderio:travel_anchor", "enderio:crafter" ] } \ No newline at end of file From 8e904a0a6ae0d70f6c02da3a6314d4aef370bc82 Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Fri, 4 Aug 2023 12:42:16 +0200 Subject: [PATCH 057/154] small tweaks --- .../data/enderio/eio_soul/spawner/minecraft_evoker.json | 2 +- .../enderio/eio_soul/spawner/minecraft_iron_golem.json | 2 +- .../data/enderio/eio_soul/spawner/minecraft_shulker.json | 2 +- src/machines/java/com/enderio/machines/EIOMachines.java | 1 + .../integrations/vanilla/VanillaAlloySmeltingRecipe.java | 4 +--- .../enderio/machines/data/souldata/SoulDataProvider.java | 8 ++++---- 6 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_evoker.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_evoker.json index 05ed0673d6..e5f667dd86 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_evoker.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_evoker.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:evoker", - "power": 51200 + "power": 200000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_iron_golem.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_iron_golem.json index 428782c47c..a6787c933a 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_iron_golem.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_iron_golem.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:iron_golem", - "power": 60000 + "power": 100000 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_shulker.json b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_shulker.json index 3b04e06ff5..a782c5cf2d 100644 --- a/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_shulker.json +++ b/src/generated/resources/data/enderio/eio_soul/spawner/minecraft_shulker.json @@ -1,5 +1,5 @@ { "type": "entitytype", "entity": "minecraft:shulker", - "power": 51200 + "power": 200000 } \ No newline at end of file diff --git a/src/machines/java/com/enderio/machines/EIOMachines.java b/src/machines/java/com/enderio/machines/EIOMachines.java index 119364593d..dd51e4c5cb 100644 --- a/src/machines/java/com/enderio/machines/EIOMachines.java +++ b/src/machines/java/com/enderio/machines/EIOMachines.java @@ -79,6 +79,7 @@ public static void gatherData(GatherDataEvent event) { List.of(new MachinesAdvancementGenerator()))); } + //TODO Remove later on when during beta/release. public static void missingMappings(MissingMappingsEvent event) { event.getMappings(Registries.BLOCK, EnderIO.MODID).forEach(mapping -> { if (mapping.getKey().equals(EnderIO.loc("simple_photovoltaic_cell"))) { diff --git a/src/machines/java/com/enderio/machines/common/integrations/vanilla/VanillaAlloySmeltingRecipe.java b/src/machines/java/com/enderio/machines/common/integrations/vanilla/VanillaAlloySmeltingRecipe.java index e70b32f6d2..bc41bcc6e1 100644 --- a/src/machines/java/com/enderio/machines/common/integrations/vanilla/VanillaAlloySmeltingRecipe.java +++ b/src/machines/java/com/enderio/machines/common/integrations/vanilla/VanillaAlloySmeltingRecipe.java @@ -7,12 +7,10 @@ import com.enderio.machines.common.recipe.AlloySmeltingRecipe; import net.minecraft.core.RegistryAccess; import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.Items; import net.minecraft.world.item.crafting.RecipeSerializer; import net.minecraft.world.item.crafting.RecipeType; import net.minecraft.world.item.crafting.SmeltingRecipe; import net.minecraft.world.level.Level; -import net.minecraftforge.common.ForgeHooks; import java.util.List; @@ -39,7 +37,7 @@ public int getBaseEnergyCost() { @Override public int getEnergyCost(ContainerWrapper container) { - return MachinesConfig.COMMON.ENERGY.ALLOY_SMELTER_VANILLA_ITEM_ENERGY.get() * container.getInputsTaken(); + return getBaseEnergyCost() * container.getInputsTaken(); } @Override diff --git a/src/machines/java/com/enderio/machines/data/souldata/SoulDataProvider.java b/src/machines/java/com/enderio/machines/data/souldata/SoulDataProvider.java index 31e9695b7e..34ce01be28 100644 --- a/src/machines/java/com/enderio/machines/data/souldata/SoulDataProvider.java +++ b/src/machines/java/com/enderio/machines/data/souldata/SoulDataProvider.java @@ -53,7 +53,7 @@ public void buildSoulData(Consumer> finshedSoulDataConsumer) addSpawnerData(EntityType.ENDERMAN, 60_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); addSpawnerData(EntityType.ENDERMITE, 51_200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); addSpawnerData(EntityType.ENDER_DRAGON, 1_000_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.EVOKER, 51_200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.EVOKER, 200_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); addSpawnerData(EntityType.FOX, 12_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); addSpawnerData(EntityType.FROG, 12_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); addSpawnerData(EntityType.GHAST, 51_200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); @@ -64,7 +64,7 @@ public void buildSoulData(Consumer> finshedSoulDataConsumer) addSpawnerData(EntityType.HUSK, 51_200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); addSpawnerData(EntityType.HORSE, 15_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); addSpawnerData(EntityType.ILLUSIONER, 51_200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.IRON_GOLEM, 60_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.IRON_GOLEM, 100_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); addSpawnerData(EntityType.LLAMA, 15_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); addSpawnerData(EntityType.MAGMA_CUBE, 51_200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); addSpawnerData(EntityType.MULE, 15_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); @@ -83,7 +83,7 @@ public void buildSoulData(Consumer> finshedSoulDataConsumer) addSpawnerData(EntityType.RAVAGER, 60_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); addSpawnerData(EntityType.SALMON, 12_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); addSpawnerData(EntityType.SHEEP, 12_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.SHULKER, 51_200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.SHULKER, 200_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); addSpawnerData(EntityType.SKELETON, 51_200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); addSpawnerData(EntityType.SILVERFISH, 12_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); addSpawnerData(EntityType.SKELETON_HORSE, 18_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); @@ -100,7 +100,7 @@ public void buildSoulData(Consumer> finshedSoulDataConsumer) addSpawnerData(EntityType.VILLAGER, 51_200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); addSpawnerData(EntityType.VINDICATOR, 51_200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); addSpawnerData(EntityType.WARDEN, 1_000_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addSpawnerData(EntityType.WITCH, 51200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); + addSpawnerData(EntityType.WITCH, 51_200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); addSpawnerData(EntityType.WITHER, 1_000_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); addSpawnerData(EntityType.WOLF, 18_000, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); addSpawnerData(EntityType.ZOGLIN, 51_200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); From 0563ace611957439bfa20a71b4e8ead54b1632c6 Mon Sep 17 00:00:00 2001 From: agnor99 <36055315+agnor99@users.noreply.github.com> Date: Fri, 4 Aug 2023 13:19:43 +0200 Subject: [PATCH 058/154] fix stackoverflow that was introduced without testing --- .../enderio/machines/common/io/item/MachineInventory.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/machines/java/com/enderio/machines/common/io/item/MachineInventory.java b/src/machines/java/com/enderio/machines/common/io/item/MachineInventory.java index 5254c7c357..d4347f999d 100644 --- a/src/machines/java/com/enderio/machines/common/io/item/MachineInventory.java +++ b/src/machines/java/com/enderio/machines/common/io/item/MachineInventory.java @@ -12,7 +12,6 @@ import org.jetbrains.annotations.Nullable; import java.util.EnumMap; -import java.util.function.Consumer; import java.util.function.IntConsumer; /** @@ -26,7 +25,7 @@ public class MachineInventory extends ItemStackHandler implements IEnderCapabili private final EnumMap> sideCache = new EnumMap<>(Direction.class); private LazyOptional selfCache = LazyOptional.empty(); - private Consumer changeListener = i -> {}; + private IntConsumer changeListener = i -> {}; /** * Create a new machine inventory. @@ -37,10 +36,7 @@ public MachineInventory(IIOConfig config, MachineInventoryLayout layout) { this.layout = layout; } public void addSlotChangedCallback(IntConsumer callback) { - changeListener = i -> { - changeListener.accept(i); - callback.accept(i); - }; + changeListener = changeListener.andThen(callback); } /** From bbec1a37cc7b779e0a39eeb7580ffa7ab91dd090 Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Fri, 4 Aug 2023 19:41:42 +0200 Subject: [PATCH 059/154] merge wither enchantments --- .../resources/assets/enderio/lang/en_ud.json | 12 ++---- .../resources/assets/enderio/lang/en_us.json | 12 ++---- .../{withering_blade.json => withering.json} | 2 +- .../data/recipes/EnchanterRecipeProvider.java | 4 +- src/main/java/com/enderio/EnderIO.java | 19 ++++++++++ .../enchantment/EIOEnchantmentCategories.java | 8 +++- .../enchantment/WitherArrowEnchantment.java | 38 ------------------- .../enchantment/WitherBoltEnchantment.java | 37 ------------------ ...nchantment.java => WitherEnchantment.java} | 7 ++-- .../base/common/init/EIOEnchantments.java | 17 ++------- .../com/enderio/base/common/lang/EIOLang.java | 18 ++------- 11 files changed, 43 insertions(+), 131 deletions(-) rename src/generated/resources/data/enderio/recipes/enchanting/{withering_blade.json => withering.json} (74%) delete mode 100644 src/main/java/com/enderio/base/common/enchantment/WitherArrowEnchantment.java delete mode 100644 src/main/java/com/enderio/base/common/enchantment/WitherBoltEnchantment.java rename src/main/java/com/enderio/base/common/enchantment/{WitherBladeEnchantment.java => WitherEnchantment.java} (78%) diff --git a/src/generated/resources/assets/enderio/lang/en_ud.json b/src/generated/resources/assets/enderio/lang/en_ud.json index 790cba9698..e3f6df3e49 100644 --- a/src/generated/resources/assets/enderio/lang/en_ud.json +++ b/src/generated/resources/assets/enderio/lang/en_ud.json @@ -216,15 +216,9 @@ "enchantment.enderio.shimmer.desc": "˙˙˙ʎןןɐǝᴚ ˙˙˙ןןɐ s,ʇɐɥ⟘ ˙˙˙pǝʇuɐɥɔuǝ sɐʍ ʇı ɟı sɐ ɹǝɯɯıɥs ɯǝʇı ǝɥʇ sǝʞɐW", "enchantment.enderio.soulbound": "punoqןnoS", "enchantment.enderio.soulbound.desc": "¡buıʞɹoʍ ɯoɹɟ sıɥʇ ʇuǝʌǝɹd puɐ pıdnʇs ǝɹɐ spoɯ ǝuoʇsǝʌɐɹb ʇsoW :ǝʇoN ˙ɥʇɐǝp uo ʇsoן buıǝq ɯoɹɟ ɯǝʇı sʇuǝʌǝɹԀ", - "enchantment.enderio.withering_arrow": "ʍoɹɹⱯ buıɹǝɥʇıM", - "enchantment.enderio.withering_arrow.desc": "˙ʇǝbɹɐʇ ǝɥʇ oʇ ɹǝɥʇıʍ sǝıןddⱯ", - "enchantment.enderio.withering_arrow.type": "˙sʍoq oʇ sǝıןddⱯ", - "enchantment.enderio.withering_blade": "ǝpɐןᗺ buıɹǝɥʇıM", - "enchantment.enderio.withering_blade.desc": "˙ʇǝbɹɐʇ ǝɥʇ oʇ ɹǝɥʇıʍ sǝıןddⱯ", - "enchantment.enderio.withering_blade.type": "˙suodɐǝʍ pǝpɐןq oʇ sǝıןddⱯ", - "enchantment.enderio.withering_bolt": "ʇןoᗺ buıɹǝɥʇıM", - "enchantment.enderio.withering_bolt.desc": "˙ʇǝbɹɐʇ ǝɥʇ oʇ ɹǝɥʇıʍ sǝıןddⱯ", - "enchantment.enderio.withering_bolt.type": "˙sʍoqssoɹɔ oʇ sǝıןddⱯ", + "enchantment.enderio.withering": "buıɹǝɥʇıM", + "enchantment.enderio.withering.desc": "˙ʇǝbɹɐʇ ǝɥʇ oʇ ɹǝɥʇıʍ sǝıןddⱯ", + "enchantment.enderio.withering.type": "˙sʍoqssoɹɔ puɐ sʍoq 'suodɐǝʍ pǝpɐןq oʇ sǝıןddⱯ", "enchantment.enderio.xp_boost": "ʇsooᗺ ԀX", "enchantment.enderio.xp_boost.desc": "sʞɔoןq puɐ sqoɯ ɯoɹɟ ԀX ɐɹʇxƎ", "entity.enderio.painted_sand": "puɐS pǝʇuıɐԀ", diff --git a/src/generated/resources/assets/enderio/lang/en_us.json b/src/generated/resources/assets/enderio/lang/en_us.json index 0c0f21023b..4e64c99d92 100644 --- a/src/generated/resources/assets/enderio/lang/en_us.json +++ b/src/generated/resources/assets/enderio/lang/en_us.json @@ -216,15 +216,9 @@ "enchantment.enderio.shimmer.desc": "Makes the item shimmer as if it was enchanted... That's all... Really...", "enchantment.enderio.soulbound": "Soulbound", "enchantment.enderio.soulbound.desc": "Prevents item from being lost on death. Note: Most gravestone mods are stupid and prevent this from working!", - "enchantment.enderio.withering_arrow": "Withering Arrow", - "enchantment.enderio.withering_arrow.desc": "Applies wither to the target.", - "enchantment.enderio.withering_arrow.type": "Applies to bows.", - "enchantment.enderio.withering_blade": "Withering Blade", - "enchantment.enderio.withering_blade.desc": "Applies wither to the target.", - "enchantment.enderio.withering_blade.type": "Applies to bladed weapons.", - "enchantment.enderio.withering_bolt": "Withering Bolt", - "enchantment.enderio.withering_bolt.desc": "Applies wither to the target.", - "enchantment.enderio.withering_bolt.type": "Applies to crossbows.", + "enchantment.enderio.withering": "Withering", + "enchantment.enderio.withering.desc": "Applies wither to the target.", + "enchantment.enderio.withering.type": "Applies to bladed weapons, bows and crossbows.", "enchantment.enderio.xp_boost": "XP Boost", "enchantment.enderio.xp_boost.desc": "Extra XP from mobs and blocks", "entity.enderio.painted_sand": "Painted Sand", diff --git a/src/generated/resources/data/enderio/recipes/enchanting/withering_blade.json b/src/generated/resources/data/enderio/recipes/enchanting/withering.json similarity index 74% rename from src/generated/resources/data/enderio/recipes/enchanting/withering_blade.json rename to src/generated/resources/data/enderio/recipes/enchanting/withering.json index 478b6a0c5d..8c24ca746b 100644 --- a/src/generated/resources/data/enderio/recipes/enchanting/withering_blade.json +++ b/src/generated/resources/data/enderio/recipes/enchanting/withering.json @@ -2,7 +2,7 @@ "type": "enderio:enchanting", "amount": 4, "cost_multiplier": 1, - "enchantment": "enderio:withering_blade", + "enchantment": "enderio:withering", "input": { "item": "enderio:withering_powder" } diff --git a/src/machines/java/com/enderio/machines/data/recipes/EnchanterRecipeProvider.java b/src/machines/java/com/enderio/machines/data/recipes/EnchanterRecipeProvider.java index d763a6e6a3..78f68e3429 100644 --- a/src/machines/java/com/enderio/machines/data/recipes/EnchanterRecipeProvider.java +++ b/src/machines/java/com/enderio/machines/data/recipes/EnchanterRecipeProvider.java @@ -75,9 +75,7 @@ protected void buildRecipes(Consumer pFinishedRecipeConsumer) { //enderio build(EIOEnchantments.SOULBOUND.get(), EIOItems.ENDER_CRYSTAL.get(), 1, 1, pFinishedRecipeConsumer); - //build(EIOEnchantments.WITHERING_ARROW.get(), witherpotion, 1, 1, pFinishedRecipeConsumer); //TODO Potion:"enderio:withering" - //build(EIOEnchantments.WITHERING_BOLT.get(), witherpotion, 1, 1, pFinishedRecipeConsumer); //TODO Another recipe for bolts - build(EIOEnchantments.WITHERING_BLADE.get(), EIOItems.WITHERING_POWDER.get(), 4, 1, pFinishedRecipeConsumer); + build(EIOEnchantments.WITHERING.get(), EIOItems.WITHERING_POWDER.get(), 4, 1, pFinishedRecipeConsumer); build(EIOEnchantments.REPELLENT.get(), Items.ENDER_PEARL, 4, 2, pFinishedRecipeConsumer); build(EIOEnchantments.AUTO_SMELT.get(), Items.BLAZE_POWDER, 16, 1, pFinishedRecipeConsumer); //TODO } diff --git a/src/main/java/com/enderio/EnderIO.java b/src/main/java/com/enderio/EnderIO.java index d6e92c44f8..04188f0047 100644 --- a/src/main/java/com/enderio/EnderIO.java +++ b/src/main/java/com/enderio/EnderIO.java @@ -24,11 +24,13 @@ import com.enderio.core.common.network.CoreNetwork; import com.tterrag.registrate.Registrate; import net.minecraft.core.HolderLookup; +import net.minecraft.core.registries.Registries; import net.minecraft.data.DataGenerator; import net.minecraft.data.PackOutput; import net.minecraft.data.loot.LootTableProvider; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.storage.loot.parameters.LootContextParamSets; +import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.data.ExistingFileHelper; import net.minecraftforge.common.data.ForgeAdvancementProvider; import net.minecraftforge.common.util.Lazy; @@ -40,6 +42,7 @@ import net.minecraftforge.fml.config.ModConfig; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; import net.minecraftforge.fml.loading.FMLPaths; +import net.minecraftforge.registries.MissingMappingsEvent; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -108,6 +111,9 @@ public EnderIO() { // Decor EIONetwork.register(); + + // Remap + MinecraftForge.EVENT_BUS.addListener(EnderIO::missingMappings); } public void onGatherData(GatherDataEvent event) { @@ -138,4 +144,17 @@ public void onGatherData(GatherDataEvent event) { new LootTableProvider.SubProviderEntry(ChestLootProvider::new, LootContextParamSets.CHEST)))); generator.addProvider(true, provider); } + + //TODO Remove later on when during beta/release. + public static void missingMappings(MissingMappingsEvent event) { + event.getMappings(Registries.ENCHANTMENT, EnderIO.MODID).forEach(mapping -> { + if (mapping.getKey().equals(EnderIO.loc("withering_blade"))) { + mapping.remap(EIOEnchantments.WITHERING.get()); + } else if (mapping.getKey().equals(EnderIO.loc("withering_arrow"))) { + mapping.remap(EIOEnchantments.WITHERING.get()); + } else if (mapping.getKey().equals(EnderIO.loc("withering_bold"))) { + mapping.remap(EIOEnchantments.WITHERING.get()); + } + }); + } } diff --git a/src/main/java/com/enderio/base/common/enchantment/EIOEnchantmentCategories.java b/src/main/java/com/enderio/base/common/enchantment/EIOEnchantmentCategories.java index 6dd4267d8a..e580517fe2 100644 --- a/src/main/java/com/enderio/base/common/enchantment/EIOEnchantmentCategories.java +++ b/src/main/java/com/enderio/base/common/enchantment/EIOEnchantmentCategories.java @@ -7,6 +7,10 @@ public class EIOEnchantmentCategories { public static final EnchantmentCategory XPBOOST = EnchantmentCategory.create("EIO_XPBOOST", t -> new ItemStack(t).isDamageableItem() && !(t instanceof ArmorItem) && !(t instanceof FishingRodItem)); - public static final EnchantmentCategory ARROW = EnchantmentCategory.create("EIO_ARROW", t -> t instanceof BowItem); - public static final EnchantmentCategory BOLT = EnchantmentCategory.create("EIO_BOLT", t -> t instanceof CrossbowItem); + public static final EnchantmentCategory PROJECTILE = EnchantmentCategory.create("EIO_PROJECTILE", + t -> EnchantmentCategory.BOW.canEnchant(t) || EnchantmentCategory.CROSSBOW.canEnchant(t)); + + public static final EnchantmentCategory WEAPON = EnchantmentCategory.create("EIO_PROJECTILE", + t -> EnchantmentCategory.BOW.canEnchant(t) || EnchantmentCategory.CROSSBOW.canEnchant(t) || EnchantmentCategory.WEAPON.canEnchant(t)); + } diff --git a/src/main/java/com/enderio/base/common/enchantment/WitherArrowEnchantment.java b/src/main/java/com/enderio/base/common/enchantment/WitherArrowEnchantment.java deleted file mode 100644 index 257b5f9845..0000000000 --- a/src/main/java/com/enderio/base/common/enchantment/WitherArrowEnchantment.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.enderio.base.common.enchantment; - -import com.enderio.base.common.config.BaseConfig; -import net.minecraft.world.effect.MobEffectInstance; -import net.minecraft.world.effect.MobEffects; -import net.minecraft.world.entity.Entity; -import net.minecraft.world.entity.EquipmentSlot; -import net.minecraft.world.entity.LivingEntity; -import net.minecraft.world.item.enchantment.EnchantmentHelper; - -public class WitherArrowEnchantment extends EIOBaseEnchantment { - - public WitherArrowEnchantment() { - super(Rarity.UNCOMMON, EIOEnchantmentCategories.ARROW, new EquipmentSlot[] { EquipmentSlot.MAINHAND }, () -> true); - } - - @Override - public int getMaxLevel() { - return 1; - } - - @Override - public int getMaxCost(int pLevel) { - return BaseConfig.COMMON.ENCHANTMENTS.WITHERING_ARROW_MAX_COST.get(); - } - - @Override - public int getMinCost(int pLevel) { - return BaseConfig.COMMON.ENCHANTMENTS.WITHERING_ARROW_MIN_COST.get(); - } - - @Override - public void doPostAttack(LivingEntity pAttacker, Entity pTarget, int pLevel) { - if (pTarget instanceof LivingEntity target && EnchantmentHelper.getEnchantments(pAttacker.getMainHandItem()).containsKey(this)) { - target.addEffect(new MobEffectInstance(MobEffects.WITHER, 200)); - } - } -} diff --git a/src/main/java/com/enderio/base/common/enchantment/WitherBoltEnchantment.java b/src/main/java/com/enderio/base/common/enchantment/WitherBoltEnchantment.java deleted file mode 100644 index 67d5c5c979..0000000000 --- a/src/main/java/com/enderio/base/common/enchantment/WitherBoltEnchantment.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.enderio.base.common.enchantment; - -import com.enderio.base.common.config.BaseConfig; -import net.minecraft.world.effect.MobEffectInstance; -import net.minecraft.world.effect.MobEffects; -import net.minecraft.world.entity.Entity; -import net.minecraft.world.entity.EquipmentSlot; -import net.minecraft.world.entity.LivingEntity; -import net.minecraft.world.item.enchantment.EnchantmentHelper; - -public class WitherBoltEnchantment extends EIOBaseEnchantment { - public WitherBoltEnchantment() { - super(Rarity.UNCOMMON, EIOEnchantmentCategories.BOLT, new EquipmentSlot[] { EquipmentSlot.MAINHAND }, () -> true); - } - - @Override - public int getMaxLevel() { - return 1; - } - - @Override - public int getMaxCost(int pLevel) { - return BaseConfig.COMMON.ENCHANTMENTS.WITHERING_BOLT_MAX_COST.get(); - } - - @Override - public int getMinCost(int pLevel) { - return BaseConfig.COMMON.ENCHANTMENTS.WITHERING_BOLT_MIN_COST.get(); - } - - @Override - public void doPostAttack(LivingEntity pAttacker, Entity pTarget, int pLevel) { - if (pTarget instanceof LivingEntity target && EnchantmentHelper.getEnchantments(pAttacker.getMainHandItem()).containsKey(this)) { - target.addEffect(new MobEffectInstance(MobEffects.WITHER, 200)); - } - } -} diff --git a/src/main/java/com/enderio/base/common/enchantment/WitherBladeEnchantment.java b/src/main/java/com/enderio/base/common/enchantment/WitherEnchantment.java similarity index 78% rename from src/main/java/com/enderio/base/common/enchantment/WitherBladeEnchantment.java rename to src/main/java/com/enderio/base/common/enchantment/WitherEnchantment.java index dc45367dfc..fb2b27a7a2 100644 --- a/src/main/java/com/enderio/base/common/enchantment/WitherBladeEnchantment.java +++ b/src/main/java/com/enderio/base/common/enchantment/WitherEnchantment.java @@ -6,13 +6,12 @@ import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EquipmentSlot; import net.minecraft.world.entity.LivingEntity; -import net.minecraft.world.item.enchantment.EnchantmentCategory; import net.minecraft.world.item.enchantment.EnchantmentHelper; -public class WitherBladeEnchantment extends EIOBaseEnchantment { +public class WitherEnchantment extends EIOBaseEnchantment { - public WitherBladeEnchantment() { - super(Rarity.UNCOMMON, EnchantmentCategory.WEAPON, new EquipmentSlot[] { EquipmentSlot.MAINHAND, EquipmentSlot.OFFHAND }, () -> true); + public WitherEnchantment() { + super(Rarity.UNCOMMON, EIOEnchantmentCategories.WEAPON, new EquipmentSlot[] { EquipmentSlot.MAINHAND, EquipmentSlot.OFFHAND }, () -> true); } @Override diff --git a/src/main/java/com/enderio/base/common/init/EIOEnchantments.java b/src/main/java/com/enderio/base/common/init/EIOEnchantments.java index 5c029032dc..de35bf26a1 100644 --- a/src/main/java/com/enderio/base/common/init/EIOEnchantments.java +++ b/src/main/java/com/enderio/base/common/init/EIOEnchantments.java @@ -41,16 +41,8 @@ public class EIOEnchantments { .lang("Soulbound") .register(); - public static final RegistryEntry WITHERING_BLADE = enchantmentBuilder("withering_blade", new WitherBladeEnchantment()) - .lang("Withering Blade") - .register(); - - public static final RegistryEntry WITHERING_ARROW = enchantmentBuilder("withering_arrow", new WitherArrowEnchantment()) - .lang("Withering Arrow") - .register(); - - public static final RegistryEntry WITHERING_BOLT = enchantmentBuilder("withering_bolt", new WitherArrowEnchantment()) - .lang("Withering Bolt") + public static final RegistryEntry WITHERING = enchantmentBuilder("withering", new WitherEnchantment()) + .lang("Withering") .register(); public static final RegistryEntry XP_BOOST = enchantmentBuilder("xp_boost", new XPBoostEnchantment()).lang("XP Boost").register(); @@ -84,12 +76,11 @@ static void tooltip(ItemTooltipEvent event) { Map enchantments = EnchantmentHelper.getEnchantments(event.getItemStack()); List toolTip = new ArrayList<>(event.getToolTip()); if (!enchantments.isEmpty()) { - addTooltip(event, enchantments, toolTip, WITHERING_BLADE.get(), EIOLang.WITHERING_BLADE_TYPES); - addTooltip(event, enchantments, toolTip, WITHERING_ARROW.get(), EIOLang.WITHERING_ARROW_TYPES); - addTooltip(event, enchantments, toolTip, WITHERING_BOLT.get(), EIOLang.WITHERING_BOLT_TYPES); + addTooltip(event, enchantments, toolTip, WITHERING.get(), EIOLang.WITHERING_TYPES); } } } public static void register() {} + } diff --git a/src/main/java/com/enderio/base/common/lang/EIOLang.java b/src/main/java/com/enderio/base/common/lang/EIOLang.java index dbb4098ff8..b20a722130 100644 --- a/src/main/java/com/enderio/base/common/lang/EIOLang.java +++ b/src/main/java/com/enderio/base/common/lang/EIOLang.java @@ -146,23 +146,11 @@ public class EIOLang { public static final Component SOULBOUND_DESC = enchantmentDescription("soulbound", "desc", "Prevents item from being lost on death. Note: Most gravestone mods are stupid and prevent this from working!"); - public static final Component WITHERING_BLADE_DESC = enchantmentDescription("withering_blade", "desc", + public static final Component WITHERING_DESC = enchantmentDescription("withering", "desc", "Applies wither to the target."); - public static final Component WITHERING_BLADE_TYPES = enchantmentDescription("withering_blade", "type", - "Applies to bladed weapons."); - - public static final Component WITHERING_ARROW_DESC = enchantmentDescription("withering_arrow", "desc", - "Applies wither to the target."); - - public static final Component WITHERING_ARROW_TYPES = enchantmentDescription("withering_arrow", "type", - "Applies to bows."); - - public static final Component WITHERING_BOLT_DESC = enchantmentDescription("withering_bolt", "desc", - "Applies wither to the target."); - - public static final Component WITHERING_BOLT_TYPES = enchantmentDescription("withering_bolt", "type", - "Applies to crossbows."); + public static final Component WITHERING_TYPES = enchantmentDescription("withering", "type", + "Applies to bladed weapons, bows and crossbows."); public static final Component XP_BOOST_DESC = enchantmentDescription("xp_boost", "desc", "Extra XP from mobs and blocks"); From bef45aac3a423ce580855357fea380e96a3024ec Mon Sep 17 00:00:00 2001 From: jollycar <939345+jollycar@users.noreply.github.com> Date: Sat, 5 Aug 2023 00:24:52 +0200 Subject: [PATCH 060/154] Prevent displaymode change on capacitor bank When shift right clicking with a BlockItem in your hand/offhand, you should not change the displaymode. This fix works for all BlockItems, not only for capacitor banks. closes #388 --- .../capacitorbank/CapacitorBankBlockEntity.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/machines/java/com/enderio/machines/common/blockentity/capacitorbank/CapacitorBankBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/capacitorbank/CapacitorBankBlockEntity.java index d34eaf554f..88355531b4 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/capacitorbank/CapacitorBankBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/capacitorbank/CapacitorBankBlockEntity.java @@ -2,8 +2,8 @@ import com.enderio.api.capacitor.FixedScalable; import com.enderio.api.io.energy.EnergyIOMode; -import com.enderio.core.common.network.slot.ListNetworkDataSlot; import com.enderio.base.common.tag.EIOTags; +import com.enderio.core.common.network.slot.ListNetworkDataSlot; import com.enderio.core.common.network.slot.LongNetworkDataSlot; import com.enderio.core.common.network.slot.NBTSerializingNetworkDataSlot; import com.enderio.core.common.network.slot.NetworkDataSlot; @@ -29,6 +29,7 @@ import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.item.BlockItem; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; @@ -245,10 +246,12 @@ public ConfigurablesDataSlot() { } public boolean onShiftRightClick(Direction direction, Player player) { - if (direction.getAxis().getPlane() == Direction.Plane.VERTICAL) + if (direction.getAxis().getPlane() == Direction.Plane.VERTICAL) { return false; - if (player.getMainHandItem().is(getBlockState().getBlock().asItem()) || player.getOffhandItem().is(getBlockState().getBlock().asItem())) + } + if (player.getMainHandItem().getItem() instanceof BlockItem || player.getOffhandItem().getItem() instanceof BlockItem) { return false; + } if (player.getMainHandItem().is(EIOTags.Items.WRENCH)) { return false; } From 681fc44b3ed8ce159d8d354120948760403ee3c3 Mon Sep 17 00:00:00 2001 From: mystchonky Date: Sat, 5 Aug 2023 12:56:06 +0530 Subject: [PATCH 061/154] render item --- .../rendering/travel/OutlineRenderType.java | 8 ++++--- .../travel/TravelAnchorRenderer.java | 24 ++++++++++--------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/src/machines/java/com/enderio/machines/client/rendering/travel/OutlineRenderType.java b/src/machines/java/com/enderio/machines/client/rendering/travel/OutlineRenderType.java index 7855a37e35..f52ccb1c00 100644 --- a/src/machines/java/com/enderio/machines/client/rendering/travel/OutlineRenderType.java +++ b/src/machines/java/com/enderio/machines/client/rendering/travel/OutlineRenderType.java @@ -24,9 +24,11 @@ private OutlineRenderType(RenderType parent) { this.parent = parent; } - public static OutlineRenderType get(RenderType parent) { - if (parent instanceof OutlineRenderType) { - return (OutlineRenderType) parent; + public static RenderType get(RenderType parent) { + if (parent.name.contains("glint")) { + return parent; + } else if (parent instanceof OutlineRenderType) { + return parent; } else { if (!TYPES.containsKey(parent)) { TYPES.put(parent, new OutlineRenderType(parent)); diff --git a/src/machines/java/com/enderio/machines/client/rendering/travel/TravelAnchorRenderer.java b/src/machines/java/com/enderio/machines/client/rendering/travel/TravelAnchorRenderer.java index 7edccbe62b..4dd1129191 100644 --- a/src/machines/java/com/enderio/machines/client/rendering/travel/TravelAnchorRenderer.java +++ b/src/machines/java/com/enderio/machines/client/rendering/travel/TravelAnchorRenderer.java @@ -59,17 +59,19 @@ public void render(AnchorTravelTarget travelData, LevelRenderer levelRenderer, P LevelRenderer.renderLineBox(poseStack, lines, 0, 0, 0, 1, 1, 1, FastColor.ARGB32.red(color) / 255F, FastColor.ARGB32.green(color) / 255F, FastColor.ARGB32.blue(color) / 255F, 1); + // Scale for rendering + double doubleScale = Math.sqrt(0.0035 * Math.sqrt(distanceSquared)); + if (doubleScale < 0.1f) { + doubleScale = 0.1f; + } + doubleScale = doubleScale * (Math.sin(Math.toRadians(Minecraft.getInstance().options.fov().get() / 4d))); + if (active) { + doubleScale *= 1.3; + } + float scale = (float) doubleScale; + // Render Text if (!travelData.getName().trim().isEmpty()) { - double doubleScale = Math.sqrt(0.0035 * Math.sqrt(distanceSquared)); - if (doubleScale < 0.1f) { - doubleScale = 0.1f; - } - doubleScale = doubleScale * (Math.sin(Math.toRadians(Minecraft.getInstance().options.fov().get() / 4d))); - if (active) { - doubleScale *= 1.3; - } - float scale = (float) doubleScale; poseStack.pushPose(); poseStack.translate(0.5, 1.05 + (doubleScale * Minecraft.getInstance().font.lineHeight), 0.5); @@ -77,7 +79,6 @@ public void render(AnchorTravelTarget travelData, LevelRenderer levelRenderer, P poseStack.scale(-scale, -scale, scale); Matrix4f matrix4f = poseStack.last().pose(); - Component tc = Component.literal(travelData.getName().trim()); float textOpacitySetting = minecraft.options.getBackgroundOpacity(0.5f); @@ -89,9 +90,10 @@ public void render(AnchorTravelTarget travelData, LevelRenderer levelRenderer, P poseStack.popPose(); } - // Render Icon + // Render Icon if (travelData.getIcon() != Items.AIR) { poseStack.pushPose(); + poseStack.translate(0.5, 2.5, 0.5); poseStack.mulPose(minecraft.getEntityRenderDispatcher().cameraOrientation()); ItemStack stack = new ItemStack(travelData.getIcon()); BakedModel bakedmodel = minecraft.getItemRenderer().getModel(stack, minecraft.level, null, 0); From 856ab50538d53f3044e6f1423166aac59263141a Mon Sep 17 00:00:00 2001 From: mystchonky Date: Sat, 5 Aug 2023 13:19:02 +0530 Subject: [PATCH 062/154] datagen --- .../resources/data/minecraft/tags/blocks/mineable/pickaxe.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json b/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json index d679beb1f9..3027e7460a 100644 --- a/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json +++ b/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json @@ -50,6 +50,7 @@ "enderio:powered_spawner", "enderio:vacuum_chest", "enderio:xp_vacuum", + "enderio:travel_anchor", "enderio:energetic_photovoltaic_module", "enderio:pulsating_photovoltaic_module", "enderio:vibrant_photovoltaic_module", From ae227302578b696151c53b7d6d96080eb7e0977d Mon Sep 17 00:00:00 2001 From: Reece Mackie <20544390+Rover656@users.noreply.github.com> Date: Sat, 5 Aug 2023 18:19:08 +0100 Subject: [PATCH 063/154] Raise forge version for compat with neo. We will not provide support for forge versions after 47.1.3 still, if you are having issues, make sure you try that version of forge first. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 7cd8a611db..8a17346e7a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -12,7 +12,7 @@ mod_version_series=6.0 # Version ranges for mods.toml minecraft_version_range=[1.20.1] loader_version_range=[47,) -forge_version_range=[47.1.0,47.1.3] +forge_version_range=[47.1.0,) # Mappings # ==== Possible options ==== From 9aead1958ccfdb294a710c26bf8021768d9b6412 Mon Sep 17 00:00:00 2001 From: Lemon-Juiced Date: Sat, 5 Aug 2023 17:12:09 -0400 Subject: [PATCH 064/154] Ingot and Nugget tags for better cross-mod compat. --- .../data/forge/tags/items/ingots.json | 13 +++++++ .../tags/items/ingots/conductive_alloy.json | 5 +++ .../forge/tags/items/ingots/copper_alloy.json | 5 +++ .../forge/tags/items/ingots/dark_steel.json | 5 +++ .../forge/tags/items/ingots/end_steel.json | 5 +++ .../tags/items/ingots/energetic_alloy.json | 5 +++ .../tags/items/ingots/pulsating_alloy.json | 5 +++ .../tags/items/ingots/redstone_alloy.json | 5 +++ .../forge/tags/items/ingots/soularium.json | 5 +++ .../tags/items/ingots/vibrant_alloy.json | 5 +++ .../data/forge/tags/items/nuggets.json | 13 +++++++ .../tags/items/nuggets/conductive_alloy.json | 5 +++ .../tags/items/nuggets/copper_alloy.json | 5 +++ .../forge/tags/items/nuggets/dark_steel.json | 5 +++ .../forge/tags/items/nuggets/end_steel.json | 5 +++ .../tags/items/nuggets/energetic_alloy.json | 5 +++ .../tags/items/nuggets/pulsating_alloy.json | 5 +++ .../tags/items/nuggets/redstone_alloy.json | 5 +++ .../forge/tags/items/nuggets/soularium.json | 5 +++ .../tags/items/nuggets/vibrant_alloy.json | 5 +++ .../enderio/base/common/init/EIOItems.java | 38 +++++++++---------- .../com/enderio/base/common/tag/EIOTags.java | 20 ++++++++++ .../base/data/tags/EIOItemTagsProvider.java | 2 + 23 files changed, 157 insertions(+), 19 deletions(-) create mode 100644 src/generated/resources/data/forge/tags/items/ingots.json create mode 100644 src/generated/resources/data/forge/tags/items/ingots/conductive_alloy.json create mode 100644 src/generated/resources/data/forge/tags/items/ingots/copper_alloy.json create mode 100644 src/generated/resources/data/forge/tags/items/ingots/dark_steel.json create mode 100644 src/generated/resources/data/forge/tags/items/ingots/end_steel.json create mode 100644 src/generated/resources/data/forge/tags/items/ingots/energetic_alloy.json create mode 100644 src/generated/resources/data/forge/tags/items/ingots/pulsating_alloy.json create mode 100644 src/generated/resources/data/forge/tags/items/ingots/redstone_alloy.json create mode 100644 src/generated/resources/data/forge/tags/items/ingots/soularium.json create mode 100644 src/generated/resources/data/forge/tags/items/ingots/vibrant_alloy.json create mode 100644 src/generated/resources/data/forge/tags/items/nuggets.json create mode 100644 src/generated/resources/data/forge/tags/items/nuggets/conductive_alloy.json create mode 100644 src/generated/resources/data/forge/tags/items/nuggets/copper_alloy.json create mode 100644 src/generated/resources/data/forge/tags/items/nuggets/dark_steel.json create mode 100644 src/generated/resources/data/forge/tags/items/nuggets/end_steel.json create mode 100644 src/generated/resources/data/forge/tags/items/nuggets/energetic_alloy.json create mode 100644 src/generated/resources/data/forge/tags/items/nuggets/pulsating_alloy.json create mode 100644 src/generated/resources/data/forge/tags/items/nuggets/redstone_alloy.json create mode 100644 src/generated/resources/data/forge/tags/items/nuggets/soularium.json create mode 100644 src/generated/resources/data/forge/tags/items/nuggets/vibrant_alloy.json diff --git a/src/generated/resources/data/forge/tags/items/ingots.json b/src/generated/resources/data/forge/tags/items/ingots.json new file mode 100644 index 0000000000..72c396e07d --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/ingots.json @@ -0,0 +1,13 @@ +{ + "values": [ + "#forge:ingots/conductive_alloy", + "#forge:ingots/copper_alloy", + "#forge:ingots/dark_steel", + "#forge:ingots/end_steel", + "#forge:ingots/energetic_alloy", + "#forge:ingots/pulsating_alloy", + "#forge:ingots/redstone_alloy", + "#forge:ingots/soularium", + "#forge:ingots/vibrant_alloy" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/ingots/conductive_alloy.json b/src/generated/resources/data/forge/tags/items/ingots/conductive_alloy.json new file mode 100644 index 0000000000..4d6e1b479b --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/ingots/conductive_alloy.json @@ -0,0 +1,5 @@ +{ + "values": [ + "enderio:conductive_alloy_ingot" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/ingots/copper_alloy.json b/src/generated/resources/data/forge/tags/items/ingots/copper_alloy.json new file mode 100644 index 0000000000..ad84f9fd2a --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/ingots/copper_alloy.json @@ -0,0 +1,5 @@ +{ + "values": [ + "enderio:copper_alloy_ingot" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/ingots/dark_steel.json b/src/generated/resources/data/forge/tags/items/ingots/dark_steel.json new file mode 100644 index 0000000000..21da4779ef --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/ingots/dark_steel.json @@ -0,0 +1,5 @@ +{ + "values": [ + "enderio:dark_steel_ingot" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/ingots/end_steel.json b/src/generated/resources/data/forge/tags/items/ingots/end_steel.json new file mode 100644 index 0000000000..ce310641e1 --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/ingots/end_steel.json @@ -0,0 +1,5 @@ +{ + "values": [ + "enderio:end_steel_ingot" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/ingots/energetic_alloy.json b/src/generated/resources/data/forge/tags/items/ingots/energetic_alloy.json new file mode 100644 index 0000000000..464ab21a5d --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/ingots/energetic_alloy.json @@ -0,0 +1,5 @@ +{ + "values": [ + "enderio:energetic_alloy_ingot" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/ingots/pulsating_alloy.json b/src/generated/resources/data/forge/tags/items/ingots/pulsating_alloy.json new file mode 100644 index 0000000000..038a55a17c --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/ingots/pulsating_alloy.json @@ -0,0 +1,5 @@ +{ + "values": [ + "enderio:pulsating_alloy_ingot" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/ingots/redstone_alloy.json b/src/generated/resources/data/forge/tags/items/ingots/redstone_alloy.json new file mode 100644 index 0000000000..721be9ead2 --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/ingots/redstone_alloy.json @@ -0,0 +1,5 @@ +{ + "values": [ + "enderio:redstone_alloy_ingot" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/ingots/soularium.json b/src/generated/resources/data/forge/tags/items/ingots/soularium.json new file mode 100644 index 0000000000..0ed97b2137 --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/ingots/soularium.json @@ -0,0 +1,5 @@ +{ + "values": [ + "enderio:soularium_ingot" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/ingots/vibrant_alloy.json b/src/generated/resources/data/forge/tags/items/ingots/vibrant_alloy.json new file mode 100644 index 0000000000..23563aa461 --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/ingots/vibrant_alloy.json @@ -0,0 +1,5 @@ +{ + "values": [ + "enderio:vibrant_alloy_ingot" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/nuggets.json b/src/generated/resources/data/forge/tags/items/nuggets.json new file mode 100644 index 0000000000..68c32de26f --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/nuggets.json @@ -0,0 +1,13 @@ +{ + "values": [ + "#forge:nuggets/conductive_alloy", + "#forge:nuggets/copper_alloy", + "#forge:nuggets/dark_steel", + "#forge:nuggets/end_steel", + "#forge:nuggets/energetic_alloy", + "#forge:nuggets/pulsating_alloy", + "#forge:nuggets/redstone_alloy", + "#forge:nuggets/soularium", + "#forge:nuggets/vibrant_alloy" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/nuggets/conductive_alloy.json b/src/generated/resources/data/forge/tags/items/nuggets/conductive_alloy.json new file mode 100644 index 0000000000..ee85d67bc3 --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/nuggets/conductive_alloy.json @@ -0,0 +1,5 @@ +{ + "values": [ + "enderio:conductive_alloy_nugget" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/nuggets/copper_alloy.json b/src/generated/resources/data/forge/tags/items/nuggets/copper_alloy.json new file mode 100644 index 0000000000..ed3061754a --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/nuggets/copper_alloy.json @@ -0,0 +1,5 @@ +{ + "values": [ + "enderio:copper_alloy_nugget" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/nuggets/dark_steel.json b/src/generated/resources/data/forge/tags/items/nuggets/dark_steel.json new file mode 100644 index 0000000000..c82652d355 --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/nuggets/dark_steel.json @@ -0,0 +1,5 @@ +{ + "values": [ + "enderio:dark_steel_nugget" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/nuggets/end_steel.json b/src/generated/resources/data/forge/tags/items/nuggets/end_steel.json new file mode 100644 index 0000000000..4ccf3091dd --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/nuggets/end_steel.json @@ -0,0 +1,5 @@ +{ + "values": [ + "enderio:end_steel_nugget" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/nuggets/energetic_alloy.json b/src/generated/resources/data/forge/tags/items/nuggets/energetic_alloy.json new file mode 100644 index 0000000000..a8b645414f --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/nuggets/energetic_alloy.json @@ -0,0 +1,5 @@ +{ + "values": [ + "enderio:energetic_alloy_nugget" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/nuggets/pulsating_alloy.json b/src/generated/resources/data/forge/tags/items/nuggets/pulsating_alloy.json new file mode 100644 index 0000000000..3c40d0efe3 --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/nuggets/pulsating_alloy.json @@ -0,0 +1,5 @@ +{ + "values": [ + "enderio:pulsating_alloy_nugget" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/nuggets/redstone_alloy.json b/src/generated/resources/data/forge/tags/items/nuggets/redstone_alloy.json new file mode 100644 index 0000000000..7a162942e7 --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/nuggets/redstone_alloy.json @@ -0,0 +1,5 @@ +{ + "values": [ + "enderio:redstone_alloy_nugget" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/nuggets/soularium.json b/src/generated/resources/data/forge/tags/items/nuggets/soularium.json new file mode 100644 index 0000000000..90e33134ab --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/nuggets/soularium.json @@ -0,0 +1,5 @@ +{ + "values": [ + "enderio:soularium_nugget" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/nuggets/vibrant_alloy.json b/src/generated/resources/data/forge/tags/items/nuggets/vibrant_alloy.json new file mode 100644 index 0000000000..c5c267727a --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/nuggets/vibrant_alloy.json @@ -0,0 +1,5 @@ +{ + "values": [ + "enderio:vibrant_alloy_nugget" + ] +} \ No newline at end of file diff --git a/src/main/java/com/enderio/base/common/init/EIOItems.java b/src/main/java/com/enderio/base/common/init/EIOItems.java index 696ad460b9..91d074bbaf 100644 --- a/src/main/java/com/enderio/base/common/init/EIOItems.java +++ b/src/main/java/com/enderio/base/common/init/EIOItems.java @@ -31,25 +31,25 @@ public class EIOItems { // region Alloys - public static final ItemEntry COPPER_ALLOY_INGOT = materialItem("copper_alloy_ingot").register(); - public static final ItemEntry ENERGETIC_ALLOY_INGOT = materialItem("energetic_alloy_ingot").register(); - public static final ItemEntry VIBRANT_ALLOY_INGOT = materialItem("vibrant_alloy_ingot").register(); - public static final ItemEntry REDSTONE_ALLOY_INGOT = materialItem("redstone_alloy_ingot").register(); - public static final ItemEntry CONDUCTIVE_ALLOY_INGOT = materialItem("conductive_alloy_ingot").register(); - public static final ItemEntry PULSATING_ALLOY_INGOT = materialItem("pulsating_alloy_ingot").register(); - public static final ItemEntry DARK_STEEL_INGOT = materialItem("dark_steel_ingot").register(); - public static final ItemEntry SOULARIUM_INGOT = materialItem("soularium_ingot").register(); - public static final ItemEntry END_STEEL_INGOT = materialItem("end_steel_ingot").register(); - - public static final ItemEntry COPPER_ALLOY_NUGGET = materialItem("copper_alloy_nugget").register(); - public static final ItemEntry ENERGETIC_ALLOY_NUGGET = materialItem("energetic_alloy_nugget").register(); - public static final ItemEntry VIBRANT_ALLOY_NUGGET = materialItem("vibrant_alloy_nugget").register(); - public static final ItemEntry REDSTONE_ALLOY_NUGGET = materialItem("redstone_alloy_nugget").register(); - public static final ItemEntry CONDUCTIVE_ALLOY_NUGGET = materialItem("conductive_alloy_nugget").register(); - public static final ItemEntry PULSATING_ALLOY_NUGGET = materialItem("pulsating_alloy_nugget").register(); - public static final ItemEntry DARK_STEEL_NUGGET = materialItem("dark_steel_nugget").register(); - public static final ItemEntry SOULARIUM_NUGGET = materialItem("soularium_nugget").register(); - public static final ItemEntry END_STEEL_NUGGET = materialItem("end_steel_nugget").register(); + public static final ItemEntry COPPER_ALLOY_INGOT = materialItem("copper_alloy_ingot").tag(EIOTags.Items.INGOTS_COPPER_ALLOY).register(); + public static final ItemEntry ENERGETIC_ALLOY_INGOT = materialItem("energetic_alloy_ingot").tag(EIOTags.Items.INGOTS_ENERGETIC_ALLOY).register(); + public static final ItemEntry VIBRANT_ALLOY_INGOT = materialItem("vibrant_alloy_ingot").tag(EIOTags.Items.INGOTS_VIBRANT_ALLOY).register(); + public static final ItemEntry REDSTONE_ALLOY_INGOT = materialItem("redstone_alloy_ingot").tag(EIOTags.Items.INGOTS_REDSTONE_ALLOY).register(); + public static final ItemEntry CONDUCTIVE_ALLOY_INGOT = materialItem("conductive_alloy_ingot").tag(EIOTags.Items.INGOTS_CONDUCTIVE_ALLOY).register(); + public static final ItemEntry PULSATING_ALLOY_INGOT = materialItem("pulsating_alloy_ingot").tag(EIOTags.Items.INGOTS_PULSATING_ALLOY).register(); + public static final ItemEntry DARK_STEEL_INGOT = materialItem("dark_steel_ingot").tag(EIOTags.Items.INGOTS_DARK_STEEL).register(); + public static final ItemEntry SOULARIUM_INGOT = materialItem("soularium_ingot").tag(EIOTags.Items.INGOTS_SOULARIUM).register(); + public static final ItemEntry END_STEEL_INGOT = materialItem("end_steel_ingot").tag(EIOTags.Items.INGOTS_END_STEEL).register(); + + public static final ItemEntry COPPER_ALLOY_NUGGET = materialItem("copper_alloy_nugget").tag(EIOTags.Items.NUGGETS_COPPER_ALLOY).register(); + public static final ItemEntry ENERGETIC_ALLOY_NUGGET = materialItem("energetic_alloy_nugget").tag(EIOTags.Items.NUGGETS_ENERGETIC_ALLOY).register(); + public static final ItemEntry VIBRANT_ALLOY_NUGGET = materialItem("vibrant_alloy_nugget").tag(EIOTags.Items.NUGGETS_VIBRANT_ALLOY).register(); + public static final ItemEntry REDSTONE_ALLOY_NUGGET = materialItem("redstone_alloy_nugget").tag(EIOTags.Items.NUGGETS_REDSTONE_ALLOY).register(); + public static final ItemEntry CONDUCTIVE_ALLOY_NUGGET = materialItem("conductive_alloy_nugget").tag(EIOTags.Items.NUGGETS_CONDUCTIVE_ALLOY).register(); + public static final ItemEntry PULSATING_ALLOY_NUGGET = materialItem("pulsating_alloy_nugget").tag(EIOTags.Items.NUGGETS_PULSATING_ALLOY).register(); + public static final ItemEntry DARK_STEEL_NUGGET = materialItem("dark_steel_nugget").tag(EIOTags.Items.NUGGETS_DARK_STEEL).register(); + public static final ItemEntry SOULARIUM_NUGGET = materialItem("soularium_nugget").tag(EIOTags.Items.NUGGETS_SOULARIUM).register(); + public static final ItemEntry END_STEEL_NUGGET = materialItem("end_steel_nugget").tag(EIOTags.Items.NUGGETS_END_STEEL).register(); // endregion diff --git a/src/main/java/com/enderio/base/common/tag/EIOTags.java b/src/main/java/com/enderio/base/common/tag/EIOTags.java index 3dae278489..107105e1cd 100644 --- a/src/main/java/com/enderio/base/common/tag/EIOTags.java +++ b/src/main/java/com/enderio/base/common/tag/EIOTags.java @@ -47,6 +47,26 @@ private static void init() {} public static final TagKey DUSTS_QUARTZ = ItemTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "dusts/quartz")); public static final TagKey DUSTS_SULFUR = ItemTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "dusts/sulfur")); + public static final TagKey INGOTS_CONDUCTIVE_ALLOY = ItemTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "ingots/conductive_alloy")); + public static final TagKey INGOTS_COPPER_ALLOY = ItemTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "ingots/copper_alloy")); + public static final TagKey INGOTS_DARK_STEEL = ItemTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "ingots/dark_steel")); + public static final TagKey INGOTS_END_STEEL = ItemTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "ingots/end_steel")); + public static final TagKey INGOTS_ENERGETIC_ALLOY = ItemTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "ingots/energetic_alloy")); + public static final TagKey INGOTS_PULSATING_ALLOY = ItemTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "ingots/pulsating_alloy")); + public static final TagKey INGOTS_REDSTONE_ALLOY = ItemTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "ingots/redstone_alloy")); + public static final TagKey INGOTS_SOULARIUM = ItemTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "ingots/soularium")); + public static final TagKey INGOTS_VIBRANT_ALLOY = ItemTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "ingots/vibrant_alloy")); + + public static final TagKey NUGGETS_CONDUCTIVE_ALLOY = ItemTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "nuggets/conductive_alloy")); + public static final TagKey NUGGETS_COPPER_ALLOY = ItemTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "nuggets/copper_alloy")); + public static final TagKey NUGGETS_DARK_STEEL = ItemTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "nuggets/dark_steel")); + public static final TagKey NUGGETS_END_STEEL = ItemTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "nuggets/end_steel")); + public static final TagKey NUGGETS_ENERGETIC_ALLOY = ItemTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "nuggets/energetic_alloy")); + public static final TagKey NUGGETS_PULSATING_ALLOY = ItemTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "nuggets/pulsating_alloy")); + public static final TagKey NUGGETS_REDSTONE_ALLOY = ItemTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "nuggets/redstone_alloy")); + public static final TagKey NUGGETS_SOULARIUM = ItemTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "nuggets/soularium")); + public static final TagKey NUGGETS_VIBRANT_ALLOY = ItemTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "nuggets/vibrant_alloy")); + public static final TagKey INSULATION_METAL = ItemTags.create(EnderIO.loc("insulation_metals")); public static final TagKey SILICON = ItemTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "silicon")); diff --git a/src/main/java/com/enderio/base/data/tags/EIOItemTagsProvider.java b/src/main/java/com/enderio/base/data/tags/EIOItemTagsProvider.java index 706811b0a6..3061fa300c 100644 --- a/src/main/java/com/enderio/base/data/tags/EIOItemTagsProvider.java +++ b/src/main/java/com/enderio/base/data/tags/EIOItemTagsProvider.java @@ -24,6 +24,8 @@ protected void addTags(HolderLookup.Provider pProvider) { //copy(EIOTags.Blocks.CLEAR_GLASS, EIOTags.Items.CLEAR_GLASS); //copy(EIOTags.Blocks.FUSED_QUARTZ, EIOTags.Items.FUSED_QUARTZ); tag(Tags.Items.DUSTS).addTag(EIOTags.Items.DUSTS_COAL).addTag(EIOTags.Items.DUSTS_LAPIS).addTag(EIOTags.Items.DUSTS_QUARTZ).addTag(EIOTags.Items.DUSTS_IRON).addTag(EIOTags.Items.DUSTS_GOLD).addTag(EIOTags.Items.DUSTS_COPPER).addTag(EIOTags.Items.DUSTS_TIN).addTag(EIOTags.Items.DUSTS_ENDER).addTag(EIOTags.Items.DUSTS_OBSIDIAN).addTag(EIOTags.Items.DUSTS_COBALT); + tag(Tags.Items.INGOTS).addTag(EIOTags.Items.INGOTS_CONDUCTIVE_ALLOY).addTag(EIOTags.Items.INGOTS_COPPER_ALLOY).addTag(EIOTags.Items.INGOTS_DARK_STEEL).addTag(EIOTags.Items.INGOTS_END_STEEL).addTag(EIOTags.Items.INGOTS_ENERGETIC_ALLOY).addTag(EIOTags.Items.INGOTS_PULSATING_ALLOY).addTag(EIOTags.Items.INGOTS_REDSTONE_ALLOY).addTag(EIOTags.Items.INGOTS_SOULARIUM).addTag(EIOTags.Items.INGOTS_VIBRANT_ALLOY); + tag(Tags.Items.NUGGETS).addTag(EIOTags.Items.NUGGETS_CONDUCTIVE_ALLOY).addTag(EIOTags.Items.NUGGETS_COPPER_ALLOY).addTag(EIOTags.Items.NUGGETS_DARK_STEEL).addTag(EIOTags.Items.NUGGETS_END_STEEL).addTag(EIOTags.Items.NUGGETS_ENERGETIC_ALLOY).addTag(EIOTags.Items.NUGGETS_PULSATING_ALLOY).addTag(EIOTags.Items.NUGGETS_REDSTONE_ALLOY).addTag(EIOTags.Items.NUGGETS_SOULARIUM).addTag(EIOTags.Items.NUGGETS_VIBRANT_ALLOY); tag(EIOTags.Items.GEARS).addTag(EIOTags.Items.GEARS_WOOD).addTag(EIOTags.Items.GEARS_STONE).addTag(EIOTags.Items.GEARS_IRON).addTag(EIOTags.Items.GEARS_VIBRANT).addTag(EIOTags.Items.GEARS_ENERGIZED).addTag(EIOTags.Items.GEARS_DARK_STEEL); tag(EIOTags.Items.INSULATION_METAL).addTag(EIOTags.Items.DUSTS_IRON).addTag(EIOTags.Items.DUSTS_TIN); } From 33208ff530289d64e48f9c7e38d36d9779768f23 Mon Sep 17 00:00:00 2001 From: Reece Mackie <20544390+Rover656@users.noreply.github.com> Date: Sat, 5 Aug 2023 22:54:29 +0100 Subject: [PATCH 065/154] Fix IO Overlay not rendering Also fixes logspam from bad blocks.json atlas entry. --- .../enderio/blockstates/alloy_smelter.json | 16 ++++++------ .../assets/enderio/blockstates/crafter.json | 16 ++++++------ .../assets/enderio/blockstates/enchanter.json | 8 +++--- .../enderio/blockstates/impulse_hopper.json | 16 ++++++------ .../enderio/blockstates/painting_machine.json | 16 ++++++------ .../enderio/blockstates/powered_spawner.json | 16 ++++++------ .../blockstates/primitive_alloy_smelter.json | 16 ++++++------ .../assets/enderio/blockstates/sag_mill.json | 16 ++++++------ .../enderio/blockstates/slice_and_splice.json | 16 ++++++------ .../enderio/blockstates/soul_binder.json | 16 ++++++------ .../blockstates/stirling_generator.json | 16 ++++++------ .../enderio/blockstates/wired_charger.json | 8 +++--- .../models/block/alloy_smelter_combined.json | 16 ++++++++++++ .../models/block/crafter_combined.json | 16 ++++++++++++ .../models/block/enchanter_combined.json | 16 ++++++++++++ .../models/block/impulse_hopper_combined.json | 16 ++++++++++++ .../block/painting_machine_combined.json | 16 ++++++++++++ .../block/powered_spawner_combined.json | 16 ++++++++++++ .../primitive_alloy_smelter_combined.json | 16 ++++++++++++ .../models/block/sag_mill_combined.json | 16 ++++++++++++ .../block/slice_and_splice_combined.json | 16 ++++++++++++ .../models/block/soul_binder_combined.json | 16 ++++++++++++ .../block/stirling_generator_combined.json | 16 ++++++++++++ .../models/block/wired_charger_combined.json | 16 ++++++++++++ .../machines/data/model/MachineModelUtil.java | 25 +++++++++++++------ .../assets/minecraft/atlases/blocks.json | 9 ------- 26 files changed, 298 insertions(+), 104 deletions(-) create mode 100644 src/generated/resources/assets/enderio/models/block/alloy_smelter_combined.json create mode 100644 src/generated/resources/assets/enderio/models/block/crafter_combined.json create mode 100644 src/generated/resources/assets/enderio/models/block/enchanter_combined.json create mode 100644 src/generated/resources/assets/enderio/models/block/impulse_hopper_combined.json create mode 100644 src/generated/resources/assets/enderio/models/block/painting_machine_combined.json create mode 100644 src/generated/resources/assets/enderio/models/block/powered_spawner_combined.json create mode 100644 src/generated/resources/assets/enderio/models/block/primitive_alloy_smelter_combined.json create mode 100644 src/generated/resources/assets/enderio/models/block/sag_mill_combined.json create mode 100644 src/generated/resources/assets/enderio/models/block/slice_and_splice_combined.json create mode 100644 src/generated/resources/assets/enderio/models/block/soul_binder_combined.json create mode 100644 src/generated/resources/assets/enderio/models/block/stirling_generator_combined.json create mode 100644 src/generated/resources/assets/enderio/models/block/wired_charger_combined.json delete mode 100644 src/main/resources/assets/minecraft/atlases/blocks.json diff --git a/src/generated/resources/assets/enderio/blockstates/alloy_smelter.json b/src/generated/resources/assets/enderio/blockstates/alloy_smelter.json index b68887128c..cdd8df0031 100644 --- a/src/generated/resources/assets/enderio/blockstates/alloy_smelter.json +++ b/src/generated/resources/assets/enderio/blockstates/alloy_smelter.json @@ -1,33 +1,33 @@ { "variants": { "facing=east,powered=false": { - "model": "enderio:block/alloy_smelter", + "model": "enderio:block/alloy_smelter_combined", "y": 90 }, "facing=east,powered=true": { - "model": "enderio:block/alloy_smelter_active", + "model": "enderio:block/alloy_smelter_combined", "y": 90 }, "facing=north,powered=false": { - "model": "enderio:block/alloy_smelter" + "model": "enderio:block/alloy_smelter_combined" }, "facing=north,powered=true": { - "model": "enderio:block/alloy_smelter_active" + "model": "enderio:block/alloy_smelter_combined" }, "facing=south,powered=false": { - "model": "enderio:block/alloy_smelter", + "model": "enderio:block/alloy_smelter_combined", "y": 180 }, "facing=south,powered=true": { - "model": "enderio:block/alloy_smelter_active", + "model": "enderio:block/alloy_smelter_combined", "y": 180 }, "facing=west,powered=false": { - "model": "enderio:block/alloy_smelter", + "model": "enderio:block/alloy_smelter_combined", "y": 270 }, "facing=west,powered=true": { - "model": "enderio:block/alloy_smelter_active", + "model": "enderio:block/alloy_smelter_combined", "y": 270 } } diff --git a/src/generated/resources/assets/enderio/blockstates/crafter.json b/src/generated/resources/assets/enderio/blockstates/crafter.json index fb9e51b999..70d181f921 100644 --- a/src/generated/resources/assets/enderio/blockstates/crafter.json +++ b/src/generated/resources/assets/enderio/blockstates/crafter.json @@ -1,33 +1,33 @@ { "variants": { "facing=east,powered=false": { - "model": "enderio:block/crafter", + "model": "enderio:block/crafter_combined", "y": 90 }, "facing=east,powered=true": { - "model": "enderio:block/crafter_active", + "model": "enderio:block/crafter_combined", "y": 90 }, "facing=north,powered=false": { - "model": "enderio:block/crafter" + "model": "enderio:block/crafter_combined" }, "facing=north,powered=true": { - "model": "enderio:block/crafter_active" + "model": "enderio:block/crafter_combined" }, "facing=south,powered=false": { - "model": "enderio:block/crafter", + "model": "enderio:block/crafter_combined", "y": 180 }, "facing=south,powered=true": { - "model": "enderio:block/crafter_active", + "model": "enderio:block/crafter_combined", "y": 180 }, "facing=west,powered=false": { - "model": "enderio:block/crafter", + "model": "enderio:block/crafter_combined", "y": 270 }, "facing=west,powered=true": { - "model": "enderio:block/crafter_active", + "model": "enderio:block/crafter_combined", "y": 270 } } diff --git a/src/generated/resources/assets/enderio/blockstates/enchanter.json b/src/generated/resources/assets/enderio/blockstates/enchanter.json index ace630d30a..f8a72a1760 100644 --- a/src/generated/resources/assets/enderio/blockstates/enchanter.json +++ b/src/generated/resources/assets/enderio/blockstates/enchanter.json @@ -1,18 +1,18 @@ { "variants": { "facing=east": { - "model": "enderio:block/enchanter", + "model": "enderio:block/enchanter_combined", "y": 90 }, "facing=north": { - "model": "enderio:block/enchanter" + "model": "enderio:block/enchanter_combined" }, "facing=south": { - "model": "enderio:block/enchanter", + "model": "enderio:block/enchanter_combined", "y": 180 }, "facing=west": { - "model": "enderio:block/enchanter", + "model": "enderio:block/enchanter_combined", "y": 270 } } diff --git a/src/generated/resources/assets/enderio/blockstates/impulse_hopper.json b/src/generated/resources/assets/enderio/blockstates/impulse_hopper.json index 18d7205db2..9bd4483fe0 100644 --- a/src/generated/resources/assets/enderio/blockstates/impulse_hopper.json +++ b/src/generated/resources/assets/enderio/blockstates/impulse_hopper.json @@ -1,33 +1,33 @@ { "variants": { "facing=east,powered=false": { - "model": "enderio:block/impulse_hopper", + "model": "enderio:block/impulse_hopper_combined", "y": 90 }, "facing=east,powered=true": { - "model": "enderio:block/impulse_hopper_active", + "model": "enderio:block/impulse_hopper_combined", "y": 90 }, "facing=north,powered=false": { - "model": "enderio:block/impulse_hopper" + "model": "enderio:block/impulse_hopper_combined" }, "facing=north,powered=true": { - "model": "enderio:block/impulse_hopper_active" + "model": "enderio:block/impulse_hopper_combined" }, "facing=south,powered=false": { - "model": "enderio:block/impulse_hopper", + "model": "enderio:block/impulse_hopper_combined", "y": 180 }, "facing=south,powered=true": { - "model": "enderio:block/impulse_hopper_active", + "model": "enderio:block/impulse_hopper_combined", "y": 180 }, "facing=west,powered=false": { - "model": "enderio:block/impulse_hopper", + "model": "enderio:block/impulse_hopper_combined", "y": 270 }, "facing=west,powered=true": { - "model": "enderio:block/impulse_hopper_active", + "model": "enderio:block/impulse_hopper_combined", "y": 270 } } diff --git a/src/generated/resources/assets/enderio/blockstates/painting_machine.json b/src/generated/resources/assets/enderio/blockstates/painting_machine.json index 11a579d4af..9b2c52edab 100644 --- a/src/generated/resources/assets/enderio/blockstates/painting_machine.json +++ b/src/generated/resources/assets/enderio/blockstates/painting_machine.json @@ -1,33 +1,33 @@ { "variants": { "facing=east,powered=false": { - "model": "enderio:block/painting_machine", + "model": "enderio:block/painting_machine_combined", "y": 90 }, "facing=east,powered=true": { - "model": "enderio:block/painting_machine_active", + "model": "enderio:block/painting_machine_combined", "y": 90 }, "facing=north,powered=false": { - "model": "enderio:block/painting_machine" + "model": "enderio:block/painting_machine_combined" }, "facing=north,powered=true": { - "model": "enderio:block/painting_machine_active" + "model": "enderio:block/painting_machine_combined" }, "facing=south,powered=false": { - "model": "enderio:block/painting_machine", + "model": "enderio:block/painting_machine_combined", "y": 180 }, "facing=south,powered=true": { - "model": "enderio:block/painting_machine_active", + "model": "enderio:block/painting_machine_combined", "y": 180 }, "facing=west,powered=false": { - "model": "enderio:block/painting_machine", + "model": "enderio:block/painting_machine_combined", "y": 270 }, "facing=west,powered=true": { - "model": "enderio:block/painting_machine_active", + "model": "enderio:block/painting_machine_combined", "y": 270 } } diff --git a/src/generated/resources/assets/enderio/blockstates/powered_spawner.json b/src/generated/resources/assets/enderio/blockstates/powered_spawner.json index a10060ddd6..c536235441 100644 --- a/src/generated/resources/assets/enderio/blockstates/powered_spawner.json +++ b/src/generated/resources/assets/enderio/blockstates/powered_spawner.json @@ -1,33 +1,33 @@ { "variants": { "facing=east,powered=false": { - "model": "enderio:block/powered_spawner", + "model": "enderio:block/powered_spawner_combined", "y": 90 }, "facing=east,powered=true": { - "model": "enderio:block/powered_spawner_active", + "model": "enderio:block/powered_spawner_combined", "y": 90 }, "facing=north,powered=false": { - "model": "enderio:block/powered_spawner" + "model": "enderio:block/powered_spawner_combined" }, "facing=north,powered=true": { - "model": "enderio:block/powered_spawner_active" + "model": "enderio:block/powered_spawner_combined" }, "facing=south,powered=false": { - "model": "enderio:block/powered_spawner", + "model": "enderio:block/powered_spawner_combined", "y": 180 }, "facing=south,powered=true": { - "model": "enderio:block/powered_spawner_active", + "model": "enderio:block/powered_spawner_combined", "y": 180 }, "facing=west,powered=false": { - "model": "enderio:block/powered_spawner", + "model": "enderio:block/powered_spawner_combined", "y": 270 }, "facing=west,powered=true": { - "model": "enderio:block/powered_spawner_active", + "model": "enderio:block/powered_spawner_combined", "y": 270 } } diff --git a/src/generated/resources/assets/enderio/blockstates/primitive_alloy_smelter.json b/src/generated/resources/assets/enderio/blockstates/primitive_alloy_smelter.json index 1f0e54b858..2aa01fed6f 100644 --- a/src/generated/resources/assets/enderio/blockstates/primitive_alloy_smelter.json +++ b/src/generated/resources/assets/enderio/blockstates/primitive_alloy_smelter.json @@ -1,33 +1,33 @@ { "variants": { "facing=east,powered=false": { - "model": "enderio:block/primitive_alloy_smelter", + "model": "enderio:block/primitive_alloy_smelter_combined", "y": 90 }, "facing=east,powered=true": { - "model": "enderio:block/primitive_alloy_smelter_active", + "model": "enderio:block/primitive_alloy_smelter_combined", "y": 90 }, "facing=north,powered=false": { - "model": "enderio:block/primitive_alloy_smelter" + "model": "enderio:block/primitive_alloy_smelter_combined" }, "facing=north,powered=true": { - "model": "enderio:block/primitive_alloy_smelter_active" + "model": "enderio:block/primitive_alloy_smelter_combined" }, "facing=south,powered=false": { - "model": "enderio:block/primitive_alloy_smelter", + "model": "enderio:block/primitive_alloy_smelter_combined", "y": 180 }, "facing=south,powered=true": { - "model": "enderio:block/primitive_alloy_smelter_active", + "model": "enderio:block/primitive_alloy_smelter_combined", "y": 180 }, "facing=west,powered=false": { - "model": "enderio:block/primitive_alloy_smelter", + "model": "enderio:block/primitive_alloy_smelter_combined", "y": 270 }, "facing=west,powered=true": { - "model": "enderio:block/primitive_alloy_smelter_active", + "model": "enderio:block/primitive_alloy_smelter_combined", "y": 270 } } diff --git a/src/generated/resources/assets/enderio/blockstates/sag_mill.json b/src/generated/resources/assets/enderio/blockstates/sag_mill.json index 4e59b5cc9b..f46593f857 100644 --- a/src/generated/resources/assets/enderio/blockstates/sag_mill.json +++ b/src/generated/resources/assets/enderio/blockstates/sag_mill.json @@ -1,33 +1,33 @@ { "variants": { "facing=east,powered=false": { - "model": "enderio:block/sag_mill", + "model": "enderio:block/sag_mill_combined", "y": 90 }, "facing=east,powered=true": { - "model": "enderio:block/sag_mill_active", + "model": "enderio:block/sag_mill_combined", "y": 90 }, "facing=north,powered=false": { - "model": "enderio:block/sag_mill" + "model": "enderio:block/sag_mill_combined" }, "facing=north,powered=true": { - "model": "enderio:block/sag_mill_active" + "model": "enderio:block/sag_mill_combined" }, "facing=south,powered=false": { - "model": "enderio:block/sag_mill", + "model": "enderio:block/sag_mill_combined", "y": 180 }, "facing=south,powered=true": { - "model": "enderio:block/sag_mill_active", + "model": "enderio:block/sag_mill_combined", "y": 180 }, "facing=west,powered=false": { - "model": "enderio:block/sag_mill", + "model": "enderio:block/sag_mill_combined", "y": 270 }, "facing=west,powered=true": { - "model": "enderio:block/sag_mill_active", + "model": "enderio:block/sag_mill_combined", "y": 270 } } diff --git a/src/generated/resources/assets/enderio/blockstates/slice_and_splice.json b/src/generated/resources/assets/enderio/blockstates/slice_and_splice.json index e68a446a56..962f5095cf 100644 --- a/src/generated/resources/assets/enderio/blockstates/slice_and_splice.json +++ b/src/generated/resources/assets/enderio/blockstates/slice_and_splice.json @@ -1,33 +1,33 @@ { "variants": { "facing=east,powered=false": { - "model": "enderio:block/slice_and_splice", + "model": "enderio:block/slice_and_splice_combined", "y": 90 }, "facing=east,powered=true": { - "model": "enderio:block/slice_and_splice_active", + "model": "enderio:block/slice_and_splice_combined", "y": 90 }, "facing=north,powered=false": { - "model": "enderio:block/slice_and_splice" + "model": "enderio:block/slice_and_splice_combined" }, "facing=north,powered=true": { - "model": "enderio:block/slice_and_splice_active" + "model": "enderio:block/slice_and_splice_combined" }, "facing=south,powered=false": { - "model": "enderio:block/slice_and_splice", + "model": "enderio:block/slice_and_splice_combined", "y": 180 }, "facing=south,powered=true": { - "model": "enderio:block/slice_and_splice_active", + "model": "enderio:block/slice_and_splice_combined", "y": 180 }, "facing=west,powered=false": { - "model": "enderio:block/slice_and_splice", + "model": "enderio:block/slice_and_splice_combined", "y": 270 }, "facing=west,powered=true": { - "model": "enderio:block/slice_and_splice_active", + "model": "enderio:block/slice_and_splice_combined", "y": 270 } } diff --git a/src/generated/resources/assets/enderio/blockstates/soul_binder.json b/src/generated/resources/assets/enderio/blockstates/soul_binder.json index 354fa30eae..904b0462bf 100644 --- a/src/generated/resources/assets/enderio/blockstates/soul_binder.json +++ b/src/generated/resources/assets/enderio/blockstates/soul_binder.json @@ -1,33 +1,33 @@ { "variants": { "facing=east,powered=false": { - "model": "enderio:block/soul_binder", + "model": "enderio:block/soul_binder_combined", "y": 90 }, "facing=east,powered=true": { - "model": "enderio:block/soul_binder_active", + "model": "enderio:block/soul_binder_combined", "y": 90 }, "facing=north,powered=false": { - "model": "enderio:block/soul_binder" + "model": "enderio:block/soul_binder_combined" }, "facing=north,powered=true": { - "model": "enderio:block/soul_binder_active" + "model": "enderio:block/soul_binder_combined" }, "facing=south,powered=false": { - "model": "enderio:block/soul_binder", + "model": "enderio:block/soul_binder_combined", "y": 180 }, "facing=south,powered=true": { - "model": "enderio:block/soul_binder_active", + "model": "enderio:block/soul_binder_combined", "y": 180 }, "facing=west,powered=false": { - "model": "enderio:block/soul_binder", + "model": "enderio:block/soul_binder_combined", "y": 270 }, "facing=west,powered=true": { - "model": "enderio:block/soul_binder_active", + "model": "enderio:block/soul_binder_combined", "y": 270 } } diff --git a/src/generated/resources/assets/enderio/blockstates/stirling_generator.json b/src/generated/resources/assets/enderio/blockstates/stirling_generator.json index e89db82ab3..73e8660da5 100644 --- a/src/generated/resources/assets/enderio/blockstates/stirling_generator.json +++ b/src/generated/resources/assets/enderio/blockstates/stirling_generator.json @@ -1,33 +1,33 @@ { "variants": { "facing=east,powered=false": { - "model": "enderio:block/stirling_generator", + "model": "enderio:block/stirling_generator_combined", "y": 90 }, "facing=east,powered=true": { - "model": "enderio:block/stirling_generator_active", + "model": "enderio:block/stirling_generator_combined", "y": 90 }, "facing=north,powered=false": { - "model": "enderio:block/stirling_generator" + "model": "enderio:block/stirling_generator_combined" }, "facing=north,powered=true": { - "model": "enderio:block/stirling_generator_active" + "model": "enderio:block/stirling_generator_combined" }, "facing=south,powered=false": { - "model": "enderio:block/stirling_generator", + "model": "enderio:block/stirling_generator_combined", "y": 180 }, "facing=south,powered=true": { - "model": "enderio:block/stirling_generator_active", + "model": "enderio:block/stirling_generator_combined", "y": 180 }, "facing=west,powered=false": { - "model": "enderio:block/stirling_generator", + "model": "enderio:block/stirling_generator_combined", "y": 270 }, "facing=west,powered=true": { - "model": "enderio:block/stirling_generator_active", + "model": "enderio:block/stirling_generator_combined", "y": 270 } } diff --git a/src/generated/resources/assets/enderio/blockstates/wired_charger.json b/src/generated/resources/assets/enderio/blockstates/wired_charger.json index dc0c575557..a750cf2e23 100644 --- a/src/generated/resources/assets/enderio/blockstates/wired_charger.json +++ b/src/generated/resources/assets/enderio/blockstates/wired_charger.json @@ -1,18 +1,18 @@ { "variants": { "facing=east": { - "model": "enderio:block/wired_charger", + "model": "enderio:block/wired_charger_combined", "y": 90 }, "facing=north": { - "model": "enderio:block/wired_charger" + "model": "enderio:block/wired_charger_combined" }, "facing=south": { - "model": "enderio:block/wired_charger", + "model": "enderio:block/wired_charger_combined", "y": 180 }, "facing=west": { - "model": "enderio:block/wired_charger", + "model": "enderio:block/wired_charger_combined", "y": 270 } } diff --git a/src/generated/resources/assets/enderio/models/block/alloy_smelter_combined.json b/src/generated/resources/assets/enderio/models/block/alloy_smelter_combined.json new file mode 100644 index 0000000000..f502451581 --- /dev/null +++ b/src/generated/resources/assets/enderio/models/block/alloy_smelter_combined.json @@ -0,0 +1,16 @@ +{ + "parent": "minecraft:block/block", + "children": { + "machine": { + "parent": "enderio:block/alloy_smelter_active" + }, + "overlay": { + "parent": "enderio:block/io_overlay" + } + }, + "item_render_order": [ + "machine", + "overlay" + ], + "loader": "forge:composite" +} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/crafter_combined.json b/src/generated/resources/assets/enderio/models/block/crafter_combined.json new file mode 100644 index 0000000000..295d3c2a73 --- /dev/null +++ b/src/generated/resources/assets/enderio/models/block/crafter_combined.json @@ -0,0 +1,16 @@ +{ + "parent": "minecraft:block/block", + "children": { + "machine": { + "parent": "enderio:block/crafter_active" + }, + "overlay": { + "parent": "enderio:block/io_overlay" + } + }, + "item_render_order": [ + "machine", + "overlay" + ], + "loader": "forge:composite" +} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/enchanter_combined.json b/src/generated/resources/assets/enderio/models/block/enchanter_combined.json new file mode 100644 index 0000000000..d713debf9b --- /dev/null +++ b/src/generated/resources/assets/enderio/models/block/enchanter_combined.json @@ -0,0 +1,16 @@ +{ + "parent": "minecraft:block/block", + "children": { + "machine": { + "parent": "enderio:block/enchanter" + }, + "overlay": { + "parent": "enderio:block/io_overlay" + } + }, + "item_render_order": [ + "machine", + "overlay" + ], + "loader": "forge:composite" +} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/impulse_hopper_combined.json b/src/generated/resources/assets/enderio/models/block/impulse_hopper_combined.json new file mode 100644 index 0000000000..14df11ecfe --- /dev/null +++ b/src/generated/resources/assets/enderio/models/block/impulse_hopper_combined.json @@ -0,0 +1,16 @@ +{ + "parent": "minecraft:block/block", + "children": { + "machine": { + "parent": "enderio:block/impulse_hopper_active" + }, + "overlay": { + "parent": "enderio:block/io_overlay" + } + }, + "item_render_order": [ + "machine", + "overlay" + ], + "loader": "forge:composite" +} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/painting_machine_combined.json b/src/generated/resources/assets/enderio/models/block/painting_machine_combined.json new file mode 100644 index 0000000000..cba6570292 --- /dev/null +++ b/src/generated/resources/assets/enderio/models/block/painting_machine_combined.json @@ -0,0 +1,16 @@ +{ + "parent": "minecraft:block/block", + "children": { + "machine": { + "parent": "enderio:block/painting_machine_active" + }, + "overlay": { + "parent": "enderio:block/io_overlay" + } + }, + "item_render_order": [ + "machine", + "overlay" + ], + "loader": "forge:composite" +} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/powered_spawner_combined.json b/src/generated/resources/assets/enderio/models/block/powered_spawner_combined.json new file mode 100644 index 0000000000..f7f2eeb902 --- /dev/null +++ b/src/generated/resources/assets/enderio/models/block/powered_spawner_combined.json @@ -0,0 +1,16 @@ +{ + "parent": "minecraft:block/block", + "children": { + "machine": { + "parent": "enderio:block/powered_spawner_active" + }, + "overlay": { + "parent": "enderio:block/io_overlay" + } + }, + "item_render_order": [ + "machine", + "overlay" + ], + "loader": "forge:composite" +} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/primitive_alloy_smelter_combined.json b/src/generated/resources/assets/enderio/models/block/primitive_alloy_smelter_combined.json new file mode 100644 index 0000000000..20fc8eac05 --- /dev/null +++ b/src/generated/resources/assets/enderio/models/block/primitive_alloy_smelter_combined.json @@ -0,0 +1,16 @@ +{ + "parent": "minecraft:block/block", + "children": { + "machine": { + "parent": "enderio:block/primitive_alloy_smelter_active" + }, + "overlay": { + "parent": "enderio:block/io_overlay" + } + }, + "item_render_order": [ + "machine", + "overlay" + ], + "loader": "forge:composite" +} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/sag_mill_combined.json b/src/generated/resources/assets/enderio/models/block/sag_mill_combined.json new file mode 100644 index 0000000000..efba14f64a --- /dev/null +++ b/src/generated/resources/assets/enderio/models/block/sag_mill_combined.json @@ -0,0 +1,16 @@ +{ + "parent": "minecraft:block/block", + "children": { + "machine": { + "parent": "enderio:block/sag_mill_active" + }, + "overlay": { + "parent": "enderio:block/io_overlay" + } + }, + "item_render_order": [ + "machine", + "overlay" + ], + "loader": "forge:composite" +} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/slice_and_splice_combined.json b/src/generated/resources/assets/enderio/models/block/slice_and_splice_combined.json new file mode 100644 index 0000000000..5d663a539e --- /dev/null +++ b/src/generated/resources/assets/enderio/models/block/slice_and_splice_combined.json @@ -0,0 +1,16 @@ +{ + "parent": "minecraft:block/block", + "children": { + "machine": { + "parent": "enderio:block/slice_and_splice_active" + }, + "overlay": { + "parent": "enderio:block/io_overlay" + } + }, + "item_render_order": [ + "machine", + "overlay" + ], + "loader": "forge:composite" +} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/soul_binder_combined.json b/src/generated/resources/assets/enderio/models/block/soul_binder_combined.json new file mode 100644 index 0000000000..89e19b004c --- /dev/null +++ b/src/generated/resources/assets/enderio/models/block/soul_binder_combined.json @@ -0,0 +1,16 @@ +{ + "parent": "minecraft:block/block", + "children": { + "machine": { + "parent": "enderio:block/soul_binder_active" + }, + "overlay": { + "parent": "enderio:block/io_overlay" + } + }, + "item_render_order": [ + "machine", + "overlay" + ], + "loader": "forge:composite" +} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/stirling_generator_combined.json b/src/generated/resources/assets/enderio/models/block/stirling_generator_combined.json new file mode 100644 index 0000000000..0fa1dc49f5 --- /dev/null +++ b/src/generated/resources/assets/enderio/models/block/stirling_generator_combined.json @@ -0,0 +1,16 @@ +{ + "parent": "minecraft:block/block", + "children": { + "machine": { + "parent": "enderio:block/stirling_generator_active" + }, + "overlay": { + "parent": "enderio:block/io_overlay" + } + }, + "item_render_order": [ + "machine", + "overlay" + ], + "loader": "forge:composite" +} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/wired_charger_combined.json b/src/generated/resources/assets/enderio/models/block/wired_charger_combined.json new file mode 100644 index 0000000000..d0474b7534 --- /dev/null +++ b/src/generated/resources/assets/enderio/models/block/wired_charger_combined.json @@ -0,0 +1,16 @@ +{ + "parent": "minecraft:block/block", + "children": { + "machine": { + "parent": "enderio:block/wired_charger" + }, + "overlay": { + "parent": "enderio:block/io_overlay" + } + }, + "item_render_order": [ + "machine", + "overlay" + ], + "loader": "forge:composite" +} \ No newline at end of file diff --git a/src/machines/java/com/enderio/machines/data/model/MachineModelUtil.java b/src/machines/java/com/enderio/machines/data/model/MachineModelUtil.java index ecbf6e7448..87698ad6d0 100644 --- a/src/machines/java/com/enderio/machines/data/model/MachineModelUtil.java +++ b/src/machines/java/com/enderio/machines/data/model/MachineModelUtil.java @@ -28,7 +28,7 @@ public static void machineBlock(DataGenContext ctx, Regi // Create unpowered and powered bodies. String ns = ctx.getId().getNamespace(); String path = ctx.getId().getPath(); - machineBlock(ctx, prov, new ResourceLocation(ns, "block/" + path)); + machineBlock(ctx, prov, wrapMachineModel(ctx, prov, new ResourceLocation(ns, "block/" + path))); } public static void progressMachineBlock(DataGenContext ctx, RegistrateBlockstateProvider prov) { @@ -37,7 +37,10 @@ public static void progressMachineBlock(DataGenContext c String path = ctx.getId().getPath(); var unpowered = new ResourceLocation(ns, "block/" + path); var powered = new ResourceLocation(ns, "block/" + path + "_active"); - progressMachineBlock(ctx, prov, unpowered, powered); + + var unpoweredModel = wrapMachineModel(ctx, prov, unpowered); + var poweredModel = wrapMachineModel(ctx, prov, powered); + progressMachineBlock(ctx, prov, unpoweredModel, poweredModel); } public static void solarPanel(DataGenContext ctx, RegistrateBlockstateProvider prov, SolarPanelTier tier) { @@ -62,26 +65,34 @@ public static void solarPanel(DataGenContext ctx, Registra prov.withExistingParent(ctx.getName(), EnderIO.loc("item/photovoltaic_cell")).texture("side", "block/" + tierName + "_side").texture("panel", "block/" + tierName + "_top"); } - private static void machineBlock(DataGenContext ctx, RegistrateBlockstateProvider prov, ResourceLocation model) { + private static void machineBlock(DataGenContext ctx, RegistrateBlockstateProvider prov, ModelFile model) { prov .getVariantBuilder(ctx.get()) .forAllStates(state -> ConfiguredModel .builder() - .modelFile(prov.models().getExistingFile(model)) + .modelFile(model) .rotationY(((int) state.getValue(BlockStateProperties.HORIZONTAL_FACING).toYRot() + 180) % 360) .build()); } - private static void progressMachineBlock(DataGenContext ctx, RegistrateBlockstateProvider prov, ResourceLocation unpowered, - ResourceLocation powered) { + private static void progressMachineBlock(DataGenContext ctx, RegistrateBlockstateProvider prov, ModelFile unpowered, + ModelFile powered) { prov .getVariantBuilder(ctx.get()) .forAllStates(state -> ConfiguredModel .builder() - .modelFile(state.getValue(ProgressMachineBlock.POWERED) ? prov.models().getExistingFile(powered) : prov.models().getExistingFile(unpowered)) + .modelFile(state.getValue(ProgressMachineBlock.POWERED) ? powered : unpowered) .rotationY(((int) state.getValue(BlockStateProperties.HORIZONTAL_FACING).toYRot() + 180) % 360) .build()); } + private static ModelFile wrapMachineModel(DataGenContext ctx, RegistrateBlockstateProvider prov, ResourceLocation model) { + return prov.models().withExistingParent(ctx.getName() + "_combined", prov.mcLoc("block/block")) + .customLoader(CompositeModelBuilder::begin) + .child("machine", EIOModel.getExistingParent(prov.models(), model)) + .child("overlay", EIOModel.getExistingParent(prov.models(), EnderIO.loc("block/io_overlay"))) + .end(); + } + // endregion } diff --git a/src/main/resources/assets/minecraft/atlases/blocks.json b/src/main/resources/assets/minecraft/atlases/blocks.json deleted file mode 100644 index 2149e2145e..0000000000 --- a/src/main/resources/assets/minecraft/atlases/blocks.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "sources": [ - { - "type": "directory", - "source": "enderio:block/overlay", - "prefix": "enderio:block/overlay/" - } - ] -} From b89316a98e7759e7b63c35b9041f585a24a56094 Mon Sep 17 00:00:00 2001 From: Reece Mackie <20544390+Rover656@users.noreply.github.com> Date: Sat, 5 Aug 2023 22:54:39 +0100 Subject: [PATCH 066/154] Fix network sync (IO Config mainly) --- .../network/slot/NBTSerializingNetworkDataSlot.java | 9 +++++++-- .../core/common/network/slot/NetworkDataSlot.java | 2 +- .../common/blockentity/base/MachineBlockEntity.java | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/core/java/com/enderio/core/common/network/slot/NBTSerializingNetworkDataSlot.java b/src/core/java/com/enderio/core/common/network/slot/NBTSerializingNetworkDataSlot.java index 8ee0cdb18f..bebbdd186a 100644 --- a/src/core/java/com/enderio/core/common/network/slot/NBTSerializingNetworkDataSlot.java +++ b/src/core/java/com/enderio/core/common/network/slot/NBTSerializingNetworkDataSlot.java @@ -48,11 +48,16 @@ public void toBuffer(FriendlyByteBuf buf, T value) { } @Override - public T valueFromBuffer(FriendlyByteBuf buf) { + public void fromBuffer(FriendlyByteBuf buf) { try { - return fromBuffer.apply(buf); + fromBuffer.apply(buf); } catch (Exception e) { throw new IllegalStateException("Invalid compound tag buffer was passed over the network."); } } + + @Override + protected T valueFromBuffer(FriendlyByteBuf buf) { + return null; + } } diff --git a/src/core/java/com/enderio/core/common/network/slot/NetworkDataSlot.java b/src/core/java/com/enderio/core/common/network/slot/NetworkDataSlot.java index 22f75b6bf8..59d0d101ff 100644 --- a/src/core/java/com/enderio/core/common/network/slot/NetworkDataSlot.java +++ b/src/core/java/com/enderio/core/common/network/slot/NetworkDataSlot.java @@ -48,7 +48,7 @@ public void fromBuffer(FriendlyByteBuf buf) { public abstract void toBuffer(FriendlyByteBuf buf, T value); - public abstract T valueFromBuffer(FriendlyByteBuf buf); + protected abstract T valueFromBuffer(FriendlyByteBuf buf); public boolean needsUpdate() { T value = getter.get(); diff --git a/src/machines/java/com/enderio/machines/common/blockentity/base/MachineBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/base/MachineBlockEntity.java index 826f8b9dac..b1edfcdefa 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/base/MachineBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/base/MachineBlockEntity.java @@ -203,7 +203,7 @@ public boolean supportsMode(Direction side, IOMode mode) { } protected void onIOConfigChanged(Direction side, IOMode oldMode, IOMode newMode) { - if (level != null && level.isClientSide()) { + if (level != null && !level.isClientSide()) { clientUpdateSlot(ioConfigDataSlot, getIOConfig()); } } From f71b111127fd8ce1eae120d6f7798a25098594b8 Mon Sep 17 00:00:00 2001 From: thedarkcolour <30441001+thedarkcolour@users.noreply.github.com> Date: Sun, 6 Aug 2023 15:05:19 -0700 Subject: [PATCH 067/154] Fix normals in RenderUtil#renderFace --- .../com/enderio/core/client/RenderUtil.java | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/core/java/com/enderio/core/client/RenderUtil.java b/src/core/java/com/enderio/core/client/RenderUtil.java index 893ccf7093..325db5189c 100644 --- a/src/core/java/com/enderio/core/client/RenderUtil.java +++ b/src/core/java/com/enderio/core/client/RenderUtil.java @@ -23,26 +23,27 @@ public static void renderFace(Direction face, Matrix4f pose, Matrix3f normal, Ve renderFace(face, pose, normal, consumer, texture, x, y, z, w, h, color, LightTexture.FULL_BRIGHT); } public static void renderFace(Direction face, Matrix4f pose, Matrix3f normal, VertexConsumer consumer, TextureAtlasSprite texture, float x, float y, float z, float w, float h, int color, int light) { + // Normals are taken from Direction enum. They are necessary for proper lighting and block breaking textures switch (face) { - case DOWN -> renderFace(pose, normal, consumer, texture, color, light, x, x + w, 1.0f - z, 1.0f - z, y, y, y + h, y + h, x, x + w, y, y + h); - case UP -> renderFace(pose, normal, consumer, texture, color, light, x, x + w, z, z, y + h, y + h, y, y, x, x + w, y, y + h); - case NORTH -> renderFace(pose, normal, consumer, texture, color, light, x, x + w, y + h, y, z, z, z, z, x, x + w, y, y + h); - case SOUTH -> renderFace(pose, normal, consumer, texture, color, light, x, x + w, y, y + h, 1.0f - z, 1.0f - z, 1.0f - z, 1.0f - z, x + w, x, y + h, y); - case EAST -> renderFace(pose, normal, consumer, texture, color, light, 1.0f - z, 1.0f - z, y + h, y, x, x + w, x + w, x, x, x + w, y, y + h); - case WEST -> renderFace(pose, normal, consumer, texture, color, light, z, z, y, y + h, x, x + w, x + w, x, x + w, x, y + h, y); + case DOWN -> renderFace(pose, normal, consumer, texture, color, light, x, x + w, 1.0f - z, 1.0f - z, y, y, y + h, y + h, x, x + w, y, y + h, 0, -1, 0); + case UP -> renderFace(pose, normal, consumer, texture, color, light, x, x + w, z, z, y + h, y + h, y, y, x, x + w, y, y + h, 0, 1, 0); + case NORTH -> renderFace(pose, normal, consumer, texture, color, light, x, x + w, y + h, y, z, z, z, z, x, x + w, y, y + h, 0, 0, -1); + case SOUTH -> renderFace(pose, normal, consumer, texture, color, light, x, x + w, y, y + h, 1.0f - z, 1.0f - z, 1.0f - z, 1.0f - z, x + w, x, y + h, y, 0, 0, 1); + case EAST -> renderFace(pose, normal, consumer, texture, color, light, 1.0f - z, 1.0f - z, y + h, y, x, x + w, x + w, x, x, x + w, y, y + h, 1, 0, 0); + case WEST -> renderFace(pose, normal, consumer, texture, color, light, z, z, y, y + h, x, x + w, x + w, x, x + w, x, y + h, y, -1, 0, 0); } } - private static void renderFace(Matrix4f pose, Matrix3f normal, VertexConsumer consumer, TextureAtlasSprite texture, int color, int light, float x0, float x1, float y0, float y1, float z0, float z1, float z2, float z3, float u0, float u1, float v0, float v1) { + private static void renderFace(Matrix4f pose, Matrix3f normal, VertexConsumer consumer, TextureAtlasSprite texture, int color, int light, float x0, float x1, float y0, float y1, float z0, float z1, float z2, float z3, float u0, float u1, float v0, float v1, float normalX, float normalY, float normalZ) { float minU = u0 * texture.contents().width(); float maxU = u1 * texture.contents().width(); float minV = v0 * texture.contents().height(); float maxV = v1 * texture.contents().height(); - consumer.vertex(pose, x0, y0, z0).color(color).uv(texture.getU(minU), texture.getV(minV)).overlayCoords(OverlayTexture.NO_OVERLAY).uv2(light).normal(normal, 0.0f, 0.0f, 0.0f).endVertex(); - consumer.vertex(pose, x1, y0, z1).color(color).uv(texture.getU(maxU), texture.getV(minV)).overlayCoords(OverlayTexture.NO_OVERLAY).uv2(light).normal(normal, 0.0f, 0.0f, 0.0f).endVertex(); - consumer.vertex(pose, x1, y1, z2).color(color).uv(texture.getU(maxU), texture.getV(maxV)).overlayCoords(OverlayTexture.NO_OVERLAY).uv2(light).normal(normal, 0.0f, 0.0f, 0.0f).endVertex(); - consumer.vertex(pose, x0, y1, z3).color(color).uv(texture.getU(minU), texture.getV(maxV)).overlayCoords(OverlayTexture.NO_OVERLAY).uv2(light).normal(normal, 0.0f, 0.0f, 0.0f).endVertex(); + consumer.vertex(pose, x0, y0, z0).color(color).uv(texture.getU(minU), texture.getV(minV)).overlayCoords(OverlayTexture.NO_OVERLAY).uv2(light).normal(normal, normalX, normalY, normalZ).endVertex(); + consumer.vertex(pose, x1, y0, z1).color(color).uv(texture.getU(maxU), texture.getV(minV)).overlayCoords(OverlayTexture.NO_OVERLAY).uv2(light).normal(normal, normalX, normalY, normalZ).endVertex(); + consumer.vertex(pose, x1, y1, z2).color(color).uv(texture.getU(maxU), texture.getV(maxV)).overlayCoords(OverlayTexture.NO_OVERLAY).uv2(light).normal(normal, normalX, normalY, normalZ).endVertex(); + consumer.vertex(pose, x0, y1, z3).color(color).uv(texture.getU(minU), texture.getV(maxV)).overlayCoords(OverlayTexture.NO_OVERLAY).uv2(light).normal(normal, normalX, normalY, normalZ).endVertex(); } public static float[] unpackVertices(int[] vertices, int vertexIndex, int position, int count) { From 98e142f1c4fc53a3e0f180c86348896ff1829d3a Mon Sep 17 00:00:00 2001 From: thedarkcolour <30441001+thedarkcolour@users.noreply.github.com> Date: Sun, 6 Aug 2023 15:15:58 -0700 Subject: [PATCH 068/154] Fluid tanks emit light based on their contents --- .../com/enderio/machines/common/block/MachineBlock.java | 9 +++++++++ .../com/enderio/machines/common/init/MachineBlocks.java | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/machines/java/com/enderio/machines/common/block/MachineBlock.java b/src/machines/java/com/enderio/machines/common/block/MachineBlock.java index 8bd95823d6..bcdd25cf6e 100644 --- a/src/machines/java/com/enderio/machines/common/block/MachineBlock.java +++ b/src/machines/java/com/enderio/machines/common/block/MachineBlock.java @@ -1,5 +1,6 @@ package com.enderio.machines.common.block; +import com.enderio.machines.common.blockentity.FluidTankBlockEntity; import com.enderio.machines.common.blockentity.base.MachineBlockEntity; import com.tterrag.registrate.util.entry.BlockEntityEntry; import net.minecraft.core.BlockPos; @@ -121,4 +122,12 @@ public boolean canConnectRedstone(BlockState state, BlockGetter level, BlockPos } return super.canConnectRedstone(state, level, pos, direction); } + + @Override + public int getLightEmission(BlockState state, BlockGetter level, BlockPos pos) { + if (level.getBlockEntity(pos) instanceof FluidTankBlockEntity fluidTank) { + return fluidTank.getFluidTank().getFluid().getFluid().getFluidType().getLightLevel(); + } + return super.getLightEmission(state, level, pos); + } } diff --git a/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java b/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java index 270adfbf9c..19f8c7deb0 100644 --- a/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java +++ b/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java @@ -41,7 +41,7 @@ public class MachineBlocks { public static final BlockEntry FLUID_TANK = REGISTRATE .block("fluid_tank", props -> new MachineBlock(props, MachineBlockEntities.FLUID_TANK)) - .properties(props -> props.strength(2.5f, 8).isViewBlocking((pState, pLevel, pPos) -> false).noOcclusion()) + .properties(props -> props.strength(2.5f, 8).isViewBlocking((pState, pLevel, pPos) -> false).noOcclusion().lightLevel(state -> 1)) .loot(MachinesLootTable::copyNBT) .tag(BlockTags.NEEDS_IRON_TOOL, BlockTags.MINEABLE_WITH_PICKAXE) .blockstate((ctx, prov) -> prov.horizontalBlock(ctx.get(), prov.models() @@ -60,7 +60,7 @@ public class MachineBlocks { public static final BlockEntry PRESSURIZED_FLUID_TANK = REGISTRATE .block("pressurized_fluid_tank", props -> new MachineBlock(props, MachineBlockEntities.PRESSURIZED_FLUID_TANK)) - .properties(props -> props.strength(2.5f, 8).isViewBlocking((pState, pLevel, pPos) -> false).noOcclusion()) + .properties(props -> props.strength(2.5f, 8).isViewBlocking((pState, pLevel, pPos) -> false).noOcclusion().lightLevel(state -> 1)) .loot(MachinesLootTable::copyNBT) .tag(BlockTags.NEEDS_IRON_TOOL, BlockTags.MINEABLE_WITH_PICKAXE) .blockstate((ctx, prov) -> prov.horizontalBlock(ctx.get(), prov.models() From d7a7434ea1723eff2027ea83009f10eef458e633 Mon Sep 17 00:00:00 2001 From: thedarkcolour <30441001+thedarkcolour@users.noreply.github.com> Date: Sun, 6 Aug 2023 15:16:32 -0700 Subject: [PATCH 069/154] Tanks render fluids in Fabulous graphics + rendered fluids now respect light level --- .../rendering/blockentity/FluidTankBER.java | 27 ++++++++++--------- .../client/rendering/item/FluidTankBEWLR.java | 2 +- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/machines/java/com/enderio/machines/client/rendering/blockentity/FluidTankBER.java b/src/machines/java/com/enderio/machines/client/rendering/blockentity/FluidTankBER.java index 4be214349a..c81a4b8fbb 100644 --- a/src/machines/java/com/enderio/machines/client/rendering/blockentity/FluidTankBER.java +++ b/src/machines/java/com/enderio/machines/client/rendering/blockentity/FluidTankBER.java @@ -6,7 +6,9 @@ import com.mojang.blaze3d.vertex.VertexConsumer; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.ItemBlockRenderTypes; +import net.minecraft.client.renderer.LightTexture; import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.Sheets; import net.minecraft.client.renderer.blockentity.BlockEntityRenderer; import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; import net.minecraft.client.renderer.texture.TextureAtlasSprite; @@ -35,21 +37,22 @@ public void render(FluidTankBlockEntity blockEntity, float partialTick, PoseStac if (tank.getFluidAmount() > 0) { FluidStack fluidStack = tank.getFluid(); - // Get the preferred render buffer - VertexConsumer buffer = bufferSource.getBuffer(ItemBlockRenderTypes.getRenderLayer(fluidStack.getFluid().defaultFluidState())); + // Use entity translucent cull sheet so fluid renders in Fabulous + VertexConsumer buffer = bufferSource.getBuffer(Sheets.translucentCullBlockSheet()); // Render the fluid PoseStack.Pose last = poseStack.last(); - renderFluid(last.pose(), last.normal(), buffer, blockEntity, fluidStack.getFluid(), tank.getFluidAmount() / (float) tank.getCapacity()); + renderFluid(last.pose(), last.normal(), buffer, blockEntity, fluidStack.getFluid(), tank.getFluidAmount() / (float) tank.getCapacity(), packedLight); } } - private static void renderFluid(Matrix4f pose, Matrix3f normal, VertexConsumer consumer, BlockEntity entity, Fluid fluid, float fillAmount) { - IClientFluidTypeExtensions props = IClientFluidTypeExtensions.of(fluid); - renderFluid(pose, normal, consumer, fluid, fillAmount, props.getTintColor(null, entity.getLevel(), entity.getBlockPos())); + private static void renderFluid(Matrix4f pose, Matrix3f normal, VertexConsumer consumer, BlockEntity entity, Fluid fluid, float fillAmount, int packedLight) { + int color = IClientFluidTypeExtensions.of(fluid).getTintColor(fluid.defaultFluidState(), entity.getLevel(), entity.getBlockPos()); + //if (color == -1) color = 0xffffff; + renderFluid(pose, normal, consumer, fluid, fillAmount, color, packedLight); } - public static void renderFluid(Matrix4f pose, Matrix3f normal, VertexConsumer consumer, Fluid fluid, float fillAmount, int color) { + public static void renderFluid(Matrix4f pose, Matrix3f normal, VertexConsumer consumer, Fluid fluid, float fillAmount, int color, int packedLight) { // Get fluid texture IClientFluidTypeExtensions props = IClientFluidTypeExtensions.of(fluid); TextureAtlasSprite texture = Minecraft.getInstance().getTextureAtlas(InventoryMenu.BLOCK_ATLAS).apply(props.getStillTexture()); @@ -61,12 +64,12 @@ public static void renderFluid(Matrix4f pose, Matrix3f normal, VertexConsumer co // Top - RenderUtil.renderFace(Direction.UP, pose, normal, consumer, texture, inset, inset, inset + fluidHeight, faceSize, faceSize, color); + RenderUtil.renderFace(Direction.UP, pose, normal, consumer, texture, inset, inset, inset + fluidHeight, faceSize, faceSize, color, packedLight); // Sides - RenderUtil.renderFace(Direction.SOUTH, pose, normal, consumer, texture, inset, inset, inset, faceSize, fluidHeight, color); - RenderUtil.renderFace(Direction.NORTH, pose, normal, consumer, texture, inset, inset, inset, faceSize, fluidHeight, color); - RenderUtil.renderFace(Direction.EAST, pose, normal, consumer, texture, inset, inset, inset, faceSize, fluidHeight, color); - RenderUtil.renderFace(Direction.WEST, pose, normal, consumer, texture, inset, inset, inset, faceSize, fluidHeight, color); + RenderUtil.renderFace(Direction.SOUTH, pose, normal, consumer, texture, inset, inset, inset, faceSize, fluidHeight, color, packedLight); + RenderUtil.renderFace(Direction.NORTH, pose, normal, consumer, texture, inset, inset, inset, faceSize, fluidHeight, color, packedLight); + RenderUtil.renderFace(Direction.EAST, pose, normal, consumer, texture, inset, inset, inset, faceSize, fluidHeight, color, packedLight); + RenderUtil.renderFace(Direction.WEST, pose, normal, consumer, texture, inset, inset, inset, faceSize, fluidHeight, color, packedLight); } } diff --git a/src/machines/java/com/enderio/machines/client/rendering/item/FluidTankBEWLR.java b/src/machines/java/com/enderio/machines/client/rendering/item/FluidTankBEWLR.java index cf3ab83a5f..bf80b6eb97 100644 --- a/src/machines/java/com/enderio/machines/client/rendering/item/FluidTankBEWLR.java +++ b/src/machines/java/com/enderio/machines/client/rendering/item/FluidTankBEWLR.java @@ -64,7 +64,7 @@ public void renderByItem(ItemStack stack, ItemDisplayContext transformType, Pose PoseStack.Pose pose = poseStack.last(); IClientFluidTypeExtensions props = IClientFluidTypeExtensions.of(fluid); - FluidTankBER.renderFluid(pose.pose(), pose.normal(), fluidBuffer, fluid, amount / (float) capacity, props.getTintColor()); + FluidTankBER.renderFluid(pose.pose(), pose.normal(), fluidBuffer, fluid, amount / (float) capacity, props.getTintColor(), packedLight); } } } From 06d0850d63b166039fd5f2fbb7e7acccd1fb6d5b Mon Sep 17 00:00:00 2001 From: thedarkcolour <30441001+thedarkcolour@users.noreply.github.com> Date: Sun, 6 Aug 2023 15:23:57 -0700 Subject: [PATCH 070/154] Remove unused imports --- .../machines/client/rendering/blockentity/FluidTankBER.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/machines/java/com/enderio/machines/client/rendering/blockentity/FluidTankBER.java b/src/machines/java/com/enderio/machines/client/rendering/blockentity/FluidTankBER.java index c81a4b8fbb..a4b6adf3a2 100644 --- a/src/machines/java/com/enderio/machines/client/rendering/blockentity/FluidTankBER.java +++ b/src/machines/java/com/enderio/machines/client/rendering/blockentity/FluidTankBER.java @@ -5,8 +5,6 @@ import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.ItemBlockRenderTypes; -import net.minecraft.client.renderer.LightTexture; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.Sheets; import net.minecraft.client.renderer.blockentity.BlockEntityRenderer; From 9b2bca905ee25187bc7261393e847c5b152f5118 Mon Sep 17 00:00:00 2001 From: thedarkcolour <30441001+thedarkcolour@users.noreply.github.com> Date: Sun, 6 Aug 2023 15:43:12 -0700 Subject: [PATCH 071/154] Fix light levels not updating properly --- .../java/com/enderio/machines/common/block/MachineBlock.java | 2 +- .../machines/common/blockentity/FluidTankBlockEntity.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/machines/java/com/enderio/machines/common/block/MachineBlock.java b/src/machines/java/com/enderio/machines/common/block/MachineBlock.java index bcdd25cf6e..3750f886b4 100644 --- a/src/machines/java/com/enderio/machines/common/block/MachineBlock.java +++ b/src/machines/java/com/enderio/machines/common/block/MachineBlock.java @@ -125,7 +125,7 @@ public boolean canConnectRedstone(BlockState state, BlockGetter level, BlockPos @Override public int getLightEmission(BlockState state, BlockGetter level, BlockPos pos) { - if (level.getBlockEntity(pos) instanceof FluidTankBlockEntity fluidTank) { + if (level.getExistingBlockEntity(pos) instanceof FluidTankBlockEntity fluidTank) { return fluidTank.getFluidTank().getFluid().getFluid().getFluidType().getLightLevel(); } return super.getLightEmission(state, level, pos); diff --git a/src/machines/java/com/enderio/machines/common/blockentity/FluidTankBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/FluidTankBlockEntity.java index 9ea756ac5d..0060121d8d 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/FluidTankBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/FluidTankBlockEntity.java @@ -275,6 +275,7 @@ private void onTankContentsChanged() { if (!level.isClientSide()) { currentRecipe = level.getRecipeManager().getRecipeFor(MachineRecipes.TANK.type().get(), container, level); } + level.getLightEngine().checkBlock(worldPosition); } } From ec4a9db40c4021a5fdbfe9fcf04c348b597f6c9e Mon Sep 17 00:00:00 2001 From: agnor99 <36055315+agnor99@users.noreply.github.com> Date: Tue, 8 Aug 2023 18:44:42 +0200 Subject: [PATCH 072/154] ooops --- .../com/enderio/conduits/common/blockentity/ConduitBundle.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitBundle.java b/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitBundle.java index 4004649f5c..ea9ceac181 100644 --- a/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitBundle.java +++ b/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitBundle.java @@ -314,7 +314,7 @@ public void setNodeFor(IConduitType type, NodeIdentifier node) { nodes.put(type, node); for (var direction : Direction.values()) { ConduitConnection connection = connections.get(direction); - int index = connection.getConnectedTypes().indexOf(type); + int index = types.indexOf(type); if (index >= 0) { var state = connection.getConnectionState(index); if (state instanceof DynamicConnectionState dynamicState) { From b1018cb634609e8029ad1bb56711fc573baec3d2 Mon Sep 17 00:00:00 2001 From: agnor99 <36055315+agnor99@users.noreply.github.com> Date: Wed, 9 Aug 2023 00:36:27 +0200 Subject: [PATCH 073/154] fix soul capturing --- .../common/recipe/SoulBindingRecipe.java | 24 +++--- .../base/common/item/tool/SoulVialItem.java | 83 +++++++++---------- 2 files changed, 50 insertions(+), 57 deletions(-) diff --git a/src/machines/java/com/enderio/machines/common/recipe/SoulBindingRecipe.java b/src/machines/java/com/enderio/machines/common/recipe/SoulBindingRecipe.java index 57a82128cf..453ed7795c 100644 --- a/src/machines/java/com/enderio/machines/common/recipe/SoulBindingRecipe.java +++ b/src/machines/java/com/enderio/machines/common/recipe/SoulBindingRecipe.java @@ -6,6 +6,7 @@ import com.enderio.base.common.init.EIOItems; import com.enderio.base.common.util.ExperienceUtil; import com.enderio.core.common.recipes.OutputStack; +import com.enderio.machines.common.blockentity.SoulBinderBlockEntity; import com.enderio.machines.common.init.MachineRecipes; import com.google.gson.JsonObject; import net.minecraft.ResourceLocationException; @@ -81,20 +82,18 @@ public int getExpCost() { @Override public List craft(SoulBindingRecipe.Container container, RegistryAccess registryAccess) { - ItemStack vial = container.getItem(0); + ItemStack vial = SoulBinderBlockEntity.INPUT_SOUL.getItemStack(container); List results = getResultStacks(registryAccess); - ItemStack result = results.get(0).getItem(); //TODO will this auto update since the stack is updated? - vial.getCapability(EIOCapabilities.ENTITY_STORAGE).ifPresent(inputEntity -> { - result.getCapability(EIOCapabilities.ENTITY_STORAGE).ifPresent(resultEntity -> { - resultEntity.setStoredEntityData(inputEntity.getStoredEntityData()); - }); - }); + ItemStack result = results.get(0).getItem(); + vial.getCapability(EIOCapabilities.ENTITY_STORAGE) + .ifPresent(inputEntity -> result.getCapability(EIOCapabilities.ENTITY_STORAGE) + .ifPresent(resultEntity -> resultEntity.setStoredEntityData(inputEntity.getStoredEntityData()))); return results; } @Override public List getResultStacks(RegistryAccess registryAccess) { - return List.of(OutputStack.of(new ItemStack(output, 1)), OutputStack.of(new ItemStack(EIOItems.EMPTY_SOUL_VIAL, 1))); + return List.of(OutputStack.of(output.getDefaultInstance()), OutputStack.of(EIOItems.EMPTY_SOUL_VIAL.asStack())); } @Override @@ -105,11 +104,12 @@ public NonNullList getIngredients() { @Override public boolean matches(SoulBindingRecipe.Container container, Level pLevel) { container.setNeededXP(0); - if (!container.getItem(0).is(EIOItems.FILLED_SOUL_VIAL.get())) + ItemStack inputSoul = SoulBinderBlockEntity.INPUT_SOUL.getItemStack(container); + if (!inputSoul.is(EIOItems.FILLED_SOUL_VIAL.get())) return false; - if (!input.test(container.getItem(1))) + if (!input.test(SoulBinderBlockEntity.INPUT_OTHER.getItemStack(container))) return false; - LazyOptional capability = container.getItem(0).getCapability(EIOCapabilities.ENTITY_STORAGE); + LazyOptional capability = inputSoul.getCapability(EIOCapabilities.ENTITY_STORAGE); if (!capability.isPresent()) { //vial (or other entity storage return false; } @@ -120,7 +120,7 @@ public boolean matches(SoulBindingRecipe.Container container, Level pLevel) { IEntityStorage storage = capability.resolve().get(); if (storage.hasStoredEntity()) { var type = storage.getStoredEntityData().getEntityType(); - if (!type.isPresent()) + if (type.isEmpty()) return false; var entityType = ForgeRegistries.ENTITY_TYPES.getValue(type.get()); diff --git a/src/main/java/com/enderio/base/common/item/tool/SoulVialItem.java b/src/main/java/com/enderio/base/common/item/tool/SoulVialItem.java index d40a362599..1655e8b3b0 100644 --- a/src/main/java/com/enderio/base/common/item/tool/SoulVialItem.java +++ b/src/main/java/com/enderio/base/common/item/tool/SoulVialItem.java @@ -8,6 +8,7 @@ import com.enderio.base.common.capability.EntityStorageItemStack; import com.enderio.base.common.init.EIOCapabilities; import com.enderio.base.common.init.EIOItems; +import com.enderio.base.common.item.misc.EnderiosItem; import com.enderio.base.common.lang.EIOLang; import com.enderio.base.common.util.EntityCaptureUtils; import com.enderio.core.client.item.IAdvancedTooltipProvider; @@ -92,7 +93,9 @@ public InteractionResult interactLivingEntity(ItemStack pStack, Player pPlayer, if (pPlayer.level().isClientSide) { return InteractionResult.FAIL; } - return catchEntity(pStack, pInteractionTarget, filledVial -> { + Optional itemStack = catchEntity(pStack, pInteractionTarget, component -> pPlayer.displayClientMessage(component, true)); + if (itemStack.isPresent()) { + ItemStack filledVial = itemStack.get(); ItemStack hand = pPlayer.getItemInHand(pUsedHand); if (hand.isEmpty()) { hand.setCount(1); // Forge will fire the destroyItemEvent and vanilla replaces it to ItemStack.EMPTY if this isn't done @@ -102,7 +105,9 @@ public InteractionResult interactLivingEntity(ItemStack pStack, Player pPlayer, pPlayer.drop(filledVial, false); } } - }, component -> pPlayer.displayClientMessage(component, true)); + return InteractionResult.SUCCESS; + } + return InteractionResult.FAIL; } @Override @@ -121,48 +126,36 @@ public InteractionResult useOn(UseOnContext pContext) { emptyVial -> player.setItemInHand(pContext.getHand(), emptyVial)); } - private static InteractionResult catchEntity(ItemStack soulVial, LivingEntity entity, Consumer filledVialInsertion, - Consumer displayCallback) { - return soulVial.getCapability(EIOCapabilities.ENTITY_STORAGE).map(entityStorage -> { - if (!entityStorage.hasStoredEntity()) { - - if (entity instanceof Player) { - displayCallback.accept(EIOLang.SOUL_VIAL_ERROR_PLAYER); - return InteractionResult.FAIL; - } - - // Get the entity type and verify it is allowed to be captured - // We ignore the unchecked cast, as entity is LivingEntity - // noinspection unchecked - EntityCaptureUtils.CapturableStatus status = EntityCaptureUtils.getCapturableStatus((EntityType) entity.getType(), - entity); - if (status != EntityCaptureUtils.CapturableStatus.CAPTURABLE) { - displayCallback.accept(status.errorMessage()); - return InteractionResult.FAIL; - } - - if (!entity.isAlive()) { - displayCallback.accept(EIOLang.SOUL_VIAL_ERROR_DEAD); - return InteractionResult.FAIL; - } - - soulVial.shrink(1); + /** + * @return the filled vial + */ + private static Optional catchEntity(ItemStack soulVial, LivingEntity entity, Consumer displayCallback) { - // Create a filled vial and put the entity's NBT inside. - if (entity instanceof Mob mob && mob.getLeashHolder() != null) { - mob.dropLeash(true, true); - } - ItemStack filledVial = EIOItems.FILLED_SOUL_VIAL.get().getDefaultInstance(); - setEntityData(filledVial, entity); + if (entity instanceof Player) { + displayCallback.accept(EIOLang.SOUL_VIAL_ERROR_PLAYER); + return Optional.empty(); + } + EntityCaptureUtils.CapturableStatus status = EntityCaptureUtils.getCapturableStatus((EntityType) entity.getType(), entity); + if (status != EntityCaptureUtils.CapturableStatus.CAPTURABLE) { + displayCallback.accept(status.errorMessage()); + return Optional.empty(); + } - // give back the filled vial - filledVialInsertion.accept(filledVial); + if (!entity.isAlive()) { + displayCallback.accept(EIOLang.SOUL_VIAL_ERROR_DEAD); + return Optional.empty(); + } + // Create a filled vial and put the entity's NBT inside. + if (entity instanceof Mob mob && mob.getLeashHolder() != null) { + mob.dropLeash(true, true); + } + soulVial.shrink(1); + ItemStack filledVial = EIOItems.FILLED_SOUL_VIAL.get().getDefaultInstance(); + setEntityData(filledVial, entity); - // Remove the captured mob. - entity.discard(); - } - return InteractionResult.SUCCESS; - }).orElse(InteractionResult.SUCCESS); + // Remove the captured mob. + entity.discard(); + return Optional.of(filledVial); } private static InteractionResult releaseEntity(Level level, ItemStack filledVial, Direction face, BlockPos pos, Consumer emptyVialSetter) { @@ -226,7 +219,7 @@ public static Optional getEntityData(ItemStack stack) { @Nullable @Override public MultiCapabilityProvider initCapabilities(ItemStack stack, @Nullable CompoundTag nbt, MultiCapabilityProvider provider) { - if (!stack.isStackable()) { + if (this == EIOItems.FILLED_SOUL_VIAL.get()) { provider.add(EIOCapabilities.ENTITY_STORAGE, LazyOptional.of(() -> new EntityStorageItemStack(stack))); } return provider; @@ -249,7 +242,7 @@ public static void onLivingInteract(PlayerInteractEvent.EntityInteractSpecific e ItemStack stack = event.getItemStack(); if (stack.is(EIOItems.EMPTY_SOUL_VIAL.get())) { if (event.getTarget() instanceof AbstractChestedHorse || event.getTarget() instanceof Villager) { - stack.getItem().interactLivingEntity(stack, event.getEntity(), (LivingEntity) event.getTarget(), event.getHand()); + stack.interactLivingEntity(event.getEntity(), (LivingEntity) event.getTarget(), event.getHand()); } } } @@ -270,8 +263,8 @@ protected ItemStack execute(BlockSource source, ItemStack stack) { for (LivingEntity livingentity : source .getLevel() .getEntitiesOfClass(LivingEntity.class, new AABB(blockpos), living -> !(living instanceof Player))) { - AtomicReference filledVial = new AtomicReference<>(); - if (catchEntity(stack, livingentity, filledVial::set, component -> {}) == InteractionResult.SUCCESS && filledVial.get() != null) { + Optional filledVial = catchEntity(stack, livingentity, component -> {}); + if (filledVial.isPresent()) { //push filledvial back into dispenser source.getEntity().getCapability(ForgeCapabilities.ITEM_HANDLER).ifPresent(handler -> { for (int i = 0; i < handler.getSlots(); i++) { From a16050abae6881906e2459796cc98ad95cc3b2a2 Mon Sep 17 00:00:00 2001 From: agnor99 <36055315+agnor99@users.noreply.github.com> Date: Wed, 9 Aug 2023 13:10:59 +0200 Subject: [PATCH 074/154] remove enderios (don't tell rover) --- .../java/com/enderio/base/common/item/tool/SoulVialItem.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/com/enderio/base/common/item/tool/SoulVialItem.java b/src/main/java/com/enderio/base/common/item/tool/SoulVialItem.java index 1655e8b3b0..3b6b38edba 100644 --- a/src/main/java/com/enderio/base/common/item/tool/SoulVialItem.java +++ b/src/main/java/com/enderio/base/common/item/tool/SoulVialItem.java @@ -8,7 +8,6 @@ import com.enderio.base.common.capability.EntityStorageItemStack; import com.enderio.base.common.init.EIOCapabilities; import com.enderio.base.common.init.EIOItems; -import com.enderio.base.common.item.misc.EnderiosItem; import com.enderio.base.common.lang.EIOLang; import com.enderio.base.common.util.EntityCaptureUtils; import com.enderio.core.client.item.IAdvancedTooltipProvider; From 0d9380fea93e158c74db3746d708971803761c2c Mon Sep 17 00:00:00 2001 From: mystchonky Date: Wed, 9 Aug 2023 20:09:56 +0530 Subject: [PATCH 075/154] misc review changes --- .../com/enderio/api/travel/ITravelTarget.java | 1 - src/core/java/com/enderio/core/CoreNBTKeys.java | 9 +++++++++ .../common/block/TravelAnchorBlock.java | 2 -- .../blockentity/TravelAnchorBlockEntity.java | 2 +- .../common/travel/AnchorTravelTarget.java | 17 +++++++++-------- .../java/com/enderio/base/ItemDataSlot.java | 0 .../java/com/enderio/base/StringDataSlot.java | 0 .../gui/ClientToServerMenuSyncHandler.java | 15 --------------- .../renderer/travel/RenderTravelTargets.java | 2 +- .../renderer/travel/TravelParticleHandler.java | 6 ++---- .../base/common/handler/TravelHandler.java | 8 +++++--- 11 files changed, 27 insertions(+), 35 deletions(-) delete mode 100644 src/main/java/com/enderio/base/ItemDataSlot.java delete mode 100644 src/main/java/com/enderio/base/StringDataSlot.java delete mode 100644 src/main/java/com/enderio/base/client/gui/ClientToServerMenuSyncHandler.java diff --git a/src/api/java/com/enderio/api/travel/ITravelTarget.java b/src/api/java/com/enderio/api/travel/ITravelTarget.java index 3aeb028ae7..30db0ca5dc 100644 --- a/src/api/java/com/enderio/api/travel/ITravelTarget.java +++ b/src/api/java/com/enderio/api/travel/ITravelTarget.java @@ -4,7 +4,6 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.resources.ResourceLocation; -// TODO: docs public interface ITravelTarget { ResourceLocation getSerializationName(); diff --git a/src/core/java/com/enderio/core/CoreNBTKeys.java b/src/core/java/com/enderio/core/CoreNBTKeys.java index 5ab55a7b90..42df0619ed 100644 --- a/src/core/java/com/enderio/core/CoreNBTKeys.java +++ b/src/core/java/com/enderio/core/CoreNBTKeys.java @@ -31,4 +31,13 @@ public class CoreNBTKeys { public static final String SYNC_DATA = "Data"; // endregion + + //region Travel Target + + public static final String ANCHOR_NAME = "AnchorName"; + public static final String ANCHOR_POS = "AnchorPosition"; + public static final String ANCHOR_ICON = "AnchorIcon"; + public static final String ANCHOR_VISIBILITY = "AnchorVisibility"; + + //endregion } diff --git a/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java b/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java index c98db65ca4..c10870c3c7 100644 --- a/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java +++ b/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java @@ -35,7 +35,6 @@ public BlockEntity newBlockEntity(BlockPos pPos, BlockState pState) { @SubscribeEvent public static void jump(LivingEvent.LivingJumpEvent jumpEvent) { if (!jumpEvent.getEntity().level().isClientSide && jumpEvent.getEntity() instanceof Player player) { - // TODO: Change if (player.level().getBlockState(player.blockPosition().below()).getBlock() instanceof TravelAnchorBlock) { TravelHandler.blockTeleport(player.level(), player); } @@ -44,7 +43,6 @@ public static void jump(LivingEvent.LivingJumpEvent jumpEvent) { @SubscribeEvent public static void sneak(TickEvent.PlayerTickEvent event) { - // TODO: Change if (event.phase == TickEvent.Phase.END && event.player instanceof ServerPlayer player && player .level() .getBlockState(player.blockPosition().below()) diff --git a/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java index e9a07f2015..239e9d9f5d 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java @@ -26,7 +26,7 @@ public class TravelAnchorBlockEntity extends MachineBlockEntity { - AnchorTravelTarget target; + private AnchorTravelTarget target; public static final SingleSlotAccess GHOST = new SingleSlotAccess(); private final StringNetworkDataSlot nameDataSlot; diff --git a/src/machines/java/com/enderio/machines/common/travel/AnchorTravelTarget.java b/src/machines/java/com/enderio/machines/common/travel/AnchorTravelTarget.java index 6c554f0d29..76e73e1433 100644 --- a/src/machines/java/com/enderio/machines/common/travel/AnchorTravelTarget.java +++ b/src/machines/java/com/enderio/machines/common/travel/AnchorTravelTarget.java @@ -3,6 +3,7 @@ import com.enderio.EnderIO; import com.enderio.api.travel.ITravelTarget; import com.enderio.base.common.config.BaseConfig; +import com.enderio.core.CoreNBTKeys; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.NbtUtils; @@ -30,21 +31,21 @@ public AnchorTravelTarget(BlockPos pos, String name, Item icon, boolean visible) } public AnchorTravelTarget(CompoundTag tag) { - pos = NbtUtils.readBlockPos(tag.getCompound("pos")); - name = tag.getString("name"); - String iconName = tag.getString("icon"); + pos = NbtUtils.readBlockPos(tag.getCompound(CoreNBTKeys.ANCHOR_POS)); + name = tag.getString(CoreNBTKeys.ANCHOR_NAME); + String iconName = tag.getString(CoreNBTKeys.ANCHOR_ICON); icon = iconName.equals("") ? null : ForgeRegistries.ITEMS.getValue(new ResourceLocation(iconName)); - visible = tag.getBoolean("visible"); + visible = tag.getBoolean(CoreNBTKeys.ANCHOR_VISIBILITY); } @Override public CompoundTag save() { CompoundTag nbt = new CompoundTag(); - nbt.put("pos", NbtUtils.writeBlockPos(pos)); - nbt.putString("name", name); + nbt.put(CoreNBTKeys.ANCHOR_POS, NbtUtils.writeBlockPos(pos)); + nbt.putString(CoreNBTKeys.ANCHOR_NAME, name); if (icon != null) - nbt.putString("icon", String.valueOf(ForgeRegistries.ITEMS.getKey(icon))); - nbt.putBoolean("visible", visible); + nbt.putString(CoreNBTKeys.ANCHOR_ICON, String.valueOf(ForgeRegistries.ITEMS.getKey(icon))); + nbt.putBoolean(CoreNBTKeys.ANCHOR_VISIBILITY, visible); return nbt; } diff --git a/src/main/java/com/enderio/base/ItemDataSlot.java b/src/main/java/com/enderio/base/ItemDataSlot.java deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/main/java/com/enderio/base/StringDataSlot.java b/src/main/java/com/enderio/base/StringDataSlot.java deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/main/java/com/enderio/base/client/gui/ClientToServerMenuSyncHandler.java b/src/main/java/com/enderio/base/client/gui/ClientToServerMenuSyncHandler.java deleted file mode 100644 index b4b93bf8a2..0000000000 --- a/src/main/java/com/enderio/base/client/gui/ClientToServerMenuSyncHandler.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.enderio.base.client.gui; - -import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.fml.common.Mod; - -@Mod.EventBusSubscriber(value = Dist.CLIENT) -public class ClientToServerMenuSyncHandler { - // @SubscribeEvent - // public static void clientTick(TickEvent.ClientTickEvent e) { - // LocalPlayer player = Minecraft.getInstance().player; - // if (e.phase == TickEvent.Phase.END && player != null && player.containerMenu instanceof SyncedMenu syncedMenu) { - // syncedMenu.clientTick(); - // } - // } -} diff --git a/src/main/java/com/enderio/base/client/renderer/travel/RenderTravelTargets.java b/src/main/java/com/enderio/base/client/renderer/travel/RenderTravelTargets.java index 828d09910f..870ea672f7 100644 --- a/src/main/java/com/enderio/base/client/renderer/travel/RenderTravelTargets.java +++ b/src/main/java/com/enderio/base/client/renderer/travel/RenderTravelTargets.java @@ -34,7 +34,7 @@ public static void renderLevel(RenderLevelStageEvent event) { for (ITravelTarget target : data.getTravelTargets()) { double range = itemTeleport ? target.getItem2BlockRange() : target.getBlock2BlockRange(); double distanceSquared = target.getPos().distToCenterSqr(player.position()); - if (range * range < distanceSquared || distanceSquared < 25) + if (range * range < distanceSquared || distanceSquared < TravelHandler.MIN_TELEPORTATION_DISTANCE_SQUARED) continue; PoseStack poseStack = event.getPoseStack(); poseStack.pushPose(); diff --git a/src/main/java/com/enderio/base/client/renderer/travel/TravelParticleHandler.java b/src/main/java/com/enderio/base/client/renderer/travel/TravelParticleHandler.java index 00876cb9ec..767348bbce 100644 --- a/src/main/java/com/enderio/base/client/renderer/travel/TravelParticleHandler.java +++ b/src/main/java/com/enderio/base/client/renderer/travel/TravelParticleHandler.java @@ -15,7 +15,6 @@ import org.jetbrains.annotations.Nullable; import java.util.Calendar; -import java.util.Optional; @Mod.EventBusSubscriber(value = Dist.CLIENT) public class TravelParticleHandler { @@ -26,9 +25,8 @@ public static void clientTick(TickEvent.ClientTickEvent e) { LocalPlayer player = Minecraft.getInstance().player; if (e.phase == TickEvent.Phase.END && player != null) { tick++; - if (player.isShiftKeyDown() && player.onGround() && TravelHandler.canItemTeleport(player) && tick % 3 == 0) { - Optional pos = TravelHandler.teleportPosition(player.level(), player); - pos.ifPresent(TravelParticleHandler::addTravelParticle); + if (tick % 3 == 0 && player.onGround() && player.isShiftKeyDown() && TravelHandler.canItemTeleport(player)) { + TravelHandler.teleportPosition(player.level(), player).ifPresent(TravelParticleHandler::addTravelParticle); } } } diff --git a/src/main/java/com/enderio/base/common/handler/TravelHandler.java b/src/main/java/com/enderio/base/common/handler/TravelHandler.java index bb8a128241..2e5f46d426 100644 --- a/src/main/java/com/enderio/base/common/handler/TravelHandler.java +++ b/src/main/java/com/enderio/base/common/handler/TravelHandler.java @@ -29,6 +29,8 @@ */ public class TravelHandler { + + public static final int MIN_TELEPORTATION_DISTANCE_SQUARED = 25; public static boolean canTeleport(Player player) { return canItemTeleport(player) || canBlockTeleport(player); } @@ -37,7 +39,7 @@ public static boolean canItemTeleport(Player player) { return canItemTeleport(player, InteractionHand.MAIN_HAND) || canItemTeleport(player, InteractionHand.OFF_HAND); } - public static boolean canItemTeleport(Player player, InteractionHand hand) { + private static boolean canItemTeleport(Player player, InteractionHand hand) { ItemStack stack = player.getItemInHand(hand); if (stack.getItem() == EIOItems.TRAVEL_STAFF.get()) return true; @@ -122,7 +124,7 @@ public static Optional getAnchorTarget(Player player) { .getTravelTargetsInItemRange(player.blockPosition()) .filter(target -> target.canTravelTo()) .filter( - target -> target.getPos().distToLowCornerSqr(player.getX(), player.getY(), player.getZ()) > 25) //only teleport to blocks not directly in range + target -> target.getPos().distToLowCornerSqr(player.getX(), player.getY(), player.getZ()) > MIN_TELEPORTATION_DISTANCE_SQUARED) .filter(target -> Math.abs(getAngleRadians(positionVec, target.getPos(), player.getYRot(), player.getXRot())) <= Math.toRadians(15)) .filter(target -> isTeleportPositionClear(player.level(), target.getPos()).isPresent()) .min(Comparator.comparingDouble(target -> Math.abs(getAngleRadians(positionVec, target.getPos(), player.getYRot(), player.getXRot())))); @@ -139,7 +141,7 @@ private static double getAngleRadians(Vec3 positionVec, BlockPos anchor, float y * * @param level * @param target - * @return Optional.empty if it can't teleport and the height where to place the player. This is so you can tp ontop of carpets up to a whole block + * @return Optional.empty if it can't teleport and the height where to place the player. This is so you can tp on top of carpets up to a whole block */ private static Optional isTeleportPositionClear(BlockGetter level, BlockPos target) { if (level.isOutsideBuildHeight(target)) From 646724ba6ea8bf161e17186814c85c09a79c1d1f Mon Sep 17 00:00:00 2001 From: mystchonky Date: Wed, 9 Aug 2023 20:49:51 +0530 Subject: [PATCH 076/154] update configs and more review stuff --- src/core/java/com/enderio/core/CoreNBTKeys.java | 1 - .../common/block/TravelAnchorBlock.java | 17 +++++++++++------ .../common/travel/AnchorTravelTarget.java | 4 ++-- .../base/common/config/common/ItemsConfig.java | 4 ++-- .../darksteel/upgrades/EmpoweredUpgrade.java | 3 ++- 5 files changed, 17 insertions(+), 12 deletions(-) diff --git a/src/core/java/com/enderio/core/CoreNBTKeys.java b/src/core/java/com/enderio/core/CoreNBTKeys.java index 42df0619ed..2529f90c64 100644 --- a/src/core/java/com/enderio/core/CoreNBTKeys.java +++ b/src/core/java/com/enderio/core/CoreNBTKeys.java @@ -35,7 +35,6 @@ public class CoreNBTKeys { //region Travel Target public static final String ANCHOR_NAME = "AnchorName"; - public static final String ANCHOR_POS = "AnchorPosition"; public static final String ANCHOR_ICON = "AnchorIcon"; public static final String ANCHOR_VISIBILITY = "AnchorVisibility"; diff --git a/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java b/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java index c10870c3c7..bf08ae314f 100644 --- a/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java +++ b/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java @@ -13,14 +13,14 @@ import net.minecraftforge.event.entity.living.LivingEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; -import org.apache.commons.lang3.tuple.Pair; import org.jetbrains.annotations.Nullable; +import java.util.Map; import java.util.WeakHashMap; @Mod.EventBusSubscriber public class TravelAnchorBlock extends MachineBlock { - private static final WeakHashMap> sneakCache = new WeakHashMap<>(); + private static final Map sneakCache = new WeakHashMap<>(); public TravelAnchorBlock(Properties props) { super(props, MachineBlockEntities.TRAVEL_ANCHOR); @@ -48,12 +48,11 @@ public static void sneak(TickEvent.PlayerTickEvent event) { .getBlockState(player.blockPosition().below()) .getBlock() instanceof TravelAnchorBlock) { - Pair sneakEntry = sneakCache.getOrDefault(player, Pair.of(false, player.level().getServer().getTickCount() - 1)); - if ((!sneakEntry.getLeft() || sneakEntry.getRight() != player.level().getServer().getTickCount() - 1) && player.isShiftKeyDown()) { - + PlayerSneakEntry sneakEntry = getLastSneakEntry(player); + if ((!sneakEntry.isSneaking() || sneakEntry.atTime() != player.level().getServer().getTickCount() - 1) && player.isShiftKeyDown()) { TravelHandler.blockTeleport(player.level(), player); } - sneakCache.put(player, Pair.of(player.isShiftKeyDown(), player.level().getServer().getTickCount())); + sneakCache.put(player, new PlayerSneakEntry(player.isShiftKeyDown(), player.level().getServer().getTickCount())); } } @@ -64,4 +63,10 @@ public void onRemove(BlockState state, Level level, BlockPos pos, BlockState new } super.onRemove(state, level, pos, newState, movedByPiston); } + + private static PlayerSneakEntry getLastSneakEntry(ServerPlayer player){ + return sneakCache.getOrDefault(player, new PlayerSneakEntry(false, player.level().getServer().getTickCount() - 1)); + } + + private record PlayerSneakEntry(boolean isSneaking, int atTime){} } diff --git a/src/machines/java/com/enderio/machines/common/travel/AnchorTravelTarget.java b/src/machines/java/com/enderio/machines/common/travel/AnchorTravelTarget.java index 76e73e1433..19b438d86a 100644 --- a/src/machines/java/com/enderio/machines/common/travel/AnchorTravelTarget.java +++ b/src/machines/java/com/enderio/machines/common/travel/AnchorTravelTarget.java @@ -31,7 +31,7 @@ public AnchorTravelTarget(BlockPos pos, String name, Item icon, boolean visible) } public AnchorTravelTarget(CompoundTag tag) { - pos = NbtUtils.readBlockPos(tag.getCompound(CoreNBTKeys.ANCHOR_POS)); + pos = NbtUtils.readBlockPos(tag.getCompound(CoreNBTKeys.BLOCK_POS)); name = tag.getString(CoreNBTKeys.ANCHOR_NAME); String iconName = tag.getString(CoreNBTKeys.ANCHOR_ICON); icon = iconName.equals("") ? null : ForgeRegistries.ITEMS.getValue(new ResourceLocation(iconName)); @@ -41,7 +41,7 @@ public AnchorTravelTarget(CompoundTag tag) { @Override public CompoundTag save() { CompoundTag nbt = new CompoundTag(); - nbt.put(CoreNBTKeys.ANCHOR_POS, NbtUtils.writeBlockPos(pos)); + nbt.put(CoreNBTKeys.BLOCK_POS, NbtUtils.writeBlockPos(pos)); nbt.putString(CoreNBTKeys.ANCHOR_NAME, name); if (icon != null) nbt.putString(CoreNBTKeys.ANCHOR_ICON, String.valueOf(ForgeRegistries.ITEMS.getKey(icon))); diff --git a/src/main/java/com/enderio/base/common/config/common/ItemsConfig.java b/src/main/java/com/enderio/base/common/config/common/ItemsConfig.java index 1d4547a7b1..6f2ffd15f8 100644 --- a/src/main/java/com/enderio/base/common/config/common/ItemsConfig.java +++ b/src/main/java/com/enderio/base/common/config/common/ItemsConfig.java @@ -46,9 +46,9 @@ public ItemsConfig(ForgeConfigSpec.Builder builder) { TRAVELLING_BLINK_RANGE = builder.defineInRange("blinkRange", 24, 4, 16 * 32); TRAVELLING_BLINK_DISABLED_TIME = builder.defineInRange("disabledTime", 5, 0, 20 * 60); TRAVELLING_STAFF_ENERGY_USE = builder.define("energyUse", 1000); - TRAVELLING_STAFF_MAX_ENERGY = builder.define("maxEnergy", 100000); // TODO: CHECK VALUES + TRAVELLING_STAFF_MAX_ENERGY = builder.define("maxEnergy", 100000); builder.comment("the following config values are only used if EIOMachines is loaded"); - TRAVELLING_TO_BLOCK_RANGE = builder.defineInRange("itemToBlockRange", 256, 4, 16 * 32); + TRAVELLING_TO_BLOCK_RANGE = builder.defineInRange("itemToBlockRange", 192, 4, 16 * 32); TRAVELLING_BLOCK_TO_BLOCK_RANGE = builder.defineInRange("blockToBlockRange", 96, 4, 16 * 32); builder.pop(); diff --git a/src/main/java/com/enderio/base/common/item/darksteel/upgrades/EmpoweredUpgrade.java b/src/main/java/com/enderio/base/common/item/darksteel/upgrades/EmpoweredUpgrade.java index 0e3107a1f1..18ce5276b9 100644 --- a/src/main/java/com/enderio/base/common/item/darksteel/upgrades/EmpoweredUpgrade.java +++ b/src/main/java/com/enderio/base/common/item/darksteel/upgrades/EmpoweredUpgrade.java @@ -23,7 +23,8 @@ public class EmpoweredUpgrade extends TieredUpgrade { private final ForgeConfigSpec.ConfigValue powerUsePerDamagePoint = BaseConfig.COMMON.DARK_STEEL.EMPOWERED_ENERGY_PER_DAMAGE; - @Nullable private EnergyStorage storage; + @Nullable + private EnergyStorage storage; public EmpoweredUpgrade() { this(EmpoweredUpgradeTier.ONE); From 2c3cc77bf08a3c55590f459b3274c237498329b0 Mon Sep 17 00:00:00 2001 From: mystchonky Date: Wed, 9 Aug 2023 22:17:59 +0530 Subject: [PATCH 077/154] alter anchor remove functionality --- .../common/block/TravelAnchorBlock.java | 10 ------- .../blockentity/TravelAnchorBlockEntity.java | 30 ++++++++----------- .../renderer/travel/RenderTravelTargets.java | 8 ++--- 3 files changed, 16 insertions(+), 32 deletions(-) diff --git a/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java b/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java index bf08ae314f..6cb85453ae 100644 --- a/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java +++ b/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java @@ -1,12 +1,10 @@ package com.enderio.machines.common.block; import com.enderio.base.common.handler.TravelHandler; -import com.enderio.machines.common.blockentity.TravelAnchorBlockEntity; import com.enderio.machines.common.init.MachineBlockEntities; import net.minecraft.core.BlockPos; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.player.Player; -import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.event.TickEvent; @@ -56,14 +54,6 @@ public static void sneak(TickEvent.PlayerTickEvent event) { } } - @Override - public void onRemove(BlockState state, Level level, BlockPos pos, BlockState newState, boolean movedByPiston) { - if (level.getBlockEntity(pos) instanceof TravelAnchorBlockEntity entity) { - entity.remove(); - } - super.onRemove(state, level, pos, newState, movedByPiston); - } - private static PlayerSneakEntry getLastSneakEntry(ServerPlayer player){ return sneakCache.getOrDefault(player, new PlayerSneakEntry(false, player.level().getServer().getTickCount() - 1)); } diff --git a/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java index 239e9d9f5d..f443947a2d 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java @@ -44,18 +44,6 @@ public TravelAnchorBlockEntity(BlockEntityType pType, BlockPos pWorldPosition addDataSlot(iconDataSlot); } - public void remove() { - getTravelData().removeTravelTargetAt(worldPosition); - } - - @Override - public void setRemoved() { - if (level != null && level.isClientSide) { - remove(); - } - super.setRemoved(); - } - @Nullable @Override public AbstractContainerMenu createMenu(int containerId, Inventory inventory, Player player) { @@ -76,6 +64,18 @@ protected void onInventoryContentsChanged(int slot) { } } + @Override + public void setRemoved() { + getTravelData().removeTravelTargetAt(worldPosition); + super.setRemoved(); + } + + @Override + public void onLoad() { + target = getOrCreateTravelTarget(); + super.onLoad(); + } + @Nullable public String getName() { return target.getName(); @@ -114,12 +114,6 @@ public void setVisibility(boolean visible) { } } - @Override - public void onLoad() { - target = getOrCreateTravelTarget(); - super.onLoad(); - } - private AnchorTravelTarget getOrCreateTravelTarget() { Optional travelTarget = getTravelData().getTravelTarget(worldPosition); if (travelTarget.isPresent() && travelTarget.get() instanceof AnchorTravelTarget anchorTravelTarget) { diff --git a/src/main/java/com/enderio/base/client/renderer/travel/RenderTravelTargets.java b/src/main/java/com/enderio/base/client/renderer/travel/RenderTravelTargets.java index 870ea672f7..9d60c80dc4 100644 --- a/src/main/java/com/enderio/base/client/renderer/travel/RenderTravelTargets.java +++ b/src/main/java/com/enderio/base/client/renderer/travel/RenderTravelTargets.java @@ -14,8 +14,7 @@ import net.minecraftforge.client.event.RenderLevelStageEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; - -import java.util.Optional; +import org.jetbrains.annotations.Nullable; @Mod.EventBusSubscriber(value = Dist.CLIENT) public class RenderTravelTargets { @@ -30,7 +29,8 @@ public static void renderLevel(RenderLevelStageEvent event) { return; boolean itemTeleport = TravelHandler.canItemTeleport(player); TravelSavedData data = TravelSavedData.getTravelData(Minecraft.getInstance().level); - Optional activeTarget = TravelHandler.getAnchorTarget(player); + @Nullable + ITravelTarget activeTarget = TravelHandler.getAnchorTarget(player).orElse(null); for (ITravelTarget target : data.getTravelTargets()) { double range = itemTeleport ? target.getItem2BlockRange() : target.getBlock2BlockRange(); double distanceSquared = target.getPos().distToCenterSqr(player.position()); @@ -42,7 +42,7 @@ public static void renderLevel(RenderLevelStageEvent event) { Vec3 projectedView = mainCamera.getPosition(); poseStack.translate(-projectedView.x, -projectedView.y, -projectedView.z); - boolean active = activeTarget.map(act -> act == target).orElse(false); + boolean active = activeTarget == target; TravelRegistry.getRenderer(target).render(target, event.getLevelRenderer(), poseStack, distanceSquared, active); poseStack.popPose(); } From 95219c05166badd2b5751f584ce842e68a79c7d8 Mon Sep 17 00:00:00 2001 From: mystchonky Date: Wed, 9 Aug 2023 22:30:02 +0530 Subject: [PATCH 078/154] make icon not nullable --- .../enderio/machines/common/travel/AnchorTravelTarget.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/machines/java/com/enderio/machines/common/travel/AnchorTravelTarget.java b/src/machines/java/com/enderio/machines/common/travel/AnchorTravelTarget.java index 19b438d86a..23231a8e6c 100644 --- a/src/machines/java/com/enderio/machines/common/travel/AnchorTravelTarget.java +++ b/src/machines/java/com/enderio/machines/common/travel/AnchorTravelTarget.java @@ -9,6 +9,7 @@ import net.minecraft.nbt.NbtUtils; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.Item; +import net.minecraft.world.item.Items; import net.minecraftforge.registries.ForgeRegistries; import java.util.Objects; @@ -20,7 +21,6 @@ public class AnchorTravelTarget implements ITravelTarget { private final BlockPos pos; private String name; private Item icon; - private boolean visible; public AnchorTravelTarget(BlockPos pos, String name, Item icon, boolean visible) { @@ -34,7 +34,7 @@ public AnchorTravelTarget(CompoundTag tag) { pos = NbtUtils.readBlockPos(tag.getCompound(CoreNBTKeys.BLOCK_POS)); name = tag.getString(CoreNBTKeys.ANCHOR_NAME); String iconName = tag.getString(CoreNBTKeys.ANCHOR_ICON); - icon = iconName.equals("") ? null : ForgeRegistries.ITEMS.getValue(new ResourceLocation(iconName)); + icon = iconName.equals("") ? Items.AIR : ForgeRegistries.ITEMS.getValue(new ResourceLocation(iconName)); visible = tag.getBoolean(CoreNBTKeys.ANCHOR_VISIBILITY); } @@ -43,8 +43,7 @@ public CompoundTag save() { CompoundTag nbt = new CompoundTag(); nbt.put(CoreNBTKeys.BLOCK_POS, NbtUtils.writeBlockPos(pos)); nbt.putString(CoreNBTKeys.ANCHOR_NAME, name); - if (icon != null) - nbt.putString(CoreNBTKeys.ANCHOR_ICON, String.valueOf(ForgeRegistries.ITEMS.getKey(icon))); + nbt.putString(CoreNBTKeys.ANCHOR_ICON, String.valueOf(ForgeRegistries.ITEMS.getKey(icon))); nbt.putBoolean(CoreNBTKeys.ANCHOR_VISIBILITY, visible); return nbt; } From ada7129378f6f67592a84bc312004edaa41803ce Mon Sep 17 00:00:00 2001 From: thedarkcolour <30441001+thedarkcolour@users.noreply.github.com> Date: Wed, 9 Aug 2023 10:40:55 -0700 Subject: [PATCH 079/154] Remove light level changes + fix water not rendering in inventory --- .../machines/client/rendering/item/FluidTankBEWLR.java | 7 ++----- .../com/enderio/machines/common/init/MachineBlocks.java | 4 ++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/machines/java/com/enderio/machines/client/rendering/item/FluidTankBEWLR.java b/src/machines/java/com/enderio/machines/client/rendering/item/FluidTankBEWLR.java index bf80b6eb97..ee89195a1a 100644 --- a/src/machines/java/com/enderio/machines/client/rendering/item/FluidTankBEWLR.java +++ b/src/machines/java/com/enderio/machines/client/rendering/item/FluidTankBEWLR.java @@ -8,10 +8,7 @@ import com.mojang.blaze3d.vertex.VertexConsumer; import net.minecraft.client.Minecraft; import net.minecraft.client.model.geom.EntityModelSet; -import net.minecraft.client.renderer.BlockEntityWithoutLevelRenderer; -import net.minecraft.client.renderer.ItemBlockRenderTypes; -import net.minecraft.client.renderer.MultiBufferSource; -import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.*; import net.minecraft.client.renderer.blockentity.BlockEntityRenderDispatcher; import net.minecraft.client.resources.model.BakedModel; import net.minecraft.client.resources.model.ModelResourceLocation; @@ -54,7 +51,7 @@ public void renderByItem(ItemStack stack, ItemDisplayContext transformType, Pose if (fluid != null && amount > 0) { // Get the preferred render buffer - VertexConsumer fluidBuffer = buffer.getBuffer(ItemBlockRenderTypes.getRenderLayer(fluid.defaultFluidState())); + VertexConsumer fluidBuffer = buffer.getBuffer(Sheets.translucentCullBlockSheet()); // Determine capacity. int capacity = FluidTankBlockEntity.Standard.CAPACITY; diff --git a/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java b/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java index 19f8c7deb0..270adfbf9c 100644 --- a/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java +++ b/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java @@ -41,7 +41,7 @@ public class MachineBlocks { public static final BlockEntry FLUID_TANK = REGISTRATE .block("fluid_tank", props -> new MachineBlock(props, MachineBlockEntities.FLUID_TANK)) - .properties(props -> props.strength(2.5f, 8).isViewBlocking((pState, pLevel, pPos) -> false).noOcclusion().lightLevel(state -> 1)) + .properties(props -> props.strength(2.5f, 8).isViewBlocking((pState, pLevel, pPos) -> false).noOcclusion()) .loot(MachinesLootTable::copyNBT) .tag(BlockTags.NEEDS_IRON_TOOL, BlockTags.MINEABLE_WITH_PICKAXE) .blockstate((ctx, prov) -> prov.horizontalBlock(ctx.get(), prov.models() @@ -60,7 +60,7 @@ public class MachineBlocks { public static final BlockEntry PRESSURIZED_FLUID_TANK = REGISTRATE .block("pressurized_fluid_tank", props -> new MachineBlock(props, MachineBlockEntities.PRESSURIZED_FLUID_TANK)) - .properties(props -> props.strength(2.5f, 8).isViewBlocking((pState, pLevel, pPos) -> false).noOcclusion().lightLevel(state -> 1)) + .properties(props -> props.strength(2.5f, 8).isViewBlocking((pState, pLevel, pPos) -> false).noOcclusion()) .loot(MachinesLootTable::copyNBT) .tag(BlockTags.NEEDS_IRON_TOOL, BlockTags.MINEABLE_WITH_PICKAXE) .blockstate((ctx, prov) -> prov.horizontalBlock(ctx.get(), prov.models() From c5c3bb229712fa84a12907704f9facd25fceefee Mon Sep 17 00:00:00 2001 From: jollycar <939345+jollycar@users.noreply.github.com> Date: Sat, 5 Aug 2023 13:58:54 +0200 Subject: [PATCH 080/154] Fluid conduit crashes game if it has non-existant fluid If a fluid is removed from the game, minecraft / forge will assign the fluid to the instance "Fluids.EMPTY". The nbt fluid string will still be kept (to the non-existant fluid) initially, but if you lookup the fluid string in the registries, it will return "Fluids.EMPTY". The fix is to set the lockedFluid to null on deserialization, if the fluid, after lookup, is equal to "Fluids.EMPTY". closes #382 --- .../com/enderio/conduits/common/types/FluidExtendedData.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/conduits/java/com/enderio/conduits/common/types/FluidExtendedData.java b/src/conduits/java/com/enderio/conduits/common/types/FluidExtendedData.java index 19fda1fe18..dc7cecae52 100644 --- a/src/conduits/java/com/enderio/conduits/common/types/FluidExtendedData.java +++ b/src/conduits/java/com/enderio/conduits/common/types/FluidExtendedData.java @@ -6,6 +6,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.Fluids; import net.minecraftforge.registries.ForgeRegistries; import org.jetbrains.annotations.Nullable; @@ -70,7 +71,7 @@ public CompoundTag serializeGuiNBT() { public void deserializeNBT(CompoundTag nbt) { if (nbt.contains(ConduitNBTKeys.FLUID) && !isMultiFluid) { String fluid = nbt.getString(ConduitNBTKeys.FLUID); - if (fluid.equals("null")) { + if (fluid.equals("null") || ForgeRegistries.FLUIDS.getValue(new ResourceLocation(fluid)) == Fluids.EMPTY) { setLockedFluid(null); } else { setLockedFluid(ForgeRegistries.FLUIDS.getValue(new ResourceLocation(fluid))); From 754715e3edc5dacd05c238c2c5214c579fbbc6ce Mon Sep 17 00:00:00 2001 From: Reece Mackie <20544390+Rover656@users.noreply.github.com> Date: Wed, 9 Aug 2023 22:25:25 +0100 Subject: [PATCH 081/154] You didn't see anything. --- .../machines/common/blockentity/base/MachineBlockEntity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/machines/java/com/enderio/machines/common/blockentity/base/MachineBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/base/MachineBlockEntity.java index b1edfcdefa..826f8b9dac 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/base/MachineBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/base/MachineBlockEntity.java @@ -203,7 +203,7 @@ public boolean supportsMode(Direction side, IOMode mode) { } protected void onIOConfigChanged(Direction side, IOMode oldMode, IOMode newMode) { - if (level != null && !level.isClientSide()) { + if (level != null && level.isClientSide()) { clientUpdateSlot(ioConfigDataSlot, getIOConfig()); } } From 09aa4f296c0a6f434f54f43f0f448f31b56ae2a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kid=C5=8D?= Date: Thu, 10 Aug 2023 03:31:06 +0200 Subject: [PATCH 082/154] Fixed where all mobs that are not explicitly registered have dropped a skeleton head --- .../item/darksteel/DarkSteelSwordItem.java | 30 +++++++++++-------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/enderio/base/common/item/darksteel/DarkSteelSwordItem.java b/src/main/java/com/enderio/base/common/item/darksteel/DarkSteelSwordItem.java index 35e1e74450..105b8cd3db 100644 --- a/src/main/java/com/enderio/base/common/item/darksteel/DarkSteelSwordItem.java +++ b/src/main/java/com/enderio/base/common/item/darksteel/DarkSteelSwordItem.java @@ -18,6 +18,7 @@ import org.jetbrains.annotations.Nullable; import java.util.List; +import java.util.Optional; public class DarkSteelSwordItem extends SwordItem implements IAdvancedTooltipProvider { public DarkSteelSwordItem(Properties pProperties) { @@ -27,42 +28,45 @@ public DarkSteelSwordItem(Properties pProperties) { @Override public boolean hurtEnemy(ItemStack pStack, LivingEntity pTarget, LivingEntity pAttacker) { if (pTarget.isDeadOrDying() && pTarget.level().random.nextFloat() < 0.07) { - ItemStack skull = getSkull(pTarget); - Containers.dropItemStack(pAttacker.level(), pAttacker.position().x, pAttacker.position().y, pAttacker.position().z, skull); + Optional skull = getSkull(pTarget); + skull.ifPresent(itemStack -> + Containers.dropItemStack(pAttacker.level(), pAttacker.position().x, + pAttacker.position().y, pAttacker.position().z, itemStack) + ); } return super.hurtEnemy(pStack, pTarget, pAttacker); } //TODO Quick and dirty. Not using instanceof cause of possible mod oddities - public static ItemStack getSkull(LivingEntity pTarget) { - ItemStack stack = new ItemStack(Items.SKELETON_SKULL); + public static Optional getSkull(LivingEntity pTarget) { if (pTarget.getType() == EntityType.SKELETON || pTarget.getType() == EntityType.STRAY) { - stack = new ItemStack(Items.SKELETON_SKULL); + return Optional.of(new ItemStack(Items.SKELETON_SKULL)); } if (pTarget.getType() == EntityType.ZOMBIE || pTarget.getType() == EntityType.DROWNED || pTarget.getType() == EntityType.HUSK || pTarget.getType() == EntityType.ZOMBIE_VILLAGER) { - stack = new ItemStack(Items.ZOMBIE_HEAD); + return Optional.of(new ItemStack(Items.ZOMBIE_HEAD)); } if (pTarget.getType() == EntityType.WITHER_SKELETON) { - stack = new ItemStack(Items.WITHER_SKELETON_SKULL); + return Optional.of(new ItemStack(Items.WITHER_SKELETON_SKULL)); } if (pTarget.getType() == EntityType.CREEPER) { - stack = new ItemStack(Items.CREEPER_HEAD); + return Optional.of(new ItemStack(Items.CREEPER_HEAD)); } if (pTarget.getType() == EntityType.ENDER_DRAGON) { - stack = new ItemStack(Items.DRAGON_HEAD); + return Optional.of(new ItemStack(Items.DRAGON_HEAD)); } if (pTarget.getType() == EntityType.ENDERMAN) { - stack = new ItemStack(EIOBlocks.ENDERMAN_HEAD); + return Optional.of(new ItemStack(EIOBlocks.ENDERMAN_HEAD)); } if (pTarget.getType() == EntityType.PIGLIN || pTarget.getType() == EntityType.PIGLIN_BRUTE || pTarget.getType() == EntityType.ZOMBIFIED_PIGLIN) { - stack = new ItemStack(Items.PIGLIN_HEAD); + return Optional.of(new ItemStack(Items.PIGLIN_HEAD)); } if (pTarget instanceof Player player) { - stack = new ItemStack(Items.PLAYER_HEAD); + ItemStack stack = new ItemStack(Items.PLAYER_HEAD); CompoundTag compoundtag = stack.getOrCreateTag(); compoundtag.putString(PlayerHeadItem.TAG_SKULL_OWNER, player.getDisplayName().getString()); + return Optional.of(stack); } - return stack; + return Optional.empty(); } //TODO remove when doing tools From 654a9a98be763b17b540f6970fe02a1082e98d99 Mon Sep 17 00:00:00 2001 From: jollycar <939345+jollycar@users.noreply.github.com> Date: Thu, 10 Aug 2023 21:28:19 +0200 Subject: [PATCH 083/154] AE2 conduits crashes server on chunkload If you try to create a IManagedGridNode inside an unloaded chunk, AE2 will throw an IllegalStateException. The documentation for IManagedGridNode.create() is clear: "This should only be called when the node is in a ticking chunk". The suggested solution is GridHelper.onFirstTick(). The fix: When calling ConduitBlockEntity.onload(), make sure at least 1 server tick has happened by calling checkConnection.isInitialized(). closes #434 --- .../blockentity/ConduitBlockEntity.java | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitBlockEntity.java b/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitBlockEntity.java index 74dcc98084..49fe3e7904 100644 --- a/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitBlockEntity.java +++ b/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitBlockEntity.java @@ -1,5 +1,6 @@ package com.enderio.conduits.common.blockentity; +import appeng.api.networking.GridHelper; import com.enderio.api.UseOnly; import com.enderio.api.conduit.IConduitMenuData; import com.enderio.api.conduit.IConduitType; @@ -23,7 +24,6 @@ import net.minecraft.nbt.Tag; import net.minecraft.network.chat.Component; import net.minecraft.server.level.ServerLevel; -import net.minecraft.util.Mth; import net.minecraft.world.MenuProvider; import net.minecraft.world.entity.item.ItemEntity; import net.minecraft.world.entity.player.Inventory; @@ -116,21 +116,23 @@ public void onLoad() { updateShape(); if (level instanceof ServerLevel serverLevel) { sync(); - for (var entry: lazyNodes.entrySet()) { - NodeIdentifier node = entry.getValue(); - IExtendedConduitData data = node.getExtendedConduitData(); - data.onCreated(entry.getKey(), level, worldPosition, null); - for (Direction dir : Direction.values()) { - tryConnectTo(dir, entry.getKey(), false, false).ifPresent(otherNode -> Graph.connect(node, otherNode)); - } - for (GraphObject object : node.getGraph().getObjects()) { - if (object instanceof NodeIdentifier otherNode) { - node.getExtendedConduitData().onConnectTo(otherNode.getExtendedConduitData().cast()); + if (checkConnection.isInitialized()) { + for (var entry: lazyNodes.entrySet()) { + NodeIdentifier node = entry.getValue(); + IExtendedConduitData data = node.getExtendedConduitData(); + data.onCreated(entry.getKey(), level, worldPosition, null); + for (Direction dir : Direction.values()) { + tryConnectTo(dir, entry.getKey(), false, false).ifPresent(otherNode -> Graph.connect(node, otherNode)); + } + for (GraphObject object : node.getGraph().getObjects()) { + if (object instanceof NodeIdentifier otherNode) { + node.getExtendedConduitData().onConnectTo(otherNode.getExtendedConduitData().cast()); + } } + ConduitSavedData.addPotentialGraph(entry.getKey(), Objects.requireNonNull(node.getGraph()), serverLevel); } - ConduitSavedData.addPotentialGraph(entry.getKey(), Objects.requireNonNull(node.getGraph()), serverLevel); + bundle.onLoad(level, getBlockPos()); } - bundle.onLoad(level, getBlockPos()); } } From 3de078380c19b183a8a44406d9b43a8602921810 Mon Sep 17 00:00:00 2001 From: jollycar <939345+jollycar@users.noreply.github.com> Date: Thu, 10 Aug 2023 22:54:22 +0200 Subject: [PATCH 084/154] Oops remove imports --- .../enderio/conduits/common/blockentity/ConduitBlockEntity.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitBlockEntity.java b/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitBlockEntity.java index 49fe3e7904..ebcc555de1 100644 --- a/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitBlockEntity.java +++ b/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitBlockEntity.java @@ -1,6 +1,5 @@ package com.enderio.conduits.common.blockentity; -import appeng.api.networking.GridHelper; import com.enderio.api.UseOnly; import com.enderio.api.conduit.IConduitMenuData; import com.enderio.api.conduit.IConduitType; From 43873379aecfef66ac2aea4bbed8f036e9ac78bc Mon Sep 17 00:00:00 2001 From: agnor99 <36055315+agnor99@users.noreply.github.com> Date: Fri, 11 Aug 2023 00:19:12 +0200 Subject: [PATCH 085/154] undo #blamerover --- .../machines/common/blockentity/AlloySmelterBlockEntity.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/machines/java/com/enderio/machines/common/blockentity/AlloySmelterBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/AlloySmelterBlockEntity.java index 1f35dfdbe0..3055db38d1 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/AlloySmelterBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/AlloySmelterBlockEntity.java @@ -339,7 +339,7 @@ protected Optional findRecipe() { public void saveAdditional(CompoundTag pTag) { craftingTaskHost.save(pTag); - if (isPrimitiveSmelter()) { + if (!isPrimitiveSmelter()) { pTag.putInt(MachineNBTKeys.MACHINE_MODE, this.mode.ordinal()); } pTag.putInt(MachineNBTKeys.PROCESSED_INPUTS, craftingTaskHost.getContainer().getInputsTaken()); @@ -350,7 +350,7 @@ public void saveAdditional(CompoundTag pTag) { public void load(CompoundTag pTag) { craftingTaskHost.load(pTag); - if (isPrimitiveSmelter()) { + if (!isPrimitiveSmelter()) { try { mode = AlloySmelterMode.values()[pTag.getInt(MachineNBTKeys.MACHINE_MODE)]; } catch (IndexOutOfBoundsException ex) { // In case something happens in the future. From 75f3bf7185134eaa551cae1165d21f84a7cd54a0 Mon Sep 17 00:00:00 2001 From: jollycar <939345+jollycar@users.noreply.github.com> Date: Fri, 11 Aug 2023 01:18:58 +0200 Subject: [PATCH 086/154] AE2 conduits crashes server on chunkload If you try to create a IManagedGridNode inside an unloaded chunk, AE2 will throw an IllegalStateException. The documentation for IManagedGridNode.create() is clear: "This should only be called when the node is in a ticking chunk". The suggested solution is GridHelper.onFirstTick(). The fix: When calling AE2InWorldConduitNodeHost.onCreated(), use GridHelper.onFirstTick(). Also implement the review suggestions. closes #434 --- .../blockentity/ConduitBlockEntity.java | 24 ++++++++----------- .../ae2/AE2InWorldConduitNodeHost.java | 2 +- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitBlockEntity.java b/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitBlockEntity.java index ebcc555de1..11bb6327fb 100644 --- a/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitBlockEntity.java +++ b/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitBlockEntity.java @@ -115,22 +115,18 @@ public void onLoad() { updateShape(); if (level instanceof ServerLevel serverLevel) { sync(); - if (checkConnection.isInitialized()) { - for (var entry: lazyNodes.entrySet()) { - NodeIdentifier node = entry.getValue(); - IExtendedConduitData data = node.getExtendedConduitData(); - data.onCreated(entry.getKey(), level, worldPosition, null); - for (Direction dir : Direction.values()) { - tryConnectTo(dir, entry.getKey(), false, false).ifPresent(otherNode -> Graph.connect(node, otherNode)); - } - for (GraphObject object : node.getGraph().getObjects()) { - if (object instanceof NodeIdentifier otherNode) { - node.getExtendedConduitData().onConnectTo(otherNode.getExtendedConduitData().cast()); - } + bundle.onLoad(level, getBlockPos()); + for (var entry: lazyNodes.entrySet()) { + NodeIdentifier node = entry.getValue(); + for (Direction dir : Direction.values()) { + tryConnectTo(dir, entry.getKey(), false, false).ifPresent(otherNode -> Graph.connect(node, otherNode)); + } + for (GraphObject object : node.getGraph().getObjects()) { + if (object instanceof NodeIdentifier otherNode) { + node.getExtendedConduitData().onConnectTo(otherNode.getExtendedConduitData().cast()); } - ConduitSavedData.addPotentialGraph(entry.getKey(), Objects.requireNonNull(node.getGraph()), serverLevel); } - bundle.onLoad(level, getBlockPos()); + ConduitSavedData.addPotentialGraph(entry.getKey(), Objects.requireNonNull(node.getGraph()), serverLevel); } } } diff --git a/src/conduits/java/com/enderio/conduits/common/integrations/ae2/AE2InWorldConduitNodeHost.java b/src/conduits/java/com/enderio/conduits/common/integrations/ae2/AE2InWorldConduitNodeHost.java index db1fea9293..fa62b041d0 100644 --- a/src/conduits/java/com/enderio/conduits/common/integrations/ae2/AE2InWorldConduitNodeHost.java +++ b/src/conduits/java/com/enderio/conduits/common/integrations/ae2/AE2InWorldConduitNodeHost.java @@ -64,7 +64,7 @@ public void onCreated(IConduitType type, Level level, BlockPos pos, @Nullable if (player != null) { mainNode.setOwningPlayer(player); } - mainNode.create(level, pos); + GridHelper.onFirstTick(level.getBlockEntity(pos), blockEntity -> mainNode.create(level, pos)); } } From d68e73a79ffa584565361aa400d407b81eb6babc Mon Sep 17 00:00:00 2001 From: Rover656 <20544390+Rover656@users.noreply.github.com> Date: Fri, 11 Aug 2023 17:46:23 +0100 Subject: [PATCH 087/154] Hotfix for travel renderer on server --- src/api/java/com/enderio/api/travel/TravelEntry.java | 4 +++- src/api/java/com/enderio/api/travel/TravelRegistry.java | 5 +++-- src/machines/java/com/enderio/machines/EIOMachines.java | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/api/java/com/enderio/api/travel/TravelEntry.java b/src/api/java/com/enderio/api/travel/TravelEntry.java index 659205583d..9c410f4448 100644 --- a/src/api/java/com/enderio/api/travel/TravelEntry.java +++ b/src/api/java/com/enderio/api/travel/TravelEntry.java @@ -5,5 +5,7 @@ import net.minecraftforge.common.util.Lazy; import java.util.function.Function; +import java.util.function.Supplier; + public record TravelEntry(ResourceLocation serializationName, Function constructor, - Lazy> renderer) {} + Supplier>> renderer) {} diff --git a/src/api/java/com/enderio/api/travel/TravelRegistry.java b/src/api/java/com/enderio/api/travel/TravelRegistry.java index b74ff9a784..6ce7eefe48 100644 --- a/src/api/java/com/enderio/api/travel/TravelRegistry.java +++ b/src/api/java/com/enderio/api/travel/TravelRegistry.java @@ -9,6 +9,7 @@ import java.util.Map; import java.util.Optional; import java.util.function.Function; +import java.util.function.Supplier; @ApiStatus.Internal public class TravelRegistry { @@ -16,7 +17,7 @@ public class TravelRegistry { private static final Map> registry = new HashMap<>(); public static void addTravelEntry(ResourceLocation serializationName, Function constructor, - Lazy> renderer) { + Supplier>> renderer) { registry.put(serializationName, new TravelEntry<>(serializationName, constructor, renderer)); } @@ -25,7 +26,7 @@ public static void addTravelEntry(TravelEntry trave } public static TravelRenderer getRenderer(T entry) { - return (TravelRenderer) registry.get(entry.getSerializationName()).renderer().get(); + return (TravelRenderer) registry.get(entry.getSerializationName()).renderer().get().get(); } public static Optional deserialize(CompoundTag nbt) { diff --git a/src/machines/java/com/enderio/machines/EIOMachines.java b/src/machines/java/com/enderio/machines/EIOMachines.java index ddae2d2668..d9db04887f 100644 --- a/src/machines/java/com/enderio/machines/EIOMachines.java +++ b/src/machines/java/com/enderio/machines/EIOMachines.java @@ -64,7 +64,7 @@ public static void onConstruct(FMLConstructModEvent event) { MinecraftForge.EVENT_BUS.addListener(EIOMachines::missingMappings); IntegrationManager.addIntegration(EnderIOMachinesSelfIntegration.INSTANCE); - TravelRegistry.addTravelEntry(EnderIO.loc("travel_anchor"), AnchorTravelTarget::new, TravelAnchorRenderer::new); + TravelRegistry.addTravelEntry(EnderIO.loc("travel_anchor"), AnchorTravelTarget::new, () -> TravelAnchorRenderer::new); } @SubscribeEvent From 26c61229462065882065aca53783a89a5cf5d1eb Mon Sep 17 00:00:00 2001 From: mystchonky Date: Fri, 11 Aug 2023 23:17:49 +0530 Subject: [PATCH 088/154] add recipe for travel anchor and staff or travelling --- .../recipes/misc/travel_anchor.json | 35 +++++++++++++++++++ .../recipes/tools/staff_of_travelling.json | 35 +++++++++++++++++++ .../enderio/recipes/staff_of_travelling.json | 21 +++++++++++ .../data/enderio/recipes/travel_anchor.json | 24 +++++++++++++ .../data/recipes/MachineRecipeProvider.java | 11 ++++++ .../enderio/base/data/recipe/ItemRecipes.java | 10 ++++++ 6 files changed, 136 insertions(+) create mode 100644 src/generated/resources/data/enderio/advancements/recipes/misc/travel_anchor.json create mode 100644 src/generated/resources/data/enderio/advancements/recipes/tools/staff_of_travelling.json create mode 100644 src/generated/resources/data/enderio/recipes/staff_of_travelling.json create mode 100644 src/generated/resources/data/enderio/recipes/travel_anchor.json diff --git a/src/generated/resources/data/enderio/advancements/recipes/misc/travel_anchor.json b/src/generated/resources/data/enderio/advancements/recipes/misc/travel_anchor.json new file mode 100644 index 0000000000..dd95afec7d --- /dev/null +++ b/src/generated/resources/data/enderio/advancements/recipes/misc/travel_anchor.json @@ -0,0 +1,35 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient": { + "conditions": { + "items": [ + { + "items": [ + "enderio:pulsating_crystal" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "enderio:travel_anchor" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_ingredient", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "enderio:travel_anchor" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/src/generated/resources/data/enderio/advancements/recipes/tools/staff_of_travelling.json b/src/generated/resources/data/enderio/advancements/recipes/tools/staff_of_travelling.json new file mode 100644 index 0000000000..13934f734a --- /dev/null +++ b/src/generated/resources/data/enderio/advancements/recipes/tools/staff_of_travelling.json @@ -0,0 +1,35 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient": { + "conditions": { + "items": [ + { + "items": [ + "enderio:ender_crystal" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "enderio:staff_of_travelling" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_ingredient", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "enderio:staff_of_travelling" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/src/generated/resources/data/enderio/recipes/staff_of_travelling.json b/src/generated/resources/data/enderio/recipes/staff_of_travelling.json new file mode 100644 index 0000000000..9233cf2357 --- /dev/null +++ b/src/generated/resources/data/enderio/recipes/staff_of_travelling.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "equipment", + "key": { + "C": { + "item": "enderio:ender_crystal" + }, + "I": { + "item": "enderio:dark_steel_ingot" + } + }, + "pattern": [ + " C", + " I ", + "I " + ], + "result": { + "item": "enderio:staff_of_travelling" + }, + "show_notification": true +} \ No newline at end of file diff --git a/src/generated/resources/data/enderio/recipes/travel_anchor.json b/src/generated/resources/data/enderio/recipes/travel_anchor.json new file mode 100644 index 0000000000..5f6e76c3c7 --- /dev/null +++ b/src/generated/resources/data/enderio/recipes/travel_anchor.json @@ -0,0 +1,24 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "B": { + "item": "enderio:conduit_binder" + }, + "C": { + "item": "enderio:pulsating_crystal" + }, + "I": { + "tag": "forge:ingots/iron" + } + }, + "pattern": [ + "IBI", + "BCB", + "IBI" + ], + "result": { + "item": "enderio:travel_anchor" + }, + "show_notification": true +} \ No newline at end of file diff --git a/src/machines/java/com/enderio/machines/data/recipes/MachineRecipeProvider.java b/src/machines/java/com/enderio/machines/data/recipes/MachineRecipeProvider.java index 609f6160bf..d061e2af89 100644 --- a/src/machines/java/com/enderio/machines/data/recipes/MachineRecipeProvider.java +++ b/src/machines/java/com/enderio/machines/data/recipes/MachineRecipeProvider.java @@ -319,5 +319,16 @@ protected void buildRecipes(Consumer finishedRecipeConsumer) { .define('A', EIOItems.REDSTONE_ALLOY_INGOT) .unlockedBy("has_ingredient", InventoryChangeTrigger.TriggerInstance.hasItems(EIOBlocks.VOID_CHASSIS)) .save(finishedRecipeConsumer); + + ShapedRecipeBuilder + .shaped(RecipeCategory.MISC, MachineBlocks.TRAVEL_ANCHOR.get()) + .define('I', Tags.Items.INGOTS_IRON) + .define('C', EIOItems.PULSATING_CRYSTAL.get()) + .define('B', EIOItems.CONDUIT_BINDER) + .pattern("IBI") + .pattern("BCB") + .pattern("IBI") + .unlockedBy("has_ingredient", InventoryChangeTrigger.TriggerInstance.hasItems(ItemPredicate.Builder.item().of(EIOItems.PULSATING_CRYSTAL).build())) + .save(finishedRecipeConsumer); } } diff --git a/src/main/java/com/enderio/base/data/recipe/ItemRecipes.java b/src/main/java/com/enderio/base/data/recipe/ItemRecipes.java index 1aa0fd1f71..b0c2d81295 100644 --- a/src/main/java/com/enderio/base/data/recipe/ItemRecipes.java +++ b/src/main/java/com/enderio/base/data/recipe/ItemRecipes.java @@ -112,6 +112,16 @@ private void addTools(Consumer recipeConsumer) { .pattern("R ") .unlockedBy("has_ingredient", InventoryChangeTrigger.TriggerInstance.hasItems(EIOItems.PULSATING_CRYSTAL.get())) .save(recipeConsumer); + + ShapedRecipeBuilder + .shaped(RecipeCategory.TOOLS, EIOItems.TRAVEL_STAFF.get()) + .define('C', EIOItems.ENDER_CRYSTAL.get()) + .define('I', EIOItems.DARK_STEEL_INGOT.get()) + .pattern(" C") + .pattern(" I ") + .pattern("I ") + .unlockedBy("has_ingredient", InventoryChangeTrigger.TriggerInstance.hasItems(EIOItems.ENDER_CRYSTAL.get())) + .save(recipeConsumer); } private void addDarkSteelTools(Consumer recipeConsumer) { From 87b3d19f1cfe30f8dd675a22edb5508bc0538f1d Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Sat, 12 Aug 2023 16:28:04 +0200 Subject: [PATCH 089/154] fix client and save --- .../machines/common/block/TravelAnchorBlock.java | 11 +++++++++++ .../blockentity/TravelAnchorBlockEntity.java | 4 +++- .../base/common/travel/TravelSavedData.java | 15 +++++++++++++-- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java b/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java index 6cb85453ae..65f9b36bca 100644 --- a/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java +++ b/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java @@ -1,10 +1,13 @@ package com.enderio.machines.common.block; import com.enderio.base.common.handler.TravelHandler; +import com.enderio.base.common.travel.TravelSavedData; +import com.enderio.machines.common.blockentity.TravelAnchorBlockEntity; import com.enderio.machines.common.init.MachineBlockEntities; import net.minecraft.core.BlockPos; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.player.Player; +import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.event.TickEvent; @@ -59,4 +62,12 @@ private static PlayerSneakEntry getLastSneakEntry(ServerPlayer player){ } private record PlayerSneakEntry(boolean isSneaking, int atTime){} + + @Override + public void onRemove(BlockState state, Level level, BlockPos pos, BlockState newState, boolean movedByPiston) { + if (level.getBlockEntity(pos) instanceof TravelAnchorBlockEntity anchorBlock) { + TravelSavedData.getTravelData(level).removeTravelTargetAt(pos); + } + super.onRemove(state, level, pos, newState, movedByPiston); + } } diff --git a/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java index f443947a2d..6d5234444e 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java @@ -66,7 +66,9 @@ protected void onInventoryContentsChanged(int slot) { @Override public void setRemoved() { - getTravelData().removeTravelTargetAt(worldPosition); + if (level == null || level.isClientSide) { + getTravelData().removeTravelTargetAt(worldPosition); + } super.setRemoved(); } diff --git a/src/main/java/com/enderio/base/common/travel/TravelSavedData.java b/src/main/java/com/enderio/base/common/travel/TravelSavedData.java index aab38b659b..29ed79c33c 100644 --- a/src/main/java/com/enderio/base/common/travel/TravelSavedData.java +++ b/src/main/java/com/enderio/base/common/travel/TravelSavedData.java @@ -8,8 +8,12 @@ import net.minecraft.nbt.ListTag; import net.minecraft.nbt.Tag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.Level; import net.minecraft.world.level.saveddata.SavedData; +import net.minecraftforge.event.entity.EntityJoinLevelEvent; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.common.Mod; import java.util.Collection; import java.util.HashMap; @@ -17,9 +21,10 @@ import java.util.Optional; import java.util.stream.Stream; +@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.FORGE) public class TravelSavedData extends SavedData { - private static final TravelSavedData INSTANCE = new TravelSavedData(); + private static TravelSavedData INSTANCE = new TravelSavedData(); private final Map travelTargets = new HashMap<>(); @@ -44,7 +49,6 @@ public static TravelSavedData getTravelData(Level level) { } public Optional getTravelTarget(BlockPos pos) { - boolean test = travelTargets.keySet().contains(pos); return Optional.ofNullable(travelTargets.get(pos)); } @@ -82,4 +86,11 @@ public CompoundTag save(CompoundTag nbt) { public boolean isDirty() { return true; } + + @SubscribeEvent + static void resetClient(EntityJoinLevelEvent event) { + if (event.getEntity().level().isClientSide && event.getEntity() instanceof Player) { + INSTANCE = new TravelSavedData(); + } + } } From dfe4473ed7791f73d8811f204760f816ce8819ab Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Sat, 12 Aug 2023 16:34:28 +0200 Subject: [PATCH 090/154] update --- .../enderio/blockstates/mob_generator.json | 16 ++++++++-------- .../models/block/mob_generator_combined.json | 16 ++++++++++++++++ .../eio_soul/generator/minecraft_blaze.json | 4 ++-- .../eio_soul/generator/minecraft_enderman.json | 2 +- .../eio_soul/generator/minecraft_husk.json | 4 ++-- .../eio_soul/generator/minecraft_zombie.json | 4 ++-- .../generator/minecraft_zombie_villager.json | 4 ++-- .../recipes/soulbinding/mob_generator.json | 10 ---------- .../minecraft/tags/blocks/needs_iron_tool.json | 3 ++- .../data/recipes/SoulBindingRecipeProvider.java | 2 -- .../machines/data/souldata/SoulDataProvider.java | 10 +++++----- 11 files changed, 40 insertions(+), 35 deletions(-) create mode 100644 src/generated/resources/assets/enderio/models/block/mob_generator_combined.json delete mode 100644 src/generated/resources/data/enderio/recipes/soulbinding/mob_generator.json diff --git a/src/generated/resources/assets/enderio/blockstates/mob_generator.json b/src/generated/resources/assets/enderio/blockstates/mob_generator.json index 8d77b0a7db..1568c2ecbb 100644 --- a/src/generated/resources/assets/enderio/blockstates/mob_generator.json +++ b/src/generated/resources/assets/enderio/blockstates/mob_generator.json @@ -1,33 +1,33 @@ { "variants": { "facing=east,powered=false": { - "model": "enderio:block/mob_generator", + "model": "enderio:block/mob_generator_combined", "y": 90 }, "facing=east,powered=true": { - "model": "enderio:block/mob_generator_active", + "model": "enderio:block/mob_generator_combined", "y": 90 }, "facing=north,powered=false": { - "model": "enderio:block/mob_generator" + "model": "enderio:block/mob_generator_combined" }, "facing=north,powered=true": { - "model": "enderio:block/mob_generator_active" + "model": "enderio:block/mob_generator_combined" }, "facing=south,powered=false": { - "model": "enderio:block/mob_generator", + "model": "enderio:block/mob_generator_combined", "y": 180 }, "facing=south,powered=true": { - "model": "enderio:block/mob_generator_active", + "model": "enderio:block/mob_generator_combined", "y": 180 }, "facing=west,powered=false": { - "model": "enderio:block/mob_generator", + "model": "enderio:block/mob_generator_combined", "y": 270 }, "facing=west,powered=true": { - "model": "enderio:block/mob_generator_active", + "model": "enderio:block/mob_generator_combined", "y": 270 } } diff --git a/src/generated/resources/assets/enderio/models/block/mob_generator_combined.json b/src/generated/resources/assets/enderio/models/block/mob_generator_combined.json new file mode 100644 index 0000000000..58ec9a4761 --- /dev/null +++ b/src/generated/resources/assets/enderio/models/block/mob_generator_combined.json @@ -0,0 +1,16 @@ +{ + "parent": "minecraft:block/block", + "children": { + "machine": { + "parent": "enderio:block/mob_generator_active" + }, + "overlay": { + "parent": "enderio:block/io_overlay" + } + }, + "item_render_order": [ + "machine", + "overlay" + ], + "loader": "forge:composite" +} \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/generator/minecraft_blaze.json b/src/generated/resources/data/enderio/eio_soul/generator/minecraft_blaze.json index 1c26396a8b..e8ea7a5b83 100644 --- a/src/generated/resources/data/enderio/eio_soul/generator/minecraft_blaze.json +++ b/src/generated/resources/data/enderio/eio_soul/generator/minecraft_blaze.json @@ -1,6 +1,6 @@ { "entity": "minecraft:blaze", "fluid": "#minecraft:lava", - "power/mb": 800, - "tick/mb": 20 + "power/mb": 300, + "tick/mb": 15 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/generator/minecraft_enderman.json b/src/generated/resources/data/enderio/eio_soul/generator/minecraft_enderman.json index 66fdf50af4..388de2060a 100644 --- a/src/generated/resources/data/enderio/eio_soul/generator/minecraft_enderman.json +++ b/src/generated/resources/data/enderio/eio_soul/generator/minecraft_enderman.json @@ -1,6 +1,6 @@ { "entity": "minecraft:enderman", "fluid": "enderio:flowing_dew_of_the_void", - "power/mb": 2000, + "power/mb": 900, "tick/mb": 10 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/generator/minecraft_husk.json b/src/generated/resources/data/enderio/eio_soul/generator/minecraft_husk.json index a4c396f2cf..4046a0d550 100644 --- a/src/generated/resources/data/enderio/eio_soul/generator/minecraft_husk.json +++ b/src/generated/resources/data/enderio/eio_soul/generator/minecraft_husk.json @@ -1,6 +1,6 @@ { "entity": "minecraft:husk", "fluid": "enderio:flowing_nutrient_distillation", - "power/mb": 900, - "tick/mb": 20 + "power/mb": 500, + "tick/mb": 15 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/generator/minecraft_zombie.json b/src/generated/resources/data/enderio/eio_soul/generator/minecraft_zombie.json index 41e97320ca..706ea5c0dc 100644 --- a/src/generated/resources/data/enderio/eio_soul/generator/minecraft_zombie.json +++ b/src/generated/resources/data/enderio/eio_soul/generator/minecraft_zombie.json @@ -1,6 +1,6 @@ { "entity": "minecraft:zombie", "fluid": "enderio:flowing_nutrient_distillation", - "power/mb": 900, - "tick/mb": 20 + "power/mb": 500, + "tick/mb": 15 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/eio_soul/generator/minecraft_zombie_villager.json b/src/generated/resources/data/enderio/eio_soul/generator/minecraft_zombie_villager.json index 06b5b3049f..85c8de7077 100644 --- a/src/generated/resources/data/enderio/eio_soul/generator/minecraft_zombie_villager.json +++ b/src/generated/resources/data/enderio/eio_soul/generator/minecraft_zombie_villager.json @@ -1,6 +1,6 @@ { "entity": "minecraft:zombie_villager", "fluid": "enderio:flowing_nutrient_distillation", - "power/mb": 900, - "tick/mb": 20 + "power/mb": 500, + "tick/mb": 15 } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/recipes/soulbinding/mob_generator.json b/src/generated/resources/data/enderio/recipes/soulbinding/mob_generator.json deleted file mode 100644 index 8339353530..0000000000 --- a/src/generated/resources/data/enderio/recipes/soulbinding/mob_generator.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "type": "enderio:soul_binding", - "energy": 25000, - "exp": 1, - "input": { - "item": "enderio:mob_generator" - }, - "output": "enderio:mob_generator", - "souldata": "generator" -} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/blocks/needs_iron_tool.json b/src/generated/resources/data/minecraft/tags/blocks/needs_iron_tool.json index a7e24fbdce..cf5b5b329b 100644 --- a/src/generated/resources/data/minecraft/tags/blocks/needs_iron_tool.json +++ b/src/generated/resources/data/minecraft/tags/blocks/needs_iron_tool.json @@ -22,6 +22,7 @@ "enderio:vacuum_chest", "enderio:xp_vacuum", "enderio:travel_anchor", - "enderio:crafter" + "enderio:crafter", + "enderio:mob_generator" ] } \ No newline at end of file diff --git a/src/machines/java/com/enderio/machines/data/recipes/SoulBindingRecipeProvider.java b/src/machines/java/com/enderio/machines/data/recipes/SoulBindingRecipeProvider.java index e1daf18147..2d84c579be 100644 --- a/src/machines/java/com/enderio/machines/data/recipes/SoulBindingRecipeProvider.java +++ b/src/machines/java/com/enderio/machines/data/recipes/SoulBindingRecipeProvider.java @@ -4,9 +4,7 @@ import com.enderio.base.common.init.EIOItems; import com.enderio.base.data.recipe.RecipeDataUtil; import com.enderio.core.data.recipes.EnderRecipeProvider; -import com.enderio.machines.common.init.MachineBlocks; import com.enderio.machines.common.init.MachineRecipes; -import com.enderio.machines.common.souldata.GeneratorSoul; import com.google.gson.JsonObject; import net.minecraft.data.PackOutput; import net.minecraft.data.recipes.FinishedRecipe; diff --git a/src/machines/java/com/enderio/machines/data/souldata/SoulDataProvider.java b/src/machines/java/com/enderio/machines/data/souldata/SoulDataProvider.java index b381a1295b..8987d3d51a 100644 --- a/src/machines/java/com/enderio/machines/data/souldata/SoulDataProvider.java +++ b/src/machines/java/com/enderio/machines/data/souldata/SoulDataProvider.java @@ -111,11 +111,11 @@ public void buildSoulData(Consumer> finshedSoulDataConsumer) addSpawnerData(EntityType.ZOMBIE_VILLAGER, 51_200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); addSpawnerData(EntityType.ZOMBIFIED_PIGLIN, 51_200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addGeneratorData(EntityType.BLAZE, FluidTags.LAVA, 800, 20, finshedSoulDataConsumer); - addGeneratorData(EntityType.ZOMBIE, EIOFluids.NUTRIENT_DISTILLATION.get(), 900, 20, finshedSoulDataConsumer); - addGeneratorData(EntityType.ZOMBIE_VILLAGER, EIOFluids.NUTRIENT_DISTILLATION.get(), 900, 20, finshedSoulDataConsumer); - addGeneratorData(EntityType.HUSK, EIOFluids.NUTRIENT_DISTILLATION.get(), 900, 20, finshedSoulDataConsumer); - addGeneratorData(EntityType.ENDERMAN, EIOFluids.DEW_OF_THE_VOID.get(), 2000, 10, finshedSoulDataConsumer); + addGeneratorData(EntityType.BLAZE, FluidTags.LAVA, 300, 15, finshedSoulDataConsumer); + addGeneratorData(EntityType.ZOMBIE, EIOFluids.NUTRIENT_DISTILLATION.get(), 500, 15, finshedSoulDataConsumer); + addGeneratorData(EntityType.ZOMBIE_VILLAGER, EIOFluids.NUTRIENT_DISTILLATION.get(), 500, 15, finshedSoulDataConsumer); + addGeneratorData(EntityType.HUSK, EIOFluids.NUTRIENT_DISTILLATION.get(), 500, 15, finshedSoulDataConsumer); + addGeneratorData(EntityType.ENDERMAN, EIOFluids.DEW_OF_THE_VOID.get(), 900, 10, finshedSoulDataConsumer); } From 33cb6fe280fe299f32c39c259c5b63fd43ca4cfa Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Sat, 12 Aug 2023 19:40:11 +0200 Subject: [PATCH 091/154] add jei support --- .../blockentity/MobGeneratorBlockEntity.java | 2 +- .../integrations/jei/MachineJEIRecipes.java | 5 + .../common/integrations/jei/MachinesJEI.java | 6 ++ .../jei/category/MobGeneratorCategory.java | 94 +++++++++++++++++++ 4 files changed, 106 insertions(+), 1 deletion(-) create mode 100644 src/machines/java/com/enderio/machines/common/integrations/jei/category/MobGeneratorCategory.java diff --git a/src/machines/java/com/enderio/machines/common/blockentity/MobGeneratorBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/MobGeneratorBlockEntity.java index f95c83ac99..727bb2dbea 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/MobGeneratorBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/MobGeneratorBlockEntity.java @@ -44,7 +44,7 @@ public class MobGeneratorBlockEntity extends PoweredMachineBlockEntity { private static final QuadraticScalable CAPACITY = new QuadraticScalable(CapacitorModifier.ENERGY_CAPACITY, MachinesConfig.COMMON.ENERGY.MOB_GENERATOR_CAPACITY); private static final String BURNED_TICKS = "burnedTicks"; private StoredEntityData entityData = StoredEntityData.empty(); - private static final int FLUID_CAPACITY = 2 * FluidType.BUCKET_VOLUME; + public static final int FLUID_CAPACITY = 2 * FluidType.BUCKET_VOLUME; @Nullable private GeneratorSoul.SoulData soulData; private int burnedTicks = 0; diff --git a/src/machines/java/com/enderio/machines/common/integrations/jei/MachineJEIRecipes.java b/src/machines/java/com/enderio/machines/common/integrations/jei/MachineJEIRecipes.java index be9e242e29..08d7eedc4e 100644 --- a/src/machines/java/com/enderio/machines/common/integrations/jei/MachineJEIRecipes.java +++ b/src/machines/java/com/enderio/machines/common/integrations/jei/MachineJEIRecipes.java @@ -4,6 +4,7 @@ import com.enderio.machines.common.integrations.jei.util.WrappedEnchanterRecipe; import com.enderio.machines.common.integrations.vanilla.VanillaAlloySmeltingRecipe; import com.enderio.machines.common.recipe.*; +import com.enderio.machines.common.souldata.GeneratorSoul; import net.minecraft.client.Minecraft; import net.minecraft.client.multiplayer.ClientLevel; import net.minecraft.world.item.crafting.RecipeManager; @@ -56,4 +57,8 @@ public List getEnchanterRecipes() { public List getSagmillingRecipes() { return recipeManager.getAllRecipesFor(MachineRecipes.SAGMILLING.type().get()); } + + public List getMobGeneratorRecipes() { + return GeneratorSoul.GENERATOR.map.values().stream().toList(); + } } diff --git a/src/machines/java/com/enderio/machines/common/integrations/jei/MachinesJEI.java b/src/machines/java/com/enderio/machines/common/integrations/jei/MachinesJEI.java index bc2e96e5ef..cf5aed4126 100644 --- a/src/machines/java/com/enderio/machines/common/integrations/jei/MachinesJEI.java +++ b/src/machines/java/com/enderio/machines/common/integrations/jei/MachinesJEI.java @@ -33,6 +33,8 @@ public void registerRecipeCatalysts(IRecipeCatalystRegistration registration) { registration.addRecipeCatalyst(new ItemStack(MachineBlocks.SOUL_BINDER.get()), SoulBindingCategory.TYPE); registration.addRecipeCatalyst(new ItemStack(MachineBlocks.FLUID_TANK.get()), TankCategory.TYPE); registration.addRecipeCatalyst(new ItemStack(MachineBlocks.PRESSURIZED_FLUID_TANK.get()), TankCategory.TYPE); + + registration.addRecipeCatalyst(new ItemStack(MachineBlocks.MOB_GENERATOR.get()), MobGeneratorCategory.TYPE); } @Override @@ -44,6 +46,8 @@ public void registerCategories(IRecipeCategoryRegistration registration) { registration.addRecipeCategories(new SlicingRecipeCategory(registration.getJeiHelpers().getGuiHelper())); registration.addRecipeCategories(new SoulBindingCategory(registration.getJeiHelpers().getGuiHelper())); registration.addRecipeCategories(new TankCategory(registration.getJeiHelpers().getGuiHelper())); + + registration.addRecipeCategories(new MobGeneratorCategory(registration.getJeiHelpers().getGuiHelper())); } @Override @@ -57,6 +61,8 @@ public void registerRecipes(IRecipeRegistration registration) { registration.addRecipes(SlicingRecipeCategory.TYPE, recipes.getSlicingRecipes()); registration.addRecipes(SoulBindingCategory.TYPE, recipes.getSoulBindingRecipes()); registration.addRecipes(TankCategory.TYPE, recipes.getTankRecipes()); + + registration.addRecipes(MobGeneratorCategory.TYPE, recipes.getMobGeneratorRecipes()); } @Override diff --git a/src/machines/java/com/enderio/machines/common/integrations/jei/category/MobGeneratorCategory.java b/src/machines/java/com/enderio/machines/common/integrations/jei/category/MobGeneratorCategory.java new file mode 100644 index 0000000000..e28dc45771 --- /dev/null +++ b/src/machines/java/com/enderio/machines/common/integrations/jei/category/MobGeneratorCategory.java @@ -0,0 +1,94 @@ +package com.enderio.machines.common.integrations.jei.category; + +import com.enderio.EnderIO; +import com.enderio.machines.client.gui.screen.MobGeneratorScreen; +import com.enderio.machines.common.blockentity.MobGeneratorBlockEntity; +import com.enderio.machines.common.init.MachineBlocks; +import com.enderio.machines.common.lang.MachineLang; +import com.enderio.machines.common.souldata.GeneratorSoul; +import mezz.jei.api.forge.ForgeTypes; +import mezz.jei.api.gui.builder.IRecipeLayoutBuilder; +import mezz.jei.api.gui.drawable.IDrawable; +import mezz.jei.api.gui.drawable.IDrawableStatic; +import mezz.jei.api.gui.ingredient.IRecipeSlotsView; +import mezz.jei.api.helpers.IGuiHelper; +import mezz.jei.api.recipe.IFocusGroup; +import mezz.jei.api.recipe.RecipeIngredientRole; +import mezz.jei.api.recipe.RecipeType; +import mezz.jei.api.recipe.category.IRecipeCategory; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiGraphics; +import net.minecraft.core.Holder; +import net.minecraft.core.registries.Registries; +import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.tags.TagKey; +import net.minecraft.world.entity.EntityType; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.material.Fluid; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.registries.ForgeRegistries; + +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; + +public class MobGeneratorCategory implements IRecipeCategory { + + public static final RecipeType TYPE = RecipeType.create(EnderIO.MODID, "mob_generator", GeneratorSoul.SoulData.class); + private final IDrawableStatic background; + private final IDrawable icon; + + public MobGeneratorCategory(IGuiHelper guiHelper) { + this.background = guiHelper.createDrawable(MobGeneratorScreen.BG_TEXTURE, 41, 18, 124, 53); + this.icon = guiHelper.createDrawableItemStack(new ItemStack(MachineBlocks.MOB_GENERATOR.get())); + } + @Override + public RecipeType getRecipeType() { + return TYPE; + } + + @Override + public Component getTitle() { + return MachineLang.CATEGORY_ALLOY_SMELTING; + } + + @Override + public IDrawable getBackground() { + return background; + } + + @Override + public IDrawable getIcon() { + return icon; + } + + @Override + public void setRecipe(IRecipeLayoutBuilder builder, GeneratorSoul.SoulData recipe, IFocusGroup focuses) { + List list = new ArrayList<>(); + String fluid = recipe.fluid(); + if (fluid.startsWith("#")) { //We have a fluid tag instead + TagKey tag = TagKey.create(Registries.FLUID, new ResourceLocation(fluid.substring(1))); + ForgeRegistries.FLUIDS.tags().getTag(tag).stream().forEach(f -> list.add(new FluidStack(f, MobGeneratorBlockEntity.FLUID_CAPACITY))); + } else { + Optional> delegate = ForgeRegistries.FLUIDS.getDelegate(new ResourceLocation(fluid)); + delegate.ifPresent(fluidReference -> list.add(new FluidStack(fluidReference.get(), MobGeneratorBlockEntity.FLUID_CAPACITY))); + } + + builder.addSlot(RecipeIngredientRole.INPUT, 39, 3) + .addIngredients(ForgeTypes.FLUID_STACK, list) + .setFluidRenderer(MobGeneratorBlockEntity.FLUID_CAPACITY, false, 16, 47); + } + + @Override + public void draw(GeneratorSoul.SoulData recipe, IRecipeSlotsView recipeSlotsView, GuiGraphics guiGraphics, double mouseX, double mouseY) { + EntityType value = ForgeRegistries.ENTITY_TYPES.getValue(recipe.entitytype()); + if (recipe.getKey().equals(ForgeRegistries.ENTITY_TYPES.getKey(value))) { + guiGraphics.drawString(Minecraft.getInstance().font, value.getDescription().getString(), 60, 5, 4210752, false); + } + + guiGraphics.drawString(Minecraft.getInstance().font, recipe.tickpermb() + " t/mb", 68 - Minecraft.getInstance().font.width(recipe.tickpermb() + "") / 2f, 30, 4210752, false); + guiGraphics.drawString(Minecraft.getInstance().font, recipe.powerpermb() + " µI/mb", 68 - Minecraft.getInstance().font.width(recipe.powerpermb() + "") / 2f, 40, 4210752, false); + + } +} From 1c2322a013f56335da2cf2ff0f93baa00c30c910 Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Sat, 12 Aug 2023 19:48:47 +0200 Subject: [PATCH 092/154] Update MobGeneratorCategory.java --- .../jei/category/MobGeneratorCategory.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/machines/java/com/enderio/machines/common/integrations/jei/category/MobGeneratorCategory.java b/src/machines/java/com/enderio/machines/common/integrations/jei/category/MobGeneratorCategory.java index e28dc45771..248898cd88 100644 --- a/src/machines/java/com/enderio/machines/common/integrations/jei/category/MobGeneratorCategory.java +++ b/src/machines/java/com/enderio/machines/common/integrations/jei/category/MobGeneratorCategory.java @@ -1,6 +1,9 @@ package com.enderio.machines.common.integrations.jei.category; import com.enderio.EnderIO; +import com.enderio.api.capability.StoredEntityData; +import com.enderio.base.common.init.EIOCapabilities; +import com.enderio.base.common.init.EIOItems; import com.enderio.machines.client.gui.screen.MobGeneratorScreen; import com.enderio.machines.common.blockentity.MobGeneratorBlockEntity; import com.enderio.machines.common.init.MachineBlocks; @@ -26,6 +29,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.material.Fluid; +import net.minecraftforge.common.ForgeSpawnEggItem; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.registries.ForgeRegistries; @@ -78,6 +82,20 @@ public void setRecipe(IRecipeLayoutBuilder builder, GeneratorSoul.SoulData recip builder.addSlot(RecipeIngredientRole.INPUT, 39, 3) .addIngredients(ForgeTypes.FLUID_STACK, list) .setFluidRenderer(MobGeneratorBlockEntity.FLUID_CAPACITY, false, 16, 47); + + EntityType value = ForgeRegistries.ENTITY_TYPES.getValue(recipe.entitytype()); + if (recipe.getKey().equals(ForgeRegistries.ENTITY_TYPES.getKey(value))) { + if (ForgeSpawnEggItem.fromEntityType(value) != null) { + builder.addInvisibleIngredients(RecipeIngredientRole.INPUT) + .addItemStack(new ItemStack(ForgeSpawnEggItem.fromEntityType(value))); + } + + ItemStack stack = new ItemStack(EIOItems.FILLED_SOUL_VIAL); + stack.getCapability(EIOCapabilities.ENTITY_STORAGE).ifPresent(c -> c.setStoredEntityData(StoredEntityData.of(recipe.entitytype()))); + builder.addInvisibleIngredients(RecipeIngredientRole.INPUT) + .addItemStack(stack); + } + } @Override From 0b562d281b2b7a75f6e3ecbcec67547e7116082d Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Sat, 12 Aug 2023 20:01:43 +0200 Subject: [PATCH 093/154] use a dimension based map instead --- .../base/common/travel/TravelSavedData.java | 22 +++++++------------ 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/src/main/java/com/enderio/base/common/travel/TravelSavedData.java b/src/main/java/com/enderio/base/common/travel/TravelSavedData.java index 29ed79c33c..106bc8e7c8 100644 --- a/src/main/java/com/enderio/base/common/travel/TravelSavedData.java +++ b/src/main/java/com/enderio/base/common/travel/TravelSavedData.java @@ -7,13 +7,10 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.ListTag; import net.minecraft.nbt.Tag; +import net.minecraft.resources.ResourceKey; import net.minecraft.server.level.ServerLevel; -import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.Level; import net.minecraft.world.level.saveddata.SavedData; -import net.minecraftforge.event.entity.EntityJoinLevelEvent; -import net.minecraftforge.eventbus.api.SubscribeEvent; -import net.minecraftforge.fml.common.Mod; import java.util.Collection; import java.util.HashMap; @@ -21,10 +18,9 @@ import java.util.Optional; import java.util.stream.Stream; -@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.FORGE) public class TravelSavedData extends SavedData { - private static TravelSavedData INSTANCE = new TravelSavedData(); + private static final Map, TravelSavedData> CLIENT_DATA = new HashMap<>(); private final Map travelTargets = new HashMap<>(); @@ -44,7 +40,12 @@ public static TravelSavedData getTravelData(Level level) { if (level instanceof ServerLevel serverLevel) { return serverLevel.getDataStorage().computeIfAbsent(TravelSavedData::new, TravelSavedData::new, "enderio_traveldata"); } else { - return INSTANCE; + if (CLIENT_DATA.containsKey(level.dimension())) { + return CLIENT_DATA.get(level.dimension()); + } + TravelSavedData data = new TravelSavedData(); + CLIENT_DATA.put(level.dimension(), data); + return data; } } @@ -86,11 +87,4 @@ public CompoundTag save(CompoundTag nbt) { public boolean isDirty() { return true; } - - @SubscribeEvent - static void resetClient(EntityJoinLevelEvent event) { - if (event.getEntity().level().isClientSide && event.getEntity() instanceof Player) { - INSTANCE = new TravelSavedData(); - } - } } From 30bab00b2822229a358a5f82d5046af0959c7fa5 Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Sun, 13 Aug 2023 00:43:58 +0200 Subject: [PATCH 094/154] Update TravelSavedData.java --- .../enderio/base/common/travel/TravelSavedData.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/enderio/base/common/travel/TravelSavedData.java b/src/main/java/com/enderio/base/common/travel/TravelSavedData.java index 106bc8e7c8..9ebd4e2609 100644 --- a/src/main/java/com/enderio/base/common/travel/TravelSavedData.java +++ b/src/main/java/com/enderio/base/common/travel/TravelSavedData.java @@ -11,6 +11,9 @@ import net.minecraft.server.level.ServerLevel; import net.minecraft.world.level.Level; import net.minecraft.world.level.saveddata.SavedData; +import net.minecraftforge.event.server.ServerStoppedEvent; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.common.Mod; import java.util.Collection; import java.util.HashMap; @@ -18,9 +21,10 @@ import java.util.Optional; import java.util.stream.Stream; +@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.FORGE) public class TravelSavedData extends SavedData { - private static final Map, TravelSavedData> CLIENT_DATA = new HashMap<>(); + private static Map, TravelSavedData> CLIENT_DATA = new HashMap<>(); private final Map travelTargets = new HashMap<>(); @@ -87,4 +91,9 @@ public CompoundTag save(CompoundTag nbt) { public boolean isDirty() { return true; } + + @SubscribeEvent + public static void reset(ServerStoppedEvent event) { + CLIENT_DATA = new HashMap<>(); + } } From 74babb44fde5dbeeb5dd74a295b865e12ee1da81 Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Sun, 13 Aug 2023 02:21:39 +0200 Subject: [PATCH 095/154] Update TravelSavedData.java --- .../enderio/base/common/travel/TravelSavedData.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/enderio/base/common/travel/TravelSavedData.java b/src/main/java/com/enderio/base/common/travel/TravelSavedData.java index 9ebd4e2609..6f865041d3 100644 --- a/src/main/java/com/enderio/base/common/travel/TravelSavedData.java +++ b/src/main/java/com/enderio/base/common/travel/TravelSavedData.java @@ -9,9 +9,10 @@ import net.minecraft.nbt.Tag; import net.minecraft.resources.ResourceKey; import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.Level; import net.minecraft.world.level.saveddata.SavedData; -import net.minecraftforge.event.server.ServerStoppedEvent; +import net.minecraftforge.event.entity.EntityJoinLevelEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; @@ -24,7 +25,7 @@ @Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.FORGE) public class TravelSavedData extends SavedData { - private static Map, TravelSavedData> CLIENT_DATA = new HashMap<>(); + private static final Map, TravelSavedData> CLIENT_DATA = new HashMap<>(); private final Map travelTargets = new HashMap<>(); @@ -93,7 +94,9 @@ public boolean isDirty() { } @SubscribeEvent - public static void reset(ServerStoppedEvent event) { - CLIENT_DATA = new HashMap<>(); + public static void onDimensionChange(EntityJoinLevelEvent event) { + if (event.getLevel().isClientSide && event.getEntity() instanceof Player) { + CLIENT_DATA.put(event.getLevel().dimension(), new TravelSavedData()); + } } } From 76d04a73f886963d05a64880eb30206b7fb0b60a Mon Sep 17 00:00:00 2001 From: mystchonky Date: Sun, 13 Aug 2023 21:09:14 +0530 Subject: [PATCH 096/154] add networking --- .../blockentity/ConduitBlockEntity.java | 1 + .../core/common/network/CoreNetwork.java | 6 ++ .../common/block/TravelAnchorBlock.java | 8 +-- .../blockentity/TravelAnchorBlockEntity.java | 24 ++++--- .../enderio/base/common/init/EIOPackets.java | 2 + .../common/network/SyncTravelDataPacket.java | 55 +++++++++++++++ .../base/common/travel/TravelSavedData.java | 69 +++++++++++++------ 7 files changed, 131 insertions(+), 34 deletions(-) create mode 100644 src/main/java/com/enderio/base/common/network/SyncTravelDataPacket.java diff --git a/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitBlockEntity.java b/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitBlockEntity.java index 11bb6327fb..09aa85023b 100644 --- a/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitBlockEntity.java +++ b/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitBlockEntity.java @@ -75,6 +75,7 @@ public ConduitBlockEntity(BlockEntityType type, BlockPos worldPosition, Block public void updateClient() { clientBundle = bundle.deepCopy(); + addAfterSyncRunnable(this::updateClient); updateShape(); requestModelDataUpdate(); level.setBlocksDirty(getBlockPos(), Blocks.AIR.defaultBlockState(), getBlockState()); diff --git a/src/core/java/com/enderio/core/common/network/CoreNetwork.java b/src/core/java/com/enderio/core/common/network/CoreNetwork.java index b9a631b4c6..d4f568ed9b 100644 --- a/src/core/java/com/enderio/core/common/network/CoreNetwork.java +++ b/src/core/java/com/enderio/core/common/network/CoreNetwork.java @@ -1,7 +1,9 @@ package com.enderio.core.common.network; +import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.level.Level; import net.minecraft.world.level.chunk.LevelChunk; import net.minecraftforge.network.NetworkRegistry; import net.minecraftforge.network.PacketDistributor; @@ -44,6 +46,10 @@ public static

void sendToTracking(LevelChunk chunk, P packet) send(PacketDistributor.TRACKING_CHUNK.with(() -> chunk), packet); } + public static

void sendToDimension(ResourceKey dim, P packet) { + send(PacketDistributor.DIMENSION.with(() -> dim), packet); + } + public static

void send(PacketDistributor.PacketTarget target, P packet) { CHANNEL.send(target, packet); } diff --git a/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java b/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java index 65f9b36bca..b32b431b53 100644 --- a/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java +++ b/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java @@ -1,8 +1,6 @@ package com.enderio.machines.common.block; import com.enderio.base.common.handler.TravelHandler; -import com.enderio.base.common.travel.TravelSavedData; -import com.enderio.machines.common.blockentity.TravelAnchorBlockEntity; import com.enderio.machines.common.init.MachineBlockEntities; import net.minecraft.core.BlockPos; import net.minecraft.server.level.ServerPlayer; @@ -65,9 +63,9 @@ private record PlayerSneakEntry(boolean isSneaking, int atTime){} @Override public void onRemove(BlockState state, Level level, BlockPos pos, BlockState newState, boolean movedByPiston) { - if (level.getBlockEntity(pos) instanceof TravelAnchorBlockEntity anchorBlock) { - TravelSavedData.getTravelData(level).removeTravelTargetAt(pos); - } +// if (level.getBlockEntity(pos) instanceof TravelAnchorBlockEntity anchorBlock) { +// TravelSavedData.getTravelData(level).removeTravelTargetAt(pos); +// } super.onRemove(state, level, pos, newState, movedByPiston); } } diff --git a/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java index 6d5234444e..dbfd531616 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java @@ -26,19 +26,18 @@ public class TravelAnchorBlockEntity extends MachineBlockEntity { - private AnchorTravelTarget target; public static final SingleSlotAccess GHOST = new SingleSlotAccess(); - private final StringNetworkDataSlot nameDataSlot; private final BooleanNetworkDataSlot visibilityDataSlot; private final ResourceLocationNetworkDataSlot iconDataSlot; + private AnchorTravelTarget target; public TravelAnchorBlockEntity(BlockEntityType pType, BlockPos pWorldPosition, BlockState pBlockState) { super(pType, pWorldPosition, pBlockState); - nameDataSlot = new StringNetworkDataSlot(this::getName, name -> target.setName(name)); - visibilityDataSlot = new BooleanNetworkDataSlot(this::getVisibility, visible -> target.setVisibility(visible)); + nameDataSlot = new StringNetworkDataSlot(this::getName, this::setName); + visibilityDataSlot = new BooleanNetworkDataSlot(this::getVisibility, this::setVisibility); iconDataSlot = new ResourceLocationNetworkDataSlot(() -> ForgeRegistries.ITEMS.getKey(getIcon()), - loc -> target.setIcon(ForgeRegistries.ITEMS.getValue(loc))); + loc -> setIcon(ForgeRegistries.ITEMS.getValue(loc))); addDataSlot(nameDataSlot); addDataSlot(visibilityDataSlot); addDataSlot(iconDataSlot); @@ -66,9 +65,7 @@ protected void onInventoryContentsChanged(int slot) { @Override public void setRemoved() { - if (level == null || level.isClientSide) { - getTravelData().removeTravelTargetAt(worldPosition); - } + getTravelData().removeTravelTargetAt(level, worldPosition); super.setRemoved(); } @@ -88,7 +85,9 @@ public void setName(String name) { clientUpdateSlot(nameDataSlot, name); } else { target.setName(name); + updateTravelData(); } + } public Item getIcon() { @@ -100,6 +99,7 @@ public void setIcon(Item icon) { clientUpdateSlot(iconDataSlot, ForgeRegistries.ITEMS.getKey(icon)); } else { target.setIcon(icon); + updateTravelData(); } } @@ -113,7 +113,13 @@ public void setVisibility(boolean visible) { clientUpdateSlot(visibilityDataSlot, visible); } else { target.setVisibility(visible); + updateTravelData(); } + + } + + public void updateTravelData() { + getTravelData().updateTravelTarget(level, target); } private AnchorTravelTarget getOrCreateTravelTarget() { @@ -122,7 +128,7 @@ private AnchorTravelTarget getOrCreateTravelTarget() { return anchorTravelTarget; } AnchorTravelTarget anchorTravelTarget = new AnchorTravelTarget(worldPosition, "", Items.AIR, true); - getTravelData().addTravelTarget(anchorTravelTarget); + getTravelData().addTravelTarget(level, anchorTravelTarget); return anchorTravelTarget; } diff --git a/src/main/java/com/enderio/base/common/init/EIOPackets.java b/src/main/java/com/enderio/base/common/init/EIOPackets.java index 8c1701dc55..fed7a3ef49 100644 --- a/src/main/java/com/enderio/base/common/init/EIOPackets.java +++ b/src/main/java/com/enderio/base/common/init/EIOPackets.java @@ -1,5 +1,6 @@ package com.enderio.base.common.init; +import com.enderio.base.common.network.SyncTravelDataPacket; import com.enderio.base.common.network.UpdateCoordinateSelectionNameMenuPacket; import com.enderio.core.common.network.ClientToServerMenuPacket; import com.enderio.core.common.network.CoreNetwork; @@ -10,5 +11,6 @@ public class EIOPackets { */ public static void register() { CoreNetwork.registerPacket(new ClientToServerMenuPacket.Handler<>(UpdateCoordinateSelectionNameMenuPacket::new), UpdateCoordinateSelectionNameMenuPacket.class); + CoreNetwork.registerPacket(new SyncTravelDataPacket.Handler(), SyncTravelDataPacket.class); } } diff --git a/src/main/java/com/enderio/base/common/network/SyncTravelDataPacket.java b/src/main/java/com/enderio/base/common/network/SyncTravelDataPacket.java new file mode 100644 index 0000000000..740567c7cf --- /dev/null +++ b/src/main/java/com/enderio/base/common/network/SyncTravelDataPacket.java @@ -0,0 +1,55 @@ +package com.enderio.base.common.network; + +import com.enderio.base.common.travel.TravelSavedData; +import com.enderio.core.common.network.Packet; +import net.minecraft.client.Minecraft; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraftforge.network.NetworkDirection; +import net.minecraftforge.network.NetworkEvent; + +import java.util.Optional; + +public class SyncTravelDataPacket implements Packet { + + private final CompoundTag data; + public SyncTravelDataPacket(CompoundTag tag) { + this.data = tag; + } + public SyncTravelDataPacket(FriendlyByteBuf buf) { + this.data = buf.readNbt(); + } + + protected void write(FriendlyByteBuf writeInto) { + writeInto.writeNbt(this.data); + } + + @Override + public boolean isValid(NetworkEvent.Context context) { + return context.getDirection() == NetworkDirection.PLAY_TO_CLIENT; + } + + @Override + public void handle(NetworkEvent.Context context) { + context.enqueueWork(() -> TravelSavedData.getTravelData(Minecraft.getInstance().level).loadNBT(this.data.copy())); + context.setPacketHandled(true); + } + + public static class Handler extends PacketHandler{ + + @Override + public SyncTravelDataPacket fromNetwork(FriendlyByteBuf buf) { + return new SyncTravelDataPacket(buf); + } + + @Override + public void toNetwork(SyncTravelDataPacket packet, FriendlyByteBuf buf) { + packet.write(buf); + } + + @Override + public Optional getDirection() { + return Optional.of(NetworkDirection.PLAY_TO_CLIENT); + } + } +} diff --git a/src/main/java/com/enderio/base/common/travel/TravelSavedData.java b/src/main/java/com/enderio/base/common/travel/TravelSavedData.java index 6f865041d3..dbd61a54bf 100644 --- a/src/main/java/com/enderio/base/common/travel/TravelSavedData.java +++ b/src/main/java/com/enderio/base/common/travel/TravelSavedData.java @@ -3,16 +3,18 @@ import com.enderio.EnderIO; import com.enderio.api.travel.ITravelTarget; import com.enderio.api.travel.TravelRegistry; +import com.enderio.base.common.network.SyncTravelDataPacket; +import com.enderio.core.common.network.CoreNetwork; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.ListTag; import net.minecraft.nbt.Tag; -import net.minecraft.resources.ResourceKey; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.Level; import net.minecraft.world.level.saveddata.SavedData; -import net.minecraftforge.event.entity.EntityJoinLevelEvent; +import net.minecraftforge.event.entity.player.PlayerEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; @@ -25,8 +27,7 @@ @Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.FORGE) public class TravelSavedData extends SavedData { - private static final Map, TravelSavedData> CLIENT_DATA = new HashMap<>(); - + private static final TravelSavedData CLIENT_INSTANCE = new TravelSavedData(); private final Map travelTargets = new HashMap<>(); public TravelSavedData() { @@ -34,26 +35,27 @@ public TravelSavedData() { } public TravelSavedData(CompoundTag nbt) { - ListTag targets = nbt.getList("targets", Tag.TAG_COMPOUND); - targets.stream().map(anchorData -> (CompoundTag)anchorData) - .map(TravelRegistry::deserialize) - .flatMap(Optional::stream) - .forEach(target -> travelTargets.put(target.getPos(), target)); + this(); + this.loadNBT(nbt); } public static TravelSavedData getTravelData(Level level) { if (level instanceof ServerLevel serverLevel) { return serverLevel.getDataStorage().computeIfAbsent(TravelSavedData::new, TravelSavedData::new, "enderio_traveldata"); } else { - if (CLIENT_DATA.containsKey(level.dimension())) { - return CLIENT_DATA.get(level.dimension()); - } - TravelSavedData data = new TravelSavedData(); - CLIENT_DATA.put(level.dimension(), data); - return data; + return CLIENT_INSTANCE; } } + public void loadNBT(CompoundTag nbt){ + this.travelTargets.clear(); + ListTag targets = nbt.getList("targets", Tag.TAG_COMPOUND); + targets.stream().map(anchorData -> (CompoundTag)anchorData) + .map(TravelRegistry::deserialize) + .flatMap(Optional::stream) + .forEach(target -> travelTargets.put(target.getPos(), target)); + } + public Optional getTravelTarget(BlockPos pos) { return Optional.ofNullable(travelTargets.get(pos)); } @@ -68,16 +70,31 @@ public Stream getTravelTargetsInItemRange(BlockPos center) { .map(Map.Entry::getValue); } - public void addTravelTarget(ITravelTarget target) { + public void addTravelTarget(Level level, ITravelTarget target) { + if(level.isClientSide) + return; if (TravelRegistry.isRegistered(target)) { travelTargets.put(target.getPos(), target); + syncData(level); } else { EnderIO.LOGGER.warn("Tried to add a not registered TravelTarget to the TravelSavedData with name " + target); } } - public void removeTravelTargetAt(BlockPos pos) { + public void updateTravelTarget(Level level, ITravelTarget target){ + if(level.isClientSide) + return; + if(travelTargets.containsKey(target.getPos())){ + travelTargets.replace(target.getPos(), target); + syncData(level); + } + } + + public void removeTravelTargetAt(Level level, BlockPos pos) { + if(level.isClientSide) + return; travelTargets.remove(pos); + syncData(level); } @Override @@ -93,10 +110,22 @@ public boolean isDirty() { return true; } + private void syncData(Level level){ + CoreNetwork.sendToDimension(level.dimension(), new SyncTravelDataPacket(save(new CompoundTag()))); + } + @SubscribeEvent + public static void onPlayerLogin(PlayerEvent.PlayerLoggedInEvent event) { + Player player = event.getEntity(); + if (!player.getCommandSenderWorld().isClientSide && player instanceof ServerPlayer serverPlayer) { + CoreNetwork.sendToPlayer(serverPlayer, new SyncTravelDataPacket(TravelSavedData.getTravelData(player.getCommandSenderWorld()).save(new CompoundTag()))); + } + } + @SubscribeEvent - public static void onDimensionChange(EntityJoinLevelEvent event) { - if (event.getLevel().isClientSide && event.getEntity() instanceof Player) { - CLIENT_DATA.put(event.getLevel().dimension(), new TravelSavedData()); + public static void onDimensionChange(PlayerEvent.PlayerChangedDimensionEvent event) { + Player player = event.getEntity(); + if (!player.getCommandSenderWorld().isClientSide && player instanceof ServerPlayer serverPlayer) { + CoreNetwork.sendToPlayer(serverPlayer, new SyncTravelDataPacket(TravelSavedData.getTravelData(player.getCommandSenderWorld()).save(new CompoundTag()))); } } } From 3345f35462e7bcb65fb69f6038bbf3c4686afe40 Mon Sep 17 00:00:00 2001 From: agnor99 <36055315+agnor99@users.noreply.github.com> Date: Sun, 13 Aug 2023 20:15:34 +0200 Subject: [PATCH 097/154] fix crash --- .../com/enderio/conduits/common/types/EnergyConduitType.java | 2 ++ .../enderio/machines/client/rendering/item/FluidTankBEWLR.java | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 src/conduits/java/com/enderio/conduits/common/types/EnergyConduitType.java diff --git a/src/conduits/java/com/enderio/conduits/common/types/EnergyConduitType.java b/src/conduits/java/com/enderio/conduits/common/types/EnergyConduitType.java new file mode 100644 index 0000000000..6f803245ae --- /dev/null +++ b/src/conduits/java/com/enderio/conduits/common/types/EnergyConduitType.java @@ -0,0 +1,2 @@ +package com.enderio.conduits.common.types;public class EnergyConduitType { +} diff --git a/src/machines/java/com/enderio/machines/client/rendering/item/FluidTankBEWLR.java b/src/machines/java/com/enderio/machines/client/rendering/item/FluidTankBEWLR.java index ee89195a1a..094944fd75 100644 --- a/src/machines/java/com/enderio/machines/client/rendering/item/FluidTankBEWLR.java +++ b/src/machines/java/com/enderio/machines/client/rendering/item/FluidTankBEWLR.java @@ -18,6 +18,7 @@ import net.minecraft.world.item.ItemDisplayContext; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.Fluids; import net.minecraftforge.client.extensions.common.IClientFluidTypeExtensions; import net.minecraftforge.registries.ForgeRegistries; @@ -49,7 +50,7 @@ public void renderByItem(ItemStack stack, ItemDisplayContext transformType, Pose Fluid fluid = ForgeRegistries.FLUIDS.getValue(new ResourceLocation(tank.getString("FluidName"))); int amount = tank.getInt("Amount"); - if (fluid != null && amount > 0) { + if (fluid != null && fluid != Fluids.EMPTY && amount > 0) { // Get the preferred render buffer VertexConsumer fluidBuffer = buffer.getBuffer(Sheets.translucentCullBlockSheet()); From 07d42173ddba8cf30be7e75dc620efde5dcbe059 Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Mon, 14 Aug 2023 13:28:27 +0200 Subject: [PATCH 098/154] Some changes to syncing --- .../blockentity/ConduitBlockEntity.java | 1 - .../com/enderio/machines/EIOMachines.java | 10 +-- .../common/block/TravelAnchorBlock.java | 8 ++- .../blockentity/TravelAnchorBlockEntity.java | 46 +++---------- .../machines/common/init/MachinePackets.java | 8 +++ .../common/network/MachineNetwork.java | 15 ---- .../common/travel/AnchorTravelTarget.java | 2 - .../enderio/base/common/init/EIOPackets.java | 5 ++ .../common/network/AddTravelTargetPacket.java | 68 +++++++++++++++++++ .../network/RemoveTravelTargetPacket.java | 63 +++++++++++++++++ .../common/network/SyncTravelDataPacket.java | 5 +- .../base/common/travel/TravelSavedData.java | 35 ++++------ 12 files changed, 175 insertions(+), 91 deletions(-) delete mode 100644 src/machines/java/com/enderio/machines/common/network/MachineNetwork.java create mode 100644 src/main/java/com/enderio/base/common/network/AddTravelTargetPacket.java create mode 100644 src/main/java/com/enderio/base/common/network/RemoveTravelTargetPacket.java diff --git a/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitBlockEntity.java b/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitBlockEntity.java index 09aa85023b..11bb6327fb 100644 --- a/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitBlockEntity.java +++ b/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitBlockEntity.java @@ -75,7 +75,6 @@ public ConduitBlockEntity(BlockEntityType type, BlockPos worldPosition, Block public void updateClient() { clientBundle = bundle.deepCopy(); - addAfterSyncRunnable(this::updateClient); updateShape(); requestModelDataUpdate(); level.setBlocksDirty(getBlockPos(), Blocks.AIR.defaultBlockState(), getBlockState()); diff --git a/src/machines/java/com/enderio/machines/EIOMachines.java b/src/machines/java/com/enderio/machines/EIOMachines.java index d9db04887f..9562af0414 100644 --- a/src/machines/java/com/enderio/machines/EIOMachines.java +++ b/src/machines/java/com/enderio/machines/EIOMachines.java @@ -1,23 +1,18 @@ package com.enderio.machines; import com.enderio.EnderIO; -import com.enderio.base.data.EIODataProvider; import com.enderio.api.integration.IntegrationManager; import com.enderio.api.travel.TravelRegistry; +import com.enderio.base.data.EIODataProvider; import com.enderio.machines.client.rendering.travel.TravelAnchorRenderer; import com.enderio.machines.common.blockentity.solar.SolarPanelTier; import com.enderio.machines.common.config.MachinesConfig; import com.enderio.machines.common.init.*; -import com.enderio.machines.common.init.MachineBlockEntities; -import com.enderio.machines.common.init.MachineBlocks; -import com.enderio.machines.common.init.MachineMenus; -import com.enderio.machines.common.init.MachineRecipes; import com.enderio.machines.common.integrations.EnderIOMachinesSelfIntegration; import com.enderio.machines.common.lang.MachineLang; -import com.enderio.machines.common.network.MachineNetwork; import com.enderio.machines.common.tag.MachineTags; -import com.enderio.machines.data.advancements.MachinesAdvancementGenerator; import com.enderio.machines.common.travel.AnchorTravelTarget; +import com.enderio.machines.data.advancements.MachinesAdvancementGenerator; import com.enderio.machines.data.recipes.*; import com.enderio.machines.data.souldata.SoulDataProvider; import com.enderio.machines.data.tag.MachineEntityTypeTagsProvider; @@ -58,7 +53,6 @@ public static void onConstruct(FMLConstructModEvent event) { MachineLang.register(); MachineRecipes.register(); MachineTags.register(); - MachineNetwork.networkInit(); // Remap MinecraftForge.EVENT_BUS.addListener(EIOMachines::missingMappings); diff --git a/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java b/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java index b32b431b53..03136d986c 100644 --- a/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java +++ b/src/machines/java/com/enderio/machines/common/block/TravelAnchorBlock.java @@ -1,6 +1,8 @@ package com.enderio.machines.common.block; import com.enderio.base.common.handler.TravelHandler; +import com.enderio.base.common.travel.TravelSavedData; +import com.enderio.machines.common.blockentity.TravelAnchorBlockEntity; import com.enderio.machines.common.init.MachineBlockEntities; import net.minecraft.core.BlockPos; import net.minecraft.server.level.ServerPlayer; @@ -63,9 +65,9 @@ private record PlayerSneakEntry(boolean isSneaking, int atTime){} @Override public void onRemove(BlockState state, Level level, BlockPos pos, BlockState newState, boolean movedByPiston) { -// if (level.getBlockEntity(pos) instanceof TravelAnchorBlockEntity anchorBlock) { -// TravelSavedData.getTravelData(level).removeTravelTargetAt(pos); -// } + if (level.getBlockEntity(pos) instanceof TravelAnchorBlockEntity anchorBlock) { + TravelSavedData.getTravelData(level).removeTravelTargetAt(level, pos); + } super.onRemove(state, level, pos, newState, movedByPiston); } } diff --git a/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java index dbfd531616..6bc0166d20 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/TravelAnchorBlockEntity.java @@ -30,14 +30,12 @@ public class TravelAnchorBlockEntity extends MachineBlockEntity { private final StringNetworkDataSlot nameDataSlot; private final BooleanNetworkDataSlot visibilityDataSlot; private final ResourceLocationNetworkDataSlot iconDataSlot; - private AnchorTravelTarget target; - public TravelAnchorBlockEntity(BlockEntityType pType, BlockPos pWorldPosition, BlockState pBlockState) { super(pType, pWorldPosition, pBlockState); - nameDataSlot = new StringNetworkDataSlot(this::getName, this::setName); - visibilityDataSlot = new BooleanNetworkDataSlot(this::getVisibility, this::setVisibility); + nameDataSlot = new StringNetworkDataSlot(this::getName, name -> getOrCreateTravelTarget().setName(name)); + visibilityDataSlot = new BooleanNetworkDataSlot(this::getVisibility, vis -> getOrCreateTravelTarget().setVisibility(vis)); iconDataSlot = new ResourceLocationNetworkDataSlot(() -> ForgeRegistries.ITEMS.getKey(getIcon()), - loc -> setIcon(ForgeRegistries.ITEMS.getValue(loc))); + loc -> getOrCreateTravelTarget().setIcon(ForgeRegistries.ITEMS.getValue(loc))); addDataSlot(nameDataSlot); addDataSlot(visibilityDataSlot); addDataSlot(iconDataSlot); @@ -58,68 +56,44 @@ public AbstractContainerMenu createMenu(int containerId, Inventory inventory, Pl protected void onInventoryContentsChanged(int slot) { super.onInventoryContentsChanged(slot); ItemStack stack = GHOST.getItemStack(getInventory()); - if (!stack.isEmpty()) { - setIcon(stack.getItem()); - } - } - - @Override - public void setRemoved() { - getTravelData().removeTravelTargetAt(level, worldPosition); - super.setRemoved(); - } - - @Override - public void onLoad() { - target = getOrCreateTravelTarget(); - super.onLoad(); + setIcon(stack.getItem()); } @Nullable public String getName() { - return target.getName(); + return getOrCreateTravelTarget().getName(); } public void setName(String name) { if (level != null && level.isClientSide()) { clientUpdateSlot(nameDataSlot, name); } else { - target.setName(name); - updateTravelData(); + getOrCreateTravelTarget().setName(name); } - } public Item getIcon() { - return target.getIcon(); + return getOrCreateTravelTarget().getIcon(); } public void setIcon(Item icon) { if (level != null && level.isClientSide()) { clientUpdateSlot(iconDataSlot, ForgeRegistries.ITEMS.getKey(icon)); } else { - target.setIcon(icon); - updateTravelData(); + getOrCreateTravelTarget().setIcon(icon); } - } public boolean getVisibility() { - return target.getVisibility(); + return getOrCreateTravelTarget().getVisibility(); } public void setVisibility(boolean visible) { if (level != null && level.isClientSide()) { clientUpdateSlot(visibilityDataSlot, visible); } else { - target.setVisibility(visible); - updateTravelData(); + getOrCreateTravelTarget().setVisibility(visible); } - - } - - public void updateTravelData() { - getTravelData().updateTravelTarget(level, target); } private AnchorTravelTarget getOrCreateTravelTarget() { diff --git a/src/machines/java/com/enderio/machines/common/init/MachinePackets.java b/src/machines/java/com/enderio/machines/common/init/MachinePackets.java index 6120c25ce8..4c14bb12c9 100644 --- a/src/machines/java/com/enderio/machines/common/init/MachinePackets.java +++ b/src/machines/java/com/enderio/machines/common/init/MachinePackets.java @@ -1,10 +1,18 @@ package com.enderio.machines.common.init; +import com.enderio.base.common.network.SyncTravelDataPacket; import com.enderio.core.common.network.CoreNetwork; +import com.enderio.machines.common.network.PoweredSpawnerSoulPacket; import com.enderio.machines.common.network.UpdateCrafterTemplatePacket; +import com.enderio.machines.common.souldata.SpawnerSoul; public class MachinePackets { public static void register() { + //Sync soul data (optional) + SpawnerSoul.SPAWNER.subscribeAsSyncable(PoweredSpawnerSoulPacket::new); + + //packets CoreNetwork.registerPacket(new UpdateCrafterTemplatePacket.Handler(), UpdateCrafterTemplatePacket.class); + CoreNetwork.registerPacket(new PoweredSpawnerSoulPacket.Handler(), PoweredSpawnerSoulPacket.class); } } diff --git a/src/machines/java/com/enderio/machines/common/network/MachineNetwork.java b/src/machines/java/com/enderio/machines/common/network/MachineNetwork.java deleted file mode 100644 index eb3660b222..0000000000 --- a/src/machines/java/com/enderio/machines/common/network/MachineNetwork.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.enderio.machines.common.network; - -import com.enderio.core.common.network.CoreNetwork; -import com.enderio.machines.common.souldata.SpawnerSoul; - -public class MachineNetwork { - - public static void networkInit() { - //Sync soul data (optional) - SpawnerSoul.SPAWNER.subscribeAsSyncable(PoweredSpawnerSoulPacket::new); - - //packets - CoreNetwork.registerPacket(new PoweredSpawnerSoulPacket.Handler(), PoweredSpawnerSoulPacket.class); - } -} diff --git a/src/machines/java/com/enderio/machines/common/travel/AnchorTravelTarget.java b/src/machines/java/com/enderio/machines/common/travel/AnchorTravelTarget.java index 23231a8e6c..0a08acec36 100644 --- a/src/machines/java/com/enderio/machines/common/travel/AnchorTravelTarget.java +++ b/src/machines/java/com/enderio/machines/common/travel/AnchorTravelTarget.java @@ -48,8 +48,6 @@ public CompoundTag save() { return nbt; } - - @Override public boolean equals(Object o) { if (this == o) diff --git a/src/main/java/com/enderio/base/common/init/EIOPackets.java b/src/main/java/com/enderio/base/common/init/EIOPackets.java index fed7a3ef49..e8a9ce66ff 100644 --- a/src/main/java/com/enderio/base/common/init/EIOPackets.java +++ b/src/main/java/com/enderio/base/common/init/EIOPackets.java @@ -1,5 +1,7 @@ package com.enderio.base.common.init; +import com.enderio.base.common.network.AddTravelTargetPacket; +import com.enderio.base.common.network.RemoveTravelTargetPacket; import com.enderio.base.common.network.SyncTravelDataPacket; import com.enderio.base.common.network.UpdateCoordinateSelectionNameMenuPacket; import com.enderio.core.common.network.ClientToServerMenuPacket; @@ -12,5 +14,8 @@ public class EIOPackets { public static void register() { CoreNetwork.registerPacket(new ClientToServerMenuPacket.Handler<>(UpdateCoordinateSelectionNameMenuPacket::new), UpdateCoordinateSelectionNameMenuPacket.class); CoreNetwork.registerPacket(new SyncTravelDataPacket.Handler(), SyncTravelDataPacket.class); + CoreNetwork.registerPacket(new AddTravelTargetPacket.Handler(), AddTravelTargetPacket.class); + CoreNetwork.registerPacket(new RemoveTravelTargetPacket.Handler(), RemoveTravelTargetPacket.class); + } } diff --git a/src/main/java/com/enderio/base/common/network/AddTravelTargetPacket.java b/src/main/java/com/enderio/base/common/network/AddTravelTargetPacket.java new file mode 100644 index 0000000000..dc4501c47c --- /dev/null +++ b/src/main/java/com/enderio/base/common/network/AddTravelTargetPacket.java @@ -0,0 +1,68 @@ +package com.enderio.base.common.network; + +import com.enderio.api.travel.ITravelTarget; +import com.enderio.api.travel.TravelRegistry; +import com.enderio.base.common.travel.TravelSavedData; +import com.enderio.core.common.network.Packet; +import net.minecraft.client.Minecraft; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraftforge.network.NetworkDirection; +import net.minecraftforge.network.NetworkEvent; +import org.jetbrains.annotations.Nullable; + +import java.util.Optional; + +public class AddTravelTargetPacket implements Packet { + + @Nullable + private final ITravelTarget target; + + public AddTravelTargetPacket(ITravelTarget target) { + this.target = target; + } + + + public AddTravelTargetPacket(FriendlyByteBuf buf) { + target = TravelRegistry.deserialize(buf.readNbt()).orElse(null); + } + + protected void write(FriendlyByteBuf writeInto) { + writeInto.writeNbt(target.save()); + } + + @Override + public boolean isValid(NetworkEvent.Context context) { + return context.getDirection() == NetworkDirection.PLAY_TO_CLIENT; + } + + @Override + public void handle(NetworkEvent.Context context) { + ClientHandler.handle(target); + } + + public static class Handler extends Packet.PacketHandler { + + @Override + public AddTravelTargetPacket fromNetwork(FriendlyByteBuf buf) { + return new AddTravelTargetPacket(buf); + } + + @Override + public void toNetwork(AddTravelTargetPacket packet, FriendlyByteBuf buf) { + packet.write(buf); + } + + @Override + public Optional getDirection() { + return Optional.of(NetworkDirection.PLAY_TO_CLIENT); + } + } + + public static class ClientHandler { + static void handle(ITravelTarget target) { + TravelSavedData travelData = TravelSavedData.getTravelData(Minecraft.getInstance().level); + travelData.addTravelTarget(Minecraft.getInstance().level, target); + } + } + +} diff --git a/src/main/java/com/enderio/base/common/network/RemoveTravelTargetPacket.java b/src/main/java/com/enderio/base/common/network/RemoveTravelTargetPacket.java new file mode 100644 index 0000000000..a49edaf54c --- /dev/null +++ b/src/main/java/com/enderio/base/common/network/RemoveTravelTargetPacket.java @@ -0,0 +1,63 @@ +package com.enderio.base.common.network; + +import com.enderio.base.common.travel.TravelSavedData; +import com.enderio.core.common.network.Packet; +import net.minecraft.client.Minecraft; +import net.minecraft.core.BlockPos; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraftforge.network.NetworkDirection; +import net.minecraftforge.network.NetworkEvent; + +import java.util.Optional; + +public class RemoveTravelTargetPacket implements Packet { + private final BlockPos pos; + + public RemoveTravelTargetPacket(BlockPos pos) { + this.pos = pos; + } + + + public RemoveTravelTargetPacket(FriendlyByteBuf buf) { + pos = buf.readBlockPos(); + } + + protected void write(FriendlyByteBuf writeInto) { + writeInto.writeBlockPos(pos); + } + + @Override + public boolean isValid(NetworkEvent.Context context) { + return context.getDirection() == NetworkDirection.PLAY_TO_CLIENT; + } + + @Override + public void handle(NetworkEvent.Context context) { + ClientHandler.handle(pos); + } + + public static class Handler extends Packet.PacketHandler { + + @Override + public RemoveTravelTargetPacket fromNetwork(FriendlyByteBuf buf) { + return new RemoveTravelTargetPacket(buf); + } + + @Override + public void toNetwork(RemoveTravelTargetPacket packet, FriendlyByteBuf buf) { + packet.write(buf); + } + + @Override + public Optional getDirection() { + return Optional.of(NetworkDirection.PLAY_TO_CLIENT); + } + } + + public static class ClientHandler { + static void handle(BlockPos pos) { + TravelSavedData travelData = TravelSavedData.getTravelData(Minecraft.getInstance().level); + travelData.removeTravelTargetAt(Minecraft.getInstance().level, pos); + } + } +} diff --git a/src/main/java/com/enderio/base/common/network/SyncTravelDataPacket.java b/src/main/java/com/enderio/base/common/network/SyncTravelDataPacket.java index 740567c7cf..c475c1f190 100644 --- a/src/main/java/com/enderio/base/common/network/SyncTravelDataPacket.java +++ b/src/main/java/com/enderio/base/common/network/SyncTravelDataPacket.java @@ -2,7 +2,6 @@ import com.enderio.base.common.travel.TravelSavedData; import com.enderio.core.common.network.Packet; -import net.minecraft.client.Minecraft; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.FriendlyByteBuf; import net.minecraftforge.network.NetworkDirection; @@ -31,8 +30,8 @@ public boolean isValid(NetworkEvent.Context context) { @Override public void handle(NetworkEvent.Context context) { - context.enqueueWork(() -> TravelSavedData.getTravelData(Minecraft.getInstance().level).loadNBT(this.data.copy())); - context.setPacketHandled(true); + TravelSavedData travelData = TravelSavedData.getTravelData(null); + travelData.loadNBT(this.data); } public static class Handler extends PacketHandler{ diff --git a/src/main/java/com/enderio/base/common/travel/TravelSavedData.java b/src/main/java/com/enderio/base/common/travel/TravelSavedData.java index dbd61a54bf..ef1337ff00 100644 --- a/src/main/java/com/enderio/base/common/travel/TravelSavedData.java +++ b/src/main/java/com/enderio/base/common/travel/TravelSavedData.java @@ -3,6 +3,8 @@ import com.enderio.EnderIO; import com.enderio.api.travel.ITravelTarget; import com.enderio.api.travel.TravelRegistry; +import com.enderio.base.common.network.AddTravelTargetPacket; +import com.enderio.base.common.network.RemoveTravelTargetPacket; import com.enderio.base.common.network.SyncTravelDataPacket; import com.enderio.core.common.network.CoreNetwork; import net.minecraft.core.BlockPos; @@ -35,7 +37,6 @@ public TravelSavedData() { } public TravelSavedData(CompoundTag nbt) { - this(); this.loadNBT(nbt); } @@ -71,30 +72,21 @@ public Stream getTravelTargetsInItemRange(BlockPos center) { } public void addTravelTarget(Level level, ITravelTarget target) { - if(level.isClientSide) - return; + if (!level.isClientSide) { + CoreNetwork.sendToDimension(level.dimension(), new AddTravelTargetPacket(target)); + } if (TravelRegistry.isRegistered(target)) { travelTargets.put(target.getPos(), target); - syncData(level); } else { EnderIO.LOGGER.warn("Tried to add a not registered TravelTarget to the TravelSavedData with name " + target); } } - public void updateTravelTarget(Level level, ITravelTarget target){ - if(level.isClientSide) - return; - if(travelTargets.containsKey(target.getPos())){ - travelTargets.replace(target.getPos(), target); - syncData(level); - } - } - public void removeTravelTargetAt(Level level, BlockPos pos) { - if(level.isClientSide) - return; + if (!level.isClientSide) { + CoreNetwork.sendToDimension(level.dimension(), new RemoveTravelTargetPacket(pos)); + } travelTargets.remove(pos); - syncData(level); } @Override @@ -110,22 +102,19 @@ public boolean isDirty() { return true; } - private void syncData(Level level){ - CoreNetwork.sendToDimension(level.dimension(), new SyncTravelDataPacket(save(new CompoundTag()))); - } @SubscribeEvent public static void onPlayerLogin(PlayerEvent.PlayerLoggedInEvent event) { Player player = event.getEntity(); - if (!player.getCommandSenderWorld().isClientSide && player instanceof ServerPlayer serverPlayer) { - CoreNetwork.sendToPlayer(serverPlayer, new SyncTravelDataPacket(TravelSavedData.getTravelData(player.getCommandSenderWorld()).save(new CompoundTag()))); + if (player instanceof ServerPlayer serverPlayer) { + CoreNetwork.sendToPlayer(serverPlayer, new SyncTravelDataPacket(TravelSavedData.getTravelData(serverPlayer.level()).save(new CompoundTag()))); } } @SubscribeEvent public static void onDimensionChange(PlayerEvent.PlayerChangedDimensionEvent event) { Player player = event.getEntity(); - if (!player.getCommandSenderWorld().isClientSide && player instanceof ServerPlayer serverPlayer) { - CoreNetwork.sendToPlayer(serverPlayer, new SyncTravelDataPacket(TravelSavedData.getTravelData(player.getCommandSenderWorld()).save(new CompoundTag()))); + if (player instanceof ServerPlayer serverPlayer) { + CoreNetwork.sendToPlayer(serverPlayer, new SyncTravelDataPacket(TravelSavedData.getTravelData(serverPlayer.level()).save(new CompoundTag()))); } } } From 083e7e483113c5829dbb3e0df756b44724e8d510 Mon Sep 17 00:00:00 2001 From: agnor99 <36055315+agnor99@users.noreply.github.com> Date: Mon, 14 Aug 2023 19:17:49 +0200 Subject: [PATCH 099/154] let energy conduits figure out default IO mode by themselves --- .../com/enderio/api/conduit/IConduitType.java | 14 +++++--- .../blockentity/ConduitBlockEntity.java | 4 +-- .../common/blockentity/ConduitBundle.java | 4 +-- .../common/blockentity/ConduitConnection.java | 6 ++-- .../connection/DynamicConnectionState.java | 9 +++-- .../common/init/EnderConduitTypes.java | 4 +-- .../common/types/EnergyConduitType.java | 36 +++++++++++++++++++ 7 files changed, 61 insertions(+), 16 deletions(-) create mode 100644 src/conduits/java/com/enderio/conduits/common/types/EnergyConduitType.java diff --git a/src/api/java/com/enderio/api/conduit/IConduitType.java b/src/api/java/com/enderio/api/conduit/IConduitType.java index 45b02120c8..05dd70923f 100644 --- a/src/api/java/com/enderio/api/conduit/IConduitType.java +++ b/src/api/java/com/enderio/api/conduit/IConduitType.java @@ -2,7 +2,7 @@ import com.enderio.api.UseOnly; import com.enderio.api.conduit.ticker.IConduitTicker; -import com.enderio.api.misc.ColorControl; +import com.enderio.api.misc.RedstoneControl; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.resources.ResourceLocation; @@ -49,9 +49,15 @@ default Optional> proxyCapability(Capability cap, T exten return Optional.empty(); } - default ConduitConnectionData getDefaultConnection() { - return new ConduitConnectionData(false, true); + /** + * @param level the level + * @param pos conduit position + * @param direction direction the conduit connects to + * @return the connectiondata that should be set on connection based on context + */ + default ConduitConnectionData getDefaultConnection(Level level, BlockPos pos, Direction direction) { + return new ConduitConnectionData(false, true, RedstoneControl.NEVER_ACTIVE); } - record ConduitConnectionData(boolean isInsert, boolean isExtract) {} + record ConduitConnectionData(boolean isInsert, boolean isExtract, RedstoneControl control) {} } diff --git a/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitBlockEntity.java b/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitBlockEntity.java index 11bb6327fb..28e95b55cd 100644 --- a/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitBlockEntity.java +++ b/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitBlockEntity.java @@ -424,12 +424,12 @@ private boolean doTypesMatch(IConduitType type) { } private void connect(Direction direction, IConduitType type) { - bundle.connectTo(direction, type, false); + bundle.connectTo(level, worldPosition, direction, type, false); updateClient(); } private void connectEnd(Direction direction, IConduitType type) { - bundle.connectTo(direction, type, true); + bundle.connectTo(level, worldPosition, direction, type, true); updateClient(); } diff --git a/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitBundle.java b/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitBundle.java index ea9ceac181..ec9e76e4ef 100644 --- a/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitBundle.java +++ b/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitBundle.java @@ -281,8 +281,8 @@ public void setFacade(BlockState facade, Direction direction) { facadeTextures.put(direction, facade); } - public void connectTo(Direction direction, IConduitType type, boolean end) { - getConnection(direction).connectTo(getNodeFor(type), direction, type, getTypeIndex(type), end); + public void connectTo(Level level, BlockPos pos, Direction direction, IConduitType type, boolean end) { + getConnection(direction).connectTo(level, pos, getNodeFor(type), direction, type, getTypeIndex(type), end); scheduleSync.run(); } diff --git a/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitConnection.java b/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitConnection.java index 8d71749675..5ba75b6ce2 100644 --- a/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitConnection.java +++ b/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitConnection.java @@ -8,9 +8,11 @@ import com.enderio.conduits.common.blockentity.connection.IConnectionState; import com.enderio.conduits.common.blockentity.connection.StaticConnectionStates; import net.minecraft.Util; +import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; import net.minecraftforge.common.util.INBTSerializable; import java.util.ArrayList; @@ -45,9 +47,9 @@ public void addType(int index) { connectionStates[index] = StaticConnectionStates.DISCONNECTED; } - public void connectTo(NodeIdentifier nodeIdentifier, Direction direction, IConduitType type, int typeIndex, boolean end) { + public void connectTo(Level level, BlockPos pos, NodeIdentifier nodeIdentifier, Direction direction, IConduitType type, int typeIndex, boolean end) { if (end) { - var state = DynamicConnectionState.defaultConnection(type); + var state = DynamicConnectionState.defaultConnection(level, pos, direction, type); connectionStates[typeIndex] = state; ConduitBlockEntity.pushIOState(direction, nodeIdentifier, state); } else { diff --git a/src/conduits/java/com/enderio/conduits/common/blockentity/connection/DynamicConnectionState.java b/src/conduits/java/com/enderio/conduits/common/blockentity/connection/DynamicConnectionState.java index b65bf7251e..094abd1992 100644 --- a/src/conduits/java/com/enderio/conduits/common/blockentity/connection/DynamicConnectionState.java +++ b/src/conduits/java/com/enderio/conduits/common/blockentity/connection/DynamicConnectionState.java @@ -5,8 +5,11 @@ import com.enderio.api.misc.ColorControl; import com.enderio.api.misc.RedstoneControl; import com.enderio.conduits.common.blockentity.SlotType; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; import net.minecraftforge.fml.LogicalSide; import java.util.HashMap; @@ -14,9 +17,9 @@ public record DynamicConnectionState(boolean isInsert, ColorControl insert, boolean isExtract, ColorControl extract, RedstoneControl control, ColorControl redstoneChannel, @UseOnly(LogicalSide.SERVER) ItemStack filterInsert, @UseOnly(LogicalSide.SERVER) ItemStack filterExtract, @UseOnly(LogicalSide.SERVER) ItemStack upgradeExtract) implements IConnectionState { - public static DynamicConnectionState defaultConnection(IConduitType type) { - IConduitType.ConduitConnectionData defaultConnection = type.getDefaultConnection(); - return new DynamicConnectionState(defaultConnection.isInsert(), ColorControl.GREEN, defaultConnection.isExtract(), ColorControl.GREEN, RedstoneControl.NEVER_ACTIVE, ColorControl.RED, ItemStack.EMPTY, ItemStack.EMPTY, ItemStack.EMPTY); + public static DynamicConnectionState defaultConnection(Level level, BlockPos pos, Direction direction, IConduitType type) { + IConduitType.ConduitConnectionData defaultConnection = type.getDefaultConnection(level, pos, direction); + return new DynamicConnectionState(defaultConnection.isInsert(), ColorControl.GREEN, defaultConnection.isExtract(), ColorControl.GREEN, defaultConnection.control(), ColorControl.RED, ItemStack.EMPTY, ItemStack.EMPTY, ItemStack.EMPTY); } @Override diff --git a/src/conduits/java/com/enderio/conduits/common/init/EnderConduitTypes.java b/src/conduits/java/com/enderio/conduits/common/init/EnderConduitTypes.java index ba09b9ff2a..4a151a130f 100644 --- a/src/conduits/java/com/enderio/conduits/common/init/EnderConduitTypes.java +++ b/src/conduits/java/com/enderio/conduits/common/init/EnderConduitTypes.java @@ -11,9 +11,7 @@ public class EnderConduitTypes { public static final ResourceLocation ICON_TEXTURE = EnderIO.loc("textures/gui/conduit_icon.png"); public static final RegistryObject> ENERGY = ConduitTypes.CONDUIT_TYPES.register( - "energy_conduit", - () -> new SimpleConduitType<>(EnderIO.loc("block/conduit/energy"), new EnergyConduitTicker(), EnergyExtendedData::new, - new IClientConduitData.Simple<>(ICON_TEXTURE, new Vector2i(0, 24)), IConduitMenuData.ENERGY)); + "energy_conduit", EnergyConduitType::new); public static final RegistryObject FLUID = fluidConduit("fluid_conduit", 50, false, new Vector2i(0, 120)); diff --git a/src/conduits/java/com/enderio/conduits/common/types/EnergyConduitType.java b/src/conduits/java/com/enderio/conduits/common/types/EnergyConduitType.java new file mode 100644 index 0000000000..21b2ef5760 --- /dev/null +++ b/src/conduits/java/com/enderio/conduits/common/types/EnergyConduitType.java @@ -0,0 +1,36 @@ +package com.enderio.conduits.common.types; + +import com.enderio.EnderIO; +import com.enderio.api.conduit.IClientConduitData; +import com.enderio.api.conduit.IConduitMenuData; +import com.enderio.api.misc.RedstoneControl; +import com.enderio.api.misc.Vector2i; +import com.enderio.conduits.common.init.EnderConduitTypes; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraftforge.common.capabilities.ForgeCapabilities; +import net.minecraftforge.common.util.LazyOptional; +import net.minecraftforge.energy.IEnergyStorage; + +public class EnergyConduitType extends SimpleConduitType { + public EnergyConduitType() { + super(EnderIO.loc("block/conduit/energy"), new EnergyConduitTicker(), EnergyExtendedData::new, + new IClientConduitData.Simple<>(EnderConduitTypes.ICON_TEXTURE, new Vector2i(0, 24)), IConduitMenuData.ENERGY); + } + + @Override + public ConduitConnectionData getDefaultConnection(Level level, BlockPos pos, Direction direction) { + BlockEntity blockEntity = level.getBlockEntity(pos.relative(direction)); + if (blockEntity != null) { + LazyOptional capability = blockEntity.getCapability(ForgeCapabilities.ENERGY, direction.getOpposite()); + if (capability.isPresent()) { + IEnergyStorage storage = capability.orElseThrow(() -> new RuntimeException("present capability was not found")); + return new ConduitConnectionData(storage.canReceive(), storage.canExtract(), RedstoneControl.ALWAYS_ACTIVE); + + } + } + return super.getDefaultConnection(level, pos, direction); + } +} From bbf9f6cbe73e9827cb211c3083373317c6c4ead8 Mon Sep 17 00:00:00 2001 From: agnor99 <36055315+agnor99@users.noreply.github.com> Date: Mon, 14 Aug 2023 19:32:42 +0200 Subject: [PATCH 100/154] clarify redstone channel and conduit channel lang --- .../java/com/enderio/conduits/client/gui/ConduitScreen.java | 6 +++--- src/generated/resources/assets/enderio/lang/en_ud.json | 3 ++- src/generated/resources/assets/enderio/lang/en_us.json | 3 ++- src/main/java/com/enderio/base/common/lang/EIOLang.java | 3 ++- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/conduits/java/com/enderio/conduits/client/gui/ConduitScreen.java b/src/conduits/java/com/enderio/conduits/client/gui/ConduitScreen.java index b058bda13f..84aca3c60f 100644 --- a/src/conduits/java/com/enderio/conduits/client/gui/ConduitScreen.java +++ b/src/conduits/java/com/enderio/conduits/client/gui/ConduitScreen.java @@ -103,14 +103,14 @@ private void updateConnectionWidgets(boolean forceUpdate) { new EnumIconWidget<>(this, pos.x(), pos.y() + 20, () -> getOnDynamic(dyn -> dyn.insert(), ColorControl.GREEN), color -> actOnDynamic(dyn -> dyn.withColor(false, color)), - EIOLang.CHANNEL)); + EIOLang.CONDUIT_CHANNEL)); } if (data.showColorExtract()) { addTypedButton( new EnumIconWidget<>(this, pos.x() + 90, pos.y() + 20, () -> getOnDynamic(dyn -> dyn.extract(), ColorControl.GREEN), color -> actOnDynamic(dyn -> dyn.withColor(true, color)), - EIOLang.CHANNEL)); + EIOLang.CONDUIT_CHANNEL)); } if (data.showRedstoneExtract()) { addTypedButton( @@ -122,7 +122,7 @@ private void updateConnectionWidgets(boolean forceUpdate) { new EnumIconWidget<>(this, pos.x() + 90 + 20, pos.y() + 40, () -> getOnDynamic(dyn -> dyn.redstoneChannel(), ColorControl.GREEN), color -> actOnDynamic(dyn -> dyn.withRedstoneChannel(color)), - EIOLang.CHANNEL)); + EIOLang.REDSTONE_CHANNEL)); } menu.getConduitType() .getClientData() diff --git a/src/generated/resources/assets/enderio/lang/en_ud.json b/src/generated/resources/assets/enderio/lang/en_ud.json index 54ae62999d..ca9a534323 100644 --- a/src/generated/resources/assets/enderio/lang/en_ud.json +++ b/src/generated/resources/assets/enderio/lang/en_ud.json @@ -243,9 +243,9 @@ "gui.enderio.category.slicing": "buıɔıןS", "gui.enderio.category.soul_binding": "buıpuıᗺ ןnoS", "gui.enderio.category.tank": "ʞuɐ⟘ pınןℲ", - "gui.enderio.channel": "ןǝuuɐɥƆ", "gui.enderio.conduit.extract": "ʇɔɐɹʇxƎ", "gui.enderio.conduit.insert": "ʇɹǝsuI", + "gui.enderio.conduit_channel": "ןǝuuɐɥƆ-ʇınpuoƆ", "gui.enderio.energy_equivalence": "˙ƎℲ oʇ ʇuǝןɐʌınbǝ 'ʎbɹǝuǝ ɟo ʇıun Ɐ", "gui.enderio.filter": "ɹǝʇןıℲ", "gui.enderio.fluid_conduit.change_fluid1": ":pınןℲ pǝʞɔoꞀ", @@ -269,6 +269,7 @@ "gui.enderio.redstone.always_active": "ǝʌıʇɔɐ sʎɐʍןⱯ", "gui.enderio.redstone.mode": "ǝpoW ǝuoʇspǝᴚ", "gui.enderio.redstone.never_active": "ǝʌıʇɔɐ ɹǝʌǝN", + "gui.enderio.redstone_channel": "ןǝuuɐɥƆ-ǝuoʇspǝᴚ", "gui.enderio.round_robin.disabled": "pǝןqɐsıᗡ uıqoᴚ punoᴚ", "gui.enderio.round_robin.enabled": "pǝןqɐuƎ uıqoᴚ punoᴚ", "gui.enderio.sag_mill_chance": "%s%% :ǝɔuɐɥƆ", diff --git a/src/generated/resources/assets/enderio/lang/en_us.json b/src/generated/resources/assets/enderio/lang/en_us.json index bf07fb6dac..2a236316ca 100644 --- a/src/generated/resources/assets/enderio/lang/en_us.json +++ b/src/generated/resources/assets/enderio/lang/en_us.json @@ -243,9 +243,9 @@ "gui.enderio.category.slicing": "Slicing", "gui.enderio.category.soul_binding": "Soul Binding", "gui.enderio.category.tank": "Fluid Tank", - "gui.enderio.channel": "Channel", "gui.enderio.conduit.extract": "Extract", "gui.enderio.conduit.insert": "Insert", + "gui.enderio.conduit_channel": "Conduit-Channel", "gui.enderio.energy_equivalence": "A unit of energy, equivalent to FE.", "gui.enderio.filter": "Filter", "gui.enderio.fluid_conduit.change_fluid1": "Locked Fluid:", @@ -269,6 +269,7 @@ "gui.enderio.redstone.always_active": "Always active", "gui.enderio.redstone.mode": "Redstone Mode", "gui.enderio.redstone.never_active": "Never active", + "gui.enderio.redstone_channel": "Redstone-Channel", "gui.enderio.round_robin.disabled": "Round Robin Disabled", "gui.enderio.round_robin.enabled": "Round Robin Enabled", "gui.enderio.sag_mill_chance": "Chance: %s%%", diff --git a/src/main/java/com/enderio/base/common/lang/EIOLang.java b/src/main/java/com/enderio/base/common/lang/EIOLang.java index bc8791068c..b9a31d58f3 100644 --- a/src/main/java/com/enderio/base/common/lang/EIOLang.java +++ b/src/main/java/com/enderio/base/common/lang/EIOLang.java @@ -48,7 +48,8 @@ public class EIOLang { public static final Component TOO_MANY_LEVELS = REGISTRATE.addLang("info", EnderIO.loc("too_many_levels"), "You have more than 21862 levels, that's too much XP."); - public static final Component CHANNEL = REGISTRATE.addLang("gui", EnderIO.loc("channel"), "Channel"); + public static final Component CONDUIT_CHANNEL = REGISTRATE.addLang("gui", EnderIO.loc("conduit_channel"), "Conduit-Channel"); + public static final Component REDSTONE_CHANNEL = REGISTRATE.addLang("gui", EnderIO.loc("redstone_channel"), "Redstone-Channel"); public static final Component REDSTONE_MODE = REGISTRATE.addLang("gui", EnderIO.loc("redstone.mode"), "Redstone Mode"); public static final Component REDSTONE_ALWAYS_ACTIVE = REGISTRATE.addLang("gui", EnderIO.loc("redstone.always_active"), "Always active"); public static final Component REDSTONE_ACTIVE_WITH_SIGNAL = REGISTRATE.addLang("gui", EnderIO.loc("redstone.active_with_signal"), "Active with signal"); From b0ed257db3257abf88d0e0465d209fac32ef5892 Mon Sep 17 00:00:00 2001 From: agnor99 <36055315+agnor99@users.noreply.github.com> Date: Mon, 14 Aug 2023 20:23:38 +0200 Subject: [PATCH 101/154] improve performance of conduit syncing --- .../common/blockentity/ConduitBundle.java | 18 ++++++++++++++++++ .../ConduitBundleNetworkDataSlot.java | 4 +--- .../common/blockentity/ConduitConnection.java | 3 +++ .../common/blockentity/EnderBlockEntity.java | 2 +- 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitBundle.java b/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitBundle.java index ea9ceac181..e5334ff8a0 100644 --- a/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitBundle.java +++ b/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitBundle.java @@ -37,6 +37,8 @@ public final class ConduitBundle implements INBTSerializable { private final Map facadeTextures = new EnumMap<>(Direction.class); + private int dataVersion = Integer.MIN_VALUE; + public ConduitBundle(Runnable scheduleSync, BlockPos pos) { this.scheduleSync = scheduleSync; for (Direction value : Direction.values()) { @@ -71,6 +73,7 @@ public RightClickAction addType(Level level, IConduitType type, Player player node.getExtendedConduitData().onCreated(type, level, pos, player); connections.values().forEach(connection -> connection.disconnectType(index)); scheduleSync.run(); + dataVersion++; return new RightClickAction.Upgrade(first.get()); } //some conduit says no (like higher energy conduit) @@ -93,6 +96,7 @@ public RightClickAction addType(Level level, IConduitType type, Player player node.getExtendedConduitData().onCreated(type, level, pos, player); } scheduleSync.run(); + dataVersion++; return new RightClickAction.Insert(); } @@ -124,6 +128,7 @@ public boolean removeType(Level level, IConduitType type) { removeNodeFor(level, type); types.remove(index); scheduleSync.run(); + dataVersion++; return types.isEmpty(); } @@ -279,11 +284,13 @@ public Optional getFacade(Direction direction) { public void setFacade(BlockState facade, Direction direction) { facadeTextures.put(direction, facade); + dataVersion++; } public void connectTo(Direction direction, IConduitType type, boolean end) { getConnection(direction).connectTo(getNodeFor(type), direction, type, getTypeIndex(type), end); scheduleSync.run(); + dataVersion++; } public boolean disconnectFrom(Direction direction, IConduitType type) { @@ -291,6 +298,7 @@ public boolean disconnectFrom(Direction direction, IConduitType type) { if (type.getTicker().canConnectTo(type, types.get(i))) { getConnection(direction).tryDisconnect(i); scheduleSync.run(); + dataVersion++; return true; } } @@ -322,6 +330,7 @@ public void setNodeFor(IConduitType type, NodeIdentifier node) { } } } + dataVersion++; } public void removeNodeFor(Level level, IConduitType type) { @@ -331,6 +340,7 @@ public void removeNodeFor(Level level, IConduitType type) { node.getGraph().remove(node); } nodes.remove(type); + dataVersion++; } public boolean hasType(IConduitType type) { @@ -351,6 +361,14 @@ public int getTypeIndex(IConduitType type) { throw new IllegalStateException("no conduit matching type in bundle"); } + public int getDataVersion() { + return dataVersion; + } + + public void incrementDataVersion() { + dataVersion++; + } + @UseOnly(LogicalSide.CLIENT) public ConduitBundle deepCopy() { var bundle = new ConduitBundle(() -> {}, pos); diff --git a/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitBundleNetworkDataSlot.java b/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitBundleNetworkDataSlot.java index a904b36757..826a66925e 100644 --- a/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitBundleNetworkDataSlot.java +++ b/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitBundleNetworkDataSlot.java @@ -33,9 +33,7 @@ protected ConduitBundle valueFromNBT(Tag nbt) { @Override protected int hashCode(ConduitBundle value) { - // TODO: This is slow as shit - int code = value.serializeNBT().hashCode(); - return code; + return value.getDataVersion(); } @Override diff --git a/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitConnection.java b/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitConnection.java index 8d71749675..da4e9b8536 100644 --- a/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitConnection.java +++ b/src/conduits/java/com/enderio/conduits/common/blockentity/ConduitConnection.java @@ -78,6 +78,7 @@ public void disconnectType(int index) { public void disableType(int index) { connectionStates[index] = StaticConnectionStates.DISABLED; + on.incrementDataVersion(); } public boolean isEnd() { @@ -174,9 +175,11 @@ public IConnectionState getConnectionState(IConduitType type) { } public void setConnectionState(IConduitType type, IConnectionState state) { setConnectionState(on.getTypeIndex(type),state); + on.incrementDataVersion(); } private void setConnectionState(int i, IConnectionState state) { connectionStates[i] = state; + on.incrementDataVersion(); } public ItemStack getItem(SlotType type, int conduitIndex) { diff --git a/src/core/java/com/enderio/core/common/blockentity/EnderBlockEntity.java b/src/core/java/com/enderio/core/common/blockentity/EnderBlockEntity.java index 6f810e1499..f8794c0e10 100644 --- a/src/core/java/com/enderio/core/common/blockentity/EnderBlockEntity.java +++ b/src/core/java/com/enderio/core/common/blockentity/EnderBlockEntity.java @@ -65,7 +65,7 @@ public void serverTick() { // Perform syncing. if (level != null && !level.isClientSide) { sync(); - setChanged(); + level.blockEntityChanged(worldPosition); } } From bdb8c0d4e552dddd949680fa6eec8c10c39ad9b1 Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Mon, 14 Aug 2023 21:19:03 +0200 Subject: [PATCH 102/154] Update TravelSavedData.java --- .../java/com/enderio/base/common/travel/TravelSavedData.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/enderio/base/common/travel/TravelSavedData.java b/src/main/java/com/enderio/base/common/travel/TravelSavedData.java index ef1337ff00..f4a8f2bc6d 100644 --- a/src/main/java/com/enderio/base/common/travel/TravelSavedData.java +++ b/src/main/java/com/enderio/base/common/travel/TravelSavedData.java @@ -30,6 +30,7 @@ public class TravelSavedData extends SavedData { private static final TravelSavedData CLIENT_INSTANCE = new TravelSavedData(); + public static final String TARGETS = "targets"; private final Map travelTargets = new HashMap<>(); public TravelSavedData() { @@ -50,7 +51,7 @@ public static TravelSavedData getTravelData(Level level) { public void loadNBT(CompoundTag nbt){ this.travelTargets.clear(); - ListTag targets = nbt.getList("targets", Tag.TAG_COMPOUND); + ListTag targets = nbt.getList(TARGETS, Tag.TAG_COMPOUND); targets.stream().map(anchorData -> (CompoundTag)anchorData) .map(TravelRegistry::deserialize) .flatMap(Optional::stream) @@ -93,7 +94,7 @@ public void removeTravelTargetAt(Level level, BlockPos pos) { public CompoundTag save(CompoundTag nbt) { ListTag tag = new ListTag(); tag.addAll(travelTargets.values().stream().map(TravelRegistry::serialize).toList()); - nbt.put("targets", tag); + nbt.put(TARGETS, tag); return nbt; } From 754ee51feb088c8ba212fe63a198b546096d4736 Mon Sep 17 00:00:00 2001 From: agnor99 <36055315+agnor99@users.noreply.github.com> Date: Mon, 14 Aug 2023 23:28:26 +0200 Subject: [PATCH 103/154] replace slicer recipe cache with a slot aware recipe cache --- .../common/blockentity/SlicerBlockEntity.java | 2 +- .../blockentity/SlicerRecipeManager.java | 88 +++++++++++++++++++ .../machines/common/recipe/RecipeCaches.java | 10 --- .../common/utility/RecipeInputCache.java | 7 +- 4 files changed, 91 insertions(+), 16 deletions(-) create mode 100644 src/machines/java/com/enderio/machines/common/blockentity/SlicerRecipeManager.java diff --git a/src/machines/java/com/enderio/machines/common/blockentity/SlicerBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/SlicerBlockEntity.java index 90ba3ccec5..2401bf3c77 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/SlicerBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/SlicerBlockEntity.java @@ -104,7 +104,7 @@ public MachineInventoryLayout getInventoryLayout() { } private boolean isValidInput(int index, ItemStack stack) { - return RecipeCaches.SLICING.hasRecipe(List.of(stack)); + return SlicerRecipeManager.isSlicerValid(stack, index); } private boolean validAxe(int slot, ItemStack stack) { diff --git a/src/machines/java/com/enderio/machines/common/blockentity/SlicerRecipeManager.java b/src/machines/java/com/enderio/machines/common/blockentity/SlicerRecipeManager.java new file mode 100644 index 0000000000..7ffff1e6d4 --- /dev/null +++ b/src/machines/java/com/enderio/machines/common/blockentity/SlicerRecipeManager.java @@ -0,0 +1,88 @@ +package com.enderio.machines.common.blockentity; + +import com.enderio.machines.common.init.MachineRecipes; +import com.enderio.machines.common.recipe.SlicingRecipe; +import net.minecraft.Util; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.Ingredient; +import net.minecraft.world.item.crafting.RecipeManager; +import net.minecraftforge.client.event.RecipesUpdatedEvent; +import net.minecraftforge.event.AddReloadListenerEvent; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.common.Mod; +import net.minecraftforge.fml.util.thread.EffectiveSide; +import net.minecraftforge.server.ServerLifecycleHooks; + +import java.util.*; + +@Mod.EventBusSubscriber +public class SlicerRecipeManager { + private static final List> items = Util.make(() -> { + List> tempList = new ArrayList<>(); + for (int i = 0; i < 6; i++) { + tempList.add(new HashSet<>()); + } + return tempList; + }); + private static final List> nonoptimizableingredients = Util.make(() -> { + List> tempList = new ArrayList<>(); + for (int i = 0; i < 6; i++) { + tempList.add(new HashSet<>()); + } + return tempList; + }); + + private static boolean clearCache = false; + + public static boolean isSlicerValid(ItemStack stack, int slot) { + checkCacheRebuild(); + if (items.get(slot).contains(stack.getItem())) + return true; + for (Ingredient ingredient : nonoptimizableingredients.get(slot)) { + if (ingredient.test(stack)) + return true; + } + return false; + } + + @SubscribeEvent + public static void registerReloadListener(AddReloadListenerEvent event) { + //Fired on datapack reload + clearCache = true; + } + @SubscribeEvent + public static void onRecipesUpdated(RecipesUpdatedEvent event) { + rebuildCache(event.getRecipeManager()); + } + + private static void checkCacheRebuild() { + if (clearCache && EffectiveSide.get().isServer()) { + rebuildCache(ServerLifecycleHooks.getCurrentServer().getRecipeManager()); + clearCache = false; + } + } + + private static void rebuildCache(RecipeManager manager) { + + // Wipe the lookup table + for (Set item : items) { + item.clear(); + } + for (Set nonoptimizableingredient : nonoptimizableingredients) { + nonoptimizableingredient.clear(); + } + + for (SlicingRecipe slicingRecipe : manager.getAllRecipesFor(MachineRecipes.SLICING.type().get())) { + for (int i = 0; i < 6; i++) { + Ingredient ingredient = slicingRecipe.getInputs().get(i); + if (ingredient.getClass() == Ingredient.class) { + Set itemset = items.get(i); + Arrays.stream(ingredient.getItems()).map(ItemStack::getItem).forEach(itemset::add); + } else { + nonoptimizableingredients.get(i).add(ingredient); + } + } + } + } +} diff --git a/src/machines/java/com/enderio/machines/common/recipe/RecipeCaches.java b/src/machines/java/com/enderio/machines/common/recipe/RecipeCaches.java index cd679ba33d..1e24929b3c 100644 --- a/src/machines/java/com/enderio/machines/common/recipe/RecipeCaches.java +++ b/src/machines/java/com/enderio/machines/common/recipe/RecipeCaches.java @@ -1,11 +1,8 @@ package com.enderio.machines.common.recipe; import com.enderio.machines.common.init.MachineRecipes; -import com.enderio.machines.common.integrations.vanilla.VanillaAlloySmeltingRecipe; import com.enderio.machines.common.utility.RecipeInputCache; import net.minecraft.world.Container; -import net.minecraft.world.item.Item; -import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.RecipeType; import net.minecraft.world.item.crafting.SmeltingRecipe; import net.minecraftforge.client.event.RecipesUpdatedEvent; @@ -14,8 +11,6 @@ import net.minecraftforge.fml.common.Mod; import net.minecraftforge.items.wrapper.RecipeWrapper; -import java.util.List; -import java.util.stream.Collectors; @Mod.EventBusSubscriber public class RecipeCaches { @@ -31,9 +26,6 @@ public class RecipeCaches { public static final RecipeInputCache SAGMILLING = new RecipeInputCache<>(MachineRecipes.SAGMILLING.type()); - public static final RecipeInputCache SLICING - = new RecipeInputCache<>(MachineRecipes.SLICING.type()); - public static final RecipeInputCache SOUL_BINDING = new RecipeInputCache<>(MachineRecipes.SOUL_BINDING.type()); @@ -43,7 +35,6 @@ public static void registerReloadListener(AddReloadListenerEvent event) { SMELTING.markCacheDirty(); PAINTING.markCacheDirty(); SAGMILLING.markCacheDirty(); - SLICING.markCacheDirty(); SOUL_BINDING.markCacheDirty(); } @@ -53,7 +44,6 @@ public static void onRecipesUpdated(RecipesUpdatedEvent event) { SMELTING.rebuildCache(event.getRecipeManager()); PAINTING.rebuildCache(event.getRecipeManager()); SAGMILLING.rebuildCache(event.getRecipeManager()); - SLICING.rebuildCache(event.getRecipeManager()); SOUL_BINDING.rebuildCache(event.getRecipeManager()); } } diff --git a/src/machines/java/com/enderio/machines/common/utility/RecipeInputCache.java b/src/machines/java/com/enderio/machines/common/utility/RecipeInputCache.java index 585f392825..35ad3b330f 100644 --- a/src/machines/java/com/enderio/machines/common/utility/RecipeInputCache.java +++ b/src/machines/java/com/enderio/machines/common/utility/RecipeInputCache.java @@ -2,7 +2,6 @@ import com.enderio.machines.common.io.item.MachineInventory; import com.enderio.machines.common.io.item.MultiSlotAccess; -import com.enderio.machines.common.recipe.MachineRecipe; import net.minecraft.world.Container; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; @@ -69,7 +68,7 @@ public boolean hasRecipe(List inputs) { .collect(Collectors.toSet()); } - if (possibleMatches.size() == 0) { + if (possibleMatches.isEmpty()) { return false; } @@ -119,9 +118,7 @@ private void checkCacheRebuild() { public void rebuildCache(RecipeManager recipeManager) { itemToRecipesCache.clear(); recipeToIngredientCache.clear(); - - var recipeType = this.recipeType.get(); - recipeManager.getAllRecipesFor(recipeType) + recipeManager.getAllRecipesFor(recipeType.get()) .forEach(recipe -> { var items = recipe.getIngredients().stream() .flatMap(ingredient -> Arrays.stream(ingredient.getItems())) From 50e78cc3aab2495de2684481bc8b9689f479fff3 Mon Sep 17 00:00:00 2001 From: agnor99 <36055315+agnor99@users.noreply.github.com> Date: Tue, 15 Aug 2023 07:55:49 +0200 Subject: [PATCH 104/154] use proper Ingredient check --- .../machines/common/blockentity/SlicerRecipeManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/machines/java/com/enderio/machines/common/blockentity/SlicerRecipeManager.java b/src/machines/java/com/enderio/machines/common/blockentity/SlicerRecipeManager.java index 7ffff1e6d4..d06791d5f6 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/SlicerRecipeManager.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/SlicerRecipeManager.java @@ -76,7 +76,7 @@ private static void rebuildCache(RecipeManager manager) { for (SlicingRecipe slicingRecipe : manager.getAllRecipesFor(MachineRecipes.SLICING.type().get())) { for (int i = 0; i < 6; i++) { Ingredient ingredient = slicingRecipe.getInputs().get(i); - if (ingredient.getClass() == Ingredient.class) { + if (ingredient.isSimple()) { Set itemset = items.get(i); Arrays.stream(ingredient.getItems()).map(ItemStack::getItem).forEach(itemset::add); } else { From 01aaf42c33d76c97283969c951e2c22955bd5d2b Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Wed, 16 Aug 2023 02:23:05 +0200 Subject: [PATCH 105/154] Update SpawnerMachineTask.java --- .../machines/common/blockentity/task/SpawnerMachineTask.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/machines/java/com/enderio/machines/common/blockentity/task/SpawnerMachineTask.java b/src/machines/java/com/enderio/machines/common/blockentity/task/SpawnerMachineTask.java index b92fb8f970..81a3355088 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/task/SpawnerMachineTask.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/task/SpawnerMachineTask.java @@ -120,7 +120,7 @@ private void loadSoulData(Optional rl) { blockEntity.setReason(PoweredSpawnerBlockEntity.SpawnerBlockedReason.UNKOWN_MOB); return; } - if (optionalEntity.get().is(MachineTags.EntityTypes.SPAWNER_BLACKLIST)) { + if (optionalEntity.get().get().is(MachineTags.EntityTypes.SPAWNER_BLACKLIST)) { return; } Optional opData = SpawnerSoul.SPAWNER.matches(rl.get()); From b45f217f8d2ebcc5d09c324e4130596ac06504cf Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Wed, 16 Aug 2023 03:01:16 +0200 Subject: [PATCH 106/154] Pull lightemission to the Block Entity Level --- .../java/com/enderio/machines/common/block/MachineBlock.java | 5 ++--- .../machines/common/blockentity/FluidTankBlockEntity.java | 5 +++++ .../machines/common/blockentity/base/MachineBlockEntity.java | 5 ++++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/machines/java/com/enderio/machines/common/block/MachineBlock.java b/src/machines/java/com/enderio/machines/common/block/MachineBlock.java index 3750f886b4..bf6d025626 100644 --- a/src/machines/java/com/enderio/machines/common/block/MachineBlock.java +++ b/src/machines/java/com/enderio/machines/common/block/MachineBlock.java @@ -1,6 +1,5 @@ package com.enderio.machines.common.block; -import com.enderio.machines.common.blockentity.FluidTankBlockEntity; import com.enderio.machines.common.blockentity.base.MachineBlockEntity; import com.tterrag.registrate.util.entry.BlockEntityEntry; import net.minecraft.core.BlockPos; @@ -125,8 +124,8 @@ public boolean canConnectRedstone(BlockState state, BlockGetter level, BlockPos @Override public int getLightEmission(BlockState state, BlockGetter level, BlockPos pos) { - if (level.getExistingBlockEntity(pos) instanceof FluidTankBlockEntity fluidTank) { - return fluidTank.getFluidTank().getFluid().getFluid().getFluidType().getLightLevel(); + if (level.getExistingBlockEntity(pos) instanceof MachineBlockEntity machineBlock) { + return machineBlock.getLightEmission(); } return super.getLightEmission(state, level, pos); } diff --git a/src/machines/java/com/enderio/machines/common/blockentity/FluidTankBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/FluidTankBlockEntity.java index 0060121d8d..7c4f37540f 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/FluidTankBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/FluidTankBlockEntity.java @@ -284,6 +284,11 @@ public AbstractContainerMenu createMenu(int pContainerId, Inventory pInventory, return new FluidTankMenu(this, pInventory, pContainerId); } + @Override + public int getLightEmission() { + return getFluidTank().getFluid().getFluid().getFluidType().getLightLevel(); + } + // region Serialization @Override diff --git a/src/machines/java/com/enderio/machines/common/blockentity/base/MachineBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/base/MachineBlockEntity.java index 826f8b9dac..17349da4e6 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/base/MachineBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/base/MachineBlockEntity.java @@ -26,7 +26,6 @@ import net.minecraft.network.chat.Component; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundSource; -import net.minecraft.util.Mth; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.MenuProvider; @@ -736,4 +735,8 @@ public InteractionResult onWrenched(UseOnContext context) { public boolean canOpenMenu() { return true; } + + public int getLightEmission() { + return getBlockState().getLightEmission(); + } } From ebcf517d84720c040862c0231fedc9b46ac21167 Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Wed, 16 Aug 2023 15:07:32 +0200 Subject: [PATCH 107/154] fix active textures of macines --- .../enderio/blockstates/alloy_smelter.json | 8 ++++---- .../assets/enderio/blockstates/crafter.json | 8 ++++---- .../enderio/blockstates/impulse_hopper.json | 8 ++++---- .../enderio/blockstates/painting_machine.json | 8 ++++---- .../enderio/blockstates/powered_spawner.json | 8 ++++---- .../blockstates/primitive_alloy_smelter.json | 8 ++++---- .../assets/enderio/blockstates/sag_mill.json | 8 ++++---- .../enderio/blockstates/slice_and_splice.json | 8 ++++---- .../assets/enderio/blockstates/soul_binder.json | 8 ++++---- .../enderio/blockstates/stirling_generator.json | 8 ++++---- .../block/alloy_smelter_active_combined.json | 16 ++++++++++++++++ .../models/block/alloy_smelter_combined.json | 2 +- .../models/block/crafter_active_combined.json | 16 ++++++++++++++++ .../enderio/models/block/crafter_combined.json | 2 +- .../block/impulse_hopper_active_combined.json | 16 ++++++++++++++++ .../models/block/impulse_hopper_combined.json | 2 +- .../block/painting_machine_active_combined.json | 16 ++++++++++++++++ .../models/block/painting_machine_combined.json | 2 +- .../block/powered_spawner_active_combined.json | 16 ++++++++++++++++ .../models/block/powered_spawner_combined.json | 2 +- .../primitive_alloy_smelter_active_combined.json | 16 ++++++++++++++++ .../block/primitive_alloy_smelter_combined.json | 2 +- .../models/block/sag_mill_active_combined.json | 16 ++++++++++++++++ .../enderio/models/block/sag_mill_combined.json | 2 +- .../block/slice_and_splice_active_combined.json | 16 ++++++++++++++++ .../models/block/slice_and_splice_combined.json | 2 +- .../block/soul_binder_active_combined.json | 16 ++++++++++++++++ .../models/block/soul_binder_combined.json | 2 +- .../stirling_generator_active_combined.json | 16 ++++++++++++++++ .../block/stirling_generator_combined.json | 2 +- .../PrimitiveAlloySmelterBlockEntity.java | 2 +- .../machines/data/model/MachineModelUtil.java | 4 +--- 32 files changed, 212 insertions(+), 54 deletions(-) create mode 100644 src/generated/resources/assets/enderio/models/block/alloy_smelter_active_combined.json create mode 100644 src/generated/resources/assets/enderio/models/block/crafter_active_combined.json create mode 100644 src/generated/resources/assets/enderio/models/block/impulse_hopper_active_combined.json create mode 100644 src/generated/resources/assets/enderio/models/block/painting_machine_active_combined.json create mode 100644 src/generated/resources/assets/enderio/models/block/powered_spawner_active_combined.json create mode 100644 src/generated/resources/assets/enderio/models/block/primitive_alloy_smelter_active_combined.json create mode 100644 src/generated/resources/assets/enderio/models/block/sag_mill_active_combined.json create mode 100644 src/generated/resources/assets/enderio/models/block/slice_and_splice_active_combined.json create mode 100644 src/generated/resources/assets/enderio/models/block/soul_binder_active_combined.json create mode 100644 src/generated/resources/assets/enderio/models/block/stirling_generator_active_combined.json diff --git a/src/generated/resources/assets/enderio/blockstates/alloy_smelter.json b/src/generated/resources/assets/enderio/blockstates/alloy_smelter.json index cdd8df0031..bce9d9263e 100644 --- a/src/generated/resources/assets/enderio/blockstates/alloy_smelter.json +++ b/src/generated/resources/assets/enderio/blockstates/alloy_smelter.json @@ -5,21 +5,21 @@ "y": 90 }, "facing=east,powered=true": { - "model": "enderio:block/alloy_smelter_combined", + "model": "enderio:block/alloy_smelter_active_combined", "y": 90 }, "facing=north,powered=false": { "model": "enderio:block/alloy_smelter_combined" }, "facing=north,powered=true": { - "model": "enderio:block/alloy_smelter_combined" + "model": "enderio:block/alloy_smelter_active_combined" }, "facing=south,powered=false": { "model": "enderio:block/alloy_smelter_combined", "y": 180 }, "facing=south,powered=true": { - "model": "enderio:block/alloy_smelter_combined", + "model": "enderio:block/alloy_smelter_active_combined", "y": 180 }, "facing=west,powered=false": { @@ -27,7 +27,7 @@ "y": 270 }, "facing=west,powered=true": { - "model": "enderio:block/alloy_smelter_combined", + "model": "enderio:block/alloy_smelter_active_combined", "y": 270 } } diff --git a/src/generated/resources/assets/enderio/blockstates/crafter.json b/src/generated/resources/assets/enderio/blockstates/crafter.json index 70d181f921..fdd9351705 100644 --- a/src/generated/resources/assets/enderio/blockstates/crafter.json +++ b/src/generated/resources/assets/enderio/blockstates/crafter.json @@ -5,21 +5,21 @@ "y": 90 }, "facing=east,powered=true": { - "model": "enderio:block/crafter_combined", + "model": "enderio:block/crafter_active_combined", "y": 90 }, "facing=north,powered=false": { "model": "enderio:block/crafter_combined" }, "facing=north,powered=true": { - "model": "enderio:block/crafter_combined" + "model": "enderio:block/crafter_active_combined" }, "facing=south,powered=false": { "model": "enderio:block/crafter_combined", "y": 180 }, "facing=south,powered=true": { - "model": "enderio:block/crafter_combined", + "model": "enderio:block/crafter_active_combined", "y": 180 }, "facing=west,powered=false": { @@ -27,7 +27,7 @@ "y": 270 }, "facing=west,powered=true": { - "model": "enderio:block/crafter_combined", + "model": "enderio:block/crafter_active_combined", "y": 270 } } diff --git a/src/generated/resources/assets/enderio/blockstates/impulse_hopper.json b/src/generated/resources/assets/enderio/blockstates/impulse_hopper.json index 9bd4483fe0..5336a396c0 100644 --- a/src/generated/resources/assets/enderio/blockstates/impulse_hopper.json +++ b/src/generated/resources/assets/enderio/blockstates/impulse_hopper.json @@ -5,21 +5,21 @@ "y": 90 }, "facing=east,powered=true": { - "model": "enderio:block/impulse_hopper_combined", + "model": "enderio:block/impulse_hopper_active_combined", "y": 90 }, "facing=north,powered=false": { "model": "enderio:block/impulse_hopper_combined" }, "facing=north,powered=true": { - "model": "enderio:block/impulse_hopper_combined" + "model": "enderio:block/impulse_hopper_active_combined" }, "facing=south,powered=false": { "model": "enderio:block/impulse_hopper_combined", "y": 180 }, "facing=south,powered=true": { - "model": "enderio:block/impulse_hopper_combined", + "model": "enderio:block/impulse_hopper_active_combined", "y": 180 }, "facing=west,powered=false": { @@ -27,7 +27,7 @@ "y": 270 }, "facing=west,powered=true": { - "model": "enderio:block/impulse_hopper_combined", + "model": "enderio:block/impulse_hopper_active_combined", "y": 270 } } diff --git a/src/generated/resources/assets/enderio/blockstates/painting_machine.json b/src/generated/resources/assets/enderio/blockstates/painting_machine.json index 9b2c52edab..0ed45910d7 100644 --- a/src/generated/resources/assets/enderio/blockstates/painting_machine.json +++ b/src/generated/resources/assets/enderio/blockstates/painting_machine.json @@ -5,21 +5,21 @@ "y": 90 }, "facing=east,powered=true": { - "model": "enderio:block/painting_machine_combined", + "model": "enderio:block/painting_machine_active_combined", "y": 90 }, "facing=north,powered=false": { "model": "enderio:block/painting_machine_combined" }, "facing=north,powered=true": { - "model": "enderio:block/painting_machine_combined" + "model": "enderio:block/painting_machine_active_combined" }, "facing=south,powered=false": { "model": "enderio:block/painting_machine_combined", "y": 180 }, "facing=south,powered=true": { - "model": "enderio:block/painting_machine_combined", + "model": "enderio:block/painting_machine_active_combined", "y": 180 }, "facing=west,powered=false": { @@ -27,7 +27,7 @@ "y": 270 }, "facing=west,powered=true": { - "model": "enderio:block/painting_machine_combined", + "model": "enderio:block/painting_machine_active_combined", "y": 270 } } diff --git a/src/generated/resources/assets/enderio/blockstates/powered_spawner.json b/src/generated/resources/assets/enderio/blockstates/powered_spawner.json index c536235441..2cfcca1896 100644 --- a/src/generated/resources/assets/enderio/blockstates/powered_spawner.json +++ b/src/generated/resources/assets/enderio/blockstates/powered_spawner.json @@ -5,21 +5,21 @@ "y": 90 }, "facing=east,powered=true": { - "model": "enderio:block/powered_spawner_combined", + "model": "enderio:block/powered_spawner_active_combined", "y": 90 }, "facing=north,powered=false": { "model": "enderio:block/powered_spawner_combined" }, "facing=north,powered=true": { - "model": "enderio:block/powered_spawner_combined" + "model": "enderio:block/powered_spawner_active_combined" }, "facing=south,powered=false": { "model": "enderio:block/powered_spawner_combined", "y": 180 }, "facing=south,powered=true": { - "model": "enderio:block/powered_spawner_combined", + "model": "enderio:block/powered_spawner_active_combined", "y": 180 }, "facing=west,powered=false": { @@ -27,7 +27,7 @@ "y": 270 }, "facing=west,powered=true": { - "model": "enderio:block/powered_spawner_combined", + "model": "enderio:block/powered_spawner_active_combined", "y": 270 } } diff --git a/src/generated/resources/assets/enderio/blockstates/primitive_alloy_smelter.json b/src/generated/resources/assets/enderio/blockstates/primitive_alloy_smelter.json index 2aa01fed6f..7c1df91d25 100644 --- a/src/generated/resources/assets/enderio/blockstates/primitive_alloy_smelter.json +++ b/src/generated/resources/assets/enderio/blockstates/primitive_alloy_smelter.json @@ -5,21 +5,21 @@ "y": 90 }, "facing=east,powered=true": { - "model": "enderio:block/primitive_alloy_smelter_combined", + "model": "enderio:block/primitive_alloy_smelter_active_combined", "y": 90 }, "facing=north,powered=false": { "model": "enderio:block/primitive_alloy_smelter_combined" }, "facing=north,powered=true": { - "model": "enderio:block/primitive_alloy_smelter_combined" + "model": "enderio:block/primitive_alloy_smelter_active_combined" }, "facing=south,powered=false": { "model": "enderio:block/primitive_alloy_smelter_combined", "y": 180 }, "facing=south,powered=true": { - "model": "enderio:block/primitive_alloy_smelter_combined", + "model": "enderio:block/primitive_alloy_smelter_active_combined", "y": 180 }, "facing=west,powered=false": { @@ -27,7 +27,7 @@ "y": 270 }, "facing=west,powered=true": { - "model": "enderio:block/primitive_alloy_smelter_combined", + "model": "enderio:block/primitive_alloy_smelter_active_combined", "y": 270 } } diff --git a/src/generated/resources/assets/enderio/blockstates/sag_mill.json b/src/generated/resources/assets/enderio/blockstates/sag_mill.json index f46593f857..d4537c5514 100644 --- a/src/generated/resources/assets/enderio/blockstates/sag_mill.json +++ b/src/generated/resources/assets/enderio/blockstates/sag_mill.json @@ -5,21 +5,21 @@ "y": 90 }, "facing=east,powered=true": { - "model": "enderio:block/sag_mill_combined", + "model": "enderio:block/sag_mill_active_combined", "y": 90 }, "facing=north,powered=false": { "model": "enderio:block/sag_mill_combined" }, "facing=north,powered=true": { - "model": "enderio:block/sag_mill_combined" + "model": "enderio:block/sag_mill_active_combined" }, "facing=south,powered=false": { "model": "enderio:block/sag_mill_combined", "y": 180 }, "facing=south,powered=true": { - "model": "enderio:block/sag_mill_combined", + "model": "enderio:block/sag_mill_active_combined", "y": 180 }, "facing=west,powered=false": { @@ -27,7 +27,7 @@ "y": 270 }, "facing=west,powered=true": { - "model": "enderio:block/sag_mill_combined", + "model": "enderio:block/sag_mill_active_combined", "y": 270 } } diff --git a/src/generated/resources/assets/enderio/blockstates/slice_and_splice.json b/src/generated/resources/assets/enderio/blockstates/slice_and_splice.json index 962f5095cf..4875fdfb47 100644 --- a/src/generated/resources/assets/enderio/blockstates/slice_and_splice.json +++ b/src/generated/resources/assets/enderio/blockstates/slice_and_splice.json @@ -5,21 +5,21 @@ "y": 90 }, "facing=east,powered=true": { - "model": "enderio:block/slice_and_splice_combined", + "model": "enderio:block/slice_and_splice_active_combined", "y": 90 }, "facing=north,powered=false": { "model": "enderio:block/slice_and_splice_combined" }, "facing=north,powered=true": { - "model": "enderio:block/slice_and_splice_combined" + "model": "enderio:block/slice_and_splice_active_combined" }, "facing=south,powered=false": { "model": "enderio:block/slice_and_splice_combined", "y": 180 }, "facing=south,powered=true": { - "model": "enderio:block/slice_and_splice_combined", + "model": "enderio:block/slice_and_splice_active_combined", "y": 180 }, "facing=west,powered=false": { @@ -27,7 +27,7 @@ "y": 270 }, "facing=west,powered=true": { - "model": "enderio:block/slice_and_splice_combined", + "model": "enderio:block/slice_and_splice_active_combined", "y": 270 } } diff --git a/src/generated/resources/assets/enderio/blockstates/soul_binder.json b/src/generated/resources/assets/enderio/blockstates/soul_binder.json index 904b0462bf..739bbc9961 100644 --- a/src/generated/resources/assets/enderio/blockstates/soul_binder.json +++ b/src/generated/resources/assets/enderio/blockstates/soul_binder.json @@ -5,21 +5,21 @@ "y": 90 }, "facing=east,powered=true": { - "model": "enderio:block/soul_binder_combined", + "model": "enderio:block/soul_binder_active_combined", "y": 90 }, "facing=north,powered=false": { "model": "enderio:block/soul_binder_combined" }, "facing=north,powered=true": { - "model": "enderio:block/soul_binder_combined" + "model": "enderio:block/soul_binder_active_combined" }, "facing=south,powered=false": { "model": "enderio:block/soul_binder_combined", "y": 180 }, "facing=south,powered=true": { - "model": "enderio:block/soul_binder_combined", + "model": "enderio:block/soul_binder_active_combined", "y": 180 }, "facing=west,powered=false": { @@ -27,7 +27,7 @@ "y": 270 }, "facing=west,powered=true": { - "model": "enderio:block/soul_binder_combined", + "model": "enderio:block/soul_binder_active_combined", "y": 270 } } diff --git a/src/generated/resources/assets/enderio/blockstates/stirling_generator.json b/src/generated/resources/assets/enderio/blockstates/stirling_generator.json index 73e8660da5..e67de7112c 100644 --- a/src/generated/resources/assets/enderio/blockstates/stirling_generator.json +++ b/src/generated/resources/assets/enderio/blockstates/stirling_generator.json @@ -5,21 +5,21 @@ "y": 90 }, "facing=east,powered=true": { - "model": "enderio:block/stirling_generator_combined", + "model": "enderio:block/stirling_generator_active_combined", "y": 90 }, "facing=north,powered=false": { "model": "enderio:block/stirling_generator_combined" }, "facing=north,powered=true": { - "model": "enderio:block/stirling_generator_combined" + "model": "enderio:block/stirling_generator_active_combined" }, "facing=south,powered=false": { "model": "enderio:block/stirling_generator_combined", "y": 180 }, "facing=south,powered=true": { - "model": "enderio:block/stirling_generator_combined", + "model": "enderio:block/stirling_generator_active_combined", "y": 180 }, "facing=west,powered=false": { @@ -27,7 +27,7 @@ "y": 270 }, "facing=west,powered=true": { - "model": "enderio:block/stirling_generator_combined", + "model": "enderio:block/stirling_generator_active_combined", "y": 270 } } diff --git a/src/generated/resources/assets/enderio/models/block/alloy_smelter_active_combined.json b/src/generated/resources/assets/enderio/models/block/alloy_smelter_active_combined.json new file mode 100644 index 0000000000..f502451581 --- /dev/null +++ b/src/generated/resources/assets/enderio/models/block/alloy_smelter_active_combined.json @@ -0,0 +1,16 @@ +{ + "parent": "minecraft:block/block", + "children": { + "machine": { + "parent": "enderio:block/alloy_smelter_active" + }, + "overlay": { + "parent": "enderio:block/io_overlay" + } + }, + "item_render_order": [ + "machine", + "overlay" + ], + "loader": "forge:composite" +} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/alloy_smelter_combined.json b/src/generated/resources/assets/enderio/models/block/alloy_smelter_combined.json index f502451581..e364d8b08e 100644 --- a/src/generated/resources/assets/enderio/models/block/alloy_smelter_combined.json +++ b/src/generated/resources/assets/enderio/models/block/alloy_smelter_combined.json @@ -2,7 +2,7 @@ "parent": "minecraft:block/block", "children": { "machine": { - "parent": "enderio:block/alloy_smelter_active" + "parent": "enderio:block/alloy_smelter" }, "overlay": { "parent": "enderio:block/io_overlay" diff --git a/src/generated/resources/assets/enderio/models/block/crafter_active_combined.json b/src/generated/resources/assets/enderio/models/block/crafter_active_combined.json new file mode 100644 index 0000000000..295d3c2a73 --- /dev/null +++ b/src/generated/resources/assets/enderio/models/block/crafter_active_combined.json @@ -0,0 +1,16 @@ +{ + "parent": "minecraft:block/block", + "children": { + "machine": { + "parent": "enderio:block/crafter_active" + }, + "overlay": { + "parent": "enderio:block/io_overlay" + } + }, + "item_render_order": [ + "machine", + "overlay" + ], + "loader": "forge:composite" +} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/crafter_combined.json b/src/generated/resources/assets/enderio/models/block/crafter_combined.json index 295d3c2a73..b577f7a7b8 100644 --- a/src/generated/resources/assets/enderio/models/block/crafter_combined.json +++ b/src/generated/resources/assets/enderio/models/block/crafter_combined.json @@ -2,7 +2,7 @@ "parent": "minecraft:block/block", "children": { "machine": { - "parent": "enderio:block/crafter_active" + "parent": "enderio:block/crafter" }, "overlay": { "parent": "enderio:block/io_overlay" diff --git a/src/generated/resources/assets/enderio/models/block/impulse_hopper_active_combined.json b/src/generated/resources/assets/enderio/models/block/impulse_hopper_active_combined.json new file mode 100644 index 0000000000..14df11ecfe --- /dev/null +++ b/src/generated/resources/assets/enderio/models/block/impulse_hopper_active_combined.json @@ -0,0 +1,16 @@ +{ + "parent": "minecraft:block/block", + "children": { + "machine": { + "parent": "enderio:block/impulse_hopper_active" + }, + "overlay": { + "parent": "enderio:block/io_overlay" + } + }, + "item_render_order": [ + "machine", + "overlay" + ], + "loader": "forge:composite" +} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/impulse_hopper_combined.json b/src/generated/resources/assets/enderio/models/block/impulse_hopper_combined.json index 14df11ecfe..87d8cce1af 100644 --- a/src/generated/resources/assets/enderio/models/block/impulse_hopper_combined.json +++ b/src/generated/resources/assets/enderio/models/block/impulse_hopper_combined.json @@ -2,7 +2,7 @@ "parent": "minecraft:block/block", "children": { "machine": { - "parent": "enderio:block/impulse_hopper_active" + "parent": "enderio:block/impulse_hopper" }, "overlay": { "parent": "enderio:block/io_overlay" diff --git a/src/generated/resources/assets/enderio/models/block/painting_machine_active_combined.json b/src/generated/resources/assets/enderio/models/block/painting_machine_active_combined.json new file mode 100644 index 0000000000..cba6570292 --- /dev/null +++ b/src/generated/resources/assets/enderio/models/block/painting_machine_active_combined.json @@ -0,0 +1,16 @@ +{ + "parent": "minecraft:block/block", + "children": { + "machine": { + "parent": "enderio:block/painting_machine_active" + }, + "overlay": { + "parent": "enderio:block/io_overlay" + } + }, + "item_render_order": [ + "machine", + "overlay" + ], + "loader": "forge:composite" +} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/painting_machine_combined.json b/src/generated/resources/assets/enderio/models/block/painting_machine_combined.json index cba6570292..e8551f249a 100644 --- a/src/generated/resources/assets/enderio/models/block/painting_machine_combined.json +++ b/src/generated/resources/assets/enderio/models/block/painting_machine_combined.json @@ -2,7 +2,7 @@ "parent": "minecraft:block/block", "children": { "machine": { - "parent": "enderio:block/painting_machine_active" + "parent": "enderio:block/painting_machine" }, "overlay": { "parent": "enderio:block/io_overlay" diff --git a/src/generated/resources/assets/enderio/models/block/powered_spawner_active_combined.json b/src/generated/resources/assets/enderio/models/block/powered_spawner_active_combined.json new file mode 100644 index 0000000000..f7f2eeb902 --- /dev/null +++ b/src/generated/resources/assets/enderio/models/block/powered_spawner_active_combined.json @@ -0,0 +1,16 @@ +{ + "parent": "minecraft:block/block", + "children": { + "machine": { + "parent": "enderio:block/powered_spawner_active" + }, + "overlay": { + "parent": "enderio:block/io_overlay" + } + }, + "item_render_order": [ + "machine", + "overlay" + ], + "loader": "forge:composite" +} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/powered_spawner_combined.json b/src/generated/resources/assets/enderio/models/block/powered_spawner_combined.json index f7f2eeb902..30341d46a0 100644 --- a/src/generated/resources/assets/enderio/models/block/powered_spawner_combined.json +++ b/src/generated/resources/assets/enderio/models/block/powered_spawner_combined.json @@ -2,7 +2,7 @@ "parent": "minecraft:block/block", "children": { "machine": { - "parent": "enderio:block/powered_spawner_active" + "parent": "enderio:block/powered_spawner" }, "overlay": { "parent": "enderio:block/io_overlay" diff --git a/src/generated/resources/assets/enderio/models/block/primitive_alloy_smelter_active_combined.json b/src/generated/resources/assets/enderio/models/block/primitive_alloy_smelter_active_combined.json new file mode 100644 index 0000000000..20fc8eac05 --- /dev/null +++ b/src/generated/resources/assets/enderio/models/block/primitive_alloy_smelter_active_combined.json @@ -0,0 +1,16 @@ +{ + "parent": "minecraft:block/block", + "children": { + "machine": { + "parent": "enderio:block/primitive_alloy_smelter_active" + }, + "overlay": { + "parent": "enderio:block/io_overlay" + } + }, + "item_render_order": [ + "machine", + "overlay" + ], + "loader": "forge:composite" +} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/primitive_alloy_smelter_combined.json b/src/generated/resources/assets/enderio/models/block/primitive_alloy_smelter_combined.json index 20fc8eac05..1b06010499 100644 --- a/src/generated/resources/assets/enderio/models/block/primitive_alloy_smelter_combined.json +++ b/src/generated/resources/assets/enderio/models/block/primitive_alloy_smelter_combined.json @@ -2,7 +2,7 @@ "parent": "minecraft:block/block", "children": { "machine": { - "parent": "enderio:block/primitive_alloy_smelter_active" + "parent": "enderio:block/primitive_alloy_smelter" }, "overlay": { "parent": "enderio:block/io_overlay" diff --git a/src/generated/resources/assets/enderio/models/block/sag_mill_active_combined.json b/src/generated/resources/assets/enderio/models/block/sag_mill_active_combined.json new file mode 100644 index 0000000000..efba14f64a --- /dev/null +++ b/src/generated/resources/assets/enderio/models/block/sag_mill_active_combined.json @@ -0,0 +1,16 @@ +{ + "parent": "minecraft:block/block", + "children": { + "machine": { + "parent": "enderio:block/sag_mill_active" + }, + "overlay": { + "parent": "enderio:block/io_overlay" + } + }, + "item_render_order": [ + "machine", + "overlay" + ], + "loader": "forge:composite" +} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/sag_mill_combined.json b/src/generated/resources/assets/enderio/models/block/sag_mill_combined.json index efba14f64a..76f8c7408d 100644 --- a/src/generated/resources/assets/enderio/models/block/sag_mill_combined.json +++ b/src/generated/resources/assets/enderio/models/block/sag_mill_combined.json @@ -2,7 +2,7 @@ "parent": "minecraft:block/block", "children": { "machine": { - "parent": "enderio:block/sag_mill_active" + "parent": "enderio:block/sag_mill" }, "overlay": { "parent": "enderio:block/io_overlay" diff --git a/src/generated/resources/assets/enderio/models/block/slice_and_splice_active_combined.json b/src/generated/resources/assets/enderio/models/block/slice_and_splice_active_combined.json new file mode 100644 index 0000000000..5d663a539e --- /dev/null +++ b/src/generated/resources/assets/enderio/models/block/slice_and_splice_active_combined.json @@ -0,0 +1,16 @@ +{ + "parent": "minecraft:block/block", + "children": { + "machine": { + "parent": "enderio:block/slice_and_splice_active" + }, + "overlay": { + "parent": "enderio:block/io_overlay" + } + }, + "item_render_order": [ + "machine", + "overlay" + ], + "loader": "forge:composite" +} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/slice_and_splice_combined.json b/src/generated/resources/assets/enderio/models/block/slice_and_splice_combined.json index 5d663a539e..e4656757ff 100644 --- a/src/generated/resources/assets/enderio/models/block/slice_and_splice_combined.json +++ b/src/generated/resources/assets/enderio/models/block/slice_and_splice_combined.json @@ -2,7 +2,7 @@ "parent": "minecraft:block/block", "children": { "machine": { - "parent": "enderio:block/slice_and_splice_active" + "parent": "enderio:block/slice_and_splice" }, "overlay": { "parent": "enderio:block/io_overlay" diff --git a/src/generated/resources/assets/enderio/models/block/soul_binder_active_combined.json b/src/generated/resources/assets/enderio/models/block/soul_binder_active_combined.json new file mode 100644 index 0000000000..89e19b004c --- /dev/null +++ b/src/generated/resources/assets/enderio/models/block/soul_binder_active_combined.json @@ -0,0 +1,16 @@ +{ + "parent": "minecraft:block/block", + "children": { + "machine": { + "parent": "enderio:block/soul_binder_active" + }, + "overlay": { + "parent": "enderio:block/io_overlay" + } + }, + "item_render_order": [ + "machine", + "overlay" + ], + "loader": "forge:composite" +} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/soul_binder_combined.json b/src/generated/resources/assets/enderio/models/block/soul_binder_combined.json index 89e19b004c..aef3a720a8 100644 --- a/src/generated/resources/assets/enderio/models/block/soul_binder_combined.json +++ b/src/generated/resources/assets/enderio/models/block/soul_binder_combined.json @@ -2,7 +2,7 @@ "parent": "minecraft:block/block", "children": { "machine": { - "parent": "enderio:block/soul_binder_active" + "parent": "enderio:block/soul_binder" }, "overlay": { "parent": "enderio:block/io_overlay" diff --git a/src/generated/resources/assets/enderio/models/block/stirling_generator_active_combined.json b/src/generated/resources/assets/enderio/models/block/stirling_generator_active_combined.json new file mode 100644 index 0000000000..0fa1dc49f5 --- /dev/null +++ b/src/generated/resources/assets/enderio/models/block/stirling_generator_active_combined.json @@ -0,0 +1,16 @@ +{ + "parent": "minecraft:block/block", + "children": { + "machine": { + "parent": "enderio:block/stirling_generator_active" + }, + "overlay": { + "parent": "enderio:block/io_overlay" + } + }, + "item_render_order": [ + "machine", + "overlay" + ], + "loader": "forge:composite" +} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/stirling_generator_combined.json b/src/generated/resources/assets/enderio/models/block/stirling_generator_combined.json index 0fa1dc49f5..92a75bac5c 100644 --- a/src/generated/resources/assets/enderio/models/block/stirling_generator_combined.json +++ b/src/generated/resources/assets/enderio/models/block/stirling_generator_combined.json @@ -2,7 +2,7 @@ "parent": "minecraft:block/block", "children": { "machine": { - "parent": "enderio:block/stirling_generator_active" + "parent": "enderio:block/stirling_generator" }, "overlay": { "parent": "enderio:block/io_overlay" diff --git a/src/machines/java/com/enderio/machines/common/blockentity/PrimitiveAlloySmelterBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/PrimitiveAlloySmelterBlockEntity.java index 6c8fe270cd..2978345d1b 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/PrimitiveAlloySmelterBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/PrimitiveAlloySmelterBlockEntity.java @@ -177,7 +177,7 @@ public int getBurnToFE() { @Override protected boolean isActive() { // Ignores power. - return canAct() && craftingTaskHost.hasTask(); + return canAct() && isBurning(); } @Override diff --git a/src/machines/java/com/enderio/machines/data/model/MachineModelUtil.java b/src/machines/java/com/enderio/machines/data/model/MachineModelUtil.java index 87698ad6d0..f977e31962 100644 --- a/src/machines/java/com/enderio/machines/data/model/MachineModelUtil.java +++ b/src/machines/java/com/enderio/machines/data/model/MachineModelUtil.java @@ -12,11 +12,9 @@ import net.minecraft.world.item.Item; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.state.properties.BlockStateProperties; -import net.minecraftforge.client.model.generators.BlockModelBuilder; import net.minecraftforge.client.model.generators.ConfiguredModel; import net.minecraftforge.client.model.generators.ModelFile; import net.minecraftforge.client.model.generators.loaders.CompositeModelBuilder; -import org.jetbrains.annotations.Nullable; import java.util.Locale; @@ -87,7 +85,7 @@ private static void progressMachineBlock(DataGenContext } private static ModelFile wrapMachineModel(DataGenContext ctx, RegistrateBlockstateProvider prov, ResourceLocation model) { - return prov.models().withExistingParent(ctx.getName() + "_combined", prov.mcLoc("block/block")) + return prov.models().withExistingParent(model.getPath() + "_combined", prov.mcLoc("block/block")) .customLoader(CompositeModelBuilder::begin) .child("machine", EIOModel.getExistingParent(prov.models(), model)) .child("overlay", EIOModel.getExistingParent(prov.models(), EnderIO.loc("block/io_overlay"))) From 9ff8dd60f7918a1be4c53b9e32a2401bc38c5b83 Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Wed, 16 Aug 2023 15:32:58 +0200 Subject: [PATCH 108/154] add particles --- .../block/alloy_smelter_active_combined.json | 5 ++++- .../models/block/alloy_smelter_combined.json | 5 ++++- .../models/block/crafter_active_combined.json | 5 ++++- .../enderio/models/block/crafter_combined.json | 5 ++++- .../enderio/models/block/enchanter_combined.json | 5 ++++- .../block/impulse_hopper_active_combined.json | 5 ++++- .../models/block/impulse_hopper_combined.json | 5 ++++- .../block/painting_machine_active_combined.json | 5 ++++- .../models/block/painting_machine_combined.json | 5 ++++- .../block/powered_spawner_active_combined.json | 5 ++++- .../models/block/powered_spawner_combined.json | 5 ++++- .../primitive_alloy_smelter_active_combined.json | 5 ++++- .../block/primitive_alloy_smelter_combined.json | 5 ++++- .../models/block/sag_mill_active_combined.json | 5 ++++- .../enderio/models/block/sag_mill_combined.json | 5 ++++- .../block/slice_and_splice_active_combined.json | 5 ++++- .../models/block/slice_and_splice_combined.json | 5 ++++- .../models/block/soul_binder_active_combined.json | 5 ++++- .../models/block/soul_binder_combined.json | 5 ++++- .../block/stirling_generator_active_combined.json | 5 ++++- .../models/block/stirling_generator_combined.json | 5 ++++- .../models/block/wired_charger_combined.json | 5 ++++- .../machines/data/model/MachineModelUtil.java | 1 + .../enderio/textures/block/enchanter_front.png | Bin 0 -> 311 bytes 24 files changed, 89 insertions(+), 22 deletions(-) create mode 100644 src/machines/resources/assets/enderio/textures/block/enchanter_front.png diff --git a/src/generated/resources/assets/enderio/models/block/alloy_smelter_active_combined.json b/src/generated/resources/assets/enderio/models/block/alloy_smelter_active_combined.json index f502451581..6d5dc49da0 100644 --- a/src/generated/resources/assets/enderio/models/block/alloy_smelter_active_combined.json +++ b/src/generated/resources/assets/enderio/models/block/alloy_smelter_active_combined.json @@ -12,5 +12,8 @@ "machine", "overlay" ], - "loader": "forge:composite" + "loader": "forge:composite", + "textures": { + "particle": "enderio:block/alloy_smelter_front" + } } \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/alloy_smelter_combined.json b/src/generated/resources/assets/enderio/models/block/alloy_smelter_combined.json index e364d8b08e..0e74e0d3b3 100644 --- a/src/generated/resources/assets/enderio/models/block/alloy_smelter_combined.json +++ b/src/generated/resources/assets/enderio/models/block/alloy_smelter_combined.json @@ -12,5 +12,8 @@ "machine", "overlay" ], - "loader": "forge:composite" + "loader": "forge:composite", + "textures": { + "particle": "enderio:block/alloy_smelter_front" + } } \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/crafter_active_combined.json b/src/generated/resources/assets/enderio/models/block/crafter_active_combined.json index 295d3c2a73..5705796835 100644 --- a/src/generated/resources/assets/enderio/models/block/crafter_active_combined.json +++ b/src/generated/resources/assets/enderio/models/block/crafter_active_combined.json @@ -12,5 +12,8 @@ "machine", "overlay" ], - "loader": "forge:composite" + "loader": "forge:composite", + "textures": { + "particle": "enderio:block/crafter_front" + } } \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/crafter_combined.json b/src/generated/resources/assets/enderio/models/block/crafter_combined.json index b577f7a7b8..58d49c2f94 100644 --- a/src/generated/resources/assets/enderio/models/block/crafter_combined.json +++ b/src/generated/resources/assets/enderio/models/block/crafter_combined.json @@ -12,5 +12,8 @@ "machine", "overlay" ], - "loader": "forge:composite" + "loader": "forge:composite", + "textures": { + "particle": "enderio:block/crafter_front" + } } \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/enchanter_combined.json b/src/generated/resources/assets/enderio/models/block/enchanter_combined.json index d713debf9b..dc531f7ddf 100644 --- a/src/generated/resources/assets/enderio/models/block/enchanter_combined.json +++ b/src/generated/resources/assets/enderio/models/block/enchanter_combined.json @@ -12,5 +12,8 @@ "machine", "overlay" ], - "loader": "forge:composite" + "loader": "forge:composite", + "textures": { + "particle": "enderio:block/enchanter_front" + } } \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/impulse_hopper_active_combined.json b/src/generated/resources/assets/enderio/models/block/impulse_hopper_active_combined.json index 14df11ecfe..b6e4a1f22a 100644 --- a/src/generated/resources/assets/enderio/models/block/impulse_hopper_active_combined.json +++ b/src/generated/resources/assets/enderio/models/block/impulse_hopper_active_combined.json @@ -12,5 +12,8 @@ "machine", "overlay" ], - "loader": "forge:composite" + "loader": "forge:composite", + "textures": { + "particle": "enderio:block/impulse_hopper_front" + } } \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/impulse_hopper_combined.json b/src/generated/resources/assets/enderio/models/block/impulse_hopper_combined.json index 87d8cce1af..631b990dbd 100644 --- a/src/generated/resources/assets/enderio/models/block/impulse_hopper_combined.json +++ b/src/generated/resources/assets/enderio/models/block/impulse_hopper_combined.json @@ -12,5 +12,8 @@ "machine", "overlay" ], - "loader": "forge:composite" + "loader": "forge:composite", + "textures": { + "particle": "enderio:block/impulse_hopper_front" + } } \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/painting_machine_active_combined.json b/src/generated/resources/assets/enderio/models/block/painting_machine_active_combined.json index cba6570292..4874a3a363 100644 --- a/src/generated/resources/assets/enderio/models/block/painting_machine_active_combined.json +++ b/src/generated/resources/assets/enderio/models/block/painting_machine_active_combined.json @@ -12,5 +12,8 @@ "machine", "overlay" ], - "loader": "forge:composite" + "loader": "forge:composite", + "textures": { + "particle": "enderio:block/painting_machine_front" + } } \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/painting_machine_combined.json b/src/generated/resources/assets/enderio/models/block/painting_machine_combined.json index e8551f249a..6249991a08 100644 --- a/src/generated/resources/assets/enderio/models/block/painting_machine_combined.json +++ b/src/generated/resources/assets/enderio/models/block/painting_machine_combined.json @@ -12,5 +12,8 @@ "machine", "overlay" ], - "loader": "forge:composite" + "loader": "forge:composite", + "textures": { + "particle": "enderio:block/painting_machine_front" + } } \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/powered_spawner_active_combined.json b/src/generated/resources/assets/enderio/models/block/powered_spawner_active_combined.json index f7f2eeb902..eb141527ae 100644 --- a/src/generated/resources/assets/enderio/models/block/powered_spawner_active_combined.json +++ b/src/generated/resources/assets/enderio/models/block/powered_spawner_active_combined.json @@ -12,5 +12,8 @@ "machine", "overlay" ], - "loader": "forge:composite" + "loader": "forge:composite", + "textures": { + "particle": "enderio:block/powered_spawner_front" + } } \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/powered_spawner_combined.json b/src/generated/resources/assets/enderio/models/block/powered_spawner_combined.json index 30341d46a0..879adab523 100644 --- a/src/generated/resources/assets/enderio/models/block/powered_spawner_combined.json +++ b/src/generated/resources/assets/enderio/models/block/powered_spawner_combined.json @@ -12,5 +12,8 @@ "machine", "overlay" ], - "loader": "forge:composite" + "loader": "forge:composite", + "textures": { + "particle": "enderio:block/powered_spawner_front" + } } \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/primitive_alloy_smelter_active_combined.json b/src/generated/resources/assets/enderio/models/block/primitive_alloy_smelter_active_combined.json index 20fc8eac05..6f8dd2ae65 100644 --- a/src/generated/resources/assets/enderio/models/block/primitive_alloy_smelter_active_combined.json +++ b/src/generated/resources/assets/enderio/models/block/primitive_alloy_smelter_active_combined.json @@ -12,5 +12,8 @@ "machine", "overlay" ], - "loader": "forge:composite" + "loader": "forge:composite", + "textures": { + "particle": "enderio:block/primitive_alloy_smelter_front" + } } \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/primitive_alloy_smelter_combined.json b/src/generated/resources/assets/enderio/models/block/primitive_alloy_smelter_combined.json index 1b06010499..66ef58bf5c 100644 --- a/src/generated/resources/assets/enderio/models/block/primitive_alloy_smelter_combined.json +++ b/src/generated/resources/assets/enderio/models/block/primitive_alloy_smelter_combined.json @@ -12,5 +12,8 @@ "machine", "overlay" ], - "loader": "forge:composite" + "loader": "forge:composite", + "textures": { + "particle": "enderio:block/primitive_alloy_smelter_front" + } } \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/sag_mill_active_combined.json b/src/generated/resources/assets/enderio/models/block/sag_mill_active_combined.json index efba14f64a..d12bf90938 100644 --- a/src/generated/resources/assets/enderio/models/block/sag_mill_active_combined.json +++ b/src/generated/resources/assets/enderio/models/block/sag_mill_active_combined.json @@ -12,5 +12,8 @@ "machine", "overlay" ], - "loader": "forge:composite" + "loader": "forge:composite", + "textures": { + "particle": "enderio:block/sag_mill_front" + } } \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/sag_mill_combined.json b/src/generated/resources/assets/enderio/models/block/sag_mill_combined.json index 76f8c7408d..8033016ae2 100644 --- a/src/generated/resources/assets/enderio/models/block/sag_mill_combined.json +++ b/src/generated/resources/assets/enderio/models/block/sag_mill_combined.json @@ -12,5 +12,8 @@ "machine", "overlay" ], - "loader": "forge:composite" + "loader": "forge:composite", + "textures": { + "particle": "enderio:block/sag_mill_front" + } } \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/slice_and_splice_active_combined.json b/src/generated/resources/assets/enderio/models/block/slice_and_splice_active_combined.json index 5d663a539e..cffb3059f8 100644 --- a/src/generated/resources/assets/enderio/models/block/slice_and_splice_active_combined.json +++ b/src/generated/resources/assets/enderio/models/block/slice_and_splice_active_combined.json @@ -12,5 +12,8 @@ "machine", "overlay" ], - "loader": "forge:composite" + "loader": "forge:composite", + "textures": { + "particle": "enderio:block/slice_and_splice_front" + } } \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/slice_and_splice_combined.json b/src/generated/resources/assets/enderio/models/block/slice_and_splice_combined.json index e4656757ff..a41b1dba81 100644 --- a/src/generated/resources/assets/enderio/models/block/slice_and_splice_combined.json +++ b/src/generated/resources/assets/enderio/models/block/slice_and_splice_combined.json @@ -12,5 +12,8 @@ "machine", "overlay" ], - "loader": "forge:composite" + "loader": "forge:composite", + "textures": { + "particle": "enderio:block/slice_and_splice_front" + } } \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/soul_binder_active_combined.json b/src/generated/resources/assets/enderio/models/block/soul_binder_active_combined.json index 89e19b004c..724ef62396 100644 --- a/src/generated/resources/assets/enderio/models/block/soul_binder_active_combined.json +++ b/src/generated/resources/assets/enderio/models/block/soul_binder_active_combined.json @@ -12,5 +12,8 @@ "machine", "overlay" ], - "loader": "forge:composite" + "loader": "forge:composite", + "textures": { + "particle": "enderio:block/soul_binder_front" + } } \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/soul_binder_combined.json b/src/generated/resources/assets/enderio/models/block/soul_binder_combined.json index aef3a720a8..84ef7638a0 100644 --- a/src/generated/resources/assets/enderio/models/block/soul_binder_combined.json +++ b/src/generated/resources/assets/enderio/models/block/soul_binder_combined.json @@ -12,5 +12,8 @@ "machine", "overlay" ], - "loader": "forge:composite" + "loader": "forge:composite", + "textures": { + "particle": "enderio:block/soul_binder_front" + } } \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/stirling_generator_active_combined.json b/src/generated/resources/assets/enderio/models/block/stirling_generator_active_combined.json index 0fa1dc49f5..70beb0f615 100644 --- a/src/generated/resources/assets/enderio/models/block/stirling_generator_active_combined.json +++ b/src/generated/resources/assets/enderio/models/block/stirling_generator_active_combined.json @@ -12,5 +12,8 @@ "machine", "overlay" ], - "loader": "forge:composite" + "loader": "forge:composite", + "textures": { + "particle": "enderio:block/stirling_generator_front" + } } \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/stirling_generator_combined.json b/src/generated/resources/assets/enderio/models/block/stirling_generator_combined.json index 92a75bac5c..c80e3deec7 100644 --- a/src/generated/resources/assets/enderio/models/block/stirling_generator_combined.json +++ b/src/generated/resources/assets/enderio/models/block/stirling_generator_combined.json @@ -12,5 +12,8 @@ "machine", "overlay" ], - "loader": "forge:composite" + "loader": "forge:composite", + "textures": { + "particle": "enderio:block/stirling_generator_front" + } } \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/wired_charger_combined.json b/src/generated/resources/assets/enderio/models/block/wired_charger_combined.json index d0474b7534..b957f1c204 100644 --- a/src/generated/resources/assets/enderio/models/block/wired_charger_combined.json +++ b/src/generated/resources/assets/enderio/models/block/wired_charger_combined.json @@ -12,5 +12,8 @@ "machine", "overlay" ], - "loader": "forge:composite" + "loader": "forge:composite", + "textures": { + "particle": "enderio:block/wired_charger_front" + } } \ No newline at end of file diff --git a/src/machines/java/com/enderio/machines/data/model/MachineModelUtil.java b/src/machines/java/com/enderio/machines/data/model/MachineModelUtil.java index f977e31962..868aaa945d 100644 --- a/src/machines/java/com/enderio/machines/data/model/MachineModelUtil.java +++ b/src/machines/java/com/enderio/machines/data/model/MachineModelUtil.java @@ -86,6 +86,7 @@ private static void progressMachineBlock(DataGenContext private static ModelFile wrapMachineModel(DataGenContext ctx, RegistrateBlockstateProvider prov, ResourceLocation model) { return prov.models().withExistingParent(model.getPath() + "_combined", prov.mcLoc("block/block")) + .texture("particle", new ResourceLocation(model.getNamespace(),"block/" + ctx.getName() + "_front")) .customLoader(CompositeModelBuilder::begin) .child("machine", EIOModel.getExistingParent(prov.models(), model)) .child("overlay", EIOModel.getExistingParent(prov.models(), EnderIO.loc("block/io_overlay"))) diff --git a/src/machines/resources/assets/enderio/textures/block/enchanter_front.png b/src/machines/resources/assets/enderio/textures/block/enchanter_front.png new file mode 100644 index 0000000000000000000000000000000000000000..1bf9137d9b1c2eeffd2cbb4f41eca819c5222ebe GIT binary patch literal 311 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|Ea{HEjtmSN`?>!lvI6;>1s;*b z3=BdgAk26#O}+vsc+=CxF~q`u>ZIFwEe1TSKXqDmc)C7XyMg=CwmZN6*Kd3*W6pKg zPUmxiD${LY^~l@XTo9oA_tN7>;d;R(p9Y)okE-9)KeGVs= ztEk?cQo~aGc@yWiA9|XROw-fXn=yJiOji_ge1Bh~OI^kAQ|+tZnV Date: Wed, 16 Aug 2023 16:01:50 +0200 Subject: [PATCH 109/154] Update Slot on Shift Click --- .../java/com/enderio/machines/common/menu/MachineSlot.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/machines/java/com/enderio/machines/common/menu/MachineSlot.java b/src/machines/java/com/enderio/machines/common/menu/MachineSlot.java index f3459fe8b6..63a84dac95 100644 --- a/src/machines/java/com/enderio/machines/common/menu/MachineSlot.java +++ b/src/machines/java/com/enderio/machines/common/menu/MachineSlot.java @@ -34,4 +34,9 @@ public boolean mayPickup(Player playerIn) { public boolean canQuickInsertStack() { return getItemHandler().getLayout().guiCanInsert(getSlotIndex()); } + + @Override + public void setChanged() { + getItemHandler().setStackInSlot(this.getSlotIndex(), this.getItem()); + } } From d83a19ff3c3175c24d659045c42f7eef0e999848 Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Wed, 16 Aug 2023 16:09:50 +0200 Subject: [PATCH 110/154] fix direct itemstack access --- .../java/com/enderio/machines/common/menu/MachineMenu.java | 4 ++-- .../java/com/enderio/machines/common/menu/MachineSlot.java | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/machines/java/com/enderio/machines/common/menu/MachineMenu.java b/src/machines/java/com/enderio/machines/common/menu/MachineMenu.java index ab44bac4d1..d5432421a8 100644 --- a/src/machines/java/com/enderio/machines/common/menu/MachineMenu.java +++ b/src/machines/java/com/enderio/machines/common/menu/MachineMenu.java @@ -105,12 +105,12 @@ protected boolean moveItemStackTo(ItemStack stack, int startIndex, int endIndex, if (j <= maxSize) { stack.setCount(0); itemstack.setCount(j); - slot.setChanged(); + slot.set(itemstack); flag = true; } else if (itemstack.getCount() < maxSize) { stack.shrink(maxSize - itemstack.getCount()); itemstack.setCount(maxSize); - slot.setChanged(); + slot.set(itemstack); flag = true; } } diff --git a/src/machines/java/com/enderio/machines/common/menu/MachineSlot.java b/src/machines/java/com/enderio/machines/common/menu/MachineSlot.java index 63a84dac95..f3459fe8b6 100644 --- a/src/machines/java/com/enderio/machines/common/menu/MachineSlot.java +++ b/src/machines/java/com/enderio/machines/common/menu/MachineSlot.java @@ -34,9 +34,4 @@ public boolean mayPickup(Player playerIn) { public boolean canQuickInsertStack() { return getItemHandler().getLayout().guiCanInsert(getSlotIndex()); } - - @Override - public void setChanged() { - getItemHandler().setStackInSlot(this.getSlotIndex(), this.getItem()); - } } From ed85f365ef2ef9835eea434e91760988639a7258 Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Wed, 16 Aug 2023 16:18:32 +0200 Subject: [PATCH 111/154] Add Warden to Blacklist --- .../data/enderio/tags/entity_types/soul_vial_blacklist.json | 4 +++- .../data/enderio/tags/entity_types/spawner_blacklist.json | 3 ++- .../machines/data/tag/MachineEntityTypeTagsProvider.java | 3 ++- .../com/enderio/base/data/tags/EIOEntityTagsProvider.java | 4 ++-- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/generated/resources/data/enderio/tags/entity_types/soul_vial_blacklist.json b/src/generated/resources/data/enderio/tags/entity_types/soul_vial_blacklist.json index f72d209df7..87e7d3aca6 100644 --- a/src/generated/resources/data/enderio/tags/entity_types/soul_vial_blacklist.json +++ b/src/generated/resources/data/enderio/tags/entity_types/soul_vial_blacklist.json @@ -1,3 +1,5 @@ { - "values": [] + "values": [ + "minecraft:warden" + ] } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/tags/entity_types/spawner_blacklist.json b/src/generated/resources/data/enderio/tags/entity_types/spawner_blacklist.json index e80aa5aa66..2354d1503c 100644 --- a/src/generated/resources/data/enderio/tags/entity_types/spawner_blacklist.json +++ b/src/generated/resources/data/enderio/tags/entity_types/spawner_blacklist.json @@ -1,5 +1,6 @@ { "values": [ - "#forge:bosses" + "#forge:bosses", + "minecraft:warden" ] } \ No newline at end of file diff --git a/src/machines/java/com/enderio/machines/data/tag/MachineEntityTypeTagsProvider.java b/src/machines/java/com/enderio/machines/data/tag/MachineEntityTypeTagsProvider.java index 72fa34460d..5465f0309d 100644 --- a/src/machines/java/com/enderio/machines/data/tag/MachineEntityTypeTagsProvider.java +++ b/src/machines/java/com/enderio/machines/data/tag/MachineEntityTypeTagsProvider.java @@ -5,6 +5,7 @@ import net.minecraft.core.HolderLookup; import net.minecraft.data.PackOutput; import net.minecraft.data.tags.EntityTypeTagsProvider; +import net.minecraft.world.entity.EntityType; import net.minecraftforge.common.Tags; import java.util.concurrent.CompletableFuture; @@ -17,6 +18,6 @@ public MachineEntityTypeTagsProvider(PackOutput packOutput, CompletableFuture Date: Wed, 16 Aug 2023 17:53:39 +0200 Subject: [PATCH 112/154] Change ae2 cost --- .../common/integrations/ae2/AE2InWorldConduitNodeHost.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conduits/java/com/enderio/conduits/common/integrations/ae2/AE2InWorldConduitNodeHost.java b/src/conduits/java/com/enderio/conduits/common/integrations/ae2/AE2InWorldConduitNodeHost.java index fa62b041d0..2016075ed5 100644 --- a/src/conduits/java/com/enderio/conduits/common/integrations/ae2/AE2InWorldConduitNodeHost.java +++ b/src/conduits/java/com/enderio/conduits/common/integrations/ae2/AE2InWorldConduitNodeHost.java @@ -30,7 +30,7 @@ public AE2InWorldConduitNodeHost(AE2ConduitType type) { if (type.isDense()) { mainNode.setFlags(GridFlags.DENSE_CAPACITY); } - mainNode.setIdlePowerUsage(type.isDense() ? 2 : 0.5d); + mainNode.setIdlePowerUsage(type.isDense() ? 0.4d : 0.1d); } @Nullable From 0a01a9ee62b2765fd96d6d319ac23d1dd9072331 Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Wed, 16 Aug 2023 22:33:05 +0200 Subject: [PATCH 113/154] add flywheel compat --- build.gradle | 5 ++++- .../core/common/compat/FlywheelCompat.java | 18 ++++++++++++++++++ .../machines/common/block/MachineBlock.java | 10 +++++++++- 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 src/core/java/com/enderio/core/common/compat/FlywheelCompat.java diff --git a/build.gradle b/build.gradle index 997bcbd87b..bd06e6016c 100644 --- a/build.gradle +++ b/build.gradle @@ -199,7 +199,7 @@ void exclusiveRepo(RepositoryHandler handler, String url, Consumer - exclusiveRepo(handler, 'https://maven.tterrag.com/', 'com.tterrag.registrate') + exclusiveRepo(handler, 'https://maven.tterrag.com/', 'com.tterrag.registrate', 'com.jozufozu.flywheel') exclusiveRepo(handler, 'https://modmaven.dev/', 'mezz.jei', 'mcjty.theoneprobe', 'appeng') exclusiveRepo(handler, 'https://cursemaven.com', 'curse.maven') exclusiveRepo(handler, 'https://maven.blamejared.com', 'vazkii.patchouli', 'net.darkhax.bookshelf', 'net.darkhax.enchdesc') @@ -260,6 +260,9 @@ dependencies { // Jade runtimeOnly fg.deobf("curse.maven:jade-324717:${jade_cf_id}") + //Flywheel + compileOnly fg.deobf("com.jozufozu.flywheel:flywheel-forge-1.20.1:0.6.9-5") // REMOVE When crash is fixed + // Patchouli // compileOnly fg.deobf("vazkii.patchouli:Patchouli:${patchouli_version}:api") // runtimeOnly fg.deobf("vazkii.patchouli:Patchouli:${patchouli_version}") diff --git a/src/core/java/com/enderio/core/common/compat/FlywheelCompat.java b/src/core/java/com/enderio/core/common/compat/FlywheelCompat.java new file mode 100644 index 0000000000..e7b2bed921 --- /dev/null +++ b/src/core/java/com/enderio/core/common/compat/FlywheelCompat.java @@ -0,0 +1,18 @@ +package com.enderio.core.common.compat; + +import com.jozufozu.flywheel.core.virtual.VirtualRenderWorld; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.block.entity.BlockEntity; +import org.jetbrains.annotations.Nullable; + +public class FlywheelCompat { + + @Nullable + public static BlockEntity getExistingBlockEntity(BlockGetter level, BlockPos pos) { + if (level instanceof VirtualRenderWorld) { + return level.getBlockEntity(pos); + } + return level.getExistingBlockEntity(pos); + } +} diff --git a/src/machines/java/com/enderio/machines/common/block/MachineBlock.java b/src/machines/java/com/enderio/machines/common/block/MachineBlock.java index bf6d025626..c5610fbe89 100644 --- a/src/machines/java/com/enderio/machines/common/block/MachineBlock.java +++ b/src/machines/java/com/enderio/machines/common/block/MachineBlock.java @@ -1,5 +1,6 @@ package com.enderio.machines.common.block; +import com.enderio.core.common.compat.FlywheelCompat; import com.enderio.machines.common.blockentity.base.MachineBlockEntity; import com.tterrag.registrate.util.entry.BlockEntityEntry; import net.minecraft.core.BlockPos; @@ -24,6 +25,7 @@ import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.DirectionProperty; import net.minecraft.world.phys.BlockHitResult; +import net.minecraftforge.fml.ModList; import net.minecraftforge.network.NetworkHooks; import org.jetbrains.annotations.Nullable; @@ -124,7 +126,13 @@ public boolean canConnectRedstone(BlockState state, BlockGetter level, BlockPos @Override public int getLightEmission(BlockState state, BlockGetter level, BlockPos pos) { - if (level.getExistingBlockEntity(pos) instanceof MachineBlockEntity machineBlock) { + BlockEntity existingBlockEntity; + if (ModList.get().isLoaded("flywheel")) { + existingBlockEntity = FlywheelCompat.getExistingBlockEntity(level, pos); + } else { + existingBlockEntity = level.getExistingBlockEntity(pos); + } + if (existingBlockEntity instanceof MachineBlockEntity machineBlock) { return machineBlock.getLightEmission(); } return super.getLightEmission(state, level, pos); From e9c50f5cb687cd0db420133d51791101b28a9a58 Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Wed, 16 Aug 2023 23:00:59 +0200 Subject: [PATCH 114/154] add primitive front and special case enchanter --- .../enderio/models/block/enchanter_combined.json | 2 +- .../machines/data/model/MachineModelUtil.java | 2 +- .../block/primitive_alloy_smelter_active.json | 4 ++-- .../enderio/textures/block/enchanter_front.png | Bin 311 -> 0 bytes .../primitive_alloy_smelter_front_active.png | Bin 0 -> 2241 bytes ...imitive_alloy_smelter_front_active.png.mcmeta | 13 +++++++++++++ 6 files changed, 17 insertions(+), 4 deletions(-) delete mode 100644 src/machines/resources/assets/enderio/textures/block/enchanter_front.png create mode 100644 src/machines/resources/assets/enderio/textures/block/primitive_alloy_smelter_front_active.png create mode 100644 src/machines/resources/assets/enderio/textures/block/primitive_alloy_smelter_front_active.png.mcmeta diff --git a/src/generated/resources/assets/enderio/models/block/enchanter_combined.json b/src/generated/resources/assets/enderio/models/block/enchanter_combined.json index dc531f7ddf..b16acbc103 100644 --- a/src/generated/resources/assets/enderio/models/block/enchanter_combined.json +++ b/src/generated/resources/assets/enderio/models/block/enchanter_combined.json @@ -14,6 +14,6 @@ ], "loader": "forge:composite", "textures": { - "particle": "enderio:block/enchanter_front" + "particle": "enderio:block/dark_steel_pressure_plate" } } \ No newline at end of file diff --git a/src/machines/java/com/enderio/machines/data/model/MachineModelUtil.java b/src/machines/java/com/enderio/machines/data/model/MachineModelUtil.java index 868aaa945d..af3eef5410 100644 --- a/src/machines/java/com/enderio/machines/data/model/MachineModelUtil.java +++ b/src/machines/java/com/enderio/machines/data/model/MachineModelUtil.java @@ -86,7 +86,7 @@ private static void progressMachineBlock(DataGenContext private static ModelFile wrapMachineModel(DataGenContext ctx, RegistrateBlockstateProvider prov, ResourceLocation model) { return prov.models().withExistingParent(model.getPath() + "_combined", prov.mcLoc("block/block")) - .texture("particle", new ResourceLocation(model.getNamespace(),"block/" + ctx.getName() + "_front")) + .texture("particle", ctx.getName().equals("enchanter")? EnderIO.loc("block/dark_steel_pressure_plate") : new ResourceLocation(model.getNamespace(),"block/" + ctx.getName() + "_front")) .customLoader(CompositeModelBuilder::begin) .child("machine", EIOModel.getExistingParent(prov.models(), model)) .child("overlay", EIOModel.getExistingParent(prov.models(), EnderIO.loc("block/io_overlay"))) diff --git a/src/machines/resources/assets/enderio/models/block/primitive_alloy_smelter_active.json b/src/machines/resources/assets/enderio/models/block/primitive_alloy_smelter_active.json index 80dbdaddf7..c181ca7d14 100644 --- a/src/machines/resources/assets/enderio/models/block/primitive_alloy_smelter_active.json +++ b/src/machines/resources/assets/enderio/models/block/primitive_alloy_smelter_active.json @@ -1,6 +1,6 @@ { - "parent": "enderio:block/primitive_alloy_smelter", + "parent": "minecraft:block/furnace", "textures": { - "north": "enderio:block/primitive_alloy_smelter_front" + "front": "enderio:block/primitive_alloy_smelter_front_active" } } \ No newline at end of file diff --git a/src/machines/resources/assets/enderio/textures/block/enchanter_front.png b/src/machines/resources/assets/enderio/textures/block/enchanter_front.png deleted file mode 100644 index 1bf9137d9b1c2eeffd2cbb4f41eca819c5222ebe..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 311 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|Ea{HEjtmSN`?>!lvI6;>1s;*b z3=BdgAk26#O}+vsc+=CxF~q`u>ZIFwEe1TSKXqDmc)C7XyMg=CwmZN6*Kd3*W6pKg zPUmxiD${LY^~l@XTo9oA_tN7>;d;R(p9Y)okE-9)KeGVs= ztEk?cQo~aGc@yWiA9|XROw-fXn=yJiOji_ge1Bh~OI^kAQ|+tZnVDroqVbk5(RxsT4OwrSk+s5;!ak9caNbKEY*|g%oigFt7@GH!f8^}`b zktnz=aRm2dr}Ye!=svh+ONnJPotrgFa6eQ2u{bYAQAACED}&8IFgy}0EQFw0 z@?dZ~HtVSSpn($SQ2F`Q(!{fA8XV#rG18mXB@?y}5PRJT@8w zAatTh1M9W4zN<9Pb2>V1XLFTudiS=Llx$m-Kl3iwO}G?R?eA_b&}g*Vd_VZ zk1DtT7IK4Tr@7E2nZ4(fl2lrim#7|yx(Oyy*Crcrv}UiqQ?9D?K?L&CJZbvq#ORIl z*QpMX`-h5a3<~j7V*v}Zhv#xVMYRw)Hx!r2FdD)>Q@TH|dSz&#>=o2c#S$z$ZC$jw zwk9hqc+EGz$gy1`%HzB#Q$Vm=rxdhvQ?8Ryse3eZ_MU{yOQKf07$w2;=Cymp!v2&a z%;1sd>-u4&SjLnXD|+F3uwh&nCj z+FEw~iQz!F6>WQ^!Le~FuyYTXi49TS_w>uDJ8@YuCO+_lkdaQ}4(-#wE6! zcg&kCSPdyVsEXHS6#-6OE>ZFq-JrD4sdhQv0iIf63o8rPa*I*#vIbl(f39d5S}lt{ z)I}tcrM0MlokIMli>{)HRnqV%={agOZ)l3ozEwzQowl88bq->fZvCCEr$b@xucq$5 zUu_&i|00^|6y)T^ogQVSo7G`g6ntpY8%(q8R2Xp^lN2Yr2BW~es9kC9Git^=YkMA7 zxo*9m$GKF-e|pZCZmr$(rZY=EX9@`y1V7_$K_<#`f7SY;ooMSt))oG5)!zv;GMYFffu@q*mybFR+CihSACa+j#>wpc|;p@thC^oNuSXld^Khi>W0lJ=y{s)2_t1(Ba7=af^QQL&{#_JP`A;w^;pb*kD z+)48Ug51{qKe8{TfKLcXu0zGf%j?>J`VfGsfdE7S9w_KD$Eqw>rAP({fD@nr$N@qG zE&^!3UA{5U1?>eCjyJamz)OGu?6WLn1Mz}8e6^m%CQwcQMqnqf%CP7|D1fiNS32|1 zB8JROU;$V#kXaxFumR2ja1+pHmNol`0Q^h;R^V|xw=19yNCEsl^FL<(Uzp4a7#>UZ zpJr$M+o8+@Vq83V2Jva Date: Thu, 17 Aug 2023 00:41:04 +0200 Subject: [PATCH 115/154] Update SpawnerMachineTask.java --- .../blockentity/task/SpawnerMachineTask.java | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/machines/java/com/enderio/machines/common/blockentity/task/SpawnerMachineTask.java b/src/machines/java/com/enderio/machines/common/blockentity/task/SpawnerMachineTask.java index 81a3355088..3d59ff2edb 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/task/SpawnerMachineTask.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/task/SpawnerMachineTask.java @@ -19,13 +19,17 @@ import net.minecraft.world.level.gameevent.GameEvent; import net.minecraft.world.phys.AABB; import net.minecraftforge.event.ForgeEventFactory; +import net.minecraftforge.event.TagsUpdatedEvent; import net.minecraftforge.event.entity.living.MobSpawnEvent; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.common.Mod; import net.minecraftforge.registries.ForgeRegistries; import org.jetbrains.annotations.Nullable; import java.util.List; import java.util.Optional; +@Mod.EventBusSubscriber public class SpawnerMachineTask implements IPoweredMachineTask { public static final int spawnTries = 10; @@ -36,7 +40,8 @@ public class SpawnerMachineTask implements IPoweredMachineTask { private SpawnType spawnType = MachinesConfig.COMMON.SPAWN_TYPE.get(); @Nullable private EntityType entityType; - + private static boolean reload = false; + private boolean reloadCache = reload; private final PoweredSpawnerBlockEntity blockEntity; private final IMachineEnergyStorage energyStorage; @@ -59,7 +64,10 @@ public IMachineEnergyStorage getEnergyStorage() { @Override public void tick() { if (entityType == null) { - complete = true; + if (reload != reloadCache) { + reloadCache = reload; + complete = true; + } return; } if (energyConsumed >= energyCost) { @@ -121,6 +129,7 @@ private void loadSoulData(Optional rl) { return; } if (optionalEntity.get().get().is(MachineTags.EntityTypes.SPAWNER_BLACKLIST)) { + blockEntity.setReason(PoweredSpawnerBlockEntity.SpawnerBlockedReason.DISABLED); return; } Optional opData = SpawnerSoul.SPAWNER.matches(rl.get()); @@ -231,6 +240,11 @@ public void deserializeNBT(CompoundTag nbt) { // endregion + @SubscribeEvent + static void reloadTags(TagsUpdatedEvent event) { + reload = !reload; + } + // TODO: Might want to move this to its own file in future. public enum SpawnType { ENTITYTYPE("entitytype"), From ded013e8f0710a5a55ad187f517cd16670ef8474 Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Thu, 17 Aug 2023 11:04:53 +0200 Subject: [PATCH 116/154] update + add better jei support --- .../enderio/blockstates/mob_generator.json | 8 ++++---- .../block/mob_generator_active_combined.json | 19 +++++++++++++++++++ .../models/block/mob_generator_combined.json | 7 +++++-- .../recipes/soulbinding/mob_generator.json | 10 ++++++++++ .../jei/category/SoulBindingCategory.java | 16 ++++++++++++++++ .../common/recipe/SoulBindingRecipe.java | 5 +++++ .../recipes/SoulBindingRecipeProvider.java | 13 ++++++++++++- 7 files changed, 71 insertions(+), 7 deletions(-) create mode 100644 src/generated/resources/assets/enderio/models/block/mob_generator_active_combined.json create mode 100644 src/generated/resources/data/enderio/recipes/soulbinding/mob_generator.json diff --git a/src/generated/resources/assets/enderio/blockstates/mob_generator.json b/src/generated/resources/assets/enderio/blockstates/mob_generator.json index 1568c2ecbb..86baa816ca 100644 --- a/src/generated/resources/assets/enderio/blockstates/mob_generator.json +++ b/src/generated/resources/assets/enderio/blockstates/mob_generator.json @@ -5,21 +5,21 @@ "y": 90 }, "facing=east,powered=true": { - "model": "enderio:block/mob_generator_combined", + "model": "enderio:block/mob_generator_active_combined", "y": 90 }, "facing=north,powered=false": { "model": "enderio:block/mob_generator_combined" }, "facing=north,powered=true": { - "model": "enderio:block/mob_generator_combined" + "model": "enderio:block/mob_generator_active_combined" }, "facing=south,powered=false": { "model": "enderio:block/mob_generator_combined", "y": 180 }, "facing=south,powered=true": { - "model": "enderio:block/mob_generator_combined", + "model": "enderio:block/mob_generator_active_combined", "y": 180 }, "facing=west,powered=false": { @@ -27,7 +27,7 @@ "y": 270 }, "facing=west,powered=true": { - "model": "enderio:block/mob_generator_combined", + "model": "enderio:block/mob_generator_active_combined", "y": 270 } } diff --git a/src/generated/resources/assets/enderio/models/block/mob_generator_active_combined.json b/src/generated/resources/assets/enderio/models/block/mob_generator_active_combined.json new file mode 100644 index 0000000000..56ced765e3 --- /dev/null +++ b/src/generated/resources/assets/enderio/models/block/mob_generator_active_combined.json @@ -0,0 +1,19 @@ +{ + "parent": "minecraft:block/block", + "children": { + "machine": { + "parent": "enderio:block/mob_generator_active" + }, + "overlay": { + "parent": "enderio:block/io_overlay" + } + }, + "item_render_order": [ + "machine", + "overlay" + ], + "loader": "forge:composite", + "textures": { + "particle": "enderio:block/mob_generator_front" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/mob_generator_combined.json b/src/generated/resources/assets/enderio/models/block/mob_generator_combined.json index 58ec9a4761..b1ec717dcb 100644 --- a/src/generated/resources/assets/enderio/models/block/mob_generator_combined.json +++ b/src/generated/resources/assets/enderio/models/block/mob_generator_combined.json @@ -2,7 +2,7 @@ "parent": "minecraft:block/block", "children": { "machine": { - "parent": "enderio:block/mob_generator_active" + "parent": "enderio:block/mob_generator" }, "overlay": { "parent": "enderio:block/io_overlay" @@ -12,5 +12,8 @@ "machine", "overlay" ], - "loader": "forge:composite" + "loader": "forge:composite", + "textures": { + "particle": "enderio:block/mob_generator_front" + } } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/recipes/soulbinding/mob_generator.json b/src/generated/resources/data/enderio/recipes/soulbinding/mob_generator.json new file mode 100644 index 0000000000..e3ce76b2f7 --- /dev/null +++ b/src/generated/resources/data/enderio/recipes/soulbinding/mob_generator.json @@ -0,0 +1,10 @@ +{ + "type": "enderio:soul_binding", + "energy": 188000, + "exp": 5, + "input": { + "item": "enderio:mob_generator" + }, + "output": "enderio:mob_generator", + "souldata": "generator" +} \ No newline at end of file diff --git a/src/machines/java/com/enderio/machines/common/integrations/jei/category/SoulBindingCategory.java b/src/machines/java/com/enderio/machines/common/integrations/jei/category/SoulBindingCategory.java index 49e660047b..280ed2db7b 100644 --- a/src/machines/java/com/enderio/machines/common/integrations/jei/category/SoulBindingCategory.java +++ b/src/machines/java/com/enderio/machines/common/integrations/jei/category/SoulBindingCategory.java @@ -11,6 +11,8 @@ import com.enderio.machines.common.integrations.jei.util.RecipeUtil; import com.enderio.machines.common.lang.MachineLang; import com.enderio.machines.common.recipe.SoulBindingRecipe; +import com.enderio.machines.common.souldata.ISoulData; +import com.enderio.machines.common.souldata.SoulDataReloadListener; import mezz.jei.api.gui.builder.IRecipeLayoutBuilder; import mezz.jei.api.gui.drawable.IDrawable; import mezz.jei.api.gui.ingredient.IRecipeSlotsView; @@ -85,6 +87,20 @@ public void setRecipe(IRecipeLayoutBuilder builder, SoulBindingRecipe recipe, IF vials.add(item); } + } else if (recipe.getSouldata() != null){ + vials = new ArrayList<>(); + SoulDataReloadListener soulDataReloadListener = SoulDataReloadListener.fromString(recipe.getSouldata()); + + var allEntitiesOfCategory = ForgeRegistries.ENTITY_TYPES.getKeys().stream() + .filter(r -> soulDataReloadListener.map.keySet().contains(r)) + .toList(); + + for (ResourceLocation entity : allEntitiesOfCategory) { + var item = new ItemStack(EIOItems.FILLED_SOUL_VIAL); + SoulVialItem.setEntityType(item, entity); + vials.add(item); + } + } else { vials = SoulVialItem.getAllFilled(); } diff --git a/src/machines/java/com/enderio/machines/common/recipe/SoulBindingRecipe.java b/src/machines/java/com/enderio/machines/common/recipe/SoulBindingRecipe.java index ae97c75e81..60b33f8d68 100644 --- a/src/machines/java/com/enderio/machines/common/recipe/SoulBindingRecipe.java +++ b/src/machines/java/com/enderio/machines/common/recipe/SoulBindingRecipe.java @@ -82,6 +82,11 @@ public MobCategory getMobCategory() { return mobCategory; } + @Nullable + public String getSouldata() { + return souldata; + } + @Override public int getBaseEnergyCost() { return energy; diff --git a/src/machines/java/com/enderio/machines/data/recipes/SoulBindingRecipeProvider.java b/src/machines/java/com/enderio/machines/data/recipes/SoulBindingRecipeProvider.java index 2d84c579be..a08cd1a992 100644 --- a/src/machines/java/com/enderio/machines/data/recipes/SoulBindingRecipeProvider.java +++ b/src/machines/java/com/enderio/machines/data/recipes/SoulBindingRecipeProvider.java @@ -4,7 +4,9 @@ import com.enderio.base.common.init.EIOItems; import com.enderio.base.data.recipe.RecipeDataUtil; import com.enderio.core.data.recipes.EnderRecipeProvider; +import com.enderio.machines.common.init.MachineBlocks; import com.enderio.machines.common.init.MachineRecipes; +import com.enderio.machines.common.souldata.GeneratorSoul; import com.google.gson.JsonObject; import net.minecraft.data.PackOutput; import net.minecraft.data.recipes.FinishedRecipe; @@ -38,6 +40,7 @@ protected void buildRecipes(Consumer pFinishedRecipeConsumer) { build(EIOItems.FRANK_N_ZOMBIE, Ingredient.of(EIOItems.Z_LOGIC_CONTROLLER), 51200, 4, EntityType.ZOMBIE, pFinishedRecipeConsumer); build(EIOItems.SENTIENT_ENDER, Ingredient.of(EIOItems.ENDER_RESONATOR), 51200, 4, EntityType.WITCH, pFinishedRecipeConsumer); build(EIOItems.BROKEN_SPAWNER, Ingredient.of(EIOItems.BROKEN_SPAWNER), 288000, 8, pFinishedRecipeConsumer); + build(MachineBlocks.MOB_GENERATOR, Ingredient.of(MachineBlocks.MOB_GENERATOR), 188000, 5, GeneratorSoul.NAME, pFinishedRecipeConsumer); build(EIOItems.PLAYER_TOKEN, Ingredient.of(EIOItems.DARK_STEEL_BALL), 12800, 1, EntityType.VILLAGER, pFinishedRecipeConsumer); build(EIOItems.MONSTER_TOKEN, Ingredient.of(EIOItems.SOULARIUM_BALL), 12800, 1, MobCategory.MONSTER, pFinishedRecipeConsumer); build(EIOItems.ANIMAL_TOKEN, Ingredient.of(EIOItems.SOULARIUM_BALL), 12800, 1, MobCategory.CREATURE, pFinishedRecipeConsumer); @@ -80,7 +83,15 @@ public FinishedSoulBindingRecipe(ResourceLocation id, ItemLike output, Ingredien this.exp = exp; if (entityType != null && mobCategory != null) { - throw new IllegalArgumentException("entityType and mobCategory are mutually exclusive!"); + throw new IllegalStateException("entityType and mobCategory are mutually exclusive!"); + } + + if (souldata != null && mobCategory != null) { + throw new IllegalStateException("souldata and mobCategory are mutually exclusive!"); + } + + if (entityType != null && souldata != null) { + throw new IllegalStateException("entityType and souldata are mutually exclusive!"); } this.entityType = entityType; From 6e242b4c33086d7ebaf446bfe2819e163e49df8a Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Thu, 17 Aug 2023 11:40:33 +0200 Subject: [PATCH 117/154] More jei support --- .../jei/category/SoulBindingCategory.java | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/machines/java/com/enderio/machines/common/integrations/jei/category/SoulBindingCategory.java b/src/machines/java/com/enderio/machines/common/integrations/jei/category/SoulBindingCategory.java index 280ed2db7b..7b99b6ea2f 100644 --- a/src/machines/java/com/enderio/machines/common/integrations/jei/category/SoulBindingCategory.java +++ b/src/machines/java/com/enderio/machines/common/integrations/jei/category/SoulBindingCategory.java @@ -17,6 +17,7 @@ import mezz.jei.api.gui.drawable.IDrawable; import mezz.jei.api.gui.ingredient.IRecipeSlotsView; import mezz.jei.api.helpers.IGuiHelper; +import mezz.jei.api.recipe.IFocus; import mezz.jei.api.recipe.IFocusGroup; import mezz.jei.api.recipe.RecipeType; import net.minecraft.client.Minecraft; @@ -30,6 +31,7 @@ import java.util.ArrayList; import java.util.List; +import java.util.Optional; import static mezz.jei.api.recipe.RecipeIngredientRole.INPUT; import static mezz.jei.api.recipe.RecipeIngredientRole.OUTPUT; @@ -68,7 +70,19 @@ public IDrawable getIcon() { @Override public void setRecipe(IRecipeLayoutBuilder builder, SoulBindingRecipe recipe, IFocusGroup focuses) { List vials; - if (recipe.getEntityType() != null) { + Optional> output = focuses.getItemStackFocuses(OUTPUT).findFirst(); + Optional> input = focuses.getItemStackFocuses(INPUT).filter(f -> f.getTypedValue().getItemStack().get().is(EIOItems.FILLED_SOUL_VIAL.asItem())).findFirst(); + + if (output.isPresent()) { + var item = new ItemStack(EIOItems.FILLED_SOUL_VIAL); + output.get().getTypedValue().getItemStack().get().getCapability(EIOCapabilities.ENTITY_STORAGE).ifPresent(cap -> { + SoulVialItem.setEntityType(item, cap.getStoredEntityData().getEntityType().get()); + }); + + vials = List.of(item); + } else if (input.isPresent()) { + vials = List.of(input.get().getTypedValue().getIngredient()); + } else if (recipe.getEntityType() != null) { var item = new ItemStack(EIOItems.FILLED_SOUL_VIAL); SoulVialItem.setEntityType(item, recipe.getEntityType()); @@ -78,7 +92,7 @@ public void setRecipe(IRecipeLayoutBuilder builder, SoulBindingRecipe recipe, IF var allEntitiesOfCategory = ForgeRegistries.ENTITY_TYPES.getValues().stream() .filter(e -> e.getCategory().equals(recipe.getMobCategory())) - .map(e -> ForgeRegistries.ENTITY_TYPES.getKey(e)) + .map(ForgeRegistries.ENTITY_TYPES::getKey) .toList(); for (ResourceLocation entity : allEntitiesOfCategory) { @@ -92,7 +106,7 @@ public void setRecipe(IRecipeLayoutBuilder builder, SoulBindingRecipe recipe, IF SoulDataReloadListener soulDataReloadListener = SoulDataReloadListener.fromString(recipe.getSouldata()); var allEntitiesOfCategory = ForgeRegistries.ENTITY_TYPES.getKeys().stream() - .filter(r -> soulDataReloadListener.map.keySet().contains(r)) + .filter(r -> soulDataReloadListener.map.containsKey(r)) .toList(); for (ResourceLocation entity : allEntitiesOfCategory) { From da47a3d254d688d6a089e5dfee336a03b8524ff2 Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Thu, 17 Aug 2023 18:25:35 +0200 Subject: [PATCH 118/154] update datagen --- .../assets/enderio/blockstates/drain.json | 16 ++++++++-------- .../models/block/drain_active_combined.json | 19 +++++++++++++++++++ .../enderio/models/block/drain_combined.json | 19 +++++++++++++++++++ .../tags/blocks/needs_iron_tool.json | 3 ++- 4 files changed, 48 insertions(+), 9 deletions(-) create mode 100644 src/generated/resources/assets/enderio/models/block/drain_active_combined.json create mode 100644 src/generated/resources/assets/enderio/models/block/drain_combined.json diff --git a/src/generated/resources/assets/enderio/blockstates/drain.json b/src/generated/resources/assets/enderio/blockstates/drain.json index 60dc428f7e..cc090dfa5d 100644 --- a/src/generated/resources/assets/enderio/blockstates/drain.json +++ b/src/generated/resources/assets/enderio/blockstates/drain.json @@ -1,33 +1,33 @@ { "variants": { "facing=east,powered=false": { - "model": "enderio:block/drain", + "model": "enderio:block/drain_combined", "y": 90 }, "facing=east,powered=true": { - "model": "enderio:block/drain_active", + "model": "enderio:block/drain_active_combined", "y": 90 }, "facing=north,powered=false": { - "model": "enderio:block/drain" + "model": "enderio:block/drain_combined" }, "facing=north,powered=true": { - "model": "enderio:block/drain_active" + "model": "enderio:block/drain_active_combined" }, "facing=south,powered=false": { - "model": "enderio:block/drain", + "model": "enderio:block/drain_combined", "y": 180 }, "facing=south,powered=true": { - "model": "enderio:block/drain_active", + "model": "enderio:block/drain_active_combined", "y": 180 }, "facing=west,powered=false": { - "model": "enderio:block/drain", + "model": "enderio:block/drain_combined", "y": 270 }, "facing=west,powered=true": { - "model": "enderio:block/drain_active", + "model": "enderio:block/drain_active_combined", "y": 270 } } diff --git a/src/generated/resources/assets/enderio/models/block/drain_active_combined.json b/src/generated/resources/assets/enderio/models/block/drain_active_combined.json new file mode 100644 index 0000000000..08384af231 --- /dev/null +++ b/src/generated/resources/assets/enderio/models/block/drain_active_combined.json @@ -0,0 +1,19 @@ +{ + "parent": "minecraft:block/block", + "children": { + "machine": { + "parent": "enderio:block/drain_active" + }, + "overlay": { + "parent": "enderio:block/io_overlay" + } + }, + "item_render_order": [ + "machine", + "overlay" + ], + "loader": "forge:composite", + "textures": { + "particle": "enderio:block/drain_front" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/drain_combined.json b/src/generated/resources/assets/enderio/models/block/drain_combined.json new file mode 100644 index 0000000000..461d36a080 --- /dev/null +++ b/src/generated/resources/assets/enderio/models/block/drain_combined.json @@ -0,0 +1,19 @@ +{ + "parent": "minecraft:block/block", + "children": { + "machine": { + "parent": "enderio:block/drain" + }, + "overlay": { + "parent": "enderio:block/io_overlay" + } + }, + "item_render_order": [ + "machine", + "overlay" + ], + "loader": "forge:composite", + "textures": { + "particle": "enderio:block/drain_front" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/blocks/needs_iron_tool.json b/src/generated/resources/data/minecraft/tags/blocks/needs_iron_tool.json index a7e24fbdce..07c2795abd 100644 --- a/src/generated/resources/data/minecraft/tags/blocks/needs_iron_tool.json +++ b/src/generated/resources/data/minecraft/tags/blocks/needs_iron_tool.json @@ -22,6 +22,7 @@ "enderio:vacuum_chest", "enderio:xp_vacuum", "enderio:travel_anchor", - "enderio:crafter" + "enderio:crafter", + "enderio:drain" ] } \ No newline at end of file From 7718106cfdd814be612cbc3865582964ca72ba8c Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Thu, 17 Aug 2023 18:39:01 +0200 Subject: [PATCH 119/154] oops --- .../com/enderio/core/common/blockentity/EnderBlockEntity.java | 1 + .../com/enderio/core/common/network/slot/NetworkDataSlot.java | 1 + 2 files changed, 2 insertions(+) diff --git a/src/core/java/com/enderio/core/common/blockentity/EnderBlockEntity.java b/src/core/java/com/enderio/core/common/blockentity/EnderBlockEntity.java index f8794c0e10..5a549c2320 100644 --- a/src/core/java/com/enderio/core/common/blockentity/EnderBlockEntity.java +++ b/src/core/java/com/enderio/core/common/blockentity/EnderBlockEntity.java @@ -205,6 +205,7 @@ public void serverHandleBufferChange(FriendlyByteBuf buf) { throw new IllegalStateException("Invalid buffer was passed over the network to the server."); } dataSlots.get(index).fromBuffer(buf); + dataSlots.get(index).updateServerCallback(); } // endregion diff --git a/src/core/java/com/enderio/core/common/network/slot/NetworkDataSlot.java b/src/core/java/com/enderio/core/common/network/slot/NetworkDataSlot.java index 0a5a100936..6afbfa5188 100644 --- a/src/core/java/com/enderio/core/common/network/slot/NetworkDataSlot.java +++ b/src/core/java/com/enderio/core/common/network/slot/NetworkDataSlot.java @@ -65,5 +65,6 @@ protected int hashCode(T value) { //Called after the server is updated with the new data public void updateServerCallback() { + } } From 2a2a1e40dcdb47c31202c615848e05745ac4ee42 Mon Sep 17 00:00:00 2001 From: mystchonky Date: Fri, 18 Aug 2023 16:04:09 +0530 Subject: [PATCH 120/154] update anchor icon rendering --- .../travel/TravelAnchorRenderer.java | 31 ++++++++++++------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/src/machines/java/com/enderio/machines/client/rendering/travel/TravelAnchorRenderer.java b/src/machines/java/com/enderio/machines/client/rendering/travel/TravelAnchorRenderer.java index 4dd1129191..9155060dcc 100644 --- a/src/machines/java/com/enderio/machines/client/rendering/travel/TravelAnchorRenderer.java +++ b/src/machines/java/com/enderio/machines/client/rendering/travel/TravelAnchorRenderer.java @@ -59,19 +59,19 @@ public void render(AnchorTravelTarget travelData, LevelRenderer levelRenderer, P LevelRenderer.renderLineBox(poseStack, lines, 0, 0, 0, 1, 1, 1, FastColor.ARGB32.red(color) / 255F, FastColor.ARGB32.green(color) / 255F, FastColor.ARGB32.blue(color) / 255F, 1); - // Scale for rendering - double doubleScale = Math.sqrt(0.0035 * Math.sqrt(distanceSquared)); - if (doubleScale < 0.1f) { - doubleScale = 0.1f; - } - doubleScale = doubleScale * (Math.sin(Math.toRadians(Minecraft.getInstance().options.fov().get() / 4d))); - if (active) { - doubleScale *= 1.3; - } - float scale = (float) doubleScale; // Render Text if (!travelData.getName().trim().isEmpty()) { + // Scale for rendering + double doubleScale = Math.sqrt(0.0035 * Math.sqrt(distanceSquared)); + if (doubleScale < 0.1f) { + doubleScale = 0.1f; + } + doubleScale = doubleScale * (Math.sin(Math.toRadians(Minecraft.getInstance().options.fov().get() / 4d))); + if (active) { + doubleScale *= 1.3; + } + float scale = (float) doubleScale; poseStack.pushPose(); poseStack.translate(0.5, 1.05 + (doubleScale * Minecraft.getInstance().font.lineHeight), 0.5); @@ -92,9 +92,18 @@ public void render(AnchorTravelTarget travelData, LevelRenderer levelRenderer, P // Render Icon if (travelData.getIcon() != Items.AIR) { + // Scale for rendering + double doubleScale = Math.sqrt(Math.sqrt(distanceSquared)); + doubleScale = doubleScale * (Math.sin(Math.toRadians(Minecraft.getInstance().options.fov().get() / 4d))); + if (active) { + doubleScale *= 1.3; + } + float scale = (float) doubleScale; poseStack.pushPose(); - poseStack.translate(0.5, 2.5, 0.5); + poseStack.translate(0.5, 0.5, 0.5); poseStack.mulPose(minecraft.getEntityRenderDispatcher().cameraOrientation()); + poseStack.translate(0, 0, -1); + poseStack.scale(scale, scale, scale); ItemStack stack = new ItemStack(travelData.getIcon()); BakedModel bakedmodel = minecraft.getItemRenderer().getModel(stack, minecraft.level, null, 0); minecraft From 84a0fe1485df5d5d3a254e70bce09876461b67af Mon Sep 17 00:00:00 2001 From: Reece Mackie <20544390+Rover656@users.noreply.github.com> Date: Sat, 19 Aug 2023 00:33:13 +0100 Subject: [PATCH 121/154] Ignore sides when using experience rod. --- .../base/common/item/tool/ExperienceRodItem.java | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/enderio/base/common/item/tool/ExperienceRodItem.java b/src/main/java/com/enderio/base/common/item/tool/ExperienceRodItem.java index 47ebff9c68..e96735667c 100644 --- a/src/main/java/com/enderio/base/common/item/tool/ExperienceRodItem.java +++ b/src/main/java/com/enderio/base/common/item/tool/ExperienceRodItem.java @@ -36,13 +36,12 @@ public InteractionResult onItemUseFirst(ItemStack stack, UseOnContext context) { Player player = context.getPlayer(); BlockPos pos = context.getClickedPos(); - Direction side = context.getClickedFace(); - boolean wasSuccess = false; + boolean wasSuccess; if (player.isShiftKeyDown()) { - wasSuccess = transferFromPlayerToBlock(player, level, pos, side); + wasSuccess = transferFromPlayerToBlock(player, level, pos); } else { - wasSuccess = transferFromBlockToPlayer(player, level, pos, side); + wasSuccess = transferFromBlockToPlayer(player, level, pos); } if (wasSuccess) { @@ -60,11 +59,11 @@ public boolean doesSneakBypassUse(ItemStack stack, LevelReader level, BlockPos p return false; } - private static boolean transferFromBlockToPlayer(Player player, Level level, BlockPos pos, Direction side) { + private static boolean transferFromBlockToPlayer(Player player, Level level, BlockPos pos) { try { BlockEntity blockEntity = level.getBlockEntity(pos); if (blockEntity != null) { - return blockEntity.getCapability(ForgeCapabilities.FLUID_HANDLER, side).map(fluidHandler -> { + return blockEntity.getCapability(ForgeCapabilities.FLUID_HANDLER).map(fluidHandler -> { FluidStack availableFluid = fluidHandler.getFluidInTank(0); if (availableFluid.getFluid().is(EIOTags.Fluids.EXPERIENCE) && availableFluid.getAmount() > 0) { @@ -89,7 +88,7 @@ private static boolean transferFromBlockToPlayer(Player player, Level level, Blo return false; } - private static boolean transferFromPlayerToBlock(Player player, Level level, BlockPos pos, Direction side) { + private static boolean transferFromPlayerToBlock(Player player, Level level, BlockPos pos) { try { if (player.experienceLevel <= 0 && player.experienceProgress <= 0.0f) { return false; @@ -97,7 +96,7 @@ private static boolean transferFromPlayerToBlock(Player player, Level level, Blo BlockEntity blockEntity = level.getBlockEntity(pos); if (blockEntity != null) { - return blockEntity.getCapability(ForgeCapabilities.FLUID_HANDLER, side).map(fluidHandler -> { + return blockEntity.getCapability(ForgeCapabilities.FLUID_HANDLER).map(fluidHandler -> { int fluidVolume = ExperienceUtil.getPlayerTotalXp(player) * ExperienceUtil.EXP_TO_FLUID; FluidStack fs = new FluidStack(EIOFluids.XP_JUICE.getSource(), fluidVolume); int takenVolume = fluidHandler.fill(fs, IFluidHandler.FluidAction.EXECUTE); From 4a77570feb5f7ab6fefe447ad45498f810135c90 Mon Sep 17 00:00:00 2001 From: Reece Mackie <20544390+Rover656@users.noreply.github.com> Date: Sat, 19 Aug 2023 00:45:13 +0100 Subject: [PATCH 122/154] New translations en_us.json (French) --- .../resources/assets/enderio/lang/fr_fr.json | 867 +++++++++--------- 1 file changed, 429 insertions(+), 438 deletions(-) diff --git a/src/main/resources/assets/enderio/lang/fr_fr.json b/src/main/resources/assets/enderio/lang/fr_fr.json index feef59684c..bfebebe7f8 100644 --- a/src/main/resources/assets/enderio/lang/fr_fr.json +++ b/src/main/resources/assets/enderio/lang/fr_fr.json @@ -1,317 +1,307 @@ { "advancements.enderio.place_capacitor_bank.description": "Construire une batterie", "advancements.enderio.place_capacitor_bank.title": "Stockage d'Énergie Modulaire", - "advancements.enderio.rich.description": "Fait croire aux autres que tu es riche", + "advancements.enderio.rich.description": "Fait croire aux autres que vous êtes riche", "advancements.enderio.rich.title": "Ne le dis pas aux autres", - "advancements.enderio.richer.description": "Fait croire aux autres que tu es plus riche", + "advancements.enderio.richer.description": "Fait croire aux autres que vous êtes plus riche", "advancements.enderio.richer.title": "Est-ce réel ?", "advancements.enderio.use_glider.description": "Faites-vous vraiment confiance à un morceau de cuir ?", "advancements.enderio.use_glider.title": "Majestueux", - "block.enderio.advanced_capacitor_bank": "Batterie Avancée", - "block.enderio.advanced_photovoltaic_cell": "Cellule Photovoltaïque Avancée", - "block.enderio.alloy_smelter": "Fonderie à Alliages", - "block.enderio.basic_capacitor_bank": "Batterie Basique", - "block.enderio.basic_photovoltaic_cell": "Cellule Photovoltaïque Basique", - "block.enderio.clear_glass": "Verre Transparent", - "block.enderio.clear_glass_black": "Verre Transparent Noir", - "block.enderio.clear_glass_blue": "Verre Transparent Bleu", - "block.enderio.clear_glass_brown": "Verre Transparent Marron", - "block.enderio.clear_glass_cyan": "Verre Foncé Cyan", - "block.enderio.clear_glass_d": "Verre Foncé Transparent", - "block.enderio.clear_glass_d_black": "Verre Foncé Noir Transparent", - "block.enderio.clear_glass_d_blue": "Verre Foncé Bleu Transparent", - "block.enderio.clear_glass_d_brown": "Verre Foncé Marron Transparent", - "block.enderio.clear_glass_d_cyan": "Verre Foncé Cyan Transparent", - "block.enderio.clear_glass_d_gray": "Verre Foncé Gris Transparent", - "block.enderio.clear_glass_d_green": "Verre Foncé Vert Transparent", - "block.enderio.clear_glass_d_light_blue": "Verre Foncé Bleu Clair Transparent", - "block.enderio.clear_glass_d_light_gray": "Verre Foncé Gris Clair Transparent", - "block.enderio.clear_glass_d_lime": "Verre Foncé Vert Clair Transparent", - "block.enderio.clear_glass_d_magenta": "Verre Foncé Magenta Transparent", - "block.enderio.clear_glass_d_orange": "Verre Foncé Orange Transparent", - "block.enderio.clear_glass_d_pink": "Verre Foncé Rose Transparent", - "block.enderio.clear_glass_d_purple": "Verre Foncé Violet Transparent", - "block.enderio.clear_glass_d_red": "Verre Foncé Rouge Transparent", - "block.enderio.clear_glass_d_white": "Verre Foncé Blanc Transparent", - "block.enderio.clear_glass_d_yellow": "Verre Foncé Jaune Transparent", - "block.enderio.clear_glass_e": "Enlightened Clear Glass", - "block.enderio.clear_glass_e_black": "Black Enlightened Clear Glass", - "block.enderio.clear_glass_e_blue": "Blue Enlightened Clear Glass", - "block.enderio.clear_glass_e_brown": "Brown Enlightened Clear Glass", - "block.enderio.clear_glass_e_cyan": "Cyan Enlightened Clear Glass", - "block.enderio.clear_glass_e_gray": "Gray Enlightened Clear Glass", - "block.enderio.clear_glass_e_green": "Green Enlightened Clear Glass", - "block.enderio.clear_glass_e_light_blue": "Light Blue Enlightened Clear Glass", - "block.enderio.clear_glass_e_light_gray": "Light Gray Enlightened Clear Glass", - "block.enderio.clear_glass_e_lime": "Lime Enlightened Clear Glass", - "block.enderio.clear_glass_e_magenta": "Magenta Enlightened Clear Glass", - "block.enderio.clear_glass_e_orange": "Orange Enlightened Clear Glass", - "block.enderio.clear_glass_e_pink": "Pink Enlightened Clear Glass", - "block.enderio.clear_glass_e_purple": "Purple Enlightened Clear Glass", - "block.enderio.clear_glass_e_red": "Red Enlightened Clear Glass", - "block.enderio.clear_glass_e_white": "White Enlightened Clear Glass", - "block.enderio.clear_glass_e_yellow": "Yellow Enlightened Clear Glass", - "block.enderio.clear_glass_gray": "Gray Clear Glass", - "block.enderio.clear_glass_green": "Green Clear Glass", - "block.enderio.clear_glass_light_blue": "Light Blue Clear Glass", - "block.enderio.clear_glass_light_gray": "Light Gray Clear Glass", - "block.enderio.clear_glass_lime": "Lime Clear Glass", - "block.enderio.clear_glass_magenta": "Magenta Clear Glass", - "block.enderio.clear_glass_orange": "Orange Clear Glass", - "block.enderio.clear_glass_pink": "Pink Clear Glass", - "block.enderio.clear_glass_purple": "Purple Clear Glass", - "block.enderio.clear_glass_red": "Red Clear Glass", - "block.enderio.clear_glass_white": "White Clear Glass", - "block.enderio.clear_glass_yellow": "Yellow Clear Glass", - "block.enderio.cloud_seed": "Graine de Nuage", - "block.enderio.cloud_seed_concentrated": "Graine de Nuage Concentré", - "block.enderio.cold_fire": "Feu Froid", - "block.enderio.conductive_alloy_block": "Bloc d'Alliage Conducteur", + "block.enderio.advanced_capacitor_bank": "Batterie avancée", + "block.enderio.alloy_smelter": "Fonderie à alliages", + "block.enderio.basic_capacitor_bank": "Batterie basique", + "block.enderio.clear_glass": "Verre transparent", + "block.enderio.clear_glass_black": "Verre transparent noir", + "block.enderio.clear_glass_blue": "Verre transparent bleu", + "block.enderio.clear_glass_brown": "Verre transparent marron", + "block.enderio.clear_glass_cyan": "Verre transparent cyan", + "block.enderio.clear_glass_d": "Verre transparent opaque", + "block.enderio.clear_glass_d_black": "Verre transparent opaque noir", + "block.enderio.clear_glass_d_blue": "Verre transparent opaque bleu", + "block.enderio.clear_glass_d_brown": "Verre transparent opaque marron", + "block.enderio.clear_glass_d_cyan": "Verre transparent opaque cyan", + "block.enderio.clear_glass_d_gray": "Verre transparent opaque gris", + "block.enderio.clear_glass_d_green": "Verre transparent opaque vert", + "block.enderio.clear_glass_d_light_blue": "Verre transparent opaque bleu clair", + "block.enderio.clear_glass_d_light_gray": "Verre transparent opaque gris clair", + "block.enderio.clear_glass_d_lime": "Verre transparent opaque vert clair", + "block.enderio.clear_glass_d_magenta": "Verre transparent opaque magenta", + "block.enderio.clear_glass_d_orange": "Verre transparent opaque orange", + "block.enderio.clear_glass_d_pink": "Verre transparent opaque rose", + "block.enderio.clear_glass_d_purple": "Verre transparent opaque violet", + "block.enderio.clear_glass_d_red": "Verre transparent opaque rouge", + "block.enderio.clear_glass_d_white": "Verre transparent opaque blanc", + "block.enderio.clear_glass_d_yellow": "Verre transparent opaque jaune", + "block.enderio.clear_glass_e": "Verre transparent lumineux", + "block.enderio.clear_glass_e_black": "Verre transparent lumineux noir", + "block.enderio.clear_glass_e_blue": "Verre transparent lumineux bleu", + "block.enderio.clear_glass_e_brown": "Verre transparent lumineux marron", + "block.enderio.clear_glass_e_cyan": "Verre transparent lumineux cyan", + "block.enderio.clear_glass_e_gray": "Verre transparent lumineux gris", + "block.enderio.clear_glass_e_green": "Verre transparent lumineux vert", + "block.enderio.clear_glass_e_light_blue": "Verre transparent lumineux bleu clair", + "block.enderio.clear_glass_e_light_gray": "Verre transparent lumineux gris clair", + "block.enderio.clear_glass_e_lime": "Verre transparent lumineux vert clair", + "block.enderio.clear_glass_e_magenta": "Verre transparent lumineux magenta", + "block.enderio.clear_glass_e_orange": "Verre transparent lumineux orange", + "block.enderio.clear_glass_e_pink": "Verre transparent lumineux rose", + "block.enderio.clear_glass_e_purple": "Verre transparent lumineux violet", + "block.enderio.clear_glass_e_red": "Verre transparent lumineux rouge", + "block.enderio.clear_glass_e_white": "Verre transparent lumineux blanc", + "block.enderio.clear_glass_e_yellow": "Verre transparent lumineux jaune", + "block.enderio.clear_glass_gray": "Verre transparent gris", + "block.enderio.clear_glass_green": "Verre transparent vert", + "block.enderio.clear_glass_light_blue": "Verre transparent bleu clair", + "block.enderio.clear_glass_light_gray": "Verre transparent gris clair", + "block.enderio.clear_glass_lime": "Verre transparent vert clair", + "block.enderio.clear_glass_magenta": "Verre transparent magenta", + "block.enderio.clear_glass_orange": "Verre transparent orange", + "block.enderio.clear_glass_pink": "Verre transparent rose", + "block.enderio.clear_glass_purple": "Verre transparent violet", + "block.enderio.clear_glass_red": "Verre transparent rouge", + "block.enderio.clear_glass_white": "Verre transparent blanc", + "block.enderio.clear_glass_yellow": "Verre transparent jaune", + "block.enderio.cloud_seed": "Graine de nuage", + "block.enderio.cloud_seed_concentrated": "Graine de nuage concentrée", + "block.enderio.cold_fire": "Feu froid", + "block.enderio.conductive_alloy_block": "Bloc d'alliage conducteur", "block.enderio.conduit": "Conduit", - "block.enderio.copper_alloy_block": "Bloc d'Alliage de Cuivre", + "block.enderio.copper_alloy_block": "Bloc d'alliage de cuivre", "block.enderio.crafter": "Crafteur", "block.enderio.creative_power": "Source d'énergie infinie", - "block.enderio.dark_steel_bars": "Barre d'Acier Sombre", - "block.enderio.dark_steel_block": "Bloc d'Acier Sombre", - "block.enderio.dark_steel_door": "Porte d'Acier Sombre", - "block.enderio.dark_steel_ladder": "Échelle d'Acier Sombre", - "block.enderio.dark_steel_pressure_plate": "Plaque de Pression en Acier Sombre", - "block.enderio.dark_steel_trapdoor": "Trappe d'Acier Sombre", - "block.enderio.dew_of_the_void": "Rosée du Vide", + "block.enderio.dark_steel_bars": "Barre d'acier sombre", + "block.enderio.dark_steel_block": "Bloc d'acier sombre", + "block.enderio.dark_steel_door": "Porte en acier sombre", + "block.enderio.dark_steel_ladder": "Échelle en acier sombre", + "block.enderio.dark_steel_pressure_plate": "Plaque de pression en acier sombre", + "block.enderio.dark_steel_trapdoor": "Trappe en acier sombre", + "block.enderio.dew_of_the_void": "Rosée du vide", "block.enderio.enchanter": "Enchanteur", - "block.enderio.end_steel_bars": "Barre d'Acier de l'Ender", - "block.enderio.end_steel_block": "End Steel Block", - "block.enderio.enderman_head": "Tête d'Enderman", - "block.enderio.energetic_alloy_block": "Energetic Alloy Block", - "block.enderio.ensouled_chassis": "Ensouled Chassis", - "block.enderio.fire_water": "Fire Water", - "block.enderio.fluid_tank": "Réservoir à Fluides", + "block.enderio.end_steel_bars": "Barre en acier de l'End", + "block.enderio.end_steel_block": "Bloc d'acier de l'End", + "block.enderio.enderman_head": "Tête d'enderman", + "block.enderio.energetic_alloy_block": "Bloc d'alliage énergétique", + "block.enderio.energetic_photovoltaic_module": "Module photovoltaïque énergétique", + "block.enderio.ensouled_chassis": "Châssis des âmes", + "block.enderio.fire_water": "Eau brulante", + "block.enderio.fluid_tank": "Réservoir à fluides", "block.enderio.fused_quartz": "Verre de quartz", - "block.enderio.fused_quartz_black": "Black Fused Quartz", - "block.enderio.fused_quartz_blue": "Blue Fused Quartz", - "block.enderio.fused_quartz_brown": "Brown Fused Quartz", - "block.enderio.fused_quartz_cyan": "Cyan Fused Quartz", - "block.enderio.fused_quartz_d": "Dark Fused Quartz", - "block.enderio.fused_quartz_d_black": "Black Dark Fused Quartz", - "block.enderio.fused_quartz_d_blue": "Blue Dark Fused Quartz", - "block.enderio.fused_quartz_d_brown": "Brown Dark Fused Quartz", - "block.enderio.fused_quartz_d_cyan": "Cyan Dark Fused Quartz", - "block.enderio.fused_quartz_d_gray": "Gray Dark Fused Quartz", - "block.enderio.fused_quartz_d_green": "Green Dark Fused Quartz", - "block.enderio.fused_quartz_d_light_blue": "Light Blue Dark Fused Quartz", - "block.enderio.fused_quartz_d_light_gray": "Light Gray Dark Fused Quartz", - "block.enderio.fused_quartz_d_lime": "Lime Dark Fused Quartz", - "block.enderio.fused_quartz_d_magenta": "Magenta Dark Fused Quartz", - "block.enderio.fused_quartz_d_orange": "Orange Dark Fused Quartz", - "block.enderio.fused_quartz_d_pink": "Pink Dark Fused Quartz", - "block.enderio.fused_quartz_d_purple": "Purple Dark Fused Quartz", - "block.enderio.fused_quartz_d_red": "Red Dark Fused Quartz", - "block.enderio.fused_quartz_d_white": "White Dark Fused Quartz", - "block.enderio.fused_quartz_d_yellow": "Yellow Dark Fused Quartz", - "block.enderio.fused_quartz_e": "Enlightened Fused Quartz", - "block.enderio.fused_quartz_e_black": "Black Enlightened Fused Quartz", - "block.enderio.fused_quartz_e_blue": "Blue Enlightened Fused Quartz", - "block.enderio.fused_quartz_e_brown": "Brown Enlightened Fused Quartz", - "block.enderio.fused_quartz_e_cyan": "Cyan Enlightened Fused Quartz", - "block.enderio.fused_quartz_e_gray": "Gray Enlightened Fused Quartz", - "block.enderio.fused_quartz_e_green": "Green Enlightened Fused Quartz", - "block.enderio.fused_quartz_e_light_blue": "Light Blue Enlightened Fused Quartz", - "block.enderio.fused_quartz_e_light_gray": "Light Gray Enlightened Fused Quartz", - "block.enderio.fused_quartz_e_lime": "Lime Enlightened Fused Quartz", - "block.enderio.fused_quartz_e_magenta": "Magenta Enlightened Fused Quartz", - "block.enderio.fused_quartz_e_orange": "Orange Enlightened Fused Quartz", - "block.enderio.fused_quartz_e_pink": "Pink Enlightened Fused Quartz", - "block.enderio.fused_quartz_e_purple": "Purple Enlightened Fused Quartz", - "block.enderio.fused_quartz_e_red": "Red Enlightened Fused Quartz", - "block.enderio.fused_quartz_e_white": "White Enlightened Fused Quartz", - "block.enderio.fused_quartz_e_yellow": "Yellow Enlightened Fused Quartz", - "block.enderio.fused_quartz_gray": "Gray Fused Quartz", - "block.enderio.fused_quartz_green": "Green Fused Quartz", - "block.enderio.fused_quartz_light_blue": "Light Blue Fused Quartz", - "block.enderio.fused_quartz_light_gray": "Light Gray Fused Quartz", - "block.enderio.fused_quartz_lime": "Lime Fused Quartz", - "block.enderio.fused_quartz_magenta": "Magenta Fused Quartz", - "block.enderio.fused_quartz_orange": "Orange Fused Quartz", - "block.enderio.fused_quartz_pink": "Pink Fused Quartz", - "block.enderio.fused_quartz_purple": "Purple Fused Quartz", - "block.enderio.fused_quartz_red": "Red Fused Quartz", - "block.enderio.fused_quartz_white": "White Fused Quartz", - "block.enderio.fused_quartz_yellow": "Yellow Fused Quartz", + "block.enderio.fused_quartz_black": "Verre de quartz noir", + "block.enderio.fused_quartz_blue": "Verre de quartz bleu", + "block.enderio.fused_quartz_brown": "Verre de quartz marron", + "block.enderio.fused_quartz_cyan": "Verre de quartz cyan", + "block.enderio.fused_quartz_d": "Verre de quartz opaque", + "block.enderio.fused_quartz_d_black": "Verre de quartz opaque noir", + "block.enderio.fused_quartz_d_blue": "Verre de quartz opaque bleu", + "block.enderio.fused_quartz_d_brown": "Verre de quartz opaque marron", + "block.enderio.fused_quartz_d_cyan": "Verre de quartz opaque cyan", + "block.enderio.fused_quartz_d_gray": "Verre de quartz opaque gris", + "block.enderio.fused_quartz_d_green": "Verre de quartz opaque vert", + "block.enderio.fused_quartz_d_light_blue": "Verre de quartz opaque bleu clair", + "block.enderio.fused_quartz_d_light_gray": "Verre de quartz opaque gris clair", + "block.enderio.fused_quartz_d_lime": "Verre de quartz opaque vert clair", + "block.enderio.fused_quartz_d_magenta": "Verre de quartz opaque magenta", + "block.enderio.fused_quartz_d_orange": "Verre de quartz opaque orange", + "block.enderio.fused_quartz_d_pink": "Verre de quartz opaque rose", + "block.enderio.fused_quartz_d_purple": "Verre de quartz opaque violet", + "block.enderio.fused_quartz_d_red": "Verre de quartz opaque rouge", + "block.enderio.fused_quartz_d_white": "Verre de quartz opaque blanc", + "block.enderio.fused_quartz_d_yellow": "Verre de quartz opaque jaune", + "block.enderio.fused_quartz_e": "Verre de quartz lumineux", + "block.enderio.fused_quartz_e_black": "Verre de quartz lumineux noir", + "block.enderio.fused_quartz_e_blue": "Verre de quartz lumineux bleu", + "block.enderio.fused_quartz_e_brown": "Verre de quartz lumineux marron", + "block.enderio.fused_quartz_e_cyan": "Verre de quartz lumineux cyan", + "block.enderio.fused_quartz_e_gray": "Verre de quartz lumineux gris", + "block.enderio.fused_quartz_e_green": "Verre de quartz lumineux vert", + "block.enderio.fused_quartz_e_light_blue": "Verre de quartz lumineux bleu clair", + "block.enderio.fused_quartz_e_light_gray": "Verre de quartz lumineux gris clair", + "block.enderio.fused_quartz_e_lime": "Verre de quartz lumineux vert clair", + "block.enderio.fused_quartz_e_magenta": "Verre de quartz lumineux magenta", + "block.enderio.fused_quartz_e_orange": "Verre de quartz lumineux orange", + "block.enderio.fused_quartz_e_pink": "Verre de quartz lumineux rose", + "block.enderio.fused_quartz_e_purple": "Verre de quartz lumineux violet", + "block.enderio.fused_quartz_e_red": "Verre de quartz lumineux rouge", + "block.enderio.fused_quartz_e_white": "Verre de quartz lumineux blanc", + "block.enderio.fused_quartz_e_yellow": "Verre de quartz lumineux jaune", + "block.enderio.fused_quartz_gray": "Verre de quartz gris", + "block.enderio.fused_quartz_green": "Verre de quartz vert", + "block.enderio.fused_quartz_light_blue": "Verre de quartz bleu clair", + "block.enderio.fused_quartz_light_gray": "Verre de quartz gris clair", + "block.enderio.fused_quartz_lime": "Verre de quartz vert clair", + "block.enderio.fused_quartz_magenta": "Verre de quartz magenta", + "block.enderio.fused_quartz_orange": "Verre de quartz orange", + "block.enderio.fused_quartz_pink": "Verre de quartz rose", + "block.enderio.fused_quartz_purple": "Verre de quartz violet", + "block.enderio.fused_quartz_red": "Verre de quartz rouge", + "block.enderio.fused_quartz_white": "Verre de quartz blanc", + "block.enderio.fused_quartz_yellow": "Verre de quartz jaune", "block.enderio.hootch": "Hootch", - "block.enderio.impulse_hopper": "Entonnoir à Impulsions", - "block.enderio.industrial_insulation_block": "Isolation Industrielle", + "block.enderio.impulse_hopper": "Entonnoir à impulsions", + "block.enderio.industrial_insulation_block": "Isolation industrielle", "block.enderio.light": "Lumière", "block.enderio.light_inverted": "Lumière Inversée", - "block.enderio.light_node": "Light Node", - "block.enderio.liquid_sunshine": "Lumière du Soleil Liquide", - "block.enderio.nutrient_distillation": "Distillat de Nutriments", - "block.enderio.painted_crafting_table": "Établi Peint", - "block.enderio.painted_fence": "Barrière Peinte", - "block.enderio.painted_fence_gate": "Portillon Peint", - "block.enderio.painted_glowstone": "Pierre Lumineuse Peinte", - "block.enderio.painted_redstone_block": "Bloc de Redstone Peint", - "block.enderio.painted_sand": "Sable Peint", - "block.enderio.painted_slab": "Dalle Peinte", - "block.enderio.painted_stairs": "Escaliers Peints", + "block.enderio.light_node": "Point lumineux", + "block.enderio.liquid_sunshine": "Lumière de soleil liquide", + "block.enderio.nutrient_distillation": "Distillat de nutriments", + "block.enderio.painted_crafting_table": "Établi peint", + "block.enderio.painted_fence": "Barrière peinte", + "block.enderio.painted_fence_gate": "Portillon peint", + "block.enderio.painted_glowstone": "Pierre lumineuse peinte", + "block.enderio.painted_redstone_block": "Bloc de redstone peint", + "block.enderio.painted_sand": "Sable peint", + "block.enderio.painted_slab": "Dalle peinte", + "block.enderio.painted_stairs": "Escaliers peints", "block.enderio.painted_trapdoor": "Trappe Peinte", - "block.enderio.painted_wooden_pressure_plate": "Plaque de Pression Peinte", - "block.enderio.painting_machine": "Machine à Peindre", - "block.enderio.powered_light": "Lumière Alimentée", - "block.enderio.powered_light_inverted": "Lumière Alimentée Inversée", - "block.enderio.powered_light_inverted_wireless": "Lumière Alimentée Inversée Sans Fil", - "block.enderio.powered_light_wireless": "Powered Light Wireless", - "block.enderio.powered_spawner": "Générateur de Créatures Alimenté", - "block.enderio.pressurized_fluid_tank": "Pressurized Fluid Tank", - "block.enderio.primitive_alloy_smelter": "Primitive Alloy Smelter", - "block.enderio.pulsating_alloy_block": "Pulsating Alloy Block", - "block.enderio.redstone_alloy_block": "Redstone Alloy Block", - "block.enderio.reinforced_obsidian_block": "Reinforced Obsidian Block", - "block.enderio.resetting_lever_five": "Levier Automatique (5 secondes)", - "block.enderio.resetting_lever_five_inv": "Levier Automatique Inversé (5 secondes)", - "block.enderio.resetting_lever_sixty": "Levier Automatique (1 minute)", - "block.enderio.resetting_lever_sixty_inv": "Levier Automatique Inversé (1 minute)", - "block.enderio.resetting_lever_ten": "Levier Automatique (10 secondes)", - "block.enderio.resetting_lever_ten_inv": "Levier Automatique Inversé (10 secondes)", - "block.enderio.resetting_lever_thirty": "Levier Automatique (30 secondes)", - "block.enderio.resetting_lever_thirty_inv": "Levier Automatique Inversé (30 secondes)", - "block.enderio.resetting_lever_three_hundred": "Levier Automatique (5 minutes)", - "block.enderio.resetting_lever_three_hundred_inv": "Levier Automatique Inversé (5 minutes)", - "block.enderio.rocket_fuel": "Rocket Fuel", - "block.enderio.sag_mill": "SAG Mill", - "block.enderio.silent_acacia_pressure_plate": "Silent Acacia Pressure Plate", - "block.enderio.silent_birch_pressure_plate": "Silent Birch Pressure Plate", - "block.enderio.silent_crimson_pressure_plate": "Silent Crimson Pressure Plate", - "block.enderio.silent_dark_oak_pressure_plate": "Silent Dark Oak Pressure Plate", - "block.enderio.silent_dark_steel_pressure_plate": "Silent Dark Steel Pressure Plate", - "block.enderio.silent_heavy_weighted_pressure_plate": "Silent Heavy Weighted Pressure Plate", - "block.enderio.silent_jungle_pressure_plate": "Silent Jungle Pressure Plate", - "block.enderio.silent_light_weighted_pressure_plate": "Silent Light Weighted Pressure Plate", - "block.enderio.silent_oak_pressure_plate": "Silent Oak Pressure Plate", - "block.enderio.silent_polished_blackstone_pressure_plate": "Silent Polished Blackstone Pressure Plate", - "block.enderio.silent_soularium_pressure_plate": "Silent Soularium Pressure Plate", - "block.enderio.silent_spruce_pressure_plate": "Silent Spruce Pressure Plate", - "block.enderio.silent_stone_pressure_plate": "Silent Stone Pressure Plate", - "block.enderio.silent_warped_pressure_plate": "Silent Warped Pressure Plate", - "block.enderio.simple_photovoltaic_cell": "Simple Photovoltaic Cell", + "block.enderio.painted_wooden_pressure_plate": "Plaque de pression peinte", + "block.enderio.painting_machine": "Machine à peindre", + "block.enderio.powered_light": "Lumière alimentée", + "block.enderio.powered_light_inverted": "Lumière alimentée inversée", + "block.enderio.powered_light_inverted_wireless": "Lumière alimentée inversée sans fil", + "block.enderio.powered_light_wireless": "Lumière alimentée sans fil", + "block.enderio.powered_spawner": "Générateur de créatures alimenté", + "block.enderio.pressurized_fluid_tank": "Réservoir de fluide pressurisé", + "block.enderio.primitive_alloy_smelter": "Four d'alliage primitif", + "block.enderio.pulsating_alloy_block": "Bloc d'alliage pulsé", + "block.enderio.pulsating_photovoltaic_module": "Module photovoltaïque pulsé", + "block.enderio.redstone_alloy_block": "Bloc d'alliage de redstone", + "block.enderio.reinforced_obsidian_block": "Bloc d'obsidienne renforcée", + "block.enderio.resetting_lever_five": "Levier automatique (5 secondes)", + "block.enderio.resetting_lever_five_inv": "Levier automatique inversé (5 secondes)", + "block.enderio.resetting_lever_sixty": "Levier automatique (1 minute)", + "block.enderio.resetting_lever_sixty_inv": "Levier automatique inversé (1 minute)", + "block.enderio.resetting_lever_ten": "Levier automatique (10 secondes)", + "block.enderio.resetting_lever_ten_inv": "Levier automatique inversé (10 secondes)", + "block.enderio.resetting_lever_thirty": "Levier automatique (30 secondes)", + "block.enderio.resetting_lever_thirty_inv": "Levier automatique inversé (30 secondes)", + "block.enderio.resetting_lever_three_hundred": "Levier automatique (5 minutes)", + "block.enderio.resetting_lever_three_hundred_inv": "Levier automatique inversé (5 minutes)", + "block.enderio.rocket_fuel": "Kérosène", + "block.enderio.sag_mill": "Broyeur SAG", + "block.enderio.silent_acacia_pressure_plate": "Plaque de pression silencieuse en acacia", + "block.enderio.silent_birch_pressure_plate": "Plaque de pression silencieuse en bouleau", + "block.enderio.silent_crimson_pressure_plate": "Plaque de pression silencieuse carmin", + "block.enderio.silent_dark_oak_pressure_plate": "Plaque de pression silencieuse en chêne noir", + "block.enderio.silent_dark_steel_pressure_plate": "Plaque de pression silencieuse en acier sombre", + "block.enderio.silent_heavy_weighted_pressure_plate": "Plaque de pression pondérée lourde silencieuse", + "block.enderio.silent_jungle_pressure_plate": "Plaque de pression silencieuse en acajou", + "block.enderio.silent_light_weighted_pressure_plate": "Plaque de pression pondérée légère silencieuse", + "block.enderio.silent_oak_pressure_plate": "Plaque de pression silencieuse en chêne", + "block.enderio.silent_polished_blackstone_pressure_plate": "Plaque de pression silencieuse en pierre noire", + "block.enderio.silent_soularium_pressure_plate": "Plaque de pression silencieuse en soularium", + "block.enderio.silent_spruce_pressure_plate": "Plaque de pression silencieuse en sapin", + "block.enderio.silent_stone_pressure_plate": "Plaque de pression silencieuse en pierre", + "block.enderio.silent_warped_pressure_plate": "Plaque de pression silencieuse biscornue", "block.enderio.slice_and_splice": "Slice'N'Splice", - "block.enderio.soul_binder": "Soul Binder", - "block.enderio.soul_chain": "Soul Chain", - "block.enderio.soularium_block": "Bloc de Soularium", - "block.enderio.soularium_pressure_plate": "Plaque de Pression en Soularium", + "block.enderio.soul_binder": "Lieur d'âme", + "block.enderio.soul_chain": "Chaine en soularium", + "block.enderio.soularium_block": "Bloc de soularium", + "block.enderio.soularium_pressure_plate": "Plaque de pression en soularium", "block.enderio.stirling_generator": "Générateur Stirling", - "block.enderio.vacuum_chest": "Coffre Aspirateur", - "block.enderio.vapor_of_levity": "Vapor Of Levity", - "block.enderio.vibrant_alloy_block": "Vibrant Alloy Block", - "block.enderio.vibrant_capacitor_bank": "Vibrant Capacitor Bank", - "block.enderio.vibrant_photovoltaic_cell": "Vibrant Photovoltaic Cell", - "block.enderio.void_chassis": "Void Chassis", - "block.enderio.wired_charger": "Chargeur Filaire", - "block.enderio.xp_juice": "Xp Juice", - "block.enderio.xp_vacuum": "Aspirateur à Xp", - "description.enderio.enchantment.auto_smelt": "Cuit automatiquement tout ce qui est miné", - "description.enderio.enchantment.repellent1": "Chance de téléporter les agresseurs loin", - "description.enderio.enchantment.repellent2": "Les plus hauts niveaux se téléportent plus souvent et plus loin", - "description.enderio.enchantment.shimmer1": "Fait briller l'objet comme s'il était enchanté.", - "description.enderio.enchantment.shimmer2": "C'est tout.", - "description.enderio.enchantment.shimmer3": "Vraiment.", - "description.enderio.enchantment.shimmer4": "Rien de plus.", - "description.enderio.enchantment.shimmer5": "Oui, ça ne sert à rien.", - "description.enderio.enchantment.shimmer6": "Je sais.", - "description.enderio.enchantment.soulbound1": "Empêche l'objet d'être perdu en mourant.", - "description.enderio.enchantment.soulbound2": "Note : La plupart des mods de pierres tombales sont stupides et empêchent le bon fonctionnement !", - "description.enderio.enchantment.withering_arrow1": "Applique l'effet de wither à la cible", - "description.enderio.enchantment.withering_arrow2": "S'applique aux arcs.", - "description.enderio.enchantment.withering_blade1": "Applique l'effet de wither à la cible", - "description.enderio.enchantment.withering_blade2": "Applies to bladed weapons", - "description.enderio.enchantment.withering_bolt1": "Applies wither to the target", - "description.enderio.enchantment.withering_bolt2": "S'applique aux arbalètes.", - "description.enderio.enchantment.xp_boost": "Plus d'XP des mobs et des blocs", - "enchantment.enderio.auto_smelt": "Auto Cuisant", + "block.enderio.travel_anchor": "Ancre de voyage", + "block.enderio.vacuum_chest": "Coffre aspirant", + "block.enderio.vapor_of_levity": "Vapeur de légèreté", + "block.enderio.vibrant_alloy_block": "Bloc d'alliage vibrant", + "block.enderio.vibrant_capacitor_bank": "Batterie vibrante", + "block.enderio.vibrant_photovoltaic_module": "Module photovoltaïque vibrant", + "block.enderio.void_chassis": "Châssis vide", + "block.enderio.wired_charger": "Chargeur filaire", + "block.enderio.xp_juice": "Jus d'EXP", + "block.enderio.xp_vacuum": "Aspirateur à EXP", + "enchantment.enderio.auto_smelt": "Auto cuisson", + "enchantment.enderio.auto_smelt.desc": "Cuit automatiquement tout ce qui est miné.", "enchantment.enderio.repellent": "Repoussant", + "enchantment.enderio.repellent.desc": "A une chance de téléporter l'attaquant au loin. A niveau plus élevé, téléporte plus souvent et plus loin.", "enchantment.enderio.shimmer": "Brillant", - "enchantment.enderio.soulbound": "Soulbound", - "enchantment.enderio.withering_arrow": "Withering Arrow", - "enchantment.enderio.withering_blade": "Withering Blade", - "enchantment.enderio.withering_bolt": "Withering Bolt", - "enchantment.enderio.xp_boost": "Boost d'XP", - "entity.enderio.painted_sand": "Sable Peint", - "fluid.enderio.cloud_seed": "Graine de Nuage", - "fluid.enderio.cloud_seed_concentrated": "Graine de Nuage Concentré", - "fluid.enderio.dew_of_the_void": "Fluide du Vide", - "fluid.enderio.fire_water": "Eau Feu", + "enchantment.enderio.shimmer.desc": "Rend l'objet brillant comme s'il était enchanté... C'est tout... Vraiment...", + "enchantment.enderio.soulbound": "Lié à l'âme", + "enchantment.enderio.soulbound.desc": "Empêche l'objet d'être perdu lors de la mort. Note : La plupart de mods de tombe sont stupides et empêchent ceci de fonctionner !", + "enchantment.enderio.withering": "Dépérissement", + "enchantment.enderio.withering.desc": "Applique l'effet wither à la cible.", + "enchantment.enderio.withering.type": "S'applique sur les armes à lame, les arcs et les arbalètes.", + "enchantment.enderio.xp_boost": "Boost d'EXP", + "enchantment.enderio.xp_boost.desc": "Plus d'EXP des mobs et des blocs", + "entity.enderio.painted_sand": "Sable peint", + "fluid.enderio.cloud_seed": "Graine de nuage", + "fluid.enderio.cloud_seed_concentrated": "Graine de nuage concentrée", + "fluid.enderio.dew_of_the_void": "Fluide du vide", + "fluid.enderio.fire_water": "Eau brulante", "fluid.enderio.hootch": "Hootch", - "fluid.enderio.liquid_sunshine": "Liquid Sunshine", - "fluid.enderio.nutrient_distillation": "Nutrient Distillation", + "fluid.enderio.liquid_sunshine": "Lumière de soleil liquide", + "fluid.enderio.nutrient_distillation": "Distillat de nutriments", "fluid.enderio.rocket_fuel": "Kérosène", - "fluid.enderio.vapor_of_levity": "Vapeur de Légèreté", - "fluid.enderio.xp_juice": "Jus d'Xp", - "gui.enderio.alloy_smelter.mode": "Mode de Fusion", - "gui.enderio.alloy_smelter.mode_all": "Alliages et Fusion", - "gui.enderio.alloy_smelter.mode_alloy": "Alliages Seulement", - "gui.enderio.alloy_smelter.mode_furnace": "Cuisson Seulement", - "gui.enderio.category.alloy_smelting": "Cuisson d'Alliages", - "gui.enderio.category.enchanter": "Enchanter", - "gui.enderio.category.primitive_alloy_smelting": "Primitive Alloy Smelting", - "gui.enderio.category.sag_mill": "SAG Mill", + "fluid.enderio.vapor_of_levity": "Vapeur de légèreté", + "fluid.enderio.xp_juice": "Jus d'EXP", + "gui.enderio.alloy_smelter.mode": "Mode de travail", + "gui.enderio.alloy_smelter.mode_all": "Alliage et Cuisson", + "gui.enderio.alloy_smelter.mode_alloy": "Alliages seulement", + "gui.enderio.alloy_smelter.mode_furnace": "Cuisson seulement", + "gui.enderio.category.alloy_smelting": "Alliage", + "gui.enderio.category.enchanter": "Enchantement", + "gui.enderio.category.primitive_alloy_smelting": "Alliage primitif", + "gui.enderio.category.sag_mill": "Broyage SAG", "gui.enderio.category.slicing": "Tranchage", - "gui.enderio.category.soul_binding": "Soul Binding", - "gui.enderio.category.tank": "Réservoir à Fluides", - "gui.enderio.channel": "Channel", + "gui.enderio.category.soul_binding": "Liaison d'âme", + "gui.enderio.category.tank": "Réservoir à fluides", "gui.enderio.conduit.extract": "Extraire", "gui.enderio.conduit.insert": "Insérer", + "gui.enderio.conduit_channel": "Conduit-Channel", "gui.enderio.energy_equivalence": "Une unité d'énergie, équivalente aux FE.", "gui.enderio.filter": "Filtre", - "gui.enderio.fluid_conduit.change_fluid1": "Locked Fluid:", + "gui.enderio.fluid_conduit.change_fluid1": "Fluide verrouillé :", "gui.enderio.fluid_conduit.change_fluid2": "Cliquer pour réinitialiser!", "gui.enderio.fluid_conduit.change_fluid3": "Fluide : %s", - "gui.enderio.ioconfig": "IO Configuration", - "gui.enderio.ioconfig.both": "Push / Pull", - "gui.enderio.ioconfig.disabled": "Disabled", - "gui.enderio.ioconfig.neighbour": "Show/Hide Neighbours", + "gui.enderio.ioconfig": "Configuration E/S", + "gui.enderio.ioconfig.both": "Exporter / Importer", + "gui.enderio.ioconfig.disabled": "Désactivé", + "gui.enderio.ioconfig.neighbour": "Afficher/Masquer les voisins", "gui.enderio.ioconfig.none": "Aucun", - "gui.enderio.ioconfig.pull": "Pull", - "gui.enderio.ioconfig.push": "Push", + "gui.enderio.ioconfig.pull": "Importer", + "gui.enderio.ioconfig.push": "Exporter", "gui.enderio.nocap.desc": "Insérer n'importe quel condensateur pour faire fonctionner la machine!", - "gui.enderio.nocap.title": "Condensateur Manquant", + "gui.enderio.nocap.title": "Condensateur manquant", "gui.enderio.progress": "Avancement : %s%%", "gui.enderio.range": "Portée", - "gui.enderio.range.hide": "Cacher la Portée", - "gui.enderio.range.show": "Montrer la Portée", + "gui.enderio.range.hide": "Masquer la portée", + "gui.enderio.range.show": "Afficher la portée", "gui.enderio.redstone.active_with_signal": "Activer avec un signal", "gui.enderio.redstone.active_without_signal": "Activer sans signal", "gui.enderio.redstone.always_active": "Toujours actif", - "gui.enderio.redstone.mode": "Mode de Redstone", - "gui.enderio.redstone.never_active": "Jamais Actif", - "gui.enderio.round_robin.disabled": "Tourniquet Désactivé", - "gui.enderio.round_robin.enabled": "Tourniquet Activé", + "gui.enderio.redstone.mode": "Mode de redstone", + "gui.enderio.redstone.never_active": "Jamais actif", + "gui.enderio.redstone_channel": "Redstone-Channel", + "gui.enderio.round_robin.disabled": "Round-robin désactivé", + "gui.enderio.round_robin.enabled": "Round-robin activé", "gui.enderio.sag_mill_chance": "Chance: %s%%", - "gui.enderio.sag_mill_chance_ball": "Chance: %s%% (modified by grinding ball)", - "gui.enderio.self_feed.disabled": "Self Feed Disabled", - "gui.enderio.self_feed.enabled": "Self Feed Enabled", + "gui.enderio.sag_mill_chance_ball": "Taux : %s%% (modifié par les billes de broyage)", + "gui.enderio.self_feed.disabled": "Auto-alimentation désactivée", + "gui.enderio.self_feed.enabled": "Auto-alimentation activée", "gui.enderio.spawner.disabled": "Désactivé(e) via la configuration", "gui.enderio.spawner.other_mod": "Autre mod", "gui.enderio.spawner.too_many_mob": "Trop de mobs", "gui.enderio.spawner.too_many_spawner": "Trop de générateur de créatures", "gui.enderio.spawner.unknown": "Mob inconnu", + "gui.enderio.visible.false": "Masqué", + "gui.enderio.visible.true": "Visible", "guidebook.enderio.book_title": "Titre du livre", - "guidebook.enderio.landing_text": "Landing Text", + "guidebook.enderio.landing_text": "Texte de renvoi", "hint.enderio.connected_textures.text": "Si vous souhaitez avoir des textures connectées pour les batteries, installez le mod Athena sur votre client", "info.enderio.coordinate_selector.no_block": "Aucun bloc dans la portée", - "info.enderio.coordinate_selector.no_paper": "No paper in inventory", - "info.enderio.darksteel.upgrade.activate": "Right Click to Activate", - "info.enderio.darksteel.upgrade.available": "Available Upgrades", - "info.enderio.darksteel.upgrade.cost": "Costs %s Levels", + "info.enderio.coordinate_selector.no_paper": "Pas de papier dans l'inventaire", + "info.enderio.darksteel.upgrade.activate": "Clic droit pour activer", + "info.enderio.darksteel.upgrade.available": "Améliorations disponibles", + "info.enderio.darksteel.upgrade.cost": "Coûte %s niveaux", "info.enderio.darksteel.upgrade.direct": "Direct", - "info.enderio.darksteel.upgrade.direct.description": "Teleports harvested items directly into your inventory", - "info.enderio.darksteel.upgrade.empowered.absorption": "%s%% damage absorbed by µI", - "info.enderio.darksteel.upgrade.empowered.description": "Infuse the steel with the power of Micro Infinity", - "info.enderio.darksteel.upgrade.empowered.efficiency": "Efficiency +%s when powered", - "info.enderio.darksteel.upgrade.empowered.obsidian.efficiency": "Efficiency +%s when breaking obsidian", - "info.enderio.darksteel.upgrade.empowered.storage": "Holds up to %s µI", - "info.enderio.darksteel.upgrade.empowered_l1": "Empowered", - "info.enderio.darksteel.upgrade.empowered_l2": "Empowered II", - "info.enderio.darksteel.upgrade.empowered_l3": "Empowered III", - "info.enderio.darksteel.upgrade.empowered_l4": "Empowered IV", + "info.enderio.darksteel.upgrade.direct.description": "Téléporte des objets récoltés directement dans l'inventaire", + "info.enderio.darksteel.upgrade.empowered.absorption": "%s%% des dommages sont absorbés par µI", + "info.enderio.darksteel.upgrade.empowered.description": "Infuse l'acier grâce au pouvoir des Micro Infinity", + "info.enderio.darksteel.upgrade.empowered.efficiency": "Efficacité +%s quand alimenter", + "info.enderio.darksteel.upgrade.empowered.obsidian.efficiency": "Efficacité +%s pour miner l'obsidienne", + "info.enderio.darksteel.upgrade.empowered.storage": "Contient jusqu'à %s µI", + "info.enderio.darksteel.upgrade.empowered_l1": "Alimenté", + "info.enderio.darksteel.upgrade.empowered_l2": "Alimenté II", + "info.enderio.darksteel.upgrade.empowered_l3": "Alimenté III", + "info.enderio.darksteel.upgrade.empowered_l4": "Alimenté IV", "info.enderio.darksteel.upgrade.explosive.description": "Fait exploser la terre et la roche aux alentours", "info.enderio.darksteel.upgrade.explosive_l1": "Explosif I", "info.enderio.darksteel.upgrade.explosive_l2": "Explosif II", @@ -320,185 +310,186 @@ "info.enderio.darksteel.upgrade.explosive_penetration_l2": "Pénétration Explosive II", "info.enderio.darksteel.upgrade.fork": "Fourche", "info.enderio.darksteel.upgrade.fork.description": "Qui a besoin d'une houe quand vous avez une fourche ?", - "info.enderio.darksteel.upgrade.no_xp": "Pas suffisamment d'XP", + "info.enderio.darksteel.upgrade.no_xp": "Pas suffisamment d'EXP", "info.enderio.darksteel.upgrade.spoon": "Cuillère", - "info.enderio.darksteel.upgrade.spoon.description": "Qui a besoin d'une pelle quand tu as une cuillère ?", + "info.enderio.darksteel.upgrade.spoon.description": "Qui a besoin d'une pelle quand on a une cuillère ?", "info.enderio.durability.amount": "Durabilité %s", "info.enderio.energy.amount": "%s µI", - "info.enderio.headchance": "%s%% de chance de faire lâcher une tête de mob\"", - "info.enderio.too_many_levels": "Vous avez plus que 21862 niveaux, c'est trop d'XP.", - "item.enderio.animal_token": "Jeton Animal", - "item.enderio.basic_capacitor": "Condensateur Basique", - "item.enderio.black_paper": "Papier Noir", - "item.enderio.broken_spawner": "Générateur de Créatures Cassé", + "info.enderio.headchance": "%s%% de chance de faire lâcher une tête de mob", + "info.enderio.too_many_levels": "Vous avez plus que 21862 niveaux, c'est trop d'EXP.", + "item.enderio.animal_token": "Jeton animal", + "item.enderio.basic_capacitor": "Condensateur basique", + "item.enderio.black_paper": "Papier noir", + "item.enderio.broken_spawner": "Générateur de créatures cassé", "item.enderio.cake_base": "Base d'un gâteau", - "item.enderio.clayed_glowstone": "Pierre Lumineuse Argileuse", - "item.enderio.cloud_seed_bucket": "Seau de Graine de Nuage", - "item.enderio.cloud_seed_concentrated_bucket": "Seau de Graine de Nuage Concentré", - "item.enderio.cold_fire_igniter": "Briquet à Feu Froid", - "item.enderio.conductive_alloy_grinding_ball": "Bille de Broyage d'Alliage Conducteur", - "item.enderio.conductive_alloy_ingot": "Lingot d'Alliage Conducteur", - "item.enderio.conductive_alloy_nugget": "Pépite d'Alliage Conducteur", - "item.enderio.conduit_binder": "Relieur de Conduits", - "item.enderio.conduit_binder_composite": "Composite de Relieur de Conduits", - "item.enderio.confusing_powder": "Poudre de Confusion", - "item.enderio.coordinate_selector": "Sélecteur de Coordonnées", - "item.enderio.copper_alloy_grinding_ball": "Bille de Broyage d'Alliage de Cuivre", - "item.enderio.copper_alloy_ingot": "Lingot d'Alliage de Cuivre", - "item.enderio.copper_alloy_nugget": "Pépite d'Alliage de Cuivre", - "item.enderio.dark_bimetal_gear": "Engrenage Bimétallique Sombre", - "item.enderio.dark_steel_grinding_ball": "Bille de Broyage d'Acier Foncé", - "item.enderio.dark_steel_ingot": "Lingot d'Acier Foncé", - "item.enderio.dark_steel_nugget": "Pépite d'Acier Foncé", - "item.enderio.dark_steel_sword": "The Ender", - "item.enderio.dense_me_conduit": "Dense ME Conduit", - "item.enderio.dew_of_the_void_bucket": "Dew Of The Void Bucket", - "item.enderio.double_layer_capacitor": "Double Layer Capacitor", - "item.enderio.electromagnet": "Electromagnet", - "item.enderio.empty_soul_vial": "Empty Soul Vial", - "item.enderio.end_steel_grinding_ball": "End Steel Grinding Ball", - "item.enderio.end_steel_ingot": "End Steel Ingot", - "item.enderio.end_steel_nugget": "End Steel Nugget", - "item.enderio.ender_crystal": "Ender Crystal", - "item.enderio.ender_crystal_powder": "Grains of the End", - "item.enderio.ender_fluid_conduit": "Ender Fluid Conduit", - "item.enderio.ender_resonator": "Ender Resonator", - "item.enderio.enderface_conduits": "Enderface Conduits", - "item.enderio.enderface_invpanel": "Enderface Invpanel", - "item.enderio.enderface_items": "Enderface Items", - "item.enderio.enderface_machines": "Enderface Machines", - "item.enderio.enderface_materials": "Enderface Materials", - "item.enderio.enderface_mobs": "Enderface Mobs", - "item.enderio.enderface_none": "Enderface None", + "item.enderio.clayed_glowstone": "Pierre lumineuse argileuse", + "item.enderio.cloud_seed_bucket": "Seau de graine de nuage", + "item.enderio.cloud_seed_concentrated_bucket": "Seau de graine de nuage concentrée", + "item.enderio.cold_fire_igniter": "Briquet à feu froid", + "item.enderio.conductive_alloy_grinding_ball": "Bille de broyage en alliage conducteur", + "item.enderio.conductive_alloy_ingot": "Lingot d'alliage conducteur", + "item.enderio.conductive_alloy_nugget": "Pépite d'alliage conducteur", + "item.enderio.conduit_binder": "Liant pour conduits", + "item.enderio.conduit_binder_composite": "Composite de liant pour conduits", + "item.enderio.confusing_powder": "Poudre de confusion", + "item.enderio.coordinate_selector": "Sélecteur de coordonnées", + "item.enderio.copper_alloy_grinding_ball": "Bille de broyage en alliage de cuivre", + "item.enderio.copper_alloy_ingot": "Lingot d'alliage de cuivre", + "item.enderio.copper_alloy_nugget": "Pépite d'alliage de cuivre", + "item.enderio.dark_bimetal_gear": "Engrenage bimétallique sombre", + "item.enderio.dark_steel_grinding_ball": "Bille de broyage en acier foncé", + "item.enderio.dark_steel_ingot": "Lingot d'acier foncé", + "item.enderio.dark_steel_nugget": "Pépite d'acier foncé", + "item.enderio.dark_steel_sword": "L'Ender", + "item.enderio.dense_me_conduit": "Conduit ME dense", + "item.enderio.dew_of_the_void_bucket": "Seau de rosée du vide", + "item.enderio.double_layer_capacitor": "Condensateur double couche", + "item.enderio.electromagnet": "Électroaimant", + "item.enderio.empty_soul_vial": "Fiole d'âme vide", + "item.enderio.end_steel_grinding_ball": "Bille de broyage en acier de l'End", + "item.enderio.end_steel_ingot": "Lingot d'acier de l'End", + "item.enderio.end_steel_nugget": "Pépite d'acier de l'End", + "item.enderio.ender_crystal": "Cristal d'Ender", + "item.enderio.ender_crystal_powder": "Grains de l'End", + "item.enderio.ender_fluid_conduit": "Conduit de fluide d'Ender", + "item.enderio.ender_resonator": "Résonateur d'Ender", + "item.enderio.enderface_conduits": "Enderface de conduits", + "item.enderio.enderface_invpanel": "Enderface de panneau d'inventaire", + "item.enderio.enderface_items": "Enderface d'objets", + "item.enderio.enderface_machines": "Enderface de machines", + "item.enderio.enderface_materials": "Enderface de matériaux", + "item.enderio.enderface_mobs": "Enderface de mobs", + "item.enderio.enderface_none": "Enderface vide", "item.enderio.enderios": "\"Enderios\"", - "item.enderio.energetic_alloy_grinding_ball": "Energetic Alloy Grinding Ball", - "item.enderio.energetic_alloy_ingot": "Energetic Alloy Ingot", - "item.enderio.energetic_alloy_nugget": "Energetic Alloy Nugget", - "item.enderio.energized_gear": "Energized Bimetal Gear", - "item.enderio.energy_conduit": "Energy Conduit", - "item.enderio.enticing_crystal": "Enticing Crystal", - "item.enderio.experience_rod": "Experience Rod", - "item.enderio.filled_soul_vial": "Filled Soul Vial", - "item.enderio.fire_water_bucket": "Fire Water Bucket", - "item.enderio.flour": "Flour", - "item.enderio.fluid_conduit": "Fluid Conduit", + "item.enderio.energetic_alloy_grinding_ball": "Bille de broyage en alliage énergétique", + "item.enderio.energetic_alloy_ingot": "Lingot d'alliage énergétique", + "item.enderio.energetic_alloy_nugget": "Pépite d'alliage énergétique", + "item.enderio.energized_gear": "Engrenage bimétallique énergisé", + "item.enderio.energy_conduit": "Conduit d'énergie", + "item.enderio.enticing_crystal": "Cristal séduisant", + "item.enderio.experience_rod": "Bâton d'expérience", + "item.enderio.filled_soul_vial": "Fiole d'âme pleine", + "item.enderio.fire_water_bucket": "Seau d'eau brulante", + "item.enderio.flour": "Farine", + "item.enderio.fluid_conduit": "Conduit de fluide", "item.enderio.frank_n_zombie": "Frank'N'Zombie", - "item.enderio.glider_wing": "Glider Wing", - "item.enderio.grains_of_infinity": "Grains of Infinity", - "item.enderio.guardian_diode": "Guardian Diode", - "item.enderio.hootch_bucket": "Hootch Bucket", - "item.enderio.infinity_rod": "Infinity Rod", - "item.enderio.iron_gear": "Infinity Bimetal Gear", - "item.enderio.item_conduit": "Item Conduit", - "item.enderio.liquid_sunshine_bucket": "Liquid Sunshine Bucket", - "item.enderio.location_printout": "Location Printout", - "item.enderio.loot_capacitor": "Loot Capacitor", - "item.enderio.me_conduit": "ME Conduit", - "item.enderio.monster_token": "Monster Token", - "item.enderio.nethercotta": "Nethercotta", - "item.enderio.nutrient_distillation_bucket": "Nutrient Distillation Bucket", - "item.enderio.nutritious_stick": "Nutritious Stick", - "item.enderio.octadic_capacitor": "Octadic Capacitor", - "item.enderio.organic_black_dye": "Organic Black Dye", - "item.enderio.organic_brown_dye": "Organic Brown Dye", - "item.enderio.organic_green_dye": "Organic Green Dye", - "item.enderio.photovoltaic_composite": "Photovoltaic Composite", - "item.enderio.photovoltaic_plate": "Photovoltaic Plate", - "item.enderio.plant_matter_brown": "Twigs and Prunings", - "item.enderio.plant_matter_green": "Clippings and Trimmings", - "item.enderio.player_token": "Player Token", - "item.enderio.powdered_coal": "Powdered Coal", - "item.enderio.powdered_cobalt": "Powdered Cobalt", - "item.enderio.powdered_copper": "Powdered Copper", - "item.enderio.powdered_ender_pearl": "Powdered Ender Pearl", - "item.enderio.powdered_gold": "Powdered Gold", - "item.enderio.powdered_iron": "Powdered Iron", - "item.enderio.powdered_lapis_lazuli": "Powdered Lapis Lazuli", - "item.enderio.powdered_obsidian": "Powdered Obsidian", - "item.enderio.powdered_quartz": "Powdered Quartz", - "item.enderio.powdered_tin": "Powdered Tin", - "item.enderio.prescient_crystal": "Prescient Crystal", - "item.enderio.prescient_powder": "Grains of Prescience", - "item.enderio.pressurized_fluid_conduit": "Pressurized Fluid Conduit", - "item.enderio.pulsating_alloy_grinding_ball": "Pulsating Alloy Grinding Ball", - "item.enderio.pulsating_alloy_ingot": "Pulsating Alloy Ingot", - "item.enderio.pulsating_alloy_nugget": "Pulsating Alloy Nugget", - "item.enderio.pulsating_crystal": "Pulsating Crystal", - "item.enderio.pulsating_powder": "Grains of Piezallity", - "item.enderio.redstone_alloy_grinding_ball": "Redstone Alloy Grinding Ball", - "item.enderio.redstone_alloy_ingot": "Redstone Alloy Ingot", - "item.enderio.redstone_alloy_nugget": "Redstone Alloy Nugget", - "item.enderio.redstone_conduit": "Redstone Conduit", - "item.enderio.redstone_filter_base": "Redstone Filter Base", - "item.enderio.rocket_fuel_bucket": "Rocket Fuel Bucket", - "item.enderio.sentient_ender": "Sentient Ender", - "item.enderio.silicon": "Silicon", - "item.enderio.skeletal_contractor": "Skeletal Contractor", - "item.enderio.soul_powder": "Soul Powder", - "item.enderio.soularium_grinding_ball": "Soularium Grinding Ball", - "item.enderio.soularium_ingot": "Soularium Ingot", - "item.enderio.soularium_nugget": "Soularium Nugget", - "item.enderio.staff_of_levity": "Staff Of Levity", - "item.enderio.stone_gear": "Stone Compound Gear", - "item.enderio.vapor_of_levity_bucket": "Vapor Of Levity Bucket", - "item.enderio.vibrant_alloy_grinding_ball": "Vibrant Alloy Grinding Ball", - "item.enderio.vibrant_alloy_ingot": "Vibrant Alloy Ingot", - "item.enderio.vibrant_alloy_nugget": "Vibrant Alloy Nugget", - "item.enderio.vibrant_crystal": "Vibrant Crystal", - "item.enderio.vibrant_gear": "Vibrant Bimetal Gear", - "item.enderio.vibrant_powder": "Grains of Vibrancy", - "item.enderio.weather_crystal": "Weather Crystal", - "item.enderio.withering_powder": "Withering Powder", - "item.enderio.wood_gear": "Wooden Gear", - "item.enderio.xp_juice_bucket": "Xp Juice Bucket", - "item.enderio.yeta_wrench": "Yeta Wrench", - "item.enderio.z_logic_controller": "Z-Logic Controller", - "item.enderio.zombie_electrode": "Zombie Electrode", - "itemGroup.enderio.blocks": "Ender IO Blocks", - "itemGroup.enderio.conduits": "Ender IO Conduits", - "itemGroup.enderio.gear": "Ender IO Gear", - "itemGroup.enderio.machines": "Ender IO Machines", + "item.enderio.glider_wing": "Deltaplane", + "item.enderio.grains_of_infinity": "Grains d'infini", + "item.enderio.guardian_diode": "Diode gardienne", + "item.enderio.hootch_bucket": "Seau de Hootch", + "item.enderio.infinity_rod": "Bâton de l'infini", + "item.enderio.iron_gear": "Engrenage bimétallique infini", + "item.enderio.item_conduit": "Conduit d'objet", + "item.enderio.liquid_sunshine_bucket": "Seau de lumière de soleil liquide", + "item.enderio.location_printout": "Impression de la localisation", + "item.enderio.loot_capacitor": "Condensateur de butin", + "item.enderio.me_conduit": "Conduit ME", + "item.enderio.monster_token": "Jeton monstre", + "item.enderio.nethercotta": "Terre cuite du Nether", + "item.enderio.nutrient_distillation_bucket": "Seau de distillat de nutriments", + "item.enderio.nutritious_stick": "Barre nutritive", + "item.enderio.octadic_capacitor": "Condensateur octadique", + "item.enderio.organic_black_dye": "Colorant noir organique", + "item.enderio.organic_brown_dye": "Colorant marron organique", + "item.enderio.organic_green_dye": "Colorant vert organique", + "item.enderio.photovoltaic_composite": "Composite photovoltaïque", + "item.enderio.photovoltaic_plate": "Plaque photovoltaïque", + "item.enderio.plant_matter_brown": "Brindilles et virevoltants", + "item.enderio.plant_matter_green": "Coupures et rognures", + "item.enderio.player_token": "Jeton joueur", + "item.enderio.powdered_coal": "Poudre de charbon", + "item.enderio.powdered_cobalt": "Poudre de cobalt", + "item.enderio.powdered_copper": "Poudre de cuivre", + "item.enderio.powdered_ender_pearl": "Poudre de perle de l'Ender", + "item.enderio.powdered_gold": "Poudre d'or", + "item.enderio.powdered_iron": "Poudre de fer", + "item.enderio.powdered_lapis_lazuli": "Poudre de lapis-lazuli", + "item.enderio.powdered_obsidian": "Poudre d'obsidienne", + "item.enderio.powdered_quartz": "Poudre de quartz", + "item.enderio.powdered_tin": "Poudre d'étain", + "item.enderio.prescient_crystal": "Cristal de prescience", + "item.enderio.prescient_powder": "Poussière de prescience", + "item.enderio.pressurized_fluid_conduit": "Conduit de fluide pressurisé", + "item.enderio.pulsating_alloy_grinding_ball": "Bille de broyage en alliage pulsé", + "item.enderio.pulsating_alloy_ingot": "Lingot d'alliage pulsé", + "item.enderio.pulsating_alloy_nugget": "Pépite d'alliage pulsé", + "item.enderio.pulsating_crystal": "Cristal pulsé", + "item.enderio.pulsating_powder": "Poussière de piézalité", + "item.enderio.redstone_alloy_grinding_ball": "Bille de broyage en alliage de redstone", + "item.enderio.redstone_alloy_ingot": "Lingot d'alliage de redstone", + "item.enderio.redstone_alloy_nugget": "Pépite d'alliage de redstone", + "item.enderio.redstone_conduit": "Conduit de redstone", + "item.enderio.redstone_filter_base": "Base de filtre de redstone", + "item.enderio.rocket_fuel_bucket": "Seau de kérosène", + "item.enderio.sentient_ender": "Ender sensible", + "item.enderio.silicon": "Silicium", + "item.enderio.skeletal_contractor": "Entrepreneur squelettique", + "item.enderio.soul_powder": "Poudre d'âme", + "item.enderio.soularium_grinding_ball": "Bille de broyage en soularium", + "item.enderio.soularium_ingot": "Lingot de soularium", + "item.enderio.soularium_nugget": "Pépite de soularium", + "item.enderio.staff_of_levity": "Bâton de lévitation", + "item.enderio.staff_of_travelling": "Bâton de voyage", + "item.enderio.stone_gear": "Engrenage composite en pierre", + "item.enderio.vapor_of_levity_bucket": "Seau de vapeur de légèreté", + "item.enderio.vibrant_alloy_grinding_ball": "Bille de broyage en alliage vibrant", + "item.enderio.vibrant_alloy_ingot": "Lingot d'alliage vibrant", + "item.enderio.vibrant_alloy_nugget": "Pépite d'alliage vibrant", + "item.enderio.vibrant_crystal": "Cristal vibrant", + "item.enderio.vibrant_gear": "Engrenage bimétallique vibrant", + "item.enderio.vibrant_powder": "Poussière vibrante", + "item.enderio.weather_crystal": "Cristal météorologique", + "item.enderio.withering_powder": "Poudre de wither", + "item.enderio.wood_gear": "Engrenage en bois", + "item.enderio.xp_juice_bucket": "Seau de jus d'EXP", + "item.enderio.yeta_wrench": "Clé Yeta", + "item.enderio.z_logic_controller": "Controlleur Z-Logic", + "item.enderio.zombie_electrode": "Électrode zombie", + "itemGroup.enderio.blocks": "Ender IO blocs", + "itemGroup.enderio.conduits": "Ender IO conduits", + "itemGroup.enderio.gear": "Engrenage Ender IO", + "itemGroup.enderio.machines": "Ender IO machines", "itemGroup.enderio.main": "Ender IO", - "itemGroup.enderio.souls": "Ender IO Souls", - "jei.enderio.fire_crafting.title": "Fire Crafting", - "jei.enderio.fire_crafting.valid_blocks": "Valid Blocks:", - "jei.enderio.fire_crafting.valid_dimensions": "Valid Dimensions:", - "jei.enderio.grinding.consume_chance": "33% chance to be consumed", - "jei.enderio.grinding.hand_grinding_coal": "Hold some flint in your offhand and 3 or more coal in your main hand, then shift right-click a block of obsidian, crying obsidian or a grindstone to produce early powdered coal.", - "jei.enderio.grinding.hand_grinding_infinity": "Hold some flint in your offhand and some deepslate or cobbled deepslate in your main hand, then shift right-click a block of obsidian, crying obsidian or a grindstone to produce early grains of infinity.", - "jei.enderio.grinding.title": "Grinding", - "message.enderio.glider.disable": "Gliding is disabled: ", - "message.enderio.glider.disable.fall_flying": "Elytra Flight", - "message.enderio.grave.wrong_owner": "This grave is not yours! You cannot open it.", - "message.enderio.soul_vial.error_blacklisted": "This entity has been blacklisted.", - "message.enderio.soul_vial.error_boss": "Nice try. Bosses don't like bottles.", - "message.enderio.soul_vial.error_dead": "Cannot capture a dead mob!", - "message.enderio.soul_vial.error_failed": "This entity cannot be captured.", - "message.enderio.soul_vial.error_player": "You cannot put player in a bottle!", - "tooltip.enderio.block.blast_resistant": "Blast resistant", - "tooltip.enderio.capacitor.base": "Base Modifier: %s", - "tooltip.enderio.capacitor.energy_capacity": "Energy Capacity Modifier: %s", - "tooltip.enderio.capacitor.energy_use": "Energy Use Modifier: %s", - "tooltip.enderio.collision.animals_block": "Only solid to animals", - "tooltip.enderio.collision.animals_pass": "Not solid to animals", - "tooltip.enderio.collision.mobs_block": "Only solid to monsters", - "tooltip.enderio.collision.mobs_pass": "Not solid to monsters", - "tooltip.enderio.collision.players_block": "Only solid to players", - "tooltip.enderio.collision.players_pass": "Not solid to players", - "tooltip.enderio.dark_steel_ladder.faster": "Faster than regular ladders", - "tooltip.enderio.fluid_tank.tank_empty_tooltip": "Empty tank", - "tooltip.enderio.fluid_tank.tank_tooltip": "%d/%d mb of %s", - "tooltip.enderio.fused_quartz.blocks_light": "Blocks light", - "tooltip.enderio.fused_quartz.emits_light": "Emits light", - "tooltip.enderio.grinding_ball_bonus_output": "Bonus Output %s%%", - "tooltip.enderio.grinding_ball_main_output": "Main Output %s%%", - "tooltip.enderio.grinding_ball_power_use": "Power Use %s%%", - "tooltip.enderio.grinding_ball_remaining": "Remaining: %s%%", - "tooltip.enderio.grinding_ball_title": "SAG Mill Grinding Ball", - "tooltip.enderio.gui.show_advanced_tooltip": "", + "itemGroup.enderio.souls": "Ender IO Âmes", + "jei.enderio.fire_crafting.title": "Fabrication par le feu", + "jei.enderio.fire_crafting.valid_blocks": "Blocs valides:", + "jei.enderio.fire_crafting.valid_dimensions": "Dimensions Valides :", + "jei.enderio.grinding.consume_chance": "33% de chance d'être consommé", + "jei.enderio.grinding.hand_grinding_coal": "Tenez des silex dans votre main gauche et 3 charbons ou plus dans votre main principale, puis cliquez avec le bouton droit de la souris sur un bloc d'obsidienne, d'obsidienne pleureuse ou une meule pour produire de la poudre de charbon au début du jeu.", + "jei.enderio.grinding.hand_grinding_infinity": "Tenez du silex dans votre main gauche et de l'Ardoise des abîmes ou de la Pierre des abîmes dans votre main principale, puis cliquez avec le bouton droit de la souris sur un bloc d'obsidienne, d'obsidienne pleureuse ou d'une meule pour produire les premiers grains d'infini.", + "jei.enderio.grinding.title": "Broyage", + "message.enderio.glider.disable": "Le vol plané est désactivé : ", + "message.enderio.glider.disable.fall_flying": "Vol en Élytres", + "message.enderio.grave.wrong_owner": "Ce n'est pas votre tombe ! Vous ne pouvez pas l'ouvrir.", + "message.enderio.soul_vial.error_blacklisted": "Cette entité a été mise sur liste noire.", + "message.enderio.soul_vial.error_boss": "Bien essayé. Les boss n'aiment pas les bouteilles.", + "message.enderio.soul_vial.error_dead": "Impossible de capturer un mob mort !", + "message.enderio.soul_vial.error_failed": "Cette entité ne peut pas être capturée.", + "message.enderio.soul_vial.error_player": "Vous ne pouvez pas placer un joueur dans une bouteille !", + "tooltip.enderio.block.blast_resistant": "Résistant aux explosions", + "tooltip.enderio.capacitor.base": "Modificateur de base : %s", + "tooltip.enderio.capacitor.energy_capacity": "Modificateur de capacité d'énergie : %s", + "tooltip.enderio.capacitor.energy_use": "Modificateur d'utilisation d'énergie : %s", + "tooltip.enderio.collision.animals_block": "Solide seulement pour les animaux", + "tooltip.enderio.collision.animals_pass": "Non-solide pour les animaux", + "tooltip.enderio.collision.mobs_block": "Solide seulement pour les monstres", + "tooltip.enderio.collision.mobs_pass": "Non-solide pour les monstres", + "tooltip.enderio.collision.players_block": "Solide seulement pour les joueurs", + "tooltip.enderio.collision.players_pass": "Non-solide pour les joueurs", + "tooltip.enderio.dark_steel_ladder.faster": "Plus rapide que des échelles normales", + "tooltip.enderio.fluid_tank.tank_empty_tooltip": "Réservoir Vide", + "tooltip.enderio.fluid_tank.tank_tooltip": "%d/%d mb de %s", + "tooltip.enderio.fused_quartz.blocks_light": "Bloque la lumière", + "tooltip.enderio.fused_quartz.emits_light": "Émet de la lumière", + "tooltip.enderio.grinding_ball_bonus_output": "Sortie Bonus %s%%", + "tooltip.enderio.grinding_ball_main_output": "Sortie Principale %s%%", + "tooltip.enderio.grinding_ball_power_use": "Utilisation d'Énergie : %s%%", + "tooltip.enderio.grinding_ball_remaining": "Restant : %s%%", + "tooltip.enderio.grinding_ball_title": "Bille de broyage pour broyeur SAG", + "tooltip.enderio.gui.show_advanced_tooltip": "", "tooltip.enderio.photovoltaic_cell.advanced": "Produit de l'énergie lorsqu'il fait jour", "tooltip.enderio.photovoltaic_cell.advanced2": "Doit avoir une vue sur le ciel", - "tooltip.enderio.photovoltaic_cell.advanced3": "Sortie Max : ", + "tooltip.enderio.photovoltaic_cell.advanced3": "Sortie max : ", "tooltip.enderio.photovoltaic_cell.main": "Énergie Solaire !", "tooltip.enderio.soul_vial.health": "Vie : %s/%s" } \ No newline at end of file From 5fd8da323fae38e14e1ed4457ef962b593bef2d3 Mon Sep 17 00:00:00 2001 From: Reece Mackie <20544390+Rover656@users.noreply.github.com> Date: Sat, 19 Aug 2023 00:45:14 +0100 Subject: [PATCH 123/154] New translations en_us.json (Czech) --- .../resources/assets/enderio/lang/cs_cz.json | 495 ++++++++++++++++++ 1 file changed, 495 insertions(+) create mode 100644 src/main/resources/assets/enderio/lang/cs_cz.json diff --git a/src/main/resources/assets/enderio/lang/cs_cz.json b/src/main/resources/assets/enderio/lang/cs_cz.json new file mode 100644 index 0000000000..2a236316ca --- /dev/null +++ b/src/main/resources/assets/enderio/lang/cs_cz.json @@ -0,0 +1,495 @@ +{ + "advancements.enderio.place_capacitor_bank.description": "Build a Capacitor Bank", + "advancements.enderio.place_capacitor_bank.title": "Modular Power Storage", + "advancements.enderio.rich.description": "Make others think you are rich", + "advancements.enderio.rich.title": "Don't tell the others", + "advancements.enderio.richer.description": "Make others think you are richer", + "advancements.enderio.richer.title": "Is this real?", + "advancements.enderio.use_glider.description": "Do you really trust some leather?", + "advancements.enderio.use_glider.title": "Majestic", + "block.enderio.advanced_capacitor_bank": "Advanced Capacitor Bank", + "block.enderio.alloy_smelter": "Alloy Smelter", + "block.enderio.basic_capacitor_bank": "Basic Capacitor Bank", + "block.enderio.clear_glass": "Clear Glass", + "block.enderio.clear_glass_black": "Black Clear Glass", + "block.enderio.clear_glass_blue": "Blue Clear Glass", + "block.enderio.clear_glass_brown": "Brown Clear Glass", + "block.enderio.clear_glass_cyan": "Cyan Clear Glass", + "block.enderio.clear_glass_d": "Dark Clear Glass", + "block.enderio.clear_glass_d_black": "Black Dark Clear Glass", + "block.enderio.clear_glass_d_blue": "Blue Dark Clear Glass", + "block.enderio.clear_glass_d_brown": "Brown Dark Clear Glass", + "block.enderio.clear_glass_d_cyan": "Cyan Dark Clear Glass", + "block.enderio.clear_glass_d_gray": "Gray Dark Clear Glass", + "block.enderio.clear_glass_d_green": "Green Dark Clear Glass", + "block.enderio.clear_glass_d_light_blue": "Light Blue Dark Clear Glass", + "block.enderio.clear_glass_d_light_gray": "Light Gray Dark Clear Glass", + "block.enderio.clear_glass_d_lime": "Lime Dark Clear Glass", + "block.enderio.clear_glass_d_magenta": "Magenta Dark Clear Glass", + "block.enderio.clear_glass_d_orange": "Orange Dark Clear Glass", + "block.enderio.clear_glass_d_pink": "Pink Dark Clear Glass", + "block.enderio.clear_glass_d_purple": "Purple Dark Clear Glass", + "block.enderio.clear_glass_d_red": "Red Dark Clear Glass", + "block.enderio.clear_glass_d_white": "White Dark Clear Glass", + "block.enderio.clear_glass_d_yellow": "Yellow Dark Clear Glass", + "block.enderio.clear_glass_e": "Enlightened Clear Glass", + "block.enderio.clear_glass_e_black": "Black Enlightened Clear Glass", + "block.enderio.clear_glass_e_blue": "Blue Enlightened Clear Glass", + "block.enderio.clear_glass_e_brown": "Brown Enlightened Clear Glass", + "block.enderio.clear_glass_e_cyan": "Cyan Enlightened Clear Glass", + "block.enderio.clear_glass_e_gray": "Gray Enlightened Clear Glass", + "block.enderio.clear_glass_e_green": "Green Enlightened Clear Glass", + "block.enderio.clear_glass_e_light_blue": "Light Blue Enlightened Clear Glass", + "block.enderio.clear_glass_e_light_gray": "Light Gray Enlightened Clear Glass", + "block.enderio.clear_glass_e_lime": "Lime Enlightened Clear Glass", + "block.enderio.clear_glass_e_magenta": "Magenta Enlightened Clear Glass", + "block.enderio.clear_glass_e_orange": "Orange Enlightened Clear Glass", + "block.enderio.clear_glass_e_pink": "Pink Enlightened Clear Glass", + "block.enderio.clear_glass_e_purple": "Purple Enlightened Clear Glass", + "block.enderio.clear_glass_e_red": "Red Enlightened Clear Glass", + "block.enderio.clear_glass_e_white": "White Enlightened Clear Glass", + "block.enderio.clear_glass_e_yellow": "Yellow Enlightened Clear Glass", + "block.enderio.clear_glass_gray": "Gray Clear Glass", + "block.enderio.clear_glass_green": "Green Clear Glass", + "block.enderio.clear_glass_light_blue": "Light Blue Clear Glass", + "block.enderio.clear_glass_light_gray": "Light Gray Clear Glass", + "block.enderio.clear_glass_lime": "Lime Clear Glass", + "block.enderio.clear_glass_magenta": "Magenta Clear Glass", + "block.enderio.clear_glass_orange": "Orange Clear Glass", + "block.enderio.clear_glass_pink": "Pink Clear Glass", + "block.enderio.clear_glass_purple": "Purple Clear Glass", + "block.enderio.clear_glass_red": "Red Clear Glass", + "block.enderio.clear_glass_white": "White Clear Glass", + "block.enderio.clear_glass_yellow": "Yellow Clear Glass", + "block.enderio.cloud_seed": "Cloud Seed", + "block.enderio.cloud_seed_concentrated": "Cloud Seed Concentrated", + "block.enderio.cold_fire": "Cold Fire", + "block.enderio.conductive_alloy_block": "Conductive Alloy Block", + "block.enderio.conduit": "Conduit", + "block.enderio.copper_alloy_block": "Copper Alloy Block", + "block.enderio.crafter": "Crafter", + "block.enderio.creative_power": "Creative Power", + "block.enderio.dark_steel_bars": "Dark Steel Bars", + "block.enderio.dark_steel_block": "Dark Steel Block", + "block.enderio.dark_steel_door": "Dark Steel Door", + "block.enderio.dark_steel_ladder": "Dark Steel Ladder", + "block.enderio.dark_steel_pressure_plate": "Dark Steel Pressure Plate", + "block.enderio.dark_steel_trapdoor": "Dark Steel Trapdoor", + "block.enderio.dew_of_the_void": "Dew Of The Void", + "block.enderio.enchanter": "Enchanter", + "block.enderio.end_steel_bars": "End Steel Bars", + "block.enderio.end_steel_block": "End Steel Block", + "block.enderio.enderman_head": "Enderman Head", + "block.enderio.energetic_alloy_block": "Energetic Alloy Block", + "block.enderio.energetic_photovoltaic_module": "Energetic Photovoltaic Module", + "block.enderio.ensouled_chassis": "Ensouled Chassis", + "block.enderio.fire_water": "Fire Water", + "block.enderio.fluid_tank": "Fluid Tank", + "block.enderio.fused_quartz": "Fused Quartz", + "block.enderio.fused_quartz_black": "Black Fused Quartz", + "block.enderio.fused_quartz_blue": "Blue Fused Quartz", + "block.enderio.fused_quartz_brown": "Brown Fused Quartz", + "block.enderio.fused_quartz_cyan": "Cyan Fused Quartz", + "block.enderio.fused_quartz_d": "Dark Fused Quartz", + "block.enderio.fused_quartz_d_black": "Black Dark Fused Quartz", + "block.enderio.fused_quartz_d_blue": "Blue Dark Fused Quartz", + "block.enderio.fused_quartz_d_brown": "Brown Dark Fused Quartz", + "block.enderio.fused_quartz_d_cyan": "Cyan Dark Fused Quartz", + "block.enderio.fused_quartz_d_gray": "Gray Dark Fused Quartz", + "block.enderio.fused_quartz_d_green": "Green Dark Fused Quartz", + "block.enderio.fused_quartz_d_light_blue": "Light Blue Dark Fused Quartz", + "block.enderio.fused_quartz_d_light_gray": "Light Gray Dark Fused Quartz", + "block.enderio.fused_quartz_d_lime": "Lime Dark Fused Quartz", + "block.enderio.fused_quartz_d_magenta": "Magenta Dark Fused Quartz", + "block.enderio.fused_quartz_d_orange": "Orange Dark Fused Quartz", + "block.enderio.fused_quartz_d_pink": "Pink Dark Fused Quartz", + "block.enderio.fused_quartz_d_purple": "Purple Dark Fused Quartz", + "block.enderio.fused_quartz_d_red": "Red Dark Fused Quartz", + "block.enderio.fused_quartz_d_white": "White Dark Fused Quartz", + "block.enderio.fused_quartz_d_yellow": "Yellow Dark Fused Quartz", + "block.enderio.fused_quartz_e": "Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_black": "Black Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_blue": "Blue Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_brown": "Brown Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_cyan": "Cyan Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_gray": "Gray Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_green": "Green Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_light_blue": "Light Blue Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_light_gray": "Light Gray Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_lime": "Lime Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_magenta": "Magenta Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_orange": "Orange Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_pink": "Pink Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_purple": "Purple Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_red": "Red Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_white": "White Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_yellow": "Yellow Enlightened Fused Quartz", + "block.enderio.fused_quartz_gray": "Gray Fused Quartz", + "block.enderio.fused_quartz_green": "Green Fused Quartz", + "block.enderio.fused_quartz_light_blue": "Light Blue Fused Quartz", + "block.enderio.fused_quartz_light_gray": "Light Gray Fused Quartz", + "block.enderio.fused_quartz_lime": "Lime Fused Quartz", + "block.enderio.fused_quartz_magenta": "Magenta Fused Quartz", + "block.enderio.fused_quartz_orange": "Orange Fused Quartz", + "block.enderio.fused_quartz_pink": "Pink Fused Quartz", + "block.enderio.fused_quartz_purple": "Purple Fused Quartz", + "block.enderio.fused_quartz_red": "Red Fused Quartz", + "block.enderio.fused_quartz_white": "White Fused Quartz", + "block.enderio.fused_quartz_yellow": "Yellow Fused Quartz", + "block.enderio.hootch": "Hootch", + "block.enderio.impulse_hopper": "Impulse Hopper", + "block.enderio.industrial_insulation_block": "Industrial Insulation", + "block.enderio.light": "Light", + "block.enderio.light_inverted": "Light Inverted", + "block.enderio.light_node": "Light Node", + "block.enderio.liquid_sunshine": "Liquid Sunshine", + "block.enderio.nutrient_distillation": "Nutrient Distillation", + "block.enderio.painted_crafting_table": "Painted Crafting Table", + "block.enderio.painted_fence": "Painted Fence", + "block.enderio.painted_fence_gate": "Painted Fence Gate", + "block.enderio.painted_glowstone": "Painted Glowstone", + "block.enderio.painted_redstone_block": "Painted Redstone Block", + "block.enderio.painted_sand": "Painted Sand", + "block.enderio.painted_slab": "Painted Slab", + "block.enderio.painted_stairs": "Painted Stairs", + "block.enderio.painted_trapdoor": "Painted Trapdoor", + "block.enderio.painted_wooden_pressure_plate": "Painted Wooden Pressure Plate", + "block.enderio.painting_machine": "Painting Machine", + "block.enderio.powered_light": "Powered Light", + "block.enderio.powered_light_inverted": "Powered Light Inverted", + "block.enderio.powered_light_inverted_wireless": "Powered Light Inverted Wireless", + "block.enderio.powered_light_wireless": "Powered Light Wireless", + "block.enderio.powered_spawner": "Powered Spawner", + "block.enderio.pressurized_fluid_tank": "Pressurized Fluid Tank", + "block.enderio.primitive_alloy_smelter": "Primitive Alloy Smelter", + "block.enderio.pulsating_alloy_block": "Pulsating Alloy Block", + "block.enderio.pulsating_photovoltaic_module": "Pulsating Photovoltaic Module", + "block.enderio.redstone_alloy_block": "Redstone Alloy Block", + "block.enderio.reinforced_obsidian_block": "Reinforced Obsidian Block", + "block.enderio.resetting_lever_five": "Resetting Lever (5 seconds)", + "block.enderio.resetting_lever_five_inv": "Resetting Lever Inverted (5 seconds)", + "block.enderio.resetting_lever_sixty": "Resetting Lever (1 minute)", + "block.enderio.resetting_lever_sixty_inv": "Resetting Lever Inverted (1 minute)", + "block.enderio.resetting_lever_ten": "Resetting Lever (10 seconds)", + "block.enderio.resetting_lever_ten_inv": "Resetting Lever Inverted (10 seconds)", + "block.enderio.resetting_lever_thirty": "Resetting Lever (30 seconds)", + "block.enderio.resetting_lever_thirty_inv": "Resetting Lever Inverted (30 seconds)", + "block.enderio.resetting_lever_three_hundred": "Resetting Lever (5 minutes)", + "block.enderio.resetting_lever_three_hundred_inv": "Resetting Lever Inverted (5 minutes)", + "block.enderio.rocket_fuel": "Rocket Fuel", + "block.enderio.sag_mill": "SAG Mill", + "block.enderio.silent_acacia_pressure_plate": "Silent Acacia Pressure Plate", + "block.enderio.silent_birch_pressure_plate": "Silent Birch Pressure Plate", + "block.enderio.silent_crimson_pressure_plate": "Silent Crimson Pressure Plate", + "block.enderio.silent_dark_oak_pressure_plate": "Silent Dark Oak Pressure Plate", + "block.enderio.silent_dark_steel_pressure_plate": "Silent Dark Steel Pressure Plate", + "block.enderio.silent_heavy_weighted_pressure_plate": "Silent Heavy Weighted Pressure Plate", + "block.enderio.silent_jungle_pressure_plate": "Silent Jungle Pressure Plate", + "block.enderio.silent_light_weighted_pressure_plate": "Silent Light Weighted Pressure Plate", + "block.enderio.silent_oak_pressure_plate": "Silent Oak Pressure Plate", + "block.enderio.silent_polished_blackstone_pressure_plate": "Silent Polished Blackstone Pressure Plate", + "block.enderio.silent_soularium_pressure_plate": "Silent Soularium Pressure Plate", + "block.enderio.silent_spruce_pressure_plate": "Silent Spruce Pressure Plate", + "block.enderio.silent_stone_pressure_plate": "Silent Stone Pressure Plate", + "block.enderio.silent_warped_pressure_plate": "Silent Warped Pressure Plate", + "block.enderio.slice_and_splice": "Slice'N'Splice", + "block.enderio.soul_binder": "Soul Binder", + "block.enderio.soul_chain": "Soul Chain", + "block.enderio.soularium_block": "Soularium Block", + "block.enderio.soularium_pressure_plate": "Soularium Pressure Plate", + "block.enderio.stirling_generator": "Stirling Generator", + "block.enderio.travel_anchor": "Travel Anchor", + "block.enderio.vacuum_chest": "Vacuum Chest", + "block.enderio.vapor_of_levity": "Vapor Of Levity", + "block.enderio.vibrant_alloy_block": "Vibrant Alloy Block", + "block.enderio.vibrant_capacitor_bank": "Vibrant Capacitor Bank", + "block.enderio.vibrant_photovoltaic_module": "Vibrant Photovoltaic Module", + "block.enderio.void_chassis": "Void Chassis", + "block.enderio.wired_charger": "Wired Charger", + "block.enderio.xp_juice": "Xp Juice", + "block.enderio.xp_vacuum": "Xp Vacuum", + "enchantment.enderio.auto_smelt": "Auto Smelt", + "enchantment.enderio.auto_smelt.desc": "Automatically smelts whatever is mined.", + "enchantment.enderio.repellent": "Repellent", + "enchantment.enderio.repellent.desc": "Chance to teleport attackers away. Higher levels teleport more often and farther.", + "enchantment.enderio.shimmer": "Shimmer", + "enchantment.enderio.shimmer.desc": "Makes the item shimmer as if it was enchanted... That's all... Really...", + "enchantment.enderio.soulbound": "Soulbound", + "enchantment.enderio.soulbound.desc": "Prevents item from being lost on death. Note: Most gravestone mods are stupid and prevent this from working!", + "enchantment.enderio.withering": "Withering", + "enchantment.enderio.withering.desc": "Applies wither to the target.", + "enchantment.enderio.withering.type": "Applies to bladed weapons, bows and crossbows.", + "enchantment.enderio.xp_boost": "XP Boost", + "enchantment.enderio.xp_boost.desc": "Extra XP from mobs and blocks", + "entity.enderio.painted_sand": "Painted Sand", + "fluid.enderio.cloud_seed": "Cloud Seed", + "fluid.enderio.cloud_seed_concentrated": "Cloud Seed Concentrated", + "fluid.enderio.dew_of_the_void": "Fluid of the Void", + "fluid.enderio.fire_water": "Fire Water", + "fluid.enderio.hootch": "Hootch", + "fluid.enderio.liquid_sunshine": "Liquid Sunshine", + "fluid.enderio.nutrient_distillation": "Nutrient Distillation", + "fluid.enderio.rocket_fuel": "Rocket Fuel", + "fluid.enderio.vapor_of_levity": "Vapor Of Levity", + "fluid.enderio.xp_juice": "Xp Juice", + "gui.enderio.alloy_smelter.mode": "Smelting Mode", + "gui.enderio.alloy_smelter.mode_all": "Alloying and Smelting", + "gui.enderio.alloy_smelter.mode_alloy": "Alloys Only", + "gui.enderio.alloy_smelter.mode_furnace": "Furnace Only", + "gui.enderio.category.alloy_smelting": "Alloy Smelting", + "gui.enderio.category.enchanter": "Enchanting", + "gui.enderio.category.primitive_alloy_smelting": "Primitive Alloy Smelting", + "gui.enderio.category.sag_mill": "SAG Mill", + "gui.enderio.category.slicing": "Slicing", + "gui.enderio.category.soul_binding": "Soul Binding", + "gui.enderio.category.tank": "Fluid Tank", + "gui.enderio.conduit.extract": "Extract", + "gui.enderio.conduit.insert": "Insert", + "gui.enderio.conduit_channel": "Conduit-Channel", + "gui.enderio.energy_equivalence": "A unit of energy, equivalent to FE.", + "gui.enderio.filter": "Filter", + "gui.enderio.fluid_conduit.change_fluid1": "Locked Fluid:", + "gui.enderio.fluid_conduit.change_fluid2": "Click to reset!", + "gui.enderio.fluid_conduit.change_fluid3": "Fluid: %s", + "gui.enderio.ioconfig": "IO Configuration", + "gui.enderio.ioconfig.both": "Push / Pull", + "gui.enderio.ioconfig.disabled": "Disabled", + "gui.enderio.ioconfig.neighbour": "Show/Hide Neighbours", + "gui.enderio.ioconfig.none": "None", + "gui.enderio.ioconfig.pull": "Pull", + "gui.enderio.ioconfig.push": "Push", + "gui.enderio.nocap.desc": "Insert any capacitor so \n this machine can work!", + "gui.enderio.nocap.title": "Capacitor Missing", + "gui.enderio.progress": "Progress %s%%", + "gui.enderio.range": "Range", + "gui.enderio.range.hide": "Hide Range", + "gui.enderio.range.show": "Show Range", + "gui.enderio.redstone.active_with_signal": "Active with signal", + "gui.enderio.redstone.active_without_signal": "Active without signal", + "gui.enderio.redstone.always_active": "Always active", + "gui.enderio.redstone.mode": "Redstone Mode", + "gui.enderio.redstone.never_active": "Never active", + "gui.enderio.redstone_channel": "Redstone-Channel", + "gui.enderio.round_robin.disabled": "Round Robin Disabled", + "gui.enderio.round_robin.enabled": "Round Robin Enabled", + "gui.enderio.sag_mill_chance": "Chance: %s%%", + "gui.enderio.sag_mill_chance_ball": "Chance: %s%% (modified by grinding ball)", + "gui.enderio.self_feed.disabled": "Self Feed Disabled", + "gui.enderio.self_feed.enabled": "Self Feed Enabled", + "gui.enderio.spawner.disabled": "Disabled by config", + "gui.enderio.spawner.other_mod": "Other mod", + "gui.enderio.spawner.too_many_mob": "Too many mobs", + "gui.enderio.spawner.too_many_spawner": "Too many spawners", + "gui.enderio.spawner.unknown": "Unknown mob", + "gui.enderio.visible.false": "Hidden", + "gui.enderio.visible.true": "Visible", + "guidebook.enderio.book_title": "Book Title", + "guidebook.enderio.landing_text": "Landing Text", + "hint.enderio.connected_textures.text": "If you are looking for connected textures on the capacitor bank, you might want to install Athena on your client", + "info.enderio.coordinate_selector.no_block": "No block in range", + "info.enderio.coordinate_selector.no_paper": "No paper in inventory", + "info.enderio.darksteel.upgrade.activate": "Right Click to Activate", + "info.enderio.darksteel.upgrade.available": "Available Upgrades", + "info.enderio.darksteel.upgrade.cost": "Costs %s Levels", + "info.enderio.darksteel.upgrade.direct": "Direct", + "info.enderio.darksteel.upgrade.direct.description": "Teleports harvested items directly into your inventory", + "info.enderio.darksteel.upgrade.empowered.absorption": "%s%% damage absorbed by µI", + "info.enderio.darksteel.upgrade.empowered.description": "Infuse the steel with the power of Micro Infinity", + "info.enderio.darksteel.upgrade.empowered.efficiency": "Efficiency +%s when powered", + "info.enderio.darksteel.upgrade.empowered.obsidian.efficiency": "Efficiency +%s when breaking obsidian", + "info.enderio.darksteel.upgrade.empowered.storage": "Holds up to %s µI", + "info.enderio.darksteel.upgrade.empowered_l1": "Empowered", + "info.enderio.darksteel.upgrade.empowered_l2": "Empowered II", + "info.enderio.darksteel.upgrade.empowered_l3": "Empowered III", + "info.enderio.darksteel.upgrade.empowered_l4": "Empowered IV", + "info.enderio.darksteel.upgrade.explosive.description": "Makes surrounding dirt and rock go splodey", + "info.enderio.darksteel.upgrade.explosive_l1": "Explosive I", + "info.enderio.darksteel.upgrade.explosive_l2": "Explosive II", + "info.enderio.darksteel.upgrade.explosive_penetration.description": "Makes dirt and rock behind the mined block go splodey", + "info.enderio.darksteel.upgrade.explosive_penetration_l1": "Explosive Penetration I", + "info.enderio.darksteel.upgrade.explosive_penetration_l2": "Explosive Penetration II", + "info.enderio.darksteel.upgrade.fork": "Fork", + "info.enderio.darksteel.upgrade.fork.description": "Who needs a hoe when you have a fork?", + "info.enderio.darksteel.upgrade.no_xp": "Not enough XP", + "info.enderio.darksteel.upgrade.spoon": "Spoon", + "info.enderio.darksteel.upgrade.spoon.description": "Who needs a shovel when you have a spoon?", + "info.enderio.durability.amount": "Durability %s", + "info.enderio.energy.amount": "%s µI", + "info.enderio.headchance": "%s%% chance to drop a mob head", + "info.enderio.too_many_levels": "You have more than 21862 levels, that's too much XP.", + "item.enderio.animal_token": "Animal Token", + "item.enderio.basic_capacitor": "Basic Capacitor", + "item.enderio.black_paper": "Black Paper", + "item.enderio.broken_spawner": "Broken Spawner", + "item.enderio.cake_base": "Cake Base", + "item.enderio.clayed_glowstone": "Clayed Glowstone", + "item.enderio.cloud_seed_bucket": "Cloud Seed Bucket", + "item.enderio.cloud_seed_concentrated_bucket": "Cloud Seed Concentrated Bucket", + "item.enderio.cold_fire_igniter": "Cold Fire Igniter", + "item.enderio.conductive_alloy_grinding_ball": "Conductive Alloy Grinding Ball", + "item.enderio.conductive_alloy_ingot": "Conductive Alloy Ingot", + "item.enderio.conductive_alloy_nugget": "Conductive Alloy Nugget", + "item.enderio.conduit_binder": "Conduit Binder", + "item.enderio.conduit_binder_composite": "Conduit Binder Composite", + "item.enderio.confusing_powder": "Confusing Powder", + "item.enderio.coordinate_selector": "Coordinate Selector", + "item.enderio.copper_alloy_grinding_ball": "Copper Alloy Grinding Ball", + "item.enderio.copper_alloy_ingot": "Copper Alloy Ingot", + "item.enderio.copper_alloy_nugget": "Copper Alloy Nugget", + "item.enderio.dark_bimetal_gear": "Dark Bimetal Gear", + "item.enderio.dark_steel_grinding_ball": "Dark Steel Grinding Ball", + "item.enderio.dark_steel_ingot": "Dark Steel Ingot", + "item.enderio.dark_steel_nugget": "Dark Steel Nugget", + "item.enderio.dark_steel_sword": "The Ender", + "item.enderio.dense_me_conduit": "Dense ME Conduit", + "item.enderio.dew_of_the_void_bucket": "Dew Of The Void Bucket", + "item.enderio.double_layer_capacitor": "Double Layer Capacitor", + "item.enderio.electromagnet": "Electromagnet", + "item.enderio.empty_soul_vial": "Empty Soul Vial", + "item.enderio.end_steel_grinding_ball": "End Steel Grinding Ball", + "item.enderio.end_steel_ingot": "End Steel Ingot", + "item.enderio.end_steel_nugget": "End Steel Nugget", + "item.enderio.ender_crystal": "Ender Crystal", + "item.enderio.ender_crystal_powder": "Grains of the End", + "item.enderio.ender_fluid_conduit": "Ender Fluid Conduit", + "item.enderio.ender_resonator": "Ender Resonator", + "item.enderio.enderface_conduits": "Enderface Conduits", + "item.enderio.enderface_invpanel": "Enderface Invpanel", + "item.enderio.enderface_items": "Enderface Items", + "item.enderio.enderface_machines": "Enderface Machines", + "item.enderio.enderface_materials": "Enderface Materials", + "item.enderio.enderface_mobs": "Enderface Mobs", + "item.enderio.enderface_none": "Enderface None", + "item.enderio.enderios": "\"Enderios\"", + "item.enderio.energetic_alloy_grinding_ball": "Energetic Alloy Grinding Ball", + "item.enderio.energetic_alloy_ingot": "Energetic Alloy Ingot", + "item.enderio.energetic_alloy_nugget": "Energetic Alloy Nugget", + "item.enderio.energized_gear": "Energized Bimetal Gear", + "item.enderio.energy_conduit": "Energy Conduit", + "item.enderio.enticing_crystal": "Enticing Crystal", + "item.enderio.experience_rod": "Experience Rod", + "item.enderio.filled_soul_vial": "Filled Soul Vial", + "item.enderio.fire_water_bucket": "Fire Water Bucket", + "item.enderio.flour": "Flour", + "item.enderio.fluid_conduit": "Fluid Conduit", + "item.enderio.frank_n_zombie": "Frank'N'Zombie", + "item.enderio.glider_wing": "Glider Wing", + "item.enderio.grains_of_infinity": "Grains of Infinity", + "item.enderio.guardian_diode": "Guardian Diode", + "item.enderio.hootch_bucket": "Hootch Bucket", + "item.enderio.infinity_rod": "Infinity Rod", + "item.enderio.iron_gear": "Infinity Bimetal Gear", + "item.enderio.item_conduit": "Item Conduit", + "item.enderio.liquid_sunshine_bucket": "Liquid Sunshine Bucket", + "item.enderio.location_printout": "Location Printout", + "item.enderio.loot_capacitor": "Loot Capacitor", + "item.enderio.me_conduit": "ME Conduit", + "item.enderio.monster_token": "Monster Token", + "item.enderio.nethercotta": "Nethercotta", + "item.enderio.nutrient_distillation_bucket": "Nutrient Distillation Bucket", + "item.enderio.nutritious_stick": "Nutritious Stick", + "item.enderio.octadic_capacitor": "Octadic Capacitor", + "item.enderio.organic_black_dye": "Organic Black Dye", + "item.enderio.organic_brown_dye": "Organic Brown Dye", + "item.enderio.organic_green_dye": "Organic Green Dye", + "item.enderio.photovoltaic_composite": "Photovoltaic Composite", + "item.enderio.photovoltaic_plate": "Photovoltaic Plate", + "item.enderio.plant_matter_brown": "Twigs and Prunings", + "item.enderio.plant_matter_green": "Clippings and Trimmings", + "item.enderio.player_token": "Player Token", + "item.enderio.powdered_coal": "Powdered Coal", + "item.enderio.powdered_cobalt": "Powdered Cobalt", + "item.enderio.powdered_copper": "Powdered Copper", + "item.enderio.powdered_ender_pearl": "Powdered Ender Pearl", + "item.enderio.powdered_gold": "Powdered Gold", + "item.enderio.powdered_iron": "Powdered Iron", + "item.enderio.powdered_lapis_lazuli": "Powdered Lapis Lazuli", + "item.enderio.powdered_obsidian": "Powdered Obsidian", + "item.enderio.powdered_quartz": "Powdered Quartz", + "item.enderio.powdered_tin": "Powdered Tin", + "item.enderio.prescient_crystal": "Prescient Crystal", + "item.enderio.prescient_powder": "Grains of Prescience", + "item.enderio.pressurized_fluid_conduit": "Pressurized Fluid Conduit", + "item.enderio.pulsating_alloy_grinding_ball": "Pulsating Alloy Grinding Ball", + "item.enderio.pulsating_alloy_ingot": "Pulsating Alloy Ingot", + "item.enderio.pulsating_alloy_nugget": "Pulsating Alloy Nugget", + "item.enderio.pulsating_crystal": "Pulsating Crystal", + "item.enderio.pulsating_powder": "Grains of Piezallity", + "item.enderio.redstone_alloy_grinding_ball": "Redstone Alloy Grinding Ball", + "item.enderio.redstone_alloy_ingot": "Redstone Alloy Ingot", + "item.enderio.redstone_alloy_nugget": "Redstone Alloy Nugget", + "item.enderio.redstone_conduit": "Redstone Conduit", + "item.enderio.redstone_filter_base": "Redstone Filter Base", + "item.enderio.rocket_fuel_bucket": "Rocket Fuel Bucket", + "item.enderio.sentient_ender": "Sentient Ender", + "item.enderio.silicon": "Silicon", + "item.enderio.skeletal_contractor": "Skeletal Contractor", + "item.enderio.soul_powder": "Soul Powder", + "item.enderio.soularium_grinding_ball": "Soularium Grinding Ball", + "item.enderio.soularium_ingot": "Soularium Ingot", + "item.enderio.soularium_nugget": "Soularium Nugget", + "item.enderio.staff_of_levity": "Staff Of Levity", + "item.enderio.staff_of_travelling": "Staff Of Travelling", + "item.enderio.stone_gear": "Stone Compound Gear", + "item.enderio.vapor_of_levity_bucket": "Vapor Of Levity Bucket", + "item.enderio.vibrant_alloy_grinding_ball": "Vibrant Alloy Grinding Ball", + "item.enderio.vibrant_alloy_ingot": "Vibrant Alloy Ingot", + "item.enderio.vibrant_alloy_nugget": "Vibrant Alloy Nugget", + "item.enderio.vibrant_crystal": "Vibrant Crystal", + "item.enderio.vibrant_gear": "Vibrant Bimetal Gear", + "item.enderio.vibrant_powder": "Grains of Vibrancy", + "item.enderio.weather_crystal": "Weather Crystal", + "item.enderio.withering_powder": "Withering Powder", + "item.enderio.wood_gear": "Wooden Gear", + "item.enderio.xp_juice_bucket": "Xp Juice Bucket", + "item.enderio.yeta_wrench": "Yeta Wrench", + "item.enderio.z_logic_controller": "Z-Logic Controller", + "item.enderio.zombie_electrode": "Zombie Electrode", + "itemGroup.enderio.blocks": "Ender IO Blocks", + "itemGroup.enderio.conduits": "Ender IO Conduits", + "itemGroup.enderio.gear": "Ender IO Gear", + "itemGroup.enderio.machines": "Ender IO Machines", + "itemGroup.enderio.main": "Ender IO", + "itemGroup.enderio.souls": "Ender IO Souls", + "jei.enderio.fire_crafting.title": "Fire Crafting", + "jei.enderio.fire_crafting.valid_blocks": "Valid Blocks:", + "jei.enderio.fire_crafting.valid_dimensions": "Valid Dimensions:", + "jei.enderio.grinding.consume_chance": "33% chance to be consumed", + "jei.enderio.grinding.hand_grinding_coal": "Hold some flint in your offhand and 3 or more coal in your main hand, then shift right-click a block of obsidian, crying obsidian or a grindstone to produce early powdered coal.", + "jei.enderio.grinding.hand_grinding_infinity": "Hold some flint in your offhand and some deepslate or cobbled deepslate in your main hand, then shift right-click a block of obsidian, crying obsidian or a grindstone to produce early grains of infinity.", + "jei.enderio.grinding.title": "Grinding", + "message.enderio.glider.disable": "Gliding is disabled: ", + "message.enderio.glider.disable.fall_flying": "Elytra Flight", + "message.enderio.grave.wrong_owner": "This grave is not yours! You cannot open it.", + "message.enderio.soul_vial.error_blacklisted": "This entity has been blacklisted.", + "message.enderio.soul_vial.error_boss": "Nice try. Bosses don't like bottles.", + "message.enderio.soul_vial.error_dead": "Cannot capture a dead mob!", + "message.enderio.soul_vial.error_failed": "This entity cannot be captured.", + "message.enderio.soul_vial.error_player": "You cannot put player in a bottle!", + "tooltip.enderio.block.blast_resistant": "Blast resistant", + "tooltip.enderio.capacitor.base": "Base Modifier: %s", + "tooltip.enderio.capacitor.energy_capacity": "Energy Capacity Modifier: %s", + "tooltip.enderio.capacitor.energy_use": "Energy Use Modifier: %s", + "tooltip.enderio.collision.animals_block": "Only solid to animals", + "tooltip.enderio.collision.animals_pass": "Not solid to animals", + "tooltip.enderio.collision.mobs_block": "Only solid to monsters", + "tooltip.enderio.collision.mobs_pass": "Not solid to monsters", + "tooltip.enderio.collision.players_block": "Only solid to players", + "tooltip.enderio.collision.players_pass": "Not solid to players", + "tooltip.enderio.dark_steel_ladder.faster": "Faster than regular ladders", + "tooltip.enderio.fluid_tank.tank_empty_tooltip": "Empty tank", + "tooltip.enderio.fluid_tank.tank_tooltip": "%d/%d mb of %s", + "tooltip.enderio.fused_quartz.blocks_light": "Blocks light", + "tooltip.enderio.fused_quartz.emits_light": "Emits light", + "tooltip.enderio.grinding_ball_bonus_output": "Bonus Output %s%%", + "tooltip.enderio.grinding_ball_main_output": "Main Output %s%%", + "tooltip.enderio.grinding_ball_power_use": "Power Use %s%%", + "tooltip.enderio.grinding_ball_remaining": "Remaining: %s%%", + "tooltip.enderio.grinding_ball_title": "SAG Mill Grinding Ball", + "tooltip.enderio.gui.show_advanced_tooltip": "", + "tooltip.enderio.photovoltaic_cell.advanced": "Produces Power during daylight hours", + "tooltip.enderio.photovoltaic_cell.advanced2": "Must have a clear line of sight to the sky", + "tooltip.enderio.photovoltaic_cell.advanced3": "Max Output: ", + "tooltip.enderio.photovoltaic_cell.main": "Solar Power!", + "tooltip.enderio.soul_vial.health": "Health: %s/%s" +} \ No newline at end of file From f296215597fd3c52a631ddddacc75e5d77ce31de Mon Sep 17 00:00:00 2001 From: Reece Mackie <20544390+Rover656@users.noreply.github.com> Date: Sat, 19 Aug 2023 00:45:15 +0100 Subject: [PATCH 124/154] New translations en_us.json (German) --- .../resources/assets/enderio/lang/de_de.json | 495 ++++++++++++++++++ 1 file changed, 495 insertions(+) create mode 100644 src/main/resources/assets/enderio/lang/de_de.json diff --git a/src/main/resources/assets/enderio/lang/de_de.json b/src/main/resources/assets/enderio/lang/de_de.json new file mode 100644 index 0000000000..a0f72081ff --- /dev/null +++ b/src/main/resources/assets/enderio/lang/de_de.json @@ -0,0 +1,495 @@ +{ + "advancements.enderio.place_capacitor_bank.description": "Baue eine Kondensatorbank", + "advancements.enderio.place_capacitor_bank.title": "Modularer Energiespeicher", + "advancements.enderio.rich.description": "Lass andere glauben, dass du reich bist", + "advancements.enderio.rich.title": "Sag den anderen nichts", + "advancements.enderio.richer.description": "Lass andere glauben, dass du reicher bist als sie", + "advancements.enderio.richer.title": "Ist das echt?", + "advancements.enderio.use_glider.description": "Willst du wirklich einem Fetzen Leder vertrauen?", + "advancements.enderio.use_glider.title": "Majestätisch", + "block.enderio.advanced_capacitor_bank": "Fortschrittliche Kondensatorbank", + "block.enderio.alloy_smelter": "Legierungsschmelze", + "block.enderio.basic_capacitor_bank": "Einfache Kondensatorbank", + "block.enderio.clear_glass": "Klarglas", + "block.enderio.clear_glass_black": "Schwarzes Klarglas", + "block.enderio.clear_glass_blue": "Blaues Klarglas", + "block.enderio.clear_glass_brown": "Braunes Klarglas", + "block.enderio.clear_glass_cyan": "Türkises Klarglas", + "block.enderio.clear_glass_d": "Dunkles Klarglas", + "block.enderio.clear_glass_d_black": "Schwarzes Dunkelklarglas", + "block.enderio.clear_glass_d_blue": "Blaues Dunkelklarglas", + "block.enderio.clear_glass_d_brown": "Braunes Dunkelklarglas", + "block.enderio.clear_glass_d_cyan": "Türkises Dunkelklarglas", + "block.enderio.clear_glass_d_gray": "Graues Dunkelklarglas", + "block.enderio.clear_glass_d_green": "Grünes Dunkelklarglas", + "block.enderio.clear_glass_d_light_blue": "Hellblaues Dunkelklarglas", + "block.enderio.clear_glass_d_light_gray": "Hellgraues Dunkelklarglas", + "block.enderio.clear_glass_d_lime": "Hellgrünes Dunkelklarglas", + "block.enderio.clear_glass_d_magenta": "Violettes Dunkelklarglas", + "block.enderio.clear_glass_d_orange": "Oranges Dunkelklarglas", + "block.enderio.clear_glass_d_pink": "Pinkes Dunkelklarglas", + "block.enderio.clear_glass_d_purple": "Lilanes Dunkelklarglas", + "block.enderio.clear_glass_d_red": "Rotes Dunkelklarglas", + "block.enderio.clear_glass_d_white": "Weißes Dunkelklarglas", + "block.enderio.clear_glass_d_yellow": "Gelbes Dunkelklarglas", + "block.enderio.clear_glass_e": "Leuchtendes Klarglas", + "block.enderio.clear_glass_e_black": "Schwarz erleuchtetes Klarglas", + "block.enderio.clear_glass_e_blue": "Blau erleuchtetes Klarglas", + "block.enderio.clear_glass_e_brown": "Braun erleuchtetes Klarglas", + "block.enderio.clear_glass_e_cyan": "Türkis erleuchtetes Klarglas", + "block.enderio.clear_glass_e_gray": "Grau erleuchtetes Klarglas", + "block.enderio.clear_glass_e_green": "Grün erleuchtendes Klarglas", + "block.enderio.clear_glass_e_light_blue": "Hellblau erleuchtendes Klarglas", + "block.enderio.clear_glass_e_light_gray": "Hellgrau erleuchtendes Klarglas", + "block.enderio.clear_glass_e_lime": "Hellgrün erleuchtetes Klarglas", + "block.enderio.clear_glass_e_magenta": "Violett erleuchtetes Klarglas", + "block.enderio.clear_glass_e_orange": "Orange erleuchtendes Klarglas", + "block.enderio.clear_glass_e_pink": "Pink erleuchtetes Klarglas", + "block.enderio.clear_glass_e_purple": "Lila erleuchtetes Klarglas", + "block.enderio.clear_glass_e_red": "Rot erleuchtetes Klarglas", + "block.enderio.clear_glass_e_white": "Weiß erleuchtetes Klarglas", + "block.enderio.clear_glass_e_yellow": "Gelb erleuchtetes Klarglas", + "block.enderio.clear_glass_gray": "Graues Klarglas", + "block.enderio.clear_glass_green": "Grünes Klarglas", + "block.enderio.clear_glass_light_blue": "Hellblaues Klarglas", + "block.enderio.clear_glass_light_gray": "Hellgraues Klarglas", + "block.enderio.clear_glass_lime": "Hellgrünes Klarglas", + "block.enderio.clear_glass_magenta": "Violettes Klarglas", + "block.enderio.clear_glass_orange": "Oranges Klarglas", + "block.enderio.clear_glass_pink": "Pinkes Klarglas", + "block.enderio.clear_glass_purple": "Lilanes Klarglas", + "block.enderio.clear_glass_red": "Rotes Klarglas", + "block.enderio.clear_glass_white": "Weißes Klarglas", + "block.enderio.clear_glass_yellow": "Gelbes Klarglas", + "block.enderio.cloud_seed": "Wolkensamen", + "block.enderio.cloud_seed_concentrated": "Konzentrierter Wolkensamen", + "block.enderio.cold_fire": "Kaltes Feuer", + "block.enderio.conductive_alloy_block": "Leitender Legierungsblock", + "block.enderio.conduit": "Leitung", + "block.enderio.copper_alloy_block": "Kupferlegierungsblock", + "block.enderio.crafter": "Crafter", + "block.enderio.creative_power": "Kreative Energie", + "block.enderio.dark_steel_bars": "Dunkelstahlbarren", + "block.enderio.dark_steel_block": "Dunkelstahlblock", + "block.enderio.dark_steel_door": "Dunkelstahltüre", + "block.enderio.dark_steel_ladder": "Dunkelstahlleiter", + "block.enderio.dark_steel_pressure_plate": "Dunkelstahldruckplatte", + "block.enderio.dark_steel_trapdoor": "Dunkelstahfalltür", + "block.enderio.dew_of_the_void": "Tau der Leere", + "block.enderio.enchanter": "Verzauberer", + "block.enderio.end_steel_bars": "Endstahlgitter", + "block.enderio.end_steel_block": "Endstahlblock", + "block.enderio.enderman_head": "Endermankopf", + "block.enderio.energetic_alloy_block": "Energischer Legierungsblock", + "block.enderio.energetic_photovoltaic_module": "Energisches Fotovoltaikmodul", + "block.enderio.ensouled_chassis": "Versiegeltes Gerüst", + "block.enderio.fire_water": "Feuerwasser", + "block.enderio.fluid_tank": "Flüssigkeitsbehälter", + "block.enderio.fused_quartz": "Quarzglas", + "block.enderio.fused_quartz_black": "Schwarzes Quarzglas", + "block.enderio.fused_quartz_blue": "Blaues Quarzglas", + "block.enderio.fused_quartz_brown": "Braunes Quarzglas", + "block.enderio.fused_quartz_cyan": "Türkises Quarzglas", + "block.enderio.fused_quartz_d": "Dunkeles Quarzglas", + "block.enderio.fused_quartz_d_black": "Schwarzes Dunkelquarzglas", + "block.enderio.fused_quartz_d_blue": "Blaues Dunkelquarzglas", + "block.enderio.fused_quartz_d_brown": "Braunes Dunkelquarzglas", + "block.enderio.fused_quartz_d_cyan": "Türkises Dunkelquarzglas", + "block.enderio.fused_quartz_d_gray": "Graues Dunkelquarzglas", + "block.enderio.fused_quartz_d_green": "Grünes Dunkelquarzglas", + "block.enderio.fused_quartz_d_light_blue": "Hellblaues Dunkelquarzglas", + "block.enderio.fused_quartz_d_light_gray": "Hellgraues Dunkelquarzglas", + "block.enderio.fused_quartz_d_lime": "Hellgrünes Dunkelquarzglas", + "block.enderio.fused_quartz_d_magenta": "Violettes Dunkelquarzglas", + "block.enderio.fused_quartz_d_orange": "Orangenes Dunkelquarzglas", + "block.enderio.fused_quartz_d_pink": "Pinkes Dunkelquarzglas", + "block.enderio.fused_quartz_d_purple": "Lilanes Dunkelquarzglas", + "block.enderio.fused_quartz_d_red": "Rotes Dunkelquarzglas", + "block.enderio.fused_quartz_d_white": "Weißes Dunkelquarzglas", + "block.enderio.fused_quartz_d_yellow": "Gelbes Dunkelquarzglas", + "block.enderio.fused_quartz_e": "Erleuchtetes Quarzglas", + "block.enderio.fused_quartz_e_black": "Schwarz erleuchtetes Quarzglas", + "block.enderio.fused_quartz_e_blue": "Blau erleuchtetes Quarzglas", + "block.enderio.fused_quartz_e_brown": "Braun erleuchtetes Quarzglas", + "block.enderio.fused_quartz_e_cyan": "Türkis erleuchtetes Quarzglas", + "block.enderio.fused_quartz_e_gray": "Grau erleuchtetes Quarzglas", + "block.enderio.fused_quartz_e_green": "Grün erleuchtetes Quarzglas", + "block.enderio.fused_quartz_e_light_blue": "Hellblau erleuchtetes Quarzglas", + "block.enderio.fused_quartz_e_light_gray": "Hellgrau erleuchtetes Quarzglas", + "block.enderio.fused_quartz_e_lime": "Hellgrün erleuchtetes Quarzglas", + "block.enderio.fused_quartz_e_magenta": "Magenta erleuchtetes Quarzglas", + "block.enderio.fused_quartz_e_orange": "Orangenes erleuchtetes Quarzglas", + "block.enderio.fused_quartz_e_pink": "Pink erleuchtetes Quarzglas", + "block.enderio.fused_quartz_e_purple": "Lila erleuchtetes Quarzglas", + "block.enderio.fused_quartz_e_red": "Rot erleuchtetes Quarzglas", + "block.enderio.fused_quartz_e_white": "Weiß erleuchtetes Quarzglas", + "block.enderio.fused_quartz_e_yellow": "Gelb erleuchtetes Quarzglas", + "block.enderio.fused_quartz_gray": "Graues Quarzglas", + "block.enderio.fused_quartz_green": "Grünes Quarzglas", + "block.enderio.fused_quartz_light_blue": "Hellblaues Quarzglas", + "block.enderio.fused_quartz_light_gray": "Hellgraues Quarzglas", + "block.enderio.fused_quartz_lime": "Hellgrünes Quarzglas", + "block.enderio.fused_quartz_magenta": "Violettes Quarzglas", + "block.enderio.fused_quartz_orange": "Orangenes Quarzglas", + "block.enderio.fused_quartz_pink": "Pinkes Quarzglas", + "block.enderio.fused_quartz_purple": "Lilanes Quarzglas", + "block.enderio.fused_quartz_red": "Rotes Quarzglas", + "block.enderio.fused_quartz_white": "Weißes Quarzglas", + "block.enderio.fused_quartz_yellow": "Gelbes Quarzglas", + "block.enderio.hootch": "Hootch", + "block.enderio.impulse_hopper": "Impulstrichter", + "block.enderio.industrial_insulation_block": "Industrieisolierung", + "block.enderio.light": "Licht", + "block.enderio.light_inverted": "Invertiertes Licht", + "block.enderio.light_node": "Lichtknoten", + "block.enderio.liquid_sunshine": "Flüssiger Sonnenschein", + "block.enderio.nutrient_distillation": "Nährstoffdestillation", + "block.enderio.painted_crafting_table": "Bemalte Werkbank", + "block.enderio.painted_fence": "Bemalter Zaun", + "block.enderio.painted_fence_gate": "Bemaltes Zaungatter", + "block.enderio.painted_glowstone": "Bemalter Leuchtstein", + "block.enderio.painted_redstone_block": "Bemalter Redstoneblock", + "block.enderio.painted_sand": "Bemalter Sand", + "block.enderio.painted_slab": "Bemalte Stufe", + "block.enderio.painted_stairs": "Bemalte Treppe", + "block.enderio.painted_trapdoor": "Bemalte Falltüre", + "block.enderio.painted_wooden_pressure_plate": "Bemalte Holzdruckplatte", + "block.enderio.painting_machine": "Lackiergerät", + "block.enderio.powered_light": "Elektrisches Licht", + "block.enderio.powered_light_inverted": "Invertiertes elektrisches Licht", + "block.enderio.powered_light_inverted_wireless": "Invertiertes kabelloses Licht", + "block.enderio.powered_light_wireless": "Kabellos betriebenes Licht", + "block.enderio.powered_spawner": "Betriebener Spawner", + "block.enderio.pressurized_fluid_tank": "Druckbeaufschlagter Flüssigkeitsbehälter", + "block.enderio.primitive_alloy_smelter": "Primitive Legierungsschmelze", + "block.enderio.pulsating_alloy_block": "Pulsierender Legierungsblock", + "block.enderio.pulsating_photovoltaic_module": "Pulsierendes Solarmodul", + "block.enderio.redstone_alloy_block": "Redstone Legierungsblock", + "block.enderio.reinforced_obsidian_block": "Verstärker Obsidianblock", + "block.enderio.resetting_lever_five": "Zurücksetzender Schalter (5 Sekunden)", + "block.enderio.resetting_lever_five_inv": "Invertierter zurücksetzender Schalter (5 Sekunden)", + "block.enderio.resetting_lever_sixty": "Zurücksetzender Schalter (1 Minute)", + "block.enderio.resetting_lever_sixty_inv": "Invertierter zurücksetzender Schalter (1 Minute)", + "block.enderio.resetting_lever_ten": "Zurücksetzender Schalter (10 Sekunden)", + "block.enderio.resetting_lever_ten_inv": "Invertierter zurücksetzender Schalter (10 Sekunden)", + "block.enderio.resetting_lever_thirty": "Zurücksetzender Schalter (30 Sekunden)", + "block.enderio.resetting_lever_thirty_inv": "Invertierter zurücksetzender Schalter (30 Sekunden)", + "block.enderio.resetting_lever_three_hundred": "Zurücksetzender Schalter (5 Minuten)", + "block.enderio.resetting_lever_three_hundred_inv": "Invertierter zurücksetzender Schalter (5 Minuten)", + "block.enderio.rocket_fuel": "Raketentreibstoff", + "block.enderio.sag_mill": "Sägemühle", + "block.enderio.silent_acacia_pressure_plate": "Stille Akaziendruckplatte", + "block.enderio.silent_birch_pressure_plate": "Stille Birkendruckplatte", + "block.enderio.silent_crimson_pressure_plate": "Stille Karmesindruckplatte", + "block.enderio.silent_dark_oak_pressure_plate": "Stille Schwarzeichendruckplatte", + "block.enderio.silent_dark_steel_pressure_plate": "Stille Dunkelstahldruckplatte", + "block.enderio.silent_heavy_weighted_pressure_plate": "Stille Schwergewichtdruckplatte", + "block.enderio.silent_jungle_pressure_plate": "Stille Tropenholzdruckplatte", + "block.enderio.silent_light_weighted_pressure_plate": "Stille Leichtgewichtdruckplatte", + "block.enderio.silent_oak_pressure_plate": "Stille Eichenholzdruckplatte", + "block.enderio.silent_polished_blackstone_pressure_plate": "Stille Polierte Schwarzsteindruckplatte", + "block.enderio.silent_soularium_pressure_plate": "Stille Soulariumdruckplatte", + "block.enderio.silent_spruce_pressure_plate": "Stille Fichtenholzdruckplatte", + "block.enderio.silent_stone_pressure_plate": "Stille Steindruckplatte", + "block.enderio.silent_warped_pressure_plate": "Stille Wirrdruckplatte", + "block.enderio.slice_and_splice": "Slice'N'Splice", + "block.enderio.soul_binder": "Seelenbinder", + "block.enderio.soul_chain": "Seelenkette", + "block.enderio.soularium_block": "Soulariumblock", + "block.enderio.soularium_pressure_plate": "Soulariumdruckplatte", + "block.enderio.stirling_generator": "Stirling Generator", + "block.enderio.travel_anchor": "Reiseanker", + "block.enderio.vacuum_chest": "Vakuumkiste", + "block.enderio.vapor_of_levity": "Dampf der Leichtigkeit", + "block.enderio.vibrant_alloy_block": "Pulsierender Legierungsblock", + "block.enderio.vibrant_capacitor_bank": "Pulsierende Kondensatorbank", + "block.enderio.vibrant_photovoltaic_module": "Pulsierendes Fotovoltaikmodul", + "block.enderio.void_chassis": "Gehäuse der Leere", + "block.enderio.wired_charger": "Verkabeltes Ladegerät", + "block.enderio.xp_juice": "Xp Saft", + "block.enderio.xp_vacuum": "Xp Vakuum", + "enchantment.enderio.auto_smelt": "Automatisches verschmelzen", + "enchantment.enderio.auto_smelt.desc": "Verschmelzt automatisch alles Abgebautes.", + "enchantment.enderio.repellent": "Abweisend", + "enchantment.enderio.repellent.desc": "Möglichkeit Angreifer wegzuteleportieren. Höhere Level teleportiert öfters und weiter.", + "enchantment.enderio.shimmer": "Schimmern", + "enchantment.enderio.shimmer.desc": "Macht das Item schimmernd, als ob es verzaubert wäre... Das ist alles... Wirklich...", + "enchantment.enderio.soulbound": "Seelengebunden", + "enchantment.enderio.soulbound.desc": "Verhindert, dass das Item beim Tod verloren gehen. Notiz: Die meisten Grabstein-Mods sind dumm und verhindern das dies funktioniert!", + "enchantment.enderio.withering": "Austrocknung", + "enchantment.enderio.withering.desc": "Wendet den Effekt Wither auf das Ziel an.", + "enchantment.enderio.withering.type": "Gilt für Klingenwaffen, Bögen und Armbrüste.", + "enchantment.enderio.xp_boost": "Erfahrungsschub", + "enchantment.enderio.xp_boost.desc": "Zusätzliche XP von Monstern und Blöcken", + "entity.enderio.painted_sand": "Bemalter Sand", + "fluid.enderio.cloud_seed": "Wolkensamen", + "fluid.enderio.cloud_seed_concentrated": "Konzentrierter Wolkensamen", + "fluid.enderio.dew_of_the_void": "Flüssigkeit der Leere", + "fluid.enderio.fire_water": "Feuerwasser", + "fluid.enderio.hootch": "Hootch", + "fluid.enderio.liquid_sunshine": "Flüssiger Sonnenschein", + "fluid.enderio.nutrient_distillation": "Nährstoffdestillation", + "fluid.enderio.rocket_fuel": "Raketentreibstoff", + "fluid.enderio.vapor_of_levity": "Dampf der Leichtigkeit", + "fluid.enderio.xp_juice": "Xp Saft", + "gui.enderio.alloy_smelter.mode": "Schmelzmodus", + "gui.enderio.alloy_smelter.mode_all": "Legieren und Schmelzen", + "gui.enderio.alloy_smelter.mode_alloy": "Nur Legierungen", + "gui.enderio.alloy_smelter.mode_furnace": "Nur Schmelzofen", + "gui.enderio.category.alloy_smelting": "Legieren", + "gui.enderio.category.enchanter": "Verzaubern", + "gui.enderio.category.primitive_alloy_smelting": "Primitives Legierungsschmelzen", + "gui.enderio.category.sag_mill": "Sägemühle", + "gui.enderio.category.slicing": "Schneiden", + "gui.enderio.category.soul_binding": "Seelenbindung", + "gui.enderio.category.tank": "Flüssigkeitstank", + "gui.enderio.conduit.extract": "Extrahieren", + "gui.enderio.conduit.insert": "Einfügen", + "gui.enderio.conduit_channel": "Leitungskanal", + "gui.enderio.energy_equivalence": "Eine Energieeinheit, ähnlich wie FE.", + "gui.enderio.filter": "Filter", + "gui.enderio.fluid_conduit.change_fluid1": "Gesperrte Flüssigkeit:", + "gui.enderio.fluid_conduit.change_fluid2": "Klicken zum Zurücksetzten!", + "gui.enderio.fluid_conduit.change_fluid3": "Flüssigkeit: %s", + "gui.enderio.ioconfig": "I/O Konfiguration", + "gui.enderio.ioconfig.both": "Drücken / Ziehen", + "gui.enderio.ioconfig.disabled": "Deaktiviert", + "gui.enderio.ioconfig.neighbour": "Zeige/Verstecke Nachbarn", + "gui.enderio.ioconfig.none": "Nichts", + "gui.enderio.ioconfig.pull": "Ziehen", + "gui.enderio.ioconfig.push": "Drücken", + "gui.enderio.nocap.desc": "Füge irgendeinen Kondensator ein,\ndamit diese Maschine funktioniert!", + "gui.enderio.nocap.title": "Kondensator fehlt", + "gui.enderio.progress": "Fortschritt: %s%%", + "gui.enderio.range": "Reichweite", + "gui.enderio.range.hide": "Verstecke Reichweite", + "gui.enderio.range.show": "Zeige Reichweite", + "gui.enderio.redstone.active_with_signal": "Aktiv mit Signal", + "gui.enderio.redstone.active_without_signal": "Aktiv ohne Signal", + "gui.enderio.redstone.always_active": "Immer aktiv", + "gui.enderio.redstone.mode": "Redstone Modus", + "gui.enderio.redstone.never_active": "Nie aktiv", + "gui.enderio.redstone_channel": "Redstonekanal", + "gui.enderio.round_robin.disabled": "Rundlauf deaktiviert", + "gui.enderio.round_robin.enabled": "Rundlauf aktiviert", + "gui.enderio.sag_mill_chance": "Chance: %s%%", + "gui.enderio.sag_mill_chance_ball": "Chance: %s%% (modifiziert vom Schleifball)", + "gui.enderio.self_feed.disabled": "Selbstfütterung deaktiviert", + "gui.enderio.self_feed.enabled": "Selbstfütterung aktiviert", + "gui.enderio.spawner.disabled": "Deaktiviert durch Konfiguration", + "gui.enderio.spawner.other_mod": "Anderer Mod", + "gui.enderio.spawner.too_many_mob": "Zu viele Mobs", + "gui.enderio.spawner.too_many_spawner": "Zu viele Spawner", + "gui.enderio.spawner.unknown": "Unbekannter Mob", + "gui.enderio.visible.false": "Versteckt", + "gui.enderio.visible.true": "Sichtbar", + "guidebook.enderio.book_title": "Buchtitel", + "guidebook.enderio.landing_text": "Landungstext", + "hint.enderio.connected_textures.text": "Wenn du nach verbundenen Texturen auf der Kondensatorbank suchst, solltest du Athena auf deinem Client installieren", + "info.enderio.coordinate_selector.no_block": "Kein Block in der Nähe", + "info.enderio.coordinate_selector.no_paper": "Kein Papier im Inventar", + "info.enderio.darksteel.upgrade.activate": "Rechtsklick zum aktivieren", + "info.enderio.darksteel.upgrade.available": "Verfügbare Upgrades", + "info.enderio.darksteel.upgrade.cost": "Kostet %s Level", + "info.enderio.darksteel.upgrade.direct": "Direkt", + "info.enderio.darksteel.upgrade.direct.description": "Teleportiert abgebaute Gegenstände direkt in dein Inventar", + "info.enderio.darksteel.upgrade.empowered.absorption": "%s%% Schaden absorbiert von µI", + "info.enderio.darksteel.upgrade.empowered.description": "Infundieren Sie den Stahl mit der Kraft von Micro Infinity", + "info.enderio.darksteel.upgrade.empowered.efficiency": "Effizienz +%s wenn angetrieben", + "info.enderio.darksteel.upgrade.empowered.obsidian.efficiency": "Effizienz +%s wenn Obsidian abgebaut wird", + "info.enderio.darksteel.upgrade.empowered.storage": "Hält bis zu %s µI", + "info.enderio.darksteel.upgrade.empowered_l1": "Ermächtigt", + "info.enderio.darksteel.upgrade.empowered_l2": "Ermächtigt II", + "info.enderio.darksteel.upgrade.empowered_l3": "Ermächtigt III", + "info.enderio.darksteel.upgrade.empowered_l4": "Ermächtigt IV", + "info.enderio.darksteel.upgrade.explosive.description": "Lässt umliegenden Schmutz und Gestein sich austoben", + "info.enderio.darksteel.upgrade.explosive_l1": "Explosiv I", + "info.enderio.darksteel.upgrade.explosive_l2": "Explosiv II", + "info.enderio.darksteel.upgrade.explosive_penetration.description": "Lässt Schmutz und Gestein hinter dem abgebauten Block spritzen", + "info.enderio.darksteel.upgrade.explosive_penetration_l1": "Explosive Durchdringung I", + "info.enderio.darksteel.upgrade.explosive_penetration_l2": "Explosive Durchdringung II", + "info.enderio.darksteel.upgrade.fork": "Gabel", + "info.enderio.darksteel.upgrade.fork.description": "Wer braucht eine Hacke, wenn man eine Gabel hat?", + "info.enderio.darksteel.upgrade.no_xp": "Nicht genug XP", + "info.enderio.darksteel.upgrade.spoon": "Löffel", + "info.enderio.darksteel.upgrade.spoon.description": "Wer braucht eine Schaufel, wenn man einen Löffel hat?", + "info.enderio.durability.amount": "Haltbarkeit %s", + "info.enderio.energy.amount": "%s µI", + "info.enderio.headchance": "%s%% Wahrscheinlichkeit, einen Mobkopf zu bekommen", + "info.enderio.too_many_levels": "Du hast mehr als 21862 Level, das ist zu viel XP.", + "item.enderio.animal_token": "Tiermarke", + "item.enderio.basic_capacitor": "Einfache Kondensatorbank", + "item.enderio.black_paper": "Schwarzes Papier", + "item.enderio.broken_spawner": "Kaputter Spawner", + "item.enderio.cake_base": "Kuchenbasis", + "item.enderio.clayed_glowstone": "Geleihmter Leuchtstein", + "item.enderio.cloud_seed_bucket": "Eimer mit Wolkensamen", + "item.enderio.cloud_seed_concentrated_bucket": "Konzentrierter Eimer mit Wolkensamen", + "item.enderio.cold_fire_igniter": "Kaltes Feuer Zündgerät", + "item.enderio.conductive_alloy_grinding_ball": "Leitfähiger Legierungsschleifball", + "item.enderio.conductive_alloy_ingot": "Leitfähiger Legierungsbarren", + "item.enderio.conductive_alloy_nugget": "Leitfähiger Legierungsklumpen", + "item.enderio.conduit_binder": "Leitungsbindemittel", + "item.enderio.conduit_binder_composite": "Leitungsbindemittel Komposit", + "item.enderio.confusing_powder": "Verwirrendes Pulver", + "item.enderio.coordinate_selector": "Koordinatenauswahl", + "item.enderio.copper_alloy_grinding_ball": "Kupfer Legierungsschleifball", + "item.enderio.copper_alloy_ingot": "Kupfer Legierungsbarren", + "item.enderio.copper_alloy_nugget": "Kupfer Legierungsklumpen", + "item.enderio.dark_bimetal_gear": "Dunkeles Bimetall Zahnrad", + "item.enderio.dark_steel_grinding_ball": "Dunkelstahlschleifball", + "item.enderio.dark_steel_ingot": "Dunkelstahlbarren", + "item.enderio.dark_steel_nugget": "Dunkelstahlklumpen", + "item.enderio.dark_steel_sword": "Der Ender", + "item.enderio.dense_me_conduit": "Dichte ME Leitung", + "item.enderio.dew_of_the_void_bucket": "Eimer mit Tau der Leere", + "item.enderio.double_layer_capacitor": "Doppelschicht Kondensator", + "item.enderio.electromagnet": "Elektromagnet", + "item.enderio.empty_soul_vial": "Leere Seelenflasche", + "item.enderio.end_steel_grinding_ball": "Endstahlmahlkugel", + "item.enderio.end_steel_ingot": "Endstahlbarren", + "item.enderio.end_steel_nugget": "Endstahlklumpen", + "item.enderio.ender_crystal": "Enderkristall", + "item.enderio.ender_crystal_powder": "Körner des Endes", + "item.enderio.ender_fluid_conduit": "Enderflüssigkeitsleitung", + "item.enderio.ender_resonator": "Ender Resonator", + "item.enderio.enderface_conduits": "Enderface Kanäle", + "item.enderio.enderface_invpanel": "Enderface Inventartafel", + "item.enderio.enderface_items": "Enderface Items", + "item.enderio.enderface_machines": "Enderface Maschinen", + "item.enderio.enderface_materials": "Enderface Materialien", + "item.enderio.enderface_mobs": "Enderface Monster", + "item.enderio.enderface_none": "Enderface Nichts", + "item.enderio.enderios": "\"Enderios\"", + "item.enderio.energetic_alloy_grinding_ball": "Energischer Legierungsschleifball", + "item.enderio.energetic_alloy_ingot": "Energischer Legierungsbarren", + "item.enderio.energetic_alloy_nugget": "Energischer Legierungsklumpen", + "item.enderio.energized_gear": "Energisches Bimetall Zahnrad", + "item.enderio.energy_conduit": "Energieleitung", + "item.enderio.enticing_crystal": "Verlockender Kristall", + "item.enderio.experience_rod": "Erfahrungsstab", + "item.enderio.filled_soul_vial": "Gefüllte Seelenflasche", + "item.enderio.fire_water_bucket": "Eimer mit Feuerwasser", + "item.enderio.flour": "Mehl", + "item.enderio.fluid_conduit": "Flüssigkeitsleitung", + "item.enderio.frank_n_zombie": "Frank'N'Zombie", + "item.enderio.glider_wing": "Segelflügel", + "item.enderio.grains_of_infinity": "Körner der Ewigkeit", + "item.enderio.guardian_diode": "Wächter Diode", + "item.enderio.hootch_bucket": "Eimer mit Hootch", + "item.enderio.infinity_rod": "Unendlicher Stab", + "item.enderio.iron_gear": "Unendliches Bimetall Zahnrad", + "item.enderio.item_conduit": "Sachleitung", + "item.enderio.liquid_sunshine_bucket": "Eimer mit flüssigem Sonnenschein", + "item.enderio.location_printout": "Standortausdruck", + "item.enderio.loot_capacitor": "Beutekondensator", + "item.enderio.me_conduit": "ME Leitung", + "item.enderio.monster_token": "Monstermarke", + "item.enderio.nethercotta": "Höllencotta (please correct me on that one, absolute no idea)", + "item.enderio.nutrient_distillation_bucket": "Eimer mit Nährstoffdestillation", + "item.enderio.nutritious_stick": "Nahrhafter Stock", + "item.enderio.octadic_capacitor": "Oktadischer Kondensator", + "item.enderio.organic_black_dye": "Organischer schwarzer Farbstoff", + "item.enderio.organic_brown_dye": "Organischer brauner Farbstoff", + "item.enderio.organic_green_dye": "Organischer grüner Farbstoff", + "item.enderio.photovoltaic_composite": "Fotovoltaikkomposit", + "item.enderio.photovoltaic_plate": "Fotovoltaikplatte", + "item.enderio.plant_matter_brown": "Zweige und Säuberung", + "item.enderio.plant_matter_green": "Verschnitte und Abfälle", + "item.enderio.player_token": "Spielermarke", + "item.enderio.powdered_coal": "Pulverisierte Kohle", + "item.enderio.powdered_cobalt": "Pulverisierter Kobalt", + "item.enderio.powdered_copper": "Pulverisiertes Kupfer", + "item.enderio.powdered_ender_pearl": "Pulverisierte Enderperle", + "item.enderio.powdered_gold": "Pulverisiertes Gold", + "item.enderio.powdered_iron": "Pulverisiertes Eisen", + "item.enderio.powdered_lapis_lazuli": "Pulverisiertes Lapis Lazuli", + "item.enderio.powdered_obsidian": "Pulverisiertes Obsidian", + "item.enderio.powdered_quartz": "Pulverisiertes Quarz", + "item.enderio.powdered_tin": "Pulverisiertes Zinn", + "item.enderio.prescient_crystal": "Pulverisierter Kristall", + "item.enderio.prescient_powder": "Körner der Gewissheit", + "item.enderio.pressurized_fluid_conduit": "Druckbeaufschlagte Flüssigkeitsleitung", + "item.enderio.pulsating_alloy_grinding_ball": "Pulsierender Legierungsschleifball", + "item.enderio.pulsating_alloy_ingot": "Pulsierender Legierungsbarren", + "item.enderio.pulsating_alloy_nugget": "Pulsierender Legierungsklumpen", + "item.enderio.pulsating_crystal": "Pulsierender Kristall", + "item.enderio.pulsating_powder": "Körner der Piezallität", + "item.enderio.redstone_alloy_grinding_ball": "Redstone Legierungsschleifball", + "item.enderio.redstone_alloy_ingot": "Redstone Legierungsbarren", + "item.enderio.redstone_alloy_nugget": "Redstone Legierungsklumpen", + "item.enderio.redstone_conduit": "Redstone Leitung", + "item.enderio.redstone_filter_base": "Redstone Basisfilter", + "item.enderio.rocket_fuel_bucket": "Eimer mit Raketenkraftstoff", + "item.enderio.sentient_ender": "Sensibles Ender", + "item.enderio.silicon": "Silikon", + "item.enderio.skeletal_contractor": "Skelettischer Auftragnehmer", + "item.enderio.soul_powder": "Seelenstaub", + "item.enderio.soularium_grinding_ball": "Soulariumschleifball", + "item.enderio.soularium_ingot": "Soulariumbarren", + "item.enderio.soularium_nugget": "Soulariumklumpen", + "item.enderio.staff_of_levity": "Stab der Leichtigkeit", + "item.enderio.staff_of_travelling": "Stab des Reisenden", + "item.enderio.stone_gear": "Steinverbindungsgetriebe", + "item.enderio.vapor_of_levity_bucket": "Eimer mit Dampf der Leichtigkeit", + "item.enderio.vibrant_alloy_grinding_ball": "Pulsierender Legierungsschleifball", + "item.enderio.vibrant_alloy_ingot": "Pulsierender Legierungsbarren", + "item.enderio.vibrant_alloy_nugget": "Pulsierender Legierungsklumpen", + "item.enderio.vibrant_crystal": "Pulsierender Kristall", + "item.enderio.vibrant_gear": "Pulsierendes Bimetall Zahnrad", + "item.enderio.vibrant_powder": "Körner der Lebhaftigkeit", + "item.enderio.weather_crystal": "Wetterkristall", + "item.enderio.withering_powder": "Verdorrendes Pulver", + "item.enderio.wood_gear": "Holzzahnrad", + "item.enderio.xp_juice_bucket": "Xp Saft Eimer", + "item.enderio.yeta_wrench": "Yeta Schraubenschlüssel", + "item.enderio.z_logic_controller": "Z-Logic Regler", + "item.enderio.zombie_electrode": "Zombie Elektrode", + "itemGroup.enderio.blocks": "Ender IO Blöcke", + "itemGroup.enderio.conduits": "Ender IO Leitungen", + "itemGroup.enderio.gear": "Ender IO Zahnräder", + "itemGroup.enderio.machines": "Ender IO Maschinen", + "itemGroup.enderio.main": "Ender IO", + "itemGroup.enderio.souls": "Ender IO Seelen", + "jei.enderio.fire_crafting.title": "Feuerhandwerk", + "jei.enderio.fire_crafting.valid_blocks": "Gültige Blöcke:", + "jei.enderio.fire_crafting.valid_dimensions": "Gültige Dimensionen:", + "jei.enderio.grinding.consume_chance": "33% Möglichkeit zu konsumieren", + "jei.enderio.grinding.hand_grinding_coal": "Halte etwas Feuerstein in deiner Nebenhand und 3 oder mehr Kohle in deiner Haupthand, dann shift + recht klicke auf einen Obsidianblock, einen weinenden Obsidian oder einen Schleifstein, um früh, pulverisierte Kohle herzustellen.", + "jei.enderio.grinding.hand_grinding_infinity": "Halten Sie etwas Feuerstein in deiner Nebenhand und etwas Deepslate oder gepflasterten Deepslate in der Haupthand, dann shift + recht klicke auf einen Obsidianblock, einen weinenden Obsidian oder einen Schleifstein, um früh, Körner der Unendlichkeit zu erzeugen.", + "jei.enderio.grinding.title": "Schleifen", + "message.enderio.glider.disable": "Gleiten ist deaktivert: ", + "message.enderio.glider.disable.fall_flying": "Elytra Flug", + "message.enderio.grave.wrong_owner": "Dieses Grab gehört dir nicht! Du kannst es nicht öffnen.", + "message.enderio.soul_vial.error_blacklisted": "Diese Einheit wurde auf die Sperrliste gesetzt.", + "message.enderio.soul_vial.error_boss": "Netter Versuch. Bosse mögen keine Flaschen.", + "message.enderio.soul_vial.error_dead": "Einen toten Mob kann man nicht fangen!", + "message.enderio.soul_vial.error_failed": "Diese Einheit kann nicht fangen genommen werden.", + "message.enderio.soul_vial.error_player": "Man kann einen Spieler nicht in eine Flasche stecken!", + "tooltip.enderio.block.blast_resistant": "Explosionsresistent", + "tooltip.enderio.capacitor.base": "Basis Modifikator: %s", + "tooltip.enderio.capacitor.energy_capacity": "Energiespeicher Modifikator: %s", + "tooltip.enderio.capacitor.energy_use": "Energieverbrauch Modifikator: %s", + "tooltip.enderio.collision.animals_block": "Nur für Tiere undurchlässig", + "tooltip.enderio.collision.animals_pass": "Für Tiere durchlässig", + "tooltip.enderio.collision.mobs_block": "Nur solide zu Monsters", + "tooltip.enderio.collision.mobs_pass": "Nicht solide zu Monsters", + "tooltip.enderio.collision.players_block": "Nur solide zu Spieler", + "tooltip.enderio.collision.players_pass": "Nicht solide zu Spieler", + "tooltip.enderio.dark_steel_ladder.faster": "Schneller als normale Leitern", + "tooltip.enderio.fluid_tank.tank_empty_tooltip": "Leerer Tank", + "tooltip.enderio.fluid_tank.tank_tooltip": "%d/%d mb zu %s", + "tooltip.enderio.fused_quartz.blocks_light": "Blockiert Licht", + "tooltip.enderio.fused_quartz.emits_light": "Emittiert Licht", + "tooltip.enderio.grinding_ball_bonus_output": "Bonusausgabe %s%%", + "tooltip.enderio.grinding_ball_main_output": "Hauptausgabe %s%%", + "tooltip.enderio.grinding_ball_power_use": "Energieverbrauch %s%%", + "tooltip.enderio.grinding_ball_remaining": "Verbleibend: %s%%", + "tooltip.enderio.grinding_ball_title": "Sägemühle Schleifball", + "tooltip.enderio.gui.show_advanced_tooltip": "", + "tooltip.enderio.photovoltaic_cell.advanced": "Produziert Energie während dem Tageslicht", + "tooltip.enderio.photovoltaic_cell.advanced2": "Muss eine freie Sicht zum Himmel haben", + "tooltip.enderio.photovoltaic_cell.advanced3": "Maximale Ausgabe: ", + "tooltip.enderio.photovoltaic_cell.main": "Solarenergie!", + "tooltip.enderio.soul_vial.health": "Leben: %s/%s" +} \ No newline at end of file From 0ccb961a97170c2360f9a3a6ddf9bd03cf939479 Mon Sep 17 00:00:00 2001 From: Reece Mackie <20544390+Rover656@users.noreply.github.com> Date: Sat, 19 Aug 2023 00:45:16 +0100 Subject: [PATCH 125/154] New translations en_us.json (Greek) --- .../resources/assets/enderio/lang/el_gr.json | 495 ++++++++++++++++++ 1 file changed, 495 insertions(+) create mode 100644 src/main/resources/assets/enderio/lang/el_gr.json diff --git a/src/main/resources/assets/enderio/lang/el_gr.json b/src/main/resources/assets/enderio/lang/el_gr.json new file mode 100644 index 0000000000..432de6afba --- /dev/null +++ b/src/main/resources/assets/enderio/lang/el_gr.json @@ -0,0 +1,495 @@ +{ + "advancements.enderio.place_capacitor_bank.description": "Φτιάξε μια κυψέλη πυκνωτών", + "advancements.enderio.place_capacitor_bank.title": "Πολυδομική Αποθήκευσης Ενέργειας", + "advancements.enderio.rich.description": "Κανε τους άλλους να νομίζουν πως είσαι πλούσιος", + "advancements.enderio.rich.title": "Μην το πεις πουθενά!", + "advancements.enderio.richer.description": "Κανε τους άλλους να νομίζουν πως είσαι ΠΙΟ πλούσιος", + "advancements.enderio.richer.title": "Είναι πραγματικό;", + "advancements.enderio.use_glider.description": "Στα αλήθεια εμπιστεύεσαι αυτό το δέρμα;", + "advancements.enderio.use_glider.title": "Mεγαλοπρεπής!", + "block.enderio.advanced_capacitor_bank": "Εξελιγμένη τράπεζα πυκνωτών", + "block.enderio.alloy_smelter": "Φούρνος μεταλλουργίας", + "block.enderio.basic_capacitor_bank": "Βασική τράπεζα πυκνωτών", + "block.enderio.clear_glass": "Καθαρό γυαλί", + "block.enderio.clear_glass_black": "Μαύρο καθαρό γυαλί", + "block.enderio.clear_glass_blue": "Μπλε καθαρό γυαλί", + "block.enderio.clear_glass_brown": "Καφέ καθαρό γυαλί", + "block.enderio.clear_glass_cyan": "Γαλαζοπράσινο καθαρό γυαλί", + "block.enderio.clear_glass_d": "Σκοτεινό καθαρό γυαλί", + "block.enderio.clear_glass_d_black": "Σκούρο μαύρο καθαρό γυαλί", + "block.enderio.clear_glass_d_blue": "Σκούρο μπλε καθαρό γυαλί", + "block.enderio.clear_glass_d_brown": "Σκούρο καφέ καθαρό γυαλί", + "block.enderio.clear_glass_d_cyan": "Σκούρο γαλαζοπράσινο καθαρό γυαλί", + "block.enderio.clear_glass_d_gray": "Σκούρο γκρίζο καθαρό γυαλί", + "block.enderio.clear_glass_d_green": "Σκούρο πράσινο καθαρό γυαλί", + "block.enderio.clear_glass_d_light_blue": "Σκούρο Γαλάζιο καθαρό γυαλί", + "block.enderio.clear_glass_d_light_gray": "Ελαφρά γκρίζο σκούρο καθαρό γυαλί", + "block.enderio.clear_glass_d_lime": "Σκούρο κιτρινοπράσινο καθαρό γυαλί", + "block.enderio.clear_glass_d_magenta": "Σκούρο φούξια καθαρό γυαλί", + "block.enderio.clear_glass_d_orange": "Σκούρο πορτοκαλί καθαρό γυαλί", + "block.enderio.clear_glass_d_pink": "Σκούρο ροζ καθαρό γυαλί", + "block.enderio.clear_glass_d_purple": "Σκούρο μωβ καθαρό γυαλί", + "block.enderio.clear_glass_d_red": "Σκούρο κόκκινο καθαρό γυαλί", + "block.enderio.clear_glass_d_white": "Σκούρο άσπρο καθαρό γυαλί", + "block.enderio.clear_glass_d_yellow": "Σκούρο κίτρινο καθαρό γυαλί", + "block.enderio.clear_glass_e": "Φωτισμένο καθαρό γυαλί", + "block.enderio.clear_glass_e_black": "Μαύρο φωτισμένο καθαρό γυαλί", + "block.enderio.clear_glass_e_blue": "Μπλε φωτισμένο καθαρό γυαλί", + "block.enderio.clear_glass_e_brown": "Καφέ φωτισμένο καθαρό γυαλί", + "block.enderio.clear_glass_e_cyan": "Γαλαζοπράσινο φωτισμένο καθαρό γυαλί", + "block.enderio.clear_glass_e_gray": "Γκρίζο φωτισμένο καθαρό γυαλί", + "block.enderio.clear_glass_e_green": "Πράσινο φωτισμένο καθαρό γυαλί", + "block.enderio.clear_glass_e_light_blue": "Γαλάζιο φωτισμένο καθαρό γυαλί", + "block.enderio.clear_glass_e_light_gray": "Ανοιχτό γκρι φωτισμένο καθαρό γυαλί", + "block.enderio.clear_glass_e_lime": "Κιτρινοπράσινο φωτισμένο καθαρό γυαλί", + "block.enderio.clear_glass_e_magenta": "Φούξια φωτισμένο καθαρό γυαλί", + "block.enderio.clear_glass_e_orange": "Πορτοκαλί φωτισμένο καθαρό γυαλί", + "block.enderio.clear_glass_e_pink": "Ροζ φωτισμένο καθαρό γυαλί", + "block.enderio.clear_glass_e_purple": "Μωβ φωτισμένο καθαρό γυαλί", + "block.enderio.clear_glass_e_red": "Κόκκινο φωτισμένο καθαρό γυαλί", + "block.enderio.clear_glass_e_white": "Άσπρο φωτισμένο καθαρό γυαλί", + "block.enderio.clear_glass_e_yellow": "Κίτρινο φωτισμένο καθαρό γυαλί", + "block.enderio.clear_glass_gray": "Γκρίζο καθαρό γυαλί", + "block.enderio.clear_glass_green": "Πράσινο καθαρό γυαλί", + "block.enderio.clear_glass_light_blue": "Γαλάζιο καθαρό γυαλί", + "block.enderio.clear_glass_light_gray": "Ανοιχτό γκρι καθαρό γυαλί", + "block.enderio.clear_glass_lime": "Κιτρινοπράσινο καθαρό γυαλί", + "block.enderio.clear_glass_magenta": "Φούξια καθαρό γυαλί", + "block.enderio.clear_glass_orange": "Πορτοκαλί καθαρό γυαλί", + "block.enderio.clear_glass_pink": "Ροζ καθαρό γυαλί", + "block.enderio.clear_glass_purple": "Μωβ καθαρό γυαλί", + "block.enderio.clear_glass_red": "Κόκκινο καθαρό γυαλί", + "block.enderio.clear_glass_white": "Άσπρο καθαρό γυαλί", + "block.enderio.clear_glass_yellow": "Κίτρινο καθαρό γυαλί", + "block.enderio.cloud_seed": "Σπόρος συννεφιάς", + "block.enderio.cloud_seed_concentrated": "Συμπυκνωμένος σπόρος συννεφιάς", + "block.enderio.cold_fire": "Κρύα φωτιά", + "block.enderio.conductive_alloy_block": "Αγώγιμος κύβος κράματος", + "block.enderio.conduit": "Αγωγός μεταφοράς", + "block.enderio.copper_alloy_block": "Κύβος χάλκινου κράματος", + "block.enderio.crafter": "Κατασκευαστής", + "block.enderio.creative_power": "Δημιουργική ενέργεια", + "block.enderio.dark_steel_bars": "Μπάρες μαύρου ατσαλιού", + "block.enderio.dark_steel_block": "Κύβος μαύρου ατσαλιού", + "block.enderio.dark_steel_door": "Πόρτα μαύρου ατσαλιού", + "block.enderio.dark_steel_ladder": "Dark Steel Ladder", + "block.enderio.dark_steel_pressure_plate": "Dark Steel Pressure Plate", + "block.enderio.dark_steel_trapdoor": "Dark Steel Trapdoor", + "block.enderio.dew_of_the_void": "Dew Of The Void", + "block.enderio.enchanter": "Enchanter", + "block.enderio.end_steel_bars": "End Steel Bars", + "block.enderio.end_steel_block": "End Steel Block", + "block.enderio.enderman_head": "Enderman Head", + "block.enderio.energetic_alloy_block": "Energetic Alloy Block", + "block.enderio.energetic_photovoltaic_module": "Energetic Photovoltaic Module", + "block.enderio.ensouled_chassis": "Ensouled Chassis", + "block.enderio.fire_water": "Fire Water", + "block.enderio.fluid_tank": "Fluid Tank", + "block.enderio.fused_quartz": "Fused Quartz", + "block.enderio.fused_quartz_black": "Black Fused Quartz", + "block.enderio.fused_quartz_blue": "Blue Fused Quartz", + "block.enderio.fused_quartz_brown": "Brown Fused Quartz", + "block.enderio.fused_quartz_cyan": "Cyan Fused Quartz", + "block.enderio.fused_quartz_d": "Dark Fused Quartz", + "block.enderio.fused_quartz_d_black": "Black Dark Fused Quartz", + "block.enderio.fused_quartz_d_blue": "Blue Dark Fused Quartz", + "block.enderio.fused_quartz_d_brown": "Brown Dark Fused Quartz", + "block.enderio.fused_quartz_d_cyan": "Cyan Dark Fused Quartz", + "block.enderio.fused_quartz_d_gray": "Gray Dark Fused Quartz", + "block.enderio.fused_quartz_d_green": "Green Dark Fused Quartz", + "block.enderio.fused_quartz_d_light_blue": "Light Blue Dark Fused Quartz", + "block.enderio.fused_quartz_d_light_gray": "Light Gray Dark Fused Quartz", + "block.enderio.fused_quartz_d_lime": "Lime Dark Fused Quartz", + "block.enderio.fused_quartz_d_magenta": "Magenta Dark Fused Quartz", + "block.enderio.fused_quartz_d_orange": "Orange Dark Fused Quartz", + "block.enderio.fused_quartz_d_pink": "Pink Dark Fused Quartz", + "block.enderio.fused_quartz_d_purple": "Purple Dark Fused Quartz", + "block.enderio.fused_quartz_d_red": "Red Dark Fused Quartz", + "block.enderio.fused_quartz_d_white": "White Dark Fused Quartz", + "block.enderio.fused_quartz_d_yellow": "Yellow Dark Fused Quartz", + "block.enderio.fused_quartz_e": "Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_black": "Black Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_blue": "Blue Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_brown": "Brown Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_cyan": "Cyan Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_gray": "Gray Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_green": "Green Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_light_blue": "Light Blue Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_light_gray": "Light Gray Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_lime": "Lime Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_magenta": "Magenta Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_orange": "Orange Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_pink": "Pink Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_purple": "Purple Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_red": "Red Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_white": "Άσπρος φωτιζόμενος συνενωμένος χαλαζίας", + "block.enderio.fused_quartz_e_yellow": "Κίτρινος φωτιζόμενος συνενωμένος χαλαζίας", + "block.enderio.fused_quartz_gray": "Γκρίζος συνενωμένος χαλαζίας", + "block.enderio.fused_quartz_green": "Πράσινος συνενωμένος χαλαζίας", + "block.enderio.fused_quartz_light_blue": "Γαλάζιος συνενωμένος χαλαζίας", + "block.enderio.fused_quartz_light_gray": "Ανοιχτός γκρίζος συνενωμένος χαλαζίας", + "block.enderio.fused_quartz_lime": "Κιτρινοπράσινος συνενωμένος χαλαζίας", + "block.enderio.fused_quartz_magenta": "Φούξια συνενωμένος χαλαζίας", + "block.enderio.fused_quartz_orange": "Πορτοκαλένιος συνενωμένος χαλαζίας", + "block.enderio.fused_quartz_pink": "Ροζ συνενωμένος χαλαζίας", + "block.enderio.fused_quartz_purple": "Μωβ συνενωμένος χαλαζίας", + "block.enderio.fused_quartz_red": "Κόκκινος συνενωμένος χαλαζίας", + "block.enderio.fused_quartz_white": "Άσπρος συνενωμένος χαλαζίας", + "block.enderio.fused_quartz_yellow": "Κίτρινος συνενωμένος χαλαζίας", + "block.enderio.hootch": "Αποσταγμένο αλκοόλ", + "block.enderio.impulse_hopper": "Εξειδικευμένο χωνί", + "block.enderio.industrial_insulation_block": "Βιομηχανική μόνωση", + "block.enderio.light": "Φως", + "block.enderio.light_inverted": "Αντίστροφο φως", + "block.enderio.light_node": "Πηγή φωτός", + "block.enderio.liquid_sunshine": "Υγρό ηλιαχτίδας", + "block.enderio.nutrient_distillation": "Απόσταξη ουσιών", + "block.enderio.painted_crafting_table": "Βαμμένο τραπέζι κατασκευών", + "block.enderio.painted_fence": "Βαμμένος φράκτης", + "block.enderio.painted_fence_gate": "Βαμμένη πόρτα φράκτη", + "block.enderio.painted_glowstone": "Βαμμένη φωτόπετρα", + "block.enderio.painted_redstone_block": "Βαμμένος κύβος κοκκινόπετρας", + "block.enderio.painted_sand": "Βαμμένη άμμος", + "block.enderio.painted_slab": "Βαμμένη πλάκα", + "block.enderio.painted_stairs": "Βαμμένα σκαλοπάτια", + "block.enderio.painted_trapdoor": "Βαμμένη καταπακτή", + "block.enderio.painted_wooden_pressure_plate": "Βαμμένη ξύλινη πλάκα πίεσης", + "block.enderio.painting_machine": "Μηχανή βαψίματος", + "block.enderio.powered_light": "Τροφοδοτούμενο φως", + "block.enderio.powered_light_inverted": "Τροφοδοτούμενο αντίστροφο φως", + "block.enderio.powered_light_inverted_wireless": "Ασύρματο τροφοδοτούμενο αντίστροφο φως", + "block.enderio.powered_light_wireless": "Ασύρματο τροφοδοτούμενο φως", + "block.enderio.powered_spawner": "Τροφοδοτούμενος γεννητής", + "block.enderio.pressurized_fluid_tank": "Πεπιεσμένη δεξαμενή υγρών", + "block.enderio.primitive_alloy_smelter": "Πρωτόγονο μεταλλουργείο κραμάτων", + "block.enderio.pulsating_alloy_block": "Παλλόμενος κύβος κράματος", + "block.enderio.pulsating_photovoltaic_module": "Παλλόμενο τμήμα φωτοβολταϊκού", + "block.enderio.redstone_alloy_block": "Κύβος κράματος κοκκινόπετρας", + "block.enderio.reinforced_obsidian_block": "Ενισχυμένος κύβος οψιδιανού", + "block.enderio.resetting_lever_five": "Επαναρυθµιζόμενος μοχλός (5 δευτερόλεπτα)", + "block.enderio.resetting_lever_five_inv": "Επαναρυθµιζόμενος αντίστροφος μοχλός (5 δευτερόλεπτα)", + "block.enderio.resetting_lever_sixty": "Επαναρυθµιζόμενος μοχλός (1 λεπτό)", + "block.enderio.resetting_lever_sixty_inv": "Επαναρυθµιζόμενος αντίστροφος μοχλός (1 λεπτό)", + "block.enderio.resetting_lever_ten": "Επαναρυθµιζόμενος μοχλός (10 δευτερόλεπτα)", + "block.enderio.resetting_lever_ten_inv": "Επαναρυθµιζόμενος αντίστροφος μοχλός (10 δευτερόλεπτα)", + "block.enderio.resetting_lever_thirty": "Resetting Lever (30 seconds)", + "block.enderio.resetting_lever_thirty_inv": "Resetting Lever Inverted (30 seconds)", + "block.enderio.resetting_lever_three_hundred": "Resetting Lever (5 minutes)", + "block.enderio.resetting_lever_three_hundred_inv": "Resetting Lever Inverted (5 minutes)", + "block.enderio.rocket_fuel": "Rocket Fuel", + "block.enderio.sag_mill": "SAG Mill", + "block.enderio.silent_acacia_pressure_plate": "Silent Acacia Pressure Plate", + "block.enderio.silent_birch_pressure_plate": "Silent Birch Pressure Plate", + "block.enderio.silent_crimson_pressure_plate": "Silent Crimson Pressure Plate", + "block.enderio.silent_dark_oak_pressure_plate": "Silent Dark Oak Pressure Plate", + "block.enderio.silent_dark_steel_pressure_plate": "Silent Dark Steel Pressure Plate", + "block.enderio.silent_heavy_weighted_pressure_plate": "Silent Heavy Weighted Pressure Plate", + "block.enderio.silent_jungle_pressure_plate": "Silent Jungle Pressure Plate", + "block.enderio.silent_light_weighted_pressure_plate": "Silent Light Weighted Pressure Plate", + "block.enderio.silent_oak_pressure_plate": "Silent Oak Pressure Plate", + "block.enderio.silent_polished_blackstone_pressure_plate": "Silent Polished Blackstone Pressure Plate", + "block.enderio.silent_soularium_pressure_plate": "Silent Soularium Pressure Plate", + "block.enderio.silent_spruce_pressure_plate": "Silent Spruce Pressure Plate", + "block.enderio.silent_stone_pressure_plate": "Silent Stone Pressure Plate", + "block.enderio.silent_warped_pressure_plate": "Silent Warped Pressure Plate", + "block.enderio.slice_and_splice": "Slice'N'Splice", + "block.enderio.soul_binder": "Soul Binder", + "block.enderio.soul_chain": "Soul Chain", + "block.enderio.soularium_block": "Soularium Block", + "block.enderio.soularium_pressure_plate": "Soularium Pressure Plate", + "block.enderio.stirling_generator": "Stirling Generator", + "block.enderio.travel_anchor": "Travel Anchor", + "block.enderio.vacuum_chest": "Vacuum Chest", + "block.enderio.vapor_of_levity": "Vapor Of Levity", + "block.enderio.vibrant_alloy_block": "Vibrant Alloy Block", + "block.enderio.vibrant_capacitor_bank": "Vibrant Capacitor Bank", + "block.enderio.vibrant_photovoltaic_module": "Vibrant Photovoltaic Module", + "block.enderio.void_chassis": "Void Chassis", + "block.enderio.wired_charger": "Wired Charger", + "block.enderio.xp_juice": "Xp Juice", + "block.enderio.xp_vacuum": "Xp Vacuum", + "enchantment.enderio.auto_smelt": "Auto Smelt", + "enchantment.enderio.auto_smelt.desc": "Automatically smelts whatever is mined.", + "enchantment.enderio.repellent": "Repellent", + "enchantment.enderio.repellent.desc": "Chance to teleport attackers away. Higher levels teleport more often and farther.", + "enchantment.enderio.shimmer": "Shimmer", + "enchantment.enderio.shimmer.desc": "Makes the item shimmer as if it was enchanted... That's all... Really...", + "enchantment.enderio.soulbound": "Soulbound", + "enchantment.enderio.soulbound.desc": "Prevents item from being lost on death. Note: Most gravestone mods are stupid and prevent this from working!", + "enchantment.enderio.withering": "Withering", + "enchantment.enderio.withering.desc": "Applies wither to the target.", + "enchantment.enderio.withering.type": "Applies to bladed weapons, bows and crossbows.", + "enchantment.enderio.xp_boost": "XP Boost", + "enchantment.enderio.xp_boost.desc": "Extra XP from mobs and blocks", + "entity.enderio.painted_sand": "Painted Sand", + "fluid.enderio.cloud_seed": "Σπόρος συννεφιάς", + "fluid.enderio.cloud_seed_concentrated": "Συμπυκνωμένος σπόρος συννεφιάς", + "fluid.enderio.dew_of_the_void": "Υγρό του Κενού", + "fluid.enderio.fire_water": "Φλεγόμενο νερό", + "fluid.enderio.hootch": "Αποσταγμένο αλκοόλ", + "fluid.enderio.liquid_sunshine": "Υγρό ηλιαχτίδας", + "fluid.enderio.nutrient_distillation": "Απόσταξη ουσιών", + "fluid.enderio.rocket_fuel": "Καύσιμο πυραύλου", + "fluid.enderio.vapor_of_levity": "Ατμός της ελαφρότητας", + "fluid.enderio.xp_juice": "Χυμός εμπειρίας", + "gui.enderio.alloy_smelter.mode": "Λειτουργία ψησίματος", + "gui.enderio.alloy_smelter.mode_all": "Λιώσιμο και ψήσιμο", + "gui.enderio.alloy_smelter.mode_alloy": "Κράματα Μόνο", + "gui.enderio.alloy_smelter.mode_furnace": "Καμίνι Μόνο", + "gui.enderio.category.alloy_smelting": "Ψήσιμο κραμάτων", + "gui.enderio.category.enchanter": "Μάγεμα", + "gui.enderio.category.primitive_alloy_smelting": "Πρωτόγονο ψήσιμο κραμάτων", + "gui.enderio.category.sag_mill": "Μύλος", + "gui.enderio.category.slicing": "Τεμάχισμα", + "gui.enderio.category.soul_binding": "Δέσμευμα ψυχής", + "gui.enderio.category.tank": "Δεξαμενή υγρών", + "gui.enderio.conduit.extract": "Εξαγωγή", + "gui.enderio.conduit.insert": "Εισαγωγή", + "gui.enderio.conduit_channel": "Κανάλι καλωδίου", + "gui.enderio.energy_equivalence": "Μια μονάδα ενέργειας, παρόμοια με FE.", + "gui.enderio.filter": "Φίλτρο", + "gui.enderio.fluid_conduit.change_fluid1": "Κλειδωμένο υγρό:", + "gui.enderio.fluid_conduit.change_fluid2": "Πατήστε για επαναφορά!", + "gui.enderio.fluid_conduit.change_fluid3": "Υγρό: %s", + "gui.enderio.ioconfig": "Ρυθμίσεις Εισοδου/Εξοδου", + "gui.enderio.ioconfig.both": "Εξαγωγή και Εισαγωγή", + "gui.enderio.ioconfig.disabled": "Απενεργοποιημένο", + "gui.enderio.ioconfig.neighbour": "Εμφάνισε/κρύψε Γειτονικά αντικείμενά", + "gui.enderio.ioconfig.none": "Τίποτα", + "gui.enderio.ioconfig.pull": "Εισαγωγή", + "gui.enderio.ioconfig.push": "Εξαγωγή", + "gui.enderio.nocap.desc": "Τοποθετήστε έναν πυκνωτή για να ξεκινήσει το μηχάνημά!", + "gui.enderio.nocap.title": "Ο πυκνωτής λείπει", + "gui.enderio.progress": "Πρόοδος %s%%", + "gui.enderio.range": "Εμβέλεια", + "gui.enderio.range.hide": "Απόκρυψή εμβέλειας", + "gui.enderio.range.show": "Εμφάνισή εμβέλειας", + "gui.enderio.redstone.active_with_signal": "Ενεργό με σήμα", + "gui.enderio.redstone.active_without_signal": "Ενεργό χωρίς σήμα", + "gui.enderio.redstone.always_active": "Πάντα ενεργό", + "gui.enderio.redstone.mode": "Λειτουργία σήματος από κοκκινόπετρα", + "gui.enderio.redstone.never_active": "Ποτέ ενεργό", + "gui.enderio.redstone_channel": "Κανάλι κοκκινόπετρας", + "gui.enderio.round_robin.disabled": "Πέρασμά από παντού απενεργοποιημένο", + "gui.enderio.round_robin.enabled": "Πέρασμά από παντού ενεργοποιημένο", + "gui.enderio.sag_mill_chance": "Chance: %s%%", + "gui.enderio.sag_mill_chance_ball": "Chance: %s%% (modified by grinding ball)", + "gui.enderio.self_feed.disabled": "Self Feed Disabled", + "gui.enderio.self_feed.enabled": "Self Feed Enabled", + "gui.enderio.spawner.disabled": "Disabled by config", + "gui.enderio.spawner.other_mod": "Other mod", + "gui.enderio.spawner.too_many_mob": "Too many mobs", + "gui.enderio.spawner.too_many_spawner": "Too many spawners", + "gui.enderio.spawner.unknown": "Unknown mob", + "gui.enderio.visible.false": "Hidden", + "gui.enderio.visible.true": "Visible", + "guidebook.enderio.book_title": "Book Title", + "guidebook.enderio.landing_text": "Landing Text", + "hint.enderio.connected_textures.text": "If you are looking for connected textures on the capacitor bank, you might want to install Athena on your client", + "info.enderio.coordinate_selector.no_block": "No block in range", + "info.enderio.coordinate_selector.no_paper": "No paper in inventory", + "info.enderio.darksteel.upgrade.activate": "Right Click to Activate", + "info.enderio.darksteel.upgrade.available": "Available Upgrades", + "info.enderio.darksteel.upgrade.cost": "Costs %s Levels", + "info.enderio.darksteel.upgrade.direct": "Direct", + "info.enderio.darksteel.upgrade.direct.description": "Teleports harvested items directly into your inventory", + "info.enderio.darksteel.upgrade.empowered.absorption": "%s%% damage absorbed by µI", + "info.enderio.darksteel.upgrade.empowered.description": "Infuse the steel with the power of Micro Infinity", + "info.enderio.darksteel.upgrade.empowered.efficiency": "Efficiency +%s when powered", + "info.enderio.darksteel.upgrade.empowered.obsidian.efficiency": "Efficiency +%s when breaking obsidian", + "info.enderio.darksteel.upgrade.empowered.storage": "Holds up to %s µI", + "info.enderio.darksteel.upgrade.empowered_l1": "Empowered", + "info.enderio.darksteel.upgrade.empowered_l2": "Empowered II", + "info.enderio.darksteel.upgrade.empowered_l3": "Empowered III", + "info.enderio.darksteel.upgrade.empowered_l4": "Empowered IV", + "info.enderio.darksteel.upgrade.explosive.description": "Makes surrounding dirt and rock go splodey", + "info.enderio.darksteel.upgrade.explosive_l1": "Explosive I", + "info.enderio.darksteel.upgrade.explosive_l2": "Explosive II", + "info.enderio.darksteel.upgrade.explosive_penetration.description": "Makes dirt and rock behind the mined block go splodey", + "info.enderio.darksteel.upgrade.explosive_penetration_l1": "Explosive Penetration I", + "info.enderio.darksteel.upgrade.explosive_penetration_l2": "Explosive Penetration II", + "info.enderio.darksteel.upgrade.fork": "Fork", + "info.enderio.darksteel.upgrade.fork.description": "Who needs a hoe when you have a fork?", + "info.enderio.darksteel.upgrade.no_xp": "Not enough XP", + "info.enderio.darksteel.upgrade.spoon": "Spoon", + "info.enderio.darksteel.upgrade.spoon.description": "Who needs a shovel when you have a spoon?", + "info.enderio.durability.amount": "Durability %s", + "info.enderio.energy.amount": "%s µI", + "info.enderio.headchance": "%s%% chance to drop a mob head", + "info.enderio.too_many_levels": "You have more than 21862 levels, that's too much XP.", + "item.enderio.animal_token": "Animal Token", + "item.enderio.basic_capacitor": "Basic Capacitor", + "item.enderio.black_paper": "Black Paper", + "item.enderio.broken_spawner": "Broken Spawner", + "item.enderio.cake_base": "Cake Base", + "item.enderio.clayed_glowstone": "Clayed Glowstone", + "item.enderio.cloud_seed_bucket": "Cloud Seed Bucket", + "item.enderio.cloud_seed_concentrated_bucket": "Cloud Seed Concentrated Bucket", + "item.enderio.cold_fire_igniter": "Cold Fire Igniter", + "item.enderio.conductive_alloy_grinding_ball": "Conductive Alloy Grinding Ball", + "item.enderio.conductive_alloy_ingot": "Conductive Alloy Ingot", + "item.enderio.conductive_alloy_nugget": "Conductive Alloy Nugget", + "item.enderio.conduit_binder": "Conduit Binder", + "item.enderio.conduit_binder_composite": "Conduit Binder Composite", + "item.enderio.confusing_powder": "Confusing Powder", + "item.enderio.coordinate_selector": "Coordinate Selector", + "item.enderio.copper_alloy_grinding_ball": "Copper Alloy Grinding Ball", + "item.enderio.copper_alloy_ingot": "Copper Alloy Ingot", + "item.enderio.copper_alloy_nugget": "Copper Alloy Nugget", + "item.enderio.dark_bimetal_gear": "Dark Bimetal Gear", + "item.enderio.dark_steel_grinding_ball": "Dark Steel Grinding Ball", + "item.enderio.dark_steel_ingot": "Dark Steel Ingot", + "item.enderio.dark_steel_nugget": "Dark Steel Nugget", + "item.enderio.dark_steel_sword": "The Ender", + "item.enderio.dense_me_conduit": "Dense ME Conduit", + "item.enderio.dew_of_the_void_bucket": "Dew Of The Void Bucket", + "item.enderio.double_layer_capacitor": "Double Layer Capacitor", + "item.enderio.electromagnet": "Electromagnet", + "item.enderio.empty_soul_vial": "Empty Soul Vial", + "item.enderio.end_steel_grinding_ball": "End Steel Grinding Ball", + "item.enderio.end_steel_ingot": "End Steel Ingot", + "item.enderio.end_steel_nugget": "End Steel Nugget", + "item.enderio.ender_crystal": "Ender Crystal", + "item.enderio.ender_crystal_powder": "Grains of the End", + "item.enderio.ender_fluid_conduit": "Ender Fluid Conduit", + "item.enderio.ender_resonator": "Ender Resonator", + "item.enderio.enderface_conduits": "Enderface Conduits", + "item.enderio.enderface_invpanel": "Enderface Invpanel", + "item.enderio.enderface_items": "Enderface Items", + "item.enderio.enderface_machines": "Enderface Machines", + "item.enderio.enderface_materials": "Enderface Materials", + "item.enderio.enderface_mobs": "Enderface Mobs", + "item.enderio.enderface_none": "Enderface None", + "item.enderio.enderios": "\"Enderios\"", + "item.enderio.energetic_alloy_grinding_ball": "Energetic Alloy Grinding Ball", + "item.enderio.energetic_alloy_ingot": "Energetic Alloy Ingot", + "item.enderio.energetic_alloy_nugget": "Energetic Alloy Nugget", + "item.enderio.energized_gear": "Energized Bimetal Gear", + "item.enderio.energy_conduit": "Energy Conduit", + "item.enderio.enticing_crystal": "Enticing Crystal", + "item.enderio.experience_rod": "Experience Rod", + "item.enderio.filled_soul_vial": "Filled Soul Vial", + "item.enderio.fire_water_bucket": "Fire Water Bucket", + "item.enderio.flour": "Flour", + "item.enderio.fluid_conduit": "Fluid Conduit", + "item.enderio.frank_n_zombie": "Frank'N'Zombie", + "item.enderio.glider_wing": "Glider Wing", + "item.enderio.grains_of_infinity": "Grains of Infinity", + "item.enderio.guardian_diode": "Guardian Diode", + "item.enderio.hootch_bucket": "Hootch Bucket", + "item.enderio.infinity_rod": "Infinity Rod", + "item.enderio.iron_gear": "Infinity Bimetal Gear", + "item.enderio.item_conduit": "Item Conduit", + "item.enderio.liquid_sunshine_bucket": "Liquid Sunshine Bucket", + "item.enderio.location_printout": "Location Printout", + "item.enderio.loot_capacitor": "Loot Capacitor", + "item.enderio.me_conduit": "ME Conduit", + "item.enderio.monster_token": "Monster Token", + "item.enderio.nethercotta": "Nethercotta", + "item.enderio.nutrient_distillation_bucket": "Nutrient Distillation Bucket", + "item.enderio.nutritious_stick": "Nutritious Stick", + "item.enderio.octadic_capacitor": "Octadic Capacitor", + "item.enderio.organic_black_dye": "Organic Black Dye", + "item.enderio.organic_brown_dye": "Organic Brown Dye", + "item.enderio.organic_green_dye": "Organic Green Dye", + "item.enderio.photovoltaic_composite": "Photovoltaic Composite", + "item.enderio.photovoltaic_plate": "Photovoltaic Plate", + "item.enderio.plant_matter_brown": "Twigs and Prunings", + "item.enderio.plant_matter_green": "Clippings and Trimmings", + "item.enderio.player_token": "Player Token", + "item.enderio.powdered_coal": "Powdered Coal", + "item.enderio.powdered_cobalt": "Powdered Cobalt", + "item.enderio.powdered_copper": "Powdered Copper", + "item.enderio.powdered_ender_pearl": "Powdered Ender Pearl", + "item.enderio.powdered_gold": "Powdered Gold", + "item.enderio.powdered_iron": "Powdered Iron", + "item.enderio.powdered_lapis_lazuli": "Powdered Lapis Lazuli", + "item.enderio.powdered_obsidian": "Powdered Obsidian", + "item.enderio.powdered_quartz": "Powdered Quartz", + "item.enderio.powdered_tin": "Powdered Tin", + "item.enderio.prescient_crystal": "Prescient Crystal", + "item.enderio.prescient_powder": "Grains of Prescience", + "item.enderio.pressurized_fluid_conduit": "Pressurized Fluid Conduit", + "item.enderio.pulsating_alloy_grinding_ball": "Pulsating Alloy Grinding Ball", + "item.enderio.pulsating_alloy_ingot": "Pulsating Alloy Ingot", + "item.enderio.pulsating_alloy_nugget": "Pulsating Alloy Nugget", + "item.enderio.pulsating_crystal": "Pulsating Crystal", + "item.enderio.pulsating_powder": "Grains of Piezallity", + "item.enderio.redstone_alloy_grinding_ball": "Redstone Alloy Grinding Ball", + "item.enderio.redstone_alloy_ingot": "Redstone Alloy Ingot", + "item.enderio.redstone_alloy_nugget": "Redstone Alloy Nugget", + "item.enderio.redstone_conduit": "Redstone Conduit", + "item.enderio.redstone_filter_base": "Redstone Filter Base", + "item.enderio.rocket_fuel_bucket": "Rocket Fuel Bucket", + "item.enderio.sentient_ender": "Sentient Ender", + "item.enderio.silicon": "Silicon", + "item.enderio.skeletal_contractor": "Skeletal Contractor", + "item.enderio.soul_powder": "Soul Powder", + "item.enderio.soularium_grinding_ball": "Soularium Grinding Ball", + "item.enderio.soularium_ingot": "Soularium Ingot", + "item.enderio.soularium_nugget": "Soularium Nugget", + "item.enderio.staff_of_levity": "Staff Of Levity", + "item.enderio.staff_of_travelling": "Staff Of Travelling", + "item.enderio.stone_gear": "Stone Compound Gear", + "item.enderio.vapor_of_levity_bucket": "Vapor Of Levity Bucket", + "item.enderio.vibrant_alloy_grinding_ball": "Vibrant Alloy Grinding Ball", + "item.enderio.vibrant_alloy_ingot": "Vibrant Alloy Ingot", + "item.enderio.vibrant_alloy_nugget": "Vibrant Alloy Nugget", + "item.enderio.vibrant_crystal": "Vibrant Crystal", + "item.enderio.vibrant_gear": "Vibrant Bimetal Gear", + "item.enderio.vibrant_powder": "Grains of Vibrancy", + "item.enderio.weather_crystal": "Weather Crystal", + "item.enderio.withering_powder": "Withering Powder", + "item.enderio.wood_gear": "Wooden Gear", + "item.enderio.xp_juice_bucket": "Xp Juice Bucket", + "item.enderio.yeta_wrench": "Yeta Wrench", + "item.enderio.z_logic_controller": "Z-Logic Controller", + "item.enderio.zombie_electrode": "Zombie Electrode", + "itemGroup.enderio.blocks": "Ender IO Blocks", + "itemGroup.enderio.conduits": "Ender IO Conduits", + "itemGroup.enderio.gear": "Ender IO Gear", + "itemGroup.enderio.machines": "Ender IO Machines", + "itemGroup.enderio.main": "Ender IO", + "itemGroup.enderio.souls": "Ender IO Souls", + "jei.enderio.fire_crafting.title": "Fire Crafting", + "jei.enderio.fire_crafting.valid_blocks": "Valid Blocks:", + "jei.enderio.fire_crafting.valid_dimensions": "Valid Dimensions:", + "jei.enderio.grinding.consume_chance": "33% chance to be consumed", + "jei.enderio.grinding.hand_grinding_coal": "Hold some flint in your offhand and 3 or more coal in your main hand, then shift right-click a block of obsidian, crying obsidian or a grindstone to produce early powdered coal.", + "jei.enderio.grinding.hand_grinding_infinity": "Hold some flint in your offhand and some deepslate or cobbled deepslate in your main hand, then shift right-click a block of obsidian, crying obsidian or a grindstone to produce early grains of infinity.", + "jei.enderio.grinding.title": "Grinding", + "message.enderio.glider.disable": "Gliding is disabled: ", + "message.enderio.glider.disable.fall_flying": "Elytra Flight", + "message.enderio.grave.wrong_owner": "This grave is not yours! You cannot open it.", + "message.enderio.soul_vial.error_blacklisted": "This entity has been blacklisted.", + "message.enderio.soul_vial.error_boss": "Nice try. Bosses don't like bottles.", + "message.enderio.soul_vial.error_dead": "Cannot capture a dead mob!", + "message.enderio.soul_vial.error_failed": "This entity cannot be captured.", + "message.enderio.soul_vial.error_player": "You cannot put player in a bottle!", + "tooltip.enderio.block.blast_resistant": "Blast resistant", + "tooltip.enderio.capacitor.base": "Base Modifier: %s", + "tooltip.enderio.capacitor.energy_capacity": "Energy Capacity Modifier: %s", + "tooltip.enderio.capacitor.energy_use": "Energy Use Modifier: %s", + "tooltip.enderio.collision.animals_block": "Only solid to animals", + "tooltip.enderio.collision.animals_pass": "Not solid to animals", + "tooltip.enderio.collision.mobs_block": "Only solid to monsters", + "tooltip.enderio.collision.mobs_pass": "Not solid to monsters", + "tooltip.enderio.collision.players_block": "Only solid to players", + "tooltip.enderio.collision.players_pass": "Not solid to players", + "tooltip.enderio.dark_steel_ladder.faster": "Faster than regular ladders", + "tooltip.enderio.fluid_tank.tank_empty_tooltip": "Empty tank", + "tooltip.enderio.fluid_tank.tank_tooltip": "%d/%d mb of %s", + "tooltip.enderio.fused_quartz.blocks_light": "Blocks light", + "tooltip.enderio.fused_quartz.emits_light": "Emits light", + "tooltip.enderio.grinding_ball_bonus_output": "Bonus Output %s%%", + "tooltip.enderio.grinding_ball_main_output": "Main Output %s%%", + "tooltip.enderio.grinding_ball_power_use": "Power Use %s%%", + "tooltip.enderio.grinding_ball_remaining": "Remaining: %s%%", + "tooltip.enderio.grinding_ball_title": "SAG Mill Grinding Ball", + "tooltip.enderio.gui.show_advanced_tooltip": "", + "tooltip.enderio.photovoltaic_cell.advanced": "Produces Power during daylight hours", + "tooltip.enderio.photovoltaic_cell.advanced2": "Must have a clear line of sight to the sky", + "tooltip.enderio.photovoltaic_cell.advanced3": "Max Output: ", + "tooltip.enderio.photovoltaic_cell.main": "Solar Power!", + "tooltip.enderio.soul_vial.health": "Health: %s/%s" +} \ No newline at end of file From 2a974456f6af8aebba5bbd9df757b27ac740714d Mon Sep 17 00:00:00 2001 From: Reece Mackie <20544390+Rover656@users.noreply.github.com> Date: Sat, 19 Aug 2023 00:45:17 +0100 Subject: [PATCH 126/154] New translations en_us.json (Dutch) --- .../resources/assets/enderio/lang/nl_nl.json | 495 ++++++++++++++++++ 1 file changed, 495 insertions(+) create mode 100644 src/main/resources/assets/enderio/lang/nl_nl.json diff --git a/src/main/resources/assets/enderio/lang/nl_nl.json b/src/main/resources/assets/enderio/lang/nl_nl.json new file mode 100644 index 0000000000..2a236316ca --- /dev/null +++ b/src/main/resources/assets/enderio/lang/nl_nl.json @@ -0,0 +1,495 @@ +{ + "advancements.enderio.place_capacitor_bank.description": "Build a Capacitor Bank", + "advancements.enderio.place_capacitor_bank.title": "Modular Power Storage", + "advancements.enderio.rich.description": "Make others think you are rich", + "advancements.enderio.rich.title": "Don't tell the others", + "advancements.enderio.richer.description": "Make others think you are richer", + "advancements.enderio.richer.title": "Is this real?", + "advancements.enderio.use_glider.description": "Do you really trust some leather?", + "advancements.enderio.use_glider.title": "Majestic", + "block.enderio.advanced_capacitor_bank": "Advanced Capacitor Bank", + "block.enderio.alloy_smelter": "Alloy Smelter", + "block.enderio.basic_capacitor_bank": "Basic Capacitor Bank", + "block.enderio.clear_glass": "Clear Glass", + "block.enderio.clear_glass_black": "Black Clear Glass", + "block.enderio.clear_glass_blue": "Blue Clear Glass", + "block.enderio.clear_glass_brown": "Brown Clear Glass", + "block.enderio.clear_glass_cyan": "Cyan Clear Glass", + "block.enderio.clear_glass_d": "Dark Clear Glass", + "block.enderio.clear_glass_d_black": "Black Dark Clear Glass", + "block.enderio.clear_glass_d_blue": "Blue Dark Clear Glass", + "block.enderio.clear_glass_d_brown": "Brown Dark Clear Glass", + "block.enderio.clear_glass_d_cyan": "Cyan Dark Clear Glass", + "block.enderio.clear_glass_d_gray": "Gray Dark Clear Glass", + "block.enderio.clear_glass_d_green": "Green Dark Clear Glass", + "block.enderio.clear_glass_d_light_blue": "Light Blue Dark Clear Glass", + "block.enderio.clear_glass_d_light_gray": "Light Gray Dark Clear Glass", + "block.enderio.clear_glass_d_lime": "Lime Dark Clear Glass", + "block.enderio.clear_glass_d_magenta": "Magenta Dark Clear Glass", + "block.enderio.clear_glass_d_orange": "Orange Dark Clear Glass", + "block.enderio.clear_glass_d_pink": "Pink Dark Clear Glass", + "block.enderio.clear_glass_d_purple": "Purple Dark Clear Glass", + "block.enderio.clear_glass_d_red": "Red Dark Clear Glass", + "block.enderio.clear_glass_d_white": "White Dark Clear Glass", + "block.enderio.clear_glass_d_yellow": "Yellow Dark Clear Glass", + "block.enderio.clear_glass_e": "Enlightened Clear Glass", + "block.enderio.clear_glass_e_black": "Black Enlightened Clear Glass", + "block.enderio.clear_glass_e_blue": "Blue Enlightened Clear Glass", + "block.enderio.clear_glass_e_brown": "Brown Enlightened Clear Glass", + "block.enderio.clear_glass_e_cyan": "Cyan Enlightened Clear Glass", + "block.enderio.clear_glass_e_gray": "Gray Enlightened Clear Glass", + "block.enderio.clear_glass_e_green": "Green Enlightened Clear Glass", + "block.enderio.clear_glass_e_light_blue": "Light Blue Enlightened Clear Glass", + "block.enderio.clear_glass_e_light_gray": "Light Gray Enlightened Clear Glass", + "block.enderio.clear_glass_e_lime": "Lime Enlightened Clear Glass", + "block.enderio.clear_glass_e_magenta": "Magenta Enlightened Clear Glass", + "block.enderio.clear_glass_e_orange": "Orange Enlightened Clear Glass", + "block.enderio.clear_glass_e_pink": "Pink Enlightened Clear Glass", + "block.enderio.clear_glass_e_purple": "Purple Enlightened Clear Glass", + "block.enderio.clear_glass_e_red": "Red Enlightened Clear Glass", + "block.enderio.clear_glass_e_white": "White Enlightened Clear Glass", + "block.enderio.clear_glass_e_yellow": "Yellow Enlightened Clear Glass", + "block.enderio.clear_glass_gray": "Gray Clear Glass", + "block.enderio.clear_glass_green": "Green Clear Glass", + "block.enderio.clear_glass_light_blue": "Light Blue Clear Glass", + "block.enderio.clear_glass_light_gray": "Light Gray Clear Glass", + "block.enderio.clear_glass_lime": "Lime Clear Glass", + "block.enderio.clear_glass_magenta": "Magenta Clear Glass", + "block.enderio.clear_glass_orange": "Orange Clear Glass", + "block.enderio.clear_glass_pink": "Pink Clear Glass", + "block.enderio.clear_glass_purple": "Purple Clear Glass", + "block.enderio.clear_glass_red": "Red Clear Glass", + "block.enderio.clear_glass_white": "White Clear Glass", + "block.enderio.clear_glass_yellow": "Yellow Clear Glass", + "block.enderio.cloud_seed": "Cloud Seed", + "block.enderio.cloud_seed_concentrated": "Cloud Seed Concentrated", + "block.enderio.cold_fire": "Cold Fire", + "block.enderio.conductive_alloy_block": "Conductive Alloy Block", + "block.enderio.conduit": "Conduit", + "block.enderio.copper_alloy_block": "Copper Alloy Block", + "block.enderio.crafter": "Crafter", + "block.enderio.creative_power": "Creative Power", + "block.enderio.dark_steel_bars": "Dark Steel Bars", + "block.enderio.dark_steel_block": "Dark Steel Block", + "block.enderio.dark_steel_door": "Dark Steel Door", + "block.enderio.dark_steel_ladder": "Dark Steel Ladder", + "block.enderio.dark_steel_pressure_plate": "Dark Steel Pressure Plate", + "block.enderio.dark_steel_trapdoor": "Dark Steel Trapdoor", + "block.enderio.dew_of_the_void": "Dew Of The Void", + "block.enderio.enchanter": "Enchanter", + "block.enderio.end_steel_bars": "End Steel Bars", + "block.enderio.end_steel_block": "End Steel Block", + "block.enderio.enderman_head": "Enderman Head", + "block.enderio.energetic_alloy_block": "Energetic Alloy Block", + "block.enderio.energetic_photovoltaic_module": "Energetic Photovoltaic Module", + "block.enderio.ensouled_chassis": "Ensouled Chassis", + "block.enderio.fire_water": "Fire Water", + "block.enderio.fluid_tank": "Fluid Tank", + "block.enderio.fused_quartz": "Fused Quartz", + "block.enderio.fused_quartz_black": "Black Fused Quartz", + "block.enderio.fused_quartz_blue": "Blue Fused Quartz", + "block.enderio.fused_quartz_brown": "Brown Fused Quartz", + "block.enderio.fused_quartz_cyan": "Cyan Fused Quartz", + "block.enderio.fused_quartz_d": "Dark Fused Quartz", + "block.enderio.fused_quartz_d_black": "Black Dark Fused Quartz", + "block.enderio.fused_quartz_d_blue": "Blue Dark Fused Quartz", + "block.enderio.fused_quartz_d_brown": "Brown Dark Fused Quartz", + "block.enderio.fused_quartz_d_cyan": "Cyan Dark Fused Quartz", + "block.enderio.fused_quartz_d_gray": "Gray Dark Fused Quartz", + "block.enderio.fused_quartz_d_green": "Green Dark Fused Quartz", + "block.enderio.fused_quartz_d_light_blue": "Light Blue Dark Fused Quartz", + "block.enderio.fused_quartz_d_light_gray": "Light Gray Dark Fused Quartz", + "block.enderio.fused_quartz_d_lime": "Lime Dark Fused Quartz", + "block.enderio.fused_quartz_d_magenta": "Magenta Dark Fused Quartz", + "block.enderio.fused_quartz_d_orange": "Orange Dark Fused Quartz", + "block.enderio.fused_quartz_d_pink": "Pink Dark Fused Quartz", + "block.enderio.fused_quartz_d_purple": "Purple Dark Fused Quartz", + "block.enderio.fused_quartz_d_red": "Red Dark Fused Quartz", + "block.enderio.fused_quartz_d_white": "White Dark Fused Quartz", + "block.enderio.fused_quartz_d_yellow": "Yellow Dark Fused Quartz", + "block.enderio.fused_quartz_e": "Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_black": "Black Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_blue": "Blue Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_brown": "Brown Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_cyan": "Cyan Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_gray": "Gray Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_green": "Green Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_light_blue": "Light Blue Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_light_gray": "Light Gray Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_lime": "Lime Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_magenta": "Magenta Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_orange": "Orange Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_pink": "Pink Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_purple": "Purple Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_red": "Red Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_white": "White Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_yellow": "Yellow Enlightened Fused Quartz", + "block.enderio.fused_quartz_gray": "Gray Fused Quartz", + "block.enderio.fused_quartz_green": "Green Fused Quartz", + "block.enderio.fused_quartz_light_blue": "Light Blue Fused Quartz", + "block.enderio.fused_quartz_light_gray": "Light Gray Fused Quartz", + "block.enderio.fused_quartz_lime": "Lime Fused Quartz", + "block.enderio.fused_quartz_magenta": "Magenta Fused Quartz", + "block.enderio.fused_quartz_orange": "Orange Fused Quartz", + "block.enderio.fused_quartz_pink": "Pink Fused Quartz", + "block.enderio.fused_quartz_purple": "Purple Fused Quartz", + "block.enderio.fused_quartz_red": "Red Fused Quartz", + "block.enderio.fused_quartz_white": "White Fused Quartz", + "block.enderio.fused_quartz_yellow": "Yellow Fused Quartz", + "block.enderio.hootch": "Hootch", + "block.enderio.impulse_hopper": "Impulse Hopper", + "block.enderio.industrial_insulation_block": "Industrial Insulation", + "block.enderio.light": "Light", + "block.enderio.light_inverted": "Light Inverted", + "block.enderio.light_node": "Light Node", + "block.enderio.liquid_sunshine": "Liquid Sunshine", + "block.enderio.nutrient_distillation": "Nutrient Distillation", + "block.enderio.painted_crafting_table": "Painted Crafting Table", + "block.enderio.painted_fence": "Painted Fence", + "block.enderio.painted_fence_gate": "Painted Fence Gate", + "block.enderio.painted_glowstone": "Painted Glowstone", + "block.enderio.painted_redstone_block": "Painted Redstone Block", + "block.enderio.painted_sand": "Painted Sand", + "block.enderio.painted_slab": "Painted Slab", + "block.enderio.painted_stairs": "Painted Stairs", + "block.enderio.painted_trapdoor": "Painted Trapdoor", + "block.enderio.painted_wooden_pressure_plate": "Painted Wooden Pressure Plate", + "block.enderio.painting_machine": "Painting Machine", + "block.enderio.powered_light": "Powered Light", + "block.enderio.powered_light_inverted": "Powered Light Inverted", + "block.enderio.powered_light_inverted_wireless": "Powered Light Inverted Wireless", + "block.enderio.powered_light_wireless": "Powered Light Wireless", + "block.enderio.powered_spawner": "Powered Spawner", + "block.enderio.pressurized_fluid_tank": "Pressurized Fluid Tank", + "block.enderio.primitive_alloy_smelter": "Primitive Alloy Smelter", + "block.enderio.pulsating_alloy_block": "Pulsating Alloy Block", + "block.enderio.pulsating_photovoltaic_module": "Pulsating Photovoltaic Module", + "block.enderio.redstone_alloy_block": "Redstone Alloy Block", + "block.enderio.reinforced_obsidian_block": "Reinforced Obsidian Block", + "block.enderio.resetting_lever_five": "Resetting Lever (5 seconds)", + "block.enderio.resetting_lever_five_inv": "Resetting Lever Inverted (5 seconds)", + "block.enderio.resetting_lever_sixty": "Resetting Lever (1 minute)", + "block.enderio.resetting_lever_sixty_inv": "Resetting Lever Inverted (1 minute)", + "block.enderio.resetting_lever_ten": "Resetting Lever (10 seconds)", + "block.enderio.resetting_lever_ten_inv": "Resetting Lever Inverted (10 seconds)", + "block.enderio.resetting_lever_thirty": "Resetting Lever (30 seconds)", + "block.enderio.resetting_lever_thirty_inv": "Resetting Lever Inverted (30 seconds)", + "block.enderio.resetting_lever_three_hundred": "Resetting Lever (5 minutes)", + "block.enderio.resetting_lever_three_hundred_inv": "Resetting Lever Inverted (5 minutes)", + "block.enderio.rocket_fuel": "Rocket Fuel", + "block.enderio.sag_mill": "SAG Mill", + "block.enderio.silent_acacia_pressure_plate": "Silent Acacia Pressure Plate", + "block.enderio.silent_birch_pressure_plate": "Silent Birch Pressure Plate", + "block.enderio.silent_crimson_pressure_plate": "Silent Crimson Pressure Plate", + "block.enderio.silent_dark_oak_pressure_plate": "Silent Dark Oak Pressure Plate", + "block.enderio.silent_dark_steel_pressure_plate": "Silent Dark Steel Pressure Plate", + "block.enderio.silent_heavy_weighted_pressure_plate": "Silent Heavy Weighted Pressure Plate", + "block.enderio.silent_jungle_pressure_plate": "Silent Jungle Pressure Plate", + "block.enderio.silent_light_weighted_pressure_plate": "Silent Light Weighted Pressure Plate", + "block.enderio.silent_oak_pressure_plate": "Silent Oak Pressure Plate", + "block.enderio.silent_polished_blackstone_pressure_plate": "Silent Polished Blackstone Pressure Plate", + "block.enderio.silent_soularium_pressure_plate": "Silent Soularium Pressure Plate", + "block.enderio.silent_spruce_pressure_plate": "Silent Spruce Pressure Plate", + "block.enderio.silent_stone_pressure_plate": "Silent Stone Pressure Plate", + "block.enderio.silent_warped_pressure_plate": "Silent Warped Pressure Plate", + "block.enderio.slice_and_splice": "Slice'N'Splice", + "block.enderio.soul_binder": "Soul Binder", + "block.enderio.soul_chain": "Soul Chain", + "block.enderio.soularium_block": "Soularium Block", + "block.enderio.soularium_pressure_plate": "Soularium Pressure Plate", + "block.enderio.stirling_generator": "Stirling Generator", + "block.enderio.travel_anchor": "Travel Anchor", + "block.enderio.vacuum_chest": "Vacuum Chest", + "block.enderio.vapor_of_levity": "Vapor Of Levity", + "block.enderio.vibrant_alloy_block": "Vibrant Alloy Block", + "block.enderio.vibrant_capacitor_bank": "Vibrant Capacitor Bank", + "block.enderio.vibrant_photovoltaic_module": "Vibrant Photovoltaic Module", + "block.enderio.void_chassis": "Void Chassis", + "block.enderio.wired_charger": "Wired Charger", + "block.enderio.xp_juice": "Xp Juice", + "block.enderio.xp_vacuum": "Xp Vacuum", + "enchantment.enderio.auto_smelt": "Auto Smelt", + "enchantment.enderio.auto_smelt.desc": "Automatically smelts whatever is mined.", + "enchantment.enderio.repellent": "Repellent", + "enchantment.enderio.repellent.desc": "Chance to teleport attackers away. Higher levels teleport more often and farther.", + "enchantment.enderio.shimmer": "Shimmer", + "enchantment.enderio.shimmer.desc": "Makes the item shimmer as if it was enchanted... That's all... Really...", + "enchantment.enderio.soulbound": "Soulbound", + "enchantment.enderio.soulbound.desc": "Prevents item from being lost on death. Note: Most gravestone mods are stupid and prevent this from working!", + "enchantment.enderio.withering": "Withering", + "enchantment.enderio.withering.desc": "Applies wither to the target.", + "enchantment.enderio.withering.type": "Applies to bladed weapons, bows and crossbows.", + "enchantment.enderio.xp_boost": "XP Boost", + "enchantment.enderio.xp_boost.desc": "Extra XP from mobs and blocks", + "entity.enderio.painted_sand": "Painted Sand", + "fluid.enderio.cloud_seed": "Cloud Seed", + "fluid.enderio.cloud_seed_concentrated": "Cloud Seed Concentrated", + "fluid.enderio.dew_of_the_void": "Fluid of the Void", + "fluid.enderio.fire_water": "Fire Water", + "fluid.enderio.hootch": "Hootch", + "fluid.enderio.liquid_sunshine": "Liquid Sunshine", + "fluid.enderio.nutrient_distillation": "Nutrient Distillation", + "fluid.enderio.rocket_fuel": "Rocket Fuel", + "fluid.enderio.vapor_of_levity": "Vapor Of Levity", + "fluid.enderio.xp_juice": "Xp Juice", + "gui.enderio.alloy_smelter.mode": "Smelting Mode", + "gui.enderio.alloy_smelter.mode_all": "Alloying and Smelting", + "gui.enderio.alloy_smelter.mode_alloy": "Alloys Only", + "gui.enderio.alloy_smelter.mode_furnace": "Furnace Only", + "gui.enderio.category.alloy_smelting": "Alloy Smelting", + "gui.enderio.category.enchanter": "Enchanting", + "gui.enderio.category.primitive_alloy_smelting": "Primitive Alloy Smelting", + "gui.enderio.category.sag_mill": "SAG Mill", + "gui.enderio.category.slicing": "Slicing", + "gui.enderio.category.soul_binding": "Soul Binding", + "gui.enderio.category.tank": "Fluid Tank", + "gui.enderio.conduit.extract": "Extract", + "gui.enderio.conduit.insert": "Insert", + "gui.enderio.conduit_channel": "Conduit-Channel", + "gui.enderio.energy_equivalence": "A unit of energy, equivalent to FE.", + "gui.enderio.filter": "Filter", + "gui.enderio.fluid_conduit.change_fluid1": "Locked Fluid:", + "gui.enderio.fluid_conduit.change_fluid2": "Click to reset!", + "gui.enderio.fluid_conduit.change_fluid3": "Fluid: %s", + "gui.enderio.ioconfig": "IO Configuration", + "gui.enderio.ioconfig.both": "Push / Pull", + "gui.enderio.ioconfig.disabled": "Disabled", + "gui.enderio.ioconfig.neighbour": "Show/Hide Neighbours", + "gui.enderio.ioconfig.none": "None", + "gui.enderio.ioconfig.pull": "Pull", + "gui.enderio.ioconfig.push": "Push", + "gui.enderio.nocap.desc": "Insert any capacitor so \n this machine can work!", + "gui.enderio.nocap.title": "Capacitor Missing", + "gui.enderio.progress": "Progress %s%%", + "gui.enderio.range": "Range", + "gui.enderio.range.hide": "Hide Range", + "gui.enderio.range.show": "Show Range", + "gui.enderio.redstone.active_with_signal": "Active with signal", + "gui.enderio.redstone.active_without_signal": "Active without signal", + "gui.enderio.redstone.always_active": "Always active", + "gui.enderio.redstone.mode": "Redstone Mode", + "gui.enderio.redstone.never_active": "Never active", + "gui.enderio.redstone_channel": "Redstone-Channel", + "gui.enderio.round_robin.disabled": "Round Robin Disabled", + "gui.enderio.round_robin.enabled": "Round Robin Enabled", + "gui.enderio.sag_mill_chance": "Chance: %s%%", + "gui.enderio.sag_mill_chance_ball": "Chance: %s%% (modified by grinding ball)", + "gui.enderio.self_feed.disabled": "Self Feed Disabled", + "gui.enderio.self_feed.enabled": "Self Feed Enabled", + "gui.enderio.spawner.disabled": "Disabled by config", + "gui.enderio.spawner.other_mod": "Other mod", + "gui.enderio.spawner.too_many_mob": "Too many mobs", + "gui.enderio.spawner.too_many_spawner": "Too many spawners", + "gui.enderio.spawner.unknown": "Unknown mob", + "gui.enderio.visible.false": "Hidden", + "gui.enderio.visible.true": "Visible", + "guidebook.enderio.book_title": "Book Title", + "guidebook.enderio.landing_text": "Landing Text", + "hint.enderio.connected_textures.text": "If you are looking for connected textures on the capacitor bank, you might want to install Athena on your client", + "info.enderio.coordinate_selector.no_block": "No block in range", + "info.enderio.coordinate_selector.no_paper": "No paper in inventory", + "info.enderio.darksteel.upgrade.activate": "Right Click to Activate", + "info.enderio.darksteel.upgrade.available": "Available Upgrades", + "info.enderio.darksteel.upgrade.cost": "Costs %s Levels", + "info.enderio.darksteel.upgrade.direct": "Direct", + "info.enderio.darksteel.upgrade.direct.description": "Teleports harvested items directly into your inventory", + "info.enderio.darksteel.upgrade.empowered.absorption": "%s%% damage absorbed by µI", + "info.enderio.darksteel.upgrade.empowered.description": "Infuse the steel with the power of Micro Infinity", + "info.enderio.darksteel.upgrade.empowered.efficiency": "Efficiency +%s when powered", + "info.enderio.darksteel.upgrade.empowered.obsidian.efficiency": "Efficiency +%s when breaking obsidian", + "info.enderio.darksteel.upgrade.empowered.storage": "Holds up to %s µI", + "info.enderio.darksteel.upgrade.empowered_l1": "Empowered", + "info.enderio.darksteel.upgrade.empowered_l2": "Empowered II", + "info.enderio.darksteel.upgrade.empowered_l3": "Empowered III", + "info.enderio.darksteel.upgrade.empowered_l4": "Empowered IV", + "info.enderio.darksteel.upgrade.explosive.description": "Makes surrounding dirt and rock go splodey", + "info.enderio.darksteel.upgrade.explosive_l1": "Explosive I", + "info.enderio.darksteel.upgrade.explosive_l2": "Explosive II", + "info.enderio.darksteel.upgrade.explosive_penetration.description": "Makes dirt and rock behind the mined block go splodey", + "info.enderio.darksteel.upgrade.explosive_penetration_l1": "Explosive Penetration I", + "info.enderio.darksteel.upgrade.explosive_penetration_l2": "Explosive Penetration II", + "info.enderio.darksteel.upgrade.fork": "Fork", + "info.enderio.darksteel.upgrade.fork.description": "Who needs a hoe when you have a fork?", + "info.enderio.darksteel.upgrade.no_xp": "Not enough XP", + "info.enderio.darksteel.upgrade.spoon": "Spoon", + "info.enderio.darksteel.upgrade.spoon.description": "Who needs a shovel when you have a spoon?", + "info.enderio.durability.amount": "Durability %s", + "info.enderio.energy.amount": "%s µI", + "info.enderio.headchance": "%s%% chance to drop a mob head", + "info.enderio.too_many_levels": "You have more than 21862 levels, that's too much XP.", + "item.enderio.animal_token": "Animal Token", + "item.enderio.basic_capacitor": "Basic Capacitor", + "item.enderio.black_paper": "Black Paper", + "item.enderio.broken_spawner": "Broken Spawner", + "item.enderio.cake_base": "Cake Base", + "item.enderio.clayed_glowstone": "Clayed Glowstone", + "item.enderio.cloud_seed_bucket": "Cloud Seed Bucket", + "item.enderio.cloud_seed_concentrated_bucket": "Cloud Seed Concentrated Bucket", + "item.enderio.cold_fire_igniter": "Cold Fire Igniter", + "item.enderio.conductive_alloy_grinding_ball": "Conductive Alloy Grinding Ball", + "item.enderio.conductive_alloy_ingot": "Conductive Alloy Ingot", + "item.enderio.conductive_alloy_nugget": "Conductive Alloy Nugget", + "item.enderio.conduit_binder": "Conduit Binder", + "item.enderio.conduit_binder_composite": "Conduit Binder Composite", + "item.enderio.confusing_powder": "Confusing Powder", + "item.enderio.coordinate_selector": "Coordinate Selector", + "item.enderio.copper_alloy_grinding_ball": "Copper Alloy Grinding Ball", + "item.enderio.copper_alloy_ingot": "Copper Alloy Ingot", + "item.enderio.copper_alloy_nugget": "Copper Alloy Nugget", + "item.enderio.dark_bimetal_gear": "Dark Bimetal Gear", + "item.enderio.dark_steel_grinding_ball": "Dark Steel Grinding Ball", + "item.enderio.dark_steel_ingot": "Dark Steel Ingot", + "item.enderio.dark_steel_nugget": "Dark Steel Nugget", + "item.enderio.dark_steel_sword": "The Ender", + "item.enderio.dense_me_conduit": "Dense ME Conduit", + "item.enderio.dew_of_the_void_bucket": "Dew Of The Void Bucket", + "item.enderio.double_layer_capacitor": "Double Layer Capacitor", + "item.enderio.electromagnet": "Electromagnet", + "item.enderio.empty_soul_vial": "Empty Soul Vial", + "item.enderio.end_steel_grinding_ball": "End Steel Grinding Ball", + "item.enderio.end_steel_ingot": "End Steel Ingot", + "item.enderio.end_steel_nugget": "End Steel Nugget", + "item.enderio.ender_crystal": "Ender Crystal", + "item.enderio.ender_crystal_powder": "Grains of the End", + "item.enderio.ender_fluid_conduit": "Ender Fluid Conduit", + "item.enderio.ender_resonator": "Ender Resonator", + "item.enderio.enderface_conduits": "Enderface Conduits", + "item.enderio.enderface_invpanel": "Enderface Invpanel", + "item.enderio.enderface_items": "Enderface Items", + "item.enderio.enderface_machines": "Enderface Machines", + "item.enderio.enderface_materials": "Enderface Materials", + "item.enderio.enderface_mobs": "Enderface Mobs", + "item.enderio.enderface_none": "Enderface None", + "item.enderio.enderios": "\"Enderios\"", + "item.enderio.energetic_alloy_grinding_ball": "Energetic Alloy Grinding Ball", + "item.enderio.energetic_alloy_ingot": "Energetic Alloy Ingot", + "item.enderio.energetic_alloy_nugget": "Energetic Alloy Nugget", + "item.enderio.energized_gear": "Energized Bimetal Gear", + "item.enderio.energy_conduit": "Energy Conduit", + "item.enderio.enticing_crystal": "Enticing Crystal", + "item.enderio.experience_rod": "Experience Rod", + "item.enderio.filled_soul_vial": "Filled Soul Vial", + "item.enderio.fire_water_bucket": "Fire Water Bucket", + "item.enderio.flour": "Flour", + "item.enderio.fluid_conduit": "Fluid Conduit", + "item.enderio.frank_n_zombie": "Frank'N'Zombie", + "item.enderio.glider_wing": "Glider Wing", + "item.enderio.grains_of_infinity": "Grains of Infinity", + "item.enderio.guardian_diode": "Guardian Diode", + "item.enderio.hootch_bucket": "Hootch Bucket", + "item.enderio.infinity_rod": "Infinity Rod", + "item.enderio.iron_gear": "Infinity Bimetal Gear", + "item.enderio.item_conduit": "Item Conduit", + "item.enderio.liquid_sunshine_bucket": "Liquid Sunshine Bucket", + "item.enderio.location_printout": "Location Printout", + "item.enderio.loot_capacitor": "Loot Capacitor", + "item.enderio.me_conduit": "ME Conduit", + "item.enderio.monster_token": "Monster Token", + "item.enderio.nethercotta": "Nethercotta", + "item.enderio.nutrient_distillation_bucket": "Nutrient Distillation Bucket", + "item.enderio.nutritious_stick": "Nutritious Stick", + "item.enderio.octadic_capacitor": "Octadic Capacitor", + "item.enderio.organic_black_dye": "Organic Black Dye", + "item.enderio.organic_brown_dye": "Organic Brown Dye", + "item.enderio.organic_green_dye": "Organic Green Dye", + "item.enderio.photovoltaic_composite": "Photovoltaic Composite", + "item.enderio.photovoltaic_plate": "Photovoltaic Plate", + "item.enderio.plant_matter_brown": "Twigs and Prunings", + "item.enderio.plant_matter_green": "Clippings and Trimmings", + "item.enderio.player_token": "Player Token", + "item.enderio.powdered_coal": "Powdered Coal", + "item.enderio.powdered_cobalt": "Powdered Cobalt", + "item.enderio.powdered_copper": "Powdered Copper", + "item.enderio.powdered_ender_pearl": "Powdered Ender Pearl", + "item.enderio.powdered_gold": "Powdered Gold", + "item.enderio.powdered_iron": "Powdered Iron", + "item.enderio.powdered_lapis_lazuli": "Powdered Lapis Lazuli", + "item.enderio.powdered_obsidian": "Powdered Obsidian", + "item.enderio.powdered_quartz": "Powdered Quartz", + "item.enderio.powdered_tin": "Powdered Tin", + "item.enderio.prescient_crystal": "Prescient Crystal", + "item.enderio.prescient_powder": "Grains of Prescience", + "item.enderio.pressurized_fluid_conduit": "Pressurized Fluid Conduit", + "item.enderio.pulsating_alloy_grinding_ball": "Pulsating Alloy Grinding Ball", + "item.enderio.pulsating_alloy_ingot": "Pulsating Alloy Ingot", + "item.enderio.pulsating_alloy_nugget": "Pulsating Alloy Nugget", + "item.enderio.pulsating_crystal": "Pulsating Crystal", + "item.enderio.pulsating_powder": "Grains of Piezallity", + "item.enderio.redstone_alloy_grinding_ball": "Redstone Alloy Grinding Ball", + "item.enderio.redstone_alloy_ingot": "Redstone Alloy Ingot", + "item.enderio.redstone_alloy_nugget": "Redstone Alloy Nugget", + "item.enderio.redstone_conduit": "Redstone Conduit", + "item.enderio.redstone_filter_base": "Redstone Filter Base", + "item.enderio.rocket_fuel_bucket": "Rocket Fuel Bucket", + "item.enderio.sentient_ender": "Sentient Ender", + "item.enderio.silicon": "Silicon", + "item.enderio.skeletal_contractor": "Skeletal Contractor", + "item.enderio.soul_powder": "Soul Powder", + "item.enderio.soularium_grinding_ball": "Soularium Grinding Ball", + "item.enderio.soularium_ingot": "Soularium Ingot", + "item.enderio.soularium_nugget": "Soularium Nugget", + "item.enderio.staff_of_levity": "Staff Of Levity", + "item.enderio.staff_of_travelling": "Staff Of Travelling", + "item.enderio.stone_gear": "Stone Compound Gear", + "item.enderio.vapor_of_levity_bucket": "Vapor Of Levity Bucket", + "item.enderio.vibrant_alloy_grinding_ball": "Vibrant Alloy Grinding Ball", + "item.enderio.vibrant_alloy_ingot": "Vibrant Alloy Ingot", + "item.enderio.vibrant_alloy_nugget": "Vibrant Alloy Nugget", + "item.enderio.vibrant_crystal": "Vibrant Crystal", + "item.enderio.vibrant_gear": "Vibrant Bimetal Gear", + "item.enderio.vibrant_powder": "Grains of Vibrancy", + "item.enderio.weather_crystal": "Weather Crystal", + "item.enderio.withering_powder": "Withering Powder", + "item.enderio.wood_gear": "Wooden Gear", + "item.enderio.xp_juice_bucket": "Xp Juice Bucket", + "item.enderio.yeta_wrench": "Yeta Wrench", + "item.enderio.z_logic_controller": "Z-Logic Controller", + "item.enderio.zombie_electrode": "Zombie Electrode", + "itemGroup.enderio.blocks": "Ender IO Blocks", + "itemGroup.enderio.conduits": "Ender IO Conduits", + "itemGroup.enderio.gear": "Ender IO Gear", + "itemGroup.enderio.machines": "Ender IO Machines", + "itemGroup.enderio.main": "Ender IO", + "itemGroup.enderio.souls": "Ender IO Souls", + "jei.enderio.fire_crafting.title": "Fire Crafting", + "jei.enderio.fire_crafting.valid_blocks": "Valid Blocks:", + "jei.enderio.fire_crafting.valid_dimensions": "Valid Dimensions:", + "jei.enderio.grinding.consume_chance": "33% chance to be consumed", + "jei.enderio.grinding.hand_grinding_coal": "Hold some flint in your offhand and 3 or more coal in your main hand, then shift right-click a block of obsidian, crying obsidian or a grindstone to produce early powdered coal.", + "jei.enderio.grinding.hand_grinding_infinity": "Hold some flint in your offhand and some deepslate or cobbled deepslate in your main hand, then shift right-click a block of obsidian, crying obsidian or a grindstone to produce early grains of infinity.", + "jei.enderio.grinding.title": "Grinding", + "message.enderio.glider.disable": "Gliding is disabled: ", + "message.enderio.glider.disable.fall_flying": "Elytra Flight", + "message.enderio.grave.wrong_owner": "This grave is not yours! You cannot open it.", + "message.enderio.soul_vial.error_blacklisted": "This entity has been blacklisted.", + "message.enderio.soul_vial.error_boss": "Nice try. Bosses don't like bottles.", + "message.enderio.soul_vial.error_dead": "Cannot capture a dead mob!", + "message.enderio.soul_vial.error_failed": "This entity cannot be captured.", + "message.enderio.soul_vial.error_player": "You cannot put player in a bottle!", + "tooltip.enderio.block.blast_resistant": "Blast resistant", + "tooltip.enderio.capacitor.base": "Base Modifier: %s", + "tooltip.enderio.capacitor.energy_capacity": "Energy Capacity Modifier: %s", + "tooltip.enderio.capacitor.energy_use": "Energy Use Modifier: %s", + "tooltip.enderio.collision.animals_block": "Only solid to animals", + "tooltip.enderio.collision.animals_pass": "Not solid to animals", + "tooltip.enderio.collision.mobs_block": "Only solid to monsters", + "tooltip.enderio.collision.mobs_pass": "Not solid to monsters", + "tooltip.enderio.collision.players_block": "Only solid to players", + "tooltip.enderio.collision.players_pass": "Not solid to players", + "tooltip.enderio.dark_steel_ladder.faster": "Faster than regular ladders", + "tooltip.enderio.fluid_tank.tank_empty_tooltip": "Empty tank", + "tooltip.enderio.fluid_tank.tank_tooltip": "%d/%d mb of %s", + "tooltip.enderio.fused_quartz.blocks_light": "Blocks light", + "tooltip.enderio.fused_quartz.emits_light": "Emits light", + "tooltip.enderio.grinding_ball_bonus_output": "Bonus Output %s%%", + "tooltip.enderio.grinding_ball_main_output": "Main Output %s%%", + "tooltip.enderio.grinding_ball_power_use": "Power Use %s%%", + "tooltip.enderio.grinding_ball_remaining": "Remaining: %s%%", + "tooltip.enderio.grinding_ball_title": "SAG Mill Grinding Ball", + "tooltip.enderio.gui.show_advanced_tooltip": "", + "tooltip.enderio.photovoltaic_cell.advanced": "Produces Power during daylight hours", + "tooltip.enderio.photovoltaic_cell.advanced2": "Must have a clear line of sight to the sky", + "tooltip.enderio.photovoltaic_cell.advanced3": "Max Output: ", + "tooltip.enderio.photovoltaic_cell.main": "Solar Power!", + "tooltip.enderio.soul_vial.health": "Health: %s/%s" +} \ No newline at end of file From bbfe488e2474dbd78a9c3452d41bfbc20b843b70 Mon Sep 17 00:00:00 2001 From: Reece Mackie <20544390+Rover656@users.noreply.github.com> Date: Sat, 19 Aug 2023 00:45:18 +0100 Subject: [PATCH 127/154] New translations en_us.json (Russian) --- .../resources/assets/enderio/lang/ru_ru.json | 43 ++++++++----------- 1 file changed, 17 insertions(+), 26 deletions(-) diff --git a/src/main/resources/assets/enderio/lang/ru_ru.json b/src/main/resources/assets/enderio/lang/ru_ru.json index f55931cb67..d7b1cfcd25 100644 --- a/src/main/resources/assets/enderio/lang/ru_ru.json +++ b/src/main/resources/assets/enderio/lang/ru_ru.json @@ -8,10 +8,8 @@ "advancements.enderio.use_glider.description": "Ты доверяешь коже?", "advancements.enderio.use_glider.title": "Величество", "block.enderio.advanced_capacitor_bank": "Продвинутая конденсаторная батарея", - "block.enderio.advanced_photovoltaic_cell": "Продвинутая фотогальваническая панель", "block.enderio.alloy_smelter": "Завод сплавов", "block.enderio.basic_capacitor_bank": "Основная конденсаторная батарея", - "block.enderio.basic_photovoltaic_cell": "Основная фотогальваническая панель", "block.enderio.clear_glass": "Чистое стекло", "block.enderio.clear_glass_black": "Чёрное чистое стекло", "block.enderio.clear_glass_blue": "Синее чистое стекло", @@ -83,6 +81,7 @@ "block.enderio.end_steel_block": "Блок Края", "block.enderio.enderman_head": "Enderman Head", "block.enderio.energetic_alloy_block": "Блок энергетического сплава", + "block.enderio.energetic_photovoltaic_module": "Energetic Photovoltaic Module", "block.enderio.ensouled_chassis": "Корпус механизма душ", "block.enderio.fire_water": "Огненная вода", "block.enderio.fluid_tank": "Жидкостный резервуар", @@ -164,6 +163,7 @@ "block.enderio.pressurized_fluid_tank": "Жидкостный резервуар под давлением", "block.enderio.primitive_alloy_smelter": "Простой завод сплавов", "block.enderio.pulsating_alloy_block": "Блок пульсирующего сплава", + "block.enderio.pulsating_photovoltaic_module": "Pulsating Photovoltaic Module", "block.enderio.redstone_alloy_block": "Блок сплава редстоуна", "block.enderio.reinforced_obsidian_block": "Усиленный обсидиановый блок", "block.enderio.resetting_lever_five": "Самосбрасывающийся рычаг (5 секунд)", @@ -192,48 +192,35 @@ "block.enderio.silent_spruce_pressure_plate": "Тихая еловая нажимная плита", "block.enderio.silent_stone_pressure_plate": "Тихая каменная нажимная плита", "block.enderio.silent_warped_pressure_plate": "Тихая искажённая нажимная плита", - "block.enderio.simple_photovoltaic_cell": "Простая фотогальваническая панель", "block.enderio.slice_and_splice": "Отрубатель и сращиватель", "block.enderio.soul_binder": "Связыватель душ", "block.enderio.soul_chain": "Цепь душ", "block.enderio.soularium_block": "Блок соулария", "block.enderio.soularium_pressure_plate": "Соулариевая нажимная плита", "block.enderio.stirling_generator": "Генератор Стирлинга", + "block.enderio.travel_anchor": "Travel Anchor", "block.enderio.vacuum_chest": "Вакуумный сундук", "block.enderio.vapor_of_levity": "Пар левитации", "block.enderio.vibrant_alloy_block": "Блок вибрирующего сплава", "block.enderio.vibrant_capacitor_bank": "Вибрирующая конденсаторная батарея", - "block.enderio.vibrant_photovoltaic_cell": "Вибрирующая фотогальваническая панель", + "block.enderio.vibrant_photovoltaic_module": "Vibrant Photovoltaic Module", "block.enderio.void_chassis": "Корпус механизма", "block.enderio.wired_charger": "Wired Charger", "block.enderio.xp_juice": "Жидкий опыт", "block.enderio.xp_vacuum": "Вакуумный опыт", - "description.enderio.enchantment.auto_smelt": "Автоматически плавит то, что добыто", - "description.enderio.enchantment.repellent1": "Шанс телепортировать атакующих от себя", - "description.enderio.enchantment.repellent2": "Более высокие уровни телепортируются чаще и дальше", - "description.enderio.enchantment.shimmer1": "Заставляет предмет переливаться, как если бы он был зачарован.", - "description.enderio.enchantment.shimmer2": "Это всё.", - "description.enderio.enchantment.shimmer3": "Действительно.", - "description.enderio.enchantment.shimmer4": "Ничего больше.", - "description.enderio.enchantment.shimmer5": "Да, это бесполезно.", - "description.enderio.enchantment.shimmer6": "Я знаю.", - "description.enderio.enchantment.soulbound1": "Предотвращает потерю предмета при смерти.", - "description.enderio.enchantment.soulbound2": "Внимание: Большинство модов на могилы тупые и не позволяют этому адекватно работать!", - "description.enderio.enchantment.withering_arrow1": "Применяет иссушение к цели", - "description.enderio.enchantment.withering_arrow2": "Применяется к лукам.", - "description.enderio.enchantment.withering_blade1": "Применяет иссушение к цели", - "description.enderio.enchantment.withering_blade2": "Применяеся к мечам", - "description.enderio.enchantment.withering_bolt1": "Применяет иссушение к цели", - "description.enderio.enchantment.withering_bolt2": "Применяется к арбалетам.", - "description.enderio.enchantment.xp_boost": "Дополнительный опыт от мобов и блоков", "enchantment.enderio.auto_smelt": "Авто-Плавка", + "enchantment.enderio.auto_smelt.desc": "Automatically smelts whatever is mined.", "enchantment.enderio.repellent": "Отталкивание", + "enchantment.enderio.repellent.desc": "Chance to teleport attackers away. Higher levels teleport more often and farther.", "enchantment.enderio.shimmer": "Мерцание", + "enchantment.enderio.shimmer.desc": "Makes the item shimmer as if it was enchanted... That's all... Really...", "enchantment.enderio.soulbound": "Печать души", - "enchantment.enderio.withering_arrow": "Иссушающая стрела", - "enchantment.enderio.withering_blade": "Иссушающий клинок", - "enchantment.enderio.withering_bolt": "Иссушающий болт", + "enchantment.enderio.soulbound.desc": "Prevents item from being lost on death. Note: Most gravestone mods are stupid and prevent this from working!", + "enchantment.enderio.withering": "Withering", + "enchantment.enderio.withering.desc": "Applies wither to the target.", + "enchantment.enderio.withering.type": "Applies to bladed weapons, bows and crossbows.", "enchantment.enderio.xp_boost": "Бонус опыта", + "enchantment.enderio.xp_boost.desc": "Extra XP from mobs and blocks", "entity.enderio.painted_sand": "Покрашенный песок", "fluid.enderio.cloud_seed": "Облако семян", "fluid.enderio.cloud_seed_concentrated": "Концентрированное облако семян", @@ -256,9 +243,9 @@ "gui.enderio.category.slicing": "Отрубание", "gui.enderio.category.soul_binding": "Связывание души", "gui.enderio.category.tank": "Жидкостный резервуар", - "gui.enderio.channel": "Канал", "gui.enderio.conduit.extract": "Extract", "gui.enderio.conduit.insert": "Insert", + "gui.enderio.conduit_channel": "Conduit-Channel", "gui.enderio.energy_equivalence": "Единица энергии, равная FE.", "gui.enderio.filter": "Фильтр", "gui.enderio.fluid_conduit.change_fluid1": "Установленная жидкость:", @@ -282,6 +269,7 @@ "gui.enderio.redstone.always_active": "Всегда активен", "gui.enderio.redstone.mode": "Режим редстоуна", "gui.enderio.redstone.never_active": "Всегда выключен", + "gui.enderio.redstone_channel": "Redstone-Channel", "gui.enderio.round_robin.disabled": "Round Robin Disabled", "gui.enderio.round_robin.enabled": "Round Robin Enabled", "gui.enderio.sag_mill_chance": "Шанс: %s", @@ -293,6 +281,8 @@ "gui.enderio.spawner.too_many_mob": "Слишком много мобов", "gui.enderio.spawner.too_many_spawner": "Слишком много спавнеров", "gui.enderio.spawner.unknown": "Неизвестный моб", + "gui.enderio.visible.false": "Hidden", + "gui.enderio.visible.true": "Visible", "guidebook.enderio.book_title": "Book Title", "guidebook.enderio.landing_text": "Landing Text", "hint.enderio.connected_textures.text": "Если вам нужны мультиблочные текстуры соединенных вместе конденсаторных батарей, необходимо установить мод Athena на ваш клиент", @@ -439,6 +429,7 @@ "item.enderio.soularium_ingot": "Слиток соулария", "item.enderio.soularium_nugget": "Кусочек соулария", "item.enderio.staff_of_levity": "Посох Левитации", + "item.enderio.staff_of_travelling": "Staff Of Travelling", "item.enderio.stone_gear": "Каменная составная шестерня", "item.enderio.vapor_of_levity_bucket": "Ведро пара левитации", "item.enderio.vibrant_alloy_grinding_ball": "Измельчающий шарик из вибрирующего сплава", From 0726599bc79e2d7bdb776b5ad058dd8efbe2246e Mon Sep 17 00:00:00 2001 From: Reece Mackie <20544390+Rover656@users.noreply.github.com> Date: Sat, 19 Aug 2023 00:45:19 +0100 Subject: [PATCH 128/154] New translations en_us.json (Chinese Simplified) --- .../resources/assets/enderio/lang/zh_cn.json | 43 ++++++++----------- 1 file changed, 17 insertions(+), 26 deletions(-) diff --git a/src/main/resources/assets/enderio/lang/zh_cn.json b/src/main/resources/assets/enderio/lang/zh_cn.json index 9ebbf26c30..bfe697062f 100644 --- a/src/main/resources/assets/enderio/lang/zh_cn.json +++ b/src/main/resources/assets/enderio/lang/zh_cn.json @@ -8,10 +8,8 @@ "advancements.enderio.use_glider.description": "你真要相信几块皮革?", "advancements.enderio.use_glider.title": "优雅", "block.enderio.advanced_capacitor_bank": "高级电容库", - "block.enderio.advanced_photovoltaic_cell": "高级光伏电池", "block.enderio.alloy_smelter": "合金炉", "block.enderio.basic_capacitor_bank": "基础电容库", - "block.enderio.basic_photovoltaic_cell": "基础光伏电池", "block.enderio.clear_glass": "纯净玻璃", "block.enderio.clear_glass_black": "黑色纯净玻璃", "block.enderio.clear_glass_blue": "蓝色纯净玻璃", @@ -83,6 +81,7 @@ "block.enderio.end_steel_block": "末地钢块", "block.enderio.enderman_head": "末影人的头", "block.enderio.energetic_alloy_block": "充能合金块", + "block.enderio.energetic_photovoltaic_module": "充能光伏模块", "block.enderio.ensouled_chassis": "注魂框架", "block.enderio.fire_water": "火焰水", "block.enderio.fluid_tank": "流体储罐", @@ -164,6 +163,7 @@ "block.enderio.pressurized_fluid_tank": "加压流体储罐", "block.enderio.primitive_alloy_smelter": "原始合金炉", "block.enderio.pulsating_alloy_block": "脉冲合金块", + "block.enderio.pulsating_photovoltaic_module": "脉冲光伏模块", "block.enderio.redstone_alloy_block": "红石合金块", "block.enderio.reinforced_obsidian_block": "强化黑曜石", "block.enderio.resetting_lever_five": "复位拉杆(5秒)", @@ -192,48 +192,35 @@ "block.enderio.silent_spruce_pressure_plate": "静音云杉木压力板", "block.enderio.silent_stone_pressure_plate": "静音石头压力板", "block.enderio.silent_warped_pressure_plate": "静音诡异木压力板", - "block.enderio.simple_photovoltaic_cell": "简易光伏电池", "block.enderio.slice_and_splice": "头颅装配机", "block.enderio.soul_binder": "灵魂绑定器", "block.enderio.soul_chain": "灵魂链条", "block.enderio.soularium_block": "魂金块", "block.enderio.soularium_pressure_plate": "魂金压力板", "block.enderio.stirling_generator": "斯特林发电机", + "block.enderio.travel_anchor": "旅行锚", "block.enderio.vacuum_chest": "真空箱子", "block.enderio.vapor_of_levity": "轻盈之气", "block.enderio.vibrant_alloy_block": "振动合金块", "block.enderio.vibrant_capacitor_bank": "振动电容库", - "block.enderio.vibrant_photovoltaic_cell": "振动光伏电池", + "block.enderio.vibrant_photovoltaic_module": "振动光伏模块", "block.enderio.void_chassis": "虚空框架", "block.enderio.wired_charger": "有线充能器", "block.enderio.xp_juice": "经验汁", "block.enderio.xp_vacuum": "真空经验箱", - "description.enderio.enchantment.auto_smelt": "自动烧炼采集的物品", - "description.enderio.enchantment.repellent1": "有概率将攻击者传送走", - "description.enderio.enchantment.repellent2": "魔咒等级越高,传送概率越大,传送距离越远", - "description.enderio.enchantment.shimmer1": "让物品像附了魔一样闪闪发光。", - "description.enderio.enchantment.shimmer2": "仅此而已。", - "description.enderio.enchantment.shimmer3": "真的。", - "description.enderio.enchantment.shimmer4": "没别的用处了。", - "description.enderio.enchantment.shimmer5": "对,它就是没啥用。", - "description.enderio.enchantment.shimmer6": "我很清楚。", - "description.enderio.enchantment.soulbound1": "使物品免于死亡掉落。", - "description.enderio.enchantment.soulbound2": "注意:多数墓碑模组非常愚蠢,会导致该魔咒无法正常生效!", - "description.enderio.enchantment.withering_arrow1": "给目标施加凋零效果", - "description.enderio.enchantment.withering_arrow2": "适用于弓。", - "description.enderio.enchantment.withering_blade1": "给目标施加凋零效果", - "description.enderio.enchantment.withering_blade2": "适用于近战武器", - "description.enderio.enchantment.withering_bolt1": "给目标施加凋零效果", - "description.enderio.enchantment.withering_bolt2": "适用于弩。", - "description.enderio.enchantment.xp_boost": "从挖掘方块和击杀生物中汲取更多经验", "enchantment.enderio.auto_smelt": "自动烧炼", + "enchantment.enderio.auto_smelt.desc": "自动烧炼挖掘的物品。", "enchantment.enderio.repellent": "驱散传送", + "enchantment.enderio.repellent.desc": "有概率传送走攻击者。等级越高,触发概率越高,传送得越远。", "enchantment.enderio.shimmer": "微光闪闪", + "enchantment.enderio.shimmer.desc": "让物品像附了魔似的闪闪发光……仅此而已……真的……", "enchantment.enderio.soulbound": "灵魂绑定", - "enchantment.enderio.withering_arrow": "淬凋之箭", - "enchantment.enderio.withering_blade": "淬凋之刃", - "enchantment.enderio.withering_bolt": "淬凋弩箭", + "enchantment.enderio.soulbound.desc": "使物品免于死亡掉落。注意:多数墓碑模组非常愚蠢,会导致该魔咒无法正常工作!", + "enchantment.enderio.withering": "凋亡", + "enchantment.enderio.withering.desc": "给目标施加凋零效果。", + "enchantment.enderio.withering.type": "适用于近战武器、弓和弩。", "enchantment.enderio.xp_boost": "经验汲取", + "enchantment.enderio.xp_boost.desc": "从挖掘方块和击杀生物中汲取更多经验", "entity.enderio.painted_sand": "喷涂沙子", "fluid.enderio.cloud_seed": "云之精华", "fluid.enderio.cloud_seed_concentrated": "浓缩云之精华", @@ -256,9 +243,9 @@ "gui.enderio.category.slicing": "头颅装配", "gui.enderio.category.soul_binding": "灵魂绑定", "gui.enderio.category.tank": "流体储罐", - "gui.enderio.channel": "频道", "gui.enderio.conduit.extract": "提取", "gui.enderio.conduit.insert": "存入", + "gui.enderio.conduit_channel": "Conduit-Channel", "gui.enderio.energy_equivalence": "能量单位,等同于FE。", "gui.enderio.filter": "过滤器", "gui.enderio.fluid_conduit.change_fluid1": "已锁定流体:", @@ -282,6 +269,7 @@ "gui.enderio.redstone.always_active": "始终工作", "gui.enderio.redstone.mode": "红石模式", "gui.enderio.redstone.never_active": "从不工作", + "gui.enderio.redstone_channel": "Redstone-Channel", "gui.enderio.round_robin.disabled": "轮送禁用", "gui.enderio.round_robin.enabled": "轮送启用", "gui.enderio.sag_mill_chance": "概率:%s%%", @@ -293,6 +281,8 @@ "gui.enderio.spawner.too_many_mob": "生物过多", "gui.enderio.spawner.too_many_spawner": "刷怪笼过多", "gui.enderio.spawner.unknown": "未知生物", + "gui.enderio.visible.false": "隐藏", + "gui.enderio.visible.true": "可见", "guidebook.enderio.book_title": "书名", "guidebook.enderio.landing_text": "文本", "hint.enderio.connected_textures.text": "如果你想让电容库有连接纹理,请在客户端安装Athena模组", @@ -439,6 +429,7 @@ "item.enderio.soularium_ingot": "魂金锭", "item.enderio.soularium_nugget": "魂金粒", "item.enderio.staff_of_levity": "飘浮权杖", + "item.enderio.staff_of_travelling": "旅行权杖", "item.enderio.stone_gear": "石头复合齿轮", "item.enderio.vapor_of_levity_bucket": "轻盈之气桶", "item.enderio.vibrant_alloy_grinding_ball": "振动合金磨珠", From a3860ba7970ca2319bc1a3430ed51254ae20e8a6 Mon Sep 17 00:00:00 2001 From: Reece Mackie <20544390+Rover656@users.noreply.github.com> Date: Sat, 19 Aug 2023 00:45:20 +0100 Subject: [PATCH 129/154] New translations en_us.json (Chinese Traditional) --- .../resources/assets/enderio/lang/zh_tw.json | 495 ++++++++++++++++++ 1 file changed, 495 insertions(+) create mode 100644 src/main/resources/assets/enderio/lang/zh_tw.json diff --git a/src/main/resources/assets/enderio/lang/zh_tw.json b/src/main/resources/assets/enderio/lang/zh_tw.json new file mode 100644 index 0000000000..2a236316ca --- /dev/null +++ b/src/main/resources/assets/enderio/lang/zh_tw.json @@ -0,0 +1,495 @@ +{ + "advancements.enderio.place_capacitor_bank.description": "Build a Capacitor Bank", + "advancements.enderio.place_capacitor_bank.title": "Modular Power Storage", + "advancements.enderio.rich.description": "Make others think you are rich", + "advancements.enderio.rich.title": "Don't tell the others", + "advancements.enderio.richer.description": "Make others think you are richer", + "advancements.enderio.richer.title": "Is this real?", + "advancements.enderio.use_glider.description": "Do you really trust some leather?", + "advancements.enderio.use_glider.title": "Majestic", + "block.enderio.advanced_capacitor_bank": "Advanced Capacitor Bank", + "block.enderio.alloy_smelter": "Alloy Smelter", + "block.enderio.basic_capacitor_bank": "Basic Capacitor Bank", + "block.enderio.clear_glass": "Clear Glass", + "block.enderio.clear_glass_black": "Black Clear Glass", + "block.enderio.clear_glass_blue": "Blue Clear Glass", + "block.enderio.clear_glass_brown": "Brown Clear Glass", + "block.enderio.clear_glass_cyan": "Cyan Clear Glass", + "block.enderio.clear_glass_d": "Dark Clear Glass", + "block.enderio.clear_glass_d_black": "Black Dark Clear Glass", + "block.enderio.clear_glass_d_blue": "Blue Dark Clear Glass", + "block.enderio.clear_glass_d_brown": "Brown Dark Clear Glass", + "block.enderio.clear_glass_d_cyan": "Cyan Dark Clear Glass", + "block.enderio.clear_glass_d_gray": "Gray Dark Clear Glass", + "block.enderio.clear_glass_d_green": "Green Dark Clear Glass", + "block.enderio.clear_glass_d_light_blue": "Light Blue Dark Clear Glass", + "block.enderio.clear_glass_d_light_gray": "Light Gray Dark Clear Glass", + "block.enderio.clear_glass_d_lime": "Lime Dark Clear Glass", + "block.enderio.clear_glass_d_magenta": "Magenta Dark Clear Glass", + "block.enderio.clear_glass_d_orange": "Orange Dark Clear Glass", + "block.enderio.clear_glass_d_pink": "Pink Dark Clear Glass", + "block.enderio.clear_glass_d_purple": "Purple Dark Clear Glass", + "block.enderio.clear_glass_d_red": "Red Dark Clear Glass", + "block.enderio.clear_glass_d_white": "White Dark Clear Glass", + "block.enderio.clear_glass_d_yellow": "Yellow Dark Clear Glass", + "block.enderio.clear_glass_e": "Enlightened Clear Glass", + "block.enderio.clear_glass_e_black": "Black Enlightened Clear Glass", + "block.enderio.clear_glass_e_blue": "Blue Enlightened Clear Glass", + "block.enderio.clear_glass_e_brown": "Brown Enlightened Clear Glass", + "block.enderio.clear_glass_e_cyan": "Cyan Enlightened Clear Glass", + "block.enderio.clear_glass_e_gray": "Gray Enlightened Clear Glass", + "block.enderio.clear_glass_e_green": "Green Enlightened Clear Glass", + "block.enderio.clear_glass_e_light_blue": "Light Blue Enlightened Clear Glass", + "block.enderio.clear_glass_e_light_gray": "Light Gray Enlightened Clear Glass", + "block.enderio.clear_glass_e_lime": "Lime Enlightened Clear Glass", + "block.enderio.clear_glass_e_magenta": "Magenta Enlightened Clear Glass", + "block.enderio.clear_glass_e_orange": "Orange Enlightened Clear Glass", + "block.enderio.clear_glass_e_pink": "Pink Enlightened Clear Glass", + "block.enderio.clear_glass_e_purple": "Purple Enlightened Clear Glass", + "block.enderio.clear_glass_e_red": "Red Enlightened Clear Glass", + "block.enderio.clear_glass_e_white": "White Enlightened Clear Glass", + "block.enderio.clear_glass_e_yellow": "Yellow Enlightened Clear Glass", + "block.enderio.clear_glass_gray": "Gray Clear Glass", + "block.enderio.clear_glass_green": "Green Clear Glass", + "block.enderio.clear_glass_light_blue": "Light Blue Clear Glass", + "block.enderio.clear_glass_light_gray": "Light Gray Clear Glass", + "block.enderio.clear_glass_lime": "Lime Clear Glass", + "block.enderio.clear_glass_magenta": "Magenta Clear Glass", + "block.enderio.clear_glass_orange": "Orange Clear Glass", + "block.enderio.clear_glass_pink": "Pink Clear Glass", + "block.enderio.clear_glass_purple": "Purple Clear Glass", + "block.enderio.clear_glass_red": "Red Clear Glass", + "block.enderio.clear_glass_white": "White Clear Glass", + "block.enderio.clear_glass_yellow": "Yellow Clear Glass", + "block.enderio.cloud_seed": "Cloud Seed", + "block.enderio.cloud_seed_concentrated": "Cloud Seed Concentrated", + "block.enderio.cold_fire": "Cold Fire", + "block.enderio.conductive_alloy_block": "Conductive Alloy Block", + "block.enderio.conduit": "Conduit", + "block.enderio.copper_alloy_block": "Copper Alloy Block", + "block.enderio.crafter": "Crafter", + "block.enderio.creative_power": "Creative Power", + "block.enderio.dark_steel_bars": "Dark Steel Bars", + "block.enderio.dark_steel_block": "Dark Steel Block", + "block.enderio.dark_steel_door": "Dark Steel Door", + "block.enderio.dark_steel_ladder": "Dark Steel Ladder", + "block.enderio.dark_steel_pressure_plate": "Dark Steel Pressure Plate", + "block.enderio.dark_steel_trapdoor": "Dark Steel Trapdoor", + "block.enderio.dew_of_the_void": "Dew Of The Void", + "block.enderio.enchanter": "Enchanter", + "block.enderio.end_steel_bars": "End Steel Bars", + "block.enderio.end_steel_block": "End Steel Block", + "block.enderio.enderman_head": "Enderman Head", + "block.enderio.energetic_alloy_block": "Energetic Alloy Block", + "block.enderio.energetic_photovoltaic_module": "Energetic Photovoltaic Module", + "block.enderio.ensouled_chassis": "Ensouled Chassis", + "block.enderio.fire_water": "Fire Water", + "block.enderio.fluid_tank": "Fluid Tank", + "block.enderio.fused_quartz": "Fused Quartz", + "block.enderio.fused_quartz_black": "Black Fused Quartz", + "block.enderio.fused_quartz_blue": "Blue Fused Quartz", + "block.enderio.fused_quartz_brown": "Brown Fused Quartz", + "block.enderio.fused_quartz_cyan": "Cyan Fused Quartz", + "block.enderio.fused_quartz_d": "Dark Fused Quartz", + "block.enderio.fused_quartz_d_black": "Black Dark Fused Quartz", + "block.enderio.fused_quartz_d_blue": "Blue Dark Fused Quartz", + "block.enderio.fused_quartz_d_brown": "Brown Dark Fused Quartz", + "block.enderio.fused_quartz_d_cyan": "Cyan Dark Fused Quartz", + "block.enderio.fused_quartz_d_gray": "Gray Dark Fused Quartz", + "block.enderio.fused_quartz_d_green": "Green Dark Fused Quartz", + "block.enderio.fused_quartz_d_light_blue": "Light Blue Dark Fused Quartz", + "block.enderio.fused_quartz_d_light_gray": "Light Gray Dark Fused Quartz", + "block.enderio.fused_quartz_d_lime": "Lime Dark Fused Quartz", + "block.enderio.fused_quartz_d_magenta": "Magenta Dark Fused Quartz", + "block.enderio.fused_quartz_d_orange": "Orange Dark Fused Quartz", + "block.enderio.fused_quartz_d_pink": "Pink Dark Fused Quartz", + "block.enderio.fused_quartz_d_purple": "Purple Dark Fused Quartz", + "block.enderio.fused_quartz_d_red": "Red Dark Fused Quartz", + "block.enderio.fused_quartz_d_white": "White Dark Fused Quartz", + "block.enderio.fused_quartz_d_yellow": "Yellow Dark Fused Quartz", + "block.enderio.fused_quartz_e": "Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_black": "Black Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_blue": "Blue Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_brown": "Brown Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_cyan": "Cyan Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_gray": "Gray Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_green": "Green Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_light_blue": "Light Blue Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_light_gray": "Light Gray Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_lime": "Lime Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_magenta": "Magenta Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_orange": "Orange Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_pink": "Pink Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_purple": "Purple Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_red": "Red Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_white": "White Enlightened Fused Quartz", + "block.enderio.fused_quartz_e_yellow": "Yellow Enlightened Fused Quartz", + "block.enderio.fused_quartz_gray": "Gray Fused Quartz", + "block.enderio.fused_quartz_green": "Green Fused Quartz", + "block.enderio.fused_quartz_light_blue": "Light Blue Fused Quartz", + "block.enderio.fused_quartz_light_gray": "Light Gray Fused Quartz", + "block.enderio.fused_quartz_lime": "Lime Fused Quartz", + "block.enderio.fused_quartz_magenta": "Magenta Fused Quartz", + "block.enderio.fused_quartz_orange": "Orange Fused Quartz", + "block.enderio.fused_quartz_pink": "Pink Fused Quartz", + "block.enderio.fused_quartz_purple": "Purple Fused Quartz", + "block.enderio.fused_quartz_red": "Red Fused Quartz", + "block.enderio.fused_quartz_white": "White Fused Quartz", + "block.enderio.fused_quartz_yellow": "Yellow Fused Quartz", + "block.enderio.hootch": "Hootch", + "block.enderio.impulse_hopper": "Impulse Hopper", + "block.enderio.industrial_insulation_block": "Industrial Insulation", + "block.enderio.light": "Light", + "block.enderio.light_inverted": "Light Inverted", + "block.enderio.light_node": "Light Node", + "block.enderio.liquid_sunshine": "Liquid Sunshine", + "block.enderio.nutrient_distillation": "Nutrient Distillation", + "block.enderio.painted_crafting_table": "Painted Crafting Table", + "block.enderio.painted_fence": "Painted Fence", + "block.enderio.painted_fence_gate": "Painted Fence Gate", + "block.enderio.painted_glowstone": "Painted Glowstone", + "block.enderio.painted_redstone_block": "Painted Redstone Block", + "block.enderio.painted_sand": "Painted Sand", + "block.enderio.painted_slab": "Painted Slab", + "block.enderio.painted_stairs": "Painted Stairs", + "block.enderio.painted_trapdoor": "Painted Trapdoor", + "block.enderio.painted_wooden_pressure_plate": "Painted Wooden Pressure Plate", + "block.enderio.painting_machine": "Painting Machine", + "block.enderio.powered_light": "Powered Light", + "block.enderio.powered_light_inverted": "Powered Light Inverted", + "block.enderio.powered_light_inverted_wireless": "Powered Light Inverted Wireless", + "block.enderio.powered_light_wireless": "Powered Light Wireless", + "block.enderio.powered_spawner": "Powered Spawner", + "block.enderio.pressurized_fluid_tank": "Pressurized Fluid Tank", + "block.enderio.primitive_alloy_smelter": "Primitive Alloy Smelter", + "block.enderio.pulsating_alloy_block": "Pulsating Alloy Block", + "block.enderio.pulsating_photovoltaic_module": "Pulsating Photovoltaic Module", + "block.enderio.redstone_alloy_block": "Redstone Alloy Block", + "block.enderio.reinforced_obsidian_block": "Reinforced Obsidian Block", + "block.enderio.resetting_lever_five": "Resetting Lever (5 seconds)", + "block.enderio.resetting_lever_five_inv": "Resetting Lever Inverted (5 seconds)", + "block.enderio.resetting_lever_sixty": "Resetting Lever (1 minute)", + "block.enderio.resetting_lever_sixty_inv": "Resetting Lever Inverted (1 minute)", + "block.enderio.resetting_lever_ten": "Resetting Lever (10 seconds)", + "block.enderio.resetting_lever_ten_inv": "Resetting Lever Inverted (10 seconds)", + "block.enderio.resetting_lever_thirty": "Resetting Lever (30 seconds)", + "block.enderio.resetting_lever_thirty_inv": "Resetting Lever Inverted (30 seconds)", + "block.enderio.resetting_lever_three_hundred": "Resetting Lever (5 minutes)", + "block.enderio.resetting_lever_three_hundred_inv": "Resetting Lever Inverted (5 minutes)", + "block.enderio.rocket_fuel": "Rocket Fuel", + "block.enderio.sag_mill": "SAG Mill", + "block.enderio.silent_acacia_pressure_plate": "Silent Acacia Pressure Plate", + "block.enderio.silent_birch_pressure_plate": "Silent Birch Pressure Plate", + "block.enderio.silent_crimson_pressure_plate": "Silent Crimson Pressure Plate", + "block.enderio.silent_dark_oak_pressure_plate": "Silent Dark Oak Pressure Plate", + "block.enderio.silent_dark_steel_pressure_plate": "Silent Dark Steel Pressure Plate", + "block.enderio.silent_heavy_weighted_pressure_plate": "Silent Heavy Weighted Pressure Plate", + "block.enderio.silent_jungle_pressure_plate": "Silent Jungle Pressure Plate", + "block.enderio.silent_light_weighted_pressure_plate": "Silent Light Weighted Pressure Plate", + "block.enderio.silent_oak_pressure_plate": "Silent Oak Pressure Plate", + "block.enderio.silent_polished_blackstone_pressure_plate": "Silent Polished Blackstone Pressure Plate", + "block.enderio.silent_soularium_pressure_plate": "Silent Soularium Pressure Plate", + "block.enderio.silent_spruce_pressure_plate": "Silent Spruce Pressure Plate", + "block.enderio.silent_stone_pressure_plate": "Silent Stone Pressure Plate", + "block.enderio.silent_warped_pressure_plate": "Silent Warped Pressure Plate", + "block.enderio.slice_and_splice": "Slice'N'Splice", + "block.enderio.soul_binder": "Soul Binder", + "block.enderio.soul_chain": "Soul Chain", + "block.enderio.soularium_block": "Soularium Block", + "block.enderio.soularium_pressure_plate": "Soularium Pressure Plate", + "block.enderio.stirling_generator": "Stirling Generator", + "block.enderio.travel_anchor": "Travel Anchor", + "block.enderio.vacuum_chest": "Vacuum Chest", + "block.enderio.vapor_of_levity": "Vapor Of Levity", + "block.enderio.vibrant_alloy_block": "Vibrant Alloy Block", + "block.enderio.vibrant_capacitor_bank": "Vibrant Capacitor Bank", + "block.enderio.vibrant_photovoltaic_module": "Vibrant Photovoltaic Module", + "block.enderio.void_chassis": "Void Chassis", + "block.enderio.wired_charger": "Wired Charger", + "block.enderio.xp_juice": "Xp Juice", + "block.enderio.xp_vacuum": "Xp Vacuum", + "enchantment.enderio.auto_smelt": "Auto Smelt", + "enchantment.enderio.auto_smelt.desc": "Automatically smelts whatever is mined.", + "enchantment.enderio.repellent": "Repellent", + "enchantment.enderio.repellent.desc": "Chance to teleport attackers away. Higher levels teleport more often and farther.", + "enchantment.enderio.shimmer": "Shimmer", + "enchantment.enderio.shimmer.desc": "Makes the item shimmer as if it was enchanted... That's all... Really...", + "enchantment.enderio.soulbound": "Soulbound", + "enchantment.enderio.soulbound.desc": "Prevents item from being lost on death. Note: Most gravestone mods are stupid and prevent this from working!", + "enchantment.enderio.withering": "Withering", + "enchantment.enderio.withering.desc": "Applies wither to the target.", + "enchantment.enderio.withering.type": "Applies to bladed weapons, bows and crossbows.", + "enchantment.enderio.xp_boost": "XP Boost", + "enchantment.enderio.xp_boost.desc": "Extra XP from mobs and blocks", + "entity.enderio.painted_sand": "Painted Sand", + "fluid.enderio.cloud_seed": "Cloud Seed", + "fluid.enderio.cloud_seed_concentrated": "Cloud Seed Concentrated", + "fluid.enderio.dew_of_the_void": "Fluid of the Void", + "fluid.enderio.fire_water": "Fire Water", + "fluid.enderio.hootch": "Hootch", + "fluid.enderio.liquid_sunshine": "Liquid Sunshine", + "fluid.enderio.nutrient_distillation": "Nutrient Distillation", + "fluid.enderio.rocket_fuel": "Rocket Fuel", + "fluid.enderio.vapor_of_levity": "Vapor Of Levity", + "fluid.enderio.xp_juice": "Xp Juice", + "gui.enderio.alloy_smelter.mode": "Smelting Mode", + "gui.enderio.alloy_smelter.mode_all": "Alloying and Smelting", + "gui.enderio.alloy_smelter.mode_alloy": "Alloys Only", + "gui.enderio.alloy_smelter.mode_furnace": "Furnace Only", + "gui.enderio.category.alloy_smelting": "Alloy Smelting", + "gui.enderio.category.enchanter": "Enchanting", + "gui.enderio.category.primitive_alloy_smelting": "Primitive Alloy Smelting", + "gui.enderio.category.sag_mill": "SAG Mill", + "gui.enderio.category.slicing": "Slicing", + "gui.enderio.category.soul_binding": "Soul Binding", + "gui.enderio.category.tank": "Fluid Tank", + "gui.enderio.conduit.extract": "Extract", + "gui.enderio.conduit.insert": "Insert", + "gui.enderio.conduit_channel": "Conduit-Channel", + "gui.enderio.energy_equivalence": "A unit of energy, equivalent to FE.", + "gui.enderio.filter": "Filter", + "gui.enderio.fluid_conduit.change_fluid1": "Locked Fluid:", + "gui.enderio.fluid_conduit.change_fluid2": "Click to reset!", + "gui.enderio.fluid_conduit.change_fluid3": "Fluid: %s", + "gui.enderio.ioconfig": "IO Configuration", + "gui.enderio.ioconfig.both": "Push / Pull", + "gui.enderio.ioconfig.disabled": "Disabled", + "gui.enderio.ioconfig.neighbour": "Show/Hide Neighbours", + "gui.enderio.ioconfig.none": "None", + "gui.enderio.ioconfig.pull": "Pull", + "gui.enderio.ioconfig.push": "Push", + "gui.enderio.nocap.desc": "Insert any capacitor so \n this machine can work!", + "gui.enderio.nocap.title": "Capacitor Missing", + "gui.enderio.progress": "Progress %s%%", + "gui.enderio.range": "Range", + "gui.enderio.range.hide": "Hide Range", + "gui.enderio.range.show": "Show Range", + "gui.enderio.redstone.active_with_signal": "Active with signal", + "gui.enderio.redstone.active_without_signal": "Active without signal", + "gui.enderio.redstone.always_active": "Always active", + "gui.enderio.redstone.mode": "Redstone Mode", + "gui.enderio.redstone.never_active": "Never active", + "gui.enderio.redstone_channel": "Redstone-Channel", + "gui.enderio.round_robin.disabled": "Round Robin Disabled", + "gui.enderio.round_robin.enabled": "Round Robin Enabled", + "gui.enderio.sag_mill_chance": "Chance: %s%%", + "gui.enderio.sag_mill_chance_ball": "Chance: %s%% (modified by grinding ball)", + "gui.enderio.self_feed.disabled": "Self Feed Disabled", + "gui.enderio.self_feed.enabled": "Self Feed Enabled", + "gui.enderio.spawner.disabled": "Disabled by config", + "gui.enderio.spawner.other_mod": "Other mod", + "gui.enderio.spawner.too_many_mob": "Too many mobs", + "gui.enderio.spawner.too_many_spawner": "Too many spawners", + "gui.enderio.spawner.unknown": "Unknown mob", + "gui.enderio.visible.false": "Hidden", + "gui.enderio.visible.true": "Visible", + "guidebook.enderio.book_title": "Book Title", + "guidebook.enderio.landing_text": "Landing Text", + "hint.enderio.connected_textures.text": "If you are looking for connected textures on the capacitor bank, you might want to install Athena on your client", + "info.enderio.coordinate_selector.no_block": "No block in range", + "info.enderio.coordinate_selector.no_paper": "No paper in inventory", + "info.enderio.darksteel.upgrade.activate": "Right Click to Activate", + "info.enderio.darksteel.upgrade.available": "Available Upgrades", + "info.enderio.darksteel.upgrade.cost": "Costs %s Levels", + "info.enderio.darksteel.upgrade.direct": "Direct", + "info.enderio.darksteel.upgrade.direct.description": "Teleports harvested items directly into your inventory", + "info.enderio.darksteel.upgrade.empowered.absorption": "%s%% damage absorbed by µI", + "info.enderio.darksteel.upgrade.empowered.description": "Infuse the steel with the power of Micro Infinity", + "info.enderio.darksteel.upgrade.empowered.efficiency": "Efficiency +%s when powered", + "info.enderio.darksteel.upgrade.empowered.obsidian.efficiency": "Efficiency +%s when breaking obsidian", + "info.enderio.darksteel.upgrade.empowered.storage": "Holds up to %s µI", + "info.enderio.darksteel.upgrade.empowered_l1": "Empowered", + "info.enderio.darksteel.upgrade.empowered_l2": "Empowered II", + "info.enderio.darksteel.upgrade.empowered_l3": "Empowered III", + "info.enderio.darksteel.upgrade.empowered_l4": "Empowered IV", + "info.enderio.darksteel.upgrade.explosive.description": "Makes surrounding dirt and rock go splodey", + "info.enderio.darksteel.upgrade.explosive_l1": "Explosive I", + "info.enderio.darksteel.upgrade.explosive_l2": "Explosive II", + "info.enderio.darksteel.upgrade.explosive_penetration.description": "Makes dirt and rock behind the mined block go splodey", + "info.enderio.darksteel.upgrade.explosive_penetration_l1": "Explosive Penetration I", + "info.enderio.darksteel.upgrade.explosive_penetration_l2": "Explosive Penetration II", + "info.enderio.darksteel.upgrade.fork": "Fork", + "info.enderio.darksteel.upgrade.fork.description": "Who needs a hoe when you have a fork?", + "info.enderio.darksteel.upgrade.no_xp": "Not enough XP", + "info.enderio.darksteel.upgrade.spoon": "Spoon", + "info.enderio.darksteel.upgrade.spoon.description": "Who needs a shovel when you have a spoon?", + "info.enderio.durability.amount": "Durability %s", + "info.enderio.energy.amount": "%s µI", + "info.enderio.headchance": "%s%% chance to drop a mob head", + "info.enderio.too_many_levels": "You have more than 21862 levels, that's too much XP.", + "item.enderio.animal_token": "Animal Token", + "item.enderio.basic_capacitor": "Basic Capacitor", + "item.enderio.black_paper": "Black Paper", + "item.enderio.broken_spawner": "Broken Spawner", + "item.enderio.cake_base": "Cake Base", + "item.enderio.clayed_glowstone": "Clayed Glowstone", + "item.enderio.cloud_seed_bucket": "Cloud Seed Bucket", + "item.enderio.cloud_seed_concentrated_bucket": "Cloud Seed Concentrated Bucket", + "item.enderio.cold_fire_igniter": "Cold Fire Igniter", + "item.enderio.conductive_alloy_grinding_ball": "Conductive Alloy Grinding Ball", + "item.enderio.conductive_alloy_ingot": "Conductive Alloy Ingot", + "item.enderio.conductive_alloy_nugget": "Conductive Alloy Nugget", + "item.enderio.conduit_binder": "Conduit Binder", + "item.enderio.conduit_binder_composite": "Conduit Binder Composite", + "item.enderio.confusing_powder": "Confusing Powder", + "item.enderio.coordinate_selector": "Coordinate Selector", + "item.enderio.copper_alloy_grinding_ball": "Copper Alloy Grinding Ball", + "item.enderio.copper_alloy_ingot": "Copper Alloy Ingot", + "item.enderio.copper_alloy_nugget": "Copper Alloy Nugget", + "item.enderio.dark_bimetal_gear": "Dark Bimetal Gear", + "item.enderio.dark_steel_grinding_ball": "Dark Steel Grinding Ball", + "item.enderio.dark_steel_ingot": "Dark Steel Ingot", + "item.enderio.dark_steel_nugget": "Dark Steel Nugget", + "item.enderio.dark_steel_sword": "The Ender", + "item.enderio.dense_me_conduit": "Dense ME Conduit", + "item.enderio.dew_of_the_void_bucket": "Dew Of The Void Bucket", + "item.enderio.double_layer_capacitor": "Double Layer Capacitor", + "item.enderio.electromagnet": "Electromagnet", + "item.enderio.empty_soul_vial": "Empty Soul Vial", + "item.enderio.end_steel_grinding_ball": "End Steel Grinding Ball", + "item.enderio.end_steel_ingot": "End Steel Ingot", + "item.enderio.end_steel_nugget": "End Steel Nugget", + "item.enderio.ender_crystal": "Ender Crystal", + "item.enderio.ender_crystal_powder": "Grains of the End", + "item.enderio.ender_fluid_conduit": "Ender Fluid Conduit", + "item.enderio.ender_resonator": "Ender Resonator", + "item.enderio.enderface_conduits": "Enderface Conduits", + "item.enderio.enderface_invpanel": "Enderface Invpanel", + "item.enderio.enderface_items": "Enderface Items", + "item.enderio.enderface_machines": "Enderface Machines", + "item.enderio.enderface_materials": "Enderface Materials", + "item.enderio.enderface_mobs": "Enderface Mobs", + "item.enderio.enderface_none": "Enderface None", + "item.enderio.enderios": "\"Enderios\"", + "item.enderio.energetic_alloy_grinding_ball": "Energetic Alloy Grinding Ball", + "item.enderio.energetic_alloy_ingot": "Energetic Alloy Ingot", + "item.enderio.energetic_alloy_nugget": "Energetic Alloy Nugget", + "item.enderio.energized_gear": "Energized Bimetal Gear", + "item.enderio.energy_conduit": "Energy Conduit", + "item.enderio.enticing_crystal": "Enticing Crystal", + "item.enderio.experience_rod": "Experience Rod", + "item.enderio.filled_soul_vial": "Filled Soul Vial", + "item.enderio.fire_water_bucket": "Fire Water Bucket", + "item.enderio.flour": "Flour", + "item.enderio.fluid_conduit": "Fluid Conduit", + "item.enderio.frank_n_zombie": "Frank'N'Zombie", + "item.enderio.glider_wing": "Glider Wing", + "item.enderio.grains_of_infinity": "Grains of Infinity", + "item.enderio.guardian_diode": "Guardian Diode", + "item.enderio.hootch_bucket": "Hootch Bucket", + "item.enderio.infinity_rod": "Infinity Rod", + "item.enderio.iron_gear": "Infinity Bimetal Gear", + "item.enderio.item_conduit": "Item Conduit", + "item.enderio.liquid_sunshine_bucket": "Liquid Sunshine Bucket", + "item.enderio.location_printout": "Location Printout", + "item.enderio.loot_capacitor": "Loot Capacitor", + "item.enderio.me_conduit": "ME Conduit", + "item.enderio.monster_token": "Monster Token", + "item.enderio.nethercotta": "Nethercotta", + "item.enderio.nutrient_distillation_bucket": "Nutrient Distillation Bucket", + "item.enderio.nutritious_stick": "Nutritious Stick", + "item.enderio.octadic_capacitor": "Octadic Capacitor", + "item.enderio.organic_black_dye": "Organic Black Dye", + "item.enderio.organic_brown_dye": "Organic Brown Dye", + "item.enderio.organic_green_dye": "Organic Green Dye", + "item.enderio.photovoltaic_composite": "Photovoltaic Composite", + "item.enderio.photovoltaic_plate": "Photovoltaic Plate", + "item.enderio.plant_matter_brown": "Twigs and Prunings", + "item.enderio.plant_matter_green": "Clippings and Trimmings", + "item.enderio.player_token": "Player Token", + "item.enderio.powdered_coal": "Powdered Coal", + "item.enderio.powdered_cobalt": "Powdered Cobalt", + "item.enderio.powdered_copper": "Powdered Copper", + "item.enderio.powdered_ender_pearl": "Powdered Ender Pearl", + "item.enderio.powdered_gold": "Powdered Gold", + "item.enderio.powdered_iron": "Powdered Iron", + "item.enderio.powdered_lapis_lazuli": "Powdered Lapis Lazuli", + "item.enderio.powdered_obsidian": "Powdered Obsidian", + "item.enderio.powdered_quartz": "Powdered Quartz", + "item.enderio.powdered_tin": "Powdered Tin", + "item.enderio.prescient_crystal": "Prescient Crystal", + "item.enderio.prescient_powder": "Grains of Prescience", + "item.enderio.pressurized_fluid_conduit": "Pressurized Fluid Conduit", + "item.enderio.pulsating_alloy_grinding_ball": "Pulsating Alloy Grinding Ball", + "item.enderio.pulsating_alloy_ingot": "Pulsating Alloy Ingot", + "item.enderio.pulsating_alloy_nugget": "Pulsating Alloy Nugget", + "item.enderio.pulsating_crystal": "Pulsating Crystal", + "item.enderio.pulsating_powder": "Grains of Piezallity", + "item.enderio.redstone_alloy_grinding_ball": "Redstone Alloy Grinding Ball", + "item.enderio.redstone_alloy_ingot": "Redstone Alloy Ingot", + "item.enderio.redstone_alloy_nugget": "Redstone Alloy Nugget", + "item.enderio.redstone_conduit": "Redstone Conduit", + "item.enderio.redstone_filter_base": "Redstone Filter Base", + "item.enderio.rocket_fuel_bucket": "Rocket Fuel Bucket", + "item.enderio.sentient_ender": "Sentient Ender", + "item.enderio.silicon": "Silicon", + "item.enderio.skeletal_contractor": "Skeletal Contractor", + "item.enderio.soul_powder": "Soul Powder", + "item.enderio.soularium_grinding_ball": "Soularium Grinding Ball", + "item.enderio.soularium_ingot": "Soularium Ingot", + "item.enderio.soularium_nugget": "Soularium Nugget", + "item.enderio.staff_of_levity": "Staff Of Levity", + "item.enderio.staff_of_travelling": "Staff Of Travelling", + "item.enderio.stone_gear": "Stone Compound Gear", + "item.enderio.vapor_of_levity_bucket": "Vapor Of Levity Bucket", + "item.enderio.vibrant_alloy_grinding_ball": "Vibrant Alloy Grinding Ball", + "item.enderio.vibrant_alloy_ingot": "Vibrant Alloy Ingot", + "item.enderio.vibrant_alloy_nugget": "Vibrant Alloy Nugget", + "item.enderio.vibrant_crystal": "Vibrant Crystal", + "item.enderio.vibrant_gear": "Vibrant Bimetal Gear", + "item.enderio.vibrant_powder": "Grains of Vibrancy", + "item.enderio.weather_crystal": "Weather Crystal", + "item.enderio.withering_powder": "Withering Powder", + "item.enderio.wood_gear": "Wooden Gear", + "item.enderio.xp_juice_bucket": "Xp Juice Bucket", + "item.enderio.yeta_wrench": "Yeta Wrench", + "item.enderio.z_logic_controller": "Z-Logic Controller", + "item.enderio.zombie_electrode": "Zombie Electrode", + "itemGroup.enderio.blocks": "Ender IO Blocks", + "itemGroup.enderio.conduits": "Ender IO Conduits", + "itemGroup.enderio.gear": "Ender IO Gear", + "itemGroup.enderio.machines": "Ender IO Machines", + "itemGroup.enderio.main": "Ender IO", + "itemGroup.enderio.souls": "Ender IO Souls", + "jei.enderio.fire_crafting.title": "Fire Crafting", + "jei.enderio.fire_crafting.valid_blocks": "Valid Blocks:", + "jei.enderio.fire_crafting.valid_dimensions": "Valid Dimensions:", + "jei.enderio.grinding.consume_chance": "33% chance to be consumed", + "jei.enderio.grinding.hand_grinding_coal": "Hold some flint in your offhand and 3 or more coal in your main hand, then shift right-click a block of obsidian, crying obsidian or a grindstone to produce early powdered coal.", + "jei.enderio.grinding.hand_grinding_infinity": "Hold some flint in your offhand and some deepslate or cobbled deepslate in your main hand, then shift right-click a block of obsidian, crying obsidian or a grindstone to produce early grains of infinity.", + "jei.enderio.grinding.title": "Grinding", + "message.enderio.glider.disable": "Gliding is disabled: ", + "message.enderio.glider.disable.fall_flying": "Elytra Flight", + "message.enderio.grave.wrong_owner": "This grave is not yours! You cannot open it.", + "message.enderio.soul_vial.error_blacklisted": "This entity has been blacklisted.", + "message.enderio.soul_vial.error_boss": "Nice try. Bosses don't like bottles.", + "message.enderio.soul_vial.error_dead": "Cannot capture a dead mob!", + "message.enderio.soul_vial.error_failed": "This entity cannot be captured.", + "message.enderio.soul_vial.error_player": "You cannot put player in a bottle!", + "tooltip.enderio.block.blast_resistant": "Blast resistant", + "tooltip.enderio.capacitor.base": "Base Modifier: %s", + "tooltip.enderio.capacitor.energy_capacity": "Energy Capacity Modifier: %s", + "tooltip.enderio.capacitor.energy_use": "Energy Use Modifier: %s", + "tooltip.enderio.collision.animals_block": "Only solid to animals", + "tooltip.enderio.collision.animals_pass": "Not solid to animals", + "tooltip.enderio.collision.mobs_block": "Only solid to monsters", + "tooltip.enderio.collision.mobs_pass": "Not solid to monsters", + "tooltip.enderio.collision.players_block": "Only solid to players", + "tooltip.enderio.collision.players_pass": "Not solid to players", + "tooltip.enderio.dark_steel_ladder.faster": "Faster than regular ladders", + "tooltip.enderio.fluid_tank.tank_empty_tooltip": "Empty tank", + "tooltip.enderio.fluid_tank.tank_tooltip": "%d/%d mb of %s", + "tooltip.enderio.fused_quartz.blocks_light": "Blocks light", + "tooltip.enderio.fused_quartz.emits_light": "Emits light", + "tooltip.enderio.grinding_ball_bonus_output": "Bonus Output %s%%", + "tooltip.enderio.grinding_ball_main_output": "Main Output %s%%", + "tooltip.enderio.grinding_ball_power_use": "Power Use %s%%", + "tooltip.enderio.grinding_ball_remaining": "Remaining: %s%%", + "tooltip.enderio.grinding_ball_title": "SAG Mill Grinding Ball", + "tooltip.enderio.gui.show_advanced_tooltip": "", + "tooltip.enderio.photovoltaic_cell.advanced": "Produces Power during daylight hours", + "tooltip.enderio.photovoltaic_cell.advanced2": "Must have a clear line of sight to the sky", + "tooltip.enderio.photovoltaic_cell.advanced3": "Max Output: ", + "tooltip.enderio.photovoltaic_cell.main": "Solar Power!", + "tooltip.enderio.soul_vial.health": "Health: %s/%s" +} \ No newline at end of file From 053fb46176da4f6ebd60551af2815fa48906edc3 Mon Sep 17 00:00:00 2001 From: Reece Mackie <20544390+Rover656@users.noreply.github.com> Date: Sat, 19 Aug 2023 00:45:21 +0100 Subject: [PATCH 130/154] New translations en_us.json (Indonesian) --- .../resources/assets/enderio/lang/id_id.json | 495 ++++++++++++++++++ 1 file changed, 495 insertions(+) create mode 100644 src/main/resources/assets/enderio/lang/id_id.json diff --git a/src/main/resources/assets/enderio/lang/id_id.json b/src/main/resources/assets/enderio/lang/id_id.json new file mode 100644 index 0000000000..1162e206f6 --- /dev/null +++ b/src/main/resources/assets/enderio/lang/id_id.json @@ -0,0 +1,495 @@ +{ + "advancements.enderio.place_capacitor_bank.description": "Bangun Panel Kapasitor Bank", + "advancements.enderio.place_capacitor_bank.title": "Penyimpanan Daya Modular", + "advancements.enderio.rich.description": "Membuat orang lain berpikir kalau anda kaya", + "advancements.enderio.rich.title": "Jangan bilang ke orang lain", + "advancements.enderio.richer.description": "Membuat orang lain berpikir kalau anda lebih kaya", + "advancements.enderio.richer.title": "Apakah ini nyata?", + "advancements.enderio.use_glider.description": "Apakah anda benar-benar mempercayai kulit?", + "advancements.enderio.use_glider.title": "Megah", + "block.enderio.advanced_capacitor_bank": "Panel Kapasitor Bank Tingkat Canggih", + "block.enderio.alloy_smelter": "Pelebur Logam Paduan", + "block.enderio.basic_capacitor_bank": "Panel Kapasitor Bank Tingkat Dasar", + "block.enderio.clear_glass": "Kaca Bening", + "block.enderio.clear_glass_black": "Kaca Bening Hitam", + "block.enderio.clear_glass_blue": "Kaca Bening Biru", + "block.enderio.clear_glass_brown": "Kaca Bening Cokelat", + "block.enderio.clear_glass_cyan": "Kaca Bening Sian", + "block.enderio.clear_glass_d": "Kaca Bening Gelap", + "block.enderio.clear_glass_d_black": "Kaca Bening Gelap Hitam", + "block.enderio.clear_glass_d_blue": "Kaca Bening Gelap Biru", + "block.enderio.clear_glass_d_brown": "Kaca Bening Gelap Cokelat", + "block.enderio.clear_glass_d_cyan": "Kaca Bening Gelap Sian", + "block.enderio.clear_glass_d_gray": "Kaca Bening Gelap Abu-abu", + "block.enderio.clear_glass_d_green": "Kaca Bening Gelap Hijau", + "block.enderio.clear_glass_d_light_blue": "Kaca Bening Gelap Biru Muda", + "block.enderio.clear_glass_d_light_gray": "Kaca Bening Gelap Abu-abu Muda", + "block.enderio.clear_glass_d_lime": "Kaca Bening Gelap Limau", + "block.enderio.clear_glass_d_magenta": "Kaca Bening Gelap Magenta", + "block.enderio.clear_glass_d_orange": "Kaca Bening Gelap Jingga", + "block.enderio.clear_glass_d_pink": "Kaca Bening Gelap Merah Muda", + "block.enderio.clear_glass_d_purple": "Kaca Bening Gelap Ungu", + "block.enderio.clear_glass_d_red": "Kaca Bening Gelap Merah", + "block.enderio.clear_glass_d_white": "Kaca Bening Gelap Putih", + "block.enderio.clear_glass_d_yellow": "Kaca Bening Gelap Kuning", + "block.enderio.clear_glass_e": "Kaca Bening Bersinar", + "block.enderio.clear_glass_e_black": "Kaca Bening Bersinar Hitam", + "block.enderio.clear_glass_e_blue": "Kaca Bening Bersinar Biru", + "block.enderio.clear_glass_e_brown": "Kaca Bening Bersinar Cokelat", + "block.enderio.clear_glass_e_cyan": "Kaca Bening Bersinar Sian", + "block.enderio.clear_glass_e_gray": "Kaca Bening Bersinar Abu-abu", + "block.enderio.clear_glass_e_green": "Kaca Bening Bersinar Hijau", + "block.enderio.clear_glass_e_light_blue": "Kaca Bening Bersinar Biru Muda", + "block.enderio.clear_glass_e_light_gray": "Kaca Bening Bersinar Abu-abu Muda", + "block.enderio.clear_glass_e_lime": "Kaca Bening Bersinar Limau", + "block.enderio.clear_glass_e_magenta": "Kaca Bening Bersinar Magenta", + "block.enderio.clear_glass_e_orange": "Kaca Bening Bersinar Jingga", + "block.enderio.clear_glass_e_pink": "Kaca Bening Bersinar Merah Muda", + "block.enderio.clear_glass_e_purple": "Kaca Bening Bersinar Ungu", + "block.enderio.clear_glass_e_red": "Kaca Bening Bersinar Merah", + "block.enderio.clear_glass_e_white": "Kaca Bening Bersinar Putih", + "block.enderio.clear_glass_e_yellow": "Kaca Bening Bersinar Kuning", + "block.enderio.clear_glass_gray": "Kaca Bening Abu-abu", + "block.enderio.clear_glass_green": "Kaca Bening Hijau", + "block.enderio.clear_glass_light_blue": "Kaca Bening Biru Muda", + "block.enderio.clear_glass_light_gray": "Kaca Bening Abu-abu Muda", + "block.enderio.clear_glass_lime": "Kaca Bening Limau", + "block.enderio.clear_glass_magenta": "Kaca Bening Magenta", + "block.enderio.clear_glass_orange": "Kaca Bening Jingga", + "block.enderio.clear_glass_pink": "Kaca Bening Merah Muda", + "block.enderio.clear_glass_purple": "Kaca Bening Ungu", + "block.enderio.clear_glass_red": "Kaca Bening Merah", + "block.enderio.clear_glass_white": "Kaca Bening Putih", + "block.enderio.clear_glass_yellow": "Kaca Bening Kuning", + "block.enderio.cloud_seed": "Biji Awan", + "block.enderio.cloud_seed_concentrated": "Biji Awan Terkonsentrasi", + "block.enderio.cold_fire": "Api Dingin", + "block.enderio.conductive_alloy_block": "Balok Logam Paduan Konduktif", + "block.enderio.conduit": "Kabel", + "block.enderio.copper_alloy_block": "Balok Logam Paduan Tembaga", + "block.enderio.crafter": "Perajin", + "block.enderio.creative_power": "Daya Kreatif", + "block.enderio.dark_steel_bars": "Batang Baja Gelap", + "block.enderio.dark_steel_block": "Balok Baja Gelap", + "block.enderio.dark_steel_door": "Pintu Baja Gelap", + "block.enderio.dark_steel_ladder": "Tangga Baja Gelap", + "block.enderio.dark_steel_pressure_plate": "Pelat Tekanan Baja Gelap", + "block.enderio.dark_steel_trapdoor": "Pintu Perangkap Baja Gelap", + "block.enderio.dew_of_the_void": "Embun Kehampaan", + "block.enderio.enchanter": "Pengenchant", + "block.enderio.end_steel_bars": "Batang Baja Akhir", + "block.enderio.end_steel_block": "Balok Baja Akhir", + "block.enderio.enderman_head": "Kepala Enderman", + "block.enderio.energetic_alloy_block": "Balok Logam Paduan Energetik", + "block.enderio.energetic_photovoltaic_module": "Modul Fotovoltaik Energetik", + "block.enderio.ensouled_chassis": "Kerangka Berjiwa", + "block.enderio.fire_water": "Air Api", + "block.enderio.fluid_tank": "Tangki Cairan", + "block.enderio.fused_quartz": "Kaca Kuarsa", + "block.enderio.fused_quartz_black": "Kaca Kuarsa Hitam", + "block.enderio.fused_quartz_blue": "Kaca Kuarsa Biru", + "block.enderio.fused_quartz_brown": "Kaca Kuarsa Cokelat", + "block.enderio.fused_quartz_cyan": "Kaca Kuarsa Sian", + "block.enderio.fused_quartz_d": "Kaca Kuarsa Gelap", + "block.enderio.fused_quartz_d_black": "Kaca Kuarsa Gelap Hitam", + "block.enderio.fused_quartz_d_blue": "Kaca Kuarsa Gelap Biru", + "block.enderio.fused_quartz_d_brown": "Kaca Kuarsa Gelap Cokelat", + "block.enderio.fused_quartz_d_cyan": "Kaca Kuarsa Gelap Sian", + "block.enderio.fused_quartz_d_gray": "Kaca Kuarsa Gelap Abu-abu", + "block.enderio.fused_quartz_d_green": "Kaca Kuarsa Gelap Hijau", + "block.enderio.fused_quartz_d_light_blue": "Kaca Kuarsa Gelap Biru Muda", + "block.enderio.fused_quartz_d_light_gray": "Kaca Kuarsa Gelap Abu-abu Muda", + "block.enderio.fused_quartz_d_lime": "Kaca Kuarsa Gelap Limau", + "block.enderio.fused_quartz_d_magenta": "Kaca Kuarsa Gelap Magenta", + "block.enderio.fused_quartz_d_orange": "Kaca Kuarsa Gelap Jingga", + "block.enderio.fused_quartz_d_pink": "Kaca Kuarsa Gelap Merah Muda", + "block.enderio.fused_quartz_d_purple": "Kaca Kuarsa Gelap Ungu", + "block.enderio.fused_quartz_d_red": "Kaca Kuarsa Gelap Merah", + "block.enderio.fused_quartz_d_white": "Kaca Kuarsa Gelap Putih", + "block.enderio.fused_quartz_d_yellow": "Kaca Kuarsa Gelap Kuning", + "block.enderio.fused_quartz_e": "Kaca Kuarsa Bersinar", + "block.enderio.fused_quartz_e_black": "Kaca Kuarsa Bersinar Hitam", + "block.enderio.fused_quartz_e_blue": "Kaca Kuarsa Bersinar Biru", + "block.enderio.fused_quartz_e_brown": "Kaca Kuarsa Bersinar Cokelat", + "block.enderio.fused_quartz_e_cyan": "Kaca Kuarsa Bersinar Sian", + "block.enderio.fused_quartz_e_gray": "Kaca Kuarsa Bersinar Abu-abu", + "block.enderio.fused_quartz_e_green": "Kaca Kuarsa Bersinar Hijau", + "block.enderio.fused_quartz_e_light_blue": "Kaca Kuarsa Bersinar Biru Muda", + "block.enderio.fused_quartz_e_light_gray": "Kaca Kuarsa Bersinar Abu-abu Muda", + "block.enderio.fused_quartz_e_lime": "Kaca Kuarsa Bersinar Limau", + "block.enderio.fused_quartz_e_magenta": "Kaca Kuarsa Bersinar Magenta", + "block.enderio.fused_quartz_e_orange": "Kaca Kuarsa Bersinar Jingga", + "block.enderio.fused_quartz_e_pink": "Kaca Kuarsa Bersinar Merah Muda", + "block.enderio.fused_quartz_e_purple": "Kaca Kuarsa Bersinar Ungu", + "block.enderio.fused_quartz_e_red": "Kaca Kuarsa Bersinar Merah", + "block.enderio.fused_quartz_e_white": "Kaca Kuarsa Bersinar Putih", + "block.enderio.fused_quartz_e_yellow": "Kaca Kuarsa Bersinar Kuning", + "block.enderio.fused_quartz_gray": "Kaca Kuarsa Abu-abu", + "block.enderio.fused_quartz_green": "Kaca Kuarsa Hijau", + "block.enderio.fused_quartz_light_blue": "Kaca Kuarsa Biru Muda", + "block.enderio.fused_quartz_light_gray": "Kaca Kuarsa Abu-abu Muda", + "block.enderio.fused_quartz_lime": "Kaca Kuarsa Jingga", + "block.enderio.fused_quartz_magenta": "Kaca Kuarsa Magenta", + "block.enderio.fused_quartz_orange": "Kaca Kuarsa Jingga", + "block.enderio.fused_quartz_pink": "Kaca Kuarsa Merah Muda", + "block.enderio.fused_quartz_purple": "Kaca Kuarsa Ungu", + "block.enderio.fused_quartz_red": "Kaca Kuarsa Merah", + "block.enderio.fused_quartz_white": "Kaca Kuarsa Putih", + "block.enderio.fused_quartz_yellow": "Kaca Kuarsa Kuning", + "block.enderio.hootch": "Alkohol", + "block.enderio.impulse_hopper": "Hopper Impuls", + "block.enderio.industrial_insulation_block": "Insulasi Industri", + "block.enderio.light": "Cahaya", + "block.enderio.light_inverted": "Cahaya Terbalik", + "block.enderio.light_node": "Simpul Cahaya", + "block.enderio.liquid_sunshine": "Sinar Matahari Cair", + "block.enderio.nutrient_distillation": "Penyulingan Nutrisi", + "block.enderio.painted_crafting_table": "Meja Kerajinan Dicat", + "block.enderio.painted_fence": "Pagar Dicat", + "block.enderio.painted_fence_gate": "Gerbang Pagar Dicat", + "block.enderio.painted_glowstone": "Glowstone Dicat", + "block.enderio.painted_redstone_block": "Balok Redstone Dicat", + "block.enderio.painted_sand": "Pasir Dicat", + "block.enderio.painted_slab": "Lempeng Dicat", + "block.enderio.painted_stairs": "Tangga Dicat", + "block.enderio.painted_trapdoor": "Pintu Perangkap Dicat", + "block.enderio.painted_wooden_pressure_plate": "Pelat Tekanan Kayu Dicat", + "block.enderio.painting_machine": "Mesin Pewarna", + "block.enderio.powered_light": "Cahaya Berdaya", + "block.enderio.powered_light_inverted": "Cahaya Berdaya Terbalik", + "block.enderio.powered_light_inverted_wireless": "Cahaya Berdaya Terbalik Wireless", + "block.enderio.powered_light_wireless": "Cahaya Berdaya Wireless", + "block.enderio.powered_spawner": "Spawner Berdaya", + "block.enderio.pressurized_fluid_tank": "Tangki Cairan Bertekanan", + "block.enderio.primitive_alloy_smelter": "Pelebur Logam Paduan Primitif", + "block.enderio.pulsating_alloy_block": "Balok Logam Paduan Berdenyut", + "block.enderio.pulsating_photovoltaic_module": "Module Fotovoltaik Berdenyut", + "block.enderio.redstone_alloy_block": "Balok Logam Paduan Redstone", + "block.enderio.reinforced_obsidian_block": "Balok Obsidian Diperkuat", + "block.enderio.resetting_lever_five": "Tuas Atur Ulang (5 detik)", + "block.enderio.resetting_lever_five_inv": "Tuas Atur Ulang Terbalik (5 detik)", + "block.enderio.resetting_lever_sixty": "Tuas Atur Ulang (1 menit)", + "block.enderio.resetting_lever_sixty_inv": "Tuas Atur Ulang Terbalik (1 menit)", + "block.enderio.resetting_lever_ten": "Tuas Atur Ulang (10 detik)", + "block.enderio.resetting_lever_ten_inv": "Tuas Atur Ulang Terbalik (10 detik)", + "block.enderio.resetting_lever_thirty": "Tuas Atur Ulang (30 detik)", + "block.enderio.resetting_lever_thirty_inv": "Tuas Atur Ulang Terbalik (30 detik)", + "block.enderio.resetting_lever_three_hundred": "Tuas Atur Ulang (5 menit)", + "block.enderio.resetting_lever_three_hundred_inv": "Tuas Atur Ulang Terbalik (5 menit)", + "block.enderio.rocket_fuel": "Bahan Bakar Roket", + "block.enderio.sag_mill": "SAG Mill", + "block.enderio.silent_acacia_pressure_plate": "Pelat Tekanan Senyap Akasia", + "block.enderio.silent_birch_pressure_plate": "Pelat Tekanan Senyap Birch", + "block.enderio.silent_crimson_pressure_plate": "Pelat Tekanan Senyap Crimson", + "block.enderio.silent_dark_oak_pressure_plate": "Pelat Tekanan Senyap Ek Gelap", + "block.enderio.silent_dark_steel_pressure_plate": "Pelat Tekanan Senyap Baja Gelap", + "block.enderio.silent_heavy_weighted_pressure_plate": "Pelat Tekanan Berbobot Berat Senyap", + "block.enderio.silent_jungle_pressure_plate": "Pelat Tekanan Senyap Hutan", + "block.enderio.silent_light_weighted_pressure_plate": "Pelat Tekanan Berbobot Ringan Senyap", + "block.enderio.silent_oak_pressure_plate": "Pelat Tekanan Senyap Ek", + "block.enderio.silent_polished_blackstone_pressure_plate": "Pelat Tekanan Blackstone Mulus Senyap", + "block.enderio.silent_soularium_pressure_plate": "Pelat Tekanan Senyap Soularium", + "block.enderio.silent_spruce_pressure_plate": "Pelat Tekanan Senyap Cemara", + "block.enderio.silent_stone_pressure_plate": "Pelat Tekanan Senyap Batu", + "block.enderio.silent_warped_pressure_plate": "Pelat Tekanan Senyap Warped", + "block.enderio.slice_and_splice": "Iris'N'Sambung", + "block.enderio.soul_binder": "Pengikat Jiwa", + "block.enderio.soul_chain": "Rantai Jiwa", + "block.enderio.soularium_block": "Balok Soularium", + "block.enderio.soularium_pressure_plate": "Pelat Tekanan Soularium", + "block.enderio.stirling_generator": "Pembangkit Listrik Stirling", + "block.enderio.travel_anchor": "Jangkar Perjalanan", + "block.enderio.vacuum_chest": "Peti Vakum", + "block.enderio.vapor_of_levity": "Uap Kesembronoan", + "block.enderio.vibrant_alloy_block": "Balok Logam Paduan Vibrant", + "block.enderio.vibrant_capacitor_bank": "Panel Kapasitor Bank Vibrant", + "block.enderio.vibrant_photovoltaic_module": "Modul Fotovoltaik Vibrant", + "block.enderio.void_chassis": "Kerangka Kehampaan", + "block.enderio.wired_charger": "Pengisi Daya Berkabel", + "block.enderio.xp_juice": "Jus Xp", + "block.enderio.xp_vacuum": "Vakum Xp", + "enchantment.enderio.auto_smelt": "Pelebur Otomatis", + "enchantment.enderio.auto_smelt.desc": "Melebur benda apapun yang digali secara otomatis.", + "enchantment.enderio.repellent": "Pengusir", + "enchantment.enderio.repellent.desc": "Berkesempatan untuk meteleportasi penyerang menjauh dari pengguna. Tingkatan lebih tinggi meteleportasi lebih sering dan lebih jauh.", + "enchantment.enderio.shimmer": "Berkilauan", + "enchantment.enderio.shimmer.desc": "Membuat barang berkilauan bagaikan jika barang di enchant... Hanya itu... Sungguh...", + "enchantment.enderio.soulbound": "Soulbound", + "enchantment.enderio.soulbound.desc": "Mencegah barang menghilang ketika player mati. Catatan: Kebanyakan mod kuburan bodoh dan membuat enchantment ini tidak bekerja!", + "enchantment.enderio.withering": "Layu", + "enchantment.enderio.withering.desc": "Terapkan layu kepada sasaran.", + "enchantment.enderio.withering.type": "Dapat diterapkan kedalam senjata berbilah, busur dan busur silang.", + "enchantment.enderio.xp_boost": "Dorongan XP", + "enchantment.enderio.xp_boost.desc": "XP ekstra dari massa dan balok", + "entity.enderio.painted_sand": "Pasir Dicat", + "fluid.enderio.cloud_seed": "Biji Awan", + "fluid.enderio.cloud_seed_concentrated": "Biji Awan Terkonsentrasi", + "fluid.enderio.dew_of_the_void": "Cairan Kehampaan", + "fluid.enderio.fire_water": "Air Api", + "fluid.enderio.hootch": "Alkohol", + "fluid.enderio.liquid_sunshine": "Sinar Matahari Cair", + "fluid.enderio.nutrient_distillation": "Penyulingan Nutrisi", + "fluid.enderio.rocket_fuel": "Bahan Bakar Roket", + "fluid.enderio.vapor_of_levity": "Uap Kesembronoan", + "fluid.enderio.xp_juice": "Jus Xp", + "gui.enderio.alloy_smelter.mode": "Mode Melebur", + "gui.enderio.alloy_smelter.mode_all": "Pemaduan dan Peleburan", + "gui.enderio.alloy_smelter.mode_alloy": "Hanya Logam Paduan", + "gui.enderio.alloy_smelter.mode_furnace": "Hanya Tungku", + "gui.enderio.category.alloy_smelting": "Peleburan Logam Paduan", + "gui.enderio.category.enchanter": "Mengenchant", + "gui.enderio.category.primitive_alloy_smelting": "Peleburan Logam Paduan Primitif", + "gui.enderio.category.sag_mill": "SAG Mill", + "gui.enderio.category.slicing": "Mengiris", + "gui.enderio.category.soul_binding": "Mengikat Jiwa", + "gui.enderio.category.tank": "Tangki Cairan", + "gui.enderio.conduit.extract": "Keluarkan", + "gui.enderio.conduit.insert": "Masukkan", + "gui.enderio.conduit_channel": "Kanal Kabel", + "gui.enderio.energy_equivalence": "Satuan daya, setara dengan FE.", + "gui.enderio.filter": "Filter", + "gui.enderio.fluid_conduit.change_fluid1": "Cairan Terkunci:", + "gui.enderio.fluid_conduit.change_fluid2": "Tekan untuk mengatur ulang!", + "gui.enderio.fluid_conduit.change_fluid3": "Cairan: %s", + "gui.enderio.ioconfig": "Pengaturan IO", + "gui.enderio.ioconfig.both": "Dorong / Tarik", + "gui.enderio.ioconfig.disabled": "Nonaktif", + "gui.enderio.ioconfig.neighbour": "Tampilkan/Sembunyikan Sekitar", + "gui.enderio.ioconfig.none": "Tidak ada", + "gui.enderio.ioconfig.pull": "Tarik", + "gui.enderio.ioconfig.push": "Dorong", + "gui.enderio.nocap.desc": "Masukkan kapasitor apapun agar \n mesin ini dapat bekerja!", + "gui.enderio.nocap.title": "Kapasitor Hilang", + "gui.enderio.progress": "Kemajuan %s%%", + "gui.enderio.range": "Jangkauan", + "gui.enderio.range.hide": "Sembunyikan Jangkauan", + "gui.enderio.range.show": "Tampilkan Jangkauan", + "gui.enderio.redstone.active_with_signal": "Aktif dengan sinyal", + "gui.enderio.redstone.active_without_signal": "Aktif tanpa sinyal", + "gui.enderio.redstone.always_active": "Selalu aktif", + "gui.enderio.redstone.mode": "Mode Redstone", + "gui.enderio.redstone.never_active": "Tidak pernah aktif", + "gui.enderio.redstone_channel": "Kanal Redstone", + "gui.enderio.round_robin.disabled": "Round Robin dinonaktifkan", + "gui.enderio.round_robin.enabled": "Round Robin diaktifkan", + "gui.enderio.sag_mill_chance": "Peluang: %s%%", + "gui.enderio.sag_mill_chance_ball": "Peluang: %s%% (dapat diubah dengan bola penggiling)", + "gui.enderio.self_feed.disabled": "Pakan Sendiri Dinonaktifkan", + "gui.enderio.self_feed.enabled": "Pakan Sendiri Diaktifkan", + "gui.enderio.spawner.disabled": "Dinonaktifkan oleh pengaturan", + "gui.enderio.spawner.other_mod": "Terhadang oleh mod lainnya", + "gui.enderio.spawner.too_many_mob": "Terlalu banyak massa", + "gui.enderio.spawner.too_many_spawner": "Terlalu banyak spawner", + "gui.enderio.spawner.unknown": "Massa tidak dikenal", + "gui.enderio.visible.false": "Tersembunyi", + "gui.enderio.visible.true": "Terlihat", + "guidebook.enderio.book_title": "Judul Buku", + "guidebook.enderio.landing_text": "Landing Text", + "hint.enderio.connected_textures.text": "Jika anda mencari tekstur terhubung pada panel kapasitor bank, anda mungkin ingin memasang Athena pada instansi anda", + "info.enderio.coordinate_selector.no_block": "Tidak ada balok di jangkauan", + "info.enderio.coordinate_selector.no_paper": "Tidak ada kertas di penyimpanan", + "info.enderio.darksteel.upgrade.activate": "Klik Kanan untuk Mengaktifkan", + "info.enderio.darksteel.upgrade.available": "Peningkatan Yang Tersedia", + "info.enderio.darksteel.upgrade.cost": "Butuh %s Level", + "info.enderio.darksteel.upgrade.direct": "Langsung", + "info.enderio.darksteel.upgrade.direct.description": "Teleport barang yang dipanen langsung kedalam penyimpanan anda", + "info.enderio.darksteel.upgrade.empowered.absorption": "%s%% kerusakan diserap oleh µI", + "info.enderio.darksteel.upgrade.empowered.description": "Infus baja dengan kekuatan Micro Infinity", + "info.enderio.darksteel.upgrade.empowered.efficiency": "+%s Efisiensi ketika ditenagai", + "info.enderio.darksteel.upgrade.empowered.obsidian.efficiency": "+%s Efisiensi ketika menghancurkan obsidian", + "info.enderio.darksteel.upgrade.empowered.storage": "Dapat menyimpan hingga %s µI", + "info.enderio.darksteel.upgrade.empowered_l1": "Berdaya", + "info.enderio.darksteel.upgrade.empowered_l2": "Berdaya II", + "info.enderio.darksteel.upgrade.empowered_l3": "Berdaya III", + "info.enderio.darksteel.upgrade.empowered_l4": "Berdaya IV", + "info.enderio.darksteel.upgrade.explosive.description": "Membuat tanah dan batu disekitar meledak", + "info.enderio.darksteel.upgrade.explosive_l1": "Ledakan I", + "info.enderio.darksteel.upgrade.explosive_l2": "Ledakan II", + "info.enderio.darksteel.upgrade.explosive_penetration.description": "Membuat tanah dan batu dibelakang balok yang digali meledak", + "info.enderio.darksteel.upgrade.explosive_penetration_l1": "Penembusan Ledakan I", + "info.enderio.darksteel.upgrade.explosive_penetration_l2": "Penembusan Ledakan II", + "info.enderio.darksteel.upgrade.fork": "Garpu", + "info.enderio.darksteel.upgrade.fork.description": "Siapa yang butuh pacul jika kamu mempunyai garpu?", + "info.enderio.darksteel.upgrade.no_xp": "Tidak cukup XP", + "info.enderio.darksteel.upgrade.spoon": "Sendok", + "info.enderio.darksteel.upgrade.spoon.description": "Siapa yang butuh sekop jika kamu mempunyai sendok?", + "info.enderio.durability.amount": "Daya tahan %s", + "info.enderio.energy.amount": "%s µI", + "info.enderio.headchance": "berpeluang %s%% untuk mendapatkan kepala massa", + "info.enderio.too_many_levels": "Anda memiliki level lebih dari 21862, terlalu banyak XP.", + "item.enderio.animal_token": "Token Hewan", + "item.enderio.basic_capacitor": "Kapasitor Dasar", + "item.enderio.black_paper": "Kertas Hitam", + "item.enderio.broken_spawner": "Spawner Rusak", + "item.enderio.cake_base": "Kue Dasar", + "item.enderio.clayed_glowstone": "Glowstone tanah liat", + "item.enderio.cloud_seed_bucket": "Ember Biji Awan", + "item.enderio.cloud_seed_concentrated_bucket": "Ember Biji Awan Terkonsentrasi", + "item.enderio.cold_fire_igniter": "Pemantik Api Dingin", + "item.enderio.conductive_alloy_grinding_ball": "Bola Penggiling Logam Paduan Konduktif", + "item.enderio.conductive_alloy_ingot": "Batang Logam Paduan Konduktif", + "item.enderio.conductive_alloy_nugget": "Naget Logam Paduan Konduktif", + "item.enderio.conduit_binder": "Pengikat Kabel", + "item.enderio.conduit_binder_composite": "Komposit Pengikat Kabel", + "item.enderio.confusing_powder": "Bubuk Pembingung", + "item.enderio.coordinate_selector": "Pemilih Koordinat", + "item.enderio.copper_alloy_grinding_ball": "Bola Penggiling Logam Paduan Tembaga", + "item.enderio.copper_alloy_ingot": "Batang Logam Paduan Tembaga", + "item.enderio.copper_alloy_nugget": "Naget Logam Paduan Tembaga", + "item.enderio.dark_bimetal_gear": "Jentera Bimetal Gelap", + "item.enderio.dark_steel_grinding_ball": "Bola Penggiling Baja Gelap", + "item.enderio.dark_steel_ingot": "Batang Baja Gelap", + "item.enderio.dark_steel_nugget": "Naget Baja Gelap", + "item.enderio.dark_steel_sword": "The Ender", + "item.enderio.dense_me_conduit": "Kabel ME Padat", + "item.enderio.dew_of_the_void_bucket": "Ember Embun Kehampaan", + "item.enderio.double_layer_capacitor": "Kapasitor Lapis Ganda", + "item.enderio.electromagnet": "Elektromagnet", + "item.enderio.empty_soul_vial": "Vial Jiwa Kosong", + "item.enderio.end_steel_grinding_ball": "Bola Penggiling Baja Akhir", + "item.enderio.end_steel_ingot": "Batang Baja Akhir", + "item.enderio.end_steel_nugget": "Naget Baja Akhir", + "item.enderio.ender_crystal": "Kristal Ender", + "item.enderio.ender_crystal_powder": "Biji-bijian Akhir", + "item.enderio.ender_fluid_conduit": "Kabel Cairan Ender", + "item.enderio.ender_resonator": "Resonator Ender", + "item.enderio.enderface_conduits": "Kabel Enderface", + "item.enderio.enderface_invpanel": "Invpanel Enderface", + "item.enderio.enderface_items": "Barang Enderface", + "item.enderio.enderface_machines": "Mesin Enderface", + "item.enderio.enderface_materials": "Bahan Enderface", + "item.enderio.enderface_mobs": "Massa Enderface", + "item.enderio.enderface_none": "Tidak ada Enderface", + "item.enderio.enderios": "\"Enderios\"", + "item.enderio.energetic_alloy_grinding_ball": "Bola Penggiling Logam Paduan Energetik", + "item.enderio.energetic_alloy_ingot": "Batang Logam Paduan Energetik", + "item.enderio.energetic_alloy_nugget": "Naget Logam Paduan Energetik", + "item.enderio.energized_gear": "Jentera Bimetal Berenergi", + "item.enderio.energy_conduit": "Kabel Daya", + "item.enderio.enticing_crystal": "Kristal Penarik", + "item.enderio.experience_rod": "Tongkat Experience", + "item.enderio.filled_soul_vial": "Vial Jiwa Terisi", + "item.enderio.fire_water_bucket": "Ember Air Api", + "item.enderio.flour": "Tepung", + "item.enderio.fluid_conduit": "Kabel Cairan", + "item.enderio.frank_n_zombie": "Frank'N'Zombie", + "item.enderio.glider_wing": "Sayap Peluncur", + "item.enderio.grains_of_infinity": "Biji-bijian Infinity", + "item.enderio.guardian_diode": "Dioda Guardian", + "item.enderio.hootch_bucket": "Ember Alkohol", + "item.enderio.infinity_rod": "Tongkat Infinity", + "item.enderio.iron_gear": "Jentera Bimetal Infinity", + "item.enderio.item_conduit": "Kabel Barang", + "item.enderio.liquid_sunshine_bucket": "Ember Sinar Matahari Cair", + "item.enderio.location_printout": "Hasil Cetak Lokasi", + "item.enderio.loot_capacitor": "Kapasitor Jarahan", + "item.enderio.me_conduit": "Kabel ME", + "item.enderio.monster_token": "Token Monster", + "item.enderio.nethercotta": "Nethercotta", + "item.enderio.nutrient_distillation_bucket": "Ember Penyulingan Nutrisi", + "item.enderio.nutritious_stick": "Tongkat Bernutrisi", + "item.enderio.octadic_capacitor": "Kapasitor Oktadik", + "item.enderio.organic_black_dye": "Pewarna Hitam Organik", + "item.enderio.organic_brown_dye": "Pewarna Cokelat Organik", + "item.enderio.organic_green_dye": "Pewarna Hijau Organik", + "item.enderio.photovoltaic_composite": "Komposit Fotovoltaik", + "item.enderio.photovoltaic_plate": "Pelat Fotovoltaik", + "item.enderio.plant_matter_brown": "Ranting dan Pangkasan", + "item.enderio.plant_matter_green": "Potongan dan Pangkasan", + "item.enderio.player_token": "Token Pemain", + "item.enderio.powdered_coal": "Arang Bubuk", + "item.enderio.powdered_cobalt": "Kobalt Bubuk", + "item.enderio.powdered_copper": "Tembaga Bubuk", + "item.enderio.powdered_ender_pearl": "Mutiara Ender Bubuk", + "item.enderio.powdered_gold": "Emas Bubuk", + "item.enderio.powdered_iron": "Besi Bubuk", + "item.enderio.powdered_lapis_lazuli": "Lazuardi Bubuk", + "item.enderio.powdered_obsidian": "Obsidian Bubuk", + "item.enderio.powdered_quartz": "Kuarsa Bubuk", + "item.enderio.powdered_tin": "Timah Bubuk", + "item.enderio.prescient_crystal": "Kristal Peramal", + "item.enderio.prescient_powder": "Biji-bijian Peramal", + "item.enderio.pressurized_fluid_conduit": "Kabel Cairan Bertekanan", + "item.enderio.pulsating_alloy_grinding_ball": "Bola Penggiling Logam Paduan Berdenyut", + "item.enderio.pulsating_alloy_ingot": "Batang Logam Paduan Berdenyut", + "item.enderio.pulsating_alloy_nugget": "Naget Logam Paduan Berdenyut", + "item.enderio.pulsating_crystal": "Kristal Berdenyut", + "item.enderio.pulsating_powder": "Biji-bijian Piezallity", + "item.enderio.redstone_alloy_grinding_ball": "Bola Penggiling Logam Paduan Redstone", + "item.enderio.redstone_alloy_ingot": "Batang Logam Paduan Redstone", + "item.enderio.redstone_alloy_nugget": "Naget Logam Paduan Redstone", + "item.enderio.redstone_conduit": "Kabel Redstone", + "item.enderio.redstone_filter_base": "Filter Dasar Redstone", + "item.enderio.rocket_fuel_bucket": "Ember Bahan Bakar Roket", + "item.enderio.sentient_ender": "Ender Berakal", + "item.enderio.silicon": "Silikon", + "item.enderio.skeletal_contractor": "Kontraktor Skeletal", + "item.enderio.soul_powder": "Bubuk Jiwa", + "item.enderio.soularium_grinding_ball": "Bola Penggiling Logam Paduan Soularium", + "item.enderio.soularium_ingot": "Batang Soularium", + "item.enderio.soularium_nugget": "Naget Soularium", + "item.enderio.staff_of_levity": "Tongkat Kesembronoan", + "item.enderio.staff_of_travelling": "Tongkat Perjalanan", + "item.enderio.stone_gear": "Jentera Senyawa Batu", + "item.enderio.vapor_of_levity_bucket": "Ember Uap Kesembronoan", + "item.enderio.vibrant_alloy_grinding_ball": "Bola Penggiling Logam Paduan Vibrant", + "item.enderio.vibrant_alloy_ingot": "Batang Logam Paduan Vibrant", + "item.enderio.vibrant_alloy_nugget": "Naget Logam Paduan Vibrant", + "item.enderio.vibrant_crystal": "Kristal Vibrant", + "item.enderio.vibrant_gear": "Jentera Bimetal Vibrant", + "item.enderio.vibrant_powder": "Biji-bijian Vibrancy", + "item.enderio.weather_crystal": "Kristal Cuaca", + "item.enderio.withering_powder": "Bubuk Layu", + "item.enderio.wood_gear": "Jentera Kayu", + "item.enderio.xp_juice_bucket": "Ember Jus Xp", + "item.enderio.yeta_wrench": "Kunci Yeta", + "item.enderio.z_logic_controller": "Pengendali Z-Logic", + "item.enderio.zombie_electrode": "Elektroda Zombie", + "itemGroup.enderio.blocks": "Balok Ender IO", + "itemGroup.enderio.conduits": "Kabel Ender IO", + "itemGroup.enderio.gear": "Jentera Ender IO", + "itemGroup.enderio.machines": "Mesin Ender IO", + "itemGroup.enderio.main": "Ender IO", + "itemGroup.enderio.souls": "Jiwa Ender IO", + "jei.enderio.fire_crafting.title": "Kerajinan Api", + "jei.enderio.fire_crafting.valid_blocks": "Balok Valid:", + "jei.enderio.fire_crafting.valid_dimensions": "Dimensi Valid:", + "jei.enderio.grinding.consume_chance": "Berpeluang 33% untuk dikonsumsi", + "jei.enderio.grinding.hand_grinding_coal": "Pegang beberapa rijang di tangan kedua anda dan pegang 3 atau lebih batu bara di tangan utama anda, kemudian klik kanan shift pada balok obsidian, obsidian menangis atau batu gerinda untuk membuat batu bara bubuk di awal.", + "jei.enderio.grinding.hand_grinding_infinity": "Pegang beberapa rijang di tangan kedua anda dan pegang beberapa deepslate atau cobbled deepslate di tangan utama anda, kemudian shift klik kanan pada balok obsidian, obsidian menangis atau batu gerinda untuk membuat butir-butiran infinity di awal.", + "jei.enderio.grinding.title": "Menggiling", + "message.enderio.glider.disable": "Meluncur dinonaktifkan: ", + "message.enderio.glider.disable.fall_flying": "Penerbangan Elytra", + "message.enderio.grave.wrong_owner": "Kuburan ini bukan milik anda! Anda tidak dapat membukanya.", + "message.enderio.soul_vial.error_blacklisted": "Entitas ini telah di blacklist.", + "message.enderio.soul_vial.error_boss": "Usaha yang bagus. Bos tidak suka botol.", + "message.enderio.soul_vial.error_dead": "Tidak dapat menangkap massa mati!", + "message.enderio.soul_vial.error_failed": "Entitas ini tidak dapat ditangkap.", + "message.enderio.soul_vial.error_player": "Anda tidak dapat menaruh pemain kedalam botol!", + "tooltip.enderio.block.blast_resistant": "Tahan Ledakan", + "tooltip.enderio.capacitor.base": "Pengubah Dasar: %s", + "tooltip.enderio.capacitor.energy_capacity": "Pengubah Kapasitas Daya: %s", + "tooltip.enderio.capacitor.energy_use": "Pengubah Penggunaan Daya: %s", + "tooltip.enderio.collision.animals_block": "Hanya padat kepada hewan", + "tooltip.enderio.collision.animals_pass": "Tidak padat kepada hewan", + "tooltip.enderio.collision.mobs_block": "Hanya padat kepada monster", + "tooltip.enderio.collision.mobs_pass": "Tidak padat kepada monster", + "tooltip.enderio.collision.players_block": "Hanya padat kepada pemain", + "tooltip.enderio.collision.players_pass": "Tidak padat kepada pemain", + "tooltip.enderio.dark_steel_ladder.faster": "Lebih cepat dibanding tangga biasanya", + "tooltip.enderio.fluid_tank.tank_empty_tooltip": "Tangki kosong", + "tooltip.enderio.fluid_tank.tank_tooltip": "%d/%d mb dari %s", + "tooltip.enderio.fused_quartz.blocks_light": "Menghadang Cahaya", + "tooltip.enderio.fused_quartz.emits_light": "Memancarkan Cahaya", + "tooltip.enderio.grinding_ball_bonus_output": "Keluaran Bonus %s%%", + "tooltip.enderio.grinding_ball_main_output": "Keluaran Utama %s%%", + "tooltip.enderio.grinding_ball_power_use": "Penggunaan Daya %s%%", + "tooltip.enderio.grinding_ball_remaining": "Tersisa: %s%%", + "tooltip.enderio.grinding_ball_title": "Bola Penggiling SAG Mill", + "tooltip.enderio.gui.show_advanced_tooltip": "", + "tooltip.enderio.photovoltaic_cell.advanced": "Menghasilkan Daya selama siang hari", + "tooltip.enderio.photovoltaic_cell.advanced2": "Harus memiliki garis pandang yang jelas ke langit", + "tooltip.enderio.photovoltaic_cell.advanced3": "Keluaran Maksimal: ", + "tooltip.enderio.photovoltaic_cell.main": "Kekuatan Surya!", + "tooltip.enderio.soul_vial.health": "Nyawa: %s/%s" +} \ No newline at end of file From e6cd88f8c527cf87efa440e3f8ed59e7290b97da Mon Sep 17 00:00:00 2001 From: Reece Mackie <20544390+Rover656@users.noreply.github.com> Date: Sat, 19 Aug 2023 00:45:22 +0100 Subject: [PATCH 131/154] New translations en_us.json (English, United Kingdom) --- .../resources/assets/enderio/lang/en_gb.json | 43 ++++++++----------- 1 file changed, 17 insertions(+), 26 deletions(-) diff --git a/src/main/resources/assets/enderio/lang/en_gb.json b/src/main/resources/assets/enderio/lang/en_gb.json index f4ed2605e5..4d24a47131 100644 --- a/src/main/resources/assets/enderio/lang/en_gb.json +++ b/src/main/resources/assets/enderio/lang/en_gb.json @@ -8,10 +8,8 @@ "advancements.enderio.use_glider.description": "Do you really trust some leather?", "advancements.enderio.use_glider.title": "Majestic", "block.enderio.advanced_capacitor_bank": "Advanced Capacitor Bank", - "block.enderio.advanced_photovoltaic_cell": "Advanced Photovoltaic Cell", "block.enderio.alloy_smelter": "Alloy Smelter", "block.enderio.basic_capacitor_bank": "Basic Capacitor Bank", - "block.enderio.basic_photovoltaic_cell": "Basic Photovoltaic Cell", "block.enderio.clear_glass": "Clear Glass", "block.enderio.clear_glass_black": "Black Clear Glass", "block.enderio.clear_glass_blue": "Blue Clear Glass", @@ -83,6 +81,7 @@ "block.enderio.end_steel_block": "End Steel Block", "block.enderio.enderman_head": "Enderman Head", "block.enderio.energetic_alloy_block": "Energetic Alloy Block", + "block.enderio.energetic_photovoltaic_module": "Energetic Photovoltaic Module", "block.enderio.ensouled_chassis": "Ensouled Chassis", "block.enderio.fire_water": "Fire Water", "block.enderio.fluid_tank": "Fluid Tank", @@ -164,6 +163,7 @@ "block.enderio.pressurized_fluid_tank": "Pressurized Fluid Tank", "block.enderio.primitive_alloy_smelter": "Primitive Alloy Smelter", "block.enderio.pulsating_alloy_block": "Pulsating Alloy Block", + "block.enderio.pulsating_photovoltaic_module": "Pulsating Photovoltaic Module", "block.enderio.redstone_alloy_block": "Redstone Alloy Block", "block.enderio.reinforced_obsidian_block": "Reinforced Obsidian Block", "block.enderio.resetting_lever_five": "Resetting Lever (5 seconds)", @@ -192,48 +192,35 @@ "block.enderio.silent_spruce_pressure_plate": "Silent Spruce Pressure Plate", "block.enderio.silent_stone_pressure_plate": "Silent Stone Pressure Plate", "block.enderio.silent_warped_pressure_plate": "Silent Warped Pressure Plate", - "block.enderio.simple_photovoltaic_cell": "Simple Photovoltaic Cell", "block.enderio.slice_and_splice": "Slice'N'Splice", "block.enderio.soul_binder": "Soul Binder", "block.enderio.soul_chain": "Soul Chain", "block.enderio.soularium_block": "Soularium Block", "block.enderio.soularium_pressure_plate": "Soularium Pressure Plate", "block.enderio.stirling_generator": "Stirling Generator", + "block.enderio.travel_anchor": "Travel Anchor", "block.enderio.vacuum_chest": "Vacuum Chest", "block.enderio.vapor_of_levity": "Vapour Of Levity", "block.enderio.vibrant_alloy_block": "Vibrant Alloy Block", "block.enderio.vibrant_capacitor_bank": "Vibrant Capacitor Bank", - "block.enderio.vibrant_photovoltaic_cell": "Vibrant Photovoltaic Cell", + "block.enderio.vibrant_photovoltaic_module": "Vibrant Photovoltaic Module", "block.enderio.void_chassis": "Void Chassis", "block.enderio.wired_charger": "Wired Charger", "block.enderio.xp_juice": "Xp Juice", "block.enderio.xp_vacuum": "Xp Vacuum", - "description.enderio.enchantment.auto_smelt": "Automatically smelts whatever is mined", - "description.enderio.enchantment.repellent1": "Chance to teleport attackers away", - "description.enderio.enchantment.repellent2": "Higher levels teleport more often and further", - "description.enderio.enchantment.shimmer1": "Makes the item shimmer as if it was enchanted.", - "description.enderio.enchantment.shimmer2": "That's all.", - "description.enderio.enchantment.shimmer3": "Really.", - "description.enderio.enchantment.shimmer4": "Nothing more.", - "description.enderio.enchantment.shimmer5": "Yes, it is useless.", - "description.enderio.enchantment.shimmer6": "I know.", - "description.enderio.enchantment.soulbound1": "Prevents item from being lost on death.", - "description.enderio.enchantment.soulbound2": "Note: Most gravestone mods are stupid and prevent this from working!", - "description.enderio.enchantment.withering_arrow1": "Applies wither to the target", - "description.enderio.enchantment.withering_arrow2": "Applies to bows.", - "description.enderio.enchantment.withering_blade1": "Applies wither to the target", - "description.enderio.enchantment.withering_blade2": "Applies to bladed weapons", - "description.enderio.enchantment.withering_bolt1": "Applies wither to the target", - "description.enderio.enchantment.withering_bolt2": "Applies to crossbows.", - "description.enderio.enchantment.xp_boost": "Extra XP from mobs and blocks", "enchantment.enderio.auto_smelt": "Auto Smelt", + "enchantment.enderio.auto_smelt.desc": "Automatically smelts whatever is mined.", "enchantment.enderio.repellent": "Repellent", + "enchantment.enderio.repellent.desc": "Chance to teleport attackers away. Higher levels teleport more often and farther.", "enchantment.enderio.shimmer": "Shimmer", + "enchantment.enderio.shimmer.desc": "Makes the item shimmer as if it was enchanted... That's all... Really...", "enchantment.enderio.soulbound": "Soulbound", - "enchantment.enderio.withering_arrow": "Withering Arrow", - "enchantment.enderio.withering_blade": "Withering Blade", - "enchantment.enderio.withering_bolt": "Withering Bolt", + "enchantment.enderio.soulbound.desc": "Prevents item from being lost on death. Note: Most gravestone mods are stupid and prevent this from working!", + "enchantment.enderio.withering": "Withering", + "enchantment.enderio.withering.desc": "Applies wither to the target.", + "enchantment.enderio.withering.type": "Applies to bladed weapons, bows and crossbows.", "enchantment.enderio.xp_boost": "XP Boost", + "enchantment.enderio.xp_boost.desc": "Extra XP from mobs and blocks", "entity.enderio.painted_sand": "Painted Sand", "fluid.enderio.cloud_seed": "Cloud Seed", "fluid.enderio.cloud_seed_concentrated": "Cloud Seed Concentrated", @@ -256,9 +243,9 @@ "gui.enderio.category.slicing": "Slicing", "gui.enderio.category.soul_binding": "Soul Binding", "gui.enderio.category.tank": "Fluid Tank", - "gui.enderio.channel": "Channel", "gui.enderio.conduit.extract": "Extract", "gui.enderio.conduit.insert": "Insert", + "gui.enderio.conduit_channel": "Conduit-Channel", "gui.enderio.energy_equivalence": "A unit of energy, equivalent to FE.", "gui.enderio.filter": "Filter", "gui.enderio.fluid_conduit.change_fluid1": "Locked Fluid:", @@ -282,6 +269,7 @@ "gui.enderio.redstone.always_active": "Always active", "gui.enderio.redstone.mode": "Redstone Mode", "gui.enderio.redstone.never_active": "Never active", + "gui.enderio.redstone_channel": "Redstone-Channel", "gui.enderio.round_robin.disabled": "Round Robin Disabled", "gui.enderio.round_robin.enabled": "Round Robin Enabled", "gui.enderio.sag_mill_chance": "Chance: %s%%", @@ -293,6 +281,8 @@ "gui.enderio.spawner.too_many_mob": "Too many mobs", "gui.enderio.spawner.too_many_spawner": "Too many spawners", "gui.enderio.spawner.unknown": "Unknown mob", + "gui.enderio.visible.false": "Hidden", + "gui.enderio.visible.true": "Visible", "guidebook.enderio.book_title": "Book Title", "guidebook.enderio.landing_text": "Landing Text", "hint.enderio.connected_textures.text": "If you are looking for connected textures on the capacitor bank, you might want to install Athena on your client", @@ -439,6 +429,7 @@ "item.enderio.soularium_ingot": "Soularium Ingot", "item.enderio.soularium_nugget": "Soularium Nugget", "item.enderio.staff_of_levity": "Staff Of Levity", + "item.enderio.staff_of_travelling": "Staff Of Travelling", "item.enderio.stone_gear": "Stone Compound Gear", "item.enderio.vapor_of_levity_bucket": "Vapour Of Levity Bucket", "item.enderio.vibrant_alloy_grinding_ball": "Vibrant Alloy Grinding Ball", From 4dd034ad4d56b8a7f766c5a2917d9481c976d83c Mon Sep 17 00:00:00 2001 From: Reece Mackie <20544390+Rover656@users.noreply.github.com> Date: Sat, 19 Aug 2023 00:45:23 +0100 Subject: [PATCH 132/154] New translations en_us.json (Pirate English) --- .../resources/assets/enderio/lang/en_pt.json | 43 ++++++++----------- 1 file changed, 17 insertions(+), 26 deletions(-) diff --git a/src/main/resources/assets/enderio/lang/en_pt.json b/src/main/resources/assets/enderio/lang/en_pt.json index ebf6107a16..2a236316ca 100644 --- a/src/main/resources/assets/enderio/lang/en_pt.json +++ b/src/main/resources/assets/enderio/lang/en_pt.json @@ -8,10 +8,8 @@ "advancements.enderio.use_glider.description": "Do you really trust some leather?", "advancements.enderio.use_glider.title": "Majestic", "block.enderio.advanced_capacitor_bank": "Advanced Capacitor Bank", - "block.enderio.advanced_photovoltaic_cell": "Advanced Photovoltaic Cell", "block.enderio.alloy_smelter": "Alloy Smelter", "block.enderio.basic_capacitor_bank": "Basic Capacitor Bank", - "block.enderio.basic_photovoltaic_cell": "Basic Photovoltaic Cell", "block.enderio.clear_glass": "Clear Glass", "block.enderio.clear_glass_black": "Black Clear Glass", "block.enderio.clear_glass_blue": "Blue Clear Glass", @@ -83,6 +81,7 @@ "block.enderio.end_steel_block": "End Steel Block", "block.enderio.enderman_head": "Enderman Head", "block.enderio.energetic_alloy_block": "Energetic Alloy Block", + "block.enderio.energetic_photovoltaic_module": "Energetic Photovoltaic Module", "block.enderio.ensouled_chassis": "Ensouled Chassis", "block.enderio.fire_water": "Fire Water", "block.enderio.fluid_tank": "Fluid Tank", @@ -164,6 +163,7 @@ "block.enderio.pressurized_fluid_tank": "Pressurized Fluid Tank", "block.enderio.primitive_alloy_smelter": "Primitive Alloy Smelter", "block.enderio.pulsating_alloy_block": "Pulsating Alloy Block", + "block.enderio.pulsating_photovoltaic_module": "Pulsating Photovoltaic Module", "block.enderio.redstone_alloy_block": "Redstone Alloy Block", "block.enderio.reinforced_obsidian_block": "Reinforced Obsidian Block", "block.enderio.resetting_lever_five": "Resetting Lever (5 seconds)", @@ -192,48 +192,35 @@ "block.enderio.silent_spruce_pressure_plate": "Silent Spruce Pressure Plate", "block.enderio.silent_stone_pressure_plate": "Silent Stone Pressure Plate", "block.enderio.silent_warped_pressure_plate": "Silent Warped Pressure Plate", - "block.enderio.simple_photovoltaic_cell": "Simple Photovoltaic Cell", "block.enderio.slice_and_splice": "Slice'N'Splice", "block.enderio.soul_binder": "Soul Binder", "block.enderio.soul_chain": "Soul Chain", "block.enderio.soularium_block": "Soularium Block", "block.enderio.soularium_pressure_plate": "Soularium Pressure Plate", "block.enderio.stirling_generator": "Stirling Generator", + "block.enderio.travel_anchor": "Travel Anchor", "block.enderio.vacuum_chest": "Vacuum Chest", "block.enderio.vapor_of_levity": "Vapor Of Levity", "block.enderio.vibrant_alloy_block": "Vibrant Alloy Block", "block.enderio.vibrant_capacitor_bank": "Vibrant Capacitor Bank", - "block.enderio.vibrant_photovoltaic_cell": "Vibrant Photovoltaic Cell", + "block.enderio.vibrant_photovoltaic_module": "Vibrant Photovoltaic Module", "block.enderio.void_chassis": "Void Chassis", "block.enderio.wired_charger": "Wired Charger", "block.enderio.xp_juice": "Xp Juice", "block.enderio.xp_vacuum": "Xp Vacuum", - "description.enderio.enchantment.auto_smelt": "Automatically smelts whatever is mined", - "description.enderio.enchantment.repellent1": "Chance to teleport attackers away", - "description.enderio.enchantment.repellent2": "Higher levels teleport more often and farther", - "description.enderio.enchantment.shimmer1": "Makes the item shimmer as if it was enchanted.", - "description.enderio.enchantment.shimmer2": "That's all.", - "description.enderio.enchantment.shimmer3": "Really.", - "description.enderio.enchantment.shimmer4": "Nothing more.", - "description.enderio.enchantment.shimmer5": "Yes, it is useless.", - "description.enderio.enchantment.shimmer6": "I know.", - "description.enderio.enchantment.soulbound1": "Prevents item from being lost on death.", - "description.enderio.enchantment.soulbound2": "Note: Most gravestone mods are stupid and prevent this from working!", - "description.enderio.enchantment.withering_arrow1": "Applies wither to the target", - "description.enderio.enchantment.withering_arrow2": "Applies to bows.", - "description.enderio.enchantment.withering_blade1": "Applies wither to the target", - "description.enderio.enchantment.withering_blade2": "Applies to bladed weapons", - "description.enderio.enchantment.withering_bolt1": "Applies wither to the target", - "description.enderio.enchantment.withering_bolt2": "Applies to crossbows.", - "description.enderio.enchantment.xp_boost": "Extra XP from mobs and blocks", "enchantment.enderio.auto_smelt": "Auto Smelt", + "enchantment.enderio.auto_smelt.desc": "Automatically smelts whatever is mined.", "enchantment.enderio.repellent": "Repellent", + "enchantment.enderio.repellent.desc": "Chance to teleport attackers away. Higher levels teleport more often and farther.", "enchantment.enderio.shimmer": "Shimmer", + "enchantment.enderio.shimmer.desc": "Makes the item shimmer as if it was enchanted... That's all... Really...", "enchantment.enderio.soulbound": "Soulbound", - "enchantment.enderio.withering_arrow": "Withering Arrow", - "enchantment.enderio.withering_blade": "Withering Blade", - "enchantment.enderio.withering_bolt": "Withering Bolt", + "enchantment.enderio.soulbound.desc": "Prevents item from being lost on death. Note: Most gravestone mods are stupid and prevent this from working!", + "enchantment.enderio.withering": "Withering", + "enchantment.enderio.withering.desc": "Applies wither to the target.", + "enchantment.enderio.withering.type": "Applies to bladed weapons, bows and crossbows.", "enchantment.enderio.xp_boost": "XP Boost", + "enchantment.enderio.xp_boost.desc": "Extra XP from mobs and blocks", "entity.enderio.painted_sand": "Painted Sand", "fluid.enderio.cloud_seed": "Cloud Seed", "fluid.enderio.cloud_seed_concentrated": "Cloud Seed Concentrated", @@ -256,9 +243,9 @@ "gui.enderio.category.slicing": "Slicing", "gui.enderio.category.soul_binding": "Soul Binding", "gui.enderio.category.tank": "Fluid Tank", - "gui.enderio.channel": "Channel", "gui.enderio.conduit.extract": "Extract", "gui.enderio.conduit.insert": "Insert", + "gui.enderio.conduit_channel": "Conduit-Channel", "gui.enderio.energy_equivalence": "A unit of energy, equivalent to FE.", "gui.enderio.filter": "Filter", "gui.enderio.fluid_conduit.change_fluid1": "Locked Fluid:", @@ -282,6 +269,7 @@ "gui.enderio.redstone.always_active": "Always active", "gui.enderio.redstone.mode": "Redstone Mode", "gui.enderio.redstone.never_active": "Never active", + "gui.enderio.redstone_channel": "Redstone-Channel", "gui.enderio.round_robin.disabled": "Round Robin Disabled", "gui.enderio.round_robin.enabled": "Round Robin Enabled", "gui.enderio.sag_mill_chance": "Chance: %s%%", @@ -293,6 +281,8 @@ "gui.enderio.spawner.too_many_mob": "Too many mobs", "gui.enderio.spawner.too_many_spawner": "Too many spawners", "gui.enderio.spawner.unknown": "Unknown mob", + "gui.enderio.visible.false": "Hidden", + "gui.enderio.visible.true": "Visible", "guidebook.enderio.book_title": "Book Title", "guidebook.enderio.landing_text": "Landing Text", "hint.enderio.connected_textures.text": "If you are looking for connected textures on the capacitor bank, you might want to install Athena on your client", @@ -439,6 +429,7 @@ "item.enderio.soularium_ingot": "Soularium Ingot", "item.enderio.soularium_nugget": "Soularium Nugget", "item.enderio.staff_of_levity": "Staff Of Levity", + "item.enderio.staff_of_travelling": "Staff Of Travelling", "item.enderio.stone_gear": "Stone Compound Gear", "item.enderio.vapor_of_levity_bucket": "Vapor Of Levity Bucket", "item.enderio.vibrant_alloy_grinding_ball": "Vibrant Alloy Grinding Ball", From a65860271b50e62b17fe0133d5092396e237dbfb Mon Sep 17 00:00:00 2001 From: Reece Mackie <20544390+Rover656@users.noreply.github.com> Date: Sat, 19 Aug 2023 00:45:24 +0100 Subject: [PATCH 133/154] New translations en_us.json (LOLCAT) --- .../resources/assets/enderio/lang/lol_us.json | 43 ++++++++----------- 1 file changed, 17 insertions(+), 26 deletions(-) diff --git a/src/main/resources/assets/enderio/lang/lol_us.json b/src/main/resources/assets/enderio/lang/lol_us.json index ebf6107a16..2a236316ca 100644 --- a/src/main/resources/assets/enderio/lang/lol_us.json +++ b/src/main/resources/assets/enderio/lang/lol_us.json @@ -8,10 +8,8 @@ "advancements.enderio.use_glider.description": "Do you really trust some leather?", "advancements.enderio.use_glider.title": "Majestic", "block.enderio.advanced_capacitor_bank": "Advanced Capacitor Bank", - "block.enderio.advanced_photovoltaic_cell": "Advanced Photovoltaic Cell", "block.enderio.alloy_smelter": "Alloy Smelter", "block.enderio.basic_capacitor_bank": "Basic Capacitor Bank", - "block.enderio.basic_photovoltaic_cell": "Basic Photovoltaic Cell", "block.enderio.clear_glass": "Clear Glass", "block.enderio.clear_glass_black": "Black Clear Glass", "block.enderio.clear_glass_blue": "Blue Clear Glass", @@ -83,6 +81,7 @@ "block.enderio.end_steel_block": "End Steel Block", "block.enderio.enderman_head": "Enderman Head", "block.enderio.energetic_alloy_block": "Energetic Alloy Block", + "block.enderio.energetic_photovoltaic_module": "Energetic Photovoltaic Module", "block.enderio.ensouled_chassis": "Ensouled Chassis", "block.enderio.fire_water": "Fire Water", "block.enderio.fluid_tank": "Fluid Tank", @@ -164,6 +163,7 @@ "block.enderio.pressurized_fluid_tank": "Pressurized Fluid Tank", "block.enderio.primitive_alloy_smelter": "Primitive Alloy Smelter", "block.enderio.pulsating_alloy_block": "Pulsating Alloy Block", + "block.enderio.pulsating_photovoltaic_module": "Pulsating Photovoltaic Module", "block.enderio.redstone_alloy_block": "Redstone Alloy Block", "block.enderio.reinforced_obsidian_block": "Reinforced Obsidian Block", "block.enderio.resetting_lever_five": "Resetting Lever (5 seconds)", @@ -192,48 +192,35 @@ "block.enderio.silent_spruce_pressure_plate": "Silent Spruce Pressure Plate", "block.enderio.silent_stone_pressure_plate": "Silent Stone Pressure Plate", "block.enderio.silent_warped_pressure_plate": "Silent Warped Pressure Plate", - "block.enderio.simple_photovoltaic_cell": "Simple Photovoltaic Cell", "block.enderio.slice_and_splice": "Slice'N'Splice", "block.enderio.soul_binder": "Soul Binder", "block.enderio.soul_chain": "Soul Chain", "block.enderio.soularium_block": "Soularium Block", "block.enderio.soularium_pressure_plate": "Soularium Pressure Plate", "block.enderio.stirling_generator": "Stirling Generator", + "block.enderio.travel_anchor": "Travel Anchor", "block.enderio.vacuum_chest": "Vacuum Chest", "block.enderio.vapor_of_levity": "Vapor Of Levity", "block.enderio.vibrant_alloy_block": "Vibrant Alloy Block", "block.enderio.vibrant_capacitor_bank": "Vibrant Capacitor Bank", - "block.enderio.vibrant_photovoltaic_cell": "Vibrant Photovoltaic Cell", + "block.enderio.vibrant_photovoltaic_module": "Vibrant Photovoltaic Module", "block.enderio.void_chassis": "Void Chassis", "block.enderio.wired_charger": "Wired Charger", "block.enderio.xp_juice": "Xp Juice", "block.enderio.xp_vacuum": "Xp Vacuum", - "description.enderio.enchantment.auto_smelt": "Automatically smelts whatever is mined", - "description.enderio.enchantment.repellent1": "Chance to teleport attackers away", - "description.enderio.enchantment.repellent2": "Higher levels teleport more often and farther", - "description.enderio.enchantment.shimmer1": "Makes the item shimmer as if it was enchanted.", - "description.enderio.enchantment.shimmer2": "That's all.", - "description.enderio.enchantment.shimmer3": "Really.", - "description.enderio.enchantment.shimmer4": "Nothing more.", - "description.enderio.enchantment.shimmer5": "Yes, it is useless.", - "description.enderio.enchantment.shimmer6": "I know.", - "description.enderio.enchantment.soulbound1": "Prevents item from being lost on death.", - "description.enderio.enchantment.soulbound2": "Note: Most gravestone mods are stupid and prevent this from working!", - "description.enderio.enchantment.withering_arrow1": "Applies wither to the target", - "description.enderio.enchantment.withering_arrow2": "Applies to bows.", - "description.enderio.enchantment.withering_blade1": "Applies wither to the target", - "description.enderio.enchantment.withering_blade2": "Applies to bladed weapons", - "description.enderio.enchantment.withering_bolt1": "Applies wither to the target", - "description.enderio.enchantment.withering_bolt2": "Applies to crossbows.", - "description.enderio.enchantment.xp_boost": "Extra XP from mobs and blocks", "enchantment.enderio.auto_smelt": "Auto Smelt", + "enchantment.enderio.auto_smelt.desc": "Automatically smelts whatever is mined.", "enchantment.enderio.repellent": "Repellent", + "enchantment.enderio.repellent.desc": "Chance to teleport attackers away. Higher levels teleport more often and farther.", "enchantment.enderio.shimmer": "Shimmer", + "enchantment.enderio.shimmer.desc": "Makes the item shimmer as if it was enchanted... That's all... Really...", "enchantment.enderio.soulbound": "Soulbound", - "enchantment.enderio.withering_arrow": "Withering Arrow", - "enchantment.enderio.withering_blade": "Withering Blade", - "enchantment.enderio.withering_bolt": "Withering Bolt", + "enchantment.enderio.soulbound.desc": "Prevents item from being lost on death. Note: Most gravestone mods are stupid and prevent this from working!", + "enchantment.enderio.withering": "Withering", + "enchantment.enderio.withering.desc": "Applies wither to the target.", + "enchantment.enderio.withering.type": "Applies to bladed weapons, bows and crossbows.", "enchantment.enderio.xp_boost": "XP Boost", + "enchantment.enderio.xp_boost.desc": "Extra XP from mobs and blocks", "entity.enderio.painted_sand": "Painted Sand", "fluid.enderio.cloud_seed": "Cloud Seed", "fluid.enderio.cloud_seed_concentrated": "Cloud Seed Concentrated", @@ -256,9 +243,9 @@ "gui.enderio.category.slicing": "Slicing", "gui.enderio.category.soul_binding": "Soul Binding", "gui.enderio.category.tank": "Fluid Tank", - "gui.enderio.channel": "Channel", "gui.enderio.conduit.extract": "Extract", "gui.enderio.conduit.insert": "Insert", + "gui.enderio.conduit_channel": "Conduit-Channel", "gui.enderio.energy_equivalence": "A unit of energy, equivalent to FE.", "gui.enderio.filter": "Filter", "gui.enderio.fluid_conduit.change_fluid1": "Locked Fluid:", @@ -282,6 +269,7 @@ "gui.enderio.redstone.always_active": "Always active", "gui.enderio.redstone.mode": "Redstone Mode", "gui.enderio.redstone.never_active": "Never active", + "gui.enderio.redstone_channel": "Redstone-Channel", "gui.enderio.round_robin.disabled": "Round Robin Disabled", "gui.enderio.round_robin.enabled": "Round Robin Enabled", "gui.enderio.sag_mill_chance": "Chance: %s%%", @@ -293,6 +281,8 @@ "gui.enderio.spawner.too_many_mob": "Too many mobs", "gui.enderio.spawner.too_many_spawner": "Too many spawners", "gui.enderio.spawner.unknown": "Unknown mob", + "gui.enderio.visible.false": "Hidden", + "gui.enderio.visible.true": "Visible", "guidebook.enderio.book_title": "Book Title", "guidebook.enderio.landing_text": "Landing Text", "hint.enderio.connected_textures.text": "If you are looking for connected textures on the capacitor bank, you might want to install Athena on your client", @@ -439,6 +429,7 @@ "item.enderio.soularium_ingot": "Soularium Ingot", "item.enderio.soularium_nugget": "Soularium Nugget", "item.enderio.staff_of_levity": "Staff Of Levity", + "item.enderio.staff_of_travelling": "Staff Of Travelling", "item.enderio.stone_gear": "Stone Compound Gear", "item.enderio.vapor_of_levity_bucket": "Vapor Of Levity Bucket", "item.enderio.vibrant_alloy_grinding_ball": "Vibrant Alloy Grinding Ball", From 075c55ed9027e646e2395cec7f958bd81c9c1fe3 Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Sat, 19 Aug 2023 01:59:24 +0200 Subject: [PATCH 134/154] made changes rename to soul engine change jei layout --- .../enderio/blockstates/mob_generator.json | 34 ---------------- .../enderio/blockstates/soul_engine.json | 34 ++++++++++++++++ .../resources/assets/enderio/lang/en_ud.json | 3 +- .../resources/assets/enderio/lang/en_us.json | 3 +- ....json => soul_engine_active_combined.json} | 4 +- ...ombined.json => soul_engine_combined.json} | 4 +- .../enderio/models/item/mob_generator.json | 3 -- .../enderio/models/item/soul_engine.json | 3 ++ .../{mob_generator.json => soul_engine.json} | 4 +- .../{mob_generator.json => soul_engine.json} | 4 +- .../{mob_generator.json => soul_engine.json} | 2 +- .../{mob_generator.json => soul_engine.json} | 4 +- .../tags/blocks/mineable/pickaxe.json | 2 +- .../tags/blocks/needs_iron_tool.json | 2 +- ...ratorScreen.java => SoulEngineScreen.java} | 13 +++--- ...Entity.java => SoulEngineBlockEntity.java} | 16 ++++---- .../common/config/common/EnergyConfig.java | 4 +- .../common/init/MachineBlockEntities.java | 2 +- .../machines/common/init/MachineBlocks.java | 4 +- .../machines/common/init/MachineMenus.java | 2 +- .../integrations/jei/MachineJEIRecipes.java | 6 +-- .../common/integrations/jei/MachinesJEI.java | 6 +-- .../jei/category/SoulBindingCategory.java | 4 +- ...rCategory.java => SoulEngineCategory.java} | 38 +++++++++--------- .../machines/common/lang/MachineLang.java | 1 + ...GeneratorMenu.java => SoulEngineMenu.java} | 16 ++++---- .../common/network/MachineNetwork.java | 6 +-- .../network/PoweredSpawnerSoulPacket.java | 5 +-- ...lPacket.java => SoulEngineSoulPacket.java} | 25 +++++------- .../{GeneratorSoul.java => EngineSoul.java} | 6 +-- .../data/recipes/MachineRecipeProvider.java | 2 +- .../recipes/SoulBindingRecipeProvider.java | 4 +- .../data/souldata/SoulDataProvider.java | 10 ++--- .../{mob_generator.json => soul_engine.json} | 0 ...or_active.json => soul_engine_active.json} | 0 .../{mob_generator.png => soul_engine.png} | Bin 36 files changed, 136 insertions(+), 140 deletions(-) delete mode 100644 src/generated/resources/assets/enderio/blockstates/mob_generator.json create mode 100644 src/generated/resources/assets/enderio/blockstates/soul_engine.json rename src/generated/resources/assets/enderio/models/block/{mob_generator_active_combined.json => soul_engine_active_combined.json} (71%) rename src/generated/resources/assets/enderio/models/block/{mob_generator_combined.json => soul_engine_combined.json} (72%) delete mode 100644 src/generated/resources/assets/enderio/models/item/mob_generator.json create mode 100644 src/generated/resources/assets/enderio/models/item/soul_engine.json rename src/generated/resources/data/enderio/advancements/recipes/misc/{mob_generator.json => soul_engine.json} (88%) rename src/generated/resources/data/enderio/loot_tables/blocks/{mob_generator.json => soul_engine.json} (84%) rename src/generated/resources/data/enderio/recipes/{mob_generator.json => soul_engine.json} (92%) rename src/generated/resources/data/enderio/recipes/soulbinding/{mob_generator.json => soul_engine.json} (60%) rename src/machines/java/com/enderio/machines/client/gui/screen/{MobGeneratorScreen.java => SoulEngineScreen.java} (86%) rename src/machines/java/com/enderio/machines/common/blockentity/{MobGeneratorBlockEntity.java => SoulEngineBlockEntity.java} (92%) rename src/machines/java/com/enderio/machines/common/integrations/jei/category/{MobGeneratorCategory.java => SoulEngineCategory.java} (69%) rename src/machines/java/com/enderio/machines/common/menu/{MobGeneratorMenu.java => SoulEngineMenu.java} (53%) rename src/machines/java/com/enderio/machines/common/network/{MobGeneratorSoulPacket.java => SoulEngineSoulPacket.java} (59%) rename src/machines/java/com/enderio/machines/common/souldata/{GeneratorSoul.java => EngineSoul.java} (87%) rename src/machines/resources/assets/enderio/models/block/{mob_generator.json => soul_engine.json} (100%) rename src/machines/resources/assets/enderio/models/block/{mob_generator_active.json => soul_engine_active.json} (100%) rename src/main/resources/assets/enderio/textures/gui/{mob_generator.png => soul_engine.png} (100%) diff --git a/src/generated/resources/assets/enderio/blockstates/mob_generator.json b/src/generated/resources/assets/enderio/blockstates/mob_generator.json deleted file mode 100644 index 86baa816ca..0000000000 --- a/src/generated/resources/assets/enderio/blockstates/mob_generator.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "variants": { - "facing=east,powered=false": { - "model": "enderio:block/mob_generator_combined", - "y": 90 - }, - "facing=east,powered=true": { - "model": "enderio:block/mob_generator_active_combined", - "y": 90 - }, - "facing=north,powered=false": { - "model": "enderio:block/mob_generator_combined" - }, - "facing=north,powered=true": { - "model": "enderio:block/mob_generator_active_combined" - }, - "facing=south,powered=false": { - "model": "enderio:block/mob_generator_combined", - "y": 180 - }, - "facing=south,powered=true": { - "model": "enderio:block/mob_generator_active_combined", - "y": 180 - }, - "facing=west,powered=false": { - "model": "enderio:block/mob_generator_combined", - "y": 270 - }, - "facing=west,powered=true": { - "model": "enderio:block/mob_generator_active_combined", - "y": 270 - } - } -} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/blockstates/soul_engine.json b/src/generated/resources/assets/enderio/blockstates/soul_engine.json new file mode 100644 index 0000000000..0bc8e4f961 --- /dev/null +++ b/src/generated/resources/assets/enderio/blockstates/soul_engine.json @@ -0,0 +1,34 @@ +{ + "variants": { + "facing=east,powered=false": { + "model": "enderio:block/soul_engine_combined", + "y": 90 + }, + "facing=east,powered=true": { + "model": "enderio:block/soul_engine_active_combined", + "y": 90 + }, + "facing=north,powered=false": { + "model": "enderio:block/soul_engine_combined" + }, + "facing=north,powered=true": { + "model": "enderio:block/soul_engine_active_combined" + }, + "facing=south,powered=false": { + "model": "enderio:block/soul_engine_combined", + "y": 180 + }, + "facing=south,powered=true": { + "model": "enderio:block/soul_engine_active_combined", + "y": 180 + }, + "facing=west,powered=false": { + "model": "enderio:block/soul_engine_combined", + "y": 270 + }, + "facing=west,powered=true": { + "model": "enderio:block/soul_engine_active_combined", + "y": 270 + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/lang/en_ud.json b/src/generated/resources/assets/enderio/lang/en_ud.json index 73d2737b05..0ac07e4633 100644 --- a/src/generated/resources/assets/enderio/lang/en_ud.json +++ b/src/generated/resources/assets/enderio/lang/en_ud.json @@ -143,7 +143,6 @@ "block.enderio.light_inverted": "pǝʇɹǝʌuI ʇɥbıꞀ", "block.enderio.light_node": "ǝpoN ʇɥbıꞀ", "block.enderio.liquid_sunshine": "ǝuıɥsunS pınbıꞀ", - "block.enderio.mob_generator": "ɹoʇɐɹǝuǝ⅁ qoW", "block.enderio.nutrient_distillation": "uoıʇɐןןıʇsıᗡ ʇuǝıɹʇnN", "block.enderio.painted_crafting_table": "ǝןqɐ⟘ buıʇɟɐɹƆ pǝʇuıɐԀ", "block.enderio.painted_fence": "ǝɔuǝℲ pǝʇuıɐԀ", @@ -196,6 +195,7 @@ "block.enderio.slice_and_splice": "ǝɔıןdS,N,ǝɔıןS", "block.enderio.soul_binder": "ɹǝpuıᗺ ןnoS", "block.enderio.soul_chain": "uıɐɥƆ ןnoS", + "block.enderio.soul_engine": "ǝuıbuƎ ןnoS", "block.enderio.soularium_block": "ʞɔoןᗺ ɯnıɹɐןnoS", "block.enderio.soularium_pressure_plate": "ǝʇɐןԀ ǝɹnssǝɹԀ ɯnıɹɐןnoS", "block.enderio.stirling_generator": "ɹoʇɐɹǝuǝ⅁ buıןɹıʇS", @@ -243,6 +243,7 @@ "gui.enderio.category.sag_mill": "ןןıW ⅁ⱯS", "gui.enderio.category.slicing": "buıɔıןS", "gui.enderio.category.soul_binding": "buıpuıᗺ ןnoS", + "gui.enderio.category.soul_engine": "ǝuıbuƎ ןnoS", "gui.enderio.category.tank": "ʞuɐ⟘ pınןℲ", "gui.enderio.conduit.extract": "ʇɔɐɹʇxƎ", "gui.enderio.conduit.insert": "ʇɹǝsuI", diff --git a/src/generated/resources/assets/enderio/lang/en_us.json b/src/generated/resources/assets/enderio/lang/en_us.json index 7014e09143..300e519c84 100644 --- a/src/generated/resources/assets/enderio/lang/en_us.json +++ b/src/generated/resources/assets/enderio/lang/en_us.json @@ -143,7 +143,6 @@ "block.enderio.light_inverted": "Light Inverted", "block.enderio.light_node": "Light Node", "block.enderio.liquid_sunshine": "Liquid Sunshine", - "block.enderio.mob_generator": "Mob Generator", "block.enderio.nutrient_distillation": "Nutrient Distillation", "block.enderio.painted_crafting_table": "Painted Crafting Table", "block.enderio.painted_fence": "Painted Fence", @@ -196,6 +195,7 @@ "block.enderio.slice_and_splice": "Slice'N'Splice", "block.enderio.soul_binder": "Soul Binder", "block.enderio.soul_chain": "Soul Chain", + "block.enderio.soul_engine": "Soul Engine", "block.enderio.soularium_block": "Soularium Block", "block.enderio.soularium_pressure_plate": "Soularium Pressure Plate", "block.enderio.stirling_generator": "Stirling Generator", @@ -243,6 +243,7 @@ "gui.enderio.category.sag_mill": "SAG Mill", "gui.enderio.category.slicing": "Slicing", "gui.enderio.category.soul_binding": "Soul Binding", + "gui.enderio.category.soul_engine": "Soul Engine", "gui.enderio.category.tank": "Fluid Tank", "gui.enderio.conduit.extract": "Extract", "gui.enderio.conduit.insert": "Insert", diff --git a/src/generated/resources/assets/enderio/models/block/mob_generator_active_combined.json b/src/generated/resources/assets/enderio/models/block/soul_engine_active_combined.json similarity index 71% rename from src/generated/resources/assets/enderio/models/block/mob_generator_active_combined.json rename to src/generated/resources/assets/enderio/models/block/soul_engine_active_combined.json index 56ced765e3..2c30e37737 100644 --- a/src/generated/resources/assets/enderio/models/block/mob_generator_active_combined.json +++ b/src/generated/resources/assets/enderio/models/block/soul_engine_active_combined.json @@ -2,7 +2,7 @@ "parent": "minecraft:block/block", "children": { "machine": { - "parent": "enderio:block/mob_generator_active" + "parent": "enderio:block/soul_engine_active" }, "overlay": { "parent": "enderio:block/io_overlay" @@ -14,6 +14,6 @@ ], "loader": "forge:composite", "textures": { - "particle": "enderio:block/mob_generator_front" + "particle": "enderio:block/soul_engine_front" } } \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/block/mob_generator_combined.json b/src/generated/resources/assets/enderio/models/block/soul_engine_combined.json similarity index 72% rename from src/generated/resources/assets/enderio/models/block/mob_generator_combined.json rename to src/generated/resources/assets/enderio/models/block/soul_engine_combined.json index b1ec717dcb..1776899a7e 100644 --- a/src/generated/resources/assets/enderio/models/block/mob_generator_combined.json +++ b/src/generated/resources/assets/enderio/models/block/soul_engine_combined.json @@ -2,7 +2,7 @@ "parent": "minecraft:block/block", "children": { "machine": { - "parent": "enderio:block/mob_generator" + "parent": "enderio:block/soul_engine" }, "overlay": { "parent": "enderio:block/io_overlay" @@ -14,6 +14,6 @@ ], "loader": "forge:composite", "textures": { - "particle": "enderio:block/mob_generator_front" + "particle": "enderio:block/soul_engine_front" } } \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/item/mob_generator.json b/src/generated/resources/assets/enderio/models/item/mob_generator.json deleted file mode 100644 index e051f96af9..0000000000 --- a/src/generated/resources/assets/enderio/models/item/mob_generator.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "enderio:block/mob_generator" -} \ No newline at end of file diff --git a/src/generated/resources/assets/enderio/models/item/soul_engine.json b/src/generated/resources/assets/enderio/models/item/soul_engine.json new file mode 100644 index 0000000000..64641f4bda --- /dev/null +++ b/src/generated/resources/assets/enderio/models/item/soul_engine.json @@ -0,0 +1,3 @@ +{ + "parent": "enderio:block/soul_engine" +} \ No newline at end of file diff --git a/src/generated/resources/data/enderio/advancements/recipes/misc/mob_generator.json b/src/generated/resources/data/enderio/advancements/recipes/misc/soul_engine.json similarity index 88% rename from src/generated/resources/data/enderio/advancements/recipes/misc/mob_generator.json rename to src/generated/resources/data/enderio/advancements/recipes/misc/soul_engine.json index 8faf170b61..8e3124c768 100644 --- a/src/generated/resources/data/enderio/advancements/recipes/misc/mob_generator.json +++ b/src/generated/resources/data/enderio/advancements/recipes/misc/soul_engine.json @@ -15,7 +15,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "enderio:mob_generator" + "recipe": "enderio:soul_engine" }, "trigger": "minecraft:recipe_unlocked" } @@ -28,7 +28,7 @@ ], "rewards": { "recipes": [ - "enderio:mob_generator" + "enderio:soul_engine" ] }, "sends_telemetry_event": false diff --git a/src/generated/resources/data/enderio/loot_tables/blocks/mob_generator.json b/src/generated/resources/data/enderio/loot_tables/blocks/soul_engine.json similarity index 84% rename from src/generated/resources/data/enderio/loot_tables/blocks/mob_generator.json rename to src/generated/resources/data/enderio/loot_tables/blocks/soul_engine.json index 5ccc5044f2..90a31666cb 100644 --- a/src/generated/resources/data/enderio/loot_tables/blocks/mob_generator.json +++ b/src/generated/resources/data/enderio/loot_tables/blocks/soul_engine.json @@ -19,11 +19,11 @@ "source": "block_entity" } ], - "name": "enderio:mob_generator" + "name": "enderio:soul_engine" } ], "rolls": 1.0 } ], - "random_sequence": "enderio:blocks/mob_generator" + "random_sequence": "enderio:blocks/soul_engine" } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/recipes/mob_generator.json b/src/generated/resources/data/enderio/recipes/soul_engine.json similarity index 92% rename from src/generated/resources/data/enderio/recipes/mob_generator.json rename to src/generated/resources/data/enderio/recipes/soul_engine.json index 617079c577..4f7303037d 100644 --- a/src/generated/resources/data/enderio/recipes/mob_generator.json +++ b/src/generated/resources/data/enderio/recipes/soul_engine.json @@ -24,7 +24,7 @@ "IZI" ], "result": { - "item": "enderio:mob_generator" + "item": "enderio:soul_engine" }, "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/enderio/recipes/soulbinding/mob_generator.json b/src/generated/resources/data/enderio/recipes/soulbinding/soul_engine.json similarity index 60% rename from src/generated/resources/data/enderio/recipes/soulbinding/mob_generator.json rename to src/generated/resources/data/enderio/recipes/soulbinding/soul_engine.json index e3ce76b2f7..e22fecc342 100644 --- a/src/generated/resources/data/enderio/recipes/soulbinding/mob_generator.json +++ b/src/generated/resources/data/enderio/recipes/soulbinding/soul_engine.json @@ -3,8 +3,8 @@ "energy": 188000, "exp": 5, "input": { - "item": "enderio:mob_generator" + "item": "enderio:soul_engine" }, - "output": "enderio:mob_generator", + "output": "enderio:soul_engine", "souldata": "generator" } \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json b/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json index 20b0d2c35b..da25d96ead 100644 --- a/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json +++ b/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json @@ -58,7 +58,7 @@ "enderio:advanced_capacitor_bank", "enderio:vibrant_capacitor_bank", "enderio:crafter", - "enderio:mob_generator", + "enderio:soul_engine", "enderio:conduit" ] } \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/blocks/needs_iron_tool.json b/src/generated/resources/data/minecraft/tags/blocks/needs_iron_tool.json index cf5b5b329b..368a59df1f 100644 --- a/src/generated/resources/data/minecraft/tags/blocks/needs_iron_tool.json +++ b/src/generated/resources/data/minecraft/tags/blocks/needs_iron_tool.json @@ -23,6 +23,6 @@ "enderio:xp_vacuum", "enderio:travel_anchor", "enderio:crafter", - "enderio:mob_generator" + "enderio:soul_engine" ] } \ No newline at end of file diff --git a/src/machines/java/com/enderio/machines/client/gui/screen/MobGeneratorScreen.java b/src/machines/java/com/enderio/machines/client/gui/screen/SoulEngineScreen.java similarity index 86% rename from src/machines/java/com/enderio/machines/client/gui/screen/MobGeneratorScreen.java rename to src/machines/java/com/enderio/machines/client/gui/screen/SoulEngineScreen.java index cdc7787df7..7661f63c8b 100644 --- a/src/machines/java/com/enderio/machines/client/gui/screen/MobGeneratorScreen.java +++ b/src/machines/java/com/enderio/machines/client/gui/screen/SoulEngineScreen.java @@ -8,9 +8,8 @@ import com.enderio.machines.client.gui.widget.CapacitorEnergyWidget; import com.enderio.machines.client.gui.widget.FluidStackWidget; import com.enderio.machines.client.gui.widget.ioconfig.IOConfigButton; -import com.enderio.machines.common.menu.MobGeneratorMenu; -import com.enderio.machines.common.network.MobGeneratorSoulPacket; -import com.enderio.machines.common.souldata.GeneratorSoul; +import com.enderio.machines.common.menu.SoulEngineMenu; +import com.enderio.machines.common.souldata.EngineSoul; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; @@ -20,11 +19,11 @@ import java.util.Optional; -public class MobGeneratorScreen extends EIOScreen{ +public class SoulEngineScreen extends EIOScreen{ - public static final ResourceLocation BG_TEXTURE = EnderIO.loc("textures/gui/mob_generator.png"); + public static final ResourceLocation BG_TEXTURE = EnderIO.loc("textures/gui/soul_engine.png"); - public MobGeneratorScreen(MobGeneratorMenu pMenu, Inventory pPlayerInventory, Component pTitle) { + public SoulEngineScreen(SoulEngineMenu pMenu, Inventory pPlayerInventory, Component pTitle) { super(pMenu, pPlayerInventory, pTitle); } @@ -55,7 +54,7 @@ protected void renderLabels(GuiGraphics guiGraphics, int pMouseX, int pMouseY) { } else { guiGraphics.drawString(font, rl.get().toString(), imageWidth / 2f - font.width(rl.get().toString()) / 2f, 10, 4210752, false); } - GeneratorSoul.SoulData data = MobGeneratorSoulPacket.SYNCED_DATA.get(rl.get()); + EngineSoul.SoulData data = EngineSoul.ENGINE.map.get(rl.get()); if (data != null) { guiGraphics.drawString(font, data.tickpermb() + " t/mb", imageWidth / 2f + 20 - font.width(data.tickpermb() + "") / 2f, 40, 4210752, false); guiGraphics.drawString(font, data.powerpermb() + " µI/mb", imageWidth / 2f + 20 - font.width(data.powerpermb() + "") / 2f, 50, 4210752, false); diff --git a/src/machines/java/com/enderio/machines/common/blockentity/MobGeneratorBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/SoulEngineBlockEntity.java similarity index 92% rename from src/machines/java/com/enderio/machines/common/blockentity/MobGeneratorBlockEntity.java rename to src/machines/java/com/enderio/machines/common/blockentity/SoulEngineBlockEntity.java index 727bb2dbea..862be06971 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/MobGeneratorBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/SoulEngineBlockEntity.java @@ -12,8 +12,8 @@ import com.enderio.machines.common.config.MachinesConfig; import com.enderio.machines.common.io.fluid.MachineFluidTank; import com.enderio.machines.common.io.item.MachineInventoryLayout; -import com.enderio.machines.common.menu.MobGeneratorMenu; -import com.enderio.machines.common.souldata.GeneratorSoul; +import com.enderio.machines.common.menu.SoulEngineMenu; +import com.enderio.machines.common.souldata.EngineSoul; import net.minecraft.core.BlockPos; import net.minecraft.core.Holder; import net.minecraft.core.registries.Registries; @@ -39,17 +39,17 @@ import static com.enderio.machines.common.blockentity.PoweredSpawnerBlockEntity.NO_MOB; -public class MobGeneratorBlockEntity extends PoweredMachineBlockEntity { +public class SoulEngineBlockEntity extends PoweredMachineBlockEntity { - private static final QuadraticScalable CAPACITY = new QuadraticScalable(CapacitorModifier.ENERGY_CAPACITY, MachinesConfig.COMMON.ENERGY.MOB_GENERATOR_CAPACITY); + private static final QuadraticScalable CAPACITY = new QuadraticScalable(CapacitorModifier.ENERGY_CAPACITY, MachinesConfig.COMMON.ENERGY.SOUL_ENGINE_CAPACITY); private static final String BURNED_TICKS = "burnedTicks"; private StoredEntityData entityData = StoredEntityData.empty(); public static final int FLUID_CAPACITY = 2 * FluidType.BUCKET_VOLUME; @Nullable - private GeneratorSoul.SoulData soulData; + private EngineSoul.SoulData soulData; private int burnedTicks = 0; - public MobGeneratorBlockEntity(BlockEntityType type, + public SoulEngineBlockEntity(BlockEntityType type, BlockPos worldPosition, BlockState blockState) { super(EnergyIOMode.Output, CAPACITY, FixedScalable.ZERO, type, worldPosition, blockState); addDataSlot(new ResourceLocationNetworkDataSlot(() -> this.getEntityType().orElse(NO_MOB),this::setEntityType)); @@ -66,7 +66,7 @@ public MachineInventoryLayout getInventoryLayout() { @Override public void serverTick() { if (entityData != StoredEntityData.empty() && entityData.getEntityType().isPresent()) { - Optional op = GeneratorSoul.GENERATOR.matches(entityData.getEntityType().get()); + Optional op = EngineSoul.ENGINE.matches(entityData.getEntityType().get()); op.ifPresent(data -> { soulData = data; if (isActive()) { @@ -156,7 +156,7 @@ private Predicate isFluidValid() { @Nullable @Override public AbstractContainerMenu createMenu(int containerId, Inventory playerInventory, Player player) { - return new MobGeneratorMenu(this, playerInventory, containerId); + return new SoulEngineMenu(this, playerInventory, containerId); } @Override diff --git a/src/machines/java/com/enderio/machines/common/config/common/EnergyConfig.java b/src/machines/java/com/enderio/machines/common/config/common/EnergyConfig.java index 907e424184..acf1bd4359 100644 --- a/src/machines/java/com/enderio/machines/common/config/common/EnergyConfig.java +++ b/src/machines/java/com/enderio/machines/common/config/common/EnergyConfig.java @@ -33,7 +33,7 @@ public class EnergyConfig { public final ForgeConfigSpec.ConfigValue VIBRANT_CAPACITOR_BANK_CAPACITY; public final ForgeConfigSpec.ConfigValue WIRED_CHARGER_CAPACITY; public final ForgeConfigSpec.ConfigValue WIRED_CHARGER_USAGE; - public final ForgeConfigSpec.ConfigValue MOB_GENERATOR_CAPACITY; + public final ForgeConfigSpec.ConfigValue SOUL_ENGINE_CAPACITY; public EnergyConfig(ForgeConfigSpec.Builder builder) { builder.push("energy"); @@ -115,7 +115,7 @@ public EnergyConfig(ForgeConfigSpec.Builder builder) { builder.pop(); builder.push("mob_generator"); - MOB_GENERATOR_CAPACITY = builder.defineInRange("capacity",100000, 1, Integer.MAX_VALUE); + SOUL_ENGINE_CAPACITY = builder.defineInRange("capacity",100000, 1, Integer.MAX_VALUE); builder.pop(); builder.pop(); diff --git a/src/machines/java/com/enderio/machines/common/init/MachineBlockEntities.java b/src/machines/java/com/enderio/machines/common/init/MachineBlockEntities.java index a704b28519..1bab55909c 100644 --- a/src/machines/java/com/enderio/machines/common/init/MachineBlockEntities.java +++ b/src/machines/java/com/enderio/machines/common/init/MachineBlockEntities.java @@ -82,7 +82,7 @@ public class MachineBlockEntities { return ImmutableMap.copyOf(map); }); - public static final BlockEntityEntry MOB_GENERATOR = register("mob_generator", MobGeneratorBlockEntity::new, MachineBlocks.MOB_GENERATOR); + public static final BlockEntityEntry SOUL_ENGINE = register("soul_engine", SoulEngineBlockEntity::new, MachineBlocks.SOUL_ENGINE); @SafeVarargs private static BlockEntityEntry register(String name, BlockEntityBuilder.BlockEntityFactory beFactory, diff --git a/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java b/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java index 0705610610..3d1b154b9e 100644 --- a/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java +++ b/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java @@ -186,8 +186,8 @@ public class MachineBlocks { public static final BlockEntry CRAFTER = progressMachine("crafter", () -> MachineBlockEntities.CRAFTER) .register(); - public static final BlockEntry MOB_GENERATOR = REGISTRATE - .block("mob_generator", p -> new ProgressMachineBlock(p, MachineBlockEntities.MOB_GENERATOR)) + public static final BlockEntry SOUL_ENGINE = REGISTRATE + .block("soul_engine", p -> new ProgressMachineBlock(p, MachineBlockEntities.SOUL_ENGINE)) .properties(props -> props.strength(2.5f, 8).noOcclusion()) .loot(MachinesLootTable::copyNBT) .tag(BlockTags.NEEDS_IRON_TOOL, BlockTags.MINEABLE_WITH_PICKAXE) diff --git a/src/machines/java/com/enderio/machines/common/init/MachineMenus.java b/src/machines/java/com/enderio/machines/common/init/MachineMenus.java index 3f9ffc6458..8ec9c21ae8 100644 --- a/src/machines/java/com/enderio/machines/common/init/MachineMenus.java +++ b/src/machines/java/com/enderio/machines/common/init/MachineMenus.java @@ -27,7 +27,7 @@ private MachineMenus() {} public static final MenuEntry WIRED_CHARGER = REGISTRATE.menu("wired_charger", WiredChargerMenu::factory, () -> WiredChargerScreen::new).register(); public static final MenuEntry PAINTING_MACHINE = REGISTRATE.menu("painting_machine", PaintingMachineMenu::factory, () -> PaintingMachineScreen::new).register(); public static final MenuEntry CAPACITOR_BANK = REGISTRATE.menu("capacitor_bank", CapacitorBankMenu::factory, () -> CapacitorBankScreen::new).register(); - public static final MenuEntry MOB_GENERATOR = REGISTRATE.menu("mob_generator", MobGeneratorMenu::factory, () -> MobGeneratorScreen::new).register(); + public static final MenuEntry SOUL_ENGINE = REGISTRATE.menu("soul_engine", SoulEngineMenu::factory, () -> SoulEngineScreen::new).register(); public static final MenuEntry TRAVEL_ANCHOR = REGISTRATE.menu("travel_anchor", TravelAnchorMenu::factory, () -> TravelAnchorScreen::new).register(); public static void register() {} diff --git a/src/machines/java/com/enderio/machines/common/integrations/jei/MachineJEIRecipes.java b/src/machines/java/com/enderio/machines/common/integrations/jei/MachineJEIRecipes.java index 08d7eedc4e..f7a6263dab 100644 --- a/src/machines/java/com/enderio/machines/common/integrations/jei/MachineJEIRecipes.java +++ b/src/machines/java/com/enderio/machines/common/integrations/jei/MachineJEIRecipes.java @@ -4,7 +4,7 @@ import com.enderio.machines.common.integrations.jei.util.WrappedEnchanterRecipe; import com.enderio.machines.common.integrations.vanilla.VanillaAlloySmeltingRecipe; import com.enderio.machines.common.recipe.*; -import com.enderio.machines.common.souldata.GeneratorSoul; +import com.enderio.machines.common.souldata.EngineSoul; import net.minecraft.client.Minecraft; import net.minecraft.client.multiplayer.ClientLevel; import net.minecraft.world.item.crafting.RecipeManager; @@ -58,7 +58,7 @@ public List getSagmillingRecipes() { return recipeManager.getAllRecipesFor(MachineRecipes.SAGMILLING.type().get()); } - public List getMobGeneratorRecipes() { - return GeneratorSoul.GENERATOR.map.values().stream().toList(); + public List getMobGeneratorRecipes() { + return EngineSoul.ENGINE.map.values().stream().toList(); } } diff --git a/src/machines/java/com/enderio/machines/common/integrations/jei/MachinesJEI.java b/src/machines/java/com/enderio/machines/common/integrations/jei/MachinesJEI.java index cf5aed4126..5ddd914c76 100644 --- a/src/machines/java/com/enderio/machines/common/integrations/jei/MachinesJEI.java +++ b/src/machines/java/com/enderio/machines/common/integrations/jei/MachinesJEI.java @@ -34,7 +34,7 @@ public void registerRecipeCatalysts(IRecipeCatalystRegistration registration) { registration.addRecipeCatalyst(new ItemStack(MachineBlocks.FLUID_TANK.get()), TankCategory.TYPE); registration.addRecipeCatalyst(new ItemStack(MachineBlocks.PRESSURIZED_FLUID_TANK.get()), TankCategory.TYPE); - registration.addRecipeCatalyst(new ItemStack(MachineBlocks.MOB_GENERATOR.get()), MobGeneratorCategory.TYPE); + registration.addRecipeCatalyst(new ItemStack(MachineBlocks.SOUL_ENGINE.get()), SoulEngineCategory.TYPE); } @Override @@ -47,7 +47,7 @@ public void registerCategories(IRecipeCategoryRegistration registration) { registration.addRecipeCategories(new SoulBindingCategory(registration.getJeiHelpers().getGuiHelper())); registration.addRecipeCategories(new TankCategory(registration.getJeiHelpers().getGuiHelper())); - registration.addRecipeCategories(new MobGeneratorCategory(registration.getJeiHelpers().getGuiHelper())); + registration.addRecipeCategories(new SoulEngineCategory(registration.getJeiHelpers().getGuiHelper())); } @Override @@ -62,7 +62,7 @@ public void registerRecipes(IRecipeRegistration registration) { registration.addRecipes(SoulBindingCategory.TYPE, recipes.getSoulBindingRecipes()); registration.addRecipes(TankCategory.TYPE, recipes.getTankRecipes()); - registration.addRecipes(MobGeneratorCategory.TYPE, recipes.getMobGeneratorRecipes()); + registration.addRecipes(SoulEngineCategory.TYPE, recipes.getMobGeneratorRecipes()); } @Override diff --git a/src/machines/java/com/enderio/machines/common/integrations/jei/category/SoulBindingCategory.java b/src/machines/java/com/enderio/machines/common/integrations/jei/category/SoulBindingCategory.java index 7b99b6ea2f..54c5efd40d 100644 --- a/src/machines/java/com/enderio/machines/common/integrations/jei/category/SoulBindingCategory.java +++ b/src/machines/java/com/enderio/machines/common/integrations/jei/category/SoulBindingCategory.java @@ -105,11 +105,11 @@ public void setRecipe(IRecipeLayoutBuilder builder, SoulBindingRecipe recipe, IF vials = new ArrayList<>(); SoulDataReloadListener soulDataReloadListener = SoulDataReloadListener.fromString(recipe.getSouldata()); - var allEntitiesOfCategory = ForgeRegistries.ENTITY_TYPES.getKeys().stream() + var allEntitiesOfSoulData = ForgeRegistries.ENTITY_TYPES.getKeys().stream() .filter(r -> soulDataReloadListener.map.containsKey(r)) .toList(); - for (ResourceLocation entity : allEntitiesOfCategory) { + for (ResourceLocation entity : allEntitiesOfSoulData) { var item = new ItemStack(EIOItems.FILLED_SOUL_VIAL); SoulVialItem.setEntityType(item, entity); vials.add(item); diff --git a/src/machines/java/com/enderio/machines/common/integrations/jei/category/MobGeneratorCategory.java b/src/machines/java/com/enderio/machines/common/integrations/jei/category/SoulEngineCategory.java similarity index 69% rename from src/machines/java/com/enderio/machines/common/integrations/jei/category/MobGeneratorCategory.java rename to src/machines/java/com/enderio/machines/common/integrations/jei/category/SoulEngineCategory.java index 248898cd88..03888cdf60 100644 --- a/src/machines/java/com/enderio/machines/common/integrations/jei/category/MobGeneratorCategory.java +++ b/src/machines/java/com/enderio/machines/common/integrations/jei/category/SoulEngineCategory.java @@ -4,11 +4,11 @@ import com.enderio.api.capability.StoredEntityData; import com.enderio.base.common.init.EIOCapabilities; import com.enderio.base.common.init.EIOItems; -import com.enderio.machines.client.gui.screen.MobGeneratorScreen; -import com.enderio.machines.common.blockentity.MobGeneratorBlockEntity; +import com.enderio.machines.client.gui.screen.SoulEngineScreen; +import com.enderio.machines.common.blockentity.SoulEngineBlockEntity; import com.enderio.machines.common.init.MachineBlocks; import com.enderio.machines.common.lang.MachineLang; -import com.enderio.machines.common.souldata.GeneratorSoul; +import com.enderio.machines.common.souldata.EngineSoul; import mezz.jei.api.forge.ForgeTypes; import mezz.jei.api.gui.builder.IRecipeLayoutBuilder; import mezz.jei.api.gui.drawable.IDrawable; @@ -37,24 +37,24 @@ import java.util.List; import java.util.Optional; -public class MobGeneratorCategory implements IRecipeCategory { +public class SoulEngineCategory implements IRecipeCategory { - public static final RecipeType TYPE = RecipeType.create(EnderIO.MODID, "mob_generator", GeneratorSoul.SoulData.class); + public static final RecipeType TYPE = RecipeType.create(EnderIO.MODID, "soul_engine", EngineSoul.SoulData.class); private final IDrawableStatic background; private final IDrawable icon; - public MobGeneratorCategory(IGuiHelper guiHelper) { - this.background = guiHelper.createDrawable(MobGeneratorScreen.BG_TEXTURE, 41, 18, 124, 53); - this.icon = guiHelper.createDrawableItemStack(new ItemStack(MachineBlocks.MOB_GENERATOR.get())); + public SoulEngineCategory(IGuiHelper guiHelper) { + this.background = guiHelper.createDrawable(SoulEngineScreen.BG_TEXTURE, 49, 18, 124, 53); + this.icon = guiHelper.createDrawableItemStack(new ItemStack(MachineBlocks.SOUL_ENGINE.get())); } @Override - public RecipeType getRecipeType() { + public RecipeType getRecipeType() { return TYPE; } @Override public Component getTitle() { - return MachineLang.CATEGORY_ALLOY_SMELTING; + return MachineLang.CATEGORY_SOUL_ENGINE; } @Override @@ -68,20 +68,20 @@ public IDrawable getIcon() { } @Override - public void setRecipe(IRecipeLayoutBuilder builder, GeneratorSoul.SoulData recipe, IFocusGroup focuses) { + public void setRecipe(IRecipeLayoutBuilder builder, EngineSoul.SoulData recipe, IFocusGroup focuses) { List list = new ArrayList<>(); String fluid = recipe.fluid(); if (fluid.startsWith("#")) { //We have a fluid tag instead TagKey tag = TagKey.create(Registries.FLUID, new ResourceLocation(fluid.substring(1))); - ForgeRegistries.FLUIDS.tags().getTag(tag).stream().forEach(f -> list.add(new FluidStack(f, MobGeneratorBlockEntity.FLUID_CAPACITY))); + ForgeRegistries.FLUIDS.tags().getTag(tag).stream().forEach(f -> list.add(new FluidStack(f, SoulEngineBlockEntity.FLUID_CAPACITY))); } else { Optional> delegate = ForgeRegistries.FLUIDS.getDelegate(new ResourceLocation(fluid)); - delegate.ifPresent(fluidReference -> list.add(new FluidStack(fluidReference.get(), MobGeneratorBlockEntity.FLUID_CAPACITY))); + delegate.ifPresent(fluidReference -> list.add(new FluidStack(fluidReference.get(), SoulEngineBlockEntity.FLUID_CAPACITY))); } - builder.addSlot(RecipeIngredientRole.INPUT, 39, 3) + builder.addSlot(RecipeIngredientRole.INPUT, 31, 3) .addIngredients(ForgeTypes.FLUID_STACK, list) - .setFluidRenderer(MobGeneratorBlockEntity.FLUID_CAPACITY, false, 16, 47); + .setFluidRenderer(SoulEngineBlockEntity.FLUID_CAPACITY, false, 16, 47); EntityType value = ForgeRegistries.ENTITY_TYPES.getValue(recipe.entitytype()); if (recipe.getKey().equals(ForgeRegistries.ENTITY_TYPES.getKey(value))) { @@ -99,14 +99,14 @@ public void setRecipe(IRecipeLayoutBuilder builder, GeneratorSoul.SoulData recip } @Override - public void draw(GeneratorSoul.SoulData recipe, IRecipeSlotsView recipeSlotsView, GuiGraphics guiGraphics, double mouseX, double mouseY) { + public void draw(EngineSoul.SoulData recipe, IRecipeSlotsView recipeSlotsView, GuiGraphics guiGraphics, double mouseX, double mouseY) { EntityType value = ForgeRegistries.ENTITY_TYPES.getValue(recipe.entitytype()); if (recipe.getKey().equals(ForgeRegistries.ENTITY_TYPES.getKey(value))) { - guiGraphics.drawString(Minecraft.getInstance().font, value.getDescription().getString(), 60, 5, 4210752, false); + guiGraphics.drawString(Minecraft.getInstance().font, value.getDescription().getString(), 50, 5, 4210752, false); } - guiGraphics.drawString(Minecraft.getInstance().font, recipe.tickpermb() + " t/mb", 68 - Minecraft.getInstance().font.width(recipe.tickpermb() + "") / 2f, 30, 4210752, false); - guiGraphics.drawString(Minecraft.getInstance().font, recipe.powerpermb() + " µI/mb", 68 - Minecraft.getInstance().font.width(recipe.powerpermb() + "") / 2f, 40, 4210752, false); + guiGraphics.drawString(Minecraft.getInstance().font, recipe.tickpermb() + " t/mb", 50, 30, 4210752, false); + guiGraphics.drawString(Minecraft.getInstance().font, recipe.powerpermb() + " µI/mb", 50, 40, 4210752, false); } } diff --git a/src/machines/java/com/enderio/machines/common/lang/MachineLang.java b/src/machines/java/com/enderio/machines/common/lang/MachineLang.java index 3fe912bab4..36e0b5e8d0 100644 --- a/src/machines/java/com/enderio/machines/common/lang/MachineLang.java +++ b/src/machines/java/com/enderio/machines/common/lang/MachineLang.java @@ -30,6 +30,7 @@ public class MachineLang { public static final MutableComponent CATEGORY_SLICING = REGISTRATE.addLang("gui", EnderIO.loc("category.slicing"), "Slicing"); public static final MutableComponent CATEGORY_SOUL_BINDING = REGISTRATE.addLang("gui", EnderIO.loc("category.soul_binding"), "Soul Binding"); public static final MutableComponent CATEGORY_TANK = REGISTRATE.addLang("gui", EnderIO.loc("category.tank"), "Fluid Tank"); + public static final MutableComponent CATEGORY_SOUL_ENGINE = REGISTRATE.addLang("gui", EnderIO.loc("category.soul_engine"), "Soul Engine"); // endregion diff --git a/src/machines/java/com/enderio/machines/common/menu/MobGeneratorMenu.java b/src/machines/java/com/enderio/machines/common/menu/SoulEngineMenu.java similarity index 53% rename from src/machines/java/com/enderio/machines/common/menu/MobGeneratorMenu.java rename to src/machines/java/com/enderio/machines/common/menu/SoulEngineMenu.java index cc99396a84..b3e997423b 100644 --- a/src/machines/java/com/enderio/machines/common/menu/MobGeneratorMenu.java +++ b/src/machines/java/com/enderio/machines/common/menu/SoulEngineMenu.java @@ -1,6 +1,6 @@ package com.enderio.machines.common.menu; -import com.enderio.machines.common.blockentity.MobGeneratorBlockEntity; +import com.enderio.machines.common.blockentity.SoulEngineBlockEntity; import com.enderio.machines.common.init.MachineMenus; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.world.entity.player.Inventory; @@ -9,10 +9,10 @@ import org.apache.logging.log4j.LogManager; import org.jetbrains.annotations.Nullable; -public class MobGeneratorMenu extends MachineMenu{ +public class SoulEngineMenu extends MachineMenu{ - public MobGeneratorMenu(@Nullable MobGeneratorBlockEntity blockEntity, Inventory inventory, int pContainerId) { - super(blockEntity, inventory, MachineMenus.MOB_GENERATOR.get(), pContainerId); + public SoulEngineMenu(@Nullable SoulEngineBlockEntity blockEntity, Inventory inventory, int pContainerId) { + super(blockEntity, inventory, MachineMenus.SOUL_ENGINE.get(), pContainerId); if (blockEntity != null) { // Capacitor slot if (blockEntity.requiresCapacitor()) { @@ -22,11 +22,11 @@ public MobGeneratorMenu(@Nullable MobGeneratorBlockEntity blockEntity, Inventory addInventorySlots(8, 84); } - public static MobGeneratorMenu factory(@Nullable MenuType pMenuType, int pContainerId, Inventory inventory, FriendlyByteBuf buf) { + public static SoulEngineMenu factory(@Nullable MenuType pMenuType, int pContainerId, Inventory inventory, FriendlyByteBuf buf) { BlockEntity entity = inventory.player.level().getBlockEntity(buf.readBlockPos()); - if (entity instanceof MobGeneratorBlockEntity castBlockEntity) - return new MobGeneratorMenu(castBlockEntity, inventory, pContainerId); + if (entity instanceof SoulEngineBlockEntity castBlockEntity) + return new SoulEngineMenu(castBlockEntity, inventory, pContainerId); LogManager.getLogger().warn("couldn't find BlockEntity"); - return new MobGeneratorMenu(null, inventory, pContainerId); + return new SoulEngineMenu(null, inventory, pContainerId); } } diff --git a/src/machines/java/com/enderio/machines/common/network/MachineNetwork.java b/src/machines/java/com/enderio/machines/common/network/MachineNetwork.java index 8e2716b052..851f0445f6 100644 --- a/src/machines/java/com/enderio/machines/common/network/MachineNetwork.java +++ b/src/machines/java/com/enderio/machines/common/network/MachineNetwork.java @@ -1,7 +1,7 @@ package com.enderio.machines.common.network; import com.enderio.core.common.network.CoreNetwork; -import com.enderio.machines.common.souldata.GeneratorSoul; +import com.enderio.machines.common.souldata.EngineSoul; import com.enderio.machines.common.souldata.SpawnerSoul; public class MachineNetwork { @@ -9,10 +9,10 @@ public class MachineNetwork { public static void networkInit() { //Sync soul data (optional) SpawnerSoul.SPAWNER.subscribeAsSyncable(PoweredSpawnerSoulPacket::new); - GeneratorSoul.GENERATOR.subscribeAsSyncable(MobGeneratorSoulPacket::new); + EngineSoul.ENGINE.subscribeAsSyncable(SoulEngineSoulPacket::new); //packets CoreNetwork.registerPacket(new PoweredSpawnerSoulPacket.Handler(), PoweredSpawnerSoulPacket.class); - CoreNetwork.registerPacket(new MobGeneratorSoulPacket.Handler(), MobGeneratorSoulPacket.class); + CoreNetwork.registerPacket(new SoulEngineSoulPacket.Handler(), SoulEngineSoulPacket.class); } } diff --git a/src/machines/java/com/enderio/machines/common/network/PoweredSpawnerSoulPacket.java b/src/machines/java/com/enderio/machines/common/network/PoweredSpawnerSoulPacket.java index 916c63da8c..019a40a483 100644 --- a/src/machines/java/com/enderio/machines/common/network/PoweredSpawnerSoulPacket.java +++ b/src/machines/java/com/enderio/machines/common/network/PoweredSpawnerSoulPacket.java @@ -8,13 +8,10 @@ import net.minecraftforge.network.NetworkDirection; import net.minecraftforge.network.NetworkEvent; -import java.util.HashMap; import java.util.Map; import java.util.Optional; public class PoweredSpawnerSoulPacket implements Packet { - public static Map SYNCED_DATA = new HashMap<>(); - private final Map map; public PoweredSpawnerSoulPacket(Map map) { @@ -42,7 +39,7 @@ public boolean isValid(NetworkEvent.Context context) { @Override public void handle(NetworkEvent.Context context) { - context.enqueueWork(() -> SYNCED_DATA = this.map); + context.enqueueWork(() -> SpawnerSoul.SPAWNER.map = this.map); context.setPacketHandled(true); } diff --git a/src/machines/java/com/enderio/machines/common/network/MobGeneratorSoulPacket.java b/src/machines/java/com/enderio/machines/common/network/SoulEngineSoulPacket.java similarity index 59% rename from src/machines/java/com/enderio/machines/common/network/MobGeneratorSoulPacket.java rename to src/machines/java/com/enderio/machines/common/network/SoulEngineSoulPacket.java index 066af3d271..e6801c3312 100644 --- a/src/machines/java/com/enderio/machines/common/network/MobGeneratorSoulPacket.java +++ b/src/machines/java/com/enderio/machines/common/network/SoulEngineSoulPacket.java @@ -1,29 +1,26 @@ package com.enderio.machines.common.network; import com.enderio.core.common.network.Packet; -import com.enderio.machines.common.souldata.GeneratorSoul; +import com.enderio.machines.common.souldata.EngineSoul; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.resources.ResourceLocation; import net.minecraftforge.network.NetworkDirection; import net.minecraftforge.network.NetworkEvent; -import java.util.HashMap; import java.util.Map; import java.util.Optional; -public class MobGeneratorSoulPacket implements Packet { +public class SoulEngineSoulPacket implements Packet { - public static Map SYNCED_DATA = new HashMap<>(); + private final Map map; - private final Map map; - - public MobGeneratorSoulPacket(Map map) { + public SoulEngineSoulPacket(Map map) { this.map = map; } - public MobGeneratorSoulPacket(FriendlyByteBuf buf) { + public SoulEngineSoulPacket(FriendlyByteBuf buf) { this.map = buf.readMap(FriendlyByteBuf::readResourceLocation, buff -> - new GeneratorSoul.SoulData(buff.readResourceLocation(), buff.readUtf(), buff.readInt(), buff.readInt()) + new EngineSoul.SoulData(buff.readResourceLocation(), buff.readUtf(), buff.readInt(), buff.readInt()) ); } @@ -42,19 +39,19 @@ public boolean isValid(NetworkEvent.Context context) { @Override public void handle(NetworkEvent.Context context) { - context.enqueueWork(() -> SYNCED_DATA = this.map); + context.enqueueWork(() -> EngineSoul.ENGINE.map = this.map); context.setPacketHandled(true); } - public static class Handler extends PacketHandler { + public static class Handler extends PacketHandler { @Override - public MobGeneratorSoulPacket fromNetwork(FriendlyByteBuf buf) { - return new MobGeneratorSoulPacket(buf); + public SoulEngineSoulPacket fromNetwork(FriendlyByteBuf buf) { + return new SoulEngineSoulPacket(buf); } @Override - public void toNetwork(MobGeneratorSoulPacket packet, FriendlyByteBuf buf) { + public void toNetwork(SoulEngineSoulPacket packet, FriendlyByteBuf buf) { packet.write(buf); } diff --git a/src/machines/java/com/enderio/machines/common/souldata/GeneratorSoul.java b/src/machines/java/com/enderio/machines/common/souldata/EngineSoul.java similarity index 87% rename from src/machines/java/com/enderio/machines/common/souldata/GeneratorSoul.java rename to src/machines/java/com/enderio/machines/common/souldata/EngineSoul.java index 8881970ab0..c2ecf668a5 100644 --- a/src/machines/java/com/enderio/machines/common/souldata/GeneratorSoul.java +++ b/src/machines/java/com/enderio/machines/common/souldata/EngineSoul.java @@ -8,7 +8,7 @@ import net.minecraftforge.fml.common.Mod; @Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.FORGE) -public class GeneratorSoul { +public class EngineSoul { public record SoulData(ResourceLocation entitytype, String fluid, int powerpermb, int tickpermb) implements ISoulData { @Override @@ -25,10 +25,10 @@ public ResourceLocation getKey() { .apply(soulDataInstance, SoulData::new)); public static final String NAME = "generator"; - public static final SoulDataReloadListener GENERATOR = new SoulDataReloadListener<>(NAME, CODEC); + public static final SoulDataReloadListener ENGINE = new SoulDataReloadListener<>(NAME, CODEC); @SubscribeEvent static void addResource(AddReloadListenerEvent event) { - event.addListener(GENERATOR); + event.addListener(ENGINE); } } diff --git a/src/machines/java/com/enderio/machines/data/recipes/MachineRecipeProvider.java b/src/machines/java/com/enderio/machines/data/recipes/MachineRecipeProvider.java index 481b8f9227..6a64f38af5 100644 --- a/src/machines/java/com/enderio/machines/data/recipes/MachineRecipeProvider.java +++ b/src/machines/java/com/enderio/machines/data/recipes/MachineRecipeProvider.java @@ -230,7 +230,7 @@ protected void buildRecipes(Consumer finishedRecipeConsumer) { .save(finishedRecipeConsumer); ShapedEntityStorageRecipeBuilder - .shaped(RecipeCategory.MISC, MachineBlocks.MOB_GENERATOR) + .shaped(RecipeCategory.MISC, MachineBlocks.SOUL_ENGINE) .define('I', EIOItems.SOULARIUM_INGOT) //TODO Maybe also soulchains? .define('B', Items.BUCKET) .define('C', EIOBlocks.ENSOULED_CHASSIS) diff --git a/src/machines/java/com/enderio/machines/data/recipes/SoulBindingRecipeProvider.java b/src/machines/java/com/enderio/machines/data/recipes/SoulBindingRecipeProvider.java index a08cd1a992..230726c2f4 100644 --- a/src/machines/java/com/enderio/machines/data/recipes/SoulBindingRecipeProvider.java +++ b/src/machines/java/com/enderio/machines/data/recipes/SoulBindingRecipeProvider.java @@ -6,7 +6,7 @@ import com.enderio.core.data.recipes.EnderRecipeProvider; import com.enderio.machines.common.init.MachineBlocks; import com.enderio.machines.common.init.MachineRecipes; -import com.enderio.machines.common.souldata.GeneratorSoul; +import com.enderio.machines.common.souldata.EngineSoul; import com.google.gson.JsonObject; import net.minecraft.data.PackOutput; import net.minecraft.data.recipes.FinishedRecipe; @@ -40,7 +40,7 @@ protected void buildRecipes(Consumer pFinishedRecipeConsumer) { build(EIOItems.FRANK_N_ZOMBIE, Ingredient.of(EIOItems.Z_LOGIC_CONTROLLER), 51200, 4, EntityType.ZOMBIE, pFinishedRecipeConsumer); build(EIOItems.SENTIENT_ENDER, Ingredient.of(EIOItems.ENDER_RESONATOR), 51200, 4, EntityType.WITCH, pFinishedRecipeConsumer); build(EIOItems.BROKEN_SPAWNER, Ingredient.of(EIOItems.BROKEN_SPAWNER), 288000, 8, pFinishedRecipeConsumer); - build(MachineBlocks.MOB_GENERATOR, Ingredient.of(MachineBlocks.MOB_GENERATOR), 188000, 5, GeneratorSoul.NAME, pFinishedRecipeConsumer); + build(MachineBlocks.SOUL_ENGINE, Ingredient.of(MachineBlocks.SOUL_ENGINE), 188000, 5, EngineSoul.NAME, pFinishedRecipeConsumer); build(EIOItems.PLAYER_TOKEN, Ingredient.of(EIOItems.DARK_STEEL_BALL), 12800, 1, EntityType.VILLAGER, pFinishedRecipeConsumer); build(EIOItems.MONSTER_TOKEN, Ingredient.of(EIOItems.SOULARIUM_BALL), 12800, 1, MobCategory.MONSTER, pFinishedRecipeConsumer); build(EIOItems.ANIMAL_TOKEN, Ingredient.of(EIOItems.SOULARIUM_BALL), 12800, 1, MobCategory.CREATURE, pFinishedRecipeConsumer); diff --git a/src/machines/java/com/enderio/machines/data/souldata/SoulDataProvider.java b/src/machines/java/com/enderio/machines/data/souldata/SoulDataProvider.java index 8987d3d51a..2b0e9b2efb 100644 --- a/src/machines/java/com/enderio/machines/data/souldata/SoulDataProvider.java +++ b/src/machines/java/com/enderio/machines/data/souldata/SoulDataProvider.java @@ -3,7 +3,7 @@ import com.enderio.EnderIO; import com.enderio.base.common.init.EIOFluids; import com.enderio.machines.common.blockentity.task.SpawnerMachineTask; -import com.enderio.machines.common.souldata.GeneratorSoul; +import com.enderio.machines.common.souldata.EngineSoul; import com.enderio.machines.common.souldata.ISoulData; import com.enderio.machines.common.souldata.SpawnerSoul; import com.google.common.collect.Sets; @@ -148,15 +148,15 @@ private void addSpawnerData(EntityType entityType, int power, SpawnerMachineT private void addGeneratorData(EntityType entityType, Fluid fluid, int powerpermb, int tickpermb, Consumer> finshedSoulDataConsumer) { ResourceLocation entityRL = ForgeRegistries.ENTITY_TYPES.getKey(entityType); ResourceLocation fluidRL = ForgeRegistries.FLUIDS.getKey(fluid); - GeneratorSoul.SoulData data = new GeneratorSoul.SoulData(entityRL, fluidRL.toString(), powerpermb, tickpermb); - finshedSoulDataConsumer.accept(new FinshedSoulData<>(GeneratorSoul.CODEC, data, "generator/" + entityRL.getNamespace() + "_" + entityRL.getPath())); + EngineSoul.SoulData data = new EngineSoul.SoulData(entityRL, fluidRL.toString(), powerpermb, tickpermb); + finshedSoulDataConsumer.accept(new FinshedSoulData<>(EngineSoul.CODEC, data, "generator/" + entityRL.getNamespace() + "_" + entityRL.getPath())); } private void addGeneratorData(EntityType entityType, TagKey fluid, int powerpermb, int tickpermb, Consumer> finshedSoulDataConsumer) { ResourceLocation entityRL = ForgeRegistries.ENTITY_TYPES.getKey(entityType); String fluidRL = "#" + fluid.location(); - GeneratorSoul.SoulData data = new GeneratorSoul.SoulData(entityRL, fluidRL, powerpermb, tickpermb); - finshedSoulDataConsumer.accept(new FinshedSoulData<>(GeneratorSoul.CODEC, data, "generator/" + entityRL.getNamespace() + "_" + entityRL.getPath())); + EngineSoul.SoulData data = new EngineSoul.SoulData(entityRL, fluidRL, powerpermb, tickpermb); + finshedSoulDataConsumer.accept(new FinshedSoulData<>(EngineSoul.CODEC, data, "generator/" + entityRL.getNamespace() + "_" + entityRL.getPath())); } static class FinshedSoulData { diff --git a/src/machines/resources/assets/enderio/models/block/mob_generator.json b/src/machines/resources/assets/enderio/models/block/soul_engine.json similarity index 100% rename from src/machines/resources/assets/enderio/models/block/mob_generator.json rename to src/machines/resources/assets/enderio/models/block/soul_engine.json diff --git a/src/machines/resources/assets/enderio/models/block/mob_generator_active.json b/src/machines/resources/assets/enderio/models/block/soul_engine_active.json similarity index 100% rename from src/machines/resources/assets/enderio/models/block/mob_generator_active.json rename to src/machines/resources/assets/enderio/models/block/soul_engine_active.json diff --git a/src/main/resources/assets/enderio/textures/gui/mob_generator.png b/src/main/resources/assets/enderio/textures/gui/soul_engine.png similarity index 100% rename from src/main/resources/assets/enderio/textures/gui/mob_generator.png rename to src/main/resources/assets/enderio/textures/gui/soul_engine.png From 8c15dae81d3b48dc9bc9937b6d21e4e3c7cdaaf8 Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Sat, 19 Aug 2023 02:06:54 +0200 Subject: [PATCH 135/154] update datagen --- .../minecraft_blaze.json | 0 .../minecraft_enderman.json | 0 .../{generator => engine}/minecraft_husk.json | 0 .../minecraft_zombie.json | 0 .../minecraft_zombie_villager.json | 0 .../recipes/soulbinding/soul_engine.json | 2 +- .../machines/common/souldata/EngineSoul.java | 2 +- .../data/souldata/SoulDataProvider.java | 20 +++++++++---------- 8 files changed, 12 insertions(+), 12 deletions(-) rename src/generated/resources/data/enderio/eio_soul/{generator => engine}/minecraft_blaze.json (100%) rename src/generated/resources/data/enderio/eio_soul/{generator => engine}/minecraft_enderman.json (100%) rename src/generated/resources/data/enderio/eio_soul/{generator => engine}/minecraft_husk.json (100%) rename src/generated/resources/data/enderio/eio_soul/{generator => engine}/minecraft_zombie.json (100%) rename src/generated/resources/data/enderio/eio_soul/{generator => engine}/minecraft_zombie_villager.json (100%) diff --git a/src/generated/resources/data/enderio/eio_soul/generator/minecraft_blaze.json b/src/generated/resources/data/enderio/eio_soul/engine/minecraft_blaze.json similarity index 100% rename from src/generated/resources/data/enderio/eio_soul/generator/minecraft_blaze.json rename to src/generated/resources/data/enderio/eio_soul/engine/minecraft_blaze.json diff --git a/src/generated/resources/data/enderio/eio_soul/generator/minecraft_enderman.json b/src/generated/resources/data/enderio/eio_soul/engine/minecraft_enderman.json similarity index 100% rename from src/generated/resources/data/enderio/eio_soul/generator/minecraft_enderman.json rename to src/generated/resources/data/enderio/eio_soul/engine/minecraft_enderman.json diff --git a/src/generated/resources/data/enderio/eio_soul/generator/minecraft_husk.json b/src/generated/resources/data/enderio/eio_soul/engine/minecraft_husk.json similarity index 100% rename from src/generated/resources/data/enderio/eio_soul/generator/minecraft_husk.json rename to src/generated/resources/data/enderio/eio_soul/engine/minecraft_husk.json diff --git a/src/generated/resources/data/enderio/eio_soul/generator/minecraft_zombie.json b/src/generated/resources/data/enderio/eio_soul/engine/minecraft_zombie.json similarity index 100% rename from src/generated/resources/data/enderio/eio_soul/generator/minecraft_zombie.json rename to src/generated/resources/data/enderio/eio_soul/engine/minecraft_zombie.json diff --git a/src/generated/resources/data/enderio/eio_soul/generator/minecraft_zombie_villager.json b/src/generated/resources/data/enderio/eio_soul/engine/minecraft_zombie_villager.json similarity index 100% rename from src/generated/resources/data/enderio/eio_soul/generator/minecraft_zombie_villager.json rename to src/generated/resources/data/enderio/eio_soul/engine/minecraft_zombie_villager.json diff --git a/src/generated/resources/data/enderio/recipes/soulbinding/soul_engine.json b/src/generated/resources/data/enderio/recipes/soulbinding/soul_engine.json index e22fecc342..423389fc9a 100644 --- a/src/generated/resources/data/enderio/recipes/soulbinding/soul_engine.json +++ b/src/generated/resources/data/enderio/recipes/soulbinding/soul_engine.json @@ -6,5 +6,5 @@ "item": "enderio:soul_engine" }, "output": "enderio:soul_engine", - "souldata": "generator" + "souldata": "engine" } \ No newline at end of file diff --git a/src/machines/java/com/enderio/machines/common/souldata/EngineSoul.java b/src/machines/java/com/enderio/machines/common/souldata/EngineSoul.java index c2ecf668a5..75de6a97aa 100644 --- a/src/machines/java/com/enderio/machines/common/souldata/EngineSoul.java +++ b/src/machines/java/com/enderio/machines/common/souldata/EngineSoul.java @@ -24,7 +24,7 @@ public ResourceLocation getKey() { Codec.INT.fieldOf("tick/mb").forGetter(SoulData::tickpermb)) .apply(soulDataInstance, SoulData::new)); - public static final String NAME = "generator"; + public static final String NAME = "engine"; public static final SoulDataReloadListener ENGINE = new SoulDataReloadListener<>(NAME, CODEC); @SubscribeEvent diff --git a/src/machines/java/com/enderio/machines/data/souldata/SoulDataProvider.java b/src/machines/java/com/enderio/machines/data/souldata/SoulDataProvider.java index 2b0e9b2efb..da0bf46936 100644 --- a/src/machines/java/com/enderio/machines/data/souldata/SoulDataProvider.java +++ b/src/machines/java/com/enderio/machines/data/souldata/SoulDataProvider.java @@ -111,11 +111,11 @@ public void buildSoulData(Consumer> finshedSoulDataConsumer) addSpawnerData(EntityType.ZOMBIE_VILLAGER, 51_200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); addSpawnerData(EntityType.ZOMBIFIED_PIGLIN, 51_200, SpawnerMachineTask.SpawnType.ENTITYTYPE, finshedSoulDataConsumer); - addGeneratorData(EntityType.BLAZE, FluidTags.LAVA, 300, 15, finshedSoulDataConsumer); - addGeneratorData(EntityType.ZOMBIE, EIOFluids.NUTRIENT_DISTILLATION.get(), 500, 15, finshedSoulDataConsumer); - addGeneratorData(EntityType.ZOMBIE_VILLAGER, EIOFluids.NUTRIENT_DISTILLATION.get(), 500, 15, finshedSoulDataConsumer); - addGeneratorData(EntityType.HUSK, EIOFluids.NUTRIENT_DISTILLATION.get(), 500, 15, finshedSoulDataConsumer); - addGeneratorData(EntityType.ENDERMAN, EIOFluids.DEW_OF_THE_VOID.get(), 900, 10, finshedSoulDataConsumer); + addEngineData(EntityType.BLAZE, FluidTags.LAVA, 300, 15, finshedSoulDataConsumer); + addEngineData(EntityType.ZOMBIE, EIOFluids.NUTRIENT_DISTILLATION.get(), 500, 15, finshedSoulDataConsumer); + addEngineData(EntityType.ZOMBIE_VILLAGER, EIOFluids.NUTRIENT_DISTILLATION.get(), 500, 15, finshedSoulDataConsumer); + addEngineData(EntityType.HUSK, EIOFluids.NUTRIENT_DISTILLATION.get(), 500, 15, finshedSoulDataConsumer); + addEngineData(EntityType.ENDERMAN, EIOFluids.DEW_OF_THE_VOID.get(), 900, 10, finshedSoulDataConsumer); } @@ -142,21 +142,21 @@ public String getName() { private void addSpawnerData(EntityType entityType, int power, SpawnerMachineTask.SpawnType type, Consumer> finshedSoulDataConsumer) { ResourceLocation key = ForgeRegistries.ENTITY_TYPES.getKey(entityType); SpawnerSoul.SoulData data = new SpawnerSoul.SoulData(key, power, type); - finshedSoulDataConsumer.accept(new FinshedSoulData<>(SpawnerSoul.CODEC, data, "spawner/" + key.getNamespace() + "_" + key.getPath())); + finshedSoulDataConsumer.accept(new FinshedSoulData<>(SpawnerSoul.CODEC, data, SpawnerSoul.NAME + "/" + key.getNamespace() + "_" + key.getPath())); } - private void addGeneratorData(EntityType entityType, Fluid fluid, int powerpermb, int tickpermb, Consumer> finshedSoulDataConsumer) { + private void addEngineData(EntityType entityType, Fluid fluid, int powerpermb, int tickpermb, Consumer> finshedSoulDataConsumer) { ResourceLocation entityRL = ForgeRegistries.ENTITY_TYPES.getKey(entityType); ResourceLocation fluidRL = ForgeRegistries.FLUIDS.getKey(fluid); EngineSoul.SoulData data = new EngineSoul.SoulData(entityRL, fluidRL.toString(), powerpermb, tickpermb); - finshedSoulDataConsumer.accept(new FinshedSoulData<>(EngineSoul.CODEC, data, "generator/" + entityRL.getNamespace() + "_" + entityRL.getPath())); + finshedSoulDataConsumer.accept(new FinshedSoulData<>(EngineSoul.CODEC, data, EngineSoul.NAME + "/" + entityRL.getNamespace() + "_" + entityRL.getPath())); } - private void addGeneratorData(EntityType entityType, TagKey fluid, int powerpermb, int tickpermb, Consumer> finshedSoulDataConsumer) { + private void addEngineData(EntityType entityType, TagKey fluid, int powerpermb, int tickpermb, Consumer> finshedSoulDataConsumer) { ResourceLocation entityRL = ForgeRegistries.ENTITY_TYPES.getKey(entityType); String fluidRL = "#" + fluid.location(); EngineSoul.SoulData data = new EngineSoul.SoulData(entityRL, fluidRL, powerpermb, tickpermb); - finshedSoulDataConsumer.accept(new FinshedSoulData<>(EngineSoul.CODEC, data, "generator/" + entityRL.getNamespace() + "_" + entityRL.getPath())); + finshedSoulDataConsumer.accept(new FinshedSoulData<>(EngineSoul.CODEC, data, EngineSoul.NAME + "/" + entityRL.getNamespace() + "_" + entityRL.getPath())); } static class FinshedSoulData { From 6b32bdc285af357d9ab0018b29d6c20c1f9a42f8 Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Sat, 19 Aug 2023 02:25:04 +0200 Subject: [PATCH 136/154] fix crash --- .../machines/common/blockentity/DrainBlockEntity.java | 9 ++++++--- .../machines/common/config/common/EnergyConfig.java | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/machines/java/com/enderio/machines/common/blockentity/DrainBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/DrainBlockEntity.java index 67ba06e8dc..d4a40689b7 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/DrainBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/DrainBlockEntity.java @@ -40,7 +40,7 @@ public class DrainBlockEntity extends PoweredMachineBlockEntity { private static final QuadraticScalable ENERGY_CAPACITY = new QuadraticScalable(CapacitorModifier.ENERGY_CAPACITY, MachinesConfig.COMMON.ENERGY.DRAIN_CAPACITY); private static final QuadraticScalable ENERGY_USAGE = new QuadraticScalable(CapacitorModifier.ENERGY_USE, MachinesConfig.COMMON.ENERGY.DRAIN_USAGE); private static final int CAPACITY = 3 * FluidType.BUCKET_VOLUME; - private static final int ENERGY_PER_BUCKET = 16000; //TODO balance + private static final int ENERGY_PER_BUCKET = 1_500; private List positions; private int currentIndex = 0; private boolean fluidFound = false; @@ -101,10 +101,13 @@ protected boolean isActive() { } public void drainFluids() { + if (currentIndex >= positions.size()) { + currentIndex--; + } BlockPos pos = positions.get(currentIndex); //Skip, as this is the last checked block - if (pos.equals(worldPosition.below())) { + if (pos.equals(worldPosition.below()) && positions.size() != 1) { currentIndex++; return; } @@ -169,10 +172,10 @@ public void onLoad() { private void updateLocations() { positions = new ArrayList<>(); + currentIndex = 0; for (BlockPos pos : BlockPos.betweenClosed(worldPosition.offset(-range,-range*2 - 1,-range), worldPosition.offset(range,-1,range))) { positions.add(pos.immutable()); //Need to make it immutable } - currentIndex = 0; } @Override diff --git a/src/machines/java/com/enderio/machines/common/config/common/EnergyConfig.java b/src/machines/java/com/enderio/machines/common/config/common/EnergyConfig.java index 42cc6f5360..f6815065ab 100644 --- a/src/machines/java/com/enderio/machines/common/config/common/EnergyConfig.java +++ b/src/machines/java/com/enderio/machines/common/config/common/EnergyConfig.java @@ -116,8 +116,8 @@ public EnergyConfig(ForgeConfigSpec.Builder builder) { builder.pop(); builder.push("drain"); - DRAIN_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 1000000, 1, Integer.MAX_VALUE); - DRAIN_USAGE = builder.comment("The base energy consumption in uI/t.").defineInRange("usage", 100, 1, Integer.MAX_VALUE); + DRAIN_CAPACITY = builder.comment("The base energy capacity in uI.").defineInRange("capacity", 64_000, 1, Integer.MAX_VALUE); + DRAIN_USAGE = builder.comment("The base energy consumption in uI/t.").defineInRange("usage", 10, 1, Integer.MAX_VALUE); builder.pop(); builder.pop(); From f4ae0daef51f2faf7b24fd5e076c663e8bae3ec9 Mon Sep 17 00:00:00 2001 From: Lemon-Juiced Date: Fri, 18 Aug 2023 22:24:45 -0400 Subject: [PATCH 137/154] Made requested changes for #424 --- .../recipes/sagmilling/raw_copper.json | 20 -------------- .../enderio/recipes/sagmilling/raw_gold.json | 20 -------------- .../enderio/recipes/sagmilling/raw_iron.json | 20 -------------- .../forge/tags/blocks/storage_blocks.json | 13 +++++++++ .../storage_blocks/conductive_alloy.json | 5 ++++ .../blocks/storage_blocks/copper_alloy.json | 5 ++++ .../blocks/storage_blocks/dark_steel.json | 5 ++++ .../tags/blocks/storage_blocks/end_steel.json | 5 ++++ .../storage_blocks/energetic_alloy.json | 5 ++++ .../storage_blocks/pulsating_alloy.json | 5 ++++ .../blocks/storage_blocks/redstone_alloy.json | 5 ++++ .../tags/blocks/storage_blocks/soularium.json | 5 ++++ .../blocks/storage_blocks/vibrant_alloy.json | 5 ++++ .../data/forge/tags/items/dusts.json | 7 ++++- .../tags/items/dusts/grains_of_infinity.json | 5 ++++ .../items/dusts/grains_of_pizeallity.json | 5 ++++ .../items/dusts/grains_of_prescience.json | 5 ++++ .../tags/items/dusts/grains_of_the_end.json | 5 ++++ .../tags/items/dusts/grains_of_vibrancy.json | 5 ++++ .../data/forge/tags/items/storage_blocks.json | 13 +++++++++ .../data/recipes/SagMillRecipeProvider.java | 19 ------------- .../enderio/base/common/init/EIOBlocks.java | 19 ++++++------- .../enderio/base/common/init/EIOItems.java | 10 +++---- .../com/enderio/base/common/tag/EIOTags.java | 27 +++++++++++++++++++ .../base/data/tags/EIOBlockTagsProvider.java | 3 +++ .../base/data/tags/EIOItemTagsProvider.java | 4 ++- 26 files changed, 150 insertions(+), 95 deletions(-) delete mode 100644 src/generated/resources/data/enderio/recipes/sagmilling/raw_copper.json delete mode 100644 src/generated/resources/data/enderio/recipes/sagmilling/raw_gold.json delete mode 100644 src/generated/resources/data/enderio/recipes/sagmilling/raw_iron.json create mode 100644 src/generated/resources/data/forge/tags/blocks/storage_blocks.json create mode 100644 src/generated/resources/data/forge/tags/blocks/storage_blocks/conductive_alloy.json create mode 100644 src/generated/resources/data/forge/tags/blocks/storage_blocks/copper_alloy.json create mode 100644 src/generated/resources/data/forge/tags/blocks/storage_blocks/dark_steel.json create mode 100644 src/generated/resources/data/forge/tags/blocks/storage_blocks/end_steel.json create mode 100644 src/generated/resources/data/forge/tags/blocks/storage_blocks/energetic_alloy.json create mode 100644 src/generated/resources/data/forge/tags/blocks/storage_blocks/pulsating_alloy.json create mode 100644 src/generated/resources/data/forge/tags/blocks/storage_blocks/redstone_alloy.json create mode 100644 src/generated/resources/data/forge/tags/blocks/storage_blocks/soularium.json create mode 100644 src/generated/resources/data/forge/tags/blocks/storage_blocks/vibrant_alloy.json create mode 100644 src/generated/resources/data/forge/tags/items/dusts/grains_of_infinity.json create mode 100644 src/generated/resources/data/forge/tags/items/dusts/grains_of_pizeallity.json create mode 100644 src/generated/resources/data/forge/tags/items/dusts/grains_of_prescience.json create mode 100644 src/generated/resources/data/forge/tags/items/dusts/grains_of_the_end.json create mode 100644 src/generated/resources/data/forge/tags/items/dusts/grains_of_vibrancy.json create mode 100644 src/generated/resources/data/forge/tags/items/storage_blocks.json diff --git a/src/generated/resources/data/enderio/recipes/sagmilling/raw_copper.json b/src/generated/resources/data/enderio/recipes/sagmilling/raw_copper.json deleted file mode 100644 index d18b778f5f..0000000000 --- a/src/generated/resources/data/enderio/recipes/sagmilling/raw_copper.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "type": "enderio:sagmilling", - "energy": 2400, - "input": { - "tag": "forge:raw_materials/copper" - }, - "outputs": [ - { - "item": "enderio:powdered_copper" - }, - { - "chance": 0.25, - "item": "enderio:powdered_copper" - }, - { - "chance": 0.12, - "item": "enderio:powdered_gold" - } - ] -} \ No newline at end of file diff --git a/src/generated/resources/data/enderio/recipes/sagmilling/raw_gold.json b/src/generated/resources/data/enderio/recipes/sagmilling/raw_gold.json deleted file mode 100644 index 184fd6cd8d..0000000000 --- a/src/generated/resources/data/enderio/recipes/sagmilling/raw_gold.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "type": "enderio:sagmilling", - "energy": 2400, - "input": { - "tag": "forge:raw_materials/gold" - }, - "outputs": [ - { - "item": "enderio:powdered_gold" - }, - { - "chance": 0.25, - "item": "enderio:powdered_gold" - }, - { - "chance": 0.2, - "item": "enderio:powdered_copper" - } - ] -} \ No newline at end of file diff --git a/src/generated/resources/data/enderio/recipes/sagmilling/raw_iron.json b/src/generated/resources/data/enderio/recipes/sagmilling/raw_iron.json deleted file mode 100644 index b8f6696ade..0000000000 --- a/src/generated/resources/data/enderio/recipes/sagmilling/raw_iron.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "type": "enderio:sagmilling", - "energy": 2400, - "input": { - "tag": "forge:raw_materials/iron" - }, - "outputs": [ - { - "item": "enderio:powdered_iron" - }, - { - "chance": 0.25, - "item": "enderio:powdered_iron" - }, - { - "chance": 0.05, - "item": "enderio:powdered_tin" - } - ] -} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/blocks/storage_blocks.json b/src/generated/resources/data/forge/tags/blocks/storage_blocks.json new file mode 100644 index 0000000000..251ed54f75 --- /dev/null +++ b/src/generated/resources/data/forge/tags/blocks/storage_blocks.json @@ -0,0 +1,13 @@ +{ + "values": [ + "#forge:storage_blocks/conductive_alloy", + "#forge:storage_blocks/copper_alloy", + "#forge:storage_blocks/dark_steel", + "#forge:storage_blocks/end_steel", + "#forge:storage_blocks/energetic_alloy", + "#forge:storage_blocks/pulsating_alloy", + "#forge:storage_blocks/redstone_alloy", + "#forge:storage_blocks/soularium", + "#forge:storage_blocks/vibrant_alloy" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/blocks/storage_blocks/conductive_alloy.json b/src/generated/resources/data/forge/tags/blocks/storage_blocks/conductive_alloy.json new file mode 100644 index 0000000000..1e5c616240 --- /dev/null +++ b/src/generated/resources/data/forge/tags/blocks/storage_blocks/conductive_alloy.json @@ -0,0 +1,5 @@ +{ + "values": [ + "enderio:conductive_alloy_block" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/blocks/storage_blocks/copper_alloy.json b/src/generated/resources/data/forge/tags/blocks/storage_blocks/copper_alloy.json new file mode 100644 index 0000000000..113938db15 --- /dev/null +++ b/src/generated/resources/data/forge/tags/blocks/storage_blocks/copper_alloy.json @@ -0,0 +1,5 @@ +{ + "values": [ + "enderio:copper_alloy_block" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/blocks/storage_blocks/dark_steel.json b/src/generated/resources/data/forge/tags/blocks/storage_blocks/dark_steel.json new file mode 100644 index 0000000000..b6b53ca5ad --- /dev/null +++ b/src/generated/resources/data/forge/tags/blocks/storage_blocks/dark_steel.json @@ -0,0 +1,5 @@ +{ + "values": [ + "enderio:dark_steel_block" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/blocks/storage_blocks/end_steel.json b/src/generated/resources/data/forge/tags/blocks/storage_blocks/end_steel.json new file mode 100644 index 0000000000..e03c22568d --- /dev/null +++ b/src/generated/resources/data/forge/tags/blocks/storage_blocks/end_steel.json @@ -0,0 +1,5 @@ +{ + "values": [ + "enderio:end_steel_block" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/blocks/storage_blocks/energetic_alloy.json b/src/generated/resources/data/forge/tags/blocks/storage_blocks/energetic_alloy.json new file mode 100644 index 0000000000..60b39634b0 --- /dev/null +++ b/src/generated/resources/data/forge/tags/blocks/storage_blocks/energetic_alloy.json @@ -0,0 +1,5 @@ +{ + "values": [ + "enderio:energetic_alloy_block" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/blocks/storage_blocks/pulsating_alloy.json b/src/generated/resources/data/forge/tags/blocks/storage_blocks/pulsating_alloy.json new file mode 100644 index 0000000000..25310d3a65 --- /dev/null +++ b/src/generated/resources/data/forge/tags/blocks/storage_blocks/pulsating_alloy.json @@ -0,0 +1,5 @@ +{ + "values": [ + "enderio:pulsating_alloy_block" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/blocks/storage_blocks/redstone_alloy.json b/src/generated/resources/data/forge/tags/blocks/storage_blocks/redstone_alloy.json new file mode 100644 index 0000000000..ce7e19cea1 --- /dev/null +++ b/src/generated/resources/data/forge/tags/blocks/storage_blocks/redstone_alloy.json @@ -0,0 +1,5 @@ +{ + "values": [ + "enderio:redstone_alloy_block" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/blocks/storage_blocks/soularium.json b/src/generated/resources/data/forge/tags/blocks/storage_blocks/soularium.json new file mode 100644 index 0000000000..c1c0708d33 --- /dev/null +++ b/src/generated/resources/data/forge/tags/blocks/storage_blocks/soularium.json @@ -0,0 +1,5 @@ +{ + "values": [ + "enderio:soularium_block" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/blocks/storage_blocks/vibrant_alloy.json b/src/generated/resources/data/forge/tags/blocks/storage_blocks/vibrant_alloy.json new file mode 100644 index 0000000000..136bce65ce --- /dev/null +++ b/src/generated/resources/data/forge/tags/blocks/storage_blocks/vibrant_alloy.json @@ -0,0 +1,5 @@ +{ + "values": [ + "enderio:vibrant_alloy_block" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/dusts.json b/src/generated/resources/data/forge/tags/items/dusts.json index 9df1fc8b15..d631065016 100644 --- a/src/generated/resources/data/forge/tags/items/dusts.json +++ b/src/generated/resources/data/forge/tags/items/dusts.json @@ -9,6 +9,11 @@ "#forge:dusts/tin", "#forge:dusts/ender", "#forge:dusts/obsidian", - "#forge:dusts/cobalt" + "#forge:dusts/cobalt", + "#forge:dusts/grains_of_infinity", + "#forge:dusts/grains_of_prescience", + "#forge:dusts/grains_of_vibrancy", + "#forge:dusts/grains_of_pizeallity", + "#forge:dusts/grains_of_the_end" ] } \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/dusts/grains_of_infinity.json b/src/generated/resources/data/forge/tags/items/dusts/grains_of_infinity.json new file mode 100644 index 0000000000..b7cb4658e6 --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/dusts/grains_of_infinity.json @@ -0,0 +1,5 @@ +{ + "values": [ + "enderio:grains_of_infinity" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/dusts/grains_of_pizeallity.json b/src/generated/resources/data/forge/tags/items/dusts/grains_of_pizeallity.json new file mode 100644 index 0000000000..0238cb610f --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/dusts/grains_of_pizeallity.json @@ -0,0 +1,5 @@ +{ + "values": [ + "enderio:pulsating_powder" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/dusts/grains_of_prescience.json b/src/generated/resources/data/forge/tags/items/dusts/grains_of_prescience.json new file mode 100644 index 0000000000..218698a31b --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/dusts/grains_of_prescience.json @@ -0,0 +1,5 @@ +{ + "values": [ + "enderio:prescient_powder" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/dusts/grains_of_the_end.json b/src/generated/resources/data/forge/tags/items/dusts/grains_of_the_end.json new file mode 100644 index 0000000000..1a8cde59ba --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/dusts/grains_of_the_end.json @@ -0,0 +1,5 @@ +{ + "values": [ + "enderio:ender_crystal_powder" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/dusts/grains_of_vibrancy.json b/src/generated/resources/data/forge/tags/items/dusts/grains_of_vibrancy.json new file mode 100644 index 0000000000..359c422498 --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/dusts/grains_of_vibrancy.json @@ -0,0 +1,5 @@ +{ + "values": [ + "enderio:vibrant_powder" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/storage_blocks.json b/src/generated/resources/data/forge/tags/items/storage_blocks.json new file mode 100644 index 0000000000..251ed54f75 --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/storage_blocks.json @@ -0,0 +1,13 @@ +{ + "values": [ + "#forge:storage_blocks/conductive_alloy", + "#forge:storage_blocks/copper_alloy", + "#forge:storage_blocks/dark_steel", + "#forge:storage_blocks/end_steel", + "#forge:storage_blocks/energetic_alloy", + "#forge:storage_blocks/pulsating_alloy", + "#forge:storage_blocks/redstone_alloy", + "#forge:storage_blocks/soularium", + "#forge:storage_blocks/vibrant_alloy" + ] +} \ No newline at end of file diff --git a/src/machines/java/com/enderio/machines/data/recipes/SagMillRecipeProvider.java b/src/machines/java/com/enderio/machines/data/recipes/SagMillRecipeProvider.java index 713e003645..abc640792b 100644 --- a/src/machines/java/com/enderio/machines/data/recipes/SagMillRecipeProvider.java +++ b/src/machines/java/com/enderio/machines/data/recipes/SagMillRecipeProvider.java @@ -63,25 +63,6 @@ protected void buildRecipes(Consumer finishedRecipeConsumer) { build1toN("stone", STONE, COBBLESTONE, 1, finishedRecipeConsumer); - build("raw_iron", Ingredient.of(Tags.Items.RAW_MATERIALS_IRON), List.of( - output(POWDERED_IRON.get(), 1), - output(POWDERED_IRON.get(), .25f), // This number is temporarily being borrowed from Thermal - output(POWDERED_TIN.get(), .05f) // This is borrowed from Ender IO 1.12.2 - // Ideally there would be a line here with a 10% chance for Powdered Nickel - ), BASE_ENERGY_PER_OPERATION, finishedRecipeConsumer); - - build("raw_gold", Ingredient.of(Tags.Items.RAW_MATERIALS_GOLD), List.of( - output(POWDERED_GOLD.get(), 1), - output(POWDERED_GOLD.get(), .25f), // This number is temporarily being borrowed from Thermal - output(POWDERED_COPPER.get(), .2f) // This is borrowed from Ender IO 1.12.2 - ), BASE_ENERGY_PER_OPERATION, finishedRecipeConsumer); - - build("raw_copper", Ingredient.of(Tags.Items.RAW_MATERIALS_COPPER), List.of( - output(POWDERED_COPPER.get(), 1), - output(POWDERED_COPPER.get(), .25f), // This number is temporarily being borrowed from Thermal - output(POWDERED_GOLD.get(), .12f) // This is borrowed from Ender IO 1.12.2 - ), BASE_ENERGY_PER_OPERATION, finishedRecipeConsumer); - build("coal", Ingredient.of(COAL), List.of( output(POWDERED_COAL.get()), output(POWDERED_COAL.get(), 0.1f), diff --git a/src/main/java/com/enderio/base/common/init/EIOBlocks.java b/src/main/java/com/enderio/base/common/init/EIOBlocks.java index 857f78f8ba..62923fea15 100644 --- a/src/main/java/com/enderio/base/common/init/EIOBlocks.java +++ b/src/main/java/com/enderio/base/common/init/EIOBlocks.java @@ -14,6 +14,7 @@ import com.enderio.base.common.item.PaintedBlockItem; import com.enderio.base.common.item.PaintedSlabBlockItem; import com.enderio.base.common.item.misc.EnderSkullBlockItem; +import com.enderio.base.common.tag.EIOTags; import com.enderio.base.data.loot.DecorLootTable; import com.enderio.base.data.model.block.EIOBlockState; import com.tterrag.registrate.Registrate; @@ -53,15 +54,15 @@ public class EIOBlocks { // region Alloy Blocks - public static final BlockEntry COPPER_ALLOY_BLOCK = metalBlock("copper_alloy_block").register(); - public static final BlockEntry ENERGETIC_ALLOY_BLOCK = metalBlock("energetic_alloy_block").register(); - public static final BlockEntry VIBRANT_ALLOY_BLOCK = metalBlock("vibrant_alloy_block").register(); - public static final BlockEntry REDSTONE_ALLOY_BLOCK = metalBlock("redstone_alloy_block").register(); - public static final BlockEntry CONDUCTIVE_ALLOY_BLOCK = metalBlock("conductive_alloy_block").register(); - public static final BlockEntry PULSATING_ALLOY_BLOCK = metalBlock("pulsating_alloy_block").register(); - public static final BlockEntry DARK_STEEL_BLOCK = metalBlock("dark_steel_block").register(); - public static final BlockEntry SOULARIUM_BLOCK = metalBlock("soularium_block").register(); - public static final BlockEntry END_STEEL_BLOCK = metalBlock("end_steel_block").register(); + public static final BlockEntry COPPER_ALLOY_BLOCK = metalBlock("copper_alloy_block").tag(EIOTags.Blocks.BLOCKS_COPPER_ALLOY).register(); + public static final BlockEntry ENERGETIC_ALLOY_BLOCK = metalBlock("energetic_alloy_block").tag(EIOTags.Blocks.BLOCKS_ENERGETIC_ALLOY).register(); + public static final BlockEntry VIBRANT_ALLOY_BLOCK = metalBlock("vibrant_alloy_block").tag(EIOTags.Blocks.BLOCKS_VIBRANT_ALLOY).register(); + public static final BlockEntry REDSTONE_ALLOY_BLOCK = metalBlock("redstone_alloy_block").tag(EIOTags.Blocks.BLOCKS_REDSTONE_ALLOY).register(); + public static final BlockEntry CONDUCTIVE_ALLOY_BLOCK = metalBlock("conductive_alloy_block").tag(EIOTags.Blocks.BLOCKS_CONDUCTIVE_ALLOY).register(); + public static final BlockEntry PULSATING_ALLOY_BLOCK = metalBlock("pulsating_alloy_block").tag(EIOTags.Blocks.BLOCKS_PULSATING_ALLOY).register(); + public static final BlockEntry DARK_STEEL_BLOCK = metalBlock("dark_steel_block").tag(EIOTags.Blocks.BLOCKS_DARK_STEEL).register(); + public static final BlockEntry SOULARIUM_BLOCK = metalBlock("soularium_block").tag(EIOTags.Blocks.BLOCKS_SOULARIUM).register(); + public static final BlockEntry END_STEEL_BLOCK = metalBlock("end_steel_block").tag(EIOTags.Blocks.BLOCKS_END_STEEL).register(); // endregion diff --git a/src/main/java/com/enderio/base/common/init/EIOItems.java b/src/main/java/com/enderio/base/common/init/EIOItems.java index ca0640870e..2ddf4dcfe4 100644 --- a/src/main/java/com/enderio/base/common/init/EIOItems.java +++ b/src/main/java/com/enderio/base/common/init/EIOItems.java @@ -57,7 +57,7 @@ public class EIOItems { public static final ItemEntry SILICON = materialItem("silicon").tag(EIOTags.Items.SILICON).register(); - public static final ItemEntry GRAINS_OF_INFINITY = materialItem("grains_of_infinity").lang("Grains of Infinity").register(); + public static final ItemEntry GRAINS_OF_INFINITY = materialItem("grains_of_infinity").tag(EIOTags.Items.DUSTS_GRAINS_OF_INFINITY).lang("Grains of Infinity").register(); public static final ItemEntry INFINITY_ROD = materialItem("infinity_rod").register(); @@ -138,13 +138,13 @@ public class EIOItems { public static final ItemEntry POWDERED_LAPIS_LAZULI = materialItem("powdered_lapis_lazuli").tag(EIOTags.Items.DUSTS_LAPIS).register(); public static final ItemEntry POWDERED_QUARTZ = materialItem("powdered_quartz").tag(EIOTags.Items.DUSTS_QUARTZ).register(); - public static final ItemEntry PRESCIENT_POWDER = materialItemGlinted("prescient_powder").lang("Grains of Prescience").register(); + public static final ItemEntry PRESCIENT_POWDER = materialItemGlinted("prescient_powder").tag(EIOTags.Items.DUSTS_GRAINS_OF_PRESCIENCE).lang("Grains of Prescience").register(); - public static final ItemEntry VIBRANT_POWDER = materialItemGlinted("vibrant_powder").lang("Grains of Vibrancy").register(); + public static final ItemEntry VIBRANT_POWDER = materialItemGlinted("vibrant_powder").tag(EIOTags.Items.DUSTS_GRAINS_OF_VIBRANCY).lang("Grains of Vibrancy").register(); - public static final ItemEntry PULSATING_POWDER = materialItemGlinted("pulsating_powder").lang("Grains of Piezallity").register(); + public static final ItemEntry PULSATING_POWDER = materialItemGlinted("pulsating_powder").tag(EIOTags.Items.DUSTS_GRAINS_OF_PIZEALLITY).lang("Grains of Piezallity").register(); - public static final ItemEntry ENDER_CRYSTAL_POWDER = materialItemGlinted("ender_crystal_powder").lang("Grains of the End").register(); + public static final ItemEntry ENDER_CRYSTAL_POWDER = materialItemGlinted("ender_crystal_powder").tag(EIOTags.Items.DUSTS_GRAINS_OF_THE_END).lang("Grains of the End").register(); public static final ItemEntry PHOTOVOLTAIC_COMPOSITE = materialItem("photovoltaic_composite").register(); public static final ItemEntry SOUL_POWDER = materialItem("soul_powder").register(); diff --git a/src/main/java/com/enderio/base/common/tag/EIOTags.java b/src/main/java/com/enderio/base/common/tag/EIOTags.java index 107105e1cd..34f3f300bf 100644 --- a/src/main/java/com/enderio/base/common/tag/EIOTags.java +++ b/src/main/java/com/enderio/base/common/tag/EIOTags.java @@ -11,6 +11,7 @@ import net.minecraft.tags.ItemTags; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.EntityType; +import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.Item; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.material.Fluid; @@ -47,6 +48,12 @@ private static void init() {} public static final TagKey DUSTS_QUARTZ = ItemTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "dusts/quartz")); public static final TagKey DUSTS_SULFUR = ItemTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "dusts/sulfur")); + public static final TagKey DUSTS_GRAINS_OF_INFINITY = ItemTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "dusts/grains_of_infinity")); + public static final TagKey DUSTS_GRAINS_OF_PRESCIENCE = ItemTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "dusts/grains_of_prescience")); + public static final TagKey DUSTS_GRAINS_OF_VIBRANCY = ItemTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "dusts/grains_of_vibrancy")); + public static final TagKey DUSTS_GRAINS_OF_PIZEALLITY = ItemTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "dusts/grains_of_pizeallity")); + public static final TagKey DUSTS_GRAINS_OF_THE_END = ItemTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "dusts/grains_of_the_end")); + public static final TagKey INGOTS_CONDUCTIVE_ALLOY = ItemTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "ingots/conductive_alloy")); public static final TagKey INGOTS_COPPER_ALLOY = ItemTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "ingots/copper_alloy")); public static final TagKey INGOTS_DARK_STEEL = ItemTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "ingots/dark_steel")); @@ -86,6 +93,16 @@ private static void init() {} public static final TagKey BROKEN_SPAWNER_BLACKLIST = ItemTags.create(EnderIO.loc("blacklists/broken_spawner")); public static final TagKey ELECTROMAGNET_BLACKLIST = ItemTags.create(EnderIO.loc("blacklists/electromagnet")); + public static final TagKey BLOCKS_CONDUCTIVE_ALLOY = ItemTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "storage_blocks/conductive_alloy")); + public static final TagKey BLOCKS_COPPER_ALLOY = ItemTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "storage_blocks/copper_alloy")); + public static final TagKey BLOCKS_DARK_STEEL = ItemTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "storage_blocks/dark_steel")); + public static final TagKey BLOCKS_END_STEEL = ItemTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "storage_blocks/end_steel")); + public static final TagKey BLOCKS_ENERGETIC_ALLOY = ItemTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "storage_blocks/energetic_alloy")); + public static final TagKey BLOCKS_PULSATING_ALLOY = ItemTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "storage_blocks/pulsating_alloy")); + public static final TagKey BLOCKS_REDSTONE_ALLOY = ItemTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "storage_blocks/redstone_alloy")); + public static final TagKey BLOCKS_SOULARIUM = ItemTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "storage_blocks/soularium")); + public static final TagKey BLOCKS_VIBRANT_ALLOY = ItemTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "storage_blocks/vibrant_alloy")); + public static final Map> GLASS_TAGS = createGlassTags(); public static Map> createGlassTags() { @@ -112,6 +129,16 @@ private static void init() {} public static final TagKey DARK_STEEL_EXPLODABLE_DENY_LIST = BlockTags.create(EnderIO.loc("dark_steel_explodable_deny_list")); public static final TagKey DARK_STEEL_EXPLODABLE_ALLOW_LIST = BlockTags.create(EnderIO.loc("dark_steel_explodable_allow_list")); + public static final TagKey BLOCKS_CONDUCTIVE_ALLOY = BlockTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "storage_blocks/conductive_alloy")); + public static final TagKey BLOCKS_COPPER_ALLOY = BlockTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "storage_blocks/copper_alloy")); + public static final TagKey BLOCKS_DARK_STEEL = BlockTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "storage_blocks/dark_steel")); + public static final TagKey BLOCKS_END_STEEL = BlockTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "storage_blocks/end_steel")); + public static final TagKey BLOCKS_ENERGETIC_ALLOY = BlockTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "storage_blocks/energetic_alloy")); + public static final TagKey BLOCKS_PULSATING_ALLOY = BlockTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "storage_blocks/pulsating_alloy")); + public static final TagKey BLOCKS_REDSTONE_ALLOY = BlockTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "storage_blocks/redstone_alloy")); + public static final TagKey BLOCKS_SOULARIUM = BlockTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "storage_blocks/soularium")); + public static final TagKey BLOCKS_VIBRANT_ALLOY = BlockTags.create(new ResourceLocation(ForgeVersion.MOD_ID, "storage_blocks/vibrant_alloy")); + } public static class Fluids { diff --git a/src/main/java/com/enderio/base/data/tags/EIOBlockTagsProvider.java b/src/main/java/com/enderio/base/data/tags/EIOBlockTagsProvider.java index 3744cbfbac..2a655a17d3 100644 --- a/src/main/java/com/enderio/base/data/tags/EIOBlockTagsProvider.java +++ b/src/main/java/com/enderio/base/data/tags/EIOBlockTagsProvider.java @@ -4,6 +4,7 @@ import com.enderio.base.common.tag.EIOTags; import net.minecraft.core.HolderLookup; import net.minecraft.data.PackOutput; +import net.minecraftforge.common.Tags; import net.minecraftforge.common.data.BlockTagsProvider; import net.minecraftforge.common.data.ExistingFileHelper; import org.jetbrains.annotations.Nullable; @@ -21,5 +22,7 @@ public EIOBlockTagsProvider(PackOutput output, CompletableFuture Date: Sat, 19 Aug 2023 14:01:26 +0200 Subject: [PATCH 138/154] Update DrainBlockEntity.java --- .../machines/common/blockentity/DrainBlockEntity.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/machines/java/com/enderio/machines/common/blockentity/DrainBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/DrainBlockEntity.java index d4a40689b7..dd6051e343 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/DrainBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/DrainBlockEntity.java @@ -132,13 +132,13 @@ public void drainFluids() { //Fluid found, try to consume it fluidFound = true; if (getFluidTankNN().fill(new FluidStack(fluidState.getType(), FluidType.BUCKET_VOLUME), IFluidHandler.FluidAction.SIMULATE) == FluidType.BUCKET_VOLUME) { - if (consumed == ENERGY_PER_BUCKET) { + if (consumed <= ENERGY_PER_BUCKET) { level.setBlock(pos, Blocks.AIR.defaultBlockState(), Block.UPDATE_ALL); getFluidTankNN().fill(new FluidStack(fluidState.getType(), FluidType.BUCKET_VOLUME), IFluidHandler.FluidAction.EXECUTE); - consumed = 0; + consumed -= ENERGY_PER_BUCKET; currentIndex++; } else { - consumed += getEnergyStorage().consumeEnergy(ENERGY_PER_BUCKET-consumed, false); + consumed += getEnergyStorage().consumeEnergy(ENERGY_PER_BUCKET - consumed, false); } } } From fb7546ebdf142729ceae2bd3e8779ecbe98a72d8 Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Sat, 19 Aug 2023 14:01:45 +0200 Subject: [PATCH 139/154] Update DrainBlockEntity.java --- .../enderio/machines/common/blockentity/DrainBlockEntity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/machines/java/com/enderio/machines/common/blockentity/DrainBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/DrainBlockEntity.java index dd6051e343..1f129f23d1 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/DrainBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/DrainBlockEntity.java @@ -132,7 +132,7 @@ public void drainFluids() { //Fluid found, try to consume it fluidFound = true; if (getFluidTankNN().fill(new FluidStack(fluidState.getType(), FluidType.BUCKET_VOLUME), IFluidHandler.FluidAction.SIMULATE) == FluidType.BUCKET_VOLUME) { - if (consumed <= ENERGY_PER_BUCKET) { + if (consumed >= ENERGY_PER_BUCKET) { level.setBlock(pos, Blocks.AIR.defaultBlockState(), Block.UPDATE_ALL); getFluidTankNN().fill(new FluidStack(fluidState.getType(), FluidType.BUCKET_VOLUME), IFluidHandler.FluidAction.EXECUTE); consumed -= ENERGY_PER_BUCKET; From 46b9edaafde60705a26d5fc9611efe796f78640e Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Sat, 19 Aug 2023 14:13:53 +0200 Subject: [PATCH 140/154] add temp textures --- .../assets/enderio/models/block/soul_engine.json | 4 ++-- .../enderio/models/block/soul_engine_active.json | 2 +- .../enderio/textures/block/soul_engine_front.png | Bin 0 -> 918 bytes .../textures/block/soul_engine_front_active.png | Bin 0 -> 2038 bytes 4 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 src/machines/resources/assets/enderio/textures/block/soul_engine_front.png create mode 100644 src/machines/resources/assets/enderio/textures/block/soul_engine_front_active.png diff --git a/src/machines/resources/assets/enderio/models/block/soul_engine.json b/src/machines/resources/assets/enderio/models/block/soul_engine.json index 3079f88620..421024a4c9 100644 --- a/src/machines/resources/assets/enderio/models/block/soul_engine.json +++ b/src/machines/resources/assets/enderio/models/block/soul_engine.json @@ -3,8 +3,8 @@ "textures": { "down": "enderio:block/soul_machine_bottom", "east": "enderio:block/soul_machine_side", - "north": "enderio:block/stirling_generator_front", - "particle": "enderio:block/stirling_generator_front", + "north": "enderio:block/soul_engine_front", + "particle": "enderio:block/soul_engine_front", "south": "enderio:block/soul_machine_back", "up": "enderio:block/soul_machine_top", "west": "enderio:block/soul_machine_side" diff --git a/src/machines/resources/assets/enderio/models/block/soul_engine_active.json b/src/machines/resources/assets/enderio/models/block/soul_engine_active.json index f7c9e41a64..3987323328 100644 --- a/src/machines/resources/assets/enderio/models/block/soul_engine_active.json +++ b/src/machines/resources/assets/enderio/models/block/soul_engine_active.json @@ -1,6 +1,6 @@ { "parent": "enderio:block/stirling_generator", "textures": { - "north": "enderio:block/stirling_generator_front_active" + "north": "enderio:block/soul_engine_front_active" } } \ No newline at end of file diff --git a/src/machines/resources/assets/enderio/textures/block/soul_engine_front.png b/src/machines/resources/assets/enderio/textures/block/soul_engine_front.png new file mode 100644 index 0000000000000000000000000000000000000000..3df3b155ed5725f399ef777ebb0d839f59ae8bb8 GIT binary patch literal 918 zcmV;H18Mw;P)z@;j|==^1poj8I7vi7RCwCGR!vhBF%V5AnHh?e4_Dy_ zXdwp$%g-u2aDrbhV3mR%^oTbT85=#MpcRi11yEZ9}ex!Fu&Us_%vn`UVn zdnIgyQ{~v!T7s7G+WP?E!AYs$>nk4lQ(oQ*11)GbUN$Ai8 zD+Cp?gxMrXRD=?|Iv4-}wO2)ZP@=r|aiYneiX)B}h^QEHan32J4=>itVt~~XSQGrh zy#V?(&0<9%cUg(TWLXAiU?DWXA$1g>wHC7=3J~5n$`UHvcE%Vd7a0$Oz$HZRz&QFo z(vOxwQ4FNRb?7|vc=Y1A+ywSCP)*q^&$%+oQckPE(qW~Rs)iy!WpShCU&**SHeDdQ zw$4^ti5hC^n3J)bNrTLa7OCd$;e^|i)}mU2;ZR*u2RF>XO9c#zE3(V-DqQ^diMf?~ z_Y=u1Vh7huG!k!LU1^-k?~8LRS-sm2ym3zRXJD)eKhC~=C;RE>9fW9edy9VdL}L5v zYc;A}Du&AX;{1%mFZkj8a(n`WjVF)E-dR~yqgSt^4ycF-{l6s|HwbX23tKKTGHlTo+L#azE%W^E4vasd?6nE2c(^b07*qoM6N<$f;MQX9smFU literal 0 HcmV?d00001 diff --git a/src/machines/resources/assets/enderio/textures/block/soul_engine_front_active.png b/src/machines/resources/assets/enderio/textures/block/soul_engine_front_active.png new file mode 100644 index 0000000000000000000000000000000000000000..54ae3f8187ec6666e9cfa2651e2a9d7547e55e2c GIT binary patch literal 2038 zcmVz@;j|==^1pojCm`OxIRCwC$Sle$L)fqq6nccO$Ydf(a z6gMGhzJov3ZOy^h!SHHuf01n=Nx|D z_s!1UY;}crC@4p}XJ^jkyI)t|c=1K0RGw#;Q;L{FNSKY*n4_X+ywGl-T^z!sjcuN% zhTMt)b1^LFs`^1=9`Z@UWlZ}@w};theoT90ZkVT7(VR4c=Jgap10o1dN;P*wq?NsL zmk`XdI6A7C-PEi$2qxy58~!x6W_WX&w+u`9lY937wCy}*ZAr@BkPOR;=rx|HVd|<_ z(ypf6L0Mt$bUJ|j)$T6%xp4j*f%bli10flRfXom|TJfSIp3StrXqU+jhNyO0N4_4X z`EZUYwbo+w)XEBkc=PZ7(0VKaJSUbiW?9D+V`|Pc2QY5@;e{y2Mi|@-RUly!y1*UL zLWe^L&Ux7>%L0F#SnrHKnRo}cx$`u{JW^>l_X<<7zT}3lC^b>dd4~s z0g&%8cZqG;@BlG+mN}!26lutN2bmlu+65~>T9pN$!g~O^!XB80e?$@^Y|YMaAeaaN zk!x#iT*|DD!Lo*N#+pcxgb*a%^)dH*xPsW!_~emEdd;HoEP;@?dbqs@*{a_L51H9zJbFiKGOIH@wP~dYDL2 zN8|>n1Km1vSfpR{vZEnPKem&NOW9t(_;t^Ji!fP*O~)}}+Lc{V4ESLQ8)YCq&R)Ju zj;2!!$RujAG_#znvnt7}V;zh1X{KwH9g(2JJrPFO+v5xeX{3fot|DhfMy(qFs*G}G z%BA@SCQ8uBR3|wQ7|w%Sb$YW!-r%gj0NvsZmR(HrE|F5zq{PM-#p+W}v$N0g# z0pOZI(`ihptkekRvci0tfL=(N!veZgUCs)-Uw$c`va)`f<6cd>@S1Uql-!phAuY?W z|KPuJrMtRLTr%IHCpU+Z9POmwe(ca>3z8*{%Lmrk=H-EY3uWK<=9-+t#^f$+@sMc7EYOJ*fm&rA}c>U>~CfmU8A1S&m8 zc(Y|E0x$>Tsl&(<%t0XbJR-8u)hLcqnoH`#f8RVP)z$02h0evC0!3E!-rKhT_u1cU zy(enKJ$K1KR&L688DNfI15Vr>mJ_$%d4F)OVt-KNl{H4CMT#U&~#uZPPR;u}M-( zM)YN(=t5U{uh_P^fkvFa^B{ljF|s~f{$)3N{Tf3_>dZ#IwP6d0zpNhLQkTxT^%X99 z8u0LQ9Sq~=U#M4h4u5rpg!I8)|Ft*O);68FwR?E?Ago@X!+-tH0ph~i zIjWJ~dapPv!v10CJynx37R-&8Uc%2(rvo&_V1U_i1cfS7}rZqQx7x_ zmiUgQG_D3mN5^lszHdiDzLpNNmVjlcf;~ z9Ey&0f6&Ub^at!yE-l<2NJgR>m}%pvWlqWmqScA8Ki-<8eoEjcN8LyLf%-}I2Q$w< zT7Mt~tJKn5r;_0}Aw<XsSMCo8Kp+oVpg*AM zn(4xbp#s@J1vEhEP`GDqz(<69s?-@1R>WJ?BK?6>6}ah9=4n-G%5KPN=m8S%8=BBA zl-zna!BoN67U>TJy3AHpp5$sH7g@9%$xcxS0aM$?{;+fz`U5P-Mj8L3KM>iW=7)>w zV2UcD=lQ&R9S%#) z$sNrBc?Kt_WBP+uZo9dGMCHHBy%6MmJ>zHOq|Yb+U!}13*~s zrAte7fAHCU+Uhzf#nw9c^JnVHEbDr|RQCtHQ~IeV+)`W3_XnoYM%^DIH5^tC`{pm7 z7I?;)FNX1NA5(y!Ug6up8~1Auzq?o6+b?kd_VMxk;{G?~*LzZ+J?ans&-#P!0nL?w U41zeS_5c6?07*qoM6N<$f{5ztbpQYW literal 0 HcmV?d00001 From ea81c336f6e05f359ddf83540f677b50a723b5bf Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Sat, 19 Aug 2023 14:17:38 +0200 Subject: [PATCH 141/154] add temp texture --- .../assets/enderio/models/block/drain.json | 4 ++-- .../enderio/models/block/drain_active.json | 2 +- .../enderio/textures/block/drain_front.png | Bin 0 -> 1006 bytes .../textures/block/drain_front_active.png | Bin 0 -> 1264 bytes 4 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 src/machines/resources/assets/enderio/textures/block/drain_front.png create mode 100644 src/machines/resources/assets/enderio/textures/block/drain_front_active.png diff --git a/src/machines/resources/assets/enderio/models/block/drain.json b/src/machines/resources/assets/enderio/models/block/drain.json index 25c3fff54d..25dc54dcf0 100644 --- a/src/machines/resources/assets/enderio/models/block/drain.json +++ b/src/machines/resources/assets/enderio/models/block/drain.json @@ -3,8 +3,8 @@ "textures": { "down": "enderio:block/machine_bottom", "east": "enderio:block/machine_side", - "north": "enderio:block/impulse_hopper_front", - "particle": "enderio:block/impulse_hopper_front", + "north": "enderio:block/drain_front", + "particle": "enderio:block/drain_front", "south": "enderio:block/machine_back", "up": "enderio:block/machine_top", "west": "enderio:block/machine_side" diff --git a/src/machines/resources/assets/enderio/models/block/drain_active.json b/src/machines/resources/assets/enderio/models/block/drain_active.json index 9ad8f0b6bc..366d6c9b4b 100644 --- a/src/machines/resources/assets/enderio/models/block/drain_active.json +++ b/src/machines/resources/assets/enderio/models/block/drain_active.json @@ -1,6 +1,6 @@ { "parent": "enderio:block/impulse_hopper", "textures": { - "north": "enderio:block/impulse_hopper_front_active" + "north": "enderio:block/drain_front_active" } } \ No newline at end of file diff --git a/src/machines/resources/assets/enderio/textures/block/drain_front.png b/src/machines/resources/assets/enderio/textures/block/drain_front.png new file mode 100644 index 0000000000000000000000000000000000000000..57fe501df605672026a2402a243978f095ff2588 GIT binary patch literal 1006 zcmVPx&s7XXYR9J=0m(6Y*MG(h-)zh=leDpa3`# z03vCPOKT13Jv8l$D?01Bk>$hyKs~OLxW#Y(cf0vNt!jm zsNotyM{vlVv2~UgV%mS#yiNP-v*qs%FQ%ij*j|k;00`M4)4ViQtGWRo8m`Tx^Il;d zU50#VG1nM%!zf3y!AjXT)9FuHir;UaY=w`%Z)alXYgLXj{xH( z=QEzOt1vlp9OzpiB1Y7ilSJCI!nuVwr1&p8pYd59$d^x^D8Sb3t+Zo#dwF%44%zzP z{(S(>et+E&(B^p-SSFh`HwFM)j7Iiia`mn4Z2->SzsJ=3_r|K&=i%$Rvd3Eh)RSb< zFRy+Erg^+~?;bE^`N?s&PCPg~>%QDbnl;AunLMsW zDQ45Vql;^k?uc?QScy-J#Q&c<5X?Q}`YIjF_y0^D?|zy%aCUmS5YKrYmz;0wgmEmV z^->Nj%46U!>p(TGR^r_o1LV=sV+GjW+fABRDOP)T@1}K~dbiA4$vvaVXgeaq>#O9+ zI|m1y^R>;x;Sf~0yhwe=$L|M3tPe1gHuv`t;CwhlM2Jme_0#SInYu4qjVe-jP(^zs z3jBHgE@8RmTgT;#qSHCgaX^5gEa?pf6yBpDpsLnvM50DCMl>pF&!{3&fJTDJXd^vy z&3739-WjPfd-r#C@cj+G`}Ug~IFjZ61GfL*^Upw)i5Vo;fz5M31ee>hbq-TxR!yHh z)GK?o71#f9uKhPm8xUZT2ULlnS-%D{+XN2bZe?^J zG%heMGBNQWX_Wu~1Z_z~K~zXfwU*m!BV`zeU)c+FSGT)c)Uvg0dPuz&WxLywG}&Zk zGLvLFnL{SYCe4X9ZX>igv`t&udO%ST1o1)y@k*~my;Si=S-lYNRJyw$2>v1dX5Oe1 zCb_flFbu!E`JS2YG#}lJ#lWf}gRm@t6;T8sNdha9=zvg`mPNrqh=Ud9r+(!CZhlLM zgBQYKaQ=cY+EwIKE(bE}C18}-L8ep$YOw(L*JR#7v9mxnjeijh9Y`+yMAyNMNCcd} zU{z6oTF8Tht^;9h%|X+EqC4D9B|$_^fYo^1K@h;GJZWdavVi^+&R-BqrvZ0JLes$H z>@0XT5SW~qDQ;~6#WH|5S27tnlkwMcp0aH)QZO|)H#I*$jccGUaC+7I{(8;_ z1QEPrDygrR0RLfTVIdF<&IW_Hu^SB_Y8vq7F4^Uo~?78j=n z1>W2%@aF@9)npQA#R7<_X)rZEhi91%2Jzzd#s)~BH!>M-E@S*P&0o*CVwxZY4&McP!C*GXlga?)< zDCaEbchUbMz|Vm7{SyX zjEtDIM9UPiRvb5sodrtX2F~|NRfh=By54B0)oNyALxZeZ#eKR`PL@kb>5hD-kSOG& zTvoCzJVe6I3NDh{w3xF23q-GgCzFuTK)usx93K5KIq~qB@dx8qe!qP2=gSxFU7+uX zz9RaR=p&-{h~6f8i|BQtSBQ>@4v2b0`z|uh16k{~+eQ6B9uRc9caKm0oSZltzjAi< z$@^m$f4WHD6Makc1<_}&;C-SuUBPQar>+34vtSQ`tOa-s`T{;$C9_#j@3tYhfBpJz z-hP zOjSXp*{p5vY#turJ?@?yzjS=ueD!qe^rYT9sPFe`dwbPxx3;@m>vk)xR%K_W)^68Y ztsS_2%NJZ a6#5&^R!l*dpNpOV0000 Date: Sat, 19 Aug 2023 14:32:44 +0200 Subject: [PATCH 142/154] small changes -remove unneeded class -BER update as well to account for empty --- .../com/enderio/conduits/common/types/EnergyConduitType.java | 2 -- .../machines/client/rendering/blockentity/FluidTankBER.java | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) delete mode 100644 src/conduits/java/com/enderio/conduits/common/types/EnergyConduitType.java diff --git a/src/conduits/java/com/enderio/conduits/common/types/EnergyConduitType.java b/src/conduits/java/com/enderio/conduits/common/types/EnergyConduitType.java deleted file mode 100644 index 6f803245ae..0000000000 --- a/src/conduits/java/com/enderio/conduits/common/types/EnergyConduitType.java +++ /dev/null @@ -1,2 +0,0 @@ -package com.enderio.conduits.common.types;public class EnergyConduitType { -} diff --git a/src/machines/java/com/enderio/machines/client/rendering/blockentity/FluidTankBER.java b/src/machines/java/com/enderio/machines/client/rendering/blockentity/FluidTankBER.java index a4b6adf3a2..564f6253a1 100644 --- a/src/machines/java/com/enderio/machines/client/rendering/blockentity/FluidTankBER.java +++ b/src/machines/java/com/enderio/machines/client/rendering/blockentity/FluidTankBER.java @@ -32,7 +32,7 @@ public void render(FluidTankBlockEntity blockEntity, float partialTick, PoseStac FluidTank tank = blockEntity.getFluidTank(); // Don't waste time if there's no fluid. - if (tank.getFluidAmount() > 0) { + if (!tank.isEmpty()) { FluidStack fluidStack = tank.getFluid(); // Use entity translucent cull sheet so fluid renders in Fabulous From 74abb42df8e6080504d217de20eacf11dcbe18cb Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Sat, 19 Aug 2023 14:57:53 +0200 Subject: [PATCH 143/154] Add inv sorter support --- .../com/enderio/machines/EIOMachines.java | 22 +++++-- .../machines/common/menu/EnchanterMenu.java | 59 +++++++++++-------- 2 files changed, 51 insertions(+), 30 deletions(-) diff --git a/src/machines/java/com/enderio/machines/EIOMachines.java b/src/machines/java/com/enderio/machines/EIOMachines.java index d9db04887f..754631c2e1 100644 --- a/src/machines/java/com/enderio/machines/EIOMachines.java +++ b/src/machines/java/com/enderio/machines/EIOMachines.java @@ -1,23 +1,23 @@ package com.enderio.machines; import com.enderio.EnderIO; -import com.enderio.base.data.EIODataProvider; import com.enderio.api.integration.IntegrationManager; import com.enderio.api.travel.TravelRegistry; +import com.enderio.base.data.EIODataProvider; import com.enderio.machines.client.rendering.travel.TravelAnchorRenderer; import com.enderio.machines.common.blockentity.solar.SolarPanelTier; import com.enderio.machines.common.config.MachinesConfig; import com.enderio.machines.common.init.*; -import com.enderio.machines.common.init.MachineBlockEntities; -import com.enderio.machines.common.init.MachineBlocks; -import com.enderio.machines.common.init.MachineMenus; -import com.enderio.machines.common.init.MachineRecipes; import com.enderio.machines.common.integrations.EnderIOMachinesSelfIntegration; import com.enderio.machines.common.lang.MachineLang; +import com.enderio.machines.common.menu.EnchanterMenu; +import com.enderio.machines.common.menu.GhostMachineSlot; +import com.enderio.machines.common.menu.MachineSlot; +import com.enderio.machines.common.menu.PreviewMachineSlot; import com.enderio.machines.common.network.MachineNetwork; import com.enderio.machines.common.tag.MachineTags; -import com.enderio.machines.data.advancements.MachinesAdvancementGenerator; import com.enderio.machines.common.travel.AnchorTravelTarget; +import com.enderio.machines.data.advancements.MachinesAdvancementGenerator; import com.enderio.machines.data.recipes.*; import com.enderio.machines.data.souldata.SoulDataProvider; import com.enderio.machines.data.tag.MachineEntityTypeTagsProvider; @@ -31,10 +31,12 @@ import net.minecraftforge.common.data.ForgeAdvancementProvider; import net.minecraftforge.data.event.GatherDataEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.InterModComms; import net.minecraftforge.fml.ModLoadingContext; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.config.ModConfig; import net.minecraftforge.fml.event.lifecycle.FMLConstructModEvent; +import net.minecraftforge.fml.event.lifecycle.InterModEnqueueEvent; import net.minecraftforge.registries.MissingMappingsEvent; import java.util.List; @@ -67,6 +69,14 @@ public static void onConstruct(FMLConstructModEvent event) { TravelRegistry.addTravelEntry(EnderIO.loc("travel_anchor"), AnchorTravelTarget::new, () -> TravelAnchorRenderer::new); } + @SubscribeEvent + public static void sendIMC(InterModEnqueueEvent event) { + InterModComms.sendTo("inventorysorter", "slotblacklist", MachineSlot.class::getName); + InterModComms.sendTo("inventorysorter", "slotblacklist", GhostMachineSlot.class::getName); + InterModComms.sendTo("inventorysorter", "slotblacklist", PreviewMachineSlot.class::getName); + InterModComms.sendTo("inventorysorter", "slotblacklist", EnchanterMenu.EnchanterOutputMachineSlot.class::getName); + } + @SubscribeEvent public static void gatherData(GatherDataEvent event) { DataGenerator generator = event.getGenerator(); diff --git a/src/machines/java/com/enderio/machines/common/menu/EnchanterMenu.java b/src/machines/java/com/enderio/machines/common/menu/EnchanterMenu.java index f69c1dbee2..28b726aee6 100644 --- a/src/machines/java/com/enderio/machines/common/menu/EnchanterMenu.java +++ b/src/machines/java/com/enderio/machines/common/menu/EnchanterMenu.java @@ -3,6 +3,7 @@ import com.enderio.machines.common.blockentity.EnchanterBlockEntity; import com.enderio.machines.common.init.MachineMenus; import com.enderio.machines.common.init.MachineRecipes; +import com.enderio.machines.common.io.item.SingleSlotAccess; import com.enderio.machines.common.recipe.EnchanterRecipe; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.world.entity.player.Inventory; @@ -31,30 +32,7 @@ public EnchanterMenu(@Nullable EnchanterBlockEntity blockEntity, Inventory inven addSlot(new MachineSlot(blockEntity.getInventory(), EnchanterBlockEntity.BOOK, 16, 35)); addSlot(new MachineSlot(blockEntity.getInventory(), EnchanterBlockEntity.CATALYST, 65, 35)); addSlot(new MachineSlot(blockEntity.getInventory(), EnchanterBlockEntity.LAPIS, 85, 35)); - addSlot(new MachineSlot(blockEntity.getInventory(), EnchanterBlockEntity.OUTPUT, 144, 35) { - @Override - public void onTake(Player pPlayer, ItemStack pStack) { - Optional recipe = level.getRecipeManager().getRecipeFor(MachineRecipes.ENCHANTING.type().get(), blockEntity.getContainer(), level); - if (recipe.isPresent() && (pPlayer.experienceLevel >= recipe.get().getXPCost(blockEntity.getContainer()) || pPlayer.isCreative())) { - int amount = recipe.get().getInputAmountConsumed(blockEntity.getContainer()); - int lapizForLevel = recipe.get().getLapisForLevel(recipe.get().getEnchantmentLevel(EnchanterBlockEntity.CATALYST.getItemStack(blockEntity).getCount())); - pPlayer.giveExperienceLevels(-recipe.get().getXPCost(blockEntity.getContainer())); - EnchanterBlockEntity.BOOK.getItemStack(blockEntity).shrink(1); - EnchanterBlockEntity.CATALYST.getItemStack(blockEntity).shrink(amount); - EnchanterBlockEntity.LAPIS.getItemStack(blockEntity).shrink(lapizForLevel); - super.onTake(pPlayer, pStack); - } - } - - @Override - public boolean mayPickup(Player playerIn) { - Optional recipe = level.getRecipeManager().getRecipeFor(MachineRecipes.ENCHANTING.type().get(), blockEntity.getContainer(), level); - if (recipe.isPresent() && (playerIn.experienceLevel >= recipe.get().getXPCost(blockEntity.getContainer()) || playerIn.isCreative()) && blockEntity.canAct()) { - return super.mayPickup(playerIn); - } - return false; - } - }); + addSlot(new EnchanterOutputMachineSlot(blockEntity, EnchanterBlockEntity.OUTPUT, 144, 35)); } addInventorySlots(8,84); } @@ -76,4 +54,37 @@ public int getCurrentCost() { } return -1; } + + public class EnchanterOutputMachineSlot extends MachineSlot { + @Nullable + private final EnchanterBlockEntity blockEntity; + + public EnchanterOutputMachineSlot(@Nullable EnchanterBlockEntity blockEntity, SingleSlotAccess access, int xPosition, int yPosition) { + super(blockEntity.getInventory(), access, xPosition, yPosition); + this.blockEntity = blockEntity; + } + + @Override + public void onTake(Player pPlayer, ItemStack pStack) { + Optional recipe = level.getRecipeManager().getRecipeFor(MachineRecipes.ENCHANTING.type().get(), blockEntity.getContainer(), level); + if (recipe.isPresent() && (pPlayer.experienceLevel >= recipe.get().getXPCost(blockEntity.getContainer()) || pPlayer.isCreative())) { + int amount = recipe.get().getInputAmountConsumed(blockEntity.getContainer()); + int lapizForLevel = recipe.get().getLapisForLevel(recipe.get().getEnchantmentLevel(EnchanterBlockEntity.CATALYST.getItemStack(blockEntity).getCount())); + pPlayer.giveExperienceLevels(-recipe.get().getXPCost(blockEntity.getContainer())); + EnchanterBlockEntity.BOOK.getItemStack(blockEntity).shrink(1); + EnchanterBlockEntity.CATALYST.getItemStack(blockEntity).shrink(amount); + EnchanterBlockEntity.LAPIS.getItemStack(blockEntity).shrink(lapizForLevel); + super.onTake(pPlayer, pStack); + } + } + + @Override + public boolean mayPickup(Player playerIn) { + Optional recipe = level.getRecipeManager().getRecipeFor(MachineRecipes.ENCHANTING.type().get(), blockEntity.getContainer(), level); + if (recipe.isPresent() && (playerIn.experienceLevel >= recipe.get().getXPCost(blockEntity.getContainer()) || playerIn.isCreative()) && blockEntity.canAct()) { + return super.mayPickup(playerIn); + } + return false; + } + } } From 10c0de24abc49e1382e1e69e1eea3f25d4c4d6ad Mon Sep 17 00:00:00 2001 From: Reece Mackie <20544390+Rover656@users.noreply.github.com> Date: Sat, 19 Aug 2023 18:25:19 +0100 Subject: [PATCH 144/154] Fixed storage_block item tag generation and formatting --- .../storage_blocks/conductive_alloy.json | 5 ++ .../items/storage_blocks/copper_alloy.json | 5 ++ .../tags/items/storage_blocks/dark_steel.json | 5 ++ .../tags/items/storage_blocks/end_steel.json | 5 ++ .../items/storage_blocks/energetic_alloy.json | 5 ++ .../items/storage_blocks/pulsating_alloy.json | 5 ++ .../items/storage_blocks/redstone_alloy.json | 5 ++ .../tags/items/storage_blocks/soularium.json | 5 ++ .../items/storage_blocks/vibrant_alloy.json | 5 ++ .../enderio/base/common/init/EIOBlocks.java | 53 +++++++++------- .../base/data/tags/EIOBlockTagsProvider.java | 14 ++++- .../base/data/tags/EIOItemTagsProvider.java | 62 +++++++++++++++++-- 12 files changed, 145 insertions(+), 29 deletions(-) create mode 100644 src/generated/resources/data/forge/tags/items/storage_blocks/conductive_alloy.json create mode 100644 src/generated/resources/data/forge/tags/items/storage_blocks/copper_alloy.json create mode 100644 src/generated/resources/data/forge/tags/items/storage_blocks/dark_steel.json create mode 100644 src/generated/resources/data/forge/tags/items/storage_blocks/end_steel.json create mode 100644 src/generated/resources/data/forge/tags/items/storage_blocks/energetic_alloy.json create mode 100644 src/generated/resources/data/forge/tags/items/storage_blocks/pulsating_alloy.json create mode 100644 src/generated/resources/data/forge/tags/items/storage_blocks/redstone_alloy.json create mode 100644 src/generated/resources/data/forge/tags/items/storage_blocks/soularium.json create mode 100644 src/generated/resources/data/forge/tags/items/storage_blocks/vibrant_alloy.json diff --git a/src/generated/resources/data/forge/tags/items/storage_blocks/conductive_alloy.json b/src/generated/resources/data/forge/tags/items/storage_blocks/conductive_alloy.json new file mode 100644 index 0000000000..1e5c616240 --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/storage_blocks/conductive_alloy.json @@ -0,0 +1,5 @@ +{ + "values": [ + "enderio:conductive_alloy_block" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/storage_blocks/copper_alloy.json b/src/generated/resources/data/forge/tags/items/storage_blocks/copper_alloy.json new file mode 100644 index 0000000000..113938db15 --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/storage_blocks/copper_alloy.json @@ -0,0 +1,5 @@ +{ + "values": [ + "enderio:copper_alloy_block" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/storage_blocks/dark_steel.json b/src/generated/resources/data/forge/tags/items/storage_blocks/dark_steel.json new file mode 100644 index 0000000000..b6b53ca5ad --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/storage_blocks/dark_steel.json @@ -0,0 +1,5 @@ +{ + "values": [ + "enderio:dark_steel_block" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/storage_blocks/end_steel.json b/src/generated/resources/data/forge/tags/items/storage_blocks/end_steel.json new file mode 100644 index 0000000000..e03c22568d --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/storage_blocks/end_steel.json @@ -0,0 +1,5 @@ +{ + "values": [ + "enderio:end_steel_block" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/storage_blocks/energetic_alloy.json b/src/generated/resources/data/forge/tags/items/storage_blocks/energetic_alloy.json new file mode 100644 index 0000000000..60b39634b0 --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/storage_blocks/energetic_alloy.json @@ -0,0 +1,5 @@ +{ + "values": [ + "enderio:energetic_alloy_block" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/storage_blocks/pulsating_alloy.json b/src/generated/resources/data/forge/tags/items/storage_blocks/pulsating_alloy.json new file mode 100644 index 0000000000..25310d3a65 --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/storage_blocks/pulsating_alloy.json @@ -0,0 +1,5 @@ +{ + "values": [ + "enderio:pulsating_alloy_block" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/storage_blocks/redstone_alloy.json b/src/generated/resources/data/forge/tags/items/storage_blocks/redstone_alloy.json new file mode 100644 index 0000000000..ce7e19cea1 --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/storage_blocks/redstone_alloy.json @@ -0,0 +1,5 @@ +{ + "values": [ + "enderio:redstone_alloy_block" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/storage_blocks/soularium.json b/src/generated/resources/data/forge/tags/items/storage_blocks/soularium.json new file mode 100644 index 0000000000..c1c0708d33 --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/storage_blocks/soularium.json @@ -0,0 +1,5 @@ +{ + "values": [ + "enderio:soularium_block" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/storage_blocks/vibrant_alloy.json b/src/generated/resources/data/forge/tags/items/storage_blocks/vibrant_alloy.json new file mode 100644 index 0000000000..136bce65ce --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/storage_blocks/vibrant_alloy.json @@ -0,0 +1,5 @@ +{ + "values": [ + "enderio:vibrant_alloy_block" + ] +} \ No newline at end of file diff --git a/src/main/java/com/enderio/base/common/init/EIOBlocks.java b/src/main/java/com/enderio/base/common/init/EIOBlocks.java index 62923fea15..f9d1316f77 100644 --- a/src/main/java/com/enderio/base/common/init/EIOBlocks.java +++ b/src/main/java/com/enderio/base/common/init/EIOBlocks.java @@ -54,15 +54,24 @@ public class EIOBlocks { // region Alloy Blocks - public static final BlockEntry COPPER_ALLOY_BLOCK = metalBlock("copper_alloy_block").tag(EIOTags.Blocks.BLOCKS_COPPER_ALLOY).register(); - public static final BlockEntry ENERGETIC_ALLOY_BLOCK = metalBlock("energetic_alloy_block").tag(EIOTags.Blocks.BLOCKS_ENERGETIC_ALLOY).register(); - public static final BlockEntry VIBRANT_ALLOY_BLOCK = metalBlock("vibrant_alloy_block").tag(EIOTags.Blocks.BLOCKS_VIBRANT_ALLOY).register(); - public static final BlockEntry REDSTONE_ALLOY_BLOCK = metalBlock("redstone_alloy_block").tag(EIOTags.Blocks.BLOCKS_REDSTONE_ALLOY).register(); - public static final BlockEntry CONDUCTIVE_ALLOY_BLOCK = metalBlock("conductive_alloy_block").tag(EIOTags.Blocks.BLOCKS_CONDUCTIVE_ALLOY).register(); - public static final BlockEntry PULSATING_ALLOY_BLOCK = metalBlock("pulsating_alloy_block").tag(EIOTags.Blocks.BLOCKS_PULSATING_ALLOY).register(); - public static final BlockEntry DARK_STEEL_BLOCK = metalBlock("dark_steel_block").tag(EIOTags.Blocks.BLOCKS_DARK_STEEL).register(); - public static final BlockEntry SOULARIUM_BLOCK = metalBlock("soularium_block").tag(EIOTags.Blocks.BLOCKS_SOULARIUM).register(); - public static final BlockEntry END_STEEL_BLOCK = metalBlock("end_steel_block").tag(EIOTags.Blocks.BLOCKS_END_STEEL).register(); + public static final BlockEntry COPPER_ALLOY_BLOCK = metalBlock("copper_alloy_block", + EIOTags.Blocks.BLOCKS_COPPER_ALLOY, EIOTags.Items.BLOCKS_COPPER_ALLOY).register(); + public static final BlockEntry ENERGETIC_ALLOY_BLOCK = metalBlock("energetic_alloy_block", + EIOTags.Blocks.BLOCKS_ENERGETIC_ALLOY, EIOTags.Items.BLOCKS_ENERGETIC_ALLOY).register(); + public static final BlockEntry VIBRANT_ALLOY_BLOCK = metalBlock("vibrant_alloy_block", + EIOTags.Blocks.BLOCKS_VIBRANT_ALLOY, EIOTags.Items.BLOCKS_VIBRANT_ALLOY).register(); + public static final BlockEntry REDSTONE_ALLOY_BLOCK = metalBlock("redstone_alloy_block", + EIOTags.Blocks.BLOCKS_REDSTONE_ALLOY, EIOTags.Items.BLOCKS_REDSTONE_ALLOY).register(); + public static final BlockEntry CONDUCTIVE_ALLOY_BLOCK = metalBlock("conductive_alloy_block", + EIOTags.Blocks.BLOCKS_CONDUCTIVE_ALLOY, EIOTags.Items.BLOCKS_CONDUCTIVE_ALLOY).register(); + public static final BlockEntry PULSATING_ALLOY_BLOCK = metalBlock("pulsating_alloy_block", + EIOTags.Blocks.BLOCKS_PULSATING_ALLOY, EIOTags.Items.BLOCKS_PULSATING_ALLOY).register(); + public static final BlockEntry DARK_STEEL_BLOCK = metalBlock("dark_steel_block", + EIOTags.Blocks.BLOCKS_DARK_STEEL, EIOTags.Items.BLOCKS_DARK_STEEL).register(); + public static final BlockEntry SOULARIUM_BLOCK = metalBlock("soularium_block", + EIOTags.Blocks.BLOCKS_SOULARIUM, EIOTags.Items.BLOCKS_SOULARIUM).register(); + public static final BlockEntry END_STEEL_BLOCK = metalBlock("end_steel_block", + EIOTags.Blocks.BLOCKS_END_STEEL, EIOTags.Items.BLOCKS_END_STEEL).register(); // endregion @@ -379,19 +388,21 @@ public static BlockBuilder simpleBlockBuilder(S return REGISTRATE.block(name, p -> block).item().tab(EIOCreativeTabs.BLOCKS).build(); } - private static BlockBuilder metalBlock(String name) { + private static BlockBuilder metalBlock(String name, TagKey blockTag, TagKey itemTag) { return REGISTRATE - .block(name, Block::new) - .properties(props -> props - .sound(SoundType.METAL) - .mapColor(MapColor.METAL) - .strength(5, 6) - .requiresCorrectToolForDrops()) - .tag(BlockTags.NEEDS_STONE_TOOL) - .tag(BlockTags.MINEABLE_WITH_PICKAXE) - .item() - .tab(EIOCreativeTabs.BLOCKS) - .build(); + .block(name, Block::new) + .properties(props -> props + .sound(SoundType.METAL) + .mapColor(MapColor.METAL) + .strength(5, 6) + .requiresCorrectToolForDrops()) + .tag(BlockTags.NEEDS_STONE_TOOL) + .tag(BlockTags.MINEABLE_WITH_PICKAXE) + .tag(blockTag) + .item() + .tab(EIOCreativeTabs.BLOCKS) + .tag(itemTag) + .build(); } private static BlockBuilder chassisBlock(String name) { diff --git a/src/main/java/com/enderio/base/data/tags/EIOBlockTagsProvider.java b/src/main/java/com/enderio/base/data/tags/EIOBlockTagsProvider.java index 2a655a17d3..2f5c24911a 100644 --- a/src/main/java/com/enderio/base/data/tags/EIOBlockTagsProvider.java +++ b/src/main/java/com/enderio/base/data/tags/EIOBlockTagsProvider.java @@ -13,8 +13,7 @@ public class EIOBlockTagsProvider extends BlockTagsProvider { - public EIOBlockTagsProvider(PackOutput output, CompletableFuture lookupProvider, - @Nullable ExistingFileHelper existingFileHelper) { + public EIOBlockTagsProvider(PackOutput output, CompletableFuture lookupProvider, @Nullable ExistingFileHelper existingFileHelper) { super(output, lookupProvider, EnderIO.MODID, existingFileHelper); } @@ -23,6 +22,15 @@ protected void addTags(HolderLookup.Provider pProvider) { tag(EIOTags.Blocks.DARK_STEEL_EXPLODABLE_ALLOW_LIST); tag(EIOTags.Blocks.DARK_STEEL_EXPLODABLE_DENY_LIST); - tag(Tags.Blocks.STORAGE_BLOCKS).addTag(EIOTags.Blocks.BLOCKS_CONDUCTIVE_ALLOY).addTag(EIOTags.Blocks.BLOCKS_COPPER_ALLOY).addTag(EIOTags.Blocks.BLOCKS_DARK_STEEL).addTag(EIOTags.Blocks.BLOCKS_END_STEEL).addTag(EIOTags.Blocks.BLOCKS_ENERGETIC_ALLOY).addTag(EIOTags.Blocks.BLOCKS_PULSATING_ALLOY).addTag(EIOTags.Blocks.BLOCKS_REDSTONE_ALLOY).addTag(EIOTags.Blocks.BLOCKS_SOULARIUM).addTag(EIOTags.Blocks.BLOCKS_VIBRANT_ALLOY); + tag(Tags.Blocks.STORAGE_BLOCKS) + .addTag(EIOTags.Blocks.BLOCKS_CONDUCTIVE_ALLOY) + .addTag(EIOTags.Blocks.BLOCKS_COPPER_ALLOY) + .addTag(EIOTags.Blocks.BLOCKS_DARK_STEEL) + .addTag(EIOTags.Blocks.BLOCKS_END_STEEL) + .addTag(EIOTags.Blocks.BLOCKS_ENERGETIC_ALLOY) + .addTag(EIOTags.Blocks.BLOCKS_PULSATING_ALLOY) + .addTag(EIOTags.Blocks.BLOCKS_REDSTONE_ALLOY) + .addTag(EIOTags.Blocks.BLOCKS_SOULARIUM) + .addTag(EIOTags.Blocks.BLOCKS_VIBRANT_ALLOY); } } diff --git a/src/main/java/com/enderio/base/data/tags/EIOItemTagsProvider.java b/src/main/java/com/enderio/base/data/tags/EIOItemTagsProvider.java index bf89635bdd..a73f9a579f 100644 --- a/src/main/java/com/enderio/base/data/tags/EIOItemTagsProvider.java +++ b/src/main/java/com/enderio/base/data/tags/EIOItemTagsProvider.java @@ -23,12 +23,64 @@ public EIOItemTagsProvider(PackOutput pPackOutput, CompletableFuture Date: Sat, 19 Aug 2023 20:51:38 +0200 Subject: [PATCH 145/154] Disallow buckets in the Stirling generator --- .../common/blockentity/StirlingGeneratorBlockEntity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/machines/java/com/enderio/machines/common/blockentity/StirlingGeneratorBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/StirlingGeneratorBlockEntity.java index 87e6044de3..11c75055af 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/StirlingGeneratorBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/StirlingGeneratorBlockEntity.java @@ -57,7 +57,7 @@ public int getGenerationRate() { @Override public MachineInventoryLayout getInventoryLayout() { return MachineInventoryLayout.builder() - .inputSlot((slot, stack) -> ForgeHooks.getBurnTime(stack, RecipeType.SMELTING) > 0) + .inputSlot((slot, stack) -> ForgeHooks.getBurnTime(stack, RecipeType.SMELTING) > 0 && stack.getCraftingRemainingItem().isEmpty()) .slotAccess(FUEL) .capacitor() .build(); From 15aab28bc1f6ec060f4023746781aa8e13a43029 Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Sat, 19 Aug 2023 21:14:53 +0200 Subject: [PATCH 146/154] Update SoulEngineBlockEntity.java --- .../blockentity/SoulEngineBlockEntity.java | 26 +++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/src/machines/java/com/enderio/machines/common/blockentity/SoulEngineBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/SoulEngineBlockEntity.java index 862be06971..5f8d14fd47 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/SoulEngineBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/SoulEngineBlockEntity.java @@ -27,10 +27,13 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; import net.minecraft.world.level.material.Fluids; +import net.minecraftforge.client.event.RecipesUpdatedEvent; +import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidType; import net.minecraftforge.fluids.capability.IFluidHandler; import net.minecraftforge.fluids.capability.templates.FluidTank; +import net.minecraftforge.fml.common.Mod; import net.minecraftforge.registries.ForgeRegistries; import org.jetbrains.annotations.Nullable; @@ -39,15 +42,18 @@ import static com.enderio.machines.common.blockentity.PoweredSpawnerBlockEntity.NO_MOB; +@Mod.EventBusSubscriber public class SoulEngineBlockEntity extends PoweredMachineBlockEntity { private static final QuadraticScalable CAPACITY = new QuadraticScalable(CapacitorModifier.ENERGY_CAPACITY, MachinesConfig.COMMON.ENERGY.SOUL_ENGINE_CAPACITY); - private static final String BURNED_TICKS = "burnedTicks"; + private static final String BURNED_TICKS = "BurnedTicks"; private StoredEntityData entityData = StoredEntityData.empty(); public static final int FLUID_CAPACITY = 2 * FluidType.BUCKET_VOLUME; @Nullable private EngineSoul.SoulData soulData; private int burnedTicks = 0; + private static boolean reload = false; + private boolean reloadCache = !reload; public SoulEngineBlockEntity(BlockEntityType type, BlockPos worldPosition, BlockState blockState) { @@ -65,14 +71,13 @@ public MachineInventoryLayout getInventoryLayout() { @Override public void serverTick() { - if (entityData != StoredEntityData.empty() && entityData.getEntityType().isPresent()) { + if (reloadCache != reload && entityData != StoredEntityData.empty() && entityData.getEntityType().isPresent()) { Optional op = EngineSoul.ENGINE.matches(entityData.getEntityType().get()); - op.ifPresent(data -> { - soulData = data; - if (isActive()) { - producePower(); - } - }); + op.ifPresent(data -> soulData = data); + reloadCache = reload; + } + if (soulData != null && isActive()) { + producePower(); } super.serverTick(); @@ -172,4 +177,9 @@ public void load(CompoundTag pTag) { burnedTicks = pTag.getInt(BURNED_TICKS); entityData.deserializeNBT(pTag.getCompound(MachineNBTKeys.ENTITY_STORAGE)); } + + @SubscribeEvent + static void onReload(RecipesUpdatedEvent event) { + reload = !reload; + } } From a1ab7c3f6a95d15d708021b80a9f560ba8ab4f85 Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Sat, 19 Aug 2023 21:17:30 +0200 Subject: [PATCH 147/154] Update StirlingGeneratorBlockEntity.java --- .../common/blockentity/StirlingGeneratorBlockEntity.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/machines/java/com/enderio/machines/common/blockentity/StirlingGeneratorBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/StirlingGeneratorBlockEntity.java index 11c75055af..0c0b1fde28 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/StirlingGeneratorBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/StirlingGeneratorBlockEntity.java @@ -88,11 +88,7 @@ public void serverTick() { burnDuration = burnTime; // Remove the fuel - if (fuel.hasCraftingRemainingItem()) { - FUEL.setStackInSlot(this, fuel.getCraftingRemainingItem()); - } else { - fuel.shrink(1); - } + fuel.shrink(1); } } } From c0cd9b551ab218e117bdc9ec5c610f940f2308c2 Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Sat, 19 Aug 2023 22:14:59 +0200 Subject: [PATCH 148/154] oops --- .../machines/client/gui/screen/SoulEngineScreen.java | 4 ++-- .../textures/block/soul_engine_front_active.png.mcmeta | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 src/machines/resources/assets/enderio/textures/block/soul_engine_front_active.png.mcmeta diff --git a/src/machines/java/com/enderio/machines/client/gui/screen/SoulEngineScreen.java b/src/machines/java/com/enderio/machines/client/gui/screen/SoulEngineScreen.java index 7661f63c8b..5cc3112bf4 100644 --- a/src/machines/java/com/enderio/machines/client/gui/screen/SoulEngineScreen.java +++ b/src/machines/java/com/enderio/machines/client/gui/screen/SoulEngineScreen.java @@ -56,8 +56,8 @@ protected void renderLabels(GuiGraphics guiGraphics, int pMouseX, int pMouseY) { } EngineSoul.SoulData data = EngineSoul.ENGINE.map.get(rl.get()); if (data != null) { - guiGraphics.drawString(font, data.tickpermb() + " t/mb", imageWidth / 2f + 20 - font.width(data.tickpermb() + "") / 2f, 40, 4210752, false); - guiGraphics.drawString(font, data.powerpermb() + " µI/mb", imageWidth / 2f + 20 - font.width(data.powerpermb() + "") / 2f, 50, 4210752, false); + guiGraphics.drawString(font, data.tickpermb() + " t/mb", imageWidth / 2f + 12 , 40, 4210752, false); + guiGraphics.drawString(font, data.powerpermb() + " µI/mb", imageWidth / 2f + 12 , 50, 4210752, false); } } diff --git a/src/machines/resources/assets/enderio/textures/block/soul_engine_front_active.png.mcmeta b/src/machines/resources/assets/enderio/textures/block/soul_engine_front_active.png.mcmeta new file mode 100644 index 0000000000..0242996af7 --- /dev/null +++ b/src/machines/resources/assets/enderio/textures/block/soul_engine_front_active.png.mcmeta @@ -0,0 +1,9 @@ +{ + "animation": { + "frametime": 4, + "frames": [ + 0, + 1 + ] + } +} From b5ebef8c517bd54483e59a524dc894e48724d9f6 Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Sun, 20 Aug 2023 00:39:26 +0200 Subject: [PATCH 149/154] Update TravelAnchorRenderer.java make render based on player pos scale blocks properly --- .../rendering/travel/TravelAnchorRenderer.java | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/machines/java/com/enderio/machines/client/rendering/travel/TravelAnchorRenderer.java b/src/machines/java/com/enderio/machines/client/rendering/travel/TravelAnchorRenderer.java index 9155060dcc..84533f5788 100644 --- a/src/machines/java/com/enderio/machines/client/rendering/travel/TravelAnchorRenderer.java +++ b/src/machines/java/com/enderio/machines/client/rendering/travel/TravelAnchorRenderer.java @@ -4,9 +4,11 @@ import com.enderio.machines.common.travel.AnchorTravelTarget; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; +import com.mojang.math.Axis; import net.minecraft.ChatFormatting; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Font; +import net.minecraft.client.player.LocalPlayer; import net.minecraft.client.renderer.LevelRenderer; import net.minecraft.client.renderer.LightTexture; import net.minecraft.client.renderer.RenderType; @@ -14,10 +16,13 @@ import net.minecraft.client.resources.model.BakedModel; import net.minecraft.network.chat.Component; import net.minecraft.util.FastColor; +import net.minecraft.util.Mth; import net.minecraft.world.item.ItemDisplayContext; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.Vec3; +import org.joml.Math; import org.joml.Matrix4f; public class TravelAnchorRenderer implements TravelRenderer { @@ -59,7 +64,9 @@ public void render(AnchorTravelTarget travelData, LevelRenderer levelRenderer, P LevelRenderer.renderLineBox(poseStack, lines, 0, 0, 0, 1, 1, 1, FastColor.ARGB32.red(color) / 255F, FastColor.ARGB32.green(color) / 255F, FastColor.ARGB32.blue(color) / 255F, 1); - + LocalPlayer player = Minecraft.getInstance().player; + Vec3 position = player.position(); + float f1 = (float) (Mth.atan2(position.z - travelData.getPos().getZ() - 0.5D, position.x - travelData.getPos().getX() - 0.5D) + Math.PI/2D); // Render Text if (!travelData.getName().trim().isEmpty()) { // Scale for rendering @@ -75,7 +82,7 @@ public void render(AnchorTravelTarget travelData, LevelRenderer levelRenderer, P poseStack.pushPose(); poseStack.translate(0.5, 1.05 + (doubleScale * Minecraft.getInstance().font.lineHeight), 0.5); - poseStack.mulPose(Minecraft.getInstance().getEntityRenderDispatcher().cameraOrientation()); + poseStack.mulPose(Axis.YN.rotation(f1)); poseStack.scale(-scale, -scale, scale); Matrix4f matrix4f = poseStack.last().pose(); @@ -101,14 +108,14 @@ public void render(AnchorTravelTarget travelData, LevelRenderer levelRenderer, P float scale = (float) doubleScale; poseStack.pushPose(); poseStack.translate(0.5, 0.5, 0.5); - poseStack.mulPose(minecraft.getEntityRenderDispatcher().cameraOrientation()); + poseStack.mulPose(Axis.YN.rotation(f1)); poseStack.translate(0, 0, -1); - poseStack.scale(scale, scale, scale); + poseStack.scale(-scale, scale, -scale); ItemStack stack = new ItemStack(travelData.getIcon()); BakedModel bakedmodel = minecraft.getItemRenderer().getModel(stack, minecraft.level, null, 0); minecraft .getItemRenderer() - .render(stack, ItemDisplayContext.GUI, false, poseStack, OutlineBuffer.INSTANCE, 15728880, OverlayTexture.NO_OVERLAY, bakedmodel); + .render(stack, ItemDisplayContext.GUI, true, poseStack, OutlineBuffer.INSTANCE, 15728880, OverlayTexture.NO_OVERLAY, bakedmodel); poseStack.popPose(); } From 0d46c21f160a0c0488041b38847244c8665700e6 Mon Sep 17 00:00:00 2001 From: Reece Mackie <20544390+Rover656@users.noreply.github.com> Date: Sun, 20 Aug 2023 00:13:45 +0100 Subject: [PATCH 150/154] Added recipe --- .../advancements/recipes/misc/drain.json | 35 +++++++++++++++++++ .../resources/data/enderio/recipes/drain.json | 30 ++++++++++++++++ .../data/recipes/MachineRecipeProvider.java | 13 +++++++ 3 files changed, 78 insertions(+) create mode 100644 src/generated/resources/data/enderio/advancements/recipes/misc/drain.json create mode 100644 src/generated/resources/data/enderio/recipes/drain.json diff --git a/src/generated/resources/data/enderio/advancements/recipes/misc/drain.json b/src/generated/resources/data/enderio/advancements/recipes/misc/drain.json new file mode 100644 index 0000000000..49fef9bd40 --- /dev/null +++ b/src/generated/resources/data/enderio/advancements/recipes/misc/drain.json @@ -0,0 +1,35 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient": { + "conditions": { + "items": [ + { + "items": [ + "enderio:void_chassis" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "enderio:drain" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_ingredient", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "enderio:drain" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/src/generated/resources/data/enderio/recipes/drain.json b/src/generated/resources/data/enderio/recipes/drain.json new file mode 100644 index 0000000000..6968f58d99 --- /dev/null +++ b/src/generated/resources/data/enderio/recipes/drain.json @@ -0,0 +1,30 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "B": { + "item": "minecraft:bucket" + }, + "C": { + "tag": "enderio:clear_glass" + }, + "G": { + "item": "enderio:iron_gear" + }, + "I": { + "item": "enderio:copper_alloy_ingot" + }, + "V": { + "item": "enderio:void_chassis" + } + }, + "pattern": [ + "ICI", + "IVI", + "GBG" + ], + "result": { + "item": "enderio:drain" + }, + "show_notification": true +} \ No newline at end of file diff --git a/src/machines/java/com/enderio/machines/data/recipes/MachineRecipeProvider.java b/src/machines/java/com/enderio/machines/data/recipes/MachineRecipeProvider.java index d061e2af89..ed21c2238a 100644 --- a/src/machines/java/com/enderio/machines/data/recipes/MachineRecipeProvider.java +++ b/src/machines/java/com/enderio/machines/data/recipes/MachineRecipeProvider.java @@ -240,6 +240,19 @@ protected void buildRecipes(Consumer finishedRecipeConsumer) { .unlockedBy("has_ingredient", InventoryChangeTrigger.TriggerInstance.hasItems(EIOItems.PULSATING_CRYSTAL.get())) .save(finishedRecipeConsumer); + ShapedRecipeBuilder + .shaped(RecipeCategory.MISC, MachineBlocks.DRAIN.get()) + .define('I', EIOItems.COPPER_ALLOY_INGOT) + .define('V', EIOBlocks.VOID_CHASSIS) + .define('C', EIOTags.Items.CLEAR_GLASS) + .define('G', EIOItems.GEAR_IRON) + .define('B', Items.BUCKET) + .pattern("ICI") + .pattern("IVI") + .pattern("GBG") + .unlockedBy("has_ingredient", InventoryChangeTrigger.TriggerInstance.hasItems(ItemPredicate.Builder.item().of(EIOBlocks.VOID_CHASSIS).build())) + .save(finishedRecipeConsumer); + ShapedRecipeBuilder .shaped(RecipeCategory.MISC, MachineBlocks.XP_VACUUM) .pattern("III") From 8065ba7face88341a8f6efc3682e5b69417aa09d Mon Sep 17 00:00:00 2001 From: Reece Mackie <20544390+Rover656@users.noreply.github.com> Date: Sun, 20 Aug 2023 00:29:53 +0100 Subject: [PATCH 151/154] GitHub web merge did a bad job --- src/machines/java/com/enderio/machines/EIOMachines.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/machines/java/com/enderio/machines/EIOMachines.java b/src/machines/java/com/enderio/machines/EIOMachines.java index 18e31b12dd..119a3d6cc1 100644 --- a/src/machines/java/com/enderio/machines/EIOMachines.java +++ b/src/machines/java/com/enderio/machines/EIOMachines.java @@ -10,6 +10,10 @@ import com.enderio.machines.common.init.*; import com.enderio.machines.common.integrations.EnderIOMachinesSelfIntegration; import com.enderio.machines.common.lang.MachineLang; +import com.enderio.machines.common.menu.EnchanterMenu; +import com.enderio.machines.common.menu.GhostMachineSlot; +import com.enderio.machines.common.menu.MachineSlot; +import com.enderio.machines.common.menu.PreviewMachineSlot; import com.enderio.machines.common.tag.MachineTags; import com.enderio.machines.common.travel.AnchorTravelTarget; import com.enderio.machines.data.advancements.MachinesAdvancementGenerator; From 9ed57e055e9f818a2261872109e0082f898718a4 Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Sun, 20 Aug 2023 01:49:08 +0200 Subject: [PATCH 152/154] fix soul engine recipe --- .../data/enderio/recipes/soul_engine.json | 2 +- .../machines/common/init/MachineBlocks.java | 3 ++- .../common/integrations/jei/MachinesJEI.java | 15 ++++++++------- .../data/recipes/MachineRecipeProvider.java | 2 +- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/generated/resources/data/enderio/recipes/soul_engine.json b/src/generated/resources/data/enderio/recipes/soul_engine.json index 4f7303037d..c4c92d9206 100644 --- a/src/generated/resources/data/enderio/recipes/soul_engine.json +++ b/src/generated/resources/data/enderio/recipes/soul_engine.json @@ -1,5 +1,5 @@ { - "type": "enderio:shaped_entity_storage", + "type": "minecraft:crafting_shaped", "category": "misc", "key": { "B": { diff --git a/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java b/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java index 3d1b154b9e..68e6c214f5 100644 --- a/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java +++ b/src/machines/java/com/enderio/machines/common/init/MachineBlocks.java @@ -3,6 +3,7 @@ import com.enderio.EnderIO; import com.enderio.base.common.init.EIOCreativeTabs; import com.enderio.core.data.model.EIOModel; +import com.enderio.machines.common.MachineNBTKeys; import com.enderio.machines.common.block.*; import com.enderio.machines.common.blockentity.base.MachineBlockEntity; import com.enderio.machines.common.blockentity.capacitorbank.CapacitorBankBlockEntity; @@ -125,7 +126,7 @@ public class MachineBlocks { public static final BlockEntry POWERED_SPAWNER = REGISTRATE .block("powered_spawner", properties -> new ProgressMachineBlock(properties, MachineBlockEntities.POWERED_SPAWNER)) - .loot((l,t) -> MachinesLootTable.copyNBTSingleCap(l, t, "EntityStorage")) + .loot((l,t) -> MachinesLootTable.copyNBTSingleCap(l, t, MachineNBTKeys.ENTITY_STORAGE)) .properties(props -> props.strength(2.5f, 8)) .blockstate(MachineModelUtil::progressMachineBlock) .tag(BlockTags.NEEDS_IRON_TOOL, BlockTags.MINEABLE_WITH_PICKAXE) diff --git a/src/machines/java/com/enderio/machines/common/integrations/jei/MachinesJEI.java b/src/machines/java/com/enderio/machines/common/integrations/jei/MachinesJEI.java index 5ddd914c76..0246c8869f 100644 --- a/src/machines/java/com/enderio/machines/common/integrations/jei/MachinesJEI.java +++ b/src/machines/java/com/enderio/machines/common/integrations/jei/MachinesJEI.java @@ -1,6 +1,7 @@ package com.enderio.machines.common.integrations.jei; import com.enderio.EnderIO; +import com.enderio.base.common.integrations.jei.subtype.EntityStorageSubtypeInterpreter; import com.enderio.machines.common.init.MachineBlocks; import com.enderio.machines.common.init.MachineMenus; import com.enderio.machines.common.integrations.jei.category.*; @@ -9,10 +10,7 @@ import mezz.jei.api.IModPlugin; import mezz.jei.api.JeiPlugin; import mezz.jei.api.constants.RecipeTypes; -import mezz.jei.api.registration.IRecipeCatalystRegistration; -import mezz.jei.api.registration.IRecipeCategoryRegistration; -import mezz.jei.api.registration.IRecipeRegistration; -import mezz.jei.api.registration.IRecipeTransferRegistration; +import mezz.jei.api.registration.*; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; @@ -33,7 +31,6 @@ public void registerRecipeCatalysts(IRecipeCatalystRegistration registration) { registration.addRecipeCatalyst(new ItemStack(MachineBlocks.SOUL_BINDER.get()), SoulBindingCategory.TYPE); registration.addRecipeCatalyst(new ItemStack(MachineBlocks.FLUID_TANK.get()), TankCategory.TYPE); registration.addRecipeCatalyst(new ItemStack(MachineBlocks.PRESSURIZED_FLUID_TANK.get()), TankCategory.TYPE); - registration.addRecipeCatalyst(new ItemStack(MachineBlocks.SOUL_ENGINE.get()), SoulEngineCategory.TYPE); } @@ -46,7 +43,6 @@ public void registerCategories(IRecipeCategoryRegistration registration) { registration.addRecipeCategories(new SlicingRecipeCategory(registration.getJeiHelpers().getGuiHelper())); registration.addRecipeCategories(new SoulBindingCategory(registration.getJeiHelpers().getGuiHelper())); registration.addRecipeCategories(new TankCategory(registration.getJeiHelpers().getGuiHelper())); - registration.addRecipeCategories(new SoulEngineCategory(registration.getJeiHelpers().getGuiHelper())); } @@ -61,7 +57,6 @@ public void registerRecipes(IRecipeRegistration registration) { registration.addRecipes(SlicingRecipeCategory.TYPE, recipes.getSlicingRecipes()); registration.addRecipes(SoulBindingCategory.TYPE, recipes.getSoulBindingRecipes()); registration.addRecipes(TankCategory.TYPE, recipes.getTankRecipes()); - registration.addRecipes(SoulEngineCategory.TYPE, recipes.getMobGeneratorRecipes()); } @@ -93,4 +88,10 @@ public void registerRecipeTransferHandlers(IRecipeTransferRegistration registrat registration.addRecipeTransferHandler(new CrafterRecipeTransferHandler(registration.getTransferHelper()), RecipeTypes.CRAFTING); } + + @Override + public void registerItemSubtypes(ISubtypeRegistration registration) { + registration.registerSubtypeInterpreter(MachineBlocks.SOUL_ENGINE.asItem(), new EntityStorageSubtypeInterpreter()); + + } } diff --git a/src/machines/java/com/enderio/machines/data/recipes/MachineRecipeProvider.java b/src/machines/java/com/enderio/machines/data/recipes/MachineRecipeProvider.java index 6a64f38af5..1ae6c2b8b6 100644 --- a/src/machines/java/com/enderio/machines/data/recipes/MachineRecipeProvider.java +++ b/src/machines/java/com/enderio/machines/data/recipes/MachineRecipeProvider.java @@ -229,7 +229,7 @@ protected void buildRecipes(Consumer finishedRecipeConsumer) { .unlockedBy("has_ingredient", InventoryChangeTrigger.TriggerInstance.hasItems(EIOBlocks.ENSOULED_CHASSIS)) .save(finishedRecipeConsumer); - ShapedEntityStorageRecipeBuilder + ShapedRecipeBuilder .shaped(RecipeCategory.MISC, MachineBlocks.SOUL_ENGINE) .define('I', EIOItems.SOULARIUM_INGOT) //TODO Maybe also soulchains? .define('B', Items.BUCKET) From 7ba436d60f379ae67fdfc8618182375deb4d01cc Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Sun, 20 Aug 2023 01:53:34 +0200 Subject: [PATCH 153/154] Update MachinePackets.java --- .../com/enderio/machines/common/init/MachinePackets.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/machines/java/com/enderio/machines/common/init/MachinePackets.java b/src/machines/java/com/enderio/machines/common/init/MachinePackets.java index 4c14bb12c9..1575976449 100644 --- a/src/machines/java/com/enderio/machines/common/init/MachinePackets.java +++ b/src/machines/java/com/enderio/machines/common/init/MachinePackets.java @@ -1,18 +1,21 @@ package com.enderio.machines.common.init; -import com.enderio.base.common.network.SyncTravelDataPacket; import com.enderio.core.common.network.CoreNetwork; import com.enderio.machines.common.network.PoweredSpawnerSoulPacket; +import com.enderio.machines.common.network.SoulEngineSoulPacket; import com.enderio.machines.common.network.UpdateCrafterTemplatePacket; +import com.enderio.machines.common.souldata.EngineSoul; import com.enderio.machines.common.souldata.SpawnerSoul; public class MachinePackets { public static void register() { //Sync soul data (optional) SpawnerSoul.SPAWNER.subscribeAsSyncable(PoweredSpawnerSoulPacket::new); + EngineSoul.ENGINE.subscribeAsSyncable(SoulEngineSoulPacket::new); //packets CoreNetwork.registerPacket(new UpdateCrafterTemplatePacket.Handler(), UpdateCrafterTemplatePacket.class); CoreNetwork.registerPacket(new PoweredSpawnerSoulPacket.Handler(), PoweredSpawnerSoulPacket.class); + CoreNetwork.registerPacket(new SoulEngineSoulPacket.Handler(), SoulEngineSoulPacket.class); } } From 54b5c01fe2b8e5e671d4a0660dc7594ee4d9de30 Mon Sep 17 00:00:00 2001 From: Reece Mackie <20544390+Rover656@users.noreply.github.com> Date: Sun, 20 Aug 2023 00:57:57 +0100 Subject: [PATCH 154/154] Fix datagen --- .../resources/data/minecraft/tags/blocks/mineable/pickaxe.json | 1 + .../resources/data/minecraft/tags/blocks/needs_iron_tool.json | 1 + 2 files changed, 2 insertions(+) diff --git a/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json b/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json index 6803d15c69..62d4e022ea 100644 --- a/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json +++ b/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json @@ -58,6 +58,7 @@ "enderio:advanced_capacitor_bank", "enderio:vibrant_capacitor_bank", "enderio:crafter", + "enderio:soul_engine", "enderio:drain", "enderio:conduit" ] diff --git a/src/generated/resources/data/minecraft/tags/blocks/needs_iron_tool.json b/src/generated/resources/data/minecraft/tags/blocks/needs_iron_tool.json index 07c2795abd..9b131b49cb 100644 --- a/src/generated/resources/data/minecraft/tags/blocks/needs_iron_tool.json +++ b/src/generated/resources/data/minecraft/tags/blocks/needs_iron_tool.json @@ -23,6 +23,7 @@ "enderio:xp_vacuum", "enderio:travel_anchor", "enderio:crafter", + "enderio:soul_engine", "enderio:drain" ] } \ No newline at end of file