Skip to content

Commit 1cf02f1

Browse files
committed
fix: πŸ› Fixed barrel placement crashing clients
1 parent b456741 commit 1cf02f1

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

β€Žgradle.propertiesβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ loader_version_range=[4,)
1515
mod_id=sophisticatedstorage
1616
mod_name=Sophisticated Storage
1717
mod_license=All Rights Reserved
18-
mod_version=1.5.84
18+
mod_version=1.5.85
1919
mod_group_id=net.p3pp3rf1y
2020
mod_authors=P3pp3rF1y, Ridanisaurus
2121
mod_description=Fancy and functional storage containers.

β€Žsrc/main/java/net/p3pp3rf1y/sophisticatedstorage/block/BarrelBlock.javaβ€Ž

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,9 @@ protected InteractionResult useWithoutItem(BlockState state, Level level, BlockP
138138
public void setPlacedBy(Level level, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack stack) {
139139
super.setPlacedBy(level, pos, state, placer, stack);
140140
WorldHelper.getBlockEntity(level, pos, BarrelBlockEntity.class).ifPresent(barrel -> {
141-
Map<BarrelMaterial, ResourceLocation> materials = BarrelBlockItem.getMaterials(stack);
142-
barrel.setMaterials(new EnumMap<>(materials));
141+
Map<BarrelMaterial, ResourceLocation> materials = new EnumMap<>(BarrelMaterial.class);
142+
materials.putAll(BarrelBlockItem.getMaterials(stack));
143+
barrel.setMaterials(materials);
143144
});
144145
}
145146

0 commit comments

Comments
Β (0)