Skip to content

Commit

Permalink
Fix index in ItemHandlerCopySlot#setStackCopy (#1805)
Browse files Browse the repository at this point in the history
  • Loading branch information
Matyrobbrt authored Dec 28, 2024
1 parent e95053c commit 71a734b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ protected ItemStack getStackCopy() {

@Override
protected void setStackCopy(ItemStack stack) {
((IItemHandlerModifiable) slotItemHandler.getItemHandler()).setStackInSlot(index, stack);
((IItemHandlerModifiable) slotItemHandler.getItemHandler()).setStackInSlot(slotItemHandler.index, stack);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
"minecraft:blocks/copper_block": {
"duration": 100,
"id": "minecraft:nausea",
"neoforge:cures": [
"protected_by_totem",
"milk"
],
"show_icon": true
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,10 @@ static void reloadableRegDataMaps(final DynamicTest test, final RegistrationHelp
reg.addProvider(event -> new DataMapProvider(event.getGenerator().getPackOutput(), event.getLookupProvider()) {
@Override
protected void gather() {
var effect = new MobEffectInstance(MobEffects.CONFUSION, 100);
effect.getCures().clear(); // Cures use a hash set (not linked) meaning that their serialization is not deterministic
builder(effectGrant)
.add(Blocks.COPPER_BLOCK.getLootTable(), new MobEffectInstance(MobEffects.CONFUSION, 100), false);
.add(Blocks.COPPER_BLOCK.getLootTable(), effect, false);
}
});

Expand Down

0 comments on commit 71a734b

Please sign in to comment.