diff --git a/build.gradle b/build.gradle index 68c966d2..1b33194b 100644 --- a/build.gradle +++ b/build.gradle @@ -142,7 +142,7 @@ dependencies { implementation project(path: ":catalyst:multiblocks",configuration: "namedElements") implementation project(path: ":catalyst:effects",configuration: "namedElements") - implementation project(path: ":retrostorage",configuration: "namedElements") + //implementation project(path: ":retrostorage",configuration: "namedElements") modImplementation "DragonFly:dragonfly:${project.dragonfly_version}" modImplementation "BTWaila:btwaila:${project.btwaila_version}" diff --git a/gradle.properties b/gradle.properties index 6b5c0b9a..24dd5f30 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,7 +7,7 @@ bta_version=7.1 loader_version=0.15.6-babric.4-bta # Mods -halplibe_version=3.5.2 +halplibe_version=3.5.3 modmenu_version=2.0.5 dragonfly_version=1.4.7-7.1 btwaila_version=1.0.9-7.1 diff --git a/src/main/java/sunsetsatellite/signalindustries/SignalIndustries.java b/src/main/java/sunsetsatellite/signalindustries/SignalIndustries.java index 666adf49..2e00a7c4 100644 --- a/src/main/java/sunsetsatellite/signalindustries/SignalIndustries.java +++ b/src/main/java/sunsetsatellite/signalindustries/SignalIndustries.java @@ -490,6 +490,21 @@ public class SignalIndustries implements ModInitializer, GameStartEntrypoint { ) .build(new BlockItemConduit("basic.conduit.item.restrict",config.getInt("BlockIDs.basicRestrictItemConduit"),Tier.BASIC,Material.glass, PipeType.RESTRICT)); + public static final Block basicSensorItemConduit = new BlockBuilder(MOD_ID) + .setTextures("item_conduit_basic_sensor_off.png") + .setLuminance(0) + .setResistance(1) + .setHardness(1) + .setBlockSound(BlockSounds.GLASS) + .setBlockModel( + new BlockModelDragonFly( + ModelHelper.getOrCreateBlockModel(MOD_ID,"conduit/item/basic/sensor/off/conduit_all.json"), + ModelHelper.getOrCreateBlockState(MOD_ID,"basic_item_conduit_sensor.json"), + new ItemConduitStateInterpreter(), + true + ) + ) + .build(new BlockItemConduit("basic.conduit.item.sensor",config.getInt("BlockIDs.basicSensorItemConduit"),Tier.BASIC,Material.glass, PipeType.SENSOR)); public static final Block infiniteEnergyCell = new BlockBuilder(MOD_ID) .setTextures("cell_prototype.png") diff --git a/src/main/java/sunsetsatellite/signalindustries/blocks/BlockItemConduit.java b/src/main/java/sunsetsatellite/signalindustries/blocks/BlockItemConduit.java index 3844ffac..eb6c868b 100644 --- a/src/main/java/sunsetsatellite/signalindustries/blocks/BlockItemConduit.java +++ b/src/main/java/sunsetsatellite/signalindustries/blocks/BlockItemConduit.java @@ -9,11 +9,13 @@ import net.minecraft.core.item.ItemStack; import net.minecraft.core.util.helper.MathHelper; import net.minecraft.core.world.World; +import net.minecraft.core.world.WorldSource; import sunsetsatellite.catalyst.fluids.impl.tiles.TileEntityFluidPipe; import sunsetsatellite.signalindustries.SignalIndustries; import sunsetsatellite.signalindustries.blocks.base.BlockContainerTiered; import sunsetsatellite.signalindustries.gui.GuiFluidIOConfig; import sunsetsatellite.signalindustries.gui.GuiRestrictPipeConfig; +import sunsetsatellite.signalindustries.gui.GuiSensorPipeConfig; import sunsetsatellite.signalindustries.inventories.TileEntityConduit; import sunsetsatellite.signalindustries.inventories.TileEntityItemConduit; import sunsetsatellite.signalindustries.util.PipeMode; @@ -54,6 +56,11 @@ public boolean blockActivated(World world, int i, int j, int k, EntityPlayer ent SignalIndustries.displayGui(entityplayer, new GuiRestrictPipeConfig(entityplayer, tile, null), tile, tile.x,tile.y,tile.z); return true; } + if(!world.isClientSide && type == PipeType.SENSOR) { + TileEntityItemConduit tile = (TileEntityItemConduit) world.getBlockTileEntity(i,j,k); + SignalIndustries.displayGui(entityplayer, new GuiSensorPipeConfig(entityplayer.inventory, tile), tile, tile.x,tile.y,tile.z); + return true; + } return false; } @@ -87,6 +94,24 @@ public void onBlockRemoved(World world, int i, int j, int k, int data) { super.onBlockRemoved(world, i, j, k, data); } + @Override + public boolean canProvidePower() { + return true; + } + + @Override + public boolean isPoweringTo(WorldSource worldSource, int x, int y, int z, int side) { + TileEntityItemConduit tile = (TileEntityItemConduit)worldSource.getBlockTileEntity(x, y, z); + return tile != null && tile.type == PipeType.SENSOR && tile.sensorActive; + } + + @Override + public boolean isIndirectlyPoweringTo(World world, int x, int y, int z, int side) { + TileEntityItemConduit tile = (TileEntityItemConduit)world.getBlockTileEntity(x, y, z); + return tile != null && tile.type == PipeType.SENSOR && tile.sensorActive; + } + + @Override public boolean renderAsNormalBlock() { return false; } diff --git a/src/main/java/sunsetsatellite/signalindustries/blocks/machines/BlockExtractor.java b/src/main/java/sunsetsatellite/signalindustries/blocks/machines/BlockExtractor.java index 62f6c582..5117cc78 100644 --- a/src/main/java/sunsetsatellite/signalindustries/blocks/machines/BlockExtractor.java +++ b/src/main/java/sunsetsatellite/signalindustries/blocks/machines/BlockExtractor.java @@ -60,7 +60,7 @@ public String getDescription(ItemStack stack) { @Override public void onBlockRemoved(World world, int i, int j, int k, int data) { - TileEntityExtractor tile = (TileEntityExtractor) world.getBlockTileEntity(i, j, k); + TileEntityTieredMachineBase tile = (TileEntityTieredMachineBase) world.getBlockTileEntity(i, j, k); if (tile != null) { for (Direction dir : Direction.values()) { TileEntity tile2 = dir.getTileEntity(world, tile); diff --git a/src/main/java/sunsetsatellite/signalindustries/blocks/states/ItemConduitStateInterpreter.java b/src/main/java/sunsetsatellite/signalindustries/blocks/states/ItemConduitStateInterpreter.java index d31bc9ab..0264bf86 100644 --- a/src/main/java/sunsetsatellite/signalindustries/blocks/states/ItemConduitStateInterpreter.java +++ b/src/main/java/sunsetsatellite/signalindustries/blocks/states/ItemConduitStateInterpreter.java @@ -13,6 +13,7 @@ import sunsetsatellite.signalindustries.blocks.BlockFluidConduit; import sunsetsatellite.signalindustries.inventories.TileEntityInserter; import sunsetsatellite.signalindustries.inventories.TileEntityItemConduit; +import sunsetsatellite.signalindustries.util.PipeType; import useless.dragonfly.model.blockstates.processed.MetaStateInterpreter; import java.util.HashMap; @@ -47,7 +48,12 @@ public HashMap getStateMap(WorldSource worldSource, int i, int j } states.put(direction.getName().toLowerCase(), String.valueOf(show)); if(tile != null){ - states.put("restrict_"+direction.getName().toLowerCase(), String.valueOf(tile.restrictDirections.get(direction))); + if(tile.type == PipeType.RESTRICT){ + states.put("restrict_"+direction.getName().toLowerCase(), String.valueOf(tile.restrictDirections.get(direction))); + } else if (tile.type == PipeType.SENSOR) { + states.put("sensor_active",String.valueOf(tile.sensorActive)); + + } states.put("mode",tile.mode.name()); } } diff --git a/src/main/java/sunsetsatellite/signalindustries/containers/ContainerSensorPipe.java b/src/main/java/sunsetsatellite/signalindustries/containers/ContainerSensorPipe.java new file mode 100644 index 00000000..b0cb4560 --- /dev/null +++ b/src/main/java/sunsetsatellite/signalindustries/containers/ContainerSensorPipe.java @@ -0,0 +1,74 @@ +package sunsetsatellite.signalindustries.containers; + +import net.minecraft.core.InventoryAction; +import net.minecraft.core.entity.player.EntityPlayer; +import net.minecraft.core.player.inventory.Container; +import net.minecraft.core.player.inventory.IInventory; +import net.minecraft.core.player.inventory.slot.Slot; +import sunsetsatellite.signalindustries.inventories.TileEntityItemConduit; +import sunsetsatellite.signalindustries.inventories.machines.TileEntityAssembler; + +import java.util.List; + +public class ContainerSensorPipe extends Container { + + public ContainerSensorPipe(IInventory iInventory){ + for(int j = 0; j < 3; j++) + { + for(int i1 = 0; i1 < 9; i1++) + { + addSlot(new Slot(iInventory, i1 + j * 9 + 9, 8 + i1 * 18, 84 + j * 18)); + } + + } + + for(int k = 0; k < 9; k++) + { + addSlot(new Slot(iInventory, k, 8 + k * 18, 142)); + } + } + + public List getMoveSlots(InventoryAction action, Slot slot, int target, EntityPlayer player) { + if (slot.id == 0) { + return this.getSlots(0, 1, false); + } else if (slot.id >= 1 && slot.id <= 4) { + return this.getSlots(1, 4, false); + } else if (slot.id >= 5 && slot.id <= 8) { + return this.getSlots(5, 4, false); + } else { + if (action == InventoryAction.MOVE_SIMILAR) { + if (slot.id >= 9 && slot.id <= 44) { + return this.getSlots(9, 36, false); + } + } else { + if (slot.id >= 9 && slot.id <= 35) { + return this.getSlots(9, 27, false); + } + + if (slot.id >= 36 && slot.id <= 44) { + return this.getSlots(36, 9, false); + } + } + + return null; + } + } + + public List getTargetSlots(InventoryAction action, Slot slot, int target, EntityPlayer player) { + if (slot.id >= 9 && slot.id <= 44) { + if (target == 1) { + return this.getSlots(1, 4, false); + } else if (target == 2) { + return this.getSlots(5, 4, false); + } else { + return slot.id < 36 ? this.getSlots(36, 9, false) : this.getSlots(9, 27, false); + } + } else { + return slot.id == 0 ? this.getSlots(9, 36, true) : this.getSlots(9, 36, false); + } + } + @Override + public boolean isUsableByPlayer(EntityPlayer entityPlayer) { + return true; + } +} diff --git a/src/main/java/sunsetsatellite/signalindustries/gui/GuiSensorPipeConfig.java b/src/main/java/sunsetsatellite/signalindustries/gui/GuiSensorPipeConfig.java new file mode 100644 index 00000000..46ab5196 --- /dev/null +++ b/src/main/java/sunsetsatellite/signalindustries/gui/GuiSensorPipeConfig.java @@ -0,0 +1,205 @@ + + +package sunsetsatellite.signalindustries.gui; + + +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiContainer; +import net.minecraft.client.gui.GuiRenderItem; +import net.minecraft.client.gui.GuiTooltip; +import net.minecraft.core.item.ItemStack; +import net.minecraft.core.player.inventory.ContainerPlayer; +import net.minecraft.core.player.inventory.InventoryCrafting; +import net.minecraft.core.player.inventory.InventoryPlayer; +import org.lwjgl.input.Keyboard; +import org.lwjgl.opengl.GL11; +import sunsetsatellite.signalindustries.containers.ContainerSensorPipe; +import sunsetsatellite.signalindustries.inventories.TileEntityConduit; +import sunsetsatellite.signalindustries.inventories.TileEntityItemConduit; +import sunsetsatellite.signalindustries.util.PipeMode; + +public class GuiSensorPipeConfig extends GuiContainer +{ + + public GuiRenderItem guiRenderItem; + public GuiTooltip guiTooltip; + public InventoryPlayer inventoryPlayer; + + public GuiSensorPipeConfig(InventoryPlayer inventoryplayer, TileEntityItemConduit conduit) + { + super(new ContainerSensorPipe(inventoryplayer)); + inventoryPlayer = inventoryplayer; + tile = conduit; + Minecraft mc = Minecraft.getMinecraft(this); + guiRenderItem = new GuiRenderItem(mc); + guiTooltip = new GuiTooltip(mc); + + } + + @Override + protected void drawGuiContainerBackgroundLayer(float f) { + int l = mc.renderEngine.getTexture("/assets/signalindustries/gui/sensor_pipe_gui.png"); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + mc.renderEngine.bindTexture(l); + int j = (width - xSize) / 2; + int k = (height - ySize) / 2; + drawTexturedModalRect(j, k, 0, 0, xSize, ySize); + } + + protected void drawGuiContainerForegroundLayer() + { + fontRenderer.drawString("Configure: Sensor", 45, 6, 0x404040); + fontRenderer.drawString("Inventory", 8, (ySize - 96) + 2, 0x404040); + fontRenderer.drawString(String.valueOf(tile.sensorAmount), 120, 42, 0x404040); + } + + @Override + public void drawScreen(int mouseX, int mouseY, float partialTick) { + super.drawScreen(mouseX, mouseY, partialTick); + //pseudo slot rendering + int k = (this.width - this.xSize) / 2; + int l = (this.height - this.ySize) / 2; + mouseX -= k; + mouseY -= l; + int pseudoSlotX = 45; + int pseudoSlotY = 35; + ItemStack grabbedItem = inventoryPlayer.getHeldItemStack(); + if(mouseX >= pseudoSlotX - 1 && mouseX < pseudoSlotX + 16 + 1 && mouseY >= pseudoSlotY - 1 && mouseY < pseudoSlotY + 16 + 1){ + guiRenderItem.render(tile.sensorStack,k+45,l+35,true); + if (grabbedItem == null && tile.sensorStack != null) { + boolean showDescription = Keyboard.isKeyDown(29) || Keyboard.isKeyDown(157) || this.mc.gameSettings.alwaysShowDescriptions.value; + String str = this.guiTooltip.getTooltipText(tile.sensorStack, showDescription); + if (!str.isEmpty()) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + this.guiTooltip.render(str, k+mouseX, l+mouseY, 8, -8); + } + } + } else { + if(tile.sensorStack != null){ + guiRenderItem.render(tile.sensorStack,k+45,l+35,false); + } + } + GL11.glEnable(2929); + } + + @Override + public void mouseClicked(int mouseX, int mouseY, int mouseButton) { + super.mouseClicked(mouseX, mouseY, mouseButton); + int k = (this.width - this.xSize) / 2; + int l = (this.height - this.ySize) / 2; + mouseX -= k; + mouseY -= l; + int pseudoSlotX = 45; + int pseudoSlotY = 35; + ItemStack grabbedItem = inventoryPlayer.getHeldItemStack(); + if(mouseX >= pseudoSlotX - 1 && mouseX < pseudoSlotX + 16 + 1 && mouseY >= pseudoSlotY - 1 && mouseY < pseudoSlotY + 16 + 1){ + if(mouseButton == 0 && grabbedItem != null){ + ItemStack copy = grabbedItem.copy(); + copy.stackSize = 1; + tile.sensorStack = copy; + } else if (mouseButton == 1) { + tile.sensorStack = null; + } + } + } + + public void init() + { + super.init(); + GuiButton guibutton = new GuiButton(0, Math.round(width / 2 - 10), Math.round(height / 2 - 50), 20, 20, "="); + controlList.add(guibutton); + controlList.add(new GuiButton(1, Math.round(width / 2 + 30) , Math.round(height / 2 - 65), 20, 20, "+")); + controlList.add(new GuiButton(2, Math.round(width / 2 + 30), Math.round(height / 2 - 30), 20, 20, "-")); + controlList.add(new GuiButton(3, Math.round(width / 2 + 60) , Math.round(height / 2) - 75, 20, 20, tile.sensorUseMeta ? "M" : "!M")); + controlList.add(new GuiButton(4, Math.round(width / 2 + 60) , Math.round(height / 2) - 55, 20, 20, tile.sensorUseData ? "D" : "!D")); + controlList.add(new GuiButton(5, Math.round(width / 2) - 25, Math.round(height / 2) - 25, 50, 15, String.valueOf(tile.mode))); + switch (tile.sensorMode){ + case 0: + guibutton.displayString = "="; + break; + case 1: + guibutton.displayString = "!="; + break; + case 2: + guibutton.displayString = ">"; + break; + case 3: + guibutton.displayString = "<"; + break; + case 4: + guibutton.displayString = ">="; + break; + case 5: + guibutton.displayString = "<="; + break; + case 6: + tile.sensorMode = 0; + guibutton.displayString = "="; + break; + } + } + + @Override + protected void buttonPressed(GuiButton guibutton) { + if (!guibutton.enabled) { + return; + } + if (guibutton.id == 2) { + if(tile.sensorAmount > 0) + tile.sensorAmount--; + } + if (guibutton.id == 1) { + tile.sensorAmount++; + } + if(guibutton.id == 3){ + tile.sensorUseMeta = !tile.sensorUseMeta; + guibutton.displayString = tile.sensorUseMeta ? "M" : "!M"; + } + if(guibutton.id == 4){ + tile.sensorUseData = !tile.sensorUseData; + guibutton.displayString = tile.sensorUseData ? "D" : "!D"; + } + if(guibutton.id == 0) { + tile.sensorMode++; + switch (tile.sensorMode){ + case 0: + guibutton.displayString = "="; + break; + case 1: + guibutton.displayString = "!="; + break; + case 2: + guibutton.displayString = ">"; + break; + case 3: + guibutton.displayString = "<"; + break; + case 4: + guibutton.displayString = ">="; + break; + case 5: + guibutton.displayString = "<="; + break; + case 6: + tile.sensorMode = 0; + guibutton.displayString = "="; + break; + } + } + if(guibutton.id == 5){ + switch (tile.mode){ + case RANDOM: + tile.mode = PipeMode.SPLIT; + break; + case SPLIT: + tile.mode = PipeMode.RANDOM; + break; + } + guibutton.displayString = String.valueOf(tile.mode); + } + + } + + private final TileEntityItemConduit tile; +} diff --git a/src/main/java/sunsetsatellite/signalindustries/inventories/TileEntityItemConduit.java b/src/main/java/sunsetsatellite/signalindustries/inventories/TileEntityItemConduit.java index 19c0b1da..e23adec6 100644 --- a/src/main/java/sunsetsatellite/signalindustries/inventories/TileEntityItemConduit.java +++ b/src/main/java/sunsetsatellite/signalindustries/inventories/TileEntityItemConduit.java @@ -3,6 +3,7 @@ import com.mojang.nbt.ByteTag; import com.mojang.nbt.CompoundTag; import com.mojang.nbt.Tag; +import net.minecraft.core.block.Block; import net.minecraft.core.block.entity.TileEntity; import net.minecraft.core.entity.EntityItem; import net.minecraft.core.item.ItemStack; @@ -33,6 +34,12 @@ public class TileEntityItemConduit extends TileEntityWithName { public PipeType type = PipeType.NORMAL; public Map restrictDirections = new HashMap<>(); + public boolean sensorActive; + public int sensorMode = 0; + public int sensorAmount = 0; + public boolean sensorUseMeta = true; + public boolean sensorUseData = false; + public ItemStack sensorStack = null; public TileEntityItemConduit(){ for (Direction dir : Direction.values()) { @@ -300,6 +307,7 @@ private Direction pickRandomExitDirection(List> public void tick() { super.tick(); worldObj.markBlockDirty(x,y,z); + worldObj.notifyBlocksOfNeighborChange(x,y,z,sensorActive ? 15 : 0); if(worldObj != null && getBlockType() != null){ tier = ((ITiered)getBlockType()).getTier(); type = ((BlockItemConduit)getBlockType()).type; @@ -321,15 +329,54 @@ public void tick() { final Iterator iter = contents.iterator(); while(iter.hasNext()){ PipeItem next = iter.next(); + if(next.insertTimer.isPaused()){ dropItem(next,iter); } } + sensorActive = false; for (PipeItem pipeItem : contents.toArray(new PipeItem[0])) { pipeItem.insertTimer.tick(); + ItemStack stack = pipeItem.stack; + if(stack != null && type == PipeType.SENSOR){ + if(stack.itemID == sensorStack.itemID){ + sensorActive = checkIfValidForSensor(stack); + } + } } } + private boolean checkIfValidForSensor(ItemStack stack) { + boolean yes = false; + switch (sensorMode){ + case 0: + yes = stack.stackSize == sensorAmount; + break; + case 1: + yes = stack.stackSize != sensorAmount; + break; + case 2: + yes = stack.stackSize > sensorAmount; + break; + case 3: + yes = stack.stackSize < sensorAmount; + break; + case 4: + yes = stack.stackSize >= sensorAmount; + break; + case 5: + yes = stack.stackSize <= sensorAmount; + break; + } + if(sensorUseMeta && stack.getMetadata() != sensorStack.getMetadata()){ + yes = false; + } + if(sensorUseData && !stack.getData().equals(sensorStack.getData())){ + yes = false; + } + return yes; + } + public HashMap getSurroundings(){ HashMap surroundings = new HashMap<>(); for (Direction dir : Direction.values()) { @@ -346,6 +393,12 @@ public HashMap getSurroundings(){ @Override public void readFromNBT(CompoundTag nbttagcompound) { super.readFromNBT(nbttagcompound); + sensorActive = nbttagcompound.getBoolean("IsActive"); + sensorMode = nbttagcompound.getInteger("SensorMode"); + sensorAmount = nbttagcompound.getInteger("CheckAmount"); + sensorUseMeta = nbttagcompound.getBoolean("UseMeta"); + sensorUseData = nbttagcompound.getBoolean("UseData"); + sensorStack = ItemStack.readItemStackFromNbt(nbttagcompound.getCompound("SensorStack")); CompoundTag items = nbttagcompound.getCompound("Items"); CompoundTag restrict = nbttagcompound.getCompound("Restrictions"); for (Tag value : items.getValues()) { @@ -360,6 +413,8 @@ public void readFromNBT(CompoundTag nbttagcompound) { restrictDirections.replace(Direction.getFromName(value.getTagName()), ((Byte) value.getValue()) == 1); } } + + } @Override @@ -380,6 +435,15 @@ public void writeToNBT(CompoundTag nbttagcompound) { } nbttagcompound.put("Restrictions",restrict); nbttagcompound.put("Items",items); + + nbttagcompound.putBoolean("IsActive",sensorActive); + nbttagcompound.putInt("CheckAmount",sensorAmount); + nbttagcompound.putInt("SensorMode",sensorMode); + nbttagcompound.putBoolean("UseMeta",sensorUseMeta); + nbttagcompound.putBoolean("UseDeta",sensorUseData); + CompoundTag itemNbt = new CompoundTag(); + sensorStack.writeToNBT(itemNbt); + nbttagcompound.putCompound("SensorStack",itemNbt); } diff --git a/src/main/java/sunsetsatellite/signalindustries/mixin/GuiGuidebookMixin.java b/src/main/java/sunsetsatellite/signalindustries/mixin/GuiGuidebookMixin.java deleted file mode 100644 index 0d761f80..00000000 --- a/src/main/java/sunsetsatellite/signalindustries/mixin/GuiGuidebookMixin.java +++ /dev/null @@ -1,37 +0,0 @@ -package sunsetsatellite.signalindustries.mixin; - -import net.minecraft.client.gui.guidebook.GuiGuidebook; -import net.minecraft.client.gui.guidebook.PageManager; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import org.spongepowered.asm.mixin.injection.callback.LocalCapture; -import sunsetsatellite.signalindustries.SignalIndustries; - -@Mixin(value = GuiGuidebook.class,remap = false) -public abstract class GuiGuidebookMixin { - - @Shadow private static PageManager pageManager; - - @Shadow protected abstract void updateTabList(); - - @Inject(method = "keyTyped", - at = @At(value = "INVOKE", - target = "Lnet/minecraft/client/gui/guidebook/PageManager;getLeftPage()Lnet/minecraft/client/gui/guidebook/GuidebookPage;", - shift = At.Shift.BEFORE,ordinal = 1), - locals = LocalCapture.CAPTURE_FAILHARD, - cancellable = true) - public void keyTyped(char c, int key, int mouseX, int mouseY, CallbackInfo ci, int xOffset, int top, int left) { - if (pageManager.getLeftPage() != null) { - pageManager.getLeftPage().keyTyped(c, key, left, top, mouseX, mouseY); - this.updateTabList(); - } - if (pageManager.getRightPage() != null) { - pageManager.getRightPage().keyTyped(c, key, left + 158, top, mouseX, mouseY); - this.updateTabList(); - } - ci.cancel(); - } -} diff --git a/src/main/java/sunsetsatellite/signalindustries/render/RenderAutoMiner.java b/src/main/java/sunsetsatellite/signalindustries/render/RenderAutoMiner.java index b807349b..daec9688 100644 --- a/src/main/java/sunsetsatellite/signalindustries/render/RenderAutoMiner.java +++ b/src/main/java/sunsetsatellite/signalindustries/render/RenderAutoMiner.java @@ -5,12 +5,14 @@ import net.minecraft.client.render.tileentity.TileEntityRenderer; import net.minecraft.core.block.Block; import net.minecraft.core.block.entity.TileEntity; +import net.minecraft.core.world.World; import org.lwjgl.opengl.GL11; import sunsetsatellite.catalyst.fluids.render.RenderFluid; import sunsetsatellite.signalindustries.SignalIndustries; import sunsetsatellite.signalindustries.inventories.machines.TileEntityAutoMiner; import java.util.ArrayList; +import java.util.Objects; public class RenderAutoMiner extends TileEntityRenderer { @@ -32,77 +34,77 @@ public void doRender(TileEntityAutoMiner tileEntity, double x, double y, double int cx = tileEntity.current.x; int cy = tileEntity.current.y; int cz = tileEntity.current.z; + World world = this.renderDispatcher.renderEngine.mc.theWorld; - GL11.glPushMatrix(); - GL11.glTranslatef((float)x-(tx-cx)+0.25f, (float)y+4.25f, (float)z+(cz-tz)+0.25f); - GL11.glScalef(0.5f,0.5f,0.5f); - GL11.glDisable(2896); - this.drawBlock(renderDispatcher.renderEngine, SignalIndustries.basicMachineCore.id,0, tileEntity); - GL11.glEnable(2896); - GL11.glPopMatrix(); - - if(cy-(ty+4) < 0){ + if (!Objects.equals(world.getLevelData().getWorldName(), "modelviewer")) { GL11.glPushMatrix(); - GL11.glTranslatef((float)x-(tx-cx)+0.25f, (float)y-(ty-cy)+0.5f, (float)z+(cz-tz)+0.25f); - GL11.glScalef(0.50f,1f,0.50f); + GL11.glTranslatef((float) x - (tx - cx) + 0.25f, (float) y + 4.25f, (float) z + (cz - tz) + 0.25f); + GL11.glScalef(0.5f, 0.5f, 0.5f); GL11.glDisable(2896); - this.drawBlock(renderDispatcher.renderEngine,Block.basalt.id,0, tileEntity); + this.drawBlock(renderDispatcher.renderEngine, SignalIndustries.basicMachineCore.id, 0, tileEntity); GL11.glEnable(2896); GL11.glPopMatrix(); - } - - if(cy-(ty+4) <= 0){ - GL11.glPushMatrix(); - GL11.glTranslatef((float)x-(tx-cx)+0.375f, (float)y-(ty-cy), (float)z+(cz-tz)+0.375f); - GL11.glScalef(0.25f,0.75f,0.25f); - GL11.glDisable(2896); - this.drawBlock(renderDispatcher.renderEngine,Block.blockDiamond.id,0, tileEntity); - GL11.glEnable(2896); - GL11.glPopMatrix(); - } else { - GL11.glPushMatrix(); - GL11.glTranslatef((float)x-(tx-cx)+0.375f, (float)y-(ty-cy)+1f, (float)z+(cz-tz)+0.375f); - GL11.glScalef(0.25f,0.75f,0.25f); - GL11.glDisable(2896); - this.drawBlock(renderDispatcher.renderEngine,Block.blockDiamond.id,0, tileEntity); - GL11.glEnable(2896); - GL11.glPopMatrix(); - } - + if (cy - (ty + 4) < 0) { + GL11.glPushMatrix(); + GL11.glTranslatef((float) x - (tx - cx) + 0.25f, (float) y - (ty - cy) + 0.5f, (float) z + (cz - tz) + 0.25f); + GL11.glScalef(0.50f, 1f, 0.50f); + GL11.glDisable(2896); + this.drawBlock(renderDispatcher.renderEngine, Block.basalt.id, 0, tileEntity); + GL11.glEnable(2896); + GL11.glPopMatrix(); + } + if (cy - (ty + 4) <= 0) { + GL11.glPushMatrix(); + GL11.glTranslatef((float) x - (tx - cx) + 0.375f, (float) y - (ty - cy), (float) z + (cz - tz) + 0.375f); + GL11.glScalef(0.25f, 0.75f, 0.25f); + GL11.glDisable(2896); + this.drawBlock(renderDispatcher.renderEngine, Block.blockDiamond.id, 0, tileEntity); + GL11.glEnable(2896); + GL11.glPopMatrix(); + } else { + GL11.glPushMatrix(); + GL11.glTranslatef((float) x - (tx - cx) + 0.375f, (float) y - (ty - cy) + 1f, (float) z + (cz - tz) + 0.375f); + GL11.glScalef(0.25f, 0.75f, 0.25f); + GL11.glDisable(2896); + this.drawBlock(renderDispatcher.renderEngine, Block.blockDiamond.id, 0, tileEntity); + GL11.glEnable(2896); + GL11.glPopMatrix(); + } - //square above - renderLineBetweenTwoPoints(tx,ty,tz,tx-17,ty,tz,1,0.5f,0,1,8,x,y+4,z); - renderLineBetweenTwoPoints(tx,ty,tz,tx,ty,tz+17,1,0.5f,0,1,8,x,y+4,z); - renderLineBetweenTwoPoints(tx,ty,tz,tx-17,ty,tz,1,0.5f,0,1,8,x,y+4,z+17); - renderLineBetweenTwoPoints(tx,ty,tz,tx,ty,tz+17,1,0.5f,0,1,8,x-17,y+4,z); - //square - renderLineBetweenTwoPoints(tx,ty,tz,tx-17,ty,tz,1,0.5f,0,1,8,x,y,z); - renderLineBetweenTwoPoints(tx,ty,tz,tx,ty,tz+17,1,0.5f,0,1,8,x,y,z); - renderLineBetweenTwoPoints(tx,ty,tz,tx-17,ty,tz,1,0.5f,0,1,8,x,y,z+17); - renderLineBetweenTwoPoints(tx,ty,tz,tx,ty,tz+17,1,0.5f,0,1,8,x-17,y,z); - //down - renderLineBetweenTwoPoints(tx,ty,tz,tx,ty-4,tz,1,0.5f,0,1,8,x,y+4,z); - renderLineBetweenTwoPoints(tx,ty,tz,tx,ty-4,tz,1,0.5f,0,1,8,x-17,y+4,z); - renderLineBetweenTwoPoints(tx,ty,tz,tx,ty-4,tz,1,0.5f,0,1,8,x,y+4,z+17); - renderLineBetweenTwoPoints(tx,ty,tz,tx,ty-4,tz,1,0.5f,0,1,8,x-17,y+4,z+17); - //down 2 - renderLineBetweenTwoPoints(tx,ty,tz,tx,0,tz,1,1,1,1,2,x,y,z); - renderLineBetweenTwoPoints(tx,ty,tz,tx,0,tz,1,1,1,1,2,x-17,y,z); - renderLineBetweenTwoPoints(tx,ty,tz,tx,0,tz,1,1,1,1,2,x,y,z+17); - renderLineBetweenTwoPoints(tx,ty,tz,tx,0,tz,1,1,1,1,2,x-17,y,z+17); - //square down - renderLineBetweenTwoPoints(tx,ty,tz,tx-17,ty,tz,1,1,1,1,2,x,y-ty,z); - renderLineBetweenTwoPoints(tx,ty,tz,tx,ty,tz+17,1,1,1,1,2,x,y-ty,z); - renderLineBetweenTwoPoints(tx,ty,tz,tx-17,ty,tz,1,1,1,1,2,x,y-ty,z+17); - renderLineBetweenTwoPoints(tx,ty,tz,tx,ty,tz+17,1,1,1,1,2,x-17,y-ty,z); + //square above + renderLineBetweenTwoPoints(tx, ty, tz, tx - 17, ty, tz, 1, 0.5f, 0, 1, 8, x, y + 4, z); + renderLineBetweenTwoPoints(tx, ty, tz, tx, ty, tz + 17, 1, 0.5f, 0, 1, 8, x, y + 4, z); + renderLineBetweenTwoPoints(tx, ty, tz, tx - 17, ty, tz, 1, 0.5f, 0, 1, 8, x, y + 4, z + 17); + renderLineBetweenTwoPoints(tx, ty, tz, tx, ty, tz + 17, 1, 0.5f, 0, 1, 8, x - 17, y + 4, z); + //square + renderLineBetweenTwoPoints(tx, ty, tz, tx - 17, ty, tz, 1, 0.5f, 0, 1, 8, x, y, z); + renderLineBetweenTwoPoints(tx, ty, tz, tx, ty, tz + 17, 1, 0.5f, 0, 1, 8, x, y, z); + renderLineBetweenTwoPoints(tx, ty, tz, tx - 17, ty, tz, 1, 0.5f, 0, 1, 8, x, y, z + 17); + renderLineBetweenTwoPoints(tx, ty, tz, tx, ty, tz + 17, 1, 0.5f, 0, 1, 8, x - 17, y, z); + //down + renderLineBetweenTwoPoints(tx, ty, tz, tx, ty - 4, tz, 1, 0.5f, 0, 1, 8, x, y + 4, z); + renderLineBetweenTwoPoints(tx, ty, tz, tx, ty - 4, tz, 1, 0.5f, 0, 1, 8, x - 17, y + 4, z); + renderLineBetweenTwoPoints(tx, ty, tz, tx, ty - 4, tz, 1, 0.5f, 0, 1, 8, x, y + 4, z + 17); + renderLineBetweenTwoPoints(tx, ty, tz, tx, ty - 4, tz, 1, 0.5f, 0, 1, 8, x - 17, y + 4, z + 17); + //down 2 + renderLineBetweenTwoPoints(tx, ty, tz, tx, 0, tz, 1, 1, 1, 1, 2, x, y, z); + renderLineBetweenTwoPoints(tx, ty, tz, tx, 0, tz, 1, 1, 1, 1, 2, x - 17, y, z); + renderLineBetweenTwoPoints(tx, ty, tz, tx, 0, tz, 1, 1, 1, 1, 2, x, y, z + 17); + renderLineBetweenTwoPoints(tx, ty, tz, tx, 0, tz, 1, 1, 1, 1, 2, x - 17, y, z + 17); + //square down + renderLineBetweenTwoPoints(tx, ty, tz, tx - 17, ty, tz, 1, 1, 1, 1, 2, x, y - ty, z); + renderLineBetweenTwoPoints(tx, ty, tz, tx, ty, tz + 17, 1, 1, 1, 1, 2, x, y - ty, z); + renderLineBetweenTwoPoints(tx, ty, tz, tx - 17, ty, tz, 1, 1, 1, 1, 2, x, y - ty, z + 17); + renderLineBetweenTwoPoints(tx, ty, tz, tx, ty, tz + 17, 1, 1, 1, 1, 2, x - 17, y - ty, z); - //current lines - renderLineBetweenTwoPoints(tx,ty,tz,cx,ty,tz,1,0,0,1,8,x,y+4,z+(cz-tz)); - renderLineBetweenTwoPoints(tx,ty,cz,tx,ty,tz,0,0,1,1,8,x-(tx-cx),y+4,z+(cz-tz)); - renderLineBetweenTwoPoints(tx,ty,tz,tx,cy-3,tz,0,1,0,1,8,x-(tx-cx),y+4,z+(cz-tz)); + //current lines + renderLineBetweenTwoPoints(tx, ty, tz, cx, ty, tz, 1, 0, 0, 1, 8, x, y + 4, z + (cz - tz)); + renderLineBetweenTwoPoints(tx, ty, cz, tx, ty, tz, 0, 0, 1, 1, 8, x - (tx - cx), y + 4, z + (cz - tz)); + renderLineBetweenTwoPoints(tx, ty, tz, tx, cy - 3, tz, 0, 1, 0, 1, 8, x - (tx - cx), y + 4, z + (cz - tz)); + } } public void renderLineBetweenTwoPoints(int x1, int y1, int z1, long x2, long y2, long z2, float red, float green, float blue, float alpha, float width, double x, double y, double z) { diff --git a/src/main/resources/assets/signalindustries/blockstates/basic_item_conduit_sensor.json b/src/main/resources/assets/signalindustries/blockstates/basic_item_conduit_sensor.json new file mode 100644 index 00000000..47451f38 --- /dev/null +++ b/src/main/resources/assets/signalindustries/blockstates/basic_item_conduit_sensor.json @@ -0,0 +1,150 @@ +{ + "multipart": [ + { + "apply": { + "model": "signalindustries:conduit/item/basic/sensor/off/conduit_base" + } + }, + { + "apply": { + "model": "signalindustries:conduit/item/basic/split/conduit_base" + }, + "when": { + "mode": "SPLIT" + } + }, + { + "apply": { + "model": "signalindustries:conduit/item/basic/sensor/on/conduit_base" + }, + "when": { + "sensor_active": "true" + } + }, + { + "when": { + "AND": [ + {"up": "true"},{"sensor_active": "true"} + ] + }, + "apply": { + "model": "signalindustries:conduit/item/basic/sensor/on/conduit_up" + } + }, + { + "when": { + "AND": [ + {"up": "true"},{"sensor_active": "false"} + ] + }, + "apply": { + "model": "signalindustries:conduit/item/basic/sensor/off/conduit_up" + } + }, + + { + "when": { + "AND": [ + {"down": "true"},{"sensor_active": "true"} + ] + }, + "apply": { + "model": "signalindustries:conduit/item/basic/sensor/on/conduit_down" + } + }, + { + "when": { + "AND": [ + {"down": "true"},{"sensor_active": "false"} + ] + }, + "apply": { + "model": "signalindustries:conduit/item/basic/sensor/off/conduit_down" + } + }, + + { + "when": { + "AND": [ + {"north": "true"},{"sensor_active": "true"} + ] + }, + "apply": { + "model": "signalindustries:conduit/item/basic/sensor/on/conduit_north" + } + }, + { + "when": { + "AND": [ + {"north": "true"},{"sensor_active": "false"} + ] + }, + "apply": { + "model": "signalindustries:conduit/item/basic/sensor/off/conduit_north" + } + }, + + { + "when": { + "AND": [ + {"south": "true"},{"sensor_active": "true"} + ] + }, + "apply": { + "model": "signalindustries:conduit/item/basic/sensor/on/conduit_south" + } + }, + { + "when": { + "AND": [ + {"south": "true"},{"sensor_active": "false"} + ] + }, + "apply": { + "model": "signalindustries:conduit/item/basic/sensor/off/conduit_south" + } + }, + + { + "when": { + "AND": [ + {"east": "true"},{"sensor_active": "true"} + ] + }, + "apply": { + "model": "signalindustries:conduit/item/basic/sensor/on/conduit_east" + } + }, + { + "when": { + "AND": [ + {"east": "true"},{"sensor_active": "false"} + ] + }, + "apply": { + "model": "signalindustries:conduit/item/basic/sensor/off/conduit_east" + } + }, + + { + "when": { + "AND": [ + {"west": "true"},{"sensor_active": "true"} + ] + }, + "apply": { + "model": "signalindustries:conduit/item/basic/sensor/on/conduit_west" + } + }, + { + "when": { + "AND": [ + {"west": "true"},{"sensor_active": "false"} + ] + }, + "apply": { + "model": "signalindustries:conduit/item/basic/sensor/off/conduit_west" + } + } + ] +} diff --git a/src/main/resources/assets/signalindustries/gui/sensor_pipe_gui.png b/src/main/resources/assets/signalindustries/gui/sensor_pipe_gui.png new file mode 100644 index 00000000..138ddc13 Binary files /dev/null and b/src/main/resources/assets/signalindustries/gui/sensor_pipe_gui.png differ diff --git a/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/off/conduit_all.json b/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/off/conduit_all.json new file mode 100644 index 00000000..a3d92fd7 --- /dev/null +++ b/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/off/conduit_all.json @@ -0,0 +1,6 @@ +{ + "parent": "signalindustries:conduit/template_item_conduit_all", + "textures": { + "conduit": "signalindustries:block/item_conduit_basic_sensor_off" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/off/conduit_base.json b/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/off/conduit_base.json new file mode 100644 index 00000000..c9a50ad6 --- /dev/null +++ b/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/off/conduit_base.json @@ -0,0 +1,6 @@ +{ + "parent": "signalindustries:conduit/template_item_conduit_base", + "textures": { + "conduit": "signalindustries:block/item_conduit_basic_sensor_off" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/off/conduit_down.json b/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/off/conduit_down.json new file mode 100644 index 00000000..e0d9efd6 --- /dev/null +++ b/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/off/conduit_down.json @@ -0,0 +1,6 @@ +{ + "parent": "signalindustries:conduit/template_item_conduit_down", + "textures": { + "conduit": "signalindustries:block/item_conduit_basic_sensor_off" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/off/conduit_east.json b/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/off/conduit_east.json new file mode 100644 index 00000000..a8233e98 --- /dev/null +++ b/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/off/conduit_east.json @@ -0,0 +1,6 @@ +{ + "parent": "signalindustries:conduit/template_item_conduit_east", + "textures": { + "conduit": "signalindustries:block/item_conduit_basic_sensor_off" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/off/conduit_north.json b/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/off/conduit_north.json new file mode 100644 index 00000000..4dfc5933 --- /dev/null +++ b/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/off/conduit_north.json @@ -0,0 +1,6 @@ +{ + "parent": "signalindustries:conduit/template_item_conduit_north", + "textures": { + "conduit": "signalindustries:block/item_conduit_basic_sensor_off" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/off/conduit_south.json b/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/off/conduit_south.json new file mode 100644 index 00000000..e0897c38 --- /dev/null +++ b/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/off/conduit_south.json @@ -0,0 +1,6 @@ +{ + "parent": "signalindustries:conduit/template_item_conduit_south", + "textures": { + "conduit": "signalindustries:block/item_conduit_basic_sensor_off" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/off/conduit_up.json b/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/off/conduit_up.json new file mode 100644 index 00000000..b0a80915 --- /dev/null +++ b/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/off/conduit_up.json @@ -0,0 +1,6 @@ +{ + "parent": "signalindustries:conduit/template_item_conduit_up", + "textures": { + "conduit": "signalindustries:block/item_conduit_basic_sensor_off" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/off/conduit_west.json b/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/off/conduit_west.json new file mode 100644 index 00000000..6256edc7 --- /dev/null +++ b/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/off/conduit_west.json @@ -0,0 +1,6 @@ +{ + "parent": "signalindustries:conduit/template_item_conduit_west", + "textures": { + "conduit": "signalindustries:block/item_conduit_basic_sensor_off" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/on/conduit_all.json b/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/on/conduit_all.json new file mode 100644 index 00000000..6dd44529 --- /dev/null +++ b/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/on/conduit_all.json @@ -0,0 +1,6 @@ +{ + "parent": "signalindustries:conduit/template_item_conduit_all", + "textures": { + "conduit": "signalindustries:block/item_conduit_basic_sensor" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/on/conduit_base.json b/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/on/conduit_base.json new file mode 100644 index 00000000..11cb7231 --- /dev/null +++ b/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/on/conduit_base.json @@ -0,0 +1,6 @@ +{ + "parent": "signalindustries:conduit/template_item_conduit_base", + "textures": { + "conduit": "signalindustries:block/item_conduit_basic_sensor" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/on/conduit_down.json b/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/on/conduit_down.json new file mode 100644 index 00000000..babe554a --- /dev/null +++ b/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/on/conduit_down.json @@ -0,0 +1,6 @@ +{ + "parent": "signalindustries:conduit/template_item_conduit_down", + "textures": { + "conduit": "signalindustries:block/item_conduit_basic_sensor" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/on/conduit_east.json b/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/on/conduit_east.json new file mode 100644 index 00000000..db95e9d6 --- /dev/null +++ b/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/on/conduit_east.json @@ -0,0 +1,6 @@ +{ + "parent": "signalindustries:conduit/template_item_conduit_east", + "textures": { + "conduit": "signalindustries:block/item_conduit_basic_sensor" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/on/conduit_north.json b/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/on/conduit_north.json new file mode 100644 index 00000000..07bf303d --- /dev/null +++ b/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/on/conduit_north.json @@ -0,0 +1,6 @@ +{ + "parent": "signalindustries:conduit/template_item_conduit_north", + "textures": { + "conduit": "signalindustries:block/item_conduit_basic_sensor" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/on/conduit_south.json b/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/on/conduit_south.json new file mode 100644 index 00000000..b84cde4a --- /dev/null +++ b/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/on/conduit_south.json @@ -0,0 +1,6 @@ +{ + "parent": "signalindustries:conduit/template_item_conduit_south", + "textures": { + "conduit": "signalindustries:block/item_conduit_basic_sensor" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/on/conduit_up.json b/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/on/conduit_up.json new file mode 100644 index 00000000..e7f98912 --- /dev/null +++ b/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/on/conduit_up.json @@ -0,0 +1,6 @@ +{ + "parent": "signalindustries:conduit/template_item_conduit_up", + "textures": { + "conduit": "signalindustries:block/item_conduit_basic_sensor" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/on/conduit_west.json b/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/on/conduit_west.json new file mode 100644 index 00000000..d002fb34 --- /dev/null +++ b/src/main/resources/assets/signalindustries/model/conduit/item/basic/sensor/on/conduit_west.json @@ -0,0 +1,6 @@ +{ + "parent": "signalindustries:conduit/template_item_conduit_west", + "textures": { + "conduit": "signalindustries:block/item_conduit_basic_sensor" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/signalindustries/recipes/workbench.json b/src/main/resources/assets/signalindustries/recipes/workbench.json index 5b2c05bc..c4a35ccc 100644 --- a/src/main/resources/assets/signalindustries/recipes/workbench.json +++ b/src/main/resources/assets/signalindustries/recipes/workbench.json @@ -2846,6 +2846,47 @@ }, "consumeContainers": false }, + { + "name": "signalindustries:workbench/basic_sensor_item_conduit", + "type": "minecraft:crafting/shaped", + "pattern": [ + "CGC", + "RRR", + "CGC" + ], + "symbols": [ + { + "symbol": "C", + "stack": { + "key": "item.signalindustries.crystalAlloyIngot", + "amount": 1, + "meta": 0 + } + }, + { + "symbol": "R", + "stack": { + "key": "item.dust.redstone", + "amount": 1, + "meta": 0 + } + }, + { + "symbol": "G", + "stack": { + "key": "tile.glass", + "amount": 1, + "meta": 0 + } + } + ], + "result": { + "key": "tile.signalindustries.basic.conduit.item.sensor", + "amount": 4, + "meta": 0 + }, + "consumeContainers": false + }, { "name": "signalindustries:workbench/prototype_item_conduit", "type": "minecraft:crafting/shaped", diff --git a/src/main/resources/lang/signalindustries/en_US.lang b/src/main/resources/lang/signalindustries/en_US.lang index 6f3ae3a9..4ad423c4 100644 --- a/src/main/resources/lang/signalindustries/en_US.lang +++ b/src/main/resources/lang/signalindustries/en_US.lang @@ -166,6 +166,8 @@ tile.signalindustries.basic.conduit.item.name=Basic Item Conduit tile.signalindustries.basic.conduit.item.desc=Transfers items faster. tile.signalindustries.basic.conduit.item.restrict.name=Basic Restrict Item Conduit tile.signalindustries.basic.conduit.item.restrict.desc=Transfers items faster. Can have some of its directions blocked off preventing incoming items from going into that direction. +tile.signalindustries.basic.conduit.item.sensor.name=Basic Sensor Item Conduit +tile.signalindustries.basic.conduit.item.sensor.desc=Transfers items faster. Emits a redstone signal depending on what items pass through it. tile.signalindustries.prototype.inserter.name=Prototype Inserter tile.signalindustries.prototype.inserter.desc=Picks up items from the ground and inserts them into item conduits. diff --git a/src/main/resources/signalindustries.mixins.json b/src/main/resources/signalindustries.mixins.json index 984a53ba..040d068b 100644 --- a/src/main/resources/signalindustries.mixins.json +++ b/src/main/resources/signalindustries.mixins.json @@ -17,7 +17,6 @@ "EntityTrackerMixin", "GameSettingsMixin", "GuidebookSectionsMixin", - "GuiGuidebookMixin", "GuiIngameMixin", "InventoryPlayerMixin", "ItemStackMixin",