From ce897a4e7362d6db6a1e54cd701c734a378c8619 Mon Sep 17 00:00:00 2001 From: Brian Wuest Date: Wed, 15 Sep 2021 05:54:48 -0500 Subject: [PATCH] Fixing more issues with farm generation --- .../prefab/structures/base/Structure.java | 3 +-- .../config/enums/ModerateFarmOptions.java | 5 +++-- .../events/StructureEventHandler.java | 5 +++++ .../structures/automated_bamboo_farm.zip | Bin 3479 -> 3645 bytes 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/wuest/prefab/structures/base/Structure.java b/src/main/java/com/wuest/prefab/structures/base/Structure.java index 7ceebdbe..e5b9b41a 100644 --- a/src/main/java/com/wuest/prefab/structures/base/Structure.java +++ b/src/main/java/com/wuest/prefab/structures/base/Structure.java @@ -417,11 +417,10 @@ public boolean BuildStructure(StructureConfiguration configuration, ServerWorld block.setSubBlock(subBlock); } - boolean priorityTwoBlock = foundBlock instanceof HopperBlock; + boolean priorityTwoBlock = foundBlock instanceof HopperBlock || foundBlock instanceof LeverBlock; boolean priorityThreeBlock = foundBlock instanceof TorchBlock || foundBlock instanceof AbstractSignBlock - || foundBlock instanceof LeverBlock || foundBlock instanceof AbstractButtonBlock || foundBlock instanceof BedBlock || foundBlock instanceof CarpetBlock diff --git a/src/main/java/com/wuest/prefab/structures/config/enums/ModerateFarmOptions.java b/src/main/java/com/wuest/prefab/structures/config/enums/ModerateFarmOptions.java index e6b14531..a6af28f7 100644 --- a/src/main/java/com/wuest/prefab/structures/config/enums/ModerateFarmOptions.java +++ b/src/main/java/com/wuest/prefab/structures/config/enums/ModerateFarmOptions.java @@ -41,12 +41,13 @@ public class ModerateFarmOptions extends BaseOption{ false, true); - public static ModerateFarmOptions MushroomFarm = new ModerateFarmOptions( + // This is for 1.17 and later +/* public static ModerateFarmOptions MushroomFarm = new ModerateFarmOptions( "prefab.gui.starter.farm.mushroom", "assets/prefab/structures/mushroom_farm.zip", "textures/gui/mushroom_farm_topdown.png", false, - false); + false);*/ protected ModerateFarmOptions(String translationString, String assetLocation, diff --git a/src/main/java/com/wuest/prefab/structures/events/StructureEventHandler.java b/src/main/java/com/wuest/prefab/structures/events/StructureEventHandler.java index 4de74298..bc28243d 100644 --- a/src/main/java/com/wuest/prefab/structures/events/StructureEventHandler.java +++ b/src/main/java/com/wuest/prefab/structures/events/StructureEventHandler.java @@ -15,6 +15,7 @@ import net.minecraft.entity.item.HangingEntity; import net.minecraft.entity.item.ItemFrameEntity; import net.minecraft.entity.item.PaintingEntity; +import net.minecraft.entity.item.minecart.AbstractMinecartEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.ServerPlayerEntity; import net.minecraft.item.ItemStack; @@ -417,6 +418,10 @@ private static void processStructureEntities() { entity = StructureEventHandler.setItemFrameFacingAndRotation((ItemFrameEntity) entity, buildEntity, entityPos, structure); } else if (entity instanceof PaintingEntity) { entity = StructureEventHandler.setPaintingFacingAndRotation((PaintingEntity) entity, buildEntity, entityPos, structure); + } else if (entity instanceof AbstractMinecartEntity) { + // Minecarts need to be slightly higher to account for the rails; otherwise they will fall through the rail and the block below the rail. + buildEntity.entityYAxisOffset = buildEntity.entityYAxisOffset + .2; + entity = StructureEventHandler.setEntityFacingAndRotation(entity, buildEntity, entityPos, structure); } else { // All other entities entity = StructureEventHandler.setEntityFacingAndRotation(entity, buildEntity, entityPos, structure); diff --git a/src/main/resources/assets/prefab/structures/automated_bamboo_farm.zip b/src/main/resources/assets/prefab/structures/automated_bamboo_farm.zip index 9e42c62edec074c8a61c3a15c7e1df7500d66f6c..03cc9cde7c558749d133bc389073b5b9391dc187 100644 GIT binary patch literal 3645 zcmdVa_cz>m+Xrx?iyoa-Vh~0dbxe%N=p};aCCVgfqBBGZMs@`gqDP{HXmgL=yG(+R zjb2t{h#Hnb7#S_fGxm<%=XuV#|A70q@A;nh_xfJ1>vOJ;Fq)peZa@=3O@TlL`}rV( z-CUjTB7E-p`8m5I0(~ep^6$6_i ze$}nqVndD)80<0MkJ2ROxD)qNzCYTdGsc}Vi+9E=j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