1.14: Updated to Forge 105. Experimental features added. Factory Dropper continuous mode added.

This commit is contained in:
stfwi 2019-09-11 19:47:58 +02:00
parent 462e14166c
commit bc76fed9d6
12 changed files with 23 additions and 12 deletions

View file

@ -22,6 +22,9 @@ import net.minecraft.state.StateContainer;
import net.minecraft.tileentity.TileEntityType;
import net.minecraft.util.math.*;
import net.minecraft.util.text.StringTextComponent;
import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.util.math.shapes.VoxelShapes;
import net.minecraft.world.IBlockReader;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
@ -64,6 +67,10 @@ public class BlockDecorDropper extends BlockDecorDirected
public BlockRenderLayer getRenderLayer()
{ return BlockRenderLayer.SOLID; }
@Override
public VoxelShape getCollisionShape(BlockState state, IBlockReader world, BlockPos pos, ISelectionContext selectionContext)
{ return VoxelShapes.fullCube(); }
@Override
protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder)
{ builder.add(FACING, OPEN); }
@ -513,7 +520,7 @@ public class BlockDecorDropper extends BlockDecorDirected
boolean dirty = block_power_updated_;
boolean redstone_trigger = (block_power_signal_ && ((block_power_updated_) || (continuous_mode)));
boolean filter_trigger;
boolean filter_defined = false;
boolean filter_defined;
boolean trigger;
// Trigger logic
{
@ -891,7 +898,7 @@ public class BlockDecorDropper extends BlockDecorDirected
{
int filter_gate_offset = ((container.field(5) & BTileEntity.DROPLOGIC_FILTER_ANDGATE) != 0) ? 11 : 0;
int extern_gate_offset = ((container.field(5) & BTileEntity.DROPLOGIC_EXTERN_ANDGATE) != 0) ? 11 : 0;
int pulse_mode_offset = ((container.fields_[5] & BTileEntity.DROPLOGIC_CONTINUOUS ) != 0) ? 10 : 0;
int pulse_mode_offset = ((container.field(5) & BTileEntity.DROPLOGIC_CONTINUOUS ) != 0) ? 10 : 0;
blit(x0+132, y0+66, 179+filter_gate_offset, 66, 9, 9);
blit(x0+148, y0+66, 179+extern_gate_offset, 66, 9, 9);
blit(x0+162, y0+66, 200+pulse_mode_offset, 66, 9, 9);