Skip to content

Commit ec3092c

Browse files
committed
Update to MC 1.19.4
1 parent 2a5399d commit ec3092c

5 files changed

Lines changed: 20 additions & 20 deletions

File tree

gradle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
mod_version=0.2.5
2-
minecraft_version=1.19.3
3-
forge_version=44.1.0
4-
cyclopscore_version=1.17.3-264
2+
minecraft_version=1.19.4
3+
forge_version=45.0.20
4+
cyclopscore_version=1.18.2-309
55
release_type=release
66
fingerprint=bd0353b3e8a2810d60dd584e256e364bc3bedd44
77

src/main/java/org/cyclops/structuredcrafting/craft/WorldCraftingMatrix.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ protected Recipe getRecipe(Level level) {
197197
public ItemStack getOutput(Level level) {
198198
Recipe recipe = getRecipe(level);
199199
if (recipe != null) {
200-
return recipe.assemble(inventoryCrafting);
200+
return recipe.assemble(inventoryCrafting, level.registryAccess());
201201
}
202202
return ItemStack.EMPTY;
203203
}

src/main/java/org/cyclops/structuredcrafting/craft/provider/InventoryItemStackProvider.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
package org.cyclops.structuredcrafting.craft.provider;
22

3+
import net.minecraft.core.BlockPos;
4+
import net.minecraft.core.Direction;
35
import net.minecraft.world.Container;
46
import net.minecraft.world.item.ItemStack;
5-
import net.minecraft.core.Direction;
6-
import net.minecraft.core.BlockPos;
77
import net.minecraft.world.level.Level;
8-
import net.minecraftforge.items.CapabilityItemHandler;
8+
import net.minecraftforge.common.capabilities.ForgeCapabilities;
99
import net.minecraftforge.items.IItemHandler;
1010
import org.apache.commons.lang3.tuple.Pair;
11-
import org.cyclops.cyclopscore.helper.InventoryHelpers;
1211
import org.cyclops.cyclopscore.helper.BlockEntityHelpers;
12+
import org.cyclops.cyclopscore.helper.InventoryHelpers;
1313
import org.cyclops.structuredcrafting.block.BlockStructuredCrafterConfig;
1414

1515
/**
@@ -50,21 +50,21 @@ public boolean canHandleOutput() {
5050

5151
@Override
5252
public boolean isValidForResults(Level world, BlockPos pos, Direction side) {
53-
IItemHandler itemHandler = BlockEntityHelpers.getCapability(world, pos, side, CapabilityItemHandler.ITEM_HANDLER_CAPABILITY).orElse(null);
53+
IItemHandler itemHandler = BlockEntityHelpers.getCapability(world, pos, side, ForgeCapabilities.ITEM_HANDLER).orElse(null);
5454
Container inventory = BlockEntityHelpers.get(world, pos, Container.class).orElse(null);
5555
return itemHandler != null || inventory != null;
5656
}
5757

5858
@Override
5959
public boolean hasItemStack(Level world, BlockPos pos, Direction side) {
6060
Container inventory = BlockEntityHelpers.get(world, pos, Container.class).orElse(null);
61-
IItemHandler itemHandler = BlockEntityHelpers.getCapability(world, pos, side, CapabilityItemHandler.ITEM_HANDLER_CAPABILITY).orElse(null);
61+
IItemHandler itemHandler = BlockEntityHelpers.getCapability(world, pos, side, ForgeCapabilities.ITEM_HANDLER).orElse(null);
6262
return itemHandler != null || inventory != null;
6363
}
6464

6565
@Override
6666
public ItemStack getItemStack(Level world, BlockPos pos, Direction side) {
67-
IItemHandler itemHandler = BlockEntityHelpers.getCapability(world, pos, side, CapabilityItemHandler.ITEM_HANDLER_CAPABILITY).orElse(null);
67+
IItemHandler itemHandler = BlockEntityHelpers.getCapability(world, pos, side, ForgeCapabilities.ITEM_HANDLER).orElse(null);
6868
Container inventory = BlockEntityHelpers.get(world, pos, Container.class).orElse(null);
6969
Pair<Integer, ItemStack> result = itemHandler != null ? getFirstItem(itemHandler, side) : getFirstItem(inventory, side);
7070
if (result != null) {
@@ -75,7 +75,7 @@ public ItemStack getItemStack(Level world, BlockPos pos, Direction side) {
7575

7676
@Override
7777
public void reduceItemStack(Level world, BlockPos pos, Direction side, boolean simulate) {
78-
IItemHandler itemHandler = BlockEntityHelpers.getCapability(world, pos, side, CapabilityItemHandler.ITEM_HANDLER_CAPABILITY).orElse(null);
78+
IItemHandler itemHandler = BlockEntityHelpers.getCapability(world, pos, side, ForgeCapabilities.ITEM_HANDLER).orElse(null);
7979
if(itemHandler != null) {
8080
for(int slot = 0; slot < itemHandler.getSlots(); slot++) {
8181
if(!itemHandler.extractItem(slot, 1, simulate).isEmpty()) {
@@ -98,7 +98,7 @@ public void reduceItemStack(Level world, BlockPos pos, Direction side, boolean s
9898

9999
@Override
100100
public boolean addItemStack(Level world, BlockPos pos, Direction side, ItemStack itemStack, boolean simulate) {
101-
IItemHandler itemHandler = BlockEntityHelpers.getCapability(world, pos, side, CapabilityItemHandler.ITEM_HANDLER_CAPABILITY).orElse(null);
101+
IItemHandler itemHandler = BlockEntityHelpers.getCapability(world, pos, side, ForgeCapabilities.ITEM_HANDLER).orElse(null);
102102
if(itemHandler != null) {
103103
for(int slot = 0; slot < itemHandler.getSlots(); slot++) {
104104
if(itemHandler.insertItem(slot, itemStack, simulate).isEmpty()) {
@@ -118,7 +118,7 @@ public boolean addItemStack(Level world, BlockPos pos, Direction side, ItemStack
118118

119119
@Override
120120
public boolean setItemStack(Level world, BlockPos pos, Direction side, ItemStack itemStack, boolean simulate) {
121-
IItemHandler itemHandler = BlockEntityHelpers.getCapability(world, pos, side, CapabilityItemHandler.ITEM_HANDLER_CAPABILITY).orElse(null);
121+
IItemHandler itemHandler = BlockEntityHelpers.getCapability(world, pos, side, ForgeCapabilities.ITEM_HANDLER).orElse(null);
122122
if(itemHandler != null) {
123123
for(int slot = 0; slot < itemHandler.getSlots(); slot++) {
124124
if(itemHandler.insertItem(slot, itemStack, simulate).isEmpty()) {

src/main/java/org/cyclops/structuredcrafting/craft/provider/WorldItemStackProvider.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
import net.minecraft.world.level.block.state.BlockState;
1111
import net.minecraft.world.phys.BlockHitResult;
1212
import net.minecraft.world.phys.Vec3;
13+
import net.minecraftforge.common.capabilities.ForgeCapabilities;
1314
import net.minecraftforge.common.util.FakePlayer;
14-
import net.minecraftforge.items.CapabilityItemHandler;
1515
import net.minecraftforge.items.IItemHandler;
1616
import org.cyclops.cyclopscore.helper.BlockEntityHelpers;
1717
import org.cyclops.cyclopscore.helper.ItemStackHelpers;
@@ -55,7 +55,7 @@ public boolean isValidForResults(Level world, BlockPos pos, Direction side) {
5555
}
5656

5757
protected boolean hasEmptyItemHandler(Level world, BlockPos pos, Direction side) {
58-
IItemHandler itemHandler = BlockEntityHelpers.getCapability(world, pos, side, CapabilityItemHandler.ITEM_HANDLER_CAPABILITY).orElse(null);
58+
IItemHandler itemHandler = BlockEntityHelpers.getCapability(world, pos, side, ForgeCapabilities.ITEM_HANDLER).orElse(null);
5959
boolean emptyItemHandler = true;
6060
if (itemHandler != null) {
6161
for (int i = 0; i < itemHandler.getSlots(); i++) {

src/main/resources/META-INF/mods.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
modLoader="javafml"
2-
loaderVersion="[44,)"
2+
loaderVersion="[45,)"
33
issueTrackerURL="https://github.com/CyclopsMC/StructuredCrafting/issues"
44
displayURL="https://www.curseforge.com/minecraft/mc-mods/structured-crafting"
55
license="MIT"
@@ -16,18 +16,18 @@ Craft stuff in your world, automatically.
1616
[[dependencies.structuredcrafting]]
1717
modId="cyclopscore"
1818
mandatory=true
19-
versionRange="[1.17.3,)"
19+
versionRange="[1.18.2,)"
2020
ordering="NONE"
2121
side="BOTH"
2222
[[dependencies.structuredcrafting]]
2323
modId="forge"
2424
mandatory=true
25-
versionRange="[44.1.0,)"
25+
versionRange="[45.0.20,)"
2626
ordering="NONE"
2727
side="BOTH"
2828
[[dependencies.structuredcrafting]]
2929
modId="minecraft"
3030
mandatory=true
31-
versionRange="[1.19.3,]"
31+
versionRange="[1.19.4,]"
3232
ordering="NONE"
3333
side="BOTH"

0 commit comments

Comments
 (0)