Still playing the game

- More IE recipes
- Hose pulley now deletes lilypads and other surface foliage
- Factory gauges are now less strict about recipes they support
- Factory gauges no longer trigger a request immediately after promises are cleared
- Address edit boxes can now be cleared with right click
- Fixed copycats not rendering in ghost previews
- Cobblegen 'optimisation' now works with chutes above
- Fixed cobblegen optimisation blocking normal behaviour when no inventory is present
- Fixed restocker gauges not able to monitor 'input slots' of an inventory
This commit is contained in:
simibubi 2025-02-09 12:49:10 +01:00
parent 04fc795859
commit 888d175695
13 changed files with 140 additions and 25 deletions

View file

@ -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

View file

@ -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

View file

@ -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"
}
]
}

View file

@ -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"
}
]
}

View file

@ -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"
}
]
}

View file

@ -82,6 +82,12 @@ public abstract class CopycatModel extends BakedModelWrapperWithData {
}
}
@Override
public List<BakedQuad> getQuads(BlockState state, Direction side, RandomSource rand) {
return getCroppedQuads(state, side, rand, getMaterial(ModelData.EMPTY), ModelData.EMPTY,
RenderType.cutoutMipped());
}
@Override
public List<BakedQuad> getQuads(BlockState state, Direction side, RandomSource rand, ModelData data, RenderType renderType) {

View file

@ -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();

View file

@ -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) {
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));

View file

@ -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) {

View file

@ -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,13 +724,21 @@ 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)
return -1;
@ -868,6 +876,7 @@ public class FactoryPanelBehaviour extends FilteringBehaviour implements MenuPro
blockEntity.setChanged();
blockEntity.sendData();
playFeedbackSound(this);
resetTimerSlightly();
if (!getWorld().isClientSide)
notifyRedstoneOutputs();
}

View file

@ -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 -> {

View file

@ -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());

View file

@ -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()));
;