diff --git a/changelog.md b/changelog.md index e3b3314e4b..3ef38cdf24 100644 --- a/changelog.md +++ b/changelog.md @@ -128,6 +128,7 @@ _Now using Flywheel 1.0_ - Fixed stations voiding schedules when disassembling the train - Fixed lighting on signal block indicators - Fixed vaults and tanks rotated in place not updating their multiblock correctly +- Hose pulley now deletes lilypads and other surface foliage #### API Changes diff --git a/src/generated/resources/.cache/b256105d8411632b0d585496ea8944a751a08034 b/src/generated/resources/.cache/b256105d8411632b0d585496ea8944a751a08034 index bb7124e819..949db86d0e 100644 --- a/src/generated/resources/.cache/b256105d8411632b0d585496ea8944a751a08034 +++ b/src/generated/resources/.cache/b256105d8411632b0d585496ea8944a751a08034 @@ -1,4 +1,4 @@ -// 1.20.1 2025-02-05T20:54:03.0689569 Create's Processing Recipes +// 1.20.1 2025-02-09T10:52:38.3168881 Create's Processing Recipes 3c94326fb730f68c1e44fe1e2ef09c9db6ffd92b data/create/recipes/compacting/andesite_from_flint.json 8d3d5b31f3601b9f681ff710e0545a483a1494c6 data/create/recipes/compacting/blaze_cake.json 8bd7f4e3a686ab520b2d55594d2018d0e9a50c91 data/create/recipes/compacting/chocolate.json @@ -54,6 +54,9 @@ c9f6c53c34c4891a245dd9515eb573b40b4f3e0b data/create/recipes/crushing/compat/exn 0fedb41388b4f04e544f45d7182d91b2e9230bc6 data/create/recipes/crushing/compat/galosphere/allurite.json 9e255904c7a3277d6084183c0921392df0c7918d data/create/recipes/crushing/compat/galosphere/amethyst.json b04f95c02f37a0398c209a02ad08a8b0e9aaaaa9 data/create/recipes/crushing/compat/galosphere/lumiere.json +0e812bd72411b42378fe29efa31a11f087d57e2e data/create/recipes/crushing/compat/immersiveengineering/coal_coke.json +02bcdd13739c05df6e8cb49908a0103ce8ec896b data/create/recipes/crushing/compat/immersiveengineering/coke_block.json +113b6dcce9801ee18d5771855c3750c1358f9c65 data/create/recipes/crushing/compat/immersiveengineering/slag.json bea05bc584958f479078cd6c16a06c50eae859cc data/create/recipes/crushing/compat/neapolitan/ice.json 2358ce4b7a3acb08d3d0a3e64295fb97dea2ec02 data/create/recipes/crushing/compat/quark/moss_block.json 2631b2bdcf091f4d400e0a9d2be6f1f772edfdc9 data/create/recipes/crushing/compat/silentgems/alexandrite_ore.json diff --git a/src/generated/resources/data/create/recipes/crushing/compat/immersiveengineering/coal_coke.json b/src/generated/resources/data/create/recipes/crushing/compat/immersiveengineering/coal_coke.json new file mode 100644 index 0000000000..13bd0f682f --- /dev/null +++ b/src/generated/resources/data/create/recipes/crushing/compat/immersiveengineering/coal_coke.json @@ -0,0 +1,20 @@ +{ + "type": "create:crushing", + "conditions": [ + { + "type": "forge:mod_loaded", + "modid": "immersiveengineering" + } + ], + "ingredients": [ + { + "item": "immersiveengineering:coal_coke" + } + ], + "processingTime": 200, + "results": [ + { + "item": "immersiveengineering:dust_coke" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/create/recipes/crushing/compat/immersiveengineering/coke_block.json b/src/generated/resources/data/create/recipes/crushing/compat/immersiveengineering/coke_block.json new file mode 100644 index 0000000000..b20f9375c9 --- /dev/null +++ b/src/generated/resources/data/create/recipes/crushing/compat/immersiveengineering/coke_block.json @@ -0,0 +1,21 @@ +{ + "type": "create:crushing", + "conditions": [ + { + "type": "forge:mod_loaded", + "modid": "immersiveengineering" + } + ], + "ingredients": [ + { + "item": "immersiveengineering:coke" + } + ], + "processingTime": 200, + "results": [ + { + "count": 9, + "item": "immersiveengineering:dust_coke" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/create/recipes/crushing/compat/immersiveengineering/slag.json b/src/generated/resources/data/create/recipes/crushing/compat/immersiveengineering/slag.json new file mode 100644 index 0000000000..bb6ea9091f --- /dev/null +++ b/src/generated/resources/data/create/recipes/crushing/compat/immersiveengineering/slag.json @@ -0,0 +1,20 @@ +{ + "type": "create:crushing", + "conditions": [ + { + "type": "forge:mod_loaded", + "modid": "immersiveengineering" + } + ], + "ingredients": [ + { + "item": "immersiveengineering:slag" + } + ], + "processingTime": 200, + "results": [ + { + "item": "immersiveengineering:slag_gravel" + } + ] +} \ No newline at end of file diff --git a/src/main/java/com/simibubi/create/content/decoration/copycat/CopycatModel.java b/src/main/java/com/simibubi/create/content/decoration/copycat/CopycatModel.java index 15233e3e0e..6a6e22fa7a 100644 --- a/src/main/java/com/simibubi/create/content/decoration/copycat/CopycatModel.java +++ b/src/main/java/com/simibubi/create/content/decoration/copycat/CopycatModel.java @@ -81,6 +81,12 @@ public abstract class CopycatModel extends BakedModelWrapperWithData { occlusionData.occlude(face); } } + + @Override + public List getQuads(BlockState state, Direction side, RandomSource rand) { + return getCroppedQuads(state, side, rand, getMaterial(ModelData.EMPTY), ModelData.EMPTY, + RenderType.cutoutMipped()); + } @Override public List getQuads(BlockState state, Direction side, RandomSource rand, ModelData data, RenderType renderType) { diff --git a/src/main/java/com/simibubi/create/content/fluids/transfer/FluidDrainingBehaviour.java b/src/main/java/com/simibubi/create/content/fluids/transfer/FluidDrainingBehaviour.java index e37ce1039c..0696c28e36 100644 --- a/src/main/java/com/simibubi/create/content/fluids/transfer/FluidDrainingBehaviour.java +++ b/src/main/java/com/simibubi/create/content/fluids/transfer/FluidDrainingBehaviour.java @@ -148,8 +148,14 @@ public class FluidDrainingBehaviour extends FluidManipulationBehaviour { playEffect(world, currentPos, fluid, true); blockEntity.award(AllAdvancements.HOSE_PULLEY); - if (!blockEntity.isVirtual()) + if (!blockEntity.isVirtual()) { world.setBlock(currentPos, emptied, 2 | 16); + + BlockState stateAbove = world.getBlockState(currentPos.above()); + if (stateAbove.getFluidState() + .getType() == Fluids.EMPTY && !stateAbove.canSurvive(world, currentPos.above())) + world.setBlock(currentPos.above(), Blocks.AIR.defaultBlockState(), 2 | 16); + } affectedArea = BBHelper.encapsulate(affectedArea, currentPos); queue.dequeue(); diff --git a/src/main/java/com/simibubi/create/content/kinetics/drill/DrillBlockEntity.java b/src/main/java/com/simibubi/create/content/kinetics/drill/DrillBlockEntity.java index 64fd8b6f5f..fc83233dcc 100644 --- a/src/main/java/com/simibubi/create/content/kinetics/drill/DrillBlockEntity.java +++ b/src/main/java/com/simibubi/create/content/kinetics/drill/DrillBlockEntity.java @@ -3,6 +3,7 @@ package com.simibubi.create.content.kinetics.drill; import com.simibubi.create.content.kinetics.base.BlockBreakingKineticBlockEntity; import com.simibubi.create.content.kinetics.belt.behaviour.DirectBeltInputBehaviour; import com.simibubi.create.content.kinetics.drill.CobbleGenOptimisation.CobbleGenBlockConfiguration; +import com.simibubi.create.content.logistics.chute.ChuteBlockEntity; import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour; import net.minecraft.core.BlockPos; @@ -41,6 +42,15 @@ public class DrillBlockEntity extends BlockBreakingKineticBlockEntity { } public boolean optimiseCobbleGen(BlockState stateToBreak) { + DirectBeltInputBehaviour inv = + BlockEntityBehaviour.get(level, breakingPos.below(), DirectBeltInputBehaviour.TYPE); + BlockEntity blockEntityBelow = level.getBlockEntity(breakingPos.below()); + BlockEntity blockEntityAbove = level.getBlockEntity(breakingPos.above()); + + if (inv == null && !(blockEntityBelow instanceof HopperBlockEntity) + && !(blockEntityAbove instanceof ChuteBlockEntity chute && chute.getItemMotion() > 0)) + return false; + CobbleGenBlockConfiguration config = CobbleGenOptimisation.getConfig(level, worldPosition, getBlockState().getValue(DrillBlock.FACING)); if (config == null) @@ -57,21 +67,20 @@ public class DrillBlockEntity extends BlockBreakingKineticBlockEntity { if (currentOutput.isAir() || !currentOutput.equals(stateToBreak)) return false; - DirectBeltInputBehaviour inv = - BlockEntityBehaviour.get(level, breakingPos.below(), DirectBeltInputBehaviour.TYPE); - if (inv != null) for (ItemStack stack : Block.getDrops(stateToBreak, sl, breakingPos, null)) inv.handleInsertion(stack, Direction.UP, false); - else { - BlockEntity blockEntity = level.getBlockEntity(breakingPos.below()); - if (blockEntity instanceof HopperBlockEntity hbe) { - IItemHandler handler = hbe.getCapability(ForgeCapabilities.ITEM_HANDLER) - .orElse(null); - if (handler != null) - for (ItemStack stack : Block.getDrops(stateToBreak, sl, breakingPos, null)) - ItemHandlerHelper.insertItemStacked(handler, stack, false); - } + else if (blockEntityBelow instanceof HopperBlockEntity hbe) { + IItemHandler handler = hbe.getCapability(ForgeCapabilities.ITEM_HANDLER) + .orElse(null); + if (handler != null) + for (ItemStack stack : Block.getDrops(stateToBreak, sl, breakingPos, null)) + ItemHandlerHelper.insertItemStacked(handler, stack, false); + } else if (blockEntityAbove instanceof ChuteBlockEntity chute && chute.getItemMotion() > 0) { + for (ItemStack stack : Block.getDrops(stateToBreak, sl, breakingPos, null)) + if (chute.getItem() + .isEmpty()) + chute.setItem(stack, 0); } level.levelEvent(2001, breakingPos, Block.getId(stateToBreak)); diff --git a/src/main/java/com/simibubi/create/content/logistics/AddressEditBox.java b/src/main/java/com/simibubi/create/content/logistics/AddressEditBox.java index 0b30de921b..1f096fbd71 100644 --- a/src/main/java/com/simibubi/create/content/logistics/AddressEditBox.java +++ b/src/main/java/com/simibubi/create/content/logistics/AddressEditBox.java @@ -65,6 +65,13 @@ public class AddressEditBox extends EditBox { @Override public boolean mouseClicked(double pMouseX, double pMouseY, int pButton) { + if (pButton == GLFW.GLFW_MOUSE_BUTTON_RIGHT) { + if (isMouseOver(pMouseX, pMouseY)) { + setValue(""); + return true; + } + } + boolean wasFocused = isFocused(); if (super.mouseClicked(pMouseX, pMouseY, pButton)) { if (!wasFocused) { diff --git a/src/main/java/com/simibubi/create/content/logistics/factoryBoard/FactoryPanelBehaviour.java b/src/main/java/com/simibubi/create/content/logistics/factoryBoard/FactoryPanelBehaviour.java index 249e6a74e6..f4082339af 100644 --- a/src/main/java/com/simibubi/create/content/logistics/factoryBoard/FactoryPanelBehaviour.java +++ b/src/main/java/com/simibubi/create/content/logistics/factoryBoard/FactoryPanelBehaviour.java @@ -383,7 +383,7 @@ public class FactoryPanelBehaviour extends FilteringBehaviour implements MenuPro return; } - timer = REQUEST_INTERVAL; + resetTimer(); if (recipeAddress.isBlank()) return; @@ -702,7 +702,7 @@ public class FactoryPanelBehaviour extends FilteringBehaviour implements MenuPro PackagerBlockEntity packager = panelBE.getRestockedPackager(); if (packager == null) return InventorySummary.EMPTY; - return packager.getAvailableItems(); + return packager.getAvailableItems(true); } public int getPromised() { @@ -715,7 +715,7 @@ public class FactoryPanelBehaviour extends FilteringBehaviour implements MenuPro if (panelBE().restocker) { if (forceClearPromises) { restockerPromises.forceClear(item); - timer = 0; + resetTimerSlightly(); } forceClearPromises = false; return restockerPromises.getTotalPromisedAndRemoveExpired(item, getPromiseExpiryTimeInTicks()); @@ -724,12 +724,20 @@ public class FactoryPanelBehaviour extends FilteringBehaviour implements MenuPro RequestPromiseQueue promises = Create.LOGISTICS.getQueuedPromises(network); if (forceClearPromises) { promises.forceClear(item); - timer = 0; + resetTimerSlightly(); } forceClearPromises = false; return promises == null ? 0 : promises.getTotalPromisedAndRemoveExpired(item, getPromiseExpiryTimeInTicks()); } + + public void resetTimer() { + timer = REQUEST_INTERVAL; + } + + public void resetTimerSlightly() { + timer = REQUEST_INTERVAL / 2; + } private int getPromiseExpiryTimeInTicks() { if (promiseClearingInterval == -1) @@ -868,6 +876,7 @@ public class FactoryPanelBehaviour extends FilteringBehaviour implements MenuPro blockEntity.setChanged(); blockEntity.sendData(); playFeedbackSound(this); + resetTimerSlightly(); if (!getWorld().isClientSide) notifyRedstoneOutputs(); } diff --git a/src/main/java/com/simibubi/create/content/logistics/factoryBoard/FactoryPanelScreen.java b/src/main/java/com/simibubi/create/content/logistics/factoryBoard/FactoryPanelScreen.java index a3caad6976..ae323c23ee 100644 --- a/src/main/java/com/simibubi/create/content/logistics/factoryBoard/FactoryPanelScreen.java +++ b/src/main/java/com/simibubi/create/content/logistics/factoryBoard/FactoryPanelScreen.java @@ -45,7 +45,6 @@ import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.CraftingRecipe; import net.minecraft.world.item.crafting.Ingredient; -import net.minecraft.world.item.crafting.RecipeSerializer; import net.minecraft.world.item.crafting.RecipeType; import net.minecraftforge.common.crafting.IShapedRecipe; import net.minecraftforge.items.ItemHandlerHelper; @@ -675,8 +674,6 @@ public class FactoryPanelScreen extends AbstractSimiScreen { availableCraftingRecipe = level.getRecipeManager() .getAllRecipesFor(RecipeType.CRAFTING) .parallelStream() - .filter(r -> r.getSerializer() == RecipeSerializer.SHAPED_RECIPE - || r.getSerializer() == RecipeSerializer.SHAPELESS_RECIPE) .filter(r -> output.getItem() == r.getResultItem(level.registryAccess()) .getItem()) .filter(r -> { diff --git a/src/main/java/com/simibubi/create/content/logistics/packager/PackagerBlockEntity.java b/src/main/java/com/simibubi/create/content/logistics/packager/PackagerBlockEntity.java index 3d0b3e4c02..2b23f0f0e8 100644 --- a/src/main/java/com/simibubi/create/content/logistics/packager/PackagerBlockEntity.java +++ b/src/main/java/com/simibubi/create/content/logistics/packager/PackagerBlockEntity.java @@ -160,6 +160,10 @@ public class PackagerBlockEntity extends SmartBlockEntity { } public InventorySummary getAvailableItems() { + return getAvailableItems(false); + } + + public InventorySummary getAvailableItems(boolean scanInputSlots) { if (availableItems != null && invVersionTracker.stillWaiting(targetInventory.getInventory())) return availableItems; @@ -179,9 +183,7 @@ public class PackagerBlockEntity extends SmartBlockEntity { for (int slot = 0; slot < targetInv.getSlots(); slot++) { int slotLimit = targetInv.getSlotLimit(slot); - @NotNull - ItemStack extractItem = targetInv.extractItem(slot, slotLimit, true); - availableItems.add(extractItem); + availableItems.add(scanInputSlots ? targetInv.getStackInSlot(slot) : targetInv.extractItem(slot, slotLimit, true)); } invVersionTracker.awaitNewVersion(targetInventory.getInventory()); diff --git a/src/main/java/com/simibubi/create/foundation/data/recipe/CrushingRecipeGen.java b/src/main/java/com/simibubi/create/foundation/data/recipe/CrushingRecipeGen.java index 4a6db2a6c9..47dfb4f6c4 100644 --- a/src/main/java/com/simibubi/create/foundation/data/recipe/CrushingRecipeGen.java +++ b/src/main/java/com/simibubi/create/foundation/data/recipe/CrushingRecipeGen.java @@ -404,7 +404,21 @@ public class CrushingRecipeGen extends ProcessingRecipeGen { .output(0.75f, Mods.AET, "ambrosium_shard", 1) .output(0.125f, Mods.AET, "holystone", 1) .output(0.75f, AllItems.EXP_NUGGET.get()) - .whenModLoaded(Mods.AET.getId())) + .whenModLoaded(Mods.AET.getId())), + + // IE + + IE_COKE_DUST = create(Mods.IE.recipeId("coal_coke"), b -> b.duration(200) + .require(Mods.IE, "coal_coke").output(Mods.IE, "dust_coke") + .whenModLoaded(Mods.IE.getId())), + + IE_COKE_BLOCK = create(Mods.IE.recipeId("coke_block"), b -> b.duration(200) + .require(Mods.IE, "coke").output(1, Mods.IE.asResource("dust_coke"), 9) + .whenModLoaded(Mods.IE.getId())), + + IE_SLAG_GRAVEL = create(Mods.IE.recipeId("slag"), b -> b.duration(200) + .require(Mods.IE, "slag").output(Mods.IE, "slag_gravel") + .whenModLoaded(Mods.IE.getId())); ;