Fix FabricBlockSettings not copying the toolRequired boolean (#984)

This commit is contained in:
Shnupbups 2020-08-08 04:47:09 +10:00 committed by GitHub
parent f8ee145623
commit 23a4a963ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View file

@ -66,6 +66,7 @@ public class FabricBlockSettings extends AbstractBlock.Settings {
thisAccessor.setDynamicBounds(otherAccessor.getDynamicBounds()); thisAccessor.setDynamicBounds(otherAccessor.getDynamicBounds());
thisAccessor.setOpaque(otherAccessor.getOpaque()); thisAccessor.setOpaque(otherAccessor.getOpaque());
thisAccessor.setIsAir(otherAccessor.getIsAir()); thisAccessor.setIsAir(otherAccessor.getIsAir());
thisAccessor.setToolRequired(otherAccessor.isToolRequired());
// Now attempt to copy fabric specific data // Now attempt to copy fabric specific data
BlockSettingsInternals otherInternals = (BlockSettingsInternals) settings; BlockSettingsInternals otherInternals = (BlockSettingsInternals) settings;

View file

@ -73,6 +73,9 @@ public interface AbstractBlockSettingsAccessor {
@Accessor @Accessor
boolean getIsAir(); boolean getIsAir();
@Accessor
boolean isToolRequired();
/* SETTERS */ /* SETTERS */
@Accessor @Accessor
void setMaterial(Material material); void setMaterial(Material material);
@ -103,8 +106,11 @@ public interface AbstractBlockSettingsAccessor {
@Accessor @Accessor
void setLootTableId(Identifier lootTableId); void setLootTableId(Identifier lootTableId);
/* INVOKERS */
@Accessor
void setToolRequired(boolean toolRequired);
/* INVOKERS */
@Invoker @Invoker
Block.Settings invokeSounds(BlockSoundGroup group); Block.Settings invokeSounds(BlockSoundGroup group);