From f52a1c785d4cb3b6ea210d752b391d7b1d28be8f Mon Sep 17 00:00:00 2001 From: Meredith Espinosa Date: Wed, 9 Jan 2019 14:23:20 -0800 Subject: [PATCH] bump to 19w02a --- build.gradle | 10 +++---- .../Container/OscillatorContainer.java | 9 ++++++- .../Container/OscillatorContainerGui.java | 7 ++--- .../infraredstone/InfraRedstone.java | 7 ++--- .../infraredstone/InfraRedstoneClient.java | 4 +-- .../infraredstone/block/AndGateBlock.java | 22 +-------------- .../infraredstone/block/DiodeBlock.java | 23 ---------------- .../infraredstone/block/EncoderBlock.java | 25 ----------------- .../block/InfraRedstoneCable.java | 5 +--- .../block/InfraRedstoneScaffold.java | 4 +-- .../infraredstone/block/ModuleBase.java | 22 +++++++++++++++ .../infraredstone/block/NotGateBlock.java | 23 ---------------- .../infraredstone/block/OscillatorBlock.java | 27 ------------------- .../infraredstone/block/ShifterBlock.java | 24 ----------------- .../infraredstone/block/TransistorBlock.java | 24 ----------------- .../infraredstone/block/XorGateBlock.java | 25 ----------------- .../util/InfraRedstoneNetworking.java | 4 +-- .../assets/infraredstone/lang/en_us.json | 2 +- 18 files changed, 51 insertions(+), 216 deletions(-) diff --git a/build.gradle b/build.gradle index 4e493ed..7cf50a0 100755 --- a/build.gradle +++ b/build.gradle @@ -32,7 +32,7 @@ archivesBaseName = "infraredstone" ext { - standardVersion = "18w50a-1.0.1" + standardVersion = "19w02a-1.0.1" } repositories { @@ -43,10 +43,10 @@ repositories { } dependencies { - minecraft "com.mojang:minecraft:18w50a" - mappings "net.fabricmc:yarn:18w50a.71" - modCompile "net.fabricmc:fabric-loader:0.3.0.75" - modCompile "net.fabricmc:fabric:0.1.2.64" + minecraft "com.mojang:minecraft:19w02a" + mappings "net.fabricmc:yarn:19w02a.12" + modCompile "net.fabricmc:fabric-loader:0.3.2.92" + modCompile "net.fabricmc:fabric:0.1.4.71" implementation 'org.jetbrains:annotations:15.0' modCompile "io.github.prospector.silk:SilkAPI:1.0.0-26" modCompile name: "qcommon-architect-1.0.0" diff --git a/src/main/java/com/elytradev/infraredstone/Container/OscillatorContainer.java b/src/main/java/com/elytradev/infraredstone/Container/OscillatorContainer.java index 181f1e8..acbf2c4 100644 --- a/src/main/java/com/elytradev/infraredstone/Container/OscillatorContainer.java +++ b/src/main/java/com/elytradev/infraredstone/Container/OscillatorContainer.java @@ -1,6 +1,7 @@ package com.elytradev.infraredstone.Container; import com.elytradev.infraredstone.block.entity.OscillatorBlockEntity; +import net.minecraft.class_3917; import net.minecraft.container.Container; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.util.math.BlockPos; @@ -10,11 +11,17 @@ public class OscillatorContainer extends Container { BlockPos pos; OscillatorBlockEntity be; - public OscillatorContainer(BlockPos pos, PlayerEntity player) { + public OscillatorContainer(int id, BlockPos pos, PlayerEntity player) { + super(id); this.pos = pos; this.be = (OscillatorBlockEntity)player.getEntityWorld().getBlockEntity(pos); } + @Override + public class_3917 method_17358() { + return null; + } + @Override public boolean canUse(PlayerEntity player) { return true; diff --git a/src/main/java/com/elytradev/infraredstone/Container/OscillatorContainerGui.java b/src/main/java/com/elytradev/infraredstone/Container/OscillatorContainerGui.java index ce5fdcc..02c02d2 100644 --- a/src/main/java/com/elytradev/infraredstone/Container/OscillatorContainerGui.java +++ b/src/main/java/com/elytradev/infraredstone/Container/OscillatorContainerGui.java @@ -6,8 +6,10 @@ import com.mojang.blaze3d.platform.GlStateManager; import net.minecraft.client.gui.ContainerGui; import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.player.PlayerInventory; import net.minecraft.nbt.CompoundTag; import net.minecraft.text.TextFormat; +import net.minecraft.text.TranslatableTextComponent; import net.minecraft.util.Identifier; import net.minecraft.util.math.BlockPos; @@ -15,12 +17,11 @@ public class OscillatorContainerGui extends ContainerGui { private static final Identifier TEXTURE = new Identifier("infraredstone:textures/gui/gui_oscillator.png"); - BlockPos pos; OscillatorBlockEntity be; - public OscillatorContainerGui(BlockPos pos, PlayerEntity player) { - super(new OscillatorContainer(pos, player)); + public OscillatorContainerGui(int id, BlockPos pos, PlayerEntity player) { + super(new OscillatorContainer(id, pos, player), player.inventory, new TranslatableTextComponent("container.infraredstone.oscillator")); this.pos = pos; this.be = (OscillatorBlockEntity)player.getEntityWorld().getBlockEntity(pos); be.fromTag(player.getEntityWorld().getBlockEntity(pos).toTag(new CompoundTag())); diff --git a/src/main/java/com/elytradev/infraredstone/InfraRedstone.java b/src/main/java/com/elytradev/infraredstone/InfraRedstone.java index 660fe43..76a269e 100755 --- a/src/main/java/com/elytradev/infraredstone/InfraRedstone.java +++ b/src/main/java/com/elytradev/infraredstone/InfraRedstone.java @@ -9,6 +9,8 @@ import net.fabricmc.fabric.api.client.itemgroup.FabricItemGroupBuilder; import net.fabricmc.fabric.api.container.ContainerProviderRegistry; import net.fabricmc.fabric.events.TickEvent; +import net.fabricmc.fabric.impl.container.ContainerProviderImpl; +import net.minecraft.container.ContainerProvider; import net.minecraft.item.*; import net.minecraft.util.Identifier; import net.minecraft.util.math.BlockPos; @@ -20,16 +22,15 @@ public class InfraRedstone implements ModInitializer { public static final Identifier OSCILLATOR_CONTAINER = new Identifier("infraredstone:oscillator_container"); - @Override public void onInitialize() { ModBlocks.init(); ModItems.init(); TickEvent.SERVER.register(InRedLogic.onServerTick); //Registers a container factory that opens our example Container, this reads the block pos from the buffer - ContainerProviderRegistry.INSTANCE.registerFactory(OSCILLATOR_CONTAINER, (identifier, player, buf) -> { + ContainerProviderRegistry.INSTANCE.registerFactory(OSCILLATOR_CONTAINER, (syncId, suidentifier, player, buf) -> { BlockPos pos = buf.readBlockPos(); - return new OscillatorContainer(pos, player); + return new OscillatorContainer(syncId, pos, player); }); } } diff --git a/src/main/java/com/elytradev/infraredstone/InfraRedstoneClient.java b/src/main/java/com/elytradev/infraredstone/InfraRedstoneClient.java index c17837e..4aaebdf 100644 --- a/src/main/java/com/elytradev/infraredstone/InfraRedstoneClient.java +++ b/src/main/java/com/elytradev/infraredstone/InfraRedstoneClient.java @@ -25,9 +25,9 @@ public void onInitializeClient() { BlockEntityRendererRegistry.INSTANCE.register(ShifterBlockEntity.class, new ShifterRenderer()); BlockEntityRendererRegistry.INSTANCE.register(EncoderBlockEntity.class, new EncoderRenderer()); - GuiProviderRegistry.INSTANCE.registerFactory(InfraRedstone.OSCILLATOR_CONTAINER, (identifier, player, buf) -> { + GuiProviderRegistry.INSTANCE.registerFactory(InfraRedstone.OSCILLATOR_CONTAINER, (syncId, identifier, player, buf) -> { BlockPos pos = buf.readBlockPos(); - return new OscillatorContainerGui(pos, player); + return new OscillatorContainerGui(syncId, pos, player); }); } diff --git a/src/main/java/com/elytradev/infraredstone/block/AndGateBlock.java b/src/main/java/com/elytradev/infraredstone/block/AndGateBlock.java index ebb6b4c..6497994 100644 --- a/src/main/java/com/elytradev/infraredstone/block/AndGateBlock.java +++ b/src/main/java/com/elytradev/infraredstone/block/AndGateBlock.java @@ -3,9 +3,9 @@ import com.elytradev.infraredstone.block.entity.AndGateBlockEntity; import com.elytradev.infraredstone.util.enums.InactiveSelection; import net.minecraft.block.Block; +import net.minecraft.block.BlockRenderLayer; import net.minecraft.block.BlockState; import net.minecraft.block.entity.BlockEntity; -import net.minecraft.client.render.block.BlockRenderLayer; import net.minecraft.entity.VerticalEntityPosition; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemPlacementContext; @@ -82,26 +82,6 @@ public boolean activate(BlockState state, World world, BlockPos pos, PlayerEntit return true; } - @Override - public boolean isSimpleFullBlock(BlockState blockState, BlockView blockView, BlockPos blockPos) { - return false; - } - - @Override - public BlockRenderLayer getRenderLayer() { - return BlockRenderLayer.SOLID; - } - - @Override - public VoxelShape getCollisionShape(BlockState blockState, BlockView blockView, BlockPos blockPos, VerticalEntityPosition verticalEntityPosition) { - return VoxelShapes.empty(); - } - - @Override - public VoxelShape getBoundingShape(BlockState state, BlockView view, BlockPos pos) { - return BASE_SHAPE; - } - @Override protected void appendProperties(StateFactory.Builder builder) { builder.with(FACING, BOOLEAN_MODE, INACTIVE); diff --git a/src/main/java/com/elytradev/infraredstone/block/DiodeBlock.java b/src/main/java/com/elytradev/infraredstone/block/DiodeBlock.java index c0517bc..18d6b5c 100644 --- a/src/main/java/com/elytradev/infraredstone/block/DiodeBlock.java +++ b/src/main/java/com/elytradev/infraredstone/block/DiodeBlock.java @@ -1,12 +1,9 @@ package com.elytradev.infraredstone.block; import com.elytradev.infraredstone.block.entity.DiodeBlockEntity; -import net.fabricmc.fabric.block.FabricBlockSettings; import net.minecraft.block.Block; import net.minecraft.block.BlockState; -import net.minecraft.block.Material; import net.minecraft.block.entity.BlockEntity; -import net.minecraft.client.render.block.BlockRenderLayer; import net.minecraft.entity.VerticalEntityPosition; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemPlacementContext; @@ -102,26 +99,6 @@ public boolean activate(BlockState state, World world, BlockPos pos, PlayerEntit return true; } - @Override - public boolean isSimpleFullBlock(BlockState blockState, BlockView blockView, BlockPos blockPos) { - return false; - } - - @Override - public BlockRenderLayer getRenderLayer() { - return BlockRenderLayer.SOLID; - } - - @Override - public VoxelShape getCollisionShape(BlockState blockState, BlockView blockView, BlockPos blockPos, VerticalEntityPosition verticalEntityPosition) { - return VoxelShapes.empty(); - } - - @Override - public VoxelShape getBoundingShape(BlockState state, BlockView view, BlockPos pos) { - return BASE_SHAPE; - } - @Override protected void appendProperties(StateFactory.Builder builder) { builder.with(FACING, BIT_0, BIT_1, BIT_2, BIT_3, BIT_4, BIT_5); diff --git a/src/main/java/com/elytradev/infraredstone/block/EncoderBlock.java b/src/main/java/com/elytradev/infraredstone/block/EncoderBlock.java index 5863d9e..e835c17 100644 --- a/src/main/java/com/elytradev/infraredstone/block/EncoderBlock.java +++ b/src/main/java/com/elytradev/infraredstone/block/EncoderBlock.java @@ -1,20 +1,15 @@ package com.elytradev.infraredstone.block; import com.elytradev.infraredstone.block.entity.EncoderBlockEntity; -import net.fabricmc.fabric.block.FabricBlockSettings; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.entity.BlockEntity; -import net.minecraft.client.render.block.BlockRenderLayer; -import net.minecraft.entity.VerticalEntityPosition; import net.minecraft.item.ItemPlacementContext; import net.minecraft.state.StateFactory; import net.minecraft.state.property.EnumProperty; import net.minecraft.state.property.Properties; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Direction; -import net.minecraft.util.shape.VoxelShape; -import net.minecraft.util.shape.VoxelShapes; import net.minecraft.world.BlockView; import net.minecraft.world.World; @@ -32,26 +27,6 @@ public BlockEntity createBlockEntity(BlockView blockView) { return new EncoderBlockEntity(); } - @Override - public boolean isSimpleFullBlock(BlockState blockState, BlockView blockView, BlockPos blockPos) { - return false; - } - - @Override - public BlockRenderLayer getRenderLayer() { - return BlockRenderLayer.SOLID; - } - - @Override - public VoxelShape getCollisionShape(BlockState blockState, BlockView blockView, BlockPos blockPos, VerticalEntityPosition verticalEntityPosition) { - return VoxelShapes.empty(); - } - - @Override - public VoxelShape getBoundingShape(BlockState state, BlockView view, BlockPos pos) { - return BASE_SHAPE; - } - @Override protected void appendProperties(StateFactory.Builder builder) { builder.with(FACING); diff --git a/src/main/java/com/elytradev/infraredstone/block/InfraRedstoneCable.java b/src/main/java/com/elytradev/infraredstone/block/InfraRedstoneCable.java index 42fd672..e029890 100644 --- a/src/main/java/com/elytradev/infraredstone/block/InfraRedstoneCable.java +++ b/src/main/java/com/elytradev/infraredstone/block/InfraRedstoneCable.java @@ -1,15 +1,12 @@ package com.elytradev.infraredstone.block; -import com.elytradev.infraredstone.api.SimpleInfraRedstoneSignal; -import com.elytradev.infraredstone.api.InfraRedstoneCapable; import com.elytradev.infraredstone.logic.InRedLogic; import com.elytradev.infraredstone.util.enums.CableConnection; import net.fabricmc.fabric.block.FabricBlockSettings; import net.minecraft.block.Block; +import net.minecraft.block.BlockRenderLayer; import net.minecraft.block.BlockState; import net.minecraft.block.Material; -import net.minecraft.block.entity.BlockEntity; -import net.minecraft.client.render.block.BlockRenderLayer; import net.minecraft.entity.VerticalEntityPosition; import net.minecraft.item.ItemPlacementContext; import net.minecraft.state.StateFactory; diff --git a/src/main/java/com/elytradev/infraredstone/block/InfraRedstoneScaffold.java b/src/main/java/com/elytradev/infraredstone/block/InfraRedstoneScaffold.java index 55503bf..c7016d5 100644 --- a/src/main/java/com/elytradev/infraredstone/block/InfraRedstoneScaffold.java +++ b/src/main/java/com/elytradev/infraredstone/block/InfraRedstoneScaffold.java @@ -1,12 +1,10 @@ package com.elytradev.infraredstone.block; -import com.elytradev.infraredstone.api.InfraRedstoneCapable; -import com.elytradev.infraredstone.api.SimpleInfraRedstoneSignal; import net.fabricmc.fabric.block.FabricBlockSettings; import net.minecraft.block.Block; +import net.minecraft.block.BlockRenderLayer; import net.minecraft.block.BlockState; import net.minecraft.block.Material; -import net.minecraft.client.render.block.BlockRenderLayer; import net.minecraft.entity.Entity; import net.minecraft.entity.ItemEntity; import net.minecraft.entity.VerticalEntityPosition; diff --git a/src/main/java/com/elytradev/infraredstone/block/ModuleBase.java b/src/main/java/com/elytradev/infraredstone/block/ModuleBase.java index e1e9083..dcc641b 100644 --- a/src/main/java/com/elytradev/infraredstone/block/ModuleBase.java +++ b/src/main/java/com/elytradev/infraredstone/block/ModuleBase.java @@ -3,8 +3,10 @@ import net.fabricmc.fabric.block.FabricBlockSettings; import net.minecraft.block.*; import net.minecraft.block.entity.BlockEntity; +import net.minecraft.entity.VerticalEntityPosition; import net.minecraft.util.math.BlockPos; import net.minecraft.util.shape.VoxelShape; +import net.minecraft.util.shape.VoxelShapes; import net.minecraft.world.BlockView; import io.github.prospector.silk.block.SilkBlockWithEntity; import net.minecraft.world.ViewableWorld; @@ -51,4 +53,24 @@ public boolean canPlaceAt(BlockState state, ViewableWorld world, BlockPos pos) { || world.getBlockState(pos.down()).getBlock() == ModBlocks.IN_RED_SCAFFOLD || world.getBlockState(pos.down()).getBlock() == ModBlocks.IN_RED_BLOCK; } + + @Override + public BlockRenderLayer getRenderLayer() { + return BlockRenderLayer.SOLID; + } + + @Override + public boolean isSimpleFullBlock(BlockState blockState, BlockView blockView, BlockPos blockPos) { + return false; + } + + @Override + public VoxelShape getCollisionShape(BlockState blockState, BlockView blockView, BlockPos blockPos, VerticalEntityPosition verticalEntityPosition) { + return VoxelShapes.empty(); + } + + @Override + public VoxelShape getBoundingShape(BlockState state, BlockView view, BlockPos pos) { + return BASE_SHAPE; + } } diff --git a/src/main/java/com/elytradev/infraredstone/block/NotGateBlock.java b/src/main/java/com/elytradev/infraredstone/block/NotGateBlock.java index aa7fce8..d473adf 100644 --- a/src/main/java/com/elytradev/infraredstone/block/NotGateBlock.java +++ b/src/main/java/com/elytradev/infraredstone/block/NotGateBlock.java @@ -4,8 +4,6 @@ import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.entity.BlockEntity; -import net.minecraft.client.render.block.BlockRenderLayer; -import net.minecraft.entity.VerticalEntityPosition; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemPlacementContext; import net.minecraft.state.StateFactory; @@ -17,7 +15,6 @@ import net.minecraft.util.math.Direction; import net.minecraft.util.math.Vec3d; import net.minecraft.util.shape.VoxelShape; -import net.minecraft.util.shape.VoxelShapes; import net.minecraft.world.BlockView; import net.minecraft.world.World; @@ -67,26 +64,6 @@ public boolean activate(BlockState state, World world, BlockPos pos, PlayerEntit return true; } - @Override - public boolean isSimpleFullBlock(BlockState blockState, BlockView blockView, BlockPos blockPos) { - return false; - } - - @Override - public BlockRenderLayer getRenderLayer() { - return BlockRenderLayer.SOLID; - } - - @Override - public VoxelShape getCollisionShape(BlockState blockState, BlockView blockView, BlockPos blockPos, VerticalEntityPosition verticalEntityPosition) { - return VoxelShapes.empty(); - } - - @Override - public VoxelShape getBoundingShape(BlockState state, BlockView view, BlockPos pos) { - return BASE_SHAPE; - } - @Override protected void appendProperties(StateFactory.Builder builder) { builder.with(FACING, BOOLEAN_MODE); diff --git a/src/main/java/com/elytradev/infraredstone/block/OscillatorBlock.java b/src/main/java/com/elytradev/infraredstone/block/OscillatorBlock.java index 86089eb..dc34588 100644 --- a/src/main/java/com/elytradev/infraredstone/block/OscillatorBlock.java +++ b/src/main/java/com/elytradev/infraredstone/block/OscillatorBlock.java @@ -7,24 +7,17 @@ import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.entity.BlockEntity; -import net.minecraft.client.render.block.BlockRenderLayer; -import net.minecraft.entity.VerticalEntityPosition; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemPlacementContext; import net.minecraft.state.StateFactory; import net.minecraft.state.property.EnumProperty; import net.minecraft.state.property.Properties; import net.minecraft.util.Hand; -import net.minecraft.util.PacketByteBuf; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Direction; -import net.minecraft.util.shape.VoxelShape; -import net.minecraft.util.shape.VoxelShapes; import net.minecraft.world.BlockView; import net.minecraft.world.World; -import java.util.function.Consumer; - public class OscillatorBlock extends ModuleBase { public static final EnumProperty FACING = Properties.FACING_HORIZONTAL; @@ -48,26 +41,6 @@ public boolean activate(BlockState state, World world, BlockPos pos, PlayerEntit return true; } - @Override - public boolean isSimpleFullBlock(BlockState blockState, BlockView blockView, BlockPos blockPos) { - return false; - } - - @Override - public BlockRenderLayer getRenderLayer() { - return BlockRenderLayer.SOLID; - } - - @Override - public VoxelShape getCollisionShape(BlockState blockState, BlockView blockView, BlockPos blockPos, VerticalEntityPosition verticalEntityPosition) { - return VoxelShapes.empty(); - } - - @Override - public VoxelShape getBoundingShape(BlockState state, BlockView view, BlockPos pos) { - return BASE_SHAPE; - } - @Override protected void appendProperties(StateFactory.Builder builder) { builder.with(FACING); diff --git a/src/main/java/com/elytradev/infraredstone/block/ShifterBlock.java b/src/main/java/com/elytradev/infraredstone/block/ShifterBlock.java index 705dc42..956e06d 100644 --- a/src/main/java/com/elytradev/infraredstone/block/ShifterBlock.java +++ b/src/main/java/com/elytradev/infraredstone/block/ShifterBlock.java @@ -5,8 +5,6 @@ import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.entity.BlockEntity; -import net.minecraft.client.render.block.BlockRenderLayer; -import net.minecraft.entity.VerticalEntityPosition; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemPlacementContext; import net.minecraft.state.StateFactory; @@ -15,8 +13,6 @@ import net.minecraft.util.Hand; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Direction; -import net.minecraft.util.shape.VoxelShape; -import net.minecraft.util.shape.VoxelShapes; import net.minecraft.world.BlockView; import net.minecraft.world.World; @@ -44,26 +40,6 @@ public boolean activate(BlockState state, World world, BlockPos pos, PlayerEntit return true; } - @Override - public boolean isSimpleFullBlock(BlockState blockState, BlockView blockView, BlockPos blockPos) { - return false; - } - - @Override - public BlockRenderLayer getRenderLayer() { - return BlockRenderLayer.SOLID; - } - - @Override - public VoxelShape getCollisionShape(BlockState blockState, BlockView blockView, BlockPos blockPos, VerticalEntityPosition verticalEntityPosition) { - return VoxelShapes.empty(); - } - - @Override - public VoxelShape getBoundingShape(BlockState state, BlockView view, BlockPos pos) { - return BASE_SHAPE; - } - @Override protected void appendProperties(StateFactory.Builder builder) { builder.with(FACING, SELECTION); diff --git a/src/main/java/com/elytradev/infraredstone/block/TransistorBlock.java b/src/main/java/com/elytradev/infraredstone/block/TransistorBlock.java index c498dc6..35dc687 100644 --- a/src/main/java/com/elytradev/infraredstone/block/TransistorBlock.java +++ b/src/main/java/com/elytradev/infraredstone/block/TransistorBlock.java @@ -5,16 +5,12 @@ import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.entity.BlockEntity; -import net.minecraft.client.render.block.BlockRenderLayer; -import net.minecraft.entity.VerticalEntityPosition; import net.minecraft.item.ItemPlacementContext; import net.minecraft.state.StateFactory; import net.minecraft.state.property.EnumProperty; import net.minecraft.state.property.Properties; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Direction; -import net.minecraft.util.shape.VoxelShape; -import net.minecraft.util.shape.VoxelShapes; import net.minecraft.world.BlockView; import net.minecraft.world.World; @@ -32,26 +28,6 @@ public BlockEntity createBlockEntity(BlockView blockView) { return new TransistorBlockEntity(); } - @Override - public boolean isSimpleFullBlock(BlockState blockState, BlockView blockView, BlockPos blockPos) { - return false; - } - - @Override - public BlockRenderLayer getRenderLayer() { - return BlockRenderLayer.SOLID; - } - - @Override - public VoxelShape getCollisionShape(BlockState blockState, BlockView blockView, BlockPos blockPos, VerticalEntityPosition verticalEntityPosition) { - return VoxelShapes.empty(); - } - - @Override - public VoxelShape getBoundingShape(BlockState state, BlockView view, BlockPos pos) { - return BASE_SHAPE; - } - @Override protected void appendProperties(StateFactory.Builder builder) { builder.with(FACING); diff --git a/src/main/java/com/elytradev/infraredstone/block/XorGateBlock.java b/src/main/java/com/elytradev/infraredstone/block/XorGateBlock.java index 210de0f..e09dce6 100644 --- a/src/main/java/com/elytradev/infraredstone/block/XorGateBlock.java +++ b/src/main/java/com/elytradev/infraredstone/block/XorGateBlock.java @@ -4,8 +4,6 @@ import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.entity.BlockEntity; -import net.minecraft.client.render.block.BlockRenderLayer; -import net.minecraft.entity.VerticalEntityPosition; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemPlacementContext; import net.minecraft.state.StateFactory; @@ -16,10 +14,7 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Direction; import net.minecraft.util.math.Vec3d; -import net.minecraft.util.shape.VoxelShape; -import net.minecraft.util.shape.VoxelShapes; import net.minecraft.world.BlockView; -import net.minecraft.world.ViewableWorld; import net.minecraft.world.World; public class XorGateBlock extends ModuleBase { @@ -66,26 +61,6 @@ public boolean activate(BlockState state, World world, BlockPos pos, PlayerEntit return true; } - @Override - public boolean isSimpleFullBlock(BlockState blockState, BlockView blockView, BlockPos blockPos) { - return false; - } - - @Override - public BlockRenderLayer getRenderLayer() { - return BlockRenderLayer.SOLID; - } - - @Override - public VoxelShape getCollisionShape(BlockState blockState, BlockView blockView, BlockPos blockPos, VerticalEntityPosition verticalEntityPosition) { - return VoxelShapes.empty(); - } - - @Override - public VoxelShape getBoundingShape(BlockState state, BlockView view, BlockPos pos) { - return BASE_SHAPE; - } - @Override protected void appendProperties(StateFactory.Builder builder) { builder.with(FACING, BOOLEAN_MODE); diff --git a/src/main/java/com/elytradev/infraredstone/util/InfraRedstoneNetworking.java b/src/main/java/com/elytradev/infraredstone/util/InfraRedstoneNetworking.java index 0af993c..c4ccdbc 100644 --- a/src/main/java/com/elytradev/infraredstone/util/InfraRedstoneNetworking.java +++ b/src/main/java/com/elytradev/infraredstone/util/InfraRedstoneNetworking.java @@ -66,7 +66,7 @@ public void onInitialize() { })); } - @Environment(EnvType.SERVER) + @Environment(EnvType.CLIENT) public static void syncModule(IRComponentBlockEntity module, ServerPlayerEntity player) { PacketByteBuf buf = new PacketByteBuf(Unpooled.buffer()); buf.writeBlockPos(module.getPos()); @@ -79,7 +79,7 @@ public static void requestModule(IRComponentBlockEntity module) { buf.writeBlockPos(module.getPos()); MinecraftClient.getInstance().getNetworkHandler().getClientConnection().sendPacket(new CustomPayloadServerPacket(MODULE_REQUEST, buf)); } - @Environment(EnvType.SERVER) + @Environment(EnvType.CLIENT) public static void syncOscillator(OscillatorBlockEntity oscillator, ServerPlayerEntity player) { PacketByteBuf buf = new PacketByteBuf(Unpooled.buffer()); buf.writeBlockPos(oscillator.getPos()); diff --git a/src/main/resources/assets/infraredstone/lang/en_us.json b/src/main/resources/assets/infraredstone/lang/en_us.json index 2b7d8dc..ccd8e3e 100644 --- a/src/main/resources/assets/infraredstone/lang/en_us.json +++ b/src/main/resources/assets/infraredstone/lang/en_us.json @@ -17,5 +17,5 @@ "msg.inred.multimeter.cable": "Signal passing through cable", "msg.inred.multimeter.block": "Block emits value of 0b11_1111 (63)", "container.infraredstone.oscillator": "Oscillator", - "itemGroup.infraredstone:infra_redstone_tab": "Infra-Redstone" + "itemGroup.infraredstone.infra_redstone_tab": "Infra-Redstone" } \ No newline at end of file