mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 15:18:34 +01:00
Added whitelistable advanced item laser relays
This commit is contained in:
parent
b75837d6b2
commit
ea1c65bbb3
17 changed files with 1429 additions and 63 deletions
|
@ -10,33 +10,37 @@
|
|||
|
||||
package de.ellpeck.actuallyadditions.mod.blocks;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
||||
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelay;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.PropertyInteger;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockLaserRelay extends BlockContainerBase{
|
||||
|
||||
private static final PropertyInteger META = PropertyInteger.create("meta", 0, 5);
|
||||
private boolean isItem;
|
||||
private Type type;
|
||||
|
||||
public BlockLaserRelay(String name, boolean isItem){
|
||||
public BlockLaserRelay(String name, Type type){
|
||||
super(Material.ROCK, name);
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setHardness(1.5F);
|
||||
this.setResistance(10.0F);
|
||||
this.setSoundType(SoundType.STONE);
|
||||
|
||||
this.isItem = isItem;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -64,8 +68,35 @@ public class BlockLaserRelay extends BlockContainerBase{
|
|||
return META;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack stack, EnumFacing par6, float par7, float par8, float par9){
|
||||
if(player.isSneaking()){
|
||||
TileEntityLaserRelay relay = (TileEntityLaserRelay)world.getTileEntity(pos);
|
||||
if(relay instanceof TileEntityLaserRelay.TileEntityLaserRelayItemWhitelist){
|
||||
if(!world.isRemote){
|
||||
player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.LASER_RELAY_ITEM_WHITELIST.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int i){
|
||||
return this.isItem ? new TileEntityLaserRelay.TileEntityLaserRelayItem() : new TileEntityLaserRelay.TileEntityLaserRelayEnergy();
|
||||
switch(this.type){
|
||||
case ITEM:
|
||||
return new TileEntityLaserRelay.TileEntityLaserRelayItem();
|
||||
case ITEM_WHITELIST:
|
||||
return new TileEntityLaserRelay.TileEntityLaserRelayItemWhitelist();
|
||||
default:
|
||||
return new TileEntityLaserRelay.TileEntityLaserRelayEnergy();
|
||||
}
|
||||
}
|
||||
|
||||
public enum Type{
|
||||
ENERGY,
|
||||
ITEM,
|
||||
ITEM_WHITELIST
|
||||
}
|
||||
}
|
|
@ -93,6 +93,7 @@ public class InitBlocks{
|
|||
|
||||
public static Block blockLaserRelay;
|
||||
public static Block blockLaserRelayItem;
|
||||
public static Block blockLaserRelayItemWhitelist;
|
||||
public static Block blockItemViewer;
|
||||
|
||||
public static Block blockBlackLotus;
|
||||
|
@ -122,8 +123,9 @@ public class InitBlocks{
|
|||
blockAtomicReconstructor = new BlockAtomicReconstructor("blockAtomicReconstructor");
|
||||
blockCrystal = new BlockCrystal("blockCrystal");
|
||||
blockBlackLotus = new BlockBlackLotus("blockBlackLotus");
|
||||
blockLaserRelay = new BlockLaserRelay("blockLaserRelay", false);
|
||||
blockLaserRelayItem = new BlockLaserRelay("blockLaserRelayItem", true);
|
||||
blockLaserRelay = new BlockLaserRelay("blockLaserRelay", BlockLaserRelay.Type.ENERGY);
|
||||
blockLaserRelayItem = new BlockLaserRelay("blockLaserRelayItem", BlockLaserRelay.Type.ITEM);
|
||||
blockLaserRelayItemWhitelist = new BlockLaserRelay("blockLaserRelayItemWhitelist", BlockLaserRelay.Type.ITEM_WHITELIST);
|
||||
blockRangedCollector = new BlockRangedCollector("blockRangedCollector");
|
||||
blockDirectionalBreaker = new BlockDirectionalBreaker("blockDirectionalBreaker");
|
||||
blockLeafGenerator = new BlockLeafGenerator("blockLeafGenerator");
|
||||
|
|
|
@ -56,6 +56,7 @@ public class CreativeTab extends CreativeTabs{
|
|||
this.add(InitBlocks.blockFireworkBox);
|
||||
this.add(InitBlocks.blockLaserRelay);
|
||||
this.add(InitBlocks.blockLaserRelayItem);
|
||||
this.add(InitBlocks.blockLaserRelayItemWhitelist);
|
||||
this.add(InitBlocks.blockItemViewer);
|
||||
this.add(InitBlocks.blockAtomicReconstructor);
|
||||
this.add(InitBlocks.blockPhantomface);
|
||||
|
|
|
@ -29,7 +29,7 @@ import net.minecraft.util.text.TextComponentString;
|
|||
@InventoryContainer
|
||||
public class ContainerDrill extends Container{
|
||||
|
||||
private static final int SLOT_AMOUNT = 5;
|
||||
public static final int SLOT_AMOUNT = 5;
|
||||
|
||||
private InventoryDrill drillInventory = new InventoryDrill();
|
||||
private InventoryPlayer inventory;
|
||||
|
|
|
@ -0,0 +1,110 @@
|
|||
/*
|
||||
* This file ("ContainerInputter.java") is part of the Actually Additions Mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense/
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2016 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.inventory;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.inventory.slot.SlotFilter;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelay.TileEntityLaserRelayItemWhitelist;
|
||||
import invtweaks.api.container.InventoryContainer;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.ClickType;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@InventoryContainer
|
||||
public class ContainerLaserRelayItemWhitelist extends Container{
|
||||
|
||||
private TileEntityLaserRelayItemWhitelist tile;
|
||||
|
||||
public ContainerLaserRelayItemWhitelist(InventoryPlayer inventory, TileEntityBase tile){
|
||||
this.tile = (TileEntityLaserRelayItemWhitelist)tile;
|
||||
|
||||
for(int i = 0; i < 2; i++){
|
||||
for(int x = 0; x < 3; x++){
|
||||
for(int y = 0; y < 4; y++){
|
||||
this.addSlotToContainer(new SlotFilter(this.tile.filterInventory, y+x*4+i*12, 20+i*84+x*18, 6+y*18));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 3; i++){
|
||||
for(int j = 0; j < 9; j++){
|
||||
this.addSlotToContainer(new Slot(inventory, j+i*9+9, 8+j*18, 97+i*18));
|
||||
}
|
||||
}
|
||||
for(int i = 0; i < 9; i++){
|
||||
this.addSlotToContainer(new Slot(inventory, i, 8+i*18, 155));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int slot){
|
||||
final int inventoryStart = 0;
|
||||
final int inventoryEnd = inventoryStart+26;
|
||||
final int hotbarStart = inventoryEnd+1;
|
||||
final int hotbarEnd = hotbarStart+8;
|
||||
|
||||
Slot theSlot = this.inventorySlots.get(slot);
|
||||
|
||||
if(theSlot != null && theSlot.getHasStack()){
|
||||
ItemStack newStack = theSlot.getStack();
|
||||
ItemStack currentStack = newStack.copy();
|
||||
|
||||
//Other Slots in Inventory excluded
|
||||
if(slot >= inventoryStart){
|
||||
if(slot >= inventoryStart && slot <= inventoryEnd){
|
||||
if(!this.mergeItemStack(newStack, hotbarStart, hotbarEnd+1, false)){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if(slot >= inventoryEnd+1 && slot < hotbarEnd+1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false)){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if(!this.mergeItemStack(newStack, inventoryStart, hotbarEnd+1, false)){
|
||||
return null;
|
||||
}
|
||||
|
||||
if(newStack.stackSize == 0){
|
||||
theSlot.putStack(null);
|
||||
}
|
||||
else{
|
||||
theSlot.onSlotChanged();
|
||||
}
|
||||
|
||||
if(newStack.stackSize == currentStack.stackSize){
|
||||
return null;
|
||||
}
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack slotClick(int slotId, int dragType, ClickType clickTypeIn, EntityPlayer player){
|
||||
if(slotId >= 0 && slotId < this.inventorySlots.size() && this.getSlot(slotId) instanceof SlotFilter){
|
||||
//Calls the Filter's SlotClick function
|
||||
return ((SlotFilter)this.getSlot(slotId)).slotClick(player);
|
||||
}
|
||||
else{
|
||||
return super.slotClick(slotId, dragType, clickTypeIn, player);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player){
|
||||
return this.tile.canPlayerUse(player);
|
||||
}
|
||||
}
|
|
@ -87,6 +87,8 @@ public class GuiHandler implements IGuiHandler{
|
|||
return new ContainerRangedCollector(entityPlayer.inventory, tile);
|
||||
case MINER:
|
||||
return new ContainerMiner(entityPlayer.inventory, tile);
|
||||
case LASER_RELAY_ITEM_WHITELIST:
|
||||
return new ContainerLaserRelayItemWhitelist(entityPlayer.inventory, tile);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
@ -153,6 +155,8 @@ public class GuiHandler implements IGuiHandler{
|
|||
return new GuiRangedCollector(entityPlayer.inventory, tile, x, y, z, world);
|
||||
case MINER:
|
||||
return new GuiMiner(entityPlayer.inventory, tile);
|
||||
case LASER_RELAY_ITEM_WHITELIST:
|
||||
return new GuiLaserRelayItemWhitelist(entityPlayer.inventory, tile);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
@ -185,7 +189,8 @@ public class GuiHandler implements IGuiHandler{
|
|||
BOOK(false),
|
||||
DIRECTIONAL_BREAKER,
|
||||
RANGED_COLLECTOR,
|
||||
MINER;
|
||||
MINER,
|
||||
LASER_RELAY_ITEM_WHITELIST;
|
||||
|
||||
public boolean checkTileEntity;
|
||||
|
||||
|
|
|
@ -0,0 +1,108 @@
|
|||
/*
|
||||
* This file ("GuiOilGenerator.java") is part of the Actually Additions Mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense/
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2016 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.inventory.gui;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.inventory.ContainerLaserRelayItemWhitelist;
|
||||
import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiInputter.SmallerButton;
|
||||
import de.ellpeck.actuallyadditions.mod.network.PacketHandler;
|
||||
import de.ellpeck.actuallyadditions.mod.network.gui.PacketGuiButton;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelay.TileEntityLaserRelayItemWhitelist;
|
||||
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiLaserRelayItemWhitelist extends GuiContainer{
|
||||
|
||||
private static final ResourceLocation resLoc = AssetUtil.getGuiLocation("guiLaserRelayItemWhitelist");
|
||||
private TileEntityLaserRelayItemWhitelist tile;
|
||||
|
||||
private SmallerButton whitelistLeft;
|
||||
private SmallerButton whitelistRight;
|
||||
|
||||
public GuiLaserRelayItemWhitelist(InventoryPlayer inventory, TileEntityBase tile){
|
||||
super(new ContainerLaserRelayItemWhitelist(inventory, tile));
|
||||
this.tile = (TileEntityLaserRelayItemWhitelist)tile;
|
||||
this.xSize = 176;
|
||||
this.ySize = 93+86;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui(){
|
||||
super.initGui();
|
||||
|
||||
this.whitelistLeft = new SmallerButton(0, this.guiLeft+3, this.guiTop+16, "");
|
||||
this.whitelistRight = new SmallerButton(1, this.guiLeft+157, this.guiTop+16, "");
|
||||
this.buttonList.add(this.whitelistLeft);
|
||||
this.buttonList.add(this.whitelistRight);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void actionPerformed(GuiButton button){
|
||||
BlockPos pos = this.tile.getPos();
|
||||
PacketHandler.theNetwork.sendToServer(new PacketGuiButton(pos.getX(), pos.getY(), pos.getZ(), this.tile.getWorld(), button.id, Minecraft.getMinecraft().thePlayer));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int x, int y, float f){
|
||||
super.drawScreen(x, y, f);
|
||||
|
||||
this.whitelistLeft.displayString = this.tile.isLeftWhitelist ? "O" : "X";
|
||||
this.whitelistRight.displayString = this.tile.isRightWhitelist ? "O" : "X";
|
||||
|
||||
List infoList = this.fontRendererObj.listFormattedStringToWidth(StringUtil.localizeFormatted("info."+ModUtil.MOD_ID+".inputter.whitelistInfo"), 200);
|
||||
String text1 = this.tile.isLeftWhitelist ? StringUtil.localize("info."+ModUtil.MOD_ID+".gui.whitelist") : StringUtil.localize("info."+ModUtil.MOD_ID+".gui.blacklist");
|
||||
if(x >= this.guiLeft+3 && y >= this.guiTop+16 && x <= this.guiLeft+18 && y <= this.guiTop+31){
|
||||
ArrayList list = new ArrayList();
|
||||
list.add(TextFormatting.BOLD+text1);
|
||||
list.addAll(infoList);
|
||||
this.drawHoveringText(list, x, y);
|
||||
}
|
||||
String text2 = this.tile.isRightWhitelist ? StringUtil.localize("info."+ModUtil.MOD_ID+".gui.whitelist") : StringUtil.localize("info."+ModUtil.MOD_ID+".gui.blacklist");
|
||||
if(x >= this.guiLeft+157 && y >= this.guiTop+16 && x <= this.guiLeft+172 && y <= this.guiTop+31){
|
||||
ArrayList list = new ArrayList();
|
||||
list.add(TextFormatting.BOLD+text2);
|
||||
list.addAll(infoList);
|
||||
this.drawHoveringText(list, x, y);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawGuiContainerForegroundLayer(int x, int y){
|
||||
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.tile.name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawGuiContainerBackgroundLayer(float f, int x, int y){
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
|
||||
this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86);
|
||||
|
||||
this.mc.getTextureManager().bindTexture(resLoc);
|
||||
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93);
|
||||
|
||||
}
|
||||
}
|
|
@ -15,8 +15,10 @@ import com.google.common.collect.Multimap;
|
|||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheColoredLampColors;
|
||||
import de.ellpeck.actuallyadditions.mod.config.ConfigValues;
|
||||
import de.ellpeck.actuallyadditions.mod.inventory.ContainerDrill;
|
||||
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
||||
import de.ellpeck.actuallyadditions.mod.items.base.ItemEnergy;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityInventoryBase;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.PosUtil;
|
||||
|
@ -150,19 +152,9 @@ public class ItemDrill extends ItemEnergy{
|
|||
return null;
|
||||
}
|
||||
|
||||
int slotAmount = compound.getInteger("SlotAmount");
|
||||
ItemStack[] slots = new ItemStack[slotAmount];
|
||||
ItemStack[] slots = new ItemStack[ContainerDrill.SLOT_AMOUNT];
|
||||
TileEntityInventoryBase.loadSlots(slots, compound);
|
||||
|
||||
if(slots.length > 0){
|
||||
NBTTagList tagList = compound.getTagList("Items", 10);
|
||||
for(int i = 0; i < tagList.tagCount(); i++){
|
||||
NBTTagCompound tagCompound = tagList.getCompoundTagAt(i);
|
||||
byte slotIndex = tagCompound.getByte("Slot");
|
||||
if(slotIndex >= 0 && slotIndex < slots.length){
|
||||
slots[slotIndex] = ItemStack.loadItemStackFromNBT(tagCompound);
|
||||
}
|
||||
}
|
||||
}
|
||||
return slots;
|
||||
}
|
||||
|
||||
|
@ -407,20 +399,7 @@ public class ItemDrill extends ItemEnergy{
|
|||
if(compound == null){
|
||||
compound = new NBTTagCompound();
|
||||
}
|
||||
|
||||
if(slots != null && slots.length > 0){
|
||||
compound.setInteger("SlotAmount", slots.length);
|
||||
NBTTagList tagList = new NBTTagList();
|
||||
for(int currentIndex = 0; currentIndex < slots.length; currentIndex++){
|
||||
if(slots[currentIndex] != null){
|
||||
NBTTagCompound tagCompound = new NBTTagCompound();
|
||||
tagCompound.setByte("Slot", (byte)currentIndex);
|
||||
slots[currentIndex].writeToNBT(tagCompound);
|
||||
tagList.appendTag(tagCompound);
|
||||
}
|
||||
}
|
||||
compound.setTag("Items", tagList);
|
||||
}
|
||||
TileEntityInventoryBase.saveSlots(slots, compound);
|
||||
stack.setTagCompound(compound);
|
||||
}
|
||||
|
||||
|
|
|
@ -84,6 +84,7 @@ public abstract class TileEntityBase extends TileEntity implements ITickable{
|
|||
GameRegistry.registerTileEntity(TileEntityPhantomRedstoneface.class, ModUtil.MOD_ID+":tileEntityPhantomRedstoneface");
|
||||
GameRegistry.registerTileEntity(TileEntityLaserRelay.TileEntityLaserRelayItem.class, ModUtil.MOD_ID+":tileEntityLaserRelayItem");
|
||||
GameRegistry.registerTileEntity(TileEntityLaserRelay.TileEntityLaserRelayEnergy.class, ModUtil.MOD_ID+":tileEntityLaserRelay");
|
||||
GameRegistry.registerTileEntity(TileEntityLaserRelay.TileEntityLaserRelayItemWhitelist.class, ModUtil.MOD_ID+":tileEntityLaserRelayItemWhitelist");
|
||||
GameRegistry.registerTileEntity(TileEntityItemViewer.class, ModUtil.MOD_ID+":tileItemViewer");
|
||||
}
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ package de.ellpeck.actuallyadditions.mod.tile;
|
|||
|
||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
@ -48,17 +49,34 @@ public abstract class TileEntityInventoryBase extends TileEntityBase implements
|
|||
public void writeSyncableNBT(NBTTagCompound compound, boolean isForSync){
|
||||
super.writeSyncableNBT(compound, isForSync);
|
||||
if(!isForSync || this.shouldSyncSlots()){
|
||||
if(this.slots.length > 0){
|
||||
NBTTagList tagList = new NBTTagList();
|
||||
for(int currentIndex = 0; currentIndex < this.slots.length; currentIndex++){
|
||||
NBTTagCompound tagCompound = new NBTTagCompound();
|
||||
tagCompound.setByte("Slot", (byte)currentIndex);
|
||||
if(this.slots[currentIndex] != null){
|
||||
this.slots[currentIndex].writeToNBT(tagCompound);
|
||||
}
|
||||
tagList.appendTag(tagCompound);
|
||||
saveSlots(this.slots, compound);
|
||||
}
|
||||
}
|
||||
|
||||
public static void saveSlots(ItemStack[] slots, NBTTagCompound compound){
|
||||
if(slots != null && slots.length > 0){
|
||||
NBTTagList tagList = new NBTTagList();
|
||||
for(int currentIndex = 0; currentIndex < slots.length; currentIndex++){
|
||||
NBTTagCompound tagCompound = new NBTTagCompound();
|
||||
tagCompound.setByte("Slot", (byte)currentIndex);
|
||||
if(slots[currentIndex] != null){
|
||||
slots[currentIndex].writeToNBT(tagCompound);
|
||||
}
|
||||
tagList.appendTag(tagCompound);
|
||||
}
|
||||
compound.setTag("Items", tagList);
|
||||
}
|
||||
}
|
||||
|
||||
public static void loadSlots(ItemStack[] slots, NBTTagCompound compound){
|
||||
if(slots != null && slots.length > 0){
|
||||
NBTTagList tagList = compound.getTagList("Items", 10);
|
||||
for(int i = 0; i < tagList.tagCount(); i++){
|
||||
NBTTagCompound tagCompound = tagList.getCompoundTagAt(i);
|
||||
byte slotIndex = tagCompound.getByte("Slot");
|
||||
if(slotIndex >= 0 && slotIndex < slots.length){
|
||||
slots[slotIndex] = ItemStack.loadItemStackFromNBT(tagCompound);
|
||||
}
|
||||
compound.setTag("Items", tagList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -71,16 +89,7 @@ public abstract class TileEntityInventoryBase extends TileEntityBase implements
|
|||
public void readSyncableNBT(NBTTagCompound compound, boolean isForSync){
|
||||
super.readSyncableNBT(compound, isForSync);
|
||||
if(!isForSync || this.shouldSyncSlots()){
|
||||
if(this.slots.length > 0){
|
||||
NBTTagList tagList = compound.getTagList("Items", 10);
|
||||
for(int i = 0; i < tagList.tagCount(); i++){
|
||||
NBTTagCompound tagCompound = tagList.getCompoundTagAt(i);
|
||||
byte slotIndex = tagCompound.getByte("Slot");
|
||||
if(slotIndex >= 0 && slotIndex < this.slots.length){
|
||||
this.slots[slotIndex] = ItemStack.loadItemStackFromNBT(tagCompound);
|
||||
}
|
||||
}
|
||||
}
|
||||
loadSlots(this.slots, compound);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -78,9 +78,11 @@ public class TileEntityItemViewer extends TileEntityInventoryBase{
|
|||
public boolean canExtractItem(int index, ItemStack stack, EnumFacing direction){
|
||||
SpecificItemHandlerInfo handler = this.getSwitchedIndexHandler(index);
|
||||
if(handler != null){
|
||||
if(ItemStack.areItemsEqual(handler.handler.getStackInSlot(handler.switchedIndex), stack)){
|
||||
ItemStack gaveBack = handler.handler.extractItem(handler.switchedIndex, stack.stackSize, true);
|
||||
return gaveBack != null;
|
||||
if(handler.relayInQuestion.isWhitelisted(stack)){
|
||||
if(ItemStack.areItemsEqual(handler.handler.getStackInSlot(handler.switchedIndex), stack)){
|
||||
ItemStack gaveBack = handler.handler.extractItem(handler.switchedIndex, stack.stackSize, true);
|
||||
return gaveBack != null;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
@ -90,8 +92,10 @@ public class TileEntityItemViewer extends TileEntityInventoryBase{
|
|||
public boolean isItemValidForSlot(int index, ItemStack stack){
|
||||
SpecificItemHandlerInfo handler = this.getSwitchedIndexHandler(index);
|
||||
if(handler != null){
|
||||
ItemStack gaveBack = handler.handler.insertItem(handler.switchedIndex, stack, true);
|
||||
return !ItemStack.areItemStacksEqual(gaveBack, stack);
|
||||
if(handler.relayInQuestion.isWhitelisted(stack)){
|
||||
ItemStack gaveBack = handler.handler.insertItem(handler.switchedIndex, stack, true);
|
||||
return !ItemStack.areItemStacksEqual(gaveBack, stack);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -15,16 +15,24 @@ import de.ellpeck.actuallyadditions.mod.config.ConfigValues;
|
|||
import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues;
|
||||
import de.ellpeck.actuallyadditions.mod.misc.LaserRelayConnectionHandler;
|
||||
import de.ellpeck.actuallyadditions.mod.network.PacketParticle;
|
||||
import de.ellpeck.actuallyadditions.mod.network.gui.IButtonReactor;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityItemViewer.GenericItemHandlerInfo;
|
||||
import de.ellpeck.actuallyadditions.mod.util.PosUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.Util;
|
||||
import de.ellpeck.actuallyadditions.mod.util.WorldUtil;
|
||||
import io.netty.util.internal.ConcurrentSet;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.items.CapabilityItemHandler;
|
||||
|
@ -61,11 +69,13 @@ public abstract class TileEntityLaserRelay extends TileEntityBase{
|
|||
else{
|
||||
LaserRelayConnectionHandler.getInstance().removeRelayFromNetwork(thisPos);
|
||||
}
|
||||
|
||||
super.receiveSyncCompound(compound);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound getSyncCompound(){
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
NBTTagCompound compound = super.getSyncCompound();
|
||||
|
||||
BlockPos thisPos = this.pos;
|
||||
ConcurrentSet<LaserRelayConnectionHandler.ConnectionPair> connections = LaserRelayConnectionHandler.getInstance().getConnectionsFor(thisPos);
|
||||
|
@ -76,9 +86,8 @@ public abstract class TileEntityLaserRelay extends TileEntityBase{
|
|||
list.appendTag(pair.writeToNBT());
|
||||
}
|
||||
compound.setTag("Connections", list);
|
||||
return compound;
|
||||
}
|
||||
return null;
|
||||
return compound;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -112,8 +121,16 @@ public abstract class TileEntityLaserRelay extends TileEntityBase{
|
|||
|
||||
public static class TileEntityLaserRelayItem extends TileEntityLaserRelay{
|
||||
|
||||
public TileEntityLaserRelayItem(String name){
|
||||
super(name, true);
|
||||
}
|
||||
|
||||
public TileEntityLaserRelayItem(){
|
||||
super("laserRelayItem", true);
|
||||
this("laserRelayItem");
|
||||
}
|
||||
|
||||
public boolean isWhitelisted(ItemStack stack){
|
||||
return true;
|
||||
}
|
||||
|
||||
public List<GenericItemHandlerInfo> getItemHandlersInNetwork(LaserRelayConnectionHandler.Network network){
|
||||
|
@ -148,6 +165,204 @@ public abstract class TileEntityLaserRelay extends TileEntityBase{
|
|||
}
|
||||
}
|
||||
|
||||
public static class TileEntityLaserRelayItemWhitelist extends TileEntityLaserRelayItem implements IButtonReactor{
|
||||
|
||||
private ItemStack[] slots = new ItemStack[24];
|
||||
|
||||
public IInventory filterInventory;
|
||||
|
||||
public boolean isLeftWhitelist;
|
||||
public boolean isRightWhitelist;
|
||||
|
||||
private boolean lastLeftWhitelist;
|
||||
private boolean lastRightWhitelist;
|
||||
|
||||
public TileEntityLaserRelayItemWhitelist(){
|
||||
super("laserRelayItemWhitelist");
|
||||
|
||||
this.filterInventory = new IInventory(){
|
||||
|
||||
private TileEntityLaserRelayItemWhitelist tile;
|
||||
|
||||
private IInventory setTile(TileEntityLaserRelayItemWhitelist tile){
|
||||
this.tile = tile;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return this.tile.name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInventoryStackLimit(){
|
||||
return 64;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void markDirty(){
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer player){
|
||||
return this.tile.canPlayerUse(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openInventory(EntityPlayer player){
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeInventory(EntityPlayer player){
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getField(int id){
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setField(int id, int value){
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFieldCount(){
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clear(){
|
||||
int length = this.tile.slots.length;
|
||||
this.tile.slots = new ItemStack[length];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents(int i, ItemStack stack){
|
||||
this.tile.slots[i] = stack;
|
||||
this.markDirty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSizeInventory(){
|
||||
return this.tile.slots.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlot(int i){
|
||||
if(i < this.getSizeInventory()){
|
||||
return this.tile.slots[i];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int i, int j){
|
||||
if(this.tile.slots[i] != null){
|
||||
ItemStack stackAt;
|
||||
if(this.tile.slots[i].stackSize <= j){
|
||||
stackAt = this.tile.slots[i];
|
||||
this.tile.slots[i] = null;
|
||||
this.markDirty();
|
||||
return stackAt;
|
||||
}
|
||||
else{
|
||||
stackAt = this.tile.slots[i].splitStack(j);
|
||||
if(this.tile.slots[i].stackSize <= 0){
|
||||
this.tile.slots[i] = null;
|
||||
}
|
||||
this.markDirty();
|
||||
return stackAt;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack removeStackFromSlot(int index){
|
||||
ItemStack stack = this.tile.slots[index];
|
||||
this.tile.slots[index] = null;
|
||||
return stack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCustomName(){
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ITextComponent getDisplayName(){
|
||||
return new TextComponentString(StringUtil.localize(this.getName()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int index, ItemStack stack){
|
||||
return false;
|
||||
}
|
||||
}.setTile(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isWhitelisted(ItemStack stack){
|
||||
return this.checkFilter(stack, true, this.isLeftWhitelist) || this.checkFilter(stack, false, this.isRightWhitelist);
|
||||
}
|
||||
|
||||
private boolean checkFilter(ItemStack stack, boolean left, boolean isWhitelist){
|
||||
int slotStart = left ? 0 : 12;
|
||||
int slotStop = slotStart+12;
|
||||
|
||||
for(int i = slotStart; i < slotStop; i++){
|
||||
if(this.slots[i] != null && this.slots[i].isItemEqual(stack)){
|
||||
return isWhitelist;
|
||||
}
|
||||
}
|
||||
return !isWhitelist;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeSyncableNBT(NBTTagCompound compound, boolean isForSync){
|
||||
super.writeSyncableNBT(compound, isForSync);
|
||||
if(!isForSync){
|
||||
TileEntityInventoryBase.saveSlots(this.slots, compound);
|
||||
}
|
||||
compound.setBoolean("LeftWhitelist", this.isLeftWhitelist);
|
||||
compound.setBoolean("RightWhitelist", this.isRightWhitelist);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readSyncableNBT(NBTTagCompound compound, boolean isForSync){
|
||||
super.readSyncableNBT(compound, isForSync);
|
||||
if(!isForSync){
|
||||
TileEntityInventoryBase.loadSlots(this.slots, compound);
|
||||
}
|
||||
this.isLeftWhitelist = compound.getBoolean("LeftWhitelist");
|
||||
this.isRightWhitelist = compound.getBoolean("RightWhitelist");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onButtonPressed(int buttonID, EntityPlayer player){
|
||||
if(buttonID == 0){
|
||||
this.isLeftWhitelist = !this.isLeftWhitelist;
|
||||
}
|
||||
else if(buttonID == 1){
|
||||
this.isRightWhitelist = !this.isRightWhitelist;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity(){
|
||||
super.updateEntity();
|
||||
|
||||
if((this.isLeftWhitelist != this.lastLeftWhitelist || this.isRightWhitelist != this.lastRightWhitelist) && this.sendUpdateWithInterval()){
|
||||
this.lastLeftWhitelist = this.isLeftWhitelist;
|
||||
this.lastRightWhitelist = this.isRightWhitelist;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static class TileEntityLaserRelayEnergy extends TileEntityLaserRelay implements IEnergyReceiver{
|
||||
|
||||
public TileEntityLaserRelayEnergy(){
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"forge_marker": 1,
|
||||
"defaults": {
|
||||
"model": "actuallyadditions:blockLaserRelayItemWhitelist",
|
||||
"transform": "forge:default-block"
|
||||
},
|
||||
"variants": {
|
||||
"normal": [{}],
|
||||
"inventory": [{}],
|
||||
"meta": {
|
||||
"0": { "x": 180 },
|
||||
"1": {},
|
||||
"2": { "x": 90 },
|
||||
"3": { "x": 270 },
|
||||
"4": { "x": 90, "y": 270 },
|
||||
"5": { "x": 270, "y": 270 }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -135,6 +135,7 @@ tile.actuallyadditions.blockPillarQuartzWall.name=Black Quartz Pillar Wall
|
|||
tile.actuallyadditions.blockPillarQuartzStair.name=Black Quartz Pillar Stairs
|
||||
tile.actuallyadditions.blockPillarQuartzSlab.name=Black Quartz Pillar Slab
|
||||
tile.actuallyadditions.blockLaserRelayItem.name=Item Laser Relay
|
||||
tile.actuallyadditions.blockLaserRelayItemWhitelist.name=Advanced Item Laser Relay
|
||||
tile.actuallyadditions.blockItemViewer.name=Item Interface
|
||||
|
||||
#ESD
|
||||
|
@ -506,6 +507,7 @@ container.actuallyadditions.cloud.name=Smiley Cloud
|
|||
container.actuallyadditions.directionalBreaker.name=Long-Range Breaker
|
||||
container.actuallyadditions.rangedCollector.name=Ranged Collector
|
||||
container.actuallyadditions.miner.name=Vertical Digger
|
||||
container.actuallyadditions.laserRelayItemWhitelist.name=Laser Relay
|
||||
|
||||
#Update Information
|
||||
info.actuallyadditions.update.generic=[{"text":"There is an Update for "},{"text":"Actually Additions ","color":"dark_green"},{"text":"available!","color":"none"}]
|
||||
|
|
|
@ -0,0 +1,880 @@
|
|||
{
|
||||
"__createdBy": "canitzp",
|
||||
"ambientocclusion": false,
|
||||
"textures": {
|
||||
"particle": "actuallyadditions:blocks/models/modelLaserRelayItemWhitelist",
|
||||
"laserRelay": "actuallyadditions:blocks/models/modelLaserRelayItemWhitelist"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [4,0,4],
|
||||
"to": [12,1,12],
|
||||
"faces": {
|
||||
"up": {
|
||||
"uv": [0,0,8,8],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"down": {
|
||||
"uv": [0,0,8,8],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"west": {
|
||||
"uv": [0,0,8,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"east": {
|
||||
"uv": [0,0,8,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"north": {
|
||||
"uv": [0,0,8,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"south": {
|
||||
"uv": [0,0,8,1],
|
||||
"texture": "#laserRelay"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [4,1,3],
|
||||
"to": [12,4,4],
|
||||
"faces": {
|
||||
"up": {
|
||||
"uv": [0,0,8,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"down": {
|
||||
"uv": [0,0,8,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"west": {
|
||||
"uv": [0,0,1,3],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"east": {
|
||||
"uv": [0,0,1,3],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"north": {
|
||||
"uv": [0,0,8,3],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"south": {
|
||||
"uv": [0,0,8,3],
|
||||
"texture": "#laserRelay"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [4,1,12],
|
||||
"to": [12,4,13],
|
||||
"faces": {
|
||||
"up": {
|
||||
"uv": [0,0,8,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"down": {
|
||||
"uv": [0,0,8,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"west": {
|
||||
"uv": [0,0,1,3],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"east": {
|
||||
"uv": [0,0,1,3],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"north": {
|
||||
"uv": [0,0,8,3],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"south": {
|
||||
"uv": [0,0,8,3],
|
||||
"texture": "#laserRelay"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [4,11,12],
|
||||
"to": [12,14,13],
|
||||
"faces": {
|
||||
"up": {
|
||||
"uv": [0,0,8,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"down": {
|
||||
"uv": [0,0,8,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"west": {
|
||||
"uv": [0,0,1,3],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"east": {
|
||||
"uv": [0,0,1,3],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"north": {
|
||||
"uv": [0,0,8,3],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"south": {
|
||||
"uv": [0,0,8,3],
|
||||
"texture": "#laserRelay"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [4,11,3],
|
||||
"to": [12,14,4],
|
||||
"faces": {
|
||||
"up": {
|
||||
"uv": [0,0,8,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"down": {
|
||||
"uv": [0,0,8,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"west": {
|
||||
"uv": [0,0,1,3],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"east": {
|
||||
"uv": [0,0,1,3],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"north": {
|
||||
"uv": [0,0,8,3],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"south": {
|
||||
"uv": [0,0,8,3],
|
||||
"texture": "#laserRelay"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [4,4,2],
|
||||
"to": [12,5,3],
|
||||
"faces": {
|
||||
"up": {
|
||||
"uv": [0,0,8,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"down": {
|
||||
"uv": [0,0,8,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"west": {
|
||||
"uv": [0,0,1,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"east": {
|
||||
"uv": [0,0,1,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"north": {
|
||||
"uv": [0,0,8,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"south": {
|
||||
"uv": [0,0,8,1],
|
||||
"texture": "#laserRelay"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [4,10,2],
|
||||
"to": [12,11,3],
|
||||
"faces": {
|
||||
"up": {
|
||||
"uv": [0,0,8,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"down": {
|
||||
"uv": [0,0,8,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"west": {
|
||||
"uv": [0,0,1,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"east": {
|
||||
"uv": [0,0,1,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"north": {
|
||||
"uv": [0,0,8,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"south": {
|
||||
"uv": [0,0,8,1],
|
||||
"texture": "#laserRelay"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [4,10,13],
|
||||
"to": [12,11,14],
|
||||
"faces": {
|
||||
"up": {
|
||||
"uv": [0,0,8,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"down": {
|
||||
"uv": [0,0,8,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"west": {
|
||||
"uv": [0,0,1,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"east": {
|
||||
"uv": [0,0,1,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"north": {
|
||||
"uv": [0,0,8,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"south": {
|
||||
"uv": [0,0,8,1],
|
||||
"texture": "#laserRelay"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [4,4,13],
|
||||
"to": [12,5,14],
|
||||
"faces": {
|
||||
"up": {
|
||||
"uv": [0,0,8,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"down": {
|
||||
"uv": [0,0,8,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"west": {
|
||||
"uv": [0,0,1,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"east": {
|
||||
"uv": [0,0,1,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"north": {
|
||||
"uv": [0,0,8,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"south": {
|
||||
"uv": [0,0,8,1],
|
||||
"texture": "#laserRelay"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [5.5,1,5.5],
|
||||
"to": [10.5,3,10.5],
|
||||
"faces": {
|
||||
"up": {
|
||||
"uv": [13.5,13.5,16,16],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"down": {
|
||||
"uv": [0.0,0.0,5.0,5.0],
|
||||
"texture": "missingtexture"
|
||||
},
|
||||
"west": {
|
||||
"uv": [0,0,5,2],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"east": {
|
||||
"uv": [0,0,5,2],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"north": {
|
||||
"uv": [0,0,5,2],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"south": {
|
||||
"uv": [0,0,5,2],
|
||||
"texture": "#laserRelay"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [7,3,7],
|
||||
"to": [9,14,9],
|
||||
"faces": {
|
||||
"up": {
|
||||
"uv": [0.0,0.0,2.0,2.0],
|
||||
"texture": "missingtexture"
|
||||
},
|
||||
"down": {
|
||||
"uv": [0.0,0.0,2.0,2.0],
|
||||
"texture": "missingtexture"
|
||||
},
|
||||
"west": {
|
||||
"uv": [14,2,16,7.5],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"east": {
|
||||
"uv": [14,2,16,7.5],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"north": {
|
||||
"uv": [14,2,16,7.5],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"south": {
|
||||
"uv": [14,2,16,7.5],
|
||||
"texture": "#laserRelay"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [4,14,4],
|
||||
"to": [12,15,12],
|
||||
"faces": {
|
||||
"up": {
|
||||
"uv": [1,12,5,15],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"down": {
|
||||
"uv": [0,0,8,8],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"west": {
|
||||
"uv": [0,0,8,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"east": {
|
||||
"uv": [0,0,8,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"north": {
|
||||
"uv": [0,0,8,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"south": {
|
||||
"uv": [0,0,8,1],
|
||||
"texture": "#laserRelay"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [6.5,6.5,6.5],
|
||||
"to": [9.5,9.5,9.5],
|
||||
"faces": {
|
||||
"up": {
|
||||
"uv": [14,0,16,2],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"down": {
|
||||
"uv": [14,0,16,2],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"west": {
|
||||
"uv": [14,0,16,2],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"east": {
|
||||
"uv": [14,0,16,2],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"north": {
|
||||
"uv": [14,0,16,2],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"south": {
|
||||
"uv": [14,0,16,2],
|
||||
"texture": "#laserRelay"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [4,5,2],
|
||||
"to": [5,10,3],
|
||||
"faces": {
|
||||
"up": {
|
||||
"uv": [0.0,0.0,1.0,1.0],
|
||||
"texture": "missingtexture"
|
||||
},
|
||||
"down": {
|
||||
"uv": [0.0,0.0,1.0,1.0],
|
||||
"texture": "missingtexture"
|
||||
},
|
||||
"west": {
|
||||
"uv": [0,0,1,5],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"east": {
|
||||
"uv": [0,0,1,5],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"north": {
|
||||
"uv": [0,0,1,5],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"south": {
|
||||
"uv": [0,0,1,5],
|
||||
"texture": "#laserRelay"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [11,5,2],
|
||||
"to": [12,10,3],
|
||||
"faces": {
|
||||
"up": {
|
||||
"uv": [0.0,0.0,1.0,1.0],
|
||||
"texture": "missingtexture"
|
||||
},
|
||||
"down": {
|
||||
"uv": [0.0,0.0,1.0,1.0],
|
||||
"texture": "missingtexture"
|
||||
},
|
||||
"west": {
|
||||
"uv": [0,0,1,5],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"east": {
|
||||
"uv": [0,0,1,5],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"north": {
|
||||
"uv": [0,0,1,5],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"south": {
|
||||
"uv": [0,0,1,5],
|
||||
"texture": "#laserRelay"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [11,5,13],
|
||||
"to": [12,10,14],
|
||||
"faces": {
|
||||
"up": {
|
||||
"uv": [0.0,0.0,1.0,1.0],
|
||||
"texture": "missingtexture"
|
||||
},
|
||||
"down": {
|
||||
"uv": [0.0,0.0,1.0,1.0],
|
||||
"texture": "missingtexture"
|
||||
},
|
||||
"west": {
|
||||
"uv": [0,0,1,5],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"east": {
|
||||
"uv": [0,0,1,5],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"north": {
|
||||
"uv": [0,0,1,5],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"south": {
|
||||
"uv": [0,0,1,5],
|
||||
"texture": "#laserRelay"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [4,5,13],
|
||||
"to": [5,10,14],
|
||||
"faces": {
|
||||
"up": {
|
||||
"uv": [0.0,0.0,1.0,1.0],
|
||||
"texture": "missingtexture"
|
||||
},
|
||||
"down": {
|
||||
"uv": [0.0,0.0,1.0,1.0],
|
||||
"texture": "missingtexture"
|
||||
},
|
||||
"west": {
|
||||
"uv": [0,0,1,5],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"east": {
|
||||
"uv": [0,0,1,5],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"north": {
|
||||
"uv": [0,0,1,5],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"south": {
|
||||
"uv": [0,0,1,5],
|
||||
"texture": "#laserRelay"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [3,1,4],
|
||||
"to": [4,4,12],
|
||||
"faces": {
|
||||
"up": {
|
||||
"uv": [0,0,1,8],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"down": {
|
||||
"uv": [0,0,1,8],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"west": {
|
||||
"uv": [0,0,8,3],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"east": {
|
||||
"uv": [0,0,8,3],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"north": {
|
||||
"uv": [0,0,1,3],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"south": {
|
||||
"uv": [0,0,1,3],
|
||||
"texture": "#laserRelay"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [12,1,4],
|
||||
"to": [13,4,12],
|
||||
"faces": {
|
||||
"up": {
|
||||
"uv": [0,0,1,8],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"down": {
|
||||
"uv": [0,0,1,8],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"west": {
|
||||
"uv": [0,0,8,3],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"east": {
|
||||
"uv": [0,0,8,3],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"north": {
|
||||
"uv": [0,0,1,3],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"south": {
|
||||
"uv": [0,0,1,3],
|
||||
"texture": "#laserRelay"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [12,11,4],
|
||||
"to": [13,14,12],
|
||||
"faces": {
|
||||
"up": {
|
||||
"uv": [0,0,1,8],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"down": {
|
||||
"uv": [0,0,1,8],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"west": {
|
||||
"uv": [0,0,8,3],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"east": {
|
||||
"uv": [0,0,8,3],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"north": {
|
||||
"uv": [0,0,1,3],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"south": {
|
||||
"uv": [0,0,1,3],
|
||||
"texture": "#laserRelay"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [3,11,4],
|
||||
"to": [4,14,12],
|
||||
"faces": {
|
||||
"up": {
|
||||
"uv": [0,0,1,8],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"down": {
|
||||
"uv": [0,0,1,8],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"west": {
|
||||
"uv": [0,0,8,3],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"east": {
|
||||
"uv": [0,0,8,3],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"north": {
|
||||
"uv": [0,0,1,3],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"south": {
|
||||
"uv": [0,0,1,3],
|
||||
"texture": "#laserRelay"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [2,4,4],
|
||||
"to": [3,5,12],
|
||||
"faces": {
|
||||
"up": {
|
||||
"uv": [0,0,1,8],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"down": {
|
||||
"uv": [0,0,1,8],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"west": {
|
||||
"uv": [0,0,8,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"east": {
|
||||
"uv": [0,0,8,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"north": {
|
||||
"uv": [0,0,1,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"south": {
|
||||
"uv": [0,0,1,1],
|
||||
"texture": "#laserRelay"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [2,10,4],
|
||||
"to": [3,11,12],
|
||||
"faces": {
|
||||
"up": {
|
||||
"uv": [0,0,1,8],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"down": {
|
||||
"uv": [0,0,1,8],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"west": {
|
||||
"uv": [0,0,8,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"east": {
|
||||
"uv": [0,0,8,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"north": {
|
||||
"uv": [0,0,1,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"south": {
|
||||
"uv": [0,0,1,1],
|
||||
"texture": "#laserRelay"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [13,10,4],
|
||||
"to": [14,11,12],
|
||||
"faces": {
|
||||
"up": {
|
||||
"uv": [0,0,1,8],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"down": {
|
||||
"uv": [0,0,1,8],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"west": {
|
||||
"uv": [0,0,8,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"east": {
|
||||
"uv": [0,0,8,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"north": {
|
||||
"uv": [0,0,1,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"south": {
|
||||
"uv": [0,0,1,1],
|
||||
"texture": "#laserRelay"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [13,4,4],
|
||||
"to": [14,5,12],
|
||||
"faces": {
|
||||
"up": {
|
||||
"uv": [0,0,1,8],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"down": {
|
||||
"uv": [0,0,1,8],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"west": {
|
||||
"uv": [0,0,8,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"east": {
|
||||
"uv": [0,0,8,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"north": {
|
||||
"uv": [0,0,1,1],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"south": {
|
||||
"uv": [0,0,1,1],
|
||||
"texture": "#laserRelay"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [2,5,4],
|
||||
"to": [3,10,5],
|
||||
"faces": {
|
||||
"up": {
|
||||
"uv": [0.0,0.0,1.0,1.0],
|
||||
"texture": "missingtexture"
|
||||
},
|
||||
"down": {
|
||||
"uv": [0.0,0.0,1.0,1.0],
|
||||
"texture": "missingtexture"
|
||||
},
|
||||
"west": {
|
||||
"uv": [0,0,1,5],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"east": {
|
||||
"uv": [0,0,1,5],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"north": {
|
||||
"uv": [0,0,1,5],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"south": {
|
||||
"uv": [0,0,1,5],
|
||||
"texture": "#laserRelay"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [2,5,11],
|
||||
"to": [3,10,12],
|
||||
"faces": {
|
||||
"up": {
|
||||
"uv": [0.0,0.0,1.0,1.0],
|
||||
"texture": "missingtexture"
|
||||
},
|
||||
"down": {
|
||||
"uv": [0.0,0.0,1.0,1.0],
|
||||
"texture": "missingtexture"
|
||||
},
|
||||
"west": {
|
||||
"uv": [0,0,1,5],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"east": {
|
||||
"uv": [0,0,1,5],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"north": {
|
||||
"uv": [0,0,1,5],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"south": {
|
||||
"uv": [0,0,1,5],
|
||||
"texture": "#laserRelay"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [13,5,11],
|
||||
"to": [14,10,12],
|
||||
"faces": {
|
||||
"up": {
|
||||
"uv": [0.0,0.0,1.0,1.0],
|
||||
"texture": "missingtexture"
|
||||
},
|
||||
"down": {
|
||||
"uv": [0.0,0.0,1.0,1.0],
|
||||
"texture": "missingtexture"
|
||||
},
|
||||
"west": {
|
||||
"uv": [0,0,1,5],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"east": {
|
||||
"uv": [0,0,1,5],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"north": {
|
||||
"uv": [0,0,1,5],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"south": {
|
||||
"uv": [0,0,1,5],
|
||||
"texture": "#laserRelay"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [13,5,4],
|
||||
"to": [14,10,5],
|
||||
"faces": {
|
||||
"up": {
|
||||
"uv": [0.0,0.0,1.0,1.0],
|
||||
"texture": "missingtexture"
|
||||
},
|
||||
"down": {
|
||||
"uv": [0.0,0.0,1.0,1.0],
|
||||
"texture": "missingtexture"
|
||||
},
|
||||
"west": {
|
||||
"uv": [0,0,1,5],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"east": {
|
||||
"uv": [0,0,1,5],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"north": {
|
||||
"uv": [0,0,1,5],
|
||||
"texture": "#laserRelay"
|
||||
},
|
||||
"south": {
|
||||
"uv": [0,0,1,5],
|
||||
"texture": "#laserRelay"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 317 B |
Binary file not shown.
After Width: | Height: | Size: 2 KiB |
Loading…
Reference in a new issue