Skip to content

Commit b6f230e

Browse files
committed
fix: πŸ› Fixed barrel placement crashing clients
1 parent 1499c07 commit b6f230e

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.100
18+
mod_version=1.5.101
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
@@ -141,8 +141,9 @@ protected InteractionResult useWithoutItem(BlockState state, Level level, BlockP
141141
public void setPlacedBy(Level level, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack stack) {
142142
super.setPlacedBy(level, pos, state, placer, stack);
143143
WorldHelper.getBlockEntity(level, pos, BarrelBlockEntity.class).ifPresent(barrel -> {
144-
Map<BarrelMaterial, ResourceLocation> materials = BarrelBlockItem.getMaterials(stack);
145-
barrel.setMaterials(new EnumMap<>(materials));
144+
Map<BarrelMaterial, ResourceLocation> materials = new EnumMap<>(BarrelMaterial.class);
145+
materials.putAll(BarrelBlockItem.getMaterials(stack));
146+
barrel.setMaterials(materials);
146147
});
147148
}
148149

0 commit comments

Comments
Β (0)