diff --git a/src/main/java/ru/bclib/blocks/BaseButtonBlock.java b/src/main/java/ru/bclib/blocks/BaseButtonBlock.java index 8e20a66b..520123e9 100644 --- a/src/main/java/ru/bclib/blocks/BaseButtonBlock.java +++ b/src/main/java/ru/bclib/blocks/BaseButtonBlock.java @@ -1,7 +1,5 @@ package ru.bclib.blocks; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; import net.minecraft.client.renderer.block.model.BlockModel; import net.minecraft.client.resources.model.BlockModelRotation; import net.minecraft.client.resources.model.UnbakedModel; @@ -11,7 +9,10 @@ import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.ButtonBlock; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.AttachFace; -import org.jetbrains.annotations.Nullable; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; + import ru.bclib.client.models.BasePatterns; import ru.bclib.client.models.ModelsHelper; import ru.bclib.client.models.PatternsHelper; @@ -20,15 +21,16 @@ import ru.bclib.interfaces.LootProvider; import java.util.Map; import java.util.Optional; +import org.jetbrains.annotations.Nullable; public abstract class BaseButtonBlock extends ButtonBlock implements BlockModelProvider, LootProvider { private final Block parent; - + protected BaseButtonBlock(Block parent, Properties properties, boolean sensitive) { - super(sensitive, properties); + super(sensitive, properties.noCollission()); this.parent = parent; } - + @Override @Environment(EnvType.CLIENT) public BlockModel getItemModel(ResourceLocation blockId) { @@ -36,21 +38,25 @@ public abstract class BaseButtonBlock extends ButtonBlock implements BlockModelP Optional pattern = PatternsHelper.createJson(BasePatterns.ITEM_BUTTON, parentId); return ModelsHelper.fromPattern(pattern); } - + @Override @Environment(EnvType.CLIENT) public @Nullable BlockModel getBlockModel(ResourceLocation resourceLocation, BlockState blockState) { ResourceLocation parentId = Registry.BLOCK.getKey(parent); - Optional pattern = blockState.getValue(POWERED) ? PatternsHelper.createJson( - BasePatterns.BLOCK_BUTTON_PRESSED, - parentId - ) : PatternsHelper.createJson(BasePatterns.BLOCK_BUTTON, parentId); + Optional pattern = blockState.getValue(POWERED) + ? PatternsHelper.createJson( + BasePatterns.BLOCK_BUTTON_PRESSED, + parentId + ) + : PatternsHelper.createJson(BasePatterns.BLOCK_BUTTON, parentId); return ModelsHelper.fromPattern(pattern); } - + @Override @Environment(EnvType.CLIENT) - public UnbakedModel getModelVariant(ResourceLocation stateId, BlockState blockState, Map modelCache) { + public UnbakedModel getModelVariant(ResourceLocation stateId, + BlockState blockState, + Map modelCache) { String powered = blockState.getValue(POWERED) ? "_powered" : ""; ResourceLocation modelId = new ResourceLocation(stateId.getNamespace(), "block/" + stateId.getPath() + powered); registerBlockModel(stateId, modelId, blockState, modelCache); diff --git a/src/main/resources/assets/bclib/lang/en_us.json b/src/main/resources/assets/bclib/lang/en_us.json index 977e7f06..dacbab53 100644 --- a/src/main/resources/assets/bclib/lang/en_us.json +++ b/src/main/resources/assets/bclib/lang/en_us.json @@ -38,7 +38,7 @@ "title.bclib.syncfiles.modlist": "Mod Information", "message.bclib.syncfiles.modlist": "The following shows the state of your installed installed Mods.\n\nAll Mods that do not exist locally, or have a different version on the Server will be synchronized.", "title.bclib.modmissmatch": "Mod Version Conflict", - "message.bclib.modmissmatch": "Some Mods on this client do not match the version of Mods on the Server.\n\nMismatching Mods can result in odd game behavior or crashes. Please make sue that you use the same mods as the server.", + "message.bclib.modmissmatch": "Some Mods on this client do not match the version of Mods on the Server.\n\nMismatching Mods can result in odd game behavior or crashes. Please make sure that you use the same mods as the server.", "message.bclib.datafixer.progress.waitbackup": "Waiting for Backup to finish. This may take a while!", "message.bclib.datafixer.progress.reading": "Reading Data", @@ -57,4 +57,4 @@ "title.config.bclib.client.rendering.netherThickFog": "Nether Thick Fog", "tooltip.bclib.place_on": "Survives on: %s" -} \ No newline at end of file +}