diff --git a/.gitignore b/.gitignore index 8d16946..2066b4c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ .idea build run +bin diff --git a/build.gradle b/build.gradle index 585fd0f..6bdce9f 100644 --- a/build.gradle +++ b/build.gradle @@ -34,10 +34,16 @@ minecraft { repositories { maven { url = "https://maven.tilera.xyz" } + maven { + name 'central' + url 'https://maven.thorfusion.com/artifactory/central/' + } } dependencies { - + implementation "codechicken:CodeChickenLib:1.7.10-1.1.3.141:dev" + implementation "codechicken:NotEnoughItems:1.7.10-1.0.5.120:dev" + implementation "codechicken:CodeChickenCore:1.7.10-1.0.7.48:dev" } processResources { diff --git a/src/main/java/cofh/api/CoFHAPIProps.java b/src/main/java/cofh/api/CoFHAPIProps.java new file mode 100644 index 0000000..fb3eac6 --- /dev/null +++ b/src/main/java/cofh/api/CoFHAPIProps.java @@ -0,0 +1,8 @@ +package cofh.api; + +public class CoFHAPIProps { + public static final String VERSION = "1.7.10R1.3.1"; + + private CoFHAPIProps() { + } +} diff --git a/src/main/java/cofh/api/energy/EnergyStorage.java b/src/main/java/cofh/api/energy/EnergyStorage.java new file mode 100644 index 0000000..7fe351b --- /dev/null +++ b/src/main/java/cofh/api/energy/EnergyStorage.java @@ -0,0 +1,121 @@ +package cofh.api.energy; + +import net.minecraft.nbt.NBTTagCompound; + +public class EnergyStorage implements IEnergyStorage { + protected int energy; + protected int capacity; + protected int maxReceive; + protected int maxExtract; + + public EnergyStorage(int capacity) { + this(capacity, capacity, capacity); + } + + public EnergyStorage(int capacity, int maxTransfer) { + this(capacity, maxTransfer, maxTransfer); + } + + public EnergyStorage(int capacity, int maxReceive, int maxExtract) { + this.capacity = capacity; + this.maxReceive = maxReceive; + this.maxExtract = maxExtract; + } + + public EnergyStorage readFromNBT(NBTTagCompound nbt) { + this.energy = nbt.getInteger("Energy"); + if (this.energy > this.capacity) { + this.energy = this.capacity; + } + + return this; + } + + public NBTTagCompound writeToNBT(NBTTagCompound nbt) { + if (this.energy < 0) { + this.energy = 0; + } + + nbt.setInteger("Energy", this.energy); + return nbt; + } + + public void setCapacity(int capacity) { + this.capacity = capacity; + if (this.energy > capacity) { + this.energy = capacity; + } + + } + + public void setMaxTransfer(int maxTransfer) { + this.setMaxReceive(maxTransfer); + this.setMaxExtract(maxTransfer); + } + + public void setMaxReceive(int maxReceive) { + this.maxReceive = maxReceive; + } + + public void setMaxExtract(int maxExtract) { + this.maxExtract = maxExtract; + } + + public int getMaxReceive() { + return this.maxReceive; + } + + public int getMaxExtract() { + return this.maxExtract; + } + + public void setEnergyStored(int energy) { + this.energy = energy; + if (this.energy > this.capacity) { + this.energy = this.capacity; + } else if (this.energy < 0) { + this.energy = 0; + } + + } + + public void modifyEnergyStored(int energy) { + this.energy += energy; + if (this.energy > this.capacity) { + this.energy = this.capacity; + } else if (this.energy < 0) { + this.energy = 0; + } + + } + + @Override + public int receiveEnergy(int maxReceive, boolean simulate) { + int energyReceived = Math.min(this.capacity - this.energy, Math.min(this.maxReceive, maxReceive)); + if (!simulate) { + this.energy += energyReceived; + } + + return energyReceived; + } + + @Override + public int extractEnergy(int maxExtract, boolean simulate) { + int energyExtracted = Math.min(this.energy, Math.min(this.maxExtract, maxExtract)); + if (!simulate) { + this.energy -= energyExtracted; + } + + return energyExtracted; + } + + @Override + public int getEnergyStored() { + return this.energy; + } + + @Override + public int getMaxEnergyStored() { + return this.capacity; + } +} diff --git a/src/main/java/cofh/api/energy/IEnergyConnection.java b/src/main/java/cofh/api/energy/IEnergyConnection.java new file mode 100644 index 0000000..f587e4b --- /dev/null +++ b/src/main/java/cofh/api/energy/IEnergyConnection.java @@ -0,0 +1,7 @@ +package cofh.api.energy; + +import net.minecraftforge.common.util.ForgeDirection; + +public interface IEnergyConnection { + boolean canConnectEnergy(ForgeDirection var1); +} diff --git a/src/main/java/cofh/api/energy/IEnergyContainerItem.java b/src/main/java/cofh/api/energy/IEnergyContainerItem.java new file mode 100644 index 0000000..667a9a6 --- /dev/null +++ b/src/main/java/cofh/api/energy/IEnergyContainerItem.java @@ -0,0 +1,13 @@ +package cofh.api.energy; + +import net.minecraft.item.ItemStack; + +public interface IEnergyContainerItem { + int receiveEnergy(ItemStack var1, int var2, boolean var3); + + int extractEnergy(ItemStack var1, int var2, boolean var3); + + int getEnergyStored(ItemStack var1); + + int getMaxEnergyStored(ItemStack var1); +} diff --git a/src/main/java/cofh/api/energy/IEnergyHandler.java b/src/main/java/cofh/api/energy/IEnergyHandler.java new file mode 100644 index 0000000..b626bab --- /dev/null +++ b/src/main/java/cofh/api/energy/IEnergyHandler.java @@ -0,0 +1,17 @@ +package cofh.api.energy; + +import net.minecraftforge.common.util.ForgeDirection; + +public interface IEnergyHandler extends IEnergyProvider, IEnergyReceiver { + @Override + int receiveEnergy(ForgeDirection var1, int var2, boolean var3); + + @Override + int extractEnergy(ForgeDirection var1, int var2, boolean var3); + + @Override + int getEnergyStored(ForgeDirection var1); + + @Override + int getMaxEnergyStored(ForgeDirection var1); +} diff --git a/src/main/java/cofh/api/energy/IEnergyProvider.java b/src/main/java/cofh/api/energy/IEnergyProvider.java new file mode 100644 index 0000000..324a4b8 --- /dev/null +++ b/src/main/java/cofh/api/energy/IEnergyProvider.java @@ -0,0 +1,11 @@ +package cofh.api.energy; + +import net.minecraftforge.common.util.ForgeDirection; + +public interface IEnergyProvider extends IEnergyConnection { + int extractEnergy(ForgeDirection var1, int var2, boolean var3); + + int getEnergyStored(ForgeDirection var1); + + int getMaxEnergyStored(ForgeDirection var1); +} diff --git a/src/main/java/cofh/api/energy/IEnergyReceiver.java b/src/main/java/cofh/api/energy/IEnergyReceiver.java new file mode 100644 index 0000000..3281b5c --- /dev/null +++ b/src/main/java/cofh/api/energy/IEnergyReceiver.java @@ -0,0 +1,11 @@ +package cofh.api.energy; + +import net.minecraftforge.common.util.ForgeDirection; + +public interface IEnergyReceiver extends IEnergyConnection { + int receiveEnergy(ForgeDirection var1, int var2, boolean var3); + + int getEnergyStored(ForgeDirection var1); + + int getMaxEnergyStored(ForgeDirection var1); +} diff --git a/src/main/java/cofh/api/energy/IEnergyStorage.java b/src/main/java/cofh/api/energy/IEnergyStorage.java new file mode 100644 index 0000000..4fb7f81 --- /dev/null +++ b/src/main/java/cofh/api/energy/IEnergyStorage.java @@ -0,0 +1,11 @@ +package cofh.api.energy; + +public interface IEnergyStorage { + int receiveEnergy(int var1, boolean var2); + + int extractEnergy(int var1, boolean var2); + + int getEnergyStored(); + + int getMaxEnergyStored(); +} diff --git a/src/main/java/cofh/api/energy/IEnergyTransport.java b/src/main/java/cofh/api/energy/IEnergyTransport.java new file mode 100644 index 0000000..cf56d8f --- /dev/null +++ b/src/main/java/cofh/api/energy/IEnergyTransport.java @@ -0,0 +1,34 @@ +package cofh.api.energy; + +import net.minecraftforge.common.util.ForgeDirection; + +public interface IEnergyTransport extends IEnergyProvider, IEnergyReceiver { + @Override + int getEnergyStored(ForgeDirection var1); + + IEnergyTransport.InterfaceType getTransportState(ForgeDirection var1); + + boolean setTransportState(IEnergyTransport.InterfaceType var1, ForgeDirection var2); + + public static enum InterfaceType { + SEND, + RECEIVE, + BALANCE; + + public IEnergyTransport.InterfaceType getOpposite() { + return this == BALANCE ? BALANCE : (this == SEND ? RECEIVE : SEND); + } + + public IEnergyTransport.InterfaceType rotate() { + return this.rotate(true); + } + + public IEnergyTransport.InterfaceType rotate(boolean forward) { + if (forward) { + return this == BALANCE ? RECEIVE : (this == RECEIVE ? SEND : BALANCE); + } else { + return this == BALANCE ? SEND : (this == SEND ? RECEIVE : BALANCE); + } + } + } +} diff --git a/src/main/java/cofh/api/energy/ItemEnergyContainer.java b/src/main/java/cofh/api/energy/ItemEnergyContainer.java new file mode 100644 index 0000000..9b33d2e --- /dev/null +++ b/src/main/java/cofh/api/energy/ItemEnergyContainer.java @@ -0,0 +1,88 @@ +package cofh.api.energy; + +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +public class ItemEnergyContainer extends Item implements IEnergyContainerItem { + protected int capacity; + protected int maxReceive; + protected int maxExtract; + + public ItemEnergyContainer() { + } + + public ItemEnergyContainer(int capacity) { + this(capacity, capacity, capacity); + } + + public ItemEnergyContainer(int capacity, int maxTransfer) { + this(capacity, maxTransfer, maxTransfer); + } + + public ItemEnergyContainer(int capacity, int maxReceive, int maxExtract) { + this.capacity = capacity; + this.maxReceive = maxReceive; + this.maxExtract = maxExtract; + } + + public ItemEnergyContainer setCapacity(int capacity) { + this.capacity = capacity; + return this; + } + + public void setMaxTransfer(int maxTransfer) { + this.setMaxReceive(maxTransfer); + this.setMaxExtract(maxTransfer); + } + + public void setMaxReceive(int maxReceive) { + this.maxReceive = maxReceive; + } + + public void setMaxExtract(int maxExtract) { + this.maxExtract = maxExtract; + } + + @Override + public int receiveEnergy(ItemStack container, int maxReceive, boolean simulate) { + if (container.stackTagCompound == null) { + container.stackTagCompound = new NBTTagCompound(); + } + + int energy = container.stackTagCompound.getInteger("Energy"); + int energyReceived = Math.min(this.capacity - energy, Math.min(this.maxReceive, maxReceive)); + if (!simulate) { + energy += energyReceived; + container.stackTagCompound.setInteger("Energy", energy); + } + + return energyReceived; + } + + @Override + public int extractEnergy(ItemStack container, int maxExtract, boolean simulate) { + if (container.stackTagCompound != null && container.stackTagCompound.hasKey("Energy")) { + int energy = container.stackTagCompound.getInteger("Energy"); + int energyExtracted = Math.min(energy, Math.min(this.maxExtract, maxExtract)); + if (!simulate) { + energy -= energyExtracted; + container.stackTagCompound.setInteger("Energy", energy); + } + + return energyExtracted; + } else { + return 0; + } + } + + @Override + public int getEnergyStored(ItemStack container) { + return container.stackTagCompound != null && container.stackTagCompound.hasKey("Energy") ? container.stackTagCompound.getInteger("Energy") : 0; + } + + @Override + public int getMaxEnergyStored(ItemStack container) { + return this.capacity; + } +} diff --git a/src/main/java/cofh/api/energy/TileEnergyHandler.java b/src/main/java/cofh/api/energy/TileEnergyHandler.java new file mode 100644 index 0000000..f52386e --- /dev/null +++ b/src/main/java/cofh/api/energy/TileEnergyHandler.java @@ -0,0 +1,44 @@ +package cofh.api.energy; + +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; + +public class TileEnergyHandler extends TileEntity implements IEnergyHandler { + protected EnergyStorage storage = new EnergyStorage(32000); + + public void readFromNBT(NBTTagCompound nbt) { + super.readFromNBT(nbt); + this.storage.readFromNBT(nbt); + } + + public void writeToNBT(NBTTagCompound nbt) { + super.writeToNBT(nbt); + this.storage.writeToNBT(nbt); + } + + @Override + public boolean canConnectEnergy(ForgeDirection from) { + return true; + } + + @Override + public int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate) { + return this.storage.receiveEnergy(maxReceive, simulate); + } + + @Override + public int extractEnergy(ForgeDirection from, int maxExtract, boolean simulate) { + return this.storage.extractEnergy(maxExtract, simulate); + } + + @Override + public int getEnergyStored(ForgeDirection from) { + return this.storage.getEnergyStored(); + } + + @Override + public int getMaxEnergyStored(ForgeDirection from) { + return this.storage.getMaxEnergyStored(); + } +} diff --git a/src/main/java/com/eloraam/redpower/Flags.java b/src/main/java/com/eloraam/redpower/Flags.java new file mode 100644 index 0000000..4b9505a --- /dev/null +++ b/src/main/java/com/eloraam/redpower/Flags.java @@ -0,0 +1,6 @@ +package com.eloraam.redpower; + +public class Flags { + public static final boolean SERVER = true; + public static final boolean CLIENT = true; +} diff --git a/src/main/java/com/eloraam/redpower/RedPowerBase.java b/src/main/java/com/eloraam/redpower/RedPowerBase.java new file mode 100644 index 0000000..9b24ac0 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/RedPowerBase.java @@ -0,0 +1,525 @@ +package com.eloraam.redpower; + +import com.eloraam.redpower.base.BlockAppliance; +import com.eloraam.redpower.base.BlockMicro; +import com.eloraam.redpower.base.ContainerAdvBench; +import com.eloraam.redpower.base.ContainerAlloyFurnace; +import com.eloraam.redpower.base.ContainerBag; +import com.eloraam.redpower.base.ContainerBusId; +import com.eloraam.redpower.base.GuiAdvBench; +import com.eloraam.redpower.base.GuiAlloyFurnace; +import com.eloraam.redpower.base.GuiBag; +import com.eloraam.redpower.base.GuiBusId; +import com.eloraam.redpower.base.ItemBag; +import com.eloraam.redpower.base.ItemDrawplate; +import com.eloraam.redpower.base.ItemDyeIndigo; +import com.eloraam.redpower.base.ItemHandsaw; +import com.eloraam.redpower.base.ItemMicro; +import com.eloraam.redpower.base.ItemPlan; +import com.eloraam.redpower.base.ItemScrewdriver; +import com.eloraam.redpower.base.RecipeBag; +import com.eloraam.redpower.base.RenderAdvBench; +import com.eloraam.redpower.base.RenderAlloyFurnace; +import com.eloraam.redpower.base.TileAdvBench; +import com.eloraam.redpower.base.TileAlloyFurnace; +import com.eloraam.redpower.core.AchieveLib; +import com.eloraam.redpower.core.BlockMultiblock; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.CoverLib; +import com.eloraam.redpower.core.CraftLib; +import com.eloraam.redpower.core.IRedbusConnectable; +import com.eloraam.redpower.core.ItemExtended; +import com.eloraam.redpower.core.ItemParts; +import com.eloraam.redpower.core.OreStack; +import com.eloraam.redpower.core.RenderLib; +import com.eloraam.redpower.core.TileCovered; +import com.eloraam.redpower.core.TileMultiblock; +import cpw.mods.fml.client.registry.ClientRegistry; +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.Mod; +import cpw.mods.fml.common.Mod.EventHandler; +import cpw.mods.fml.common.Mod.Instance; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.network.IGuiHandler; +import cpw.mods.fml.common.network.NetworkRegistry; +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.inventory.InventoryBasic; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.CraftingManager; +import net.minecraft.stats.AchievementList; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import net.minecraftforge.client.event.TextureStitchEvent.Pre; +import net.minecraftforge.common.AchievementPage; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.oredict.OreDictionary; + +@Mod( + modid = "RedPowerBase", + name = "RedPower Base", + version = "2.0pr6", + dependencies = "required-after:RedPowerCore" +) +public class RedPowerBase implements IGuiHandler { + @Instance("RedPowerBase") + public static RedPowerBase instance; + public static BlockAppliance blockAppliance; + public static Item itemHandsawIron; + public static Item itemHandsawDiamond; + public static ItemParts itemLumar; + public static ItemParts itemResource; + public static ItemStack itemRuby; + public static ItemStack itemGreenSapphire; + public static ItemStack itemSapphire; + public static ItemStack itemIngotSilver; + public static ItemStack itemIngotTin; + public static ItemStack itemIngotCopper; + public static ItemStack itemIngotTungsten; + public static ItemStack itemDustTungsten; + public static ItemStack itemDustSilver; + public static ItemStack itemNikolite; + public static ItemParts itemAlloy; + public static ItemStack itemIngotRed; + public static ItemStack itemIngotBlue; + public static ItemStack itemIngotBrass; + public static ItemStack itemBouleSilicon; + public static ItemStack itemWaferSilicon; + public static ItemStack itemWaferBlue; + public static ItemStack itemWaferRed; + public static ItemStack itemTinplate; + public static ItemStack itemFineCopper; + public static ItemStack itemFineIron; + public static ItemStack itemCopperCoil; + public static ItemStack itemMotor; + public static ItemStack itemCanvas; + public static ItemParts itemNugget; + public static ItemStack itemNuggetIron; + public static ItemStack itemNuggetSilver; + public static ItemStack itemNuggetTin; + public static ItemStack itemNuggetCopper; + public static ItemStack itemNuggetTungsten; + public static Item itemDyeIndigo; + public static BlockMicro blockMicro; + public static BlockMultiblock blockMultiblock; + public static ItemScrewdriver itemScrewdriver; + public static Item itemDrawplateDiamond; + public static Item itemPlanBlank; + public static Item itemPlanFull; + public static Item itemBag; + @SideOnly(Side.CLIENT) + public static IIcon projectTableTop; + @SideOnly(Side.CLIENT) + public static IIcon projectTableBottom; + @SideOnly(Side.CLIENT) + public static IIcon projectTableFront; + @SideOnly(Side.CLIENT) + public static IIcon projectTableSide; + @SideOnly(Side.CLIENT) + public static IIcon alloyFurnaceVert; + @SideOnly(Side.CLIENT) + public static IIcon alloyFurnaceSide; + @SideOnly(Side.CLIENT) + public static IIcon alloyFurnaceFront; + @SideOnly(Side.CLIENT) + public static IIcon alloyFurnaceFrontOn; + + public static void initBaseItems() { + itemLumar = new ItemParts(); + itemLumar.setCreativeTab(CreativeTabs.tabMaterials); + + for(int color = 0; color < 16; ++color) { + itemLumar.addItem(color, "rpbase:lumar/" + color, "item.rplumar." + CoreLib.rawColorNames[color]); + ItemStack dye = new ItemStack(Items.dye, 1, 15 - color); + GameRegistry.addShapelessRecipe(new ItemStack(itemLumar, 2, color), new Object[]{Items.redstone, dye, dye, Items.glowstone_dust}); + } + + itemResource = new ItemParts(); + itemAlloy = new ItemParts(); + itemResource.setCreativeTab(CreativeTabs.tabMaterials); + itemAlloy.setCreativeTab(CreativeTabs.tabMaterials); + itemResource.addItem(0, "rpbase:ruby", "item.ruby"); + itemResource.addItem(1, "rpbase:greenSapphire", "item.greenSapphire"); + itemResource.addItem(2, "rpbase:sapphire", "item.sapphire"); + itemResource.addItem(3, "rpbase:silverIngot", "item.ingotSilver"); + itemResource.addItem(4, "rpbase:tinIngot", "item.ingotTin"); + itemResource.addItem(5, "rpbase:copperIngot", "item.ingotCopper"); + itemResource.addItem(6, "rpbase:nikolite", "item.nikolite"); + itemResource.addItem(7, "rpbase:ingotTungsten", "item.ingotTungsten"); + itemResource.addItem(8, "rpbase:dustTungsten", "item.dustTungsten"); + itemResource.addItem(9, "rpbase:dustSilver", "item.dustSilver"); + itemAlloy.addItem(0, "rpbase:ingotRed", "item.ingotRed"); + itemAlloy.addItem(1, "rpbase:ingotBlue", "item.ingotBlue"); + itemAlloy.addItem(2, "rpbase:ingotBrass", "item.ingotBrass"); + itemAlloy.addItem(3, "rpbase:bouleSilicon", "item.bouleSilicon"); + itemAlloy.addItem(4, "rpbase:waferSilicon", "item.waferSilicon"); + itemAlloy.addItem(5, "rpbase:waferBlue", "item.waferBlue"); + itemAlloy.addItem(6, "rpbase:waferRed", "item.waferRed"); + itemAlloy.addItem(7, "rpbase:tinPlate", "item.tinplate"); + itemAlloy.addItem(8, "rpbase:fineCopper", "item.finecopper"); + itemAlloy.addItem(9, "rpbase:fineIron", "item.fineiron"); + itemAlloy.addItem(10, "rpbase:copperCoil", "item.coppercoil"); + itemAlloy.addItem(11, "rpbase:btMotor", "item.btmotor"); + itemAlloy.addItem(12, "rpbase:canvas", "item.rpcanvas"); + itemRuby = new ItemStack(itemResource, 1, 0); + itemGreenSapphire = new ItemStack(itemResource, 1, 1); + itemSapphire = new ItemStack(itemResource, 1, 2); + itemIngotSilver = new ItemStack(itemResource, 1, 3); + itemIngotTin = new ItemStack(itemResource, 1, 4); + itemIngotCopper = new ItemStack(itemResource, 1, 5); + itemNikolite = new ItemStack(itemResource, 1, 6); + itemIngotTungsten = new ItemStack(itemResource, 1, 7); + itemDustTungsten = new ItemStack(itemResource, 1, 8); + itemDustSilver = new ItemStack(itemResource, 1, 9); + itemIngotRed = new ItemStack(itemAlloy, 1, 0); + itemIngotBlue = new ItemStack(itemAlloy, 1, 1); + itemIngotBrass = new ItemStack(itemAlloy, 1, 2); + itemBouleSilicon = new ItemStack(itemAlloy, 1, 3); + itemWaferSilicon = new ItemStack(itemAlloy, 1, 4); + itemWaferBlue = new ItemStack(itemAlloy, 1, 5); + itemWaferRed = new ItemStack(itemAlloy, 1, 6); + itemTinplate = new ItemStack(itemAlloy, 1, 7); + itemFineCopper = new ItemStack(itemAlloy, 1, 8); + itemFineIron = new ItemStack(itemAlloy, 1, 9); + itemCopperCoil = new ItemStack(itemAlloy, 1, 10); + itemMotor = new ItemStack(itemAlloy, 1, 11); + itemCanvas = new ItemStack(itemAlloy, 1, 12); + itemNugget = new ItemParts(); + itemNugget.setCreativeTab(CreativeTabs.tabMaterials); + itemNugget.addItem(0, "rpbase:nuggetIron", "item.nuggetIron"); + itemNugget.addItem(1, "rpbase:nuggetSilver", "item.nuggetSilver"); + itemNugget.addItem(2, "rpbase:nuggetTin", "item.nuggetTin"); + itemNugget.addItem(3, "rpbase:nuggetCopper", "item.nuggetCopper"); + itemNugget.addItem(4, "rpbase:nuggetTungsten", "item.nuggetTungsten"); + itemNuggetIron = new ItemStack(itemNugget, 1, 0); + itemNuggetSilver = new ItemStack(itemNugget, 1, 1); + itemNuggetTin = new ItemStack(itemNugget, 1, 2); + itemNuggetCopper = new ItemStack(itemNugget, 1, 3); + itemNuggetTungsten = new ItemStack(itemNugget, 1, 4); + itemDrawplateDiamond = new ItemDrawplate(); + itemDrawplateDiamond.setUnlocalizedName("drawplateDiamond").setMaxDamage(255).setTextureName("rpbase:diamondDrawplate"); + GameRegistry.registerItem(itemDrawplateDiamond, "drawplateDiamond"); + itemBag = new ItemBag(); + GameRegistry.addRecipe(new ItemStack(itemBag, 1, 0), new Object[]{"CCC", "C C", "CCC", 'C', itemCanvas}); + + for(int color = 1; color < 16; ++color) { + GameRegistry.addRecipe( + new ItemStack(itemBag, 1, color), new Object[]{"CCC", "CDC", "CCC", 'C', itemCanvas, 'D', new ItemStack(Items.dye, 1, 15 - color)} + ); + } + + GameRegistry.registerItem(itemLumar, "lumar"); + GameRegistry.registerItem(itemResource, "resource"); + OreDictionary.registerOre("gemRuby", itemRuby); + OreDictionary.registerOre("gemGreenSapphire", itemGreenSapphire); + OreDictionary.registerOre("gemSapphire", itemSapphire); + OreDictionary.registerOre("ingotTin", itemIngotTin); + OreDictionary.registerOre("ingotCopper", itemIngotCopper); + OreDictionary.registerOre("ingotSilver", itemIngotSilver); + OreDictionary.registerOre("ingotTungsten", itemIngotTungsten); + OreDictionary.registerOre("dustNikolite", itemNikolite); + OreDictionary.registerOre("dustTungsten", itemDustTungsten); + GameRegistry.registerItem(itemAlloy, "alloy"); + OreDictionary.registerOre("ingotBrass", itemIngotBrass); + GameRegistry.registerItem(itemNugget, "nugget"); + OreDictionary.registerOre("nuggetIron", itemNuggetIron); + OreDictionary.registerOre("nuggetSilver", itemNuggetSilver); + OreDictionary.registerOre("nuggetTin", itemNuggetTin); + OreDictionary.registerOre("nuggetCopper", itemNuggetCopper); + OreDictionary.registerOre("nuggetTungsten", itemNuggetTungsten); + GameRegistry.registerItem(itemBag, "canvasBag"); + } + + public static void initIndigo() { + itemDyeIndigo = new ItemDyeIndigo(); + GameRegistry.registerItem(itemDyeIndigo, "dyeIndigo"); + OreDictionary.registerOre("dyeBlue", new ItemStack(itemDyeIndigo)); + GameRegistry.addShapelessRecipe(new ItemStack(Blocks.wool, 1, 11), new Object[]{itemDyeIndigo, Blocks.wool}); + GameRegistry.addShapelessRecipe(new ItemStack(Items.dye, 2, 12), new Object[]{itemDyeIndigo, new ItemStack(Items.dye, 1, 15)}); + GameRegistry.addShapelessRecipe(new ItemStack(Items.dye, 2, 6), new Object[]{itemDyeIndigo, new ItemStack(Items.dye, 1, 2)}); + GameRegistry.addShapelessRecipe(new ItemStack(Items.dye, 2, 5), new Object[]{itemDyeIndigo, new ItemStack(Items.dye, 1, 1)}); + GameRegistry.addShapelessRecipe( + new ItemStack(Items.dye, 3, 13), new Object[]{itemDyeIndigo, new ItemStack(Items.dye, 1, 1), new ItemStack(Items.dye, 1, 9)} + ); + GameRegistry.addShapelessRecipe( + new ItemStack(Items.dye, 4, 13), + new Object[]{itemDyeIndigo, new ItemStack(Items.dye, 1, 1), new ItemStack(Items.dye, 1, 1), new ItemStack(Items.dye, 1, 15)} + ); + CraftLib.addShapelessOreRecipe(new ItemStack(itemLumar, 2, 11), Items.redstone, "dyeBlue", "dyeBlue", Items.glowstone_dust); + CraftLib.addOreRecipe(new ItemStack(itemBag, 1, 11), "CCC", "CDC", "CCC", 'C', itemCanvas, 'D', "dyeBlue"); + itemPlanBlank = new Item().setTextureName("rpbase:planBlank"); + itemPlanBlank.setUnlocalizedName("planBlank"); + itemPlanBlank.setCreativeTab(CreativeTabs.tabMisc); + GameRegistry.addShapelessRecipe(new ItemStack(itemPlanBlank), new Object[]{Items.paper, itemDyeIndigo}); + GameRegistry.registerItem(itemPlanBlank, "planBlank"); + itemPlanFull = new ItemPlan(); + GameRegistry.registerItem(itemPlanFull, "planFull"); + } + + public static void initAlloys() { + CraftLib.addAlloyResult(itemIngotRed, new ItemStack(Items.redstone, 4), new ItemStack(Items.iron_ingot, 1)); + CraftLib.addAlloyResult(itemIngotRed, new ItemStack(Items.redstone, 4), new OreStack("ingotCopper")); + CraftLib.addAlloyResult(CoreLib.copyStack(itemIngotBrass, 4), new OreStack("ingotTin"), new OreStack("ingotCopper", 3)); + CraftLib.addAlloyResult(CoreLib.copyStack(itemTinplate, 4), new OreStack("ingotTin"), new ItemStack(Items.iron_ingot, 2)); + CraftLib.addAlloyResult(itemIngotBlue, new OreStack("ingotSilver"), new OreStack("dustNikolite", 4)); + CraftLib.addAlloyResult(new ItemStack(Items.iron_ingot, 3), new ItemStack(Blocks.rail, 8)); + CraftLib.addAlloyResult(new ItemStack(Items.iron_ingot, 3), new ItemStack(Items.bucket, 1)); + CraftLib.addAlloyResult(new ItemStack(Items.iron_ingot, 5), new ItemStack(Items.minecart, 1)); + CraftLib.addAlloyResult(new ItemStack(Items.iron_ingot, 6), new ItemStack(Items.iron_door, 1)); + CraftLib.addAlloyResult(new ItemStack(Items.iron_ingot, 3), new ItemStack(Blocks.iron_bars, 8)); + CraftLib.addAlloyResult(new ItemStack(Items.iron_ingot, 31), new ItemStack(Blocks.anvil, 1, 0)); + CraftLib.addAlloyResult(new ItemStack(Items.iron_ingot, 31), new ItemStack(Blocks.anvil, 1, 1)); + CraftLib.addAlloyResult(new ItemStack(Items.iron_ingot, 31), new ItemStack(Blocks.anvil, 1, 2)); + CraftLib.addAlloyResult(new ItemStack(Items.iron_ingot, 2), new ItemStack(Items.iron_sword, 1)); + CraftLib.addAlloyResult(new ItemStack(Items.iron_ingot, 3), new ItemStack(Items.iron_pickaxe, 1)); + CraftLib.addAlloyResult(new ItemStack(Items.iron_ingot, 3), new ItemStack(Items.iron_axe, 1)); + CraftLib.addAlloyResult(new ItemStack(Items.iron_ingot, 1), new ItemStack(Items.iron_shovel, 1)); + CraftLib.addAlloyResult(new ItemStack(Items.iron_ingot, 2), new ItemStack(Items.iron_hoe, 1)); + CraftLib.addAlloyResult(new ItemStack(Items.gold_ingot, 2), new ItemStack(Items.golden_sword, 1)); + CraftLib.addAlloyResult(new ItemStack(Items.gold_ingot, 3), new ItemStack(Items.golden_pickaxe, 1)); + CraftLib.addAlloyResult(new ItemStack(Items.gold_ingot, 3), new ItemStack(Items.golden_axe, 1)); + CraftLib.addAlloyResult(new ItemStack(Items.gold_ingot, 1), new ItemStack(Items.golden_shovel, 1)); + CraftLib.addAlloyResult(new ItemStack(Items.gold_ingot, 2), new ItemStack(Items.golden_hoe, 1)); + CraftLib.addAlloyResult(new ItemStack(Items.iron_ingot, 5), new ItemStack(Items.iron_helmet, 1)); + CraftLib.addAlloyResult(new ItemStack(Items.iron_ingot, 8), new ItemStack(Items.iron_chestplate, 1)); + CraftLib.addAlloyResult(new ItemStack(Items.iron_ingot, 7), new ItemStack(Items.iron_leggings, 1)); + CraftLib.addAlloyResult(new ItemStack(Items.iron_ingot, 4), new ItemStack(Items.iron_boots, 1)); + CraftLib.addAlloyResult(new ItemStack(Items.iron_ingot, 5), new ItemStack(Items.iron_horse_armor, 1)); + CraftLib.addAlloyResult(new ItemStack(Items.gold_ingot, 5), new ItemStack(Items.golden_helmet, 1)); + CraftLib.addAlloyResult(new ItemStack(Items.gold_ingot, 8), new ItemStack(Items.golden_chestplate, 1)); + CraftLib.addAlloyResult(new ItemStack(Items.gold_ingot, 7), new ItemStack(Items.golden_leggings, 1)); + CraftLib.addAlloyResult(new ItemStack(Items.gold_ingot, 4), new ItemStack(Items.golden_boots, 1)); + CraftLib.addAlloyResult(new ItemStack(Items.gold_ingot, 5), new ItemStack(Items.golden_horse_armor, 1)); + CraftLib.addAlloyResult(new ItemStack(Items.gold_ingot, 1), new ItemStack(Items.gold_nugget, 9)); + CraftLib.addAlloyResult(new ItemStack(Items.iron_ingot, 1), CoreLib.copyStack(itemNuggetIron, 9)); + CraftLib.addAlloyResult(itemIngotSilver, CoreLib.copyStack(itemNuggetSilver, 9)); + CraftLib.addAlloyResult(itemIngotCopper, CoreLib.copyStack(itemNuggetCopper, 9)); + CraftLib.addAlloyResult(itemIngotTin, CoreLib.copyStack(itemNuggetTin, 9)); + CraftLib.addAlloyResult(itemIngotTungsten, CoreLib.copyStack(itemNuggetTungsten, 9)); + CraftLib.addAlloyResult(itemIngotCopper, itemFineCopper); + CraftLib.addAlloyResult(new ItemStack(Items.iron_ingot, 1), itemFineIron); + CraftLib.addAlloyResult(itemBouleSilicon, new ItemStack(Items.coal, 8, 0), new ItemStack(Blocks.sand, 8)); + CraftLib.addAlloyResult(itemBouleSilicon, new ItemStack(Items.coal, 8, 1), new ItemStack(Blocks.sand, 8)); + CraftLib.addAlloyResult(itemWaferBlue, CoreLib.copyStack(itemWaferSilicon, 1), new OreStack("dustNikolite", 4)); + CraftLib.addAlloyResult(itemWaferRed, CoreLib.copyStack(itemWaferSilicon, 1), new ItemStack(Items.redstone, 4)); + } + + public static void initMicroblocks() { + blockMicro = new BlockMicro(); + blockMicro.setBlockName("rpwire"); + GameRegistry.registerBlock(blockMicro, ItemMicro.class, "microblock"); + blockMicro.addTileEntityMapping(0, TileCovered::new); + CoverLib.blockCoverPlate = blockMicro; + } + + public static void initCoverMaterials() { + CoverLib.addMaterial(0, 1, Blocks.cobblestone, "cobble"); + CoverLib.addMaterial(1, 1, Blocks.stone, "stone"); + CoverLib.addMaterial(2, 0, Blocks.planks, "planks"); + CoverLib.addMaterial(3, 1, Blocks.sandstone, "sandstone"); + CoverLib.addMaterial(4, 1, Blocks.mossy_cobblestone, "moss"); + CoverLib.addMaterial(5, 1, Blocks.brick_block, "brick"); + CoverLib.addMaterial(6, 2, Blocks.obsidian, "obsidian"); + CoverLib.addMaterial(7, 1, true, Blocks.glass, "glass"); + CoverLib.addMaterial(8, 0, Blocks.dirt, "dirt"); + CoverLib.addMaterial(9, 0, Blocks.clay, "clay"); + CoverLib.addMaterial(10, 0, Blocks.bookshelf, "books"); + CoverLib.addMaterial(11, 0, Blocks.netherrack, "netherrack"); + CoverLib.addMaterial(12, 0, Blocks.log, 0, "wood"); + CoverLib.addMaterial(13, 0, Blocks.log, 1, "wood1"); + CoverLib.addMaterial(14, 0, Blocks.log, 2, "wood2"); + CoverLib.addMaterial(15, 0, Blocks.soul_sand, "soul"); + CoverLib.addMaterial(16, 1, Blocks.stone_slab, "slab"); + CoverLib.addMaterial(17, 1, Blocks.iron_block, "iron"); + CoverLib.addMaterial(18, 1, Blocks.gold_block, "gold"); + CoverLib.addMaterial(19, 2, Blocks.diamond_block, "diamond"); + CoverLib.addMaterial(20, 1, Blocks.lapis_block, "lapis"); + CoverLib.addMaterial(21, 0, Blocks.snow, "snow"); + CoverLib.addMaterial(22, 0, Blocks.pumpkin, "pumpkin"); + CoverLib.addMaterial(23, 1, Blocks.stonebrick, 0, "stonebrick"); + CoverLib.addMaterial(24, 1, Blocks.stonebrick, 1, "stonebrick1"); + CoverLib.addMaterial(25, 1, Blocks.stonebrick, 2, "stonebrick2"); + CoverLib.addMaterial(26, 1, Blocks.nether_brick, "netherbrick"); + CoverLib.addMaterial(27, 1, Blocks.stonebrick, 3, "stonebrick3"); + CoverLib.addMaterial(28, 0, Blocks.planks, 1, "planks1"); + CoverLib.addMaterial(29, 0, Blocks.planks, 2, "planks2"); + CoverLib.addMaterial(30, 0, Blocks.planks, 3, "planks3"); + CoverLib.addMaterial(31, 1, Blocks.sandstone, 1, "sandstone1"); + + for(int color = 0; color < 16; ++color) { + CoverLib.addMaterial(32 + color, 0, Blocks.wool, color, "wool." + CoreLib.rawColorNames[color]); + } + + CoverLib.addMaterial(64, 1, Blocks.sandstone, 2, "sandstone2"); + CoverLib.addMaterial(65, 0, Blocks.log, 3, "wood3"); + } + + public static void initAchievements() { + AchieveLib.registerAchievement("rpMakeAlloy", 0, 0, new ItemStack(blockAppliance, 1, 0), AchievementList.buildFurnace); + AchieveLib.registerAchievement("rpMakeSaw", 4, 0, new ItemStack(itemHandsawDiamond), AchievementList.diamonds); + AchieveLib.registerAchievement("rpIngotRed", 2, 2, itemIngotRed, "rpMakeAlloy"); + AchieveLib.registerAchievement("rpIngotBlue", 2, 4, itemIngotBlue, "rpMakeAlloy"); + AchieveLib.registerAchievement("rpIngotBrass", 2, 6, itemIngotBrass, "rpMakeAlloy"); + AchieveLib.registerAchievement("rpAdvBench", -2, 0, new ItemStack(blockAppliance, 1, 3), AchievementList.buildWorkBench); + AchieveLib.addCraftingAchievement(new ItemStack(blockAppliance, 1, 0), "rpMakeAlloy"); + AchieveLib.addCraftingAchievement(new ItemStack(blockAppliance, 1, 3), "rpAdvBench"); + AchieveLib.addCraftingAchievement(new ItemStack(itemHandsawDiamond), "rpMakeSaw"); + AchieveLib.addAlloyAchievement(itemIngotRed, "rpIngotRed"); + AchieveLib.addAlloyAchievement(itemIngotBlue, "rpIngotBlue"); + AchieveLib.addAlloyAchievement(itemIngotBrass, "rpIngotBrass"); + AchievementPage.registerAchievementPage(AchieveLib.achievepage); + } + + public static void initBlocks() { + blockMultiblock = new BlockMultiblock(); + GameRegistry.registerBlock(blockMultiblock, "multiblock"); + GameRegistry.registerTileEntity(TileMultiblock.class, "RPMulti"); + blockAppliance = new BlockAppliance(); + GameRegistry.registerBlock(blockAppliance, ItemExtended.class, "appliance"); + GameRegistry.registerTileEntity(TileAlloyFurnace.class, "RPAFurnace"); + blockAppliance.addTileEntityMapping(0, TileAlloyFurnace::new); + blockAppliance.setBlockName(0, "rpafurnace"); + GameRegistry.addRecipe(new ItemStack(blockAppliance, 1, 0), new Object[]{"BBB", "B B", "BBB", 'B', Blocks.brick_block}); + GameRegistry.registerTileEntity(TileAdvBench.class, "RPAdvBench"); + blockAppliance.addTileEntityMapping(3, TileAdvBench::new); + blockAppliance.setBlockName(3, "rpabench"); + CraftLib.addOreRecipe( + new ItemStack(blockAppliance, 1, 3), "SSS", "WTW", "WCW", 'S', Blocks.stone, 'W', "plankWood", 'T', Blocks.crafting_table, 'C', Blocks.chest + ); + itemHandsawIron = new ItemHandsaw(0); + itemHandsawIron.setUnlocalizedName("handsawIron"); + itemHandsawIron.setTextureName("rpworld:handsawIron"); + itemHandsawIron.setMaxDamage(320); + GameRegistry.registerItem(itemHandsawIron, "ironHandshaw"); + itemHandsawDiamond = new ItemHandsaw(2); + itemHandsawDiamond.setUnlocalizedName("handsawDiamond"); + itemHandsawDiamond.setTextureName("rpworld:handsawDiamond"); + itemHandsawDiamond.setMaxDamage(1280); + GameRegistry.registerItem(itemHandsawDiamond, "diamondHandshaw"); + GameRegistry.addRecipe(new ItemStack(itemHandsawIron, 1), new Object[]{"WWW", " II", " II", 'I', Items.iron_ingot, 'W', Items.stick}); + GameRegistry.addRecipe( + new ItemStack(itemHandsawDiamond, 1), new Object[]{"WWW", " II", " DD", 'I', Items.iron_ingot, 'D', Items.diamond, 'W', Items.stick} + ); + GameRegistry.addShapelessRecipe(CoreLib.copyStack(itemWaferSilicon, 16), new Object[]{itemBouleSilicon, new ItemStack(itemHandsawDiamond, 1, 32767)}); + itemScrewdriver = new ItemScrewdriver(); + GameRegistry.addRecipe(new ItemStack(itemScrewdriver, 1), new Object[]{"I ", " W", 'I', Items.iron_ingot, 'W', Items.stick}); + GameRegistry.registerItem(itemScrewdriver, "screwdriver"); + GameRegistry.addRecipe( + new ItemStack(itemDrawplateDiamond, 1), + new Object[]{" I ", "IDI", " I ", 'I', new ItemStack(blockMicro, 1, 5649), 'D', new ItemStack(blockMicro, 1, 4115)} + ); + GameRegistry.addShapelessRecipe(itemFineIron, new Object[]{Items.iron_ingot, new ItemStack(itemDrawplateDiamond, 1, 32767)}); + CraftLib.addShapelessOreRecipe(itemFineCopper, "ingotCopper", new ItemStack(itemDrawplateDiamond, 1, 32767)); + GameRegistry.addRecipe(CoreLib.copyStack(itemNuggetIron, 9), new Object[]{"I", 'I', Items.iron_ingot}); + CraftLib.addOreRecipe(CoreLib.copyStack(itemNuggetCopper, 9), "I", 'I', "ingotCopper"); + CraftLib.addOreRecipe(CoreLib.copyStack(itemNuggetTin, 9), "I", 'I', "ingotTin"); + CraftLib.addOreRecipe(CoreLib.copyStack(itemNuggetSilver, 9), "I", 'I', "ingotSilver"); + CraftLib.addOreRecipe(CoreLib.copyStack(itemNuggetTungsten, 9), "I", 'I', "ingotTungsten"); + GameRegistry.addRecipe(new ItemStack(Items.iron_ingot, 1, 0), new Object[]{"III", "III", "III", 'I', itemNuggetIron}); + GameRegistry.addRecipe(itemIngotSilver, new Object[]{"III", "III", "III", 'I', itemNuggetSilver}); + GameRegistry.addRecipe(itemIngotTin, new Object[]{"III", "III", "III", 'I', itemNuggetTin}); + GameRegistry.addRecipe(itemIngotCopper, new Object[]{"III", "III", "III", 'I', itemNuggetCopper}); + GameRegistry.addRecipe(itemIngotTungsten, new Object[]{"III", "III", "III", 'I', itemNuggetTungsten}); + GameRegistry.addRecipe(itemCanvas, new Object[]{"SSS", "SWS", "SSS", 'S', Items.string, 'W', Items.stick}); + GameRegistry.addRecipe(new ItemStack(Items.diamond, 2), new Object[]{"D", 'D', new ItemStack(blockMicro, 1, 4115)}); + GameRegistry.addRecipe(new ItemStack(Items.diamond, 1), new Object[]{"D", 'D', new ItemStack(blockMicro, 1, 19)}); + GameRegistry.addRecipe(new ItemStack(Items.iron_ingot, 2), new Object[]{"I", 'I', new ItemStack(blockMicro, 1, 4113)}); + GameRegistry.addRecipe(new ItemStack(Items.iron_ingot, 1), new Object[]{"I", 'I', new ItemStack(blockMicro, 1, 17)}); + } + + @EventHandler + public void preInit(FMLPreInitializationEvent event) { + if (FMLCommonHandler.instance().getSide().isClient()) { + MinecraftForge.EVENT_BUS.register(instance); + } + + } + + @EventHandler + public void load(FMLInitializationEvent event) { + initBaseItems(); + initAlloys(); + initIndigo(); + initMicroblocks(); + initCoverMaterials(); + initBlocks(); + initAchievements(); + CraftingManager.getInstance().getRecipeList().add(new RecipeBag()); + if (FMLCommonHandler.instance().getSide().isClient()) { + this.registerRenderers(); + } + + NetworkRegistry.INSTANCE.registerGuiHandler(instance, instance); + } + + @EventHandler + public void postInit(FMLPostInitializationEvent event) { + } + + @SideOnly(Side.CLIENT) + public void registerRenderers() { + RenderLib.setRenderer(blockAppliance, 0, RenderAlloyFurnace::new); + RenderLib.setRenderer(blockAppliance, 3, RenderAdvBench::new); + ClientRegistry.bindTileEntitySpecialRenderer(TileAlloyFurnace.class, new RenderAlloyFurnace(blockAppliance)); + ClientRegistry.bindTileEntitySpecialRenderer(TileAdvBench.class, new RenderAdvBench(blockAppliance)); + } + + @SideOnly(Side.CLIENT) + @SubscribeEvent + public void onTextureStitch(Pre evt) { + TextureMap map = evt.map; + if (map.getTextureType() == 0) { + projectTableTop = map.registerIcon("rpbase:projectTableTop"); + projectTableBottom = map.registerIcon("rpbase:projectTableBottom"); + projectTableFront = map.registerIcon("rpbase:projectTableFront"); + projectTableSide = map.registerIcon("rpbase:projectTableSide"); + alloyFurnaceVert = map.registerIcon("rpbase:alloyFurnaceVert"); + alloyFurnaceSide = map.registerIcon("rpbase:alloyFurnaceSide"); + alloyFurnaceFront = map.registerIcon("rpbase:alloyFurnaceFront"); + alloyFurnaceFrontOn = map.registerIcon("rpbase:alloyFurnaceFrontOn"); + } + + } + + public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { + switch(ID) { + case 1: + return new GuiAlloyFurnace(player.inventory, CoreLib.getGuiTileEntity(world, x, y, z, TileAlloyFurnace.class)); + case 2: + return new GuiAdvBench(player.inventory, CoreLib.getGuiTileEntity(world, x, y, z, TileAdvBench.class)); + case 3: + return new GuiBusId(player.inventory, new IRedbusConnectable.Dummy(), CoreLib.getGuiTileEntity(world, x, y, z, TileEntity.class)); + case 4: + return new GuiBag(player.inventory, new InventoryBasic("", true, 27)); + default: + return null; + } + } + + public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { + switch(ID) { + case 1: + return new ContainerAlloyFurnace(player.inventory, CoreLib.getTileEntity(world, x, y, z, TileAlloyFurnace.class)); + case 2: + return new ContainerAdvBench(player.inventory, CoreLib.getTileEntity(world, x, y, z, TileAdvBench.class)); + case 3: + return new ContainerBusId(player.inventory, CoreLib.getTileEntity(world, x, y, z, IRedbusConnectable.class)); + case 4: + ItemStack heldItem = player.getHeldItem(); + return new ContainerBag(player.inventory, ItemBag.getBagInventory(heldItem, player), heldItem); + default: + return null; + } + } +} diff --git a/src/main/java/com/eloraam/redpower/RedPowerCompat.java b/src/main/java/com/eloraam/redpower/RedPowerCompat.java new file mode 100644 index 0000000..9ae688e --- /dev/null +++ b/src/main/java/com/eloraam/redpower/RedPowerCompat.java @@ -0,0 +1,129 @@ +package com.eloraam.redpower; + +import com.eloraam.redpower.compat.BlockMachineCompat; +import com.eloraam.redpower.compat.ItemMachineCompat; +import com.eloraam.redpower.compat.RenderBlueEngine; +import com.eloraam.redpower.compat.TileBlueEngine; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.CraftLib; +import com.eloraam.redpower.core.ItemParts; +import com.eloraam.redpower.core.RenderLib; +import cpw.mods.fml.client.registry.ClientRegistry; +import cpw.mods.fml.common.Loader; +import cpw.mods.fml.common.Mod; +import cpw.mods.fml.common.ModContainer; +import cpw.mods.fml.common.Mod.EventHandler; +import cpw.mods.fml.common.Mod.Instance; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.common.network.IGuiHandler; +import cpw.mods.fml.common.network.NetworkRegistry; +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +//import ic2.api.recipe.ICraftingRecipeManager; +//import ic2.api.recipe.Recipes; +//import ic2.core.Ic2Items; +//import ic2.core.block.machine.tileentity.TileEntityMacerator; +//import ic2.core.block.machine.tileentity.TileEntityRotary; +//import ic2.core.block.machine.tileentity.TileEntitySingularity; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +@Mod( + modid = "RedPowerCompat", + name = "RedPower Compat", + version = "2.0pr6", + dependencies = "required-after:RedPowerBase;required-after:RedPowerMachine;required-after:RedPowerWorld;after:IC2;after:Waila" +) +public class RedPowerCompat implements IGuiHandler { + @Instance("RedPowerCompat") + public static RedPowerCompat instance; + public static BlockMachineCompat blockMachineCompat; + public static ItemParts itemCompatParts; + public static ItemStack itemGearBrass; + public static ItemStack itemDenseTungstenPlate; + static boolean ic2reworked; + static boolean waila; + + @EventHandler + public void preInit(FMLPreInitializationEvent event) { + for(ModContainer modContainer : Loader.instance().getActiveModList()) { + if (modContainer.getName().equalsIgnoreCase("Industrial Craft Reworked")) { + ic2reworked = true; + break; + } + } + + waila = Loader.isModLoaded("Waila"); + } + + @EventHandler + public void load(FMLInitializationEvent event) { + this.setupBlocks(); + if (event.getSide().isClient()) { + this.registerRenderers(); + } + + NetworkRegistry.INSTANCE.registerGuiHandler(instance, instance); + } + + @EventHandler + public void postInit(FMLPostInitializationEvent event) { + } + + @SideOnly(Side.CLIENT) + public void registerRenderers() { + RenderLib.setRenderer(blockMachineCompat, 0, RenderBlueEngine::new); + ClientRegistry.bindTileEntitySpecialRenderer(TileBlueEngine.class, new RenderBlueEngine(blockMachineCompat)); + } + + private void setupBlocks() { + GameRegistry.registerTileEntity(TileBlueEngine.class, "RPBTEngine"); + blockMachineCompat = new BlockMachineCompat(); + GameRegistry.registerBlock(blockMachineCompat, ItemMachineCompat.class, "compat"); + blockMachineCompat.setBlockName(0, "rpbtengine"); + blockMachineCompat.addTileEntityMapping(0, TileBlueEngine::new); + itemCompatParts = new ItemParts(); + itemCompatParts.addItem(0, "rpcompat:gear", "item.rpbgear"); + itemCompatParts.addItem(1, "rpcompat:densePlateTungsten", "item.densePlateTungsten"); + itemCompatParts.setCreativeTab(CreativeTabs.tabMaterials); + GameRegistry.registerItem(itemCompatParts, "parts"); + itemGearBrass = new ItemStack(itemCompatParts, 1, 0); + itemDenseTungstenPlate = new ItemStack(itemCompatParts, 1, 1); + CraftLib.addOreRecipe(new ItemStack(itemCompatParts, 1, 0), " B ", "BIB", " B ", 'B', "ingotBrass", 'I', new ItemStack(RedPowerBase.blockMicro, 1, 5649)); + CraftLib.addOreRecipe( + new ItemStack(blockMachineCompat, 1, 0), "BBB", " G ", "ZMZ", 'B', "ingotBrass", 'G', Blocks.glass, 'Z', itemGearBrass, 'M', RedPowerBase.itemMotor + ); + //TODO: IC2 Classic compat + /*if (ic2reworked) { + TileEntityRotary.addRecipe(new ItemStack(RedPowerWorld.blockOres, 1, 6), new ItemStack(RedPowerBase.itemResource, 2, 8)); + TileEntityMacerator.addRecipe(new ItemStack(RedPowerWorld.blockOres, 1, 3), new ItemStack(RedPowerBase.itemResource, 2, 9)); + TileEntityRotary.addRecipe(RedPowerBase.itemIngotTungsten, new ItemStack(RedPowerBase.itemResource, 1, 8)); + TileEntitySingularity.addRecipe(CoreLib.copyStack(RedPowerBase.itemIngotTungsten, 8), itemDenseTungstenPlate); + ICraftingRecipeManager advRecipes = Recipes.advRecipes; + advRecipes.addRecipe(RedPowerBase.itemRuby, new Object[]{" MM", "MMM", "MM ", 'M', Ic2Items.matter, true}); + advRecipes.addRecipe(RedPowerBase.itemSapphire, new Object[]{"MM ", "MMM", " MM", 'M', Ic2Items.matter, true}); + advRecipes.addRecipe(RedPowerBase.itemGreenSapphire, new Object[]{" MM", "MMM", " MM", 'M', Ic2Items.matter, true}); + advRecipes.addRecipe(RedPowerBase.itemNikolite, new Object[]{"MMM", " M ", 'M', Ic2Items.matter, true}); + advRecipes.addRecipe(RedPowerBase.itemDustSilver, new Object[]{" M", " MM", " M", 'M', Ic2Items.matter, true}); + advRecipes.addRecipe(RedPowerBase.itemDustTungsten, new Object[]{"MMM", "MDM", "MMM", 'M', Ic2Items.matter, 'D', Items.diamond, true}); + advRecipes.addRecipe(RedPowerWorld.itemMarble, new Object[]{"M ", " ", " ", 'M', Ic2Items.matter, true}); + advRecipes.addRecipe(RedPowerWorld.itemBasalt, new Object[]{" M", " ", " ", 'M', Ic2Items.matter, true}); + }*/ + + } + + public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { + return null; + } + + public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { + return null; + } +} diff --git a/src/main/java/com/eloraam/redpower/RedPowerControl.java b/src/main/java/com/eloraam/redpower/RedPowerControl.java new file mode 100644 index 0000000..d5d261a --- /dev/null +++ b/src/main/java/com/eloraam/redpower/RedPowerControl.java @@ -0,0 +1,307 @@ +package com.eloraam.redpower; + +import com.eloraam.redpower.control.BlockPeripheral; +import com.eloraam.redpower.control.ContainerCPU; +import com.eloraam.redpower.control.ContainerDisplay; +import com.eloraam.redpower.control.GuiCPU; +import com.eloraam.redpower.control.GuiDisplay; +import com.eloraam.redpower.control.ItemBackplane; +import com.eloraam.redpower.control.ItemDisk; +import com.eloraam.redpower.control.MicroPlacementRibbon; +import com.eloraam.redpower.control.RenderBackplane; +import com.eloraam.redpower.control.RenderCPU; +import com.eloraam.redpower.control.RenderDiskDrive; +import com.eloraam.redpower.control.RenderDisplay; +import com.eloraam.redpower.control.RenderIOExpander; +import com.eloraam.redpower.control.RenderRibbon; +import com.eloraam.redpower.control.TileBackplane; +import com.eloraam.redpower.control.TileCPU; +import com.eloraam.redpower.control.TileDiskDrive; +import com.eloraam.redpower.control.TileDisplay; +import com.eloraam.redpower.control.TileIOExpander; +import com.eloraam.redpower.control.TileRAM; +import com.eloraam.redpower.control.TileRibbon; +import com.eloraam.redpower.core.BlockExtended; +import com.eloraam.redpower.core.BlockMultipart; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.CraftLib; +import com.eloraam.redpower.core.CreativeExtraTabs; +import com.eloraam.redpower.core.ItemExtended; +import com.eloraam.redpower.core.RenderLib; +import cpw.mods.fml.client.registry.ClientRegistry; +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.Mod; +import cpw.mods.fml.common.Mod.EventHandler; +import cpw.mods.fml.common.Mod.Instance; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.network.IGuiHandler; +import cpw.mods.fml.common.network.NetworkRegistry; +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.util.WeightedRandomChestContent; +import net.minecraft.world.World; +import net.minecraftforge.client.event.TextureStitchEvent.Pre; +import net.minecraftforge.common.ChestGenHooks; +import net.minecraftforge.common.MinecraftForge; + +@Mod( + modid = "RedPowerControl", + name = "RedPower Control", + version = "2.0pr6", + dependencies = "required-after:RedPowerBase" +) +public class RedPowerControl implements IGuiHandler { + @Instance("RedPowerControl") + public static RedPowerControl instance; + public static BlockExtended blockBackplane; + public static BlockExtended blockPeripheral; + public static BlockExtended blockFlatPeripheral; + public static ItemDisk itemDisk; + public static IIcon ribbonTop; + public static IIcon ribbonFace; + @SideOnly(Side.CLIENT) + public static IIcon backplaneTop; + @SideOnly(Side.CLIENT) + public static IIcon backplaneFace; + @SideOnly(Side.CLIENT) + public static IIcon backplaneSide; + @SideOnly(Side.CLIENT) + public static IIcon ram8kTop; + @SideOnly(Side.CLIENT) + public static IIcon ram8kFace; + @SideOnly(Side.CLIENT) + public static IIcon ram8kSide; + @SideOnly(Side.CLIENT) + public static IIcon peripheralBottom; + @SideOnly(Side.CLIENT) + public static IIcon peripheralTop; + @SideOnly(Side.CLIENT) + public static IIcon peripheralSide; + @SideOnly(Side.CLIENT) + public static IIcon peripheralBack; + @SideOnly(Side.CLIENT) + public static IIcon cpuFront; + @SideOnly(Side.CLIENT) + public static IIcon displayFront; + @SideOnly(Side.CLIENT) + public static IIcon diskDriveSide; + @SideOnly(Side.CLIENT) + public static IIcon diskDriveTop; + @SideOnly(Side.CLIENT) + public static IIcon diskDriveFront; + @SideOnly(Side.CLIENT) + public static IIcon diskDriveFrontFull; + @SideOnly(Side.CLIENT) + public static IIcon diskDriveFrontOn; + + @EventHandler + public void preInit(FMLPreInitializationEvent event) { + if (FMLCommonHandler.instance().getSide().isClient()) { + MinecraftForge.EVENT_BUS.register(instance); + } + + } + + @EventHandler + public void load(FMLInitializationEvent event) { + setupBlocks(); + if (FMLCommonHandler.instance().getSide().isClient()) { + this.registerRenderers(); + } + + NetworkRegistry.INSTANCE.registerGuiHandler(instance, instance); + } + + @EventHandler + public void postInit(FMLPostInitializationEvent event) { + } + + private static void setupBlocks() { + blockBackplane = new BlockMultipart(CoreLib.materialRedpower); + GameRegistry.registerBlock(blockBackplane, ItemBackplane.class, "backplane"); + blockBackplane.setCreativeTab(CreativeExtraTabs.tabMachine); + blockBackplane.setHardness(1.0F); + blockBackplane.setBlockName(0, "rpbackplane"); + blockBackplane.setBlockName(1, "rpram"); + blockPeripheral = new BlockPeripheral(); + GameRegistry.registerBlock(blockPeripheral, ItemExtended.class, "peripheral"); + blockPeripheral.setHardness(1.0F); + blockPeripheral.setBlockName(0, "rpdisplay"); + blockPeripheral.setBlockName(1, "rpcpu"); + blockPeripheral.setBlockName(2, "rpdiskdrive"); + blockFlatPeripheral = new BlockMultipart(Material.rock); + blockFlatPeripheral.setCreativeTab(CreativeExtraTabs.tabMachine); + GameRegistry.registerBlock(blockFlatPeripheral, ItemExtended.class, "peripheralFlat"); + blockFlatPeripheral.setHardness(1.0F); + blockFlatPeripheral.setBlockName(0, "rpioexp"); + GameRegistry.registerTileEntity(TileBackplane.class, "RPConBP"); + blockBackplane.addTileEntityMapping(0, TileBackplane::new); + GameRegistry.registerTileEntity(TileRAM.class, "RPConRAM"); + blockBackplane.addTileEntityMapping(1, TileRAM::new); + GameRegistry.registerTileEntity(TileDisplay.class, "RPConDisp"); + blockPeripheral.addTileEntityMapping(0, TileDisplay::new); + GameRegistry.registerTileEntity(TileDiskDrive.class, "RPConDDrv"); + blockPeripheral.addTileEntityMapping(2, TileDiskDrive::new); + GameRegistry.registerTileEntity(TileCPU.class, "RPConCPU"); + blockPeripheral.addTileEntityMapping(1, TileCPU::new); + GameRegistry.registerTileEntity(TileIOExpander.class, "RPConIOX"); + blockFlatPeripheral.addTileEntityMapping(0, TileIOExpander::new); + GameRegistry.registerTileEntity(TileRibbon.class, "RPConRibbon"); + RedPowerBase.blockMicro.addTileEntityMapping(12, TileRibbon::new); + MicroPlacementRibbon imp = new MicroPlacementRibbon(); + RedPowerBase.blockMicro.registerPlacement(12, imp); + itemDisk = new ItemDisk(); + itemDisk.setCreativeTab(CreativeExtraTabs.tabMachine); + CraftLib.addOreRecipe(new ItemStack(itemDisk, 1), "WWW", "W W", "WIW", 'I', Items.iron_ingot, 'W', "plankWood"); + GameRegistry.addShapelessRecipe(new ItemStack(itemDisk, 1, 1), new Object[]{new ItemStack(itemDisk, 1, 0), Items.redstone}); + GameRegistry.registerItem(itemDisk, "diskette"); + GameRegistry.addShapelessRecipe(new ItemStack(itemDisk, 1, 2), new Object[]{new ItemStack(itemDisk, 1, 1), Items.redstone}); + GameRegistry.addRecipe( + new ItemStack(blockBackplane, 1, 0), new Object[]{"ICI", "IGI", "ICI", 'C', RedPowerBase.itemFineCopper, 'I', Blocks.iron_bars, 'G', Items.gold_ingot} + ); + GameRegistry.addRecipe( + new ItemStack(blockBackplane, 1, 1), new Object[]{"IRI", "RDR", "IRI", 'I', Blocks.iron_bars, 'R', RedPowerBase.itemWaferRed, 'D', Items.diamond} + ); + CraftLib.addOreRecipe( + new ItemStack(blockPeripheral, 1, 0), + "GWW", + "GPR", + "GBW", + 'P', + new ItemStack(RedPowerBase.itemLumar, 1, 5), + 'G', + Blocks.glass, + 'W', + "plankWood", + 'R', + RedPowerBase.itemWaferRed, + 'B', + new ItemStack(RedPowerBase.blockMicro, 1, 3072) + ); + CraftLib.addOreRecipe( + new ItemStack(blockPeripheral, 1, 1), + "WWW", + "RDR", + "WBW", + 'W', + "plankWood", + 'D', + Blocks.diamond_block, + 'R', + RedPowerBase.itemWaferRed, + 'B', + new ItemStack(RedPowerBase.blockMicro, 1, 3072) + ); + CraftLib.addOreRecipe( + new ItemStack(blockPeripheral, 1, 2), + "WWW", + "WMR", + "WBW", + 'G', + Blocks.glass, + 'W', + "plankWood", + 'M', + RedPowerBase.itemMotor, + 'R', + RedPowerBase.itemWaferRed, + 'B', + new ItemStack(RedPowerBase.blockMicro, 1, 3072) + ); + CraftLib.addOreRecipe( + new ItemStack(blockFlatPeripheral, 1, 0), + "WCW", + "WRW", + "WBW", + 'W', + "plankWood", + 'R', + RedPowerBase.itemWaferRed, + 'C', + new ItemStack(RedPowerBase.blockMicro, 1, 768), + 'B', + new ItemStack(RedPowerBase.blockMicro, 1, 3072) + ); + GameRegistry.addRecipe(new ItemStack(RedPowerBase.blockMicro, 8, 3072), new Object[]{"C", "C", "C", 'C', RedPowerBase.itemFineCopper}); + ChestGenHooks.addItem("dungeonChest", new WeightedRandomChestContent(new ItemStack(itemDisk, 1, 1), 0, 1, 1)); + ChestGenHooks.addItem("dungeonChest", new WeightedRandomChestContent(new ItemStack(itemDisk, 1, 2), 0, 1, 1)); + } + + @SideOnly(Side.CLIENT) + public void registerRenderers() { + RenderLib.setRenderer(blockBackplane, 0, RenderBackplane::new); + RenderLib.setRenderer(blockBackplane, 1, RenderBackplane::new); + RenderLib.setRenderer(blockPeripheral, 0, RenderDisplay::new); + RenderLib.setRenderer(blockPeripheral, 1, RenderCPU::new); + RenderLib.setRenderer(blockPeripheral, 2, RenderDiskDrive::new); + RenderLib.setRenderer(blockFlatPeripheral, 0, RenderIOExpander::new); + RenderLib.setHighRenderer(RedPowerBase.blockMicro, 12, RenderRibbon::new); + ClientRegistry.bindTileEntitySpecialRenderer(TileBackplane.class, new RenderBackplane(blockBackplane)); + ClientRegistry.bindTileEntitySpecialRenderer(TileRibbon.class, new RenderRibbon(RedPowerBase.blockMicro)); + ClientRegistry.bindTileEntitySpecialRenderer(TileIOExpander.class, new RenderIOExpander(blockPeripheral)); + ClientRegistry.bindTileEntitySpecialRenderer(TileCPU.class, new RenderCPU(blockPeripheral)); + ClientRegistry.bindTileEntitySpecialRenderer(TileDiskDrive.class, new RenderDiskDrive(blockPeripheral)); + ClientRegistry.bindTileEntitySpecialRenderer(TileDisplay.class, new RenderDisplay(blockPeripheral)); + } + + @SideOnly(Side.CLIENT) + @SubscribeEvent + public void onTextureStitch(Pre evt) { + TextureMap map = evt.map; + if (map.getTextureType() == 0) { + ribbonTop = map.registerIcon("rpcontrol:ribbonTop"); + ribbonFace = map.registerIcon("rpcontrol:ribbonFace"); + backplaneTop = map.registerIcon("rpcontrol:backplaneTop"); + backplaneFace = map.registerIcon("rpcontrol:backplaneFace"); + backplaneSide = map.registerIcon("rpcontrol:backplaneSide"); + ram8kTop = map.registerIcon("rpcontrol:ram8kTop"); + ram8kFace = map.registerIcon("rpcontrol:ram8kFace"); + ram8kSide = map.registerIcon("rpcontrol:ram8kSide"); + peripheralBottom = map.registerIcon("rpcontrol:peripheralBottom"); + peripheralTop = map.registerIcon("rpcontrol:peripheralTop"); + peripheralSide = map.registerIcon("rpcontrol:peripheralSide"); + peripheralBack = map.registerIcon("rpcontrol:peripheralBack"); + cpuFront = map.registerIcon("rpcontrol:cpuFront"); + displayFront = map.registerIcon("rpcontrol:displayFront"); + diskDriveSide = map.registerIcon("rpcontrol:diskDriveSide"); + diskDriveTop = map.registerIcon("rpcontrol:diskDriveTop"); + diskDriveFront = map.registerIcon("rpcontrol:diskDriveFront"); + diskDriveFrontFull = map.registerIcon("rpcontrol:diskDriveFrontFull"); + diskDriveFrontOn = map.registerIcon("rpcontrol:diskDriveFrontOn"); + } + + } + + public Object getClientGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) { + switch(id) { + case 1: + return new GuiDisplay(player.inventory, CoreLib.getGuiTileEntity(world, x, y, z, TileDisplay.class)); + case 2: + return new GuiCPU(player.inventory, CoreLib.getGuiTileEntity(world, x, y, z, TileCPU.class)); + default: + return null; + } + } + + public Object getServerGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) { + switch(id) { + case 1: + return new ContainerDisplay(player.inventory, CoreLib.getTileEntity(world, x, y, z, TileDisplay.class)); + case 2: + return new ContainerCPU(player.inventory, CoreLib.getTileEntity(world, x, y, z, TileCPU.class)); + default: + return null; + } + } +} diff --git a/src/main/java/com/eloraam/redpower/RedPowerCore.java b/src/main/java/com/eloraam/redpower/RedPowerCore.java new file mode 100644 index 0000000..592e526 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/RedPowerCore.java @@ -0,0 +1,108 @@ +package com.eloraam.redpower; + +import com.eloraam.redpower.core.Config; +import com.eloraam.redpower.core.CoreEvents; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.CoverRecipe; +import com.eloraam.redpower.core.PacketHandler; +import com.eloraam.redpower.core.RenderHighlight; +import com.eloraam.redpower.core.RenderSimpleCovered; +import com.eloraam.redpower.core.TileCovered; +import cpw.mods.fml.client.registry.ClientRegistry; +import cpw.mods.fml.client.registry.RenderingRegistry; +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.Mod; +import cpw.mods.fml.common.Mod.EventHandler; +import cpw.mods.fml.common.Mod.Instance; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.network.simpleimpl.IMessage; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import java.io.File; +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.inventory.ICrafting; +import net.minecraft.item.crafting.CraftingManager; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import net.minecraftforge.client.event.TextureStitchEvent.Pre; +import net.minecraftforge.common.DimensionManager; +import net.minecraftforge.common.MinecraftForge; + +@Mod( + modid = "RedPowerCore", + name = "RedPower Core", + version = "2.0pr6" +) +public class RedPowerCore { + @Instance("RedPowerCore") + public static RedPowerCore instance; + public static PacketHandler packetHandler = new PacketHandler(); + public static int customBlockModel = -1; + public static int nullBlockModel = -1; + @SideOnly(Side.CLIENT) + public static IIcon missing; + + @EventHandler + public void preInit(FMLPreInitializationEvent event) { + Config.loadConfig(); + CoreLib.readOres(); + MinecraftForge.EVENT_BUS.register(new CoreEvents()); + if (FMLCommonHandler.instance().getSide().isClient()) { + MinecraftForge.EVENT_BUS.register(instance); + } + + } + + @EventHandler + public void load(FMLInitializationEvent event) { + packetHandler.init(); + if (FMLCommonHandler.instance().getSide().isClient()) { + this.setupRenderers(); + } + + CraftingManager.getInstance().getRecipeList().add(new CoverRecipe()); + } + + @EventHandler + public void postInit(FMLPostInitializationEvent event) { + Config.saveConfig(); + } + + public static File getSaveDir(World world) { + return DimensionManager.getCurrentSaveRootDirectory(); + } + + public static void sendPacketToServer(IMessage msg) { + packetHandler.sendToServer(msg); + } + + public static void sendPacketToCrafting(ICrafting icr, IMessage msg) { + if (icr instanceof EntityPlayerMP) { + EntityPlayerMP player = (EntityPlayerMP)icr; + packetHandler.sendTo(msg, player); + } + + } + + @SideOnly(Side.CLIENT) + public void setupRenderers() { + customBlockModel = RenderingRegistry.getNextAvailableRenderId(); + nullBlockModel = RenderingRegistry.getNextAvailableRenderId(); + MinecraftForge.EVENT_BUS.register(new RenderHighlight()); + ClientRegistry.bindTileEntitySpecialRenderer(TileCovered.class, new RenderSimpleCovered()); + } + + @SideOnly(Side.CLIENT) + @SubscribeEvent + public void onTextureStitch(Pre evt) { + TextureMap map = evt.map; + if (map.getTextureType() == 0) { + missing = map.registerIcon("rpcore:missing"); + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/RedPowerLighting.java b/src/main/java/com/eloraam/redpower/RedPowerLighting.java new file mode 100644 index 0000000..4fedf4c --- /dev/null +++ b/src/main/java/com/eloraam/redpower/RedPowerLighting.java @@ -0,0 +1,216 @@ +package com.eloraam.redpower; + +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.RenderLib; +import com.eloraam.redpower.lighting.BlockLamp; +import com.eloraam.redpower.lighting.BlockShapedLamp; +import com.eloraam.redpower.lighting.ItemLamp; +import com.eloraam.redpower.lighting.RenderLamp; +import com.eloraam.redpower.lighting.RenderShapedLamp; +import com.eloraam.redpower.lighting.TileLamp; +import com.eloraam.redpower.lighting.TileShapedLamp; +import cpw.mods.fml.client.registry.ClientRegistry; +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.Mod; +import cpw.mods.fml.common.Mod.EventHandler; +import cpw.mods.fml.common.Mod.Instance; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraftforge.client.event.TextureStitchEvent.Pre; +import net.minecraftforge.common.MinecraftForge; + +@Mod( + modid = "RedPowerLighting", + name = "RedPower Lighting", + version = "2.0pr6", + dependencies = "required-after:RedPowerBase" +) +public class RedPowerLighting { + @Instance("RedPowerLighting") + public static RedPowerLighting instance; + public static BlockLamp blockLamp; + public static BlockShapedLamp blockShapedLamp; + public static CreativeTabs tabLamp = new CreativeTabs(CreativeTabs.getNextID(), "RPLights") { + public ItemStack getIconItemStack() { + return new ItemStack(RedPowerLighting.blockLamp, 1, 16); + } + + public Item getTabIconItem() { + return null; + } + }; + public static IIcon[] lampOff; + public static IIcon[] lampOn; + + @EventHandler + public void preInit(FMLPreInitializationEvent event) { + if (FMLCommonHandler.instance().getSide().isClient()) { + MinecraftForge.EVENT_BUS.register(instance); + } + + } + + @EventHandler + public void load(FMLInitializationEvent event) { + setupLighting(); + if (FMLCommonHandler.instance().getSide().isClient()) { + this.registerRenderers(); + } + + } + + @EventHandler + public void postInit(FMLPostInitializationEvent event) { + } + + public static void setupLighting() { + blockLamp = new BlockLamp(); + blockLamp.setBlockName("rplamp"); + GameRegistry.registerBlock(blockLamp, ItemLamp.class, "lampo"); + GameRegistry.registerTileEntity(TileLamp.class, "RPLamp"); + blockLamp.addTileEntityMapping(0, TileLamp::new); + + for(int color = 0; color < 16; ++color) { + String nm = "rplamp." + CoreLib.rawColorNames[color]; + blockLamp.setBlockName(color, nm); + GameRegistry.addRecipe( + new ItemStack(blockLamp, 1, color), + new Object[]{"GLG", "GLG", "GRG", 'G', Blocks.glass_pane, 'L', new ItemStack(RedPowerBase.itemLumar, 1, color), 'R', Items.redstone} + ); + } + + for(int color = 0; color < 16; ++color) { + String nm = "rpilamp." + CoreLib.rawColorNames[color]; + blockLamp.setBlockName(color + 16, nm); + GameRegistry.addRecipe( + new ItemStack(blockLamp, 1, 16 + color), + new Object[]{"GLG", "GLG", "GRG", 'G', Blocks.glass_pane, 'L', new ItemStack(RedPowerBase.itemLumar, 1, color), 'R', Blocks.redstone_torch} + ); + } + + blockShapedLamp = new BlockShapedLamp(); + GameRegistry.registerBlock(blockShapedLamp, ItemLamp.class, "shlamp"); + GameRegistry.registerTileEntity(TileShapedLamp.class, "RPShLamp"); + blockShapedLamp.addTileEntityMapping(0, TileShapedLamp::new); + + for(int color = 0; color < 16; ++color) { + String nm = "rpshlamp." + CoreLib.rawColorNames[color]; + blockShapedLamp.setBlockName(color, nm); + GameRegistry.addRecipe( + new ItemStack(blockShapedLamp, 1, color), + new Object[]{ + "GLG", "GLG", "SRS", 'G', Blocks.glass_pane, 'L', new ItemStack(RedPowerBase.itemLumar, 1, color), 'R', Items.redstone, 'S', Blocks.stone_slab + } + ); + } + + for(int color = 0; color < 16; ++color) { + String nm = "rpishlamp." + CoreLib.rawColorNames[color]; + blockShapedLamp.setBlockName(color + 16, nm); + GameRegistry.addRecipe( + new ItemStack(blockShapedLamp, 1, 16 + color), + new Object[]{ + "GLG", + "GLG", + "SRS", + 'G', + Blocks.glass_pane, + 'L', + new ItemStack(RedPowerBase.itemLumar, 1, color), + 'R', + Blocks.redstone_torch, + 'S', + new ItemStack(Blocks.stone_slab, 1, 0) + } + ); + } + + for(int color = 0; color < 16; ++color) { + String nm = "rpshlamp2." + CoreLib.rawColorNames[color]; + blockShapedLamp.setBlockName(color + 32, nm); + GameRegistry.addRecipe( + new ItemStack(blockShapedLamp, 1, 32 + color), + new Object[]{ + "ILI", + "GLG", + "SRS", + 'G', + Blocks.glass_pane, + 'L', + new ItemStack(RedPowerBase.itemLumar, 1, color), + 'R', + Items.redstone, + 'I', + Blocks.iron_bars, + 'S', + new ItemStack(Blocks.stone_slab, 1, 0) + } + ); + } + + for(int color = 0; color < 16; ++color) { + String nm = "rpishlamp2." + CoreLib.rawColorNames[color]; + blockShapedLamp.setBlockName(color + 48, nm); + GameRegistry.addRecipe( + new ItemStack(blockShapedLamp, 1, 48 + color), + new Object[]{ + "ILI", + "GLG", + "SRS", + 'G', + Blocks.glass_pane, + 'L', + new ItemStack(RedPowerBase.itemLumar, 1, color), + 'R', + Blocks.redstone_torch, + 'I', + Blocks.iron_bars, + 'S', + Blocks.stone_slab + } + ); + } + + } + + @SideOnly(Side.CLIENT) + public void registerRenderers() { + RenderLib.setDefaultRenderer(blockLamp, 10, RenderLamp::new); + RenderLib.setDefaultRenderer(blockShapedLamp, 10, RenderShapedLamp::new); + ClientRegistry.bindTileEntitySpecialRenderer(TileLamp.class, new RenderLamp(blockLamp)); + ClientRegistry.bindTileEntitySpecialRenderer(TileShapedLamp.class, new RenderShapedLamp(blockShapedLamp)); + } + + @SideOnly(Side.CLIENT) + @SubscribeEvent + public void onTextureStitch(Pre evt) { + TextureMap map = evt.map; + if (map.getTextureType() == 0) { + if (lampOff == null) { + lampOff = new IIcon[16]; + } + + if (lampOn == null) { + lampOn = new IIcon[16]; + } + + for(int i = 0; i < 16; ++i) { + lampOff[i] = map.registerIcon("rplighting:lampOff/" + i); + lampOn[i] = map.registerIcon("rplighting:lampOn/" + i); + } + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/RedPowerLogic.java b/src/main/java/com/eloraam/redpower/RedPowerLogic.java new file mode 100644 index 0000000..54c23e8 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/RedPowerLogic.java @@ -0,0 +1,313 @@ +package com.eloraam.redpower; + +import com.eloraam.redpower.core.Config; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.ItemParts; +import com.eloraam.redpower.core.RenderLib; +import com.eloraam.redpower.logic.BlockLogic; +import com.eloraam.redpower.logic.ContainerCounter; +import com.eloraam.redpower.logic.ContainerTimer; +import com.eloraam.redpower.logic.GuiCounter; +import com.eloraam.redpower.logic.GuiTimer; +import com.eloraam.redpower.logic.ItemLogic; +import com.eloraam.redpower.logic.RenderLogicAdv; +import com.eloraam.redpower.logic.RenderLogicArray; +import com.eloraam.redpower.logic.RenderLogicPointer; +import com.eloraam.redpower.logic.RenderLogicSimple; +import com.eloraam.redpower.logic.RenderLogicStorage; +import com.eloraam.redpower.logic.TileLogicAdv; +import com.eloraam.redpower.logic.TileLogicArray; +import com.eloraam.redpower.logic.TileLogicPointer; +import com.eloraam.redpower.logic.TileLogicSimple; +import com.eloraam.redpower.logic.TileLogicStorage; +import cpw.mods.fml.client.registry.ClientRegistry; +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.Mod; +import cpw.mods.fml.common.Mod.EventHandler; +import cpw.mods.fml.common.Mod.Instance; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.network.IGuiHandler; +import cpw.mods.fml.common.network.NetworkRegistry; +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.FurnaceRecipes; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import net.minecraftforge.client.event.TextureStitchEvent.Post; +import net.minecraftforge.client.event.TextureStitchEvent.Pre; +import net.minecraftforge.common.MinecraftForge; + +@Mod( + modid = "RedPowerLogic", + name = "RedPower Logic", + version = "2.0pr6", + dependencies = "required-after:RedPowerBase" +) +public class RedPowerLogic implements IGuiHandler { + @Instance("RedPowerLogic") + public static RedPowerLogic instance; + public static BlockLogic blockLogic; + public static ItemParts itemParts; + public static ItemStack itemAnode; + public static ItemStack itemCathode; + public static ItemStack itemWire; + public static ItemStack itemWafer; + public static ItemStack itemPointer; + public static ItemStack itemPlate; + public static ItemStack itemWaferRedwire; + public static ItemStack itemChip; + public static ItemStack itemTaintedChip; + public static ItemStack itemWaferBundle; + public static boolean soundsEnabled; + @SideOnly(Side.CLIENT) + public static IIcon torch; + @SideOnly(Side.CLIENT) + public static IIcon torchOn; + @SideOnly(Side.CLIENT) + public static IIcon lever; + @SideOnly(Side.CLIENT) + public static IIcon cobblestone; + public static IIcon[] logicOne = new IIcon[232]; + public static IIcon[] logicTwo = new IIcon[256]; + public static IIcon[] logicSensor = new IIcon[23]; + + private static void setupLogic() { + GameRegistry.registerTileEntity(TileLogicSimple.class, "RPLgSmp"); + GameRegistry.registerTileEntity(TileLogicArray.class, "RPLgAr"); + GameRegistry.registerTileEntity(TileLogicStorage.class, "RPLgStor"); + GameRegistry.registerTileEntity(TileLogicAdv.class, "RPLgAdv"); + GameRegistry.registerTileEntity(TileLogicPointer.class, "RPLgPtr"); + itemParts = new ItemParts(); + itemParts.addItem(0, "rplogic:wafer", "item.irwafer"); + itemParts.addItem(1, "rplogic:wire", "item.irwire"); + itemParts.addItem(2, "rplogic:anode", "item.iranode"); + itemParts.addItem(3, "rplogic:cathode", "item.ircathode"); + itemParts.addItem(4, "rplogic:pointer", "item.irpointer"); + itemParts.addItem(5, "rplogic:redWire", "item.irredwire"); + itemParts.addItem(6, "rplogic:plate", "item.irplate"); + itemParts.addItem(7, "rplogic:chip", "item.irchip"); + itemParts.addItem(8, "rplogic:tchip", "item.irtchip"); + itemParts.addItem(9, "rplogic:bundle", "item.irbundle"); + GameRegistry.registerItem(itemParts, "parts"); + itemWafer = new ItemStack(itemParts, 1, 0); + itemWire = new ItemStack(itemParts, 1, 1); + itemAnode = new ItemStack(itemParts, 1, 2); + itemCathode = new ItemStack(itemParts, 1, 3); + itemPointer = new ItemStack(itemParts, 1, 4); + itemWaferRedwire = new ItemStack(itemParts, 1, 5); + itemPlate = new ItemStack(itemParts, 1, 6); + itemChip = new ItemStack(itemParts, 1, 7); + itemTaintedChip = new ItemStack(itemParts, 1, 8); + itemWaferBundle = new ItemStack(itemParts, 1, 9); + FurnaceRecipes.smelting().func_151393_a(Blocks.stone, new ItemStack(itemParts, 2, 0), 0.1F); + GameRegistry.addRecipe(itemWire, new Object[]{"R", "B", 'B', itemWafer, 'R', Items.redstone}); + GameRegistry.addRecipe(new ItemStack(itemParts, 3, 2), new Object[]{" R ", "RRR", "BBB", 'B', itemWafer, 'R', Items.redstone}); + GameRegistry.addRecipe(itemCathode, new Object[]{"T", "B", 'B', itemWafer, 'T', Blocks.redstone_torch}); + GameRegistry.addRecipe(itemPointer, new Object[]{"S", "T", "B", 'B', itemWafer, 'S', Blocks.stone, 'T', Blocks.redstone_torch}); + GameRegistry.addRecipe(itemWaferRedwire, new Object[]{"W", "B", 'B', itemWafer, 'W', new ItemStack(RedPowerBase.blockMicro, 1, 256)}); + GameRegistry.addRecipe(itemPlate, new Object[]{" B ", "SRS", "BCB", 'B', itemWafer, 'C', itemCathode, 'R', RedPowerBase.itemIngotRed, 'S', Items.stick}); + GameRegistry.addRecipe(CoreLib.copyStack(itemChip, 3), new Object[]{" R ", "BBB", 'B', itemWafer, 'R', RedPowerBase.itemWaferRed}); + GameRegistry.addShapelessRecipe(CoreLib.copyStack(itemTaintedChip, 1), new Object[]{itemChip, Items.glowstone_dust}); + GameRegistry.addRecipe(itemWaferBundle, new Object[]{"W", "B", 'B', itemWafer, 'W', new ItemStack(RedPowerBase.blockMicro, 1, 768)}); + blockLogic = new BlockLogic(); + GameRegistry.registerBlock(blockLogic, ItemLogic.class, "logic"); + blockLogic.addTileEntityMapping(0, TileLogicPointer::new); + blockLogic.addTileEntityMapping(1, TileLogicSimple::new); + blockLogic.addTileEntityMapping(2, TileLogicArray::new); + blockLogic.addTileEntityMapping(3, TileLogicStorage::new); + blockLogic.addTileEntityMapping(4, TileLogicAdv::new); + blockLogic.setBlockName(0, "irtimer"); + blockLogic.setBlockName(1, "irseq"); + blockLogic.setBlockName(2, "irstate"); + blockLogic.setBlockName(256, "irlatch"); + blockLogic.setBlockName(257, "irnor"); + blockLogic.setBlockName(258, "iror"); + blockLogic.setBlockName(259, "irnand"); + blockLogic.setBlockName(260, "irand"); + blockLogic.setBlockName(261, "irxnor"); + blockLogic.setBlockName(262, "irxor"); + blockLogic.setBlockName(263, "irpulse"); + blockLogic.setBlockName(264, "irtoggle"); + blockLogic.setBlockName(265, "irnot"); + blockLogic.setBlockName(266, "irbuf"); + blockLogic.setBlockName(267, "irmux"); + blockLogic.setBlockName(268, "irrepeater"); + blockLogic.setBlockName(269, "irsync"); + blockLogic.setBlockName(270, "irrand"); + blockLogic.setBlockName(271, "irdlatch"); + blockLogic.setBlockName(272, "rplightsensor"); + blockLogic.setBlockName(512, "rpanc"); + blockLogic.setBlockName(513, "rpainv"); + blockLogic.setBlockName(514, "rpaninv"); + blockLogic.setBlockName(768, "ircounter"); + blockLogic.setBlockName(1024, "irbusxcvr"); + GameRegistry.addRecipe( + new ItemStack(blockLogic, 1, 0), new Object[]{"BWB", "WPW", "ACA", 'W', itemWire, 'B', itemWafer, 'C', itemCathode, 'A', itemAnode, 'P', itemPointer} + ); + GameRegistry.addRecipe( + new ItemStack(blockLogic, 1, 1), new Object[]{"BCB", "CPC", "BCB", 'W', itemWire, 'B', itemWafer, 'C', itemCathode, 'A', itemAnode, 'P', itemPointer} + ); + GameRegistry.addRecipe( + new ItemStack(blockLogic, 1, 2), + new Object[]{"BAC", "WSP", "BWB", 'W', itemWire, 'B', itemWafer, 'C', itemCathode, 'A', itemAnode, 'P', itemPointer, 'S', itemChip} + ); + GameRegistry.addRecipe( + new ItemStack(blockLogic, 1, 256), new Object[]{"WWA", "CBC", "AWW", 'W', itemWire, 'B', itemWafer, 'C', itemCathode, 'A', itemAnode} + ); + GameRegistry.addRecipe( + new ItemStack(blockLogic, 1, 257), new Object[]{"BAB", "WCW", "BWB", 'W', itemWire, 'B', itemWafer, 'C', itemCathode, 'A', itemAnode} + ); + GameRegistry.addRecipe(new ItemStack(blockLogic, 1, 258), new Object[]{"BCB", "WCW", "BWB", 'W', itemWire, 'B', itemWafer, 'C', itemCathode}); + GameRegistry.addRecipe( + new ItemStack(blockLogic, 1, 259), new Object[]{"AAA", "CCC", "BWB", 'W', itemWire, 'B', itemWafer, 'C', itemCathode, 'A', itemAnode} + ); + GameRegistry.addRecipe( + new ItemStack(blockLogic, 1, 260), new Object[]{"ACA", "CCC", "BWB", 'W', itemWire, 'B', itemWafer, 'C', itemCathode, 'A', itemAnode} + ); + GameRegistry.addRecipe( + new ItemStack(blockLogic, 1, 261), new Object[]{"ACA", "CAC", "WCW", 'W', itemWire, 'B', itemWafer, 'C', itemCathode, 'A', itemAnode} + ); + GameRegistry.addRecipe( + new ItemStack(blockLogic, 1, 262), new Object[]{"AWA", "CAC", "WCW", 'W', itemWire, 'B', itemWafer, 'C', itemCathode, 'A', itemAnode} + ); + GameRegistry.addRecipe( + new ItemStack(blockLogic, 1, 263), new Object[]{"ACA", "CAC", "WWB", 'W', itemWire, 'B', itemWafer, 'C', itemCathode, 'A', itemAnode} + ); + GameRegistry.addRecipe( + new ItemStack(blockLogic, 1, 264), new Object[]{"BCB", "WLW", "BCB", 'L', Blocks.lever, 'W', itemWire, 'B', itemWafer, 'C', itemCathode} + ); + GameRegistry.addRecipe( + new ItemStack(blockLogic, 1, 265), new Object[]{"BAB", "ACA", "BWB", 'W', itemWire, 'B', itemWafer, 'C', itemCathode, 'A', itemAnode} + ); + GameRegistry.addRecipe( + new ItemStack(blockLogic, 1, 266), new Object[]{"ACA", "WCW", "BWB", 'W', itemWire, 'B', itemWafer, 'C', itemCathode, 'A', itemAnode} + ); + GameRegistry.addRecipe( + new ItemStack(blockLogic, 1, 267), new Object[]{"ACA", "CBC", "ACW", 'W', itemWire, 'B', itemWafer, 'C', itemCathode, 'A', itemAnode} + ); + GameRegistry.addRecipe( + new ItemStack(blockLogic, 1, 268), new Object[]{"BCW", "BAW", "BWC", 'W', itemWire, 'B', itemWafer, 'A', itemAnode, 'C', itemCathode} + ); + GameRegistry.addRecipe( + new ItemStack(blockLogic, 1, 269), new Object[]{"WCW", "SAS", "WWW", 'W', itemWire, 'B', itemWafer, 'A', itemAnode, 'C', itemCathode, 'S', itemChip} + ); + GameRegistry.addRecipe(new ItemStack(blockLogic, 1, 270), new Object[]{"BSB", "WWW", "SWS", 'W', itemWire, 'B', itemWafer, 'S', itemTaintedChip}); + GameRegistry.addRecipe( + new ItemStack(blockLogic, 1, 271), new Object[]{"ACW", "CCC", "CWB", 'W', itemWire, 'B', itemWafer, 'C', itemCathode, 'A', itemAnode} + ); + GameRegistry.addRecipe( + new ItemStack(blockLogic, 1, 272), new Object[]{"BWB", "BSB", "BBB", 'W', itemWire, 'B', itemWafer, 'S', RedPowerBase.itemWaferBlue} + ); + GameRegistry.addRecipe( + new ItemStack(blockLogic, 1, 768), new Object[]{"BWB", "CPC", "BWB", 'W', itemWire, 'B', itemWafer, 'C', itemCathode, 'P', itemPointer} + ); + GameRegistry.addRecipe(new ItemStack(blockLogic, 1, 512), new Object[]{"BRB", "RRR", "BRB", 'B', itemWafer, 'R', itemWaferRedwire}); + GameRegistry.addRecipe(new ItemStack(blockLogic, 1, 513), new Object[]{"BRB", "RPR", "BRB", 'B', itemWafer, 'R', itemWaferRedwire, 'P', itemPlate}); + GameRegistry.addRecipe( + new ItemStack(blockLogic, 1, 514), new Object[]{"BRB", "RPR", "BRC", 'B', itemWafer, 'C', itemCathode, 'R', itemWaferRedwire, 'P', itemPlate} + ); + GameRegistry.addRecipe( + new ItemStack(blockLogic, 1, 1024), new Object[]{"CCC", "WBW", "CCC", 'B', itemWafer, 'W', RedPowerBase.itemWaferRed, 'C', itemWaferBundle} + ); + } + + @EventHandler + public void preInit(FMLPreInitializationEvent event) { + if (FMLCommonHandler.instance().getSide().isClient()) { + MinecraftForge.EVENT_BUS.register(instance); + } + + } + + @EventHandler + public void load(FMLInitializationEvent event) { + soundsEnabled = Config.getInt("settings.logic.enableSounds", 1) > 0; + setupLogic(); + if (FMLCommonHandler.instance().getSide().isClient()) { + this.registerRenderers(); + } + + NetworkRegistry.INSTANCE.registerGuiHandler(instance, instance); + } + + @EventHandler + public void postInit(FMLPostInitializationEvent event) { + } + + public Object getClientGuiElement(int ID, EntityPlayer player, World world, int X, int Y, int Z) { + switch(ID) { + case 1: + return new GuiCounter(player.inventory, CoreLib.getGuiTileEntity(world, X, Y, Z, TileLogicStorage.class)); + case 2: + return new GuiTimer(player.inventory, CoreLib.getGuiTileEntity(world, X, Y, Z, TileLogicPointer.class)); + default: + return null; + } + } + + public Object getServerGuiElement(int ID, EntityPlayer player, World world, int X, int Y, int Z) { + switch(ID) { + case 1: + return new ContainerCounter(player.inventory, CoreLib.getTileEntity(world, X, Y, Z, TileLogicStorage.class)); + case 2: + return new ContainerTimer(player.inventory, CoreLib.getTileEntity(world, X, Y, Z, TileLogicPointer.class)); + default: + return null; + } + } + + @SideOnly(Side.CLIENT) + public void registerRenderers() { + RenderLib.setHighRenderer(blockLogic, 0, RenderLogicPointer::new); + RenderLib.setHighRenderer(blockLogic, 1, RenderLogicSimple::new); + RenderLib.setHighRenderer(blockLogic, 2, RenderLogicArray::new); + RenderLib.setHighRenderer(blockLogic, 3, RenderLogicStorage::new); + RenderLib.setHighRenderer(blockLogic, 4, RenderLogicAdv::new); + ClientRegistry.bindTileEntitySpecialRenderer(TileLogicAdv.class, new RenderLogicAdv(blockLogic)); + ClientRegistry.bindTileEntitySpecialRenderer(TileLogicSimple.class, new RenderLogicSimple(blockLogic)); + ClientRegistry.bindTileEntitySpecialRenderer(TileLogicArray.class, new RenderLogicArray(blockLogic)); + ClientRegistry.bindTileEntitySpecialRenderer(TileLogicStorage.class, new RenderLogicStorage(blockLogic)); + ClientRegistry.bindTileEntitySpecialRenderer(TileLogicPointer.class, new RenderLogicPointer(blockLogic)); + } + + @SideOnly(Side.CLIENT) + @SubscribeEvent + public void onTextureStitch(Pre evt) { + TextureMap map = evt.map; + if (map.getTextureType() == 0) { + for(int i = 0; i < 232; ++i) { + logicOne[i] = map.registerIcon("rplogic:logic1/" + i); + } + + for(int i = 0; i < 256; ++i) { + logicTwo[i] = map.registerIcon("rplogic:logic2/" + i); + } + + for(int i = 0; i < 23; ++i) { + logicSensor[i] = map.registerIcon("rplogic:sensors/" + i); + } + } + + } + + @SubscribeEvent + public void onTextureStitch(Post evt) { + TextureMap map = evt.map; + if (map.getTextureType() == 0) { + torch = map.getAtlasSprite("redstone_torch_off"); + torchOn = map.getAtlasSprite("redstone_torch_on"); + lever = map.getAtlasSprite("lever"); + cobblestone = map.getAtlasSprite("cobblestone"); + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/RedPowerMachine.java b/src/main/java/com/eloraam/redpower/RedPowerMachine.java new file mode 100644 index 0000000..aebabef --- /dev/null +++ b/src/main/java/com/eloraam/redpower/RedPowerMachine.java @@ -0,0 +1,1223 @@ +package com.eloraam.redpower; + +import com.eloraam.redpower.core.AchieveLib; +import com.eloraam.redpower.core.Config; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.CraftLib; +import com.eloraam.redpower.core.ItemExtended; +import com.eloraam.redpower.core.ItemParts; +import com.eloraam.redpower.core.ItemTextured; +import com.eloraam.redpower.core.RenderLib; +import com.eloraam.redpower.machine.BlockFrame; +import com.eloraam.redpower.machine.BlockMachine; +import com.eloraam.redpower.machine.BlockMachinePanel; +import com.eloraam.redpower.machine.ContainerAssemble; +import com.eloraam.redpower.machine.ContainerBatteryBox; +import com.eloraam.redpower.machine.ContainerBlueAlloyFurnace; +import com.eloraam.redpower.machine.ContainerBlueFurnace; +import com.eloraam.redpower.machine.ContainerBufferChest; +import com.eloraam.redpower.machine.ContainerChargingBench; +import com.eloraam.redpower.machine.ContainerDeploy; +import com.eloraam.redpower.machine.ContainerEject; +import com.eloraam.redpower.machine.ContainerFilter; +import com.eloraam.redpower.machine.ContainerItemDetect; +import com.eloraam.redpower.machine.ContainerManager; +import com.eloraam.redpower.machine.ContainerRegulator; +import com.eloraam.redpower.machine.ContainerRetriever; +import com.eloraam.redpower.machine.ContainerSorter; +import com.eloraam.redpower.machine.ContainerWindTurbine; +import com.eloraam.redpower.machine.GuiAssemble; +import com.eloraam.redpower.machine.GuiBatteryBox; +import com.eloraam.redpower.machine.GuiBlueAlloyFurnace; +import com.eloraam.redpower.machine.GuiBlueFurnace; +import com.eloraam.redpower.machine.GuiBufferChest; +import com.eloraam.redpower.machine.GuiChargingBench; +import com.eloraam.redpower.machine.GuiDeploy; +import com.eloraam.redpower.machine.GuiEject; +import com.eloraam.redpower.machine.GuiFilter; +import com.eloraam.redpower.machine.GuiItemDetect; +import com.eloraam.redpower.machine.GuiManager; +import com.eloraam.redpower.machine.GuiRegulator; +import com.eloraam.redpower.machine.GuiRetriever; +import com.eloraam.redpower.machine.GuiSorter; +import com.eloraam.redpower.machine.GuiWindTurbine; +import com.eloraam.redpower.machine.ItemBattery; +import com.eloraam.redpower.machine.ItemMachinePanel; +import com.eloraam.redpower.machine.ItemSonicDriver; +import com.eloraam.redpower.machine.ItemVoltmeter; +import com.eloraam.redpower.machine.ItemWindmill; +import com.eloraam.redpower.machine.MicroPlacementTube; +import com.eloraam.redpower.machine.RenderAccel; +import com.eloraam.redpower.machine.RenderBatteryBox; +import com.eloraam.redpower.machine.RenderBlueAlloyFurnace; +import com.eloraam.redpower.machine.RenderBlueFurnace; +import com.eloraam.redpower.machine.RenderBreaker; +import com.eloraam.redpower.machine.RenderBufferChest; +import com.eloraam.redpower.machine.RenderChargingBench; +import com.eloraam.redpower.machine.RenderFrame; +import com.eloraam.redpower.machine.RenderFrameMoving; +import com.eloraam.redpower.machine.RenderFrameRedstoneTube; +import com.eloraam.redpower.machine.RenderFrameTube; +import com.eloraam.redpower.machine.RenderGrate; +import com.eloraam.redpower.machine.RenderMachine; +import com.eloraam.redpower.machine.RenderMotor; +import com.eloraam.redpower.machine.RenderPipe; +import com.eloraam.redpower.machine.RenderPump; +import com.eloraam.redpower.machine.RenderRedstoneTube; +import com.eloraam.redpower.machine.RenderSolarPanel; +import com.eloraam.redpower.machine.RenderThermopile; +import com.eloraam.redpower.machine.RenderTransformer; +import com.eloraam.redpower.machine.RenderTube; +import com.eloraam.redpower.machine.RenderWindTurbine; +import com.eloraam.redpower.machine.TileAccel; +import com.eloraam.redpower.machine.TileAssemble; +import com.eloraam.redpower.machine.TileBatteryBox; +import com.eloraam.redpower.machine.TileBlueAlloyFurnace; +import com.eloraam.redpower.machine.TileBlueFurnace; +import com.eloraam.redpower.machine.TileBreaker; +import com.eloraam.redpower.machine.TileBufferChest; +import com.eloraam.redpower.machine.TileChargingBench; +import com.eloraam.redpower.machine.TileDeploy; +import com.eloraam.redpower.machine.TileEject; +import com.eloraam.redpower.machine.TileEjectBase; +import com.eloraam.redpower.machine.TileFilter; +import com.eloraam.redpower.machine.TileFrame; +import com.eloraam.redpower.machine.TileFrameMoving; +import com.eloraam.redpower.machine.TileFrameRedstoneTube; +import com.eloraam.redpower.machine.TileFrameTube; +import com.eloraam.redpower.machine.TileGrate; +import com.eloraam.redpower.machine.TileIgniter; +import com.eloraam.redpower.machine.TileItemDetect; +import com.eloraam.redpower.machine.TileMachine; +import com.eloraam.redpower.machine.TileMagTube; +import com.eloraam.redpower.machine.TileManager; +import com.eloraam.redpower.machine.TileMotor; +import com.eloraam.redpower.machine.TilePipe; +import com.eloraam.redpower.machine.TilePump; +import com.eloraam.redpower.machine.TileRedstoneTube; +import com.eloraam.redpower.machine.TileRegulator; +import com.eloraam.redpower.machine.TileRelay; +import com.eloraam.redpower.machine.TileRestrictTube; +import com.eloraam.redpower.machine.TileRetriever; +import com.eloraam.redpower.machine.TileSolarPanel; +import com.eloraam.redpower.machine.TileSorter; +import com.eloraam.redpower.machine.TileSortron; +import com.eloraam.redpower.machine.TileThermopile; +import com.eloraam.redpower.machine.TileTransformer; +import com.eloraam.redpower.machine.TileTranspose; +import com.eloraam.redpower.machine.TileTube; +import com.eloraam.redpower.machine.TileWindTurbine; +import cpw.mods.fml.client.registry.ClientRegistry; +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.Mod; +import cpw.mods.fml.common.Mod.EventHandler; +import cpw.mods.fml.common.Mod.Instance; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.network.IGuiHandler; +import cpw.mods.fml.common.network.NetworkRegistry; +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.stats.AchievementList; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import net.minecraftforge.client.event.TextureStitchEvent.Pre; +import net.minecraftforge.common.MinecraftForge; + +@Mod( + modid = "RedPowerMachine", + name = "RedPower Machine", + version = "2.0pr6", + dependencies = "required-after:RedPowerBase" +) +public class RedPowerMachine implements IGuiHandler { + @Instance("RedPowerMachine") + public static RedPowerMachine instance; + public static BlockMachine blockMachine; + public static BlockMachine blockMachine2; + public static BlockMachinePanel blockMachinePanel; + public static BlockFrame blockFrame; + public static ItemVoltmeter itemVoltmeter; + public static ItemSonicDriver itemSonicDriver; + public static Item itemBatteryEmpty; + public static Item itemBatteryPowered; + public static ItemParts itemMachineParts; + public static ItemStack itemWoodSail; + public static Item itemWoodTurbine; + public static Item itemWoodWindmill; + public static boolean FrameAlwaysCrate; + public static int FrameLinkSize; + public static boolean AllowGrateDump; + @SideOnly(Side.CLIENT) + public static IIcon frameCrossed; + @SideOnly(Side.CLIENT) + public static IIcon frameCovered; + @SideOnly(Side.CLIENT) + public static IIcon framePaneled; + @SideOnly(Side.CLIENT) + public static IIcon crate; + @SideOnly(Side.CLIENT) + public static IIcon baseTubeSide; + @SideOnly(Side.CLIENT) + public static IIcon baseTubeFace; + @SideOnly(Side.CLIENT) + public static IIcon baseTubeSideColor; + @SideOnly(Side.CLIENT) + public static IIcon baseTubeFaceColor; + public static IIcon[] redstoneTubeSide = new IIcon[4]; + public static IIcon[] redstoneTubeFace = new IIcon[4]; + @SideOnly(Side.CLIENT) + public static IIcon pipeSide; + @SideOnly(Side.CLIENT) + public static IIcon pipeFace; + @SideOnly(Side.CLIENT) + public static IIcon pipeFlanges; + @SideOnly(Side.CLIENT) + public static IIcon restrictTubeSide; + @SideOnly(Side.CLIENT) + public static IIcon restrictTubeFace; + @SideOnly(Side.CLIENT) + public static IIcon restrictTubeSideColor; + @SideOnly(Side.CLIENT) + public static IIcon restrictTubeFaceColor; + @SideOnly(Side.CLIENT) + public static IIcon magTubeSide; + @SideOnly(Side.CLIENT) + public static IIcon magTubeRing; + @SideOnly(Side.CLIENT) + public static IIcon magTubeFace; + @SideOnly(Side.CLIENT) + public static IIcon magTubeSideNR; + @SideOnly(Side.CLIENT) + public static IIcon magTubeFaceNR; + @SideOnly(Side.CLIENT) + public static IIcon tubeItemOverlay; + @SideOnly(Side.CLIENT) + public static IIcon electronicsBottom; + @SideOnly(Side.CLIENT) + public static IIcon batteryTop; + public static IIcon[] batterySide = new IIcon[9]; + @SideOnly(Side.CLIENT) + public static IIcon retrieverFront; + @SideOnly(Side.CLIENT) + public static IIcon retrieverBack; + @SideOnly(Side.CLIENT) + public static IIcon retrieverSide; + @SideOnly(Side.CLIENT) + public static IIcon retrieverSideOn; + @SideOnly(Side.CLIENT) + public static IIcon retrieverSideCharged; + @SideOnly(Side.CLIENT) + public static IIcon retrieverSideChargedOn; + @SideOnly(Side.CLIENT) + public static IIcon transposerFront; + @SideOnly(Side.CLIENT) + public static IIcon transposerSide; + @SideOnly(Side.CLIENT) + public static IIcon transposerSideOn; + @SideOnly(Side.CLIENT) + public static IIcon filterSide; + @SideOnly(Side.CLIENT) + public static IIcon filterSideOn; + @SideOnly(Side.CLIENT) + public static IIcon breakerFront; + @SideOnly(Side.CLIENT) + public static IIcon breakerFrontOn; + @SideOnly(Side.CLIENT) + public static IIcon breakerBack; + @SideOnly(Side.CLIENT) + public static IIcon breakerSide; + @SideOnly(Side.CLIENT) + public static IIcon breakerSideOn; + @SideOnly(Side.CLIENT) + public static IIcon deployerBack; + @SideOnly(Side.CLIENT) + public static IIcon deployerFront; + @SideOnly(Side.CLIENT) + public static IIcon deployerFrontOn; + @SideOnly(Side.CLIENT) + public static IIcon deployerSide; + @SideOnly(Side.CLIENT) + public static IIcon deployerSideAlt; + @SideOnly(Side.CLIENT) + public static IIcon motorBottom; + @SideOnly(Side.CLIENT) + public static IIcon motorSide; + @SideOnly(Side.CLIENT) + public static IIcon motorFront; + @SideOnly(Side.CLIENT) + public static IIcon motorFrontCharged; + @SideOnly(Side.CLIENT) + public static IIcon motorFrontActive; + @SideOnly(Side.CLIENT) + public static IIcon motorTop; + @SideOnly(Side.CLIENT) + public static IIcon motorTopActive; + @SideOnly(Side.CLIENT) + public static IIcon turbineFront; + @SideOnly(Side.CLIENT) + public static IIcon turbineSide; + @SideOnly(Side.CLIENT) + public static IIcon turbineSideAlt; + @SideOnly(Side.CLIENT) + public static IIcon thermopileFront; + @SideOnly(Side.CLIENT) + public static IIcon thermopileSide; + @SideOnly(Side.CLIENT) + public static IIcon thermopileTop; + @SideOnly(Side.CLIENT) + public static IIcon btFurnaceTop; + @SideOnly(Side.CLIENT) + public static IIcon btFurnaceSide; + @SideOnly(Side.CLIENT) + public static IIcon btFurnaceFront; + @SideOnly(Side.CLIENT) + public static IIcon btFurnaceFrontOn; + @SideOnly(Side.CLIENT) + public static IIcon btAlloyFurnaceTop; + @SideOnly(Side.CLIENT) + public static IIcon btAlloyFurnaceSide; + @SideOnly(Side.CLIENT) + public static IIcon btAlloyFurnaceFront; + @SideOnly(Side.CLIENT) + public static IIcon btAlloyFurnaceFrontOn; + @SideOnly(Side.CLIENT) + public static IIcon btChargerTop; + @SideOnly(Side.CLIENT) + public static IIcon btChargerTopOn; + @SideOnly(Side.CLIENT) + public static IIcon btChargerBottom; + @SideOnly(Side.CLIENT) + public static IIcon btChargerSide; + @SideOnly(Side.CLIENT) + public static IIcon btChargerSideOn; + public static IIcon[] btChargerFront = new IIcon[6]; + public static IIcon[] btChargerFrontPowered = new IIcon[5]; + public static IIcon[] btChargerFrontActive = new IIcon[5]; + @SideOnly(Side.CLIENT) + public static IIcon bufferFront; + @SideOnly(Side.CLIENT) + public static IIcon bufferBack; + @SideOnly(Side.CLIENT) + public static IIcon bufferSide; + @SideOnly(Side.CLIENT) + public static IIcon sorterFront; + @SideOnly(Side.CLIENT) + public static IIcon sorterBack; + @SideOnly(Side.CLIENT) + public static IIcon sorterBackCharged; + @SideOnly(Side.CLIENT) + public static IIcon sorterBackChargedOn; + @SideOnly(Side.CLIENT) + public static IIcon sorterSide; + @SideOnly(Side.CLIENT) + public static IIcon sorterSideOn; + @SideOnly(Side.CLIENT) + public static IIcon sorterSideCharged; + @SideOnly(Side.CLIENT) + public static IIcon sorterSideChargedOn; + @SideOnly(Side.CLIENT) + public static IIcon detectorSideAlt; + @SideOnly(Side.CLIENT) + public static IIcon detectorSideAltOn; + @SideOnly(Side.CLIENT) + public static IIcon detectorSide; + @SideOnly(Side.CLIENT) + public static IIcon detectorSideOn; + @SideOnly(Side.CLIENT) + public static IIcon detectorSideCharged; + @SideOnly(Side.CLIENT) + public static IIcon detectorSideChargedOn; + @SideOnly(Side.CLIENT) + public static IIcon regulatorFront; + @SideOnly(Side.CLIENT) + public static IIcon regulatorBack; + @SideOnly(Side.CLIENT) + public static IIcon regulatorSideAlt; + @SideOnly(Side.CLIENT) + public static IIcon regulatorSideAltCharged; + @SideOnly(Side.CLIENT) + public static IIcon regulatorSide; + @SideOnly(Side.CLIENT) + public static IIcon regulatorSideOn; + @SideOnly(Side.CLIENT) + public static IIcon regulatorSideCharged; + @SideOnly(Side.CLIENT) + public static IIcon regulatorSideChargedOn; + @SideOnly(Side.CLIENT) + public static IIcon sortronFront; + @SideOnly(Side.CLIENT) + public static IIcon sortronBack; + @SideOnly(Side.CLIENT) + public static IIcon sortronSideAlt; + @SideOnly(Side.CLIENT) + public static IIcon sortronSideAltCharged; + @SideOnly(Side.CLIENT) + public static IIcon sortronSide; + @SideOnly(Side.CLIENT) + public static IIcon sortronSideCharged; + @SideOnly(Side.CLIENT) + public static IIcon sortronSideOn; + @SideOnly(Side.CLIENT) + public static IIcon sortronSideChargedOn; + @SideOnly(Side.CLIENT) + public static IIcon managerFront; + @SideOnly(Side.CLIENT) + public static IIcon managerBack; + public static IIcon[] managerSide = new IIcon[4]; + public static IIcon[] managerSideCharged = new IIcon[4]; + @SideOnly(Side.CLIENT) + public static IIcon assemblerFront; + @SideOnly(Side.CLIENT) + public static IIcon assemblerFrontOn; + @SideOnly(Side.CLIENT) + public static IIcon assemblerBack; + @SideOnly(Side.CLIENT) + public static IIcon assemblerBackOn; + @SideOnly(Side.CLIENT) + public static IIcon igniterFront; + @SideOnly(Side.CLIENT) + public static IIcon igniterFrontOn; + @SideOnly(Side.CLIENT) + public static IIcon igniterSide; + @SideOnly(Side.CLIENT) + public static IIcon igniterSideAlt; + @SideOnly(Side.CLIENT) + public static IIcon assemblerSide; + @SideOnly(Side.CLIENT) + public static IIcon assemblerSideAlt; + @SideOnly(Side.CLIENT) + public static IIcon ejectorSide; + @SideOnly(Side.CLIENT) + public static IIcon ejectorSideOn; + @SideOnly(Side.CLIENT) + public static IIcon relaySide; + @SideOnly(Side.CLIENT) + public static IIcon relaySideOn; + @SideOnly(Side.CLIENT) + public static IIcon relaySideAlt; + @SideOnly(Side.CLIENT) + public static IIcon solarPanelTop; + @SideOnly(Side.CLIENT) + public static IIcon solarPanelSide; + @SideOnly(Side.CLIENT) + public static IIcon grateSide; + @SideOnly(Side.CLIENT) + public static IIcon grateBack; + @SideOnly(Side.CLIENT) + public static IIcon grateMossySide; + @SideOnly(Side.CLIENT) + public static IIcon grateEmptyBack; + + @EventHandler + public void preInit(FMLPreInitializationEvent event) { + } + + @EventHandler + public void load(FMLInitializationEvent event) { + FrameAlwaysCrate = Config.getInt("settings.machine.frame.alwayscrate", 0) > 0; + FrameLinkSize = Config.getInt("settings.machine.frame.linksize", 1000); + AllowGrateDump = Config.getInt("settings.machine.frame.allowgratedump", 1) > 0; + setupItems(); + setupBlocks(); + initAchievements(); + if (FMLCommonHandler.instance().getSide().isClient()) { + this.registerRenderers(); + } + + NetworkRegistry.INSTANCE.registerGuiHandler(instance, instance); + if (FMLCommonHandler.instance().getSide().isClient()) { + MinecraftForge.EVENT_BUS.register(instance); + } + + } + + @EventHandler + public void postInit(FMLPostInitializationEvent event) { + } + + private static void setupItems() { + itemVoltmeter = new ItemVoltmeter(); + itemBatteryEmpty = new ItemTextured("rpmachine:battery").setUnlocalizedName("btbattery").setCreativeTab(CreativeTabs.tabRedstone); + itemBatteryPowered = new ItemBattery(); + CraftLib.addOreRecipe(new ItemStack(itemVoltmeter), "WWW", "WNW", "CCC", 'W', "plankWood", 'N', RedPowerBase.itemNikolite, 'C', "ingotCopper"); + GameRegistry.registerItem(itemVoltmeter, "voltmeter"); + CraftLib.addOreRecipe(new ItemStack(itemBatteryEmpty, 1), "NCN", "NTN", "NCN", 'N', RedPowerBase.itemNikolite, 'C', "ingotCopper", 'T', "ingotTin"); + GameRegistry.registerItem(itemBatteryEmpty, "batteryEmpty"); + GameRegistry.registerItem(itemBatteryPowered, "batteryPowered"); + itemSonicDriver = new ItemSonicDriver(); + itemSonicDriver.setUnlocalizedName("sonicDriver").setTextureName("rpmachine:sonicScrewdriver"); + GameRegistry.addRecipe( + new ItemStack(itemSonicDriver, 1, itemSonicDriver.getMaxDamage()), + new Object[]{"E ", " R ", " B", 'R', RedPowerBase.itemIngotBrass, 'E', RedPowerBase.itemGreenSapphire, 'B', itemBatteryEmpty} + ); + GameRegistry.registerItem(itemSonicDriver, "sonicDriver"); + itemWoodTurbine = new ItemWindmill(1); + itemWoodWindmill = new ItemWindmill(2).setUnlocalizedName("windmillWood").setTextureName("rpmachine:windmill"); + itemMachineParts = new ItemParts(); + itemMachineParts.addItem(0, "rpmachine:windSailWood", "item.windSailWood"); + itemWoodSail = new ItemStack(itemMachineParts, 1, 0); + GameRegistry.registerItem(itemMachineParts, "machineParts"); + CraftLib.addOreRecipe(itemWoodSail, "CCS", "CCW", "CCS", 'C', RedPowerBase.itemCanvas, 'W', "plankWood", 'S', Items.stick); + GameRegistry.addRecipe( + new ItemStack(itemWoodTurbine), new Object[]{"SAS", "SAS", "SAS", 'S', itemWoodSail, 'A', new ItemStack(RedPowerBase.blockMicro, 1, 5905)} + ); + GameRegistry.addRecipe( + new ItemStack(itemWoodWindmill), new Object[]{" S ", "SAS", " S ", 'S', itemWoodSail, 'A', new ItemStack(RedPowerBase.blockMicro, 1, 5905)} + ); + GameRegistry.registerItem(itemWoodTurbine, "woodTurbine"); + GameRegistry.registerItem(itemWoodWindmill, "woodWindmill"); + } + + private static void setupBlocks() { + blockMachine = new BlockMachine(); + blockMachine.setBlockName("rpmachine"); + GameRegistry.registerBlock(blockMachine, ItemExtended.class, "machine"); + blockMachine.setBlockName(0, "rpdeploy"); + blockMachine.setBlockName(1, "rpbreaker"); + blockMachine.setBlockName(2, "rptranspose"); + blockMachine.setBlockName(3, "rpfilter"); + blockMachine.setBlockName(4, "rpitemdet"); + blockMachine.setBlockName(5, "rpsorter"); + blockMachine.setBlockName(6, "rpbatbox"); + blockMachine.setBlockName(7, "rpmotor"); + blockMachine.setBlockName(8, "rpretriever"); + blockMachine.setBlockName(9, "rpkgen"); + blockMachine.setBlockName(10, "rpregulate"); + blockMachine.setBlockName(11, "rpthermo"); + blockMachine.setBlockName(12, "rpignite"); + blockMachine.setBlockName(13, "rpassemble"); + blockMachine.setBlockName(14, "rpeject"); + blockMachine.setBlockName(15, "rprelay"); + GameRegistry.registerTileEntity(TileWindTurbine.class, "RPWind"); + GameRegistry.registerTileEntity(TilePipe.class, "RPPipe"); + GameRegistry.registerTileEntity(TilePump.class, "RPPump"); + GameRegistry.registerTileEntity(TileTube.class, "RPTube"); + GameRegistry.registerTileEntity(TileRedstoneTube.class, "RPRSTube"); + GameRegistry.registerTileEntity(TileRestrictTube.class, "RPRTube"); + GameRegistry.registerTileEntity(TileMagTube.class, "RPMTube"); + GameRegistry.registerTileEntity(TileAccel.class, "RPAccel"); + GameRegistry.registerTileEntity(TileDeploy.class, "RPDeploy"); + GameRegistry.registerTileEntity(TileBreaker.class, "RPBreaker"); + GameRegistry.registerTileEntity(TileTranspose.class, "RPTranspose"); + GameRegistry.registerTileEntity(TileFilter.class, "RPFilter"); + GameRegistry.registerTileEntity(TileItemDetect.class, "RPItemDet"); + GameRegistry.registerTileEntity(TileSorter.class, "RPSorter"); + GameRegistry.registerTileEntity(TileBatteryBox.class, "RPBatBox"); + GameRegistry.registerTileEntity(TileMotor.class, "RPMotor"); + GameRegistry.registerTileEntity(TileRetriever.class, "RPRetrieve"); + GameRegistry.registerTileEntity(TileRegulator.class, "RPRegulate"); + GameRegistry.registerTileEntity(TileThermopile.class, "RPThermo"); + GameRegistry.registerTileEntity(TileIgniter.class, "RPIgnite"); + GameRegistry.registerTileEntity(TileAssemble.class, "RPAssemble"); + GameRegistry.registerTileEntity(TileEject.class, "RPEject"); + GameRegistry.registerTileEntity(TileRelay.class, "RPRelay"); + blockMachine.addTileEntityMapping(0, TileDeploy::new); + blockMachine.addTileEntityMapping(1, TileBreaker::new); + blockMachine.addTileEntityMapping(2, TileTranspose::new); + blockMachine.addTileEntityMapping(3, TileFilter::new); + blockMachine.addTileEntityMapping(4, TileItemDetect::new); + blockMachine.addTileEntityMapping(5, TileSorter::new); + blockMachine.addTileEntityMapping(6, TileBatteryBox::new); + blockMachine.addTileEntityMapping(7, TileMotor::new); + blockMachine.addTileEntityMapping(8, TileRetriever::new); + blockMachine.addTileEntityMapping(9, TileWindTurbine::new); + blockMachine.addTileEntityMapping(10, TileRegulator::new); + blockMachine.addTileEntityMapping(11, TileThermopile::new); + blockMachine.addTileEntityMapping(12, TileIgniter::new); + blockMachine.addTileEntityMapping(13, TileAssemble::new); + blockMachine.addTileEntityMapping(14, TileEject::new); + blockMachine.addTileEntityMapping(15, TileRelay::new); + blockMachine2 = new BlockMachine(); + blockMachine.setBlockName("rpmachine2"); + GameRegistry.registerBlock(blockMachine2, ItemExtended.class, "machine2"); + blockMachine2.setBlockName(0, "rpsortron"); + blockMachine2.setBlockName(1, "rpmanager"); + GameRegistry.registerTileEntity(TileSortron.class, "RPSortron"); + GameRegistry.registerTileEntity(TileManager.class, "RPManager"); + blockMachine2.addTileEntityMapping(0, TileSortron::new); + blockMachine2.addTileEntityMapping(1, TileManager::new); + blockMachinePanel = new BlockMachinePanel(); + GameRegistry.registerBlock(blockMachinePanel, ItemMachinePanel.class, "machinePanel"); + GameRegistry.registerTileEntity(TileSolarPanel.class, "RPSolar"); + GameRegistry.registerTileEntity(TileGrate.class, "RPGrate"); + GameRegistry.registerTileEntity(TileTransformer.class, "RPXfmr"); + blockMachinePanel.addTileEntityMapping(0, TileSolarPanel::new); + blockMachinePanel.addTileEntityMapping(1, TilePump::new); + blockMachinePanel.addTileEntityMapping(2, TileAccel::new); + blockMachinePanel.addTileEntityMapping(3, TileGrate::new); + blockMachinePanel.addTileEntityMapping(4, TileTransformer::new); + blockMachinePanel.setBlockName(0, "rpsolar"); + blockMachinePanel.setBlockName(1, "rppump"); + blockMachinePanel.setBlockName(2, "rpaccel"); + blockMachinePanel.setBlockName(3, "rpgrate"); + blockMachinePanel.setBlockName(4, "rptransformer"); + GameRegistry.registerTileEntity(TileBlueFurnace.class, "RPBFurnace"); + GameRegistry.registerTileEntity(TileBufferChest.class, "RPBuffer"); + GameRegistry.registerTileEntity(TileBlueAlloyFurnace.class, "RPBAFurnace"); + GameRegistry.registerTileEntity(TileChargingBench.class, "RPCharge"); + RedPowerBase.blockAppliance.setBlockName(1, "rpbfurnace"); + RedPowerBase.blockAppliance.addTileEntityMapping(1, TileBlueFurnace::new); + RedPowerBase.blockAppliance.setBlockName(2, "rpbuffer"); + RedPowerBase.blockAppliance.addTileEntityMapping(2, TileBufferChest::new); + RedPowerBase.blockAppliance.setBlockName(4, "rpbafurnace"); + RedPowerBase.blockAppliance.addTileEntityMapping(4, TileBlueAlloyFurnace::new); + RedPowerBase.blockAppliance.setBlockName(5, "rpcharge"); + RedPowerBase.blockAppliance.addTileEntityMapping(5, TileChargingBench::new); + blockFrame = new BlockFrame(); + GameRegistry.registerBlock(blockFrame, ItemExtended.class, "frame"); + blockFrame.setBlockName("rpframe"); + blockFrame.setBlockName(0, "rpframe"); + blockFrame.setBlockName(2, "rptframe"); + blockFrame.setBlockName(3, "rprtframe"); + GameRegistry.registerTileEntity(TileFrame.class, "RPFrame"); + GameRegistry.registerTileEntity(TileFrameMoving.class, "RPMFrame"); + GameRegistry.registerTileEntity(TileFrameTube.class, "RPTFrame"); + GameRegistry.registerTileEntity(TileFrameRedstoneTube.class, "RPRTFrame"); + blockFrame.addTileEntityMapping(0, TileFrame::new); + blockFrame.addTileEntityMapping(1, TileFrameMoving::new); + blockFrame.addTileEntityMapping(2, TileFrameTube::new); + blockFrame.addTileEntityMapping(3, TileFrameRedstoneTube::new); + MicroPlacementTube imp = new MicroPlacementTube(); + RedPowerBase.blockMicro.registerPlacement(7, imp); + RedPowerBase.blockMicro.registerPlacement(8, imp); + RedPowerBase.blockMicro.registerPlacement(9, imp); + RedPowerBase.blockMicro.registerPlacement(10, imp); + RedPowerBase.blockMicro.registerPlacement(11, imp); + RedPowerBase.blockMicro.addTileEntityMapping(7, TilePipe::new); + RedPowerBase.blockMicro.addTileEntityMapping(8, TileTube::new); + RedPowerBase.blockMicro.addTileEntityMapping(9, TileRedstoneTube::new); + RedPowerBase.blockMicro.addTileEntityMapping(10, TileRestrictTube::new); + RedPowerBase.blockMicro.addTileEntityMapping(11, TileMagTube::new); + GameRegistry.addRecipe( + new ItemStack(blockMachine, 1, 0), + new Object[]{"SCS", "SPS", "SRS", 'S', Blocks.cobblestone, 'C', Blocks.chest, 'R', Items.redstone, 'P', Blocks.piston} + ); + GameRegistry.addRecipe( + new ItemStack(blockMachine, 1, 1), + new Object[]{"SAS", "SPS", "SRS", 'S', Blocks.cobblestone, 'A', Items.iron_pickaxe, 'R', Items.redstone, 'P', Blocks.piston} + ); + CraftLib.addOreRecipe( + new ItemStack(blockMachine, 1, 2), "SSS", "WPW", "SRS", 'S', Blocks.cobblestone, 'R', Items.redstone, 'P', Blocks.piston, 'W', "plankWood" + ); + GameRegistry.addRecipe( + new ItemStack(blockMachine, 1, 3), + new Object[]{"SSS", "GPG", "SRS", 'S', Blocks.cobblestone, 'R', RedPowerBase.itemWaferRed, 'P', Blocks.piston, 'G', Items.gold_ingot} + ); + CraftLib.addOreRecipe( + new ItemStack(blockMachine, 1, 4), + "BTB", + "RPR", + "WTW", + 'B', + "ingotBrass", + 'T', + new ItemStack(RedPowerBase.blockMicro, 1, 2048), + 'R', + RedPowerBase.itemWaferRed, + 'W', + "plankWood", + 'P', + Blocks.wooden_pressure_plate + ); + GameRegistry.addRecipe( + new ItemStack(blockMachine, 1, 5), + new Object[]{ + "III", "RFR", "IBI", 'B', RedPowerBase.itemIngotBlue, 'R', RedPowerBase.itemWaferRed, 'F', new ItemStack(blockMachine, 1, 3), 'I', Items.iron_ingot + } + ); + GameRegistry.addRecipe( + new ItemStack(blockMachine, 1, 8), + new Object[]{ + "BLB", + "EFE", + "INI", + 'N', + RedPowerBase.itemIngotBlue, + 'B', + RedPowerBase.itemIngotBrass, + 'E', + Items.ender_pearl, + 'L', + Items.leather, + 'F', + new ItemStack(blockMachine, 1, 3), + 'I', + Items.iron_ingot + } + ); + GameRegistry.addRecipe( + new ItemStack(blockMachine, 1, 9), + new Object[]{ + "IBI", "IMI", "IUI", 'I', Items.iron_ingot, 'B', RedPowerBase.itemIngotBrass, 'M', RedPowerBase.itemMotor, 'U', RedPowerBase.itemIngotBlue + } + ); + CraftLib.addOreRecipe(new ItemStack(RedPowerBase.blockAppliance, 1, 2), "BWB", "W W", "BWB", 'B', Blocks.iron_bars, 'W', "plankWood"); + CraftLib.addOreRecipe( + new ItemStack(blockMachine, 1, 10), + "BCB", + "RDR", + "WCW", + 'R', + RedPowerBase.itemWaferRed, + 'B', + "ingotBrass", + 'D', + new ItemStack(blockMachine, 1, 4), + 'W', + "plankWood", + 'C', + new ItemStack(RedPowerBase.blockAppliance, 1, 2) + ); + CraftLib.addOreRecipe( + new ItemStack(blockMachine, 1, 11), + "CIC", + "WBW", + "CIC", + 'I', + Items.iron_ingot, + 'B', + RedPowerBase.itemIngotBlue, + 'W', + RedPowerBase.itemWaferBlue, + 'C', + "ingotCopper" + ); + CraftLib.addOreRecipe(new ItemStack(RedPowerBase.blockMicro, 8, 2048), "BGB", 'G', Blocks.glass, 'B', "ingotBrass"); + GameRegistry.addShapelessRecipe( + new ItemStack(RedPowerBase.blockMicro, 1, 2304), new Object[]{Items.redstone, new ItemStack(RedPowerBase.blockMicro, 1, 2048)} + ); + GameRegistry.addShapelessRecipe( + new ItemStack(RedPowerBase.blockMicro, 1, 2560), new Object[]{Items.iron_ingot, new ItemStack(RedPowerBase.blockMicro, 1, 2048)} + ); + GameRegistry.addRecipe( + new ItemStack(RedPowerBase.blockMicro, 8, 2816), + new Object[]{"CCC", "OGO", "CCC", 'G', Blocks.glass, 'O', Blocks.obsidian, 'C', RedPowerBase.itemFineCopper} + ); + GameRegistry.addRecipe( + new ItemStack(RedPowerBase.blockAppliance, 1, 1), + new Object[]{"CCC", "C C", "IBI", 'C', Blocks.clay, 'B', RedPowerBase.itemIngotBlue, 'I', Items.iron_ingot} + ); + GameRegistry.addRecipe( + new ItemStack(RedPowerBase.blockAppliance, 1, 4), + new Object[]{"CCC", "C C", "IBI", 'C', Blocks.brick_block, 'B', RedPowerBase.itemIngotBlue, 'I', Items.iron_ingot} + ); + GameRegistry.addRecipe( + new ItemStack(blockMachinePanel, 1, 0), new Object[]{"WWW", "WBW", "WWW", 'W', RedPowerBase.itemWaferBlue, 'B', RedPowerBase.itemIngotBlue} + ); + GameRegistry.addRecipe(new ItemStack(blockMachinePanel, 1, 2), new Object[]{"BOB", "O O", "BOB", 'O', Blocks.obsidian, 'B', RedPowerBase.itemIngotBlue}); + CraftLib.addOreRecipe( + new ItemStack(blockMachine, 1, 6), + "BWB", + "BIB", + "IAI", + 'I', + Items.iron_ingot, + 'W', + "plankWood", + 'A', + RedPowerBase.itemIngotBlue, + 'B', + itemBatteryEmpty + ); + GameRegistry.addRecipe( + new ItemStack(blockMachinePanel, 1, 4), + new Object[]{"III", "CIC", "BIB", 'I', Items.iron_ingot, 'C', RedPowerBase.itemCopperCoil, 'B', RedPowerBase.itemIngotBlue} + ); + GameRegistry.addRecipe( + new ItemStack(blockMachine2, 1, 0), + new Object[]{ + "IDI", + "RSR", + "IWI", + 'D', + Items.diamond, + 'I', + Items.iron_ingot, + 'R', + RedPowerBase.itemWaferRed, + 'W', + new ItemStack(RedPowerBase.blockMicro, 1, 3072), + 'S', + new ItemStack(blockMachine, 1, 5) + } + ); + CraftLib.addOreRecipe( + new ItemStack(blockMachine2, 1, 1), + "IMI", + "RSR", + "WBW", + 'I', + Items.iron_ingot, + 'R', + RedPowerBase.itemWaferRed, + 'S', + new ItemStack(blockMachine, 1, 5), + 'M', + new ItemStack(blockMachine, 1, 10), + 'W', + "plankWood", + 'B', + RedPowerBase.itemIngotBlue + ); + CraftLib.addOreRecipe( + new ItemStack(RedPowerBase.blockAppliance, 1, 5), + "OQO", + "BCB", + "WUW", + 'O', + Blocks.obsidian, + 'W', + "plankWood", + 'U', + RedPowerBase.itemIngotBlue, + 'C', + Blocks.chest, + 'Q', + RedPowerBase.itemCopperCoil, + 'B', + itemBatteryEmpty + ); + GameRegistry.addRecipe( + new ItemStack(blockMachine, 1, 12), + new Object[]{ + "NFN", + "SDS", + "SRS", + 'N', + Blocks.netherrack, + 'F', + Items.flint_and_steel, + 'D', + new ItemStack(blockMachine, 1, 0), + 'S', + Blocks.cobblestone, + 'R', + Items.redstone + } + ); + GameRegistry.addRecipe( + new ItemStack(blockMachine, 1, 13), + new Object[]{ + "BIB", + "CDC", + "IRI", + 'I', + Items.iron_ingot, + 'D', + new ItemStack(blockMachine, 1, 0), + 'C', + new ItemStack(RedPowerBase.blockMicro, 1, 768), + 'R', + RedPowerBase.itemWaferRed, + 'B', + RedPowerBase.itemIngotBrass + } + ); + CraftLib.addOreRecipe( + new ItemStack(blockMachine, 1, 14), + "WBW", + "WTW", + "SRS", + 'R', + Items.redstone, + 'T', + new ItemStack(blockMachine, 1, 2), + 'W', + "plankWood", + 'B', + new ItemStack(RedPowerBase.blockAppliance, 1, 2), + 'S', + Blocks.cobblestone + ); + CraftLib.addOreRecipe( + new ItemStack(blockMachine, 1, 15), + "WBW", + "WTW", + "SRS", + 'R', + RedPowerBase.itemWaferRed, + 'T', + new ItemStack(blockMachine, 1, 2), + 'W', + "plankWood", + 'B', + new ItemStack(RedPowerBase.blockAppliance, 1, 2), + 'S', + Blocks.cobblestone + ); + GameRegistry.addRecipe( + RedPowerBase.itemCopperCoil, new Object[]{"FBF", "BIB", "FBF", 'F', RedPowerBase.itemFineCopper, 'B', Blocks.iron_bars, 'I', Items.iron_ingot} + ); + GameRegistry.addRecipe( + RedPowerBase.itemMotor, new Object[]{"ICI", "ICI", "IBI", 'C', RedPowerBase.itemCopperCoil, 'B', RedPowerBase.itemIngotBlue, 'I', Items.iron_ingot} + ); + CraftLib.addOreRecipe(new ItemStack(blockFrame, 1), "SSS", "SBS", "SSS", 'S', Items.stick, 'B', "ingotBrass"); + GameRegistry.addShapelessRecipe( + new ItemStack(blockFrame, 1, 2), new Object[]{new ItemStack(blockFrame, 1), new ItemStack(RedPowerBase.blockMicro, 1, 2048)} + ); + GameRegistry.addShapelessRecipe( + new ItemStack(blockFrame, 1, 3), new Object[]{new ItemStack(blockFrame, 1), new ItemStack(RedPowerBase.blockMicro, 1, 2304)} + ); + GameRegistry.addShapelessRecipe(new ItemStack(blockFrame, 1, 3), new Object[]{new ItemStack(blockFrame, 1, 2), Items.redstone}); + CraftLib.addOreRecipe( + new ItemStack(blockMachine, 1, 7), + "III", + "BMB", + "IAI", + 'I', + Items.iron_ingot, + 'A', + RedPowerBase.itemIngotBlue, + 'B', + "ingotBrass", + 'M', + RedPowerBase.itemMotor + ); + CraftLib.addOreRecipe(new ItemStack(RedPowerBase.blockMicro, 16, 1792), "B B", "BGB", "B B", 'G', Blocks.glass, 'B', "ingotBrass"); + GameRegistry.addRecipe( + new ItemStack(blockMachinePanel, 1, 3), new Object[]{"III", "I I", "IPI", 'P', new ItemStack(RedPowerBase.blockMicro, 1, 1792), 'I', Blocks.iron_bars} + ); + GameRegistry.addRecipe( + new ItemStack(blockMachinePanel, 1, 1), + new Object[]{ + "III", + "PMP", + "IAI", + 'I', + Items.iron_ingot, + 'A', + RedPowerBase.itemIngotBlue, + 'P', + new ItemStack(RedPowerBase.blockMicro, 1, 1792), + 'M', + RedPowerBase.itemMotor + } + ); + } + + public static void initAchievements() { + AchieveLib.registerAchievement("rpTranspose", -2, 2, new ItemStack(blockMachine, 1, 2), AchievementList.acquireIron); + AchieveLib.registerAchievement("rpBreaker", -2, 4, new ItemStack(blockMachine, 1, 1), AchievementList.acquireIron); + AchieveLib.registerAchievement("rpDeploy", -2, 6, new ItemStack(blockMachine, 1, 0), AchievementList.acquireIron); + AchieveLib.addCraftingAchievement(new ItemStack(blockMachine, 1, 2), "rpTranspose"); + AchieveLib.addCraftingAchievement(new ItemStack(blockMachine, 1, 1), "rpBreaker"); + AchieveLib.addCraftingAchievement(new ItemStack(blockMachine, 1, 0), "rpDeploy"); + AchieveLib.registerAchievement("rpFrames", 4, 4, new ItemStack(blockMachine, 1, 7), "rpIngotBlue"); + AchieveLib.registerAchievement("rpPump", 4, 5, new ItemStack(blockMachinePanel, 1, 1), "rpIngotBlue"); + AchieveLib.addCraftingAchievement(new ItemStack(blockMachine, 1, 7), "rpFrames"); + AchieveLib.addCraftingAchievement(new ItemStack(blockMachinePanel, 1, 1), "rpPump"); + } + + public Object getClientGuiElement(int ID, EntityPlayer player, World world, int X, int Y, int Z) { + switch(ID) { + case 1: + return new GuiDeploy(player.inventory, CoreLib.getGuiTileEntity(world, X, Y, Z, TileDeploy.class)); + case 2: + return new GuiFilter(player.inventory, CoreLib.getGuiTileEntity(world, X, Y, Z, TileFilter.class)); + case 3: + return new GuiBlueFurnace(player.inventory, CoreLib.getGuiTileEntity(world, X, Y, Z, TileBlueFurnace.class)); + case 4: + return new GuiBufferChest(player.inventory, CoreLib.getGuiTileEntity(world, X, Y, Z, TileBufferChest.class)); + case 5: + return new GuiSorter(player.inventory, CoreLib.getGuiTileEntity(world, X, Y, Z, TileSorter.class)); + case 6: + return new GuiItemDetect(player.inventory, CoreLib.getGuiTileEntity(world, X, Y, Z, TileItemDetect.class)); + case 7: + return new GuiRetriever(player.inventory, CoreLib.getGuiTileEntity(world, X, Y, Z, TileRetriever.class)); + case 8: + return new GuiBatteryBox(player.inventory, CoreLib.getGuiTileEntity(world, X, Y, Z, TileBatteryBox.class)); + case 9: + return new GuiRegulator(player.inventory, CoreLib.getGuiTileEntity(world, X, Y, Z, TileRegulator.class)); + case 10: + return new GuiBlueAlloyFurnace(player.inventory, CoreLib.getGuiTileEntity(world, X, Y, Z, TileBlueAlloyFurnace.class)); + case 11: + return new GuiAssemble(player.inventory, CoreLib.getGuiTileEntity(world, X, Y, Z, TileAssemble.class)); + case 12: + return new GuiEject(player.inventory, CoreLib.getGuiTileEntity(world, X, Y, Z, TileEjectBase.class)); + case 13: + return new GuiEject(player.inventory, CoreLib.getGuiTileEntity(world, X, Y, Z, TileRelay.class)); + case 14: + return new GuiChargingBench(player.inventory, CoreLib.getGuiTileEntity(world, X, Y, Z, TileChargingBench.class)); + case 15: + return new GuiWindTurbine(player.inventory, CoreLib.getGuiTileEntity(world, X, Y, Z, TileWindTurbine.class)); + case 16: + return new GuiManager(player.inventory, CoreLib.getGuiTileEntity(world, X, Y, Z, TileManager.class)); + default: + return null; + } + } + + public Object getServerGuiElement(int ID, EntityPlayer player, World world, int X, int Y, int Z) { + switch(ID) { + case 1: + return new ContainerDeploy(player.inventory, CoreLib.getTileEntity(world, X, Y, Z, TileDeploy.class)); + case 2: + return new ContainerFilter(player.inventory, CoreLib.getTileEntity(world, X, Y, Z, TileFilter.class)); + case 3: + return new ContainerBlueFurnace(player.inventory, CoreLib.getTileEntity(world, X, Y, Z, TileBlueFurnace.class)); + case 4: + return new ContainerBufferChest(player.inventory, CoreLib.getTileEntity(world, X, Y, Z, TileBufferChest.class)); + case 5: + return new ContainerSorter(player.inventory, CoreLib.getTileEntity(world, X, Y, Z, TileSorter.class)); + case 6: + return new ContainerItemDetect(player.inventory, CoreLib.getTileEntity(world, X, Y, Z, TileItemDetect.class)); + case 7: + return new ContainerRetriever(player.inventory, CoreLib.getTileEntity(world, X, Y, Z, TileRetriever.class)); + case 8: + return new ContainerBatteryBox(player.inventory, CoreLib.getTileEntity(world, X, Y, Z, TileBatteryBox.class)); + case 9: + return new ContainerRegulator(player.inventory, CoreLib.getTileEntity(world, X, Y, Z, TileRegulator.class)); + case 10: + return new ContainerBlueAlloyFurnace(player.inventory, CoreLib.getTileEntity(world, X, Y, Z, TileBlueAlloyFurnace.class)); + case 11: + return new ContainerAssemble(player.inventory, CoreLib.getTileEntity(world, X, Y, Z, TileAssemble.class)); + case 12: + return new ContainerEject(player.inventory, CoreLib.getTileEntity(world, X, Y, Z, TileEjectBase.class)); + case 13: + return new ContainerEject(player.inventory, CoreLib.getTileEntity(world, X, Y, Z, TileRelay.class)); + case 14: + return new ContainerChargingBench(player.inventory, CoreLib.getTileEntity(world, X, Y, Z, TileChargingBench.class)); + case 15: + return new ContainerWindTurbine(player.inventory, CoreLib.getTileEntity(world, X, Y, Z, TileWindTurbine.class)); + case 16: + return new ContainerManager(player.inventory, CoreLib.getTileEntity(world, X, Y, Z, TileManager.class)); + default: + return null; + } + } + + @SideOnly(Side.CLIENT) + public void registerRenderers() { + RenderLib.setRenderer(blockMachine, 0, RenderMachine::new); + RenderLib.setRenderer(blockMachine, 1, RenderBreaker::new); + RenderLib.setRenderer(blockMachine, 2, RenderMachine::new); + RenderLib.setRenderer(blockMachine, 3, RenderMachine::new); + RenderLib.setRenderer(blockMachine, 4, RenderMachine::new); + RenderLib.setRenderer(blockMachine, 5, RenderMachine::new); + RenderLib.setRenderer(blockMachine, 6, RenderBatteryBox::new); + RenderLib.setRenderer(blockMachine, 7, RenderMotor::new); + RenderLib.setRenderer(blockMachine, 8, RenderMachine::new); + RenderLib.setRenderer(blockMachine, 9, RenderWindTurbine::new); + RenderLib.setRenderer(blockMachine, 10, RenderMachine::new); + RenderLib.setRenderer(blockMachine, 11, RenderThermopile::new); + RenderLib.setRenderer(blockMachine, 12, RenderMachine::new); + RenderLib.setRenderer(blockMachine, 13, RenderMachine::new); + RenderLib.setRenderer(blockMachine, 14, RenderMachine::new); + RenderLib.setRenderer(blockMachine, 15, RenderMachine::new); + RenderLib.setRenderer(blockMachine2, 0, RenderMachine::new); + RenderLib.setRenderer(blockMachine2, 1, RenderMachine::new); + RenderLib.setRenderer(RedPowerBase.blockAppliance, 1, RenderBlueFurnace::new); + RenderLib.setRenderer(RedPowerBase.blockAppliance, 2, RenderBufferChest::new); + RenderLib.setRenderer(RedPowerBase.blockAppliance, 4, RenderBlueAlloyFurnace::new); + RenderLib.setRenderer(RedPowerBase.blockAppliance, 5, RenderChargingBench::new); + RenderLib.setHighRenderer(RedPowerBase.blockMicro, 7, RenderPipe::new); + RenderLib.setHighRenderer(RedPowerBase.blockMicro, 8, RenderTube::new); + RenderLib.setHighRenderer(RedPowerBase.blockMicro, 9, RenderRedstoneTube::new); + RenderLib.setHighRenderer(RedPowerBase.blockMicro, 10, RenderTube::new); + RenderLib.setHighRenderer(RedPowerBase.blockMicro, 11, RenderTube::new); + RenderLib.setRenderer(blockMachinePanel, 0, RenderSolarPanel::new); + RenderLib.setRenderer(blockMachinePanel, 1, RenderPump::new); + RenderLib.setRenderer(blockMachinePanel, 2, RenderAccel::new); + RenderLib.setRenderer(blockMachinePanel, 3, RenderGrate::new); + RenderLib.setRenderer(blockMachinePanel, 4, RenderTransformer::new); + RenderLib.setRenderer(blockFrame, 0, RenderFrame::new); + RenderLib.setRenderer(blockFrame, 1, RenderFrameMoving::new); + RenderLib.setRenderer(blockFrame, 2, RenderFrameTube::new); + RenderLib.setRenderer(blockFrame, 3, RenderFrameRedstoneTube::new); + ClientRegistry.bindTileEntitySpecialRenderer(TileBreaker.class, new RenderBreaker(blockMachine)); + ClientRegistry.bindTileEntitySpecialRenderer(TileFrame.class, new RenderFrame(blockFrame)); + ClientRegistry.bindTileEntitySpecialRenderer(TileFrameTube.class, new RenderFrameTube(blockFrame)); + ClientRegistry.bindTileEntitySpecialRenderer(TileFrameRedstoneTube.class, new RenderFrameRedstoneTube(blockFrame)); + ClientRegistry.bindTileEntitySpecialRenderer(TileFrameMoving.class, new RenderFrameMoving(blockFrame)); + ClientRegistry.bindTileEntitySpecialRenderer(TileMachine.class, new RenderMachine(blockMachine)); + ClientRegistry.bindTileEntitySpecialRenderer(TileTube.class, new RenderTube(RedPowerBase.blockMicro)); + ClientRegistry.bindTileEntitySpecialRenderer(TileRedstoneTube.class, new RenderRedstoneTube(RedPowerBase.blockMicro)); + ClientRegistry.bindTileEntitySpecialRenderer(TileMotor.class, new RenderMotor(blockMachine)); + ClientRegistry.bindTileEntitySpecialRenderer(TileAccel.class, new RenderAccel(blockMachinePanel)); + ClientRegistry.bindTileEntitySpecialRenderer(TilePump.class, new RenderPump(blockMachinePanel)); + ClientRegistry.bindTileEntitySpecialRenderer(TileTransformer.class, new RenderTransformer(blockMachinePanel)); + ClientRegistry.bindTileEntitySpecialRenderer(TileThermopile.class, new RenderThermopile(blockMachine)); + ClientRegistry.bindTileEntitySpecialRenderer(TilePipe.class, new RenderPipe(RedPowerBase.blockMicro)); + ClientRegistry.bindTileEntitySpecialRenderer(TileWindTurbine.class, new RenderWindTurbine(blockMachine)); + ClientRegistry.bindTileEntitySpecialRenderer(TileGrate.class, new RenderGrate(blockMachinePanel)); + ClientRegistry.bindTileEntitySpecialRenderer(TileSolarPanel.class, new RenderSolarPanel(blockMachinePanel)); + ClientRegistry.bindTileEntitySpecialRenderer(TileBatteryBox.class, new RenderBatteryBox(blockMachine)); + ClientRegistry.bindTileEntitySpecialRenderer(TileBlueFurnace.class, new RenderBlueFurnace(RedPowerBase.blockAppliance)); + ClientRegistry.bindTileEntitySpecialRenderer(TileBlueAlloyFurnace.class, new RenderBlueAlloyFurnace(RedPowerBase.blockAppliance)); + ClientRegistry.bindTileEntitySpecialRenderer(TileChargingBench.class, new RenderChargingBench(RedPowerBase.blockAppliance)); + ClientRegistry.bindTileEntitySpecialRenderer(TileBufferChest.class, new RenderBufferChest(RedPowerBase.blockAppliance)); + } + + @SideOnly(Side.CLIENT) + @SubscribeEvent + public void onTextureStitch(Pre evt) { + TextureMap map = evt.map; + if (map.getTextureType() == 0) { + frameCrossed = map.registerIcon("rpmachine:frameCrossed"); + frameCovered = map.registerIcon("rpmachine:frameCovered"); + framePaneled = map.registerIcon("rpmachine:framePaneled"); + crate = map.registerIcon("rpmachine:crate"); + electronicsBottom = map.registerIcon("rpmachine:electronicsBottom"); + batteryTop = map.registerIcon("rpmachine:batteryTop"); + + for(int i = 0; i < 9; ++i) { + batterySide[i] = map.registerIcon("rpmachine:batterySide/" + i); + } + + retrieverFront = map.registerIcon("rpmachine:retrieverFront"); + retrieverBack = map.registerIcon("rpmachine:retrieverBack"); + retrieverSide = map.registerIcon("rpmachine:retrieverSide"); + retrieverSideOn = map.registerIcon("rpmachine:retrieverSideOn"); + retrieverSideCharged = map.registerIcon("rpmachine:retrieverSideCharged"); + retrieverSideChargedOn = map.registerIcon("rpmachine:retrieverSideChargedOn"); + transposerFront = map.registerIcon("rpmachine:transposerFront"); + transposerSide = map.registerIcon("rpmachine:transposerSide"); + transposerSideOn = map.registerIcon("rpmachine:transposerSideOn"); + filterSide = map.registerIcon("rpmachine:filterSide"); + filterSideOn = map.registerIcon("rpmachine:filterSideOn"); + breakerFront = map.registerIcon("rpmachine:breakerFront"); + breakerFrontOn = map.registerIcon("rpmachine:breakerFrontOn"); + breakerBack = map.registerIcon("rpmachine:breakerBack"); + breakerSide = map.registerIcon("rpmachine:breakerSide"); + breakerSideOn = map.registerIcon("rpmachine:breakerSideOn"); + deployerBack = map.registerIcon("rpmachine:deployerBack"); + deployerFront = map.registerIcon("rpmachine:deployerFront"); + deployerFrontOn = map.registerIcon("rpmachine:deployerFrontOn"); + deployerSide = map.registerIcon("rpmachine:deployerSide"); + deployerSideAlt = map.registerIcon("rpmachine:deployerSideAlt"); + motorBottom = map.registerIcon("rpmachine:motorBottom"); + motorSide = map.registerIcon("rpmachine:motorSide"); + motorFront = map.registerIcon("rpmachine:motorFront"); + motorFrontActive = map.registerIcon("rpmachine:motorFrontActive"); + motorFrontCharged = map.registerIcon("rpmachine:motorFrontCharged"); + motorTop = map.registerIcon("rpmachine:motorTop"); + motorTopActive = map.registerIcon("rpmachine:motorTopActive"); + turbineFront = map.registerIcon("rpmachine:turbineFront"); + turbineSide = map.registerIcon("rpmachine:turbineSide"); + turbineSideAlt = map.registerIcon("rpmachine:turbineSideAlt"); + thermopileFront = map.registerIcon("rpmachine:thermopileFront"); + thermopileSide = map.registerIcon("rpmachine:thermopileSide"); + thermopileTop = map.registerIcon("rpmachine:thermopileTop"); + btFurnaceTop = map.registerIcon("rpmachine:btFurnaceTop"); + btFurnaceSide = map.registerIcon("rpmachine:btFurnaceSide"); + btFurnaceFront = map.registerIcon("rpmachine:btFurnaceFront"); + btFurnaceFrontOn = map.registerIcon("rpmachine:btFurnaceFrontOn"); + btAlloyFurnaceTop = map.registerIcon("rpmachine:btAlloyFurnaceTop"); + btAlloyFurnaceSide = map.registerIcon("rpmachine:btAlloyFurnaceSide"); + btAlloyFurnaceFront = map.registerIcon("rpmachine:btAlloyFurnaceFront"); + btAlloyFurnaceFrontOn = map.registerIcon("rpmachine:btAlloyFurnaceFrontOn"); + btChargerTop = map.registerIcon("rpmachine:btChargerTop"); + btChargerTopOn = map.registerIcon("rpmachine:btChargerTopOn"); + btChargerBottom = map.registerIcon("rpmachine:btChargerBottom"); + btChargerSide = map.registerIcon("rpmachine:btChargerSide"); + btChargerSideOn = map.registerIcon("rpmachine:btChargerSideOn"); + + for(int i = 0; i < 5; ++i) { + btChargerFront[i] = map.registerIcon("rpmachine:btChargerFront/" + i); + btChargerFrontPowered[i] = map.registerIcon("rpmachine:btChargerFrontPowered/" + i); + btChargerFrontActive[i] = map.registerIcon("rpmachine:btChargerFrontActive/" + i); + } + + bufferFront = map.registerIcon("rpmachine:bufferFront"); + bufferBack = map.registerIcon("rpmachine:bufferBack"); + bufferSide = map.registerIcon("rpmachine:bufferSide"); + igniterFront = map.registerIcon("rpmachine:igniterFront"); + igniterFrontOn = map.registerIcon("rpmachine:igniterFrontOn"); + igniterSide = map.registerIcon("rpmachine:igniterSide"); + igniterSideAlt = map.registerIcon("rpmachine:igniterSideAlt"); + sorterFront = map.registerIcon("rpmachine:sorterFront"); + sorterBack = map.registerIcon("rpmachine:sorterBack"); + sorterBackCharged = map.registerIcon("rpmachine:sorterBackCharged"); + sorterBackChargedOn = map.registerIcon("rpmachine:sorterBackChargedOn"); + sorterSide = map.registerIcon("rpmachine:sorterSide"); + sorterSideOn = map.registerIcon("rpmachine:sorterSideOn"); + sorterSideCharged = map.registerIcon("rpmachine:sorterSideCharged"); + sorterSideChargedOn = map.registerIcon("rpmachine:sorterSideChargedOn"); + detectorSideAlt = map.registerIcon("rpmachine:detectorSideAlt"); + detectorSideAltOn = map.registerIcon("rpmachine:detectorSideAltOn"); + detectorSide = map.registerIcon("rpmachine:detectorSide"); + detectorSideOn = map.registerIcon("rpmachine:detectorSideOn"); + detectorSideCharged = map.registerIcon("rpmachine:detectorSideCharged"); + detectorSideChargedOn = map.registerIcon("rpmachine:detectorSideChargedOn"); + regulatorFront = map.registerIcon("rpmachine:regulatorFront"); + regulatorBack = map.registerIcon("rpmachine:regulatorBack"); + regulatorSideAlt = map.registerIcon("rpmachine:regulatorSideAlt"); + regulatorSideAltCharged = map.registerIcon("rpmachine:regulatorSideAltCharged"); + regulatorSide = map.registerIcon("rpmachine:regulatorSide"); + regulatorSideOn = map.registerIcon("rpmachine:regulatorSideOn"); + regulatorSideCharged = map.registerIcon("rpmachine:regulatorSideCharged"); + regulatorSideChargedOn = map.registerIcon("rpmachine:regulatorSideChargedOn"); + sortronFront = map.registerIcon("rpmachine:sortronFront"); + sortronBack = map.registerIcon("rpmachine:sortronBack"); + sortronSideAlt = map.registerIcon("rpmachine:sortronSideAlt"); + sortronSideAltCharged = map.registerIcon("rpmachine:sortronSideAltCharged"); + sortronSide = map.registerIcon("rpmachine:sortronSide"); + sortronSideOn = map.registerIcon("rpmachine:sortronSideOn"); + sortronSideCharged = map.registerIcon("rpmachine:sortronSideCharged"); + sortronSideChargedOn = map.registerIcon("rpmachine:sortronSideChargedOn"); + managerFront = map.registerIcon("rpmachine:managerFront"); + managerBack = map.registerIcon("rpmachine:managerBack"); + + for(int i = 0; i < 4; ++i) { + managerSide[i] = map.registerIcon("rpmachine:managerSide/" + i); + } + + for(int i = 0; i < 4; ++i) { + managerSideCharged[i] = map.registerIcon("rpmachine:managerSideCharged/" + i); + } + + assemblerFront = map.registerIcon("rpmachine:assemblerFront"); + assemblerFrontOn = map.registerIcon("rpmachine:assemblerFrontOn"); + assemblerBack = map.registerIcon("rpmachine:assemblerBack"); + assemblerBackOn = map.registerIcon("rpmachine:assemblerBackOn"); + assemblerSide = map.registerIcon("rpmachine:assemblerSide"); + assemblerSideAlt = map.registerIcon("rpmachine:assemblerSideAlt"); + ejectorSide = map.registerIcon("rpmachine:ejectorSide"); + ejectorSideOn = map.registerIcon("rpmachine:ejectorSideOn"); + relaySide = map.registerIcon("rpmachine:relaySide"); + relaySideOn = map.registerIcon("rpmachine:relaySideOn"); + relaySideAlt = map.registerIcon("rpmachine:relaySideAlt"); + pipeSide = map.registerIcon("rpmachine:pipeSide"); + pipeFace = map.registerIcon("rpmachine:pipeFace"); + pipeFlanges = map.registerIcon("rpmachine:pipeFlanges"); + baseTubeSide = map.registerIcon("rpmachine:tubeSide"); + baseTubeFace = map.registerIcon("rpmachine:tubeFace"); + baseTubeSideColor = map.registerIcon("rpmachine:tubeSideColor"); + baseTubeFaceColor = map.registerIcon("rpmachine:tubeFaceColor"); + + for(int i = 0; i < 4; ++i) { + redstoneTubeSide[i] = map.registerIcon("rpmachine:redstoneTubeSide/" + i); + redstoneTubeFace[i] = map.registerIcon("rpmachine:redstoneTubeFace/" + i); + } + + restrictTubeSide = map.registerIcon("rpmachine:restrictionTubeSide"); + restrictTubeFace = map.registerIcon("rpmachine:restrictionTubeFace"); + restrictTubeSideColor = map.registerIcon("rpmachine:restrictionTubeSideColor"); + restrictTubeFaceColor = map.registerIcon("rpmachine:restrictionTubeFaceColor"); + magTubeSide = map.registerIcon("rpmachine:magneticTubeSide"); + magTubeRing = map.registerIcon("rpmachine:magneticTubeRing"); + magTubeFace = map.registerIcon("rpmachine:magneticTubeFace"); + magTubeSideNR = map.registerIcon("rpmachine:magneticTubeSideNR"); + magTubeFaceNR = map.registerIcon("rpmachine:magneticTubeFaceNR"); + tubeItemOverlay = map.registerIcon("rpmachine:tubeItemOverlay"); + solarPanelTop = map.registerIcon("rpmachine:solarPanelTop"); + solarPanelSide = map.registerIcon("rpmachine:solarPanelSide"); + grateSide = map.registerIcon("rpmachine:grateSide"); + grateMossySide = map.registerIcon("rpmachine:grateMossySide"); + grateBack = map.registerIcon("rpmachine:grateBack"); + grateEmptyBack = map.registerIcon("rpmachine:grateEmptyBack"); + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/RedPowerNEIPlugin.java b/src/main/java/com/eloraam/redpower/RedPowerNEIPlugin.java new file mode 100644 index 0000000..58e5e02 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/RedPowerNEIPlugin.java @@ -0,0 +1,195 @@ +package com.eloraam.redpower; + +import codechicken.nei.ItemStackSet; +import codechicken.nei.SubsetWidget.SubsetTag; +import codechicken.nei.api.API; +import codechicken.nei.guihook.GuiContainerManager; +import codechicken.nei.recipe.DefaultOverlayHandler; +import com.eloraam.redpower.base.GuiAdvBench; +import com.eloraam.redpower.base.GuiAlloyFurnace; +import com.eloraam.redpower.base.ItemHandsaw; +import com.eloraam.redpower.nei.AlloyFurnaceOverlayHandler; +import com.eloraam.redpower.nei.AlloyFurnaceRecipeHandler; +import com.eloraam.redpower.nei.MicroRecipeHandler; +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.FMLLog; +import cpw.mods.fml.common.Loader; +import cpw.mods.fml.common.Mod; +import cpw.mods.fml.common.Mod.EventHandler; +import cpw.mods.fml.common.Mod.Instance; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import java.util.ArrayList; +import java.util.List; +import java.util.stream.IntStream; +import net.minecraft.block.Block; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +@Mod( + modid = "RedPowerNEIPlugin", + name = "RedPower NEI Plugin", + version = "1.4.3.1", + dependencies = "after:NotEnoughItems;after:RedPowerBase;after:RedPowerCompat;after:RedPowerControl;after:RedPowerCore;after:RedPowerLighting;after:RedPowerLogic;after:RedPowerMachine;after:RedPowerWiring;after:RedPowerWorld" +) +public class RedPowerNEIPlugin { + @Instance("RedPowerNEIPlugin") + public static RedPowerNEIPlugin instance; + public static boolean wiring; + public static boolean logic; + public static boolean control; + public static boolean lighting; + public static boolean world; + public static boolean machine; + public static boolean base; + public static boolean compat; + static Block micro; + private List validMicroTypes = new ArrayList(); + + @EventHandler + public void preInit(FMLPreInitializationEvent event) { + } + + @EventHandler + public void load(FMLInitializationEvent event) { + } + + @EventHandler + public void postInit(FMLPostInitializationEvent event) { + if (FMLCommonHandler.instance().getSide().isServer()) { + FMLLog.severe("[RedPowerNEIPlugin] Server env detected, disabling...", new Object[0]); + } else { + if (Loader.isModLoaded("NotEnoughItems")) { + wiring = Loader.isModLoaded("RedPowerWiring"); + logic = Loader.isModLoaded("RedPowerLogic"); + control = Loader.isModLoaded("RedPowerControl"); + lighting = Loader.isModLoaded("RedPowerLighting"); + world = Loader.isModLoaded("RedPowerWorld"); + machine = Loader.isModLoaded("RedPowerMachine"); + base = Loader.isModLoaded("RedPowerBase"); + compat = Loader.isModLoaded("RedPowerCompat"); + if (base) { + this.loadCoverSubSets(); + this.loadSaws(); + API.registerGuiOverlay(GuiAlloyFurnace.class, "alloy"); + API.registerGuiOverlay(GuiAdvBench.class, "crafting", 23, 12); + API.registerGuiOverlayHandler(GuiAlloyFurnace.class, new AlloyFurnaceOverlayHandler(), "alloy"); + API.registerGuiOverlayHandler(GuiAdvBench.class, new DefaultOverlayHandler(23, 12), "crafting"); + API.hideItem(new ItemStack(RedPowerBase.blockMultiblock)); + API.registerRecipeHandler(new AlloyFurnaceRecipeHandler()); + API.registerUsageHandler(new AlloyFurnaceRecipeHandler()); + API.registerRecipeHandler(new MicroRecipeHandler()); + API.registerUsageHandler(new MicroRecipeHandler()); + } + } else { + FMLCommonHandler.instance().getFMLLogger().warn("[RedPowerNEIPlugin] No NEI detected, disabling..."); + } + + } + } + + private void loadSaws() { + List saws = new ArrayList(); + + for(Object item : Item.itemRegistry) { + if (item instanceof ItemHandsaw) { + saws.add((ItemHandsaw)item); + } + } + + MicroRecipeHandler.saws = new ItemHandsaw[saws.size()]; + + for(int i = 0; i < saws.size(); ++i) { + MicroRecipeHandler.saws[i] = (ItemHandsaw)saws.get(i); + } + + ItemStackSet set = new ItemStackSet().with(MicroRecipeHandler.saws); + API.addSubset(new SubsetTag("RedPower.Tools.Saws", set)); + API.addSubset(new SubsetTag("Items.Tools.Saws", set)); + } + + private void loadCoverSubSets() { + if (base) { + micro = RedPowerBase.blockMicro; + int startRange = -1; + + for(int i = 0; i < 256; ++i) { + ItemStack stack = new ItemStack(micro, 1, i); + String name = GuiContainerManager.itemDisplayNameShort(stack); + if (!name.endsWith("Unnamed") && !name.endsWith("null")) { + if (startRange == -1) { + startRange = i; + } + } else if (startRange != -1) { + this.validMicroTypes.add(new RedPowerNEIPlugin.ItemRange(micro, startRange, i - 1)); + startRange = -1; + } + } + + this.registerMicroSet("MicroBlocks.Cover", 0); + this.registerMicroSet("MicroBlocks.Panel", 16); + this.registerMicroSet("MicroBlocks.Slab", 17); + this.registerMicroSet("MicroBlocks.Hollow Cover", 24); + this.registerMicroSet("MicroBlocks.Hollow Panel", 25); + this.registerMicroSet("MicroBlocks.Hollow Slab", 26); + this.registerMicroSet("MicroBlocks.Cover Corner", 18); + this.registerMicroSet("MicroBlocks.Panel Corner", 19); + this.registerMicroSet("MicroBlocks.Slab Corner", 20); + this.registerMicroSet("MicroBlocks.Cover Strip", 21); + this.registerMicroSet("MicroBlocks.Panel Strip", 22); + this.registerMicroSet("MicroBlocks.Slab Strip", 23); + this.registerMicroSet("MicroBlocks.Triple Cover", 27); + this.registerMicroSet("MicroBlocks.Cover Slab", 28); + this.registerMicroSet("MicroBlocks.Triple Panel", 29); + this.registerMicroSet("MicroBlocks.Anticover", 30); + this.registerMicroSet("MicroBlocks.Hollow Triple Cover", 31); + this.registerMicroSet("MicroBlocks.Hollow Cover Slab", 32); + this.registerMicroSet("MicroBlocks.Hollow Triple Panel", 33); + this.registerMicroSet("MicroBlocks.Hollow Anticover", 34); + this.registerMicroSet("MicroBlocks.Triple Cover Corner", 35); + this.registerMicroSet("MicroBlocks.Cover Slab Corner", 36); + this.registerMicroSet("MicroBlocks.Triple Panel Corner", 37); + this.registerMicroSet("MicroBlocks.Anticover Corner", 38); + this.registerMicroSet("MicroBlocks.Triple Cover Strip", 39); + this.registerMicroSet("MicroBlocks.Cover Slab Strip", 40); + this.registerMicroSet("MicroBlocks.Triple Panel Strip", 41); + this.registerMicroSet("MicroBlocks.Anticover Strip", 42); + this.registerMicroSet("MicroBlocks.Post", 43); + this.registerMicroSet("MicroBlocks.Pillar", 44); + this.registerMicroSet("MicroBlocks.Column", 45); + if (wiring) { + this.registerMicroSet("Wiring.Jacketed Wire", 64); + this.registerMicroSet("Wiring.Jacketed Cable", 65); + this.registerMicroSet("Bluetricity.Jacketed Bluewire", 66); + } + } + + } + + private void registerMicroSet(String RPName, int microID) { + ItemStackSet set = new ItemStackSet(); + + for(RedPowerNEIPlugin.ItemRange type : this.validMicroTypes) { + set.with( + (ItemStack[])IntStream.rangeClosed(type.start, type.end) + .mapToObj(i -> new ItemStack(type.bl, 1, i + microID * 256)) + .toArray(x$0 -> new ItemStack[x$0]) + ); + } + + API.addSubset("RedPower." + RPName, set); + } + + private class ItemRange { + private final Block bl; + private final int start; + private final int end; + + public ItemRange(Block bl, int start, int end) { + this.bl = bl; + this.start = start; + this.end = end; + } + } +} diff --git a/src/main/java/com/eloraam/redpower/RedPowerWiring.java b/src/main/java/com/eloraam/redpower/RedPowerWiring.java new file mode 100644 index 0000000..7fcc459 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/RedPowerWiring.java @@ -0,0 +1,270 @@ +package com.eloraam.redpower; + +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.CoverLib; +import com.eloraam.redpower.core.CraftLib; +import com.eloraam.redpower.core.RedPowerLib; +import com.eloraam.redpower.core.RenderLib; +import com.eloraam.redpower.core.TileCovered; +import com.eloraam.redpower.wiring.MicroPlacementJacket; +import com.eloraam.redpower.wiring.MicroPlacementWire; +import com.eloraam.redpower.wiring.RenderRedwire; +import com.eloraam.redpower.wiring.TileBluewire; +import com.eloraam.redpower.wiring.TileCable; +import com.eloraam.redpower.wiring.TileInsulatedWire; +import com.eloraam.redpower.wiring.TileRedwire; +import com.eloraam.redpower.wiring.TileWiring; +import cpw.mods.fml.client.registry.ClientRegistry; +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.Mod; +import cpw.mods.fml.common.Mod.EventHandler; +import cpw.mods.fml.common.Mod.Instance; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraftforge.client.event.TextureStitchEvent.Pre; +import net.minecraftforge.common.MinecraftForge; + +@Mod( + modid = "RedPowerWiring", + name = "RedPower Wiring", + version = "2.0pr6", + dependencies = "required-after:RedPowerBase" +) +public class RedPowerWiring { + @Instance("RedPowerWiring") + public static RedPowerWiring instance; + @SideOnly(Side.CLIENT) + public static IIcon redwireTop; + @SideOnly(Side.CLIENT) + public static IIcon redwireFace; + @SideOnly(Side.CLIENT) + public static IIcon bundledTop; + @SideOnly(Side.CLIENT) + public static IIcon bundledFace; + @SideOnly(Side.CLIENT) + public static IIcon powerTop; + @SideOnly(Side.CLIENT) + public static IIcon powerFace; + @SideOnly(Side.CLIENT) + public static IIcon highPowerTop; + @SideOnly(Side.CLIENT) + public static IIcon highPowerFace; + @SideOnly(Side.CLIENT) + public static IIcon jumboSides; + @SideOnly(Side.CLIENT) + public static IIcon jumboTop; + @SideOnly(Side.CLIENT) + public static IIcon jumboCent; + @SideOnly(Side.CLIENT) + public static IIcon jumboCentSide; + @SideOnly(Side.CLIENT) + public static IIcon jumboEnd; + @SideOnly(Side.CLIENT) + public static IIcon jumboCorners; + @SideOnly(Side.CLIENT) + public static IIcon redwireCableOff; + @SideOnly(Side.CLIENT) + public static IIcon redwireCableOn; + @SideOnly(Side.CLIENT) + public static IIcon bluewireCable; + @SideOnly(Side.CLIENT) + public static IIcon bundledCable; + public static IIcon[] insulatedTop = new IIcon[16]; + public static IIcon[] insulatedFaceOff = new IIcon[16]; + public static IIcon[] insulatedFaceOn = new IIcon[16]; + public static IIcon[] bundledColTop = new IIcon[16]; + public static IIcon[] bundledColFace = new IIcon[16]; + + @EventHandler + public void preInit(FMLPreInitializationEvent event) { + if (FMLCommonHandler.instance().getSide().isClient()) { + MinecraftForge.EVENT_BUS.register(instance); + } + + } + + @EventHandler + public void load(FMLInitializationEvent event) { + initJacketRecipes(); + setupWires(); + if (FMLCommonHandler.instance().getSide().isClient()) { + this.registerRenderers(); + } + + } + + @EventHandler + public void postInit(FMLPostInitializationEvent event) { + } + + private static void initJacketRecipes() { + CoverLib.addMaterialHandler( + material -> { + if (!CoverLib.isTransparent(material)) { + GameRegistry.addRecipe( + new ItemStack(RedPowerBase.blockMicro, 4, 16384 + material), + new Object[]{"SSS", "SRS", "SSS", 'S', new ItemStack(RedPowerBase.blockMicro, 1, material), 'R', RedPowerBase.itemIngotRed} + ); + GameRegistry.addRecipe( + new ItemStack(RedPowerBase.blockMicro, 1, 16640 + material), + new Object[]{ + "SSS", "SCS", "SSS", 'S', new ItemStack(RedPowerBase.blockMicro, 1, material), 'C', new ItemStack(RedPowerBase.blockMicro, 1, 768) + } + ); + GameRegistry.addRecipe( + new ItemStack(RedPowerBase.blockMicro, 4, 16896 + material), + new Object[]{"SSS", "SBS", "SSS", 'S', new ItemStack(RedPowerBase.blockMicro, 1, material), 'B', RedPowerBase.itemIngotBlue} + ); + CraftLib.addAlloyResult(CoreLib.copyStack(RedPowerBase.itemIngotRed, 1), new ItemStack(RedPowerBase.blockMicro, 4, 16384 + material)); + CraftLib.addAlloyResult(CoreLib.copyStack(RedPowerBase.itemIngotRed, 5), new ItemStack(RedPowerBase.blockMicro, 8, 16640 + material)); + CraftLib.addAlloyResult(CoreLib.copyStack(RedPowerBase.itemIngotBlue, 1), new ItemStack(RedPowerBase.blockMicro, 4, 16896 + material)); + } + + } + ); + } + + public static void setupWires() { + GameRegistry.registerTileEntity(TileRedwire.class, "Redwire"); + GameRegistry.registerTileEntity(TileInsulatedWire.class, "InsRedwire"); + GameRegistry.registerTileEntity(TileCable.class, "RedCable"); + GameRegistry.registerTileEntity(TileCovered.class, "Covers"); + GameRegistry.registerTileEntity(TileBluewire.class, "Bluewire"); + MicroPlacementWire wre = new MicroPlacementWire(); + RedPowerBase.blockMicro.registerPlacement(1, wre); + RedPowerBase.blockMicro.registerPlacement(2, wre); + RedPowerBase.blockMicro.registerPlacement(3, wre); + RedPowerBase.blockMicro.registerPlacement(5, wre); + MicroPlacementJacket jkt = new MicroPlacementJacket(); + RedPowerBase.blockMicro.registerPlacement(64, jkt); + RedPowerBase.blockMicro.registerPlacement(65, jkt); + RedPowerBase.blockMicro.registerPlacement(66, jkt); + RedPowerBase.blockMicro.addTileEntityMapping(1, TileRedwire::new); + RedPowerBase.blockMicro.addTileEntityMapping(2, TileInsulatedWire::new); + RedPowerBase.blockMicro.addTileEntityMapping(3, TileCable::new); + RedPowerBase.blockMicro.addTileEntityMapping(5, TileBluewire::new); + GameRegistry.addRecipe(new ItemStack(RedPowerBase.blockMicro, 12, 256), new Object[]{"R", "R", "R", 'R', RedPowerBase.itemIngotRed}); + CraftLib.addAlloyResult(RedPowerBase.itemIngotRed, new ItemStack(RedPowerBase.blockMicro, 4, 256)); + CraftLib.addAlloyResult(CoreLib.copyStack(RedPowerBase.itemIngotRed, 5), new ItemStack(RedPowerBase.blockMicro, 8, 768)); + GameRegistry.addRecipe( + new ItemStack(RedPowerBase.blockMicro, 12, 1280), new Object[]{"WBW", "WBW", "WBW", 'B', RedPowerBase.itemIngotBlue, 'W', Blocks.wool} + ); + CraftLib.addAlloyResult(RedPowerBase.itemIngotBlue, new ItemStack(RedPowerBase.blockMicro, 4, 1280)); + GameRegistry.addShapelessRecipe( + new ItemStack(RedPowerBase.blockMicro, 1, 1281), new Object[]{new ItemStack(RedPowerBase.blockMicro, 1, 1280), Blocks.wool} + ); + CraftLib.addAlloyResult(RedPowerBase.itemIngotBlue, new ItemStack(RedPowerBase.blockMicro, 4, 1281)); + + for(int color = 0; color < 16; ++color) { + GameRegistry.addRecipe( + new ItemStack(RedPowerBase.blockMicro, 12, 512 + color), + new Object[]{"WRW", "WRW", "WRW", 'R', RedPowerBase.itemIngotRed, 'W', new ItemStack(Blocks.wool, 1, color)} + ); + + for(int j = 0; j < 16; ++j) { + if (color != j) { + GameRegistry.addShapelessRecipe( + new ItemStack(RedPowerBase.blockMicro, 1, 512 + color), + new Object[]{new ItemStack(RedPowerBase.blockMicro, 1, 512 + j), new ItemStack(Items.dye, 1, 15 - color)} + ); + GameRegistry.addShapelessRecipe( + new ItemStack(RedPowerBase.blockMicro, 1, 769 + color), + new Object[]{new ItemStack(RedPowerBase.blockMicro, 1, 769 + j), new ItemStack(Items.dye, 1, 15 - color)} + ); + } + } + + CraftLib.addAlloyResult(RedPowerBase.itemIngotRed, new ItemStack(RedPowerBase.blockMicro, 4, 512 + color)); + GameRegistry.addRecipe( + new ItemStack(RedPowerBase.blockMicro, 2, 768), + new Object[]{"SWS", "WWW", "SWS", 'W', new ItemStack(RedPowerBase.blockMicro, 1, 512 + color), 'S', Items.string} + ); + GameRegistry.addShapelessRecipe( + new ItemStack(RedPowerBase.blockMicro, 1, 769 + color), + new Object[]{new ItemStack(RedPowerBase.blockMicro, 1, 768), new ItemStack(Items.dye, 1, 15 - color), Items.paper} + ); + CraftLib.addAlloyResult(CoreLib.copyStack(RedPowerBase.itemIngotRed, 5), new ItemStack(RedPowerBase.blockMicro, 8, 769 + color)); + } + + for(int i = 0; i < 16; ++i) { + if (i != 11) { + CraftLib.addShapelessOreRecipe(new ItemStack(RedPowerBase.blockMicro, 1, 523), new ItemStack(RedPowerBase.blockMicro, 1, 512 + i), "dyeBlue"); + CraftLib.addShapelessOreRecipe(new ItemStack(RedPowerBase.blockMicro, 1, 780), new ItemStack(RedPowerBase.blockMicro, 1, 769 + i), "dyeBlue"); + } + } + + CraftLib.addShapelessOreRecipe(new ItemStack(RedPowerBase.blockMicro, 1, 780), new ItemStack(RedPowerBase.blockMicro, 1, 768), "dyeBlue", Items.paper); + RedPowerLib.addCompatibleMapping(0, 1); + + for(int i = 0; i < 16; ++i) { + RedPowerLib.addCompatibleMapping(0, 2 + i); + RedPowerLib.addCompatibleMapping(1, 2 + i); + RedPowerLib.addCompatibleMapping(65, 2 + i); + + for(int j = 0; j < 16; ++j) { + RedPowerLib.addCompatibleMapping(19 + j, 2 + i); + } + + RedPowerLib.addCompatibleMapping(18, 2 + i); + RedPowerLib.addCompatibleMapping(18, 19 + i); + } + + RedPowerLib.addCompatibleMapping(0, 65); + RedPowerLib.addCompatibleMapping(1, 65); + RedPowerLib.addCompatibleMapping(64, 65); + RedPowerLib.addCompatibleMapping(64, 67); + RedPowerLib.addCompatibleMapping(65, 67); + RedPowerLib.addCompatibleMapping(66, 67); + } + + @SideOnly(Side.CLIENT) + public void registerRenderers() { + RenderLib.setDefaultRenderer(RedPowerBase.blockMicro, 8, RenderRedwire::new); + ClientRegistry.bindTileEntitySpecialRenderer(TileWiring.class, new RenderRedwire(RedPowerBase.blockMicro)); + } + + @SideOnly(Side.CLIENT) + @SubscribeEvent + public void onTextureStitch(Pre evt) { + TextureMap map = evt.map; + if (map.getTextureType() == 0) { + redwireTop = map.registerIcon("rpwiring:redwireTop"); + redwireFace = map.registerIcon("rpwiring:redwireFace"); + bundledTop = map.registerIcon("rpwiring:bundledTop"); + bundledFace = map.registerIcon("rpwiring:bundledFace"); + powerTop = map.registerIcon("rpwiring:powerTop"); + powerFace = map.registerIcon("rpwiring:powerFace"); + highPowerTop = map.registerIcon("rpwiring:highPowerTop"); + highPowerFace = map.registerIcon("rpwiring:highPowerFace"); + jumboSides = map.registerIcon("rpwiring:jumboSides"); + jumboTop = map.registerIcon("rpwiring:jumboTop"); + jumboCent = map.registerIcon("rpwiring:jumboCent"); + jumboCentSide = map.registerIcon("rpwiring:jumboCentSide"); + jumboEnd = map.registerIcon("rpwiring:jumboEnd"); + jumboCorners = map.registerIcon("rpwiring:jumboCorners"); + redwireCableOff = map.registerIcon("rpwiring:redwireCableOff"); + redwireCableOn = map.registerIcon("rpwiring:redwireCableOn"); + bluewireCable = map.registerIcon("rpwiring:bluewireCable"); + bundledCable = map.registerIcon("rpwiring:bundledCable"); + + for(int col = 0; col < 16; ++col) { + insulatedTop[col] = map.registerIcon("rpwiring:insulatedTop/" + col); + insulatedFaceOff[col] = map.registerIcon("rpwiring:insulatedFaceOff/" + col); + insulatedFaceOn[col] = map.registerIcon("rpwiring:insulatedFaceOn/" + col); + bundledColTop[col] = map.registerIcon("rpwiring:bundledColTop/" + col); + bundledColFace[col] = map.registerIcon("rpwiring:bundledColFace/" + col); + } + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/RedPowerWorld.java b/src/main/java/com/eloraam/redpower/RedPowerWorld.java new file mode 100644 index 0000000..69c60b1 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/RedPowerWorld.java @@ -0,0 +1,495 @@ +package com.eloraam.redpower; + +import com.eloraam.redpower.base.ItemHandsaw; +import com.eloraam.redpower.core.Config; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.CoverLib; +import com.eloraam.redpower.core.CraftLib; +import com.eloraam.redpower.core.ItemPartialCraft; +import com.eloraam.redpower.core.ItemTextured; +import com.eloraam.redpower.world.BlockCustomCrops; +import com.eloraam.redpower.world.BlockCustomFlower; +import com.eloraam.redpower.world.BlockCustomLeaves; +import com.eloraam.redpower.world.BlockCustomLog; +import com.eloraam.redpower.world.BlockCustomOre; +import com.eloraam.redpower.world.BlockCustomStone; +import com.eloraam.redpower.world.BlockStorage; +import com.eloraam.redpower.world.ContainerSeedBag; +import com.eloraam.redpower.world.EnchantmentDisjunction; +import com.eloraam.redpower.world.EnchantmentVorpal; +import com.eloraam.redpower.world.GuiSeedBag; +import com.eloraam.redpower.world.ItemAthame; +import com.eloraam.redpower.world.ItemCustomAxe; +import com.eloraam.redpower.world.ItemCustomFlower; +import com.eloraam.redpower.world.ItemCustomHoe; +import com.eloraam.redpower.world.ItemCustomOre; +import com.eloraam.redpower.world.ItemCustomPickaxe; +import com.eloraam.redpower.world.ItemCustomSeeds; +import com.eloraam.redpower.world.ItemCustomShovel; +import com.eloraam.redpower.world.ItemCustomStone; +import com.eloraam.redpower.world.ItemCustomSword; +import com.eloraam.redpower.world.ItemPaintBrush; +import com.eloraam.redpower.world.ItemPaintCan; +import com.eloraam.redpower.world.ItemSeedBag; +import com.eloraam.redpower.world.ItemSickle; +import com.eloraam.redpower.world.ItemStorage; +import com.eloraam.redpower.world.ItemWoolCard; +import com.eloraam.redpower.world.WorldEvents; +import com.eloraam.redpower.world.WorldGenHandler; +import cpw.mods.fml.common.Mod; +import cpw.mods.fml.common.Mod.EventHandler; +import cpw.mods.fml.common.Mod.Instance; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.common.network.IGuiHandler; +import cpw.mods.fml.common.network.NetworkRegistry; +import cpw.mods.fml.common.registry.GameRegistry; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.enchantment.Enchantment; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.inventory.InventoryBasic; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.item.Item.ToolMaterial; +import net.minecraft.world.World; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.common.util.EnumHelper; +import net.minecraftforge.oredict.OreDictionary; + +@Mod( + modid = "RedPowerWorld", + name = "RedPower World", + version = "2.0pr6", + dependencies = "required-after:RedPowerBase" +) +public class RedPowerWorld implements IGuiHandler { + @Instance("RedPowerWorld") + public static RedPowerWorld instance; + public static BlockCustomFlower blockPlants; + public static BlockCustomOre blockOres; + public static BlockCustomLeaves blockLeaves; + public static BlockCustomLog blockLogs; + public static BlockCustomStone blockStone; + public static BlockCustomCrops blockCrops; + public static BlockStorage blockStorage; + public static ItemStack itemOreRuby; + public static ItemStack itemOreGreenSapphire; + public static ItemStack itemOreSapphire; + public static ItemStack itemMarble; + public static ItemStack itemBasalt; + public static ItemStack itemBasaltCobble; + public static ToolMaterial toolMaterialRuby; + public static ToolMaterial toolMaterialGreenSapphire; + public static ToolMaterial toolMaterialSapphire; + public static ItemSickle itemSickleWood; + public static ItemSickle itemSickleStone; + public static ItemSickle itemSickleIron; + public static ItemSickle itemSickleDiamond; + public static ItemSickle itemSickleGold; + public static ItemSickle itemSickleRuby; + public static ItemSickle itemSickleGreenSapphire; + public static ItemSickle itemSickleSapphire; + public static ItemCustomPickaxe itemPickaxeRuby; + public static ItemCustomPickaxe itemPickaxeGreenSapphire; + public static ItemCustomPickaxe itemPickaxeSapphire; + public static ItemCustomShovel itemShovelRuby; + public static ItemCustomShovel setUnlocalizedName; + public static ItemCustomShovel itemShovelSapphire; + public static ItemCustomShovel itemShovelGreenSapphire; + public static ItemCustomAxe itemAxeRuby; + public static ItemCustomAxe itemAxeGreenSapphire; + public static ItemCustomAxe itemAxeSapphire; + public static ItemCustomSword itemSwordRuby; + public static ItemCustomSword itemSwordGreenSapphire; + public static ItemCustomSword itemSwordSapphire; + public static ItemAthame itemAthame; + public static ItemCustomHoe itemHoeRuby; + public static ItemCustomHoe itemHoeGreenSapphire; + public static ItemCustomHoe itemHoeSapphire; + public static ItemCustomSeeds itemSeeds; + public static Item itemHandsawRuby; + public static Item itemHandsawGreenSapphire; + public static Item itemHandsawSapphire; + public static Item itemBrushDry; + public static Item itemPaintCanEmpty; + public static Item[] itemBrushPaint = new Item[16]; + public static ItemPartialCraft[] itemPaintCanPaint = new ItemPartialCraft[16]; + public static Item itemWoolCard; + public static Item itemSeedBag; + public static Enchantment enchantDisjunction; + public static Enchantment enchantVorpal; + + @EventHandler + public void preInit(FMLPreInitializationEvent event) { + MinecraftForge.EVENT_BUS.register(new WorldEvents()); + } + + @EventHandler + public void load(FMLInitializationEvent event) { + GameRegistry.registerWorldGenerator(new WorldGenHandler(), 1); + this.setupOres(); + this.setupPlants(); + this.setupTools(); + this.setupMisc(); + NetworkRegistry.INSTANCE.registerGuiHandler(instance, instance); + } + + @EventHandler + public void postInit(FMLPostInitializationEvent event) { + } + + public void setupPlants() { + blockPlants = new BlockCustomFlower("rpworld:indigoFlower", "rpworld:rubberSapling"); + blockPlants.setBlockName("plant"); + GameRegistry.registerBlock(blockPlants, ItemCustomFlower.class, "plants"); + GameRegistry.addShapelessRecipe(new ItemStack(RedPowerBase.itemDyeIndigo, 2, 0), new Object[]{blockPlants}); + itemSeeds = new ItemCustomSeeds(); + MinecraftForge.addGrassSeed(new ItemStack(itemSeeds, 1, 0), 5); + blockCrops = new BlockCustomCrops(); + GameRegistry.registerBlock(blockCrops, "flax"); + GameRegistry.registerItem(itemSeeds, "flaxseeds"); + blockLeaves = new BlockCustomLeaves("rpworld:rubberLeaves_opaque", "rpworld:rubberLeaves_transparent"); + blockLeaves.setBlockName("rpleaves"); + GameRegistry.registerBlock(blockLeaves, "leaves"); + blockLogs = new BlockCustomLog("rpworld:rubberLogSide", "rpworld:rubberLogTop"); + blockLogs.setBlockName("rplog"); + GameRegistry.registerBlock(blockLogs, "logs"); + blockLogs.setHarvestLevel("axe", 0, 0); + OreDictionary.registerOre("woodRubber", new ItemStack(blockLogs)); + GameRegistry.addRecipe(new ItemStack(Items.stick, 8), new Object[]{"W", 'W', blockLogs}); + GameRegistry.addSmelting(new ItemStack(blockLogs, 1, 0), new ItemStack(Items.coal, 1, 1), 0.15F); + CoverLib.addMaterial(53, 0, blockLogs, 0, "rplog"); + } + + public void setupOres() { + blockStone = new BlockCustomStone(); + blockStone.setBlockName("rpstone"); + GameRegistry.registerBlock(blockStone, ItemCustomStone.class, "stone"); + itemMarble = new ItemStack(blockStone, 0); + itemBasalt = new ItemStack(blockStone, 1); + itemBasaltCobble = new ItemStack(blockStone, 3); + blockStone.setHarvestLevel("pickaxe", 0); + blockStone.setBlockTexture(0, "rpworld:marble"); + blockStone.setBlockTexture(1, "rpworld:basalt"); + blockStone.setBlockTexture(2, "rpworld:marbleBrick"); + blockStone.setBlockTexture(3, "rpworld:basaltCobble"); + blockStone.setBlockTexture(4, "rpworld:basaltBrick"); + blockStone.setBlockTexture(5, "rpworld:chiseledBasaltBrick"); + blockStone.setBlockTexture(6, "rpworld:basaltPaver"); + CoverLib.addMaterial(48, 1, blockStone, 0, "marble"); + CoverLib.addMaterial(49, 1, blockStone, 1, "basalt"); + CoverLib.addMaterial(50, 1, blockStone, 2, "marbleBrick"); + CoverLib.addMaterial(51, 1, blockStone, 3, "basaltCobble"); + CoverLib.addMaterial(52, 1, blockStone, 4, "basaltBrick"); + CoverLib.addMaterial(57, 1, blockStone, 5, "basaltCircle"); + CoverLib.addMaterial(58, 1, blockStone, 6, "basaltPaver"); + blockOres = new BlockCustomOre(); + GameRegistry.registerBlock(blockOres, ItemCustomOre.class, "ores"); + itemOreRuby = new ItemStack(blockOres, 1, 0); + itemOreGreenSapphire = new ItemStack(blockOres, 1, 1); + itemOreSapphire = new ItemStack(blockOres, 1, 2); + blockOres.setHarvestLevel("pickaxe", 2, 0); + blockOres.setHarvestLevel("pickaxe", 2, 1); + blockOres.setHarvestLevel("pickaxe", 2, 2); + blockOres.setHarvestLevel("pickaxe", 1, 3); + blockOres.setHarvestLevel("pickaxe", 0, 4); + blockOres.setHarvestLevel("pickaxe", 0, 5); + blockOres.setHarvestLevel("pickaxe", 2, 6); + blockOres.setHarvestLevel("pickaxe", 2, 7); + GameRegistry.addSmelting(new ItemStack(blockOres, 1, 3), RedPowerBase.itemIngotSilver, 1.0F); + GameRegistry.addSmelting(new ItemStack(blockOres, 1, 4), RedPowerBase.itemIngotTin, 0.7F); + GameRegistry.addSmelting(new ItemStack(blockOres, 1, 5), RedPowerBase.itemIngotCopper, 0.7F); + GameRegistry.addSmelting(new ItemStack(blockOres, 1, 6), RedPowerBase.itemIngotTungsten, 1.2F); + GameRegistry.addSmelting(new ItemStack(RedPowerBase.itemResource, 2, 9), RedPowerBase.itemIngotSilver, 1.0F); + GameRegistry.addSmelting(new ItemStack(RedPowerBase.itemResource, 2, 8), RedPowerBase.itemIngotTungsten, 1.2F); + OreDictionary.registerOre("oreRuby", new ItemStack(blockOres, 1, 0)); + OreDictionary.registerOre("oreGreenSapphire", new ItemStack(blockOres, 1, 1)); + OreDictionary.registerOre("oreSapphire", new ItemStack(blockOres, 1, 2)); + OreDictionary.registerOre("oreSilver", new ItemStack(blockOres, 1, 3)); + OreDictionary.registerOre("oreTin", new ItemStack(blockOres, 1, 4)); + OreDictionary.registerOre("oreCopper", new ItemStack(blockOres, 1, 5)); + OreDictionary.registerOre("oreTungsten", new ItemStack(blockOres, 1, 6)); + OreDictionary.registerOre("oreNikolite", new ItemStack(blockOres, 1, 7)); + GameRegistry.addRecipe(new ItemStack(blockStone, 4, 2), new Object[]{"SS", "SS", 'S', new ItemStack(blockStone, 1, 0)}); + GameRegistry.addSmelting(new ItemStack(blockStone, 1, 3), new ItemStack(blockStone, 1, 1), 0.2F); + GameRegistry.addRecipe(new ItemStack(blockStone, 4, 4), new Object[]{"SS", "SS", 'S', new ItemStack(blockStone, 1, 1)}); + GameRegistry.addRecipe(new ItemStack(blockStone, 4, 5), new Object[]{"SS", "SS", 'S', new ItemStack(blockStone, 1, 4)}); + GameRegistry.addRecipe(new ItemStack(blockStone, 1, 6), new Object[]{"S", 'S', new ItemStack(blockStone, 1, 1)}); + blockStorage = new BlockStorage(); + GameRegistry.registerBlock(blockStorage, ItemStorage.class, "orestorage"); + GameRegistry.addRecipe(new ItemStack(blockStorage, 1, 0), new Object[]{"GGG", "GGG", "GGG", 'G', RedPowerBase.itemRuby}); + GameRegistry.addRecipe(new ItemStack(blockStorage, 1, 1), new Object[]{"GGG", "GGG", "GGG", 'G', RedPowerBase.itemGreenSapphire}); + GameRegistry.addRecipe(new ItemStack(blockStorage, 1, 2), new Object[]{"GGG", "GGG", "GGG", 'G', RedPowerBase.itemSapphire}); + GameRegistry.addRecipe(new ItemStack(blockStorage, 1, 3), new Object[]{"GGG", "GGG", "GGG", 'G', RedPowerBase.itemIngotSilver}); + GameRegistry.addRecipe(new ItemStack(blockStorage, 1, 4), new Object[]{"GGG", "GGG", "GGG", 'G', RedPowerBase.itemIngotTin}); + GameRegistry.addRecipe(new ItemStack(blockStorage, 1, 5), new Object[]{"GGG", "GGG", "GGG", 'G', RedPowerBase.itemIngotCopper}); + GameRegistry.addRecipe(new ItemStack(blockStorage, 1, 6), new Object[]{"GGG", "GGG", "GGG", 'G', RedPowerBase.itemIngotTungsten}); + GameRegistry.addRecipe(new ItemStack(blockStorage, 1, 7), new Object[]{"GGG", "GGG", "GGG", 'G', RedPowerBase.itemNikolite}); + GameRegistry.addRecipe(CoreLib.copyStack(RedPowerBase.itemRuby, 9), new Object[]{"G", 'G', new ItemStack(blockStorage, 1, 0)}); + GameRegistry.addRecipe(CoreLib.copyStack(RedPowerBase.itemGreenSapphire, 9), new Object[]{"G", 'G', new ItemStack(blockStorage, 1, 1)}); + GameRegistry.addRecipe(CoreLib.copyStack(RedPowerBase.itemSapphire, 9), new Object[]{"G", 'G', new ItemStack(blockStorage, 1, 2)}); + GameRegistry.addRecipe(CoreLib.copyStack(RedPowerBase.itemIngotSilver, 9), new Object[]{"G", 'G', new ItemStack(blockStorage, 1, 3)}); + GameRegistry.addRecipe(CoreLib.copyStack(RedPowerBase.itemIngotTin, 9), new Object[]{"G", 'G', new ItemStack(blockStorage, 1, 4)}); + GameRegistry.addRecipe(CoreLib.copyStack(RedPowerBase.itemIngotCopper, 9), new Object[]{"G", 'G', new ItemStack(blockStorage, 1, 5)}); + GameRegistry.addRecipe(CoreLib.copyStack(RedPowerBase.itemIngotTungsten, 9), new Object[]{"G", 'G', new ItemStack(blockStorage, 1, 6)}); + GameRegistry.addRecipe(CoreLib.copyStack(RedPowerBase.itemNikolite, 9), new Object[]{"G", 'G', new ItemStack(blockStorage, 1, 7)}); + blockStorage.setHarvestLevel("pickaxe", 2, 0); + blockStorage.setHarvestLevel("pickaxe", 2, 1); + blockStorage.setHarvestLevel("pickaxe", 2, 2); + blockStorage.setHarvestLevel("pickaxe", 2, 3); + blockStorage.setHarvestLevel("pickaxe", 2, 4); + blockStorage.setHarvestLevel("pickaxe", 2, 5); + blockStorage.setHarvestLevel("pickaxe", 3, 6); + blockStorage.setHarvestLevel("pickaxe", 2, 7); + CoverLib.addMaterial(54, 2, blockStorage, 0, "rubyBlock"); + CoverLib.addMaterial(55, 2, blockStorage, 1, "greenSapphireBlock"); + CoverLib.addMaterial(56, 2, blockStorage, 2, "sapphireBlock"); + CoverLib.addMaterial(66, 2, blockStorage, 3, "silverBlock"); + CoverLib.addMaterial(67, 2, blockStorage, 4, "tinBlock"); + CoverLib.addMaterial(68, 2, blockStorage, 5, "copperBlock"); + CoverLib.addMaterial(69, 2, blockStorage, 6, "tungstenBlock"); + } + + public void setupTools() { + toolMaterialRuby = EnumHelper.addToolMaterial("RUBY", 2, 500, 8.0F, 3.0F, 12); + toolMaterialGreenSapphire = EnumHelper.addToolMaterial("GREENSAPPHIRE", 2, 500, 8.0F, 3.0F, 12); + toolMaterialSapphire = EnumHelper.addToolMaterial("SAPPHIRE", 2, 500, 8.0F, 3.0F, 12); + itemPickaxeRuby = new ItemCustomPickaxe(toolMaterialRuby); + itemPickaxeRuby.setUnlocalizedName("pickaxeRuby"); + itemPickaxeRuby.setTextureName("rpworld:pickaxeRuby"); + GameRegistry.registerItem(itemPickaxeRuby, "rubyPickaxe"); + itemPickaxeGreenSapphire = new ItemCustomPickaxe(toolMaterialGreenSapphire); + itemPickaxeGreenSapphire.setUnlocalizedName("pickaxeGreenSapphire"); + itemPickaxeGreenSapphire.setTextureName("rpworld:pickaxeGreenSapphire"); + GameRegistry.registerItem(itemPickaxeGreenSapphire, "greenSapphirePickaxe"); + itemPickaxeSapphire = new ItemCustomPickaxe(toolMaterialSapphire); + itemPickaxeSapphire.setUnlocalizedName("pickaxeSapphire"); + itemPickaxeSapphire.setTextureName("rpworld:pickaxeSapphire"); + GameRegistry.registerItem(itemPickaxeSapphire, "sapphirePickaxe"); + itemPickaxeRuby.setHarvestLevel("pickaxe", 2); + itemPickaxeGreenSapphire.setHarvestLevel("pickaxe", 2); + itemPickaxeSapphire.setHarvestLevel("pickaxe", 2); + GameRegistry.addRecipe(new ItemStack(itemPickaxeRuby, 1), new Object[]{"GGG", " W ", " W ", 'G', RedPowerBase.itemRuby, 'W', Items.stick}); + GameRegistry.addRecipe( + new ItemStack(itemPickaxeGreenSapphire, 1), new Object[]{"GGG", " W ", " W ", 'G', RedPowerBase.itemGreenSapphire, 'W', Items.stick} + ); + GameRegistry.addRecipe(new ItemStack(itemPickaxeSapphire, 1), new Object[]{"GGG", " W ", " W ", 'G', RedPowerBase.itemSapphire, 'W', Items.stick}); + itemShovelRuby = new ItemCustomShovel(toolMaterialRuby); + itemShovelRuby.setUnlocalizedName("shovelRuby"); + itemShovelRuby.setTextureName("rpworld:shovelRuby"); + GameRegistry.registerItem(itemShovelRuby, "rubyShovel"); + itemShovelGreenSapphire = new ItemCustomShovel(toolMaterialGreenSapphire); + itemShovelGreenSapphire.setUnlocalizedName("shovelGreenSapphire"); + itemShovelGreenSapphire.setTextureName("rpworld:shovelGreenSapphire"); + GameRegistry.registerItem(itemShovelGreenSapphire, "greenSapphireShovel"); + itemShovelSapphire = new ItemCustomShovel(toolMaterialSapphire); + itemShovelSapphire.setUnlocalizedName("shovelSapphire"); + itemShovelSapphire.setTextureName("rpworld:shovelSapphire"); + GameRegistry.registerItem(itemShovelSapphire, "sapphireShovel"); + itemShovelRuby.setHarvestLevel("shovel", 2); + itemShovelGreenSapphire.setHarvestLevel("shovel", 2); + itemShovelSapphire.setHarvestLevel("shovel", 2); + GameRegistry.addRecipe(new ItemStack(itemShovelRuby, 1), new Object[]{"G", "W", "W", 'G', RedPowerBase.itemRuby, 'W', Items.stick}); + GameRegistry.addRecipe(new ItemStack(itemShovelGreenSapphire, 1), new Object[]{"G", "W", "W", 'G', RedPowerBase.itemGreenSapphire, 'W', Items.stick}); + GameRegistry.addRecipe(new ItemStack(itemShovelSapphire, 1), new Object[]{"G", "W", "W", 'G', RedPowerBase.itemSapphire, 'W', Items.stick}); + itemAxeRuby = new ItemCustomAxe(toolMaterialRuby); + itemAxeRuby.setUnlocalizedName("axeRuby"); + itemAxeRuby.setTextureName("rpworld:axeRuby"); + GameRegistry.registerItem(itemAxeRuby, "rubyAxe"); + itemAxeGreenSapphire = new ItemCustomAxe(toolMaterialGreenSapphire); + itemAxeGreenSapphire.setUnlocalizedName("axeGreenSapphire"); + itemAxeGreenSapphire.setTextureName("rpworld:axeGreenSapphire"); + GameRegistry.registerItem(itemAxeGreenSapphire, "greenSapphireAxe"); + itemAxeSapphire = new ItemCustomAxe(toolMaterialSapphire); + itemAxeSapphire.setUnlocalizedName("axeSapphire"); + itemAxeSapphire.setTextureName("rpworld:axeSapphire"); + GameRegistry.registerItem(itemAxeSapphire, "sapphireAxe"); + itemAxeRuby.setHarvestLevel("axe", 2); + itemAxeGreenSapphire.setHarvestLevel("axe", 2); + itemAxeSapphire.setHarvestLevel("axe", 2); + GameRegistry.addRecipe(new ItemStack(itemAxeRuby, 1), new Object[]{"GG", "GW", " W", 'G', RedPowerBase.itemRuby, 'W', Items.stick}); + GameRegistry.addRecipe(new ItemStack(itemAxeGreenSapphire, 1), new Object[]{"GG", "GW", " W", 'G', RedPowerBase.itemGreenSapphire, 'W', Items.stick}); + GameRegistry.addRecipe(new ItemStack(itemAxeSapphire, 1), new Object[]{"GG", "GW", " W", 'G', RedPowerBase.itemSapphire, 'W', Items.stick}); + itemSwordRuby = new ItemCustomSword(toolMaterialRuby); + itemSwordRuby.setUnlocalizedName("swordRuby"); + itemSwordRuby.setTextureName("rpworld:swordRuby"); + GameRegistry.registerItem(itemSwordRuby, "rubySword"); + itemSwordGreenSapphire = new ItemCustomSword(toolMaterialGreenSapphire); + itemSwordGreenSapphire.setUnlocalizedName("swordGreenSapphire"); + itemSwordGreenSapphire.setTextureName("rpworld:swordGreenSapphire"); + GameRegistry.registerItem(itemSwordGreenSapphire, "greenSapphireSword"); + itemSwordSapphire = new ItemCustomSword(toolMaterialSapphire); + itemSwordSapphire.setUnlocalizedName("swordSapphire"); + itemSwordSapphire.setTextureName("rpworld:swordSapphire"); + GameRegistry.registerItem(itemSwordSapphire, "sapphireSword"); + itemAthame = new ItemAthame(); + itemAthame.setUnlocalizedName("athame"); + GameRegistry.registerItem(itemAthame, "athame"); + CraftLib.addOreRecipe(new ItemStack(itemAthame, 1), "S", "W", 'S', "ingotSilver", 'W', Items.stick); + GameRegistry.addRecipe(new ItemStack(itemSwordRuby, 1), new Object[]{"G", "G", "W", 'G', RedPowerBase.itemRuby, 'W', Items.stick}); + GameRegistry.addRecipe(new ItemStack(itemSwordGreenSapphire, 1), new Object[]{"G", "G", "W", 'G', RedPowerBase.itemGreenSapphire, 'W', Items.stick}); + GameRegistry.addRecipe(new ItemStack(itemSwordSapphire, 1), new Object[]{"G", "G", "W", 'G', RedPowerBase.itemSapphire, 'W', Items.stick}); + itemHoeRuby = new ItemCustomHoe(toolMaterialRuby); + itemHoeRuby.setUnlocalizedName("hoeRuby"); + itemHoeRuby.setTextureName("rpworld:hoeRuby"); + itemHoeRuby.setMaxDamage(500); + GameRegistry.registerItem(itemHoeRuby, "rubyHoe"); + itemHoeGreenSapphire = new ItemCustomHoe(toolMaterialGreenSapphire); + itemHoeGreenSapphire.setUnlocalizedName("hoeGreenSapphire"); + itemHoeGreenSapphire.setTextureName("rpworld:hoeGreenSapphire"); + itemHoeGreenSapphire.setMaxDamage(500); + GameRegistry.registerItem(itemHoeGreenSapphire, "greenSapphireHoe"); + itemHoeSapphire = new ItemCustomHoe(toolMaterialSapphire); + itemHoeSapphire.setUnlocalizedName("hoeSapphire"); + itemHoeSapphire.setTextureName("rpworld:hoeSapphire"); + itemHoeSapphire.setMaxDamage(500); + GameRegistry.registerItem(itemHoeSapphire, "sapphireHoe"); + itemHoeRuby.setHarvestLevel("hoe", 2); + itemHoeGreenSapphire.setHarvestLevel("hoe", 2); + itemHoeSapphire.setHarvestLevel("hoe", 2); + GameRegistry.addRecipe(new ItemStack(itemHoeRuby, 1), new Object[]{"GG", " W", " W", 'G', RedPowerBase.itemRuby, 'W', Items.stick}); + GameRegistry.addRecipe(new ItemStack(itemHoeGreenSapphire, 1), new Object[]{"GG", " W", " W", 'G', RedPowerBase.itemGreenSapphire, 'W', Items.stick}); + GameRegistry.addRecipe(new ItemStack(itemHoeSapphire, 1), new Object[]{"GG", " W", " W", 'G', RedPowerBase.itemSapphire, 'W', Items.stick}); + itemSickleWood = new ItemSickle(ToolMaterial.WOOD); + itemSickleWood.setUnlocalizedName("sickleWood"); + itemSickleWood.setTextureName("rpworld:sickleWood"); + GameRegistry.registerItem(itemSickleWood, "woodenSickle"); + itemSickleStone = new ItemSickle(ToolMaterial.STONE); + itemSickleStone.setUnlocalizedName("sickleStone"); + itemSickleStone.setTextureName("rpworld:sickleStone"); + GameRegistry.registerItem(itemSickleStone, "stoneSickle"); + itemSickleIron = new ItemSickle(ToolMaterial.IRON); + itemSickleIron.setUnlocalizedName("sickleIron"); + itemSickleIron.setTextureName("rpworld:sickleIron"); + GameRegistry.registerItem(itemSickleIron, "ironSickle"); + itemSickleDiamond = new ItemSickle(ToolMaterial.EMERALD); + itemSickleDiamond.setUnlocalizedName("sickleDiamond"); + itemSickleDiamond.setTextureName("rpworld:sickleDiamond"); + GameRegistry.registerItem(itemSickleDiamond, "diamondSickle"); + itemSickleGold = new ItemSickle(ToolMaterial.GOLD); + itemSickleGold.setUnlocalizedName("sickleGold"); + itemSickleGold.setTextureName("rpworld:sickleGold"); + GameRegistry.registerItem(itemSickleGold, "goldSickle"); + itemSickleRuby = new ItemSickle(toolMaterialRuby); + itemSickleRuby.setUnlocalizedName("sickleRuby"); + itemSickleRuby.setTextureName("rpworld:sickleRuby"); + GameRegistry.registerItem(itemSickleRuby, "rubySickle"); + itemSickleGreenSapphire = new ItemSickle(toolMaterialGreenSapphire); + itemSickleGreenSapphire.setUnlocalizedName("sickleGreenSapphire"); + itemSickleGreenSapphire.setTextureName("rpworld:sickleGreenSapphire"); + GameRegistry.registerItem(itemSickleGreenSapphire, "greenSapphireSickle"); + itemSickleSapphire = new ItemSickle(toolMaterialSapphire); + itemSickleSapphire.setUnlocalizedName("sickleSapphire"); + itemSickleSapphire.setTextureName("rpworld:sickleSapphire"); + GameRegistry.registerItem(itemSickleSapphire, "sapphireSickle"); + CraftLib.addOreRecipe(new ItemStack(itemSickleWood, 1), " I ", " I", "WI ", 'I', "plankWood", 'W', Items.stick); + GameRegistry.addRecipe(new ItemStack(itemSickleStone, 1), new Object[]{" I ", " I", "WI ", 'I', Blocks.cobblestone, 'W', Items.stick}); + GameRegistry.addRecipe(new ItemStack(itemSickleIron, 1), new Object[]{" I ", " I", "WI ", 'I', Items.iron_ingot, 'W', Items.stick}); + GameRegistry.addRecipe(new ItemStack(itemSickleDiamond, 1), new Object[]{" I ", " I", "WI ", 'I', Items.diamond, 'W', Items.stick}); + GameRegistry.addRecipe(new ItemStack(itemSickleGold, 1), new Object[]{" I ", " I", "WI ", 'I', Items.gold_ingot, 'W', Items.stick}); + GameRegistry.addRecipe(new ItemStack(itemSickleRuby, 1), new Object[]{" I ", " I", "WI ", 'I', RedPowerBase.itemRuby, 'W', Items.stick}); + GameRegistry.addRecipe( + new ItemStack(itemSickleGreenSapphire, 1), new Object[]{" I ", " I", "WI ", 'I', RedPowerBase.itemGreenSapphire, 'W', Items.stick} + ); + GameRegistry.addRecipe(new ItemStack(itemSickleSapphire, 1), new Object[]{" I ", " I", "WI ", 'I', RedPowerBase.itemSapphire, 'W', Items.stick}); + itemHandsawRuby = new ItemHandsaw(1); + itemHandsawGreenSapphire = new ItemHandsaw(1); + itemHandsawSapphire = new ItemHandsaw(1); + itemHandsawRuby.setUnlocalizedName("handsawRuby").setTextureName("rpworld:handsawRuby"); + itemHandsawGreenSapphire.setUnlocalizedName("handsawGreenSapphire").setTextureName("rpworld:handsawGreenSapphire"); + itemHandsawSapphire.setUnlocalizedName("handsawSapphire").setTextureName("rpworld:handsawSapphire"); + itemHandsawRuby.setMaxDamage(640); + itemHandsawGreenSapphire.setMaxDamage(640); + itemHandsawSapphire.setMaxDamage(640); + GameRegistry.registerItem(itemHandsawRuby, "rubyHandshaw"); + GameRegistry.registerItem(itemHandsawGreenSapphire, "greenSapphireHandshaw"); + GameRegistry.registerItem(itemHandsawSapphire, "sapphireHandshaw"); + GameRegistry.addRecipe( + new ItemStack(itemHandsawRuby, 1), new Object[]{"WWW", " II", " GG", 'I', Items.iron_ingot, 'G', RedPowerBase.itemRuby, 'W', Items.stick} + ); + GameRegistry.addRecipe( + new ItemStack(itemHandsawGreenSapphire, 1), + new Object[]{"WWW", " II", " GG", 'I', Items.iron_ingot, 'G', RedPowerBase.itemGreenSapphire, 'W', Items.stick} + ); + GameRegistry.addRecipe( + new ItemStack(itemHandsawSapphire, 1), new Object[]{"WWW", " II", " GG", 'I', Items.iron_ingot, 'G', RedPowerBase.itemSapphire, 'W', Items.stick} + ); + itemWoolCard = new ItemWoolCard(); + GameRegistry.registerItem(itemWoolCard, "woolCard"); + CraftLib.addOreRecipe(new ItemStack(itemWoolCard, 1), "W", "P", "S", 'W', RedPowerBase.itemFineIron, 'P', "plankWood", 'S', Items.stick); + GameRegistry.addShapelessRecipe(new ItemStack(Items.string, 4), new Object[]{new ItemStack(itemWoolCard, 1, 32767), new ItemStack(Blocks.wool, 1, 32767)}); + itemBrushDry = new ItemTextured("rpworld:brushDry"); + itemBrushDry.setCreativeTab(CreativeTabs.tabTools); + itemBrushDry.setUnlocalizedName("paintbrush.dry"); + GameRegistry.registerItem(itemBrushDry, "dryBush"); + GameRegistry.addRecipe(new ItemStack(itemBrushDry), new Object[]{"W ", " S", 'S', Items.stick, 'W', Blocks.wool}); + itemPaintCanEmpty = new ItemTextured("rpworld:paintCanEmpty"); + itemPaintCanEmpty.setCreativeTab(CreativeTabs.tabTools); + itemPaintCanEmpty.setUnlocalizedName("paintcan.empty"); + GameRegistry.registerItem(itemPaintCanEmpty, "emptyPainCan"); + GameRegistry.addRecipe(new ItemStack(itemPaintCanEmpty, 3), new Object[]{"T T", "T T", "TTT", 'T', RedPowerBase.itemTinplate}); + + for(int color = 0; color < 16; ++color) { + itemPaintCanPaint[color] = new ItemPaintCan(color); + itemPaintCanPaint[color].setUnlocalizedName("paintcan." + CoreLib.rawColorNames[color]); + itemPaintCanPaint[color].setEmptyItem(new ItemStack(itemPaintCanEmpty)); + GameRegistry.registerItem(itemPaintCanPaint[color], CoreLib.rawColorNames[color] + "PainCan"); + GameRegistry.addShapelessRecipe( + new ItemStack(itemPaintCanPaint[color]), + new Object[]{itemPaintCanEmpty, new ItemStack(Items.dye, 1, 15 - color), new ItemStack(itemSeeds, 1, 0), new ItemStack(itemSeeds, 1, 0)} + ); + } + + for(int color = 0; color < 16; ++color) { + itemBrushPaint[color] = new ItemPaintBrush(color); + itemBrushPaint[color].setUnlocalizedName("paintbrush." + CoreLib.rawColorNames[color]); + GameRegistry.registerItem(itemBrushPaint[color], CoreLib.rawColorNames[color] + "PainBrush"); + GameRegistry.addShapelessRecipe(new ItemStack(itemBrushPaint[color]), new Object[]{new ItemStack(itemPaintCanPaint[color], 1, 32767), itemBrushDry}); + } + + CraftLib.addShapelessOreRecipe( + new ItemStack(itemPaintCanPaint[11]), itemPaintCanEmpty, "dyeBlue", new ItemStack(itemSeeds, 1, 0), new ItemStack(itemSeeds, 1, 0) + ); + itemSeedBag = new ItemSeedBag(); + GameRegistry.registerItem(itemSeedBag, "seedBag"); + GameRegistry.addRecipe(new ItemStack(itemSeedBag, 1, 0), new Object[]{" S ", "C C", "CCC", 'S', Items.string, 'C', RedPowerBase.itemCanvas}); + } + + public void setupMisc() { + if (Config.getInt("settings.world.tweaks.spreadmoss", 1) > 0) { + } + + if (Config.getInt("settings.world.tweaks.craftcircle", 1) > 0) { + GameRegistry.addRecipe(new ItemStack(Blocks.stonebrick, 4, 3), new Object[]{"BB", "BB", 'B', new ItemStack(Blocks.stonebrick, 1, 0)}); + } + + if (Config.getInt("settings.world.tweaks.unbricks", 1) > 0) { + GameRegistry.addShapelessRecipe(new ItemStack(Items.brick, 4, 0), new Object[]{new ItemStack(Blocks.brick_block, 1, 0)}); + } + + enchantDisjunction = new EnchantmentDisjunction(Config.getInt("enchant.disjunction.id", 79), 10); + enchantVorpal = new EnchantmentVorpal(Config.getInt("enchant.vorpal.id", 80), 10); + } + + public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { + switch(ID) { + case 1: + return new GuiSeedBag(player.inventory, new InventoryBasic("", true, 9)); + default: + return null; + } + } + + public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { + switch(ID) { + case 1: + ItemStack heldItem = player.getHeldItem(); + return new ContainerSeedBag(player.inventory, ItemSeedBag.getBagInventory(heldItem, player), heldItem); + default: + return null; + } + } +} diff --git a/src/main/java/com/eloraam/redpower/base/BlockAppliance.java b/src/main/java/com/eloraam/redpower/base/BlockAppliance.java new file mode 100644 index 0000000..313d807 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/base/BlockAppliance.java @@ -0,0 +1,39 @@ +package com.eloraam.redpower.base; + +import com.eloraam.redpower.core.BlockExtended; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.CreativeExtraTabs; +import net.minecraft.block.material.Material; +import net.minecraft.world.IBlockAccess; + +public class BlockAppliance extends BlockExtended { + public BlockAppliance() { + super(Material.rock); + this.setHardness(2.0F); + this.setCreativeTab(CreativeExtraTabs.tabMachine); + } + + public int getLightValue(IBlockAccess iba, int i, int j, int k) { + TileAppliance taf = CoreLib.getTileEntity(iba, i, j, k, TileAppliance.class); + return taf == null ? super.getLightValue(iba, i, j, k) : taf.getLightValue(); + } + + @Override + public boolean isOpaqueCube() { + return true; + } + + public boolean isNormalCube() { + return true; + } + + @Override + public boolean renderAsNormalBlock() { + return true; + } + + @Override + public int damageDropped(int meta) { + return meta; + } +} diff --git a/src/main/java/com/eloraam/redpower/base/BlockMicro.java b/src/main/java/com/eloraam/redpower/base/BlockMicro.java new file mode 100644 index 0000000..13a4440 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/base/BlockMicro.java @@ -0,0 +1,34 @@ +package com.eloraam.redpower.base; + +import com.eloraam.redpower.core.BlockCoverable; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.CreativeExtraTabs; +import com.eloraam.redpower.core.IMicroPlacement; +import com.eloraam.redpower.core.RedPowerLib; +import net.minecraft.item.Item; +import net.minecraft.world.IBlockAccess; + +public class BlockMicro extends BlockCoverable { + public BlockMicro() { + super(CoreLib.materialRedpower); + this.setHardness(0.1F); + this.setCreativeTab(CreativeExtraTabs.tabWires); + } + + public boolean canProvidePower() { + return !RedPowerLib.isSearching(); + } + + public boolean canConnectRedstone(IBlockAccess iba, int x, int y, int z, int side) { + if (RedPowerLib.isSearching()) { + return false; + } else { + int md = iba.getBlockMetadata(x, y, z); + return md == 1 || md == 2; + } + } + + public void registerPlacement(int md, IMicroPlacement imp) { + ((ItemMicro)Item.getItemFromBlock(this)).registerPlacement(md, imp); + } +} diff --git a/src/main/java/com/eloraam/redpower/base/BlockNikolite.java b/src/main/java/com/eloraam/redpower/base/BlockNikolite.java new file mode 100644 index 0000000..17a567c --- /dev/null +++ b/src/main/java/com/eloraam/redpower/base/BlockNikolite.java @@ -0,0 +1,10 @@ +package com.eloraam.redpower.base; + +import net.minecraft.block.BlockCompressed; +import net.minecraft.block.material.MapColor; + +public class BlockNikolite extends BlockCompressed { + public BlockNikolite() { + super(MapColor.cyanColor); + } +} diff --git a/src/main/java/com/eloraam/redpower/base/ContainerAdvBench.java b/src/main/java/com/eloraam/redpower/base/ContainerAdvBench.java new file mode 100644 index 0000000..f512b4b --- /dev/null +++ b/src/main/java/com/eloraam/redpower/base/ContainerAdvBench.java @@ -0,0 +1,442 @@ +package com.eloraam.redpower.base; + +import com.eloraam.redpower.RedPowerBase; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.IHandleGuiEvent; +import com.eloraam.redpower.core.PacketGuiEvent; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.InventoryCraftResult; +import net.minecraft.inventory.InventoryCrafting; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.CraftingManager; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; + +public class ContainerAdvBench extends Container implements IHandleGuiEvent { + SlotCraftRefill slotCraft; + private TileAdvBench tileAdvBench; + public InventorySubCraft craftMatrix; + public IInventory craftResult; + public InventoryCrafting fakeInv; + public int satisfyMask; + + public ContainerAdvBench(InventoryPlayer inv, TileAdvBench td) { + this.tileAdvBench = td; + this.craftMatrix = new InventorySubCraft(this, td); + this.craftResult = new InventoryCraftResult(); + + for(int i = 0; i < 3; ++i) { + for(int j = 0; j < 3; ++j) { + this.addSlotToContainer(new Slot(this.craftMatrix, j + i * 3, 48 + j * 18, 18 + i * 18)); + } + } + + this.addSlotToContainer(new ContainerAdvBench.SlotPlan(new ContainerAdvBench.InventorySubUpdate(td, 9, 1), 0, 17, 36)); + this.slotCraft = new SlotCraftRefill(inv.player, this.craftMatrix, this.craftResult, td, this, 0, 143, 36); + this.addSlotToContainer(this.slotCraft); + ContainerAdvBench.InventorySubUpdate ingrid = new ContainerAdvBench.InventorySubUpdate(td, 10, 18); + + for(int i = 0; i < 2; ++i) { + for(int j = 0; j < 9; ++j) { + this.addSlotToContainer(new Slot(ingrid, j + i * 9, 8 + j * 18, 90 + i * 18)); + } + } + + for(int i = 0; i < 3; ++i) { + for(int j = 0; j < 9; ++j) { + this.addSlotToContainer(new Slot(inv, j + i * 9 + 9, 8 + j * 18, 140 + i * 18)); + } + } + + for(int i = 0; i < 9; ++i) { + this.addSlotToContainer(new Slot(inv, i, 8 + i * 18, 198)); + } + + this.fakeInv = new InventoryCrafting(new ContainerAdvBench.ContainerNull(), 3, 3); + this.onCraftMatrixChanged(this.craftMatrix); + } + + public void putStackInSlot(int num, ItemStack ist) { + super.putStackInSlot(num, ist); + } + + public static ItemStack[] getShadowItems(ItemStack ist) { + if (ist.stackTagCompound == null) { + return null; + } else { + NBTTagList require = ist.stackTagCompound.getTagList("requires", 10); + if (require == null) { + return null; + } else { + ItemStack[] tr = new ItemStack[9]; + + for(int i = 0; i < require.tagCount(); ++i) { + NBTTagCompound item = require.getCompoundTagAt(i); + ItemStack is2 = ItemStack.loadItemStackFromNBT(item); + byte sl = item.getByte("Slot"); + if (sl >= 0 && sl < 9) { + tr[sl] = is2; + } + } + + return tr; + } + } + } + + public boolean canInteractWith(EntityPlayer player) { + return this.tileAdvBench.isUseableByPlayer(player); + } + + public ItemStack[] getPlanItems() { + ItemStack plan = this.tileAdvBench.getStackInSlot(9); + return plan == null ? null : getShadowItems(plan); + } + + public int getSatisfyMask() { + ItemStack plan = this.tileAdvBench.getStackInSlot(9); + ItemStack[] items = null; + if (plan != null) { + items = getShadowItems(plan); + } + + int bits = 0; + + for(int i = 0; i < 9; ++i) { + ItemStack test = this.tileAdvBench.getStackInSlot(i); + if (test != null) { + bits |= 1 << i; + } else if (items == null || items[i] == null) { + bits |= 1 << i; + } + } + + if (bits == 511) { + return 511; + } else { + for(int var9 = 0; var9 < 18; ++var9) { + ItemStack test = this.tileAdvBench.getStackInSlot(10 + var9); + if (test != null && test.stackSize != 0) { + int sc = test.stackSize; + + for(int j = 0; j < 9; ++j) { + if ((bits & 1 << j) <= 0) { + ItemStack st = this.tileAdvBench.getStackInSlot(j); + if (st == null) { + st = items[j]; + if (st != null && CoreLib.matchItemStackOre(st, test)) { + bits |= 1 << j; + if (--sc == 0) { + break; + } + } + } + } + } + } + } + + return bits; + } + } + + private int findMatch(ItemStack a) { + for(int i = 0; i < 18; ++i) { + ItemStack test = this.tileAdvBench.getStackInSlot(10 + i); + if (test != null && test.stackSize != 0 && CoreLib.matchItemStackOre(a, test)) { + return 10 + i; + } + } + + return -1; + } + + public void onCraftMatrixChanged(IInventory iinventory) { + ItemStack plan = this.tileAdvBench.getStackInSlot(9); + ItemStack[] items = null; + if (plan != null) { + items = getShadowItems(plan); + } + + for(int i = 0; i < 9; ++i) { + ItemStack tos = this.tileAdvBench.getStackInSlot(i); + if (tos == null && items != null && items[i] != null) { + int j = this.findMatch(items[i]); + if (j > 0) { + tos = this.tileAdvBench.getStackInSlot(j); + } + } + + this.fakeInv.setInventorySlotContents(i, tos); + } + + this.satisfyMask = this.getSatisfyMask(); + if (this.satisfyMask == 511) { + this.craftResult.setInventorySlotContents(0, CraftingManager.getInstance().findMatchingRecipe(this.fakeInv, this.tileAdvBench.getWorldObj())); + } else { + this.craftResult.setInventorySlotContents(0, (ItemStack)null); + } + + } + + public ItemStack transferStackInSlot(EntityPlayer player, int i) { + ItemStack itemstack = null; + Slot slot = (Slot)super.inventorySlots.get(i); + if (slot != null && slot.getHasStack()) { + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); + if (i == 10) { + this.mergeCrafting(player, slot, 29, 65); + return null; + } + + if (i < 9) { + if (!this.mergeItemStack(itemstack1, 11, 29, false)) { + return null; + } + } else if (i < 29) { + if (!this.mergeItemStack(itemstack1, 29, 65, true)) { + return null; + } + } else if (!this.mergeItemStack(itemstack1, 11, 29, false)) { + return null; + } + + if (itemstack1.stackSize == 0) { + slot.putStack((ItemStack)null); + } else { + slot.onSlotChanged(); + } + + if (itemstack1.stackSize == itemstack.stackSize) { + return null; + } + + slot.onPickupFromSlot(player, itemstack1); + } + + return itemstack; + } + + protected boolean canFit(ItemStack ist, int st, int ed) { + int ms = 0; + + for(int i = st; i < ed; ++i) { + Slot slot = (Slot)super.inventorySlots.get(i); + ItemStack is2 = slot.getStack(); + if (is2 == null) { + return true; + } + + if (CoreLib.compareItemStack(is2, ist) == 0) { + ms += is2.getMaxStackSize() - is2.stackSize; + if (ms >= ist.stackSize) { + return true; + } + } + } + + return false; + } + + protected void fitItem(ItemStack ist, int st, int ed) { + if (ist.isStackable()) { + for(int i = st; i < ed; ++i) { + Slot slot = (Slot)super.inventorySlots.get(i); + ItemStack is2 = slot.getStack(); + if (is2 != null && CoreLib.compareItemStack(is2, ist) == 0) { + int n = Math.min(ist.stackSize, ist.getMaxStackSize() - is2.stackSize); + if (n != 0) { + ist.stackSize -= n; + is2.stackSize += n; + slot.onSlotChanged(); + if (ist.stackSize == 0) { + return; + } + } + } + } + } + + for(int i = st; i < ed; ++i) { + Slot slot = (Slot)super.inventorySlots.get(i); + ItemStack is2 = slot.getStack(); + if (is2 == null) { + slot.putStack(ist); + slot.onSlotChanged(); + return; + } + } + + } + + protected void mergeCrafting(EntityPlayer player, Slot cslot, int st, int ed) { + int cc = 0; + ItemStack ist = cslot.getStack(); + if (ist != null && ist.stackSize != 0) { + ItemStack craftas = ist.copy(); + int mss = craftas.getMaxStackSize(); + if (mss == 1) { + mss = 16; + } + + do { + if (!this.canFit(ist, st, ed)) { + return; + } + + cc += ist.stackSize; + this.fitItem(ist, st, ed); + cslot.onPickupFromSlot(player, ist); + if (cc >= mss) { + return; + } + + if (this.slotCraft.isLastUse()) { + return; + } + + ist = cslot.getStack(); + if (ist == null || ist.stackSize == 0) { + return; + } + } while(CoreLib.compareItemStack(ist, craftas) == 0); + } + + } + + @Override + public void handleGuiEvent(PacketGuiEvent.GuiMessageEvent message) { + if (this.tileAdvBench.getWorldObj() != null && !this.tileAdvBench.getWorldObj().isRemote) { + try { + if (message.eventId == 1) { + ItemStack blank = this.tileAdvBench.getStackInSlot(9); + if (blank != null && blank.getItem() == RedPowerBase.itemPlanBlank) { + ItemStack plan = new ItemStack(RedPowerBase.itemPlanFull); + plan.stackTagCompound = new NBTTagCompound(); + NBTTagCompound result = new NBTTagCompound(); + this.craftResult.getStackInSlot(0).writeToNBT(result); + plan.stackTagCompound.setTag("result", result); + NBTTagList requires = new NBTTagList(); + + for(int i = 0; i < 9; ++i) { + ItemStack is1 = this.craftMatrix.getStackInSlot(i); + if (is1 != null) { + ItemStack ist = CoreLib.copyStack(is1, 1); + NBTTagCompound item = new NBTTagCompound(); + ist.writeToNBT(item); + item.setByte("Slot", (byte)i); + requires.appendTag(item); + } + } + + plan.stackTagCompound.setTag("requires", requires); + this.tileAdvBench.setInventorySlotContents(9, plan); + } + } + } catch (Throwable var10) { + } + } + + } + + public static class ContainerNull extends Container { + public boolean canInteractWith(EntityPlayer player) { + return false; + } + + public void onCraftMatrixChanged(IInventory inv) { + } + + public ItemStack slotClick(int a, int b, int c, EntityPlayer player) { + return !this.canInteractWith(player) ? null : super.slotClick(a, b, c, player); + } + } + + public class InventorySubUpdate implements IInventory { + int size; + int start; + IInventory parent; + + public InventorySubUpdate(IInventory par, int st, int sz) { + this.parent = par; + this.start = st; + this.size = sz; + } + + public int getSizeInventory() { + return this.size; + } + + public ItemStack getStackInSlot(int idx) { + return this.parent.getStackInSlot(idx + this.start); + } + + public ItemStack decrStackSize(int idx, int num) { + ItemStack tr = this.parent.decrStackSize(idx + this.start, num); + if (tr != null) { + ContainerAdvBench.this.onCraftMatrixChanged(this); + } + + return tr; + } + + public ItemStack getStackInSlotOnClosing(int idx) { + return this.parent.getStackInSlotOnClosing(idx + this.start); + } + + public void setInventorySlotContents(int idx, ItemStack ist) { + this.parent.setInventorySlotContents(idx + this.start, ist); + ContainerAdvBench.this.onCraftMatrixChanged(this); + } + + public String getInventoryName() { + return this.parent.getInventoryName(); + } + + public int getInventoryStackLimit() { + return this.parent.getInventoryStackLimit(); + } + + public void markDirty() { + ContainerAdvBench.this.onCraftMatrixChanged(this); + this.parent.markDirty(); + } + + public boolean isUseableByPlayer(EntityPlayer player) { + return false; + } + + public void openInventory() { + } + + public void closeInventory() { + } + + public boolean hasCustomInventoryName() { + return true; + } + + public boolean isItemValidForSlot(int slotID, ItemStack itemStack) { + return true; + } + } + + public static class SlotPlan extends Slot { + public SlotPlan(IInventory inv, int i, int j, int k) { + super(inv, i, j, k); + } + + public boolean isItemValid(ItemStack ist) { + return ist.getItem() == RedPowerBase.itemPlanBlank || ist.getItem() == RedPowerBase.itemPlanFull; + } + + public int getSlotStackLimit() { + return 1; + } + } +} diff --git a/src/main/java/com/eloraam/redpower/base/ContainerAlloyFurnace.java b/src/main/java/com/eloraam/redpower/base/ContainerAlloyFurnace.java new file mode 100644 index 0000000..220fc2b --- /dev/null +++ b/src/main/java/com/eloraam/redpower/base/ContainerAlloyFurnace.java @@ -0,0 +1,115 @@ +package com.eloraam.redpower.base; + +import java.util.List; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class ContainerAlloyFurnace extends Container { + private TileAlloyFurnace tileFurnace; + public int totalburn = 0; + public int burntime = 0; + public int cooktime = 0; + + public ContainerAlloyFurnace(InventoryPlayer inv, TileAlloyFurnace td) { + this.tileFurnace = td; + + for(int i = 0; i < 3; ++i) { + for(int j = 0; j < 3; ++j) { + this.addSlotToContainer(new Slot(td, j + i * 3, 48 + j * 18, 17 + i * 18)); + } + } + + this.addSlotToContainer(new Slot(td, 9, 17, 42)); + this.addSlotToContainer(new SlotAlloyFurnace(inv.player, td, 10, 141, 35)); + + for(int i = 0; i < 3; ++i) { + for(int j = 0; j < 9; ++j) { + this.addSlotToContainer(new Slot(inv, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); + } + } + + for(int i = 0; i < 9; ++i) { + this.addSlotToContainer(new Slot(inv, i, 8 + i * 18, 142)); + } + + } + + public ItemStack slotClick(int a, int b, int c, EntityPlayer player) { + return !this.canInteractWith(player) ? null : super.slotClick(a, b, c, player); + } + + public boolean canInteractWith(EntityPlayer player) { + return this.tileFurnace.isUseableByPlayer(player); + } + + public ItemStack transferStackInSlot(EntityPlayer player, int i) { + ItemStack itemstack = null; + Slot slot = (Slot)super.inventorySlots.get(i); + if (slot != null && slot.getHasStack()) { + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); + if (i < 11) { + if (!this.mergeItemStack(itemstack1, 11, 47, true)) { + return null; + } + } else if (!this.mergeItemStack(itemstack1, 0, 9, false)) { + return null; + } + + if (itemstack1.stackSize == 0) { + slot.putStack(null); + } else { + slot.onSlotChanged(); + } + + if (itemstack1.stackSize == itemstack.stackSize) { + return null; + } + + slot.onPickupFromSlot(player, itemstack1); + } + + return itemstack; + } + + public void detectAndSendChanges() { + super.detectAndSendChanges(); + + for(ICrafting ic : (List )super.crafters) { + if (this.totalburn != this.tileFurnace.totalburn) { + ic.sendProgressBarUpdate(this, 0, this.tileFurnace.totalburn); + } + + if (this.burntime != this.tileFurnace.burntime) { + ic.sendProgressBarUpdate(this, 1, this.tileFurnace.burntime); + } + + if (this.cooktime != this.tileFurnace.cooktime) { + ic.sendProgressBarUpdate(this, 2, this.tileFurnace.cooktime); + } + } + + this.totalburn = this.tileFurnace.totalburn; + this.cooktime = this.tileFurnace.cooktime; + this.burntime = this.tileFurnace.burntime; + } + + public void updateProgressBar(int id, int value) { + switch(id) { + case 0: + this.tileFurnace.totalburn = value; + break; + case 1: + this.tileFurnace.burntime = value; + break; + case 2: + this.tileFurnace.cooktime = value; + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/base/ContainerBag.java b/src/main/java/com/eloraam/redpower/base/ContainerBag.java new file mode 100644 index 0000000..20894b0 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/base/ContainerBag.java @@ -0,0 +1,107 @@ +package com.eloraam.redpower.base; + +import com.eloraam.redpower.core.SlotLocked; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class ContainerBag extends Container { + private ItemStack itemBag; + private int hotbarIndex; + + public ContainerBag(InventoryPlayer inv, IInventory bag, ItemStack stack) { + for(int i = 0; i < 3; ++i) { + for(int j = 0; j < 9; ++j) { + this.addSlotToContainer(new ContainerBag.SlotBag(bag, j + i * 9, 8 + j * 18, 18 + i * 18)); + } + } + + for(int i = 0; i < 3; ++i) { + for(int j = 0; j < 9; ++j) { + this.addSlotToContainer(new Slot(inv, j + i * 9 + 9, 8 + j * 18, 86 + i * 18)); + } + } + + for(int i = 0; i < 9; ++i) { + if (inv.currentItem == i) { + this.addSlotToContainer(new SlotLocked(inv, i, 8 + i * 18, 144)); + } else { + this.addSlotToContainer(new Slot(inv, i, 8 + i * 18, 144)); + } + } + + this.itemBag = stack; + this.hotbarIndex = inv.currentItem; + } + + public boolean canInteractWith(EntityPlayer player) { + return player.worldObj.isRemote || this.itemBag == player.getHeldItem(); + } + + public ItemStack transferStackInSlot(EntityPlayer player, int slotId) { + if (!player.worldObj.isRemote && this.itemBag != player.getHeldItem()) { + player.closeScreen(); + return null; + } else { + ItemStack result = null; + Slot slot = (Slot)super.inventorySlots.get(slotId); + if (slot != null && slot.getHasStack()) { + ItemStack slotStack = slot.getStack(); + if (slotStack.getItem() instanceof ItemBag) { + return null; + } + + result = slotStack.copy(); + if (slotId < 27) { + if (!this.mergeItemStack(slotStack, 27, 63, true)) { + return null; + } + } else if (!this.mergeItemStack(slotStack, 0, 27, false)) { + return null; + } + + if (slotStack.stackSize == 0) { + slot.putStack(null); + } else { + slot.onSlotChanged(); + } + + if (slotStack.stackSize == result.stackSize) { + return null; + } + + slot.onPickupFromSlot(player, slotStack); + } + + return result; + } + } + + public ItemStack slotClick(int slotId, int dragModeOrBtn, int mode, EntityPlayer player) { + if (!this.canInteractWith(player)) { + return null; + } else { + if (mode == 2 && dragModeOrBtn >= 0 && dragModeOrBtn < 9) { + Slot hotbarSlot = this.getSlot(54 + dragModeOrBtn); + if (hotbarSlot instanceof SlotLocked) { + return null; + } + } + + return super.slotClick(slotId, dragModeOrBtn, mode, player); + } + } + + public static class SlotBag extends Slot { + public SlotBag(IInventory inv, int index, int x, int y) { + super(inv, index, x, y); + } + + public boolean isItemValid(ItemStack stack) { + return !(stack.getItem() instanceof ItemBag); + } + } +} diff --git a/src/main/java/com/eloraam/redpower/base/ContainerBusId.java b/src/main/java/com/eloraam/redpower/base/ContainerBusId.java new file mode 100644 index 0000000..bffe425 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/base/ContainerBusId.java @@ -0,0 +1,66 @@ +package com.eloraam.redpower.base; + +import java.util.List; + +import com.eloraam.redpower.core.IHandleGuiEvent; +import com.eloraam.redpower.core.IRedbusConnectable; +import com.eloraam.redpower.core.PacketGuiEvent; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; + +public class ContainerBusId extends Container implements IHandleGuiEvent { + private IRedbusConnectable rbConn; + private int addr = 0; + + public ContainerBusId(IInventory inv, IRedbusConnectable irc) { + this.rbConn = irc; + } + + public ItemStack slotClick(int a, int b, int c, EntityPlayer player) { + return !this.canInteractWith(player) ? null : super.slotClick(a, b, c, player); + } + + public boolean canInteractWith(EntityPlayer player) { + return true; + } + + public ItemStack transferStackInSlot(EntityPlayer player, int i) { + return null; + } + + public void detectAndSendChanges() { + super.detectAndSendChanges(); + + for(ICrafting ic : (List)super.crafters) { + if (this.rbConn.rbGetAddr() != this.addr) { + ic.sendProgressBarUpdate(this, 0, this.rbConn.rbGetAddr()); + } + } + + this.addr = this.rbConn.rbGetAddr(); + } + + public void updateProgressBar(int id, int value) { + switch(id) { + case 0: + this.rbConn.rbSetAddr(value); + return; + } + } + + @Override + public void handleGuiEvent(PacketGuiEvent.GuiMessageEvent message) { + try { + if (message.eventId != 1) { + return; + } + + this.rbConn.rbSetAddr(message.parameters[0]); + } catch (Throwable var3) { + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/base/GuiAdvBench.java b/src/main/java/com/eloraam/redpower/base/GuiAdvBench.java new file mode 100644 index 0000000..eb77b31 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/base/GuiAdvBench.java @@ -0,0 +1,114 @@ +package com.eloraam.redpower.base; + +import com.eloraam.redpower.RedPowerBase; +import com.eloraam.redpower.RedPowerCore; +import com.eloraam.redpower.core.PacketGuiEvent; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.OpenGlHelper; +import net.minecraft.client.renderer.RenderHelper; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; + +public class GuiAdvBench extends GuiContainer { + private static final ResourceLocation res = new ResourceLocation("rpbase", "textures/gui/advbench.png"); + private TileAdvBench bench; + + public GuiAdvBench(InventoryPlayer pli, TileAdvBench td) { + super(new ContainerAdvBench(pli, td)); + this.bench = td; + super.ySize = 222; + } + + public GuiAdvBench(Container cn) { + super(cn); + super.ySize = 222; + } + + protected void drawGuiContainerForegroundLayer(int p1, int p2) { + super.fontRendererObj.drawString(I18n.format("tile.rpabench.name", new Object[0]), 60, 6, 4210752); + super.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, super.ySize - 96 + 2, 4210752); + } + + protected void drawGuiContainerBackgroundLayer(float f, int p1, int p2) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + super.mc.renderEngine.bindTexture(res); + int j = (super.width - super.xSize) / 2; + int k = (super.height - super.ySize) / 2; + this.drawTexturedModalRect(j, k, 0, 0, super.xSize, super.ySize); + ItemStack plan = super.inventorySlots.getSlot(9).getStack(); + ItemStack craft = super.inventorySlots.getSlot(10).getStack(); + if (plan != null && craft != null && plan.getItem() == RedPowerBase.itemPlanBlank) { + this.drawTexturedModalRect(j + 18, k + 55, 176, 0, 14, 14); + } + + if (plan != null && plan.getItem() == RedPowerBase.itemPlanFull) { + ContainerAdvBench cont = (ContainerAdvBench)super.inventorySlots; + ItemStack[] ist = ContainerAdvBench.getShadowItems(plan); + RenderHelper.enableGUIStandardItemLighting(); + OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240.0F, 240.0F); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GL11.glEnable(32826); + GL11.glEnable(2896); + GL11.glEnable(2929); + + for(int n = 0; n < 9; ++n) { + if (ist[n] != null) { + Slot sl = super.inventorySlots.getSlot(n); + if (sl.getStack() == null) { + int slx = sl.xDisplayPosition + j; + int sly = sl.yDisplayPosition + k; + GuiScreen.itemRender.renderItemIntoGUI(super.fontRendererObj, super.mc.renderEngine, ist[n], slx, sly); + GuiScreen.itemRender.renderItemOverlayIntoGUI(super.fontRendererObj, super.mc.renderEngine, ist[n], slx, sly); + } + } + } + + GL11.glDisable(2896); + GL11.glDisable(2929); + GL11.glEnable(3042); + super.mc.renderEngine.bindTexture(res); + + for(int n = 0; n < 9; ++n) { + if (ist[n] != null) { + Slot sl = super.inventorySlots.getSlot(n); + if (sl.getStack() == null) { + int slx = sl.xDisplayPosition; + int sly = sl.yDisplayPosition; + if ((cont.satisfyMask & 1 << n) > 0) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.5F); + } else { + GL11.glColor4f(1.0F, 0.1F, 0.1F, 0.6F); + } + + this.drawTexturedModalRect(j + slx, k + sly, slx, sly, 16, 16); + } + } + } + + GL11.glDisable(3042); + } + + } + + protected void mouseClicked(int i, int j, int k) { + int x = i - (super.width - super.xSize) / 2; + int y = j - (super.height - super.ySize) / 2; + if (x >= 18 && y >= 55 && x <= 32 && y <= 69) { + ItemStack plan = super.inventorySlots.getSlot(9).getStack(); + ItemStack craft = super.inventorySlots.getSlot(10).getStack(); + if (plan == null || craft == null || plan.getItem() != RedPowerBase.itemPlanBlank) { + return; + } + + RedPowerCore.sendPacketToServer(new PacketGuiEvent.GuiMessageEvent(1, super.inventorySlots.windowId)); + } + + super.mouseClicked(i, j, k); + } +} diff --git a/src/main/java/com/eloraam/redpower/base/GuiAlloyFurnace.java b/src/main/java/com/eloraam/redpower/base/GuiAlloyFurnace.java new file mode 100644 index 0000000..fc8a5cb --- /dev/null +++ b/src/main/java/com/eloraam/redpower/base/GuiAlloyFurnace.java @@ -0,0 +1,42 @@ +package com.eloraam.redpower.base; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; + +public class GuiAlloyFurnace extends GuiContainer { + private static final ResourceLocation res = new ResourceLocation("rpbase", "textures/gui/afurnacegui.png"); + private TileAlloyFurnace furnace; + + public GuiAlloyFurnace(InventoryPlayer pli, TileAlloyFurnace td) { + super(new ContainerAlloyFurnace(pli, td)); + this.furnace = td; + } + + public GuiAlloyFurnace(Container cn) { + super(cn); + } + + protected void drawGuiContainerForegroundLayer(int p1, int p2) { + super.fontRendererObj.drawString(I18n.format("tile.rpafurnace.name", new Object[0]), 60, 6, 4210752); + super.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, super.ySize - 96 + 2, 4210752); + } + + protected void drawGuiContainerBackgroundLayer(float f, int p1, int p2) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + super.mc.renderEngine.bindTexture(res); + int j = (super.width - super.xSize) / 2; + int k = (super.height - super.ySize) / 2; + this.drawTexturedModalRect(j, k, 0, 0, super.xSize, super.ySize); + if (this.furnace.burntime > 0) { + int i1 = this.furnace.getBurnScaled(12); + this.drawTexturedModalRect(j + 17, k + 25 + 12 - i1, 176, 12 - i1, 14, i1 + 2); + } + + int i1 = this.furnace.getCookScaled(24); + this.drawTexturedModalRect(j + 107, k + 34, 176, 14, i1 + 1, 16); + } +} diff --git a/src/main/java/com/eloraam/redpower/base/GuiBag.java b/src/main/java/com/eloraam/redpower/base/GuiBag.java new file mode 100644 index 0000000..ec489f4 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/base/GuiBag.java @@ -0,0 +1,36 @@ +package com.eloraam.redpower.base; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.IInventory; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; + +public class GuiBag extends GuiContainer { + private static ResourceLocation res = new ResourceLocation("rpbase", "textures/gui/baggui.png"); + + public GuiBag(InventoryPlayer pli, IInventory td) { + super(new ContainerBag(pli, td, null)); + super.ySize = 167; + } + + public GuiBag(Container cn) { + super(cn); + super.ySize = 167; + } + + protected void drawGuiContainerForegroundLayer(int p1, int p2) { + super.fontRendererObj.drawString(I18n.format("item.rpBag.name", new Object[0]), 8, 6, 4210752); + super.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, super.ySize - 94 + 2, 4210752); + } + + protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + super.mc.renderEngine.bindTexture(res); + int halfWidth = (super.width - super.xSize) / 2; + int halfHeight = (super.height - super.ySize) / 2; + this.drawTexturedModalRect(halfWidth, halfHeight, 0, 0, super.xSize, super.ySize); + } +} diff --git a/src/main/java/com/eloraam/redpower/base/GuiBusId.java b/src/main/java/com/eloraam/redpower/base/GuiBusId.java new file mode 100644 index 0000000..95e14d7 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/base/GuiBusId.java @@ -0,0 +1,76 @@ +package com.eloraam.redpower.base; + +import com.eloraam.redpower.RedPowerCore; +import com.eloraam.redpower.core.IRedbusConnectable; +import com.eloraam.redpower.core.PacketGuiEvent; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; + +public class GuiBusId extends GuiContainer { + private static final ResourceLocation res = new ResourceLocation("rpbase", "textures/gui/idgui.png"); + private IRedbusConnectable rbConn; + private TileEntity tile; + + public GuiBusId(InventoryPlayer pli, IRedbusConnectable irc, TileEntity tile) { + super(new ContainerBusId(pli, irc)); + this.rbConn = irc; + this.tile = tile; + super.ySize = 81; + super.xSize = 123; + } + + public GuiBusId(Container cn) { + super(cn); + super.ySize = 81; + super.xSize = 123; + } + + protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) { + super.fontRendererObj.drawString(I18n.format("gui.busid", new Object[0]), 32, 6, 4210752); + } + + protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + super.mc.renderEngine.bindTexture(res); + int j = (super.width - super.xSize) / 2; + int k = (super.height - super.ySize) / 2; + this.drawTexturedModalRect(j, k, 0, 0, super.xSize, super.ySize); + int bits = this.rbConn.rbGetAddr() & 0xFF; + + for(int n = 0; n < 8; ++n) { + if ((bits & 1 << n) != 0) { + this.drawTexturedModalRect(j + 16 + n * 12, k + 25, 123, 0, 8, 16); + } + } + + this.drawCenteredString(super.fontRendererObj, String.format("ID: %d", bits), super.width / 2, k + 60, -1); + } + + private void sendAddr() { + if (super.mc.theWorld.isRemote) { + RedPowerCore.sendPacketToServer(new PacketGuiEvent.GuiMessageEvent(1, super.inventorySlots.windowId, (byte)this.rbConn.rbGetAddr())); + } + + } + + protected void mouseClicked(int mouseX, int mouseY, int button) { + int x = mouseX - (super.width - super.xSize) / 2; + int y = mouseY - (super.height - super.ySize) / 2; + if (y >= 25 && y <= 41) { + for(int n = 0; n < 8; ++n) { + if (x >= 16 + n * 12 && x <= 24 + n * 12) { + this.rbConn.rbSetAddr(this.rbConn.rbGetAddr() ^ 1 << n); + this.sendAddr(); + return; + } + } + } + + super.mouseClicked(mouseX, mouseY, button); + } +} diff --git a/src/main/java/com/eloraam/redpower/base/InventorySubCraft.java b/src/main/java/com/eloraam/redpower/base/InventorySubCraft.java new file mode 100644 index 0000000..7e887aa --- /dev/null +++ b/src/main/java/com/eloraam/redpower/base/InventorySubCraft.java @@ -0,0 +1,48 @@ +package com.eloraam.redpower.base; + +import net.minecraft.inventory.Container; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.InventoryCrafting; +import net.minecraft.item.ItemStack; + +public class InventorySubCraft extends InventoryCrafting { + private Container eventHandler; + private IInventory parent; + + public InventorySubCraft(Container container, IInventory par) { + super(container, 3, 3); + this.parent = par; + this.eventHandler = container; + } + + public int getSizeInventory() { + return 9; + } + + public ItemStack getStackInSlot(int i) { + return i >= 9 ? null : this.parent.getStackInSlot(i); + } + + public ItemStack getStackInRowAndColumn(int i, int j) { + if (i >= 0 && i < 3) { + int k = i + j * 3; + return this.getStackInSlot(k); + } else { + return null; + } + } + + public ItemStack decrStackSize(int i, int j) { + ItemStack tr = this.parent.decrStackSize(i, j); + if (tr != null) { + this.eventHandler.onCraftMatrixChanged(this); + } + + return tr; + } + + public void setInventorySlotContents(int i, ItemStack ist) { + this.parent.setInventorySlotContents(i, ist); + this.eventHandler.onCraftMatrixChanged(this); + } +} diff --git a/src/main/java/com/eloraam/redpower/base/ItemBag.java b/src/main/java/com/eloraam/redpower/base/ItemBag.java new file mode 100644 index 0000000..9de6dcf --- /dev/null +++ b/src/main/java/com/eloraam/redpower/base/ItemBag.java @@ -0,0 +1,185 @@ +package com.eloraam.redpower.base; + +import com.eloraam.redpower.RedPowerBase; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; + +public class ItemBag extends Item { + private IIcon[] icons = new IIcon[16]; + + public ItemBag() { + this.setMaxStackSize(1); + this.setHasSubtypes(true); + this.setUnlocalizedName("rpBag"); + this.setCreativeTab(CreativeTabs.tabMisc); + } + + public static IInventory getBagInventory(ItemStack ist, EntityPlayer player) { + return !(ist.getItem() instanceof ItemBag) ? null : ((ItemBag)ist.getItem()).new InventoryBag(ist, player); + } + + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister registerer) { + for(int color = 0; color < 16; ++color) { + this.icons[color] = registerer.registerIcon("rpbase:bag/" + color); + } + + } + + public int getMaxItemUseDuration(ItemStack ist) { + return 1; + } + + public IIcon getIconFromDamage(int meta) { + return this.icons[meta % this.icons.length]; + } + + public ItemStack onItemRightClick(ItemStack ist, World world, EntityPlayer player) { + if (!world.isRemote && !player.isSneaking()) { + player.openGui(RedPowerBase.instance, 4, world, 0, 0, 0); + } + + return ist; + } + + public class InventoryBag implements IInventory { + ItemStack bagitem; + ItemStack[] items; + EntityPlayer player; + + InventoryBag(ItemStack ist, EntityPlayer host) { + this.bagitem = ist; + this.player = host; + this.unpackInventory(); + } + + private void unpackInventory() { + this.items = new ItemStack[27]; + if (this.bagitem.stackTagCompound != null) { + NBTTagList list = this.bagitem.stackTagCompound.getTagList("contents", 10); + + for(int i = 0; i < list.tagCount(); ++i) { + NBTTagCompound item = list.getCompoundTagAt(i); + byte slt = item.getByte("Slot"); + if (slt < 27) { + this.items[slt] = ItemStack.loadItemStackFromNBT(item); + } + } + } + + } + + private void packInventory() { + if (this.bagitem.stackTagCompound == null) { + this.bagitem.setTagCompound(new NBTTagCompound()); + } + + NBTTagList contents = new NBTTagList(); + + for(int i = 0; i < 27; ++i) { + if (this.items[i] != null) { + NBTTagCompound cpd = new NBTTagCompound(); + this.items[i].writeToNBT(cpd); + cpd.setByte("Slot", (byte)i); + contents.appendTag(cpd); + } + } + + this.bagitem.stackTagCompound.setTag("contents", contents); + } + + public int getSizeInventory() { + return 27; + } + + public ItemStack getStackInSlot(int slot) { + return this.items[slot]; + } + + public ItemStack decrStackSize(int slot, int num) { + if (this.bagitem != this.player.getHeldItem()) { + this.markDirty(); + this.player.closeScreen(); + return null; + } else if (this.items[slot] == null) { + return null; + } else if (this.items[slot].stackSize <= num) { + ItemStack tr = this.items[slot]; + this.items[slot] = null; + this.markDirty(); + return tr; + } else { + ItemStack tr = this.items[slot].splitStack(num); + if (this.items[slot].stackSize == 0) { + this.items[slot] = null; + } + + this.markDirty(); + return tr; + } + } + + public ItemStack getStackInSlotOnClosing(int slot) { + if (this.items[slot] == null) { + return null; + } else { + ItemStack tr = this.items[slot]; + this.items[slot] = null; + return tr; + } + } + + public void setInventorySlotContents(int slot, ItemStack ist) { + if (this.bagitem != this.player.getHeldItem()) { + this.markDirty(); + this.player.closeScreen(); + } else { + this.items[slot] = ist; + if (ist != null && ist.stackSize > this.getInventoryStackLimit()) { + ist.stackSize = this.getInventoryStackLimit(); + } + + } + } + + public String getInventoryName() { + return "item.rpBag.name"; + } + + public int getInventoryStackLimit() { + return 64; + } + + public void markDirty() { + this.packInventory(); + } + + public boolean isUseableByPlayer(EntityPlayer player) { + return this.bagitem == this.player.getHeldItem(); + } + + public void openInventory() { + } + + public void closeInventory() { + } + + public boolean hasCustomInventoryName() { + return false; + } + + public boolean isItemValidForSlot(int slotID, ItemStack stack) { + return this.bagitem != null && stack.getItem() != ItemBag.this; + } + } +} diff --git a/src/main/java/com/eloraam/redpower/base/ItemDrawplate.java b/src/main/java/com/eloraam/redpower/base/ItemDrawplate.java new file mode 100644 index 0000000..79e85d2 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/base/ItemDrawplate.java @@ -0,0 +1,18 @@ +package com.eloraam.redpower.base; + +import com.eloraam.redpower.core.ItemPartialCraft; +import net.minecraft.creativetab.CreativeTabs; + +public class ItemDrawplate extends ItemPartialCraft { + public ItemDrawplate() { + this.setCreativeTab(CreativeTabs.tabTools); + } + + public boolean isFull3D() { + return true; + } + + public boolean shouldRotateAroundWhenRendering() { + return true; + } +} diff --git a/src/main/java/com/eloraam/redpower/base/ItemDyeIndigo.java b/src/main/java/com/eloraam/redpower/base/ItemDyeIndigo.java new file mode 100644 index 0000000..941f072 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/base/ItemDyeIndigo.java @@ -0,0 +1,31 @@ +package com.eloraam.redpower.base; + +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.passive.EntitySheep; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +public class ItemDyeIndigo extends Item { + public ItemDyeIndigo() { + this.setMaxDamage(0); + this.setHasSubtypes(true); + this.setUnlocalizedName("dyeIndigo"); + this.setTextureName("rpbase:dyeIndigo"); + this.setCreativeTab(CreativeTabs.tabMaterials); + } + + public boolean itemInteractionForEntity(ItemStack ist, EntityPlayer player, EntityLivingBase entity) { + if (ist.getItemDamage() == 0 && entity instanceof EntitySheep) { + EntitySheep entitysheep = (EntitySheep)entity; + if (!entitysheep.getSheared() && entitysheep.getFleeceColor() != 11) { + entitysheep.setFleeceColor(11); + --ist.stackSize; + return true; + } + } + + return false; + } +} diff --git a/src/main/java/com/eloraam/redpower/base/ItemHandsaw.java b/src/main/java/com/eloraam/redpower/base/ItemHandsaw.java new file mode 100644 index 0000000..ab5bb6d --- /dev/null +++ b/src/main/java/com/eloraam/redpower/base/ItemHandsaw.java @@ -0,0 +1,25 @@ +package com.eloraam.redpower.base; + +import com.eloraam.redpower.core.ItemPartialCraft; +import net.minecraft.creativetab.CreativeTabs; + +public class ItemHandsaw extends ItemPartialCraft { + private int sharp; + + public ItemHandsaw(int sh) { + this.sharp = sh; + this.setCreativeTab(CreativeTabs.tabTools); + } + + public boolean isFull3D() { + return true; + } + + public boolean shouldRotateAroundWhenRendering() { + return true; + } + + public int getSharpness() { + return this.sharp; + } +} diff --git a/src/main/java/com/eloraam/redpower/base/ItemMicro.java b/src/main/java/com/eloraam/redpower/base/ItemMicro.java new file mode 100644 index 0000000..9836093 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/base/ItemMicro.java @@ -0,0 +1,276 @@ +package com.eloraam.redpower.base; + +import com.eloraam.redpower.RedPowerBase; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.CoverLib; +import com.eloraam.redpower.core.CreativeExtraTabs; +import com.eloraam.redpower.core.ICoverable; +import com.eloraam.redpower.core.IMicroPlacement; +import com.eloraam.redpower.core.RedPowerLib; +import com.eloraam.redpower.core.WorldCoord; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import java.util.List; +import net.minecraft.block.Block; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.MovingObjectPosition.MovingObjectType; +import net.minecraft.world.World; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.common.util.BlockSnapshot; +import net.minecraftforge.event.entity.player.PlayerInteractEvent; +import net.minecraftforge.event.entity.player.PlayerInteractEvent.Action; +import net.minecraftforge.event.world.BlockEvent.PlaceEvent; + +public class ItemMicro extends ItemBlock { + private IMicroPlacement[] placers = new IMicroPlacement[256]; + + public ItemMicro(Block block) { + super(block); + this.setMaxDamage(0); + this.setHasSubtypes(true); + } + + private boolean useCover(ItemStack ist, EntityPlayer player, World world, int x, int y, int z, int side) { + MovingObjectPosition pos = CoreLib.retraceBlock(world, player, x, y, z); + if (pos == null) { + return false; + } else if (pos.typeOfHit != MovingObjectType.BLOCK) { + return false; + } else { + pos = CoverLib.getPlacement(world, pos, ist.getItemDamage()); + if (pos == null) { + return false; + } else { + Block oldBlock = world.getBlock(pos.blockX, pos.blockY, pos.blockZ); + if (world.canPlaceEntityOnSide(oldBlock, pos.blockX, pos.blockY, pos.blockZ, false, side, player, ist)) { + world.setBlock(pos.blockX, pos.blockY, pos.blockZ, RedPowerBase.blockMicro, 0, 3); + } + + TileEntity te = world.getTileEntity(pos.blockX, pos.blockY, pos.blockZ); + Block newBlock = world.getBlock(pos.blockX, pos.blockY, pos.blockZ); + int newMeta = world.getBlockMetadata(pos.blockX, pos.blockY, pos.blockZ); + if (!(te instanceof ICoverable)) { + return false; + } else { + ICoverable icv = (ICoverable)te; + PlayerInteractEvent event = new PlayerInteractEvent(player, Action.RIGHT_CLICK_BLOCK, pos.blockX, pos.blockY, pos.blockZ, side, world); + if (!MinecraftForge.EVENT_BUS.post(event)) { + NBTTagCompound nbt = new NBTTagCompound(); + te.writeToNBT(nbt); + BlockSnapshot snapshot = new BlockSnapshot(world, pos.blockX, pos.blockY, pos.blockZ, newBlock, newMeta, nbt); + PlaceEvent plvt = new PlaceEvent(snapshot, oldBlock, player); + if (!MinecraftForge.EVENT_BUS.post(plvt)) { + if (icv.tryAddCover(pos.subHit, CoverLib.damageToCoverValue(ist.getItemDamage()))) { + if (!player.capabilities.isCreativeMode) { + --ist.stackSize; + } + + CoreLib.placeNoise(world, pos.blockX, pos.blockY, pos.blockZ, CoverLib.getBlock(ist.getItemDamage() & 0xFF)); + RedPowerLib.updateIndirectNeighbors(world, pos.blockX, pos.blockY, pos.blockZ, RedPowerBase.blockMicro); + world.markBlockForUpdate(pos.blockX, pos.blockY, pos.blockZ); + return true; + } + + return false; + } + } + + return false; + } + } + } + } + + @SideOnly(Side.CLIENT) + public boolean func_150936_a(World world, int x, int y, int z, int side, EntityPlayer player, ItemStack ist) { + return true; + } + + public boolean onItemUse(ItemStack ist, EntityPlayer player, World world, int x, int y, int z, int side, float xp, float yp, float zp) { + return player != null && !player.isSneaking() && this.itemUseShared(ist, player, world, x, y, z, side); + } + + public boolean onItemUseFirst(ItemStack ist, EntityPlayer player, World world, int x, int y, int z, int side, float xp, float yp, float zp) { + return !world.isRemote && player.isSneaking() && this.itemUseShared(ist, player, world, x, y, z, side); + } + + private boolean itemUseShared(ItemStack ist, EntityPlayer player, World world, int x, int y, int z, int side) { + int hb = ist.getItemDamage(); + hb >>= 8; + return hb != 0 && (hb < 16 || hb > 45) + ? this.placers[hb] != null && this.placers[hb].onPlaceMicro(ist, player, world, new WorldCoord(x, y, z), side) + : this.useCover(ist, player, world, x, y, z, side); + } + + private String getMicroName(int hb) { + switch(hb) { + case 0: + return "rpcover"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + default: + return null; + case 16: + return "rppanel"; + case 17: + return "rpslab"; + case 18: + return "rpcovc"; + case 19: + return "rppanc"; + case 20: + return "rpslabc"; + case 21: + return "rpcovs"; + case 22: + return "rppans"; + case 23: + return "rpslabs"; + case 24: + return "rphcover"; + case 25: + return "rphpanel"; + case 26: + return "rphslab"; + case 27: + return "rpcov3"; + case 28: + return "rpcov5"; + case 29: + return "rpcov6"; + case 30: + return "rpcov7"; + case 31: + return "rphcov3"; + case 32: + return "rphcov5"; + case 33: + return "rphcov6"; + case 34: + return "rphcov7"; + case 35: + return "rpcov3c"; + case 36: + return "rpcov5c"; + case 37: + return "rpcov6c"; + case 38: + return "rpcov7c"; + case 39: + return "rpcov3s"; + case 40: + return "rpcov5s"; + case 41: + return "rpcov6s"; + case 42: + return "rpcov7s"; + case 43: + return "rppole1"; + case 44: + return "rppole2"; + case 45: + return "rppole3"; + } + } + + public String getUnlocalizedName(ItemStack ist) { + int hb = ist.getItemDamage(); + int lb = hb & 0xFF; + hb >>= 8; + String stub = this.getMicroName(hb); + if (stub != null) { + String name = CoverLib.getName(lb); + if (name == null) { + throw new IndexOutOfBoundsException(); + } else { + return "tile." + stub + "." + name; + } + } else if (this.placers[hb] == null) { + throw new IndexOutOfBoundsException(); + } else { + String name = this.placers[hb].getMicroName(hb, lb); + if (name == null) { + throw new IndexOutOfBoundsException(); + } else { + return name; + } + } + } + + public void registerPlacement(int md, IMicroPlacement imp) { + this.placers[md] = imp; + } + + @SideOnly(Side.CLIENT) + public void getSubItems(Item id, CreativeTabs tab, List list) { + if (tab != CreativeExtraTabs.tabWires && tab != CreativeExtraTabs.tabMachine) { + if (tab == CreativeExtraTabs.tabMicros) { + for(int i = 0; i < 255; ++i) { + String stub = CoverLib.getName(i); + if (stub != null) { + list.add(new ItemStack(RedPowerBase.blockMicro, 1, i)); + } + } + + for(int i = 1; i < 255; ++i) { + String stub = this.getMicroName(i); + if (stub != null) { + list.add(new ItemStack(RedPowerBase.blockMicro, 1, i << 8)); + } + } + + for(int i = 1; i < 255; ++i) { + String stub = this.getMicroName(i); + if (stub != null) { + list.add(new ItemStack(RedPowerBase.blockMicro, 1, i << 8 | 2)); + } + } + + for(int i = 1; i < 255; ++i) { + String stub = this.getMicroName(i); + if (stub != null) { + list.add(new ItemStack(RedPowerBase.blockMicro, 1, i << 8 | 23)); + } + } + + for(int i = 1; i < 255; ++i) { + String stub = this.getMicroName(i); + if (stub != null) { + list.add(new ItemStack(RedPowerBase.blockMicro, 1, i << 8 | 26)); + } + } + } + } else { + for(int i = 0; i < 255; ++i) { + if (this.placers[i] != null) { + this.placers[i].addCreativeItems(i, tab, list); + } + } + } + + } + + public CreativeTabs[] getCreativeTabs() { + return new CreativeTabs[]{CreativeExtraTabs.tabWires, CreativeExtraTabs.tabMicros, CreativeExtraTabs.tabMachine}; + } +} diff --git a/src/main/java/com/eloraam/redpower/base/ItemPlan.java b/src/main/java/com/eloraam/redpower/base/ItemPlan.java new file mode 100644 index 0000000..adeae92 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/base/ItemPlan.java @@ -0,0 +1,74 @@ +package com.eloraam.redpower.base; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import java.util.HashMap; +import java.util.List; +import java.util.Map.Entry; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; + +public class ItemPlan extends Item { + public ItemPlan() { + this.setMaxDamage(0); + this.setHasSubtypes(true); + this.setUnlocalizedName("planFull"); + this.setTextureName("rpbase:planFull"); + this.setMaxStackSize(1); + } + + @SideOnly(Side.CLIENT) + public String getItemStackDisplayName(ItemStack ist) { + if (ist.stackTagCompound == null) { + return super.getItemStackDisplayName(ist); + } else if (!ist.stackTagCompound.hasKey("result")) { + return super.getItemStackDisplayName(ist); + } else { + NBTTagCompound res = ist.stackTagCompound.getCompoundTag("result"); + ItemStack result = ItemStack.loadItemStackFromNBT(res); + return result.getItem().getItemStackDisplayName(result) + " Plan"; + } + } + + public void addInformation(ItemStack ist, EntityPlayer player, List lines, boolean par4) { + if (ist.stackTagCompound != null) { + NBTTagList require = ist.stackTagCompound.getTagList("requires", 10); + if (require != null) { + HashMap, Integer> counts = new HashMap(); + + for(int i = 0; i < require.tagCount(); ++i) { + NBTTagCompound kv = require.getCompoundTagAt(i); + ItemStack li = ItemStack.loadItemStackFromNBT(kv); + HashMap i2d = new HashMap(); + i2d.put(li.getItem(), li.getItemDamage()); + Integer lc = (Integer)counts.get(i2d); + if (lc == null) { + lc = 0; + } + + counts.put(i2d, lc + 1); + } + + for(Entry, Integer> entry : counts.entrySet()) { + HashMap keySet = (HashMap)entry.getKey(); + ItemStack itemStack = new ItemStack((Item)keySet.keySet().iterator().next(), 1, keySet.values().iterator().next()); + lines.add(entry.getValue() + " x " + itemStack.getItem().getItemStackDisplayName(itemStack)); + } + } + } + + } + + @SideOnly(Side.CLIENT) + public EnumRarity getRarity(ItemStack ist) { + return EnumRarity.rare; + } + + public boolean getShareTag() { + return true; + } +} diff --git a/src/main/java/com/eloraam/redpower/base/ItemScrewdriver.java b/src/main/java/com/eloraam/redpower/base/ItemScrewdriver.java new file mode 100644 index 0000000..edcef1a --- /dev/null +++ b/src/main/java/com/eloraam/redpower/base/ItemScrewdriver.java @@ -0,0 +1,105 @@ +package com.eloraam.redpower.base; + +import com.eloraam.redpower.RedPowerBase; +import com.eloraam.redpower.control.TileCPU; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.IRedbusConnectable; +import com.eloraam.redpower.core.IRotatable; +import com.google.common.collect.Multimap; +import net.minecraft.block.Block; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.SharedMonsterAttributes; +import net.minecraft.entity.ai.attributes.AttributeModifier; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.World; + +public class ItemScrewdriver extends Item { + public ItemScrewdriver() { + this.setMaxDamage(200); + this.setMaxStackSize(1); + this.setCreativeTab(CreativeTabs.tabTools); + this.setUnlocalizedName("screwdriver"); + this.setTextureName("rpbase:screwdriver"); + } + + public boolean hitEntity(ItemStack ist, EntityLivingBase ent, EntityLivingBase hitter) { + ist.damageItem(8, hitter); + return true; + } + + public boolean onItemUseFirst(ItemStack ist, EntityPlayer player, World world, int x, int y, int z, int side, float xp, float yp, float zp) { + if (!world.isRemote) { + boolean sec = false; + if (player != null && player.isSneaking()) { + sec = true; + } + + Block bid = world.getBlock(x, y, z); + int md = world.getBlockMetadata(x, y, z); + if (bid == Blocks.unpowered_repeater || bid == Blocks.powered_repeater) { + world.setBlock(x, y, z, bid, md & 12 | md + 1 & 3, 3); + ist.damageItem(1, player); + return true; + } else if (bid == Blocks.dispenser) { + md = md & 3 ^ md >> 2; + md += 2; + world.setBlock(x, y, z, bid, md, 3); + ist.damageItem(1, player); + return true; + } else if (bid != Blocks.piston && bid != Blocks.sticky_piston) { + if (player.isSneaking()) { + IRedbusConnectable irb = CoreLib.getTileEntity(world, x, y, z, IRedbusConnectable.class); + if (irb != null && !(irb instanceof TileCPU)) { + player.openGui(RedPowerBase.instance, 3, world, x, y, z); + return true; + } + } + + IRotatable ir = CoreLib.getTileEntity(world, x, y, z, IRotatable.class); + if (ir == null) { + return false; + } else { + MovingObjectPosition mop = CoreLib.retraceBlock(world, player, x, y, z); + if (mop == null) { + return false; + } else { + int rm = ir.getPartMaxRotation(mop.subHit, sec); + if (rm == 0) { + return false; + } else { + int r = ir.getPartRotation(mop.subHit, sec); + if (++r > rm) { + r = 0; + } + + ir.setPartRotation(mop.subHit, sec, r); + ist.damageItem(1, player); + return true; + } + } + } + } else { + if (++md > 5) { + md = 0; + } + + world.setBlock(x, y, z, bid, md, 3); + ist.damageItem(1, player); + return true; + } + } else { + return false; + } + } + + public Multimap getAttributeModifiers(ItemStack stack) { + Multimap map = super.getAttributeModifiers(stack); + map.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(Item.field_111210_e, "Weapon modifier", 4.0, 0)); + return map; + } +} diff --git a/src/main/java/com/eloraam/redpower/base/RecipeBag.java b/src/main/java/com/eloraam/redpower/base/RecipeBag.java new file mode 100644 index 0000000..2e4614c --- /dev/null +++ b/src/main/java/com/eloraam/redpower/base/RecipeBag.java @@ -0,0 +1,66 @@ +package com.eloraam.redpower.base; + +import com.eloraam.redpower.RedPowerBase; +import net.minecraft.init.Items; +import net.minecraft.inventory.InventoryCrafting; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.world.World; + +public class RecipeBag implements IRecipe { + public int getRecipeSize() { + return 2; + } + + public ItemStack getRecipeOutput() { + return new ItemStack(RedPowerBase.itemBag, 1, 0); + } + + private ItemStack findResult(InventoryCrafting inv) { + ItemStack bag = null; + int color = -1; + + for(int i = 0; i < 3; ++i) { + for(int j = 0; j < 3; ++j) { + ItemStack ist = inv.getStackInRowAndColumn(i, j); + if (ist != null) { + if (ist.getItem() instanceof ItemBag) { + if (bag != null) { + return null; + } + + bag = ist; + } else { + if (ist.getItem() != Items.dye) { + return null; + } + + if (color >= 0) { + return null; + } + + color = 15 - ist.getItemDamage(); + } + } + } + } + + if (bag == null || color < 0) { + return null; + } else if (bag.getItemDamage() == color) { + return null; + } else { + bag = bag.copy(); + bag.setItemDamage(color); + return bag; + } + } + + public ItemStack getCraftingResult(InventoryCrafting inv) { + return this.findResult(inv).copy(); + } + + public boolean matches(InventoryCrafting inv, World world) { + return this.findResult(inv) != null; + } +} diff --git a/src/main/java/com/eloraam/redpower/base/RenderAdvBench.java b/src/main/java/com/eloraam/redpower/base/RenderAdvBench.java new file mode 100644 index 0000000..2ed40c4 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/base/RenderAdvBench.java @@ -0,0 +1,79 @@ +package com.eloraam.redpower.base; + +import com.eloraam.redpower.RedPowerBase; +import com.eloraam.redpower.core.RenderContext; +import com.eloraam.redpower.core.RenderCustomBlock; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public class RenderAdvBench extends RenderCustomBlock { + protected RenderContext context = new RenderContext(); + + public RenderAdvBench(Block block) { + super(block); + } + + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTicks) { + TileAdvBench bench = (TileAdvBench)tile; + World world = bench.getWorldObj(); + GL11.glDisable(2896); + Tessellator tess = Tessellator.instance; + this.context.bindBlockTexture(); + this.context.setDefaults(); + this.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F); + this.context.setPos(x, y, z); + this.context.readGlobalLights(world, bench.xCoord, bench.yCoord, bench.zCoord); + this.context + .setIcon( + RedPowerBase.projectTableBottom, + RedPowerBase.projectTableTop, + RedPowerBase.projectTableFront, + RedPowerBase.projectTableSide, + RedPowerBase.projectTableSide, + RedPowerBase.projectTableSide + ); + this.context.setSize(0.0, 0.0, 0.0, 1.0, 1.0, 1.0); + this.context.setupBox(); + this.context.transform(); + this.context.rotateTextures(bench.Rotation); + tess.startDrawingQuads(); + this.context.renderGlobFaces(63); + tess.draw(); + GL11.glEnable(2896); + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + super.block.setBlockBoundsForItemRender(); + this.context.setDefaults(); + if (type == ItemRenderType.INVENTORY) { + this.context.setPos(-0.5, -0.5, -0.5); + } else { + this.context.setPos(0.0, 0.0, 0.0); + } + + this.context.useNormal = true; + Tessellator tess = Tessellator.instance; + tess.startDrawingQuads(); + this.context + .setIcon( + RedPowerBase.projectTableBottom, + RedPowerBase.projectTableTop, + RedPowerBase.projectTableSide, + RedPowerBase.projectTableSide, + RedPowerBase.projectTableSide, + RedPowerBase.projectTableFront + ); + this.context.renderBox(63, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0); + tess.draw(); + this.context.useNormal = false; + } +} diff --git a/src/main/java/com/eloraam/redpower/base/RenderAlloyFurnace.java b/src/main/java/com/eloraam/redpower/base/RenderAlloyFurnace.java new file mode 100644 index 0000000..326e47d --- /dev/null +++ b/src/main/java/com/eloraam/redpower/base/RenderAlloyFurnace.java @@ -0,0 +1,111 @@ +package com.eloraam.redpower.base; + +import com.eloraam.redpower.RedPowerBase; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.RenderContext; +import com.eloraam.redpower.core.RenderCustomBlock; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import java.util.Random; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public class RenderAlloyFurnace extends RenderCustomBlock { + protected RenderContext context = new RenderContext(); + + public RenderAlloyFurnace(Block block) { + super(block); + } + + @Override + public void randomDisplayTick(World world, int x, int y, int z, Random random) { + TileAlloyFurnace tb = CoreLib.getTileEntity(world, x, y, z, TileAlloyFurnace.class); + if (tb != null && tb.Active) { + float f = (float)x + 0.5F; + float f1 = (float)y + 0.0F + random.nextFloat() * 6.0F / 16.0F; + float f2 = (float)z + 0.5F; + float f3 = 0.52F; + float f4 = random.nextFloat() * 0.6F - 0.3F; + switch(tb.Rotation) { + case 0: + world.spawnParticle("smoke", (double)(f + f4), (double)f1, (double)(f2 - f3), 0.0, 0.0, 0.0); + world.spawnParticle("flame", (double)(f + f4), (double)f1, (double)(f2 - f3), 0.0, 0.0, 0.0); + break; + case 1: + world.spawnParticle("smoke", (double)(f + f3), (double)f1, (double)(f2 + f4), 0.0, 0.0, 0.0); + world.spawnParticle("flame", (double)(f + f3), (double)f1, (double)(f2 + f4), 0.0, 0.0, 0.0); + break; + case 2: + world.spawnParticle("smoke", (double)(f + f4), (double)f1, (double)(f2 + f3), 0.0, 0.0, 0.0); + world.spawnParticle("flame", (double)(f + f4), (double)f1, (double)(f2 + f3), 0.0, 0.0, 0.0); + break; + case 3: + world.spawnParticle("smoke", (double)(f - f3), (double)f1, (double)(f2 + f4), 0.0, 0.0, 0.0); + world.spawnParticle("flame", (double)(f - f3), (double)f1, (double)(f2 + f4), 0.0, 0.0, 0.0); + } + } + + } + + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTicks) { + TileAlloyFurnace alloyFurnace = (TileAlloyFurnace)tile; + World world = alloyFurnace.getWorldObj(); + GL11.glDisable(2896); + Tessellator tess = Tessellator.instance; + this.context.bindBlockTexture(); + this.context.setDefaults(); + this.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F); + this.context.setPos(x, y, z); + this.context.readGlobalLights(world, alloyFurnace.xCoord, alloyFurnace.yCoord, alloyFurnace.zCoord); + this.context + .setIcon( + RedPowerBase.alloyFurnaceVert, + RedPowerBase.alloyFurnaceVert, + alloyFurnace.Active ? RedPowerBase.alloyFurnaceFrontOn : RedPowerBase.alloyFurnaceFront, + RedPowerBase.alloyFurnaceSide, + RedPowerBase.alloyFurnaceSide, + RedPowerBase.alloyFurnaceSide + ); + this.context.setSize(0.0, 0.0, 0.0, 1.0, 1.0, 1.0); + this.context.setupBox(); + this.context.transform(); + this.context.rotateTextures(alloyFurnace.Rotation); + tess.startDrawingQuads(); + this.context.renderGlobFaces(63); + tess.draw(); + GL11.glEnable(2896); + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + super.block.setBlockBoundsForItemRender(); + this.context.setDefaults(); + if (type == ItemRenderType.INVENTORY) { + this.context.setPos(-0.5, -0.5, -0.5); + } else { + this.context.setPos(0.0, 0.0, 0.0); + } + + this.context.useNormal = true; + Tessellator tess = Tessellator.instance; + tess.startDrawingQuads(); + this.context + .setIcon( + RedPowerBase.alloyFurnaceVert, + RedPowerBase.alloyFurnaceVert, + RedPowerBase.alloyFurnaceSide, + RedPowerBase.alloyFurnaceSide, + RedPowerBase.alloyFurnaceSide, + RedPowerBase.alloyFurnaceFront + ); + this.context.renderBox(63, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0); + tess.draw(); + this.context.useNormal = false; + } +} diff --git a/src/main/java/com/eloraam/redpower/base/SlotAlloyFurnace.java b/src/main/java/com/eloraam/redpower/base/SlotAlloyFurnace.java new file mode 100644 index 0000000..553bbf4 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/base/SlotAlloyFurnace.java @@ -0,0 +1,45 @@ +package com.eloraam.redpower.base; + +import com.eloraam.redpower.core.AchieveLib; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class SlotAlloyFurnace extends Slot { + private EntityPlayer thePlayer; + int totalCrafted; + + public SlotAlloyFurnace(EntityPlayer player, IInventory inv, int x, int y, int z) { + super(inv, x, y, z); + this.thePlayer = player; + } + + public boolean isItemValid(ItemStack ist) { + return false; + } + + public ItemStack decrStackSize(int num) { + if (this.getHasStack()) { + this.totalCrafted += Math.min(num, this.getStack().stackSize); + } + + return super.decrStackSize(num); + } + + public void onPickupFromSlot(EntityPlayer player, ItemStack ist) { + this.onCrafting(ist); + super.onPickupFromSlot(player, ist); + } + + protected void onCrafting(ItemStack ist, int num) { + this.totalCrafted += num; + this.onCrafting(ist); + } + + protected void onCrafting(ItemStack ist) { + ist.onCrafting(this.thePlayer.worldObj, this.thePlayer, this.totalCrafted); + this.totalCrafted = 0; + AchieveLib.onAlloy(this.thePlayer, ist); + } +} diff --git a/src/main/java/com/eloraam/redpower/base/SlotCraftRefill.java b/src/main/java/com/eloraam/redpower/base/SlotCraftRefill.java new file mode 100644 index 0000000..c58f555 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/base/SlotCraftRefill.java @@ -0,0 +1,133 @@ +package com.eloraam.redpower.base; + +import com.eloraam.redpower.core.CoreLib; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.SlotCrafting; +import net.minecraft.item.ItemStack; + +public class SlotCraftRefill extends SlotCrafting { + private IInventory inv; + private IInventory craftingMatrix; + private ContainerAdvBench bench; + + public SlotCraftRefill(EntityPlayer player, IInventory matrix, IInventory result, IInventory all, ContainerAdvBench evh, int id, int x, int y) { + super(player, matrix, result, id, x, y); + this.inv = all; + this.craftingMatrix = matrix; + this.bench = evh; + } + + private int findMatch(ItemStack a) { + for(int i = 0; i < 18; ++i) { + ItemStack test = this.inv.getStackInSlot(10 + i); + if (test != null && test.stackSize != 0 && CoreLib.matchItemStackOre(a, test)) { + return 10 + i; + } + } + + return -1; + } + + public boolean isLastUse() { + int bits = 0; + + for(int i = 0; i < 9; ++i) { + ItemStack test = this.inv.getStackInSlot(i); + if (test == null) { + bits |= 1 << i; + } else if (!test.isStackable()) { + bits |= 1 << i; + } else if (test.stackSize > 1) { + bits |= 1 << i; + } + } + + if (bits == 511) { + return false; + } else { + for(int i = 0; i < 18; ++i) { + ItemStack test = this.inv.getStackInSlot(10 + i); + if (test != null && test.stackSize != 0) { + int sc = test.stackSize; + + for(int j = 0; j < 9; ++j) { + if ((bits & 1 << j) <= 0) { + ItemStack st = this.inv.getStackInSlot(j); + if (st != null && CoreLib.matchItemStackOre(st, test)) { + bits |= 1 << j; + if (--sc == 0) { + break; + } + } + } + } + } + } + + return bits != 511; + } + } + + public void onPickupFromSlot(EntityPlayer player, ItemStack ist) { + ItemStack[] plan = this.bench.getPlanItems(); + ItemStack[] cur = new ItemStack[9]; + + for(int i = 0; i < 9; ++i) { + ItemStack idx = this.inv.getStackInSlot(i); + if (idx == null) { + cur[i] = null; + } else { + cur[i] = idx.copy(); + } + } + + boolean lastUse = this.isLastUse(); + if (plan != null) { + for(int i = 0; i < 9; ++i) { + if (cur[i] == null && plan[i] != null) { + int m = this.findMatch(plan[i]); + if (m >= 0) { + ItemStack ch = this.inv.getStackInSlot(m); + if (ch != null) { + this.inv.decrStackSize(m, 1); + if (ch.getItem().getContainerItem() != null) { + ItemStack s = ch.getItem().getContainerItem(ch); + this.inv.setInventorySlotContents(m, s); + } + } + } + } + } + } + + super.onPickupFromSlot(player, ist); + if (!lastUse) { + for(int i = 0; i < 9; ++i) { + if (cur[i] != null) { + ItemStack nsl = this.inv.getStackInSlot(i); + if (plan == null || plan[i] == null) { + if (nsl != null) { + if (!CoreLib.matchItemStackOre(nsl, cur[i]) && cur[i].getItem().getContainerItem() != null) { + ItemStack ctr = cur[i].getItem().getContainerItem(cur[i]); + if (ctr != null && ctr.getItem() == nsl.getItem()) { + int id = this.findMatch(cur[i]); + if (id >= 0) { + this.inv.setInventorySlotContents(id, nsl); + } + } + } + } else { + int id = this.findMatch(cur[i]); + if (id >= 0) { + this.inv.setInventorySlotContents(i, this.inv.decrStackSize(id, 1)); + } + } + } + } + } + } + + this.bench.onCraftMatrixChanged(this.craftingMatrix); + } +} diff --git a/src/main/java/com/eloraam/redpower/base/TileAdvBench.java b/src/main/java/com/eloraam/redpower/base/TileAdvBench.java new file mode 100644 index 0000000..2a49b10 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/base/TileAdvBench.java @@ -0,0 +1,175 @@ +package com.eloraam.redpower.base; + +import com.eloraam.redpower.RedPowerBase; +import com.eloraam.redpower.core.CoreLib; +import java.util.stream.IntStream; +import net.minecraft.entity.player.EntityPlayer; +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; + +public class TileAdvBench extends TileAppliance implements ISidedInventory { + private ItemStack[] contents = new ItemStack[28]; + + @Override + public int getExtendedID() { + return 3; + } + + public boolean canUpdate() { + return true; + } + + @Override + public boolean onBlockActivated(EntityPlayer player) { + if (player.isSneaking()) { + return false; + } else { + if (!super.worldObj.isRemote) { + player.openGui(RedPowerBase.instance, 2, super.worldObj, super.xCoord, super.yCoord, super.zCoord); + } + + return true; + } + } + + @Override + public void onBlockRemoval() { + for(int i = 0; i < 27; ++i) { + ItemStack ist = this.contents[i]; + if (ist != null && ist.stackSize > 0) { + CoreLib.dropItem(super.worldObj, super.xCoord, super.yCoord, super.zCoord, ist); + } + } + + } + + public int getSizeInventory() { + return 28; + } + + public ItemStack getStackInSlot(int i) { + return this.contents[i]; + } + + public ItemStack decrStackSize(int i, int j) { + if (this.contents[i] == null) { + return null; + } else if (this.contents[i].stackSize <= j) { + ItemStack tr = this.contents[i]; + this.contents[i] = null; + this.markDirty(); + return tr; + } else { + ItemStack tr = this.contents[i].splitStack(j); + if (this.contents[i].stackSize == 0) { + this.contents[i] = null; + } + + this.markDirty(); + return tr; + } + } + + public ItemStack getStackInSlotOnClosing(int i) { + if (this.contents[i] == null) { + return null; + } else { + ItemStack ist = this.contents[i]; + this.contents[i] = null; + return ist; + } + } + + public void setInventorySlotContents(int i, ItemStack ist) { + this.contents[i] = ist; + if (ist != null && ist.stackSize > this.getInventoryStackLimit()) { + ist.stackSize = this.getInventoryStackLimit(); + } + + this.markDirty(); + } + + public String getInventoryName() { + return "tile.rpabench.name"; + } + + public int getInventoryStackLimit() { + return 64; + } + + public boolean isUseableByPlayer(EntityPlayer player) { + TileEntity tile = super.worldObj.getTileEntity(super.xCoord, super.yCoord, super.zCoord); + return tile == this + && tile != null + && !tile.isInvalid() + && player.getDistanceSq((double)super.xCoord + 0.5, (double)super.yCoord + 0.5, (double)super.zCoord + 0.5) <= 64.0; + } + + public void closeInventory() { + } + + public void openInventory() { + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + NBTTagList items = data.getTagList("Items", 10); + this.contents = new ItemStack[this.getSizeInventory()]; + + for(int i = 0; i < items.tagCount(); ++i) { + NBTTagCompound item = items.getCompoundTagAt(i); + int j = item.getByte("Slot") & 255; + if (j >= 0 && j < this.contents.length) { + this.contents[j] = ItemStack.loadItemStackFromNBT(item); + } + } + + this.markDirty(); + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + NBTTagList items = new NBTTagList(); + + for(int i = 0; i < this.contents.length; ++i) { + if (this.contents[i] != null) { + NBTTagCompound item = new NBTTagCompound(); + item.setByte("Slot", (byte)i); + this.contents[i].writeToNBT(item); + items.appendTag(item); + } + } + + data.setTag("Items", items); + } + + public int[] getAccessibleSlotsFromSide(int side) { + switch(side) { + case 1: + return IntStream.range(0, 9).toArray(); + default: + return side != (super.Rotation ^ 1) ? IntStream.range(10, 28).toArray() : new int[0]; + } + } + + public boolean canInsertItem(int slotID, ItemStack itemStack, int side) { + return side != (super.Rotation ^ 1) && slotID >= 0 && slotID < 28 && slotID != 9; + } + + public boolean canExtractItem(int slotID, ItemStack itemStack, int side) { + return side == 0 && slotID >= 10 && slotID < 28; + } + + public boolean hasCustomInventoryName() { + return false; + } + + public boolean isItemValidForSlot(int slotID, ItemStack stack) { + return slotID != 9 || stack.getItem() == RedPowerBase.itemPlanBlank || stack.getItem() == RedPowerBase.itemPlanFull; + } +} diff --git a/src/main/java/com/eloraam/redpower/base/TileAlloyFurnace.java b/src/main/java/com/eloraam/redpower/base/TileAlloyFurnace.java new file mode 100644 index 0000000..7e88b91 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/base/TileAlloyFurnace.java @@ -0,0 +1,285 @@ +package com.eloraam.redpower.base; + +import com.eloraam.redpower.RedPowerBase; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.CraftLib; +import java.util.stream.IntStream; +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.TileEntityFurnace; +import net.minecraft.world.EnumSkyBlock; + +public class TileAlloyFurnace extends TileAppliance implements IInventory, ISidedInventory { + private ItemStack[] contents = new ItemStack[11]; + int totalburn = 0; + int burntime = 0; + int cooktime = 0; + + private void updateLight() { + super.worldObj.updateLightByType(EnumSkyBlock.Block, super.xCoord, super.yCoord, super.zCoord); + } + + @Override + public int getExtendedID() { + return 0; + } + + @Override + public void updateEntity() { + super.updateEntity(); + boolean btu = false; + if (this.burntime > 0) { + --this.burntime; + if (this.burntime == 0) { + btu = true; + super.Active = false; + } + } + + if (!super.worldObj.isRemote) { + boolean cs = this.canSmelt(); + if (this.burntime == 0 && cs && this.contents[9] != null) { + this.burntime = this.totalburn = CoreLib.getBurnTime(this.contents[9]); + if (this.burntime > 0) { + super.Active = true; + if (this.contents[9].getItem().getContainerItem() != null) { + this.contents[9] = new ItemStack(this.contents[9].getItem().getContainerItem()); + } else { + --this.contents[9].stackSize; + } + + if (this.contents[9].stackSize == 0) { + this.contents[9] = null; + } + + if (!btu) { + this.updateBlock(); + this.updateLight(); + } + } + } + + if (this.burntime > 0 && cs) { + ++this.cooktime; + if (this.cooktime == 200) { + this.cooktime = 0; + this.smeltItem(); + this.markDirty(); + } + } else { + this.cooktime = 0; + } + + if (btu) { + this.updateBlock(); + this.updateLight(); + } + } + + } + + private boolean canSmelt() { + ItemStack ist = CraftLib.getAlloyResult(this.contents, 0, 9, false); + if (ist == null) { + return false; + } else if (this.contents[10] == null) { + return true; + } else if (!this.contents[10].isItemEqual(ist)) { + return false; + } else { + int st = this.contents[10].stackSize + ist.stackSize; + return st <= this.getInventoryStackLimit() && st <= ist.getMaxStackSize(); + } + } + + private void smeltItem() { + if (this.canSmelt()) { + ItemStack ist = CraftLib.getAlloyResult(this.contents, 0, 9, true); + if (this.contents[10] == null) { + this.contents[10] = ist.copy(); + } else { + this.contents[10].stackSize += ist.stackSize; + } + } + + } + + int getCookScaled(int i) { + return this.cooktime * i / 200; + } + + int getBurnScaled(int i) { + return this.totalburn == 0 ? 0 : this.burntime * i / this.totalburn; + } + + @Override + public boolean onBlockActivated(EntityPlayer player) { + if (player.isSneaking()) { + return false; + } else { + if (!super.worldObj.isRemote) { + player.openGui(RedPowerBase.instance, 1, super.worldObj, super.xCoord, super.yCoord, super.zCoord); + } + + return true; + } + } + + @Override + public void onBlockRemoval() { + for(int i = 0; i < 11; ++i) { + ItemStack ist = this.contents[i]; + if (ist != null && ist.stackSize > 0) { + CoreLib.dropItem(super.worldObj, super.xCoord, super.yCoord, super.zCoord, ist); + } + } + + } + + public int getSizeInventory() { + return 11; + } + + public ItemStack getStackInSlot(int slotId) { + return this.contents[slotId]; + } + + public ItemStack decrStackSize(int slotId, int amount) { + if (this.contents[slotId] == null) { + return null; + } else if (this.contents[slotId].stackSize <= amount) { + ItemStack tr = this.contents[slotId]; + this.contents[slotId] = null; + this.markDirty(); + return tr; + } else { + ItemStack tr = this.contents[slotId].splitStack(amount); + if (this.contents[slotId].stackSize == 0) { + this.contents[slotId] = null; + } + + this.markDirty(); + return tr; + } + } + + public ItemStack getStackInSlotOnClosing(int slotId) { + if (this.contents[slotId] == null) { + return null; + } else { + ItemStack ist = this.contents[slotId]; + this.contents[slotId] = null; + return ist; + } + } + + public void setInventorySlotContents(int slotId, ItemStack ist) { + this.contents[slotId] = ist; + if (ist != null && ist.stackSize > this.getInventoryStackLimit()) { + ist.stackSize = this.getInventoryStackLimit(); + } + + this.markDirty(); + } + + public String getInventoryName() { + return "tile.rpafurnace.name"; + } + + public int getInventoryStackLimit() { + return 64; + } + + public boolean isUseableByPlayer(EntityPlayer player) { + return !this.isInvalid() + && super.worldObj.getTileEntity(super.xCoord, super.yCoord, super.zCoord) == this + && player.getDistanceSq((double)super.xCoord + 0.5, (double)super.yCoord + 0.5, (double)super.zCoord + 0.5) <= 64.0; + } + + public void closeInventory() { + } + + public void openInventory() { + } + + @Override + public void readFromNBT(NBTTagCompound data) { + NBTTagList items = data.getTagList("Items", 10); + this.contents = new ItemStack[this.getSizeInventory()]; + + for(int i = 0; i < items.tagCount(); ++i) { + NBTTagCompound item = items.getCompoundTagAt(i); + int j = item.getByte("Slot") & 255; + if (j >= 0 && j < this.contents.length) { + this.contents[j] = ItemStack.loadItemStackFromNBT(item); + } + } + + this.totalburn = data.getShort("TotalBurn"); + this.burntime = data.getShort("BurnTime"); + this.cooktime = data.getShort("CookTime"); + super.readFromNBT(data); + } + + @Override + public void writeToNBT(NBTTagCompound data) { + NBTTagList items = new NBTTagList(); + + for(int i = 0; i < this.contents.length; ++i) { + if (this.contents[i] != null) { + NBTTagCompound item = new NBTTagCompound(); + item.setByte("Slot", (byte)i); + this.contents[i].writeToNBT(item); + items.appendTag(item); + } + } + + data.setTag("Items", items); + data.setShort("TotalBurn", (short)this.totalburn); + data.setShort("BurnTime", (short)this.burntime); + data.setShort("CookTime", (short)this.cooktime); + super.writeToNBT(data); + } + + public int[] getAccessibleSlotsFromSide(int side) { + switch(side) { + case 0: + return new int[]{10}; + case 1: + return IntStream.range(0, 9).toArray(); + default: + return side != (super.Rotation ^ 1) ? new int[]{9} : new int[0]; + } + } + + public boolean canInsertItem(int slotID, ItemStack stack, int side) { + switch(side) { + case 1: + return slotID >= 0 && slotID < 9; + default: + return side != (super.Rotation ^ 1) ? TileEntityFurnace.isItemFuel(stack) : false; + } + } + + public boolean canExtractItem(int slotID, ItemStack stack, int side) { + return slotID == 10 && side == 0; + } + + public boolean hasCustomInventoryName() { + return false; + } + + public boolean isItemValidForSlot(int slotID, ItemStack stack) { + return TileEntityFurnace.isItemFuel(stack) && slotID == 9 || slotID >= 0 && slotID < 9; + } + + @Override + protected void readFromPacket(NBTTagCompound tag) { + super.readFromPacket(tag); + this.updateLight(); + } +} diff --git a/src/main/java/com/eloraam/redpower/base/TileAppliance.java b/src/main/java/com/eloraam/redpower/base/TileAppliance.java new file mode 100644 index 0000000..e7d43e9 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/base/TileAppliance.java @@ -0,0 +1,83 @@ +package com.eloraam.redpower.base; + +import com.eloraam.redpower.RedPowerBase; +import com.eloraam.redpower.core.IFrameSupport; +import com.eloraam.redpower.core.TileExtended; +import net.minecraft.block.Block; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.IBlockAccess; + +public class TileAppliance extends TileExtended implements IFrameSupport { + public int Rotation = 0; + public boolean Active = false; + + @Override + public void onBlockPlaced(ItemStack ist, int side, EntityLivingBase ent) { + this.Rotation = (int)Math.floor((double)(ent.rotationYaw * 4.0F / 360.0F) + 0.5) & 3; + if (ent instanceof EntityPlayer) { + super.Owner = ((EntityPlayer)ent).getGameProfile(); + } + + } + + public Block getBlockType() { + return RedPowerBase.blockAppliance; + } + + public int getLightValue() { + return this.Active ? 13 : 0; + } + + @Override + public void writeFramePacket(NBTTagCompound tag) { + tag.setByte("rot", (byte)this.Rotation); + tag.setByte("ps", (byte)(this.Active ? 1 : 0)); + } + + @Override + public void readFramePacket(NBTTagCompound tag) { + this.Rotation = tag.getByte("rot"); + this.Active = tag.getByte("ps") > 0; + } + + @Override + public void onFrameRefresh(IBlockAccess iba) { + } + + @Override + public void onFramePickup(IBlockAccess iba) { + } + + @Override + public void onFrameDrop() { + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + this.Rotation = data.getByte("rot"); + this.Active = data.getByte("ps") > 0; + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + data.setByte("ps", (byte)(this.Active ? 1 : 0)); + data.setByte("rot", (byte)this.Rotation); + } + + @Override + protected void readFromPacket(NBTTagCompound tag) { + this.Rotation = tag.getByte("rot"); + this.Active = tag.getByte("ps") > 0; + } + + @Override + protected void writeToPacket(NBTTagCompound tag) { + tag.setByte("rot", (byte)this.Rotation); + tag.setByte("ps", (byte)(this.Active ? 1 : 0)); + } +} diff --git a/src/main/java/com/eloraam/redpower/compat/BlockMachineCompat.java b/src/main/java/com/eloraam/redpower/compat/BlockMachineCompat.java new file mode 100644 index 0000000..0e39fc9 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/compat/BlockMachineCompat.java @@ -0,0 +1,32 @@ +package com.eloraam.redpower.compat; + +import com.eloraam.redpower.core.BlockMultipart; +import com.eloraam.redpower.core.CreativeExtraTabs; +import net.minecraft.block.material.Material; + +public class BlockMachineCompat extends BlockMultipart { + public BlockMachineCompat() { + super(Material.rock); + this.setHardness(2.0F); + this.setCreativeTab(CreativeExtraTabs.tabMachine); + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + public boolean isNormalCube() { + return false; + } + + @Override + public boolean renderAsNormalBlock() { + return false; + } + + @Override + public int damageDropped(int meta) { + return meta; + } +} diff --git a/src/main/java/com/eloraam/redpower/compat/ItemMachineCompat.java b/src/main/java/com/eloraam/redpower/compat/ItemMachineCompat.java new file mode 100644 index 0000000..c6a7301 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/compat/ItemMachineCompat.java @@ -0,0 +1,72 @@ +package com.eloraam.redpower.compat; + +import com.eloraam.redpower.core.BlockExtended; +import com.eloraam.redpower.core.ItemExtended; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +public class ItemMachineCompat extends ItemExtended { + public ItemMachineCompat(Block block) { + super(block); + } + + public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float xp, float yp, float zp) { + Block bid = world.getBlock(x, y, z); + Block bl = Block.getBlockFromItem(this); + if (bid == Blocks.snow) { + side = 1; + } else if (bid != Blocks.vine && bid != Blocks.tallgrass && bid != Blocks.deadbush) { + switch(side) { + case 0: + --y; + break; + case 1: + ++y; + break; + case 2: + --z; + break; + case 3: + ++z; + break; + case 4: + --x; + break; + default: + ++x; + } + } + + if (stack.stackSize == 0) { + return false; + } else if (!player.canPlayerEdit(x, y, z, side, stack)) { + return false; + } else if (y >= world.getHeight() - 1) { + return false; + } else if (!world.canPlaceEntityOnSide(bl, x, y, z, false, side, player, stack)) { + return false; + } else { + if (world.setBlock(x, y, z, bl, this.getMetadata(stack.getItemDamage()), 3)) { + if (world.getBlock(x, y, z) == bl) { + BlockExtended bex = (BlockExtended)bl; + bex.onBlockPlacedBy(world, x, y, z, side, player, stack); + } + + world.playSoundEffect( + (double)((float)x + 0.5F), + (double)((float)y + 0.5F), + (double)((float)z + 0.5F), + bl.stepSound.func_150496_b(), + (bl.stepSound.getVolume() + 1.0F) / 2.0F, + bl.stepSound.getPitch() * 0.8F + ); + --stack.stackSize; + } + + return true; + } + } +} diff --git a/src/main/java/com/eloraam/redpower/compat/RenderBlueEngine.java b/src/main/java/com/eloraam/redpower/compat/RenderBlueEngine.java new file mode 100644 index 0000000..c16bd2d --- /dev/null +++ b/src/main/java/com/eloraam/redpower/compat/RenderBlueEngine.java @@ -0,0 +1,92 @@ +package com.eloraam.redpower.compat; + +import com.eloraam.redpower.core.Matrix3; +import com.eloraam.redpower.core.RenderContext; +import com.eloraam.redpower.core.RenderCustomBlock; +import com.eloraam.redpower.core.RenderModel; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; + +public class RenderBlueEngine extends RenderCustomBlock { + private static ResourceLocation res = new ResourceLocation("rpcompat", "models/compat1.png"); + protected RenderModel modelBase = RenderModel.loadModel("rpcompat:models/btengine1.obj").scale(0.0625); + protected RenderModel modelSlide = RenderModel.loadModel("rpcompat:models/btengine2.obj").scale(0.0625); + protected RenderModel modelGear = RenderModel.loadModel("rpcompat:models/btengine3.obj").scale(0.0625); + protected RenderContext context = new RenderContext(); + + public RenderBlueEngine(Block bl) { + super(bl); + } + + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTicks) { + TileBlueEngine tb = (TileBlueEngine)tile; + if (tb != null) { + Tessellator tess = Tessellator.instance; + this.context.setDefaults(); + this.context.setPos(x, y, z); + this.context.setOrientation(tb.Rotation, 0); + this.context.readGlobalLights(tb.getWorldObj(), tb.xCoord, tb.yCoord, tb.zCoord); + this.context.setBrightness(super.getMixedBrightness(tb)); + this.context.bindTexture(res); + this.context.bindModelOffset(this.modelBase, 0.5, 0.5, 0.5); + tess.startDrawingQuads(); + this.context.renderModelGroup(0, 0); + this.context.renderModelGroup(1, tb.Charged ? (tb.Active ? 3 : 2) : 1); + tess.draw(); + int lv = tb.getWorldObj().getLightBrightnessForSkyBlocks(tb.xCoord, tb.yCoord, tb.zCoord, 0); + tess.startDrawingQuads(); + tess.setBrightness(lv); + if (tb.Active) { + partialTicks += (float)tb.PumpTick; + if (tb.PumpSpeed > 0) { + partialTicks /= (float)tb.PumpSpeed; + } + } else { + partialTicks = 0.0F; + } + + this.context.useNormal = true; + this.context.setPos(x, y, z); + this.context.setOrientation(tb.Rotation, 0); + this.context.setRelPos(0.0, 0.1875 * (0.5 - 0.5 * Math.cos(Math.PI * (double)partialTicks)), 0.0); + this.context.bindModelOffset(this.modelSlide, 0.5, 0.5, 0.5); + this.context.renderModelGroup(0, 0); + this.context.basis = Matrix3.getRotY(Math.PI / 2 * (double)partialTicks).multiply(this.context.basis); + this.context.setRelPos(0.5, 0.34375, 0.5); + this.context.bindModelOffset(this.modelGear, 0.5, 0.5, 0.5); + this.context.renderModelGroup(0, 0); + tess.draw(); + } + + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + super.block.setBlockBoundsForItemRender(); + this.context.setDefaults(); + if (type == ItemRenderType.INVENTORY) { + this.context.setPos(-0.5, -0.5, -0.5); + } else { + this.context.setPos(0.0, 0.0, 0.0); + } + + this.context.bindTexture(res); + Tessellator tess = Tessellator.instance; + tess.startDrawingQuads(); + this.context.useNormal = true; + this.context.bindModelOffset(this.modelBase, 0.5, 0.5, 0.5); + this.context.renderModelGroup(0, 0); + this.context.renderModelGroup(1, 1); + this.context.bindModelOffset(this.modelSlide, 0.5, 0.5, 0.5); + this.context.renderModelGroup(0, 0); + this.context.setPos(0.0, -0.15625, 0.0); + this.context.bindModel(this.modelGear); + this.context.renderModelGroup(0, 0); + this.context.useNormal = false; + tess.draw(); + } +} diff --git a/src/main/java/com/eloraam/redpower/compat/TileBlueEngine.java b/src/main/java/com/eloraam/redpower/compat/TileBlueEngine.java new file mode 100644 index 0000000..306c617 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/compat/TileBlueEngine.java @@ -0,0 +1,193 @@ +package com.eloraam.redpower.compat; + +import cofh.api.energy.IEnergyConnection; +import cofh.api.energy.IEnergyReceiver; +import com.eloraam.redpower.core.BluePowerConductor; +import com.eloraam.redpower.core.BluePowerEndpoint; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.IBluePowerConnectable; +import com.eloraam.redpower.core.RedPowerLib; +import com.eloraam.redpower.core.WorldCoord; +import net.minecraft.block.Block; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; + +public class TileBlueEngine extends TileMachineCompat implements IBluePowerConnectable, IEnergyConnection { + private BluePowerEndpoint cond = new BluePowerEndpoint() { + @Override + public TileEntity getParent() { + return TileBlueEngine.this; + } + }; + public int ConMask = -1; + public byte PumpTick = 0; + public byte PumpSpeed = 16; + private int Flywheel = 0; + + @Override + public int getConnectableMask() { + int wm = RedPowerLib.getConDirMask(super.Rotation ^ 1) | 15 << ((super.Rotation ^ 1) << 2); + return 16777215 & ~wm | 16777216 << super.Rotation; + } + + @Override + public int getConnectClass(int side) { + return 65; + } + + @Override + public int getCornerPowerMode() { + return 0; + } + + @Override + public BluePowerConductor getBlueConductor(int side) { + return this.cond; + } + + @Override + public void onBlockNeighborChange(Block bl) { + this.ConMask = -1; + int cm = this.getConnectableMask(); + if (RedPowerLib.isPowered(super.worldObj, super.xCoord, super.yCoord, super.zCoord, cm, cm >> 24)) { + if (!super.Powered) { + super.Powered = true; + this.updateBlock(); + } + } else { + super.Powered = false; + this.updateBlock(); + } + + } + + protected void deliverPower() { + WorldCoord pos = new WorldCoord(this); + pos.step(super.Rotation ^ 1); + IEnergyReceiver ipr = CoreLib.getTileEntity(super.worldObj, pos, IEnergyReceiver.class); + ForgeDirection oppSide = ForgeDirection.getOrientation(super.Rotation); + if (ipr != null && ipr.canConnectEnergy(oppSide)) { + this.Flywheel -= ipr.receiveEnergy(oppSide, this.Flywheel * 10, false) / 10; + } + + } + + @Override + public void onTileTick() { + } + + @Override + public void updateEntity() { + super.updateEntity(); + if (!super.worldObj.isRemote) { + if (this.ConMask < 0) { + this.ConMask = RedPowerLib.getConnections(super.worldObj, this, super.xCoord, super.yCoord, super.zCoord); + this.cond.recache(this.ConMask, 0); + } + + this.cond.iterate(); + this.markDirty(); + boolean act = super.Active; + if (super.Active) { + ++this.PumpTick; + int sp = this.PumpTick; + if (sp == this.PumpSpeed) { + this.deliverPower(); + } + + if (sp >= this.PumpSpeed * 2) { + this.PumpTick = 0; + if (this.PumpSpeed > 4) { + --this.PumpSpeed; + } + + super.Active = false; + } + + if (super.Powered && this.Flywheel < 512) { + double draw = Math.min((double)Math.min(512 - this.Flywheel, 32), 0.002 * this.cond.getEnergy(60.0)); + this.cond.drawPower(1000.0 * draw); + this.Flywheel = (int)((double)this.Flywheel + draw); + } + + this.cond.drawPower(50.0); + } + + if (this.cond.getVoltage() < 60.0) { + if (super.Charged && this.cond.Flow == 0) { + super.Charged = false; + this.updateBlock(); + } + } else { + if (!super.Charged) { + super.Charged = true; + this.updateBlock(); + } + + if (super.Charged && super.Powered) { + super.Active = true; + } + + if (super.Active != act) { + if (super.Active) { + this.PumpSpeed = 16; + } + + this.updateBlock(); + } + } + } else if (super.Active) { + ++this.PumpTick; + if (this.PumpTick >= this.PumpSpeed * 2) { + this.PumpTick = 0; + if (this.PumpSpeed > 4) { + --this.PumpSpeed; + } + } + } else { + this.PumpTick = 0; + } + + } + + @Override + public int getExtendedID() { + return 0; + } + + @Override + public void readFromNBT(NBTTagCompound tag) { + super.readFromNBT(tag); + this.cond.readFromNBT(tag); + this.PumpTick = tag.getByte("ptk"); + this.PumpSpeed = tag.getByte("spd"); + this.Flywheel = tag.getInteger("flyw"); + } + + @Override + public void writeToNBT(NBTTagCompound tag) { + super.writeToNBT(tag); + this.cond.writeToNBT(tag); + tag.setByte("ptk", this.PumpTick); + tag.setByte("spd", this.PumpSpeed); + tag.setInteger("flyw", this.Flywheel); + } + + @Override + protected void readFromPacket(NBTTagCompound tag) { + super.readFromPacket(tag); + this.PumpSpeed = tag.getByte("spd"); + } + + @Override + protected void writeToPacket(NBTTagCompound tag) { + super.writeToPacket(tag); + tag.setByte("spd", this.PumpSpeed); + } + + @Override + public boolean canConnectEnergy(ForgeDirection side) { + return side.getOpposite() == ForgeDirection.getOrientation(super.Rotation); + } +} diff --git a/src/main/java/com/eloraam/redpower/compat/TileMachineCompat.java b/src/main/java/com/eloraam/redpower/compat/TileMachineCompat.java new file mode 100644 index 0000000..781de96 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/compat/TileMachineCompat.java @@ -0,0 +1,177 @@ +package com.eloraam.redpower.compat; + +import com.eloraam.redpower.RedPowerCompat; +import com.eloraam.redpower.core.BlockExtended; +import com.eloraam.redpower.core.BlockMultipart; +import com.eloraam.redpower.core.IFrameSupport; +import com.eloraam.redpower.core.IRotatable; +import com.eloraam.redpower.core.TileMultipart; +import java.util.List; +import net.minecraft.block.Block; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.IBlockAccess; + +public class TileMachineCompat extends TileMultipart implements IRotatable, IFrameSupport { + public int Rotation = 0; + public boolean Active = false; + public boolean Powered = false; + public boolean Delay = false; + public boolean Charged = false; + + public int getFacing(EntityLivingBase ent) { + int yawrx = (int)Math.floor((double)(ent.rotationYaw * 4.0F / 360.0F) + 0.5) & 3; + if (Math.abs(ent.posX - (double)super.xCoord) < 2.0 && Math.abs(ent.posZ - (double)super.zCoord) < 2.0) { + double p = ent.posY + 1.82 - (double)ent.yOffset - (double)super.yCoord; + if (p > 2.0) { + return 0; + } + + if (p < 0.0) { + return 1; + } + } + + switch(yawrx) { + case 0: + return 3; + case 1: + return 4; + case 2: + return 2; + default: + return 5; + } + } + + @Override + public void onBlockPlaced(ItemStack ist, int side, EntityLivingBase ent) { + this.Rotation = this.getFacing(ent); + } + + public Block getBlockType() { + return RedPowerCompat.blockMachineCompat; + } + + @Override + public void addHarvestContents(List items) { + items.add(new ItemStack(this.getBlockType(), 1, this.getExtendedID())); + } + + @Override + public void onHarvestPart(EntityPlayer player, int part, boolean willHarvest) { + this.breakBlock(willHarvest); + } + + @Override + public float getPartStrength(EntityPlayer player, int part) { + BlockExtended bl = RedPowerCompat.blockMachineCompat; + return player.getBreakSpeed(bl, false, super.blockMetadata, super.xCoord, super.yCoord, super.zCoord) / (bl.getHardness() * 30.0F); + } + + @Override + public boolean blockEmpty() { + return false; + } + + @Override + public void setPartBounds(BlockMultipart bl, int part) { + bl.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + } + + @Override + public int getSolidPartsMask() { + return 1; + } + + @Override + public int getPartsMask() { + return 1; + } + + @Override + public int getPartMaxRotation(int part, boolean sec) { + return sec ? 0 : 5; + } + + @Override + public int getPartRotation(int part, boolean sec) { + return sec ? 0 : this.Rotation; + } + + @Override + public void setPartRotation(int part, boolean sec, int rot) { + if (!sec) { + this.Rotation = rot; + this.updateBlockChange(); + } + + } + + @Override + public void writeFramePacket(NBTTagCompound tag) { + int ps = (this.Active ? 1 : 0) | (this.Powered ? 2 : 0) | (this.Delay ? 4 : 0) | (this.Charged ? 8 : 0); + tag.setByte("ps", (byte)ps); + tag.setByte("rot", (byte)this.Rotation); + } + + @Override + public void readFramePacket(NBTTagCompound tag) { + int ps = tag.getByte("ps"); + this.Rotation = tag.getByte("rot"); + this.Active = (ps & 1) > 0; + this.Powered = (ps & 2) > 0; + this.Delay = (ps & 4) > 0; + this.Charged = (ps & 8) > 0; + } + + @Override + public void onFrameRefresh(IBlockAccess iba) { + } + + @Override + public void onFramePickup(IBlockAccess iba) { + } + + @Override + public void onFrameDrop() { + } + + @Override + public void readFromNBT(NBTTagCompound tag) { + super.readFromNBT(tag); + int ps = tag.getByte("ps"); + this.Rotation = tag.getByte("rot"); + this.Active = (ps & 1) > 0; + this.Powered = (ps & 2) > 0; + this.Delay = (ps & 4) > 0; + this.Charged = (ps & 8) > 0; + } + + @Override + public void writeToNBT(NBTTagCompound tag) { + super.writeToNBT(tag); + int ps = (this.Active ? 1 : 0) | (this.Powered ? 2 : 0) | (this.Delay ? 4 : 0) | (this.Charged ? 8 : 0); + tag.setByte("ps", (byte)ps); + tag.setByte("rot", (byte)this.Rotation); + } + + @Override + protected void writeToPacket(NBTTagCompound tag) { + int ps = (this.Active ? 1 : 0) | (this.Powered ? 2 : 0) | (this.Delay ? 4 : 0) | (this.Charged ? 8 : 0); + tag.setByte("ps", (byte)ps); + tag.setByte("rot", (byte)this.Rotation); + } + + @Override + protected void readFromPacket(NBTTagCompound tag) { + int ps = tag.getByte("ps"); + this.Rotation = tag.getByte("rot"); + this.Active = (ps & 1) > 0; + this.Powered = (ps & 2) > 0; + this.Delay = (ps & 4) > 0; + this.Charged = (ps & 8) > 0; + } +} diff --git a/src/main/java/com/eloraam/redpower/control/BlockPeripheral.java b/src/main/java/com/eloraam/redpower/control/BlockPeripheral.java new file mode 100644 index 0000000..c20cb86 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/control/BlockPeripheral.java @@ -0,0 +1,42 @@ +package com.eloraam.redpower.control; + +import com.eloraam.redpower.core.BlockExtended; +import com.eloraam.redpower.core.CreativeExtraTabs; +import net.minecraft.block.material.Material; +import net.minecraft.world.IBlockAccess; +import net.minecraftforge.common.util.ForgeDirection; + +public class BlockPeripheral extends BlockExtended { + public BlockPeripheral() { + super(Material.rock); + this.setHardness(2.0F); + this.setCreativeTab(CreativeExtraTabs.tabMachine); + } + + @Override + public boolean isOpaqueCube() { + return true; + } + + public boolean isNormalCube() { + return true; + } + + @Override + public boolean renderAsNormalBlock() { + return true; + } + + public boolean isBlockNormalCube() { + return false; + } + + public boolean isSideSolid(IBlockAccess world, int i, int j, int k, ForgeDirection side) { + return true; + } + + @Override + public int damageDropped(int i) { + return i; + } +} diff --git a/src/main/java/com/eloraam/redpower/control/ContainerCPU.java b/src/main/java/com/eloraam/redpower/control/ContainerCPU.java new file mode 100644 index 0000000..eaffe0c --- /dev/null +++ b/src/main/java/com/eloraam/redpower/control/ContainerCPU.java @@ -0,0 +1,106 @@ +package com.eloraam.redpower.control; + +import java.util.List; + +import com.eloraam.redpower.core.IHandleGuiEvent; +import com.eloraam.redpower.core.PacketGuiEvent; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; + +public class ContainerCPU extends Container implements IHandleGuiEvent { + private TileCPU tileCPU; + private int byte0 = 0; + private int byte1 = 0; + private int rbaddr = 0; + private boolean isrun = false; + + public ContainerCPU(IInventory inv, TileCPU cpu) { + this.tileCPU = cpu; + } + + public ItemStack slotClick(int a, int b, int c, EntityPlayer player) { + return !this.canInteractWith(player) ? null : super.slotClick(a, b, c, player); + } + + public boolean canInteractWith(EntityPlayer player) { + return this.tileCPU.isUseableByPlayer(player); + } + + public ItemStack transferStackInSlot(EntityPlayer player, int i) { + return null; + } + + public void detectAndSendChanges() { + super.detectAndSendChanges(); + + for(ICrafting ic : (List)super.crafters) { + if (this.tileCPU.diskAddr != this.byte0) { + ic.sendProgressBarUpdate(this, 0, this.tileCPU.diskAddr); + } + + if (this.tileCPU.displayAddr != this.byte1) { + ic.sendProgressBarUpdate(this, 1, this.tileCPU.displayAddr); + } + + if (this.tileCPU.rbaddr != this.rbaddr) { + ic.sendProgressBarUpdate(this, 2, this.tileCPU.rbaddr); + } + + if (this.tileCPU.isRunning() != this.isrun) { + ic.sendProgressBarUpdate(this, 3, this.tileCPU.isRunning() ? 1 : 0); + } + } + + this.byte0 = this.tileCPU.diskAddr; + this.byte1 = this.tileCPU.displayAddr; + this.rbaddr = this.tileCPU.rbaddr; + this.isrun = this.tileCPU.isRunning(); + } + + public void updateProgressBar(int id, int value) { + switch(id) { + case 0: + this.tileCPU.diskAddr = value; + break; + case 1: + this.tileCPU.displayAddr = value; + break; + case 2: + this.tileCPU.rbaddr = value; + break; + case 3: + this.tileCPU.sliceCycles = value > 0 ? 0 : -1; + } + + } + + @Override + public void handleGuiEvent(PacketGuiEvent.GuiMessageEvent message) { + try { + switch(message.eventId) { + case 1: + this.tileCPU.diskAddr = message.parameters[0]; + break; + case 2: + this.tileCPU.displayAddr = message.parameters[0]; + break; + case 3: + this.tileCPU.rbaddr = message.parameters[0]; + break; + case 4: + this.tileCPU.warmBootCPU(); + break; + case 5: + this.tileCPU.haltCPU(); + break; + case 6: + this.tileCPU.coldBootCPU(); + } + } catch (Throwable var3) { + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/control/ContainerDisplay.java b/src/main/java/com/eloraam/redpower/control/ContainerDisplay.java new file mode 100644 index 0000000..dba5dd1 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/control/ContainerDisplay.java @@ -0,0 +1,246 @@ +package com.eloraam.redpower.control; + +import com.eloraam.redpower.RedPowerCore; +import com.eloraam.redpower.core.IHandleGuiEvent; +import com.eloraam.redpower.core.PacketGuiEvent; +import java.io.ByteArrayOutputStream; +import java.util.List; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; + +public class ContainerDisplay extends Container implements IHandleGuiEvent { + private TileDisplay tileDisplay; + private byte[] screen = new byte[4000]; + private int cursx = 0; + private int cursy = 0; + private int cursmode = 0; + + private void decompress(byte[] compress, byte[] out) { + int opos = 0; + int i = 0; + + while(i < compress.length) { + if (opos >= out.length) { + return; + } + + int cmd = compress[i++] & 255; + if ((cmd & 128) == 0) { + opos += cmd & 127; + } else if (cmd != 255) { + int ln = Math.min(Math.min(cmd & 127, out.length - opos), compress.length - i); + System.arraycopy(compress, i, out, opos, ln); + opos += ln; + i += ln; + } else { + if (i + 2 > compress.length) { + return; + } + + int ln = Math.min(compress[i] & 255, out.length - opos); + + for(int j = 0; j < ln; ++j) { + out[opos + j] = compress[i + 1]; + } + + opos += ln; + i += 2; + } + } + + } + + public ContainerDisplay(IInventory inv, TileDisplay td) { + this.tileDisplay = td; + } + + public ItemStack slotClick(int a, int b, int c, EntityPlayer player) { + return !this.canInteractWith(player) ? null : super.slotClick(a, b, c, player); + } + + public boolean canInteractWith(EntityPlayer player) { + return this.tileDisplay.isUseableByPlayer(player); + } + + public ItemStack transferStackInSlot(EntityPlayer player, int i) { + return null; + } + + private byte[] getDisplayRLE() { + ContainerDisplay.RLECompressor rle = new ContainerDisplay.RLECompressor(); + + for(int i = 0; i < 4000; ++i) { + rle.addByte(this.tileDisplay.screen[i], this.screen[i] != this.tileDisplay.screen[i]); + this.screen[i] = this.tileDisplay.screen[i]; + } + + rle.flush(); + return rle.getByteArray(); + } + + public void detectAndSendChanges() { + super.detectAndSendChanges(); + byte[] drl = this.getDisplayRLE(); + + for(ICrafting ic : (List)super.crafters) { + if (this.tileDisplay.cursX != this.cursx) { + ic.sendProgressBarUpdate(this, 0, this.tileDisplay.cursX); + } + + if (this.tileDisplay.cursY != this.cursy) { + ic.sendProgressBarUpdate(this, 1, this.tileDisplay.cursY); + } + + if (this.tileDisplay.cursMode != this.cursmode) { + ic.sendProgressBarUpdate(this, 2, this.tileDisplay.cursMode); + } + + if (drl != null) { + RedPowerCore.sendPacketToCrafting(ic, new PacketGuiEvent.GuiMessageEvent(2, super.windowId, drl)); + } + } + + this.cursx = this.tileDisplay.cursX; + this.cursy = this.tileDisplay.cursY; + this.cursmode = this.tileDisplay.cursMode; + } + + public void updateProgressBar(int id, int value) { + switch(id) { + case 0: + this.tileDisplay.cursX = value; + return; + case 1: + this.tileDisplay.cursY = value; + return; + case 2: + this.tileDisplay.cursMode = value; + } + } + + @Override + public void handleGuiEvent(PacketGuiEvent.GuiMessageEvent message) { + try { + switch(message.eventId) { + case 1: + this.tileDisplay.pushKey(message.parameters[0]); + this.tileDisplay.updateBlock(); + break; + case 2: + this.decompress(message.parameters, this.tileDisplay.screen); + } + } catch (Throwable var3) { + } + + } + + public class RLECompressor { + ByteArrayOutputStream bas = new ByteArrayOutputStream(); + byte[] datbuf = new byte[256]; + byte srledat = 0; + int rleoffs = 0; + int srleoffs = 0; + int datpos = 0; + boolean changed = false; + + public void writeRLE() { + this.bas.write((byte)this.rleoffs); + this.datpos = 0; + this.rleoffs = 0; + this.srleoffs = 0; + } + + public void writeSRLE() { + this.bas.write(-1); + this.bas.write((byte)this.srleoffs); + this.bas.write(this.srledat); + this.datpos = 0; + this.rleoffs = 0; + this.srleoffs = 0; + } + + public void writeDat(int bytes) { + if (bytes != 0) { + this.bas.write((byte)(128 | bytes)); + this.bas.write(this.datbuf, 0, bytes); + this.datpos -= bytes; + } + + } + + public void addByte(byte b, boolean diff) { + if (diff) { + this.changed = true; + if (this.rleoffs > 5 && this.rleoffs >= this.srleoffs) { + this.writeDat(this.datpos - this.rleoffs); + this.writeRLE(); + } + + this.rleoffs = 0; + } else { + ++this.rleoffs; + if (this.rleoffs >= 127) { + ++this.datpos; + this.writeDat(this.datpos - this.rleoffs); + this.writeRLE(); + return; + } + } + + if (this.srleoffs == 0) { + this.srledat = b; + this.srleoffs = 1; + } else if (b == this.srledat) { + ++this.srleoffs; + if (this.srleoffs >= 127) { + ++this.datpos; + this.writeDat(this.datpos - this.srleoffs); + this.writeSRLE(); + return; + } + } else { + if (this.srleoffs > 5 && this.srleoffs >= this.rleoffs) { + this.writeDat(this.datpos - this.srleoffs); + this.writeSRLE(); + } + + this.srledat = b; + this.srleoffs = 1; + } + + this.datbuf[this.datpos] = b; + ++this.datpos; + int rem = Math.max(this.srleoffs, this.rleoffs); + if (rem <= 5 && this.datpos >= 126) { + this.writeDat(this.datpos); + this.srleoffs = 0; + this.rleoffs = 0; + } else if (this.datpos - rem >= 126) { + this.writeDat(this.datpos - rem); + } + + } + + public void flush() { + this.datpos -= this.rleoffs; + this.srleoffs = Math.max(0, this.srleoffs - this.rleoffs); + if (this.datpos != 0) { + if (this.srleoffs > 5) { + this.writeDat(this.datpos - this.srleoffs); + this.writeSRLE(); + } else { + this.writeDat(this.datpos); + } + } + + } + + byte[] getByteArray() { + return !this.changed ? null : this.bas.toByteArray(); + } + } +} diff --git a/src/main/java/com/eloraam/redpower/control/GuiCPU.java b/src/main/java/com/eloraam/redpower/control/GuiCPU.java new file mode 100644 index 0000000..18d6938 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/control/GuiCPU.java @@ -0,0 +1,151 @@ +package com.eloraam.redpower.control; + +import com.eloraam.redpower.RedPowerCore; +import com.eloraam.redpower.core.PacketGuiEvent; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; + +public class GuiCPU extends GuiContainer { + private static final ResourceLocation res = new ResourceLocation("rpcontrol", "textures/gui/cpugui.png"); + private TileCPU tileCPU; + + public GuiCPU(InventoryPlayer pli, TileCPU cpu) { + super(new ContainerCPU(pli, cpu)); + this.tileCPU = cpu; + super.ySize = 145; + super.xSize = 227; + } + + public GuiCPU(Container cn) { + super(cn); + super.ySize = 145; + super.xSize = 227; + } + + protected void drawGuiContainerForegroundLayer(int p1, int p2) { + } + + protected void drawGuiContainerBackgroundLayer(float f, int p1, int p2) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + super.mc.renderEngine.bindTexture(res); + int j = (super.width - super.xSize) / 2; + int k = (super.height - super.ySize) / 2; + this.drawTexturedModalRect(j, k, 0, 0, super.xSize, super.ySize); + int bits = this.tileCPU.diskAddr; + + for(int n = 0; n < 8; ++n) { + if ((bits & 1 << n) != 0) { + this.drawTexturedModalRect(j + 14 + n * 12, k + 57, 227 + (n >> 2) * 12, 0, 12, 32); + } + } + + bits = this.tileCPU.displayAddr; + + for(int n = 0; n < 8; ++n) { + if ((bits & 1 << n) != 0) { + this.drawTexturedModalRect(j + 118 + n * 12, k + 57, 227 + (n >> 2) * 12, 0, 12, 32); + } + } + + bits = this.tileCPU.rbaddr; + + for(int n = 0; n < 8; ++n) { + if ((bits & 1 << n) != 0) { + this.drawTexturedModalRect(j + 118 + n * 12, k + 101, 227 + (n >> 2) * 12, 0, 12, 32); + } + } + + if (this.tileCPU.isRunning()) { + this.drawTexturedModalRect(j + 102, k + 99, 227, 32, 8, 8); + } else { + this.drawTexturedModalRect(j + 102, k + 112, 227, 32, 8, 8); + } + + super.fontRendererObj.drawString(I18n.format("gui.cpu.diskid", new Object[]{this.tileCPU.diskAddr & 0xFF}), j + 14, k + 47, -1); + super.fontRendererObj.drawString(I18n.format("gui.cpu.consoleid", new Object[]{this.tileCPU.displayAddr & 0xFF}), j + 118, k + 47, -1); + super.fontRendererObj.drawString(I18n.format("gui.cpu.selfid", new Object[]{this.tileCPU.rbaddr & 0xFF}), j + 118, k + 91, -1); + super.fontRendererObj.drawString(I18n.format("gui.cpu.start", new Object[0]), j + 50, k + 99, -1); + super.fontRendererObj.drawString(I18n.format("gui.cpu.halt", new Object[0]), j + 50, k + 112, -1); + super.fontRendererObj.drawString(I18n.format("gui.cpu.reset", new Object[0]), j + 50, k + 125, -1); + } + + private void sendSimple(int n, byte m) { + if (super.mc.theWorld.isRemote) { + RedPowerCore.sendPacketToServer(new PacketGuiEvent.GuiMessageEvent(n, super.inventorySlots.windowId, m)); + } + + } + + private boolean sendEvent(int n) { + if (super.mc.theWorld.isRemote) { + RedPowerCore.sendPacketToServer(new PacketGuiEvent.GuiMessageEvent(n, super.inventorySlots.windowId, (byte)0)); + return false; + } else { + return true; + } + } + + protected void mouseClicked(int mouseX, int mouseY, int button) { + int x = mouseX - (super.width - super.xSize) / 2; + int y = mouseY - (super.height - super.ySize) / 2; + if (y >= 57 && y <= 89) { + for(int n = 0; n < 8; ++n) { + if (x >= 14 + n * 12 && x <= 26 + n * 12) { + this.tileCPU.diskAddr ^= 1 << n; + this.sendSimple(1, (byte)this.tileCPU.diskAddr); + return; + } + } + + for(int n = 0; n < 8; ++n) { + if (x >= 118 + n * 12 && x <= 130 + n * 12) { + this.tileCPU.displayAddr ^= 1 << n; + this.sendSimple(2, (byte)this.tileCPU.displayAddr); + return; + } + } + } + + if (y >= 101 && y <= 133) { + for(int n = 0; n < 8; ++n) { + if (x >= 118 + n * 12 && x <= 130 + n * 12) { + this.tileCPU.rbaddr ^= 1 << n; + this.sendSimple(3, (byte)this.tileCPU.rbaddr); + return; + } + } + } + + if (x >= 87 && x <= 96) { + if (y >= 98 && y <= 107) { + if (this.sendEvent(4)) { + this.tileCPU.warmBootCPU(); + } + + return; + } + + if (y >= 111 && y <= 120) { + if (this.sendEvent(5)) { + this.tileCPU.haltCPU(); + } + + return; + } + + if (y >= 124 && y <= 133) { + if (this.sendEvent(6)) { + this.tileCPU.coldBootCPU(); + } + + return; + } + } + + super.mouseClicked(mouseX, mouseY, button); + } +} diff --git a/src/main/java/com/eloraam/redpower/control/GuiDisplay.java b/src/main/java/com/eloraam/redpower/control/GuiDisplay.java new file mode 100644 index 0000000..6b23e0b --- /dev/null +++ b/src/main/java/com/eloraam/redpower/control/GuiDisplay.java @@ -0,0 +1,124 @@ +package com.eloraam.redpower.control; + +import com.eloraam.redpower.RedPowerCore; +import com.eloraam.redpower.core.PacketGuiEvent; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.inventory.IInventory; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; + +public class GuiDisplay extends GuiContainer { + private static ResourceLocation screenTextures = new ResourceLocation("rpcontrol", "textures/gui/displaygui.png"); + private TileDisplay disp; + + public GuiDisplay(IInventory inv, TileDisplay td) { + super(new ContainerDisplay(inv, td)); + super.xSize = 350; + super.ySize = 230; + this.disp = td; + } + + private void sendKey(int id) { + RedPowerCore.sendPacketToServer(new PacketGuiEvent.GuiMessageEvent(1, super.inventorySlots.windowId, (byte)id)); + } + + protected void keyTyped(char symbol, int key) { + if (key == 1) { + super.mc.thePlayer.closeScreen(); + } else { + if (symbol == '\n') { + symbol = '\r'; + } + + byte id = 0; + if (isShiftKeyDown()) { + id = (byte)(id | 64); + } + + if (isCtrlKeyDown()) { + id = (byte)(id | 32); + } + + switch(key) { + case 199: + this.sendKey(132 | id); + break; + case 200: + this.sendKey(128 | id); + break; + case 201: + case 202: + case 204: + case 206: + case 209: + default: + if (symbol > 0 && symbol <= 127) { + this.sendKey(symbol); + } + break; + case 203: + this.sendKey(130 | id); + break; + case 205: + this.sendKey(131 | id); + break; + case 207: + this.sendKey(133 | id); + break; + case 208: + this.sendKey(129 | id); + break; + case 210: + this.sendKey(134 | id); + } + } + + } + + public void drawGuiContainerBackgroundLayer(float f, int i, int j) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + super.mc.renderEngine.bindTexture(screenTextures); + int l = (super.width - super.xSize) / 2; + int m = (super.height - super.ySize) / 2; + this.drawDoubledRect(l, m, super.xSize, super.ySize, 0, 0, super.xSize, super.ySize); + GL11.glColor4f(0.0F, 1.0F, 0.0F, 1.0F); + + for(int y = 0; y < 50; ++y) { + for(int x = 0; x < 80; ++x) { + int b = this.disp.screen[y * 80 + x] & 255; + if (x == this.disp.cursX && y == this.disp.cursY) { + if (this.disp.cursMode == 1) { + b ^= 128; + } + + if (this.disp.cursMode == 2) { + long tm = super.mc.theWorld.getWorldTime(); + if ((tm >> 2 & 1L) > 0L) { + b ^= 128; + } + } + } + + if (b != 32) { + this.drawDoubledRect(l + 15 + x * 4, m + 15 + y * 4, 4, 4, 350 + (b & 15) * 8, (b >> 4) * 8, 8, 8); + } + } + } + + } + + public void drawDoubledRect(int xPos, int yPos, int width, int heigth, int uStart, int vStart, int uEnd, int vEnd) { + float xm = 0.001953125F; + float ym = 0.00390625F; + Tessellator tess = Tessellator.instance; + tess.startDrawingQuads(); + tess.addVertexWithUV((double)xPos, (double)(yPos + heigth), (double)super.zLevel, (double)((float)uStart * xm), (double)((float)(vStart + vEnd) * ym)); + tess.addVertexWithUV( + (double)(xPos + width), (double)(yPos + heigth), (double)super.zLevel, (double)((float)(uStart + uEnd) * xm), (double)((float)(vStart + vEnd) * ym) + ); + tess.addVertexWithUV((double)(xPos + width), (double)yPos, (double)super.zLevel, (double)((float)(uStart + uEnd) * xm), (double)((float)vStart * ym)); + tess.addVertexWithUV((double)xPos, (double)yPos, (double)super.zLevel, (double)((float)uStart * xm), (double)((float)vStart * ym)); + tess.draw(); + } +} diff --git a/src/main/java/com/eloraam/redpower/control/ItemBackplane.java b/src/main/java/com/eloraam/redpower/control/ItemBackplane.java new file mode 100644 index 0000000..9d7874f --- /dev/null +++ b/src/main/java/com/eloraam/redpower/control/ItemBackplane.java @@ -0,0 +1,108 @@ +package com.eloraam.redpower.control; + +import com.eloraam.redpower.RedPowerControl; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.ItemExtended; +import com.eloraam.redpower.core.RedPowerLib; +import com.eloraam.redpower.core.WorldCoord; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +public class ItemBackplane extends ItemExtended { + public ItemBackplane(Block block) { + super(block); + } + + public boolean onItemUse(ItemStack ist, EntityPlayer player, World world, int x, int y, int z, int side, float xp, float yp, float zp) { + return !player.isSneaking() && this.itemUseShared(ist, player, world, x, y, z, side); + } + + public boolean onItemUseFirst(ItemStack ist, EntityPlayer player, World world, int y, int x, int z, int side, float xp, float yp, float zp) { + return !world.isRemote && player.isSneaking() && this.itemUseShared(ist, player, world, x, y, z, side); + } + + protected boolean itemUseShared(ItemStack ist, EntityPlayer player, World world, int x, int y, int z, int side) { + Block bid = world.getBlock(x, y, z); + int md = world.getBlockMetadata(x, y, z); + int dmg = ist.getItemDamage(); + if (bid == Block.getBlockFromItem(ist.getItem()) && md == 0 && dmg != 0) { + TileBackplane bp = CoreLib.getTileEntity(world, x, y, z, TileBackplane.class); + if (bp == null) { + return false; + } else { + int rx = bp.Rotation; + if (!world.setBlock(x, y, z, bid, dmg, 3)) { + return false; + } else { + bp = CoreLib.getTileEntity(world, x, y, z, TileBackplane.class); + if (bp != null) { + bp.Rotation = rx; + } + + world.markBlockForUpdate(x, y, z); + CoreLib.placeNoise(world, x, y, z, Block.getBlockFromItem(ist.getItem())); + if (!player.capabilities.isCreativeMode) { + --ist.stackSize; + } + + RedPowerLib.updateIndirectNeighbors(world, x, y, z, Block.getBlockFromItem(ist.getItem())); + return true; + } + } + } else if (dmg != 0) { + return false; + } else { + WorldCoord wc = new WorldCoord(x, y, z); + wc.step(side); + if (!world.canPlaceEntityOnSide(Block.getBlockFromItem(ist.getItem()), wc.x, wc.y, wc.z, false, 1, player, ist)) { + return false; + } else if (!RedPowerLib.isSideNormal(world, wc.x, wc.y, wc.z, 0)) { + return false; + } else { + int rx = -1; + + label84: + for(int i = 0; i < 4; ++i) { + WorldCoord wc2 = wc.copy(); + int dir = CoreLib.rotToSide(i) ^ 1; + wc2.step(dir); + TileCPU cpu = CoreLib.getTileEntity(world, wc2, TileCPU.class); + if (cpu != null && cpu.Rotation == i) { + rx = i; + break; + } + + TileBackplane backplane = CoreLib.getTileEntity(world, wc2, TileBackplane.class); + if (backplane != null && backplane.Rotation == i) { + for(int pb = 0; pb < 6; ++pb) { + wc2.step(dir); + if (world.getBlock(wc2.x, wc2.y, wc2.z) == RedPowerControl.blockPeripheral && world.getBlockMetadata(wc2.x, wc2.y, wc2.z) == 1) { + rx = i; + break label84; + } + } + } + } + + if (rx < 0) { + return false; + } else if (!world.setBlock(wc.x, wc.y, wc.z, Block.getBlockFromItem(ist.getItem()), dmg, 3)) { + return true; + } else { + TileBackplane bp = CoreLib.getTileEntity(world, wc, TileBackplane.class); + bp.Rotation = rx; + CoreLib.placeNoise(world, wc.x, wc.y, wc.z, Block.getBlockFromItem(ist.getItem())); + if (!player.capabilities.isCreativeMode) { + --ist.stackSize; + } + + world.markBlockForUpdate(wc.x, wc.y, wc.z); + RedPowerLib.updateIndirectNeighbors(world, wc.x, wc.y, wc.z, Block.getBlockFromItem(ist.getItem())); + return true; + } + } + } + } +} diff --git a/src/main/java/com/eloraam/redpower/control/ItemDisk.java b/src/main/java/com/eloraam/redpower/control/ItemDisk.java new file mode 100644 index 0000000..be7a620 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/control/ItemDisk.java @@ -0,0 +1,92 @@ +package com.eloraam.redpower.control; + +import com.eloraam.redpower.core.CoreLib; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import java.util.List; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; + +public class ItemDisk extends Item { + private IIcon emptyIcon; + private IIcon forthIcon; + private IIcon forthExtIcon; + + public ItemDisk() { + this.setMaxDamage(0); + this.setHasSubtypes(true); + this.setMaxStackSize(1); + } + + public void registerIcons(IIconRegister reg) { + this.emptyIcon = reg.registerIcon("rpcontrol:disk"); + this.forthIcon = reg.registerIcon("rpcontrol:diskForth"); + this.forthExtIcon = reg.registerIcon("rpcontrol:diskForthExtended"); + } + + public String getUnlocalizedName(ItemStack stack) { + switch(stack.getItemDamage()) { + case 0: + return "item.disk"; + case 1: + return "item.disk.forth"; + case 2: + return "item.disk.forthxp"; + default: + return null; + } + } + + @SideOnly(Side.CLIENT) + public String getItemStackDisplayName(ItemStack ist) { + return ist.stackTagCompound == null + ? super.getItemStackDisplayName(ist) + : (!ist.stackTagCompound.hasKey("label") ? super.getItemStackDisplayName(ist) : ist.stackTagCompound.getString("label")); + } + + @SideOnly(Side.CLIENT) + public EnumRarity getRarity(ItemStack ist) { + return ist.getItemDamage() >= 1 ? EnumRarity.uncommon : EnumRarity.common; + } + + public boolean onItemUseFirst(ItemStack ist, EntityPlayer player, World world, int x, int y, int z, int side, float xOffset, float yOffset, float zOffset) { + if (!world.isRemote) { + TileDiskDrive tdd = CoreLib.getTileEntity(world, x, y, z, TileDiskDrive.class); + if (tdd != null && tdd.setDisk(ist.copy())) { + ist.stackSize = 0; + tdd.updateBlock(); + return true; + } + } + + return false; + } + + public boolean getShareTag() { + return true; + } + + public IIcon getIconFromDamage(int dmg) { + switch(dmg) { + case 1: + return this.forthIcon; + case 2: + return this.forthExtIcon; + default: + return this.emptyIcon; + } + } + + public void getSubItems(Item item, CreativeTabs tab, List items) { + for(int i = 0; i <= 2; ++i) { + items.add(new ItemStack(this, 1, i)); + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/control/MicroPlacementRibbon.java b/src/main/java/com/eloraam/redpower/control/MicroPlacementRibbon.java new file mode 100644 index 0000000..99d84ef --- /dev/null +++ b/src/main/java/com/eloraam/redpower/control/MicroPlacementRibbon.java @@ -0,0 +1,26 @@ +package com.eloraam.redpower.control; + +import com.eloraam.redpower.core.CoverLib; +import com.eloraam.redpower.core.CreativeExtraTabs; +import com.eloraam.redpower.wiring.MicroPlacementWire; +import java.util.List; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.ItemStack; + +public class MicroPlacementRibbon extends MicroPlacementWire { + @Override + public String getMicroName(int hb, int lb) { + return hb != 12 && lb != 0 ? null : "tile.ribbon"; + } + + @Override + public void addCreativeItems(int hb, CreativeTabs tab, List items) { + if (tab == CreativeExtraTabs.tabWires || tab == CreativeTabs.tabAllSearch) { + switch(hb) { + case 12: + items.add(new ItemStack(CoverLib.blockCoverPlate, 1, 3072)); + } + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/control/RenderBackplane.java b/src/main/java/com/eloraam/redpower/control/RenderBackplane.java new file mode 100644 index 0000000..59fceba --- /dev/null +++ b/src/main/java/com/eloraam/redpower/control/RenderBackplane.java @@ -0,0 +1,109 @@ +package com.eloraam.redpower.control; + +import com.eloraam.redpower.RedPowerControl; +import com.eloraam.redpower.RedPowerCore; +import com.eloraam.redpower.core.RenderContext; +import com.eloraam.redpower.core.RenderCustomBlock; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public class RenderBackplane extends RenderCustomBlock { + private RenderContext context = new RenderContext(); + + public RenderBackplane(Block block) { + super(block); + } + + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTicks) { + TileBackplane backplane = (TileBackplane)tile; + World world = backplane.getWorldObj(); + int metadata = backplane.getBlockMetadata(); + GL11.glDisable(2896); + Tessellator tess = Tessellator.instance; + this.context.setDefaults(); + this.context.bindBlockTexture(); + this.context.setBrightness(this.getMixedBrightness(backplane)); + this.context.setOrientation(0, backplane.Rotation); + this.context.setPos(x, y, z); + this.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F); + tess.startDrawingQuads(); + if (metadata == 0) { + this.context + .setIcon( + RedPowerCore.missing, + RedPowerControl.backplaneTop, + RedPowerControl.backplaneFace, + RedPowerControl.backplaneFace, + RedPowerControl.backplaneSide, + RedPowerControl.backplaneSide + ); + this.context.renderBox(62, 0.0, 0.0, 0.0, 1.0, 0.125, 1.0); + } else if (metadata == 1) { + this.context + .setIcon( + RedPowerCore.missing, + RedPowerControl.ram8kTop, + RedPowerControl.ram8kFace, + RedPowerControl.ram8kFace, + RedPowerControl.ram8kSide, + RedPowerControl.ram8kSide + ); + this.context.renderBox(62, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0); + } + + tess.draw(); + GL11.glEnable(2896); + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + int meta = item.getItemDamage(); + Tessellator tess = Tessellator.instance; + super.block.setBlockBoundsForItemRender(); + this.context.setDefaults(); + this.context.useNormal = true; + this.context.setOrientation(0, 3); + if (type == ItemRenderType.INVENTORY) { + this.context.setPos(-0.5, -0.5, -0.5); + } else { + this.context.setPos(0.0, 0.0, 0.0); + } + + this.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F); + tess.startDrawingQuads(); + if (meta == 0) { + this.context + .setIcon( + RedPowerCore.missing, + RedPowerControl.backplaneTop, + RedPowerControl.backplaneFace, + RedPowerControl.backplaneFace, + RedPowerControl.backplaneSide, + RedPowerControl.backplaneSide + ); + this.context.renderBox(62, 0.0, 0.0, 0.0, 1.0, 0.125, 1.0); + } else if (meta == 1) { + this.context + .setIcon( + RedPowerCore.missing, + RedPowerControl.ram8kTop, + RedPowerControl.ram8kFace, + RedPowerControl.ram8kFace, + RedPowerControl.ram8kSide, + RedPowerControl.ram8kSide + ); + this.context.renderBox(62, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0); + } + + tess.draw(); + this.context.useNormal = false; + } +} diff --git a/src/main/java/com/eloraam/redpower/control/RenderCPU.java b/src/main/java/com/eloraam/redpower/control/RenderCPU.java new file mode 100644 index 0000000..324c347 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/control/RenderCPU.java @@ -0,0 +1,81 @@ +package com.eloraam.redpower.control; + +import com.eloraam.redpower.RedPowerControl; +import com.eloraam.redpower.core.RenderContext; +import com.eloraam.redpower.core.RenderCustomBlock; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public class RenderCPU extends RenderCustomBlock { + private RenderContext context = new RenderContext(); + + public RenderCPU(Block block) { + super(block); + } + + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTicks) { + TileCPU cpu = (TileCPU)tile; + World world = cpu.getWorldObj(); + GL11.glDisable(2896); + Tessellator tess = Tessellator.instance; + this.context.bindBlockTexture(); + this.context.setDefaults(); + this.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F); + this.context.setPos(x, y, z); + this.context.readGlobalLights(world, cpu.xCoord, cpu.yCoord, cpu.zCoord); + this.context + .setIcon( + RedPowerControl.peripheralBottom, + RedPowerControl.peripheralTop, + RedPowerControl.peripheralSide, + RedPowerControl.peripheralSide, + RedPowerControl.cpuFront, + RedPowerControl.peripheralBack + ); + this.context.setSize(0.0, 0.0, 0.0, 1.0, 1.0, 1.0); + this.context.setupBox(); + this.context.transform(); + this.context.rotateTextures(cpu.Rotation); + tess.startDrawingQuads(); + this.context.renderGlobFaces(63); + tess.draw(); + GL11.glEnable(2896); + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + Tessellator tess = Tessellator.instance; + super.block.setBlockBoundsForItemRender(); + this.context.setDefaults(); + this.context.useNormal = true; + if (type == ItemRenderType.INVENTORY) { + this.context.setPos(-0.5, -0.5, -0.5); + } else { + this.context.setPos(0.0, 0.0, 0.0); + } + + this.context.setOrientation(0, 3); + this.context + .setIcon( + RedPowerControl.peripheralBottom, + RedPowerControl.peripheralTop, + RedPowerControl.peripheralSide, + RedPowerControl.peripheralSide, + RedPowerControl.cpuFront, + RedPowerControl.peripheralBack + ); + this.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F); + tess.startDrawingQuads(); + this.context.renderBox(63, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0); + tess.draw(); + this.context.useNormal = false; + } +} diff --git a/src/main/java/com/eloraam/redpower/control/RenderDiskDrive.java b/src/main/java/com/eloraam/redpower/control/RenderDiskDrive.java new file mode 100644 index 0000000..7d73812 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/control/RenderDiskDrive.java @@ -0,0 +1,93 @@ +package com.eloraam.redpower.control; + +import com.eloraam.redpower.RedPowerControl; +import com.eloraam.redpower.core.RenderContext; +import com.eloraam.redpower.core.RenderCustomBlock; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public class RenderDiskDrive extends RenderCustomBlock { + private RenderContext context = new RenderContext(); + + public RenderDiskDrive(Block block) { + super(block); + } + + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTicks) { + TileDiskDrive diskDrive = (TileDiskDrive)tile; + World world = diskDrive.getWorldObj(); + GL11.glDisable(2896); + Tessellator tess = Tessellator.instance; + this.context.bindBlockTexture(); + this.context.setDefaults(); + this.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F); + this.context.setPos(x, y, z); + this.context.readGlobalLights(world, diskDrive.xCoord, diskDrive.yCoord, diskDrive.zCoord); + IIcon front = RedPowerControl.diskDriveFront; + if (diskDrive.hasDisk) { + front = RedPowerControl.diskDriveFrontFull; + } + + if (diskDrive.Active) { + front = RedPowerControl.diskDriveFrontOn; + } + + this.context + .setIcon( + RedPowerControl.peripheralBottom, + RedPowerControl.diskDriveTop, + RedPowerControl.diskDriveSide, + RedPowerControl.diskDriveSide, + front, + RedPowerControl.peripheralBack + ); + this.context.setTexFlags(512); + this.context.setSize(0.0, 0.0, 0.0, 1.0, 1.0, 1.0); + this.context.setupBox(); + this.context.transform(); + this.context.rotateTextures(diskDrive.Rotation); + tess.startDrawingQuads(); + this.context.renderGlobFaces(63); + tess.draw(); + GL11.glEnable(2896); + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + Tessellator tess = Tessellator.instance; + super.block.setBlockBoundsForItemRender(); + this.context.setDefaults(); + this.context.useNormal = true; + if (type == ItemRenderType.INVENTORY) { + this.context.setPos(-0.5, -0.5, -0.5); + } else { + this.context.setPos(0.0, 0.0, 0.0); + } + + this.context.setOrientation(0, 3); + this.context.setTexFlags(512); + this.context + .setIcon( + RedPowerControl.peripheralBottom, + RedPowerControl.diskDriveTop, + RedPowerControl.diskDriveSide, + RedPowerControl.diskDriveSide, + RedPowerControl.diskDriveFront, + RedPowerControl.peripheralBack + ); + this.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F); + tess.startDrawingQuads(); + this.context.renderBox(63, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0); + tess.draw(); + this.context.useNormal = false; + } +} diff --git a/src/main/java/com/eloraam/redpower/control/RenderDisplay.java b/src/main/java/com/eloraam/redpower/control/RenderDisplay.java new file mode 100644 index 0000000..22b11ad --- /dev/null +++ b/src/main/java/com/eloraam/redpower/control/RenderDisplay.java @@ -0,0 +1,81 @@ +package com.eloraam.redpower.control; + +import com.eloraam.redpower.RedPowerControl; +import com.eloraam.redpower.core.RenderContext; +import com.eloraam.redpower.core.RenderCustomBlock; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public class RenderDisplay extends RenderCustomBlock { + private RenderContext context = new RenderContext(); + + public RenderDisplay(Block block) { + super(block); + } + + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTicks) { + TileDisplay display = (TileDisplay)tile; + World world = display.getWorldObj(); + GL11.glDisable(2896); + Tessellator tess = Tessellator.instance; + this.context.bindBlockTexture(); + this.context.setDefaults(); + this.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F); + this.context.setPos(x, y, z); + this.context.readGlobalLights(world, display.xCoord, display.yCoord, display.zCoord); + this.context + .setIcon( + RedPowerControl.peripheralBottom, + RedPowerControl.peripheralTop, + RedPowerControl.peripheralSide, + RedPowerControl.peripheralSide, + RedPowerControl.displayFront, + RedPowerControl.peripheralBack + ); + this.context.setSize(0.0, 0.0, 0.0, 1.0, 1.0, 1.0); + this.context.setupBox(); + this.context.transform(); + this.context.rotateTextures(display.Rotation); + tess.startDrawingQuads(); + this.context.renderGlobFaces(63); + tess.draw(); + GL11.glEnable(2896); + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + Tessellator tess = Tessellator.instance; + super.block.setBlockBoundsForItemRender(); + this.context.setDefaults(); + this.context.useNormal = true; + if (type == ItemRenderType.INVENTORY) { + this.context.setPos(-0.5, -0.5, -0.5); + } else { + this.context.setPos(0.0, 0.0, 0.0); + } + + this.context.setOrientation(0, 3); + this.context + .setIcon( + RedPowerControl.peripheralBottom, + RedPowerControl.peripheralTop, + RedPowerControl.peripheralSide, + RedPowerControl.peripheralSide, + RedPowerControl.displayFront, + RedPowerControl.peripheralBack + ); + this.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F); + tess.startDrawingQuads(); + this.context.renderBox(63, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0); + tess.draw(); + this.context.useNormal = false; + } +} diff --git a/src/main/java/com/eloraam/redpower/control/RenderIOExpander.java b/src/main/java/com/eloraam/redpower/control/RenderIOExpander.java new file mode 100644 index 0000000..c31fed0 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/control/RenderIOExpander.java @@ -0,0 +1,74 @@ +package com.eloraam.redpower.control; + +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.RenderContext; +import com.eloraam.redpower.core.RenderCustomBlock; +import com.eloraam.redpower.core.RenderModel; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.World; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public class RenderIOExpander extends RenderCustomBlock { + private RenderContext context = new RenderContext(); + private RenderModel modelModem = RenderModel.loadModel("rpcontrol:models/modem.obj"); + private ResourceLocation modelRes = new ResourceLocation("rpcontrol", "models/modem.png"); + + public RenderIOExpander(Block block) { + super(block); + } + + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTicks) { + TileIOExpander iox = (TileIOExpander)tile; + World world = iox.getWorldObj(); + GL11.glDisable(2896); + Tessellator tess = Tessellator.instance; + this.context.setDefaults(); + this.context.setPos(x, y, z); + this.context.setOrientation(0, iox.Rotation); + this.context.readGlobalLights(world, iox.xCoord, iox.yCoord, iox.zCoord); + this.context.setBrightness(this.getMixedBrightness(iox)); + this.context.bindTexture(this.modelRes); + tess.startDrawingQuads(); + this.context.bindModelOffset(this.modelModem, 0.5, 0.5, 0.5); + this.context.renderModelGroup(1, 1 + (CoreLib.rotToSide(iox.Rotation) & 1)); + this.context.renderModelGroup(2, 1 + (iox.WBuf & 15)); + this.context.renderModelGroup(3, 1 + (iox.WBuf >> 4 & 15)); + this.context.renderModelGroup(4, 1 + (iox.WBuf >> 8 & 15)); + this.context.renderModelGroup(5, 1 + (iox.WBuf >> 12 & 15)); + tess.draw(); + GL11.glEnable(2896); + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + super.block.setBlockBoundsForItemRender(); + this.context.setDefaults(); + if (type == ItemRenderType.INVENTORY) { + this.context.setPos(-0.5, -0.5, -0.5); + } else { + this.context.setPos(0.0, 0.0, 0.0); + } + + this.context.bindTexture(this.modelRes); + Tessellator tess = Tessellator.instance; + tess.startDrawingQuads(); + this.context.useNormal = true; + this.context.setOrientation(0, 3); + this.context.bindModelOffset(this.modelModem, 0.5, 0.5, 0.5); + this.context.renderModelGroup(1, 1); + this.context.renderModelGroup(2, 1); + this.context.renderModelGroup(3, 1); + this.context.renderModelGroup(4, 1); + this.context.renderModelGroup(5, 1); + this.context.useNormal = false; + tess.draw(); + } +} diff --git a/src/main/java/com/eloraam/redpower/control/RenderRibbon.java b/src/main/java/com/eloraam/redpower/control/RenderRibbon.java new file mode 100644 index 0000000..2f9bdcd --- /dev/null +++ b/src/main/java/com/eloraam/redpower/control/RenderRibbon.java @@ -0,0 +1,70 @@ +package com.eloraam.redpower.control; + +import com.eloraam.redpower.RedPowerControl; +import com.eloraam.redpower.core.TileCovered; +import com.eloraam.redpower.wiring.RenderWiring; +import com.eloraam.redpower.wiring.TileWiring; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public class RenderRibbon extends RenderWiring { + public RenderRibbon(Block block) { + super(block); + } + + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTicks) { + TileCovered covered = (TileCovered)tile; + World world = covered.getWorldObj(); + GL11.glDisable(2896); + Tessellator tess = Tessellator.instance; + tess.startDrawingQuads(); + super.context.bindBlockTexture(); + super.context.setBrightness(this.getMixedBrightness(covered)); + super.context.setPos(x, y, z); + if (covered.CoverSides > 0) { + super.context.setTint(1.0F, 1.0F, 1.0F); + super.context.readGlobalLights(world, covered.xCoord, covered.xCoord, covered.zCoord); + this.renderCovers(covered.CoverSides, covered.Covers); + } + + TileWiring tw = (TileWiring)covered; + int indcon = tw.getExtConnectionMask(); + int cons = tw.getConnectionMask() | indcon; + int indconex = tw.EConEMask; + super.context.setTint(1.0F, 1.0F, 1.0F); + this.setSideIcon(RedPowerControl.ribbonTop, RedPowerControl.ribbonFace, RedPowerControl.ribbonTop); + this.setWireSize(0.5F, 0.0625F); + this.renderWireBlock(tw.ConSides, cons, indcon, indconex); + tess.draw(); + GL11.glEnable(2896); + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + Tessellator tess = Tessellator.instance; + super.block.setBlockBoundsForItemRender(); + super.context.setDefaults(); + super.context.setTexFlags(55); + if (type == ItemRenderType.INVENTORY) { + super.context.setPos(-0.5, -0.2F, -0.5); + } else { + super.context.setPos(0.0, 0.29999999701976776, 0.0); + } + + this.setSideIcon(RedPowerControl.ribbonTop, RedPowerControl.ribbonFace, RedPowerControl.ribbonTop); + this.setWireSize(0.5F, 0.0625F); + super.context.useNormal = true; + tess.startDrawingQuads(); + this.renderSideWires(127, 0, 0); + tess.draw(); + super.context.useNormal = false; + } +} diff --git a/src/main/java/com/eloraam/redpower/control/TileBackplane.java b/src/main/java/com/eloraam/redpower/control/TileBackplane.java new file mode 100644 index 0000000..02c8311 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/control/TileBackplane.java @@ -0,0 +1,132 @@ +package com.eloraam.redpower.control; + +import com.eloraam.redpower.RedPowerControl; +import com.eloraam.redpower.core.BlockMultipart; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.IFrameSupport; +import com.eloraam.redpower.core.TileMultipart; +import com.eloraam.redpower.core.WorldCoord; +import java.util.List; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.IBlockAccess; +import net.minecraftforge.common.util.ForgeDirection; + +public class TileBackplane extends TileMultipart implements IFrameSupport { + public int Rotation = 0; + + public int readBackplane(int addr) { + return 255; + } + + public void writeBackplane(int addr, int val) { + } + + public Block getBlockType() { + return RedPowerControl.blockBackplane; + } + + @Override + public int getExtendedID() { + return 0; + } + + @Override + public void onBlockNeighborChange(Block block) { + if (!super.worldObj + .getBlock(super.xCoord, super.yCoord - 1, super.zCoord) + .isSideSolid(super.worldObj, super.xCoord, super.yCoord - 1, super.zCoord, ForgeDirection.UP)) { + this.breakBlock(); + } else { + WorldCoord wc = new WorldCoord(this); + wc.step(CoreLib.rotToSide(this.Rotation) ^ 1); + Block bid = super.worldObj.getBlock(wc.x, wc.y, wc.z); + int md = super.worldObj.getBlockMetadata(wc.x, wc.y, wc.z); + if (bid != RedPowerControl.blockBackplane && (bid != RedPowerControl.blockPeripheral || md != 1)) { + this.breakBlock(); + } + } + + } + + @Override + public void addHarvestContents(List ist) { + ist.add(new ItemStack(RedPowerControl.blockBackplane, 1, 0)); + } + + @Override + public void onHarvestPart(EntityPlayer player, int part, boolean willHarvest) { + this.breakBlock(willHarvest); + } + + @Override + public float getPartStrength(EntityPlayer player, int part) { + return 0.1F; + } + + @Override + public boolean blockEmpty() { + return false; + } + + @Override + public void setPartBounds(BlockMultipart block, int part) { + block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.125F, 1.0F); + } + + @Override + public int getSolidPartsMask() { + return 1; + } + + @Override + public int getPartsMask() { + return 1; + } + + @Override + public void writeFramePacket(NBTTagCompound tag) { + tag.setByte("rot", (byte)this.Rotation); + } + + @Override + public void readFramePacket(NBTTagCompound tag) { + this.Rotation = tag.getByte("rot"); + } + + @Override + public void onFrameRefresh(IBlockAccess iba) { + } + + @Override + public void onFramePickup(IBlockAccess iba) { + } + + @Override + public void onFrameDrop() { + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + this.Rotation = data.getByte("rot"); + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + data.setByte("rot", (byte)this.Rotation); + } + + @Override + protected void readFromPacket(NBTTagCompound tag) { + this.Rotation = tag.getByte("rot"); + } + + @Override + protected void writeToPacket(NBTTagCompound tag) { + tag.setByte("rot", (byte)this.Rotation); + } +} diff --git a/src/main/java/com/eloraam/redpower/control/TileCPU.java b/src/main/java/com/eloraam/redpower/control/TileCPU.java new file mode 100644 index 0000000..6f39d71 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/control/TileCPU.java @@ -0,0 +1,2028 @@ +package com.eloraam.redpower.control; + +import com.eloraam.redpower.RedPowerControl; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.IFrameSupport; +import com.eloraam.redpower.core.IRedbusConnectable; +import com.eloraam.redpower.core.RedbusLib; +import com.eloraam.redpower.core.TileExtended; +import com.eloraam.redpower.core.WorldCoord; +import java.io.IOException; +import java.io.InputStream; +import net.minecraft.block.Block; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.IBlockAccess; + +public class TileCPU extends TileExtended implements IRedbusConnectable, IFrameSupport { + public int Rotation = 0; + public byte[] memory = new byte[8192]; + private int addrPOR; + private int addrBRK; + private int regSP; + private int regPC; + private int regA; + private int regB; + private int regX; + private int regY; + private int regR; + private int regI; + private int regD; + private boolean flagC; + private boolean flagZ; + private boolean flagID; + private boolean flagD; + private boolean flagBRK; + private boolean flagO; + private boolean flagN; + private boolean flagE; + private boolean flagM; + private boolean flagX; + private int mmuRBB = 0; + private int mmuRBA = 0; + private int mmuRBW = 0; + private boolean mmuEnRB = false; + private boolean mmuEnRBW = false; + private boolean rbTimeout = false; + private boolean waiTimeout = false; + private IRedbusConnectable rbCache = null; + private TileBackplane[] backplane = new TileBackplane[7]; + private int rtcTicks = 0; + int sliceCycles = -1; + int diskAddr = 2; + int displayAddr = 1; + int rbaddr = 0; + + public TileCPU() { + this.coldBootCPU(); + } + + public void coldBootCPU() { + this.addrPOR = 8192; + this.addrBRK = 8192; + this.regSP = 512; + this.regPC = 1024; + this.regR = 768; + this.regA = 0; + this.regX = 0; + this.regY = 0; + this.regD = 0; + this.flagC = false; + this.flagZ = false; + this.flagID = false; + this.flagD = false; + this.flagBRK = false; + this.flagO = false; + this.flagN = false; + this.flagE = true; + this.flagM = true; + this.flagX = true; + this.memory[0] = (byte)this.diskAddr; + this.memory[1] = (byte)this.displayAddr; + + try { + InputStream is = RedPowerControl.class.getResourceAsStream("/assets/rpcontrol/forth/rpcboot.bin"); + Throwable var2 = null; + + try { + is.read(this.memory, 1024, 256); + } catch (Throwable var12) { + var2 = var12; + throw var12; + } finally { + if (is != null) { + if (var2 != null) { + try { + is.close(); + } catch (Throwable var11) { + var2.addSuppressed(var11); + } + } else { + is.close(); + } + } + + } + } catch (IOException var14) { + var14.printStackTrace(); + } + + this.sliceCycles = -1; + } + + public void warmBootCPU() { + if (this.sliceCycles >= 0) { + this.regSP = 512; + this.regR = 768; + this.regPC = this.addrPOR; + } + + this.sliceCycles = 0; + } + + public void haltCPU() { + this.sliceCycles = -1; + } + + public boolean isRunning() { + return this.sliceCycles >= 0; + } + + @Override + public int rbGetAddr() { + return this.rbaddr; + } + + @Override + public void rbSetAddr(int addr) { + } + + @Override + public int rbRead(int reg) { + return !this.mmuEnRBW ? 0 : this.readOnlyMem(this.mmuRBW + reg); + } + + @Override + public void rbWrite(int reg, int dat) { + if (this.mmuEnRBW) { + this.writeOnlyMem(this.mmuRBW + reg, dat); + } + + } + + @Override + public int getConnectableMask() { + return 16777215; + } + + @Override + public int getConnectClass(int side) { + return 66; + } + + @Override + public int getCornerPowerMode() { + return 0; + } + + @Override + public void onBlockPlaced(ItemStack ist, int side, EntityLivingBase ent) { + this.Rotation = (int)Math.floor((double)(ent.rotationYaw * 4.0F / 360.0F) + 0.5) + 1 & 3; + if (ent instanceof EntityPlayer) { + super.Owner = ((EntityPlayer)ent).getGameProfile(); + } + + } + + @Override + public boolean onBlockActivated(EntityPlayer player) { + if (player.isSneaking()) { + return false; + } else { + if (!super.worldObj.isRemote) { + player.openGui(RedPowerControl.instance, 2, super.worldObj, super.xCoord, super.yCoord, super.zCoord); + } + + return true; + } + } + + public Block getBlockType() { + return RedPowerControl.blockPeripheral; + } + + @Override + public int getExtendedID() { + return 1; + } + + public boolean isUseableByPlayer(EntityPlayer player) { + return !this.isInvalid() + && super.worldObj.getTileEntity(super.xCoord, super.yCoord, super.zCoord) == this + && player.getDistanceSq((double)super.xCoord + 0.5, (double)super.yCoord + 0.5, (double)super.zCoord + 0.5) <= 64.0; + } + + protected void refreshBackplane() { + boolean bpok = true; + WorldCoord wc = new WorldCoord(this); + + for(int i = 0; i < 7; ++i) { + if (!bpok) { + this.backplane[i] = null; + } else { + wc.step(CoreLib.rotToSide(this.Rotation)); + TileBackplane tbp = CoreLib.getTileEntity(super.worldObj, wc, TileBackplane.class); + this.backplane[i] = tbp; + if (tbp == null) { + bpok = false; + } + } + } + + } + + @Override + public void updateEntity() { + ++this.rtcTicks; + if (this.sliceCycles >= 0) { + this.rbTimeout = false; + this.rbCache = null; + this.waiTimeout = false; + this.sliceCycles += 1000; + if (this.sliceCycles > 100000) { + this.sliceCycles = 100000; + } + + this.refreshBackplane(); + + while(this.sliceCycles > 0 && !this.waiTimeout && !this.rbTimeout) { + --this.sliceCycles; + this.executeInsn(); + } + } + + } + + protected int readOnlyMem(int addr) { + addr &= 65535; + if (addr < 8192) { + return this.memory[addr] & 0xFF; + } else { + int atop = (addr >> 13) - 1; + return this.backplane[atop] == null ? 255 : this.backplane[atop].readBackplane(addr & 8191); + } + } + + public int readMem(int addr) { + if (this.mmuEnRB && addr >= this.mmuRBB && addr < this.mmuRBB + 256) { + if (this.rbCache == null) { + this.rbCache = RedbusLib.getAddr(super.worldObj, new WorldCoord(this), this.mmuRBA); + } + + if (this.rbCache == null) { + this.rbTimeout = true; + return 0; + } else { + return this.rbCache.rbRead(addr - this.mmuRBB); + } + } else { + return this.readOnlyMem(addr); + } + } + + protected void writeOnlyMem(int addr, int val) { + addr &= 65535; + if (addr < 8192) { + this.memory[addr] = (byte)val; + } else { + int atop = (addr >> 13) - 1; + if (this.backplane[atop] != null) { + this.backplane[atop].writeBackplane(addr & 8191, val); + } + } + + } + + public void writeMem(int addr, int val) { + if (this.mmuEnRB && addr >= this.mmuRBB && addr < this.mmuRBB + 256) { + if (this.rbCache == null) { + this.rbCache = RedbusLib.getAddr(super.worldObj, new WorldCoord(this), this.mmuRBA); + } + + if (this.rbCache == null) { + this.rbTimeout = true; + } else { + this.rbCache.rbWrite(addr - this.mmuRBB, val & 0xFF); + } + } else { + this.writeOnlyMem(addr, val); + } + + } + + private void incPC() { + ++this.regPC; + } + + private int maskM() { + return this.flagM ? 255 : 65535; + } + + private int maskX() { + return this.flagX ? 255 : 65535; + } + + private int negM() { + return this.flagM ? 128 : 32768; + } + + private int negX() { + return this.flagX ? 128 : 32768; + } + + private int readB() { + int i = this.readMem(this.regPC); + this.incPC(); + return i; + } + + private int readM() { + int i = this.readMem(this.regPC); + this.incPC(); + if (!this.flagM) { + i |= this.readMem(this.regPC) << 8; + this.incPC(); + } + + return i; + } + + private int readX() { + int i = this.readMem(this.regPC); + this.incPC(); + if (!this.flagX) { + i |= this.readMem(this.regPC) << 8; + this.incPC(); + } + + return i; + } + + private int readM(int addr) { + int i = this.readMem(addr); + if (!this.flagM) { + i |= this.readMem(addr + 1) << 8; + } + + return i; + } + + private int readX(int addr) { + int i = this.readMem(addr); + if (!this.flagX) { + i |= this.readMem(addr + 1) << 8; + } + + return i; + } + + private void writeM(int addr, int reg) { + this.writeMem(addr, reg); + if (!this.flagM) { + this.writeMem(addr + 1, reg >> 8); + } + + } + + private void writeX(int addr, int reg) { + this.writeMem(addr, reg); + if (!this.flagX) { + this.writeMem(addr + 1, reg >> 8); + } + + } + + private int readBX() { + int i = this.readMem(this.regPC) + this.regX; + if (this.flagX) { + i &= 255; + } + + this.incPC(); + return i; + } + + private int readBY() { + int i = this.readMem(this.regPC) + this.regY; + if (this.flagX) { + i &= 255; + } + + this.incPC(); + return i; + } + + private int readBS() { + int i = this.readMem(this.regPC) + this.regSP; + this.incPC(); + return i; + } + + private int readBR() { + int i = this.readMem(this.regPC) + this.regR; + this.incPC(); + return i; + } + + private int readBSWY() { + int i = this.readMem(this.regPC) + this.regSP; + this.incPC(); + return this.readW(i) + this.regY; + } + + private int readBRWY() { + int i = this.readMem(this.regPC) + this.regR; + this.incPC(); + return this.readW(i) + this.regY; + } + + private int readW() { + int i = this.readMem(this.regPC); + this.incPC(); + i |= this.readMem(this.regPC) << 8; + this.incPC(); + return i; + } + + private int readW(int addr) { + int i = this.readMem(addr); + return i | this.readMem(addr + 1) << 8; + } + + private int readWX() { + int i = this.readMem(this.regPC); + this.incPC(); + i |= this.readMem(this.regPC) << 8; + this.incPC(); + return i + this.regX; + } + + private int readWY() { + int i = this.readMem(this.regPC); + this.incPC(); + i |= this.readMem(this.regPC) << 8; + this.incPC(); + return i + this.regY; + } + + private int readWXW() { + int i = this.readMem(this.regPC); + this.incPC(); + i |= this.readMem(this.regPC) << 8; + this.incPC(); + i += this.regX; + int j = this.readMem(i); + return j | this.readMem(i + 1) << 8; + } + + private int readBW() { + int i = this.readMem(this.regPC); + this.incPC(); + int j = this.readMem(i); + return j | this.readMem(i + 1) << 8; + } + + private int readWW() { + int i = this.readMem(this.regPC); + this.incPC(); + i |= this.readMem(this.regPC) << 8; + this.incPC(); + int j = this.readMem(i); + return j | this.readMem(i + 1) << 8; + } + + private int readBXW() { + int i = this.readMem(this.regPC) + this.regX & 0xFF; + this.incPC(); + int j = this.readMem(i); + return j | this.readMem(i + 1) << 8; + } + + private int readBWY() { + int i = this.readMem(this.regPC); + this.incPC(); + int j = this.readMem(i); + j |= this.readMem(i + 1) << 8; + return j + this.regY; + } + + private void upNZ() { + this.flagN = (this.regA & this.negM()) > 0; + this.flagZ = this.regA == 0; + } + + private void upNZ(int i) { + this.flagN = (i & this.negM()) > 0; + this.flagZ = i == 0; + } + + private void upNZX(int i) { + this.flagN = (i & this.negX()) > 0; + this.flagZ = i == 0; + } + + private void push1(int b) { + if (this.flagE) { + this.regSP = this.regSP - 1 & 0xFF | this.regSP & 0xFF00; + } else { + --this.regSP; + } + + this.writeMem(this.regSP, b); + } + + private void push1r(int b) { + --this.regR; + this.writeMem(this.regR, b); + } + + private void push2(int w) { + this.push1(w >> 8); + this.push1(w & 0xFF); + } + + private void push2r(int w) { + this.push1r(w >> 8); + this.push1r(w & 0xFF); + } + + private void pushM(int b) { + if (this.flagM) { + this.push1(b); + } else { + this.push2(b); + } + + } + + private void pushX(int b) { + if (this.flagX) { + this.push1(b); + } else { + this.push2(b); + } + + } + + private void pushMr(int b) { + if (this.flagM) { + this.push1r(b); + } else { + this.push2r(b); + } + + } + + private void pushXr(int b) { + if (this.flagX) { + this.push1r(b); + } else { + this.push2r(b); + } + + } + + private int pop1() { + int tr = this.readMem(this.regSP); + if (this.flagE) { + this.regSP = this.regSP + 1 & 0xFF | this.regSP & 0xFF00; + } else { + ++this.regSP; + } + + return tr; + } + + private int pop1r() { + int tr = this.readMem(this.regR); + ++this.regR; + return tr; + } + + private int pop2() { + int tr = this.pop1(); + return tr | this.pop1() << 8; + } + + private int pop2r() { + int tr = this.pop1r(); + return tr | this.pop1r() << 8; + } + + private int popM() { + return this.flagM ? this.pop1() : this.pop2(); + } + + private int popMr() { + return this.flagM ? this.pop1r() : this.pop2r(); + } + + private int popX() { + return this.flagX ? this.pop1() : this.pop2(); + } + + private int popXr() { + return this.flagX ? this.pop1r() : this.pop2r(); + } + + private int getFlags() { + return (this.flagC ? 1 : 0) + | (this.flagZ ? 2 : 0) + | (this.flagID ? 4 : 0) + | (this.flagD ? 8 : 0) + | (this.flagX ? 16 : 0) + | (this.flagM ? 32 : 0) + | (this.flagO ? 64 : 0) + | (this.flagN ? 128 : 0); + } + + private void setFlags(int flags) { + this.flagC = (flags & 1) > 0; + this.flagZ = (flags & 2) > 0; + this.flagID = (flags & 4) > 0; + this.flagD = (flags & 8) > 0; + boolean m2 = (flags & 32) > 0; + this.flagO = (flags & 64) > 0; + this.flagN = (flags & 128) > 0; + if (this.flagE) { + this.flagX = false; + this.flagM = false; + } else { + this.flagX = (flags & 16) > 0; + if (this.flagX) { + this.regX &= 255; + this.regY &= 255; + } + + if (m2 != this.flagM) { + if (m2) { + this.regB = this.regA >> 8; + this.regA &= 255; + } else { + this.regA |= this.regB << 8; + } + + this.flagM = m2; + } + } + + } + + private void i_adc(int val) { + if (this.flagM) { + if (this.flagD) { + int v = (this.regA & 15) + (val & 15) + (this.flagC ? 1 : 0); + if (v > 9) { + v = (v + 6 & 15) + 16; + } + + int v2 = (this.regA & 240) + (val & 240) + v; + if (v2 > 160) { + v2 += 96; + } + + this.flagC = v2 > 100; + this.regA = v2 & 0xFF; + this.flagO = false; + } else { + int v = this.regA + val + (this.flagC ? 1 : 0); + this.flagC = v > 255; + this.flagO = ((v ^ this.regA) & (v ^ val) & 128) > 0; + this.regA = v & 0xFF; + } + } else { + int v = this.regA + val + (this.flagC ? 1 : 0); + this.flagC = v > 65535; + this.flagO = ((v ^ this.regA) & (v ^ val) & 32768) > 0; + this.regA = v; + } + + this.upNZ(); + } + + private void i_sbc(int val) { + if (this.flagM) { + if (this.flagD) { + int v = (this.regA & 15) - (val & 15) + (this.flagC ? 1 : 0) - 1; + if (v < 0) { + v = (v - 6 & 15) - 16; + } + + int v2 = (this.regA & 240) - (val & 240) + v; + if (v2 < 0) { + v2 -= 96; + } + + this.flagC = v2 < 100; + this.regA = v2 & 0xFF; + this.flagO = false; + } else { + int v = this.regA - val + (this.flagC ? 1 : 0) - 1; + this.flagC = (v & 256) == 0; + this.flagO = ((v ^ this.regA) & (v ^ -val) & 128) > 0; + this.regA = v & 0xFF; + } + } else { + int v = this.regA - val + (this.flagC ? 1 : 0) - 1; + this.flagC = (v & 65536) == 0; + this.flagO = ((v ^ this.regA) & (v ^ -val) & 32768) > 0; + this.regA = v; + } + + this.upNZ(); + } + + private void i_mul(int val) { + if (this.flagM) { + int v; + if (this.flagC) { + v = (byte)val * (byte)this.regA; + } else { + v = val * this.regA; + } + + this.regA = v & 0xFF; + this.regD = v >> 8 & 0xFF; + this.flagN = v < 0; + this.flagZ = v == 0; + this.flagO = this.regD != 0 && this.regD != 255; + } else { + long v1; + if (this.flagC) { + v1 = (long)((short)val * (short)this.regA); + } else { + v1 = (long)(val * this.regA); + } + + this.regA = (int)(v1 & 65535L); + this.regD = (int)(v1 >> 16 & 65535L); + this.flagN = v1 < 0L; + this.flagZ = v1 == 0L; + this.flagO = this.regD != 0 && this.regD != 65535; + } + + } + + private void i_div(int val) { + if (val == 0) { + this.regA = 0; + this.regD = 0; + this.flagO = true; + this.flagZ = false; + this.flagN = false; + } else if (this.flagM) { + int q; + if (this.flagC) { + q = (byte)this.regD << 8 | this.regA; + val = (byte)val; + } else { + q = this.regD << 8 | this.regA; + } + + this.regD = q % val & 0xFF; + q /= val; + this.regA = q & 0xFF; + if (!this.flagC) { + this.flagO = q > 255; + } else { + this.flagO = q > 127 || q < -128; + } + + this.flagZ = this.regA == 0; + this.flagN = q < 0; + } else if (this.flagC) { + int q = (short)this.regD << 16 | this.regA; + short val1 = (short)val; + this.regD = q % val1; + q /= val1; + this.regA = q; + this.flagO = q > 32767 || q < -32768; + this.flagZ = this.regA == 0; + this.flagN = q < 0; + } else { + long q1 = (long)(this.regD << 16 | this.regA); + this.regD = (int)(q1 % (long)val & 65535L); + q1 /= (long)val; + this.regA = (int)(q1 & 65535L); + this.flagO = q1 > 65535L; + this.flagZ = this.regA == 0; + this.flagN = q1 < 0L; + } + + } + + private void i_and(int val) { + this.regA &= val; + this.upNZ(); + } + + private void i_asl(int addr) { + int i = this.readM(addr); + this.flagC = (i & this.negM()) > 0; + i = i << 1 & this.maskM(); + this.upNZ(i); + this.writeM(addr, i); + } + + private void i_lsr(int addr) { + int i = this.readM(addr); + this.flagC = (i & 1) > 0; + i >>>= 1; + this.upNZ(i); + this.writeM(addr, i); + } + + private void i_rol(int addr) { + int i = this.readM(addr); + int n = (i << 1 | (this.flagC ? 1 : 0)) & this.maskM(); + this.flagC = (i & this.negM()) > 0; + this.upNZ(n); + this.writeM(addr, n); + } + + private void i_ror(int addr) { + int i = this.readM(addr); + int n = i >>> 1 | (this.flagC ? this.negM() : 0); + this.flagC = (i & 1) > 0; + this.upNZ(n); + this.writeM(addr, n); + } + + private void i_brc(boolean cond) { + int n = this.readB(); + if (cond) { + this.regPC += (byte)n; + } + + } + + private void i_bit(int val) { + if (this.flagM) { + this.flagO = (val & 64) > 0; + this.flagN = (val & 128) > 0; + } else { + this.flagO = (val & 16384) > 0; + this.flagN = (val & 32768) > 0; + } + + this.flagZ = (val & this.regA) > 0; + } + + private void i_trb(int val) { + this.flagZ = (val & this.regA) > 0; + this.regA &= ~val; + } + + private void i_tsb(int val) { + this.flagZ = (val & this.regA) > 0; + this.regA |= val; + } + + private void i_cmp(int reg, int val) { + reg -= val; + this.flagC = reg >= 0; + this.flagZ = reg == 0; + this.flagN = (reg & this.negM()) > 0; + } + + private void i_cmpx(int reg, int val) { + reg -= val; + this.flagC = reg >= 0; + this.flagZ = reg == 0; + this.flagN = (reg & this.negX()) > 0; + } + + private void i_dec(int addr) { + int i = this.readM(addr); + i = i - 1 & this.maskM(); + this.writeM(addr, i); + this.upNZ(i); + } + + private void i_inc(int addr) { + int i = this.readM(addr); + i = i + 1 & this.maskM(); + this.writeM(addr, i); + this.upNZ(i); + } + + private void i_eor(int val) { + this.regA ^= val; + this.upNZ(); + } + + private void i_or(int val) { + this.regA |= val; + this.upNZ(); + } + + private void i_mmu(int mmu) { + switch(mmu) { + case 0: + int t = this.regA & 0xFF; + if (this.mmuRBA != t) { + if (this.rbCache != null) { + this.rbTimeout = true; + } + + this.mmuRBA = t; + } + break; + case 1: + this.mmuRBB = this.regA; + break; + case 2: + this.mmuEnRB = true; + break; + case 3: + this.mmuRBW = this.regA; + break; + case 4: + this.mmuEnRBW = true; + break; + case 5: + this.addrBRK = this.regA; + break; + case 6: + this.addrPOR = this.regA; + break; + case 128: + this.regA = this.mmuRBA; + break; + case 129: + this.regA = this.mmuRBB; + if (this.flagM) { + this.regB = this.regA >> 8; + this.regA &= 255; + } + break; + case 130: + this.mmuEnRB = false; + break; + case 131: + this.regA = this.mmuRBW; + if (this.flagM) { + this.regB = this.regA >> 8; + this.regA &= 255; + } + break; + case 132: + this.mmuEnRBW = false; + break; + case 133: + this.regA = this.addrBRK; + if (this.flagM) { + this.regB = this.regA >> 8; + this.regA &= 255; + } + break; + case 134: + this.regA = this.addrPOR; + if (this.flagM) { + this.regB = this.regA >> 8; + this.regA &= 255; + } + break; + case 135: + this.regA = this.rtcTicks; + this.regD = this.rtcTicks >> 16; + } + + } + + public void executeInsn() { + int insn = this.readMem(this.regPC); + this.incPC(); + switch(insn) { + case 0: + this.push2(this.regPC); + this.push1(this.getFlags()); + this.flagBRK = true; + this.regPC = this.addrBRK; + break; + case 1: + this.i_or(this.readM(this.readBXW())); + break; + case 2: + this.regPC = this.readW(this.regI); + this.regI += 2; + break; + case 3: + this.i_or(this.readM(this.readBS())); + break; + case 4: + this.i_tsb(this.readM(this.readB())); + break; + case 5: + this.i_or(this.readM(this.readB())); + break; + case 6: + this.i_asl(this.readB()); + break; + case 7: + this.i_or(this.readM(this.readBR())); + break; + case 8: + this.push1(this.getFlags()); + break; + case 9: + this.i_or(this.readM()); + break; + case 10: + this.flagC = (this.regA & this.negM()) > 0; + this.regA = this.regA << 1 & this.maskM(); + this.upNZ(); + break; + case 11: + this.push2r(this.regI); + break; + case 12: + this.i_tsb(this.readM(this.readW())); + break; + case 13: + this.i_or(this.readM(this.readW())); + break; + case 14: + this.i_asl(this.readW()); + break; + case 15: + this.i_mul(this.readM(this.readB())); + break; + case 16: + this.i_brc(!this.flagN); + break; + case 17: + this.i_or(this.readM(this.readBWY())); + break; + case 18: + this.i_or(this.readM(this.readBW())); + break; + case 19: + this.i_or(this.readM(this.readBSWY())); + break; + case 20: + this.i_trb(this.readM(this.readB())); + break; + case 21: + this.i_or(this.readM(this.readBX())); + break; + case 22: + this.i_asl(this.readBX()); + break; + case 23: + this.i_or(this.readM(this.readBRWY())); + break; + case 24: + this.flagC = false; + break; + case 25: + this.i_or(this.readM(this.readWY())); + break; + case 26: + this.regA = this.regA + 1 & this.maskM(); + this.upNZ(this.regA); + break; + case 27: + this.pushXr(this.regX); + break; + case 28: + this.i_trb(this.readM(this.readW())); + break; + case 29: + this.i_or(this.readM(this.readWX())); + break; + case 30: + this.i_asl(this.readWX()); + break; + case 31: + this.i_mul(this.readM(this.readBX())); + break; + case 32: + this.push2(this.regPC + 1); + this.regPC = this.readW(); + break; + case 33: + this.i_and(this.readM(this.readBXW())); + break; + case 34: + this.push2r(this.regI); + this.regI = this.regPC + 2; + this.regPC = this.readW(this.regPC); + break; + case 35: + this.i_and(this.readM(this.readBS())); + break; + case 36: + this.i_bit(this.readM(this.readB())); + break; + case 37: + this.i_and(this.readM(this.readB())); + break; + case 38: + this.i_rol(this.readB()); + break; + case 39: + this.i_and(this.readM(this.readBR())); + break; + case 40: + this.setFlags(this.pop1()); + break; + case 41: + this.i_and(this.readM()); + break; + case 42: { + int n = (this.regA << 1 | (this.flagC ? 1 : 0)) & this.maskM(); + this.flagC = (this.regA & this.negM()) > 0; + this.regA = n; + this.upNZ(); + break; + } + case 43: + this.regI = this.pop2r(); + this.upNZX(this.regI); + break; + case 44: + this.i_bit(this.readM(this.readW())); + break; + case 45: + this.i_and(this.readM(this.readW())); + break; + case 46: + this.i_rol(this.readW()); + break; + case 47: + this.i_mul(this.readM(this.readW())); + break; + case 48: + this.i_brc(this.flagN); + break; + case 49: + this.i_and(this.readM(this.readBWY())); + break; + case 50: + this.i_and(this.readM(this.readBW())); + break; + case 51: + this.i_and(this.readM(this.readBSWY())); + break; + case 52: + this.i_bit(this.readM(this.readBX())); + break; + case 53: + this.i_and(this.readM(this.readBX())); + break; + case 54: + this.i_rol(this.readBX()); + break; + case 55: + this.i_and(this.readM(this.readBRWY())); + break; + case 56: + this.flagC = true; + break; + case 57: + this.i_and(this.readM(this.readWY())); + break; + case 58: + this.regA = this.regA - 1 & this.maskM(); + this.upNZ(this.regA); + break; + case 59: + this.regX = this.popXr(); + this.upNZX(this.regX); + break; + case 60: + this.i_bit(this.readM(this.readWX())); + break; + case 61: + this.i_and(this.readM(this.readWX())); + break; + case 62: + this.i_rol(this.readWX()); + break; + case 63: + this.i_mul(this.readM(this.readWX())); + break; + case 64: + this.setFlags(this.pop1()); + this.regPC = this.pop2(); + break; + case 65: + this.i_eor(this.readM(this.readBXW())); + break; + case 66: + if (this.flagM) { + this.regA = this.readMem(this.regI); + ++this.regI; + } else { + this.regA = this.readW(this.regI); + this.regI += 2; + } + break; + case 67: + this.i_eor(this.readM(this.readBS())); + break; + case 68: + this.push2r(this.readW()); + break; + case 69: + this.i_eor(this.readM(this.readB())); + break; + case 70: + this.i_lsr(this.readB()); + break; + case 71: + this.i_eor(this.readM(this.readBR())); + break; + case 72: + this.pushM(this.regA); + break; + case 73: + this.i_eor(this.readM()); + break; + case 74: + this.flagC = (this.regA & 1) > 0; + this.regA >>>= 1; + this.upNZ(); + break; + case 75: + this.pushMr(this.regA); + break; + case 76: + this.regPC = this.readW(); + break; + case 77: + this.i_eor(this.readM(this.readW())); + break; + case 78: + this.i_lsr(this.readW()); + break; + case 79: + this.i_div(this.readM(this.readB())); + break; + case 80: + this.i_brc(!this.flagO); + break; + case 81: + this.i_eor(this.readM(this.readBWY())); + break; + case 82: + this.i_eor(this.readM(this.readBW())); + break; + case 83: + this.i_eor(this.readM(this.readBSWY())); + break; + case 84: + this.push2r(this.readBW()); + break; + case 85: + this.i_eor(this.readM(this.readBX())); + break; + case 86: + this.i_lsr(this.readBX()); + break; + case 87: + this.i_eor(this.readM(this.readBRWY())); + break; + case 88: + this.flagID = false; + break; + case 89: + this.i_eor(this.readM(this.readWY())); + break; + case 90: + this.pushX(this.regY); + break; + case 91: + this.pushXr(this.regY); + break; + case 92: + this.regI = this.regX; + this.upNZX(this.regX); + break; + case 93: + this.i_eor(this.readM(this.readWX())); + break; + case 94: + this.i_lsr(this.readWX()); + break; + case 95: + this.i_div(this.readM(this.readBX())); + break; + case 96: + this.regPC = this.pop2() + 1; + break; + case 97: + this.i_adc(this.readM(this.readBXW())); + break; + case 98: { + int n = this.readB(); + this.push2(this.regPC + n); + break; + } + case 99: + this.i_adc(this.readM(this.readBS())); + break; + case 100: + this.writeM(this.readB(), 0); + break; + case 101: + this.i_adc(this.readM(this.readB())); + break; + case 102: + this.i_ror(this.readB()); + break; + case 103: + this.i_adc(this.readM(this.readBR())); + break; + case 104: + this.regA = this.popM(); + this.upNZ(); + break; + case 105: + this.i_adc(this.readM()); + break; + case 106: { + int n = this.regA >>> 1 | (this.flagC ? this.negM() : 0); + this.flagC = (this.regA & 1) > 0; + this.regA = n; + this.upNZ(); + break; + } + case 107: + this.regA = this.popMr(); + this.upNZ(this.regA); + break; + case 108: + this.regPC = this.readWW(); + break; + case 109: + this.i_adc(this.readM(this.readW())); + break; + case 110: + this.i_ror(this.readW()); + break; + case 111: + this.i_div(this.readM(this.readW())); + break; + case 112: + this.i_brc(this.flagO); + break; + case 113: + this.i_adc(this.readM(this.readBWY())); + break; + case 114: + this.i_adc(this.readM(this.readBW())); + break; + case 115: + this.i_adc(this.readM(this.readBSWY())); + break; + case 116: + this.writeM(this.readBX(), 0); + break; + case 117: + this.i_adc(this.readM(this.readBX())); + break; + case 118: + this.i_ror(this.readBX()); + break; + case 119: + this.i_adc(this.readM(this.readBRWY())); + break; + case 120: + this.flagID = true; + break; + case 121: + this.i_adc(this.readM(this.readWY())); + break; + case 122: + this.regY = this.popX(); + this.upNZX(this.regY); + break; + case 123: + this.regY = this.popXr(); + this.upNZX(this.regY); + break; + case 124: + this.regPC = this.readWXW(); + break; + case 125: + this.i_adc(this.readM(this.readWX())); + break; + case 126: + this.i_ror(this.readWX()); + break; + case 127: + this.i_div(this.readM(this.readWX())); + break; + case 128: + this.i_brc(true); + break; + case 129: + this.writeM(this.readBXW(), this.regA); + break; + case 130: { + int n = this.readB(); + this.push2r(this.regPC + n); + break; + } + case 131: + this.writeM(this.readBS(), this.regA); + break; + case 132: + this.writeX(this.readB(), this.regY); + break; + case 133: + this.writeM(this.readB(), this.regA); + break; + case 134: + this.writeX(this.readB(), this.regX); + break; + case 135: + this.writeM(this.readBR(), this.regA); + break; + case 136: + this.regY = this.regY - 1 & this.maskX(); + this.upNZ(this.regY); + break; + case 137: + this.flagZ = (this.readM() & this.regA) == 0; + break; + case 138: + this.regA = this.regX; + if (this.flagM) { + this.regA &= 255; + } + + this.upNZ(); + break; + case 139: + if (this.flagX) { + this.regSP = this.regR & 0xFF00 | this.regX & 0xFF; + } else { + this.regR = this.regX; + } + + this.upNZX(this.regR); + break; + case 140: + this.writeX(this.readW(), this.regY); + break; + case 141: + this.writeM(this.readW(), this.regA); + break; + case 142: + this.writeX(this.readW(), this.regX); + break; + case 143: + this.regD = 0; + this.regB = 0; + break; + case 144: + this.i_brc(!this.flagC); + break; + case 145: + this.writeM(this.readBWY(), this.regA); + break; + case 146: + this.writeM(this.readBW(), this.regA); + break; + case 147: + this.writeM(this.readBSWY(), this.regA); + break; + case 148: + this.writeX(this.readBX(), this.regY); + break; + case 149: + this.writeM(this.readBX(), this.regA); + break; + case 150: + this.writeX(this.readBY(), this.regX); + break; + case 151: + this.writeM(this.readBRWY(), this.regA); + break; + case 152: + this.regA = this.regY; + if (this.flagM) { + this.regA &= 255; + } + + this.upNZX(this.regY); + break; + case 153: + this.writeM(this.readWY(), this.regA); + break; + case 154: + if (this.flagX) { + this.regSP = this.regSP & 0xFF00 | this.regX & 0xFF; + } else { + this.regSP = this.regX; + } + + this.upNZX(this.regX); + break; + case 155: + this.regY = this.regX; + this.upNZX(this.regY); + break; + case 156: + this.writeM(this.readW(), 0); + break; + case 157: + this.writeM(this.readWX(), this.regA); + break; + case 158: + this.writeM(this.readWX(), 0); + break; + case 159: + this.regD = (this.regA & this.negM()) > 0 ? '\uffff' : 0; + this.regB = this.regD & 0xFF; + break; + case 160: + this.regY = this.readX(); + this.upNZ(this.regY); + break; + case 161: + this.regA = this.readM(this.readBXW()); + this.upNZ(); + break; + case 162: + this.regX = this.readX(); + this.upNZ(this.regX); + break; + case 163: + this.regA = this.readM(this.readBS()); + this.upNZ(); + break; + case 164: + this.regY = this.readX(this.readB()); + this.upNZ(this.regY); + break; + case 165: + this.regA = this.readM(this.readB()); + this.upNZ(); + break; + case 166: + this.regX = this.readX(this.readB()); + this.upNZ(this.regX); + break; + case 167: + this.regA = this.readM(this.readBR()); + this.upNZ(); + break; + case 168: + this.regY = this.regA; + if (this.flagX) { + this.regY &= 255; + } + + this.upNZX(this.regY); + break; + case 169: + this.regA = this.readM(); + this.upNZ(); + break; + case 170: + this.regX = this.regA; + if (this.flagX) { + this.regX &= 255; + } + + this.upNZX(this.regX); + break; + case 171: + this.regX = this.regR; + if (this.flagX) { + this.regX &= 255; + } + + this.upNZX(this.regX); + break; + case 172: + this.regY = this.readX(this.readW()); + this.upNZ(this.regY); + break; + case 173: + this.regA = this.readM(this.readW()); + this.upNZ(); + break; + case 174: + this.regX = this.readX(this.readW()); + this.upNZ(this.regX); + break; + case 175: + this.regA = this.regD; + if (this.flagM) { + this.regA &= 255; + } + + this.upNZ(this.regA); + break; + case 176: + this.i_brc(this.flagC); + break; + case 177: + this.regA = this.readM(this.readBWY()); + this.upNZ(); + break; + case 178: + this.regA = this.readM(this.readBW()); + this.upNZ(); + break; + case 179: + this.regA = this.readM(this.readBSWY()); + this.upNZ(); + break; + case 180: + this.regY = this.readX(this.readBX()); + this.upNZ(this.regY); + break; + case 181: + this.regA = this.readM(this.readBX()); + this.upNZ(); + break; + case 182: + this.regX = this.readX(this.readBY()); + this.upNZ(this.regX); + break; + case 183: + this.regA = this.readM(this.readBRWY()); + this.upNZ(); + break; + case 184: + this.flagO = false; + break; + case 185: + this.regA = this.readM(this.readWY()); + this.upNZ(); + break; + case 186: + this.regX = this.regSP; + if (this.flagX) { + this.regX &= 255; + } + + this.upNZX(this.regX); + break; + case 187: + this.regX = this.regY; + this.upNZX(this.regX); + break; + case 188: + this.regY = this.readX(this.readWX()); + this.upNZ(this.regY); + break; + case 189: + this.regA = this.readM(this.readWX()); + this.upNZ(); + break; + case 190: + this.regX = this.readX(this.readWY()); + this.upNZ(this.regX); + break; + case 191: + if (this.flagM) { + this.regD = this.regA | this.regB << 8; + } else { + this.regD = this.regA; + } + + this.upNZ(this.regA); + break; + case 192: + this.i_cmpx(this.regY, this.readX()); + break; + case 193: + this.i_cmp(this.regA, this.readM(this.readBXW())); + break; + case 194: + this.setFlags(this.getFlags() & ~this.readB()); + break; + case 195: + this.i_cmp(this.regA, this.readM(this.readBS())); + break; + case 196: + this.i_cmpx(this.regY, this.readX(this.readB())); + break; + case 197: + this.i_cmp(this.regA, this.readM(this.readB())); + break; + case 198: + this.i_dec(this.readB()); + break; + case 199: + this.i_cmp(this.regA, this.readM(this.readBR())); + break; + case 200: + this.regY = this.regY + 1 & this.maskX(); + this.upNZ(this.regY); + break; + case 201: + this.i_cmp(this.regA, this.readM()); + break; + case 202: + this.regX = this.regX - 1 & this.maskX(); + this.upNZ(this.regX); + break; + case 203: + this.waiTimeout = true; + break; + case 204: + this.i_cmpx(this.regY, this.readX(this.readW())); + break; + case 205: + this.i_cmp(this.regA, this.readM(this.readW())); + break; + case 206: + this.i_dec(this.readW()); + break; + case 207: + this.regD = this.popM(); + break; + case 208: + this.i_brc(!this.flagZ); + break; + case 209: + this.i_cmp(this.regA, this.readM(this.readBWY())); + break; + case 210: + this.i_cmp(this.regA, this.readM(this.readBW())); + break; + case 211: + this.i_cmp(this.regA, this.readM(this.readBSWY())); + break; + case 212: + this.push2(this.readBW()); + break; + case 213: + this.i_cmp(this.regA, this.readM(this.readBX())); + break; + case 214: + this.i_dec(this.readBX()); + break; + case 215: + this.i_cmp(this.regA, this.readM(this.readBRWY())); + break; + case 216: + this.flagD = false; + break; + case 217: + this.i_cmp(this.regA, this.readM(this.readWY())); + break; + case 218: + this.pushX(this.regX); + break; + case 219: + this.sliceCycles = -1; + if (super.worldObj.isAirBlock(super.xCoord, super.yCoord + 1, super.zCoord)) { + super.worldObj + .playSoundEffect( + (double)super.xCoord + 0.5, + (double)super.yCoord + 0.5, + (double)super.zCoord + 0.5, + "fire.ignite", + 1.0F, + super.worldObj.rand.nextFloat() * 0.4F + 0.8F + ); + super.worldObj.setBlock(super.xCoord, super.yCoord + 1, super.zCoord, Blocks.fire, 0, 3); + } + break; + case 220: + this.regX = this.regI; + if (this.flagX) { + this.regX &= 255; + } + + this.upNZX(this.regX); + break; + case 221: + this.i_cmp(this.regA, this.readM(this.readWX())); + break; + case 222: + this.i_dec(this.readWX()); + break; + case 223: + this.pushM(this.regD); + break; + case 224: + this.i_cmpx(this.regX, this.readX()); + break; + case 225: + this.i_sbc(this.readM(this.readBXW())); + break; + case 226: + this.setFlags(this.getFlags() | this.readB()); + break; + case 227: + this.i_sbc(this.readM(this.readBS())); + break; + case 228: + this.i_cmpx(this.regX, this.readX(this.readB())); + break; + case 229: + this.i_sbc(this.readM(this.readB())); + break; + case 230: + this.i_inc(this.readB()); + break; + case 231: + this.i_sbc(this.readM(this.readBR())); + break; + case 232: + this.regX = this.regX + 1 & this.maskX(); + this.upNZ(this.regX); + break; + case 233: + this.i_sbc(this.readM()); + case 234: + default: + break; + case 235: + if (this.flagM) { + int nx = this.regA; + this.regA = this.regB; + this.regB = nx; + } else { + this.regA = this.regA >> 8 & 0xFF | this.regA << 8 & 0xFF00; + } + break; + case 236: + this.i_cmpx(this.regX, this.readX(this.readW())); + break; + case 237: + this.i_sbc(this.readM(this.readW())); + break; + case 238: + this.i_inc(this.readW()); + break; + case 239: + this.i_mmu(this.readB()); + break; + case 240: + this.i_brc(this.flagZ); + break; + case 241: + this.i_sbc(this.readM(this.readBWY())); + break; + case 242: + this.i_sbc(this.readM(this.readBW())); + break; + case 243: + this.i_sbc(this.readM(this.readBSWY())); + break; + case 244: + this.push2(this.readW()); + break; + case 245: + this.i_sbc(this.readM(this.readBX())); + break; + case 246: + this.i_inc(this.readBX()); + break; + case 247: + this.i_sbc(this.readM(this.readBRWY())); + break; + case 248: + this.flagD = true; + break; + case 249: + this.i_sbc(this.readM(this.readWY())); + break; + case 250: + this.regX = this.popX(); + this.upNZX(this.regX); + break; + case 251: + if (this.flagE != this.flagC) { + if (this.flagE) { + this.flagE = false; + this.flagC = true; + } else { + this.flagE = true; + this.flagC = false; + if (!this.flagM) { + this.regB = this.regA >> 8; + } + + this.flagM = true; + this.flagX = true; + this.regA &= 255; + this.regX &= 255; + this.regY &= 255; + } + } + break; + case 252: + this.push2(this.regPC + 1); + this.regPC = this.readWXW(); + break; + case 253: + this.i_sbc(this.readM(this.readWX())); + break; + case 254: + this.i_inc(this.readWX()); + } + + } + + @Override + public void writeFramePacket(NBTTagCompound tag) { + this.writeToPacket(tag); + } + + @Override + public void readFramePacket(NBTTagCompound tag) { + this.readFromPacket(tag); + } + + @Override + public void onFrameRefresh(IBlockAccess iba) { + } + + @Override + public void onFramePickup(IBlockAccess iba) { + } + + @Override + public void onFrameDrop() { + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + this.memory = data.getByteArray("ram"); + if (this.memory.length != 8192) { + this.memory = new byte[8192]; + } + + this.Rotation = data.getByte("rot"); + this.addrPOR = data.getShort("por"); + this.addrBRK = data.getShort("brk"); + byte efl = data.getByte("efl"); + this.flagE = (efl & 1) > 0; + this.mmuEnRB = (efl & 2) > 0; + this.mmuEnRBW = (efl & 4) > 0; + this.setFlags(data.getByte("fl")); + this.regSP = data.getShort("rsp"); + this.regPC = data.getShort("rpc"); + this.regA = data.getShort("ra"); + if (this.flagM) { + this.regB = this.regA >> 8; + this.regA &= 255; + } + + this.regX = data.getShort("rx"); + this.regY = data.getShort("ry"); + this.regD = data.getShort("rd"); + this.regR = data.getShort("rr"); + this.regI = data.getShort("ri"); + this.mmuRBB = data.getShort("mmrb"); + this.mmuRBW = data.getShort("mmrbw"); + this.mmuRBA = data.getByte("mmra") & 255; + this.sliceCycles = data.getInteger("cyc"); + this.rtcTicks = data.getInteger("rtct"); + this.diskAddr = data.getByte("diskaddr") & 255; + this.displayAddr = data.getByte("displayaddr") & 255; + this.rbaddr = data.getByte("rbaddr") & 255; + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + data.setByte("rot", (byte)this.Rotation); + data.setByteArray("ram", this.memory); + data.setShort("por", (short)this.addrPOR); + data.setShort("brk", (short)this.addrBRK); + int efl = (this.flagE ? 1 : 0) | (this.mmuEnRB ? 2 : 0) | (this.mmuEnRBW ? 4 : 0); + data.setByte("efl", (byte)efl); + data.setByte("fl", (byte)this.getFlags()); + data.setShort("rsp", (short)this.regSP); + data.setShort("rpc", (short)this.regPC); + if (this.flagM) { + this.regA = this.regA & 0xFF | this.regB << 8; + } + + data.setShort("ra", (short)this.regA); + if (this.flagM) { + this.regA &= 255; + } + + data.setShort("rx", (short)this.regX); + data.setShort("ry", (short)this.regY); + data.setShort("rd", (short)this.regD); + data.setShort("rr", (short)this.regR); + data.setShort("ri", (short)this.regI); + data.setShort("mmrb", (short)this.mmuRBB); + data.setShort("mmrbw", (short)this.mmuRBW); + data.setByte("mmra", (byte)this.mmuRBA); + data.setInteger("cyc", this.sliceCycles); + data.setInteger("rtct", this.rtcTicks); + data.setByte("diskaddr", (byte)this.diskAddr); + data.setByte("displayaddr", (byte)this.displayAddr); + data.setByte("rbaddr", (byte)this.rbaddr); + } + + @Override + protected void readFromPacket(NBTTagCompound tag) { + this.Rotation = tag.getInteger("rot"); + } + + @Override + protected void writeToPacket(NBTTagCompound tag) { + tag.setInteger("rot", this.Rotation); + } +} diff --git a/src/main/java/com/eloraam/redpower/control/TileDiskDrive.java b/src/main/java/com/eloraam/redpower/control/TileDiskDrive.java new file mode 100644 index 0000000..7403e98 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/control/TileDiskDrive.java @@ -0,0 +1,609 @@ +package com.eloraam.redpower.control; + +import com.eloraam.redpower.RedPowerControl; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.DiskLib; +import com.eloraam.redpower.core.IFrameSupport; +import com.eloraam.redpower.core.IRedbusConnectable; +import com.eloraam.redpower.core.MachineLib; +import com.eloraam.redpower.core.TileExtended; +import com.eloraam.redpower.core.WorldCoord; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.RandomAccessFile; +import java.io.UnsupportedEncodingException; +import java.util.Arrays; +import net.minecraft.block.Block; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.world.IBlockAccess; + +public class TileDiskDrive extends TileExtended implements IRedbusConnectable, IInventory, IFrameSupport { + public int Rotation = 0; + public boolean hasDisk = false; + public boolean Active = false; + private ItemStack[] contents = new ItemStack[1]; + private int accessTime = 0; + private byte[] databuf = new byte[128]; + private int sector = 0; + private int cmdreg = 0; + private int rbaddr = 2; + + @Override + public int rbGetAddr() { + return this.rbaddr; + } + + @Override + public void rbSetAddr(int addr) { + this.rbaddr = addr; + } + + @Override + public int rbRead(int reg) { + if (reg < 128) { + return this.databuf[reg] & 0xFF; + } else { + switch(reg) { + case 128: + return this.sector & 0xFF; + case 129: + return this.sector >> 8; + case 130: + return this.cmdreg & 0xFF; + default: + return 0; + } + } + } + + @Override + public void rbWrite(int reg, int dat) { + this.markDirty(); + if (reg < 128) { + this.databuf[reg] = (byte)dat; + } else { + switch(reg) { + case 128: + this.sector = this.sector & 0xFF00 | dat; + break; + case 129: + this.sector = this.sector & 0xFF | dat << 8; + break; + case 130: + this.cmdreg = dat; + } + } + + } + + @Override + public int getConnectableMask() { + return 16777215; + } + + @Override + public int getConnectClass(int side) { + return 66; + } + + @Override + public int getCornerPowerMode() { + return 0; + } + + @Override + public void onBlockPlaced(ItemStack ist, int side, EntityLivingBase ent) { + this.Rotation = (int)Math.floor((double)(ent.rotationYaw * 4.0F / 360.0F) + 0.5) + 1 & 3; + if (ent instanceof EntityPlayer) { + super.Owner = ((EntityPlayer)ent).getGameProfile(); + } + + } + + @Override + public boolean onBlockActivated(EntityPlayer player) { + if (!super.worldObj.isRemote) { + if (this.hasDisk && this.contents[0] != null && !this.Active) { + this.ejectDisk(); + return true; + } else { + return false; + } + } else { + return true; + } + } + + public Block getBlockType() { + return RedPowerControl.blockPeripheral; + } + + @Override + public int getExtendedID() { + return 2; + } + + @Override + public void onBlockRemoval() { + for(int i = 0; i < 1; ++i) { + ItemStack ist = this.contents[i]; + if (ist != null && ist.stackSize > 0) { + CoreLib.dropItem(super.worldObj, super.xCoord, super.yCoord, super.zCoord, ist); + } + } + + } + + boolean setDisk(ItemStack ist) { + if (this.contents[0] != null) { + return false; + } else { + this.setInventorySlotContents(0, ist); + return true; + } + } + + private NBTTagCompound getDiskTags() { + NBTTagCompound tags = this.contents[0].stackTagCompound; + if (tags == null) { + this.contents[0].setTagCompound(new NBTTagCompound()); + tags = this.contents[0].stackTagCompound; + } + + return tags; + } + + private File startDisk() { + if (this.contents[0].getItemDamage() > 0) { + return null; + } else { + NBTTagCompound tags = this.getDiskTags(); + File savedir = DiskLib.getSaveDir(super.worldObj); + if (tags.hasKey("serno")) { + return DiskLib.getDiskFile(savedir, tags.getString("serno")); + } else { + String serno = null; + + while(true) { + serno = DiskLib.generateSerialNumber(super.worldObj); + File diskFile = DiskLib.getDiskFile(savedir, serno); + + try { + if (diskFile.createNewFile()) { + tags.setString("serno", serno); + return diskFile; + } + } catch (IOException var6) { + var6.printStackTrace(); + return null; + } + } + } + } + } + + private void runCmd1() { + Arrays.fill(this.databuf, (byte)0); + String nm = ""; + if (this.contents[0].getItemDamage() > 0) { + nm = "System Disk"; + } else { + NBTTagCompound e = this.contents[0].stackTagCompound; + if (e == null) { + return; + } + + nm = e.getString("label"); + } + + try { + byte[] e1 = nm.getBytes("US-ASCII"); + System.arraycopy(e1, 0, this.databuf, 0, Math.min(e1.length, 128)); + } catch (UnsupportedEncodingException var3) { + } + + } + + private void runCmd2() { + if (this.contents[0].getItemDamage() > 0) { + this.cmdreg = -1; + } else { + NBTTagCompound tags = this.getDiskTags(); + int len = 0; + + while(this.databuf[len] != 0 && len < 64) { + ++len; + } + + this.cmdreg = 0; + + try { + String e = new String(this.databuf, 0, len, "US-ASCII"); + tags.setString("label", e); + } catch (UnsupportedEncodingException var4) { + } + } + + } + + private void runCmd3() { + Arrays.fill(this.databuf, (byte)0); + String nm = ""; + if (this.contents[0].getItemDamage() > 0) { + nm = String.format("%016d", this.contents[0].getItemDamage()); + } else { + NBTTagCompound e = this.getDiskTags(); + this.startDisk(); + if (e == null) { + return; + } + + nm = e.getString("serno"); + } + + try { + byte[] e1 = nm.getBytes("US-ASCII"); + System.arraycopy(e1, 0, this.databuf, 0, Math.min(e1.length, 128)); + } catch (UnsupportedEncodingException var3) { + } + + } + + private void runCmd4() { + if (this.sector > 2048) { + this.cmdreg = -1; + } else { + long l = (long)(this.sector * 128); + if (this.contents[0].getItemDamage() > 0) { + InputStream file = null; + switch(this.contents[0].getItemDamage()) { + case 1: + file = RedPowerControl.class.getResourceAsStream("/assets/rpcontrol/forth/redforth.img"); + break; + case 2: + file = RedPowerControl.class.getResourceAsStream("/assets/rpcontrol/forth/redforthxp.img"); + } + + try { + if (file.skip(l) == l) { + if (file.read(this.databuf) == 128) { + this.cmdreg = 0; + return; + } + + this.cmdreg = -1; + return; + } + + this.cmdreg = -1; + } catch (IOException var36) { + var36.printStackTrace(); + this.cmdreg = -1; + return; + } finally { + try { + if (file != null) { + file.close(); + } + } catch (IOException var33) { + } + + } + + return; + } else { + File file1 = this.startDisk(); + if (file1 == null) { + this.cmdreg = -1; + } else { + RandomAccessFile raf = null; + + try { + raf = new RandomAccessFile(file1, "r"); + raf.seek(l); + if (raf.read(this.databuf) == 128) { + this.cmdreg = 0; + return; + } + + this.cmdreg = -1; + } catch (IOException var34) { + var34.printStackTrace(); + this.cmdreg = -1; + } finally { + try { + if (raf != null) { + raf.close(); + } + } catch (IOException var32) { + } + + } + } + } + } + + } + + private void runCmd5() { + if (this.contents[0].getItemDamage() > 0) { + this.cmdreg = -1; + } else if (this.sector > 2048) { + this.cmdreg = -1; + } else { + long l = (long)(this.sector * 128); + File file = this.startDisk(); + if (file == null) { + this.cmdreg = -1; + } else { + RandomAccessFile raf = null; + + try { + raf = new RandomAccessFile(file, "rw"); + raf.seek(l); + raf.write(this.databuf); + raf.close(); + raf = null; + this.cmdreg = 0; + } catch (IOException var14) { + this.cmdreg = -1; + } finally { + try { + if (raf != null) { + raf.close(); + } + } catch (IOException var13) { + } + + } + } + } + + } + + private void runDiskCmd() { + this.markDirty(); + if (this.contents[0] == null) { + this.cmdreg = -1; + } else if (!(this.contents[0].getItem() instanceof ItemDisk)) { + this.cmdreg = -1; + } else { + switch(this.cmdreg) { + case 1: + this.runCmd1(); + this.cmdreg = 0; + break; + case 2: + this.runCmd2(); + break; + case 3: + this.runCmd3(); + this.cmdreg = 0; + break; + case 4: + this.runCmd4(); + break; + case 5: + this.runCmd5(); + break; + default: + this.cmdreg = -1; + } + + this.accessTime = 5; + if (!this.Active) { + this.Active = true; + this.updateBlock(); + } + } + + } + + private void ejectDisk() { + if (this.contents[0] != null) { + MachineLib.ejectItem(super.worldObj, new WorldCoord(this), this.contents[0], CoreLib.rotToSide(this.Rotation) ^ 1); + this.contents[0] = null; + this.hasDisk = false; + this.updateBlock(); + } + + } + + public void markDirty() { + super.markDirty(); + if (this.contents[0] != null && !(this.contents[0].getItem() instanceof ItemDisk)) { + this.ejectDisk(); + } + + } + + @Override + public void updateEntity() { + if (this.cmdreg != 0 && this.cmdreg != -1) { + this.runDiskCmd(); + } + + if (this.accessTime > 0 && --this.accessTime == 0) { + this.Active = false; + this.updateBlock(); + } + + } + + public int getSizeInventory() { + return 1; + } + + public ItemStack getStackInSlot(int i) { + return this.contents[i]; + } + + public ItemStack decrStackSize(int i, int j) { + if (this.contents[i] == null) { + return null; + } else if (this.contents[i].stackSize <= j) { + ItemStack tr = this.contents[i]; + this.contents[i] = null; + this.markDirty(); + return tr; + } else { + ItemStack tr = this.contents[i].splitStack(j); + if (this.contents[i].stackSize == 0) { + this.contents[i] = null; + } + + this.markDirty(); + return tr; + } + } + + public ItemStack getStackInSlotOnClosing(int i) { + if (this.contents[i] == null) { + return null; + } else { + ItemStack ist = this.contents[i]; + this.contents[i] = null; + return ist; + } + } + + public void setInventorySlotContents(int i, ItemStack ist) { + this.contents[i] = ist; + if (ist != null && ist.stackSize > this.getInventoryStackLimit()) { + ist.stackSize = this.getInventoryStackLimit(); + } + + this.markDirty(); + this.hasDisk = this.contents[i] != null; + this.updateBlock(); + } + + public String getInventoryName() { + return "tile.rpdiskdrive.name"; + } + + public int getInventoryStackLimit() { + return 64; + } + + public boolean isUseableByPlayer(EntityPlayer player) { + return !this.isInvalid() + && super.worldObj.getTileEntity(super.xCoord, super.yCoord, super.zCoord) == this + && player.getDistanceSq((double)super.xCoord + 0.5, (double)super.yCoord + 0.5, (double)super.zCoord + 0.5) <= 64.0; + } + + @Override + public void writeFramePacket(NBTTagCompound tag) { + tag.setByte("rot", (byte)this.Rotation); + tag.setByte("fl", (byte)((this.hasDisk ? 1 : 0) | (this.Active ? 2 : 0))); + } + + @Override + public void readFramePacket(NBTTagCompound tag) { + this.Rotation = tag.getByte("rot"); + int fl = tag.getByte("fl"); + this.hasDisk = (fl & 1) > 0; + this.Active = (fl & 2) > 0; + } + + @Override + public void onFrameRefresh(IBlockAccess iba) { + } + + @Override + public void onFramePickup(IBlockAccess iba) { + } + + @Override + public void onFrameDrop() { + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + this.Rotation = data.getByte("rot"); + this.accessTime = data.getByte("actime"); + this.sector = data.getShort("sect"); + this.cmdreg = data.getByte("cmd") & 255; + this.rbaddr = data.getByte("rbaddr") & 255; + byte fl = data.getByte("fl"); + this.hasDisk = (fl & 1) > 0; + this.Active = (fl & 2) > 0; + this.databuf = data.getByteArray("dbuf"); + if (this.databuf.length != 128) { + this.databuf = new byte[128]; + } + + NBTTagList items = data.getTagList("Items", 10); + this.contents = new ItemStack[this.getSizeInventory()]; + + for(int i = 0; i < items.tagCount(); ++i) { + NBTTagCompound item = items.getCompoundTagAt(i); + int j = item.getByte("Slot") & 255; + if (j >= 0 && j < this.contents.length) { + this.contents[j] = ItemStack.loadItemStackFromNBT(item); + } + } + + this.hasDisk = this.contents[0] != null; + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + data.setByte("rot", (byte)this.Rotation); + int fl = (this.hasDisk ? 1 : 0) | (this.Active ? 2 : 0); + data.setByte("fl", (byte)fl); + data.setByte("actime", (byte)this.accessTime); + data.setByteArray("dbuf", this.databuf); + data.setShort("sect", (short)this.sector); + data.setByte("cmd", (byte)this.cmdreg); + data.setByte("rbaddr", (byte)this.rbaddr); + NBTTagList items = new NBTTagList(); + + for(int i = 0; i < this.contents.length; ++i) { + if (this.contents[i] != null) { + NBTTagCompound item = new NBTTagCompound(); + item.setByte("Slot", (byte)i); + this.contents[i].writeToNBT(item); + items.appendTag(item); + } + } + + data.setTag("Items", items); + } + + @Override + protected void readFromPacket(NBTTagCompound tag) { + this.Rotation = tag.getByte("rot"); + int fl = tag.getByte("fl"); + this.hasDisk = (fl & 1) > 0; + this.Active = (fl & 2) > 0; + } + + @Override + protected void writeToPacket(NBTTagCompound tag) { + tag.setByte("rot", (byte)this.Rotation); + tag.setByte("fl", (byte)((this.hasDisk ? 1 : 0) | (this.Active ? 2 : 0))); + } + + public boolean hasCustomInventoryName() { + return false; + } + + public void openInventory() { + } + + public void closeInventory() { + } + + public boolean isItemValidForSlot(int slotID, ItemStack stack) { + return slotID == 0 && stack.getItem() instanceof ItemDisk; + } +} diff --git a/src/main/java/com/eloraam/redpower/control/TileDisplay.java b/src/main/java/com/eloraam/redpower/control/TileDisplay.java new file mode 100644 index 0000000..5dde734 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/control/TileDisplay.java @@ -0,0 +1,346 @@ +package com.eloraam.redpower.control; + +import com.eloraam.redpower.RedPowerControl; +import com.eloraam.redpower.core.IFrameSupport; +import com.eloraam.redpower.core.IRedbusConnectable; +import com.eloraam.redpower.core.TileExtended; +import java.util.Arrays; +import net.minecraft.block.Block; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.IBlockAccess; + +public class TileDisplay extends TileExtended implements IRedbusConnectable, IFrameSupport { + public byte[] screen = new byte[4000]; + public int Rotation = 0; + public int memRow = 0; + public int cursX = 0; + public int cursY = 0; + public int cursMode = 2; + public int kbstart = 0; + public int kbpos = 0; + public int blitXS = 0; + public int blitYS = 0; + public int blitXD = 0; + public int blitYD = 0; + public int blitW = 0; + public int blitH = 0; + public int blitMode = 0; + public byte[] kbbuf = new byte[16]; + private int rbaddr = 1; + + public TileDisplay() { + Arrays.fill(this.screen, (byte)32); + } + + @Override + public int rbGetAddr() { + return this.rbaddr; + } + + @Override + public void rbSetAddr(int addr) { + this.rbaddr = addr; + } + + @Override + public int rbRead(int reg) { + if (reg >= 16 && reg < 96) { + return this.screen[this.memRow * 80 + reg - 16]; + } else { + switch(reg) { + case 0: + return this.memRow; + case 1: + return this.cursX; + case 2: + return this.cursY; + case 3: + return this.cursMode; + case 4: + return this.kbstart; + case 5: + return this.kbpos; + case 6: + return this.kbbuf[this.kbstart] & 0xFF; + case 7: + return this.blitMode; + case 8: + return this.blitXS; + case 9: + return this.blitYS; + case 10: + return this.blitXD; + case 11: + return this.blitYD; + case 12: + return this.blitW; + case 13: + return this.blitH; + default: + return 0; + } + } + } + + @Override + public void rbWrite(int reg, int dat) { + this.markDirty(); + if (reg >= 16 && reg < 96) { + this.screen[this.memRow * 80 + reg - 16] = (byte)dat; + } else { + switch(reg) { + case 0: + this.memRow = dat; + if (this.memRow > 49) { + this.memRow = 49; + } + + return; + case 1: + this.cursX = dat; + return; + case 2: + this.cursY = dat; + return; + case 3: + this.cursMode = dat; + return; + case 4: + this.kbstart = dat & 15; + return; + case 5: + this.kbpos = dat & 15; + return; + case 6: + this.kbbuf[this.kbstart] = (byte)dat; + return; + case 7: + this.blitMode = dat; + return; + case 8: + this.blitXS = dat; + return; + case 9: + this.blitYS = dat; + return; + case 10: + this.blitXD = dat; + return; + case 11: + this.blitYD = dat; + return; + case 12: + this.blitW = dat; + return; + case 13: + this.blitH = dat; + return; + } + } + + } + + @Override + public int getConnectableMask() { + return 16777215; + } + + @Override + public int getConnectClass(int side) { + return 66; + } + + @Override + public int getCornerPowerMode() { + return 0; + } + + @Override + public void onBlockPlaced(ItemStack ist, int side, EntityLivingBase ent) { + this.Rotation = (int)Math.floor((double)(ent.rotationYaw * 4.0F / 360.0F) + 0.5) + 1 & 3; + if (ent instanceof EntityPlayer) { + super.Owner = ((EntityPlayer)ent).getGameProfile(); + } + + } + + @Override + public boolean onBlockActivated(EntityPlayer player) { + if (!super.worldObj.isRemote) { + player.openGui(RedPowerControl.instance, 1, super.worldObj, super.xCoord, super.yCoord, super.zCoord); + } + + return true; + } + + public Block getBlockType() { + return RedPowerControl.blockPeripheral; + } + + @Override + public int getExtendedID() { + return 0; + } + + public boolean isUseableByPlayer(EntityPlayer player) { + return !this.isInvalid() + && super.worldObj.getTileEntity(super.xCoord, super.yCoord, super.zCoord) == this + && player.getDistanceSq((double)super.xCoord + 0.5, (double)super.yCoord + 0.5, (double)super.zCoord + 0.5) <= 64.0; + } + + public void pushKey(byte b) { + int np = this.kbpos + 1 & 15; + if (np != this.kbstart) { + this.kbbuf[this.kbpos] = b; + this.kbpos = np; + } + + } + + @Override + public void updateEntity() { + this.runblitter(); + } + + private void runblitter() { + if (this.blitMode != 0) { + this.markDirty(); + int w = this.blitW; + int h = this.blitH; + w = Math.min(w, 80 - this.blitXD); + h = Math.min(h, 50 - this.blitYD); + if (w >= 0 && h >= 0) { + int doffs = this.blitYD * 80 + this.blitXD; + switch(this.blitMode) { + case 1: + for(int soffs = 0; soffs < h; ++soffs) { + for(int j = 0; j < w; ++j) { + this.screen[doffs + 80 * soffs + j] = (byte)this.blitXS; + } + } + + this.blitMode = 0; + return; + case 2: + for(int soffs = 0; soffs < h; ++soffs) { + for(int j = 0; j < w; ++j) { + this.screen[doffs + 80 * soffs + j] = (byte)(this.screen[doffs + 80 * soffs + j] ^ 128); + } + } + + this.blitMode = 0; + return; + } + + w = Math.min(w, 80 - this.blitXS); + h = Math.min(h, 50 - this.blitYS); + if (w >= 0 && h >= 0) { + int soffs = this.blitYS * 80 + this.blitXS; + switch(this.blitMode) { + case 3: + for(int j = 0; j < h; ++j) { + for(int i = 0; i < w; ++i) { + this.screen[doffs + 80 * j + i] = this.screen[soffs + 80 * j + i]; + } + } + + this.blitMode = 0; + return; + } + } else { + this.blitMode = 0; + } + } else { + this.blitMode = 0; + } + } + + } + + @Override + public void writeFramePacket(NBTTagCompound tag) { + tag.setInteger("rot", this.Rotation); + } + + @Override + public void readFramePacket(NBTTagCompound tag) { + this.Rotation = tag.getInteger("rot"); + } + + @Override + public void onFrameRefresh(IBlockAccess iba) { + } + + @Override + public void onFramePickup(IBlockAccess iba) { + } + + @Override + public void onFrameDrop() { + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + this.Rotation = data.getByte("rot"); + this.screen = data.getByteArray("fb"); + if (this.screen.length != 4000) { + this.screen = new byte[4000]; + } + + this.memRow = data.getByte("row") & 255; + this.cursX = data.getByte("cx") & 255; + this.cursY = data.getByte("cy") & 255; + this.cursMode = data.getByte("cm") & 255; + this.kbstart = data.getByte("kbs"); + this.kbpos = data.getByte("kbp"); + this.kbbuf = data.getByteArray("kbb"); + if (this.kbbuf.length != 16) { + this.kbbuf = new byte[16]; + } + + this.blitXS = data.getByte("blxs") & 255; + this.blitYS = data.getByte("blys") & 255; + this.blitXD = data.getByte("blxd") & 255; + this.blitYD = data.getByte("blyd") & 255; + this.blitW = data.getByte("blw") & 255; + this.blitH = data.getByte("blh") & 255; + this.blitMode = data.getByte("blmd"); + this.rbaddr = data.getByte("rbaddr") & 255; + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + data.setByte("rot", (byte)this.Rotation); + data.setByteArray("fb", this.screen); + data.setByte("row", (byte)this.memRow); + data.setByte("cx", (byte)this.cursX); + data.setByte("cy", (byte)this.cursY); + data.setByte("cm", (byte)this.cursMode); + data.setByte("kbs", (byte)this.kbstart); + data.setByte("kbp", (byte)this.kbpos); + data.setByteArray("kbb", this.kbbuf); + data.setByte("blxs", (byte)this.blitXS); + data.setByte("blys", (byte)this.blitYS); + data.setByte("blxd", (byte)this.blitXD); + data.setByte("blyd", (byte)this.blitYD); + data.setByte("blw", (byte)this.blitW); + data.setByte("blh", (byte)this.blitH); + data.setByte("blmd", (byte)this.blitMode); + data.setByte("rbaddr", (byte)this.rbaddr); + } + + @Override + protected void readFromPacket(NBTTagCompound tag) { + this.Rotation = tag.getInteger("rot"); + } + + @Override + protected void writeToPacket(NBTTagCompound tag) { + tag.setInteger("rot", this.Rotation); + } +} diff --git a/src/main/java/com/eloraam/redpower/control/TileIOExpander.java b/src/main/java/com/eloraam/redpower/control/TileIOExpander.java new file mode 100644 index 0000000..95d8844 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/control/TileIOExpander.java @@ -0,0 +1,231 @@ +package com.eloraam.redpower.control; + +import com.eloraam.redpower.RedPowerControl; +import com.eloraam.redpower.core.BlockMultipart; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.IFrameSupport; +import com.eloraam.redpower.core.IRedPowerConnectable; +import com.eloraam.redpower.core.IRedbusConnectable; +import com.eloraam.redpower.core.RedPowerLib; +import com.eloraam.redpower.core.TileMultipart; +import java.util.List; +import net.minecraft.block.Block; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.IBlockAccess; + +public class TileIOExpander extends TileMultipart implements IRedbusConnectable, IRedPowerConnectable, IFrameSupport { + public int Rotation = 0; + public int WBuf = 0; + public int WBufNew = 0; + public int RBuf = 0; + private int rbaddr = 3; + + @Override + public int rbGetAddr() { + return this.rbaddr; + } + + @Override + public void rbSetAddr(int addr) { + this.rbaddr = addr; + } + + @Override + public int rbRead(int reg) { + switch(reg) { + case 0: + return this.RBuf & 0xFF; + case 1: + return this.RBuf >> 8; + case 2: + return this.WBufNew & 0xFF; + case 3: + return this.WBufNew >> 8; + default: + return 0; + } + } + + @Override + public void rbWrite(int reg, int dat) { + this.markDirty(); + switch(reg) { + case 0: + case 2: + this.WBufNew = this.WBufNew & 0xFF00 | dat; + this.scheduleTick(2); + break; + case 1: + case 3: + this.WBufNew = this.WBufNew & 0xFF | dat << 8; + this.scheduleTick(2); + } + + } + + @Override + public int getConnectableMask() { + return 15; + } + + @Override + public int getConnectClass(int side) { + return side == CoreLib.rotToSide(this.Rotation) ? 18 : 66; + } + + @Override + public int getCornerPowerMode() { + return 0; + } + + @Override + public int getPoweringMask(int ch) { + return ch == 0 ? 0 : ((this.WBuf & 1 << ch - 1) > 0 ? RedPowerLib.mapRotToCon(8, this.Rotation) : 0); + } + + @Override + public void onBlockPlaced(ItemStack ist, int side, EntityLivingBase ent) { + this.Rotation = (int)Math.floor((double)(ent.rotationYaw * 4.0F / 360.0F) + 0.5) + 1 & 3; + if (ent instanceof EntityPlayer) { + super.Owner = ((EntityPlayer)ent).getGameProfile(); + } + + } + + @Override + public void onTileTick() { + if (this.WBuf != this.WBufNew) { + this.WBuf = this.WBufNew; + this.onBlockNeighborChange(Blocks.air); + this.updateBlockChange(); + } + + } + + @Override + public void onBlockNeighborChange(Block block) { + boolean ch = false; + + for(int n = 0; n < 16; ++n) { + int ps = RedPowerLib.getRotPowerState(super.worldObj, super.xCoord, super.yCoord, super.zCoord, 8, this.Rotation, n + 1); + if (ps == 0) { + if ((this.RBuf & 1 << n) > 0) { + this.RBuf &= ~(1 << n); + ch = true; + } + } else if ((this.RBuf & 1 << n) == 0) { + this.RBuf |= 1 << n; + ch = true; + } + } + + if (ch) { + this.updateBlock(); + } + + } + + public Block getBlockType() { + return RedPowerControl.blockFlatPeripheral; + } + + @Override + public int getExtendedID() { + return 0; + } + + @Override + public void addHarvestContents(List ist) { + ist.add(new ItemStack(this.getBlockType(), 1, 0)); + } + + @Override + public void onHarvestPart(EntityPlayer player, int part, boolean willHarvest) { + this.breakBlock(willHarvest); + } + + @Override + public float getPartStrength(EntityPlayer player, int part) { + return 0.1F; + } + + @Override + public boolean blockEmpty() { + return false; + } + + @Override + public void setPartBounds(BlockMultipart block, int part) { + block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F); + } + + @Override + public int getSolidPartsMask() { + return 1; + } + + @Override + public int getPartsMask() { + return 1; + } + + @Override + public void writeFramePacket(NBTTagCompound tag) { + tag.setByte("rot", (byte)this.Rotation); + tag.setShort("wb", (short)this.WBuf); + } + + @Override + public void readFramePacket(NBTTagCompound tag) { + this.Rotation = tag.getByte("rot"); + this.WBuf = tag.getShort("wb"); + } + + @Override + public void onFrameRefresh(IBlockAccess iba) { + } + + @Override + public void onFramePickup(IBlockAccess iba) { + } + + @Override + public void onFrameDrop() { + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + this.Rotation = data.getByte("rot"); + this.WBuf = data.getShort("wb"); + this.WBufNew = data.getShort("wbn"); + this.RBuf = data.getShort("rb"); + this.rbaddr = data.getByte("rbaddr") & 255; + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + data.setByte("rot", (byte)this.Rotation); + data.setShort("wb", (short)this.WBuf); + data.setShort("wbn", (short)this.WBufNew); + data.setShort("rb", (short)this.RBuf); + data.setByte("rbaddr", (byte)this.rbaddr); + } + + @Override + protected void readFromPacket(NBTTagCompound tag) { + this.Rotation = tag.getByte("rot"); + this.WBuf = tag.getShort("wb"); + } + + @Override + protected void writeToPacket(NBTTagCompound tag) { + tag.setByte("rot", (byte)this.Rotation); + tag.setShort("wb", (short)this.WBuf); + } +} diff --git a/src/main/java/com/eloraam/redpower/control/TileRAM.java b/src/main/java/com/eloraam/redpower/control/TileRAM.java new file mode 100644 index 0000000..1c1f9c5 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/control/TileRAM.java @@ -0,0 +1,91 @@ +package com.eloraam.redpower.control; + +import com.eloraam.redpower.RedPowerControl; +import com.eloraam.redpower.core.BlockMultipart; +import com.eloraam.redpower.core.CoreLib; +import java.util.List; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +public class TileRAM extends TileBackplane { + public byte[] memory = new byte[8192]; + + @Override + public int readBackplane(int addr) { + return this.memory[addr] & 0xFF; + } + + @Override + public void writeBackplane(int addr, int val) { + this.memory[addr] = (byte)val; + } + + @Override + public Block getBlockType() { + return RedPowerControl.blockBackplane; + } + + @Override + public int getExtendedID() { + return 1; + } + + @Override + public void addHarvestContents(List ist) { + ist.add(new ItemStack(RedPowerControl.blockBackplane, 1, 0)); + ist.add(new ItemStack(RedPowerControl.blockBackplane, 1, 1)); + } + + @Override + public void onHarvestPart(EntityPlayer player, int part, boolean willHarvest) { + if (willHarvest) { + CoreLib.dropItem(super.worldObj, super.xCoord, super.yCoord, super.zCoord, new ItemStack(RedPowerControl.blockBackplane, 1, 1)); + } + + super.worldObj.setBlock(super.xCoord, super.yCoord, super.zCoord, RedPowerControl.blockBackplane); + TileBackplane tb = CoreLib.getTileEntity(super.worldObj, super.xCoord, super.yCoord, super.zCoord, TileBackplane.class); + if (tb != null) { + tb.Rotation = super.Rotation; + } + + this.updateBlockChange(); + } + + @Override + public void setPartBounds(BlockMultipart block, int part) { + if (part == 0) { + super.setPartBounds(block, part); + } else { + block.setBlockBounds(0.0F, 0.125F, 0.0F, 1.0F, 1.0F, 1.0F); + } + + } + + @Override + public int getSolidPartsMask() { + return 3; + } + + @Override + public int getPartsMask() { + return 3; + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + this.memory = data.getByteArray("ram"); + if (this.memory.length != 8192) { + this.memory = new byte[8192]; + } + + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + data.setByteArray("ram", this.memory); + } +} diff --git a/src/main/java/com/eloraam/redpower/control/TileRibbon.java b/src/main/java/com/eloraam/redpower/control/TileRibbon.java new file mode 100644 index 0000000..4966c32 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/control/TileRibbon.java @@ -0,0 +1,23 @@ +package com.eloraam.redpower.control; + +import com.eloraam.redpower.wiring.TileWiring; +import net.minecraft.block.Block; + +public class TileRibbon extends TileWiring { + @Override + public int getExtendedID() { + return 12; + } + + @Override + public int getConnectClass(int side) { + return 66; + } + + @Override + public void onBlockNeighborChange(Block block) { + super.onBlockNeighborChange(block); + this.getConnectionMask(); + this.getExtConnectionMask(); + } +} diff --git a/src/main/java/com/eloraam/redpower/core/AchieveLib.java b/src/main/java/com/eloraam/redpower/core/AchieveLib.java new file mode 100644 index 0000000..db9c876 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/AchieveLib.java @@ -0,0 +1,94 @@ +package com.eloraam.redpower.core; + +import java.util.HashMap; +import java.util.TreeMap; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.stats.Achievement; +import net.minecraftforge.common.AchievementPage; + +public class AchieveLib { + private static HashMap achievelist = new HashMap(); + public static AchievementPage achievepage = new AchievementPage("RedPower", new Achievement[0]); + private static TreeMap achievebycraft = new TreeMap<>(CoreLib::compareItemStack); + private static TreeMap achievebyfurnace = new TreeMap<>(CoreLib::compareItemStack); + private static TreeMap achievebyalloy = new TreeMap<>(CoreLib::compareItemStack); + + public static void registerAchievement(String name, int x, int y, ItemStack icon, Object require, boolean special) { + Achievement acreq = null; + if (require instanceof Achievement) { + acreq = (Achievement)require; + } else if (require instanceof String) { + acreq = (Achievement)achievelist.get(require); + } + + Achievement ac = new Achievement(name, name, x, y, icon, acreq); + ac.registerStat(); + if (special) { + ac.setSpecial(); + } + + achievelist.put(name, ac); + achievepage.getAchievements().add(ac); + } + + public static void registerAchievement(String name, int x, int y, ItemStack icon, Object require) { + registerAchievement(name, x, y, icon, require, false); + } + + public static void addCraftingAchievement(ItemStack target, String id) { + Achievement ac = (Achievement)achievelist.get(id); + if (ac != null) { + achievebycraft.put(target, ac); + } + + } + + public static void addAlloyAchievement(ItemStack target, String id) { + Achievement ac = (Achievement)achievelist.get(id); + if (ac != null) { + achievebyalloy.put(target, ac); + } + + } + + public static void addFurnaceAchievement(ItemStack target, String id) { + Achievement ac = (Achievement)achievelist.get(id); + if (ac != null) { + achievebyfurnace.put(target, ac); + } + + } + + public static void triggerAchievement(EntityPlayer player, String id) { + Achievement ac = (Achievement)achievelist.get(id); + if (ac != null) { + player.triggerAchievement(ac); + } + + } + + public static void onCrafting(EntityPlayer player, ItemStack ist) { + Achievement ac = (Achievement)achievebycraft.get(ist); + if (ac != null) { + player.triggerAchievement(ac); + } + + } + + public static void onFurnace(EntityPlayer player, ItemStack ist) { + Achievement ac = (Achievement)achievebyfurnace.get(ist); + if (ac != null) { + player.triggerAchievement(ac); + } + + } + + public static void onAlloy(EntityPlayer player, ItemStack ist) { + Achievement ac = (Achievement)achievebyalloy.get(ist); + if (ac != null) { + player.triggerAchievement(ac); + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/core/BlockCoverable.java b/src/main/java/com/eloraam/redpower/core/BlockCoverable.java new file mode 100644 index 0000000..eb601ec --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/BlockCoverable.java @@ -0,0 +1,50 @@ +package com.eloraam.redpower.core; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.Vec3; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; + +public abstract class BlockCoverable extends BlockMultipart { + public BlockCoverable(Material material) { + super(material); + } + + public boolean isSideSolid(IBlockAccess world, int i, int j, int k, ForgeDirection side) { + TileCoverable tc = CoreLib.getTileEntity(world, i, j, k, TileCoverable.class); + return tc != null && tc.isSideNormal(side.ordinal()); + } + + public float getExplosionResistance(Entity exploder, World world, int x, int y, int z, double srcX, double srcY, double srcZ) { + Vec3 org = Vec3.createVectorHelper(srcX, srcY, srcZ); + Vec3 end = Vec3.createVectorHelper((double)x + 0.5, (double)y + 0.5, (double)z + 0.5); + Block bl = world.getBlock(x, y, z); + if (bl == null) { + return 0.0F; + } else { + MovingObjectPosition mop = bl.collisionRayTrace(world, x, y, z, org, end); + if (mop == null) { + return bl.getExplosionResistance(exploder); + } else { + TileCoverable tl = CoreLib.getTileEntity(world, x, y, z, TileCoverable.class); + if (tl == null) { + return bl.getExplosionResistance(exploder); + } else { + float er = tl.getExplosionResistance(mop.subHit, mop.sideHit, exploder); + return er < 0.0F ? bl.getExplosionResistance(exploder) : er; + } + } + } + } + + public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z, EntityPlayer player) { + TileCoverable tile = CoreLib.getTileEntity(world, x, y, z, TileCoverable.class); + return tile != null ? tile.getPickBlock(target, player) : null; + } +} diff --git a/src/main/java/com/eloraam/redpower/core/BlockExtended.java b/src/main/java/com/eloraam/redpower/core/BlockExtended.java new file mode 100644 index 0000000..8f8822e --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/BlockExtended.java @@ -0,0 +1,212 @@ +package com.eloraam.redpower.core; + +import com.eloraam.redpower.RedPowerCore; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import java.util.ArrayList; +import java.util.Random; +import java.util.function.Supplier; +import net.minecraft.block.Block; +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.client.particle.EffectRenderer; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +public class BlockExtended extends BlockContainer { + private Supplier[] tileEntityMap = new Supplier[16]; + + public BlockExtended(Material m) { + super(m); + } + + public boolean isOpaqueCube() { + return false; + } + + public boolean renderAsNormalBlock() { + return false; + } + + public boolean isFullCube() { + return false; + } + + public int damageDropped(int i) { + return i; + } + + public float getHardness() { + return super.blockHardness; + } + + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister register) { + } + + public ArrayList getDrops(World world, int x, int y, int z, int meta, int fortune) { + ArrayList ist = new ArrayList(); + TileExtended tl = CoreLib.getTileEntity(world, x, y, z, TileExtended.class); + if (tl == null) { + return ist; + } else { + tl.addHarvestContents(ist); + return ist; + } + } + + public Item getItemDropped(int i, Random random, int j) { + return Item.getItemFromBlock(Blocks.air); + } + + public void harvestBlock(World world, EntityPlayer player, int x, int y, int z, int side) { + } + + public boolean removedByPlayer(World world, EntityPlayer player, int x, int y, int z, boolean willHarvest) { + if (!world.isRemote) { + Block bl = world.getBlock(x, y, z); + int md = world.getBlockMetadata(x, y, z); + if (bl == null) { + return false; + } else { + if (bl.canHarvestBlock(player, md) && willHarvest) { + for(ItemStack it : this.getDrops(world, x, y, z, md, EnchantmentHelper.getFortuneModifier(player))) { + CoreLib.dropItem(world, x, y, z, it); + } + } + + world.setBlockToAir(x, y, z); + return true; + } + } else { + return true; + } + } + + public void onNeighborBlockChange(World world, int x, int y, int z, Block block) { + TileExtended tl = CoreLib.getTileEntity(world, x, y, z, TileExtended.class); + if (tl == null) { + world.setBlockToAir(x, y, z); + } else { + tl.onBlockNeighborChange(block); + } + + } + + public int onBlockPlaced(World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int meta) { + return super.onBlockPlaced(world, x, y, z, side, hitX, hitY, hitZ, meta); + } + + public void onBlockPlacedBy(World world, int x, int y, int z, int side, EntityLivingBase ent, ItemStack ist) { + TileExtended tl = CoreLib.getTileEntity(world, x, y, z, TileExtended.class); + if (tl != null) { + tl.onBlockPlaced(ist, side, ent); + } + + } + + public void breakBlock(World world, int x, int y, int z, Block block, int md) { + TileExtended tl = CoreLib.getTileEntity(world, x, y, z, TileExtended.class); + if (tl != null) { + tl.onBlockRemoval(); + super.breakBlock(world, x, y, z, block, md); + } + + } + + public int isProvidingStrongPower(IBlockAccess iba, int x, int y, int z, int side) { + TileExtended tl = CoreLib.getTileEntity(iba, x, y, z, TileExtended.class); + return tl != null && tl.isBlockStrongPoweringTo(side) ? 15 : 0; + } + + public int isProvidingWeakPower(IBlockAccess iba, int x, int y, int z, int side) { + TileExtended tl = CoreLib.getTileEntity(iba, x, y, z, TileExtended.class); + return tl != null && tl.isBlockWeakPoweringTo(side) ? 1 : 0; + } + + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float xp, float yp, float zp) { + TileExtended tl = CoreLib.getTileEntity(world, x, y, z, TileExtended.class); + return tl != null && tl.onBlockActivated(player); + } + + public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity) { + TileExtended tl = CoreLib.getTileEntity(world, x, y, z, TileExtended.class); + if (tl != null) { + tl.onEntityCollidedWithBlock(entity); + } + + } + + public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) { + TileExtended tl = CoreLib.getTileEntity(world, x, y, z, TileExtended.class); + if (tl != null) { + AxisAlignedBB bb = tl.getCollisionBoundingBox(); + if (bb != null) { + return bb; + } + } + + this.setBlockBoundsBasedOnState(world, x, y, z); + return super.getCollisionBoundingBoxFromPool(world, x, y, z); + } + + public AxisAlignedBB getSelectedBoundingBoxFromPool(World world, int x, int y, int z) { + this.setBlockBoundsBasedOnState(world, x, y, z); + return super.getSelectedBoundingBoxFromPool(world, x, y, z); + } + + public int getRenderType() { + return RedPowerCore.customBlockModel; + } + + @SideOnly(Side.CLIENT) + public void randomDisplayTick(World world, int x, int y, int z, Random random) { + int md = world.getBlockMetadata(x, y, z); + RenderCustomBlock rend = RenderLib.getRenderer(this, md); + if (rend != null) { + rend.randomDisplayTick(world, x, y, z, random); + } + + } + + public void addTileEntityMapping(int md, Supplier cl) { + this.tileEntityMap[md] = cl; + } + + public void setBlockName(int md, String name) { + Item item = Item.getItemFromBlock(this); + ((ItemExtended)item).setMetaName(md, "tile." + name); + } + + public TileEntity createNewTileEntity(World world, int md) { + return this.tileEntityMap[md] != null ? (TileEntity)this.tileEntityMap[md].get() : null; + } + + @SideOnly(Side.CLIENT) + public boolean addHitEffects(World world, MovingObjectPosition target, EffectRenderer effectRenderer) { + int x = target.blockX; + int y = target.blockY; + int z = target.blockZ; + int meta = world.getBlockMetadata(x, y, z); + int side = target.sideHit; + RenderCustomBlock renderer = RenderLib.getRenderer(this, meta); + return renderer != null && renderer.renderHit(effectRenderer, world, target, x, y, z, side, meta); + } + + @SideOnly(Side.CLIENT) + public boolean addDestroyEffects(World world, int x, int y, int z, int meta, EffectRenderer effectRenderer) { + RenderCustomBlock renderer = RenderLib.getRenderer(this, meta); + return renderer != null && renderer.renderDestroy(effectRenderer, world, x, y, z, meta); + } +} diff --git a/src/main/java/com/eloraam/redpower/core/BlockMultiblock.java b/src/main/java/com/eloraam/redpower/core/BlockMultiblock.java new file mode 100644 index 0000000..c9f8129 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/BlockMultiblock.java @@ -0,0 +1,106 @@ +package com.eloraam.redpower.core; + +import com.eloraam.redpower.RedPowerCore; +import java.util.ArrayList; +import net.minecraft.block.Block; +import net.minecraft.block.BlockContainer; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +public class BlockMultiblock extends BlockContainer { + public BlockMultiblock() { + super(CoreLib.materialRedpower); + } + + public void registerBlockIcons(IIconRegister reg) { + } + + public int getRenderType() { + return RedPowerCore.nullBlockModel; + } + + public boolean isOpaqueCube() { + return false; + } + + public boolean renderAsNormalBlock() { + return false; + } + + public ArrayList getDrops(World world, int x, int y, int z, int metadata, int fortune) { + return new ArrayList(); + } + + public TileEntity createNewTileEntity(World worldObj, int metadata) { + return null; + } + + public TileEntity createTileEntity(World worldObj, int metadata) { + switch(metadata) { + case 0: + return new TileMultiblock(); + default: + return null; + } + } + + public void breakBlock(World world, int x, int y, int z, Block block, int md) { + TileMultiblock tmb = CoreLib.getTileEntity(world, x, y, z, TileMultiblock.class); + if (tmb != null) { + IMultiblock imb = CoreLib.getTileEntity(world, tmb.relayX, tmb.relayY, tmb.relayZ, IMultiblock.class); + if (imb != null) { + imb.onMultiRemoval(tmb.relayNum); + } + } + + } + + public void setBlockBoundsBasedOnState(IBlockAccess iba, int x, int y, int z) { + TileMultiblock tmb = CoreLib.getTileEntity(iba, x, y, z, TileMultiblock.class); + if (tmb == null) { + this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + } else { + IMultiblock imb = CoreLib.getTileEntity(iba, tmb.relayX, tmb.relayY, tmb.relayZ, IMultiblock.class); + if (imb != null) { + AxisAlignedBB aabb = imb.getMultiBounds(tmb.relayNum); + int xa = tmb.relayX - x; + int ya = tmb.relayY - y; + int za = tmb.relayZ - z; + this.setBlockBounds( + (float)aabb.minX + (float)xa, + (float)aabb.minY + (float)ya, + (float)aabb.minZ + (float)za, + (float)aabb.maxX + (float)xa, + (float)aabb.maxY + (float)ya, + (float)aabb.maxZ + (float)za + ); + } + } + + } + + public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) { + this.setBlockBoundsBasedOnState(world, x, y, z); + return super.getCollisionBoundingBoxFromPool(world, x, y, z); + } + + public AxisAlignedBB getSelectedBoundingBoxFromPool(World world, int x, int y, int z) { + this.setBlockBoundsBasedOnState(world, x, y, z); + return super.getSelectedBoundingBoxFromPool(world, x, y, z); + } + + public float getPlayerRelativeBlockHardness(EntityPlayer player, World world, int x, int y, int z) { + TileMultiblock tmb = CoreLib.getTileEntity(world, x, y, z, TileMultiblock.class); + if (tmb == null) { + return 0.0F; + } else { + IMultiblock imb = CoreLib.getTileEntity(world, tmb.relayX, tmb.relayY, tmb.relayZ, IMultiblock.class); + return imb == null ? 0.0F : imb.getMultiBlockStrength(tmb.relayNum, player); + } + } +} diff --git a/src/main/java/com/eloraam/redpower/core/BlockMultipart.java b/src/main/java/com/eloraam/redpower/core/BlockMultipart.java new file mode 100644 index 0000000..95eb919 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/BlockMultipart.java @@ -0,0 +1,163 @@ +package com.eloraam.redpower.core; + +import java.util.List; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.Vec3; +import net.minecraft.util.MovingObjectPosition.MovingObjectType; +import net.minecraft.world.Explosion; +import net.minecraft.world.World; + +public class BlockMultipart extends BlockExtended { + public BlockMultipart(Material material) { + super(material); + } + + @Override + public void onNeighborBlockChange(World world, int x, int y, int z, Block block) { + TileMultipart tl = CoreLib.getTileEntity(world, x, y, z, TileMultipart.class); + if (tl == null) { + world.setBlockToAir(x, y, z); + } else { + tl.onBlockNeighborChange(block); + } + + } + + @Override + public boolean removedByPlayer(World world, EntityPlayer player, int x, int y, int z, boolean willHarvest) { + if (!world.isRemote) { + MovingObjectPosition mop = CoreLib.retraceBlock(world, player, x, y, z); + if (mop != null && mop.typeOfHit == MovingObjectType.BLOCK) { + TileMultipart tl = CoreLib.getTileEntity(world, x, y, z, TileMultipart.class); + if (tl != null) { + tl.onHarvestPart(player, mop.subHit, willHarvest); + } + } + } + + return false; + } + + public boolean removedByPlayer(World world, EntityPlayer player, int x, int y, int z) { + return false; + } + + @Override + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float xp, float yp, float zp) { + MovingObjectPosition pos = CoreLib.retraceBlock(world, player, x, y, z); + if (pos == null) { + return false; + } else if (pos.typeOfHit != MovingObjectType.BLOCK) { + return false; + } else { + TileMultipart tl = CoreLib.getTileEntity(world, x, y, z, TileMultipart.class); + return tl != null && tl.onPartActivateSide(player, pos.subHit, pos.sideHit); + } + } + + public float getPlayerRelativeBlockHardness(EntityPlayer player, World world, int x, int y, int z) { + MovingObjectPosition pos = CoreLib.retraceBlock(world, player, x, y, z); + if (pos == null) { + return 0.0F; + } else if (pos.typeOfHit != MovingObjectType.BLOCK) { + return 0.0F; + } else { + TileMultipart tl = CoreLib.getTileEntity(player.worldObj, x, y, z, TileMultipart.class); + return tl == null ? 0.0F : tl.getPartStrength(player, pos.subHit); + } + } + + public void onBlockDestroyedByExplosion(World world, int x, int y, int z, Explosion explosion) { + TileMultipart tl = CoreLib.getTileEntity(world, x, y, z, TileMultipart.class); + if (tl != null) { + tl.breakBlock(); + } + + } + + public void addCollisionBoxesToList(World world, int x, int y, int z, AxisAlignedBB box, List list, Entity ent) { + TileMultipart tl = CoreLib.getTileEntity(world, x, y, z, TileMultipart.class); + if (tl != null) { + int pm = tl.getSolidPartsMask(); + + while(pm > 0) { + int pt = Integer.numberOfTrailingZeros(pm); + pm &= ~(1 << pt); + tl.setPartBounds(this, pt); + super.addCollisionBoxesToList(world, x, y, z, box, list, ent); + } + } + + } + + @Override + public AxisAlignedBB getSelectedBoundingBoxFromPool(World world, int x, int y, int z) { + return super.getSelectedBoundingBoxFromPool(world, x, y, z); + } + + public MovingObjectPosition collisionRayTrace(World world, int x, int y, int z, Vec3 start, Vec3 end) { + TileMultipart multipart = CoreLib.getTileEntity(world, x, y, z, TileMultipart.class); + if (multipart == null) { + return null; + } else { + int pm = multipart.getPartsMask(); + MovingObjectPosition result = null; + int cpt = -1; + double distance = 0.0; + + while(pm > 0) { + int pt = Integer.numberOfTrailingZeros(pm); + pm &= ~(1 << pt); + multipart.setPartBounds(this, pt); + MovingObjectPosition mop = super.collisionRayTrace(world, x, y, z, start, end); + if (mop != null) { + double max = mop.hitVec.squareDistanceTo(start); + if (result == null || max < distance) { + distance = max; + result = mop; + cpt = pt; + } + } + } + + if (result == null) { + return null; + } else { + multipart.setPartBounds(this, cpt); + result.subHit = cpt; + return result; + } + } + } + + protected MovingObjectPosition traceCurrentBlock(World world, int x, int y, int z, Vec3 src, Vec3 dest) { + return super.collisionRayTrace(world, x, y, z, src, dest); + } + + public void setPartBounds(World world, int x, int y, int z, int part) { + TileMultipart tl = CoreLib.getTileEntity(world, x, y, z, TileMultipart.class); + if (tl == null) { + this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + } else { + tl.setPartBounds(this, part); + } + + } + + public void computeCollidingBoxes(World world, int x, int y, int z, AxisAlignedBB box, List list, TileMultipart tl) { + int pm = tl.getSolidPartsMask(); + + while(pm > 0) { + int pt = Integer.numberOfTrailingZeros(pm); + pm &= ~(1 << pt); + tl.setPartBounds(this, pt); + super.addCollisionBoxesToList(world, x, y, z, box, list, null); + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/core/BlockReplaceHelper.java b/src/main/java/com/eloraam/redpower/core/BlockReplaceHelper.java new file mode 100644 index 0000000..5b11f34 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/BlockReplaceHelper.java @@ -0,0 +1,72 @@ +package com.eloraam.redpower.core; + +import cpw.mods.fml.common.registry.FMLControlledNamespacedRegistry; +import cpw.mods.fml.common.registry.GameData; +import java.lang.reflect.Field; +import java.util.Map; +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemBlock; +import net.minecraft.util.ObjectIntIdentityMap; +import net.minecraft.util.RegistryNamespaced; +import net.minecraft.util.RegistrySimple; + +public class BlockReplaceHelper { + public static void replaceBlock(Block toReplace, Class blockClass, Class itemBlockClass) { + Class[] classTest = new Class[4]; + Exception exception = null; + + try { + Field modifiersField = Field.class.getDeclaredField("modifiers"); + modifiersField.setAccessible(true); + + for(Field blockField : Blocks.class.getDeclaredFields()) { + if (Block.class.isAssignableFrom(blockField.getType())) { + Block block = (Block)blockField.get(null); + if (block == toReplace) { + String registryName = Block.blockRegistry.getNameForObject(block); + int id = Block.getIdFromBlock(block); + Block newBlock = (Block)blockClass.newInstance(); + FMLControlledNamespacedRegistry registryBlocks = GameData.getBlockRegistry(); + Field map1 = RegistrySimple.class.getDeclaredFields()[1]; + map1.setAccessible(true); + ((Map)map1.get(registryBlocks)).put(registryName, newBlock); + Field map2 = RegistryNamespaced.class.getDeclaredFields()[0]; + map2.setAccessible(true); + ((ObjectIntIdentityMap)map2.get(registryBlocks)).func_148746_a(newBlock, id); + blockField.setAccessible(true); + modifiersField.setInt(blockField, blockField.getModifiers() & -17); + blockField.set(null, newBlock); + ItemBlock itemBlock = (ItemBlock)itemBlockClass.getConstructor(Block.class).newInstance(newBlock); + FMLControlledNamespacedRegistry registryItems = GameData.getItemRegistry(); + ((Map)map1.get(registryItems)).put(registryName, itemBlock); + ((ObjectIntIdentityMap)map2.get(registryItems)).func_148746_a(itemBlock, id); + classTest[0] = blockField.get(null).getClass(); + classTest[1] = Block.blockRegistry.getObjectById(id).getClass(); + classTest[2] = ((ItemBlock)Item.getItemFromBlock(newBlock)).field_150939_a.getClass(); + classTest[3] = Item.getItemFromBlock(newBlock).getClass(); + } + } + } + } catch (Exception var19) { + exception = var19; + } + + if (classTest[0] != classTest[1] || classTest[0] != classTest[2] || classTest[0] == null || classTest[3] != itemBlockClass) { + throw new RuntimeException( + "RedPower was unable to replace block " + + toReplace.getUnlocalizedName() + + "! Debug info to report: " + + classTest[0] + + "," + + classTest[1] + + "," + + classTest[2] + + "," + + classTest[3], + exception + ); + } + } +} diff --git a/src/main/java/com/eloraam/redpower/core/BluePowerConductor.java b/src/main/java/com/eloraam/redpower/core/BluePowerConductor.java new file mode 100644 index 0000000..0a17be1 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/BluePowerConductor.java @@ -0,0 +1,201 @@ +package com.eloraam.redpower.core; + +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagDouble; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +public abstract class BluePowerConductor { + private static int[] dirmap = new int[]{0, 1, 2, 3, 4, 5, 6, 7, 11, 14, 18, 23}; + int imask = 0; + double[] currents; + public double Vcap = 0.0; + public double Icap = 0.0; + public double Veff = 0.0; + int lastTick = 0; + public double It1 = 0.0; + public double Itot = 0.0; + + public abstract TileEntity getParent(); + + public abstract double getInvCap(); + + public int getChargeScaled(int i) { + return 0; + } + + public int getFlowScaled(int i) { + return 0; + } + + public double getResistance() { + return 0.01; + } + + public double getIndScale() { + return 0.07; + } + + public double getCondParallel() { + return 0.5; + } + + public void recache(int conm, int econm) { + int imo = 0; + + for(int c2 = 0; c2 < 3; ++c2) { + if ((conm & RedPowerLib.getConDirMask(c2 * 2)) > 0) { + imo |= 1 << c2; + } + } + + for(int var12 = 0; var12 < 12; ++var12) { + if ((econm & 1 << dirmap[var12]) > 0) { + imo |= 8 << var12; + } + } + + if (this.imask != imo) { + double[] var11 = new double[Integer.bitCount(imo)]; + int s = 0; + int d = 0; + + for(int a = 0; a < 15; ++a) { + int m = 1 << a; + double v = 0.0; + if ((this.imask & m) > 0) { + v = this.currents[s++]; + } + + if ((imo & m) > 0) { + var11[d++] = v; + } + } + + this.currents = var11; + this.imask = imo; + } + + } + + protected void computeVoltage() { + this.Itot = 0.5 * this.It1; + this.It1 = 0.0; + this.Vcap += 0.05 * this.Icap * this.getInvCap(); + this.Icap = 0.0; + } + + public double getVoltage() { + long lt = this.getParent().getWorldObj().getWorldTime(); + if ((lt & 65535L) == (long)this.lastTick) { + return this.Vcap; + } else { + this.lastTick = (int)(lt & 65535L); + this.computeVoltage(); + return this.Vcap; + } + } + + public void applyCurrent(double Iin) { + this.getVoltage(); + this.Icap += Iin; + this.It1 += Math.abs(Iin); + } + + public void drawPower(double P) { + double p1 = this.Vcap * this.Vcap - 0.1 * P * this.getInvCap(); + double t = p1 < 0.0 ? 0.0 : Math.sqrt(p1) - this.Vcap; + this.applyDirect(20.0 * t / this.getInvCap()); + } + + public double getEnergy(double vthresh) { + double d = this.getVoltage(); + double tr = 0.5 * (d * d - vthresh * vthresh) / this.getInvCap(); + return tr < 0.0 ? 0.0 : tr; + } + + public void applyPower(double P) { + double t = Math.sqrt(this.Vcap * this.Vcap + 0.1 * P * this.getInvCap()) - this.Vcap; + this.applyDirect(20.0 * t / this.getInvCap()); + } + + public void applyDirect(double Iin) { + this.applyCurrent(Iin); + } + + public void iterate() { + TileEntity parent = this.getParent(); + World world = parent.getWorldObj(); + this.getVoltage(); + int dm = this.imask; + + for(int s = 0; dm > 0; ++s) { + int d = Integer.numberOfTrailingZeros(dm); + dm &= ~(1 << d); + WorldCoord wc = new WorldCoord(parent); + int facing; + if (d < 3) { + facing = d * 2; + wc.step(facing); + } else { + int ibc = dirmap[d - 3]; + wc.step(ibc >> 2); + facing = WorldCoord.getIndStepDir(ibc >> 2, ibc & 3); + wc.step(facing); + } + + IBluePowerConnectable powerConnectable = CoreLib.getTileEntity(world, wc, IBluePowerConnectable.class); + if (powerConnectable != null) { + BluePowerConductor bpc = powerConnectable.getBlueConductor(facing ^ 1); + double r = this.getResistance() + bpc.getResistance(); + double I = this.currents[s]; + double V = this.Vcap - bpc.getVoltage(); + this.currents[s] += (V - I * r) * this.getIndScale(); + I += V * this.getCondParallel(); + this.applyCurrent(-I); + bpc.applyCurrent(I); + } + } + + } + + public void readFromNBT(NBTTagCompound tag) { + this.imask = tag.getInteger("bpim"); + int l = Integer.bitCount(this.imask); + this.currents = new double[l]; + NBTTagList clist = tag.getTagList("bpil", 6); + if (clist.tagCount() == l) { + for(int i = 0; i < l; ++i) { + this.currents[i] = clist.func_150309_d(i); + } + + this.Vcap = tag.getDouble("vcap"); + this.Icap = tag.getDouble("icap"); + this.Veff = tag.getDouble("veff"); + this.It1 = tag.getDouble("it1"); + this.Itot = tag.getDouble("itot"); + this.lastTick = tag.getInteger("ltk"); + } + + } + + public void writeToNBT(NBTTagCompound tag) { + tag.setInteger("bpim", this.imask); + int l = Integer.bitCount(this.imask); + NBTTagList clist = new NBTTagList(); + + for(int i = 0; i < l; ++i) { + NBTTagDouble val = new NBTTagDouble(this.currents[i]); + clist.appendTag(val); + } + + tag.setTag("bpil", clist); + tag.setDouble("vcap", this.Vcap); + tag.setDouble("icap", this.Icap); + tag.setDouble("veff", this.Veff); + tag.setDouble("it1", this.It1); + tag.setDouble("itot", this.Itot); + tag.setInteger("ltk", this.lastTick); + } +} diff --git a/src/main/java/com/eloraam/redpower/core/BluePowerEndpoint.java b/src/main/java/com/eloraam/redpower/core/BluePowerEndpoint.java new file mode 100644 index 0000000..ffabd5b --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/BluePowerEndpoint.java @@ -0,0 +1,44 @@ +package com.eloraam.redpower.core; + +import net.minecraft.nbt.NBTTagCompound; + +public abstract class BluePowerEndpoint extends BluePowerConductor { + public int Charge = 0; + public int Flow = 0; + + @Override + public double getInvCap() { + return 0.25; + } + + @Override + public int getChargeScaled(int i) { + return Math.min(i, i * this.Charge / 1000); + } + + @Override + public int getFlowScaled(int i) { + return Integer.bitCount(this.Flow) * i / 32; + } + + @Override + public void iterate() { + super.iterate(); + this.Charge = (int)(this.getVoltage() * 10.0); + this.Flow = this.Flow << 1 | (this.Charge >= 600 ? 1 : 0); + } + + @Override + public void readFromNBT(NBTTagCompound tag) { + super.readFromNBT(tag); + this.Charge = tag.getShort("chg"); + this.Flow = tag.getInteger("flw"); + } + + @Override + public void writeToNBT(NBTTagCompound tag) { + super.writeToNBT(tag); + tag.setShort("chg", (short)this.Charge); + tag.setInteger("flw", this.Flow); + } +} diff --git a/src/main/java/com/eloraam/redpower/core/BluePowerLib.java b/src/main/java/com/eloraam/redpower/core/BluePowerLib.java new file mode 100644 index 0000000..92461a7 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/BluePowerLib.java @@ -0,0 +1,4 @@ +package com.eloraam.redpower.core; + +public class BluePowerLib { +} diff --git a/src/main/java/com/eloraam/redpower/core/Config.java b/src/main/java/com/eloraam/redpower/core/Config.java new file mode 100644 index 0000000..0524637 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/Config.java @@ -0,0 +1,49 @@ +package com.eloraam.redpower.core; + +import com.eloraam.redpower.RedPowerCore; +import cpw.mods.fml.common.Loader; +import java.io.File; +import java.io.InputStream; + +public class Config { + private static File configDir; + private static File configFile; + private static TagFile config; + + public static void loadConfig() { + config = new TagFile(); + InputStream is = RedPowerCore.class.getResourceAsStream("/assets/rpcore/default.cfg"); + config.readStream(is); + if (configDir == null) { + File file = Loader.instance().getConfigDir(); + configDir = file; + configFile = new File(file, "redpower.cfg"); + } + + if (configFile.exists()) { + config.readFile(configFile); + } + + config.commentFile("RedPower 2 Configuration"); + } + + public static void saveConfig() { + config.saveFile(configFile); + } + + public static int getInt(String name) { + return config.getInt(name); + } + + public static int getInt(String name, int _default) { + return config.getInt(name, _default); + } + + public static String getString(String name) { + return config.getString(name); + } + + public static String getString(String name, String _default) { + return config.getString(name, _default); + } +} diff --git a/src/main/java/com/eloraam/redpower/core/CoreEvents.java b/src/main/java/com/eloraam/redpower/core/CoreEvents.java new file mode 100644 index 0000000..59a1189 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/CoreEvents.java @@ -0,0 +1,49 @@ +package com.eloraam.redpower.core; + +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraftforge.event.entity.player.PlayerDestroyItemEvent; +import net.minecraftforge.oredict.OreDictionary.OreRegisterEvent; + +public class CoreEvents { + @SubscribeEvent + public void toolDestroyed(PlayerDestroyItemEvent ev) { + EntityPlayer player = ev.entityPlayer; + ItemStack orig = ev.original; + int ci = player.inventory.currentItem; + Item oid = orig.getItem(); + int odmg = orig.getItemDamage(); + ItemStack in2 = player.inventory.getStackInSlot(ci + 27); + ItemStack ist = player.inventory.getStackInSlot(ci); + if (ist != null && ist.stackSize <= 0 && in2 != null && in2.getItem() == oid && (!in2.getHasSubtypes() || in2.getItemDamage() == odmg)) { + player.inventory.setInventorySlotContents(ci, in2); + player.inventory.setInventorySlotContents(ci + 27, (ItemStack)null); + + for(int i = 2; i > 0; --i) { + ist = player.inventory.getStackInSlot(ci + 9 * i); + if (ist == null) { + return; + } + + if (ist.getItem() != oid) { + return; + } + + if (ist.getHasSubtypes() && ist.getItemDamage() != odmg) { + return; + } + + player.inventory.setInventorySlotContents(ci + 9 * i + 9, ist); + player.inventory.setInventorySlotContents(ci + 9 * i, (ItemStack)null); + } + } + + } + + @SubscribeEvent + public void oreRegister(OreRegisterEvent ev) { + CoreLib.registerOre(ev.Name, ev.Ore); + } +} diff --git a/src/main/java/com/eloraam/redpower/core/CoreLib.java b/src/main/java/com/eloraam/redpower/core/CoreLib.java new file mode 100644 index 0000000..63b1a60 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/CoreLib.java @@ -0,0 +1,337 @@ +package com.eloraam.redpower.core; + +import com.mojang.authlib.GameProfile; +import cpw.mods.fml.relauncher.ReflectionHelper.UnableToAccessFieldException; +import cpw.mods.fml.relauncher.ReflectionHelper.UnableToFindFieldException; +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.List; +import java.util.TreeMap; +import java.util.UUID; +import net.minecraft.block.Block; +import net.minecraft.block.material.MapColor; +import net.minecraft.block.material.Material; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.server.MinecraftServer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.tileentity.TileEntityFurnace; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.Vec3; +import net.minecraft.world.EnumSkyBlock; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraft.world.WorldServer; +import net.minecraftforge.common.ForgeHooks; +import net.minecraftforge.common.util.FakePlayer; +import net.minecraftforge.common.util.FakePlayerFactory; +import net.minecraftforge.oredict.OreDictionary; + +public class CoreLib { + private static TreeMap oreMap = new TreeMap<>(CoreLib::compareItemStack); + public static String[] rawColorNames = new String[]{ + "white", "orange", "magenta", "lightBlue", "yellow", "lime", "pink", "gray", "silver", "cyan", "purple", "blue", "brown", "green", "red", "black" + }; + public static String[] enColorNames = new String[]{ + "White", "Orange", "Magenta", "Light Blue", "Yellow", "Lime", "Pink", "Gray", "Light Gray", "Cyan", "Purple", "Blue", "Brown", "Green", "Red", "Black" + }; + public static int[] paintColors = new int[]{ + 16777215, 16744448, 16711935, 7110911, 16776960, 65280, 16737408, 5460819, 9671571, 65535, 8388863, 255, 5187328, 32768, 16711680, 2039583 + }; + public static final Material materialRedpower = new Material(MapColor.woodColor); + public static final GameProfile REDPOWER_PROFILE = new GameProfile(UUID.fromString("d90e51a0-41af-4a37-9fd0-f2fdc15a181b"), "[RedPower]"); + + public static FakePlayer getRedpowerPlayer(World world, int x, int y, int z, int rotation, GameProfile profile) { + MinecraftServer server = ((WorldServer)world).func_73046_m(); + FakePlayer player = FakePlayerFactory.get((WorldServer)world, profile); + double dx = (double)x + 0.5; + double dy = (double)y - 1.1; + double dz = (double)z + 0.5; + float pitch; + float yaw; + switch(rotation ^ 1) { + case 0: + pitch = 90.0F; + yaw = 0.0F; + dy -= 0.51; + break; + case 1: + pitch = -90.0F; + yaw = 0.0F; + dy += 0.51; + break; + case 2: + pitch = 0.0F; + yaw = 180.0F; + dz -= 0.51; + break; + case 3: + pitch = 0.0F; + yaw = 0.0F; + dz += 0.51; + break; + case 4: + pitch = 0.0F; + yaw = 90.0F; + dx -= 0.51; + break; + default: + pitch = 0.0F; + yaw = 270.0F; + dx += 0.51; + } + + player.setLocationAndAngles(dx, dy, dz, yaw, pitch); + return player; + } + + public static boolean hasBreakPermission(EntityPlayerMP player, int x, int y, int z) { + return hasEditPermission(player, x, y, z) + && !ForgeHooks.onBlockBreakEvent(player.worldObj, player.theItemInWorldManager.getGameType(), player, x, y, z).isCanceled(); + } + + public static boolean hasEditPermission(EntityPlayerMP player, int x, int y, int z) { + return player.canPlayerEdit(x, y, z, player.worldObj.getBlockMetadata(x, y, z), null) + && !MinecraftServer.getServer().isBlockProtected(player.worldObj, x, y, z, player); + } + + public static void updateAllLightTypes(World world, int x, int y, int z) { + world.updateLightByType(EnumSkyBlock.Block, x, y, z); + world.updateLightByType(EnumSkyBlock.Sky, x, y, z); + } + + @Deprecated + void initModule(String name) { + Class cl; + try { + cl = Class.forName(name); + } catch (ClassNotFoundException var7) { + return; + } + + Method mth; + try { + mth = cl.getDeclaredMethod("initialize"); + } catch (NoSuchMethodException var6) { + return; + } + + try { + mth.invoke(null); + } catch (InvocationTargetException | IllegalAccessException var5) { + } + + } + + public static T getTileEntity(IBlockAccess iba, int x, int y, int z, Class type) { + TileEntity tile = iba.getTileEntity(x, y, z); + return (T)(tile != null && type.isAssignableFrom(tile.getClass()) ? tile : null); + } + + public static T getTileEntity(IBlockAccess iba, WorldCoord wc, Class type) { + TileEntity tile = iba.getTileEntity(wc.x, wc.y, wc.z); + return (T)(tile != null && type.isAssignableFrom(tile.getClass()) ? tile : null); + } + + public static T getGuiTileEntity(World world, int x, int y, int z, Class cl) { + if (!world.isRemote) { + TileEntity tr = world.getTileEntity(x, y, z); + return (T)(!cl.isInstance(tr) ? null : tr); + } else { + try { + T t = (T)cl.newInstance(); + t.setWorldObj(world); + return t; + } catch (IllegalAccessException | InstantiationException var6) { + return null; + } + } + } + + public static void markBlockDirty(World world, int i, int j, int k) { + if (world.blockExists(i, j, k)) { + world.getChunkFromBlockCoords(i, k).setChunkModified(); + } + + } + + public static int compareItemStack(ItemStack a, ItemStack b) { + return Item.getIdFromItem(a.getItem()) != Item.getIdFromItem(b.getItem()) + ? Item.getIdFromItem(a.getItem()) - Item.getIdFromItem(b.getItem()) + : (a.getItemDamage() == b.getItemDamage() ? 0 : (a.getItem().getHasSubtypes() ? a.getItemDamage() - b.getItemDamage() : 0)); + } + + static void registerOre(String name, ItemStack ore) { + oreMap.put(ore, name); + } + + public static void readOres() { + for(String st : OreDictionary.getOreNames()) { + for(ItemStack ist : OreDictionary.getOres(st)) { + registerOre(st, ist); + } + } + + } + + public static String getOreClass(ItemStack ist) { + String st = (String)oreMap.get(ist); + if (st != null) { + return st; + } else { + ist = new ItemStack(ist.getItem(), 1, -1); + return (String)oreMap.get(ist); + } + } + + public static boolean matchItemStackOre(ItemStack a, ItemStack b) { + String s1 = getOreClass(a); + String s2 = getOreClass(b); + return (ItemStack.areItemStacksEqual(a, b) || s1 != null && s2 != null && s1.equals(s2)) && ItemStack.areItemStackTagsEqual(a, b); + } + + public static void dropItem(World world, int i, int j, int k, ItemStack ist) { + if (!world.isRemote) { + double d = 0.7; + double x = (double)world.rand.nextFloat() * d + (1.0 - d) * 0.5; + double y = (double)world.rand.nextFloat() * d + (1.0 - d) * 0.5; + double z = (double)world.rand.nextFloat() * d + (1.0 - d) * 0.5; + EntityItem item = new EntityItem(world, (double)i + x, (double)j + y, (double)k + z, ist); + item.delayBeforeCanPickup = 10; + world.spawnEntityInWorld(item); + } + + } + + public static ItemStack copyStack(ItemStack ist, int n) { + return new ItemStack(ist.getItem(), n, ist.getItemDamage()); + } + + public static int rotToSide(int r) { + switch(r) { + case 0: + return 5; + case 1: + return 3; + case 2: + return 4; + default: + return 2; + } + } + + public static int getFacing(int side) { + switch(side) { + case 0: + return 2; + case 1: + return 5; + case 2: + return 3; + case 3: + return 4; + case 4: + return 1; + case 5: + return 0; + default: + return 0; + } + } + + public static MovingObjectPosition retraceBlock(World world, EntityLivingBase ent, int x, int y, int z) { + Vec3 org = Vec3.createVectorHelper(ent.posX, ent.posY + 1.62 - (double)ent.yOffset, ent.posZ); + Vec3 vec = ent.getLook(1.0F); + Vec3 end = org.addVector(vec.xCoord * 5.0, vec.yCoord * 5.0, vec.zCoord * 5.0); + Block bl = world.getBlock(x, y, z); + return bl == null ? null : bl.collisionRayTrace(world, x, y, z, org, end); + } + + public static MovingObjectPosition traceBlock(EntityPlayer player) { + Vec3 org = Vec3.createVectorHelper(player.posX, player.posY + 1.62 - (double)player.yOffset, player.posZ); + Vec3 vec = player.getLook(1.0F); + Vec3 end = org.addVector(vec.xCoord * 5.0, vec.yCoord * 5.0, vec.zCoord * 5.0); + return player.worldObj.rayTraceBlocks(org, end); + } + + public static void placeNoise(World world, int i, int j, int k, Block block) { + world.playSoundEffect( + (double)((float)i + 0.5F), + (double)((float)j + 0.5F), + (double)((float)k + 0.5F), + block.stepSound.func_150496_b(), + (block.stepSound.getVolume() + 1.0F) / 2.0F, + block.stepSound.getPitch() * 0.8F + ); + } + + public static int getBurnTime(ItemStack ist) { + return TileEntityFurnace.getItemBurnTime(ist); + } + + public static double getAverageEdgeLength(AxisAlignedBB aabb) { + double d = aabb.maxX - aabb.minX; + double d1 = aabb.maxY - aabb.minY; + double d2 = aabb.maxZ - aabb.minZ; + return (d + d1 + d2) / 3.0; + } + + public static void writeChat(EntityPlayer pl, String str) { + if (pl instanceof EntityPlayerMP) { + EntityPlayerMP emp = (EntityPlayerMP)pl; + emp.addChatComponentMessage(new ChatComponentText(str)); + } + + } + + public static void updateBlock(World world, int x, int y, int z) { + if (!(world.getTileEntity(x, y, z) instanceof TileExtended)) { + world.func_147479_m(x, y, z); + } + + } + + public static int[] toIntArray(List integerList) { + int[] intArray = new int[integerList.size()]; + + for(int i = 0; i < integerList.size(); ++i) { + intArray[i] = integerList.get(i); + } + + return intArray; + } + + public static void setFinalValue(Class classToAccess, T instance, E value, String... fieldNames) { + try { + findField(classToAccess, fieldNames).set(instance, value); + } catch (Exception var5) { + throw new UnableToAccessFieldException(fieldNames, var5); + } + } + + public static Field findField(Class clazz, String... fieldNames) { + Exception failed = null; + + for(String fieldName : fieldNames) { + try { + Field field = clazz.getDeclaredField(fieldName); + field.setAccessible(true); + Field modifiersField = Field.class.getDeclaredField("modifiers"); + modifiersField.setAccessible(true); + modifiersField.setInt(field, field.getModifiers() & -17); + return field; + } catch (Exception var9) { + failed = var9; + } + } + + throw new UnableToFindFieldException(fieldNames, failed); + } +} diff --git a/src/main/java/com/eloraam/redpower/core/CoverLib.java b/src/main/java/com/eloraam/redpower/core/CoverLib.java new file mode 100644 index 0000000..e0ec21b --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/CoverLib.java @@ -0,0 +1,1374 @@ +package com.eloraam.redpower.core; + +import cpw.mods.fml.common.FMLCommonHandler; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import net.minecraft.block.Block; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.World; + +public class CoverLib { + public static final float selectBoxWidth = 0.25F; + public static Block blockCoverPlate = null; + public static ItemStack[] materials = new ItemStack[256]; + private static String[] names = new String[256]; + private static int[] hardness = new int[256]; + private static List materialHandlers = new ArrayList(); + private static boolean[] transparency = new boolean[256]; + private static float[] miningHardness = new float[256]; + private static Map> coverIndex = new LinkedHashMap(); + + public static void addMaterialHandler(CoverLib.IMaterialHandler handler) { + for(int i = 0; i < 256; ++i) { + if (materials[i] != null) { + handler.addMaterial(i); + } + } + + materialHandlers.add(handler); + } + + public static Integer getMaterial(ItemStack ist) { + List cvr = (List)coverIndex.get(ist.getItem()); + int meta = ist.getItemDamage(); + if (cvr == null) { + return null; + } else { + return meta >= cvr.size() ? null : (Integer)cvr.get(meta); + } + } + + public static void addMaterial(int n, int hard, Block bl, String name) { + addMaterial(n, hard, false, bl, 0, name); + } + + public static void addMaterial(int n, int hard, Block bl, int md, String name) { + addMaterial(n, hard, false, bl, md, name); + } + + public static void addMaterial(int n, int hard, boolean tpar, Block bl, String name) { + addMaterial(n, hard, tpar, bl, 0, name); + } + + public static void addMaterial(int n, int hard, boolean tpar, Block bl, int md, String name) { + ItemStack ist = new ItemStack(bl, 1, md); + if (FMLCommonHandler.instance().getSide().isClient()) { + CoverRenderer.coverIcons[n] = new IIcon[6]; + + for(int i = 0; i < 6; ++i) { + CoverRenderer.coverIcons[n][i] = bl.getIcon(i, md); + } + } + + if (bl instanceof IBlockHardness) { + miningHardness[n] = ((IBlockHardness)bl).getPrototypicalHardness(md); + } else { + miningHardness[n] = bl.getBlockHardness(null, 0, 0, 0); + } + + materials[n] = ist; + names[n] = name; + hardness[n] = hard; + transparency[n] = tpar; + ((List)coverIndex.computeIfAbsent(ist.getItem(), ix -> new ArrayList())).add(md, n); + + for(CoverLib.IMaterialHandler imh : materialHandlers) { + imh.addMaterial(n); + } + + } + + public static int damageToCoverData(int dmg) { + int hd = dmg >> 8; + int cn = dmg & 0xFF; + switch(hd) { + case 0: + cn |= 65536; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + default: + break; + case 16: + cn |= 131328; + break; + case 17: + cn |= 262656; + break; + case 18: + cn |= 33619968; + break; + case 19: + cn |= 33685760; + break; + case 20: + cn |= 33817088; + break; + case 21: + cn |= 16842752; + break; + case 22: + cn |= 16908544; + break; + case 23: + cn |= 17039872; + break; + case 24: + cn |= 1114880; + break; + case 25: + cn |= 1180672; + break; + case 26: + cn |= 1312000; + break; + case 27: + cn |= 198144; + break; + case 28: + cn |= 329472; + break; + case 29: + cn |= 395264; + break; + case 30: + cn |= 461056; + break; + case 31: + cn |= 1247744; + break; + case 32: + cn |= 1379072; + break; + case 33: + cn |= 1444864; + break; + case 34: + cn |= 1510656; + break; + case 35: + cn |= 33751808; + break; + case 36: + cn |= 33883136; + break; + case 37: + cn |= 33948928; + break; + case 38: + cn |= 34014720; + break; + case 39: + cn |= 16974592; + break; + case 40: + cn |= 17105920; + break; + case 41: + cn |= 17171712; + break; + case 42: + cn |= 17237504; + break; + case 43: + cn |= 50462720; + break; + case 44: + cn |= 50594048; + break; + case 45: + cn |= 50725376; + } + + return cn; + } + + public static int damageToCoverValue(int dmg) { + return damageToCoverData(dmg) & 65535; + } + + public static int coverValueToDamage(int side, int cov) { + int hd = cov >> 8; + int cn = cov & 0xFF; + if (side < 6) { + switch(hd) { + case 1: + cn |= 4096; + break; + case 2: + cn |= 4352; + break; + case 3: + cn |= 6144; + break; + case 4: + cn |= 6400; + break; + case 5: + cn |= 6656; + break; + case 6: + cn |= 6912; + break; + case 7: + cn |= 7168; + break; + case 8: + cn |= 7424; + break; + case 9: + cn |= 7680; + break; + case 10: + cn |= 7936; + break; + case 11: + cn |= 8192; + break; + case 12: + cn |= 8448; + break; + case 13: + cn |= 8704; + } + } else if (side < 14) { + switch(hd) { + case 0: + cn |= 4608; + break; + case 1: + cn |= 4864; + break; + case 2: + cn |= 5120; + break; + case 3: + cn |= 8960; + break; + case 4: + cn |= 9216; + break; + case 5: + cn |= 9472; + break; + case 6: + cn |= 9728; + } + } else if (side < 26) { + switch(hd) { + case 0: + cn |= 5376; + break; + case 1: + cn |= 5632; + break; + case 2: + cn |= 5888; + break; + case 3: + cn |= 9984; + break; + case 4: + cn |= 10240; + break; + case 5: + cn |= 10496; + break; + case 6: + cn |= 10752; + } + } else if (side < 29) { + switch(hd) { + case 0: + cn |= 11008; + break; + case 1: + cn |= 11264; + break; + case 2: + cn |= 11520; + } + } + + return cn; + } + + public static ItemStack convertCoverPlate(int side, int cov) { + return blockCoverPlate == null ? null : new ItemStack(blockCoverPlate, 1, coverValueToDamage(side, cov)); + } + + public static int cornerToCoverMask(int cn) { + switch(cn) { + case 0: + return 21; + case 1: + return 25; + case 2: + return 37; + case 3: + return 41; + case 4: + return 22; + case 5: + return 26; + case 6: + return 38; + default: + return 42; + } + } + + public static int coverToCornerMask(int cn) { + switch(cn) { + case 0: + return 15; + case 1: + return 240; + case 2: + return 85; + case 3: + return 170; + case 4: + return 51; + default: + return 204; + } + } + + public static int coverToStripMask(int cn) { + switch(cn) { + case 0: + return 15; + case 1: + return 3840; + case 2: + return 337; + case 3: + return 674; + case 4: + return 1076; + default: + return 2248; + } + } + + public static int stripToCornerMask(int sn) { + switch(sn) { + case 0: + return 5; + case 1: + return 10; + case 2: + return 3; + case 3: + return 12; + case 4: + return 17; + case 5: + return 34; + case 6: + return 68; + case 7: + return 136; + case 8: + return 80; + case 9: + return 160; + case 10: + return 48; + default: + return 192; + } + } + + public static int stripToCoverMask(int sn) { + switch(sn) { + case 0: + return 5; + case 1: + return 9; + case 2: + return 17; + case 3: + return 33; + case 4: + return 20; + case 5: + return 24; + case 6: + return 36; + case 7: + return 40; + case 8: + return 6; + case 9: + return 10; + case 10: + return 18; + default: + return 34; + } + } + + public static float getThickness(int side, int cov) { + if (side < 6) { + switch(cov >> 8) { + case 0: + return 0.125F; + case 1: + return 0.25F; + case 2: + return 0.5F; + case 3: + return 0.125F; + case 4: + return 0.25F; + case 5: + return 0.5F; + case 6: + return 0.375F; + case 7: + return 0.625F; + case 8: + return 0.75F; + case 9: + return 0.875F; + case 10: + return 0.375F; + case 11: + return 0.625F; + case 12: + return 0.75F; + case 13: + return 0.875F; + default: + return 1.0F; + } + } else { + if (side >= 26 && side < 29) { + switch(cov >> 8) { + case 0: + return 0.125F; + case 1: + return 0.25F; + case 2: + return 0.375F; + } + } + + switch(cov >> 8) { + case 0: + return 0.125F; + case 1: + return 0.25F; + case 2: + return 0.5F; + case 3: + return 0.375F; + case 4: + return 0.625F; + case 5: + return 0.75F; + case 6: + return 0.875F; + default: + return 1.0F; + } + } + } + + public static int getThicknessQuanta(int side, int cov) { + if (side < 6) { + switch(cov >> 8) { + case 0: + return 1; + case 1: + return 2; + case 2: + return 4; + case 3: + return 1; + case 4: + return 2; + case 5: + return 4; + case 6: + return 3; + case 7: + return 5; + case 8: + return 6; + case 9: + return 7; + case 10: + return 3; + case 11: + return 5; + case 12: + return 6; + case 13: + return 7; + default: + return 0; + } + } else { + if (side >= 26 && side < 29) { + switch(cov >> 8) { + case 0: + return 1; + case 1: + return 2; + case 2: + return 3; + } + } + + switch(cov >> 8) { + case 0: + return 1; + case 1: + return 2; + case 2: + return 4; + case 3: + return 3; + case 4: + return 5; + case 5: + return 6; + case 6: + return 7; + default: + return 0; + } + } + } + + public static boolean checkPlacement(int covm, short[] covs, int cons, boolean jacket) { + CoverLib.PlacementValidator pv = new CoverLib.PlacementValidator(covm, covs); + return pv.checkPlacement(cons, jacket); + } + + private static boolean canAddCover(World world, MovingObjectPosition mop, int item) { + if (world.canPlaceEntityOnSide(blockCoverPlate, mop.blockX, mop.blockY, mop.blockZ, false, mop.sideHit, null, null)) { + return true; + } else { + ICoverable icv = CoreLib.getTileEntity(world, mop.blockX, mop.blockY, mop.blockZ, ICoverable.class); + return icv != null && icv.canAddCover(mop.subHit, item); + } + } + + public static int extractCoverSide(MovingObjectPosition src) { + byte tr = 0; + double rpx = src.hitVec.xCoord - (double)src.blockX - 0.5; + double rpy = src.hitVec.yCoord - (double)src.blockY - 0.5; + double rpz = src.hitVec.zCoord - (double)src.blockZ - 0.5; + float sbw = 0.25F; + switch(src.sideHit) { + case 0: + case 1: + if (rpz > (double)(-sbw) && rpz < (double)sbw && rpx > (double)(-sbw) && rpx < (double)sbw) { + return src.sideHit; + } else if (rpz > rpx) { + if (rpz > -rpx) { + return 3; + } + + return 4; + } else { + if (rpz > -rpx) { + return 5; + } + + return 2; + } + case 2: + case 3: + if (rpy > (double)(-sbw) && rpy < (double)sbw && rpx > (double)(-sbw) && rpx < (double)sbw) { + return src.sideHit; + } else if (rpy > rpx) { + if (rpy > -rpx) { + return 1; + } + + return 4; + } else { + if (rpy > -rpx) { + return 5; + } + + return 0; + } + case 4: + case 5: + if (rpy > (double)(-sbw) && rpy < (double)sbw && rpz > (double)(-sbw) && rpz < (double)sbw) { + return src.sideHit; + } else if (rpy > rpz) { + if (rpy > -rpz) { + return 1; + } + + return 2; + } else { + if (rpy > -rpz) { + return 3; + } + + return 0; + } + default: + return tr; + } + } + + public static int extractCoverAxis(MovingObjectPosition src) { + switch(src.sideHit) { + case 0: + return 0; + case 1: + return src.hitVec.yCoord - (double)src.blockY > 0.5 ? 1 : 0; + case 2: + return 0; + case 3: + return src.hitVec.zCoord - (double)src.blockZ > 0.5 ? 1 : 0; + default: + return src.hitVec.xCoord - (double)src.blockX > 0.5 ? 1 : 0; + } + } + + private static void stepDir(MovingObjectPosition mop) { + switch(mop.sideHit) { + case 0: + --mop.blockY; + break; + case 1: + ++mop.blockY; + break; + case 2: + --mop.blockZ; + break; + case 3: + ++mop.blockZ; + break; + case 4: + --mop.blockX; + break; + default: + ++mop.blockX; + } + + } + + private static boolean isClickOutside(MovingObjectPosition mop) { + if (mop.subHit < 0) { + return true; + } else if (mop.subHit < 6) { + return mop.sideHit != (mop.subHit ^ 1); + } else if (mop.subHit < 14) { + int fc = mop.subHit - 6; + fc = fc >> 2 | (fc & 3) << 1; + return ((mop.sideHit ^ fc >> (mop.sideHit >> 1)) & 1) == 0; + } else if (mop.subHit < 26) { + int fc = mop.subHit - 14; + fc = stripToCoverMask(fc); + return (fc & 1 << (mop.sideHit ^ 1)) <= 0; + } else { + return mop.subHit < 29 || mop.subHit == 29; + } + } + + public static MovingObjectPosition getPlacement(World world, MovingObjectPosition src, int item) { + MovingObjectPosition tr = new MovingObjectPosition(src.blockX, src.blockY, src.blockZ, src.sideHit, src.hitVec); + int cval = damageToCoverValue(item); + int dir; + switch(item >> 8) { + case 0: + case 16: + case 17: + case 24: + case 25: + case 26: + case 27: + case 28: + case 29: + case 30: + case 31: + case 32: + case 33: + case 34: + dir = extractCoverSide(src); + if (dir != tr.sideHit) { + tr.subHit = dir; + if (!isClickOutside(src) && canAddCover(world, tr, cval)) { + return tr; + } else { + stepDir(tr); + if (canAddCover(world, tr, cval)) { + return tr; + } + + return null; + } + } else { + if (!isClickOutside(src)) { + tr.subHit = dir ^ 1; + if (canAddCover(world, tr, cval)) { + return tr; + } + } + + tr.subHit = dir; + if (canAddCover(world, tr, cval)) { + return tr; + } else if (!isClickOutside(src)) { + return null; + } else { + stepDir(tr); + tr.subHit = dir ^ 1; + if (canAddCover(world, tr, cval)) { + return tr; + } + + return null; + } + } + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + default: + return null; + case 18: + case 19: + case 20: + case 35: + case 36: + case 37: + case 38: + double rpx = src.hitVec.xCoord - (double)src.blockX; + double rpy = src.hitVec.yCoord - (double)src.blockY; + double rpz = src.hitVec.zCoord - (double)src.blockZ; + dir = 0; + if (rpz > 0.5) { + ++dir; + } + + if (rpx > 0.5) { + dir += 2; + } + + if (rpy > 0.5) { + dir += 4; + } + + switch(src.sideHit) { + case 0: + dir &= 3; + break; + case 1: + dir |= 4; + break; + case 2: + dir &= 6; + break; + case 3: + dir |= 1; + break; + case 4: + dir &= 5; + break; + default: + dir |= 2; + } + + int dir2; + switch(src.sideHit) { + case 0: + case 1: + dir2 = dir ^ 4; + break; + case 2: + case 3: + dir2 = dir ^ 1; + break; + default: + dir2 = dir ^ 2; + } + + if (isClickOutside(src)) { + tr.subHit = dir2 + 6; + stepDir(tr); + if (canAddCover(world, tr, cval)) { + return tr; + } + + return null; + } else { + tr.subHit = dir2 + 6; + if (canAddCover(world, tr, cval)) { + return tr; + } else { + tr.subHit = dir + 6; + if (canAddCover(world, tr, cval)) { + return tr; + } + + return null; + } + } + case 21: + case 22: + case 23: + case 39: + case 40: + case 41: + case 42: + dir = extractCoverSide(src); + if (dir == tr.sideHit) { + return null; + } else { + int csm = coverToStripMask(dir); + if (!isClickOutside(src)) { + int csm2 = csm & coverToStripMask(tr.sideHit ^ 1); + tr.subHit = 14 + Integer.numberOfTrailingZeros(csm2); + if (canAddCover(world, tr, cval)) { + return tr; + } else { + csm2 = csm & coverToStripMask(tr.sideHit); + tr.subHit = 14 + Integer.numberOfTrailingZeros(csm2); + if (canAddCover(world, tr, cval)) { + return tr; + } + + return null; + } + } else { + stepDir(tr); + int csm2 = csm & coverToStripMask(tr.sideHit ^ 1); + tr.subHit = 14 + Integer.numberOfTrailingZeros(csm2); + if (canAddCover(world, tr, cval)) { + return tr; + } + + return null; + } + } + case 43: + case 44: + case 45: + dir = extractCoverSide(src); + if (dir != tr.sideHit && dir != (tr.sideHit ^ 1)) { + return null; + } else { + if (isClickOutside(src)) { + stepDir(tr); + } + + tr.subHit = (dir >> 1) + 26; + return canAddCover(world, tr, cval) ? tr : null; + } + } + } + + public static void replaceWithCovers(World world, int x, int y, int z, int sides, short[] covers) { + if (blockCoverPlate != null && sides != 0) { + world.setBlock(x, y, z, blockCoverPlate, 0, 3); + TileCovered tc = CoreLib.getTileEntity(world, x, y, z, TileCovered.class); + if (tc != null) { + tc.CoverSides = sides; + tc.Covers = covers; + RedPowerLib.updateIndirectNeighbors(world, x, y, z, blockCoverPlate); + tc.updateBlock(); + } + } + + } + + public static boolean tryMakeCompatible(World world, WorldCoord wc, Block bid, int dmg) { + TileCovered tc = CoreLib.getTileEntity(world, wc, TileCovered.class); + if (tc == null) { + return false; + } else { + int hb = dmg >> 8; + int lb = dmg & 0xFF; + int xid = tc.getExtendedID(); + if (xid == hb) { + return tc.getExtendedMetadata() == lb; + } else if (xid != 0) { + return false; + } else { + short[] covs = tc.Covers; + int cs = tc.CoverSides; + if (!world.setBlock(wc.x, wc.y, wc.z, bid, hb, 3)) { + return false; + } else { + tc = CoreLib.getTileEntity(world, wc, TileCovered.class); + if (tc == null) { + return true; + } else { + tc.Covers = covs; + tc.CoverSides = cs; + tc.setExtendedMetadata(lb); + return true; + } + } + } + } + } + + public static ItemStack getItemStack(int n) { + return materials[n]; + } + + public static Block getBlock(int n) { + ItemStack ist = materials[n]; + return Block.getBlockFromItem(ist.getItem()); + } + + public static int getMeta(int n) { + ItemStack ist = materials[n]; + return ist.getItemDamage(); + } + + public static String getName(int n) { + return names[n]; + } + + public static int getHardness(int n) { + return hardness[n]; + } + + public static float getMiningHardness(int n) { + return miningHardness[n]; + } + + public static boolean isTransparent(int n) { + return transparency[n]; + } + + public interface IMaterialHandler { + void addMaterial(int var1); + } + + private static class PlacementValidator { + public int sidemask = 0; + public int cornermask = 0; + public int fillcornermask = 0; + public int hollowcornermask = 0; + public int thickfaces = 0; + public int covm; + public short[] covs; + public int[] quanta = new int[29]; + + public PlacementValidator(int cm, short[] cs) { + this.covm = cm; + this.covs = cs; + } + + public boolean checkThickFace(int type) { + for(int i = 0; i < 6; ++i) { + if ((this.covm & 1 << i) != 0 && this.covs[i] >> 8 == type) { + int t = CoverLib.coverToCornerMask(i); + if ((this.fillcornermask & t) > 0) { + return false; + } + + this.fillcornermask |= t; + this.sidemask |= CoverLib.coverToStripMask(i); + } + } + + return true; + } + + public boolean checkThickSide(int type) { + for(int i = 0; i < 12; ++i) { + if ((this.covm & 1 << i + 14) != 0 && this.covs[i + 14] >> 8 == type) { + int t = CoverLib.stripToCornerMask(i); + if ((this.fillcornermask & t) > 0) { + return false; + } + + this.fillcornermask |= t; + this.sidemask |= 1 << i; + } + } + + return true; + } + + public boolean checkThickCorner(int type) { + for(int i = 0; i < 8; ++i) { + if ((this.covm & 1 << i + 6) != 0 && this.covs[i + 6] >> 8 == type) { + int t = 1 << i; + if ((this.fillcornermask & t) == t) { + return false; + } + + this.fillcornermask |= t; + } + } + + return true; + } + + public boolean checkFace(int type) { + for(int i = 0; i < 6; ++i) { + if ((this.covm & 1 << i) != 0 && this.covs[i] >> 8 == type) { + int t = CoverLib.coverToCornerMask(i); + if ((this.fillcornermask & t) == t) { + return false; + } + + this.cornermask |= t; + this.sidemask |= CoverLib.coverToStripMask(i); + } + } + + return true; + } + + public boolean checkSide(int type) { + for(int i = 0; i < 12; ++i) { + if ((this.covm & 1 << i + 14) != 0 && this.covs[i + 14] >> 8 == type) { + int t = CoverLib.stripToCornerMask(i); + if ((this.fillcornermask & t) == t) { + return false; + } + + if ((this.sidemask & 1 << i) > 0) { + return false; + } + + this.cornermask |= t; + this.sidemask |= 1 << i; + } + } + + return true; + } + + public boolean checkCorner(int type) { + for(int i = 0; i < 8; ++i) { + if ((this.covm & 1 << i + 6) != 0 && this.covs[i + 6] >> 8 == type) { + int t = 1 << i; + if ((this.cornermask & t) == t) { + return false; + } + + this.cornermask |= t; + } + } + + return true; + } + + public boolean checkHollow(int type) { + for(int i = 0; i < 6; ++i) { + if ((this.covm & 1 << i) != 0 && this.covs[i] >> 8 == type) { + int t = CoverLib.coverToCornerMask(i); + if ((this.cornermask & t) > 0) { + return false; + } + + this.cornermask |= t; + this.hollowcornermask |= t; + t = CoverLib.coverToStripMask(i); + if ((this.sidemask & t) > 0) { + return false; + } + + this.sidemask |= t; + } + } + + return true; + } + + public boolean checkHollowCover(int type) { + int ocm = 0; + int osm = 0; + + for(int i = 0; i < 6; ++i) { + if ((this.covm & 1 << i) != 0 && this.covs[i] >> 8 == type) { + int t = CoverLib.coverToCornerMask(i); + if ((this.cornermask & t) > 0) { + return false; + } + + ocm |= t; + t = CoverLib.coverToStripMask(i); + if ((this.sidemask & t) > 0) { + return false; + } + + osm |= t; + } + } + + this.cornermask |= ocm; + this.sidemask |= osm; + return true; + } + + public void calcQuanta() { + for(int i = 0; i < 29; ++i) { + if ((this.covm & 1 << i) == 0) { + this.quanta[i] = 0; + } else { + this.quanta[i] = CoverLib.getThicknessQuanta(i, this.covs[i]); + } + } + + } + + private boolean checkOverlap(int a, int b, int c, int d) { + a = this.quanta[a]; + b = this.quanta[b]; + c = this.quanta[c]; + d = this.quanta[d]; + return a + b > 8 || a + c > 8 || a + d > 8 || b + c > 8 || b + d > 8 || c + d > 8; + } + + public boolean checkImpingement() { + for(int i = 0; i < 6; i += 2) { + if (this.quanta[i] + this.quanta[i + 1] > 8) { + return false; + } + } + + if (this.checkOverlap(14, 15, 22, 23)) { + return false; + } else if (this.checkOverlap(16, 17, 24, 25)) { + return false; + } else if (this.checkOverlap(18, 19, 20, 22)) { + return false; + } else if (this.checkOverlap(6, 7, 8, 9)) { + return false; + } else if (this.checkOverlap(10, 11, 12, 13)) { + return false; + } else if (this.checkOverlap(6, 8, 10, 12)) { + return false; + } else if (this.checkOverlap(7, 9, 11, 13)) { + return false; + } else if (this.checkOverlap(6, 7, 10, 11)) { + return false; + } else if (this.checkOverlap(8, 9, 12, 13)) { + return false; + } else { + for(int var8 = 0; var8 < 6; ++var8) { + int q1 = this.quanta[var8]; + if (q1 != 0) { + int j = CoverLib.coverToCornerMask(var8); + int q2 = CoverLib.coverToStripMask(var8); + int q21 = CoverLib.coverToStripMask(var8 ^ 1); + + for(int j1 = 0; j1 < 8; ++j1) { + int q22 = this.quanta[6 + j1]; + if ((j & 1 << j1) == 0) { + if (q1 + q22 > 8) { + return false; + } + } else if (q22 > 0 && q22 < q1) { + return false; + } + } + + for(int var21 = 0; var21 < 12; ++var21) { + int q22 = this.quanta[14 + var21]; + if ((q21 & 1 << var21) > 0) { + if (q1 + q22 > 8) { + return false; + } + } else if ((q2 & 1 << var21) > 0 && q22 > 0 && q22 < q1) { + return false; + } + } + } + } + + for(int var9 = 0; var9 < 12; ++var9) { + int q1 = this.quanta[14 + var9]; + if (q1 != 0) { + int j = CoverLib.stripToCornerMask(var9); + + for(int q2 = 0; q2 < 8; ++q2) { + int q21 = this.quanta[6 + q2]; + if ((j & 1 << q2) == 0) { + if (q1 + q21 > 8) { + return false; + } + } else if (q21 > 0 && q21 < q1) { + return false; + } + } + } + } + + for(int var10 = 0; var10 < 3; ++var10) { + int q1 = this.quanta[26 + var10]; + if (q1 != 0) { + for(int j = 0; j < 8; ++j) { + int q2 = this.quanta[6 + j]; + if (q1 + q2 > 4) { + return false; + } + } + + for(int var15 = 0; var15 < 12; ++var15) { + int q2 = this.quanta[14 + var15]; + if (q1 + q2 > 4) { + return false; + } + } + + for(int var16 = 0; var16 < 6; ++var16) { + if (var16 >> 1 != var10 && this.quanta[var16] + q1 > 4) { + return false; + } + } + } + } + + return true; + } + } + + public boolean checkPlacement(int cons, boolean jacket) { + this.calcQuanta(); + if (!this.checkImpingement()) { + return false; + } else if (!this.checkThickFace(9)) { + return false; + } else if (!this.checkThickSide(6)) { + return false; + } else if (!this.checkThickCorner(6)) { + return false; + } else if (!this.checkThickFace(8)) { + return false; + } else if (!this.checkThickSide(5)) { + return false; + } else if (!this.checkThickCorner(5)) { + return false; + } else if (!this.checkThickFace(7)) { + return false; + } else if (!this.checkThickSide(4)) { + return false; + } else if (!this.checkThickCorner(4)) { + return false; + } else if (this.cornermask > 0 && cons > 0) { + return false; + } else if (!this.checkThickFace(2)) { + return false; + } else if (!this.checkThickSide(2)) { + return false; + } else if (!this.checkThickCorner(2)) { + return false; + } else { + this.cornermask = this.fillcornermask; + if (!this.checkFace(6)) { + return false; + } else if (!this.checkSide(3)) { + return false; + } else if (!this.checkCorner(3)) { + return false; + } else { + if ((this.covm & 469762048) > 0) { + if (jacket) { + return false; + } + + if (cons > 0) { + return false; + } + } + + for(int i = 0; i < 6; ++i) { + if ((cons & 1 << i) != 0 && (this.cornermask & CoverLib.coverToCornerMask(i)) > 0) { + return false; + } + } + + if (!this.checkFace(1)) { + return false; + } else if (!this.checkSide(1)) { + return false; + } else if (!this.checkCorner(1)) { + return false; + } else if (!jacket || this.cornermask <= 0 && this.sidemask <= 0) { + if (!this.checkHollow(13)) { + return false; + } else if (!this.checkHollow(12)) { + return false; + } else if (!this.checkHollow(11)) { + return false; + } else if (!this.checkHollow(10)) { + return false; + } else if (!this.checkHollow(5)) { + return false; + } else { + for(int var5 = 0; var5 < 6; ++var5) { + if ((cons & 1 << var5) != 0 && (this.hollowcornermask & CoverLib.coverToCornerMask(var5)) > 0) { + return false; + } + } + + if (!this.checkHollow(4)) { + return false; + } else if (!this.checkHollowCover(3)) { + return false; + } else if (!this.checkFace(0)) { + return false; + } else if (!this.checkSide(0)) { + return false; + } else if (!this.checkCorner(0)) { + return false; + } else { + for(int var6 = 0; var6 < 12; ++var6) { + if ((this.covm & 1 << var6 + 14) != 0) { + int t = CoverLib.stripToCoverMask(var6); + if ((cons & t) == t) { + return false; + } + } + } + + return true; + } + } + } else { + return false; + } + } + } + } + } +} diff --git a/src/main/java/com/eloraam/redpower/core/CoverRecipe.java b/src/main/java/com/eloraam/redpower/core/CoverRecipe.java new file mode 100644 index 0000000..83a3172 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/CoverRecipe.java @@ -0,0 +1,346 @@ +package com.eloraam.redpower.core; + +import com.eloraam.redpower.base.ItemHandsaw; +import net.minecraft.inventory.InventoryCrafting; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.world.World; + +public class CoverRecipe implements IRecipe { + private static ItemStack newCover(int num, int type, int mat) { + return new ItemStack(CoverLib.blockCoverPlate, num, type << 8 | mat); + } + + private ItemStack getSawRecipe(InventoryCrafting inv, ItemStack saw, int sawpos, ItemStack mat, int matpos) { + int sp1 = sawpos & 15; + int sp2 = sawpos >> 4; + int mp1 = matpos & 15; + int mp2 = matpos >> 4; + int dmg = -1; + int mn1; + if (mat.getItem() == Item.getItemFromBlock(CoverLib.blockCoverPlate)) { + dmg = mat.getItemDamage(); + mn1 = dmg & 0xFF; + dmg >>= 8; + } else { + Integer ihs = CoverLib.getMaterial(mat); + if (ihs == null) { + return null; + } + + mn1 = ihs; + } + + ItemHandsaw ihs1 = (ItemHandsaw)saw.getItem(); + if (ihs1.getSharpness() < CoverLib.getHardness(mn1)) { + return null; + } else if (sp1 != mp1 || sp2 != mp2 + 1 && sp2 != mp2 - 1) { + if (sp2 == mp2 && (sp1 == mp1 + 1 || sp1 == mp1 - 1)) { + switch(dmg) { + case 0: + return newCover(2, 21, mn1); + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 18: + case 19: + case 20: + case 24: + case 25: + case 26: + case 31: + case 32: + case 33: + case 34: + case 35: + case 36: + case 37: + case 38: + default: + return null; + case 16: + return newCover(2, 22, mn1); + case 17: + return newCover(2, 23, mn1); + case 21: + return newCover(2, 18, mn1); + case 22: + return newCover(2, 19, mn1); + case 23: + return newCover(2, 20, mn1); + case 27: + return newCover(2, 39, mn1); + case 28: + return newCover(2, 40, mn1); + case 29: + return newCover(2, 41, mn1); + case 30: + return newCover(2, 42, mn1); + case 39: + return newCover(2, 35, mn1); + case 40: + return newCover(2, 36, mn1); + case 41: + return newCover(2, 37, mn1); + case 42: + return newCover(2, 38, mn1); + } + } else { + return null; + } + } else { + switch(dmg) { + case -1: + return newCover(2, 17, mn1); + case 16: + return newCover(2, 0, mn1); + case 17: + return newCover(2, 16, mn1); + case 25: + return newCover(2, 24, mn1); + case 26: + return newCover(2, 25, mn1); + case 29: + return newCover(2, 27, mn1); + case 33: + return newCover(2, 31, mn1); + default: + return null; + } + } + } + + private ItemStack getColumnRecipe(ItemStack mat) { + if (mat.getItem() != Item.getItemFromBlock(CoverLib.blockCoverPlate)) { + return null; + } else { + int dmg = mat.getItemDamage(); + int mn = dmg & 0xFF; + dmg >>= 8; + switch(dmg) { + case 22: + return newCover(1, 43, mn); + case 23: + return newCover(1, 44, mn); + case 41: + return newCover(1, 45, mn); + case 43: + return newCover(1, 22, mn); + case 44: + return newCover(1, 23, mn); + case 45: + return newCover(1, 41, mn); + default: + return null; + } + } + } + + private ItemStack getMergeRecipe(int mn, int tth, int ic) { + int mc = mn >> 20; + mn &= 255; + switch(mc) { + case 0: + switch(tth) { + case 2: + return newCover(1, 16, mn); + case 3: + return newCover(1, 27, mn); + case 4: + return newCover(1, 17, mn); + case 5: + return newCover(1, 28, mn); + case 6: + return newCover(1, 29, mn); + case 7: + return newCover(1, 30, mn); + case 8: + return CoverLib.getItemStack(mn); + default: + return null; + } + case 1: + switch(tth) { + case 2: + return newCover(1, 25, mn); + case 3: + return newCover(1, 31, mn); + case 4: + return newCover(1, 26, mn); + case 5: + return newCover(1, 32, mn); + case 6: + return newCover(1, 33, mn); + case 7: + return newCover(1, 34, mn); + case 8: + return CoverLib.getItemStack(mn); + default: + return null; + } + case 16: + switch(tth) { + case 2: + return newCover(1, 0, mn); + case 4: + return newCover(1, 16, mn); + case 8: + return newCover(1, 17, mn); + case 16: + return CoverLib.getItemStack(mn); + default: + return null; + } + case 32: + if (ic == 2) { + switch(tth) { + case 2: + return newCover(1, 21, mn); + case 4: + return newCover(1, 22, mn); + case 8: + return newCover(1, 23, mn); + } + } else { + switch(tth) { + case 4: + return newCover(1, 0, mn); + case 8: + return newCover(1, 16, mn); + case 16: + return newCover(1, 17, mn); + case 32: + return CoverLib.getItemStack(mn); + } + } + default: + return null; + } + } + + private ItemStack getHollowRecipe(int mn) { + int mc = mn >> 8 & 0xFF; + mn &= 255; + switch(mc) { + case 0: + return newCover(8, 24, mn); + case 16: + return newCover(8, 25, mn); + case 17: + return newCover(8, 26, mn); + case 27: + return newCover(8, 31, mn); + case 28: + return newCover(8, 32, mn); + case 29: + return newCover(8, 33, mn); + case 30: + return newCover(8, 34, mn); + default: + return null; + } + } + + private int getMicroClass(ItemStack ist) { + if (ist.getItem() != Item.getItemFromBlock(CoverLib.blockCoverPlate)) { + return -1; + } else { + int dmg = ist.getItemDamage(); + return CoverLib.damageToCoverData(dmg); + } + } + + private ItemStack findResult(InventoryCrafting inv) { + ItemStack saw = null; + ItemStack mat = null; + boolean bad = false; + boolean allmicro = true; + boolean strict = true; + int sp = 0; + int mp = 0; + int mn = -1; + int tth = 0; + int ic = 0; + + for(int i = 0; i < 3; ++i) { + for(int j = 0; j < 3; ++j) { + ItemStack ist = inv.getStackInRowAndColumn(i, j); + if (ist != null) { + if (ist.getItem() instanceof ItemHandsaw) { + if (saw != null) { + bad = true; + } else { + saw = ist; + sp = i + j * 16; + } + } else if (mat == null) { + mat = ist; + mp = i + j * 16; + mn = this.getMicroClass(ist); + if (mn >= 0) { + tth += mn >> 16 & 15; + } else { + allmicro = false; + } + + ic = 1; + } else { + bad = true; + if (allmicro) { + int t = this.getMicroClass(ist); + if (((t ^ mn) & -1048321) != 0) { + allmicro = false; + } else { + if (t != mn) { + strict = false; + } + + tth += t >> 16 & 15; + ++ic; + } + } + } + } + } + } + + if (saw != null && mat != null && !bad) { + return this.getSawRecipe(inv, saw, sp, mat, mp); + } else if (saw == null && mat != null && !bad) { + return this.getColumnRecipe(mat); + } else if (!allmicro || !bad || saw != null) { + return null; + } else { + return ic == 8 && strict && inv.getStackInRowAndColumn(1, 1) == null && mn >> 20 == 0 ? this.getHollowRecipe(mn) : this.getMergeRecipe(mn, tth, ic); + } + } + + public boolean matches(InventoryCrafting inv, World world) { + return this.findResult(inv) != null; + } + + public int getRecipeSize() { + return 9; + } + + public ItemStack getCraftingResult(InventoryCrafting inv) { + return this.findResult(inv).copy(); + } + + public ItemStack getRecipeOutput() { + return new ItemStack(CoverLib.blockCoverPlate, 1, 0); + } +} diff --git a/src/main/java/com/eloraam/redpower/core/CoverRenderer.java b/src/main/java/com/eloraam/redpower/core/CoverRenderer.java new file mode 100644 index 0000000..919f92e --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/CoverRenderer.java @@ -0,0 +1,546 @@ +package com.eloraam.redpower.core; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + +@SideOnly(Side.CLIENT) +public class CoverRenderer { + private float cx1; + private float cx2; + private float cy1; + private float cy2; + private float cz1; + private float cz2; + private float[] x1 = new float[4]; + private float[] x2 = new float[4]; + private float[] y1 = new float[4]; + private float[] y2 = new float[4]; + private float[] z1 = new float[4]; + private float[] z2 = new float[4]; + private short[] covs; + private int covmask; + private int covmaskt; + private int covmaskh; + private int covmasko; + public static IIcon[][] coverIcons = new IIcon[256][]; + protected RenderContext context; + + public CoverRenderer(RenderContext ctx) { + this.context = ctx; + } + + public void start() { + this.cx1 = 0.0F; + this.cx2 = 1.0F; + this.cy1 = 0.0F; + this.cy2 = 1.0F; + this.cz1 = 0.0F; + this.cz2 = 1.0F; + } + + public void startShrink(float sh) { + this.cx1 = sh; + this.cx2 = 1.0F - sh; + this.cy1 = sh; + this.cy2 = 1.0F - sh; + this.cz1 = sh; + this.cz2 = 1.0F - sh; + } + + public void sizeHollow(int part, int s) { + switch(part) { + case 0: + case 1: + if (s == 0) { + this.context.boxSize2.x = 0.25; + } + + if (s == 1) { + this.context.boxSize1.x = 0.75; + } + + if (s > 1) { + this.context.boxSize1.x = 0.25; + this.context.boxSize2.x = 0.75; + } + + if (s == 2) { + this.context.boxSize2.z = 0.25; + } + + if (s == 3) { + this.context.boxSize1.z = 0.75; + } + break; + case 2: + case 3: + if (s == 0) { + this.context.boxSize2.x = 0.25; + } + + if (s == 1) { + this.context.boxSize1.x = 0.75; + } + + if (s > 1) { + this.context.boxSize1.x = 0.25; + this.context.boxSize2.x = 0.75; + } + + if (s == 2) { + this.context.boxSize2.y = 0.25; + } + + if (s == 3) { + this.context.boxSize1.y = 0.75; + } + break; + default: + if (s == 0) { + this.context.boxSize2.z = 0.25; + } + + if (s == 1) { + this.context.boxSize1.z = 0.75; + } + + if (s > 1) { + this.context.boxSize1.z = 0.25; + this.context.boxSize2.z = 0.75; + } + + if (s == 2) { + this.context.boxSize2.y = 0.25; + } + + if (s == 3) { + this.context.boxSize1.y = 0.75; + } + } + + } + + public int innerFace(int part, int s) { + int m; + switch(part) { + case 0: + case 1: + m = 67637280; + break; + case 2: + case 3: + m = 16912416; + break; + default: + m = 16909320; + } + + return m >> s * 8; + } + + public boolean sizeColumnSpoke(int part, boolean n1, float f) { + part = part - 26 + (n1 ? 3 : 0); + switch(part) { + case 0: + this.context.boxSize2.y = 0.5 - (double)f; + return 0.5 - (double)f > (double)this.cy1; + case 1: + this.context.boxSize2.z = 0.5 - (double)f; + return 0.5 - (double)f > (double)this.cz1; + case 2: + this.context.boxSize2.x = 0.5 - (double)f; + return 0.5 - (double)f > (double)this.cx1; + case 3: + this.context.boxSize2.y = (double)this.cy2; + this.context.boxSize1.y = 0.5 + (double)f; + return 0.5 + (double)f < (double)this.cy2; + case 4: + this.context.boxSize2.z = (double)this.cz2; + this.context.boxSize1.z = 0.5 + (double)f; + return 0.5 + (double)f < (double)this.cz2; + case 5: + this.context.boxSize2.x = (double)this.cx2; + this.context.boxSize1.x = 0.5 + (double)f; + return 0.5 + (double)f < (double)this.cx2; + default: + return false; + } + } + + public void setSize(int part, float th) { + switch(part) { + case 0: + this.context.setSize((double)this.cx1, 0.0, (double)this.cz1, (double)this.cx2, (double)th, (double)this.cz2); + this.cy1 = th; + break; + case 1: + this.context.setSize((double)this.cx1, (double)(1.0F - th), (double)this.cz1, (double)this.cx2, 1.0, (double)this.cz2); + this.cy2 = 1.0F - th; + break; + case 2: + this.context.setSize((double)this.cx1, (double)this.cy1, 0.0, (double)this.cx2, (double)this.cy2, (double)th); + this.cz1 = th; + break; + case 3: + this.context.setSize((double)this.cx1, (double)this.cy1, (double)(1.0F - th), (double)this.cx2, (double)this.cy2, 1.0); + this.cz2 = 1.0F - th; + break; + case 4: + this.context.setSize(0.0, (double)this.cy1, (double)this.cz1, (double)th, (double)this.cy2, (double)this.cz2); + this.cx1 = th; + break; + case 5: + this.context.setSize((double)(1.0F - th), (double)this.cy1, (double)this.cz1, 1.0, (double)this.cy2, (double)this.cz2); + this.cx2 = 1.0F - th; + break; + case 6: + this.context.setSize((double)this.cx1, (double)this.cy1, (double)this.cz1, (double)th, (double)th, (double)th); + this.x1[0] = th; + this.y1[0] = th; + this.z1[0] = th; + break; + case 7: + this.context.setSize((double)this.cx1, (double)this.cy1, (double)(1.0F - th), (double)th, (double)th, (double)this.cz2); + this.x1[1] = th; + this.y1[1] = th; + this.z2[0] = 1.0F - th; + break; + case 8: + this.context.setSize((double)(1.0F - th), (double)this.cy1, (double)this.cz1, (double)this.cx2, (double)th, (double)th); + this.x2[0] = 1.0F - th; + this.y1[2] = th; + this.z1[1] = th; + break; + case 9: + this.context.setSize((double)(1.0F - th), (double)this.cy1, (double)(1.0F - th), (double)this.cx2, (double)th, (double)this.cz2); + this.x2[1] = 1.0F - th; + this.y1[3] = th; + this.z2[1] = 1.0F - th; + break; + case 10: + this.context.setSize((double)this.cx1, (double)(1.0F - th), (double)this.cz1, (double)th, (double)this.cy2, (double)th); + this.x1[2] = th; + this.y2[0] = 1.0F - th; + this.z1[2] = th; + break; + case 11: + this.context.setSize((double)this.cx1, (double)(1.0F - th), (double)(1.0F - th), (double)th, (double)this.cy2, (double)this.cz2); + this.x1[3] = th; + this.y2[1] = 1.0F - th; + this.z2[2] = 1.0F - th; + break; + case 12: + this.context.setSize((double)(1.0F - th), (double)(1.0F - th), (double)this.cz1, (double)this.cx2, (double)this.cy2, (double)th); + this.x2[2] = 1.0F - th; + this.y2[2] = 1.0F - th; + this.z1[3] = th; + break; + case 13: + this.context.setSize((double)(1.0F - th), (double)(1.0F - th), (double)(1.0F - th), (double)this.cx2, (double)this.cy2, (double)this.cz2); + this.x2[3] = 1.0F - th; + this.y2[3] = 1.0F - th; + this.z2[3] = 1.0F - th; + break; + case 14: + this.context.setSize((double)this.x1[0], (double)this.cy1, (double)this.cz1, (double)this.x2[0], (double)th, (double)th); + this.z1[0] = Math.max(this.z1[0], th); + this.z1[1] = Math.max(this.z1[1], th); + this.y1[0] = Math.max(this.y1[0], th); + this.y1[2] = Math.max(this.y1[2], th); + break; + case 15: + this.context.setSize((double)this.x1[1], (double)this.cy1, (double)(1.0F - th), (double)this.x2[1], (double)th, (double)this.cz2); + this.z2[0] = Math.min(this.z2[0], 1.0F - th); + this.z2[1] = Math.min(this.z2[1], 1.0F - th); + this.y1[1] = Math.max(this.y1[1], th); + this.y1[3] = Math.max(this.y1[3], th); + break; + case 16: + this.context.setSize((double)this.cx1, (double)this.cy1, (double)this.z1[0], (double)th, (double)th, (double)this.z2[0]); + this.x1[0] = Math.max(this.x1[0], th); + this.x1[1] = Math.max(this.x1[1], th); + this.y1[0] = Math.max(this.y1[0], th); + this.y1[1] = Math.max(this.y1[1], th); + break; + case 17: + this.context.setSize((double)(1.0F - th), (double)this.cy1, (double)this.z1[1], (double)this.cx2, (double)th, (double)this.z2[1]); + this.x2[0] = Math.min(this.x2[0], 1.0F - th); + this.x2[1] = Math.min(this.x2[1], 1.0F - th); + this.y1[2] = Math.max(this.y1[2], th); + this.y1[3] = Math.max(this.y1[3], th); + break; + case 18: + this.context.setSize((double)this.cx1, (double)this.y1[0], (double)this.cz1, (double)th, (double)this.y2[0], (double)th); + this.x1[0] = Math.max(this.x1[0], th); + this.x1[2] = Math.max(this.x1[2], th); + this.z1[0] = Math.max(this.z1[0], th); + this.z1[2] = Math.max(this.z1[2], th); + break; + case 19: + this.context.setSize((double)this.cx1, (double)this.y1[1], (double)(1.0F - th), (double)th, (double)this.y2[1], (double)this.cz2); + this.x1[1] = Math.max(this.x1[1], th); + this.x1[3] = Math.max(this.x1[3], th); + this.z2[0] = Math.min(this.z2[0], 1.0F - th); + this.z2[2] = Math.min(this.z2[2], 1.0F - th); + break; + case 20: + this.context.setSize((double)(1.0F - th), (double)this.y1[2], (double)this.cz1, (double)this.cx2, (double)this.y2[2], (double)th); + this.x2[0] = Math.min(this.x2[0], 1.0F - th); + this.x2[2] = Math.min(this.x2[2], 1.0F - th); + this.z1[1] = Math.max(this.z1[1], th); + this.z1[3] = Math.max(this.z1[3], th); + break; + case 21: + this.context.setSize((double)(1.0F - th), (double)this.y1[3], (double)(1.0F - th), (double)this.cx2, (double)this.y2[3], (double)this.cz2); + this.x2[1] = Math.min(this.x2[1], 1.0F - th); + this.x2[3] = Math.min(this.x2[3], 1.0F - th); + this.z2[1] = Math.min(this.z2[1], 1.0F - th); + this.z2[3] = Math.min(this.z2[3], 1.0F - th); + break; + case 22: + this.context.setSize((double)this.x1[2], (double)(1.0F - th), (double)this.cz1, (double)this.x2[2], (double)this.cy2, (double)th); + this.z1[2] = Math.max(this.z1[2], th); + this.z1[3] = Math.max(this.z1[3], th); + this.y2[0] = Math.min(this.y2[0], 1.0F - th); + this.y2[2] = Math.min(this.y2[2], 1.0F - th); + break; + case 23: + this.context.setSize((double)this.x1[3], (double)(1.0F - th), (double)(1.0F - th), (double)this.x2[3], (double)this.cy2, (double)this.cz2); + this.z2[2] = Math.max(this.z2[2], 1.0F - th); + this.z2[3] = Math.max(this.z2[3], 1.0F - th); + this.y2[1] = Math.min(this.y2[1], 1.0F - th); + this.y2[3] = Math.min(this.y2[3], 1.0F - th); + break; + case 24: + this.context.setSize((double)this.cx1, (double)(1.0F - th), (double)this.z1[2], (double)th, (double)this.cy2, (double)this.z2[2]); + this.x1[2] = Math.max(this.x1[2], th); + this.x1[3] = Math.max(this.x1[3], th); + this.y2[0] = Math.min(this.y2[0], 1.0F - th); + this.y2[1] = Math.min(this.y2[1], 1.0F - th); + break; + case 25: + this.context.setSize((double)(1.0F - th), (double)(1.0F - th), (double)this.z1[3], (double)this.cx2, (double)this.cy2, (double)this.z2[3]); + this.x2[2] = Math.min(this.x2[2], 1.0F - th); + this.x2[3] = Math.min(this.x2[3], 1.0F - th); + this.y2[2] = Math.min(this.y2[2], 1.0F - th); + this.y2[3] = Math.min(this.y2[3], 1.0F - th); + break; + case 26: + this.context.setSize(0.5 - (double)th, (double)this.cy1, 0.5 - (double)th, 0.5 + (double)th, (double)this.cy2, 0.5 + (double)th); + break; + case 27: + this.context.setSize(0.5 - (double)th, 0.5 - (double)th, (double)this.cz1, 0.5 + (double)th, 0.5 + (double)th, (double)this.cz2); + break; + case 28: + this.context.setSize((double)this.cx1, 0.5 - (double)th, 0.5 - (double)th, (double)this.cx2, 0.5 + (double)th, 0.5 + (double)th); + } + + } + + void setupCorners() { + for(int i = 0; i < 4; ++i) { + this.x1[i] = this.cx1; + this.y1[i] = this.cy1; + this.z1[i] = this.cz1; + this.x2[i] = this.cx2; + this.y2[i] = this.cy2; + this.z2[i] = this.cz2; + } + + } + + public void initMasks(int uc, short[] cv) { + this.covmask = uc; + this.covs = cv; + this.covmaskt = 0; + this.covmaskh = 0; + this.covmasko = 0; + + for(int i = 0; i < 6; ++i) { + if ((uc & 1 << i) != 0) { + if (CoverLib.isTransparent(this.covs[i] & 255)) { + this.covmaskt |= 1 << i; + } + + if (this.covs[i] >> 8 > 2) { + this.covmaskh |= 1 << i; + } + } + } + + this.covmasko = this.covmask & ~this.covmaskt & ~this.covmaskh; + } + + public void render(int uc, short[] cv) { + this.initMasks(uc, cv); + this.start(); + this.renderShell(); + if ((uc & -64) != 0) { + this.renderOthers(); + } + + } + + public void renderShrink(int uc, short[] cv, float sh) { + this.initMasks(uc, cv); + this.startShrink(sh); + this.renderShell(); + if ((uc & -64) != 0) { + this.renderOthers(); + } + + } + + public void setIcon(int cn) { + this.context.setIcon(coverIcons[cn]); + } + + public void setIcon(int c1, int c2, int c3, int c4, int c5, int c6) { + this.context.setIcon(coverIcons[c1][0], coverIcons[c2][1], coverIcons[c3][2], coverIcons[c4][3], coverIcons[c5][4], coverIcons[c6][5]); + } + + public void renderShell() { + this.context.setOrientation(0, 0); + this.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F); + if (this.covmasko > 0) { + this.context.setSize(0.0, 0.0, 0.0, 1.0, 1.0, 1.0); + this.setIcon(this.covs[0] & 255, this.covs[1] & 255, this.covs[2] & 255, this.covs[3] & 255, this.covs[4] & 255, this.covs[5] & 255); + this.context.setTexFlags(55); + this.context.calcBoundsGlobal(); + this.context.renderGlobFaces(this.covmasko); + } + + int rsf = (this.covmasko | this.covmaskh) & ~this.covmaskt; + if (rsf > 0) { + for(int i = 0; i < 6; ++i) { + if ((rsf & 1 << i) != 0) { + this.setIcon(this.covs[i] & 255); + int cn = this.covs[i] >> 8; + int vf = 1 << (i ^ 1) | 63 ^ this.covmasko; + if (cn >= 3 && cn <= 5 || cn >= 10 && cn <= 13) { + for(int j = 0; j < 4; ++j) { + this.setSize(i, CoverLib.getThickness(i, this.covs[i])); + this.sizeHollow(i, j); + this.context.calcBoundsGlobal(); + this.context.renderGlobFaces(vf | this.innerFace(i, j)); + } + } else { + this.setSize(i, CoverLib.getThickness(i, this.covs[i])); + this.context.calcBoundsGlobal(); + this.context.renderGlobFaces(vf); + } + } + } + } + + if (this.covmaskt > 0) { + for(int i = 0; i < 6; ++i) { + if ((this.covmaskt & 1 << i) != 0) { + this.setIcon(this.covs[i] & 255); + int cn = this.covs[i] >> 8; + int vf = 1 << (i ^ 1) | 63 ^ this.covmasko; + if (cn >= 3 && cn <= 5 || cn >= 10 && cn <= 13) { + for(int j = 0; j < 4; ++j) { + this.setSize(i, CoverLib.getThickness(i, this.covs[i])); + this.sizeHollow(i, j); + this.context.calcBoundsGlobal(); + this.context.renderGlobFaces(vf | this.innerFace(i, j)); + } + } else { + this.setSize(i, CoverLib.getThickness(i, this.covs[i])); + this.context.calcBoundsGlobal(); + this.context.renderGlobFaces(vf); + } + } + } + } + + } + + public void renderOthers() { + float cth = 0.0F; + int colc = 0; + int coln = 0; + + for(int j = 26; j < 29; ++j) { + if ((this.covmasko & 1 << j) != 0) { + ++colc; + float i = CoverLib.getThickness(j, this.covs[j]); + if (i > cth) { + coln = j; + cth = i; + } + } + } + + if (colc > 1) { + this.setIcon(this.covs[coln] & 255); + this.context.setSize(0.5 - (double)cth, 0.5 - (double)cth, 0.5 - (double)cth, 0.5 + (double)cth, 0.5 + (double)cth, 0.5 + (double)cth); + this.context.calcBoundsGlobal(); + this.context.renderGlobFaces(63); + + for(int var61 = 26; var61 < 29; ++var61) { + if ((this.covmasko & 1 << var61) != 0) { + this.setIcon(this.covs[var61] & 255); + this.setSize(var61, CoverLib.getThickness(var61, this.covs[var61])); + if (this.sizeColumnSpoke(var61, false, cth)) { + this.context.calcBoundsGlobal(); + this.context.renderGlobFaces(63); + } + + if (this.sizeColumnSpoke(var61, true, cth)) { + this.context.calcBoundsGlobal(); + this.context.renderGlobFaces(63); + } + } + } + } else if (colc == 1) { + this.setIcon(this.covs[coln] & 255); + this.setSize(coln, CoverLib.getThickness(coln, this.covs[coln])); + this.context.calcBoundsGlobal(); + this.context.renderGlobFaces(63 ^ 3 << coln - 25 & this.covmasko); + } + + this.setupCorners(); + + for(int var7 = 6; var7 < 14; ++var7) { + if ((this.covmasko & 1 << var7) != 0) { + this.setSize(var7, CoverLib.getThickness(var7, this.covs[var7])); + this.context.calcBoundsGlobal(); + this.setIcon(this.covs[var7] & 255); + this.context.renderGlobFaces(63); + } + } + + for(int var8 = 6; var8 >= 0; --var8) { + for(int var6 = 14; var6 < 26; ++var6) { + if ((this.covmasko & 1 << var6) != 0 && this.covs[var6] >> 8 == var8) { + this.setSize(var6, CoverLib.getThickness(var6, this.covs[var6])); + this.context.calcBoundsGlobal(); + this.setIcon(this.covs[var6] & 255); + this.context.renderGlobFaces(63); + } + } + } + + } + + @SideOnly(Side.CLIENT) + public static void reInitIcons() { + for(int i = 0; i < CoverLib.materials.length; ++i) { + ItemStack is = CoverLib.materials[i]; + if (is != null) { + Block b = Block.getBlockFromItem(is.getItem()); + if (b != null) { + for(int side = 0; side < 6; ++side) { + coverIcons[i][side] = b.getIcon(side, is.getItemDamage()); + } + } + } + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/core/CraftLib.java b/src/main/java/com/eloraam/redpower/core/CraftLib.java new file mode 100644 index 0000000..c9dd652 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/CraftLib.java @@ -0,0 +1,138 @@ +package com.eloraam.redpower.core; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.CraftingManager; +import net.minecraftforge.oredict.OreDictionary; +import net.minecraftforge.oredict.ShapedOreRecipe; +import net.minecraftforge.oredict.ShapelessOreRecipe; + +public class CraftLib { + public static List> alloyRecipes = new ArrayList(); + public static HashSet damageOnCraft = new HashSet(); + public static HashMap damageContainer = new HashMap(); + + public static void addAlloyResult(ItemStack output, Object... input) { + alloyRecipes.add(Arrays.asList(input, output)); + } + + public static void addOreRecipe(ItemStack output, Object... input) { + CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(output, new Object[]{Boolean.TRUE, input})); + } + + public static void addShapelessOreRecipe(ItemStack output, Object... input) { + CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(output, input)); + } + + public static boolean isOreClass(ItemStack ist, String ore) { + for(ItemStack stack : OreDictionary.getOres(ore)) { + if (stack.isItemEqual(ist)) { + return true; + } + } + + return false; + } + + public static ItemStack getAlloyResult(ItemStack[] input, int start, int end, boolean take) { + label134: + for(List l : alloyRecipes) { + Object[] ob = l.toArray(); + Object[] ipt = (Object[]) ob[0]; + + for(Object ingredient : ipt) { + if (ingredient instanceof ItemStack) { + ItemStack inputStack = (ItemStack)ingredient; + int rc = inputStack.stackSize; + + for(int i = start; i < end; ++i) { + if (input[i] != null) { + if (input[i].isItemEqual(inputStack)) { + rc -= input[i].stackSize; + } + + if (rc <= 0) { + break; + } + } + } + + if (rc > 0) { + continue label134; + } + } else if (ingredient instanceof OreStack) { + OreStack inputStack = (OreStack)ingredient; + int rc = inputStack.quantity; + + for(int i = start; i < end; ++i) { + if (input[i] != null) { + if (isOreClass(input[i], inputStack.material)) { + rc -= input[i].stackSize; + } + + if (rc <= 0) { + break; + } + } + } + + if (rc > 0) { + continue label134; + } + } + } + + if (take) { + for(Object ingredient : ipt) { + if (ingredient instanceof ItemStack) { + ItemStack inputStack = (ItemStack)ingredient; + int rc = inputStack.stackSize; + + for(int i = start; i < end; ++i) { + if (input[i] != null && input[i].isItemEqual(inputStack)) { + rc -= input[i].stackSize; + if (rc < 0) { + input[i].stackSize = -rc; + } else if (input[i].getItem().hasContainerItem()) { + input[i] = new ItemStack(input[i].getItem().getContainerItem()); + } else { + input[i] = null; + } + + if (rc <= 0) { + break; + } + } + } + } else if (ingredient instanceof OreStack) { + OreStack inputStack = (OreStack)ingredient; + int rc = inputStack.quantity; + + for(int i = start; i < end; ++i) { + if (input[i] != null && isOreClass(input[i], inputStack.material)) { + rc -= input[i].stackSize; + if (rc < 0) { + input[i].stackSize = -rc; + } else { + input[i] = null; + } + + if (rc <= 0) { + break; + } + } + } + } + } + } + + return (ItemStack)ob[1]; + } + + return null; + } +} diff --git a/src/main/java/com/eloraam/redpower/core/CreativeExtraTabs.java b/src/main/java/com/eloraam/redpower/core/CreativeExtraTabs.java new file mode 100644 index 0000000..f54bad7 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/CreativeExtraTabs.java @@ -0,0 +1,36 @@ +package com.eloraam.redpower.core; + +import com.eloraam.redpower.RedPowerBase; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +public class CreativeExtraTabs { + public static CreativeTabs tabWires = new CreativeTabs(CreativeTabs.getNextID(), "RPWires") { + public ItemStack getIconItemStack() { + return new ItemStack(RedPowerBase.blockMicro, 1, 768); + } + + public Item getTabIconItem() { + return null; + } + }; + public static CreativeTabs tabMicros = new CreativeTabs(CreativeTabs.getNextID(), "RPMicroblocks") { + public ItemStack getIconItemStack() { + return new ItemStack(RedPowerBase.blockMicro, 1, 23); + } + + public Item getTabIconItem() { + return null; + } + }; + public static CreativeTabs tabMachine = new CreativeTabs(CreativeTabs.getNextID(), "RPMachines") { + public ItemStack getIconItemStack() { + return new ItemStack(RedPowerBase.blockAppliance, 1, 3); + } + + public Item getTabIconItem() { + return null; + } + }; +} diff --git a/src/main/java/com/eloraam/redpower/core/DiskLib.java b/src/main/java/com/eloraam/redpower/core/DiskLib.java new file mode 100644 index 0000000..71e5975 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/DiskLib.java @@ -0,0 +1,27 @@ +package com.eloraam.redpower.core; + +import com.eloraam.redpower.RedPowerCore; +import java.io.File; +import net.minecraft.world.World; + +public class DiskLib { + public static File getSaveDir(World world) { + File tr = new File(RedPowerCore.getSaveDir(world), "redpower"); + tr.mkdirs(); + return tr; + } + + public static String generateSerialNumber(World world) { + StringBuilder tr = new StringBuilder(); + + for(int i = 0; i < 16; ++i) { + tr.append(String.format("%01x", world.rand.nextInt(16))); + } + + return tr.toString(); + } + + public static File getDiskFile(File dir, String serno) { + return new File(dir, String.format("disk_%s.img", serno)); + } +} diff --git a/src/main/java/com/eloraam/redpower/core/EntityCustomDiggingFX.java b/src/main/java/com/eloraam/redpower/core/EntityCustomDiggingFX.java new file mode 100644 index 0000000..6f40eae --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/EntityCustomDiggingFX.java @@ -0,0 +1,73 @@ +package com.eloraam.redpower.core; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.particle.EntityFX; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; + +@SideOnly(Side.CLIENT) +public class EntityCustomDiggingFX extends EntityFX { + public EntityCustomDiggingFX(World world, double x, double y, double z, double mx, double my, double mz, IIcon icon, int color) { + super(world, x, y, z, mx, my, mz); + this.setParticleIcon(icon); + super.particleGravity = 1.0F; + super.particleRed = super.particleGreen = super.particleBlue = 0.6F; + super.particleScale /= 2.0F; + super.particleRed *= (float)(color >> 16 & 0xFF) / 255.0F; + super.particleGreen *= (float)(color >> 8 & 0xFF) / 255.0F; + super.particleBlue *= (float)(color & 0xFF) / 255.0F; + } + + public int getFXLayer() { + return 1; + } + + public void renderParticle(Tessellator tess, float p_70539_2_, float p_70539_3_, float p_70539_4_, float p_70539_5_, float p_70539_6_, float p_70539_7_) { + float f6 = ((float)super.particleTextureIndexX + super.particleTextureJitterX / 4.0F) / 16.0F; + float f7 = f6 + 0.015609375F; + float f8 = ((float)super.particleTextureIndexY + super.particleTextureJitterY / 4.0F) / 16.0F; + float f9 = f8 + 0.015609375F; + float f10 = 0.1F * super.particleScale; + if (super.particleIcon != null) { + f6 = super.particleIcon.getInterpolatedU((double)(super.particleTextureJitterX / 4.0F * 16.0F)); + f7 = super.particleIcon.getInterpolatedU((double)((super.particleTextureJitterX + 1.0F) / 4.0F * 16.0F)); + f8 = super.particleIcon.getInterpolatedV((double)(super.particleTextureJitterY / 4.0F * 16.0F)); + f9 = super.particleIcon.getInterpolatedV((double)((super.particleTextureJitterY + 1.0F) / 4.0F * 16.0F)); + } + + float f11 = (float)(super.prevPosX + (super.posX - super.prevPosX) * (double)p_70539_2_ - EntityFX.interpPosX); + float f12 = (float)(super.prevPosY + (super.posY - super.prevPosY) * (double)p_70539_2_ - EntityFX.interpPosY); + float f13 = (float)(super.prevPosZ + (super.posZ - super.prevPosZ) * (double)p_70539_2_ - EntityFX.interpPosZ); + tess.setColorOpaque_F(super.particleRed, super.particleGreen, super.particleBlue); + tess.addVertexWithUV( + (double)(f11 - p_70539_3_ * f10 - p_70539_6_ * f10), + (double)(f12 - p_70539_4_ * f10), + (double)(f13 - p_70539_5_ * f10 - p_70539_7_ * f10), + (double)f6, + (double)f9 + ); + tess.addVertexWithUV( + (double)(f11 - p_70539_3_ * f10 + p_70539_6_ * f10), + (double)(f12 + p_70539_4_ * f10), + (double)(f13 - p_70539_5_ * f10 + p_70539_7_ * f10), + (double)f6, + (double)f8 + ); + tess.addVertexWithUV( + (double)(f11 + p_70539_3_ * f10 + p_70539_6_ * f10), + (double)(f12 + p_70539_4_ * f10), + (double)(f13 + p_70539_5_ * f10 + p_70539_7_ * f10), + (double)f7, + (double)f8 + ); + tess.addVertexWithUV( + (double)(f11 + p_70539_3_ * f10 - p_70539_6_ * f10), + (double)(f12 - p_70539_4_ * f10), + (double)(f13 + p_70539_5_ * f10 - p_70539_7_ * f10), + (double)f7, + (double)f9 + ); + } +} diff --git a/src/main/java/com/eloraam/redpower/core/EnvironLib.java b/src/main/java/com/eloraam/redpower/core/EnvironLib.java new file mode 100644 index 0000000..f603b04 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/EnvironLib.java @@ -0,0 +1,32 @@ +package com.eloraam.redpower.core; + +import net.minecraft.world.World; +import net.minecraft.world.WorldType; +import net.minecraft.world.biome.BiomeGenBase; + +public class EnvironLib { + public static double getWindSpeed(World world, WorldCoord wc) { + if (world.provider.isHellWorld) { + return 0.5; + } else { + double nv = FractalLib.noise1D(2576710L, (double)world.getWorldTime() * 1.0E-4, 0.6F, 5); + nv = Math.max(0.0, 1.6 * (nv - 0.5) + 0.5); + if (world.getWorldInfo().getTerrainType() != WorldType.FLAT) { + nv *= Math.sqrt((double)wc.y) / 16.0; + } + + BiomeGenBase bgb = world.getBiomeGenForCoords(wc.x, wc.z); + if (bgb.canSpawnLightningBolt()) { + if (world.isThundering()) { + return 4.0 * nv; + } + + if (world.isRaining()) { + return 0.5 + 0.5 * nv; + } + } + + return nv; + } + } +} diff --git a/src/main/java/com/eloraam/redpower/core/FakePlayerNetHandler.java b/src/main/java/com/eloraam/redpower/core/FakePlayerNetHandler.java new file mode 100644 index 0000000..b97e97e --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/FakePlayerNetHandler.java @@ -0,0 +1,12 @@ +package com.eloraam.redpower.core; + +import net.minecraft.network.NetHandlerPlayServer; +import net.minecraft.network.NetworkManager; +import net.minecraft.server.MinecraftServer; +import net.minecraftforge.common.util.FakePlayer; + +public class FakePlayerNetHandler extends NetHandlerPlayServer { + public FakePlayerNetHandler(MinecraftServer server, FakePlayer player) { + super(server, new NetworkManager(false), player); + } +} diff --git a/src/main/java/com/eloraam/redpower/core/FluidBuffer.java b/src/main/java/com/eloraam/redpower/core/FluidBuffer.java new file mode 100644 index 0000000..fb60705 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/FluidBuffer.java @@ -0,0 +1,78 @@ +package com.eloraam.redpower.core; + +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidRegistry; + +public abstract class FluidBuffer { + public Fluid Type; + public int Level; + public int Delta; + private int lastTick; + + public abstract TileEntity getParent(); + + public abstract void onChange(); + + public int getMaxLevel() { + return 1000; + } + + public int getLevel() { + long lt = this.getParent().getWorldObj().getWorldTime(); + if ((lt & 65535L) == (long)this.lastTick) { + return this.Level; + } else { + this.lastTick = (int)(lt & 65535L); + this.Level += this.Delta; + this.Delta = 0; + if (this.Level == 0) { + this.Type = null; + } + + return this.Level; + } + } + + public void addLevel(Fluid type, int lvl) { + if (type != null) { + this.Type = type; + this.Delta += lvl; + this.onChange(); + } + + } + + public Fluid getFluidClass() { + return this.Type; + } + + public void readFromNBT(NBTTagCompound tag, String name) { + NBTTagCompound t2 = tag.getCompoundTag(name); + this.Type = FluidRegistry.getFluid(t2.getString("type")); + this.Level = t2.getShort("lvl"); + this.Delta = t2.getShort("del"); + this.lastTick = t2.getShort("ltk"); + } + + public void writeToNBT(NBTTagCompound tag, String name) { + NBTTagCompound t2 = new NBTTagCompound(); + String n = FluidRegistry.getFluidName(this.Type); + t2.setString("type", n != null && !n.isEmpty() ? n : "null"); + t2.setShort("lvl", (short)this.Level); + t2.setShort("del", (short)this.Delta); + t2.setShort("ltk", (short)this.lastTick); + tag.setTag(name, t2); + } + + public void writeToPacket(NBTTagCompound tag) { + tag.setInteger("type", this.Type == null ? -1 : FluidRegistry.getFluidID(this.Type)); + tag.setInteger("lvl", this.Level); + } + + public void readFromPacket(NBTTagCompound buffer) { + this.Type = FluidRegistry.getFluid(buffer.getInteger("type")); + this.Level = buffer.getInteger("lvl"); + } +} diff --git a/src/main/java/com/eloraam/redpower/core/FractalLib.java b/src/main/java/com/eloraam/redpower/core/FractalLib.java new file mode 100644 index 0000000..33f7907 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/FractalLib.java @@ -0,0 +1,220 @@ +package com.eloraam.redpower.core; + +public class FractalLib { + public static long hash64shift(long key) { + key = ~key + (key << 21); + key ^= key >>> 24; + key = key + (key << 3) + (key << 8); + key ^= key >>> 14; + key = key + (key << 2) + (key << 4); + key ^= key >>> 28; + return key + (key << 31); + } + + public static double hashFloat(long key) { + long f = hash64shift(key); + return Double.longBitsToDouble(4607182418800017408L | f & 4503599627370495L) - 1.0; + } + + public static double noise1D(long seed, double pos, float lac, int octave) { + double tr = 0.5; + double scale = (double)(1 << octave); + + for(int i = 0; i < octave; ++i) { + double p = pos * scale; + long pint = (long)Math.floor(p); + double m1 = hashFloat(seed + pint); + double m2 = hashFloat(seed + pint + 1L); + p -= Math.floor(p); + double v = 0.5 + 0.5 * Math.cos(Math.PI * p); + v = v * m1 + (1.0 - v) * m2; + tr = (double)(1.0F - lac) * tr + (double)lac * v; + scale *= 0.5; + } + + return tr; + } + + public static double perturbOld(long seed, float pos, float lac, int octave) { + double tr = 0.0; + double mscale = 1.0; + double scale = 1.0; + + for(int i = 0; i < octave; ++i) { + long v = (long)Math.floor((double)pos * scale); + long p = hash64shift(seed + v); + double mag = Double.longBitsToDouble(4607182418800017408L | p & 4503599627370495L) - 1.0; + tr += mscale * mag * Math.sin(Math.PI * 2 * (double)pos * scale); + scale *= 2.0; + mscale *= (double)lac; + } + + return tr; + } + + public static void fillVector(Vector3 v, Vector3 org, Vector3 dest, float pos, long seed) { + double window = 4.0 * Math.sin(Math.PI * (double)pos); + v.x = org.x + (double)(pos * pos) * dest.x + window * perturbOld(seed, pos, 0.7F, 5); + v.y = org.y + (double)pos * dest.y + window * perturbOld(seed + 1L, pos, 0.7F, 5); + v.z = org.z + (double)(pos * pos) * dest.z + window * perturbOld(seed + 2L, pos, 0.7F, 5); + } + + public static int mdist(Vector3 a, Vector3 b) { + return (int)(Math.abs(Math.floor(a.x) - Math.floor(b.x)) + Math.abs(Math.floor(a.y) - Math.floor(b.y)) + Math.abs(Math.floor(a.z) - Math.floor(b.z))); + } + + public static class BlockRay { + private Vector3 p1; + private Vector3 p2; + private Vector3 dv; + public Vector3 enter; + public Vector3 exit; + public int xp; + public int yp; + public int zp; + public int dir; + public int face; + + public BlockRay(Vector3 s, Vector3 d) { + this.p1 = new Vector3(s); + this.p2 = new Vector3(d); + this.dv = new Vector3(d); + this.dv.subtract(s); + this.exit = new Vector3(s); + this.enter = new Vector3(); + this.xp = (int)Math.floor(s.x); + this.yp = (int)Math.floor(s.y); + this.zp = (int)Math.floor(s.z); + this.dir = 0; + this.dir |= d.x > s.x ? 4 : 0; + this.dir |= d.y > s.y ? 1 : 0; + this.dir |= d.z > s.z ? 2 : 0; + } + + public void set(Vector3 s, Vector3 d) { + this.p1.set(s); + this.p2.set(d); + this.dv.set(d); + this.dv.subtract(s); + this.exit.set(s); + this.xp = (int)Math.floor(s.x); + this.yp = (int)Math.floor(s.y); + this.zp = (int)Math.floor(s.z); + this.dir = 0; + this.dir |= d.x > s.x ? 4 : 0; + this.dir |= d.y > s.y ? 1 : 0; + this.dir |= d.z > s.z ? 2 : 0; + } + + boolean step() { + double bp = 1.0; + int sd = -1; + if (this.dv.x != 0.0) { + int x = this.xp; + if ((this.dir & 4) > 0) { + ++x; + } + + double d = ((double)x - this.p1.x) / this.dv.x; + if (d >= 0.0 && d <= bp) { + bp = d; + sd = (this.dir & 4) > 0 ? 4 : 5; + } + } + + if (this.dv.y != 0.0) { + int y = this.yp; + if ((this.dir & 1) > 0) { + ++y; + } + + double d = ((double)y - this.p1.y) / this.dv.y; + if (d >= 0.0 && d <= bp) { + bp = d; + sd = (this.dir & 1) > 0 ? 0 : 1; + } + } + + if (this.dv.z != 0.0) { + int z = this.zp; + if ((this.dir & 2) > 0) { + ++z; + } + + double d = ((double)z - this.p1.z) / this.dv.z; + if (d >= 0.0 && d <= bp) { + bp = d; + sd = (this.dir & 2) > 0 ? 2 : 3; + } + } + + this.face = sd; + switch(sd) { + case 0: + ++this.yp; + break; + case 1: + --this.yp; + break; + case 2: + ++this.zp; + break; + case 3: + --this.zp; + break; + case 4: + ++this.xp; + break; + case 5: + --this.xp; + } + + this.enter.set(this.exit); + this.exit.set(this.dv); + this.exit.multiply(bp); + this.exit.add(this.p1); + return bp >= 1.0; + } + } + + public static class BlockSnake { + int fep = -1; + FractalLib.BlockRay ray; + Vector3 org; + Vector3 dest; + Vector3 fracs; + Vector3 frace; + long seed; + + public BlockSnake(Vector3 o, Vector3 d, long s) { + this.org = new Vector3(o); + this.dest = new Vector3(d); + this.fracs = new Vector3(o); + this.frace = new Vector3(); + this.seed = s; + FractalLib.fillVector(this.frace, this.org, this.dest, 0.125F, this.seed); + this.ray = new FractalLib.BlockRay(this.fracs, this.frace); + } + + public boolean iterate() { + if (this.fep == -1) { + ++this.fep; + return true; + } else if (!this.ray.step()) { + return true; + } else if (this.fep == 8) { + return false; + } else { + this.fracs.set(this.frace); + FractalLib.fillVector(this.frace, this.org, this.dest, (float)this.fep / 8.0F, this.seed); + this.ray.set(this.fracs, this.frace); + ++this.fep; + return true; + } + } + + public Vector3 get() { + return new Vector3((double)this.ray.xp, (double)this.ray.yp, (double)this.ray.zp); + } + } +} diff --git a/src/main/java/com/eloraam/redpower/core/FrameLib.java b/src/main/java/com/eloraam/redpower/core/FrameLib.java new file mode 100644 index 0000000..cd64b72 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/FrameLib.java @@ -0,0 +1,144 @@ +package com.eloraam.redpower.core; + +import java.util.HashSet; +import java.util.LinkedList; +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.world.World; + +public class FrameLib { + public static class FrameSolver { + private HashSet scanmap = new HashSet(); + private LinkedList scanpos = new LinkedList(); + private HashSet framemap = new HashSet(); + private LinkedList frameset = new LinkedList(); + private LinkedList clearset = new LinkedList(); + private int movedir; + private WorldCoord motorpos; + private boolean valid = true; + private World world; + + public FrameSolver(World world, WorldCoord wc, WorldCoord motorp, int movdir) { + this.movedir = movdir; + this.motorpos = motorp; + this.world = world; + this.scanmap.add(motorp); + this.scanmap.add(wc); + this.scanpos.addLast(wc); + } + + private boolean step() { + WorldCoord wc = (WorldCoord)this.scanpos.removeFirst(); + if (wc.y >= 0 && wc.y < this.world.getHeight() - 1) { + Block block = this.world.getBlock(wc.x, wc.y, wc.z); + if (this.movedir >= 0 && !this.world.blockExists(wc.x, wc.y, wc.z)) { + this.valid = false; + return false; + } else if (this.world.isAirBlock(wc.x, wc.y, wc.z)) { + return false; + } else if (this.movedir >= 0 && block.getBlockHardness(this.world, wc.x, wc.y, wc.z) < 0.0F) { + this.valid = false; + return false; + } else { + this.framemap.add(wc); + this.frameset.addLast(wc); + IFrameLink ifl = CoreLib.getTileEntity(this.world, wc, IFrameLink.class); + if (ifl == null) { + return true; + } else if (ifl.isFrameMoving() && this.movedir >= 0) { + this.valid = false; + return true; + } else { + for(int i = 0; i < 6; ++i) { + if (ifl.canFrameConnectOut(i)) { + WorldCoord sp = wc.coordStep(i); + if (!this.scanmap.contains(sp)) { + IFrameLink if2 = CoreLib.getTileEntity(this.world, sp, IFrameLink.class); + if (if2 != null) { + if (!if2.canFrameConnectIn((i ^ 1) & 0xFF)) { + continue; + } + + if (this.movedir < 0) { + WorldCoord wcls = if2.getFrameLinkset(); + if (wcls == null || !wcls.equals(this.motorpos)) { + continue; + } + } + } + + this.scanmap.add(sp); + this.scanpos.addLast(sp); + } + } + } + + return true; + } + } + } else { + return false; + } + } + + public boolean solve() { + while(this.valid && this.scanpos.size() > 0) { + this.step(); + } + + return this.valid; + } + + public boolean solveLimit(int limit) { + while(this.valid && this.scanpos.size() > 0) { + if (this.step()) { + --limit; + } + + if (limit == 0) { + return false; + } + } + + return this.valid; + } + + public boolean addMoved() { + for(WorldCoord wc : (LinkedList)this.frameset.clone()) { + WorldCoord sp = wc.coordStep(this.movedir); + if (!this.world.blockExists(sp.x, sp.y, sp.z)) { + this.valid = false; + return false; + } + + if (!this.framemap.contains(sp)) { + if (!this.world.isAirBlock(wc.x, wc.y, wc.z)) { + if (!this.world.canPlaceEntityOnSide(Blocks.stone, sp.x, sp.y, sp.z, true, 0, null, null)) { + this.valid = false; + return false; + } + + this.clearset.add(sp); + } + + this.framemap.add(sp); + this.frameset.addLast(sp); + } + } + + return this.valid; + } + + public void sort(int dir) { + this.frameset.sort(WorldCoord.getCompareDir(dir)); + } + + public LinkedList getFrameSet() { + return this.frameset; + } + + public LinkedList getClearSet() { + return this.clearset; + } + } +} diff --git a/src/main/java/com/eloraam/redpower/core/GuiExtended.java b/src/main/java/com/eloraam/redpower/core/GuiExtended.java new file mode 100644 index 0000000..6537e37 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/GuiExtended.java @@ -0,0 +1,13 @@ +package com.eloraam.redpower.core; + +import java.util.ArrayList; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.inventory.Container; + +public abstract class GuiExtended extends GuiContainer { + ArrayList widgetList = new ArrayList(); + + public GuiExtended(Container cn) { + super(cn); + } +} diff --git a/src/main/java/com/eloraam/redpower/core/GuiWidget.java b/src/main/java/com/eloraam/redpower/core/GuiWidget.java new file mode 100644 index 0000000..1b75af1 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/GuiWidget.java @@ -0,0 +1,21 @@ +package com.eloraam.redpower.core; + +import net.minecraft.client.gui.Gui; + +public class GuiWidget extends Gui { + public int width; + public int height; + public int top; + public int left; + + public GuiWidget(int x, int y, int w, int h) { + this.left = x; + this.top = y; + this.width = w; + this.height = h; + } + + protected void drawRelRect(int x, int y, int w, int h, int c) { + drawRect(x, y, x + w, y + h, c | 61440); + } +} diff --git a/src/main/java/com/eloraam/redpower/core/IBlockHardness.java b/src/main/java/com/eloraam/redpower/core/IBlockHardness.java new file mode 100644 index 0000000..998f58f --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/IBlockHardness.java @@ -0,0 +1,5 @@ +package com.eloraam.redpower.core; + +public interface IBlockHardness { + float getPrototypicalHardness(int var1); +} diff --git a/src/main/java/com/eloraam/redpower/core/IBluePowerConnectable.java b/src/main/java/com/eloraam/redpower/core/IBluePowerConnectable.java new file mode 100644 index 0000000..cec4fab --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/IBluePowerConnectable.java @@ -0,0 +1,5 @@ +package com.eloraam.redpower.core; + +public interface IBluePowerConnectable extends IConnectable { + BluePowerConductor getBlueConductor(int var1); +} diff --git a/src/main/java/com/eloraam/redpower/core/IChargeable.java b/src/main/java/com/eloraam/redpower/core/IChargeable.java new file mode 100644 index 0000000..7e9829e --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/IChargeable.java @@ -0,0 +1,4 @@ +package com.eloraam.redpower.core; + +public interface IChargeable { +} diff --git a/src/main/java/com/eloraam/redpower/core/IConnectable.java b/src/main/java/com/eloraam/redpower/core/IConnectable.java new file mode 100644 index 0000000..5af0398 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/IConnectable.java @@ -0,0 +1,9 @@ +package com.eloraam.redpower.core; + +public interface IConnectable { + int getConnectableMask(); + + int getConnectClass(int var1); + + int getCornerPowerMode(); +} diff --git a/src/main/java/com/eloraam/redpower/core/ICoverable.java b/src/main/java/com/eloraam/redpower/core/ICoverable.java new file mode 100644 index 0000000..a1fc1bd --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/ICoverable.java @@ -0,0 +1,13 @@ +package com.eloraam.redpower.core; + +public interface ICoverable { + boolean canAddCover(int var1, int var2); + + boolean tryAddCover(int var1, int var2); + + int tryRemoveCover(int var1); + + int getCover(int var1); + + int getCoverMask(); +} diff --git a/src/main/java/com/eloraam/redpower/core/IFrameLink.java b/src/main/java/com/eloraam/redpower/core/IFrameLink.java new file mode 100644 index 0000000..2284255 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/IFrameLink.java @@ -0,0 +1,11 @@ +package com.eloraam.redpower.core; + +public interface IFrameLink { + boolean isFrameMoving(); + + boolean canFrameConnectIn(int var1); + + boolean canFrameConnectOut(int var1); + + WorldCoord getFrameLinkset(); +} diff --git a/src/main/java/com/eloraam/redpower/core/IFrameSupport.java b/src/main/java/com/eloraam/redpower/core/IFrameSupport.java new file mode 100644 index 0000000..b956bea --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/IFrameSupport.java @@ -0,0 +1,16 @@ +package com.eloraam.redpower.core; + +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.IBlockAccess; + +public interface IFrameSupport { + void writeFramePacket(NBTTagCompound var1); + + void readFramePacket(NBTTagCompound var1); + + void onFrameRefresh(IBlockAccess var1); + + void onFramePickup(IBlockAccess var1); + + void onFrameDrop(); +} diff --git a/src/main/java/com/eloraam/redpower/core/IHandleGuiEvent.java b/src/main/java/com/eloraam/redpower/core/IHandleGuiEvent.java new file mode 100644 index 0000000..fcdebd6 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/IHandleGuiEvent.java @@ -0,0 +1,5 @@ +package com.eloraam.redpower.core; + +public interface IHandleGuiEvent { + void handleGuiEvent(PacketGuiEvent.GuiMessageEvent var1); +} diff --git a/src/main/java/com/eloraam/redpower/core/IMicroPlacement.java b/src/main/java/com/eloraam/redpower/core/IMicroPlacement.java new file mode 100644 index 0000000..c6fdcca --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/IMicroPlacement.java @@ -0,0 +1,15 @@ +package com.eloraam.redpower.core; + +import java.util.List; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +public interface IMicroPlacement { + boolean onPlaceMicro(ItemStack var1, EntityPlayer var2, World var3, WorldCoord var4, int var5); + + String getMicroName(int var1, int var2); + + void addCreativeItems(int var1, CreativeTabs var2, List var3); +} diff --git a/src/main/java/com/eloraam/redpower/core/IMultiblock.java b/src/main/java/com/eloraam/redpower/core/IMultiblock.java new file mode 100644 index 0000000..3cb2401 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/IMultiblock.java @@ -0,0 +1,12 @@ +package com.eloraam.redpower.core; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.AxisAlignedBB; + +public interface IMultiblock { + void onMultiRemoval(int var1); + + AxisAlignedBB getMultiBounds(int var1); + + float getMultiBlockStrength(int var1, EntityPlayer var2); +} diff --git a/src/main/java/com/eloraam/redpower/core/IMultipart.java b/src/main/java/com/eloraam/redpower/core/IMultipart.java new file mode 100644 index 0000000..cdff1ba --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/IMultipart.java @@ -0,0 +1,12 @@ +package com.eloraam.redpower.core; + +import java.util.List; +import net.minecraft.item.ItemStack; + +public interface IMultipart { + boolean isSideSolid(int var1); + + boolean isSideNormal(int var1); + + List harvestMultipart(); +} diff --git a/src/main/java/com/eloraam/redpower/core/IPaintable.java b/src/main/java/com/eloraam/redpower/core/IPaintable.java new file mode 100644 index 0000000..e79b74a --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/IPaintable.java @@ -0,0 +1,5 @@ +package com.eloraam.redpower.core; + +public interface IPaintable { + boolean tryPaint(int var1, int var2, int var3); +} diff --git a/src/main/java/com/eloraam/redpower/core/IPipeConnectable.java b/src/main/java/com/eloraam/redpower/core/IPipeConnectable.java new file mode 100644 index 0000000..c92f805 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/IPipeConnectable.java @@ -0,0 +1,11 @@ +package com.eloraam.redpower.core; + +public interface IPipeConnectable { + int getPipeConnectableSides(); + + int getPipeFlangeSides(); + + int getPipePressure(int var1); + + FluidBuffer getPipeBuffer(int var1); +} diff --git a/src/main/java/com/eloraam/redpower/core/IRedPowerConnectable.java b/src/main/java/com/eloraam/redpower/core/IRedPowerConnectable.java new file mode 100644 index 0000000..a0c7e8f --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/IRedPowerConnectable.java @@ -0,0 +1,5 @@ +package com.eloraam.redpower.core; + +public interface IRedPowerConnectable extends IConnectable { + int getPoweringMask(int var1); +} diff --git a/src/main/java/com/eloraam/redpower/core/IRedPowerWiring.java b/src/main/java/com/eloraam/redpower/core/IRedPowerWiring.java new file mode 100644 index 0000000..934466b --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/IRedPowerWiring.java @@ -0,0 +1,9 @@ +package com.eloraam.redpower.core; + +public interface IRedPowerWiring extends IRedPowerConnectable, IWiring { + int scanPoweringStrength(int var1, int var2); + + int getCurrentStrength(int var1, int var2); + + void updateCurrentStrength(); +} diff --git a/src/main/java/com/eloraam/redpower/core/IRedbusConnectable.java b/src/main/java/com/eloraam/redpower/core/IRedbusConnectable.java new file mode 100644 index 0000000..eaf31d1 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/IRedbusConnectable.java @@ -0,0 +1,49 @@ +package com.eloraam.redpower.core; + +public interface IRedbusConnectable extends IConnectable { + int rbGetAddr(); + + void rbSetAddr(int var1); + + int rbRead(int var1); + + void rbWrite(int var1, int var2); + + public static class Dummy implements IRedbusConnectable { + private int address; + + @Override + public int getConnectableMask() { + return 0; + } + + @Override + public int getConnectClass(int side) { + return 0; + } + + @Override + public int getCornerPowerMode() { + return 0; + } + + @Override + public int rbGetAddr() { + return this.address; + } + + @Override + public void rbSetAddr(int addr) { + this.address = addr; + } + + @Override + public int rbRead(int reg) { + return 0; + } + + @Override + public void rbWrite(int reg, int dat) { + } + } +} diff --git a/src/main/java/com/eloraam/redpower/core/IRotatable.java b/src/main/java/com/eloraam/redpower/core/IRotatable.java new file mode 100644 index 0000000..2444780 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/IRotatable.java @@ -0,0 +1,9 @@ +package com.eloraam.redpower.core; + +public interface IRotatable { + int getPartMaxRotation(int var1, boolean var2); + + int getPartRotation(int var1, boolean var2); + + void setPartRotation(int var1, boolean var2, int var3); +} diff --git a/src/main/java/com/eloraam/redpower/core/ITubeConnectable.java b/src/main/java/com/eloraam/redpower/core/ITubeConnectable.java new file mode 100644 index 0000000..3485519 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/ITubeConnectable.java @@ -0,0 +1,15 @@ +package com.eloraam.redpower.core; + +public interface ITubeConnectable { + int getTubeConnectableSides(); + + int getTubeConClass(); + + boolean canRouteItems(); + + boolean tubeItemEnter(int var1, int var2, TubeItem var3); + + boolean tubeItemCanEnter(int var1, int var2, TubeItem var3); + + int tubeWeight(int var1, int var2); +} diff --git a/src/main/java/com/eloraam/redpower/core/ITubeFlow.java b/src/main/java/com/eloraam/redpower/core/ITubeFlow.java new file mode 100644 index 0000000..34683b1 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/ITubeFlow.java @@ -0,0 +1,7 @@ +package com.eloraam.redpower.core; + +public interface ITubeFlow extends ITubeConnectable { + void addTubeItem(TubeItem var1); + + TubeFlow getTubeFlow(); +} diff --git a/src/main/java/com/eloraam/redpower/core/ITubeRequest.java b/src/main/java/com/eloraam/redpower/core/ITubeRequest.java new file mode 100644 index 0000000..c1c6a38 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/ITubeRequest.java @@ -0,0 +1,5 @@ +package com.eloraam.redpower.core; + +public interface ITubeRequest { + boolean requestTubeItem(TubeItem var1, boolean var2); +} diff --git a/src/main/java/com/eloraam/redpower/core/IWiring.java b/src/main/java/com/eloraam/redpower/core/IWiring.java new file mode 100644 index 0000000..6d9ef94 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/IWiring.java @@ -0,0 +1,7 @@ +package com.eloraam.redpower.core; + +public interface IWiring extends IConnectable { + int getConnectionMask(); + + int getExtConnectionMask(); +} diff --git a/src/main/java/com/eloraam/redpower/core/ItemExtended.java b/src/main/java/com/eloraam/redpower/core/ItemExtended.java new file mode 100644 index 0000000..f612ef8 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/ItemExtended.java @@ -0,0 +1,67 @@ +package com.eloraam.redpower.core; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import net.minecraft.block.Block; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +public class ItemExtended extends ItemBlock { + private Map names = new HashMap(); + private List valid = new ArrayList(); + + public ItemExtended(Block block) { + super(block); + this.setMaxDamage(0); + this.setHasSubtypes(true); + } + + public int getMetadata(int meta) { + return meta; + } + + public void setMetaName(int meta, String name) { + this.names.put(meta, name); + this.valid.add(meta); + } + + public String getUnlocalizedName(ItemStack ist) { + String tr = (String)this.names.get(ist.getItemDamage()); + return tr != null ? tr : "unnamed"; + } + + @SideOnly(Side.CLIENT) + public void getSubItems(Item item, CreativeTabs tab, List list) { + for(int i : this.valid) { + list.add(new ItemStack(this, 1, i)); + } + + } + + public void placeNoise(World world, int x, int y, int z, Block block) { + } + + public boolean placeBlockAt( + ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int metadata + ) { + if (!world.setBlock(x, y, z, Block.getBlockFromItem(this), metadata, 3)) { + return false; + } else { + if (world.getBlock(x, y, z) == Block.getBlockFromItem(this)) { + BlockExtended bex = (BlockExtended)Block.getBlockFromItem(this); + bex.onBlockPlacedBy(world, x, y, z, side, player, stack); + this.placeNoise(world, x, y, z, Block.getBlockFromItem(this)); + } + + return true; + } + } +} diff --git a/src/main/java/com/eloraam/redpower/core/ItemPartialCraft.java b/src/main/java/com/eloraam/redpower/core/ItemPartialCraft.java new file mode 100644 index 0000000..69d8296 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/ItemPartialCraft.java @@ -0,0 +1,36 @@ +package com.eloraam.redpower.core; + +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +public class ItemPartialCraft extends Item { + private ItemStack emptyItem = null; + + public ItemPartialCraft() { + this.setMaxStackSize(1); + this.setNoRepair(); + } + + public void setEmptyItem(ItemStack ei) { + this.emptyItem = ei; + } + + public ItemStack getContainerItem(ItemStack ist) { + int dmg = ist.getItemDamage(); + if (dmg == ist.getMaxDamage() && this.emptyItem != null) { + return CoreLib.copyStack(this.emptyItem, 1); + } else { + ItemStack tr = CoreLib.copyStack(ist, 1); + tr.setItemDamage(dmg + 1); + return tr; + } + } + + public boolean hasContainerItem(ItemStack stack) { + return true; + } + + public boolean doesContainerItemLeaveCraftingGrid(ItemStack ist) { + return false; + } +} diff --git a/src/main/java/com/eloraam/redpower/core/ItemParts.java b/src/main/java/com/eloraam/redpower/core/ItemParts.java new file mode 100644 index 0000000..888337a --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/ItemParts.java @@ -0,0 +1,70 @@ +package com.eloraam.redpower.core; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + +public class ItemParts extends Item { + private Map names = new HashMap(); + private Map icons = new HashMap(); + private Map iconNames = new HashMap(); + private List valid = new ArrayList(); + + public ItemParts() { + this.setMaxDamage(0); + this.setHasSubtypes(true); + } + + public void addItem(int meta, String icon, String name) { + this.iconNames.put(meta, icon); + this.names.put(meta, name); + this.valid.add(meta); + } + + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister reg) { + for(int i = 0; i < this.iconNames.size(); ++i) { + if (this.iconNames.get(i) != null && !((String)this.iconNames.get(i)).trim().isEmpty()) { + this.icons.put(i, reg.registerIcon((String)this.iconNames.get(i))); + } else { + this.icons.put(i, null); + } + } + + } + + public String getUnlocalizedName(ItemStack stack) { + String tr = (String)this.names.get(stack.getItemDamage()); + if (tr == null) { + throw new IndexOutOfBoundsException(); + } else { + return tr; + } + } + + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int meta) { + IIcon tr = (IIcon)this.icons.get(meta); + if (tr == null) { + throw new IndexOutOfBoundsException(); + } else { + return tr; + } + } + + @SideOnly(Side.CLIENT) + public void getSubItems(Item item, CreativeTabs tab, List items) { + for(int i = 0; i < this.valid.size(); ++i) { + items.add(new ItemStack(this, 1, i)); + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/core/ItemTextured.java b/src/main/java/com/eloraam/redpower/core/ItemTextured.java new file mode 100644 index 0000000..6cf6c66 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/ItemTextured.java @@ -0,0 +1,9 @@ +package com.eloraam.redpower.core; + +import net.minecraft.item.Item; + +public class ItemTextured extends Item { + public ItemTextured(String texture) { + this.setTextureName(texture); + } +} diff --git a/src/main/java/com/eloraam/redpower/core/MachineLib.java b/src/main/java/com/eloraam/redpower/core/MachineLib.java new file mode 100644 index 0000000..65a94c3 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/MachineLib.java @@ -0,0 +1,588 @@ +package com.eloraam.redpower.core; + +import java.util.ArrayList; +import java.util.List; +import java.util.TreeMap; +import java.util.stream.IntStream; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.inventory.InventoryLargeChest; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.tileentity.TileEntityChest; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import org.apache.commons.lang3.ArrayUtils; + +public class MachineLib { + public static IInventory getInventory(World world, WorldCoord wc) { + IInventory inv = CoreLib.getTileEntity(world, wc, IInventory.class); + if (!(inv instanceof TileEntityChest)) { + return inv; + } else { + TileEntityChest tec = CoreLib.getTileEntity(world, wc.x - 1, wc.y, wc.z, TileEntityChest.class); + if (tec != null) { + return new InventoryLargeChest("Large chest", tec, inv); + } else { + tec = CoreLib.getTileEntity(world, wc.x + 1, wc.y, wc.z, TileEntityChest.class); + if (tec != null) { + return new InventoryLargeChest("Large chest", inv, tec); + } else { + tec = CoreLib.getTileEntity(world, wc.x, wc.y, wc.z - 1, TileEntityChest.class); + if (tec != null) { + return new InventoryLargeChest("Large chest", tec, inv); + } else { + tec = CoreLib.getTileEntity(world, wc.x, wc.y, wc.z + 1, TileEntityChest.class); + return (IInventory)(tec != null ? new InventoryLargeChest("Large chest", inv, tec) : inv); + } + } + } + } + } + + public static IInventory getSideInventory(World world, WorldCoord wc, int side, boolean push) { + IInventory inv = getInventory(world, wc); + if (inv == null) { + return null; + } else if (inv instanceof ISidedInventory) { + ISidedInventory isi = (ISidedInventory)inv; + int[] slots = isi.getAccessibleSlotsFromSide(side); + return new MachineLib.SubInventory(inv, slots); + } else { + return inv; + } + } + + public static boolean addToInventoryCore(World world, ItemStack ist, WorldCoord wc, int side, boolean act) { + IInventory inv = getInventory(world, wc); + if (inv == null) { + return false; + } else { + int[] slots; + if (inv instanceof ISidedInventory) { + ISidedInventory isi = (ISidedInventory)inv; + slots = isi.getAccessibleSlotsFromSide(side); + if (slots == null || slots.length == 0) { + return false; + } + + int[] var8 = slots; + int var9 = slots.length; + int var10 = 0; + + while(true) { + if (var10 >= var9) { + return false; + } + + int n = var8[var10]; + if (isi.canInsertItem(n, ist, side)) { + break; + } + + ++var10; + } + } else { + slots = IntStream.range(0, inv.getSizeInventory()).toArray(); + } + + return addToInventoryCore(inv, ist, slots, act); + } + } + + public static boolean addToInventoryCore(IInventory inv, ItemStack ist, int[] slots, boolean act) { + for(int n : slots) { + ItemStack invst = inv.getStackInSlot(n); + if (invst != null) { + if (ist.isItemEqual(invst) && ItemStack.areItemStackTagsEqual(ist, invst)) { + int dfs = Math.min(invst.getMaxStackSize(), inv.getInventoryStackLimit()); + dfs -= invst.stackSize; + if (dfs > 0) { + int si = Math.min(dfs, ist.stackSize); + if (!act) { + return true; + } + + invst.stackSize += si; + inv.setInventorySlotContents(n, invst); + ist.stackSize -= si; + if (ist.stackSize == 0) { + return true; + } + } + } + } else if (!act) { + return true; + } + } + + if (!act) { + return false; + } else { + for(int n : slots) { + ItemStack invst = inv.getStackInSlot(n); + if (invst == null) { + if (inv.getInventoryStackLimit() >= ist.stackSize) { + inv.setInventorySlotContents(n, ist); + return true; + } + + inv.setInventorySlotContents(n, ist.splitStack(inv.getInventoryStackLimit())); + } + } + + return false; + } + } + + public static boolean addToInventory(World world, ItemStack ist, WorldCoord wc, int side) { + return addToInventoryCore(world, ist, wc, side, true); + } + + public static boolean canAddToInventory(World world, ItemStack ist, WorldCoord wc, int side) { + return addToInventoryCore(world, ist, wc, side, false); + } + + public static void ejectItem(World world, WorldCoord wc, ItemStack ist, int dir) { + wc = wc.copy(); + wc.step(dir); + EntityItem item = new EntityItem(world, (double)wc.x + 0.5, (double)wc.y + 0.5, (double)wc.z + 0.5, ist); + item.motionX = 0.0; + item.motionY = 0.0; + item.motionZ = 0.0; + switch(dir) { + case 0: + item.motionY = -0.3; + break; + case 1: + item.motionY = 0.3; + break; + case 2: + item.motionZ = -0.3; + break; + case 3: + item.motionZ = 0.3; + break; + case 4: + item.motionX = -0.3; + break; + default: + item.motionX = 0.3; + } + + item.delayBeforeCanPickup = 10; + world.spawnEntityInWorld(item); + } + + public static boolean handleItem(World world, ItemStack ist, WorldCoord wc, int side) { + WorldCoord dest = wc.copy(); + dest.step(side); + if (ist.stackSize == 0) { + return true; + } else if (TubeLib.addToTubeRoute(world, ist, wc, dest, side ^ 1)) { + return true; + } else if (addToInventory(world, ist, dest, (side ^ 1) & 63)) { + return true; + } else { + TileEntity te = CoreLib.getTileEntity(world, dest, TileEntity.class); + if (!(te instanceof IInventory) && !(te instanceof ITubeConnectable)) { + if (world.getBlock(dest.x, dest.y, dest.z).isSideSolid(world, dest.x, dest.y, dest.z, ForgeDirection.getOrientation(side ^ 1))) { + return false; + } else { + ejectItem(world, wc, ist, side); + return true; + } + } else { + return false; + } + } + } + + public static boolean handleItem(World world, TubeItem ti, WorldCoord wc, int side) { + WorldCoord dest = wc.copy(); + dest.step(side); + if (ti.item.stackSize == 0) { + return true; + } else if (TubeLib.addToTubeRoute(world, ti, wc, dest, side ^ 1)) { + return true; + } else if (addToInventory(world, ti.item, dest, (side ^ 1) & 63)) { + return true; + } else { + TileEntity te = CoreLib.getTileEntity(world, dest, TileEntity.class); + if (!(te instanceof IInventory) && !(te instanceof ITubeConnectable)) { + if (world.getBlock(dest.x, dest.y, dest.z).isSideSolid(world, dest.x, dest.y, dest.z, ForgeDirection.getOrientation(side ^ 1))) { + return false; + } else { + ejectItem(world, wc, ti.item, side); + return true; + } + } else { + return false; + } + } + } + + public static int compareItem(ItemStack a, ItemStack b) { + if (Item.getIdFromItem(a.getItem()) != Item.getIdFromItem(b.getItem())) { + return Item.getIdFromItem(a.getItem()) - Item.getIdFromItem(b.getItem()); + } else if (a.getItemDamage() == b.getItemDamage()) { + return 0; + } else if (a.getItem().getHasSubtypes()) { + return a.getItemDamage() - b.getItemDamage(); + } else { + int d1 = a.getItemDamage() <= 1 ? -1 : (a.getItemDamage() == a.getMaxDamage() - 1 ? 1 : 0); + int d2 = b.getItemDamage() <= 1 ? -1 : (b.getItemDamage() == b.getMaxDamage() - 1 ? 1 : 0); + return d1 - d2; + } + } + + public static MachineLib.FilterMap makeFilterMap(ItemStack[] ist) { + return new MachineLib.FilterMap(ist); + } + + public static MachineLib.FilterMap makeFilterMap(ItemStack[] ist, int st, int ln) { + ItemStack[] it = new ItemStack[ln]; + System.arraycopy(ist, st, it, 0, ln); + return new MachineLib.FilterMap(it); + } + + public static int[] genMatchCounts(MachineLib.FilterMap map) { + int[] tr = new int[map.filter.length]; + + for(int n = 0; n < map.filter.length; ++n) { + ItemStack ist = map.filter[n]; + if (ist != null && ist.stackSize != 0) { + List arl = (List)map.map.get(ist); + if (arl != null && arl.get(0) == n) { + for(int m : arl) { + tr[n] += map.filter[m].stackSize; + } + } + } + } + + return tr; + } + + public static int decMatchCount(MachineLib.FilterMap map, int[] mc, ItemStack ist) { + List arl = (List)map.map.get(ist); + if (arl == null) { + return 0; + } else { + int n = arl.get(0); + int tr = Math.min(mc[n], ist.stackSize); + mc[n] -= tr; + return tr; + } + } + + public static int getMatchCount(MachineLib.FilterMap map, int[] mc, ItemStack ist) { + List arl = (List)map.map.get(ist); + if (arl == null) { + return 0; + } else { + int n = arl.get(0); + return Math.min(mc[n], ist.stackSize); + } + } + + public static boolean isMatchEmpty(int[] mc) { + for(int i : mc) { + if (i > 0) { + return false; + } + } + + return true; + } + + public static void decMatchCounts(MachineLib.FilterMap map, int[] mc, IInventory inv, int[] slots) { + for(int n : slots) { + ItemStack ist = inv.getStackInSlot(n); + if (ist != null && ist.stackSize != 0) { + decMatchCount(map, mc, ist); + } + } + + } + + public static boolean matchOneStack(MachineLib.FilterMap map, IInventory inv, int[] slots, int pos) { + ItemStack match = map.filter[pos]; + int fc = match == null ? 1 : match.stackSize; + + for(int n : slots) { + ItemStack ist = inv.getStackInSlot(n); + if (ist != null && ist.stackSize != 0) { + if (match == null) { + return true; + } + + if (compareItem(match, ist) == 0) { + int m = Math.min(ist.stackSize, fc); + fc -= m; + if (fc <= 0) { + return true; + } + } + } + } + + return false; + } + + public static int matchAnyStack(MachineLib.FilterMap map, IInventory inv, int[] slots) { + int[] mc = new int[map.filter.length]; + + for(int n : slots) { + ItemStack ist = inv.getStackInSlot(n); + if (ist != null && ist.stackSize != 0) { + List arl = (List)map.map.get(ist); + if (arl != null) { + for(int m : arl) { + mc[m] += ist.stackSize; + if (mc[m] >= map.filter[m].stackSize) { + return m; + } + } + } + } + } + + return -1; + } + + public static int matchAnyStackCol(MachineLib.FilterMap map, IInventory inv, int[] slots, int col) { + int[] mc = new int[5]; + + for(int n : slots) { + ItemStack ist = inv.getStackInSlot(n); + if (ist != null && ist.stackSize != 0) { + List arl = (List)map.map.get(ist); + if (arl != null) { + for(Integer m : arl) { + if ((m & 7) == col) { + int s = m >> 3; + mc[s] += ist.stackSize; + if (mc[s] >= map.filter[m].stackSize) { + return m; + } + } + } + } + } + } + + return -1; + } + + public static boolean matchAllCol(MachineLib.FilterMap map, IInventory inv, int[] slots, int col) { + int[] mc = new int[5]; + + for(int any : slots) { + ItemStack n = inv.getStackInSlot(any); + if (n != null && n.stackSize != 0) { + ArrayList ct = (ArrayList)map.map.get(n); + if (ct != null) { + int ss = n.stackSize; + + for(Integer m : ct) { + if ((m & 7) == col) { + int c = m >> 3; + int s1 = Math.min(ss, map.filter[m].stackSize - mc[c]); + mc[c] += s1; + ss -= s1; + if (ss == 0) { + break; + } + } + } + } + } + } + + boolean match = false; + + for(int i = 0; i < 5; ++i) { + ItemStack stack = map.filter[i * 8 + col]; + if (stack != null && stack.stackSize != 0) { + match = true; + if (stack.stackSize > mc[i]) { + return false; + } + } + } + + return match; + } + + public static boolean emptyInventory(IInventory inv, int[] slots) { + for(int n : slots) { + ItemStack ist = inv.getStackInSlot(n); + if (ist != null && ist.stackSize != 0) { + return false; + } + } + + return true; + } + + public static ItemStack collectOneStack(IInventory inv, int[] slots, ItemStack match) { + ItemStack tr = null; + int fc = match == null ? 1 : match.stackSize; + + for(int n : slots) { + ItemStack ist = inv.getStackInSlot(n); + if (ist != null && ist.stackSize != 0) { + if (match == null) { + inv.setInventorySlotContents(n, null); + return ist; + } + + if (compareItem(match, ist) == 0) { + int m = Math.min(ist.stackSize, fc); + if (tr == null) { + tr = inv.decrStackSize(n, m); + } else { + inv.decrStackSize(n, m); + tr.stackSize += m; + } + + fc -= m; + if (fc <= 0) { + break; + } + } + } + } + + return tr; + } + + public static ItemStack collectOneStackFuzzy(IInventory inv, int[] slots, ItemStack match) { + ItemStack tr = null; + int fc = match == null ? 1 : match.getMaxStackSize(); + + for(int n : slots) { + ItemStack ist = inv.getStackInSlot(n); + if (ist != null && ist.stackSize != 0) { + if (match == null) { + inv.setInventorySlotContents(n, null); + return ist; + } + + if (compareItem(match, ist) == 0) { + int m = Math.min(ist.stackSize, fc); + if (tr == null) { + tr = inv.decrStackSize(n, m); + } else { + inv.decrStackSize(n, m); + tr.stackSize += m; + } + + fc -= m; + if (fc <= 0) { + break; + } + } + } + } + + return tr; + } + + public static class FilterMap { + protected TreeMap> map; + protected ItemStack[] filter; + + public FilterMap(ItemStack[] filt) { + this.filter = filt; + this.map = new TreeMap<>(MachineLib::compareItem); + + for(int i = 0; i < filt.length; ++i) { + if (filt[i] != null && filt[i].stackSize != 0) { + ((ArrayList)this.map.computeIfAbsent(filt[i], k -> new ArrayList())).add(i); + } + } + + } + + public int size() { + return this.map.size(); + } + + public boolean containsKey(ItemStack ist) { + return this.map.containsKey(ist); + } + + public int firstMatch(ItemStack ist) { + ArrayList arl = (ArrayList)this.map.get(ist); + return arl == null ? -1 : arl.get(0); + } + } + + public static class SubInventory implements IInventory { + IInventory parent; + int[] slots; + + SubInventory(IInventory par, int[] sl) { + this.parent = par; + this.slots = sl; + } + + public int getSizeInventory() { + return this.slots.length; + } + + public ItemStack getStackInSlot(int idx) { + return ArrayUtils.contains(this.slots, idx) ? this.parent.getStackInSlot(idx) : null; + } + + public ItemStack decrStackSize(int idx, int num) { + return ArrayUtils.contains(this.slots, idx) ? this.parent.decrStackSize(idx, num) : null; + } + + public ItemStack getStackInSlotOnClosing(int idx) { + return ArrayUtils.contains(this.slots, idx) ? this.parent.getStackInSlotOnClosing(idx) : null; + } + + public void setInventorySlotContents(int idx, ItemStack ist) { + if (ArrayUtils.contains(this.slots, idx)) { + this.parent.setInventorySlotContents(idx, ist); + } + + } + + public String getInventoryName() { + return this.parent.getInventoryName(); + } + + public int getInventoryStackLimit() { + return this.parent.getInventoryStackLimit(); + } + + public void markDirty() { + this.parent.markDirty(); + } + + public boolean isUseableByPlayer(EntityPlayer player) { + return this.parent.isUseableByPlayer(player); + } + + public void openInventory() { + } + + public void closeInventory() { + } + + public boolean hasCustomInventoryName() { + return this.parent.hasCustomInventoryName(); + } + + public boolean isItemValidForSlot(int slotID, ItemStack stack) { + return this.parent.isItemValidForSlot(slotID, stack); + } + } +} diff --git a/src/main/java/com/eloraam/redpower/core/MathLib.java b/src/main/java/com/eloraam/redpower/core/MathLib.java new file mode 100644 index 0000000..8c93c25 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/MathLib.java @@ -0,0 +1,43 @@ +package com.eloraam.redpower.core; + +public class MathLib { + private static Matrix3[] orientMatrixList = new Matrix3[24]; + private static Quat[] orientQuatList = new Quat[24]; + + public static void orientMatrix(Matrix3 m, int down, int rot) { + m.set(orientMatrixList[down * 4 + rot]); + } + + public static Quat orientQuat(int down, int rot) { + return new Quat(orientQuatList[down * 4 + rot]); + } + + static { + Quat q2 = Quat.aroundAxis(1.0, 0.0, 0.0, Math.PI); + + for(int j = 0; j < 4; ++j) { + Quat q1 = Quat.aroundAxis(0.0, 1.0, 0.0, -Math.PI / 2 * (double)j); + orientQuatList[j] = q1; + q1 = new Quat(q1); + q1.multiply(q2); + orientQuatList[j + 4] = q1; + } + + for(int i = 0; i < 4; ++i) { + int k = (i >> 1 | i << 1) & 3; + q2 = Quat.aroundAxis(0.0, 0.0, 1.0, Math.PI / 2); + q2.multiply(Quat.aroundAxis(0.0, 1.0, 0.0, Math.PI / 2 * (double)(k + 1))); + + for(int var6 = 0; var6 < 4; ++var6) { + Quat q1 = new Quat(orientQuatList[var6]); + q1.multiply(q2); + orientQuatList[8 + 4 * i + var6] = q1; + } + } + + for(int var9 = 0; var9 < 24; ++var9) { + orientMatrixList[var9] = new Matrix3(orientQuatList[var9]); + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/core/Matrix3.java b/src/main/java/com/eloraam/redpower/core/Matrix3.java new file mode 100644 index 0000000..e5afa00 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/Matrix3.java @@ -0,0 +1,106 @@ +package com.eloraam.redpower.core; + +import java.util.Formatter; +import java.util.Locale; + +public class Matrix3 { + public double xx; + public double xy; + public double xz; + public double yx; + public double yy; + public double yz; + public double zx; + public double zy; + public double zz; + + public Matrix3() { + } + + public Matrix3(Quat q) { + this.set(q); + } + + public void set(Quat q) { + this.xx = q.s * q.s + q.x * q.x - q.z * q.z - q.y * q.y; + this.xy = 2.0 * (q.s * q.z + q.x * q.y); + this.xz = 2.0 * (q.x * q.z - q.s * q.y); + this.yx = 2.0 * (q.x * q.y - q.s * q.z); + this.yy = q.s * q.s + q.y * q.y - q.z * q.z - q.x * q.x; + this.yz = 2.0 * (q.s * q.x + q.y * q.z); + this.zx = 2.0 * (q.s * q.y + q.x * q.z); + this.zy = 2.0 * (q.y * q.z - q.s * q.x); + this.zz = q.s * q.s + q.z * q.z - q.y * q.y - q.x * q.x; + } + + public void set(Matrix3 m) { + this.xx = m.xx; + this.xy = m.xy; + this.xz = m.xz; + this.yx = m.yx; + this.yy = m.yy; + this.yz = m.yz; + this.zx = m.zx; + this.zy = m.zy; + this.zz = m.zz; + } + + public Matrix3 multiply(Matrix3 m) { + Matrix3 tr = new Matrix3(); + tr.xx = this.xx * m.xx + this.xy * m.yx + this.xz * m.zx; + tr.xy = this.xx * m.xy + this.xy * m.yy + this.xz * m.zy; + tr.xz = this.xx * m.xz + this.xy * m.yz + this.xz * m.zz; + tr.yx = this.yx * m.xx + this.yy * m.yx + this.yz * m.zx; + tr.yy = this.yx * m.xy + this.yy * m.yy + this.yz * m.zy; + tr.yz = this.yx * m.xz + this.yy * m.yz + this.yz * m.zz; + tr.zx = this.zx * m.xx + this.zy * m.yx + this.zz * m.zx; + tr.zy = this.zx * m.xy + this.zy * m.yy + this.zz * m.zy; + tr.zz = this.zx * m.xz + this.zy * m.yz + this.zz * m.zz; + return tr; + } + + public static Matrix3 getRotY(double angle) { + double c = Math.cos(angle); + double s = Math.sin(angle); + Matrix3 tr = new Matrix3(); + tr.xx = c; + tr.xy = 0.0; + tr.xz = s; + tr.yx = 0.0; + tr.yy = 1.0; + tr.yz = 0.0; + tr.zx = -s; + tr.zy = 0.0; + tr.zz = c; + return tr; + } + + public Vector3 getBasisVector(int n) { + return n == 0 ? new Vector3(this.xx, this.xy, this.xz) : (n == 1 ? new Vector3(this.yx, this.yy, this.yz) : new Vector3(this.zx, this.zy, this.zz)); + } + + public double det() { + return this.xx * (this.yy * this.zz - this.yz * this.zy) + - this.xy * (this.yx * this.zz - this.yz * this.zx) + + this.xz * (this.yx * this.zy - this.yy * this.zx); + } + + public void rotate(Vector3 v) { + double tx = this.xx * v.x + this.yx * v.y + this.zx * v.z; + double ty = this.xy * v.x + this.yy * v.y + this.zy * v.z; + double tz = this.xz * v.x + this.yz * v.y + this.zz * v.z; + v.x = tx; + v.y = ty; + v.z = tz; + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + Formatter fmt = new Formatter(sb, Locale.US); + fmt.format("Matrix:\n"); + fmt.format(" < %f %f %f >\n", this.xx, this.xy, this.xz); + fmt.format(" < %f %f %f >\n", this.yx, this.yy, this.yz); + fmt.format(" < %f %f %f >\n", this.zx, this.zy, this.zz); + return sb.toString(); + } +} diff --git a/src/main/java/com/eloraam/redpower/core/MultiLib.java b/src/main/java/com/eloraam/redpower/core/MultiLib.java new file mode 100644 index 0000000..03e361c --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/MultiLib.java @@ -0,0 +1,50 @@ +package com.eloraam.redpower.core; + +import com.eloraam.redpower.RedPowerBase; +import java.util.List; +import net.minecraft.world.World; + +public class MultiLib { + public static boolean isClear(World world, WorldCoord parent, List coords) { + for(WorldCoord wc : coords) { + if (!RedPowerBase.blockMultiblock.canPlaceBlockAt(world, wc.x, wc.y, wc.z)) { + TileMultiblock tmb = CoreLib.getTileEntity(world, wc, TileMultiblock.class); + if (tmb == null) { + return false; + } + + if (tmb.relayX != parent.x || tmb.relayY != parent.y || tmb.relayZ != parent.z) { + return false; + } + } + } + + return true; + } + + public static void addRelays(World world, WorldCoord parent, int md, List coords) { + int num = 0; + + for(WorldCoord wc : coords) { + world.setBlock(wc.x, wc.y, wc.z, RedPowerBase.blockMultiblock, md, 3); + TileMultiblock tmb = CoreLib.getTileEntity(world, wc, TileMultiblock.class); + if (tmb != null) { + tmb.relayX = parent.x; + tmb.relayY = parent.y; + tmb.relayZ = parent.z; + tmb.relayNum = num++; + } + } + + } + + public static void removeRelays(World world, WorldCoord parent, List coords) { + for(WorldCoord wc : coords) { + TileMultiblock tmb = CoreLib.getTileEntity(world, wc, TileMultiblock.class); + if (tmb != null && tmb.relayX == parent.x && tmb.relayY == parent.y && tmb.relayZ == parent.z) { + world.setBlockToAir(wc.x, wc.y, wc.z); + } + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/core/OreStack.java b/src/main/java/com/eloraam/redpower/core/OreStack.java new file mode 100644 index 0000000..8abc438 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/OreStack.java @@ -0,0 +1,16 @@ +package com.eloraam.redpower.core; + +public class OreStack { + public String material; + public int quantity; + + public OreStack(String mat, int qty) { + this.material = mat; + this.quantity = qty; + } + + public OreStack(String mat) { + this.material = mat; + this.quantity = 1; + } +} diff --git a/src/main/java/com/eloraam/redpower/core/PacketGuiEvent.java b/src/main/java/com/eloraam/redpower/core/PacketGuiEvent.java new file mode 100644 index 0000000..4c05a34 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/PacketGuiEvent.java @@ -0,0 +1,59 @@ +package com.eloraam.redpower.core; + +import cpw.mods.fml.common.network.simpleimpl.IMessage; +import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; +import cpw.mods.fml.common.network.simpleimpl.MessageContext; +import io.netty.buffer.ByteBuf; +import net.minecraft.client.Minecraft; +import net.minecraft.client.entity.EntityClientPlayerMP; +import net.minecraft.client.network.NetHandlerPlayClient; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.network.NetHandlerPlayServer; + +public class PacketGuiEvent implements IMessageHandler { + public IMessage onMessage(PacketGuiEvent.GuiMessageEvent message, MessageContext context) { + if (context.netHandler instanceof NetHandlerPlayServer) { + EntityPlayerMP player = ((NetHandlerPlayServer)context.netHandler).playerEntity; + if (player.openContainer != null && player.openContainer.windowId == message.windowId && player.openContainer instanceof IHandleGuiEvent) { + IHandleGuiEvent ihge = (IHandleGuiEvent)player.openContainer; + ihge.handleGuiEvent(message); + } + } else if (context.netHandler instanceof NetHandlerPlayClient) { + EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer; + if (player.openContainer != null && player.openContainer.windowId == message.windowId && player.openContainer instanceof IHandleGuiEvent) { + IHandleGuiEvent ihge = (IHandleGuiEvent)player.openContainer; + ihge.handleGuiEvent(message); + } + } + + return null; + } + + public static class GuiMessageEvent implements IMessage { + public int eventId = -1; + public int windowId = -1; + public byte[] parameters; + + public GuiMessageEvent() { + } + + public GuiMessageEvent(int eventId, int windowId, byte... params) { + this.eventId = eventId; + this.windowId = windowId; + this.parameters = params; + } + + public void fromBytes(ByteBuf dataStream) { + this.eventId = dataStream.readInt(); + this.windowId = dataStream.readInt(); + this.parameters = new byte[dataStream.readableBytes()]; + dataStream.readBytes(this.parameters); + } + + public void toBytes(ByteBuf dataStream) { + dataStream.writeInt(this.eventId); + dataStream.writeInt(this.windowId); + dataStream.writeBytes(this.parameters); + } + } +} diff --git a/src/main/java/com/eloraam/redpower/core/PacketHandler.java b/src/main/java/com/eloraam/redpower/core/PacketHandler.java new file mode 100644 index 0000000..4b93dab --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/PacketHandler.java @@ -0,0 +1,33 @@ +package com.eloraam.redpower.core; + +import cpw.mods.fml.common.network.NetworkRegistry; +import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint; +import cpw.mods.fml.common.network.simpleimpl.IMessage; +import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper; +import cpw.mods.fml.relauncher.Side; +import net.minecraft.entity.player.EntityPlayerMP; + +public class PacketHandler { + public SimpleNetworkWrapper netHandler = NetworkRegistry.INSTANCE.newSimpleChannel("Redpower2"); + + public void init() { + this.netHandler.registerMessage(PacketGuiEvent.class, PacketGuiEvent.GuiMessageEvent.class, 1, Side.CLIENT); + this.netHandler.registerMessage(PacketGuiEvent.class, PacketGuiEvent.GuiMessageEvent.class, 1, Side.SERVER); + } + + public void sendTo(IMessage message, EntityPlayerMP player) { + this.netHandler.sendTo(message, player); + } + + public void sendToAllAround(IMessage message, TargetPoint point) { + this.netHandler.sendToAllAround(message, point); + } + + public void sendToDimension(IMessage message, int dimensionId) { + this.netHandler.sendToDimension(message, dimensionId); + } + + public void sendToServer(IMessage message) { + this.netHandler.sendToServer(message); + } +} diff --git a/src/main/java/com/eloraam/redpower/core/PipeLib.java b/src/main/java/com/eloraam/redpower/core/PipeLib.java new file mode 100644 index 0000000..77e3760 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/PipeLib.java @@ -0,0 +1,256 @@ +package com.eloraam.redpower.core; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockLiquid; +import net.minecraft.block.material.Material; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidBlock; +import net.minecraftforge.fluids.IFluidHandler; + +public class PipeLib { + private static boolean isConSide(IBlockAccess iba, int x, int y, int z, int side) { + TileEntity te = iba.getTileEntity(x, y, z); + if (te instanceof IPipeConnectable) { + IPipeConnectable itc1 = (IPipeConnectable)te; + int ilt1 = itc1.getPipeConnectableSides(); + return (ilt1 & 1 << side) > 0; + } else { + if (te instanceof IFluidHandler) { + IFluidHandler itc = (IFluidHandler)te; + FluidTankInfo[] info = itc.getTankInfo(ForgeDirection.getOrientation(side)); + if (info != null) { + for(FluidTankInfo i : info) { + if (i != null && i.capacity > 0) { + return true; + } + } + } + } + + return false; + } + } + + public static int getConnections(IBlockAccess iba, int x, int y, int z) { + IPipeConnectable itc = CoreLib.getTileEntity(iba, x, y, z, IPipeConnectable.class); + if (itc == null) { + return 0; + } else { + int trs = 0; + int sides = itc.getPipeConnectableSides(); + if ((sides & 1) > 0 && isConSide(iba, x, y - 1, z, 1)) { + trs |= 1; + } + + if ((sides & 2) > 0 && isConSide(iba, x, y + 1, z, 0)) { + trs |= 2; + } + + if ((sides & 4) > 0 && isConSide(iba, x, y, z - 1, 3)) { + trs |= 4; + } + + if ((sides & 8) > 0 && isConSide(iba, x, y, z + 1, 2)) { + trs |= 8; + } + + if ((sides & 16) > 0 && isConSide(iba, x - 1, y, z, 5)) { + trs |= 16; + } + + if ((sides & 32) > 0 && isConSide(iba, x + 1, y, z, 4)) { + trs |= 32; + } + + return trs; + } + } + + public static int getFlanges(IBlockAccess iba, WorldCoord wci, int sides) { + int tr = 0; + + for(int i = 0; i < 6; ++i) { + if ((sides & 1 << i) != 0) { + WorldCoord wc = wci.copy(); + wc.step(i); + TileEntity te = iba.getTileEntity(wc.x, wc.y, wc.z); + if (te != null) { + if (te instanceof IPipeConnectable) { + IPipeConnectable itc = (IPipeConnectable)te; + if ((itc.getPipeFlangeSides() & 1 << (i ^ 1)) > 0) { + tr |= 1 << i; + } + } else if (te instanceof IFluidHandler) { + IFluidHandler itc = (IFluidHandler)te; + FluidTankInfo[] info = itc.getTankInfo(ForgeDirection.getOrientation(i ^ 1)); + if (info != null) { + for(FluidTankInfo inf : info) { + if (inf != null && inf.capacity > 0) { + tr |= 1 << i; + break; + } + } + } + } + } + } + } + + return tr; + } + + public static Integer getPressure(World world, WorldCoord wc, int side) { + TileEntity te = world.getTileEntity(wc.x, wc.y, wc.z); + if (te != null) { + if (te instanceof IPipeConnectable) { + IPipeConnectable itc = (IPipeConnectable)te; + return itc.getPipePressure(side); + } + + if (te instanceof IFluidHandler) { + IFluidHandler ifh = (IFluidHandler)te; + FluidTankInfo[] info = ifh.getTankInfo(ForgeDirection.getOrientation(side)); + if (info != null) { + for(FluidTankInfo i : info) { + if (i.fluid != null) { + return (int)((double)i.fluid.amount / (double)i.capacity * 100.0); + } + } + + for(FluidTankInfo i : info) { + if (i.capacity > 0) { + return -100; + } + } + } + } + } + + return null; + } + + public static Fluid getFluid(World world, WorldCoord wc) { + Block bl = world.getBlock(wc.x, wc.y, wc.z); + if (bl instanceof IFluidBlock) { + IFluidBlock fcl = (IFluidBlock)bl; + return fcl.getFluid(); + } else { + if (bl instanceof BlockLiquid) { + BlockLiquid blq = (BlockLiquid)bl; + if (blq.getMaterial() == Material.water) { + return FluidRegistry.WATER; + } + + if (blq.getMaterial() == Material.lava) { + return FluidRegistry.LAVA; + } + } + + return null; + } + } + + public static int getFluidAmount(World world, WorldCoord wc) { + Block bl = world.getBlock(wc.x, wc.y, wc.z); + if (bl instanceof IFluidBlock) { + IFluidBlock fcl = (IFluidBlock)bl; + float fp = fcl.getFilledPercentage(world, wc.x, wc.y, wc.z); + return (int)((float)fcl.getFluid().getDensity() * fp); + } else { + if (bl instanceof BlockLiquid) { + BlockLiquid blq = (BlockLiquid)bl; + if (blq.getMaterial() == Material.water || blq.getMaterial() == Material.lava) { + return 1000; + } + } + + return 0; + } + } + + public static void movePipeLiquid(World world, IPipeConnectable src, WorldCoord wsrc, int sides) { + for(int side = 0; side < 6; ++side) { + if ((sides & 1 << side) != 0) { + WorldCoord wc = wsrc.coordStep(side); + TileEntity te = world.getTileEntity(wc.x, wc.y, wc.z); + if (te != null) { + if (te instanceof IPipeConnectable) { + IPipeConnectable itc = (IPipeConnectable)te; + int srcPressure = src.getPipePressure(side); + int dstPressure = itc.getPipePressure(side ^ 1); + if (srcPressure >= dstPressure) { + FluidBuffer srcBuffer = src.getPipeBuffer(side); + if (srcBuffer != null) { + Fluid srcType = srcBuffer.Type; + int srcLevel = srcBuffer.getLevel() + srcBuffer.Delta; + if (srcType != null && srcLevel > 0) { + FluidBuffer dstBuffer = itc.getPipeBuffer(side ^ 1); + if (dstBuffer != null) { + Fluid dstType = dstBuffer.Type; + int dstLevel = dstBuffer.getLevel(); + if (dstType == null || dstType == srcType) { + int ls = Math.max(srcPressure > dstPressure ? 25 : 0, (srcLevel - dstLevel) / 2); + ls = Math.min(Math.min(ls, dstBuffer.getMaxLevel() - dstLevel), srcLevel); + if (ls > 0) { + srcBuffer.addLevel(srcType, -ls); + dstBuffer.addLevel(srcType, ls); + } + } + } + } + } + } + } else if (te instanceof IFluidHandler) { + IFluidHandler ifh = (IFluidHandler)te; + FluidBuffer srcBuffer = src.getPipeBuffer(side); + if (srcBuffer != null) { + FluidTankInfo[] info = ifh.getTankInfo(ForgeDirection.getOrientation(side ^ 1)); + if (info != null) { + for(FluidTankInfo i : info) { + Fluid bType = srcBuffer.Type; + int srcLevel = srcBuffer.getLevel() + srcBuffer.Delta; + int srcPressure = src.getPipePressure(side); + if (i.capacity > 0) { + if (i.fluid != null) { + if (i.fluid.getFluid() != bType && bType != null) { + continue; + } + } else if (bType == null) { + continue; + } + + int dstLevel = i.fluid == null ? 0 : i.fluid.amount; + int dstPressure = dstLevel <= 0 ? -100 : (int)((double)dstLevel / (double)i.capacity * 100.0); + if (srcPressure < dstPressure && dstLevel > 0) { + int qty = Math.min(Math.min(Math.max(25, (dstLevel - srcLevel) / 2), srcBuffer.getMaxLevel() - srcLevel), dstLevel); + if (qty > 0) { + FluidStack drStack = ifh.drain(ForgeDirection.getOrientation(side ^ 1), qty, true); + if (drStack != null) { + srcBuffer.addLevel(drStack.getFluid(), drStack.amount); + } + } + } else if (srcPressure > dstPressure && srcLevel > 0) { + int qty = Math.min(Math.min(Math.max(25, (srcLevel - dstLevel) / 2), i.capacity - dstLevel), srcLevel); + if (qty > 0) { + qty = ifh.fill(ForgeDirection.getOrientation(side ^ 1), new FluidStack(bType, qty), true); + srcBuffer.addLevel(bType, -qty); + } + } + } + } + } + } + } + } + } + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/core/PowerLib.java b/src/main/java/com/eloraam/redpower/core/PowerLib.java new file mode 100644 index 0000000..8d6f063 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/PowerLib.java @@ -0,0 +1,18 @@ +package com.eloraam.redpower.core; + +public class PowerLib { + public static int cutBits(int bits, int cut) { + int i = 1; + + while(i <= cut) { + if ((cut & i) == 0) { + i <<= 1; + } else { + bits = bits & i - 1 | bits >> 1 & ~(i - 1); + cut >>= 1; + } + } + + return bits; + } +} diff --git a/src/main/java/com/eloraam/redpower/core/Quat.java b/src/main/java/com/eloraam/redpower/core/Quat.java new file mode 100644 index 0000000..2dbc8fb --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/Quat.java @@ -0,0 +1,103 @@ +package com.eloraam.redpower.core; + +import java.util.Formatter; +import java.util.Locale; + +public class Quat { + public double x; + public double y; + public double z; + public double s; + public static final double SQRT2 = Math.sqrt(2.0); + + public Quat() { + this.s = 1.0; + this.x = 0.0; + this.y = 0.0; + this.z = 0.0; + } + + public Quat(Quat q) { + this.x = q.x; + this.y = q.y; + this.z = q.z; + this.s = q.s; + } + + public Quat(double si, double xi, double yi, double zi) { + this.x = xi; + this.y = yi; + this.z = zi; + this.s = si; + } + + public void set(Quat q) { + this.x = q.x; + this.y = q.y; + this.z = q.z; + this.s = q.s; + } + + public static Quat aroundAxis(double xi, double yi, double zi, double a) { + a *= 0.5; + double sn = Math.sin(a); + return new Quat(Math.cos(a), xi * sn, yi * sn, zi * sn); + } + + public void multiply(Quat q) { + double ts = this.s * q.s - this.x * q.x - this.y * q.y - this.z * q.z; + double tx = this.s * q.x + this.x * q.s - this.y * q.z + this.z * q.y; + double ty = this.s * q.y + this.x * q.z + this.y * q.s - this.z * q.x; + double tz = this.s * q.z - this.x * q.y + this.y * q.x + this.z * q.s; + this.s = ts; + this.x = tx; + this.y = ty; + this.z = tz; + } + + public void rightMultiply(Quat q) { + double ts = this.s * q.s - this.x * q.x - this.y * q.y - this.z * q.z; + double tx = this.s * q.x + this.x * q.s + this.y * q.z - this.z * q.y; + double ty = this.s * q.y - this.x * q.z + this.y * q.s + this.z * q.x; + double tz = this.s * q.z + this.x * q.y - this.y * q.x + this.z * q.s; + this.s = ts; + this.x = tx; + this.y = ty; + this.z = tz; + } + + public double mag() { + return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z + this.s * this.s); + } + + public void normalize() { + double d = this.mag(); + if (d != 0.0) { + d = 1.0 / d; + this.x *= d; + this.y *= d; + this.z *= d; + this.s *= d; + } + + } + + public void rotate(Vector3 v) { + double ts = -this.x * v.x - this.y * v.y - this.z * v.z; + double tx = this.s * v.x + this.y * v.z - this.z * v.y; + double ty = this.s * v.y - this.x * v.z + this.z * v.x; + double tz = this.s * v.z + this.x * v.y - this.y * v.x; + v.x = tx * this.s - ts * this.x - ty * this.z + tz * this.y; + v.y = ty * this.s - ts * this.y + tx * this.z - tz * this.x; + v.z = tz * this.s - ts * this.z - tx * this.y + ty * this.x; + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + Formatter fmt = new Formatter(sb, Locale.US); + fmt.format("Quaternion:\n"); + fmt.format(" < %f %f %f %f >\n", this.s, this.x, this.y, this.z); + fmt.close(); + return sb.toString(); + } +} diff --git a/src/main/java/com/eloraam/redpower/core/RedPowerLib.java b/src/main/java/com/eloraam/redpower/core/RedPowerLib.java new file mode 100644 index 0000000..a2a2f75 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/RedPowerLib.java @@ -0,0 +1,903 @@ +package com.eloraam.redpower.core; + +import java.util.ArrayList; +import java.util.Deque; +import java.util.HashSet; +import java.util.LinkedList; +import java.util.List; +import java.util.Set; +import net.minecraft.block.Block; +import net.minecraft.block.BlockButton; +import net.minecraft.block.BlockRedstoneWire; +import net.minecraft.init.Blocks; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.tileentity.TileEntityPiston; +import net.minecraft.util.ChunkCoordinates; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; + +public class RedPowerLib { + private static Set powerClassMapping = new HashSet(); + private static Set blockUpdates = new HashSet(); + private static Deque powerSearch = new LinkedList(); + private static Set powerSearchTest = new HashSet(); + private static boolean searching = false; + + public static void notifyBlock(World world, int x, int y, int z, Block block) { + if (block != null) { + world.getBlock(x, y, z).onNeighborBlockChange(world, x, y, z, block); + } + + } + + public static void updateIndirectNeighbors(World w, int x, int y, int z, Block block) { + if (!w.isRemote) { + for(int a = -3; a <= 3; ++a) { + for(int b = -3; b <= 3; ++b) { + for(int c = -3; c <= 3; ++c) { + int md = a < 0 ? -a : a; + md += b < 0 ? -b : b; + md += c < 0 ? -c : c; + if (md <= 3) { + notifyBlock(w, x + a, y + b, z + c, block); + } + } + } + } + } + + } + + public static boolean isBlockRedstone(IBlockAccess iba, int x, int y, int z, int side) { + switch(side) { + case 0: + --y; + break; + case 1: + ++y; + break; + case 2: + --z; + break; + case 3: + ++z; + break; + case 4: + --x; + break; + case 5: + ++x; + } + + return iba.getBlock(x, y, z) instanceof BlockRedstoneWire; + } + + public static boolean isSideNormal(IBlockAccess iba, int x, int y, int z, int side) { + switch(side) { + case 0: + --y; + break; + case 1: + ++y; + break; + case 2: + --z; + break; + case 3: + ++z; + break; + case 4: + --x; + break; + case 5: + ++x; + } + + side ^= 1; + if (iba.getBlock(x, y, z).isNormalCube()) { + return true; + } else { + iba.getBlock(x, y, z); + IMultipart im = CoreLib.getTileEntity(iba, x, y, z, IMultipart.class); + return im != null && im.isSideNormal(side); + } + } + + public static boolean canSupportWire(IBlockAccess iba, int i, int j, int k, int side) { + switch(side) { + case 0: + --j; + break; + case 1: + ++j; + break; + case 2: + --k; + break; + case 3: + ++k; + break; + case 4: + --i; + break; + case 5: + ++i; + } + + side ^= 1; + if (iba instanceof World) { + World bid = (World)iba; + if (!bid.blockExists(i, j, k)) { + return true; + } + + if (bid.getBlock(i, j, k).isSideSolid(bid, i, j, k, ForgeDirection.getOrientation(side))) { + return true; + } + } + + if (iba.getBlock(i, j, k).isNormalCube()) { + return true; + } else { + Block block = iba.getBlock(i, j, k); + if (block == Blocks.piston_extension) { + return true; + } else if (block != Blocks.sticky_piston && block != Blocks.piston) { + IMultipart mpart = CoreLib.getTileEntity(iba, i, j, k, IMultipart.class); + return mpart != null && mpart.isSideNormal(side); + } else { + int im = iba.getBlockMetadata(i, j, k) & 7; + return i != im && im != 7; + } + } + } + + public static boolean isStrongPoweringTo(IBlockAccess iba, int x, int y, int z, int side) { + Block block = iba.getBlock(x, y, z); + if (iba.isAirBlock(x, y, z)) { + return false; + } else if (searching && block == Blocks.redstone_wire) { + return false; + } else if (!(iba instanceof World)) { + return false; + } else { + World world = (World)iba; + return block.isProvidingStrongPower(world, x, y, z, side) > 0; + } + } + + public static boolean isStrongPowered(IBlockAccess iba, int x, int y, int z, int side) { + return side != 1 && isStrongPoweringTo(iba, x, y - 1, z, 0) + || side != 0 && isStrongPoweringTo(iba, x, y + 1, z, 1) + || side != 3 && isStrongPoweringTo(iba, x, y, z - 1, 2) + || side != 2 && isStrongPoweringTo(iba, x, y, z + 1, 3) + || side != 5 && isStrongPoweringTo(iba, x - 1, y, z, 4) + || side != 4 && isStrongPoweringTo(iba, x + 1, y, z, 5); + } + + public static boolean isWeakPoweringTo(IBlockAccess iba, int x, int y, int z, int side) { + Block block = iba.getBlock(x, y, z); + return block != Blocks.air + && (!searching || block != Blocks.redstone_wire) + && (block.isProvidingWeakPower(iba, x, y, z, side) > 0 || side > 1 && block == Blocks.redstone_wire && block.isProvidingWeakPower(iba, x, y, z, 1) > 0); + } + + public static boolean isPoweringTo(IBlockAccess iba, int x, int y, int z, int side) { + Block block = iba.getBlock(x, y, z); + if (block == Blocks.air) { + return false; + } else if (block.isProvidingWeakPower(iba, x, y, z, side) > 0) { + return true; + } else if (block.isNormalCube() && isStrongPowered(iba, x, y, z, side)) { + return true; + } else { + return side > 1 && block == Blocks.redstone_wire && !searching && block.isProvidingWeakPower(iba, x, y, z, 1) > 0; + } + } + + public static boolean isPowered(IBlockAccess iba, int x, int y, int z, int cons, int inside) { + return (cons & 17895680) > 0 && isWeakPoweringTo(iba, x, y - 1, z, 0) + || (cons & 35791360) > 0 && isWeakPoweringTo(iba, x, y + 1, z, 1) + || (cons & 71565329) > 0 && isWeakPoweringTo(iba, x, y, z - 1, 2) + || (cons & 143130658) > 0 && isWeakPoweringTo(iba, x, y, z + 1, 3) + || (cons & 268452932) > 0 && isWeakPoweringTo(iba, x - 1, y, z, 4) + || (cons & 536905864) > 0 && isWeakPoweringTo(iba, x + 1, y, z, 5) + || (inside & 1) > 0 && isPoweringTo(iba, x, y - 1, z, 0) + || (inside & 2) > 0 && isPoweringTo(iba, x, y + 1, z, 1) + || (inside & 4) > 0 && isPoweringTo(iba, x, y, z - 1, 2) + || (inside & 8) > 0 && isPoweringTo(iba, x, y, z + 1, 3) + || (inside & 16) > 0 && isPoweringTo(iba, x - 1, y, z, 4) + || (inside & 32) > 0 && isPoweringTo(iba, x + 1, y, z, 5); + } + + private static int getSidePowerMask(IBlockAccess iba, int x, int y, int z, int ch, int side) { + IRedPowerConnectable irp = CoreLib.getTileEntity(iba, x, y, z, IRedPowerConnectable.class); + int mask = getConDirMask(side); + if (irp != null) { + int m = irp.getPoweringMask(ch); + m = (m & 1431655765) << 1 | (m & 715827882) >> 1; + return m & mask; + } else if (ch != 0) { + return 0; + } else { + return isWeakPoweringTo(iba, x, y, z, side) ? mask & 16777215 : (isPoweringTo(iba, x, y, z, side) ? mask : 0); + } + } + + public static int getPowerState(IBlockAccess iba, int i, int j, int k, int cons, int ch) { + int trs = 0; + if ((cons & 17895680) > 0) { + trs |= getSidePowerMask(iba, i, j - 1, k, ch, 0); + } + + if ((cons & 35791360) > 0) { + trs |= getSidePowerMask(iba, i, j + 1, k, ch, 1); + } + + if ((cons & 71565329) > 0) { + trs |= getSidePowerMask(iba, i, j, k - 1, ch, 2); + } + + if ((cons & 143130658) > 0) { + trs |= getSidePowerMask(iba, i, j, k + 1, ch, 3); + } + + if ((cons & 268452932) > 0) { + trs |= getSidePowerMask(iba, i - 1, j, k, ch, 4); + } + + if ((cons & 536905864) > 0) { + trs |= getSidePowerMask(iba, i + 1, j, k, ch, 5); + } + + return trs & cons; + } + + public static int getRotPowerState(IBlockAccess iba, int i, int j, int k, int rcon, int rot, int ch) { + int c1 = mapRotToCon(rcon, rot); + int ps = getPowerState(iba, i, j, k, c1, ch); + return mapConToRot(ps, rot); + } + + public static int getConDirMask(int dir) { + switch(dir) { + case 0: + return 17895680; + case 1: + return 35791360; + case 2: + return 71565329; + case 3: + return 143130658; + case 4: + return 268452932; + default: + return 536905864; + } + } + + public static int mapConToLocal(int cons, int face) { + cons >>= face * 4; + cons &= 15; + switch(face) { + case 0: + return cons; + case 1: + return cons ^ ((cons ^ cons >> 1) & 1) * 3; + case 2: + default: + return cons ^ ((cons ^ cons >> 2) & 3) * 5; + case 3: + case 4: + cons ^= ((cons ^ cons >> 2) & 3) * 5; + return cons ^ ((cons ^ cons >> 1) & 1) * 3; + } + } + + public static int mapLocalToCon(int loc, int face) { + switch(face) { + case 0: + break; + case 1: + loc ^= ((loc ^ loc >> 1) & 1) * 3; + break; + case 2: + default: + loc ^= ((loc ^ loc >> 2) & 3) * 5; + break; + case 3: + case 4: + loc ^= ((loc ^ loc >> 1) & 1) * 3; + loc ^= ((loc ^ loc >> 2) & 3) * 5; + } + + return loc << face * 4; + } + + public static int mapRotToLocal(int rm, int rot) { + rm = rm << rot | rm >> 4 - rot; + rm &= 15; + return rm & 8 | (rm & 3) << 1 | rm >> 2 & 1; + } + + public static int mapLocalToRot(int rm, int rot) { + rm = rm & 8 | (rm & 6) >> 1 | rm << 2 & 4; + rm = rm << 4 - rot | rm >> rot; + return rm & 15; + } + + public static int mapConToRot(int con, int rot) { + return mapLocalToRot(mapConToLocal(con, rot >> 2), rot & 3); + } + + public static int mapRotToCon(int con, int rot) { + return mapLocalToCon(mapRotToLocal(con, rot & 3), rot >> 2); + } + + public static int getDirToRedstone(int rsd) { + switch(rsd) { + case 2: + return 0; + case 3: + return 2; + case 4: + return 3; + case 5: + return 1; + default: + return 0; + } + } + + public static int getConSides(IBlockAccess iba, int i, int j, int k, int side, int pcl) { + Block block = iba.getBlock(i, j, k); + if (iba.isAirBlock(i, j, k)) { + return 0; + } else { + IConnectable rpa = CoreLib.getTileEntity(iba, i, j, k, IConnectable.class); + if (rpa != null) { + int md = rpa.getConnectClass(side); + return isCompatible(md, pcl) ? rpa.getConnectableMask() : 0; + } else if (!isCompatible(0, pcl)) { + return 0; + } else if (block == Blocks.piston || block == Blocks.sticky_piston) { + int md = iba.getBlockMetadata(i, j, k) & 7; + return md == 7 ? 0 : 1073741823 ^ getConDirMask(md); + } else if (block == Blocks.piston_extension) { + TileEntity md2 = iba.getTileEntity(i, j, k); + if (!(md2 instanceof TileEntityPiston)) { + return 0; + } else { + TileEntityPiston tep = (TileEntityPiston)md2; + Block sid = tep.getStoredBlockID(); + if (sid != Blocks.piston && sid != Blocks.sticky_piston) { + return 0; + } else { + int md1 = tep.getBlockMetadata() & 7; + return md1 == 7 ? 0 : 1073741823 ^ getConDirMask(md1); + } + } + } else if (block == Blocks.dispenser || block instanceof BlockButton || block == Blocks.lever) { + return 1073741823; + } else if (block == Blocks.redstone_torch || block == Blocks.unlit_redstone_torch) { + return 1073741823; + } else if (block != Blocks.unpowered_repeater && block != Blocks.powered_repeater) { + return block.canConnectRedstone(iba, i, j, k, getDirToRedstone(side)) ? getConDirMask(side) : 0; + } else { + int md = iba.getBlockMetadata(i, j, k) & 1; + return md > 0 ? 12 : 3; + } + } + } + + private static int getES1(IBlockAccess iba, int i, int j, int k, int side, int pcl, int cc) { + if (iba.isAirBlock(i, j, k)) { + return 0; + } else { + IConnectable rpa = CoreLib.getTileEntity(iba, i, j, k, IConnectable.class); + if (rpa != null) { + int cc2 = rpa.getCornerPowerMode(); + if (cc == 0 || cc2 == 0) { + return 0; + } else if (cc == 2 && cc2 == 2) { + return 0; + } else if (cc == 3 && cc2 == 1) { + return 0; + } else { + int pc = rpa.getConnectClass(side); + return isCompatible(pc, pcl) ? rpa.getConnectableMask() : 0; + } + } else { + return 0; + } + } + } + + public static int getExtConSides(IBlockAccess iba, IConnectable irp, int i, int j, int k, int dir, int cc) { + int cons = irp.getConnectableMask(); + cons &= getConDirMask(dir) & 16777215; + if (cons == 0) { + return 0; + } else { + Block block = iba.getBlock(i, j, k); + if (CoverLib.blockCoverPlate != null && block == CoverLib.blockCoverPlate) { + if (iba.getBlockMetadata(i, j, k) != 0) { + return 0; + } + + ICoverable pcl = CoreLib.getTileEntity(iba, i, j, k, ICoverable.class); + if (pcl == null) { + return 0; + } + + int isv = pcl.getCoverMask(); + if ((isv & 1 << (dir ^ 1)) > 0) { + return 0; + } + + isv |= isv << 12; + isv |= isv << 6; + isv &= 197379; + isv |= isv << 3; + isv &= 1118481; + isv |= isv << 2; + isv |= isv << 1; + cons &= ~isv; + } else if (!iba.isAirBlock(i, j, k) && block != Blocks.flowing_water && block != Blocks.water) { + return 0; + } + + int pcl1 = irp.getConnectClass(dir); + int isv = 0; + if ((cons & 15) > 0) { + isv |= getES1(iba, i, j - 1, k, 1, pcl1, cc) & 2236928; + } + + if ((cons & 240) > 0) { + isv |= getES1(iba, i, j + 1, k, 0, pcl1, cc) & 1118464; + } + + if ((cons & 3840) > 0) { + isv |= getES1(iba, i, j, k - 1, 3, pcl1, cc) & 8912930; + } + + if ((cons & 61440) > 0) { + isv |= getES1(iba, i, j, k + 1, 2, pcl1, cc) & 4456465; + } + + if ((cons & 983040) > 0) { + isv |= getES1(iba, i - 1, j, k, 5, pcl1, cc) & 34952; + } + + if ((cons & 15728640) > 0) { + isv |= getES1(iba, i + 1, j, k, 4, pcl1, cc) & 17476; + } + + isv >>= (dir ^ 1) << 2; + isv = (isv & 10) >> 1 | (isv & 5) << 1; + isv |= isv << 6; + isv |= isv << 3; + isv &= 4369; + isv <<= dir & 1; + switch(dir) { + case 0: + case 1: + return isv << 8; + case 2: + case 3: + return isv << 10 & 0xFF0000 | isv & 0xFF; + default: + return isv << 2; + } + } + } + + public static int getConnections(IBlockAccess iba, IConnectable irp, int x, int y, int z) { + int cons = irp.getConnectableMask(); + int cs = 0; + if ((cons & 17895680) > 0) { + int pcl = irp.getConnectClass(0); + cs |= getConSides(iba, x, y - 1, z, 1, pcl) & 35791360; + } + + if ((cons & 35791360) > 0) { + int pcl = irp.getConnectClass(1); + cs |= getConSides(iba, x, y + 1, z, 0, pcl) & 17895680; + } + + if ((cons & 71565329) > 0) { + int pcl = irp.getConnectClass(2); + cs |= getConSides(iba, x, y, z - 1, 3, pcl) & 143130658; + } + + if ((cons & 143130658) > 0) { + int pcl = irp.getConnectClass(3); + cs |= getConSides(iba, x, y, z + 1, 2, pcl) & 71565329; + } + + if ((cons & 268452932) > 0) { + int pcl = irp.getConnectClass(4); + cs |= getConSides(iba, x - 1, y, z, 5, pcl) & 536905864; + } + + if ((cons & 536905864) > 0) { + int pcl = irp.getConnectClass(5); + cs |= getConSides(iba, x + 1, y, z, 4, pcl) & 268452932; + } + + cs = cs << 1 & 715827882 | cs >> 1 & 357913941; + return cs & cons; + } + + public static int getExtConnections(IBlockAccess iba, IConnectable irp, int i, int j, int k) { + byte cs = 0; + int cc = irp.getCornerPowerMode(); + int cs1 = cs | getExtConSides(iba, irp, i, j - 1, k, 0, cc); + cs1 |= getExtConSides(iba, irp, i, j + 1, k, 1, cc); + cs1 |= getExtConSides(iba, irp, i, j, k - 1, 2, cc); + cs1 |= getExtConSides(iba, irp, i, j, k + 1, 3, cc); + cs1 |= getExtConSides(iba, irp, i - 1, j, k, 4, cc); + return cs1 | getExtConSides(iba, irp, i + 1, j, k, 5, cc); + } + + public static int getExtConnectionExtras(IBlockAccess iba, IConnectable irp, int i, int j, int k) { + byte cs = 0; + int cs1 = cs | getExtConSides(iba, irp, i, j - 1, k, 0, 3); + cs1 |= getExtConSides(iba, irp, i, j + 1, k, 1, 3); + cs1 |= getExtConSides(iba, irp, i, j, k - 1, 2, 3); + cs1 |= getExtConSides(iba, irp, i, j, k + 1, 3, 3); + cs1 |= getExtConSides(iba, irp, i - 1, j, k, 4, 3); + return cs1 | getExtConSides(iba, irp, i + 1, j, k, 5, 3); + } + + public static int getTileCurrentStrength(World world, int i, int j, int k, int cons, int ch) { + IRedPowerConnectable irp = CoreLib.getTileEntity(world, i, j, k, IRedPowerConnectable.class); + if (irp == null) { + return -1; + } else if (irp instanceof IRedPowerWiring) { + IRedPowerWiring irw = (IRedPowerWiring)irp; + return irw.getCurrentStrength(cons, ch); + } else { + return (irp.getPoweringMask(ch) & cons) > 0 ? 255 : -1; + } + } + + public static int getTileOrRedstoneCurrentStrength(World world, int i, int j, int k, int cons, int ch) { + Block block = world.getBlock(i, j, k); + if (world.isAirBlock(i, j, k)) { + return -1; + } else if (block == Blocks.redstone_wire) { + int irp1 = world.getBlockMetadata(i, j, k); + return irp1 > 0 ? irp1 : -1; + } else { + IRedPowerConnectable irp = CoreLib.getTileEntity(world, i, j, k, IRedPowerConnectable.class); + if (irp == null) { + return -1; + } else if (irp instanceof IRedPowerWiring) { + IRedPowerWiring irw = (IRedPowerWiring)irp; + return irw.getCurrentStrength(cons, ch); + } else { + return (irp.getPoweringMask(ch) & cons) > 0 ? 255 : -1; + } + } + } + + private static int getIndCur(World world, int i, int j, int k, int d1, int d2, int ch) { + int d3; + switch(d1) { + case 0: + --j; + d3 = d2 + 2; + break; + case 1: + ++j; + d3 = d2 + 2; + break; + case 2: + --k; + d3 = d2 + (d2 & 2); + break; + case 3: + ++k; + d3 = d2 + (d2 & 2); + break; + case 4: + --i; + d3 = d2; + break; + default: + ++i; + d3 = d2; + } + + int d4; + switch(d3) { + case 0: + --j; + d4 = d1 - 2; + break; + case 1: + ++j; + d4 = d1 - 2; + break; + case 2: + --k; + d4 = d1 & 1 | (d1 & 4) >> 1; + break; + case 3: + ++k; + d4 = d1 & 1 | (d1 & 4) >> 1; + break; + case 4: + --i; + d4 = d1; + break; + default: + ++i; + d4 = d1; + } + + return getTileCurrentStrength(world, i, j, k, 1 << (d4 ^ 1) << ((d3 ^ 1) << 2), ch); + } + + public static int getMaxCurrentStrength(World world, int i, int j, int k, int cons, int indcon, int ch) { + int mcs = -1; + int ocon = cons << 1 & 715827882 | cons >> 1 & 357913941; + if ((cons & 17895680) > 0) { + mcs = Math.max(mcs, getTileOrRedstoneCurrentStrength(world, i, j - 1, k, ocon & 35791360, ch)); + } + + if ((cons & 35791360) > 0) { + mcs = Math.max(mcs, getTileOrRedstoneCurrentStrength(world, i, j + 1, k, ocon & 17895680, ch)); + } + + if ((cons & 71565329) > 0) { + mcs = Math.max(mcs, getTileOrRedstoneCurrentStrength(world, i, j, k - 1, ocon & 143130658, ch)); + } + + if ((cons & 143130658) > 0) { + mcs = Math.max(mcs, getTileOrRedstoneCurrentStrength(world, i, j, k + 1, ocon & 71565329, ch)); + } + + if ((cons & 268452932) > 0) { + mcs = Math.max(mcs, getTileOrRedstoneCurrentStrength(world, i - 1, j, k, ocon & 536905864, ch)); + } + + if ((cons & 536905864) > 0) { + mcs = Math.max(mcs, getTileOrRedstoneCurrentStrength(world, i + 1, j, k, ocon & 268452932, ch)); + } + + for(int a = 0; a < 6; ++a) { + for(int b = 0; b < 4; ++b) { + if ((indcon & 1 << a * 4 + b) > 0) { + mcs = Math.max(mcs, getIndCur(world, i, j, k, a, b, ch)); + } + } + } + + return mcs; + } + + public static void addUpdateBlock(int i, int j, int k) { + for(int a = -3; a <= 3; ++a) { + for(int b = -3; b <= 3; ++b) { + for(int c = -3; c <= 3; ++c) { + int md = a < 0 ? -a : a; + md += b < 0 ? -b : b; + md += c < 0 ? -c : c; + if (md <= 3) { + blockUpdates.add(new ChunkCoordinates(i + a, j + b, k + c)); + } + } + } + } + + } + + public static void addStartSearchBlock(int x, int y, int z) { + ChunkCoordinates sb = new ChunkCoordinates(x, y, z); + if (!powerSearchTest.contains(sb)) { + powerSearch.addLast(sb); + powerSearchTest.add(sb); + } + + } + + public static void addSearchBlock(int x, int y, int z) { + addStartSearchBlock(x, y, z); + blockUpdates.add(new ChunkCoordinates(x, y, z)); + } + + private static void addIndBl(int x, int y, int z, int d1, int d2) { + int d3; + switch(d1) { + case 0: + --y; + d3 = d2 + 2; + break; + case 1: + ++y; + d3 = d2 + 2; + break; + case 2: + --z; + d3 = d2 + (d2 & 2); + break; + case 3: + ++z; + d3 = d2 + (d2 & 2); + break; + case 4: + --x; + d3 = d2; + break; + default: + ++x; + d3 = d2; + } + + switch(d3) { + case 0: + --y; + break; + case 1: + ++y; + break; + case 2: + --z; + break; + case 3: + ++z; + break; + case 4: + --x; + break; + case 5: + ++x; + } + + addSearchBlock(x, y, z); + } + + public static void addSearchBlocks(int i, int j, int k, int cons, int indcon) { + int ocon = cons << 1 & 11184810 | cons >> 1 & 5592405; + if ((cons & 17895680) > 0) { + addSearchBlock(i, j - 1, k); + } + + if ((cons & 35791360) > 0) { + addSearchBlock(i, j + 1, k); + } + + if ((cons & 71565329) > 0) { + addSearchBlock(i, j, k - 1); + } + + if ((cons & 143130658) > 0) { + addSearchBlock(i, j, k + 1); + } + + if ((cons & 268452932) > 0) { + addSearchBlock(i - 1, j, k); + } + + if ((cons & 536905864) > 0) { + addSearchBlock(i + 1, j, k); + } + + for(int a = 0; a < 6; ++a) { + for(int b = 0; b < 4; ++b) { + if ((indcon & 1 << a * 4 + b) > 0) { + addIndBl(i, j, k, a, b); + } + } + } + + } + + public static void updateCurrent(World world, int x, int y, int z) { + addStartSearchBlock(x, y, z); + if (!searching) { + searching = true; + + while(powerSearch.size() > 0) { + ChunkCoordinates c = (ChunkCoordinates)powerSearch.removeFirst(); + powerSearchTest.remove(c); + IRedPowerWiring sp = CoreLib.getTileEntity(world, c.posX, c.posY, c.posZ, IRedPowerWiring.class); + if (sp != null) { + sp.updateCurrentStrength(); + } + } + + searching = false; + List coords = new ArrayList(blockUpdates); + blockUpdates.clear(); + + for(ChunkCoordinates c : coords) { + notifyBlock(world, c.posX, c.posY, c.posZ, Blocks.redstone_wire); + world.markBlockForUpdate(c.posX, c.posY, c.posZ); + } + } + + } + + public static int updateBlockCurrentStrength(World world, IRedPowerWiring irp, int x, int y, int z, int conm, int chm) { + int cons = irp.getConnectionMask() & conm; + int indcon = irp.getExtConnectionMask() & conm; + int mx = -1; + int ps = 0; + int cs = 0; + + int ch; + for(int chm2 = chm; chm2 > 0; ps = Math.max(ps, irp.scanPoweringStrength(cons | indcon, ch))) { + ch = Integer.numberOfTrailingZeros(chm2); + chm2 &= ~(1 << ch); + cs = Math.max(cs, irp.getCurrentStrength(conm, ch)); + mx = Math.max(mx, getMaxCurrentStrength(world, x, y, z, cons, indcon, ch)); + } + + if (ps > cs || mx != cs + 1 && (cs != 0 || mx != 0)) { + if (ps == cs && mx <= cs) { + return cs; + } else { + cs = Math.max(ps, cs); + if (cs >= mx) { + if (cs > ps) { + cs = 0; + } + } else { + cs = Math.max(0, mx - 1); + } + + if ((chm & 1) > 0) { + addUpdateBlock(x, y, z); + } + + addSearchBlocks(x, y, z, cons, indcon); + return cs; + } + } else { + return cs; + } + } + + public static boolean isSearching() { + return searching; + } + + public static void addCompatibleMapping(int a, int b) { + powerClassMapping.add(new RedPowerLib.PowerClassCompat(a, b)); + powerClassMapping.add(new RedPowerLib.PowerClassCompat(b, a)); + } + + public static boolean isCompatible(int a, int b) { + return a == b || powerClassMapping.contains(new RedPowerLib.PowerClassCompat(a, b)); + } + + public static class PowerClassCompat { + private final int a; + private final int b; + + public PowerClassCompat(int a, int b) { + this.a = a; + this.b = b; + } + + public boolean equals(Object o) { + if (this == o) { + return true; + } else if (o != null && this.getClass() == o.getClass()) { + RedPowerLib.PowerClassCompat that = (RedPowerLib.PowerClassCompat)o; + return this.a == that.a && this.b == that.b; + } else { + return false; + } + } + + public int hashCode() { + int result = this.a; + return 31 * result + this.b; + } + } +} diff --git a/src/main/java/com/eloraam/redpower/core/RedbusLib.java b/src/main/java/com/eloraam/redpower/core/RedbusLib.java new file mode 100644 index 0000000..54bdd92 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/RedbusLib.java @@ -0,0 +1,44 @@ +package com.eloraam.redpower.core; + +import net.minecraft.world.IBlockAccess; + +public class RedbusLib { + public static IRedbusConnectable getAddr(IBlockAccess iba, WorldCoord pos, int addr) { + RedbusLib.RedbusPathfinder pf = new RedbusLib.RedbusPathfinder(iba, addr); + pf.addSearchBlocks(pos, 16777215, 0); + + while(pf.iterate()) { + } + + return pf.result; + } + + private static class RedbusPathfinder extends WirePathfinder { + public IRedbusConnectable result = null; + IBlockAccess iba; + int addr; + + public RedbusPathfinder(IBlockAccess ib, int ad) { + this.iba = ib; + this.addr = ad; + this.init(); + } + + @Override + public boolean step(WorldCoord wc) { + IRedbusConnectable irb = CoreLib.getTileEntity(this.iba, wc, IRedbusConnectable.class); + if (irb != null && irb.rbGetAddr() == this.addr) { + this.result = irb; + return false; + } else { + IWiring iw = CoreLib.getTileEntity(this.iba, wc, IWiring.class); + if (iw == null) { + return true; + } else { + this.addSearchBlocks(wc, iw.getConnectionMask(), iw.getExtConnectionMask()); + return true; + } + } + } + } +} diff --git a/src/main/java/com/eloraam/redpower/core/ReflectLib.java b/src/main/java/com/eloraam/redpower/core/ReflectLib.java new file mode 100644 index 0000000..b2f3fe3 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/ReflectLib.java @@ -0,0 +1,74 @@ +package com.eloraam.redpower.core; + +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + +public class ReflectLib { + public static void callClassMethod(String className, String method, Class[] def, Object... params) { + Class cl; + try { + cl = Class.forName(className); + } catch (ClassNotFoundException var9) { + return; + } + + Method mth; + try { + mth = cl.getDeclaredMethod(method, def); + } catch (NoSuchMethodException var8) { + return; + } + + try { + mth.invoke(null, params); + } catch (InvocationTargetException | IllegalAccessException var7) { + } + + } + + public static T getStaticField(String classname, String var, Class varcl) { + Class cl; + try { + cl = Class.forName(classname); + } catch (ClassNotFoundException var9) { + return null; + } + + Field fld; + try { + fld = cl.getDeclaredField(var); + } catch (NoSuchFieldException var8) { + return null; + } + + Object ob; + try { + ob = fld.get(null); + } catch (NullPointerException | IllegalAccessException var7) { + return null; + } + + return (T)(!varcl.isInstance(ob) ? null : ob); + } + + public static T getField(Object ob, String var, Class varcl) { + Class cl = ob.getClass(); + + Field fld; + try { + fld = cl.getDeclaredField(var); + } catch (NoSuchFieldException var8) { + return null; + } + + Object ob2; + try { + ob2 = fld.get(ob); + } catch (NullPointerException | IllegalAccessException var7) { + return null; + } + + return (T)(!varcl.isInstance(ob2) ? null : ob2); + } +} diff --git a/src/main/java/com/eloraam/redpower/core/RenderContext.java b/src/main/java/com/eloraam/redpower/core/RenderContext.java new file mode 100644 index 0000000..879d10e --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/RenderContext.java @@ -0,0 +1,1228 @@ +package com.eloraam.redpower.core; + +import net.minecraft.block.Block; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.util.IIcon; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.IBlockAccess; + +public class RenderContext { + public static final int[][] texRotTable = new int[][]{ + {0, 1, 2, 3, 4, 5, 0, 112347, 0}, + {0, 1, 4, 5, 3, 2, 45, 112320, 27}, + {0, 1, 3, 2, 5, 4, 27, 112347, 0}, + {0, 1, 5, 4, 2, 3, 54, 112320, 27}, + {1, 0, 2, 3, 5, 4, 112347, 112347, 0}, + {1, 0, 4, 5, 2, 3, 112374, 112320, 27}, + {1, 0, 3, 2, 4, 5, 112320, 112347, 0}, + {1, 0, 5, 4, 3, 2, 112365, 112320, 27}, + {4, 5, 0, 1, 2, 3, 217134, 1728, 110619}, + {3, 2, 0, 1, 4, 5, 220014, 0, 112347}, + {5, 4, 0, 1, 3, 2, 218862, 1728, 110619}, + {2, 3, 0, 1, 5, 4, 220590, 0, 112347}, + {4, 5, 1, 0, 3, 2, 188469, 1728, 110619}, + {3, 2, 1, 0, 5, 4, 191349, 0, 112347}, + {5, 4, 1, 0, 2, 3, 190197, 1728, 110619}, + {2, 3, 1, 0, 4, 5, 191925, 0, 112347}, + {4, 5, 3, 2, 0, 1, 2944, 110619, 1728}, + {3, 2, 5, 4, 0, 1, 187264, 27, 112320}, + {5, 4, 2, 3, 0, 1, 113536, 110619, 1728}, + {2, 3, 4, 5, 0, 1, 224128, 27, 112320}, + {4, 5, 2, 3, 1, 0, 3419, 110619, 1728}, + {3, 2, 4, 5, 1, 0, 187739, 27, 112320}, + {5, 4, 3, 2, 1, 0, 114011, 110619, 1728}, + {2, 3, 5, 4, 1, 0, 224603, 27, 112320} + }; + public Matrix3 basis = new Matrix3(); + public Vector3 localOffset = new Vector3(); + public Vector3 globalOrigin = new Vector3(); + public Vector3 boxSize1 = new Vector3(); + public Vector3 boxSize2 = new Vector3(); + public RenderModel boundModel = null; + public Vector3[] vertices; + private Vector3[] verticesBox = new Vector3[8]; + public TexVertex[][] corners; + private TexVertex[][] cornersBox = new TexVertex[6][4]; + private IIcon[] texIndex; + private IIcon[] texIndexBox = new IIcon[6]; + private IIcon[][] texIndexList; + public boolean lockTexture = false; + public boolean exactTextureCoordinates = false; + private int texFlags = 0; + public boolean useNormal = false; + public boolean forceFlat = false; + private float tintR = 1.0F; + private float tintG = 1.0F; + private float tintB = 1.0F; + private float tintA = 1.0F; + public float[] lightLocal; + private float[] lightLocalBox = new float[6]; + public int[] brightLocal; + private int[] brightLocalBox = new int[6]; + private int[][][] lightGlobal = new int[3][3][3]; + private float[][][] aoGlobal = new float[3][3][3]; + private float[] lightFlat = new float[6]; + private int globTrans; + + public void setDefaults() { + this.localOffset.set(0.0, 0.0, 0.0); + this.setOrientation(0, 0); + this.texFlags = 0; + this.tintR = 1.0F; + this.tintG = 1.0F; + this.tintB = 1.0F; + this.tintA = 1.0F; + this.setLocalLights(1.0F, 1.0F, 1.0F, 1.0F, 1.0F, 1.0F); + this.setBrightness(15728880); + } + + public void bindTexture(ResourceLocation texture) { + Minecraft.getMinecraft().renderEngine.bindTexture(texture); + } + + public void bindBlockTexture() { + this.bindTexture(TextureMap.locationBlocksTexture); + } + + public void setPos(double x, double y, double z) { + this.globalOrigin.set(x, y, z); + } + + public void setPos(Vector3 v) { + this.globalOrigin.set(v); + } + + public void setRelPos(double x, double y, double z) { + this.localOffset.set(x, y, z); + } + + public void setRelPos(Vector3 v) { + this.localOffset.set(v); + } + + public void setOrientation(int down, int rot) { + MathLib.orientMatrix(this.basis, down, rot); + } + + public void setSize(double tx, double ty, double tz, double bx, double by, double bz) { + this.boxSize1.set(tx, ty, tz); + this.boxSize2.set(bx, by, bz); + } + + public void setTexFlags(int fl) { + this.texFlags = fl; + } + + public void setTexRotation(RenderBlocks renderer, int rotation, boolean sides) { + switch(rotation) { + case 0: + if (sides) { + renderer.uvRotateEast = 3; + renderer.uvRotateWest = 3; + renderer.uvRotateSouth = 3; + renderer.uvRotateNorth = 3; + } + case 1: + default: + break; + case 2: + if (sides) { + renderer.uvRotateSouth = 1; + renderer.uvRotateNorth = 2; + } + break; + case 3: + if (sides) { + renderer.uvRotateSouth = 2; + renderer.uvRotateNorth = 1; + } + + renderer.uvRotateTop = 3; + renderer.uvRotateBottom = 3; + break; + case 4: + if (sides) { + renderer.uvRotateEast = 1; + renderer.uvRotateWest = 2; + } + + renderer.uvRotateTop = 2; + renderer.uvRotateBottom = 1; + break; + case 5: + if (sides) { + renderer.uvRotateEast = 2; + renderer.uvRotateWest = 1; + } + + renderer.uvRotateTop = 1; + renderer.uvRotateBottom = 2; + } + + } + + public void resetTexRotation(RenderBlocks renderer) { + renderer.uvRotateEast = 0; + renderer.uvRotateWest = 0; + renderer.uvRotateSouth = 0; + renderer.uvRotateNorth = 0; + renderer.uvRotateTop = 0; + renderer.uvRotateBottom = 0; + } + + public void setIcon(IIcon bottom, IIcon top, IIcon north, IIcon south, IIcon west, IIcon east) { + if (!this.lockTexture) { + this.texIndex = this.texIndexBox; + this.texIndex[0] = bottom; + this.texIndex[1] = top; + this.texIndex[2] = north; + this.texIndex[3] = south; + this.texIndex[4] = west; + this.texIndex[5] = east; + } + + } + + public void setIcon(IIcon universal) { + if (!this.lockTexture) { + this.texIndex = this.texIndexBox; + this.texIndex[0] = universal; + this.texIndex[1] = universal; + this.texIndex[2] = universal; + this.texIndex[3] = universal; + this.texIndex[4] = universal; + this.texIndex[5] = universal; + } + + } + + public void setIcon(IIcon[] a) { + if (!this.lockTexture) { + this.texIndex = a; + } + + } + + public void setIcon(IIcon[][] a) { + if (!this.lockTexture) { + this.texIndexList = a; + this.texIndex = a[0]; + } + + } + + public void setIconIndex(int n) { + if (this.texIndexList != null) { + this.texIndex = this.texIndexList[n]; + } + + } + + public void setIconNum(int num, IIcon tex) { + this.texIndex[num] = tex; + } + + public void setTint(float r, float g, float b) { + this.tintR = r; + this.tintG = g; + this.tintB = b; + } + + public void setTintHex(int tc) { + this.tintR = (float)(tc >> 16) / 255.0F; + this.tintG = (float)(tc >> 8 & 0xFF) / 255.0F; + this.tintB = (float)(tc & 0xFF) / 255.0F; + } + + public void setAlpha(float a) { + this.tintA = a; + } + + public void setLocalLights(float a, float b, float c, float d, float e, float f) { + this.lightLocal = this.lightLocalBox; + this.lightLocal[0] = a; + this.lightLocal[1] = b; + this.lightLocal[2] = c; + this.lightLocal[3] = d; + this.lightLocal[4] = e; + this.lightLocal[5] = f; + } + + public void setLocalLights(float a) { + this.lightLocal = this.lightLocalBox; + + for(int i = 0; i < 6; ++i) { + this.lightLocal[i] = a; + } + + } + + public void setBrightness(int a) { + this.brightLocal = this.brightLocalBox; + + for(int i = 0; i < 6; ++i) { + this.brightLocal[i] = a; + } + + } + + public void startWorldRender(RenderBlocks rbl) { + } + + public boolean endWorldRender() { + return false; + } + + public void setupBox() { + this.vertices = this.verticesBox; + this.vertices[0].set(this.boxSize2.x, this.boxSize2.y, this.boxSize1.z); + this.vertices[1].set(this.boxSize1.x, this.boxSize2.y, this.boxSize1.z); + this.vertices[2].set(this.boxSize1.x, this.boxSize2.y, this.boxSize2.z); + this.vertices[3].set(this.boxSize2.x, this.boxSize2.y, this.boxSize2.z); + this.vertices[4].set(this.boxSize2.x, this.boxSize1.y, this.boxSize1.z); + this.vertices[5].set(this.boxSize1.x, this.boxSize1.y, this.boxSize1.z); + this.vertices[6].set(this.boxSize1.x, this.boxSize1.y, this.boxSize2.z); + this.vertices[7].set(this.boxSize2.x, this.boxSize1.y, this.boxSize2.z); + } + + public void transformRotate() { + for(Vector3 vec : this.vertices) { + vec.add(this.localOffset.x - 0.5, this.localOffset.y - 0.5, this.localOffset.z - 0.5); + this.basis.rotate(vec); + vec.add(this.globalOrigin.x + 0.5, this.globalOrigin.y + 0.5, this.globalOrigin.z + 0.5); + } + + } + + public void transform() { + for(Vector3 vec : this.vertices) { + vec.add(this.localOffset); + vec.add(this.globalOrigin); + } + + } + + public void setSideUV(int side, double uMin, double uMax, double vMin, double vMax) { + if (!this.exactTextureCoordinates) { + uMin += 0.001; + vMin += 0.001; + uMax -= 0.001; + vMax -= 0.001; + } + + int txl = this.texFlags >> side * 3; + if ((txl & 1) > 0) { + uMin = 1.0 - uMin; + uMax = 1.0 - uMax; + } + + if ((txl & 2) > 0) { + vMin = 1.0 - vMin; + vMax = 1.0 - vMax; + } + + IIcon icon = this.texIndex[side]; + if (icon != null) { + if ((txl & 4) > 0) { + double uStart = (double)icon.getInterpolatedV(uMin * 16.0); + double uEnd = (double)icon.getInterpolatedV(uMax * 16.0); + double vStart = (double)icon.getInterpolatedU(vMin * 16.0); + double vEnd = (double)icon.getInterpolatedU(vMax * 16.0); + this.corners[side][0].setUV(vStart, uStart); + this.corners[side][1].setUV(vEnd, uStart); + this.corners[side][2].setUV(vEnd, uEnd); + this.corners[side][3].setUV(vStart, uEnd); + } else { + double uStart = (double)icon.getInterpolatedU(uMin * 16.0); + double uEnd = (double)icon.getInterpolatedU(uMax * 16.0); + double vStart = (double)icon.getInterpolatedV(vMin * 16.0); + double vEnd = (double)icon.getInterpolatedV(vMax * 16.0); + this.corners[side][0].setUV(uStart, vStart); + this.corners[side][1].setUV(uStart, vEnd); + this.corners[side][2].setUV(uEnd, vEnd); + this.corners[side][3].setUV(uEnd, vStart); + } + } + + } + + public void doMappingBox(int sides) { + this.corners = this.cornersBox; + if ((sides & 3) > 0) { + double vMin = 1.0 - this.boxSize2.x; + double vMax = 1.0 - this.boxSize1.x; + if ((sides & 1) > 0) { + double uMin = 1.0 - this.boxSize2.z; + double uMax = 1.0 - this.boxSize1.z; + this.setSideUV(0, uMin, uMax, vMin, vMax); + } + + if ((sides & 2) > 0) { + double uMin = this.boxSize1.z; + double uMax = this.boxSize2.z; + this.setSideUV(1, uMin, uMax, vMin, vMax); + } + } + + if ((sides & 60) != 0) { + double vMin = 1.0 - this.boxSize2.y; + double vMax = 1.0 - this.boxSize1.y; + if ((sides & 4) > 0) { + double uMin = 1.0 - this.boxSize2.x; + double uMax = 1.0 - this.boxSize1.x; + this.setSideUV(2, uMin, uMax, vMin, vMax); + } + + if ((sides & 8) > 0) { + double uMin = this.boxSize1.x; + double uMax = this.boxSize2.x; + this.setSideUV(3, uMin, uMax, vMin, vMax); + } + + if ((sides & 16) > 0) { + double uMin = this.boxSize1.z; + double uMax = this.boxSize2.z; + this.setSideUV(4, uMin, uMax, vMin, vMax); + } + + if ((sides & 32) > 0) { + double uMin = 1.0 - this.boxSize2.z; + double uMax = 1.0 - this.boxSize1.z; + this.setSideUV(5, uMin, uMax, vMin, vMax); + } + } + + } + + public void calcBoundsGlobal() { + this.setupBox(); + this.transform(); + } + + public void calcBounds() { + this.setupBox(); + this.transformRotate(); + } + + private void swapTex(int a, int b) { + IIcon tex = this.texIndexBox[a]; + this.texIndexBox[a] = this.texIndexBox[b]; + this.texIndexBox[b] = tex; + } + + public void orientTextures(int down) { + switch(down) { + case 0: + default: + break; + case 1: + this.swapTex(0, 1); + this.swapTex(4, 5); + this.texFlags = 112347; + break; + case 2: + this.swapTex(0, 2); + this.swapTex(1, 3); + this.swapTex(0, 4); + this.swapTex(1, 5); + this.texFlags = 217134; + break; + case 3: + this.swapTex(0, 3); + this.swapTex(1, 2); + this.swapTex(0, 4); + this.swapTex(1, 5); + this.texFlags = 188469; + break; + case 4: + this.swapTex(0, 4); + this.swapTex(1, 5); + this.swapTex(2, 3); + this.texFlags = 2944; + break; + case 5: + this.swapTex(0, 5); + this.swapTex(1, 4); + this.swapTex(0, 1); + this.texFlags = 3419; + } + + } + + public void orientTextureRot(int down, int rot) { + int r = rot > 1 ? (rot == 2 ? 3 : 6) : (rot == 0 ? 0 : 5); + r |= r << 3; + switch(down) { + case 0: + this.texFlags = r; + break; + case 1: + this.swapTex(0, 1); + this.swapTex(4, 5); + this.texFlags = 112347 ^ r; + break; + case 2: + this.swapTex(0, 2); + this.swapTex(1, 3); + this.swapTex(0, 4); + this.swapTex(1, 5); + this.texFlags = 217134 ^ r << 6; + break; + case 3: + this.swapTex(0, 3); + this.swapTex(1, 2); + this.swapTex(0, 4); + this.swapTex(1, 5); + this.texFlags = 188469 ^ r << 6; + break; + case 4: + this.swapTex(0, 4); + this.swapTex(1, 5); + this.swapTex(2, 3); + this.texFlags = 2944 ^ r << 12; + break; + case 5: + this.swapTex(0, 5); + this.swapTex(1, 4); + this.swapTex(0, 1); + this.texFlags = 3419 ^ r << 12; + } + + } + + private void swapTexFl(int a, int b) { + IIcon t = this.texIndexBox[a]; + this.texIndexBox[a] = this.texIndexBox[b]; + this.texIndexBox[b] = t; + a *= 3; + b *= 3; + int f1 = this.texFlags >> a & 7; + int f2 = this.texFlags >> b & 7; + this.texFlags &= ~(7 << a | 7 << b); + this.texFlags |= f1 << b | f2 << a; + } + + public void rotateTextures(int rot) { + int r = rot > 1 ? (rot == 2 ? 3 : 6) : (rot == 0 ? 0 : 5); + r |= r << 3; + this.texFlags ^= r; + switch(rot) { + case 1: + this.swapTexFl(2, 4); + this.swapTexFl(3, 4); + this.swapTexFl(3, 5); + break; + case 2: + this.swapTexFl(2, 3); + this.swapTexFl(4, 5); + break; + case 3: + this.swapTexFl(2, 5); + this.swapTexFl(3, 5); + this.swapTexFl(3, 4); + } + + } + + public void orientTextureFl(int down) { + switch(down) { + case 0: + default: + break; + case 1: + this.swapTexFl(0, 1); + this.swapTexFl(4, 5); + this.texFlags ^= 112347; + break; + case 2: + this.swapTexFl(0, 2); + this.swapTexFl(1, 3); + this.swapTexFl(0, 4); + this.swapTexFl(1, 5); + this.texFlags ^= 217134; + break; + case 3: + this.swapTexFl(0, 3); + this.swapTexFl(1, 2); + this.swapTexFl(0, 4); + this.swapTexFl(1, 5); + this.texFlags ^= 188469; + break; + case 4: + this.swapTexFl(0, 4); + this.swapTexFl(1, 5); + this.swapTexFl(2, 3); + this.texFlags ^= 2944; + break; + case 5: + this.swapTexFl(0, 5); + this.swapTexFl(1, 4); + this.swapTexFl(0, 1); + this.texFlags ^= 3419; + } + + } + + public void orientTextureNew(int rv) { + IIcon[] texSrc = new IIcon[6]; + System.arraycopy(this.texIndexBox, 0, texSrc, 0, 6); + int[] rot = texRotTable[rv]; + int tfo = 0; + + for(int i = 0; i < 6; ++i) { + this.texIndexBox[i] = texSrc[rot[i]]; + tfo |= (this.texFlags >> rot[i] * 3 & 7) << i * 3; + } + + int t2 = (tfo & 37449) << 1 | (tfo & 74898) >> 1; + this.texFlags = rot[6] ^ tfo & rot[7] ^ t2 & rot[8]; + } + + public void flipTextures() { + this.swapTex(0, 1); + this.swapTex(2, 3); + this.swapTex(4, 5); + } + + public void renderBox(int sides, double x1, double y1, double z1, double x2, double y2, double z2) { + this.setSize(x1, y1, z1, x2, y2, z2); + this.setupBox(); + this.transformRotate(); + this.renderFaces(sides); + } + + public void doubleBox(int sides, double x1, double y1, double z1, double x2, double y2, double z2, double ino) { + int s2 = sides << 1 & 42 | sides >> 1 & 21; + this.renderBox(sides, x1, y1, z1, x2, y2, z2); + this.flipTextures(); + this.renderBox(s2, x2 - ino, y2 - ino, z2 - ino, x1 + ino, y1 + ino, z1 + ino); + } + + public void doLightLocal(int sides) { + for(int i = 0; i < this.corners.length; ++i) { + if ((sides & 1 << i) != 0) { + TexVertex c = this.corners[i][0]; + c.r = this.lightLocal[i] * this.tintR; + c.g = this.lightLocal[i] * this.tintG; + c.b = this.lightLocal[i] * this.tintB; + c.brtex = this.brightLocal[i]; + } + } + + } + + public void readGlobalLights(IBlockAccess iba, int i, int j, int k) { + Block block = iba.getBlock(i, j, k); + if (Minecraft.isAmbientOcclusionEnabled() && !this.forceFlat) { + for(int a = 0; a < 3; ++a) { + for(int b = 0; b < 3; ++b) { + for(int c = 0; c < 3; ++c) { + this.aoGlobal[a][b][c] = iba.getBlock(i + a - 1, j + b - 1, k + c - 1).getAmbientOcclusionLightValue(); + this.lightGlobal[a][b][c] = block.getMixedBrightnessForBlock(iba, i + a - 1, j + b - 1, k + c - 1); + } + } + } + + int t = 0; + if (iba.getBlock(i, j - 1, k - 1).getCanBlockGrass()) { + t |= 1; + } + + if (iba.getBlock(i, j - 1, k + 1).getCanBlockGrass()) { + t |= 2; + } + + if (iba.getBlock(i - 1, j - 1, k).getCanBlockGrass()) { + t |= 4; + } + + if (iba.getBlock(i + 1, j - 1, k).getCanBlockGrass()) { + t |= 8; + } + + if (iba.getBlock(i - 1, j, k - 1).getCanBlockGrass()) { + t |= 16; + } + + if (iba.getBlock(i - 1, j, k + 1).getCanBlockGrass()) { + t |= 32; + } + + if (iba.getBlock(i + 1, j, k - 1).getCanBlockGrass()) { + t |= 64; + } + + if (iba.getBlock(i + 1, j, k + 1).getCanBlockGrass()) { + t |= 128; + } + + if (iba.getBlock(i, j + 1, k - 1).getCanBlockGrass()) { + t |= 256; + } + + if (iba.getBlock(i, j + 1, k + 1).getCanBlockGrass()) { + t |= 512; + } + + if (iba.getBlock(i - 1, j + 1, k).getCanBlockGrass()) { + t |= 1024; + } + + if (iba.getBlock(i + 1, j + 1, k).getCanBlockGrass()) { + t |= 2048; + } + + this.globTrans = t; + } else { + this.lightFlat[0] = (float)block.getMixedBrightnessForBlock(iba, i, j - 1, k); + this.lightFlat[1] = (float)block.getMixedBrightnessForBlock(iba, i, j + 1, k); + this.lightFlat[2] = (float)block.getMixedBrightnessForBlock(iba, i, j, k - 1); + this.lightFlat[3] = (float)block.getMixedBrightnessForBlock(iba, i, j, k + 1); + this.lightFlat[4] = (float)block.getMixedBrightnessForBlock(iba, i - 1, j, k); + this.lightFlat[5] = (float)block.getMixedBrightnessForBlock(iba, i + 1, j, k); + } + + } + + public static int blendLight(int i, int j, int k, int l) { + if (j == 0) { + j = i; + } + + if (k == 0) { + k = i; + } + + if (l == 0) { + l = i; + } + + return i + j + k + l >> 2 & 16711935; + } + + private void lightSmoothFace(int fn) { + int ff = 0; + if (this.boxSize1.y > 0.0) { + ff |= 1; + } + + if (this.boxSize2.y < 1.0) { + ff |= 2; + } + + if (this.boxSize1.z > 0.0) { + ff |= 4; + } + + if (this.boxSize2.z < 1.0) { + ff |= 8; + } + + if (this.boxSize1.x > 0.0) { + ff |= 16; + } + + if (this.boxSize2.x < 1.0) { + ff |= 32; + } + + float gf2; + float gf3; + float gf4; + float gf1 = gf2 = gf3 = gf4 = this.aoGlobal[1][1][1]; + int gl2; + int gl3; + int gl4; + int gl1 = gl2 = gl3 = gl4 = this.lightGlobal[1][1][1]; + switch(fn) { + case 0: + if ((ff & 61) <= 0) { + float ao2; + float ao1 = ao2 = this.aoGlobal[0][0][1]; + float ao4; + float ao3 = ao4 = this.aoGlobal[2][0][1]; + int lv2; + int lv1 = lv2 = this.lightGlobal[0][0][1]; + int lv4; + int lv3 = lv4 = this.lightGlobal[2][0][1]; + if ((this.globTrans & 5) > 0) { + ao1 = this.aoGlobal[0][0][0]; + lv1 = this.lightGlobal[0][0][0]; + } + + if ((this.globTrans & 6) > 0) { + ao2 = this.aoGlobal[0][0][2]; + lv2 = this.lightGlobal[0][0][2]; + } + + if ((this.globTrans & 9) > 0) { + ao3 = this.aoGlobal[2][0][0]; + lv3 = this.lightGlobal[2][0][0]; + } + + if ((this.globTrans & 10) > 0) { + ao4 = this.aoGlobal[2][0][2]; + lv4 = this.lightGlobal[2][0][2]; + } + + gf3 = 0.25F * (this.aoGlobal[1][0][1] + this.aoGlobal[1][0][0] + this.aoGlobal[0][0][1] + ao1); + gf4 = 0.25F * (this.aoGlobal[1][0][1] + this.aoGlobal[1][0][0] + this.aoGlobal[2][0][1] + ao3); + gf2 = 0.25F * (this.aoGlobal[1][0][1] + this.aoGlobal[1][0][2] + this.aoGlobal[0][0][1] + ao2); + gf1 = 0.25F * (this.aoGlobal[1][0][1] + this.aoGlobal[1][0][2] + this.aoGlobal[2][0][1] + ao4); + gl3 = blendLight(this.lightGlobal[1][0][1], this.lightGlobal[1][0][0], this.lightGlobal[0][0][1], lv1); + gl4 = blendLight(this.lightGlobal[1][0][1], this.lightGlobal[1][0][0], this.lightGlobal[2][0][1], lv3); + gl2 = blendLight(this.lightGlobal[1][0][1], this.lightGlobal[1][0][2], this.lightGlobal[0][0][1], lv2); + gl1 = blendLight(this.lightGlobal[1][0][1], this.lightGlobal[1][0][2], this.lightGlobal[2][0][1], lv4); + } + break; + case 1: + if ((ff & 62) <= 0) { + float ao2; + float ao1 = ao2 = this.aoGlobal[0][2][1]; + float ao4; + float ao3 = ao4 = this.aoGlobal[2][2][1]; + int lv2; + int lv1 = lv2 = this.lightGlobal[0][2][1]; + int lv4; + int lv3 = lv4 = this.lightGlobal[2][2][1]; + if ((this.globTrans & 1280) > 0) { + ao1 = this.aoGlobal[0][2][0]; + lv1 = this.lightGlobal[0][2][0]; + } + + if ((this.globTrans & 1536) > 0) { + ao2 = this.aoGlobal[0][2][2]; + lv2 = this.lightGlobal[0][2][2]; + } + + if ((this.globTrans & 2304) > 0) { + ao3 = this.aoGlobal[2][2][0]; + lv3 = this.lightGlobal[2][2][0]; + } + + if ((this.globTrans & 2560) > 0) { + ao4 = this.aoGlobal[2][2][2]; + lv4 = this.lightGlobal[2][2][2]; + } + + gf2 = 0.25F * (this.aoGlobal[1][2][1] + this.aoGlobal[1][2][0] + this.aoGlobal[0][2][1] + ao1); + gf1 = 0.25F * (this.aoGlobal[1][2][1] + this.aoGlobal[1][2][0] + this.aoGlobal[2][2][1] + ao3); + gf3 = 0.25F * (this.aoGlobal[1][2][1] + this.aoGlobal[1][2][2] + this.aoGlobal[0][2][1] + ao2); + gf4 = 0.25F * (this.aoGlobal[1][2][1] + this.aoGlobal[1][2][2] + this.aoGlobal[2][2][1] + ao4); + gl2 = blendLight(this.lightGlobal[1][2][1], this.lightGlobal[1][2][0], this.lightGlobal[0][2][1], lv1); + gl1 = blendLight(this.lightGlobal[1][2][1], this.lightGlobal[1][2][0], this.lightGlobal[2][2][1], lv3); + gl3 = blendLight(this.lightGlobal[1][2][1], this.lightGlobal[1][2][2], this.lightGlobal[0][2][1], lv2); + gl4 = blendLight(this.lightGlobal[1][2][1], this.lightGlobal[1][2][2], this.lightGlobal[2][2][1], lv4); + } + break; + case 2: + if ((ff & 55) <= 0) { + float ao2; + float ao1 = ao2 = this.aoGlobal[0][1][0]; + float ao4; + float ao3 = ao4 = this.aoGlobal[2][1][0]; + int lv2; + int lv1 = lv2 = this.lightGlobal[0][1][0]; + int lv4; + int lv3 = lv4 = this.lightGlobal[2][1][0]; + if ((this.globTrans & 17) > 0) { + ao1 = this.aoGlobal[0][0][0]; + lv1 = this.lightGlobal[0][0][0]; + } + + if ((this.globTrans & 272) > 0) { + ao2 = this.aoGlobal[0][2][0]; + lv2 = this.lightGlobal[0][2][0]; + } + + if ((this.globTrans & 65) > 0) { + ao3 = this.aoGlobal[2][0][0]; + lv3 = this.lightGlobal[2][0][0]; + } + + if ((this.globTrans & 320) > 0) { + ao4 = this.aoGlobal[2][2][0]; + lv4 = this.lightGlobal[2][2][0]; + } + + gf3 = 0.25F * (this.aoGlobal[1][1][0] + this.aoGlobal[1][0][0] + this.aoGlobal[0][1][0] + ao1); + gf4 = 0.25F * (this.aoGlobal[1][1][0] + this.aoGlobal[1][2][0] + this.aoGlobal[0][1][0] + ao2); + gf2 = 0.25F * (this.aoGlobal[1][1][0] + this.aoGlobal[1][0][0] + this.aoGlobal[2][1][0] + ao3); + gf1 = 0.25F * (this.aoGlobal[1][1][0] + this.aoGlobal[1][2][0] + this.aoGlobal[2][1][0] + ao4); + gl3 = blendLight(this.lightGlobal[1][1][0], this.lightGlobal[1][0][0], this.lightGlobal[0][1][0], lv1); + gl4 = blendLight(this.lightGlobal[1][1][0], this.lightGlobal[1][2][0], this.lightGlobal[0][1][0], lv2); + gl2 = blendLight(this.lightGlobal[1][1][0], this.lightGlobal[1][0][0], this.lightGlobal[2][1][0], lv3); + gl1 = blendLight(this.lightGlobal[1][1][0], this.lightGlobal[1][2][0], this.lightGlobal[2][1][0], lv4); + } + break; + case 3: + if ((ff & 59) <= 0) { + float ao2; + float ao1 = ao2 = this.aoGlobal[0][1][2]; + float ao4; + float ao3 = ao4 = this.aoGlobal[2][1][2]; + int lv2; + int lv1 = lv2 = this.lightGlobal[0][1][2]; + int lv4; + int lv3 = lv4 = this.lightGlobal[2][1][2]; + if ((this.globTrans & 34) > 0) { + ao1 = this.aoGlobal[0][0][2]; + lv1 = this.lightGlobal[0][0][2]; + } + + if ((this.globTrans & 544) > 0) { + ao2 = this.aoGlobal[0][2][2]; + lv2 = this.lightGlobal[0][2][2]; + } + + if ((this.globTrans & 130) > 0) { + ao3 = this.aoGlobal[2][0][2]; + lv3 = this.lightGlobal[2][0][2]; + } + + if ((this.globTrans & 640) > 0) { + ao4 = this.aoGlobal[2][2][2]; + lv4 = this.lightGlobal[2][2][2]; + } + + gf2 = 0.25F * (this.aoGlobal[1][1][2] + this.aoGlobal[1][0][2] + this.aoGlobal[0][1][2] + ao1); + gf1 = 0.25F * (this.aoGlobal[1][1][2] + this.aoGlobal[1][2][2] + this.aoGlobal[0][1][2] + ao3); + gf3 = 0.25F * (this.aoGlobal[1][1][2] + this.aoGlobal[1][0][2] + this.aoGlobal[2][1][2] + ao2); + gf4 = 0.25F * (this.aoGlobal[1][1][2] + this.aoGlobal[1][2][2] + this.aoGlobal[2][1][2] + ao4); + gl2 = blendLight(this.lightGlobal[1][1][2], this.lightGlobal[1][0][2], this.lightGlobal[0][1][2], lv1); + gl1 = blendLight(this.lightGlobal[1][1][2], this.lightGlobal[1][2][2], this.lightGlobal[0][1][2], lv2); + gl3 = blendLight(this.lightGlobal[1][1][2], this.lightGlobal[1][0][2], this.lightGlobal[2][1][2], lv3); + gl4 = blendLight(this.lightGlobal[1][1][2], this.lightGlobal[1][2][2], this.lightGlobal[2][1][2], lv4); + } + break; + case 4: + if ((ff & 31) <= 0) { + float ao2; + float ao1 = ao2 = this.aoGlobal[0][1][0]; + float ao4; + float ao3 = ao4 = this.aoGlobal[0][1][2]; + int lv2; + int lv1 = lv2 = this.lightGlobal[0][1][0]; + int lv4; + int lv3 = lv4 = this.lightGlobal[0][1][2]; + if ((this.globTrans & 20) > 0) { + ao1 = this.aoGlobal[0][0][0]; + lv1 = this.lightGlobal[0][0][0]; + } + + if ((this.globTrans & 1040) > 0) { + ao2 = this.aoGlobal[0][2][0]; + lv2 = this.lightGlobal[0][2][0]; + } + + if ((this.globTrans & 36) > 0) { + ao3 = this.aoGlobal[0][0][2]; + lv3 = this.lightGlobal[0][0][2]; + } + + if ((this.globTrans & 1056) > 0) { + ao4 = this.aoGlobal[0][2][2]; + lv4 = this.lightGlobal[0][2][2]; + } + + gf2 = 0.25F * (this.aoGlobal[0][1][1] + this.aoGlobal[0][0][1] + this.aoGlobal[0][1][0] + ao1); + gf1 = 0.25F * (this.aoGlobal[0][1][1] + this.aoGlobal[0][2][1] + this.aoGlobal[0][1][0] + ao2); + gf3 = 0.25F * (this.aoGlobal[0][1][1] + this.aoGlobal[0][0][1] + this.aoGlobal[0][1][2] + ao3); + gf4 = 0.25F * (this.aoGlobal[0][1][1] + this.aoGlobal[0][2][1] + this.aoGlobal[0][1][2] + ao4); + gl2 = blendLight(this.lightGlobal[0][1][1], this.lightGlobal[0][0][1], this.lightGlobal[0][1][0], lv1); + gl1 = blendLight(this.lightGlobal[0][1][1], this.lightGlobal[0][2][1], this.lightGlobal[0][1][0], lv2); + gl3 = blendLight(this.lightGlobal[0][1][1], this.lightGlobal[0][0][1], this.lightGlobal[0][1][2], lv3); + gl4 = blendLight(this.lightGlobal[0][1][1], this.lightGlobal[0][2][1], this.lightGlobal[0][1][2], lv4); + } + break; + default: + if ((ff & 47) <= 0) { + float ao2; + float ao1 = ao2 = this.aoGlobal[2][1][0]; + float ao4; + float ao3 = ao4 = this.aoGlobal[2][1][2]; + int lv2; + int lv1 = lv2 = this.lightGlobal[2][1][0]; + int lv4; + int lv3 = lv4 = this.lightGlobal[2][1][2]; + if ((this.globTrans & 72) > 0) { + ao1 = this.aoGlobal[2][0][0]; + lv1 = this.lightGlobal[2][0][0]; + } + + if ((this.globTrans & 2112) > 0) { + ao2 = this.aoGlobal[2][2][0]; + lv2 = this.lightGlobal[2][2][0]; + } + + if ((this.globTrans & 136) > 0) { + ao3 = this.aoGlobal[2][0][2]; + lv3 = this.lightGlobal[2][0][2]; + } + + if ((this.globTrans & 2176) > 0) { + ao4 = this.aoGlobal[2][2][2]; + lv4 = this.lightGlobal[2][2][2]; + } + + gf3 = 0.25F * (this.aoGlobal[2][1][1] + this.aoGlobal[2][0][1] + this.aoGlobal[2][1][0] + ao1); + gf4 = 0.25F * (this.aoGlobal[2][1][1] + this.aoGlobal[2][2][1] + this.aoGlobal[2][1][0] + ao2); + gf2 = 0.25F * (this.aoGlobal[2][1][1] + this.aoGlobal[2][0][1] + this.aoGlobal[2][1][2] + ao3); + gf1 = 0.25F * (this.aoGlobal[2][1][1] + this.aoGlobal[2][2][1] + this.aoGlobal[2][1][2] + ao4); + gl3 = blendLight(this.lightGlobal[2][1][1], this.lightGlobal[2][0][1], this.lightGlobal[2][1][0], lv1); + gl4 = blendLight(this.lightGlobal[2][1][1], this.lightGlobal[2][2][1], this.lightGlobal[2][1][0], lv2); + gl2 = blendLight(this.lightGlobal[2][1][1], this.lightGlobal[2][0][1], this.lightGlobal[2][1][2], lv3); + gl1 = blendLight(this.lightGlobal[2][1][1], this.lightGlobal[2][2][1], this.lightGlobal[2][1][2], lv4); + } + } + + TexVertex c = this.corners[fn][0]; + float fc = this.lightLocal[fn] * gf1; + c.r = fc * this.tintR; + c.g = fc * this.tintG; + c.b = fc * this.tintB; + c.brtex = gl1; + c = this.corners[fn][1]; + fc = this.lightLocal[fn] * gf2; + c.r = fc * this.tintR; + c.g = fc * this.tintG; + c.b = fc * this.tintB; + c.brtex = gl2; + c = this.corners[fn][2]; + fc = this.lightLocal[fn] * gf3; + c.r = fc * this.tintR; + c.g = fc * this.tintG; + c.b = fc * this.tintB; + c.brtex = gl3; + c = this.corners[fn][3]; + fc = this.lightLocal[fn] * gf4; + c.r = fc * this.tintR; + c.g = fc * this.tintG; + c.b = fc * this.tintB; + c.brtex = gl4; + } + + public void doLightSmooth(int sides) { + for(int i = 0; i < 6; ++i) { + if ((sides & 1 << i) != 0) { + this.lightSmoothFace(i); + } + } + + } + + private void doLightFlat(int sides) { + for(int i = 0; i < this.corners.length; ++i) { + if ((sides & 1 << i) != 0) { + TexVertex c = this.corners[i][0]; + c.r = this.lightFlat[i] * this.lightLocal[i] * this.tintR; + c.g = this.lightFlat[i] * this.lightLocal[i] * this.tintG; + c.b = this.lightFlat[i] * this.lightLocal[i] * this.tintB; + c.brtex = this.brightLocal[i]; + } + } + + } + + public void renderFlat(int sides) { + Tessellator tess = Tessellator.instance; + + for(int i = 0; i < this.corners.length; ++i) { + if ((sides & 1 << i) != 0) { + TexVertex c = this.corners[i][0]; + tess.setColorOpaque_F(c.r, c.g, c.b); + if (this.useNormal) { + Vector3 v = this.vertices[c.vtx]; + c = this.corners[i][1]; + Vector3 v1 = new Vector3(this.vertices[c.vtx]); + c = this.corners[i][2]; + Vector3 v2 = new Vector3(this.vertices[c.vtx]); + v1.subtract(v); + v2.subtract(v); + v1.crossProduct(v2); + v1.normalize(); + tess.setNormal((float)v1.x, (float)v1.y, (float)v1.z); + } else { + tess.setBrightness(c.brtex); + } + + for(int j = 0; j < 4; ++j) { + c = this.corners[i][j]; + Vector3 v = this.vertices[c.vtx]; + tess.addVertexWithUV(v.x, v.y, v.z, c.u, c.v); + } + } + } + + } + + public void renderRangeFlat(int st, int ed) { + Tessellator tess = Tessellator.instance; + + for(int i = st; i < ed; ++i) { + TexVertex c = this.corners[i][0]; + tess.setColorRGBA_F(c.r * this.tintR, c.g * this.tintG, c.b * this.tintB, this.tintA); + if (this.useNormal) { + Vector3 v = this.vertices[c.vtx]; + c = this.corners[i][1]; + Vector3 var8 = new Vector3(this.vertices[c.vtx]); + c = this.corners[i][2]; + Vector3 var9 = new Vector3(this.vertices[c.vtx]); + var8.subtract(v); + var9.subtract(v); + var8.crossProduct(var9); + var8.normalize(); + tess.setNormal((float)var8.x, (float)var8.y, (float)var8.z); + } else { + tess.setBrightness(c.brtex); + } + + for(int j = 0; j < 4; ++j) { + c = this.corners[i][j]; + Vector3 v = this.vertices[c.vtx]; + tess.addVertexWithUV(v.x, v.y, v.z, c.u, c.v); + } + } + + } + + public void renderAlpha(int sides, float alpha) { + Tessellator tess = Tessellator.instance; + + for(int i = 0; i < this.corners.length; ++i) { + if ((sides & 1 << i) != 0) { + TexVertex c = this.corners[i][0]; + tess.setColorRGBA_F(c.r, c.g, c.b, alpha); + if (!this.useNormal) { + tess.setBrightness(c.brtex); + } + + for(int j = 0; j < 4; ++j) { + c = this.corners[i][j]; + Vector3 v = this.vertices[c.vtx]; + tess.addVertexWithUV(v.x, v.y, v.z, c.u, c.v); + } + } + } + + } + + public void renderSmooth(int sides) { + Tessellator tess = Tessellator.instance; + + for(int i = 0; i < this.corners.length; ++i) { + if ((sides & 1 << i) != 0) { + for(int j = 0; j < 4; ++j) { + TexVertex c = this.corners[i][j]; + tess.setColorOpaque_F(c.r, c.g, c.b); + if (!this.useNormal) { + tess.setBrightness(c.brtex); + } + + Vector3 v = this.vertices[c.vtx]; + tess.addVertexWithUV(v.x, v.y, v.z, c.u, c.v); + } + } + } + + } + + public void renderFaces(int faces) { + this.doMappingBox(faces); + this.doLightLocal(faces); + this.renderFlat(faces); + } + + public void renderGlobFaces(int faces) { + this.doMappingBox(faces); + this.doLightLocal(faces); + if (Minecraft.isAmbientOcclusionEnabled() && !this.forceFlat) { + this.doLightSmooth(faces); + this.renderSmooth(faces); + } else { + this.doLightFlat(faces); + this.renderFlat(faces); + } + + } + + public void drawPoints(int... points) { + Tessellator tess = Tessellator.instance; + + for(int p : points) { + Vector3 vec = this.vertices[p]; + tess.addVertex(vec.x, vec.y, vec.z); + } + + } + + public void bindModel(RenderModel model) { + this.vertices = new Vector3[model.vertices.length]; + + for(int i = 0; i < this.vertices.length; ++i) { + Vector3 v = new Vector3(model.vertices[i]); + this.basis.rotate(v); + v.add(this.globalOrigin); + this.vertices[i] = v; + } + + this.corners = model.texs; + this.boundModel = model; + } + + public void bindModelOffset(RenderModel model, double ofx, double ofy, double ofz) { + this.vertices = new Vector3[model.vertices.length]; + + for(int i = 0; i < this.vertices.length; ++i) { + Vector3 v = new Vector3(model.vertices[i]); + v.add(this.localOffset.x - ofx, this.localOffset.y - ofy, this.localOffset.z - ofz); + this.basis.rotate(v); + v.add(ofx, ofy, ofz); + v.add(this.globalOrigin); + this.vertices[i] = v; + } + + this.corners = model.texs; + this.boundModel = model; + } + + public void renderModelGroup(int gr, int sgr) { + for(TexVertex[] corner : this.corners) { + TexVertex c = corner[0]; + c.brtex = this.brightLocal[0]; + } + + this.renderRangeFlat(this.boundModel.groups[gr][sgr][0], this.boundModel.groups[gr][sgr][1]); + } + + public void renderModel(RenderModel model) { + this.bindModel(model); + + for(int i = 0; i < this.corners.length; ++i) { + TexVertex c = this.corners[i][0]; + c.brtex = this.brightLocal[0]; + } + + this.renderRangeFlat(0, this.corners.length); + } + + public RenderContext() { + for(int i = 0; i < 8; ++i) { + this.verticesBox[i] = new Vector3(); + } + + int[][] vtxl = new int[][]{{7, 6, 5, 4}, {0, 1, 2, 3}, {0, 4, 5, 1}, {2, 6, 7, 3}, {1, 5, 6, 2}, {3, 7, 4, 0}}; + + for(int i = 0; i < 6; ++i) { + for(int j = 0; j < 4; ++j) { + this.cornersBox[i][j] = new TexVertex(); + this.cornersBox[i][j].vtx = vtxl[i][j]; + } + } + + this.setDefaults(); + } +} diff --git a/src/main/java/com/eloraam/redpower/core/RenderCovers.java b/src/main/java/com/eloraam/redpower/core/RenderCovers.java new file mode 100644 index 0000000..2bec824 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/RenderCovers.java @@ -0,0 +1,20 @@ +package com.eloraam.redpower.core; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; + +@SideOnly(Side.CLIENT) +public abstract class RenderCovers extends RenderCustomBlock { + protected CoverRenderer coverRenderer; + protected RenderContext context = new RenderContext(); + + public RenderCovers(Block block) { + super(block); + this.coverRenderer = new CoverRenderer(this.context); + } + + public void renderCovers(int uc, short[] covs) { + this.coverRenderer.render(uc, covs); + } +} diff --git a/src/main/java/com/eloraam/redpower/core/RenderCustomBlock.java b/src/main/java/com/eloraam/redpower/core/RenderCustomBlock.java new file mode 100644 index 0000000..2e891b9 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/RenderCustomBlock.java @@ -0,0 +1,214 @@ +package com.eloraam.redpower.core; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import java.util.Random; +import net.minecraft.block.Block; +import net.minecraft.client.Minecraft; +import net.minecraft.client.particle.EffectRenderer; +import net.minecraft.client.particle.EntityDiggingFX; +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.World; +import net.minecraftforge.client.IItemRenderer; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import net.minecraftforge.client.IItemRenderer.ItemRendererHelper; + +@SideOnly(Side.CLIENT) +public abstract class RenderCustomBlock extends TileEntitySpecialRenderer implements IItemRenderer { + protected Block block; + + public RenderCustomBlock(Block block) { + this.block = block; + } + + protected int getMixedBrightness(TileEntity tile) { + return tile.getBlockType().getMixedBrightnessForBlock(tile.getWorldObj(), tile.xCoord, tile.yCoord, tile.zCoord); + } + + public void randomDisplayTick(World world, int x, int y, int z, Random random) { + } + + public boolean renderHit(EffectRenderer effectRenderer, World world, MovingObjectPosition target, int x, int y, int z, int side, int meta) { + Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture); + TileEntity tile = world.getTileEntity(x, y, z); + if (tile != null && tile instanceof TileCoverable) { + TileCoverable coverable = (TileCoverable)tile; + Block block = coverable.getBlockType(); + int cvr = coverable.getCover(target.subHit); + if (cvr >= 0) { + Block bl = CoverLib.getBlock(cvr & 0xFF); + int m = CoverLib.getMeta(cvr & 0xFF); + if (bl != null && bl != Blocks.air) { + float f = 0.1F; + double dx = (double)x + + world.rand.nextDouble() * (block.getBlockBoundsMaxX() - block.getBlockBoundsMinX() - (double)(f * 2.0F)) + + (double)f + + block.getBlockBoundsMinX(); + double dy = (double)y + + world.rand.nextDouble() * (block.getBlockBoundsMaxY() - block.getBlockBoundsMinY() - (double)(f * 2.0F)) + + (double)f + + block.getBlockBoundsMinY(); + double dz = (double)z + + world.rand.nextDouble() * (block.getBlockBoundsMaxZ() - block.getBlockBoundsMinZ() - (double)(f * 2.0F)) + + (double)f + + block.getBlockBoundsMinZ(); + switch(side) { + case 0: + dy = (double)y + block.getBlockBoundsMinY() - (double)f; + break; + case 1: + dy = (double)y + block.getBlockBoundsMaxY() + (double)f; + break; + case 2: + dz = (double)z + block.getBlockBoundsMinZ() - (double)f; + break; + case 3: + dz = (double)z + block.getBlockBoundsMaxZ() + (double)f; + break; + case 4: + dx = (double)x + block.getBlockBoundsMinX() - (double)f; + break; + case 5: + dx = (double)x + block.getBlockBoundsMaxX() + (double)f; + } + + effectRenderer.addEffect( + new EntityDiggingFX(world, dx, dy, dz, 0.0, 0.0, 0.0, bl, m, target.sideHit).multiplyVelocity(0.2F).multipleParticleScaleBy(0.6F) + ); + } + + return true; + } + } + + if (tile != null) { + float f = 0.1F; + double dx = (double)x + + world.rand.nextDouble() * (this.block.getBlockBoundsMaxX() - this.block.getBlockBoundsMinX() - (double)(f * 2.0F)) + + (double)f + + this.block.getBlockBoundsMinX(); + double dy = (double)y + + world.rand.nextDouble() * (this.block.getBlockBoundsMaxY() - this.block.getBlockBoundsMinY() - (double)(f * 2.0F)) + + (double)f + + this.block.getBlockBoundsMinY(); + double dz = (double)z + + world.rand.nextDouble() * (this.block.getBlockBoundsMaxZ() - this.block.getBlockBoundsMinZ() - (double)(f * 2.0F)) + + (double)f + + this.block.getBlockBoundsMinZ(); + switch(side) { + case 0: + dy = (double)y + this.block.getBlockBoundsMinY() - (double)f; + break; + case 1: + dy = (double)y + this.block.getBlockBoundsMaxY() + (double)f; + break; + case 2: + dz = (double)z + this.block.getBlockBoundsMinZ() - (double)f; + break; + case 3: + dz = (double)z + this.block.getBlockBoundsMaxZ() + (double)f; + break; + case 4: + dx = (double)x + this.block.getBlockBoundsMinX() - (double)f; + break; + case 5: + dx = (double)x + this.block.getBlockBoundsMaxX() + (double)f; + } + + int color = this.getParticleColorForSide(world, x, y, z, tile, side, meta); + IIcon icon = this.getParticleIconForSide(world, x, y, z, tile, side, meta); + if (icon != null) { + effectRenderer.addEffect( + new EntityCustomDiggingFX(world, dx, dy, dz, 0.0, 0.0, 0.0, icon, color).multiplyVelocity(0.2F).multipleParticleScaleBy(0.6F) + ); + } + + return true; + } else { + return false; + } + } + + public boolean renderDestroy(EffectRenderer effectRenderer, World world, int x, int y, int z, int meta) { + Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture); + TileEntity tile = world.getTileEntity(x, y, z); + MovingObjectPosition target = Minecraft.getMinecraft().thePlayer.rayTrace(5.0, 1.0F); + if (tile != null && tile instanceof TileCoverable && target != null && target.blockX == x && target.blockY == y && target.blockZ == z) { + TileCoverable coverable = (TileCoverable)tile; + int cvr = coverable.getCover(target.subHit); + if (cvr >= 0) { + Block bl = CoverLib.getBlock(cvr & 0xFF); + int m = CoverLib.getMeta(cvr & 0xFF); + if (bl != null && bl != Blocks.air) { + byte offset = 4; + + for(int xoff = 0; xoff < offset; ++xoff) { + for(int yoff = 0; yoff < offset; ++yoff) { + for(int zoff = 0; zoff < offset; ++zoff) { + double xc = (double)x + ((double)xoff + 0.5) / (double)offset; + double yc = (double)y + ((double)yoff + 0.5) / (double)offset; + double zc = (double)z + ((double)zoff + 0.5) / (double)offset; + effectRenderer.addEffect( + new EntityDiggingFX(world, xc, yc, zc, xc - (double)x - 0.5, yc - (double)y - 0.5, zc - (double)z - 0.5, bl, m, target.sideHit) + ); + } + } + } + } + + return true; + } + } + + if (tile == null) { + return false; + } else { + byte offset = 4; + + for(int xoff = 0; xoff < offset; ++xoff) { + for(int yoff = 0; yoff < offset; ++yoff) { + for(int zoff = 0; zoff < offset; ++zoff) { + double xc = (double)x + ((double)xoff + 0.5) / (double)offset; + double yc = (double)y + ((double)yoff + 0.5) / (double)offset; + double zc = (double)z + ((double)zoff + 0.5) / (double)offset; + int side = world.rand.nextInt(6); + int color = this.getParticleColorForSide(world, x, y, z, tile, side, meta); + IIcon icon = this.getParticleIconForSide(world, x, y, z, tile, side, meta); + if (icon != null) { + effectRenderer.addEffect( + new EntityCustomDiggingFX(world, xc, yc, zc, xc - (double)x - 0.5, yc - (double)y - 0.5, zc - (double)z - 0.5, icon, color) + ); + } + } + } + } + + return true; + } + } + + protected IIcon getParticleIconForSide(World world, int x, int y, int z, TileEntity tile, int side, int meta) { + return null; + } + + protected int getParticleColorForSide(World world, int x, int y, int z, TileEntity tile, int side, int meta) { + return 16777215; + } + + public boolean handleRenderType(ItemStack item, ItemRenderType type) { + return true; + } + + public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { + return true; + } + + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + } +} diff --git a/src/main/java/com/eloraam/redpower/core/RenderEvents.java b/src/main/java/com/eloraam/redpower/core/RenderEvents.java new file mode 100644 index 0000000..bf6ed38 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/RenderEvents.java @@ -0,0 +1,4 @@ +package com.eloraam.redpower.core; + +public class RenderEvents { +} diff --git a/src/main/java/com/eloraam/redpower/core/RenderHighlight.java b/src/main/java/com/eloraam/redpower/core/RenderHighlight.java new file mode 100644 index 0000000..89d58b2 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/RenderHighlight.java @@ -0,0 +1,298 @@ +package com.eloraam.redpower.core; + +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.relauncher.ReflectionHelper; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import java.util.Map; +import net.minecraft.block.Block; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.DestroyBlockProgress; +import net.minecraft.client.renderer.RenderGlobal; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.MovingObjectPosition.MovingObjectType; +import net.minecraft.world.World; +import net.minecraftforge.client.event.DrawBlockHighlightEvent; +import net.minecraftforge.client.event.TextureStitchEvent.Post; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public class RenderHighlight { + private RenderContext context = new RenderContext(); + private CoverRenderer coverRenderer = new CoverRenderer(this.context); + private IIcon[] destroyIcons; + + @SubscribeEvent + public void onTextureStitchEventPost(Post evt) { + if (evt.map.getTextureType() == 0) { + CoverRenderer.reInitIcons(); + } + + this.destroyIcons = (IIcon[])ReflectionHelper.getPrivateValue( + RenderGlobal.class, Minecraft.getMinecraft().renderGlobal, new String[]{"destroyBlockIcons", "field_94141_F"} + ); + } + + @SubscribeEvent + public void highlightEvent(DrawBlockHighlightEvent evt) { + this.onBlockHighlight(evt.context, evt.player, evt.target, evt.subID, evt.currentItem, evt.partialTicks); + } + + public boolean onBlockHighlight(RenderGlobal render, EntityPlayer pl, MovingObjectPosition mop, int subID, ItemStack ist, float partialTicks) { + World world = pl.worldObj; + Block bl = world.getBlock(mop.blockX, mop.blockY, mop.blockZ); + Map damagedBlocks = (Map)ReflectionHelper.getPrivateValue( + RenderGlobal.class, render, new String[]{"damagedBlocks", "field_72738_E"} + ); + if (bl instanceof BlockMultipart) { + BlockMultipart bm = (BlockMultipart)bl; + bm.setPartBounds(pl.worldObj, mop.blockX, mop.blockY, mop.blockZ, mop.subHit); + } + + if (!damagedBlocks.isEmpty()) { + for(DestroyBlockProgress dbp : damagedBlocks.values()) { + if (dbp.getPartialBlockX() == mop.blockX && dbp.getPartialBlockY() == mop.blockY && dbp.getPartialBlockZ() == mop.blockZ) { + if (bl instanceof BlockExtended) { + this.drawBreaking(pl.worldObj, render, (BlockExtended)bl, pl, mop, partialTicks, dbp.getPartialBlockDamage()); + return true; + } + break; + } + } + } + + if (ist == null || CoverLib.blockCoverPlate == null || ist.getItem() != Item.getItemFromBlock(CoverLib.blockCoverPlate)) { + return false; + } else if (mop.typeOfHit != MovingObjectType.BLOCK) { + return false; + } else { + MovingObjectPosition placement; + switch(ist.getItemDamage() >> 8) { + case 0: + case 16: + case 17: + case 21: + case 22: + case 23: + case 24: + case 25: + case 26: + case 27: + case 28: + case 29: + case 30: + case 31: + case 32: + case 33: + case 34: + case 39: + case 40: + case 41: + case 42: + case 43: + case 44: + case 45: + this.drawSideBox(world, pl, mop, partialTicks); + placement = CoverLib.getPlacement(world, mop, ist.getItemDamage()); + if (placement != null) { + this.drawPreview(pl, placement, partialTicks, ist.getItemDamage()); + } + break; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + default: + return false; + case 18: + case 19: + case 20: + case 35: + case 36: + case 37: + case 38: + this.drawCornerBox(world, pl, mop, partialTicks); + placement = CoverLib.getPlacement(world, mop, ist.getItemDamage()); + if (placement != null) { + this.drawPreview(pl, placement, partialTicks, ist.getItemDamage()); + } + } + + return true; + } + } + + private void setRawPos(EntityPlayer player, MovingObjectPosition mop, float partialTicks) { + double dx = player.lastTickPosX + (player.posX - player.lastTickPosX) * (double)partialTicks; + double dy = player.lastTickPosY + (player.posY - player.lastTickPosY) * (double)partialTicks; + double dz = player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * (double)partialTicks; + this.context.setPos((double)mop.blockX - dx, (double)mop.blockY - dy, (double)mop.blockZ - dz); + } + + private void setCollPos(EntityPlayer player, MovingObjectPosition mop, float partialTicks) { + this.setRawPos(player, mop, partialTicks); + switch(mop.sideHit) { + case 0: + this.context.setRelPos(0.0, mop.hitVec.yCoord - (double)mop.blockY, 0.0); + break; + case 1: + this.context.setRelPos(0.0, (double)mop.blockY - mop.hitVec.yCoord + 1.0, 0.0); + break; + case 2: + this.context.setRelPos(0.0, mop.hitVec.zCoord - (double)mop.blockZ, 0.0); + break; + case 3: + this.context.setRelPos(0.0, (double)mop.blockZ - mop.hitVec.zCoord + 1.0, 0.0); + break; + case 4: + this.context.setRelPos(0.0, mop.hitVec.xCoord - (double)mop.blockX, 0.0); + break; + default: + this.context.setRelPos(0.0, (double)mop.blockX - mop.hitVec.xCoord + 1.0, 0.0); + } + + } + + public void drawCornerBox(World world, EntityPlayer player, MovingObjectPosition mop, float partialTicks) { + GL11.glEnable(3042); + GL11.glBlendFunc(770, 771); + GL11.glColor4f(0.0F, 0.0F, 0.0F, 0.9F); + GL11.glLineWidth(3.0F); + GL11.glDisable(3553); + GL11.glDepthMask(false); + float var5 = 0.002F; + float var6 = 0.25F; + Block bl = world.getBlock(mop.blockX, mop.blockY, mop.blockZ); + if (bl != Blocks.air) { + this.context.setSize(0.0, (double)(-var5), 0.0, 1.0, (double)(-var5), 1.0); + this.context.setupBox(); + this.context.vertices[4].set(0.0, (double)(-var5), 0.5); + this.context.vertices[5].set(1.0, (double)(-var5), 0.5); + this.context.vertices[6].set(0.5, (double)(-var5), 0.0); + this.context.vertices[7].set(0.5, (double)(-var5), 1.0); + this.context.setOrientation(mop.sideHit, 0); + this.setCollPos(player, mop, partialTicks); + this.context.transformRotate(); + Tessellator.instance.startDrawing(3); + this.context.drawPoints(0, 1, 2, 3, 0); + Tessellator.instance.draw(); + Tessellator.instance.startDrawing(1); + this.context.drawPoints(4, 5, 6, 7); + Tessellator.instance.draw(); + } + + GL11.glDepthMask(true); + GL11.glEnable(3553); + GL11.glDisable(3042); + this.context.setRelPos(0.0, 0.0, 0.0); + } + + public void drawSideBox(World world, EntityPlayer player, MovingObjectPosition mop, float partialTicks) { + GL11.glEnable(3042); + GL11.glBlendFunc(770, 771); + GL11.glColor4f(0.0F, 0.0F, 0.0F, 0.9F); + GL11.glLineWidth(3.0F); + GL11.glDisable(3553); + GL11.glDepthMask(false); + float var5 = 0.002F; + float var6 = 0.25F; + Block bl = world.getBlock(mop.blockX, mop.blockY, mop.blockZ); + if (bl != Blocks.air) { + this.context.setSize(0.0, (double)(-var5), 0.0, 1.0, (double)(-var5), 1.0); + this.context.setupBox(); + this.context.vertices[4].set((double)(1.0F - var6), (double)(-var5), (double)var6); + this.context.vertices[5].set((double)var6, (double)(-var5), (double)var6); + this.context.vertices[6].set((double)var6, (double)(-var5), (double)(1.0F - var6)); + this.context.vertices[7].set((double)(1.0F - var6), (double)(-var5), (double)(1.0F - var6)); + this.context.setOrientation(mop.sideHit, 0); + this.setCollPos(player, mop, partialTicks); + this.context.transformRotate(); + Tessellator.instance.startDrawing(3); + this.context.drawPoints(0, 1, 2, 3, 0); + Tessellator.instance.draw(); + Tessellator.instance.startDrawing(3); + this.context.drawPoints(4, 5, 6, 7, 4); + Tessellator.instance.draw(); + Tessellator.instance.startDrawing(1); + this.context.drawPoints(0, 4, 1, 5, 2, 6, 3, 7); + Tessellator.instance.draw(); + } + + GL11.glDepthMask(true); + GL11.glEnable(3553); + GL11.glDisable(3042); + this.context.setRelPos(0.0, 0.0, 0.0); + } + + public void drawBreaking(World world, RenderGlobal render, BlockExtended bl, EntityPlayer pl, MovingObjectPosition mop, float partialTicks, int destroyStage) { + GL11.glEnable(3042); + GL11.glBlendFunc(774, 768); + this.context.bindBlockTexture(); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.5F); + GL11.glPolygonOffset(-3.0F, -3.0F); + GL11.glEnable(32823); + double dx = pl.lastTickPosX + (pl.posX - pl.lastTickPosX) * (double)partialTicks; + double dy = pl.lastTickPosY + (pl.posY - pl.lastTickPosY) * (double)partialTicks; + double dz = pl.lastTickPosZ + (pl.posZ - pl.lastTickPosZ) * (double)partialTicks; + GL11.glEnable(3008); + this.context.setPos((double)mop.blockX - dx, (double)mop.blockY - dy, (double)mop.blockZ - dz); + this.context.setIcon(this.destroyIcons[destroyStage]); + Tessellator.instance.startDrawingQuads(); + this.context + .setSize( + bl.getBlockBoundsMinX(), + bl.getBlockBoundsMinY(), + bl.getBlockBoundsMinZ(), + bl.getBlockBoundsMaxX(), + bl.getBlockBoundsMaxY(), + bl.getBlockBoundsMaxZ() + ); + this.context.setupBox(); + this.context.transform(); + this.context.renderFaces(63); + Tessellator.instance.draw(); + GL11.glPolygonOffset(0.0F, 0.0F); + GL11.glDisable(32823); + } + + public void drawPreview(EntityPlayer pl, MovingObjectPosition mop, float partialTicks, int md) { + this.setRawPos(pl, mop, partialTicks); + this.context.bindBlockTexture(); + this.coverRenderer.start(); + this.coverRenderer.setupCorners(); + this.coverRenderer.setSize(mop.subHit, CoverLib.getThickness(mop.subHit, CoverLib.damageToCoverValue(md))); + this.context.setIcon(CoverRenderer.coverIcons[md & 0xFF]); + GL11.glEnable(3042); + GL11.glBlendFunc(770, 1); + GL11.glDepthMask(false); + GL11.glPolygonOffset(-3.0F, -3.0F); + GL11.glEnable(32823); + Tessellator.instance.startDrawingQuads(); + this.context.setupBox(); + this.context.transform(); + this.context.doMappingBox(63); + this.context.doLightLocal(63); + this.context.renderAlpha(63, 0.8F); + Tessellator.instance.draw(); + GL11.glDisable(32823); + GL11.glDepthMask(true); + GL11.glDisable(3042); + } +} diff --git a/src/main/java/com/eloraam/redpower/core/RenderLib.java b/src/main/java/com/eloraam/redpower/core/RenderLib.java new file mode 100644 index 0000000..5bdb438 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/RenderLib.java @@ -0,0 +1,264 @@ +package com.eloraam.redpower.core; + +import java.util.function.Function; +import net.minecraft.block.Block; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraftforge.client.IItemRenderer; +import net.minecraftforge.client.MinecraftForgeClient; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import net.minecraftforge.client.IItemRenderer.ItemRendererHelper; +import org.lwjgl.opengl.GL11; + +public class RenderLib { + private static RenderLib.RenderListEntry[] renderers = new RenderLib.RenderListEntry[4096]; + + public static void renderSpecialLever(Vector3 pos, Quat rot, IIcon foundation, IIcon lever) { + Vector3[] pl = new Vector3[8]; + float f8 = 0.0625F; + float f9 = 0.0625F; + float f10 = 0.375F; + pl[0] = new Vector3((double)(-f8), 0.0, (double)(-f9)); + pl[1] = new Vector3((double)f8, 0.0, (double)(-f9)); + pl[2] = new Vector3((double)f8, 0.0, (double)f9); + pl[3] = new Vector3((double)(-f8), 0.0, (double)f9); + pl[4] = new Vector3((double)(-f8), (double)f10, (double)(-f9)); + pl[5] = new Vector3((double)f8, (double)f10, (double)(-f9)); + pl[6] = new Vector3((double)f8, (double)f10, (double)f9); + pl[7] = new Vector3((double)(-f8), (double)f10, (double)f9); + + for(int i = 0; i < 8; ++i) { + rot.rotate(pl[i]); + pl[i].add(pos.x + 0.5, pos.y + 0.5, pos.z + 0.5); + } + + float uMin = foundation.getMinU(); + float uMax = foundation.getMaxU(); + float vMin = foundation.getMinV(); + float vMax = foundation.getMaxV(); + Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture); + addVectWithUV(pl[0], (double)uMin, (double)vMax); + addVectWithUV(pl[1], (double)uMax, (double)vMax); + addVectWithUV(pl[2], (double)uMax, (double)vMin); + addVectWithUV(pl[3], (double)uMin, (double)vMin); + addVectWithUV(pl[7], (double)uMin, (double)vMax); + addVectWithUV(pl[6], (double)uMax, (double)vMax); + addVectWithUV(pl[5], (double)uMax, (double)vMin); + addVectWithUV(pl[4], (double)uMin, (double)vMin); + uMin = lever.getMinU(); + uMax = lever.getMaxU(); + vMin = lever.getMinV(); + vMax = lever.getMaxV(); + addVectWithUV(pl[1], (double)uMin, (double)vMax); + addVectWithUV(pl[0], (double)uMax, (double)vMax); + addVectWithUV(pl[4], (double)uMax, (double)vMin); + addVectWithUV(pl[5], (double)uMin, (double)vMin); + addVectWithUV(pl[2], (double)uMin, (double)vMax); + addVectWithUV(pl[1], (double)uMax, (double)vMax); + addVectWithUV(pl[5], (double)uMax, (double)vMin); + addVectWithUV(pl[6], (double)uMin, (double)vMin); + addVectWithUV(pl[3], (double)uMin, (double)vMax); + addVectWithUV(pl[2], (double)uMax, (double)vMax); + addVectWithUV(pl[6], (double)uMax, (double)vMin); + addVectWithUV(pl[7], (double)uMin, (double)vMin); + addVectWithUV(pl[0], (double)uMin, (double)vMax); + addVectWithUV(pl[3], (double)uMax, (double)vMax); + addVectWithUV(pl[7], (double)uMax, (double)vMin); + addVectWithUV(pl[4], (double)uMin, (double)vMin); + } + + public static void addVectWithUV(Vector3 vect, double u, double v) { + Tessellator tess = Tessellator.instance; + tess.addVertexWithUV(vect.x, vect.y, vect.z, u, v); + } + + public static void renderPointer(Vector3 pos, Quat rot) { + Tessellator tess = Tessellator.instance; + IIcon icon = Blocks.stone.getIcon(0, 0); + double uMin = (double)icon.getMinU(); + double vMin = (double)icon.getMinV(); + double uMax = (double)icon.getInterpolatedU(7.9) - uMin; + double vMax = (double)icon.getInterpolatedV(0.12432) - vMin; + tess.setColorOpaque_F(0.9F, 0.9F, 0.9F); + Vector3[] vecs = new Vector3[]{ + new Vector3(0.4, 0.0, 0.0), + new Vector3(0.0, 0.0, 0.2), + new Vector3(-0.2, 0.0, 0.0), + new Vector3(0.0, 0.0, -0.2), + new Vector3(0.4, 0.1, 0.0), + new Vector3(0.0, 0.1, 0.2), + new Vector3(-0.2, 0.1, 0.0), + new Vector3(0.0, 0.1, -0.2) + }; + + for(int i = 0; i < 8; ++i) { + rot.rotate(vecs[i]); + vecs[i].add(pos); + } + + addVectWithUV(vecs[0], uMin, vMin); + addVectWithUV(vecs[1], uMin + uMax, vMin); + addVectWithUV(vecs[2], uMin + uMax, vMin + uMax); + addVectWithUV(vecs[3], uMin, vMin + uMax); + addVectWithUV(vecs[4], uMin, vMin); + addVectWithUV(vecs[7], uMin, vMin + uMax); + addVectWithUV(vecs[6], uMin + uMax, vMin + uMax); + addVectWithUV(vecs[5], uMin + uMax, vMin); + tess.setColorOpaque_F(0.6F, 0.6F, 0.6F); + addVectWithUV(vecs[0], uMin + vMax, vMin); + addVectWithUV(vecs[4], uMin, vMin); + addVectWithUV(vecs[5], uMin, vMin + uMax); + addVectWithUV(vecs[1], uMin + vMax, vMin + uMax); + addVectWithUV(vecs[0], uMin, vMin + vMax); + addVectWithUV(vecs[3], uMin + uMax, vMin + vMax); + addVectWithUV(vecs[7], uMin + uMax, vMin); + addVectWithUV(vecs[4], uMin, vMin); + addVectWithUV(vecs[2], uMin + uMax, vMin + uMax - vMax); + addVectWithUV(vecs[6], uMin + uMax, vMin + uMax); + addVectWithUV(vecs[7], uMin, vMin + uMax); + addVectWithUV(vecs[3], uMin, vMin + uMax - vMax); + addVectWithUV(vecs[2], uMin + uMax, vMin + uMax - vMax); + addVectWithUV(vecs[1], uMin, vMin + uMax - vMax); + addVectWithUV(vecs[5], uMin, vMin + uMax); + addVectWithUV(vecs[6], uMin + uMax, vMin + uMax); + } + + public static RenderCustomBlock getRenderer(Block bid, int md) { + RenderLib.RenderListEntry rle = renderers[Block.getIdFromBlock(bid)]; + return rle == null ? null : rle.metaRenders[md]; + } + + public static RenderCustomBlock getInvRenderer(Block bid, int md) { + RenderLib.RenderListEntry rle = renderers[Block.getIdFromBlock(bid)]; + if (rle == null) { + return null; + } else { + int mdv = rle.mapDamageValue(md); + return mdv > 15 ? rle.defaultRender : rle.metaRenders[mdv]; + } + } + + private static RenderCustomBlock makeRenderer(B bl, Function rcl) { + return (RenderCustomBlock)rcl.apply(bl); + } + + public static void setRenderer(B bl, Function rcl) { + RenderCustomBlock rnd = makeRenderer(bl, rcl); + int bid = Block.getIdFromBlock(bl); + if (renderers[bid] == null) { + renderers[bid] = new RenderLib.RenderListEntry(); + MinecraftForgeClient.registerItemRenderer(ItemExtended.getItemFromBlock(bl), renderers[bid]); + } + + for(int i = 0; i < 16; ++i) { + renderers[bid].metaRenders[i] = rnd; + } + + } + + public static void setRenderer(B bl, int md, Function rcl) { + RenderCustomBlock rnd = makeRenderer(bl, rcl); + int bid = Block.getIdFromBlock(bl); + if (renderers[bid] == null) { + renderers[bid] = new RenderLib.RenderListEntry(); + MinecraftForgeClient.registerItemRenderer(ItemExtended.getItemFromBlock(bl), renderers[bid]); + } + + renderers[bid].metaRenders[md] = rnd; + } + + public static void setHighRenderer(B bl, int md, Function rcl) { + RenderCustomBlock rnd = makeRenderer(bl, rcl); + int bid = Block.getIdFromBlock(bl); + if (renderers[bid] == null) { + renderers[bid] = new RenderLib.RenderShiftedEntry(8); + MinecraftForgeClient.registerItemRenderer(ItemExtended.getItemFromBlock(bl), renderers[bid]); + } + + renderers[bid].metaRenders[md] = rnd; + } + + public static void setDefaultRenderer(B bl, int shift, Function rcl) { + RenderCustomBlock rnd = makeRenderer(bl, rcl); + int bid = Block.getIdFromBlock(bl); + if (renderers[bid] == null) { + renderers[bid] = new RenderLib.RenderShiftedEntry(shift); + MinecraftForgeClient.registerItemRenderer(ItemExtended.getItemFromBlock(bl), renderers[bid]); + } + + for(int i = 0; i < 16; ++i) { + if (renderers[bid].metaRenders[i] == null) { + renderers[bid].metaRenders[i] = rnd; + } + } + + renderers[Block.getIdFromBlock(bl)].defaultRender = rnd; + } + + public static void setShiftedRenderer(B bl, int md, int shift, Function rcl) { + RenderCustomBlock rnd = makeRenderer(bl, rcl); + int bid = Block.getIdFromBlock(bl); + if (renderers[bid] == null) { + renderers[bid] = new RenderLib.RenderShiftedEntry(shift); + MinecraftForgeClient.registerItemRenderer(ItemExtended.getItemFromBlock(bl), renderers[bid]); + } + + renderers[bid].metaRenders[md] = rnd; + } + + private static class RenderListEntry implements IItemRenderer { + public RenderCustomBlock[] metaRenders = new RenderCustomBlock[16]; + RenderCustomBlock defaultRender; + + private RenderListEntry() { + } + + public int mapDamageValue(int dmg) { + return dmg; + } + + public boolean handleRenderType(ItemStack item, ItemRenderType type) { + int meta = item.getItemDamage(); + int mdv = this.mapDamageValue(meta); + RenderCustomBlock renderer = mdv > 15 ? this.defaultRender : this.metaRenders[mdv]; + return renderer != null && renderer.handleRenderType(item, type); + } + + public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { + int meta = item.getItemDamage(); + int mdv = this.mapDamageValue(meta); + RenderCustomBlock renderer = mdv > 15 ? this.defaultRender : this.metaRenders[mdv]; + return renderer != null && renderer.shouldUseRenderHelper(type, item, helper); + } + + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + int meta = item.getItemDamage(); + int mdv = this.mapDamageValue(meta); + RenderCustomBlock renderer = mdv > 15 ? this.defaultRender : this.metaRenders[mdv]; + if (renderer != null) { + GL11.glEnable(3042); + GL11.glBlendFunc(770, 771); + GL11.glEnable(3008); + renderer.renderItem(type, item, data); + } + + } + } + + private static class RenderShiftedEntry extends RenderLib.RenderListEntry { + public int shift; + + public RenderShiftedEntry(int sh) { + this.shift = sh; + } + + @Override + public int mapDamageValue(int dmg) { + return dmg >> this.shift; + } + } +} diff --git a/src/main/java/com/eloraam/redpower/core/RenderModel.java b/src/main/java/com/eloraam/redpower/core/RenderModel.java new file mode 100644 index 0000000..9e10a28 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/RenderModel.java @@ -0,0 +1,257 @@ +package com.eloraam.redpower.core; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.StreamTokenizer; +import java.util.ArrayList; +import java.util.List; +import net.minecraft.client.Minecraft; +import net.minecraft.client.resources.IResource; +import net.minecraft.util.ResourceLocation; + +public class RenderModel { + public Vector3[] vertices; + public TexVertex[][] texs; + int[][][] groups; + + public static RenderModel loadModel(String location) { + try { + IResource resource = Minecraft.getMinecraft().getResourceManager().getResource(new ResourceLocation(location)); + InputStream is = resource.getInputStream(); + RenderModel.ModelReader ml = new RenderModel.ModelReader(); + ml.readModel(is); + List vtl = new ArrayList(); + int i = 0; + + while(i < ml.faceno.size()) { + TexVertex[] tr = new TexVertex[4]; + + for(int lgs = 0; lgs < 4; ++lgs) { + int lgmn = ml.faceno.get(i); + ++i; + if (lgmn < 0) { + throw new IllegalArgumentException("Non-Quad Face"); + } + + int lgsn = ml.faceno.get(i); + ++i; + TexVertex t = ((TexVertex)ml.texvert.get(lgsn - 1)).copy(); + t.vtx = lgmn - 1; + t.v = 1.0 - t.v; + tr[lgs] = t; + } + + int var15 = ml.faceno.get(i); + ++i; + if (var15 >= 0) { + throw new IllegalArgumentException("Non-Quad Face"); + } + + vtl.add(tr); + } + + RenderModel model = new RenderModel(); + model.vertices = (Vector3[])ml.vertex.toArray(new Vector3[0]); + model.texs = (TexVertex[][])vtl.toArray(new TexVertex[0][]); + model.groups = new int[ml.grcnt.size()][][]; + + for(int var13 = 0; var13 < ml.grcnt.size(); ++var13) { + int lgs = ml.grcnt.get(var13); + model.groups[var13] = new int[lgs][]; + + for(int lgmn = 0; lgmn < ml.grcnt.get(var13); ++lgmn) { + model.groups[var13][lgmn] = new int[2]; + } + } + + i = 0; + int lgs = -1; + int lgmn = -1; + + int lgsn; + for(lgsn = -1; i < ml.groups.size(); i += 3) { + if (lgs >= 0) { + model.groups[lgmn][lgsn][0] = lgs; + model.groups[lgmn][lgsn][1] = ml.groups.get(i + 2); + } + + lgmn = ml.groups.get(i); + lgsn = ml.groups.get(i + 1); + lgs = ml.groups.get(i + 2); + } + + if (lgs >= 0) { + model.groups[lgmn][lgsn][0] = lgs; + model.groups[lgmn][lgsn][1] = ml.fno; + } + + return model; + } catch (IOException var11) { + var11.printStackTrace(); + return null; + } + } + + public RenderModel scale(double factor) { + for(Vector3 vertex : this.vertices) { + vertex.multiply(factor); + } + + return this; + } + + public static class ModelReader { + public List vertex = new ArrayList(); + public List faceno = new ArrayList(); + public List texvert = new ArrayList(); + public List groups = new ArrayList(); + public List grcnt = new ArrayList(); + int fno = 0; + + private void eatLine(StreamTokenizer tok) throws IOException { + while(tok.nextToken() != -1) { + if (tok.ttype == 10) { + return; + } + } + + } + + private void endLine(StreamTokenizer tok) throws IOException { + if (tok.nextToken() != 10) { + throw new IllegalArgumentException("Parse error"); + } + } + + private double getFloat(StreamTokenizer tok) throws IOException { + if (tok.nextToken() != -2) { + throw new IllegalArgumentException("Parse error"); + } else { + return tok.nval; + } + } + + private int getInt(StreamTokenizer tok) throws IOException { + if (tok.nextToken() != -2) { + throw new IllegalArgumentException("Parse error"); + } else { + return (int)tok.nval; + } + } + + private void parseFace(StreamTokenizer tok) throws IOException { + while(true) { + tok.nextToken(); + if (tok.ttype == -1 || tok.ttype == 10) { + this.faceno.add(-1); + ++this.fno; + return; + } + + if (tok.ttype != -2) { + throw new IllegalArgumentException("Parse error"); + } + + int n1 = (int)tok.nval; + if (tok.nextToken() != 47) { + throw new IllegalArgumentException("Parse error"); + } + + int n2 = this.getInt(tok); + this.faceno.add(n1); + this.faceno.add(n2); + } + } + + private void setGroup(int gr, int sub) { + this.groups.add(gr); + this.groups.add(sub); + this.groups.add(this.fno); + if (this.grcnt.size() < gr) { + throw new IllegalArgumentException("Parse error"); + } else { + if (this.grcnt.size() == gr) { + this.grcnt.add(0); + } + + this.grcnt.set(gr, Math.max(this.grcnt.get(gr), sub + 1)); + } + } + + private void parseGroup(StreamTokenizer tok) throws IOException { + int n1 = this.getInt(tok); + int n2 = 0; + tok.nextToken(); + if (tok.ttype == 95) { + n2 = this.getInt(tok); + tok.nextToken(); + } + + this.setGroup(n1, n2); + if (tok.ttype != 10) { + throw new IllegalArgumentException("Parse error"); + } + } + + public void readModel(InputStream fis) throws IOException { + BufferedReader r = new BufferedReader(new InputStreamReader(fis)); + StreamTokenizer tok = new StreamTokenizer(r); + tok.commentChar(35); + tok.eolIsSignificant(true); + tok.lowerCaseMode(false); + tok.parseNumbers(); + tok.quoteChar(34); + tok.ordinaryChar(47); + + while(tok.nextToken() != -1) { + if (tok.ttype != 10) { + if (tok.ttype != -3) { + throw new IllegalArgumentException("Parse error"); + } + + String var4 = tok.sval; + switch(var4) { + case "v": + Vector3 f1 = new Vector3(); + f1.x = this.getFloat(tok); + f1.y = this.getFloat(tok); + f1.z = this.getFloat(tok); + this.vertex.add(f1); + this.endLine(tok); + break; + case "vt": { + double f11 = this.getFloat(tok); + double f2 = this.getFloat(tok); + this.texvert.add(new TexVertex(0, f11, f2)); + this.endLine(tok); + break; + } + case "vtc": { + double f11 = this.getFloat(tok); + double f2 = this.getFloat(tok); + TexVertex tv = new TexVertex(0, f11, f2); + tv.r = (float)this.getFloat(tok); + tv.g = (float)this.getFloat(tok); + tv.b = (float)this.getFloat(tok); + this.texvert.add(tv); + this.endLine(tok); + break; + } + case "f": + this.parseFace(tok); + break; + case "g": + this.parseGroup(tok); + break; + default: + this.eatLine(tok); + } + } + } + + fis.close(); + } + } +} diff --git a/src/main/java/com/eloraam/redpower/core/RenderSimpleCovered.java b/src/main/java/com/eloraam/redpower/core/RenderSimpleCovered.java new file mode 100644 index 0000000..97b6591 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/RenderSimpleCovered.java @@ -0,0 +1,43 @@ +package com.eloraam.redpower.core; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public class RenderSimpleCovered extends RenderCovers { + public RenderSimpleCovered() { + super(null); + } + + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTicks) { + TileCovered covered = (TileCovered)tile; + World world = covered.getWorldObj(); + GL11.glDisable(2896); + Tessellator tess = Tessellator.instance; + super.context.bindBlockTexture(); + super.context.setBrightness(this.getMixedBrightness(covered)); + super.context.setTexFlags(55); + super.context.setPos(x, y, z); + tess.startDrawingQuads(); + if (covered.CoverSides > 0) { + super.context.setTint(1.0F, 1.0F, 1.0F); + super.context.readGlobalLights(world, covered.xCoord, covered.yCoord, covered.zCoord); + this.renderCovers(covered.CoverSides, covered.Covers); + super.context.forceFlat = false; + super.context.lockTexture = false; + } + + tess.draw(); + GL11.glEnable(2896); + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + } +} diff --git a/src/main/java/com/eloraam/redpower/core/SlotLocked.java b/src/main/java/com/eloraam/redpower/core/SlotLocked.java new file mode 100644 index 0000000..e328902 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/SlotLocked.java @@ -0,0 +1,27 @@ +package com.eloraam.redpower.core; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class SlotLocked extends Slot { + public SlotLocked(IInventory inventory, int id, int x, int y) { + super(inventory, id, x, y); + } + + public boolean isItemValid(ItemStack stack) { + return false; + } + + public boolean canTakeStack(EntityPlayer player) { + return false; + } + + public ItemStack decrStackSize(int amount) { + return null; + } + + public void putStack(ItemStack stack) { + } +} diff --git a/src/main/java/com/eloraam/redpower/core/TagFile.java b/src/main/java/com/eloraam/redpower/core/TagFile.java new file mode 100644 index 0000000..aeb67a7 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/TagFile.java @@ -0,0 +1,456 @@ +package com.eloraam.redpower.core; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.PrintStream; +import java.io.StreamTokenizer; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.TreeMap; + +public class TagFile { + private TreeMap contents = new TreeMap(); + private TreeMap comments = new TreeMap(); + private String filecomment = ""; + + public void addTag(String name, Object tag) { + int idx = 0; + TreeMap sub = this.contents; + + while(true) { + int nid = name.indexOf(46, idx); + if (nid < 0) { + String p = name.substring(idx); + if (p.equals("")) { + throw new IllegalArgumentException("Empty key name"); + } else { + sub.put(p, tag); + return; + } + } + + String p = name.substring(idx, nid); + idx = nid + 1; + if (p.equals("")) { + throw new IllegalArgumentException("Empty key name"); + } + + Object ob = sub.get(p); + if (ob == null) { + TreeMap tmp = new TreeMap(); + sub.put(p, tmp); + sub = tmp; + } else { + if (!(ob instanceof TreeMap)) { + throw new IllegalArgumentException("Key not a dictionary"); + } + + sub = (TreeMap)ob; + } + } + } + + public Object getTag(String name) { + int idx = 0; + TreeMap sub = this.contents; + + while(true) { + int nid = name.indexOf(46, idx); + if (nid < 0) { + String p = name.substring(idx); + return sub.get(p); + } + + String p = name.substring(idx, nid); + idx = nid + 1; + Object ob = sub.get(p); + if (!(ob instanceof TreeMap)) { + return null; + } + + sub = (TreeMap)ob; + } + } + + public Object removeTag(String name) { + int idx = 0; + TreeMap sub = this.contents; + + while(true) { + int nid = name.indexOf(46, idx); + if (nid < 0) { + String p = name.substring(idx); + return sub.remove(p); + } + + String p = name.substring(idx, nid); + idx = nid + 1; + Object ob = sub.get(p); + if (!(ob instanceof TreeMap)) { + return null; + } + + sub = (TreeMap)ob; + } + } + + public void commentTag(String k, String v) { + this.comments.put(k, v); + } + + public void commentFile(String cmt) { + this.filecomment = cmt; + } + + public void addString(String name, String value) { + this.addTag(name, value); + } + + public void addInt(String name, int value) { + this.addTag(name, value); + } + + public String getString(String name) { + Object ob = this.getTag(name); + return !(ob instanceof String) ? null : (String)ob; + } + + public String getString(String name, String _default) { + Object ob = this.getTag(name); + if (ob == null) { + this.addTag(name, _default); + return _default; + } else { + return !(ob instanceof String) ? _default : (String)ob; + } + } + + public int getInt(String name) { + return this.getInt(name, 0); + } + + public int getInt(String name, int _default) { + Object ob = this.getTag(name); + if (ob == null) { + this.addTag(name, _default); + return _default; + } else { + return !(ob instanceof Integer) ? 0 : (Integer)ob; + } + } + + private void writeComment(PrintStream ps, String indent, String cmt) { + if (cmt != null) { + for(String s : cmt.split("\n")) { + ps.printf("%s# %s\n", indent, s); + } + } + + } + + private String collapsedTag(TreeMap tag, String key, String ft) { + String cn = key; + + String k; + for(Object ob = tag.get(key); this.comments.get(ft) == null; ft = ft + "." + k) { + if (ob instanceof String) { + return cn + "=\"" + ((String)ob).replace("\"", "\\\"") + "\""; + } + + if (ob instanceof Integer) { + return cn + "=" + ob; + } + + tag = (TreeMap)ob; + if (tag.size() != 1) { + return null; + } + + k = (String)tag.firstKey(); + cn = cn + "." + k; + ob = tag.get(k); + } + + return null; + } + + private void saveTag(PrintStream ps, TreeMap tag, String name, String indent) throws IOException { + for(String k : tag.keySet()) { + String ft = name != null ? name + "." + k : k; + this.writeComment(ps, indent, (String)this.comments.get(ft)); + Object ob = tag.get(k); + if (ob instanceof String) { + ps.printf("%s%s=\"%s\"\n", indent, k, ((String)ob).replace("\"", "\\\"")); + } else if (ob instanceof Integer) { + ps.printf("%s%s=%d\n", indent, k, ob); + } else if (ob instanceof TreeMap) { + String ct = this.collapsedTag(tag, k, ft); + if (ct != null) { + ps.printf("%s%s\n", indent, ct); + } else { + ps.printf("%s%s {\n", indent, k); + this.saveTag(ps, (TreeMap)ob, ft, indent + " "); + ps.printf("%s}\n\n", indent); + } + } + } + + } + + public void saveFile(File file) { + try { + FileOutputStream os = new FileOutputStream(file); + PrintStream ps = new PrintStream(os); + this.writeComment(ps, "", this.filecomment); + this.saveTag(ps, this.contents, null, ""); + ps.close(); + } catch (IOException var4) { + var4.printStackTrace(); + } + + } + + private static void readTag(TreeMap tag, StreamTokenizer tok) throws IOException { + label61: + while(tok.nextToken() != -1 && tok.ttype != 125) { + if (tok.ttype != 10) { + if (tok.ttype != -3) { + throw new IllegalArgumentException("Parse error"); + } + + String key = tok.sval; + TreeMap ltag = tag; + + while(true) { + Object obtag; + switch(tok.nextToken()) { + case 46: + obtag = ltag.get(key); + if (!(obtag instanceof TreeMap)) { + TreeMap ttag = new TreeMap(); + ltag.put(key, ttag); + ltag = ttag; + } else { + ltag = (TreeMap)obtag; + } + + tok.nextToken(); + if (tok.ttype != -3) { + throw new IllegalArgumentException("Parse error"); + } + + key = tok.sval; + break; + case 61: + tok.nextToken(); + if (tok.ttype == -2) { + ltag.put(key, (int)tok.nval); + } else { + if (tok.ttype != 34) { + throw new IllegalArgumentException("Parse error"); + } + + ltag.put(key, tok.sval); + } + + tok.nextToken(); + if (tok.ttype == 10) { + continue label61; + } + + throw new IllegalArgumentException("Parse error"); + case 123: + obtag = ltag.get(key); + if (!(obtag instanceof TreeMap)) { + TreeMap ttag = new TreeMap(); + ltag.put(key, ttag); + ltag = ttag; + } else { + ltag = (TreeMap)obtag; + } + + readTag(ltag, tok); + tok.nextToken(); + if (tok.ttype == 10) { + continue label61; + } + + throw new IllegalArgumentException("Parse error"); + default: + throw new IllegalArgumentException("Parse error"); + } + } + } + } + + } + + public static TagFile loadFile(File file) { + TagFile tagFile = new TagFile(); + + try { + FileInputStream stream = new FileInputStream(file); + tagFile.readStream(stream); + } catch (IOException var3) { + var3.printStackTrace(); + } + + return tagFile; + } + + public void readFile(File file) { + try { + FileInputStream stream = new FileInputStream(file); + this.readStream(stream); + } catch (IOException var3) { + var3.printStackTrace(); + } + + } + + public void readStream(InputStream stream) { + try { + BufferedReader reader = new BufferedReader(new InputStreamReader(stream)); + StreamTokenizer tokenizer = new StreamTokenizer(reader); + tokenizer.commentChar(35); + tokenizer.eolIsSignificant(true); + tokenizer.lowerCaseMode(false); + tokenizer.parseNumbers(); + tokenizer.quoteChar(34); + tokenizer.ordinaryChar(61); + tokenizer.ordinaryChar(123); + tokenizer.ordinaryChar(125); + tokenizer.ordinaryChar(46); + readTag(this.contents, tokenizer); + stream.close(); + } catch (IOException var4) { + var4.printStackTrace(); + } + + } + + TagFile.Query query(String pattern) { + return new TagFile.Query(pattern); + } + + public class Query implements Iterable { + String[] pattern; + + private Query(String pat) { + this.pattern = pat.split("\\."); + } + + public Iterator iterator() { + return new TagFile.Query.QueryIterator(); + } + + public class QueryIterator implements Iterator { + ArrayList path = new ArrayList(); + String lastentry; + + private QueryIterator() { + if (!this.step0(0, TagFile.this.contents, "")) { + this.step(); + } + + } + + private void step() { + while(this.path != null) { + if (this.step1()) { + return; + } + } + + } + + private boolean step1() { + TagFile.QueryEntry qe = (TagFile.QueryEntry)this.path.get(this.path.size() - 1); + if (!qe.iter.hasNext()) { + this.path.remove(this.path.size() - 1); + if (this.path.size() == 0) { + this.path = null; + } + + return false; + } else { + String str = (String)qe.iter.next(); + String sp = qe.path.equals("") ? str : qe.path + "." + str; + if (qe.lvl == Query.this.pattern.length - 1) { + this.lastentry = sp; + return true; + } else { + Object ob = qe.tag.get(str); + return ob instanceof TreeMap && this.step0(qe.lvl + 1, (TreeMap)ob, sp); + } + } + } + + private boolean step0(int lvl0, TreeMap p, String sp) { + for(int lvl = lvl0; lvl < Query.this.pattern.length; ++lvl) { + if (Query.this.pattern[lvl].equals("%")) { + TagFile.QueryEntry var6 = new TagFile.QueryEntry(); + var6.path = sp; + var6.tag = p; + var6.lvl = lvl; + var6.iter = p.keySet().iterator(); + this.path.add(var6); + return false; + } + + Object ob = p.get(Query.this.pattern[lvl]); + if (sp.equals("")) { + sp = Query.this.pattern[lvl]; + } else { + sp = sp + "." + Query.this.pattern[lvl]; + } + + if (!(ob instanceof TreeMap)) { + if (lvl == Query.this.pattern.length - 1) { + this.lastentry = sp; + return true; + } + break; + } + + p = (TreeMap)ob; + } + + this.path.remove(this.path.size() - 1); + if (this.path.size() == 0) { + this.path = null; + } + + return false; + } + + public boolean hasNext() { + return this.path != null; + } + + public String next() { + String tr = this.lastentry; + this.step(); + return tr; + } + + public void remove() { + } + } + } + + private static class QueryEntry { + public TreeMap tag; + public Iterator iter; + public String path; + int lvl; + + private QueryEntry() { + } + } +} diff --git a/src/main/java/com/eloraam/redpower/core/TexVertex.java b/src/main/java/com/eloraam/redpower/core/TexVertex.java new file mode 100644 index 0000000..a08f670 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/TexVertex.java @@ -0,0 +1,46 @@ +package com.eloraam.redpower.core; + +public class TexVertex { + public int vtx; + public double u; + public double v; + public float r; + public float g; + public float b; + public int brtex; + + public TexVertex() { + } + + public TexVertex(int vti, int tn, double ui, double vi) { + this.vtx = vti; + this.u = (double)(tn & 15) * 0.0625 + ui * 0.0625; + this.v = (double)(tn >> 4) * 0.0625 + vi * 0.0625; + this.r = 1.0F; + this.g = 1.0F; + this.b = 1.0F; + } + + public TexVertex(int vti, double ui, double vi) { + this.vtx = vti; + this.u = ui; + this.v = vi; + this.r = 1.0F; + this.g = 1.0F; + this.b = 1.0F; + } + + public void setUV(double ui, double vi) { + this.u = ui; + this.v = vi; + } + + public TexVertex copy() { + TexVertex tr = new TexVertex(this.vtx, this.u, this.v); + tr.r = this.r; + tr.g = this.g; + tr.b = this.b; + tr.brtex = this.brtex; + return tr; + } +} diff --git a/src/main/java/com/eloraam/redpower/core/TileCoverable.java b/src/main/java/com/eloraam/redpower/core/TileCoverable.java new file mode 100644 index 0000000..a290cbc --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/TileCoverable.java @@ -0,0 +1,241 @@ +package com.eloraam.redpower.core; + +import java.util.ArrayList; +import java.util.List; +import net.minecraft.block.Block; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.MovingObjectPosition; +import net.minecraftforge.common.ForgeHooks; + +public abstract class TileCoverable extends TileMultipart implements ICoverable, IMultipart { + @Override + public abstract boolean canAddCover(int var1, int var2); + + @Override + public abstract boolean tryAddCover(int var1, int var2); + + @Override + public abstract int tryRemoveCover(int var1); + + @Override + public abstract int getCover(int var1); + + @Override + public abstract int getCoverMask(); + + @Override + public boolean isSideSolid(int side) { + int cm = this.getCoverMask(); + return (cm & 1 << side) > 0; + } + + @Override + public boolean isSideNormal(int side) { + int cm = this.getCoverMask(); + if ((cm & 1 << side) == 0) { + return false; + } else { + int c = this.getCover(side); + int n = c >> 8; + return !CoverLib.isTransparent(c & 0xFF) && (n < 3 || n >= 6 && n <= 9); + } + } + + public void addCoverableHarvestContents(List drops) { + if (CoverLib.blockCoverPlate != null) { + for(int i = 0; i < 29; ++i) { + int j = this.getCover(i); + if (j >= 0) { + drops.add(CoverLib.convertCoverPlate(i, j)); + } + } + } + + } + + @Override + public void addHarvestContents(List ist) { + this.addCoverableHarvestContents(ist); + } + + @Override + public void onHarvestPart(EntityPlayer player, int part, boolean willHarvest) { + int i = this.tryRemoveCover(part); + if (i >= 0) { + if (willHarvest) { + this.dropCover(part, i); + } + + if (this.blockEmpty()) { + this.deleteBlock(); + } + } + + this.updateBlock(); + } + + @Override + public float getPartStrength(EntityPlayer player, int part) { + int i = this.getCover(part); + if (i < 0) { + return 0.0F; + } else { + i &= 255; + float hv = CoverLib.getMiningHardness(i); + if (hv < 0.0F) { + return 0.0F; + } else { + ItemStack ist = CoverLib.getItemStack(i); + Block bl = Block.getBlockFromItem(ist.getItem()); + int md = ist.getItemDamage(); + return !ForgeHooks.canHarvestBlock(bl, player, md) ? 1.0F / hv / 100.0F : player.getBreakSpeed(bl, false, md) / hv / 30.0F; + } + } + } + + @Override + public void setPartBounds(BlockMultipart block, int part) { + int i = this.getCover(part); + float th = CoverLib.getThickness(part, i); + switch(part) { + case 0: + block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, th, 1.0F); + break; + case 1: + block.setBlockBounds(0.0F, 1.0F - th, 0.0F, 1.0F, 1.0F, 1.0F); + break; + case 2: + block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, th); + break; + case 3: + block.setBlockBounds(0.0F, 0.0F, 1.0F - th, 1.0F, 1.0F, 1.0F); + break; + case 4: + block.setBlockBounds(0.0F, 0.0F, 0.0F, th, 1.0F, 1.0F); + break; + case 5: + block.setBlockBounds(1.0F - th, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + break; + case 6: + block.setBlockBounds(0.0F, 0.0F, 0.0F, th, th, th); + break; + case 7: + block.setBlockBounds(0.0F, 0.0F, 1.0F - th, th, th, 1.0F); + break; + case 8: + block.setBlockBounds(1.0F - th, 0.0F, 0.0F, 1.0F, th, th); + break; + case 9: + block.setBlockBounds(1.0F - th, 0.0F, 1.0F - th, 1.0F, th, 1.0F); + break; + case 10: + block.setBlockBounds(0.0F, 1.0F - th, 0.0F, th, 1.0F, th); + break; + case 11: + block.setBlockBounds(0.0F, 1.0F - th, 1.0F - th, th, 1.0F, 1.0F); + break; + case 12: + block.setBlockBounds(1.0F - th, 1.0F - th, 0.0F, 1.0F, 1.0F, th); + break; + case 13: + block.setBlockBounds(1.0F - th, 1.0F - th, 1.0F - th, 1.0F, 1.0F, 1.0F); + break; + case 14: + block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, th, th); + break; + case 15: + block.setBlockBounds(0.0F, 0.0F, 1.0F - th, 1.0F, th, 1.0F); + break; + case 16: + block.setBlockBounds(0.0F, 0.0F, 0.0F, th, th, 1.0F); + break; + case 17: + block.setBlockBounds(1.0F - th, 0.0F, 0.0F, 1.0F, th, 1.0F); + break; + case 18: + block.setBlockBounds(0.0F, 0.0F, 0.0F, th, 1.0F, th); + break; + case 19: + block.setBlockBounds(0.0F, 0.0F, 1.0F - th, th, 1.0F, 1.0F); + break; + case 20: + block.setBlockBounds(1.0F - th, 0.0F, 0.0F, 1.0F, 1.0F, th); + break; + case 21: + block.setBlockBounds(1.0F - th, 0.0F, 1.0F - th, 1.0F, 1.0F, 1.0F); + break; + case 22: + block.setBlockBounds(0.0F, 1.0F - th, 0.0F, 1.0F, 1.0F, th); + break; + case 23: + block.setBlockBounds(0.0F, 1.0F - th, 1.0F - th, 1.0F, 1.0F, 1.0F); + break; + case 24: + block.setBlockBounds(0.0F, 1.0F - th, 0.0F, th, 1.0F, 1.0F); + break; + case 25: + block.setBlockBounds(1.0F - th, 1.0F - th, 0.0F, 1.0F, 1.0F, 1.0F); + break; + case 26: + block.setBlockBounds(0.5F - th, 0.0F, 0.5F - th, 0.5F + th, 1.0F, 0.5F + th); + break; + case 27: + block.setBlockBounds(0.5F - th, 0.5F - th, 0.0F, 0.5F + th, 0.5F + th, 1.0F); + break; + case 28: + block.setBlockBounds(0.0F, 0.5F - th, 0.5F - th, 1.0F, 0.5F + th, 0.5F + th); + } + + } + + @Override + public int getSolidPartsMask() { + return this.getCoverMask(); + } + + @Override + public int getPartsMask() { + return this.getCoverMask(); + } + + public void dropCover(int side, int cov) { + ItemStack ist = CoverLib.convertCoverPlate(side, cov); + if (ist != null) { + CoreLib.dropItem(super.worldObj, super.xCoord, super.yCoord, super.zCoord, ist); + } + + } + + public ItemStack getCover(int part, int side) { + int i = this.getCover(part); + if (i >= 0) { + return CoverLib.convertCoverPlate(side, i); + } else { + List ist = new ArrayList(); + this.addHarvestContents(ist); + return ist.size() >= 1 ? (ItemStack)ist.get(0) : null; + } + } + + public ItemStack getPickBlock(MovingObjectPosition target, EntityPlayer player) { + int i = this.getCover(target.subHit); + return i > 0 ? CoverLib.convertCoverPlate(target.sideHit, i) : this.getBasePickStack(); + } + + protected ItemStack getBasePickStack() { + return null; + } + + public float getExplosionResistance(int part, int side, Entity exploder) { + int i = this.getCover(part); + if (i < 0) { + return -1.0F; + } else { + i &= 255; + ItemStack ist = CoverLib.getItemStack(i); + return Block.getBlockFromItem(ist.getItem()).getExplosionResistance(exploder); + } + } +} diff --git a/src/main/java/com/eloraam/redpower/core/TileCovered.java b/src/main/java/com/eloraam/redpower/core/TileCovered.java new file mode 100644 index 0000000..35cb164 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/TileCovered.java @@ -0,0 +1,214 @@ +package com.eloraam.redpower.core; + +import com.mojang.authlib.GameProfile; +import java.util.Arrays; +import net.minecraft.block.Block; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.IBlockAccess; + +public class TileCovered extends TileCoverable implements IFrameSupport { + public int CoverSides = 0; + public short[] Covers = new short[29]; + + public void replaceWithCovers() { + GameProfile owner = super.Owner; + CoverLib.replaceWithCovers(super.worldObj, super.xCoord, super.yCoord, super.zCoord, this.CoverSides, this.Covers); + TileExtended te = CoreLib.getTileEntity(super.worldObj, super.xCoord, super.yCoord, super.zCoord, TileExtended.class); + if (te != null) { + te.Owner = owner; + } + + } + + public boolean canUpdate() { + return true; + } + + @Override + public int getExtendedID() { + return 0; + } + + @Override + public void onBlockNeighborChange(Block block) { + if (this.CoverSides == 0) { + this.deleteBlock(); + } + + this.markDirty(); + } + + public Block getBlockType() { + return CoverLib.blockCoverPlate; + } + + @Override + public boolean canAddCover(int side, int cover) { + if ((this.CoverSides & 1 << side) > 0) { + return false; + } else { + short[] test = Arrays.copyOf(this.Covers, 29); + test[side] = (short)cover; + return CoverLib.checkPlacement(this.CoverSides | 1 << side, test, 0, false); + } + } + + @Override + public boolean tryAddCover(int side, int cover) { + if (!this.canAddCover(side, cover)) { + return false; + } else { + this.CoverSides |= 1 << side; + this.Covers[side] = (short)cover; + this.updateBlockChange(); + return true; + } + } + + @Override + public int tryRemoveCover(int side) { + if ((this.CoverSides & 1 << side) == 0) { + return -1; + } else { + this.CoverSides &= ~(1 << side); + short tr = this.Covers[side]; + this.Covers[side] = 0; + this.updateBlockChange(); + return tr; + } + } + + @Override + public int getCover(int side) { + return (this.CoverSides & 1 << side) == 0 ? -1 : this.Covers[side]; + } + + @Override + public int getCoverMask() { + return this.CoverSides; + } + + @Override + public boolean blockEmpty() { + return this.CoverSides == 0; + } + + @Override + public void onFrameRefresh(IBlockAccess iba) { + } + + @Override + public void onFramePickup(IBlockAccess iba) { + } + + @Override + public void onFrameDrop() { + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + int mask = data.getInteger("cvm") & 536870911; + this.CoverSides |= mask; + byte[] cov = data.getByteArray("cvs"); + if (cov != null && mask > 0) { + int sp = 0; + + for(int i = 0; i < 29; ++i) { + if ((mask & 1 << i) != 0) { + this.Covers[i] = (short)((cov[sp] & 255) + ((cov[sp + 1] & 255) << 8)); + sp += 2; + } + } + } + + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + data.setInteger("cvm", this.CoverSides); + byte[] cov = new byte[Integer.bitCount(this.CoverSides) * 2]; + int dp = 0; + + for(int i = 0; i < 29; ++i) { + if ((this.CoverSides & 1 << i) != 0) { + cov[dp] = (byte)(this.Covers[i] & 255); + cov[dp + 1] = (byte)(this.Covers[i] >> 8); + dp += 2; + } + } + + data.setByteArray("cvs", cov); + } + + @Override + public void writeFramePacket(NBTTagCompound tag) { + tag.setInteger("cvm", this.CoverSides); + byte[] cov = new byte[Integer.bitCount(this.CoverSides) * 2]; + int dp = 0; + + for(int i = 0; i < 29; ++i) { + if ((this.CoverSides & 1 << i) != 0) { + cov[dp] = (byte)(this.Covers[i] & 255); + cov[dp + 1] = (byte)(this.Covers[i] >> 8); + dp += 2; + } + } + + tag.setByteArray("cvs", cov); + } + + @Override + public void readFramePacket(NBTTagCompound tag) { + int mask = tag.getInteger("cvm"); + this.CoverSides |= mask; + byte[] cov = tag.getByteArray("cvs"); + if (cov != null && mask > 0) { + int sp = 0; + + for(int i = 0; i < 29; ++i) { + if ((mask & 1 << i) != 0) { + this.Covers[i] = (short)((cov[sp] & 255) + ((cov[sp + 1] & 255) << 8)); + sp += 2; + } + } + } + + } + + @Override + protected void readFromPacket(NBTTagCompound data) { + int mask = data.getInteger("cvm") & 536870911; + this.CoverSides = mask; + byte[] cov = data.getByteArray("cvs"); + if (cov != null && mask > 0) { + int sp = 0; + + for(int i = 0; i < 29; ++i) { + if ((mask & 1 << i) > 0) { + this.Covers[i] = (short)((cov[sp] & 255) + ((cov[sp + 1] & 255) << 8)); + sp += 2; + } + } + } + + } + + @Override + protected void writeToPacket(NBTTagCompound data) { + data.setInteger("cvm", this.CoverSides); + byte[] cov = new byte[Integer.bitCount(this.CoverSides) * 2]; + int dp = 0; + + for(int i = 0; i < 29; ++i) { + if ((this.CoverSides & 1 << i) > 0) { + cov[dp] = (byte)(this.Covers[i] & 255); + cov[dp + 1] = (byte)(this.Covers[i] >> 8); + dp += 2; + } + } + + data.setByteArray("cvs", cov); + } +} diff --git a/src/main/java/com/eloraam/redpower/core/TileExtended.java b/src/main/java/com/eloraam/redpower/core/TileExtended.java new file mode 100644 index 0000000..d6eae2e --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/TileExtended.java @@ -0,0 +1,177 @@ +package com.eloraam.redpower.core; + +import com.mojang.authlib.GameProfile; +import java.util.ArrayList; +import java.util.List; +import net.minecraft.block.Block; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTUtil; +import net.minecraft.network.NetworkManager; +import net.minecraft.network.Packet; +import net.minecraft.network.play.server.S35PacketUpdateTileEntity; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.AxisAlignedBB; + +public abstract class TileExtended extends TileEntity { + protected long timeSched = -1L; + public GameProfile Owner = CoreLib.REDPOWER_PROFILE; + + public void onBlockNeighborChange(Block block) { + } + + public void onBlockPlaced(ItemStack ist, int side, EntityLivingBase ent) { + this.updateBlock(); + } + + public void onBlockRemoval() { + } + + public boolean isBlockStrongPoweringTo(int side) { + return false; + } + + public boolean isBlockWeakPoweringTo(int side) { + return this.isBlockStrongPoweringTo(side); + } + + public boolean onBlockActivated(EntityPlayer player) { + return false; + } + + public void onEntityCollidedWithBlock(Entity ent) { + } + + public AxisAlignedBB getCollisionBoundingBox() { + return null; + } + + public void onTileTick() { + } + + public int getExtendedID() { + return 0; + } + + public int getExtendedMetadata() { + return 0; + } + + public void setExtendedMetadata(int md) { + } + + public void addHarvestContents(List ist) { + ist.add(new ItemStack(this.getBlockType(), 1, this.getExtendedID())); + } + + public void scheduleTick(int time) { + long tn = super.worldObj.getWorldTime() + (long)time; + if (this.timeSched <= 0L || this.timeSched >= tn) { + this.timeSched = tn; + this.updateBlock(); + } + + } + + public boolean isTickRunnable() { + return this.timeSched >= 0L && this.timeSched <= super.worldObj.getWorldTime(); + } + + public boolean isTickScheduled() { + return this.timeSched >= 0L; + } + + public void updateBlockChange() { + RedPowerLib.updateIndirectNeighbors(super.worldObj, super.xCoord, super.yCoord, super.zCoord, this.getBlockType()); + this.updateBlock(); + } + + public void updateBlock() { + this.markDirty(); + this.markForUpdate(); + } + + public void markForUpdate() { + super.worldObj.markBlockForUpdate(super.xCoord, super.yCoord, super.zCoord); + } + + public void breakBlock() { + this.breakBlock(true); + } + + public void breakBlock(boolean shouldDrop) { + if (shouldDrop) { + List il = new ArrayList(); + this.addHarvestContents(il); + + for(ItemStack it : il) { + CoreLib.dropItem(super.worldObj, super.xCoord, super.yCoord, super.zCoord, it); + } + } + + super.worldObj.setBlockToAir(super.xCoord, super.yCoord, super.zCoord); + } + + public void updateEntity() { + if (!super.worldObj.isRemote && this.timeSched >= 0L) { + long wtime = super.worldObj.getWorldTime(); + if (this.timeSched > wtime + 1200L) { + this.timeSched = wtime + 1200L; + } else if (this.timeSched <= wtime) { + this.timeSched = -1L; + this.onTileTick(); + this.markDirty(); + } + } + + } + + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + this.timeSched = data.getLong("sched"); + if (data.hasKey("Owner")) { + this.Owner = NBTUtil.func_152459_a(data.getCompoundTag("Owner")); + } else { + this.Owner = CoreLib.REDPOWER_PROFILE; + } + + } + + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + data.setLong("sched", this.timeSched); + NBTTagCompound owner = new NBTTagCompound(); + NBTUtil.func_152460_a(owner, this.Owner); + data.setTag("Owner", owner); + } + + public Packet getDescriptionPacket() { + NBTTagCompound syncData = new NBTTagCompound(); + this.writeToPacket(syncData); + return new S35PacketUpdateTileEntity(super.xCoord, super.yCoord, super.zCoord, 1, syncData); + } + + public AxisAlignedBB getRenderBoundingBox() { + return AxisAlignedBB.getBoundingBox( + (double)super.xCoord, (double)super.yCoord, (double)super.zCoord, (double)super.xCoord + 1.0, (double)super.yCoord + 1.0, (double)super.zCoord + 1.0 + ); + } + + public void onDataPacket(NetworkManager netManager, S35PacketUpdateTileEntity packet) { + this.readFromPacket(packet.func_148857_g()); + this.updateBlock(); + } + + protected void writeToPacket(NBTTagCompound tag) { + } + + protected void readFromPacket(NBTTagCompound tag) { + } + + public double getMaxRenderDistanceSquared() { + return 65535.0; + } +} diff --git a/src/main/java/com/eloraam/redpower/core/TileMultiblock.java b/src/main/java/com/eloraam/redpower/core/TileMultiblock.java new file mode 100644 index 0000000..69f6ea0 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/TileMultiblock.java @@ -0,0 +1,68 @@ +package com.eloraam.redpower.core; + +import com.eloraam.redpower.RedPowerBase; +import net.minecraft.block.Block; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.NetworkManager; +import net.minecraft.network.Packet; +import net.minecraft.network.play.server.S35PacketUpdateTileEntity; +import net.minecraft.tileentity.TileEntity; + +public class TileMultiblock extends TileEntity { + public int relayX; + public int relayY; + public int relayZ; + public int relayNum; + + public boolean canUpdate() { + return true; + } + + public Block getBlockType() { + return RedPowerBase.blockMultiblock; + } + + public void markDirty() { + super.markDirty(); + } + + public void readFromNBT(NBTTagCompound tag) { + super.readFromNBT(tag); + this.relayX = tag.getInteger("rlx"); + this.relayY = tag.getInteger("rly"); + this.relayZ = tag.getInteger("rlz"); + this.relayNum = tag.getInteger("rln"); + } + + public void writeToNBT(NBTTagCompound tag) { + super.writeToNBT(tag); + tag.setInteger("rlx", this.relayX); + tag.setInteger("rly", this.relayY); + tag.setInteger("rlz", this.relayZ); + tag.setInteger("rln", this.relayNum); + } + + protected void readFromPacket(NBTTagCompound tag) { + this.relayX = tag.getInteger("rlx"); + this.relayY = tag.getInteger("rly"); + this.relayZ = tag.getInteger("rlz"); + this.relayNum = tag.getInteger("rln"); + } + + protected void writeToPacket(NBTTagCompound tag) { + tag.setInteger("rlx", this.relayX); + tag.setInteger("rly", this.relayY); + tag.setInteger("rlz", this.relayZ); + tag.setInteger("rln", this.relayNum); + } + + public Packet getDescriptionPacket() { + NBTTagCompound syncData = new NBTTagCompound(); + this.writeToPacket(syncData); + return new S35PacketUpdateTileEntity(super.xCoord, super.yCoord, super.zCoord, 1, syncData); + } + + public void onDataPacket(NetworkManager netManager, S35PacketUpdateTileEntity packet) { + this.readFromPacket(packet.func_148857_g()); + } +} diff --git a/src/main/java/com/eloraam/redpower/core/TileMultipart.java b/src/main/java/com/eloraam/redpower/core/TileMultipart.java new file mode 100644 index 0000000..5546696 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/TileMultipart.java @@ -0,0 +1,49 @@ +package com.eloraam.redpower.core; + +import java.util.ArrayList; +import java.util.List; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; + +public abstract class TileMultipart extends TileExtended implements IMultipart { + @Override + public boolean isSideSolid(int side) { + return false; + } + + @Override + public boolean isSideNormal(int side) { + return false; + } + + @Override + public List harvestMultipart() { + List ist = new ArrayList(); + this.addHarvestContents(ist); + this.deleteBlock(); + return ist; + } + + public void onHarvestPart(EntityPlayer player, int part, boolean willHarvest) { + } + + public boolean onPartActivateSide(EntityPlayer player, int part, int side) { + return false; + } + + public float getPartStrength(EntityPlayer player, int part) { + return 0.0F; + } + + public abstract boolean blockEmpty(); + + public abstract void setPartBounds(BlockMultipart var1, int var2); + + public abstract int getSolidPartsMask(); + + public abstract int getPartsMask(); + + public void deleteBlock() { + super.worldObj.setBlockToAir(super.xCoord, super.yCoord, super.zCoord); + } +} diff --git a/src/main/java/com/eloraam/redpower/core/TubeBuffer.java b/src/main/java/com/eloraam/redpower/core/TubeBuffer.java new file mode 100644 index 0000000..539e9b9 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/TubeBuffer.java @@ -0,0 +1,119 @@ +package com.eloraam.redpower.core; + +import java.util.Collection; +import java.util.LinkedList; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.tileentity.TileEntity; + +public class TubeBuffer { + LinkedList buffer = null; + public boolean plugged = false; + + public boolean isEmpty() { + return this.buffer == null || this.buffer.size() == 0; + } + + public TubeItem getLast() { + return this.buffer == null ? null : (TubeItem)this.buffer.getLast(); + } + + public void add(TubeItem ti) { + if (this.buffer == null) { + this.buffer = new LinkedList(); + } + + this.buffer.addFirst(ti); + } + + public void addNew(ItemStack ist) { + if (this.buffer == null) { + this.buffer = new LinkedList(); + } + + this.buffer.addFirst(new TubeItem(0, ist)); + } + + public void addNewColor(ItemStack ist, int col) { + if (this.buffer == null) { + this.buffer = new LinkedList(); + } + + TubeItem ti = new TubeItem(0, ist); + ti.color = (byte)col; + this.buffer.addFirst(ti); + } + + public void addAll(Collection col) { + if (this.buffer == null) { + this.buffer = new LinkedList(); + } + + for(ItemStack ist : col) { + this.buffer.add(new TubeItem(0, ist)); + } + + } + + public void addBounce(TubeItem ti) { + if (this.buffer == null) { + this.buffer = new LinkedList(); + } + + this.buffer.addLast(ti); + this.plugged = true; + } + + public void pop() { + this.buffer.removeLast(); + if (this.buffer.size() == 0) { + this.plugged = false; + } + + } + + public int size() { + return this.buffer == null ? 0 : this.buffer.size(); + } + + public void onRemove(TileEntity te) { + if (this.buffer != null) { + for(TubeItem ti : this.buffer) { + if (ti != null && ti.item.stackSize > 0) { + CoreLib.dropItem(te.getWorldObj(), te.xCoord, te.yCoord, te.zCoord, ti.item); + } + } + } + + } + + public void readFromNBT(NBTTagCompound data) { + NBTTagList items = data.getTagList("Buffer", 10); + if (items.tagCount() > 0) { + this.buffer = new LinkedList(); + + for(int b = 0; b < items.tagCount(); ++b) { + NBTTagCompound item = items.getCompoundTagAt(b); + this.buffer.add(TubeItem.newFromNBT(item)); + } + } + + byte var5 = data.getByte("Plug"); + this.plugged = var5 > 0; + } + + public void writeToNBT(NBTTagCompound data) { + NBTTagList items = new NBTTagList(); + if (this.buffer != null) { + for(TubeItem ti : this.buffer) { + NBTTagCompound item = new NBTTagCompound(); + ti.writeToNBT(item); + items.appendTag(item); + } + } + + data.setTag("Buffer", items); + data.setByte("Plug", (byte)(this.plugged ? 1 : 0)); + } +} diff --git a/src/main/java/com/eloraam/redpower/core/TubeFlow.java b/src/main/java/com/eloraam/redpower/core/TubeFlow.java new file mode 100644 index 0000000..1a9b4c4 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/TubeFlow.java @@ -0,0 +1,142 @@ +package com.eloraam.redpower.core; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.List; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +public abstract class TubeFlow { + public LinkedList contents = new LinkedList(); + + public abstract boolean schedule(TubeItem var1, TubeFlow.TubeScheduleContext var2); + + public boolean handleItem(TubeItem item, TubeFlow.TubeScheduleContext context) { + return false; + } + + public abstract TileEntity getParent(); + + public boolean update() { + boolean hasChanged = false; + if (this.contents.size() == 0) { + return false; + } else { + TubeFlow.TubeScheduleContext tsc = new TubeFlow.TubeScheduleContext(this.getParent()); + tsc.tii = this.contents.iterator(); + + while(tsc.tii.hasNext()) { + TubeItem tubeItem = (TubeItem)tsc.tii.next(); + tubeItem.progress = (short)(tubeItem.progress + tubeItem.power + 16); + if (tubeItem.progress >= 128) { + if (tubeItem.power > 0) { + --tubeItem.power; + } + + hasChanged = true; + if (!tubeItem.scheduled) { + if (!this.schedule(tubeItem, tsc)) { + tsc.tii.remove(); + } + } else { + tsc.tii.remove(); + if (!tsc.world.isRemote) { + tsc.tir.add(tubeItem); + } + } + } + } + + if (tsc.world.isRemote) { + } + + for(TubeItem ti : tsc.tir) { + if (ti.side >= 0 && (tsc.cons & 1 << ti.side) != 0) { + tsc.dest = tsc.wc.copy(); + tsc.dest.step(ti.side); + ITubeConnectable itc = CoreLib.getTileEntity(tsc.world, tsc.dest, ITubeConnectable.class); + if (itc instanceof ITubeFlow) { + ITubeFlow itf = (ITubeFlow)itc; + itf.addTubeItem(ti); + } else if ((itc == null || !itc.tubeItemEnter((ti.side ^ 1) & 63, ti.mode, ti)) && !this.handleItem(ti, tsc)) { + ti.progress = 0; + ti.scheduled = false; + ti.mode = 2; + this.contents.add(ti); + } + } else if (tsc.cons == 0) { + MachineLib.ejectItem(tsc.world, tsc.wc, ti.item, 1); + } else { + ti.side = (byte)Integer.numberOfTrailingZeros(tsc.cons); + ti.progress = 128; + ti.scheduled = false; + this.contents.add(ti); + hasChanged = true; + } + } + + return hasChanged; + } + } + + public void add(TubeItem ti) { + ti.progress = 0; + ti.scheduled = false; + this.contents.add(ti); + } + + public void onRemove() { + TileEntity te = this.getParent(); + + for(TubeItem ti : this.contents) { + if (ti != null && ti.item.stackSize > 0) { + CoreLib.dropItem(te.getWorldObj(), te.xCoord, te.yCoord, te.zCoord, ti.item); + } + } + + } + + public void readFromNBT(NBTTagCompound tag) { + NBTTagList items = tag.getTagList("Items", 10); + if (items.tagCount() > 0) { + this.contents = new LinkedList(); + + for(int i = 0; i < items.tagCount(); ++i) { + NBTTagCompound item = items.getCompoundTagAt(i); + this.contents.add(TubeItem.newFromNBT(item)); + } + } + + } + + public void writeToNBT(NBTTagCompound tag) { + NBTTagList items = new NBTTagList(); + if (this.contents != null) { + for(TubeItem ti : this.contents) { + NBTTagCompound item = new NBTTagCompound(); + ti.writeToNBT(item); + items.appendTag(item); + } + } + + tag.setTag("Items", items); + } + + public static class TubeScheduleContext { + public World world; + public WorldCoord wc; + public int cons; + public List tir = new ArrayList(); + public Iterator tii; + public WorldCoord dest = null; + + public TubeScheduleContext(TileEntity te) { + this.world = te.getWorldObj(); + this.wc = new WorldCoord(te); + this.cons = TubeLib.getConnections(this.world, this.wc.x, this.wc.y, this.wc.z); + } + } +} diff --git a/src/main/java/com/eloraam/redpower/core/TubeItem.java b/src/main/java/com/eloraam/redpower/core/TubeItem.java new file mode 100644 index 0000000..f28c861 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/TubeItem.java @@ -0,0 +1,83 @@ +package com.eloraam.redpower.core; + +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +public class TubeItem { + public short progress = 0; + public byte mode = 1; + public byte side; + public byte color = 0; + public short power = 0; + public boolean scheduled = false; + public short priority = 0; + public ItemStack item; + + public TubeItem() { + } + + public TubeItem(int s, ItemStack stk) { + this.item = stk; + this.side = (byte)s; + } + + public void readFromNBT(NBTTagCompound nbt) { + this.item = ItemStack.loadItemStackFromNBT(nbt); + this.side = nbt.getByte("side"); + this.progress = nbt.getShort("pos"); + this.mode = nbt.getByte("mode"); + this.color = nbt.getByte("col"); + this.priority = nbt.getShort("prio"); + if (this.progress < 0) { + this.scheduled = true; + this.progress = (short)(-this.progress - 1); + } + + this.power = (short)(nbt.getByte("pow") & 255); + } + + public void writeToNBT(NBTTagCompound nbt) { + this.item.writeToNBT(nbt); + nbt.setByte("side", this.side); + nbt.setShort("pos", (short)(this.scheduled ? -this.progress - 1 : this.progress)); + nbt.setByte("mode", this.mode); + nbt.setByte("col", this.color); + nbt.setByte("pow", (byte)this.power); + nbt.setShort("prio", this.priority); + } + + public static TubeItem newFromNBT(NBTTagCompound nbt) { + TubeItem ti = new TubeItem(); + ti.readFromNBT(nbt); + return ti; + } + + public void readFromPacket(NBTTagCompound tag) { + this.side = tag.getByte("side"); + this.progress = (short)tag.getByte("pos"); + if (this.progress < 0) { + this.scheduled = true; + this.progress = (short)(-this.progress - 1); + } + + this.color = tag.getByte("col"); + this.power = (short)tag.getByte("pow"); + this.item = ItemStack.loadItemStackFromNBT((NBTTagCompound)tag.getTag("itm")); + } + + public void writeToPacket(NBTTagCompound tag) { + tag.setByte("side", this.side); + tag.setByte("pos", (byte)((int)(this.scheduled ? (long)(-this.progress - 1) : (long)this.progress))); + tag.setByte("col", this.color); + tag.setByte("pow", (byte)this.power); + NBTTagCompound itag = new NBTTagCompound(); + this.item.writeToNBT(itag); + tag.setTag("itm", itag); + } + + public static TubeItem newFromPacket(NBTTagCompound tag) { + TubeItem ti = new TubeItem(); + ti.readFromPacket(tag); + return ti; + } +} diff --git a/src/main/java/com/eloraam/redpower/core/TubeLib.java b/src/main/java/com/eloraam/redpower/core/TubeLib.java new file mode 100644 index 0000000..a7c7869 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/TubeLib.java @@ -0,0 +1,329 @@ +package com.eloraam.redpower.core; + +import java.util.Arrays; +import java.util.HashSet; +import java.util.List; +import java.util.PriorityQueue; +import java.util.Set; +import java.util.stream.IntStream; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +public class TubeLib { + private static Set> tubeClassMapping = new HashSet(); + + public static void addCompatibleMapping(int a, int b) { + tubeClassMapping.add(Arrays.asList(a, b)); + tubeClassMapping.add(Arrays.asList(b, a)); + } + + public static boolean isCompatible(int a, int b) { + return a == b || tubeClassMapping.contains(Arrays.asList(a, b)); + } + + private static boolean isConSide(IBlockAccess iba, int x, int y, int z, int col, int side) { + TileEntity te = iba.getTileEntity(x, y, z); + if (te instanceof ITubeConnectable) { + ITubeConnectable itc = (ITubeConnectable)te; + if (!isCompatible(col, itc.getTubeConClass())) { + return false; + } else { + int sides = itc.getTubeConnectableSides(); + return (sides & 1 << side) > 0; + } + } else { + if (isCompatible(col, 0) && te instanceof IInventory) { + if (!(te instanceof ISidedInventory)) { + return true; + } + + ISidedInventory isi = (ISidedInventory)te; + if (isi.getSizeInventory() > 0) { + int[] slots = isi.getAccessibleSlotsFromSide(side); + return slots != null && slots.length > 0; + } + } + + return false; + } + } + + public static int getConnections(IBlockAccess iba, int x, int y, int z) { + ITubeConnectable itc = CoreLib.getTileEntity(iba, x, y, z, ITubeConnectable.class); + if (itc == null) { + return 0; + } else { + int trs = 0; + int col = itc.getTubeConClass(); + int sides = itc.getTubeConnectableSides(); + if ((sides & 1) > 0 && isConSide(iba, x, y - 1, z, col, 1)) { + trs |= 1; + } + + if ((sides & 2) > 0 && isConSide(iba, x, y + 1, z, col, 0)) { + trs |= 2; + } + + if ((sides & 4) > 0 && isConSide(iba, x, y, z - 1, col, 3)) { + trs |= 4; + } + + if ((sides & 8) > 0 && isConSide(iba, x, y, z + 1, col, 2)) { + trs |= 8; + } + + if ((sides & 16) > 0 && isConSide(iba, x - 1, y, z, col, 5)) { + trs |= 16; + } + + if ((sides & 32) > 0 && isConSide(iba, x + 1, y, z, col, 4)) { + trs |= 32; + } + + return trs; + } + } + + public static int findRoute(World world, WorldCoord wc, TubeItem te, int sides, int state) { + TubeLib.OutRouteFinder rf = new TubeLib.OutRouteFinder(world, te, state); + return rf.find(wc, sides); + } + + public static int findRoute(World world, WorldCoord wc, TubeItem te, int sides, int state, int start) { + TubeLib.OutRouteFinder rf = new TubeLib.OutRouteFinder(world, te, state); + rf.startDir = start; + return rf.find(wc, sides); + } + + public static boolean addToTubeRoute(World world, ItemStack ist, WorldCoord src, WorldCoord wc, int side) { + return addToTubeRoute(world, new TubeItem(0, ist), src, wc, side); + } + + public static boolean addToTubeRoute(World world, TubeItem ti, WorldCoord src, WorldCoord wc, int side) { + ITubeConnectable ite = CoreLib.getTileEntity(world, wc, ITubeConnectable.class); + if (ite == null) { + return false; + } else { + ti.mode = 1; + int s = findRoute(world, src, ti, 1 << (side ^ 1), 1); + return s >= 0 && ite.tubeItemEnter(side, 0, ti); + } + } + + static { + addCompatibleMapping(0, 17); + addCompatibleMapping(17, 18); + + for(int i = 0; i < 16; ++i) { + addCompatibleMapping(0, 1 + i); + addCompatibleMapping(17, 1 + i); + addCompatibleMapping(17, 19 + i); + addCompatibleMapping(18, 19 + i); + } + + } + + public static class InRouteFinder extends TubeLib.RouteFinder { + MachineLib.FilterMap filterMap; + int subFilt = -1; + + public InRouteFinder(World world, MachineLib.FilterMap map) { + super(world); + this.filterMap = map; + } + + @Override + public void addPoint(WorldCoord wc, int st, int side, int weight) { + IInventory inv = MachineLib.getInventory(super.worldObj, wc); + if (inv == null) { + super.addPoint(wc, st, side, weight); + } else { + int opside = (side ^ 1) & 63; + int[] slots; + if (inv instanceof ISidedInventory) { + ISidedInventory sm = (ISidedInventory)inv; + slots = sm.getAccessibleSlotsFromSide(opside); + } else { + slots = IntStream.range(0, inv.getSizeInventory()).toArray(); + } + + if (this.filterMap.size() == 0) { + if (!MachineLib.emptyInventory(inv, slots)) { + TubeLib.WorldRoute sm2 = new TubeLib.WorldRoute(wc, 0, opside, weight); + sm2.solved = true; + super.scanpos.add(sm2); + } else { + super.addPoint(wc, st, side, weight); + } + } else { + int sm1 = -1; + if (this.subFilt < 0) { + sm1 = MachineLib.matchAnyStack(this.filterMap, inv, slots); + } else if (MachineLib.matchOneStack(this.filterMap, inv, slots, this.subFilt)) { + sm1 = this.subFilt; + } + + if (sm1 < 0) { + super.addPoint(wc, st, side, weight); + } else { + TubeLib.WorldRoute nr = new TubeLib.WorldRoute(wc, sm1, opside, weight); + nr.solved = true; + super.scanpos.add(nr); + } + } + } + + } + + public void setSubFilt(int sf) { + this.subFilt = sf; + } + + public int getResultSide() { + return super.result.side; + } + } + + private static class OutRouteFinder extends TubeLib.RouteFinder { + int state; + TubeItem tubeItem; + + public OutRouteFinder(World world, TubeItem ti, int st) { + super(world); + this.state = st; + this.tubeItem = ti; + } + + @Override + public void addPoint(WorldCoord wc, int start, int side, int weight) { + int opside = (side ^ 1) & 0xFF; + if (this.state != 3 && this.tubeItem.priority == 0 && MachineLib.canAddToInventory(super.worldObj, this.tubeItem.item, wc, opside)) { + TubeLib.WorldRoute route = new TubeLib.WorldRoute(wc, start, side, weight); + route.solved = true; + super.scanpos.add(route); + } else { + ITubeConnectable itc = CoreLib.getTileEntity(super.worldObj, wc, ITubeConnectable.class); + if (itc != null) { + if (itc.tubeItemCanEnter(opside, this.state, this.tubeItem)) { + TubeLib.WorldRoute route = new TubeLib.WorldRoute(wc, start, opside, weight + itc.tubeWeight(opside, this.state)); + route.solved = true; + super.scanpos.add(route); + } else if (itc.tubeItemCanEnter(opside, 0, this.tubeItem) && itc.canRouteItems() && !super.scanmap.contains(wc)) { + super.scanmap.add(wc); + super.scanpos.add(new TubeLib.WorldRoute(wc, start, opside, weight + itc.tubeWeight(opside, this.state))); + } + } + } + + } + } + + public static class RequestRouteFinder extends TubeLib.RouteFinder { + TubeItem tubeItem; + + public RequestRouteFinder(World world, TubeItem item) { + super(world); + this.tubeItem = item; + } + + @Override + public void addPoint(WorldCoord wc, int st, int side, int weight) { + ITubeRequest itr = CoreLib.getTileEntity(super.worldObj, wc, ITubeRequest.class); + if (itr != null) { + if (itr.requestTubeItem(this.tubeItem, false)) { + TubeLib.WorldRoute itc1 = new TubeLib.WorldRoute(wc, 0, side, weight); + itc1.solved = true; + super.scanpos.add(itc1); + } + } else { + ITubeConnectable itc = CoreLib.getTileEntity(super.worldObj, wc, ITubeConnectable.class); + if (itc != null) { + int side1 = (side ^ 1) & 0xFF; + if (itc.tubeItemCanEnter(side1, 0, this.tubeItem) && itc.canRouteItems() && !super.scanmap.contains(wc)) { + super.scanmap.add(wc); + super.scanpos.add(new TubeLib.WorldRoute(wc, st, side1, weight + itc.tubeWeight(side1, 0))); + } + } + } + + } + } + + private static class RouteFinder { + int startDir = 0; + TubeLib.WorldRoute result; + World worldObj; + Set scanmap = new HashSet(); + PriorityQueue scanpos = new PriorityQueue(); + + public RouteFinder(World world) { + this.worldObj = world; + } + + public void addPoint(WorldCoord wc, int start, int side, int weight) { + ITubeConnectable itc = CoreLib.getTileEntity(this.worldObj, wc, ITubeConnectable.class); + if (itc != null && itc.canRouteItems() && !this.scanmap.contains(wc)) { + this.scanmap.add(wc); + this.scanpos.add(new TubeLib.WorldRoute(wc, start, side ^ 1, weight)); + } + + } + + public int find(WorldCoord wc, int sides) { + for(int wr = 0; wr < 6; ++wr) { + if ((sides & 1 << wr) != 0) { + WorldCoord cons = wc.copy(); + cons.step(wr); + this.addPoint(cons, wr, wr, wr == this.startDir ? 0 : 1); + } + } + + while(this.scanpos.size() > 0) { + TubeLib.WorldRoute route = (TubeLib.WorldRoute)this.scanpos.poll(); + if (route.solved) { + this.result = route; + return route.start; + } + + int cons = TubeLib.getConnections(this.worldObj, route.wc.x, route.wc.y, route.wc.z); + + for(int side = 0; side < 6; ++side) { + if (side != route.side && (cons & 1 << side) != 0) { + WorldCoord wcp = route.wc.copy(); + wcp.step(side); + this.addPoint(wcp, route.start, side, route.weight + 2); + } + } + } + + return -1; + } + + public WorldCoord getResultPoint() { + return this.result.wc; + } + } + + private static class WorldRoute implements Comparable { + public WorldCoord wc; + public int start; + public int side; + public int weight; + public boolean solved = false; + + public WorldRoute(WorldCoord w, int st, int s, int wt) { + this.wc = w; + this.start = st; + this.side = s; + this.weight = wt; + } + + public int compareTo(TubeLib.WorldRoute wr) { + return this.weight - wr.weight; + } + } +} diff --git a/src/main/java/com/eloraam/redpower/core/Vector3.java b/src/main/java/com/eloraam/redpower/core/Vector3.java new file mode 100644 index 0000000..9d5a501 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/Vector3.java @@ -0,0 +1,106 @@ +package com.eloraam.redpower.core; + +import java.util.Formatter; +import java.util.Locale; + +public class Vector3 { + public double x; + public double y; + public double z; + + public Vector3() { + } + + public Vector3(double xi, double yi, double zi) { + this.x = xi; + this.y = yi; + this.z = zi; + } + + public Vector3(Vector3 v) { + this.x = v.x; + this.y = v.y; + this.z = v.z; + } + + public Object clone() { + return new Vector3(this); + } + + public void set(double xi, double yi, double zi) { + this.x = xi; + this.y = yi; + this.z = zi; + } + + public void set(Vector3 v) { + this.x = v.x; + this.y = v.y; + this.z = v.z; + } + + public double dotProduct(Vector3 v) { + return v.x * this.x + v.y * this.y + v.z * this.z; + } + + public double dotProduct(double xi, double yi, double zi) { + return xi * this.x + yi * this.y + zi * this.z; + } + + public void crossProduct(Vector3 v) { + double tx = this.y * v.z - this.z * v.y; + double ty = this.z * v.x - this.x * v.z; + double tz = this.x * v.y - this.y * v.x; + this.x = tx; + this.y = ty; + this.z = tz; + } + + public void add(double xi, double yi, double zi) { + this.x += xi; + this.y += yi; + this.z += zi; + } + + public void add(Vector3 v) { + this.x += v.x; + this.y += v.y; + this.z += v.z; + } + + public void subtract(Vector3 v) { + this.x -= v.x; + this.y -= v.y; + this.z -= v.z; + } + + public void multiply(double d) { + this.x *= d; + this.y *= d; + this.z *= d; + } + + public double mag() { + return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z); + } + + public double magSquared() { + return this.x * this.x + this.y * this.y + this.z * this.z; + } + + public void normalize() { + double d = this.mag(); + if (d != 0.0) { + this.multiply(1.0 / d); + } + + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + Formatter fmt = new Formatter(sb, Locale.US); + fmt.format("Vector:\n"); + fmt.format(" < %f %f %f >\n", this.x, this.y, this.z); + return sb.toString(); + } +} diff --git a/src/main/java/com/eloraam/redpower/core/WirePathfinder.java b/src/main/java/com/eloraam/redpower/core/WirePathfinder.java new file mode 100644 index 0000000..2db0e90 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/WirePathfinder.java @@ -0,0 +1,80 @@ +package com.eloraam.redpower.core; + +import java.util.HashSet; +import java.util.LinkedList; +import java.util.Set; + +public abstract class WirePathfinder { + Set scanmap; + LinkedList scanpos; + + public void init() { + this.scanmap = new HashSet(); + this.scanpos = new LinkedList(); + } + + public void addSearchBlock(WorldCoord wc) { + if (!this.scanmap.contains(wc)) { + this.scanmap.add(wc); + this.scanpos.addLast(wc); + } + + } + + private void addIndBl(WorldCoord wc, int d1, int d2) { + wc = wc.coordStep(d1); + int d3; + switch(d1) { + case 0: + d3 = d2 + 2; + break; + case 1: + d3 = d2 + 2; + break; + case 2: + d3 = d2 + (d2 & 2); + break; + case 3: + d3 = d2 + (d2 & 2); + break; + case 4: + d3 = d2; + break; + default: + d3 = d2; + } + + wc.step(d3); + this.addSearchBlock(wc); + } + + public void addSearchBlocks(WorldCoord wc, int cons, int indcon) { + for(int side = 0; side < 6; ++side) { + if ((cons & RedPowerLib.getConDirMask(side)) > 0) { + this.addSearchBlock(wc.coordStep(side)); + } + } + + for(int side = 0; side < 6; ++side) { + for(int b = 0; b < 4; ++b) { + if ((indcon & 1 << side * 4 + b) > 0) { + this.addIndBl(wc, side, b); + } + } + } + + } + + public boolean step(WorldCoord coord) { + return false; + } + + public boolean iterate() { + if (this.scanpos.size() == 0) { + return false; + } else { + WorldCoord wc = (WorldCoord)this.scanpos.removeFirst(); + return this.step(wc); + } + } +} diff --git a/src/main/java/com/eloraam/redpower/core/WorldCoord.java b/src/main/java/com/eloraam/redpower/core/WorldCoord.java new file mode 100644 index 0000000..ca4f8c0 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/core/WorldCoord.java @@ -0,0 +1,188 @@ +package com.eloraam.redpower.core; + +import java.util.Comparator; +import net.minecraft.tileentity.TileEntity; + +public class WorldCoord implements Comparable { + public int x; + public int y; + public int z; + + public WorldCoord(int xi, int yi, int zi) { + this.x = xi; + this.y = yi; + this.z = zi; + } + + public WorldCoord(TileEntity te) { + this.x = te.xCoord; + this.y = te.yCoord; + this.z = te.zCoord; + } + + public WorldCoord copy() { + return new WorldCoord(this.x, this.y, this.z); + } + + public WorldCoord coordStep(int dir) { + switch(dir) { + case 0: + return new WorldCoord(this.x, this.y - 1, this.z); + case 1: + return new WorldCoord(this.x, this.y + 1, this.z); + case 2: + return new WorldCoord(this.x, this.y, this.z - 1); + case 3: + return new WorldCoord(this.x, this.y, this.z + 1); + case 4: + return new WorldCoord(this.x - 1, this.y, this.z); + default: + return new WorldCoord(this.x + 1, this.y, this.z); + } + } + + public void set(WorldCoord wc) { + this.x = wc.x; + this.y = wc.y; + this.z = wc.z; + } + + public int squareDist(int xi, int yi, int zi) { + return (xi - this.x) * (xi - this.x) + (yi - this.y) * (yi - this.y) + (zi - this.z) * (zi - this.z); + } + + public void step(int dir) { + switch(dir) { + case 0: + --this.y; + break; + case 1: + ++this.y; + break; + case 2: + --this.z; + break; + case 3: + ++this.z; + break; + case 4: + --this.x; + break; + default: + ++this.x; + } + + } + + public void step(int dir, int dist) { + switch(dir) { + case 0: + this.y -= dist; + break; + case 1: + this.y += dist; + break; + case 2: + this.z -= dist; + break; + case 3: + this.z += dist; + break; + case 4: + this.x -= dist; + break; + default: + this.x += dist; + } + + } + + public static int getRightDir(int dir) { + if (dir < 2) { + return dir; + } else { + switch(dir) { + case 0: + return 0; + case 1: + return 1; + case 2: + return 4; + case 3: + return 5; + case 4: + return 3; + default: + return 2; + } + } + } + + public static int getIndStepDir(int d1, int d2) { + switch(d1) { + case 0: + return d2 + 2; + case 1: + return d2 + 2; + case 2: + return d2 + (d2 & 2); + case 3: + return d2 + (d2 & 2); + case 4: + return d2; + default: + return d2; + } + } + + public void indStep(int d1, int d2) { + this.step(d1); + this.step(getIndStepDir(d1, d2)); + } + + public int hashCode() { + return this.x + 31 * (this.y + 31 * this.z); + } + + public int compareTo(WorldCoord wc) { + return this.x == wc.x ? (this.y == wc.y ? this.z - wc.z : this.y - wc.y) : this.x - wc.x; + } + + public boolean equals(Object obj) { + if (!(obj instanceof WorldCoord)) { + return false; + } else { + WorldCoord wc = (WorldCoord)obj; + return this.x == wc.x && this.y == wc.y && this.z == wc.z; + } + } + + public static Comparator getCompareDir(int dir) { + return new WorldCoord.WCComparator(dir); + } + + public static class WCComparator implements Comparator { + int dir; + + private WCComparator(int d) { + this.dir = d; + } + + public int compare(WorldCoord wa, WorldCoord wb) { + switch(this.dir) { + case 0: + return wa.y - wb.y; + case 1: + return wb.y - wa.y; + case 2: + return wa.z - wb.z; + case 3: + return wb.z - wa.z; + case 4: + return wa.x - wb.x; + default: + return wb.x - wa.x; + } + } + } +} diff --git a/src/main/java/com/eloraam/redpower/lighting/BlockLamp.java b/src/main/java/com/eloraam/redpower/lighting/BlockLamp.java new file mode 100644 index 0000000..637f43f --- /dev/null +++ b/src/main/java/com/eloraam/redpower/lighting/BlockLamp.java @@ -0,0 +1,56 @@ +package com.eloraam.redpower.lighting; + +import com.eloraam.redpower.RedPowerLighting; +import com.eloraam.redpower.core.BlockExtended; +import com.eloraam.redpower.core.CoreLib; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; + +public class BlockLamp extends BlockExtended { + public BlockLamp() { + super(CoreLib.materialRedpower); + this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + this.setHardness(0.5F); + this.setCreativeTab(RedPowerLighting.tabLamp); + } + + public boolean canRenderInPass(int pass) { + return true; + } + + @Override + public boolean isOpaqueCube() { + return true; + } + + @Override + public boolean renderAsNormalBlock() { + return false; + } + + public boolean isSideSolid(IBlockAccess world, int x, int y, int z, ForgeDirection side) { + return true; + } + + public boolean canConnectRedstone(IBlockAccess world, int x, int y, int z, int side) { + return true; + } + + public int getRenderBlockPass() { + return 1; + } + + public int getLightValue(IBlockAccess iba, int x, int y, int z) { + TileLamp lamp = CoreLib.getTileEntity(iba, x, y, z, TileLamp.class); + return lamp == null ? 0 : lamp.getLightValue(); + } + + public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z, EntityPlayer player) { + TileLamp lamp = CoreLib.getTileEntity(world, x, y, z, TileLamp.class); + return lamp != null ? new ItemStack(this, 1, (lamp.Inverted ? 16 : 0) + lamp.Color) : null; + } +} diff --git a/src/main/java/com/eloraam/redpower/lighting/BlockShapedLamp.java b/src/main/java/com/eloraam/redpower/lighting/BlockShapedLamp.java new file mode 100644 index 0000000..3502e8a --- /dev/null +++ b/src/main/java/com/eloraam/redpower/lighting/BlockShapedLamp.java @@ -0,0 +1,93 @@ +package com.eloraam.redpower.lighting; + +import com.eloraam.redpower.RedPowerLighting; +import com.eloraam.redpower.core.BlockExtended; +import com.eloraam.redpower.core.CoreLib; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +public class BlockShapedLamp extends BlockExtended { + public BlockShapedLamp() { + super(CoreLib.materialRedpower); + this.setHardness(1.0F); + this.setCreativeTab(RedPowerLighting.tabLamp); + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + public boolean renderAsNormalBlock() { + return false; + } + + public boolean isNormalCube() { + return false; + } + + public boolean canProvidePower() { + return true; + } + + public boolean canRenderInPass(int pass) { + return true; + } + + public int getRenderBlockPass() { + return 1; + } + + public int getLightValue(IBlockAccess iba, int x, int y, int z) { + TileShapedLamp lamp = CoreLib.getTileEntity(iba, x, y, z, TileShapedLamp.class); + return lamp == null ? 0 : lamp.getLightValue(); + } + + public void setBlockBoundsBasedOnState(IBlockAccess iba, int x, int y, int z) { + TileShapedLamp lamp = CoreLib.getTileEntity(iba, x, y, z, TileShapedLamp.class); + if (lamp != null) { + AxisAlignedBB bb; + switch(lamp.Style) { + case 0: + bb = this.getRotatedBB(0.125F, 0.0F, 0.125F, 0.875F, 0.5F, 0.875F, lamp.Rotation); + break; + case 1: + bb = this.getRotatedBB(0.1875F, 0.0F, 0.1875F, 0.8125F, 0.75F, 0.8125F, lamp.Rotation); + break; + default: + bb = this.getRotatedBB(0.125F, 0.0F, 0.125F, 0.875F, 0.5F, 0.875F, lamp.Rotation); + } + + this.setBlockBounds((float)bb.minX, (float)bb.minY, (float)bb.minZ, (float)bb.maxX, (float)bb.maxY, (float)bb.maxZ); + } + + super.setBlockBoundsBasedOnState(iba, x, y, z); + } + + private AxisAlignedBB getRotatedBB(float x1, float y1, float z1, float x2, float y2, float z2, int rot) { + switch(rot) { + case 0: + return AxisAlignedBB.getBoundingBox((double)x1, (double)y1, (double)z1, (double)x2, (double)y2, (double)z2); + case 1: + return AxisAlignedBB.getBoundingBox((double)x1, (double)(1.0F - y2), (double)z1, (double)x2, (double)(1.0F - y1), (double)z2); + case 2: + return AxisAlignedBB.getBoundingBox((double)x1, (double)z1, (double)y1, (double)x2, (double)z2, (double)y2); + case 3: + return AxisAlignedBB.getBoundingBox((double)x1, (double)(1.0F - z2), (double)(1.0F - y2), (double)x2, (double)(1.0F - z1), (double)(1.0F - y1)); + case 4: + return AxisAlignedBB.getBoundingBox((double)y1, (double)x1, (double)z1, (double)y2, (double)x2, (double)z2); + default: + return AxisAlignedBB.getBoundingBox((double)(1.0F - y2), (double)(1.0F - x2), (double)z1, (double)(1.0F - y1), (double)(1.0F - x1), (double)z2); + } + } + + public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z, EntityPlayer player) { + TileShapedLamp lamp = CoreLib.getTileEntity(world, x, y, z, TileShapedLamp.class); + return lamp != null ? new ItemStack(this, 1, (lamp.getExtendedID() << 10) + (lamp.Style << 5) + (lamp.Inverted ? 16 : 0) + lamp.Color) : null; + } +} diff --git a/src/main/java/com/eloraam/redpower/lighting/ItemLamp.java b/src/main/java/com/eloraam/redpower/lighting/ItemLamp.java new file mode 100644 index 0000000..442f46c --- /dev/null +++ b/src/main/java/com/eloraam/redpower/lighting/ItemLamp.java @@ -0,0 +1,15 @@ +package com.eloraam.redpower.lighting; + +import com.eloraam.redpower.core.ItemExtended; +import net.minecraft.block.Block; + +public class ItemLamp extends ItemExtended { + public ItemLamp(Block block) { + super(block); + } + + @Override + public int getMetadata(int meta) { + return meta << 10; + } +} diff --git a/src/main/java/com/eloraam/redpower/lighting/RenderLamp.java b/src/main/java/com/eloraam/redpower/lighting/RenderLamp.java new file mode 100644 index 0000000..286e18b --- /dev/null +++ b/src/main/java/com/eloraam/redpower/lighting/RenderLamp.java @@ -0,0 +1,140 @@ +package com.eloraam.redpower.lighting; + +import com.eloraam.redpower.RedPowerLighting; +import com.eloraam.redpower.core.RenderContext; +import com.eloraam.redpower.core.RenderCustomBlock; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import net.minecraftforge.client.MinecraftForgeClient; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public class RenderLamp extends RenderCustomBlock { + static int[] lightColors = new int[]{ + 16777215, 12608256, 11868853, 7308529, 12566272, 7074048, 15812213, 5460819, 9671571, 34695, 6160576, 1250240, 5187328, 558848, 10620678, 2039583 + }; + static int[] lightColorsOff = new int[16]; + private RenderContext context = new RenderContext(); + + public RenderLamp(BlockLamp block) { + super(block); + } + + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTicks) { + TileLamp lamp = (TileLamp)tile; + World world = tile.getWorldObj(); + GL11.glDisable(2896); + boolean lit = lamp.Powered != lamp.Inverted; + Tessellator tess = Tessellator.instance; + this.context.bindBlockTexture(); + this.context.setDefaults(); + this.context.setPos(x, y, z); + this.context.readGlobalLights(world, tile.xCoord, tile.yCoord, tile.zCoord); + if (MinecraftForgeClient.getRenderPass() == 0) { + this.context.setSize(0.0, 0.0, 0.0, 1.0, 1.0, 1.0); + this.context.setupBox(); + this.context.transform(); + this.context.setIcon(lit ? RedPowerLighting.lampOn[lamp.Color] : RedPowerLighting.lampOff[lamp.Color]); + tess.startDrawingQuads(); + this.context.renderGlobFaces(63); + tess.draw(); + } + + if (MinecraftForgeClient.getRenderPass() == 1 && lit) { + GL11.glDisable(3553); + GL11.glEnable(3008); + GL11.glAlphaFunc(516, 0.1F); + GL11.glEnable(3042); + GL11.glBlendFunc(770, 1); + GL11.glDisable(2884); + this.context.setPos(x, y, z); + this.context.setTintHex(lightColors[lamp.Color]); + this.context.setLocalLights(1.0F, 1.0F, 1.0F, 1.0F, 1.0F, 1.0F); + this.context.setSize(-0.05, -0.05, -0.05, 1.05, 1.05, 1.05); + this.context.setupBox(); + this.context.transform(); + this.context.setSize(0.0, 0.0, 0.0, 1.0, 1.0, 1.0); + this.context.doMappingBox(0); + this.context.doLightLocal(63); + tess.startDrawingQuads(); + this.context.renderAlpha(63, 0.5F); + tess.draw(); + GL11.glEnable(2884); + GL11.glDisable(3042); + GL11.glEnable(3553); + } + + GL11.glEnable(2896); + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + int meta = item.getItemDamage(); + super.block.setBlockBoundsForItemRender(); + this.context.setDefaults(); + if (type == ItemRenderType.INVENTORY) { + this.context.setPos(-0.5, -0.5, -0.5); + } else { + this.context.setPos(0.0, 0.0, 0.0); + } + + this.context.useNormal = true; + boolean lit = (meta & 16) > 0; + Tessellator tess = Tessellator.instance; + this.context.setIcon(lit ? RedPowerLighting.lampOn[meta & 15] : RedPowerLighting.lampOff[meta & 15]); + tess.startDrawingQuads(); + this.context.renderBox(63, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0); + tess.draw(); + this.context.useNormal = false; + if (lit) { + GL11.glBlendFunc(770, 1); + GL11.glDisable(3553); + GL11.glDisable(2896); + this.context.setTintHex(lightColors[meta & 15]); + this.context.setLocalLights(1.0F, 1.0F, 1.0F, 1.0F, 1.0F, 1.0F); + this.context.setSize(-0.05, -0.05, -0.05, 1.05, 1.05, 1.05); + this.context.setupBox(); + this.context.transform(); + this.context.setSize(0.0, 0.0, 0.0, 1.0, 1.0, 1.0); + this.context.doMappingBox(0); + this.context.doLightLocal(63); + tess.startDrawingQuads(); + this.context.renderAlpha(63, 0.5F); + tess.draw(); + GL11.glEnable(3553); + GL11.glEnable(2896); + GL11.glBlendFunc(770, 771); + } + + } + + @Override + public IIcon getParticleIconForSide(World world, int x, int y, int z, TileEntity tile, int side, int meta) { + if (tile instanceof TileLamp) { + TileLamp lamp = (TileLamp)tile; + return lamp.Powered != lamp.Inverted ? RedPowerLighting.lampOn[lamp.Color] : RedPowerLighting.lampOff[lamp.Color]; + } else { + return super.getParticleIconForSide(world, x, y, z, tile, side, meta); + } + } + + static { + for(int i = 0; i < 16; ++i) { + int r = lightColors[i] & 0xFF; + int g = lightColors[i] >> 8 & 0xFF; + int b = lightColors[i] >> 16 & 0xFF; + int v = (r + g + b) / 3; + r = (r + 2 * v) / 5; + g = (g + 2 * v) / 5; + b = (b + 2 * v) / 5; + lightColorsOff[i] = r | g << 8 | b << 16; + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/lighting/RenderShapedLamp.java b/src/main/java/com/eloraam/redpower/lighting/RenderShapedLamp.java new file mode 100644 index 0000000..bc1d59d --- /dev/null +++ b/src/main/java/com/eloraam/redpower/lighting/RenderShapedLamp.java @@ -0,0 +1,153 @@ +package com.eloraam.redpower.lighting; + +import com.eloraam.redpower.RedPowerLighting; +import com.eloraam.redpower.core.RenderContext; +import com.eloraam.redpower.core.RenderCustomBlock; +import com.eloraam.redpower.core.RenderModel; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.World; +import net.minecraftforge.client.MinecraftForgeClient; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public class RenderShapedLamp extends RenderCustomBlock { + private RenderContext context = new RenderContext(); + private RenderModel modelLamp1 = RenderModel.loadModel("rplighting:models/shlamp1.obj"); + private RenderModel modelLamp2 = RenderModel.loadModel("rplighting:models/shlamp2.obj"); + private ResourceLocation lampRes = new ResourceLocation("rplighting", "models/shlamp.png"); + + public RenderShapedLamp(BlockShapedLamp lamp) { + super(lamp); + } + + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTicks) { + TileShapedLamp shapedLamp = (TileShapedLamp)tile; + World world = shapedLamp.getWorldObj(); + GL11.glDisable(2896); + GL11.glEnable(3008); + GL11.glAlphaFunc(516, 0.1F); + Tessellator tess = Tessellator.instance; + boolean lit = shapedLamp.Powered != shapedLamp.Inverted; + this.context.setDefaults(); + this.context.setPos(x, y, z); + this.context.setOrientation(shapedLamp.Rotation, 0); + this.context.readGlobalLights(world, tile.xCoord, tile.yCoord, tile.zCoord); + switch(shapedLamp.Style) { + case 0: + this.context.bindModelOffset(this.modelLamp1, 0.5, 0.5, 0.5); + break; + case 1: + this.context.bindModelOffset(this.modelLamp2, 0.5, 0.5, 0.5); + } + + this.context.bindTexture(this.lampRes); + this.context.setBrightness(this.getMixedBrightness(tile)); + if (MinecraftForgeClient.getRenderPass() == 0) { + tess.startDrawingQuads(); + this.context.renderModelGroup(0, 0); + if (lit) { + this.context.setTintHex(RenderLamp.lightColors[shapedLamp.Color & 15]); + this.context.setBrightness(15728880); + } else { + this.context.setTintHex(RenderLamp.lightColorsOff[shapedLamp.Color & 15]); + } + + this.context.renderModelGroup(1, 0); + tess.draw(); + } + + if (MinecraftForgeClient.getRenderPass() == 1 && lit) { + GL11.glDisable(3553); + GL11.glEnable(3042); + GL11.glBlendFunc(770, 1); + GL11.glDisable(2884); + this.context.setTintHex(RenderLamp.lightColors[shapedLamp.Color & 15]); + this.context.setAlpha(0.3F); + tess.startDrawingQuads(); + this.context.renderModelGroup(2, 0); + tess.draw(); + GL11.glEnable(2884); + GL11.glDisable(3042); + GL11.glEnable(3553); + } + + GL11.glEnable(2896); + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + int meta = item.getItemDamage(); + Tessellator tess = Tessellator.instance; + super.block.setBlockBoundsForItemRender(); + this.context.setDefaults(); + if (type == ItemRenderType.INVENTORY) { + this.context.setPos(-0.5, -0.5, -0.5); + } else { + this.context.setPos(0.0, 0.0, 0.0); + } + + this.context.bindTexture(this.lampRes); + tess.startDrawingQuads(); + this.context.useNormal = true; + switch(meta >> 5) { + case 0: + this.context.bindModelOffset(this.modelLamp1, 0.5, 0.5, 0.5); + break; + case 1: + this.context.bindModelOffset(this.modelLamp2, 0.5, 0.5, 0.5); + } + + this.context.renderModelGroup(0, 0); + if ((meta & 16) > 0) { + this.context.setTintHex(RenderLamp.lightColors[meta & 15]); + } else { + this.context.setTintHex(RenderLamp.lightColorsOff[meta & 15]); + } + + this.context.renderModelGroup(1, 0); + this.context.useNormal = false; + tess.draw(); + if ((meta & 16) > 0) { + GL11.glBlendFunc(770, 1); + GL11.glDisable(3553); + GL11.glDisable(2896); + this.context.setTintHex(RenderLamp.lightColors[meta & 15]); + this.context.setAlpha(0.3F); + tess.startDrawingQuads(); + this.context.renderModelGroup(2, 0); + tess.draw(); + GL11.glDisable(3008); + GL11.glEnable(2896); + GL11.glEnable(3553); + GL11.glBlendFunc(770, 771); + } + + } + + @Override + public IIcon getParticleIconForSide(World world, int x, int y, int z, TileEntity tile, int side, int meta) { + if (tile instanceof TileShapedLamp) { + TileShapedLamp lamp = (TileShapedLamp)tile; + return lamp.Powered != lamp.Inverted ? RedPowerLighting.lampOn[lamp.Color] : RedPowerLighting.lampOff[lamp.Color]; + } else { + return super.getParticleIconForSide(world, x, y, z, tile, side, meta); + } + } + + @Override + public int getParticleColorForSide(World world, int x, int y, int z, TileEntity tile, int side, int meta) { + if (tile instanceof TileShapedLamp) { + TileShapedLamp lamp = (TileShapedLamp)tile; + return (lamp.Powered != lamp.Inverted ? RenderLamp.lightColors : RenderLamp.lightColorsOff)[lamp.Color]; + } else { + return super.getParticleColorForSide(world, x, y, z, tile, side, meta); + } + } +} diff --git a/src/main/java/com/eloraam/redpower/lighting/TileLamp.java b/src/main/java/com/eloraam/redpower/lighting/TileLamp.java new file mode 100644 index 0000000..587eae7 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/lighting/TileLamp.java @@ -0,0 +1,132 @@ +package com.eloraam.redpower.lighting; + +import com.eloraam.redpower.core.IFrameSupport; +import com.eloraam.redpower.core.RedPowerLib; +import com.eloraam.redpower.core.TileExtended; +import java.util.List; +import net.minecraft.block.Block; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.EnumSkyBlock; +import net.minecraft.world.IBlockAccess; + +public class TileLamp extends TileExtended implements IFrameSupport { + public boolean Powered = false; + public boolean Inverted = false; + public int Color = 0; + + private void updateLight() { + super.worldObj.updateLightByType(EnumSkyBlock.Block, super.xCoord, super.yCoord, super.zCoord); + } + + @Override + public void onBlockPlaced(ItemStack ist, int side, EntityLivingBase ent) { + this.onBlockNeighborChange(Blocks.air); + this.Inverted = (ist.getItemDamage() & 16) > 0; + this.Color = ist.getItemDamage() & 15; + if (ent instanceof EntityPlayer) { + super.Owner = ((EntityPlayer)ent).getGameProfile(); + } + + } + + @Override + public void onBlockNeighborChange(Block block) { + if (RedPowerLib.isPowered(super.worldObj, super.xCoord, super.yCoord, super.zCoord, 16777215, 63)) { + if (this.Powered) { + return; + } + + this.Powered = true; + this.updateLight(); + this.updateBlock(); + } else { + if (!this.Powered) { + return; + } + + this.Powered = false; + this.updateLight(); + this.updateBlock(); + } + + } + + public int getLightValue() { + return this.Powered != this.Inverted ? 15 : 0; + } + + @Override + public void addHarvestContents(List ist) { + ItemStack is = new ItemStack(this.getBlockType(), 1, (this.Inverted ? 16 : 0) + this.Color); + ist.add(is); + } + + @Override + public void writeFramePacket(NBTTagCompound tag) { + int ps = (this.Powered ? 1 : 0) | (this.Inverted ? 2 : 0); + tag.setByte("ps", (byte)ps); + tag.setByte("color", (byte)this.Color); + } + + @Override + public void readFramePacket(NBTTagCompound tag) { + byte ps = tag.getByte("ps"); + this.Powered = (ps & 1) > 0; + this.Inverted = (ps & 2) > 0; + this.Color = tag.getByte("color"); + } + + @Override + public void onFrameRefresh(IBlockAccess iba) { + } + + @Override + public void onFramePickup(IBlockAccess iba) { + } + + @Override + public void onFrameDrop() { + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + byte ps = data.getByte("ps"); + this.Powered = (ps & 1) > 0; + this.Inverted = (ps & 2) > 0; + this.Color = data.getByte("color"); + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + int ps = (this.Powered ? 1 : 0) | (this.Inverted ? 2 : 0); + data.setByte("ps", (byte)ps); + data.setByte("color", (byte)this.Color); + } + + @Override + protected void readFromPacket(NBTTagCompound tag) { + byte ps = tag.getByte("ps"); + this.Powered = (ps & 1) > 0; + this.Inverted = (ps & 2) > 0; + this.Color = tag.getByte("color"); + this.updateBlock(); + this.updateLight(); + } + + @Override + protected void writeToPacket(NBTTagCompound tag) { + int ps = (this.Powered ? 1 : 0) | (this.Inverted ? 2 : 0); + tag.setByte("ps", (byte)ps); + tag.setByte("color", (byte)this.Color); + } + + public boolean shouldRenderInPass(int pass) { + return true; + } +} diff --git a/src/main/java/com/eloraam/redpower/lighting/TileShapedLamp.java b/src/main/java/com/eloraam/redpower/lighting/TileShapedLamp.java new file mode 100644 index 0000000..d572ef7 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/lighting/TileShapedLamp.java @@ -0,0 +1,175 @@ +package com.eloraam.redpower.lighting; + +import com.eloraam.redpower.RedPowerLighting; +import com.eloraam.redpower.core.IConnectable; +import com.eloraam.redpower.core.IFrameSupport; +import com.eloraam.redpower.core.RedPowerLib; +import com.eloraam.redpower.core.TileExtended; +import java.util.List; +import net.minecraft.block.Block; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.EnumSkyBlock; +import net.minecraft.world.IBlockAccess; + +public class TileShapedLamp extends TileExtended implements IFrameSupport, IConnectable { + public int Rotation = 0; + public boolean Powered = false; + public boolean Inverted = false; + public int Style = 0; + public int Color = 0; + + private void updateLight() { + super.worldObj.updateLightByType(EnumSkyBlock.Block, super.xCoord, super.yCoord, super.zCoord); + } + + @Override + public int getConnectableMask() { + return 16777216 << this.Rotation | 15 << (this.Rotation << 2); + } + + @Override + public int getConnectClass(int side) { + return 1; + } + + @Override + public int getCornerPowerMode() { + return 0; + } + + @Override + public void onBlockPlaced(ItemStack ist, int side, EntityLivingBase ent) { + this.Rotation = side ^ 1; + this.onBlockNeighborChange(Blocks.air); + this.Inverted = (ist.getItemDamage() & 16) > 0; + this.Color = ist.getItemDamage() & 15; + this.Style = (ist.getItemDamage() & 1023) >> 5; + if (ent instanceof EntityPlayer) { + super.Owner = ((EntityPlayer)ent).getGameProfile(); + } + + } + + public Block getBlockType() { + return RedPowerLighting.blockShapedLamp; + } + + @Override + public int getExtendedID() { + return 0; + } + + @Override + public void onBlockNeighborChange(Block block) { + int mask = this.getConnectableMask(); + if (RedPowerLib.isPowered(super.worldObj, super.xCoord, super.yCoord, super.zCoord, mask & 16777215, mask >> 24)) { + if (this.Powered) { + return; + } + + this.Powered = true; + this.updateLight(); + this.updateBlock(); + } else { + if (!this.Powered) { + return; + } + + this.Powered = false; + this.updateLight(); + this.updateBlock(); + } + + } + + public int getLightValue() { + return this.Powered != this.Inverted ? 15 : 0; + } + + @Override + public void addHarvestContents(List ist) { + ItemStack is = new ItemStack(this.getBlockType(), 1, (this.Style << 5) + (this.Inverted ? 16 : 0) + this.Color); + ist.add(is); + } + + @Override + public void writeFramePacket(NBTTagCompound tag) { + int ps = (this.Powered ? 1 : 0) | (this.Inverted ? 2 : 0); + tag.setByte("ps", (byte)ps); + tag.setByte("rot", (byte)this.Rotation); + tag.setByte("color", (byte)this.Color); + tag.setByte("style", (byte)this.Style); + } + + @Override + public void readFramePacket(NBTTagCompound tag) { + byte ps = tag.getByte("ps"); + this.Rotation = tag.getByte("rot"); + this.Powered = (ps & 1) > 0; + this.Inverted = (ps & 2) > 0; + this.Color = tag.getByte("color"); + this.Style = tag.getByte("style"); + } + + @Override + public void onFrameRefresh(IBlockAccess iba) { + } + + @Override + public void onFramePickup(IBlockAccess iba) { + } + + @Override + public void onFrameDrop() { + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + byte ps = data.getByte("ps"); + this.Rotation = data.getByte("rot"); + this.Powered = (ps & 1) > 0; + this.Inverted = (ps & 2) > 0; + this.Color = data.getByte("color"); + this.Style = data.getByte("style"); + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + int ps = (this.Powered ? 1 : 0) | (this.Inverted ? 2 : 0); + data.setByte("ps", (byte)ps); + data.setByte("rot", (byte)this.Rotation); + data.setByte("color", (byte)this.Color); + data.setByte("style", (byte)this.Style); + } + + @Override + protected void readFromPacket(NBTTagCompound tag) { + byte ps = tag.getByte("ps"); + this.Rotation = tag.getByte("rot"); + this.Powered = (ps & 1) > 0; + this.Inverted = (ps & 2) > 0; + this.Color = tag.getByte("color"); + this.Style = tag.getByte("style"); + this.updateBlock(); + this.updateLight(); + } + + @Override + protected void writeToPacket(NBTTagCompound tag) { + int ps = (this.Powered ? 1 : 0) | (this.Inverted ? 2 : 0); + tag.setByte("ps", (byte)ps); + tag.setByte("rot", (byte)this.Rotation); + tag.setByte("color", (byte)this.Color); + tag.setByte("style", (byte)this.Style); + } + + public boolean shouldRenderInPass(int pass) { + return true; + } +} diff --git a/src/main/java/com/eloraam/redpower/logic/BlockLogic.java b/src/main/java/com/eloraam/redpower/logic/BlockLogic.java new file mode 100644 index 0000000..2bb6daa --- /dev/null +++ b/src/main/java/com/eloraam/redpower/logic/BlockLogic.java @@ -0,0 +1,41 @@ +package com.eloraam.redpower.logic; + +import com.eloraam.redpower.core.BlockCoverable; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.CreativeExtraTabs; +import com.eloraam.redpower.core.IRedPowerConnectable; +import com.eloraam.redpower.core.RedPowerLib; +import net.minecraft.world.IBlockAccess; + +public class BlockLogic extends BlockCoverable { + public BlockLogic() { + super(CoreLib.materialRedpower); + this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.125F, 1.0F); + this.setHardness(0.1F); + this.setLightLevel(0.625F); + this.setCreativeTab(CreativeExtraTabs.tabWires); + } + + public boolean canConnectRedstone(IBlockAccess iba, int x, int y, int z, int side) { + if (side < 0) { + return false; + } else { + IRedPowerConnectable irp = CoreLib.getTileEntity(iba, x, y, z, IRedPowerConnectable.class); + if (irp == null) { + return false; + } else { + int s = RedPowerLib.mapLocalToRot(irp.getConnectableMask(), 2); + return (s & 1 << side) > 0; + } + } + } + + public int getLightValue(IBlockAccess iba, int x, int y, int z) { + TileLogic tl = CoreLib.getTileEntity(iba, x, y, z, TileLogic.class); + return tl == null ? super.getLightValue(iba, x, y, z) : tl.getLightValue(); + } + + public boolean canProvidePower() { + return true; + } +} diff --git a/src/main/java/com/eloraam/redpower/logic/ContainerCounter.java b/src/main/java/com/eloraam/redpower/logic/ContainerCounter.java new file mode 100644 index 0000000..893db37 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/logic/ContainerCounter.java @@ -0,0 +1,112 @@ +package com.eloraam.redpower.logic; + +import java.util.List; + +import com.eloraam.redpower.core.IHandleGuiEvent; +import com.eloraam.redpower.core.PacketGuiEvent; +import com.google.common.primitives.Ints; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; + +public class ContainerCounter extends Container implements IHandleGuiEvent { + private int Count = 0; + private int CountMax = 0; + private int Inc = 0; + private int Dec = 0; + private TileLogicStorage tileLogic; + + public ContainerCounter(IInventory inv, TileLogicStorage tf) { + this.tileLogic = tf; + } + + public boolean canInteractWith(EntityPlayer player) { + return this.tileLogic.isUseableByPlayer(player); + } + + public ItemStack transferStackInSlot(EntityPlayer player, int i) { + return null; + } + + public void detectAndSendChanges() { + super.detectAndSendChanges(); + TileLogicStorage.LogicStorageCounter lsc = (TileLogicStorage.LogicStorageCounter)this.tileLogic + .getLogicStorage(TileLogicStorage.LogicStorageCounter.class); + + for(ICrafting ic : (List)super.crafters) { + if (this.Count != lsc.Count) { + ic.sendProgressBarUpdate(this, 0, lsc.Count); + } + + if (this.CountMax != lsc.CountMax) { + ic.sendProgressBarUpdate(this, 1, lsc.CountMax); + } + + if (this.Inc != lsc.Inc) { + ic.sendProgressBarUpdate(this, 2, lsc.Inc); + } + + if (this.Dec != lsc.Dec) { + ic.sendProgressBarUpdate(this, 3, lsc.Dec); + } + } + + this.Count = lsc.Count; + this.CountMax = lsc.CountMax; + this.Inc = lsc.Inc; + this.Dec = lsc.Dec; + } + + public ItemStack slotClick(int a, int b, int c, EntityPlayer player) { + return !this.canInteractWith(player) ? null : super.slotClick(a, b, c, player); + } + + public void updateProgressBar(int i, int j) { + TileLogicStorage.LogicStorageCounter lsc = (TileLogicStorage.LogicStorageCounter)this.tileLogic + .getLogicStorage(TileLogicStorage.LogicStorageCounter.class); + switch(i) { + case 0: + lsc.Count = j; + break; + case 1: + lsc.CountMax = j; + break; + case 2: + lsc.Inc = j; + break; + case 3: + lsc.Dec = j; + } + + } + + @Override + public void handleGuiEvent(PacketGuiEvent.GuiMessageEvent message) { + TileLogicStorage.LogicStorageCounter lsc = (TileLogicStorage.LogicStorageCounter)this.tileLogic + .getLogicStorage(TileLogicStorage.LogicStorageCounter.class); + + try { + switch(message.eventId) { + case 0: + lsc.Count = Ints.fromByteArray(message.parameters); + this.tileLogic.updateBlock(); + break; + case 1: + lsc.CountMax = Ints.fromByteArray(message.parameters); + this.tileLogic.updateBlock(); + break; + case 2: + lsc.Inc = Ints.fromByteArray(message.parameters); + this.tileLogic.markDirty(); + break; + case 3: + lsc.Dec = Ints.fromByteArray(message.parameters); + this.tileLogic.markDirty(); + } + } catch (Throwable var4) { + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/logic/ContainerTimer.java b/src/main/java/com/eloraam/redpower/logic/ContainerTimer.java new file mode 100644 index 0000000..660fab8 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/logic/ContainerTimer.java @@ -0,0 +1,77 @@ +package com.eloraam.redpower.logic; + +import java.util.List; + +import com.eloraam.redpower.core.IHandleGuiEvent; +import com.eloraam.redpower.core.PacketGuiEvent; +import com.google.common.primitives.Longs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; + +public class ContainerTimer extends Container implements IHandleGuiEvent { + private long interval = 0L; + private TileLogicPointer tileLogic; + private short[] tmp = new short[4]; + private int tmpcounter; + + public ContainerTimer(IInventory inv, TileLogicPointer tf) { + this.tileLogic = tf; + } + + public ItemStack slotClick(int a, int b, int c, EntityPlayer player) { + return !this.canInteractWith(player) ? null : super.slotClick(a, b, c, player); + } + + public boolean canInteractWith(EntityPlayer player) { + return this.tileLogic.isUseableByPlayer(player); + } + + public ItemStack transferStackInSlot(EntityPlayer player, int i) { + return null; + } + + public void detectAndSendChanges() { + super.detectAndSendChanges(); + long iv = this.tileLogic.getInterval(); + + for(ICrafting ic : (List)super.crafters) { + if (iv != this.interval) { + ic.sendProgressBarUpdate(this, 0, (short)((int)(iv >> 48 & 32767L))); + ic.sendProgressBarUpdate(this, 1, (short)((int)(iv >> 32 & 32767L))); + ic.sendProgressBarUpdate(this, 2, (short)((int)(iv >> 16 & 32767L))); + ic.sendProgressBarUpdate(this, 3, (short)((int)(iv & 32767L))); + } + } + + this.interval = iv; + } + + public void updateProgressBar(int id, int value) { + this.tmp[id] = (short)value; + if (this.tmpcounter++ >= 3) { + this.tileLogic.setInterval((long)this.tmp[0] << 48 | (long)this.tmp[1] << 32 | (long)this.tmp[2] << 16 | (long)this.tmp[3]); + this.tmp[0] = this.tmp[1] = this.tmp[2] = this.tmp[3] = 0; + this.tmpcounter = 0; + } + + } + + @Override + public void handleGuiEvent(PacketGuiEvent.GuiMessageEvent message) { + try { + switch(message.eventId) { + case 1: + long i = Longs.fromByteArray(message.parameters); + this.tileLogic.setInterval(i); + if (this.tileLogic.getWorldObj() != null) { + this.tileLogic.updateBlock(); + } + } + } catch (Throwable var4) { + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/logic/GuiCounter.java b/src/main/java/com/eloraam/redpower/logic/GuiCounter.java new file mode 100644 index 0000000..512edd0 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/logic/GuiCounter.java @@ -0,0 +1,188 @@ +package com.eloraam.redpower.logic; + +import com.eloraam.redpower.RedPowerCore; +import com.eloraam.redpower.core.PacketGuiEvent; +import com.google.common.primitives.Ints; +import net.minecraft.client.gui.FontRenderer; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; + +public class GuiCounter extends GuiContainer { + private TileLogicStorage tileLogic; + private GuiButton[] buttons = new GuiButton[18]; + private ResourceLocation guiRes = new ResourceLocation("rplogic", "textures/gui/countergui.png"); + + public GuiCounter(InventoryPlayer pli, TileLogicStorage te) { + super(new ContainerCounter(pli, te)); + super.xSize = 228; + super.ySize = 117; + this.tileLogic = te; + } + + public GuiCounter(Container cn) { + super(cn); + super.xSize = 228; + super.ySize = 117; + } + + public void initGui() { + super.initGui(); + int bw = super.xSize - 20; + int l = (super.width - super.xSize) / 2; + int m = (super.height - super.ySize) / 2; + super.buttonList.add(this.buttons[0] = new GuiButton(1, l + 10, m + 20, bw / 6, 20, "-25")); + super.buttonList.add(this.buttons[1] = new GuiButton(2, l + 10 + bw / 6, m + 20, bw / 6, 20, "-5")); + super.buttonList.add(this.buttons[2] = new GuiButton(3, l + 10 + bw * 2 / 6, m + 20, bw / 6, 20, "-1")); + super.buttonList.add(this.buttons[3] = new GuiButton(4, l + 10 + bw * 3 / 6, m + 20, bw / 6, 20, "+1")); + super.buttonList.add(this.buttons[4] = new GuiButton(5, l + 10 + bw * 4 / 6, m + 20, bw / 6, 20, "+5")); + super.buttonList.add(this.buttons[5] = new GuiButton(6, l + 10 + bw * 5 / 6, m + 20, bw / 6, 20, "+25")); + super.buttonList.add(this.buttons[6] = new GuiButton(7, l + 10, m + 55, bw / 6, 20, "-25")); + super.buttonList.add(this.buttons[7] = new GuiButton(8, l + 10 + bw / 6, m + 55, bw / 6, 20, "-5")); + super.buttonList.add(this.buttons[8] = new GuiButton(9, l + 10 + bw * 2 / 6, m + 55, bw / 6, 20, "-1")); + super.buttonList.add(this.buttons[9] = new GuiButton(10, l + 10 + bw * 3 / 6, m + 55, bw / 6, 20, "+1")); + super.buttonList.add(this.buttons[10] = new GuiButton(11, l + 10 + bw * 4 / 6, m + 55, bw / 6, 20, "+5")); + super.buttonList.add(this.buttons[11] = new GuiButton(12, l + 10 + bw * 5 / 6, m + 55, bw / 6, 20, "+25")); + super.buttonList.add(this.buttons[12] = new GuiButton(13, l + 10, m + 90, bw / 6, 20, "-25")); + super.buttonList.add(this.buttons[13] = new GuiButton(14, l + 10 + bw / 6, m + 90, bw / 6, 20, "-5")); + super.buttonList.add(this.buttons[14] = new GuiButton(15, l + 10 + bw * 2 / 6, m + 90, bw / 6, 20, "-1")); + super.buttonList.add(this.buttons[15] = new GuiButton(16, l + 10 + bw * 3 / 6, m + 90, bw / 6, 20, "+1")); + super.buttonList.add(this.buttons[16] = new GuiButton(17, l + 10 + bw * 4 / 6, m + 90, bw / 6, 20, "+5")); + super.buttonList.add(this.buttons[17] = new GuiButton(18, l + 10 + bw * 5 / 6, m + 90, bw / 6, 20, "+25")); + } + + protected void drawGuiContainerForegroundLayer(int p1, int p2) { + } + + protected void drawGuiContainerBackgroundLayer(float f, int p1, int p2) { + FontRenderer fontrenderer = super.mc.fontRenderer; + TileLogicStorage.LogicStorageCounter lsc = (TileLogicStorage.LogicStorageCounter)this.tileLogic + .getLogicStorage(TileLogicStorage.LogicStorageCounter.class); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + super.mc.renderEngine.bindTexture(this.guiRes); + int l = (super.width - super.xSize) / 2; + int m = (super.height - super.ySize) / 2; + this.drawTexturedModalRect(l, m, 0, 0, super.xSize, super.ySize); + String str = String.format("Maximum Count: %d", lsc.CountMax); + this.drawCenteredString(fontrenderer, str, super.width / 2, m + 10, -1); + str = String.format("Increment: %d", lsc.Inc); + this.drawCenteredString(fontrenderer, str, super.width / 2, m + 45, -1); + str = String.format("Decrement: %d", lsc.Dec); + this.drawCenteredString(fontrenderer, str, super.width / 2, m + 80, -1); + } + + public void changeCountMax(int cc) { + TileLogicStorage.LogicStorageCounter lsc = (TileLogicStorage.LogicStorageCounter)this.tileLogic + .getLogicStorage(TileLogicStorage.LogicStorageCounter.class); + lsc.CountMax += cc; + if (lsc.CountMax < 1) { + lsc.CountMax = 1; + } + + if (!super.mc.theWorld.isRemote) { + this.tileLogic.updateBlock(); + } else { + byte[] i = Ints.toByteArray(lsc.CountMax); + RedPowerCore.sendPacketToServer(new PacketGuiEvent.GuiMessageEvent(1, super.inventorySlots.windowId, i)); + } + + } + + public void changeInc(int cc) { + TileLogicStorage.LogicStorageCounter lsc = (TileLogicStorage.LogicStorageCounter)this.tileLogic + .getLogicStorage(TileLogicStorage.LogicStorageCounter.class); + lsc.Inc += cc; + if (lsc.Inc < 1) { + lsc.Inc = 1; + } + + if (!super.mc.theWorld.isRemote) { + this.tileLogic.updateBlock(); + } else { + byte[] i = Ints.toByteArray(lsc.Inc); + RedPowerCore.sendPacketToServer(new PacketGuiEvent.GuiMessageEvent(2, super.inventorySlots.windowId, i)); + } + + } + + public void changeDec(int cc) { + TileLogicStorage.LogicStorageCounter lsc = (TileLogicStorage.LogicStorageCounter)this.tileLogic + .getLogicStorage(TileLogicStorage.LogicStorageCounter.class); + lsc.Dec += cc; + if (lsc.Dec < 1) { + lsc.Dec = 1; + } + + if (!super.mc.theWorld.isRemote) { + this.tileLogic.updateBlock(); + } else { + byte[] i = Ints.toByteArray(lsc.Dec); + RedPowerCore.sendPacketToServer(new PacketGuiEvent.GuiMessageEvent(3, super.inventorySlots.windowId, i)); + } + + } + + protected void actionPerformed(GuiButton guibutton) { + if (guibutton.enabled) { + switch(guibutton.id) { + case 1: + this.changeCountMax(-25); + break; + case 2: + this.changeCountMax(-5); + break; + case 3: + this.changeCountMax(-1); + break; + case 4: + this.changeCountMax(1); + break; + case 5: + this.changeCountMax(5); + break; + case 6: + this.changeCountMax(25); + break; + case 7: + this.changeInc(-25); + break; + case 8: + this.changeInc(-5); + break; + case 9: + this.changeInc(-1); + break; + case 10: + this.changeInc(1); + break; + case 11: + this.changeInc(5); + break; + case 12: + this.changeInc(25); + break; + case 13: + this.changeDec(-25); + break; + case 14: + this.changeDec(-5); + break; + case 15: + this.changeDec(-1); + break; + case 16: + this.changeDec(1); + break; + case 17: + this.changeDec(5); + break; + case 18: + this.changeDec(25); + } + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/logic/GuiTimer.java b/src/main/java/com/eloraam/redpower/logic/GuiTimer.java new file mode 100644 index 0000000..b7d321e --- /dev/null +++ b/src/main/java/com/eloraam/redpower/logic/GuiTimer.java @@ -0,0 +1,97 @@ +package com.eloraam.redpower.logic; + +import com.eloraam.redpower.RedPowerCore; +import com.eloraam.redpower.core.PacketGuiEvent; +import com.google.common.primitives.Longs; +import net.minecraft.client.gui.FontRenderer; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; + +public class GuiTimer extends GuiContainer { + private TileLogicPointer tileLogic; + private GuiButton[] buttons = new GuiButton[6]; + private ResourceLocation guiRes = new ResourceLocation("rplogic", "textures/gui/timersgui.png"); + + public GuiTimer(InventoryPlayer pli, TileLogicPointer te) { + this(new ContainerTimer(pli, te)); + this.tileLogic = te; + } + + public GuiTimer(Container cn) { + super(cn); + super.xSize = 228; + super.ySize = 82; + } + + public void initGui() { + super.initGui(); + int bw = super.xSize - 20; + int l = (super.width - super.xSize) / 2; + int m = (super.height - super.ySize) / 2; + super.buttonList.add(this.buttons[0] = new GuiButton(1, l + 10, m + 50, bw / 6, 20, "-10s")); + super.buttonList.add(this.buttons[1] = new GuiButton(2, l + 10 + bw / 6, m + 50, bw / 6, 20, "-1s")); + super.buttonList.add(this.buttons[2] = new GuiButton(3, l + 10 + bw * 2 / 6, m + 50, bw / 6, 20, "-50ms")); + super.buttonList.add(this.buttons[3] = new GuiButton(4, l + 10 + bw * 3 / 6, m + 50, bw / 6, 20, "+50ms")); + super.buttonList.add(this.buttons[4] = new GuiButton(5, l + 10 + bw * 4 / 6, m + 50, bw / 6, 20, "+1s")); + super.buttonList.add(this.buttons[5] = new GuiButton(6, l + 10 + bw * 5 / 6, m + 50, bw / 6, 20, "+10s")); + } + + protected void drawGuiContainerForegroundLayer(int p1, int p2) { + } + + protected void drawGuiContainerBackgroundLayer(float f, int p1, int p2) { + FontRenderer fontrenderer = super.mc.fontRenderer; + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + super.mc.renderEngine.bindTexture(this.guiRes); + int l = (super.width - super.xSize) / 2; + int m = (super.height - super.ySize) / 2; + this.drawTexturedModalRect(l, m, 0, 0, super.xSize, super.ySize); + String str = String.format("Timer Interval: %.3fs", (double)this.tileLogic.getInterval() / 20.0); + this.drawCenteredString(fontrenderer, str, super.width / 2, m + 10, -1); + } + + public void changeInterval(int cc) { + long iv = this.tileLogic.getInterval() + (long)cc; + if (iv < 4L) { + iv = 4L; + } + + this.tileLogic.setInterval(iv); + if (!super.mc.theWorld.isRemote) { + this.tileLogic.updateBlock(); + } else { + byte[] i = Longs.toByteArray(iv); + RedPowerCore.sendPacketToServer(new PacketGuiEvent.GuiMessageEvent(1, super.inventorySlots.windowId, i)); + } + + } + + protected void actionPerformed(GuiButton button) { + if (button.enabled) { + switch(button.id) { + case 1: + this.changeInterval(-200); + break; + case 2: + this.changeInterval(-20); + break; + case 3: + this.changeInterval(-1); + break; + case 4: + this.changeInterval(1); + break; + case 5: + this.changeInterval(20); + break; + case 6: + this.changeInterval(200); + } + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/logic/IPointerTile.java b/src/main/java/com/eloraam/redpower/logic/IPointerTile.java new file mode 100644 index 0000000..83d80e8 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/logic/IPointerTile.java @@ -0,0 +1,9 @@ +package com.eloraam.redpower.logic; + +import com.eloraam.redpower.core.Quat; + +public interface IPointerTile { + float getPointerDirection(float var1); + + Quat getOrientationBasis(); +} diff --git a/src/main/java/com/eloraam/redpower/logic/ItemLogic.java b/src/main/java/com/eloraam/redpower/logic/ItemLogic.java new file mode 100644 index 0000000..3644200 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/logic/ItemLogic.java @@ -0,0 +1,119 @@ +package com.eloraam.redpower.logic; + +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.ItemExtended; +import com.eloraam.redpower.core.RedPowerLib; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +public class ItemLogic extends ItemExtended { + public ItemLogic(Block block) { + super(block); + this.setMaxDamage(0); + this.setHasSubtypes(true); + } + + @Override + public void placeNoise(World world, int x, int y, int z, Block block) { + world.playSoundEffect( + (double)((float)x + 0.5F), + (double)((float)y + 0.5F), + (double)((float)z + 0.5F), + "step.stone", + (block.stepSound.getVolume() + 1.0F) / 2.0F, + block.stepSound.getPitch() * 0.8F + ); + } + + public boolean onItemUse(ItemStack ist, EntityPlayer player, World world, int x, int y, int z, int side, float xp, float yp, float zp) { + return !player.isSneaking() && this.itemUseShared(ist, player, world, x, y, z, side); + } + + public boolean onItemUseFirst(ItemStack ist, EntityPlayer player, World world, int x, int y, int z, int side, float xp, float yp, float zp) { + return !world.isRemote && player.isSneaking() && this.itemUseShared(ist, player, world, x, y, z, side); + } + + protected boolean tryPlace(ItemStack ist, EntityPlayer player, World world, int i, int j, int k, int l, int down, int rot) { + int md = ist.getItemDamage(); + Block bid = Block.getBlockFromItem(ist.getItem()); + if (!world.setBlock(i, j, k, bid, md >> 8, 3)) { + return false; + } else { + TileLogic tl = CoreLib.getTileEntity(world, i, j, k, TileLogic.class); + if (tl == null) { + return false; + } else { + tl.Rotation = down << 2 | rot; + tl.initSubType(md & 0xFF); + return true; + } + } + } + + protected boolean itemUseShared(ItemStack ist, EntityPlayer player, World world, int x, int y, int z, int side) { + switch(side) { + case 0: + --y; + break; + case 1: + ++y; + break; + case 2: + --z; + break; + case 3: + ++z; + break; + case 4: + --x; + break; + case 5: + ++x; + } + + Block bid = Block.getBlockFromItem(ist.getItem()); + if (!world.canPlaceEntityOnSide(world.getBlock(x, y, z), x, y, z, false, side, player, ist)) { + return false; + } else if (!RedPowerLib.isSideNormal(world, x, y, z, side ^ 1)) { + return false; + } else { + int yaw = (int)Math.floor((double)(player.rotationYaw / 90.0F + 0.5F)) + 1 & 3; + int pitch = (int)Math.floor((double)(player.rotationPitch / 90.0F + 0.5F)); + int down = side ^ 1; + int rot; + switch(down) { + case 0: + rot = yaw; + break; + case 1: + rot = yaw ^ (yaw & 1) << 1; + break; + case 2: + rot = (yaw & 1) > 0 ? (pitch > 0 ? 2 : 0) : 1 - yaw & 3; + break; + case 3: + rot = (yaw & 1) > 0 ? (pitch > 0 ? 2 : 0) : yaw - 1 & 3; + break; + case 4: + rot = (yaw & 1) == 0 ? (pitch > 0 ? 2 : 0) : yaw - 2 & 3; + break; + case 5: + rot = (yaw & 1) == 0 ? (pitch > 0 ? 2 : 0) : 2 - yaw & 3; + break; + default: + rot = 0; + } + + if (!this.tryPlace(ist, player, world, x, y, z, side, down, rot)) { + return true; + } else { + this.placeNoise(world, x, y, z, bid); + --ist.stackSize; + world.markBlockForUpdate(x, y, z); + return true; + } + } + } +} diff --git a/src/main/java/com/eloraam/redpower/logic/RenderLogic.java b/src/main/java/com/eloraam/redpower/logic/RenderLogic.java new file mode 100644 index 0000000..3844893 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/logic/RenderLogic.java @@ -0,0 +1,269 @@ +package com.eloraam.redpower.logic; + +import com.eloraam.redpower.RedPowerLogic; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.RenderCovers; +import com.eloraam.redpower.core.Vector3; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import java.util.Random; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public abstract class RenderLogic extends RenderCovers { + public RenderLogic(Block block) { + super(block); + } + + public void renderCovers(IBlockAccess iba, TileLogic tileLogic) { + if (tileLogic.Cover != 255) { + super.context.readGlobalLights(iba, tileLogic.xCoord, tileLogic.yCoord, tileLogic.zCoord); + this.renderCover(tileLogic.Rotation, tileLogic.Cover); + } + + } + + public TileLogic getTileEntity(IBlockAccess iba, int i, int j, int k) { + TileEntity te = iba.getTileEntity(i, j, k); + return !(te instanceof TileLogic) ? null : (TileLogic)te; + } + + public void setMatrixDisplayTick(int i, int j, int k, int rot, Random random) { + float x = (float)i + 0.5F + (random.nextFloat() - 0.5F) * 0.2F; + float y = (float)j + 0.7F + (random.nextFloat() - 0.5F) * 0.2F; + float z = (float)k + 0.5F + (random.nextFloat() - 0.5F) * 0.2F; + super.context.setOrientation(0, rot); + super.context.setPos((double)x, (double)y, (double)z); + } + + public void setMatrixInv(ItemRenderType type) { + super.context.setOrientation(0, 3); + if (type == ItemRenderType.INVENTORY) { + super.context.setPos(-0.5, -0.5, -0.5); + } else { + super.context.setPos(0.0, 0.0, 0.0); + } + + } + + public void renderWafer(int tx) { + IIcon[] icons; + switch(tx >> 8) { + case 1: + icons = RedPowerLogic.logicTwo; + break; + case 2: + icons = RedPowerLogic.logicSensor; + break; + default: + icons = RedPowerLogic.logicOne; + } + + super.context.setRelPos(0.0, 0.0, 0.0); + super.context.setTint(1.0F, 1.0F, 1.0F); + super.context.setTexFlags(0); + super.context.setSize(0.0, 0.0, 0.0, 1.0, 0.125, 1.0); + super.context.setIcon(icons[0], icons[tx & 0xFF], icons[0], icons[0], icons[0], icons[0]); + super.context.calcBounds(); + super.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F); + super.context.renderFaces(62); + } + + public void renderInvWafer(int tx) { + super.context.useNormal = true; + IIcon[] icons; + switch(tx >> 8) { + case 1: + icons = RedPowerLogic.logicTwo; + break; + case 2: + icons = RedPowerLogic.logicSensor; + break; + default: + icons = RedPowerLogic.logicOne; + } + + Tessellator tess = Tessellator.instance; + tess.startDrawingQuads(); + super.context.setTint(1.0F, 1.0F, 1.0F); + super.context.setTexFlags(0); + super.context.setSize(0.0, 0.0, 0.0, 1.0, 0.125, 1.0); + super.context.setIcon(icons[0], icons[tx & 0xFF], icons[0], icons[0], icons[0], icons[0]); + super.context.calcBounds(); + super.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F); + super.context.renderFaces(63); + tess.draw(); + super.context.useNormal = false; + } + + public void renderCover(int rot, int cov) { + if (cov != 255) { + rot >>= 2; + rot ^= 1; + short[] rs = new short[]{0, 0, 0, 0, 0, 0}; + rs[rot] = (short)cov; + super.context.setTint(1.0F, 1.0F, 1.0F); + this.renderCovers(1 << rot, rs); + } + + } + + public void renderRedstoneTorch(double x, double y, double z, double h, boolean state) { + super.context.setTexFlags(0); + super.context.setRelPos(x, y, z); + super.context.setIcon(state ? RedPowerLogic.torchOn : RedPowerLogic.torch); + super.context.setLocalLights(1.0F); + super.context.setTint(1.0F, 1.0F, 1.0F); + super.context.setSize(0.4375, 1.0 - h, 0.0, 0.5625, 1.0, 1.0); + super.context.calcBounds(); + super.context.renderFaces(48); + super.context.setSize(0.0, 1.0 - h, 0.4375, 1.0, 1.0, 0.5625); + super.context.calcBounds(); + super.context.renderFaces(12); + super.context.setSize(0.375, 0.0, 0.4375, 0.5, 1.0, 0.5625); + super.context.setRelPos(x + 0.0625, y - 0.375, z); + super.context.calcBounds(); + super.context.setTexFlags(24); + super.context.renderFaces(2); + super.context.setRelPos(0.0, 0.0, 0.0); + } + + public void renderTorchPuff(World world, String name, double x, double y, double z) { + Vector3 v = new Vector3(x, y, z); + super.context.basis.rotate(v); + v.add(super.context.globalOrigin); + world.spawnParticle(name, v.x, v.y, v.z, 0.0, 0.0, 0.0); + } + + public void renderChip(double x, double y, double z, int tex) { + super.context.setTexFlags(0); + super.context.setRelPos(x, y, z); + super.context.setIcon(RedPowerLogic.logicOne[tex]); + super.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F); + super.context.renderBox(62, 0.375, 0.0625, 0.375, 0.625, 0.1875, 0.625); + } + + protected int getTorchState(TileLogic tileLogic) { + return 0; + } + + protected int getInvTorchState(int metadata) { + return 0; + } + + protected RenderLogic.TorchPos[] getTorchVectors(TileLogic tileLogic) { + return null; + } + + protected RenderLogic.TorchPos[] getInvTorchVectors(int metadata) { + return null; + } + + protected void renderWorldPart(IBlockAccess iba, TileLogic tileLogic, double x, double y, double z, float partialTicks) { + } + + protected void renderInvPart(int metadata) { + } + + @Override + public void randomDisplayTick(World world, int x, int y, int z, Random random) { + TileLogic logic = CoreLib.getTileEntity(world, x, y, z, TileLogic.class); + if (logic != null) { + int ts = this.getTorchState(logic); + if (ts != 0) { + this.setMatrixDisplayTick(x, y, z, logic.Rotation, random); + RenderLogic.TorchPos[] tpv = this.getTorchVectors(logic); + if (tpv != null) { + int rv = random.nextInt(tpv.length); + if ((ts & 1 << rv) != 0) { + this.renderTorchPuff(world, "reddust", tpv[rv].x, tpv[rv].y, tpv[rv].z); + } + } + } + } + + } + + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTicks) { + TileLogic logic = (TileLogic)tile; + World world = logic.getWorldObj(); + GL11.glDisable(2896); + Tessellator tess = Tessellator.instance; + super.context.bindBlockTexture(); + super.context.setDefaults(); + super.context.setPos(x, y, z); + tess.startDrawingQuads(); + this.renderCovers(world, logic); + tess.draw(); + super.context.setBrightness(this.getMixedBrightness(logic)); + super.context.setOrientation(logic.Rotation >> 2, logic.Rotation & 3); + super.context.setPos(x, y, z); + tess.startDrawingQuads(); + this.renderWorldPart(world, logic, x, y, z, partialTicks); + tess.draw(); + super.context.bindBlockTexture(); + int ts = this.getTorchState(logic); + RenderLogic.TorchPos[] tpv = this.getTorchVectors(logic); + if (tpv != null) { + tess.startDrawingQuads(); + + for(int n = 0; n < tpv.length; ++n) { + this.renderRedstoneTorch(tpv[n].x, tpv[n].y, tpv[n].z, tpv[n].h, (ts & 1 << n) > 0); + } + + tess.draw(); + } + + GL11.glEnable(2896); + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + int meta = item.getItemDamage(); + super.block.setBlockBoundsForItemRender(); + super.context.setDefaults(); + this.setMatrixInv(type); + this.renderInvPart(meta); + GL11.glDisable(2896); + Tessellator tess = Tessellator.instance; + tess.startDrawingQuads(); + int ts = this.getInvTorchState(meta); + RenderLogic.TorchPos[] tpv = this.getInvTorchVectors(meta); + if (tpv != null) { + for(int n = 0; n < tpv.length; ++n) { + this.renderRedstoneTorch(tpv[n].x, tpv[n].y, tpv[n].z, tpv[n].h, (ts & 1 << n) > 0); + } + } + + tess.draw(); + GL11.glEnable(2896); + } + + @Override + protected IIcon getParticleIconForSide(World world, int x, int y, int z, TileEntity tile, int side, int meta) { + return Blocks.stone_slab.getIcon(0, 0); + } + + public static class TorchPos { + double x; + double y; + double z; + double h; + + public TorchPos(double x, double y, double z, double h) { + this.x = x; + this.y = y; + this.z = z; + this.h = h; + } + } +} diff --git a/src/main/java/com/eloraam/redpower/logic/RenderLogicAdv.java b/src/main/java/com/eloraam/redpower/logic/RenderLogicAdv.java new file mode 100644 index 0000000..f28f18e --- /dev/null +++ b/src/main/java/com/eloraam/redpower/logic/RenderLogicAdv.java @@ -0,0 +1,94 @@ +package com.eloraam.redpower.logic; + +import com.eloraam.redpower.core.RenderModel; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.IBlockAccess; + +@SideOnly(Side.CLIENT) +public class RenderLogicAdv extends RenderLogic { + private RenderModel modelXcvr = RenderModel.loadModel("rplogic:models/busxcvr.obj"); + private ResourceLocation modelRes = new ResourceLocation("rplogic", "models/arraytex.png"); + + public RenderLogicAdv(Block block) { + super(block); + } + + @Override + protected int getTorchState(TileLogic tileLogic) { + return 0; + } + + @Override + protected int getInvTorchState(int metadata) { + return 0; + } + + @Override + protected RenderLogic.TorchPos[] getTorchVectors(TileLogic tileLogic) { + return null; + } + + @Override + protected RenderLogic.TorchPos[] getInvTorchVectors(int metadata) { + return null; + } + + @Override + protected void renderWorldPart(IBlockAccess iba, TileLogic tileLogic, double x, double y, double z, float partialTicks) { + int md = tileLogic.getExtendedMetadata(); + TileLogicAdv tls = (TileLogicAdv)tileLogic; + Tessellator tess = Tessellator.instance; + tess.draw(); + switch(md) { + case 0: + TileLogicAdv.LogicAdvXcvr lsc = tls.getLogicStorage(TileLogicAdv.LogicAdvXcvr.class); + tess.startDrawingQuads(); + super.context.bindTexture(this.modelRes); + super.context.bindModelOffset(this.modelXcvr, 0.5, 0.5, 0.5); + super.context.setTint(1.0F, 1.0F, 1.0F); + boolean b = (3552867 >> tileLogic.Rotation & 1) == 0; + super.context.renderModelGroup(1, 1 + (b ? 1 : 0) + (tileLogic.Deadmap == 0 ? 2 : 0)); + super.context.renderModelGroup(2, 1 + ((tileLogic.PowerState & 1) > 0 ? 1 : 0) + ((tileLogic.PowerState & 4) > 0 ? 2 : 0)); + + for(int i = 0; i < 4; ++i) { + if (tileLogic.Deadmap == 0) { + super.context.renderModelGroup(3 + i, 1 + (lsc.State2 >> 4 * i & 15)); + super.context.renderModelGroup(7 + i, 1 + (lsc.State1 >> 4 * i & 15)); + } else { + super.context.renderModelGroup(3 + i, 1 + (lsc.State1 >> 4 * i & 15)); + super.context.renderModelGroup(7 + i, 1 + (lsc.State2 >> 4 * i & 15)); + } + } + + tess.draw(); + default: + tess.startDrawingQuads(); + } + } + + @Override + protected void renderInvPart(int metadata) { + switch(metadata) { + case 1024: + super.context.bindTexture(this.modelRes); + Tessellator tess = Tessellator.instance; + tess.startDrawingQuads(); + super.context.useNormal = true; + super.context.bindModelOffset(this.modelXcvr, 0.5, 0.5, 0.5); + super.context.setTint(1.0F, 1.0F, 1.0F); + super.context.renderModelGroup(1, 1); + super.context.renderModelGroup(2, 1); + + for(int i = 0; i < 8; ++i) { + super.context.renderModelGroup(3 + i, 1); + } + + super.context.useNormal = false; + tess.draw(); + } + } +} diff --git a/src/main/java/com/eloraam/redpower/logic/RenderLogicArray.java b/src/main/java/com/eloraam/redpower/logic/RenderLogicArray.java new file mode 100644 index 0000000..f243ceb --- /dev/null +++ b/src/main/java/com/eloraam/redpower/logic/RenderLogicArray.java @@ -0,0 +1,191 @@ +package com.eloraam.redpower.logic; + +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.RedPowerLib; +import com.eloraam.redpower.core.RenderModel; +import com.eloraam.redpower.core.WorldCoord; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.IBlockAccess; + +@SideOnly(Side.CLIENT) +public class RenderLogicArray extends RenderLogic { + private RenderModel model = RenderModel.loadModel("rplogic:models/arraycells.obj"); + private ResourceLocation modelRes = new ResourceLocation("rplogic", "models/arraytex.png"); + private static RenderLogic.TorchPos[] torchMapInvert = new RenderLogic.TorchPos[]{new RenderLogic.TorchPos(0.0, -0.25, 0.0, 0.7)}; + private static RenderLogic.TorchPos[] torchMapNonInv = new RenderLogic.TorchPos[]{ + new RenderLogic.TorchPos(0.0, -0.25, 0.0, 0.7), new RenderLogic.TorchPos(-0.188, -0.25, 0.219, 0.7) + }; + + public RenderLogicArray(Block block) { + super(block); + } + + @Override + protected int getTorchState(TileLogic tileLogic) { + int md = tileLogic.getExtendedMetadata(); + switch(md) { + case 1: + return tileLogic.Powered ? 1 : 0; + case 2: + return tileLogic.Powered ? 1 : 2; + default: + return 0; + } + } + + @Override + protected int getInvTorchState(int metadata) { + return metadata == 514 ? 2 : 0; + } + + @Override + protected RenderLogic.TorchPos[] getTorchVectors(TileLogic tileLogic) { + int md = tileLogic.getExtendedMetadata(); + switch(md) { + case 1: + return torchMapInvert; + case 2: + return torchMapNonInv; + default: + return null; + } + } + + @Override + protected RenderLogic.TorchPos[] getInvTorchVectors(int metadata) { + switch(metadata) { + case 513: + return torchMapInvert; + case 514: + return torchMapNonInv; + default: + return null; + } + } + + public static int getFacingDir(int rot, int rel) { + short n; + switch(rot >> 2) { + case 0: + n = 13604; + break; + case 1: + n = 13349; + break; + case 2: + n = 20800; + break; + case 3: + n = 16720; + break; + case 4: + n = 8496; + break; + default: + n = 12576; + } + + int n1 = n >> ((rot + rel & 3) << 2); + return n1 & 7; + } + + private boolean isArrayTopwire(IBlockAccess iba, WorldCoord wc, int mask, int dir) { + wc = wc.coordStep(dir); + TileLogicArray logicArray = CoreLib.getTileEntity(iba, wc, TileLogicArray.class); + if (logicArray == null) { + return false; + } else { + int m = logicArray.getTopwireMask(); + m &= RedPowerLib.getConDirMask(dir); + m = (m & 1431655765) << 1 | (m & 715827882) >> 1; + m &= mask; + return m > 0; + } + } + + @Override + protected void renderWorldPart(IBlockAccess iba, TileLogic tileLogic, double x, double y, double z, float partialTicks) { + TileLogicArray logicArray = (TileLogicArray)tileLogic; + Tessellator tess = Tessellator.instance; + int md = tileLogic.getExtendedMetadata(); + super.context.bindTexture(this.modelRes); + tess.draw(); + tess.startDrawingQuads(); + super.context.bindModelOffset(this.model, 0.5, 0.5, 0.5); + super.context.setTint(1.0F, 1.0F, 1.0F); + super.context.renderModelGroup(0, 0); + switch(md) { + case 0: + super.context.renderModelGroup(1, 1); + super.context.setTint(0.3F + 0.7F * ((float)logicArray.PowerVal1 / 255.0F), 0.0F, 0.0F); + super.context.renderModelGroup(2, 1); + super.context.setTint(0.3F + 0.7F * ((float)logicArray.PowerVal2 / 255.0F), 0.0F, 0.0F); + super.context.renderModelGroup(3, 1); + break; + case 1: + super.context.renderModelGroup(1, 2 + (logicArray.PowerVal1 > 0 ? 1 : 0)); + super.context.renderModelGroup(5, 0); + super.context.setTint(0.3F + 0.7F * ((float)logicArray.PowerVal1 / 255.0F), 0.0F, 0.0F); + super.context.renderModelGroup(2, 2); + super.context.setTint(0.3F + 0.7F * ((float)logicArray.PowerVal2 / 255.0F), 0.0F, 0.0F); + super.context.renderModelGroup(3, 2); + break; + case 2: + super.context.renderModelGroup(1, 4 + (logicArray.PowerVal1 > 0 ? 1 : 0) + (logicArray.Powered ? 0 : 2)); + super.context.renderModelGroup(5, 0); + super.context.setTint(0.3F + 0.7F * ((float)logicArray.PowerVal1 / 255.0F), 0.0F, 0.0F); + super.context.renderModelGroup(2, 2); + super.context.setTint(0.3F + 0.7F * ((float)logicArray.PowerVal2 / 255.0F), 0.0F, 0.0F); + super.context.renderModelGroup(3, 2); + } + + int fd = getFacingDir(logicArray.Rotation, 1); + int fm = logicArray.getTopwireMask(); + WorldCoord wc = new WorldCoord(tileLogic); + super.context.renderModelGroup(4, (this.isArrayTopwire(iba, wc, fm, fd) ? 0 : 1) + (this.isArrayTopwire(iba, wc, fm, fd ^ 1) ? 0 : 2)); + tess.draw(); + tess.startDrawingQuads(); + } + + @Override + protected void renderInvPart(int metadata) { + Tessellator tess = Tessellator.instance; + super.context.bindTexture(this.modelRes); + tess.startDrawingQuads(); + super.context.useNormal = true; + super.context.bindModelOffset(this.model, 0.5, 0.5, 0.5); + super.context.setTint(1.0F, 1.0F, 1.0F); + super.context.renderModelGroup(0, 0); + switch(metadata) { + case 512: + super.context.renderModelGroup(1, 1); + super.context.setTint(0.3F, 0.0F, 0.0F); + super.context.renderModelGroup(2, 1); + super.context.renderModelGroup(3, 1); + super.context.renderModelGroup(4, 3); + break; + case 513: + super.context.renderModelGroup(1, 2); + super.context.renderModelGroup(5, 0); + super.context.setTint(0.3F, 0.0F, 0.0F); + super.context.renderModelGroup(2, 2); + super.context.renderModelGroup(3, 2); + super.context.renderModelGroup(4, 3); + break; + case 514: + super.context.renderModelGroup(1, 6); + super.context.renderModelGroup(5, 0); + super.context.setTint(0.3F, 0.0F, 0.0F); + super.context.renderModelGroup(2, 2); + super.context.renderModelGroup(3, 2); + super.context.renderModelGroup(4, 3); + } + + super.context.useNormal = false; + tess.draw(); + } +} diff --git a/src/main/java/com/eloraam/redpower/logic/RenderLogicPointer.java b/src/main/java/com/eloraam/redpower/logic/RenderLogicPointer.java new file mode 100644 index 0000000..e99c8d6 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/logic/RenderLogicPointer.java @@ -0,0 +1,177 @@ +package com.eloraam.redpower.logic; + +import com.eloraam.redpower.core.MathLib; +import com.eloraam.redpower.core.Quat; +import com.eloraam.redpower.core.RenderLib; +import com.eloraam.redpower.core.Vector3; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.world.IBlockAccess; + +@SideOnly(Side.CLIENT) +public class RenderLogicPointer extends RenderLogic { + private static RenderLogic.TorchPos[] torchMapSequencer = new RenderLogic.TorchPos[]{ + new RenderLogic.TorchPos(0.0, 0.125, 0.0, 1.0), + new RenderLogic.TorchPos(0.0, -0.3, 0.3, 0.6), + new RenderLogic.TorchPos(-0.3, -0.3, 0.0, 0.6), + new RenderLogic.TorchPos(0.0, -0.3, -0.3, 0.6), + new RenderLogic.TorchPos(0.3, -0.3, 0.0, 0.6) + }; + private static RenderLogic.TorchPos[] torchMapTimer = new RenderLogic.TorchPos[]{ + new RenderLogic.TorchPos(0.0, 0.125, 0.0, 1.0), new RenderLogic.TorchPos(0.3, -0.3, 0.0, 0.6) + }; + private static RenderLogic.TorchPos[] torchMapStateCell = new RenderLogic.TorchPos[]{ + new RenderLogic.TorchPos(0.0, 0.125, 0.25, 1.0), new RenderLogic.TorchPos(0.281, -0.3, 0.156, 0.6) + }; + private static RenderLogic.TorchPos[] torchMapStateCell2 = new RenderLogic.TorchPos[]{ + new RenderLogic.TorchPos(0.0, 0.125, -0.25, 1.0), new RenderLogic.TorchPos(0.281, -0.3, -0.156, 0.6) + }; + + public RenderLogicPointer(Block block) { + super(block); + } + + @Override + protected int getTorchState(TileLogic tileLogic) { + int md = tileLogic.getExtendedMetadata(); + switch(md) { + case 0: + return (tileLogic.Disabled ? 0 : 1) | (tileLogic.Powered && !tileLogic.Disabled ? 2 : 0); + case 1: + return 1 | 2 << tileLogic.PowerState & 31; + case 2: + return (tileLogic.Active && !tileLogic.Powered && !tileLogic.Disabled ? 1 : 0) | (tileLogic.Active && tileLogic.Powered ? 2 : 0); + default: + return 0; + } + } + + @Override + protected int getInvTorchState(int metadata) { + switch(metadata) { + case 0: + return 1; + case 1: + return 5; + case 2: + return 0; + default: + return 0; + } + } + + @Override + protected RenderLogic.TorchPos[] getTorchVectors(TileLogic tileLogic) { + int md = tileLogic.getExtendedMetadata(); + switch(md) { + case 0: + return torchMapTimer; + case 1: + return torchMapSequencer; + case 2: + if (tileLogic.Deadmap > 0) { + return torchMapStateCell2; + } + + return torchMapStateCell; + default: + return null; + } + } + + @Override + protected RenderLogic.TorchPos[] getInvTorchVectors(int metadata) { + switch(metadata) { + case 0: + return torchMapTimer; + case 1: + return torchMapSequencer; + case 2: + return torchMapStateCell; + default: + return null; + } + } + + @Override + protected void renderWorldPart(IBlockAccess iba, TileLogic tileLogic, double x, double y, double z, float partialTicks) { + TileLogicPointer logicPointer = (TileLogicPointer)tileLogic; + int md = tileLogic.getExtendedMetadata(); + int tx; + switch(md) { + case 0: + tx = 16 + (tileLogic.PowerState | (tileLogic.Powered ? 5 : 0)); + break; + case 1: + if (tileLogic.Deadmap == 1) { + tx = 4; + } else { + tx = 3; + } + break; + case 2: + tx = 32 + + ( + (tileLogic.Deadmap > 0 ? 32 : 0) + | tileLogic.PowerState + | (tileLogic.Active && tileLogic.Powered ? 8 : 0) + | (tileLogic.Active && !tileLogic.Powered && !tileLogic.Disabled ? 0 : 16) + | (tileLogic.Active && !tileLogic.Powered ? (tileLogic.Deadmap > 0 ? 1 : 4) : 0) + ); + break; + default: + return; + } + + this.renderWafer(tx); + if (md == 2) { + if (tileLogic.Deadmap > 0) { + this.renderChip(-0.125, 0.0, 0.125, tileLogic.Active ? 2 : 1); + } else { + this.renderChip(-0.125, 0.0, -0.125, tileLogic.Active ? 2 : 1); + } + } + + float ptrdir = logicPointer.getPointerDirection(partialTicks) + 0.25F; + Quat q = MathLib.orientQuat(logicPointer.Rotation >> 2, logicPointer.Rotation & 3); + Vector3 v = logicPointer.getPointerOrigin(); + q.rotate(v); + v.add(x + 0.5, y + 0.5, z + 0.5); + q.rightMultiply(Quat.aroundAxis(0.0, 1.0, 0.0, -Math.PI * 2 * (double)ptrdir)); + RenderLib.renderPointer(v, q); + } + + @Override + protected void renderInvPart(int metadata) { + switch(metadata) { + case 0: + super.context.setOrientation(0, 1); + this.renderInvWafer(16); + break; + case 1: + this.renderInvWafer(3); + break; + case 2: + super.context.setOrientation(0, 1); + this.renderInvWafer(48); + } + + Tessellator tess = Tessellator.instance; + tess.startDrawingQuads(); + tess.setNormal(0.0F, 0.0F, 1.0F); + switch(metadata) { + case 2: + RenderLib.renderPointer(new Vector3(-0.25, -0.1, 0.0), Quat.aroundAxis(0.0, 1.0, 0.0, 0.0)); + super.context.useNormal = true; + this.renderChip(-0.125, 0.0, -0.125, 1); + super.context.useNormal = false; + break; + default: + RenderLib.renderPointer(new Vector3(0.0, -0.1, 0.0), Quat.aroundAxis(0.0, 1.0, 0.0, -Math.PI / 2)); + } + + tess.draw(); + } +} diff --git a/src/main/java/com/eloraam/redpower/logic/RenderLogicSimple.java b/src/main/java/com/eloraam/redpower/logic/RenderLogicSimple.java new file mode 100644 index 0000000..dce7005 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/logic/RenderLogicSimple.java @@ -0,0 +1,601 @@ +package com.eloraam.redpower.logic; + +import com.eloraam.redpower.RedPowerLogic; +import com.eloraam.redpower.core.MathLib; +import com.eloraam.redpower.core.PowerLib; +import com.eloraam.redpower.core.Quat; +import com.eloraam.redpower.core.RenderLib; +import com.eloraam.redpower.core.Vector3; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; + +@SideOnly(Side.CLIENT) +public class RenderLogicSimple extends RenderLogic { + private static RenderLogic.TorchPos[] torchMapLatch = new RenderLogic.TorchPos[]{ + new RenderLogic.TorchPos(-0.3, -0.15, 0.0, 0.8), new RenderLogic.TorchPos(0.3, -0.15, 0.0, 0.8) + }; + private static RenderLogic.TorchPos[] torchMapLatch2 = new RenderLogic.TorchPos[]{ + new RenderLogic.TorchPos(-0.281, -0.15, -0.0938, 0.8), new RenderLogic.TorchPos(0.281, -0.15, 0.0938, 0.8) + }; + private static RenderLogic.TorchPos[] torchMapLatch2b = new RenderLogic.TorchPos[]{ + new RenderLogic.TorchPos(-0.281, -0.15, 0.0938, 0.8), new RenderLogic.TorchPos(0.281, -0.15, -0.0938, 0.8) + }; + private static RenderLogic.TorchPos[] torchMapNor = new RenderLogic.TorchPos[]{new RenderLogic.TorchPos(-0.094, -0.25, 0.031, 0.7)}; + private static RenderLogic.TorchPos[] torchMapOr = new RenderLogic.TorchPos[]{ + new RenderLogic.TorchPos(-0.094, -0.25, 0.031, 0.7), new RenderLogic.TorchPos(0.28, -0.15, 0.0, 0.8) + }; + private static RenderLogic.TorchPos[] torchMapNand = new RenderLogic.TorchPos[]{ + new RenderLogic.TorchPos(-0.031, -0.25, 0.22, 0.7), + new RenderLogic.TorchPos(-0.031, -0.25, 0.0, 0.7), + new RenderLogic.TorchPos(-0.031, -0.25, -0.22, 0.7) + }; + private static RenderLogic.TorchPos[] torchMapAnd = new RenderLogic.TorchPos[]{ + new RenderLogic.TorchPos(-0.031, -0.25, 0.22, 0.7), + new RenderLogic.TorchPos(-0.031, -0.25, 0.0, 0.7), + new RenderLogic.TorchPos(-0.031, -0.25, -0.22, 0.7), + new RenderLogic.TorchPos(0.28, -0.15, 0.0, 0.8) + }; + private static RenderLogic.TorchPos[] torchMapXnor = new RenderLogic.TorchPos[]{ + new RenderLogic.TorchPos(-0.031, -0.25, 0.22, 0.7), + new RenderLogic.TorchPos(-0.031, -0.25, -0.22, 0.7), + new RenderLogic.TorchPos(-0.28, -0.25, 0.0, 0.7), + new RenderLogic.TorchPos(0.28, -0.15, 0.0, 0.8) + }; + private static RenderLogic.TorchPos[] torchMapXor = new RenderLogic.TorchPos[]{ + new RenderLogic.TorchPos(-0.031, -0.25, 0.22, 0.7), new RenderLogic.TorchPos(-0.031, -0.25, -0.22, 0.7), new RenderLogic.TorchPos(-0.28, -0.25, 0.0, 0.7) + }; + private static RenderLogic.TorchPos[] torchMapPulse = new RenderLogic.TorchPos[]{ + new RenderLogic.TorchPos(-0.09, -0.25, -0.22, 0.7), new RenderLogic.TorchPos(-0.09, -0.25, 0.22, 0.7), new RenderLogic.TorchPos(0.28, -0.15, 0.0, 0.8) + }; + private static RenderLogic.TorchPos[] torchMapToggle = new RenderLogic.TorchPos[]{ + new RenderLogic.TorchPos(0.28, -0.25, -0.22, 0.7), new RenderLogic.TorchPos(-0.28, -0.25, -0.22, 0.7) + }; + private static RenderLogic.TorchPos[] torchMapNot = new RenderLogic.TorchPos[]{new RenderLogic.TorchPos(-0.031, -0.25, 0.031, 0.7)}; + private static RenderLogic.TorchPos[] torchMapBuffer = new RenderLogic.TorchPos[]{ + new RenderLogic.TorchPos(0.281, -0.15, 0.031, 0.8), new RenderLogic.TorchPos(-0.094, -0.25, 0.031, 0.7) + }; + private static RenderLogic.TorchPos[] torchMapMux = new RenderLogic.TorchPos[]{ + new RenderLogic.TorchPos(-0.031, -0.25, 0.22, 0.7), + new RenderLogic.TorchPos(-0.031, -0.25, -0.22, 0.7), + new RenderLogic.TorchPos(-0.156, -0.25, 0.031, 0.7), + new RenderLogic.TorchPos(0.28, -0.15, 0.0, 0.8) + }; + private static RenderLogic.TorchPos[] torchMapMux2 = new RenderLogic.TorchPos[]{ + new RenderLogic.TorchPos(-0.031, -0.25, 0.22, 0.7), + new RenderLogic.TorchPos(-0.031, -0.25, -0.22, 0.7), + new RenderLogic.TorchPos(-0.156, -0.25, -0.031, 0.7), + new RenderLogic.TorchPos(0.28, -0.15, 0.0, 0.8) + }; + private static RenderLogic.TorchPos[] torchMapRepS = new RenderLogic.TorchPos[]{ + new RenderLogic.TorchPos(0.313, -0.25, -0.125, 0.7), new RenderLogic.TorchPos(-0.25, -0.25, 0.25, 0.7) + }; + private static RenderLogic.TorchPos[] torchMapSync = new RenderLogic.TorchPos[]{new RenderLogic.TorchPos(0.28, -0.25, 0.0, 0.7)}; + private static RenderLogic.TorchPos[] torchMapDLatch = new RenderLogic.TorchPos[]{ + new RenderLogic.TorchPos(-0.28, -0.25, -0.219, 0.7), + new RenderLogic.TorchPos(0.031, -0.25, -0.219, 0.7), + new RenderLogic.TorchPos(0.031, -0.25, -0.031, 0.7), + new RenderLogic.TorchPos(0.031, -0.15, 0.281, 0.8), + new RenderLogic.TorchPos(0.281, -0.15, -0.094, 0.8) + }; + private static RenderLogic.TorchPos[] torchMapDLatch2 = new RenderLogic.TorchPos[]{ + new RenderLogic.TorchPos(-0.28, -0.25, 0.219, 0.7), + new RenderLogic.TorchPos(0.031, -0.25, 0.219, 0.7), + new RenderLogic.TorchPos(0.031, -0.25, 0.031, 0.7), + new RenderLogic.TorchPos(0.031, -0.15, -0.281, 0.8), + new RenderLogic.TorchPos(0.281, -0.15, 0.094, 0.8) + }; + private static final int[] texIdxNor = new int[]{272, 288, 296, 312, 304, 316, 320}; + private static final int[] texIdxOr = new int[]{376, 384, 388, 416, 392, 418, 420}; + private static final int[] texIdxNand = new int[]{336, 352, 360, 324, 368, 328, 332}; + private static final int[] texIdxAnd = new int[]{400, 408, 412, 422, 396, 424, 426}; + private static final int[] texIdxNot = new int[]{432, 448, 456, 472, 464, 476, 428}; + private static final int[] texIdxBuf = new int[]{496, 504, 508, 257}; + private static Quat[] leverPositions = new Quat[2]; + + public RenderLogicSimple(Block block) { + super(block); + } + + @Override + protected int getTorchState(TileLogic tileLogic) { + int md = tileLogic.getExtendedMetadata(); + switch(md) { + case 0: + if (tileLogic.Deadmap > 1) { + return ((tileLogic.PowerState & 2) > 0 ? 1 : 0) | ((tileLogic.PowerState & 8) > 0 ? 2 : 0); + } else { + if (!tileLogic.Disabled && !tileLogic.Active) { + if (tileLogic.Deadmap == 1) { + return tileLogic.Powered ? 1 : 2; + } + + return tileLogic.Powered ? 2 : 1; + } + + return 0; + } + case 1: + return tileLogic.Powered ? 1 : 0; + case 2: { + int eps1 = tileLogic.PowerState & ~tileLogic.Deadmap; + return (eps1 == 0 ? 1 : 0) | (tileLogic.Powered ? 2 : 0); + } + case 3: { + int eps1 = tileLogic.PowerState | tileLogic.Deadmap; + return eps1 & 7 ^ 7; + } + case 4: { + int eps1 = tileLogic.PowerState | tileLogic.Deadmap; + return eps1 & 7 ^ 7 | (tileLogic.Powered ? 8 : 0); + } + case 5: + case 6: + byte eps; + switch(tileLogic.PowerState & 5) { + case 0: + eps = 4; + break; + case 1: + eps = 2; + break; + case 2: + case 3: + default: + eps = 0; + break; + case 4: + eps = 1; + } + + if (md == 6) { + return eps; + } + + return eps | (tileLogic.Powered ? 8 : 0); + case 7: + return (!tileLogic.Powered && !tileLogic.Active ? 1 : 0) + | (!tileLogic.Powered && !tileLogic.Active ? 0 : 2) + | (tileLogic.Powered && !tileLogic.Active ? 4 : 0); + case 8: + return !tileLogic.Powered ? 1 : 2; + case 9: + return tileLogic.Powered ? 1 : 0; + case 10: + return (tileLogic.Powered ? 1 : 0) | tileLogic.PowerState & 2; + case 11: + if (tileLogic.Deadmap == 0) { + return (tileLogic.Powered ? 8 : 0) + | ((tileLogic.PowerState & 3) == 0 ? 1 : 0) + | ((tileLogic.PowerState & 6) == 2 ? 2 : 0) + | ((tileLogic.PowerState & 2) == 0 ? 4 : 0); + } + + return (tileLogic.Powered ? 8 : 0) + | ((tileLogic.PowerState & 3) == 2 ? 1 : 0) + | ((tileLogic.PowerState & 6) == 0 ? 2 : 0) + | ((tileLogic.PowerState & 2) == 0 ? 4 : 0); + case 12: + return (tileLogic.Powered ? 1 : 0) | (tileLogic.PowerState == 0 ? 2 : 0); + case 13: + return tileLogic.Powered ? 1 : 0; + case 14: + return 0; + case 15: + if (tileLogic.Deadmap == 0) { + switch(tileLogic.PowerState & 6) { + case 0: + return tileLogic.Powered ? 25 : 5; + case 1: + case 3: + default: + return tileLogic.Powered ? 24 : 0; + case 2: + return tileLogic.Powered ? 26 : 2; + case 4: + return tileLogic.Powered ? 25 : 5; + } + } else { + switch(tileLogic.PowerState & 3) { + case 0: + return tileLogic.Powered ? 25 : 5; + case 1: + return tileLogic.Powered ? 25 : 5; + case 2: + return tileLogic.Powered ? 26 : 2; + default: + return tileLogic.Powered ? 24 : 0; + } + } + default: + return 0; + } + } + + @Override + protected int getInvTorchState(int metadata) { + switch(metadata) { + case 256: + case 257: + case 258: + return 1; + case 259: + case 260: + return 7; + case 261: + return 12; + case 262: + return 4; + case 263: + case 264: + case 265: + return 1; + case 266: + return 2; + case 267: + return 12; + case 268: + return 1; + case 269: + return 0; + case 270: + return 0; + case 271: + return 5; + default: + return 0; + } + } + + @Override + protected RenderLogic.TorchPos[] getTorchVectors(TileLogic tileLogic) { + int md = tileLogic.getExtendedMetadata(); + switch(md) { + case 0: + if (tileLogic.Deadmap == 2) { + return torchMapLatch2; + } else { + if (tileLogic.Deadmap == 3) { + return torchMapLatch2b; + } + + return torchMapLatch; + } + case 1: + return torchMapNor; + case 2: + return torchMapOr; + case 3: + return torchMapNand; + case 4: + return torchMapAnd; + case 5: + return torchMapXnor; + case 6: + return torchMapXor; + case 7: + return torchMapPulse; + case 8: + return torchMapToggle; + case 9: + return torchMapNot; + case 10: + return torchMapBuffer; + case 11: + if (tileLogic.Deadmap == 0) { + return torchMapMux; + } + + return torchMapMux2; + case 12: + return new RenderLogic.TorchPos[]{ + new RenderLogic.TorchPos(0.313, -0.25, -0.125, 0.7), new RenderLogic.TorchPos(-0.25 + (double)tileLogic.Deadmap * 0.063, -0.25, 0.25, 0.7) + }; + case 13: + return torchMapSync; + case 14: + return null; + case 15: + if (tileLogic.Deadmap == 0) { + return torchMapDLatch; + } + + return torchMapDLatch2; + default: + return null; + } + } + + @Override + protected RenderLogic.TorchPos[] getInvTorchVectors(int metadata) { + switch(metadata) { + case 256: + return torchMapLatch; + case 257: + return torchMapNor; + case 258: + return torchMapOr; + case 259: + return torchMapNand; + case 260: + return torchMapAnd; + case 261: + return torchMapXnor; + case 262: + return torchMapXor; + case 263: + return torchMapPulse; + case 264: + return torchMapToggle; + case 265: + return torchMapNot; + case 266: + return torchMapBuffer; + case 267: + return torchMapMux; + case 268: + return torchMapRepS; + case 269: + return torchMapSync; + case 270: + return null; + case 271: + return torchMapDLatch; + default: + return null; + } + } + + @Override + protected void renderWorldPart(IBlockAccess iba, TileLogic tileLogic, double x, double y, double z, float partialTicks) { + int md = tileLogic.getExtendedMetadata(); + int tx; + switch(md) { + case 0: + if (tileLogic.Deadmap < 2) { + tx = ((tileLogic.PowerState & 1) > 0 ? 1 : 0) | ((tileLogic.PowerState & 4) > 0 ? 2 : 0); + if (!tileLogic.Disabled || tileLogic.Active) { + tx |= tileLogic.Powered ? 2 : 1; + } + + tx += 24 + (tileLogic.Deadmap == 1 ? 4 : 0); + } else { + tx = 96 + (tileLogic.Deadmap == 3 ? 16 : 0) + tileLogic.PowerState; + } + break; + case 1: + tx = texIdxNor[tileLogic.Deadmap] + PowerLib.cutBits(tileLogic.PowerState | (tileLogic.Powered ? 8 : 0), tileLogic.Deadmap); + break; + case 2: + tx = texIdxOr[tileLogic.Deadmap] + PowerLib.cutBits(tileLogic.PowerState, tileLogic.Deadmap); + break; + case 3: + tx = texIdxNand[tileLogic.Deadmap] + PowerLib.cutBits(tileLogic.PowerState | (tileLogic.Powered ? 8 : 0), tileLogic.Deadmap); + break; + case 4: + tx = texIdxAnd[tileLogic.Deadmap] + PowerLib.cutBits(tileLogic.PowerState, tileLogic.Deadmap); + break; + case 5: + tx = 128 + (tileLogic.PowerState & 1) + ((tileLogic.PowerState & 4) >> 1); + break; + case 6: + tx = 132 + ((tileLogic.Powered ? 4 : 0) | (tileLogic.PowerState & 12) >> 1 | tileLogic.PowerState & 1); + break; + case 7: + tx = 5; + if (tileLogic.Powered && !tileLogic.Active) { + tx = 6; + } else if (!tileLogic.Powered && tileLogic.Active) { + tx = 7; + } + break; + case 8: + tx = 140 + (tileLogic.PowerState & 1) + (tileLogic.PowerState >> 1 & 2); + break; + case 9: + if (tileLogic.Deadmap == 0) { + tx = 432 + (tileLogic.PowerState | (tileLogic.Powered ? 13 : 0)); + } else { + int tmp = PowerLib.cutBits(tileLogic.Deadmap, 2); + if (tileLogic.Powered) { + tx = 480 + (tmp - 1 << 1) + ((tileLogic.PowerState & 2) >> 1); + } else { + tx = texIdxNot[tmp] + PowerLib.cutBits(tileLogic.PowerState, tileLogic.Deadmap); + } + } + break; + case 10: + if (tileLogic.Deadmap == 0) { + tx = 496 + (tileLogic.PowerState | (tileLogic.Powered ? 5 : 0)); + } else { + int tmp = PowerLib.cutBits(tileLogic.Deadmap, 2); + if (tileLogic.Powered) { + tx = 256 + (tmp << 1) + ((tileLogic.PowerState & 2) >> 1); + } else { + tx = texIdxBuf[tmp] + PowerLib.cutBits(tileLogic.PowerState, tileLogic.Deadmap); + } + } + break; + case 11: + tx = 144 + (tileLogic.Deadmap > 0 ? 8 : 0) + tileLogic.PowerState; + break; + case 12: + tx = 492 + (tileLogic.PowerState >> 1) + (tileLogic.Powered ? 0 : 2); + break; + case 13: + tx = 160 + tileLogic.PowerState + (tileLogic.Active ? 8 : 0) + (tileLogic.Disabled ? 16 : 0); + break; + case 14: + tx = 192 + (tileLogic.PowerState | (tileLogic.Active ? 1 : 0) | (tileLogic.Powered ? 4 : 0) | (tileLogic.Disabled ? 8 : 0)); + break; + case 15: + if (tileLogic.Deadmap > 0) { + tx = 216 + tileLogic.PowerState + (tileLogic.Powered ? 4 : 0); + } else { + tx = 208 + (tileLogic.PowerState >> 1) + (tileLogic.Powered ? 4 : 0); + } + break; + case 16: + tx = 513 + (!tileLogic.Powered && tileLogic.PowerState <= 0 ? 0 : 1); + break; + default: + return; + } + + this.renderWafer(tx); + switch(md) { + case 8: + super.context.setTexFlags(44); + super.context.setSize(0.25, 0.0, 0.555F, 0.75, 0.3F, 0.805F); + super.context.setIcon(RedPowerLogic.cobblestone); + super.context.calcBounds(); + super.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F); + super.context.renderFaces(62); + Vector3 pos = new Vector3(0.0, -0.3, 0.18); + Quat q = MathLib.orientQuat(tileLogic.Rotation >> 2, tileLogic.Rotation & 3); + q.rotate(pos); + pos.add(super.context.globalOrigin); + q.rightMultiply(leverPositions[tileLogic.Powered ? 1 : 0]); + RenderLib.renderSpecialLever(pos, q, RedPowerLogic.cobblestone, RedPowerLogic.lever); + case 9: + case 10: + case 11: + case 12: + case 15: + default: + break; + case 13: + this.renderChip(-0.125, 0.0, -0.1875, tileLogic.Disabled ? 2 : 1); + this.renderChip(-0.125, 0.0, 0.1875, tileLogic.Active ? 2 : 1); + break; + case 14: + this.renderChip(-0.25, 0.0, -0.25, tileLogic.Disabled ? 9 : 8); + this.renderChip(-0.25, 0.0, 0.25, tileLogic.Active ? 9 : 8); + this.renderChip(0.125, 0.0, 0.0, tileLogic.Powered ? 9 : 8); + break; + case 16: + super.context.setTexFlags(64); + IIcon icon = RedPowerLogic.logicSensor[16 + tileLogic.Deadmap]; + super.context.setIcon(icon, icon, icon, icon, icon, icon); + super.context.renderBox(62, 0.125, 0.0, 0.188F, 0.625, 0.188F, 0.813F); + } + + } + + @Override + protected void renderInvPart(int metadata) { + switch(metadata) { + case 256: + this.renderInvWafer(25); + break; + case 257: + this.renderInvWafer(280); + break; + case 258: + this.renderInvWafer(384); + break; + case 259: + this.renderInvWafer(344); + break; + case 260: + this.renderInvWafer(400); + break; + case 261: + this.renderInvWafer(128); + break; + case 262: + this.renderInvWafer(132); + break; + case 263: + this.renderInvWafer(5); + break; + case 264: + this.renderInvWafer(140); + break; + case 265: + this.renderInvWafer(440); + break; + case 266: + this.renderInvWafer(496); + break; + case 267: + this.renderInvWafer(144); + break; + case 268: + this.renderInvWafer(493); + break; + case 269: + this.renderInvWafer(160); + break; + case 270: + this.renderInvWafer(192); + break; + case 271: + this.renderInvWafer(208); + break; + case 272: + this.renderInvWafer(51); + } + + if (metadata == 264) { + Tessellator tess = Tessellator.instance; + tess.startDrawingQuads(); + super.context.useNormal = true; + super.context.setTexFlags(44); + super.context.setSize(0.25, 0.0, 0.555F, 0.75, 0.3F, 0.805F); + super.context.setIcon(RedPowerLogic.cobblestone); + super.context.calcBounds(); + super.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F); + super.context.renderFaces(62); + super.context.useNormal = false; + tess.draw(); + tess.startDrawingQuads(); + tess.setNormal(0.0F, 0.0F, 1.0F); + Vector3 pos = new Vector3(0.0, -0.3, 0.18); + Quat q = MathLib.orientQuat(0, 3); + q.rotate(pos); + pos.add(super.context.globalOrigin); + q.rightMultiply(leverPositions[0]); + RenderLib.renderSpecialLever(pos, q, RedPowerLogic.cobblestone, RedPowerLogic.lever); + tess.draw(); + } else if (metadata == 269) { + Tessellator tess = Tessellator.instance; + tess.startDrawingQuads(); + super.context.useNormal = true; + this.renderChip(-0.125, 0.0, -0.1875, 2); + this.renderChip(-0.125, 0.0, 0.1875, 2); + super.context.useNormal = false; + tess.draw(); + } else if (metadata == 270) { + Tessellator tess = Tessellator.instance; + tess.startDrawingQuads(); + super.context.useNormal = true; + this.renderChip(-0.25, 0.0, -0.25, 8); + this.renderChip(-0.25, 0.0, 0.25, 8); + this.renderChip(0.125, 0.0, 0.0, 8); + super.context.useNormal = false; + tess.draw(); + } else if (metadata == 272) { + Tessellator tess = Tessellator.instance; + tess.startDrawingQuads(); + super.context.useNormal = true; + IIcon icon = RedPowerLogic.logicSensor[16]; + super.context.setIcon(icon, icon, icon, icon, icon, icon); + super.context.setTexFlags(64); + super.context.renderBox(62, 0.125, 0.0, 0.188F, 0.625, 0.188F, 0.813F); + super.context.useNormal = false; + tess.draw(); + } + + } + + static { + leverPositions[0] = Quat.aroundAxis(1.0, 0.0, 0.0, 0.8639379797371932); + leverPositions[1] = Quat.aroundAxis(1.0, 0.0, 0.0, -0.8639379797371932); + leverPositions[0].multiply(MathLib.orientQuat(0, 3)); + leverPositions[1].multiply(MathLib.orientQuat(0, 3)); + } +} diff --git a/src/main/java/com/eloraam/redpower/logic/RenderLogicStorage.java b/src/main/java/com/eloraam/redpower/logic/RenderLogicStorage.java new file mode 100644 index 0000000..a7c2356 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/logic/RenderLogicStorage.java @@ -0,0 +1,107 @@ +package com.eloraam.redpower.logic; + +import com.eloraam.redpower.core.MathLib; +import com.eloraam.redpower.core.Quat; +import com.eloraam.redpower.core.RenderLib; +import com.eloraam.redpower.core.Vector3; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.world.IBlockAccess; + +@SideOnly(Side.CLIENT) +public class RenderLogicStorage extends RenderLogic { + private static RenderLogic.TorchPos[] torchMapCounter = new RenderLogic.TorchPos[]{ + new RenderLogic.TorchPos(0.0, 0.125, 0.188, 1.0), new RenderLogic.TorchPos(0.3, -0.3, 0.0, 0.6F), new RenderLogic.TorchPos(-0.3, -0.3, 0.0, 0.6F) + }; + + public RenderLogicStorage(Block block) { + super(block); + } + + @Override + protected int getTorchState(TileLogic tileLogic) { + TileLogicStorage tls = (TileLogicStorage)tileLogic; + int md = tileLogic.getExtendedMetadata(); + switch(md) { + case 0: + TileLogicStorage.LogicStorageCounter lsc = (TileLogicStorage.LogicStorageCounter)tls.getLogicStorage(TileLogicStorage.LogicStorageCounter.class); + return 1 | (lsc.Count == lsc.CountMax ? 2 : 0) | (lsc.Count == 0 ? 4 : 0); + default: + return 0; + } + } + + @Override + protected int getInvTorchState(int metadata) { + switch(metadata) { + case 768: + return 5; + default: + return 0; + } + } + + @Override + protected RenderLogic.TorchPos[] getTorchVectors(TileLogic tileLogic) { + int md = tileLogic.getExtendedMetadata(); + switch(md) { + case 0: + return torchMapCounter; + default: + return null; + } + } + + @Override + protected RenderLogic.TorchPos[] getInvTorchVectors(int metadata) { + switch(metadata) { + case 768: + return torchMapCounter; + default: + return null; + } + } + + @Override + protected void renderWorldPart(IBlockAccess iba, TileLogic tileLogic, double x, double y, double z, float partialTicks) { + int md = tileLogic.getExtendedMetadata(); + TileLogicStorage tls = (TileLogicStorage)tileLogic; + switch(md) { + case 0: + int tx = 224 + (tileLogic.Deadmap > 0 ? 4 : 0) + (tileLogic.PowerState & 1) + ((tileLogic.PowerState & 4) >> 1); + this.renderWafer(tx); + TileLogicStorage.LogicStorageCounter lsc = (TileLogicStorage.LogicStorageCounter)tls.getLogicStorage(TileLogicStorage.LogicStorageCounter.class); + if (lsc.CountMax == 0) { + lsc.CountMax = 1; + } + + float dir = 0.58F + 0.34F * ((float)lsc.Count / (float)lsc.CountMax); + Vector3 pos = new Vector3(0.0, -0.1, 0.188); + super.context.basis.rotate(pos); + pos.add(super.context.globalOrigin); + pos.add(0.5, 0.5, 0.5); + Quat q = Quat.aroundAxis(0.0, 1.0, 0.0, (double)(-dir) * Math.PI * 2.0); + q.multiply(MathLib.orientQuat(tileLogic.Rotation >> 2, tileLogic.Rotation & 3)); + RenderLib.renderPointer(pos, q); + } + } + + @Override + protected void renderInvPart(int metadata) { + switch(metadata) { + case 768: + this.renderInvWafer(224); + Tessellator tess = Tessellator.instance; + tess.startDrawingQuads(); + tess.setNormal(0.0F, 0.0F, 1.0F); + Vector3 v = new Vector3(0.0, -0.1, 0.188); + Quat q = Quat.aroundAxis(0.0, 1.0, 0.0, 3.64424747816416); + super.context.basis.rotate(v); + q.multiply(MathLib.orientQuat(0, 1)); + RenderLib.renderPointer(v, q); + tess.draw(); + } + } +} diff --git a/src/main/java/com/eloraam/redpower/logic/TileLogic.java b/src/main/java/com/eloraam/redpower/logic/TileLogic.java new file mode 100644 index 0000000..91c27d9 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/logic/TileLogic.java @@ -0,0 +1,359 @@ +package com.eloraam.redpower.logic; + +import com.eloraam.redpower.RedPowerLogic; +import com.eloraam.redpower.core.BlockMultipart; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.CoverLib; +import com.eloraam.redpower.core.IFrameSupport; +import com.eloraam.redpower.core.IRedPowerConnectable; +import com.eloraam.redpower.core.IRotatable; +import com.eloraam.redpower.core.RedPowerLib; +import com.eloraam.redpower.core.TileCoverable; +import java.util.List; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.IBlockAccess; + +public class TileLogic extends TileCoverable implements IRedPowerConnectable, IRotatable, IFrameSupport { + public int SubId = 0; + public int Rotation = 0; + public boolean Powered = false; + public boolean Disabled = false; + public boolean Active = false; + public int PowerState = 0; + public int Deadmap = 0; + public int Cover = 255; + + @Override + public int getPartMaxRotation(int part, boolean sec) { + return sec ? 0 : (part != this.Rotation >> 2 ? 0 : 3); + } + + @Override + public int getPartRotation(int part, boolean sec) { + return sec ? 0 : (part != this.Rotation >> 2 ? 0 : this.Rotation & 3); + } + + @Override + public void setPartRotation(int part, boolean sec, int rot) { + if (!sec && part == this.Rotation >> 2) { + this.Rotation = rot & 3 | this.Rotation & -4; + this.updateBlockChange(); + } + + } + + @Override + public int getConnectableMask() { + return 15 << (this.Rotation & -4); + } + + @Override + public int getConnectClass(int side) { + return 0; + } + + @Override + public int getCornerPowerMode() { + return 0; + } + + @Override + public int getPoweringMask(int ch) { + return ch != 0 ? 0 : (this.Powered ? RedPowerLib.mapRotToCon(8, this.Rotation) : 0); + } + + @Override + public boolean canAddCover(int side, int cover) { + return this.Cover == 255 && (side ^ 1) == this.Rotation >> 2 && cover <= 254; + } + + @Override + public boolean tryAddCover(int side, int cover) { + if (!this.canAddCover(side, cover)) { + return false; + } else { + this.Cover = cover; + this.updateBlock(); + return true; + } + } + + @Override + public int tryRemoveCover(int side) { + if (this.Cover == 255) { + return -1; + } else if ((side ^ 1) != this.Rotation >> 2) { + return -1; + } else { + int tr = this.Cover; + this.Cover = 255; + this.updateBlock(); + return tr; + } + } + + @Override + public int getCover(int side) { + return this.Cover == 255 ? -1 : ((side ^ 1) != this.Rotation >> 2 ? -1 : this.Cover); + } + + @Override + public int getCoverMask() { + return this.Cover == 255 ? 0 : 1 << (this.Rotation >> 2 ^ 1); + } + + @Override + public boolean blockEmpty() { + return false; + } + + @Override + public void addHarvestContents(List drops) { + super.addHarvestContents(drops); + drops.add(new ItemStack(this.getBlockType(), 1, this.getExtendedID() * 256 + this.SubId)); + } + + private void replaceWithCovers(boolean shouldDrop) { + if (this.Cover != 255) { + short[] covers = new short[26]; + covers[this.Rotation >> 2 ^ 1] = (short)this.Cover; + CoverLib.replaceWithCovers(super.worldObj, super.xCoord, super.yCoord, super.zCoord, 1 << (this.Rotation >> 2 ^ 1), covers); + if (shouldDrop) { + CoreLib.dropItem( + super.worldObj, super.xCoord, super.yCoord, super.zCoord, new ItemStack(this.getBlockType(), 1, this.getExtendedID() * 256 + this.SubId) + ); + } + + this.markForUpdate(); + } else { + this.breakBlock(shouldDrop); + RedPowerLib.updateIndirectNeighbors(super.worldObj, super.xCoord, super.yCoord, super.zCoord, this.getBlockType()); + } + + } + + public boolean tryDropBlock() { + if (RedPowerLib.canSupportWire(super.worldObj, super.xCoord, super.yCoord, super.zCoord, this.Rotation >> 2)) { + return false; + } else { + this.replaceWithCovers(true); + return true; + } + } + + @Override + public void onHarvestPart(EntityPlayer player, int part, boolean willHarvest) { + if (part == this.Rotation >> 2) { + this.replaceWithCovers(willHarvest); + } else { + super.onHarvestPart(player, part, willHarvest); + } + + } + + @Override + public float getPartStrength(EntityPlayer player, int part) { + BlockLogic bl = RedPowerLogic.blockLogic; + return part == this.Rotation >> 2 ? player.getBreakSpeed(bl, false, 0) / (bl.getHardness() * 30.0F) : super.getPartStrength(player, part); + } + + @Override + public void setPartBounds(BlockMultipart block, int part) { + if (part != this.Rotation >> 2) { + super.setPartBounds(block, part); + } else { + switch(part) { + case 0: + block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.125F, 1.0F); + break; + case 1: + block.setBlockBounds(0.0F, 0.875F, 0.0F, 1.0F, 1.0F, 1.0F); + break; + case 2: + block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.125F); + break; + case 3: + block.setBlockBounds(0.0F, 0.0F, 0.875F, 1.0F, 1.0F, 1.0F); + break; + case 4: + block.setBlockBounds(0.0F, 0.0F, 0.0F, 0.125F, 1.0F, 1.0F); + break; + case 5: + block.setBlockBounds(0.875F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + } + } + + } + + @Override + public int getPartsMask() { + int pm = 1 << (this.Rotation >> 2); + if (this.Cover != 255) { + pm |= 1 << (this.Rotation >> 2 ^ 1); + } + + return pm; + } + + @Override + public int getSolidPartsMask() { + return this.getPartsMask(); + } + + @Override + public boolean isBlockStrongPoweringTo(int l) { + return (this.getPoweringMask(0) & RedPowerLib.getConDirMask(l ^ 1)) > 0; + } + + @Override + public boolean isBlockWeakPoweringTo(int l) { + return (this.getPoweringMask(0) & RedPowerLib.getConDirMask(l ^ 1)) > 0; + } + + public Block getBlockType() { + return RedPowerLogic.blockLogic; + } + + @Override + public int getExtendedMetadata() { + return this.SubId; + } + + @Override + public void setExtendedMetadata(int md) { + this.SubId = md; + } + + public void playSound(String name, float f, float f2, boolean always) { + if (always || RedPowerLogic.soundsEnabled) { + super.worldObj + .playSoundEffect((double)((float)super.xCoord + 0.5F), (double)((float)super.yCoord + 0.5F), (double)((float)super.zCoord + 0.5F), name, f, f2); + } + + } + + public void initSubType(int st) { + this.SubId = st; + if (!super.worldObj.isRemote && this.getLightValue() != 9) { + CoreLib.updateAllLightTypes(super.worldObj, super.xCoord, super.yCoord, super.zCoord); + } + + } + + public int getLightValue() { + return 9; + } + + @Override + public void writeFramePacket(NBTTagCompound tag) { + tag.setByte("sid", (byte)this.SubId); + tag.setByte("rot", (byte)this.Rotation); + int ps = this.PowerState | (this.Powered ? 16 : 0) | (this.Disabled ? 32 : 0) | (this.Active ? 64 : 0) | (this.Deadmap > 0 ? 128 : 0); + tag.setByte("ps", (byte)ps); + if (this.Deadmap > 0) { + tag.setByte("dm", (byte)this.Deadmap); + } + + tag.setShort("cov", (short)this.Cover); + } + + @Override + public void readFramePacket(NBTTagCompound tag) { + this.SubId = tag.getByte("sid"); + this.Rotation = tag.getByte("rot"); + int ps = tag.getByte("ps"); + if (super.worldObj.isRemote) { + this.PowerState = ps & 15; + this.Powered = (ps & 16) > 0; + this.Disabled = (ps & 32) > 0; + this.Active = (ps & 64) > 0; + } + + if ((ps & 128) > 0) { + this.Deadmap = tag.getByte("dm"); + } else { + this.Deadmap = 0; + } + + this.Cover = tag.getShort("cov"); + } + + @Override + public void onFrameRefresh(IBlockAccess iba) { + } + + @Override + public void onFramePickup(IBlockAccess iba) { + } + + @Override + public void onFrameDrop() { + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + this.SubId = data.getByte("sid") & 255; + this.Rotation = data.getByte("rot") & 255; + int ps = data.getByte("ps") & 255; + this.Deadmap = data.getByte("dm") & 255; + this.Cover = data.getByte("cov") & 255; + this.PowerState = ps & 15; + this.Powered = (ps & 16) > 0; + this.Disabled = (ps & 32) > 0; + this.Active = (ps & 64) > 0; + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + data.setByte("sid", (byte)this.SubId); + data.setByte("rot", (byte)this.Rotation); + int ps = this.PowerState | (this.Powered ? 16 : 0) | (this.Disabled ? 32 : 0) | (this.Active ? 64 : 0); + data.setByte("ps", (byte)ps); + data.setByte("dm", (byte)this.Deadmap); + data.setByte("cov", (byte)this.Cover); + } + + @Override + protected void readFromPacket(NBTTagCompound tag) { + this.SubId = tag.getByte("sid"); + this.Rotation = tag.getByte("rot"); + int ps = tag.getByte("ps"); + if (super.worldObj.isRemote) { + this.PowerState = ps & 15; + this.Powered = (ps & 16) > 0; + this.Disabled = (ps & 32) > 0; + this.Active = (ps & 64) > 0; + } + + if ((ps & 128) > 0) { + this.Deadmap = tag.getByte("dm"); + } else { + this.Deadmap = 0; + } + + this.Cover = tag.getShort("cov"); + } + + @Override + protected void writeToPacket(NBTTagCompound tag) { + tag.setByte("sid", (byte)this.SubId); + tag.setByte("rot", (byte)this.Rotation); + int ps = this.PowerState | (this.Powered ? 16 : 0) | (this.Disabled ? 32 : 0) | (this.Active ? 64 : 0) | (this.Deadmap > 0 ? 128 : 0); + tag.setByte("ps", (byte)ps); + if (this.Deadmap > 0) { + tag.setByte("dm", (byte)this.Deadmap); + } + + tag.setShort("cov", (short)this.Cover); + } + + @Override + protected ItemStack getBasePickStack() { + return new ItemStack(this.getBlockType(), 1, this.getExtendedID() * 256 + this.SubId); + } +} diff --git a/src/main/java/com/eloraam/redpower/logic/TileLogicAdv.java b/src/main/java/com/eloraam/redpower/logic/TileLogicAdv.java new file mode 100644 index 0000000..d9b56e1 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/logic/TileLogicAdv.java @@ -0,0 +1,336 @@ +package com.eloraam.redpower.logic; + +import com.eloraam.redpower.core.IRedPowerWiring; +import com.eloraam.redpower.core.RedPowerLib; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.nbt.NBTTagCompound; + +public class TileLogicAdv extends TileLogic implements IRedPowerWiring { + TileLogicAdv.LogicAdvModule storage; + + @Override + public void updateCurrentStrength() { + this.initStorage(); + this.storage.updateCurrentStrength(); + } + + @Override + public int getCurrentStrength(int cons, int ch) { + this.initStorage(); + return (this.storage.getPoweringMask(ch) & cons) > 0 ? 255 : -1; + } + + @Override + public int scanPoweringStrength(int cons, int ch) { + return 0; + } + + @Override + public int getConnectionMask() { + return RedPowerLib.mapRotToCon(15, super.Rotation); + } + + @Override + public int getExtConnectionMask() { + return 0; + } + + @Override + public int getConnectClass(int side) { + int s = RedPowerLib.mapRotToCon(10, super.Rotation); + return (s & RedPowerLib.getConDirMask(side)) > 0 ? 18 : 0; + } + + @Override + public int getExtendedID() { + return 4; + } + + @Override + public void initSubType(int st) { + super.SubId = st; + this.initStorage(); + } + + public T getLogicStorage(Class cl) { + if (!cl.isInstance(this.storage)) { + this.initStorage(); + } + + return (T) this.storage; + } + + public boolean isUseableByPlayer(EntityPlayer player) { + return !this.isInvalid() + && super.worldObj.getTileEntity(super.xCoord, super.yCoord, super.zCoord) == this + && player.getDistanceSq((double) super.xCoord + 0.5, (double) super.yCoord + 0.5, + (double) super.zCoord + 0.5) <= 64.0; + } + + @Override + public int getPartMaxRotation(int part, boolean sec) { + if (sec) { + switch (super.SubId) { + case 0: + return 1; + } + } + + return super.getPartMaxRotation(part, sec); + } + + @Override + public int getPartRotation(int part, boolean sec) { + if (sec) { + switch (super.SubId) { + case 0: + return super.Deadmap; + } + } + + return super.getPartRotation(part, sec); + } + + @Override + public void setPartRotation(int part, boolean sec, int rot) { + if (sec) { + switch (super.SubId) { + case 0: + super.Deadmap = rot; + this.updateBlockChange(); + return; + } + } + + super.setPartRotation(part, sec, rot); + } + + void initStorage() { + if (this.storage == null || this.storage.getSubType() != super.SubId) { + switch (super.SubId) { + case 0: + this.storage = new TileLogicAdv.LogicAdvXcvr(); + break; + default: + this.storage = null; + } + } + + } + + @Override + public void onBlockNeighborChange(Block block) { + if (!this.tryDropBlock()) { + this.initStorage(); + switch (super.SubId) { + case 0: + if (this.isTickRunnable()) { + return; + } + + this.storage.updatePowerState(); + } + } + + } + + @Override + public void onTileTick() { + this.initStorage(); + this.storage.tileTick(); + } + + @Override + public int getPoweringMask(int ch) { + this.initStorage(); + return this.storage.getPoweringMask(ch); + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + this.initStorage(); + this.storage.readFromNBT(data); + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + this.storage.writeToNBT(data); + } + + @Override + public void writeFramePacket(NBTTagCompound tag) { + this.storage.writeToNBT(tag); + super.writeFramePacket(tag); + } + + @Override + public void readFramePacket(NBTTagCompound tag) { + this.storage.readFromNBT(tag); + super.readFramePacket(tag); + } + + public abstract class LogicAdvModule { + public abstract void updatePowerState(); + + public abstract void tileTick(); + + public abstract int getSubType(); + + public abstract int getPoweringMask(int var1); + + public void updateCurrentStrength() { + } + + public abstract void readFromNBT(NBTTagCompound var1); + + public abstract void writeToNBT(NBTTagCompound var1); + + public void readFromPacket(NBTTagCompound tag) { + } + + public void writeToPacket(NBTTagCompound tag) { + } + } + + public class LogicAdvXcvr extends TileLogicAdv.LogicAdvModule { + public int State1 = 0; + public int State2 = 0; + public int State1N = 0; + public int State2N = 0; + + @Override + public void updatePowerState() { + int ps = RedPowerLib.getRotPowerState( + TileLogicAdv.this.worldObj, + TileLogicAdv.this.xCoord, + TileLogicAdv.this.yCoord, + TileLogicAdv.this.zCoord, + 5, + TileLogicAdv.super.Rotation, + 0); + if (ps != TileLogicAdv.this.PowerState) { + TileLogicAdv.this.PowerState = ps; + TileLogicAdv.this.updateBlock(); + TileLogicAdv.this.scheduleTick(2); + } + + } + + @Override + public void tileTick() { + TileLogicAdv.this.Powered = ((TileLogicAdv.this.PowerState & 0x1) > 0); + TileLogicAdv.this.Active = ((TileLogicAdv.this.PowerState & 0x4) > 0); + int sd1 = this.State1N; + int sd2 = this.State2N; + if (TileLogicAdv.this.Deadmap == 0) { + if (!TileLogicAdv.this.Powered) { + sd1 = 0; + } + if (!TileLogicAdv.this.Active) { + sd2 = 0; + } + } else { + if (!TileLogicAdv.this.Powered) { + sd2 = 0; + } + if (!TileLogicAdv.this.Active) { + sd1 = 0; + } + } + final boolean ch = this.State1 != sd1 || this.State2 != sd2; + this.State1 = sd1; + this.State2 = sd2; + if (ch) { + TileLogicAdv.this.updateBlock(); + RedPowerLib.updateCurrent(TileLogicAdv.this.worldObj, TileLogicAdv.this.xCoord, TileLogicAdv.this.yCoord, + TileLogicAdv.this.zCoord); + } + this.updatePowerState(); + this.updateCurrentStrength(); + } + + @Override + public int getSubType() { + return 0; + } + + @Override + public int getPoweringMask(int ch) { + int ps = 0; + if (ch >= 1 && ch <= 16) { + --ch; + if ((this.State1 >> ch & 1) > 0) { + ps |= 8; + } + + if ((this.State2 >> ch & 1) > 0) { + ps |= 2; + } + + return RedPowerLib.mapRotToCon(ps, TileLogicAdv.super.Rotation); + } else { + return 0; + } + } + + @Override + public void updateCurrentStrength() { + if (!TileLogicAdv.this.isTickRunnable()) { + this.State1N = this.State2; + this.State2N = this.State1; + + for (int ch = 0; ch < 16; ++ch) { + short p1 = (short) RedPowerLib.updateBlockCurrentStrength(TileLogicAdv.this.worldObj, TileLogicAdv.this, + TileLogicAdv.this.xCoord, TileLogicAdv.this.yCoord, TileLogicAdv.this.zCoord, + RedPowerLib.mapRotToCon(2, TileLogicAdv.this.Rotation), 2 << ch); + short p2 = (short) RedPowerLib.updateBlockCurrentStrength(TileLogicAdv.this.worldObj, TileLogicAdv.this, + TileLogicAdv.this.xCoord, TileLogicAdv.this.yCoord, TileLogicAdv.this.zCoord, + RedPowerLib.mapRotToCon(8, TileLogicAdv.this.Rotation), 2 << ch); + if (p1 > 0) { + this.State1N |= 1 << ch; + } + if (p2 > 0) { + this.State2N |= 1 << ch; + } + } + + TileLogicAdv.this.markDirty(); + if (this.State1N != this.State1 || this.State2N != this.State2) { + TileLogicAdv.this.scheduleTick(2); + } + } + + } + + @Override + public void readFromNBT(NBTTagCompound tag) { + this.State1 = tag.getInteger("s1"); + this.State2 = tag.getInteger("s2"); + this.State1N = tag.getInteger("s1n"); + this.State2N = tag.getInteger("s2n"); + } + + @Override + public void writeToNBT(NBTTagCompound tag) { + tag.setInteger("s1", this.State1); + tag.setInteger("s2", this.State2); + tag.setInteger("s1n", this.State1N); + tag.setInteger("s2n", this.State2N); + } + + @Override + public void readFromPacket(NBTTagCompound tag) { + this.State1 = tag.getInteger("s1"); + this.State2 = tag.getInteger("s2"); + } + + @Override + public void writeToPacket(NBTTagCompound tag) { + tag.setInteger("s1", this.State1); + tag.setInteger("s2", this.State2); + } + } +} diff --git a/src/main/java/com/eloraam/redpower/logic/TileLogicArray.java b/src/main/java/com/eloraam/redpower/logic/TileLogicArray.java new file mode 100644 index 0000000..04cb929 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/logic/TileLogicArray.java @@ -0,0 +1,183 @@ +package com.eloraam.redpower.logic; + +import com.eloraam.redpower.core.BlockMultipart; +import com.eloraam.redpower.core.IRedPowerWiring; +import com.eloraam.redpower.core.RedPowerLib; +import net.minecraft.block.Block; +import net.minecraft.nbt.NBTTagCompound; + +public class TileLogicArray extends TileLogic implements IRedPowerWiring { + public short PowerVal1 = 0; + public short PowerVal2 = 0; + + @Override + public int getPoweringMask(int ch) { + if (ch != 0) { + return 0; + } else { + int tr = 0; + if (this.PowerVal1 > 0) { + tr |= RedPowerLib.mapRotToCon(10, super.Rotation); + } + + if (this.PowerVal2 > 0) { + tr |= RedPowerLib.mapRotToCon(5, super.Rotation); + } + + return tr; + } + } + + @Override + public void updateCurrentStrength() { + this.PowerVal2 = (short)RedPowerLib.updateBlockCurrentStrength( + super.worldObj, this, super.xCoord, super.yCoord, super.zCoord, RedPowerLib.mapRotToCon(5, super.Rotation), 1 + ); + this.PowerVal1 = (short)RedPowerLib.updateBlockCurrentStrength( + super.worldObj, this, super.xCoord, super.yCoord, super.zCoord, RedPowerLib.mapRotToCon(10, super.Rotation), 1 + ); + this.updateBlock(); + } + + @Override + public int getCurrentStrength(int cons, int ch) { + return ch != 0 + ? -1 + : ( + (RedPowerLib.mapRotToCon(5, super.Rotation) & cons) > 0 + ? this.PowerVal2 + : ((RedPowerLib.mapRotToCon(10, super.Rotation) & cons) > 0 ? this.PowerVal1 : -1) + ); + } + + @Override + public int scanPoweringStrength(int cons, int ch) { + if (ch != 0) { + return 0; + } else { + int r1 = RedPowerLib.mapRotToCon(5, super.Rotation); + int r2 = RedPowerLib.mapRotToCon(10, super.Rotation); + return (r1 & cons) > 0 + ? (super.Powered ? 255 : (RedPowerLib.isPowered(super.worldObj, super.xCoord, super.yCoord, super.zCoord, r1 & cons, 0) ? 255 : 0)) + : ((r2 & cons) > 0 ? (RedPowerLib.isPowered(super.worldObj, super.xCoord, super.yCoord, super.zCoord, r2 & cons, 0) ? 255 : 0) : 0); + } + } + + @Override + public int getConnectionMask() { + return RedPowerLib.mapRotToCon(15, super.Rotation); + } + + @Override + public int getExtConnectionMask() { + return 0; + } + + public int getTopwireMask() { + return RedPowerLib.mapRotToCon(5, super.Rotation); + } + + private boolean cellWantsPower() { + return super.SubId == 1 ? super.PowerState == 0 : super.PowerState != 0; + } + + private void updatePowerState() { + super.PowerState = this.PowerVal1 > 0 ? 1 : 0; + if (this.cellWantsPower() != super.Powered) { + this.scheduleTick(2); + } + + } + + @Override + public int getExtendedID() { + return 2; + } + + @Override + public void onBlockNeighborChange(Block block) { + if (!this.tryDropBlock()) { + RedPowerLib.updateCurrent(super.worldObj, super.xCoord, super.yCoord, super.zCoord); + if (super.SubId != 0 && !this.isTickRunnable()) { + this.updatePowerState(); + } + } + + } + + @Override + public boolean isBlockStrongPoweringTo(int l) { + return !RedPowerLib.isSearching() && (this.getPoweringMask(0) & RedPowerLib.getConDirMask(l ^ 1)) > 0; + } + + @Override + public boolean isBlockWeakPoweringTo(int l) { + return !RedPowerLib.isSearching() && (this.getPoweringMask(0) & RedPowerLib.getConDirMask(l ^ 1)) > 0; + } + + @Override + public void onTileTick() { + if (super.Powered != this.cellWantsPower()) { + super.Powered = !super.Powered; + this.updateBlockChange(); + this.updatePowerState(); + } + + } + + @Override + public void setPartBounds(BlockMultipart block, int part) { + if (part != super.Rotation >> 2) { + super.setPartBounds(block, part); + } else { + switch(part) { + case 0: + block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.75F, 1.0F); + break; + case 1: + block.setBlockBounds(0.0F, 0.15F, 0.0F, 1.0F, 1.0F, 1.0F); + break; + case 2: + block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.75F); + break; + case 3: + block.setBlockBounds(0.0F, 0.0F, 0.15F, 1.0F, 1.0F, 1.0F); + break; + case 4: + block.setBlockBounds(0.0F, 0.0F, 0.0F, 0.75F, 1.0F, 1.0F); + break; + case 5: + block.setBlockBounds(0.15F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + } + } + + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + this.PowerVal1 = (short)(data.getByte("pv1") & 255); + this.PowerVal2 = (short)(data.getByte("pv2") & 255); + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + data.setByte("pv1", (byte)this.PowerVal1); + data.setByte("pv2", (byte)this.PowerVal2); + } + + @Override + protected void readFromPacket(NBTTagCompound buffer) { + this.PowerVal1 = buffer.getShort("pv1"); + this.PowerVal2 = buffer.getShort("pv2"); + super.readFromPacket(buffer); + } + + @Override + protected void writeToPacket(NBTTagCompound data) { + data.setShort("pv1", this.PowerVal1); + data.setShort("pv2", this.PowerVal2); + super.writeToPacket(data); + } +} diff --git a/src/main/java/com/eloraam/redpower/logic/TileLogicPointer.java b/src/main/java/com/eloraam/redpower/logic/TileLogicPointer.java new file mode 100644 index 0000000..efe48f9 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/logic/TileLogicPointer.java @@ -0,0 +1,436 @@ +package com.eloraam.redpower.logic; + +import com.eloraam.redpower.RedPowerLogic; +import com.eloraam.redpower.core.MathLib; +import com.eloraam.redpower.core.Quat; +import com.eloraam.redpower.core.RedPowerLib; +import com.eloraam.redpower.core.Vector3; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.nbt.NBTTagCompound; + +public class TileLogicPointer extends TileLogic implements IPointerTile { + private long timestart = 0L; + public long interval = 40L; + + @Override + public void initSubType(int st) { + super.initSubType(st); + switch(st) { + case 0: + this.interval = 38L; + break; + case 2: + super.Disabled = true; + } + + } + + @Override + public int getPartMaxRotation(int part, boolean sec) { + return !sec || super.SubId != 1 && super.SubId != 2 ? super.getPartMaxRotation(part, sec) : 1; + } + + @Override + public int getPartRotation(int part, boolean sec) { + return !sec || super.SubId != 1 && super.SubId != 2 ? super.getPartRotation(part, sec) : super.Deadmap; + } + + @Override + public void setPartRotation(int part, boolean sec, int rot) { + if (!sec || super.SubId != 1 && super.SubId != 2) { + super.setPartRotation(part, sec, rot); + } else { + super.Deadmap = rot; + this.updateBlockChange(); + } + + } + + private void timerChange() { + int ps = RedPowerLib.getRotPowerState(super.worldObj, super.xCoord, super.yCoord, super.zCoord, 7, super.Rotation, 0); + if (ps != super.PowerState) { + this.updateBlock(); + } + + super.PowerState = ps; + if (super.Powered) { + if (!super.Disabled) { + return; + } + + if (ps > 0) { + return; + } + + super.Powered = false; + super.Disabled = false; + this.timestart = super.worldObj.getWorldTime(); + this.updateBlock(); + } else if (super.Disabled) { + if (ps > 0) { + return; + } + + this.timestart = super.worldObj.getWorldTime(); + super.Disabled = false; + this.updateBlock(); + } else { + if (ps == 0) { + return; + } + + super.Disabled = true; + this.updateBlock(); + } + + } + + private void timerTick() { + int ps = RedPowerLib.getRotPowerState(super.worldObj, super.xCoord, super.yCoord, super.zCoord, 7, super.Rotation, 0); + if (ps != super.PowerState) { + this.updateBlock(); + } + + super.PowerState = ps; + if (super.Powered) { + if (super.Disabled) { + if (ps > 0) { + super.Powered = false; + this.updateBlock(); + return; + } + + super.Disabled = false; + super.Powered = false; + this.timestart = super.worldObj.getWorldTime(); + this.updateBlock(); + return; + } + + if (ps == 0) { + super.Powered = false; + } else { + super.Disabled = true; + this.scheduleTick(2); + } + + this.timestart = super.worldObj.getWorldTime(); + this.updateBlockChange(); + } else if (super.Disabled) { + if (ps > 0) { + return; + } + + this.timestart = super.worldObj.getWorldTime(); + super.Disabled = false; + this.updateBlock(); + } else { + if (ps == 0) { + return; + } + + super.Disabled = true; + this.updateBlock(); + } + + } + + private void timerUpdate() { + if (!super.worldObj.isRemote && !super.Powered && !super.Disabled) { + long wt = super.worldObj.getWorldTime(); + if (this.interval < 2L) { + this.interval = 2L; + } + + if (this.timestart > wt) { + this.timestart = wt; + } + + if (this.timestart + this.interval <= wt) { + this.playSound("random.click", 0.3F, 0.5F, false); + super.Powered = true; + this.scheduleTick(2); + this.updateBlockChange(); + } + } + + } + + private void sequencerUpdate() { + long wt = super.worldObj.getWorldTime() + 6000L; + float f = (float)wt / (float)(this.interval * 4L); + int i = (int)Math.floor((double)(f * 4.0F)); + if (super.Deadmap == 1) { + i = 3 - i & 3; + } else { + i = i + 3 & 3; + } + + if (super.PowerState != i && !super.worldObj.isRemote) { + this.playSound("random.click", 0.3F, 0.5F, false); + super.PowerState = i; + this.updateBlockChange(); + } + + } + + private void stateCellChange() { + int ps = RedPowerLib.getRotPowerState(super.worldObj, super.xCoord, super.yCoord, super.zCoord, 7, super.Rotation, 0); + if (ps != super.PowerState) { + this.updateBlock(); + } + + super.PowerState = ps; + boolean ps3 = super.Deadmap == 0 ? (ps & 3) > 0 : (ps & 6) > 0; + if (super.Disabled && !ps3) { + super.Disabled = false; + this.timestart = super.worldObj.getWorldTime(); + this.updateBlock(); + } else if (!super.Disabled && ps3) { + super.Disabled = true; + this.updateBlock(); + } + + if (!super.Active && !super.Powered && (ps & 2) > 0) { + super.Powered = true; + this.updateBlock(); + this.scheduleTick(2); + } + + } + + private void stateCellTick() { + if (!super.Active && super.Powered) { + super.Powered = false; + super.Active = true; + this.timestart = super.worldObj.getWorldTime(); + this.updateBlockChange(); + } else if (super.Active && super.Powered) { + super.Powered = false; + super.Active = false; + this.updateBlockChange(); + } + + } + + private void stateCellUpdate() { + if (!super.worldObj.isRemote && super.Active && !super.Powered && !super.Disabled) { + long wt = super.worldObj.getWorldTime(); + if (this.interval < 2L) { + this.interval = 2L; + } + + if (this.timestart > wt) { + this.timestart = wt; + } + + if (this.timestart + this.interval <= wt) { + this.playSound("random.click", 0.3F, 0.5F, false); + super.Powered = true; + this.scheduleTick(2); + this.updateBlockChange(); + } + } + + } + + @Override + public void onBlockNeighborChange(Block block) { + if (!this.tryDropBlock()) { + switch(super.SubId) { + case 0: + this.timerChange(); + break; + case 2: + this.stateCellChange(); + } + } + + } + + @Override + public void onTileTick() { + switch(super.SubId) { + case 0: + this.timerTick(); + break; + case 2: + this.stateCellTick(); + } + + } + + @Override + public int getPoweringMask(int ch) { + if (ch != 0) { + return 0; + } else { + switch(super.SubId) { + case 0: + if (!super.Disabled && super.Powered) { + return RedPowerLib.mapRotToCon(13, super.Rotation); + } + + return 0; + case 1: + return RedPowerLib.mapRotToCon(1 << super.PowerState, super.Rotation); + case 2: + int ps = (super.Active && super.Powered ? 8 : 0) | (super.Active && !super.Powered ? (super.Deadmap == 0 ? 4 : 1) : 0); + return RedPowerLib.mapRotToCon(ps, super.Rotation); + default: + return 0; + } + } + } + + @Override + public boolean onPartActivateSide(EntityPlayer player, int part, int side) { + if (part == super.Rotation >> 2 && !player.isSneaking() && !super.worldObj.isRemote) { + player.openGui(RedPowerLogic.instance, 2, super.worldObj, super.xCoord, super.yCoord, super.zCoord); + return true; + } else { + return false; + } + } + + @Override + public void updateEntity() { + super.updateEntity(); + switch(super.SubId) { + case 0: + this.timerUpdate(); + break; + case 1: + this.sequencerUpdate(); + break; + case 2: + this.stateCellUpdate(); + } + + } + + @Override + public float getPointerDirection(float partialTicks) { + if (super.SubId == 0) { + if (!super.Powered && !super.Disabled) { + long wt = super.worldObj.getWorldTime(); + float ivt = ((float)wt + partialTicks - (float)this.timestart) / (float)this.interval; + if (ivt > 1.0F) { + ivt = 1.0F; + } + + return ivt + 0.75F; + } else { + return 0.75F; + } + } else if (super.SubId == 1) { + long wt = super.worldObj.getWorldTime() + 6000L; + float ivt = ((float)wt + partialTicks) / (float)(this.interval * 4L); + if (super.Deadmap == 1) { + ivt = 0.75F - ivt; + } else { + ivt += 0.75F; + } + + return ivt; + } else if (super.SubId != 2) { + return 0.0F; + } else { + if (super.Deadmap > 0) { + if (!super.Active || super.Disabled) { + return 1.0F; + } + + if (super.Active && super.Powered) { + return 0.8F; + } + } else { + if (!super.Active || super.Disabled) { + return 0.5F; + } + + if (super.Active && super.Powered) { + return 0.7F; + } + } + + long wt = super.worldObj.getWorldTime(); + float ivt = ((float)wt + partialTicks - (float)this.timestart) / (float)this.interval; + return super.Deadmap > 0 ? 1.0F - 0.2F * ivt : 0.5F + 0.2F * ivt; + } + } + + @Override + public Quat getOrientationBasis() { + return MathLib.orientQuat(super.Rotation >> 2, super.Rotation & 3); + } + + public Vector3 getPointerOrigin() { + return super.SubId == 2 ? (super.Deadmap > 0 ? new Vector3(0.0, -0.1, -0.25) : new Vector3(0.0, -0.1, 0.25)) : new Vector3(0.0, -0.1, 0.0); + } + + public void setInterval(long iv) { + if (super.SubId == 0) { + this.interval = iv - 2L; + } else { + this.interval = iv; + } + + } + + public long getInterval() { + return super.SubId == 0 ? this.interval + 2L : this.interval; + } + + public boolean isUseableByPlayer(EntityPlayer player) { + return !this.isInvalid() + && super.worldObj.getTileEntity(super.xCoord, super.yCoord, super.zCoord) == this + && player.getDistanceSq((double)super.xCoord + 0.5, (double)super.yCoord + 0.5, (double)super.zCoord + 0.5) <= 64.0; + } + + @Override + public int getExtendedID() { + return 0; + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + this.interval = data.getLong("iv"); + if (super.SubId == 0 || super.SubId == 2) { + this.timestart = data.getLong("ts"); + } + + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + data.setLong("iv", this.interval); + if (super.SubId == 0 || super.SubId == 2) { + data.setLong("ts", this.timestart); + } + + } + + @Override + protected void readFromPacket(NBTTagCompound tag) { + this.interval = tag.getLong("iv"); + super.readFromPacket(tag); + if (super.SubId == 0 || super.SubId == 2) { + this.timestart = tag.getLong("ts"); + } + + } + + @Override + protected void writeToPacket(NBTTagCompound tag) { + tag.setLong("iv", this.interval); + super.writeToPacket(tag); + if (super.SubId == 0 || super.SubId == 2) { + tag.setLong("ts", this.timestart); + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/logic/TileLogicSimple.java b/src/main/java/com/eloraam/redpower/logic/TileLogicSimple.java new file mode 100644 index 0000000..e9291bb --- /dev/null +++ b/src/main/java/com/eloraam/redpower/logic/TileLogicSimple.java @@ -0,0 +1,805 @@ +package com.eloraam.redpower.logic; + +import com.eloraam.redpower.core.RedPowerLib; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; + +public class TileLogicSimple extends TileLogic { + private static final int[] toDead = new int[]{0, 1, 2, 4, 6, 5, 3}; + private static final int[] fromDead = new int[]{0, 1, 2, 6, 3, 5, 4}; + private static final int[] toDeadNot = new int[]{0, 1, 8, 4, 12, 5, 9}; + private static final int[] fromDeadNot = new int[]{0, 1, 0, 0, 3, 5, 0, 0, 2, 6, 0, 0, 4}; + private static final int[] toDeadBuf = new int[]{0, 1, 4, 5}; + private static final int[] fromDeadBuf = new int[]{0, 1, 0, 0, 2, 3}; + private static int[] tickSchedule = new int[]{2, 4, 6, 8, 16, 32, 64, 128, 256}; + + @Override + public void initSubType(int st) { + super.initSubType(st); + } + + @Override + public int getPartMaxRotation(int part, boolean sec) { + if (sec) { + switch(super.SubId) { + case 0: + return 3; + case 1: + case 2: + case 3: + case 4: + case 9: + return 6; + case 5: + case 6: + case 7: + case 8: + case 12: + case 13: + case 14: + default: + break; + case 10: + return 3; + case 11: + case 15: + return 1; + case 16: + return 3; + } + } + + return super.getPartMaxRotation(part, sec); + } + + @Override + public int getPartRotation(int part, boolean sec) { + if (sec) { + switch(super.SubId) { + case 0: + return super.Deadmap; + case 1: + case 2: + case 3: + case 4: + return fromDead[super.Deadmap]; + case 5: + case 6: + case 7: + case 8: + case 12: + case 13: + case 14: + default: + break; + case 9: + return fromDeadNot[super.Deadmap]; + case 10: + return fromDeadBuf[super.Deadmap]; + case 11: + case 15: + case 16: + return super.Deadmap; + } + } + + return super.getPartRotation(part, sec); + } + + @Override + public void setPartRotation(int part, boolean sec, int rot) { + if (sec) { + switch(super.SubId) { + case 0: + super.Deadmap = rot; + super.PowerState = 0; + super.Active = false; + super.Powered = false; + this.updateBlockChange(); + return; + case 1: + case 2: + case 3: + case 4: + super.Deadmap = toDead[rot]; + this.updateBlockChange(); + return; + case 5: + case 6: + case 7: + case 8: + case 12: + case 13: + case 14: + default: + break; + case 9: + super.Deadmap = toDeadNot[rot]; + this.updateBlockChange(); + return; + case 10: + super.Deadmap = toDeadBuf[rot]; + this.updateBlockChange(); + return; + case 11: + case 15: + case 16: + super.Deadmap = rot; + this.updateBlockChange(); + return; + } + } + + super.setPartRotation(part, sec, rot); + } + + private void latchUpdatePowerState() { + if (!super.Disabled || super.Active) { + int ps = RedPowerLib.getRotPowerState(super.worldObj, super.xCoord, super.yCoord, super.zCoord, 5, super.Rotation, 0); + if (ps != super.PowerState) { + this.updateBlock(); + } + + super.PowerState = ps; + if (!this.isTickRunnable()) { + if (super.Active) { + if (ps == 5) { + super.Disabled = true; + } else { + super.Disabled = false; + } + } else if ((ps != 1 || !super.Powered) && (ps != 4 || super.Powered)) { + if (ps == 5) { + super.Active = true; + super.Disabled = true; + super.Powered = !super.Powered; + this.scheduleTick(2); + this.updateBlockChange(); + } + } else { + super.Powered = !super.Powered; + super.Active = true; + this.playSound("random.click", 0.3F, 0.5F, false); + this.scheduleTick(2); + this.updateBlockChange(); + } + } + } + + } + + private void latchTick() { + if (super.Active) { + super.Active = false; + if (super.Disabled) { + this.updateBlockChange(); + this.scheduleTick(2); + } else { + this.updateBlockChange(); + } + } else if (super.Disabled) { + int ps = RedPowerLib.getRotPowerState(super.worldObj, super.xCoord, super.yCoord, super.zCoord, 5, super.Rotation, 0); + if (ps != super.PowerState) { + this.updateBlock(); + } + + super.PowerState = ps; + switch(ps) { + case 0: + super.Disabled = false; + super.Powered = super.worldObj.rand.nextInt(2) == 0; + this.updateBlockChange(); + break; + case 1: + super.Disabled = false; + super.Powered = false; + this.updateBlockChange(); + this.playSound("random.click", 0.3F, 0.5F, false); + case 2: + case 3: + default: + break; + case 4: + super.Disabled = false; + super.Powered = true; + this.updateBlockChange(); + this.playSound("random.click", 0.3F, 0.5F, false); + break; + case 5: + this.scheduleTick(4); + } + } + + } + + private int latch2NextState() { + if ((super.PowerState & 5) == 0) { + return super.PowerState; + } else { + int ps = super.PowerState & 5 | 10; + if (super.Deadmap == 2) { + if ((ps & 1) > 0) { + ps &= -9; + } + + if ((ps & 4) > 0) { + ps &= -3; + } + } else { + if ((ps & 1) > 0) { + ps &= -3; + } + + if ((ps & 4) > 0) { + ps &= -9; + } + } + + return ps; + } + } + + private void latch2UpdatePowerState() { + int ps = RedPowerLib.getRotPowerState(super.worldObj, super.xCoord, super.yCoord, super.zCoord, 5, super.Rotation, 0); + boolean upd = false; + if (ps != (super.PowerState & 5)) { + super.PowerState = super.PowerState & 10 | ps; + upd = true; + } + + int p2 = this.latch2NextState(); + if (p2 != super.PowerState || (super.PowerState & 5) == 0) { + this.scheduleTick(2); + upd = true; + } + + if (upd) { + this.updateBlock(); + } + + } + + private void latchChange() { + if (super.Deadmap < 2) { + this.latchUpdatePowerState(); + } else { + if (this.isTickRunnable()) { + return; + } + + this.latch2UpdatePowerState(); + } + + } + + private void latch2Tick() { + boolean upd = false; + if (super.PowerState == 0) { + super.PowerState |= super.worldObj.rand.nextInt(2) == 0 ? 1 : 4; + upd = true; + } + + int ps = this.latch2NextState(); + if (ps != super.PowerState) { + super.PowerState = ps; + upd = true; + } + + if (upd) { + this.updateBlockChange(); + } + + this.latch2UpdatePowerState(); + } + + private void pulseChange() { + if (super.Active) { + int ps = RedPowerLib.getRotPowerState(super.worldObj, super.xCoord, super.yCoord, super.zCoord, 2, super.Rotation, 0); + if (ps == 0) { + super.Active = false; + this.updateBlock(); + } + } else if (!super.Powered) { + int ps = RedPowerLib.getRotPowerState(super.worldObj, super.xCoord, super.yCoord, super.zCoord, 2, super.Rotation, 0); + if (ps > 0) { + super.Powered = true; + this.updateBlockChange(); + this.scheduleTick(2); + } + } + + } + + private void pulseTick() { + if (super.Powered) { + super.Powered = false; + int ps = RedPowerLib.getRotPowerState(super.worldObj, super.xCoord, super.yCoord, super.zCoord, 2, super.Rotation, 0); + if (ps > 0) { + super.Active = true; + } + + this.updateBlockChange(); + } + + } + + private void toggleUpdatePowerState() { + int ps = RedPowerLib.getRotPowerState(super.worldObj, super.xCoord, super.yCoord, super.zCoord, 5, super.Rotation, 0); + if (ps != super.PowerState) { + int t = 5 & ps & ~super.PowerState; + if (t == 1 || t == 4) { + super.Active = true; + } + + super.PowerState = ps; + this.updateBlock(); + if (super.Active) { + this.scheduleTick(2); + } + } + + } + + private void toggleTick() { + if (super.Active) { + this.playSound("random.click", 0.3F, 0.5F, false); + super.Powered = !super.Powered; + super.Active = false; + this.updateBlockChange(); + } + + this.toggleUpdatePowerState(); + } + + private void repUpdatePowerState() { + if (!super.Active) { + int ps = RedPowerLib.getRotPowerState(super.worldObj, super.xCoord, super.yCoord, super.zCoord, 2, super.Rotation, 0); + if (ps != super.PowerState) { + this.updateBlock(); + } + + super.PowerState = ps; + boolean pwr = super.PowerState > 0; + if (pwr != super.Powered) { + super.Active = true; + this.scheduleTick(tickSchedule[super.Deadmap]); + } + } + + } + + private void repTick() { + if (super.Active) { + super.Powered = !super.Powered; + super.Active = false; + this.updateBlockChange(); + this.repUpdatePowerState(); + } + + } + + private void syncChange() { + int ps = RedPowerLib.getRotPowerState(super.worldObj, super.xCoord, super.yCoord, super.zCoord, 7, super.Rotation, 0); + int psc = ps & ~super.PowerState; + if (ps != super.PowerState) { + this.updateBlock(); + } + + super.PowerState = ps; + boolean upd = false; + if ((ps & 2) == 2) { + if (!super.Powered && (super.Active || super.Disabled)) { + super.Active = false; + super.Disabled = false; + upd = true; + } + } else { + if ((psc & 1) > 0 && !super.Active) { + super.Active = true; + upd = true; + } + + if ((psc & 4) > 0 && !super.Disabled) { + super.Disabled = true; + upd = true; + } + } + + if (upd) { + this.updateBlock(); + this.scheduleTick(2); + } + + } + + private void syncTick() { + if (super.Active && super.Disabled && !super.Powered) { + super.Powered = true; + super.Active = false; + super.Disabled = false; + this.scheduleTick(2); + this.updateBlockChange(); + } else if (super.Powered) { + super.Powered = false; + this.updateBlockChange(); + } + + } + + private void randUpdatePowerState() { + int ps = RedPowerLib.getRotPowerState(super.worldObj, super.xCoord, super.yCoord, super.zCoord, 15, super.Rotation, 0); + int psc = ps & ~super.PowerState; + if (ps != super.PowerState) { + this.updateBlock(); + } + + super.PowerState = ps; + if ((psc & 2) > 0) { + this.scheduleTick(2); + } + + } + + private void randTick() { + if ((super.PowerState & 2) != 0) { + int rv = super.worldObj.rand.nextInt(8); + super.Disabled = (rv & 1) > 0; + super.Active = (rv & 2) > 0; + super.Powered = (rv & 4) > 0; + this.updateBlockChange(); + this.randUpdatePowerState(); + if ((super.PowerState & 2) > 0) { + this.scheduleTick(4); + } + } + + } + + private void lightTick() { + int lb = super.worldObj.getBlockLightValue(super.xCoord, super.yCoord, super.zCoord); + super.Active = lb > super.Deadmap * 4; + if (super.Cover != 7 && super.Cover != 255) { + super.Active = false; + } + + if (super.Active != super.Powered) { + this.scheduleTick(2); + } + + this.simpleTick(); + } + + private boolean simpleWantsPower() { + switch(super.SubId) { + case 1: + return (super.PowerState & 7 & ~super.Deadmap) == 0; + case 2: + return (super.PowerState & ~super.Deadmap) > 0; + case 3: + return (super.PowerState & 7 | super.Deadmap) < 7; + case 4: + return (super.PowerState | super.Deadmap) == 7; + case 5: + return super.PowerState == 5 || super.PowerState == 0; + case 6: + int t = super.PowerState & 5; + return t == 4 || t == 1; + case 7: + case 8: + case 12: + case 13: + case 14: + default: + return false; + case 9: + return (super.PowerState & 2) == 0; + case 10: + return (super.PowerState & 2) > 0; + case 11: + if (super.Deadmap == 0) { + return (super.PowerState & 3) == 1 || (super.PowerState & 6) == 6; + } + + return (super.PowerState & 3) == 3 || (super.PowerState & 6) == 4; + case 15: + if ((super.PowerState & 2) == 0) { + return super.Powered; + } else { + if (super.Deadmap == 0) { + return (super.PowerState & 4) == 4; + } + + return (super.PowerState & 1) == 1; + } + case 16: + return super.Active; + } + } + + private void simpleUpdatePowerState() { + int sides = 15; + switch(super.SubId) { + case 2: + sides = 7; + case 3: + case 7: + case 8: + case 9: + case 13: + case 14: + default: + break; + case 4: + sides = 7; + break; + case 5: + sides = 5; + break; + case 6: + sides = 13; + break; + case 10: + sides = 7; + break; + case 11: + sides = 7; + break; + case 12: + sides = 2; + break; + case 15: + sides = super.Deadmap == 0 ? 6 : 3; + break; + case 16: + sides = 8; + } + + int ps = RedPowerLib.getRotPowerState(super.worldObj, super.xCoord, super.yCoord, super.zCoord, sides, super.Rotation, 0); + if (ps != super.PowerState) { + this.updateBlock(); + } + + super.PowerState = ps; + boolean pwr = this.simpleWantsPower(); + if (pwr != super.Powered) { + this.scheduleTick(2); + } + + } + + private void simpleTick() { + boolean pwr = this.simpleWantsPower(); + if (super.Powered && !pwr) { + super.Powered = false; + this.updateBlockChange(); + } else if (!super.Powered && pwr) { + super.Powered = true; + this.updateBlockChange(); + } + + this.simpleUpdatePowerState(); + } + + @Override + public void onBlockNeighborChange(Block block) { + if (!this.tryDropBlock()) { + switch(super.SubId) { + case 0: + this.latchChange(); + break; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 9: + case 10: + case 11: + case 15: + case 16: + if (!this.isTickRunnable()) { + this.simpleUpdatePowerState(); + } + break; + case 7: + this.pulseChange(); + break; + case 8: + if (!this.isTickRunnable()) { + this.toggleUpdatePowerState(); + } + break; + case 12: + if (!this.isTickRunnable()) { + this.repUpdatePowerState(); + } + break; + case 13: + this.syncChange(); + break; + case 14: + if (!this.isTickRunnable()) { + this.randUpdatePowerState(); + } + } + } + + } + + @Override + public void onTileTick() { + switch(super.SubId) { + case 0: + if (super.Deadmap < 2) { + this.latchTick(); + } else { + this.latch2Tick(); + } + break; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 9: + case 10: + case 11: + case 15: + this.simpleTick(); + break; + case 7: + this.pulseTick(); + break; + case 8: + this.toggleTick(); + break; + case 12: + this.repTick(); + break; + case 13: + this.syncTick(); + break; + case 14: + this.randTick(); + break; + case 16: + this.lightTick(); + } + + } + + @Override + public int getPoweringMask(int ch) { + if (ch != 0) { + return 0; + } else { + switch(super.SubId) { + case 0: + int ps; + if (super.Deadmap > 1) { + ps = super.PowerState & 10; + } else if (super.Disabled && !super.Active) { + ps = 0; + } else if (super.Active) { + ps = super.Powered ? 4 : 1; + } else if (super.Deadmap == 1) { + ps = super.Powered ? 6 : 9; + } else { + ps = super.Powered ? 12 : 3; + } + + return RedPowerLib.mapRotToCon(ps, super.Rotation); + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 11: + case 12: + case 13: + default: + return super.getPoweringMask(ch); + case 8: + if (super.Powered) { + return RedPowerLib.mapRotToCon(2, super.Rotation); + } + + return RedPowerLib.mapRotToCon(8, super.Rotation); + case 9: + case 10: + if (super.Powered) { + return RedPowerLib.mapRotToCon(13 & ~super.Deadmap, super.Rotation); + } + + return 0; + case 14: + return RedPowerLib.mapRotToCon((super.Active ? 1 : 0) | (super.Disabled ? 4 : 0) | (super.Powered ? 8 : 0), super.Rotation); + case 15: + return RedPowerLib.mapRotToCon(super.Deadmap == 0 ? (super.Powered ? 9 : 0) : (super.Powered ? 12 : 0), super.Rotation); + } + } + } + + @Override + public boolean onPartActivateSide(EntityPlayer player, int part, int side) { + switch(super.SubId) { + case 8: + if (part != super.Rotation >> 2) { + return false; + } + + this.playSound("random.click", 0.3F, 0.5F, false); + if (super.Powered) { + super.Powered = false; + } else { + super.Powered = true; + } + + this.updateBlockChange(); + return true; + case 12: + if (part != super.Rotation >> 2) { + return false; + } + + ++super.Deadmap; + if (super.Deadmap > 8) { + super.Deadmap = 0; + } + + this.updateBlockChange(); + return true; + default: + return false; + } + } + + @Override + public int getConnectableMask() { + switch(super.SubId) { + case 1: + case 2: + case 3: + case 4: + return RedPowerLib.mapRotToCon(8 | 7 & ~super.Deadmap, super.Rotation); + case 5: + case 6: + return RedPowerLib.mapRotToCon(13, super.Rotation); + case 7: + return RedPowerLib.mapRotToCon(10, super.Rotation); + case 8: + case 11: + default: + return super.getConnectableMask(); + case 9: + return RedPowerLib.mapRotToCon(2 | 13 & ~super.Deadmap, super.Rotation); + case 10: + return RedPowerLib.mapRotToCon(10 | 5 & ~super.Deadmap, super.Rotation); + case 12: + return RedPowerLib.mapRotToCon(10, super.Rotation); + } + } + + @Override + public void updateEntity() { + super.updateEntity(); + if (super.SubId == 16 && !this.isTickScheduled()) { + this.scheduleTick(8); + } + + } + + @Override + public int getLightValue() { + return super.SubId == 16 ? 0 : super.getLightValue(); + } + + @Override + public int getExtendedID() { + return 1; + } +} diff --git a/src/main/java/com/eloraam/redpower/logic/TileLogicStorage.java b/src/main/java/com/eloraam/redpower/logic/TileLogicStorage.java new file mode 100644 index 0000000..fdf75da --- /dev/null +++ b/src/main/java/com/eloraam/redpower/logic/TileLogicStorage.java @@ -0,0 +1,304 @@ +package com.eloraam.redpower.logic; + +import com.eloraam.redpower.RedPowerLogic; +import com.eloraam.redpower.core.RedPowerLib; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.nbt.NBTTagCompound; + +public class TileLogicStorage extends TileLogic { + TileLogicStorage.LogicStorageModule storage = null; + + @Override + public int getExtendedID() { + return 3; + } + + @Override + public void initSubType(int st) { + super.initSubType(st); + this.initStorage(); + } + + public TileLogicStorage.LogicStorageModule getLogicStorage(Class cl) { + if (!cl.isInstance(this.storage)) { + this.initStorage(); + } + + return this.storage; + } + + public boolean isUseableByPlayer(EntityPlayer player) { + return (this.isInvalid() || super.worldObj.getTileEntity(super.xCoord, super.yCoord, super.zCoord) == this) + && player.getDistanceSq((double)super.xCoord + 0.5, (double)super.yCoord + 0.5, (double)super.zCoord + 0.5) <= 64.0; + } + + @Override + public int getPartMaxRotation(int part, boolean sec) { + if (sec) { + switch(super.SubId) { + case 0: + return 1; + } + } + + return super.getPartMaxRotation(part, sec); + } + + @Override + public int getPartRotation(int part, boolean sec) { + if (sec) { + switch(super.SubId) { + case 0: + return super.Deadmap; + } + } + + return super.getPartRotation(part, sec); + } + + @Override + public void setPartRotation(int part, boolean sec, int rot) { + if (sec) { + switch(super.SubId) { + case 0: + super.Deadmap = rot; + this.updateBlockChange(); + return; + } + } + + super.setPartRotation(part, sec, rot); + } + + void initStorage() { + if (this.storage == null || this.storage.getSubType() != super.SubId) { + switch(super.SubId) { + case 0: + this.storage = new TileLogicStorage.LogicStorageCounter(); + break; + default: + this.storage = null; + } + } + + } + + @Override + public void onBlockNeighborChange(Block block) { + if (!this.tryDropBlock()) { + this.initStorage(); + switch(super.SubId) { + case 0: + if (this.isTickRunnable()) { + return; + } + + this.storage.updatePowerState(); + } + } + + } + + @Override + public void onTileTick() { + this.initStorage(); + this.storage.tileTick(); + } + + @Override + public int getPoweringMask(int ch) { + this.initStorage(); + return this.storage.getPoweringMask(ch); + } + + @Override + public boolean onPartActivateSide(EntityPlayer player, int part, int side) { + if (part == super.Rotation >> 2 && !player.isSneaking()) { + if (!super.worldObj.isRemote) { + switch(super.SubId) { + case 0: + player.openGui(RedPowerLogic.instance, 1, super.worldObj, super.xCoord, super.yCoord, super.zCoord); + } + } + + return true; + } else { + return false; + } + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + this.initStorage(); + this.storage.readFromNBT(data); + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + this.storage.writeToNBT(data); + } + + @Override + protected void readFromPacket(NBTTagCompound tag) { + this.initStorage(); + this.storage.readFromPacket(tag); + super.readFromPacket(tag); + } + + @Override + protected void writeToPacket(NBTTagCompound tag) { + this.storage.writeToPacket(tag); + super.writeToPacket(tag); + } + + public class LogicStorageCounter extends TileLogicStorage.LogicStorageModule { + public int Count = 0; + public int CountMax = 10; + public int Inc = 1; + public int Dec = 1; + + @Override + public void updatePowerState() { + int ps = RedPowerLib.getRotPowerState( + TileLogicStorage.this.worldObj, + TileLogicStorage.this.xCoord, + TileLogicStorage.this.yCoord, + TileLogicStorage.this.zCoord, + 5, + TileLogicStorage.super.Rotation, + 0 + ); + if (ps != TileLogicStorage.this.PowerState) { + if ((ps & ~TileLogicStorage.this.PowerState & 1) > 0) { + TileLogicStorage.this.Active = true; + } + + if ((ps & ~TileLogicStorage.this.PowerState & 4) > 0) { + TileLogicStorage.this.Disabled = true; + } + + TileLogicStorage.this.PowerState = ps; + TileLogicStorage.this.updateBlock(); + if (TileLogicStorage.this.Active || TileLogicStorage.this.Disabled) { + TileLogicStorage.this.scheduleTick(2); + } + } + + } + + @Override + public void tileTick() { + int co = this.Count; + if (TileLogicStorage.this.Deadmap > 0) { + if (TileLogicStorage.this.Active) { + this.Count -= this.Dec; + TileLogicStorage.this.Active = false; + } + + if (TileLogicStorage.this.Disabled) { + this.Count += this.Inc; + TileLogicStorage.this.Disabled = false; + } + } else { + if (TileLogicStorage.this.Active) { + this.Count += this.Inc; + TileLogicStorage.this.Active = false; + } + + if (TileLogicStorage.this.Disabled) { + this.Count -= this.Dec; + TileLogicStorage.this.Disabled = false; + } + } + + if (this.Count < 0) { + this.Count = 0; + } + + if (this.Count > this.CountMax) { + this.Count = this.CountMax; + } + + if (co != this.Count) { + TileLogicStorage.this.updateBlockChange(); + TileLogicStorage.this.playSound("random.click", 0.3F, 0.5F, false); + } + + this.updatePowerState(); + } + + @Override + public int getSubType() { + return 0; + } + + @Override + public int getPoweringMask(int ch) { + int ps = 0; + if (ch != 0) { + return 0; + } else { + if (this.Count == 0) { + ps |= 2; + } + + if (this.Count == this.CountMax) { + ps |= 8; + } + + return RedPowerLib.mapRotToCon(ps, TileLogicStorage.super.Rotation); + } + } + + @Override + public void readFromNBT(NBTTagCompound tag) { + this.Count = tag.getInteger("cnt"); + this.CountMax = tag.getInteger("max"); + this.Inc = tag.getInteger("inc"); + this.Dec = tag.getInteger("dec"); + } + + @Override + public void writeToNBT(NBTTagCompound tag) { + tag.setInteger("cnt", this.Count); + tag.setInteger("max", this.CountMax); + tag.setInteger("inc", this.Inc); + tag.setInteger("dec", this.Dec); + } + + @Override + public void readFromPacket(NBTTagCompound tag) { + this.Count = tag.getInteger("cnt"); + this.CountMax = tag.getInteger("max"); + } + + @Override + public void writeToPacket(NBTTagCompound tag) { + tag.setInteger("cnt", this.Count); + tag.setInteger("max", this.CountMax); + } + } + + public abstract class LogicStorageModule { + public abstract void updatePowerState(); + + public abstract void tileTick(); + + public abstract int getSubType(); + + public abstract int getPoweringMask(int var1); + + public abstract void readFromNBT(NBTTagCompound var1); + + public abstract void writeToNBT(NBTTagCompound var1); + + public void readFromPacket(NBTTagCompound tag) { + } + + public void writeToPacket(NBTTagCompound tag) { + } + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/BlockFrame.java b/src/main/java/com/eloraam/redpower/machine/BlockFrame.java new file mode 100644 index 0000000..8248a9b --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/BlockFrame.java @@ -0,0 +1,38 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.core.BlockCoverable; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.CreativeExtraTabs; +import com.eloraam.redpower.core.WorldCoord; +import java.util.List; +import net.minecraft.entity.Entity; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.world.World; + +public class BlockFrame extends BlockCoverable { + public BlockFrame() { + super(CoreLib.materialRedpower); + this.setHardness(0.5F); + this.setCreativeTab(CreativeExtraTabs.tabMachine); + } + + @Override + public void addCollisionBoxesToList(World world, int x, int y, int z, AxisAlignedBB box, List list, Entity ent) { + TileFrameMoving tl = CoreLib.getTileEntity(world, x, y, z, TileFrameMoving.class); + if (tl == null) { + super.addCollisionBoxesToList(world, x, y, z, box, list, ent); + } else { + this.computeCollidingBoxes(world, x, y, z, box, list, tl); + TileMotor tm = CoreLib.getTileEntity(world, tl.motorX, tl.motorY, tl.motorZ, TileMotor.class); + if (tm != null) { + WorldCoord wc = new WorldCoord(x, y, z); + wc.step(tm.MoveDir ^ 1); + tl = CoreLib.getTileEntity(world, wc, TileFrameMoving.class); + if (tl != null) { + this.computeCollidingBoxes(world, wc.x, wc.y, wc.z, box, list, tl); + } + } + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/BlockMachine.java b/src/main/java/com/eloraam/redpower/machine/BlockMachine.java new file mode 100644 index 0000000..8d2201c --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/BlockMachine.java @@ -0,0 +1,64 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.core.BlockExtended; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.CreativeExtraTabs; +import net.minecraft.block.material.Material; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; + +public class BlockMachine extends BlockExtended { + public BlockMachine() { + super(Material.rock); + this.setHardness(2.0F); + this.setCreativeTab(CreativeExtraTabs.tabMachine); + } + + @Override + public boolean isOpaqueCube() { + return true; + } + + public boolean isNormalCube() { + return true; + } + + @Override + public boolean renderAsNormalBlock() { + return true; + } + + public boolean isBlockNormalCube() { + return false; + } + + public boolean isSideSolid(IBlockAccess iba, int i, int j, int k, ForgeDirection side) { + return true; + } + + @Override + public int damageDropped(int i) { + return i; + } + + public boolean canProvidePower() { + return true; + } + + @Override + public int isProvidingWeakPower(IBlockAccess iba, int x, int y, int z, int side) { + TileMachine tm = CoreLib.getTileEntity(iba, x, y, z, TileMachine.class); + return tm != null && tm.isPoweringTo(side) ? 1 : 0; + } + + public boolean isFireSource(World world, int x, int y, int z, ForgeDirection face) { + int md = world.getBlockMetadata(x, y, z); + if (md != 12) { + return false; + } else { + TileIgniter tig = CoreLib.getTileEntity(world, x, y, z, TileIgniter.class); + return tig != null && tig.isOnFire(face); + } + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/BlockMachinePanel.java b/src/main/java/com/eloraam/redpower/machine/BlockMachinePanel.java new file mode 100644 index 0000000..659cda1 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/BlockMachinePanel.java @@ -0,0 +1,39 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.core.BlockMultipart; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.CreativeExtraTabs; +import net.minecraft.block.material.Material; +import net.minecraft.world.IBlockAccess; + +public class BlockMachinePanel extends BlockMultipart { + public BlockMachinePanel() { + super(Material.rock); + this.setHardness(2.0F); + this.setCreativeTab(CreativeExtraTabs.tabMachine); + } + + public int getLightValue(IBlockAccess iba, int i, int j, int k) { + TileMachinePanel tmp = CoreLib.getTileEntity(iba, i, j, k, TileMachinePanel.class); + return tmp == null ? 0 : tmp.getLightValue(); + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + public boolean isNormalCube() { + return false; + } + + @Override + public boolean renderAsNormalBlock() { + return false; + } + + @Override + public int damageDropped(int i) { + return i; + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/ContainerAssemble.java b/src/main/java/com/eloraam/redpower/machine/ContainerAssemble.java new file mode 100644 index 0000000..ffbc1f6 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/ContainerAssemble.java @@ -0,0 +1,137 @@ +package com.eloraam.redpower.machine; + +import java.util.List; + +import com.eloraam.redpower.core.IHandleGuiEvent; +import com.eloraam.redpower.core.PacketGuiEvent; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class ContainerAssemble extends Container implements IHandleGuiEvent { + private TileAssemble tileAssemble; + public int mode = 0; + public int select = 0; + public int skipSlots = 0; + + public ContainerAssemble(IInventory inv, TileAssemble tf) { + this.tileAssemble = tf; + + for(int i = 0; i < 2; ++i) { + for(int j = 0; j < 8; ++j) { + this.addSlotToContainer(new Slot(tf, j + i * 8, 8 + j * 18, 18 + i * 18)); + } + } + + for(int i = 0; i < 2; ++i) { + for(int j = 0; j < 9; ++j) { + this.addSlotToContainer(new Slot(tf, j + i * 9 + 16, 8 + j * 18, 63 + i * 18)); + } + } + + for(int i = 0; i < 3; ++i) { + for(int j = 0; j < 9; ++j) { + this.addSlotToContainer(new Slot(inv, j + i * 9 + 9, 8 + j * 18, 113 + i * 18)); + } + } + + for(int i = 0; i < 9; ++i) { + this.addSlotToContainer(new Slot(inv, i, 8 + i * 18, 171)); + } + + } + + public ItemStack slotClick(int a, int b, int c, EntityPlayer player) { + return !this.canInteractWith(player) ? null : super.slotClick(a, b, c, player); + } + + public boolean canInteractWith(EntityPlayer player) { + return this.tileAssemble.isUseableByPlayer(player); + } + + public ItemStack transferStackInSlot(EntityPlayer player, int i) { + ItemStack itemstack = null; + Slot slot = (Slot)super.inventorySlots.get(i); + if (slot != null && slot.getHasStack()) { + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); + if (i < 34) { + if (!this.mergeItemStack(itemstack1, 34, 70, true)) { + return null; + } + } else if (!this.mergeItemStack(itemstack1, 16, 34, false)) { + return null; + } + + if (itemstack1.stackSize == 0) { + slot.putStack(null); + } else { + slot.onSlotChanged(); + } + + if (itemstack1.stackSize == itemstack.stackSize) { + return null; + } + + slot.onPickupFromSlot(player, itemstack1); + } + + return itemstack; + } + + public void detectAndSendChanges() { + super.detectAndSendChanges(); + + for(ICrafting ic : (List)super.crafters) { + if (this.mode != this.tileAssemble.mode) { + ic.sendProgressBarUpdate(this, 0, this.tileAssemble.mode); + } + + if (this.select != this.tileAssemble.select) { + ic.sendProgressBarUpdate(this, 1, this.tileAssemble.select); + } + + if (this.skipSlots != this.tileAssemble.skipSlots) { + ic.sendProgressBarUpdate(this, 2, this.tileAssemble.skipSlots); + } + } + + this.mode = this.tileAssemble.mode; + this.select = this.tileAssemble.select; + this.skipSlots = this.tileAssemble.skipSlots; + } + + public void updateProgressBar(int i, int j) { + switch(i) { + case 0: + this.tileAssemble.mode = (byte)j; + break; + case 1: + this.tileAssemble.select = (byte)j; + break; + case 2: + this.tileAssemble.skipSlots = j; + } + + } + + @Override + public void handleGuiEvent(PacketGuiEvent.GuiMessageEvent message) { + try { + switch(message.eventId) { + case 1: + this.tileAssemble.mode = message.parameters[0]; + this.tileAssemble.updateBlockChange(); + break; + case 2: + this.tileAssemble.skipSlots = message.parameters[0]; + this.tileAssemble.markDirty(); + } + } catch (Throwable var3) { + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/ContainerBatteryBox.java b/src/main/java/com/eloraam/redpower/machine/ContainerBatteryBox.java new file mode 100644 index 0000000..36fe2df --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/ContainerBatteryBox.java @@ -0,0 +1,105 @@ +package com.eloraam.redpower.machine; + +import java.util.List; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class ContainerBatteryBox extends Container { + private TileBatteryBox tileBB; + public int charge; + public int storage; + + public ContainerBatteryBox(IInventory inv, TileBatteryBox tf) { + this.tileBB = tf; + this.addSlotToContainer(new Slot(tf, 0, 120, 27)); + this.addSlotToContainer(new Slot(tf, 1, 120, 55)); + + for(int i = 0; i < 3; ++i) { + for(int j = 0; j < 9; ++j) { + this.addSlotToContainer(new Slot(inv, j + i * 9 + 9, 8 + j * 18, 88 + i * 18)); + } + } + + for(int i = 0; i < 9; ++i) { + this.addSlotToContainer(new Slot(inv, i, 8 + i * 18, 146)); + } + + } + + public boolean canInteractWith(EntityPlayer player) { + return player.worldObj.isRemote || this.tileBB.isUseableByPlayer(player); + } + + public ItemStack slotClick(int a, int b, int c, EntityPlayer player) { + return !this.canInteractWith(player) ? null : super.slotClick(a, b, c, player); + } + + public ItemStack transferStackInSlot(EntityPlayer player, int i) { + ItemStack itemstack = null; + Slot slot = (Slot)super.inventorySlots.get(i); + if (slot != null && slot.getHasStack()) { + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); + if (i < 2) { + if (!this.mergeItemStack(itemstack1, 2, 38, true)) { + return null; + } + } else { + Slot sl0 = (Slot)super.inventorySlots.get(0); + ItemStack slst = sl0.getStack(); + if (slst != null && slst.stackSize != 0) { + return null; + } + + sl0.putStack(itemstack1.splitStack(1)); + } + + if (itemstack1.stackSize == 0) { + slot.putStack(null); + } else { + slot.onSlotChanged(); + } + + if (itemstack1.stackSize == itemstack.stackSize) { + return null; + } + + slot.onPickupFromSlot(player, itemstack1); + } + + return itemstack; + } + + public void detectAndSendChanges() { + super.detectAndSendChanges(); + + for(ICrafting ic : (List)super.crafters) { + if (this.charge != this.tileBB.Charge) { + ic.sendProgressBarUpdate(this, 0, this.tileBB.Charge); + } + + if (this.storage != this.tileBB.Storage) { + ic.sendProgressBarUpdate(this, 1, this.tileBB.Storage); + } + } + + this.charge = this.tileBB.Charge; + this.storage = this.tileBB.Storage; + } + + public void updateProgressBar(int i, int j) { + switch(i) { + case 0: + this.tileBB.Charge = j; + break; + case 1: + this.tileBB.Storage = j; + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/ContainerBlueAlloyFurnace.java b/src/main/java/com/eloraam/redpower/machine/ContainerBlueAlloyFurnace.java new file mode 100644 index 0000000..5de2fc8 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/ContainerBlueAlloyFurnace.java @@ -0,0 +1,119 @@ +package com.eloraam.redpower.machine; + +import java.util.List; + +import com.eloraam.redpower.base.SlotAlloyFurnace; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class ContainerBlueAlloyFurnace extends Container { + public int cooktime = 0; + private TileBlueAlloyFurnace tileFurnace; + public int charge = 0; + public int flow = 0; + + public ContainerBlueAlloyFurnace(InventoryPlayer inv, TileBlueAlloyFurnace td) { + this.tileFurnace = td; + + for(int i = 0; i < 3; ++i) { + for(int j = 0; j < 3; ++j) { + this.addSlotToContainer(new Slot(td, j + i * 3, 48 + j * 18, 17 + i * 18)); + } + } + + this.addSlotToContainer(new SlotAlloyFurnace(inv.player, td, 9, 141, 35)); + + for(int i = 0; i < 3; ++i) { + for(int j = 0; j < 9; ++j) { + this.addSlotToContainer(new Slot(inv, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); + } + } + + for(int i = 0; i < 9; ++i) { + this.addSlotToContainer(new Slot(inv, i, 8 + i * 18, 142)); + } + + } + + public ItemStack slotClick(int a, int b, int c, EntityPlayer player) { + return !this.canInteractWith(player) ? null : super.slotClick(a, b, c, player); + } + + public boolean canInteractWith(EntityPlayer player) { + return this.tileFurnace.isUseableByPlayer(player); + } + + public ItemStack transferStackInSlot(EntityPlayer player, int i) { + ItemStack itemstack = null; + Slot slot = (Slot)super.inventorySlots.get(i); + if (slot != null && slot.getHasStack()) { + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); + if (i < 10) { + if (!this.mergeItemStack(itemstack1, 10, 46, true)) { + return null; + } + } else if (!this.mergeItemStack(itemstack1, 0, 9, false)) { + return null; + } + + if (itemstack1.stackSize == 0) { + slot.putStack(null); + } else { + slot.onSlotChanged(); + } + + if (itemstack1.stackSize == itemstack.stackSize) { + return null; + } + + slot.onPickupFromSlot(player, itemstack1); + } + + return itemstack; + } + + public void detectAndSendChanges() { + super.detectAndSendChanges(); + + for(ICrafting ic : (List)super.crafters) { + if (this.cooktime != this.tileFurnace.cooktime) { + ic.sendProgressBarUpdate(this, 0, this.tileFurnace.cooktime); + } + + if (this.charge != this.tileFurnace.cond.Charge) { + ic.sendProgressBarUpdate(this, 1, this.tileFurnace.cond.Charge); + } + + if (this.flow != this.tileFurnace.cond.Flow) { + ic.sendProgressBarUpdate(this, 2, this.tileFurnace.cond.Flow); + ic.sendProgressBarUpdate(this, 3, this.tileFurnace.cond.Flow >> 16); + } + } + + this.cooktime = this.tileFurnace.cooktime; + this.charge = this.tileFurnace.cond.Charge; + this.flow = this.tileFurnace.cond.Flow; + } + + public void updateProgressBar(int i, int j) { + switch(i) { + case 0: + this.tileFurnace.cooktime = j; + break; + case 1: + this.tileFurnace.cond.Charge = j; + break; + case 2: + this.tileFurnace.cond.Flow = this.tileFurnace.cond.Flow & -65536 | j; + break; + case 3: + this.tileFurnace.cond.Flow |= j << 16; + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/ContainerBlueFurnace.java b/src/main/java/com/eloraam/redpower/machine/ContainerBlueFurnace.java new file mode 100644 index 0000000..1f1e9b1 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/ContainerBlueFurnace.java @@ -0,0 +1,113 @@ +package com.eloraam.redpower.machine; + +import java.util.List; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.Slot; +import net.minecraft.inventory.SlotFurnace; +import net.minecraft.item.ItemStack; + +public class ContainerBlueFurnace extends Container { + public int cooktime = 0; + private TileBlueFurnace tileFurnace; + public int charge = 0; + public int flow = 0; + + public ContainerBlueFurnace(InventoryPlayer inv, TileBlueFurnace td) { + this.tileFurnace = td; + this.addSlotToContainer(new Slot(td, 0, 62, 35)); + this.addSlotToContainer(new SlotFurnace(inv.player, td, 1, 126, 35)); + + for(int i = 0; i < 3; ++i) { + for(int j = 0; j < 9; ++j) { + this.addSlotToContainer(new Slot(inv, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); + } + } + + for(int i = 0; i < 9; ++i) { + this.addSlotToContainer(new Slot(inv, i, 8 + i * 18, 142)); + } + + } + + public ItemStack slotClick(int a, int b, int c, EntityPlayer player) { + return !this.canInteractWith(player) ? null : super.slotClick(a, b, c, player); + } + + public boolean canInteractWith(EntityPlayer player) { + return this.tileFurnace.isUseableByPlayer(player); + } + + public ItemStack transferStackInSlot(EntityPlayer player, int i) { + ItemStack itemstack = null; + Slot slot = (Slot)super.inventorySlots.get(i); + if (slot != null && slot.getHasStack()) { + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); + if (i < 2) { + if (!this.mergeItemStack(itemstack1, 2, 38, true)) { + return null; + } + } else if (!this.mergeItemStack(itemstack1, 0, 1, false)) { + return null; + } + + if (itemstack1.stackSize == 0) { + slot.putStack(null); + } else { + slot.onSlotChanged(); + } + + if (itemstack1.stackSize == itemstack.stackSize) { + return null; + } + + slot.onPickupFromSlot(player, itemstack1); + } + + return itemstack; + } + + public void detectAndSendChanges() { + super.detectAndSendChanges(); + + for(ICrafting ic : (List)super.crafters) { + if (this.cooktime != this.tileFurnace.cooktime) { + ic.sendProgressBarUpdate(this, 0, this.tileFurnace.cooktime); + } + + if (this.charge != this.tileFurnace.cond.Charge) { + ic.sendProgressBarUpdate(this, 1, this.tileFurnace.cond.Charge); + } + + if (this.flow != this.tileFurnace.cond.Flow) { + ic.sendProgressBarUpdate(this, 2, this.tileFurnace.cond.Flow); + ic.sendProgressBarUpdate(this, 3, this.tileFurnace.cond.Flow >> 16); + } + } + + this.cooktime = this.tileFurnace.cooktime; + this.charge = this.tileFurnace.cond.Charge; + this.flow = this.tileFurnace.cond.Flow; + } + + public void updateProgressBar(int i, int j) { + switch(i) { + case 0: + this.tileFurnace.cooktime = j; + break; + case 1: + this.tileFurnace.cond.Charge = j; + break; + case 2: + this.tileFurnace.cond.Flow = this.tileFurnace.cond.Flow & -65536 | j; + break; + case 3: + this.tileFurnace.cond.Flow |= j << 16; + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/ContainerBufferChest.java b/src/main/java/com/eloraam/redpower/machine/ContainerBufferChest.java new file mode 100644 index 0000000..3152a42 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/ContainerBufferChest.java @@ -0,0 +1,70 @@ +package com.eloraam.redpower.machine; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class ContainerBufferChest extends Container { + private TileBufferChest tileBuffer; + + public ContainerBufferChest(IInventory inv, TileBufferChest td) { + this.tileBuffer = td; + + for(int i = 0; i < 5; ++i) { + for(int j = 0; j < 4; ++j) { + this.addSlotToContainer(new Slot(td, j + i * 4, 44 + i * 18, 18 + j * 18)); + } + } + + for(int i = 0; i < 3; ++i) { + for(int j = 0; j < 9; ++j) { + this.addSlotToContainer(new Slot(inv, j + i * 9 + 9, 8 + j * 18, 104 + i * 18)); + } + } + + for(int i = 0; i < 9; ++i) { + this.addSlotToContainer(new Slot(inv, i, 8 + i * 18, 162)); + } + + } + + public ItemStack slotClick(int a, int b, int c, EntityPlayer player) { + return !this.canInteractWith(player) ? null : super.slotClick(a, b, c, player); + } + + public boolean canInteractWith(EntityPlayer player) { + return this.tileBuffer.isUseableByPlayer(player); + } + + public ItemStack transferStackInSlot(EntityPlayer player, int i) { + ItemStack itemstack = null; + Slot slot = (Slot)super.inventorySlots.get(i); + if (slot != null && slot.getHasStack()) { + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); + if (i < 20) { + if (!this.mergeItemStack(itemstack1, 20, 56, true)) { + return null; + } + } else if (!this.mergeItemStack(itemstack1, 0, 20, false)) { + return null; + } + + if (itemstack1.stackSize == 0) { + slot.putStack(null); + } else { + slot.onSlotChanged(); + } + + if (itemstack1.stackSize == itemstack.stackSize) { + return null; + } + + slot.onPickupFromSlot(player, itemstack1); + } + + return itemstack; + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/ContainerChargingBench.java b/src/main/java/com/eloraam/redpower/machine/ContainerChargingBench.java new file mode 100644 index 0000000..2896cda --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/ContainerChargingBench.java @@ -0,0 +1,102 @@ +package com.eloraam.redpower.machine; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class ContainerChargingBench extends Container { + private TileChargingBench tileCB; + public int charge; + public int storage; + + public ContainerChargingBench(IInventory inv, TileChargingBench tf) { + this.tileCB = tf; + + for(int i = 0; i < 4; ++i) { + for(int j = 0; j < 4; ++j) { + this.addSlotToContainer(new Slot(tf, j + i * 4, 80 + j * 18, 18 + i * 18)); + } + } + + for(int i = 0; i < 3; ++i) { + for(int j = 0; j < 9; ++j) { + this.addSlotToContainer(new Slot(inv, j + i * 9 + 9, 8 + j * 18, 104 + i * 18)); + } + } + + for(int i = 0; i < 9; ++i) { + this.addSlotToContainer(new Slot(inv, i, 8 + i * 18, 162)); + } + + } + + public ItemStack slotClick(int a, int b, int c, EntityPlayer player) { + return !this.canInteractWith(player) ? null : super.slotClick(a, b, c, player); + } + + public boolean canInteractWith(EntityPlayer player) { + return this.tileCB.isUseableByPlayer(player); + } + + public ItemStack transferStackInSlot(EntityPlayer player, int i) { + ItemStack itemstack = null; + Slot slot = (Slot)super.inventorySlots.get(i); + if (slot != null && slot.getHasStack()) { + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); + if (i < 16) { + if (!this.mergeItemStack(itemstack1, 16, 52, true)) { + return null; + } + } else if (!this.mergeItemStack(itemstack1, 0, 16, false)) { + return null; + } + + if (itemstack1.stackSize == 0) { + slot.putStack((ItemStack)null); + } else { + slot.onSlotChanged(); + } + + if (itemstack1.stackSize == itemstack.stackSize) { + return null; + } + + slot.onPickupFromSlot(player, itemstack1); + } + + return itemstack; + } + + public void detectAndSendChanges() { + super.detectAndSendChanges(); + + for(int i = 0; i < super.crafters.size(); ++i) { + ICrafting ic = (ICrafting)super.crafters.get(i); + if (this.charge != this.tileCB.cond.Charge) { + ic.sendProgressBarUpdate(this, 0, this.tileCB.cond.Charge); + } + + if (this.storage != this.tileCB.Storage) { + ic.sendProgressBarUpdate(this, 1, this.tileCB.Storage); + } + } + + this.charge = this.tileCB.cond.Charge; + this.storage = this.tileCB.Storage; + } + + public void updateProgressBar(int i, int j) { + switch(i) { + case 0: + this.tileCB.cond.Charge = j; + break; + case 1: + this.tileCB.Storage = j; + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/ContainerDeploy.java b/src/main/java/com/eloraam/redpower/machine/ContainerDeploy.java new file mode 100644 index 0000000..50aa754 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/ContainerDeploy.java @@ -0,0 +1,70 @@ +package com.eloraam.redpower.machine; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class ContainerDeploy extends Container { + private TileDeploy tileDeploy; + + public ContainerDeploy(IInventory inv, TileDeploy td) { + this.tileDeploy = td; + + for(int i = 0; i < 3; ++i) { + for(int j = 0; j < 3; ++j) { + this.addSlotToContainer(new Slot(td, j + i * 3, 62 + j * 18, 17 + i * 18)); + } + } + + for(int i = 0; i < 3; ++i) { + for(int j = 0; j < 9; ++j) { + this.addSlotToContainer(new Slot(inv, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); + } + } + + for(int i = 0; i < 9; ++i) { + this.addSlotToContainer(new Slot(inv, i, 8 + i * 18, 142)); + } + + } + + public ItemStack slotClick(int a, int b, int c, EntityPlayer player) { + return !this.canInteractWith(player) ? null : super.slotClick(a, b, c, player); + } + + public boolean canInteractWith(EntityPlayer player) { + return this.tileDeploy.isUseableByPlayer(player); + } + + public ItemStack transferStackInSlot(EntityPlayer player, int i) { + ItemStack itemstack = null; + Slot slot = (Slot)super.inventorySlots.get(i); + if (slot != null && slot.getHasStack()) { + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); + if (i < 9) { + if (!this.mergeItemStack(itemstack1, 9, 45, true)) { + return null; + } + } else if (!this.mergeItemStack(itemstack1, 0, 9, false)) { + return null; + } + + if (itemstack1.stackSize == 0) { + slot.putStack(null); + } else { + slot.onSlotChanged(); + } + + if (itemstack1.stackSize == itemstack.stackSize) { + return null; + } + + slot.onPickupFromSlot(player, itemstack1); + } + + return itemstack; + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/ContainerEject.java b/src/main/java/com/eloraam/redpower/machine/ContainerEject.java new file mode 100644 index 0000000..c769db8 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/ContainerEject.java @@ -0,0 +1,70 @@ +package com.eloraam.redpower.machine; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class ContainerEject extends Container { + private TileEjectBase tileEject; + + public ContainerEject(IInventory inv, TileEjectBase td) { + this.tileEject = td; + + for(int i = 0; i < 3; ++i) { + for(int j = 0; j < 3; ++j) { + this.addSlotToContainer(new Slot(td, j + i * 3, 62 + j * 18, 17 + i * 18)); + } + } + + for(int i = 0; i < 3; ++i) { + for(int j = 0; j < 9; ++j) { + this.addSlotToContainer(new Slot(inv, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); + } + } + + for(int i = 0; i < 9; ++i) { + this.addSlotToContainer(new Slot(inv, i, 8 + i * 18, 142)); + } + + } + + public ItemStack slotClick(int a, int b, int c, EntityPlayer player) { + return !this.canInteractWith(player) ? null : super.slotClick(a, b, c, player); + } + + public boolean canInteractWith(EntityPlayer player) { + return this.tileEject.isUseableByPlayer(player); + } + + public ItemStack transferStackInSlot(EntityPlayer player, int i) { + ItemStack itemstack = null; + Slot slot = (Slot)super.inventorySlots.get(i); + if (slot != null && slot.getHasStack()) { + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); + if (i < 9) { + if (!this.mergeItemStack(itemstack1, 9, 45, true)) { + return null; + } + } else if (!this.mergeItemStack(itemstack1, 0, 9, false)) { + return null; + } + + if (itemstack1.stackSize == 0) { + slot.putStack(null); + } else { + slot.onSlotChanged(); + } + + if (itemstack1.stackSize == itemstack.stackSize) { + return null; + } + + slot.onPickupFromSlot(player, itemstack1); + } + + return itemstack; + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/ContainerFilter.java b/src/main/java/com/eloraam/redpower/machine/ContainerFilter.java new file mode 100644 index 0000000..cfcf2f8 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/ContainerFilter.java @@ -0,0 +1,108 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.core.IHandleGuiEvent; +import com.eloraam.redpower.core.PacketGuiEvent; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class ContainerFilter extends Container implements IHandleGuiEvent { + private TileFilter tileFilter; + public int color = 0; + + public ContainerFilter(IInventory inv, TileFilter tf) { + this.tileFilter = tf; + + for(int i = 0; i < 3; ++i) { + for(int j = 0; j < 3; ++j) { + this.addSlotToContainer(new Slot(tf, j + i * 3, 62 + j * 18, 17 + i * 18)); + } + } + + for(int i = 0; i < 3; ++i) { + for(int j = 0; j < 9; ++j) { + this.addSlotToContainer(new Slot(inv, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); + } + } + + for(int i = 0; i < 9; ++i) { + this.addSlotToContainer(new Slot(inv, i, 8 + i * 18, 142)); + } + + } + + public ItemStack slotClick(int a, int b, int c, EntityPlayer player) { + return !this.canInteractWith(player) ? null : super.slotClick(a, b, c, player); + } + + public boolean canInteractWith(EntityPlayer player) { + return this.tileFilter.isUseableByPlayer(player); + } + + public ItemStack transferStackInSlot(EntityPlayer player, int i) { + ItemStack itemstack = null; + Slot slot = (Slot)super.inventorySlots.get(i); + if (slot != null && slot.getHasStack()) { + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); + if (i < 9) { + if (!this.mergeItemStack(itemstack1, 9, 45, true)) { + return null; + } + } else if (!this.mergeItemStack(itemstack1, 0, 9, false)) { + return null; + } + + if (itemstack1.stackSize == 0) { + slot.putStack((ItemStack)null); + } else { + slot.onSlotChanged(); + } + + if (itemstack1.stackSize == itemstack.stackSize) { + return null; + } + + slot.onPickupFromSlot(player, itemstack1); + } + + return itemstack; + } + + public void detectAndSendChanges() { + super.detectAndSendChanges(); + + for(int i = 0; i < super.crafters.size(); ++i) { + ICrafting ic = (ICrafting)super.crafters.get(i); + if (this.color != this.tileFilter.color) { + ic.sendProgressBarUpdate(this, 0, this.tileFilter.color); + } + } + + this.color = this.tileFilter.color; + } + + public void updateProgressBar(int i, int j) { + switch(i) { + case 0: + this.tileFilter.color = (byte)j; + } + } + + @Override + public void handleGuiEvent(PacketGuiEvent.GuiMessageEvent message) { + try { + if (message.eventId != 1) { + return; + } + + this.tileFilter.color = message.parameters[0]; + this.tileFilter.markDirty(); + } catch (Throwable var3) { + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/ContainerItemDetect.java b/src/main/java/com/eloraam/redpower/machine/ContainerItemDetect.java new file mode 100644 index 0000000..ed2ef8c --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/ContainerItemDetect.java @@ -0,0 +1,109 @@ +package com.eloraam.redpower.machine; + +import java.util.List; + +import com.eloraam.redpower.core.IHandleGuiEvent; +import com.eloraam.redpower.core.PacketGuiEvent; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class ContainerItemDetect extends Container implements IHandleGuiEvent { + private TileItemDetect tileDetect; + byte mode; + + public ContainerItemDetect(IInventory inv, TileItemDetect tid) { + this.tileDetect = tid; + + for(int i = 0; i < 3; ++i) { + for(int j = 0; j < 3; ++j) { + this.addSlotToContainer(new Slot(tid, j + i * 3, 62 + j * 18, 17 + i * 18)); + } + } + + for(int i = 0; i < 3; ++i) { + for(int j = 0; j < 9; ++j) { + this.addSlotToContainer(new Slot(inv, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); + } + } + + for(int i = 0; i < 9; ++i) { + this.addSlotToContainer(new Slot(inv, i, 8 + i * 18, 142)); + } + + } + + public ItemStack slotClick(int a, int b, int c, EntityPlayer player) { + return !this.canInteractWith(player) ? null : super.slotClick(a, b, c, player); + } + + public boolean canInteractWith(EntityPlayer player) { + return this.tileDetect.isUseableByPlayer(player); + } + + public ItemStack transferStackInSlot(EntityPlayer player, int i) { + ItemStack itemstack = null; + Slot slot = (Slot)super.inventorySlots.get(i); + if (slot != null && slot.getHasStack()) { + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); + if (i < 9) { + if (!this.mergeItemStack(itemstack1, 9, 45, true)) { + return null; + } + } else if (!this.mergeItemStack(itemstack1, 0, 9, false)) { + return null; + } + + if (itemstack1.stackSize == 0) { + slot.putStack(null); + } else { + slot.onSlotChanged(); + } + + if (itemstack1.stackSize == itemstack.stackSize) { + return null; + } + + slot.onPickupFromSlot(player, itemstack1); + } + + return itemstack; + } + + public void detectAndSendChanges() { + super.detectAndSendChanges(); + + for(ICrafting ic : (List)super.crafters) { + if (this.mode != this.tileDetect.mode) { + ic.sendProgressBarUpdate(this, 0, this.tileDetect.mode); + } + } + + this.mode = this.tileDetect.mode; + } + + public void updateProgressBar(int i, int j) { + if (i == 0) { + this.tileDetect.mode = (byte)j; + } + + } + + @Override + public void handleGuiEvent(PacketGuiEvent.GuiMessageEvent message) { + if (message.eventId == 1) { + try { + this.tileDetect.mode = message.parameters[0]; + this.tileDetect.markDirty(); + } catch (Throwable var3) { + } + + this.detectAndSendChanges(); + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/ContainerManager.java b/src/main/java/com/eloraam/redpower/machine/ContainerManager.java new file mode 100644 index 0000000..42a249b --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/ContainerManager.java @@ -0,0 +1,153 @@ +package com.eloraam.redpower.machine; + +import java.util.List; + +import com.eloraam.redpower.core.IHandleGuiEvent; +import com.eloraam.redpower.core.PacketGuiEvent; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class ContainerManager extends Container implements IHandleGuiEvent { + public int charge = 0; + public int flow = 0; + public int color = 0; + public int mode = 0; + public int priority = 0; + private TileManager tileManager; + + public ContainerManager(IInventory inv, TileManager tf) { + this.tileManager = tf; + + for(int i = 0; i < 4; ++i) { + for(int j = 0; j < 6; ++j) { + this.addSlotToContainer(new Slot(tf, j + i * 6, 44 + 18 * j, 18 + 18 * i)); + } + } + + for(int i = 0; i < 3; ++i) { + for(int j = 0; j < 9; ++j) { + this.addSlotToContainer(new Slot(inv, j + i * 9 + 9, 8 + j * 18, 104 + i * 18)); + } + } + + for(int i = 0; i < 9; ++i) { + this.addSlotToContainer(new Slot(inv, i, 8 + i * 18, 162)); + } + + } + + public ItemStack slotClick(int a, int b, int c, EntityPlayer player) { + return !this.canInteractWith(player) ? null : super.slotClick(a, b, c, player); + } + + public boolean canInteractWith(EntityPlayer player) { + return this.tileManager.isUseableByPlayer(player); + } + + public ItemStack transferStackInSlot(EntityPlayer player, int i) { + ItemStack itemstack = null; + Slot slot = (Slot)super.inventorySlots.get(i); + if (slot != null && slot.getHasStack()) { + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); + if (i < 24) { + if (!this.mergeItemStack(itemstack1, 24, 60, true)) { + return null; + } + } else if (!this.mergeItemStack(itemstack1, 0, 24, false)) { + return null; + } + + if (itemstack1.stackSize == 0) { + slot.putStack(null); + } else { + slot.onSlotChanged(); + } + + if (itemstack1.stackSize == itemstack.stackSize) { + return null; + } + + slot.onPickupFromSlot(player, itemstack1); + } + + return itemstack; + } + + public void detectAndSendChanges() { + super.detectAndSendChanges(); + + for(ICrafting ic : (List)super.crafters) { + if (this.charge != this.tileManager.cond.Charge) { + ic.sendProgressBarUpdate(this, 0, this.tileManager.cond.Charge); + } + + if (this.flow != this.tileManager.cond.Flow) { + ic.sendProgressBarUpdate(this, 1, this.tileManager.cond.Flow); + } + + if (this.mode != this.tileManager.mode) { + ic.sendProgressBarUpdate(this, 2, this.tileManager.mode); + } + + if (this.color != this.tileManager.color) { + ic.sendProgressBarUpdate(this, 3, this.tileManager.color); + } + + if (this.priority != this.tileManager.priority) { + ic.sendProgressBarUpdate(this, 4, this.tileManager.priority); + } + } + + this.charge = this.tileManager.cond.Charge; + this.flow = this.tileManager.cond.Flow; + this.mode = this.tileManager.mode; + this.color = this.tileManager.color; + this.priority = this.tileManager.priority; + } + + public void updateProgressBar(int i, int j) { + switch(i) { + case 0: + this.tileManager.cond.Charge = j; + break; + case 1: + this.tileManager.cond.Flow = j; + break; + case 2: + this.tileManager.mode = (byte)j; + break; + case 3: + this.tileManager.color = (byte)j; + break; + case 4: + this.tileManager.priority = j; + } + + } + + @Override + public void handleGuiEvent(PacketGuiEvent.GuiMessageEvent message) { + try { + switch(message.eventId) { + case 1: + this.tileManager.mode = message.parameters[0]; + this.tileManager.markDirty(); + break; + case 2: + this.tileManager.color = message.parameters[0]; + this.tileManager.markDirty(); + break; + case 3: + this.tileManager.priority = message.parameters[0]; + this.tileManager.markDirty(); + } + } catch (Throwable var3) { + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/ContainerRegulator.java b/src/main/java/com/eloraam/redpower/machine/ContainerRegulator.java new file mode 100644 index 0000000..31bb9d1 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/ContainerRegulator.java @@ -0,0 +1,124 @@ +package com.eloraam.redpower.machine; + +import java.util.List; + +import com.eloraam.redpower.core.IHandleGuiEvent; +import com.eloraam.redpower.core.PacketGuiEvent; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class ContainerRegulator extends Container implements IHandleGuiEvent { + private TileRegulator tileRegulator; + public int color = 0; + public int mode = 0; + + public ContainerRegulator(IInventory inv, TileRegulator tf) { + this.tileRegulator = tf; + + for(int k = 0; k < 3; ++k) { + for(int i = 0; i < 3; ++i) { + for(int j = 0; j < 3; ++j) { + this.addSlotToContainer(new Slot(tf, j + i * 3 + k * 9, 8 + j * 18 + k * 72, 18 + i * 18)); + } + } + } + + for(int i = 0; i < 3; ++i) { + for(int j = 0; j < 9; ++j) { + this.addSlotToContainer(new Slot(inv, j + i * 9 + 9, 26 + j * 18, 86 + i * 18)); + } + } + + for(int i = 0; i < 9; ++i) { + this.addSlotToContainer(new Slot(inv, i, 26 + i * 18, 144)); + } + + } + + public ItemStack slotClick(int a, int b, int c, EntityPlayer player) { + return !this.canInteractWith(player) ? null : super.slotClick(a, b, c, player); + } + + public boolean canInteractWith(EntityPlayer player) { + return this.tileRegulator.isUseableByPlayer(player); + } + + public ItemStack transferStackInSlot(EntityPlayer player, int i) { + ItemStack itemstack = null; + Slot slot = (Slot)super.inventorySlots.get(i); + if (slot != null && slot.getHasStack()) { + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); + if (i < 27) { + if (!this.mergeItemStack(itemstack1, 27, 63, true)) { + return null; + } + } else if (!this.mergeItemStack(itemstack1, 9, 18, false)) { + return null; + } + + if (itemstack1.stackSize == 0) { + slot.putStack((ItemStack)null); + } else { + slot.onSlotChanged(); + } + + if (itemstack1.stackSize == itemstack.stackSize) { + return null; + } + + slot.onPickupFromSlot(player, itemstack1); + } + + return itemstack; + } + + public void detectAndSendChanges() { + super.detectAndSendChanges(); + + for(ICrafting ic : (List)super.crafters) { + if (this.color != this.tileRegulator.color) { + ic.sendProgressBarUpdate(this, 0, this.tileRegulator.color); + } + + if (this.mode != this.tileRegulator.mode) { + ic.sendProgressBarUpdate(this, 1, this.tileRegulator.mode); + } + } + + this.color = this.tileRegulator.color; + this.mode = this.tileRegulator.mode; + } + + public void updateProgressBar(int i, int j) { + switch(i) { + case 0: + this.tileRegulator.color = (byte)j; + break; + case 1: + this.tileRegulator.mode = (byte)j; + } + + } + + @Override + public void handleGuiEvent(PacketGuiEvent.GuiMessageEvent message) { + try { + switch(message.eventId) { + case 1: + this.tileRegulator.color = message.parameters[0]; + this.tileRegulator.markDirty(); + break; + case 2: + this.tileRegulator.mode = message.parameters[0]; + this.tileRegulator.markDirty(); + } + } catch (Throwable var3) { + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/ContainerRetriever.java b/src/main/java/com/eloraam/redpower/machine/ContainerRetriever.java new file mode 100644 index 0000000..515dc3b --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/ContainerRetriever.java @@ -0,0 +1,149 @@ +package com.eloraam.redpower.machine; + +import java.util.List; + +import com.eloraam.redpower.core.IHandleGuiEvent; +import com.eloraam.redpower.core.PacketGuiEvent; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class ContainerRetriever extends Container implements IHandleGuiEvent { + private TileRetriever tileRetriever; + public int charge = 0; + public int flow = 0; + public int color = 0; + public int select = 0; + public int mode = 0; + + public ContainerRetriever(IInventory inv, TileRetriever tr) { + this.tileRetriever = tr; + + for(int i = 0; i < 3; ++i) { + for(int j = 0; j < 3; ++j) { + this.addSlotToContainer(new Slot(tr, j + i * 3, 62 + j * 18, 17 + i * 18)); + } + } + + for(int i = 0; i < 3; ++i) { + for(int j = 0; j < 9; ++j) { + this.addSlotToContainer(new Slot(inv, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); + } + } + + for(int i = 0; i < 9; ++i) { + this.addSlotToContainer(new Slot(inv, i, 8 + i * 18, 142)); + } + + } + + public ItemStack slotClick(int a, int b, int c, EntityPlayer player) { + return !this.canInteractWith(player) ? null : super.slotClick(a, b, c, player); + } + + public boolean canInteractWith(EntityPlayer player) { + return this.tileRetriever.isUseableByPlayer(player); + } + + public ItemStack transferStackInSlot(EntityPlayer player, int i) { + ItemStack itemstack = null; + Slot slot = (Slot)super.inventorySlots.get(i); + if (slot != null && slot.getHasStack()) { + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); + if (i < 9) { + if (!this.mergeItemStack(itemstack1, 9, 45, true)) { + return null; + } + } else if (!this.mergeItemStack(itemstack1, 0, 9, false)) { + return null; + } + + if (itemstack1.stackSize == 0) { + slot.putStack((ItemStack)null); + } else { + slot.onSlotChanged(); + } + + if (itemstack1.stackSize == itemstack.stackSize) { + return null; + } + + slot.onPickupFromSlot(player, itemstack1); + } + + return itemstack; + } + + public void detectAndSendChanges() { + super.detectAndSendChanges(); + + for(ICrafting ic : (List)super.crafters) { + if (this.charge != this.tileRetriever.cond.Charge) { + ic.sendProgressBarUpdate(this, 0, this.tileRetriever.cond.Charge); + } + + if (this.flow != this.tileRetriever.cond.Flow) { + ic.sendProgressBarUpdate(this, 1, this.tileRetriever.cond.Flow); + } + + if (this.color != this.tileRetriever.color) { + ic.sendProgressBarUpdate(this, 2, this.tileRetriever.color); + } + + if (this.select != this.tileRetriever.select) { + ic.sendProgressBarUpdate(this, 3, this.tileRetriever.select); + } + + if (this.mode != this.tileRetriever.mode) { + ic.sendProgressBarUpdate(this, 4, this.tileRetriever.mode); + } + } + + this.flow = this.tileRetriever.cond.Flow; + this.charge = this.tileRetriever.cond.Charge; + this.color = this.tileRetriever.color; + this.select = this.tileRetriever.select; + this.mode = this.tileRetriever.mode; + } + + public void updateProgressBar(int i, int j) { + switch(i) { + case 0: + this.tileRetriever.cond.Charge = j; + break; + case 1: + this.tileRetriever.cond.Flow = j; + break; + case 2: + this.tileRetriever.color = (byte)j; + break; + case 3: + this.tileRetriever.select = (byte)j; + break; + case 4: + this.tileRetriever.mode = (byte)j; + } + + } + + @Override + public void handleGuiEvent(PacketGuiEvent.GuiMessageEvent message) { + try { + switch(message.eventId) { + case 1: + this.tileRetriever.color = message.parameters[0]; + this.tileRetriever.markDirty(); + break; + case 2: + this.tileRetriever.mode = message.parameters[0]; + this.tileRetriever.markDirty(); + } + } catch (Throwable var3) { + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/ContainerSorter.java b/src/main/java/com/eloraam/redpower/machine/ContainerSorter.java new file mode 100644 index 0000000..2b8ccce --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/ContainerSorter.java @@ -0,0 +1,185 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.core.IHandleGuiEvent; +import com.eloraam.redpower.core.PacketGuiEvent; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class ContainerSorter extends Container implements IHandleGuiEvent { + public byte[] colors = new byte[8]; + public int column; + public int charge = 0; + public int flow = 0; + public int mode = 0; + public int defcolor = 0; + public int automode = 0; + private TileSorter tileSorter; + + public ContainerSorter(IInventory inv, TileSorter tf) { + this.tileSorter = tf; + + for(int i = 0; i < 5; ++i) { + for(int j = 0; j < 8; ++j) { + this.addSlotToContainer(new Slot(tf, j + i * 8, 26 + 18 * j, 18 + 18 * i)); + } + } + + for(int i = 0; i < 3; ++i) { + for(int j = 0; j < 9; ++j) { + this.addSlotToContainer(new Slot(inv, j + i * 9 + 9, 8 + j * 18, 140 + i * 18)); + } + } + + for(int i = 0; i < 9; ++i) { + this.addSlotToContainer(new Slot(inv, i, 8 + i * 18, 198)); + } + + } + + public ItemStack slotClick(int a, int b, int c, EntityPlayer player) { + return !this.canInteractWith(player) ? null : super.slotClick(a, b, c, player); + } + + public boolean canInteractWith(EntityPlayer player) { + return this.tileSorter.isUseableByPlayer(player); + } + + public ItemStack transferStackInSlot(EntityPlayer player, int i) { + ItemStack itemstack = null; + Slot slot = (Slot)super.inventorySlots.get(i); + if (slot != null && slot.getHasStack()) { + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); + if (i < 40) { + if (!this.mergeItemStack(itemstack1, 40, 76, true)) { + return null; + } + } else if (!this.mergeItemStack(itemstack1, 0, 40, false)) { + return null; + } + + if (itemstack1.stackSize == 0) { + slot.putStack((ItemStack)null); + } else { + slot.onSlotChanged(); + } + + if (itemstack1.stackSize == itemstack.stackSize) { + return null; + } + + slot.onPickupFromSlot(player, itemstack1); + } + + return itemstack; + } + + public void detectAndSendChanges() { + super.detectAndSendChanges(); + + for(int j = 0; j < super.crafters.size(); ++j) { + ICrafting ic = (ICrafting)super.crafters.get(j); + + for(int j1 = 0; j1 < 8; ++j1) { + if (this.colors[j1] != this.tileSorter.colors[j1]) { + ic.sendProgressBarUpdate(this, j1, this.tileSorter.colors[j1]); + } + } + + if (this.column != this.tileSorter.column) { + ic.sendProgressBarUpdate(this, 8, this.tileSorter.column); + } + + if (this.charge != this.tileSorter.cond.Charge) { + ic.sendProgressBarUpdate(this, 9, this.tileSorter.cond.Charge); + } + + if (this.flow != this.tileSorter.cond.Flow) { + ic.sendProgressBarUpdate(this, 10, this.tileSorter.cond.Flow); + } + + if (this.mode != this.tileSorter.mode) { + ic.sendProgressBarUpdate(this, 11, this.tileSorter.mode); + } + + if (this.defcolor != this.tileSorter.defcolor) { + ic.sendProgressBarUpdate(this, 12, this.tileSorter.defcolor); + } + + if (this.automode != this.tileSorter.automode) { + ic.sendProgressBarUpdate(this, 13, this.tileSorter.automode); + } + } + + for(int j = 0; j < 8; ++j) { + this.colors[j] = this.tileSorter.colors[j]; + } + + this.column = this.tileSorter.column; + this.charge = this.tileSorter.cond.Charge; + this.flow = this.tileSorter.cond.Flow; + this.mode = this.tileSorter.mode; + this.defcolor = this.tileSorter.defcolor; + this.automode = this.tileSorter.automode; + } + + public void updateProgressBar(int i, int j) { + if (i < 8) { + this.tileSorter.colors[i] = (byte)j; + } + + switch(i) { + case 8: + this.tileSorter.column = (byte)j; + break; + case 9: + this.tileSorter.cond.Charge = j; + break; + case 10: + this.tileSorter.cond.Flow = j; + break; + case 11: + this.tileSorter.mode = (byte)j; + break; + case 12: + this.tileSorter.defcolor = (byte)j; + break; + case 13: + this.tileSorter.automode = (byte)j; + } + + } + + @Override + public void handleGuiEvent(PacketGuiEvent.GuiMessageEvent message) { + try { + switch(message.eventId) { + case 1: + this.tileSorter.mode = message.parameters[0]; + this.tileSorter.markDirty(); + break; + case 2: + byte i = message.parameters[0]; + if (i >= 0 && i <= 8) { + this.tileSorter.colors[i] = message.parameters[1]; + this.tileSorter.markDirty(); + } + break; + case 3: + this.tileSorter.defcolor = message.parameters[0]; + this.tileSorter.markDirty(); + break; + case 4: + this.tileSorter.automode = message.parameters[0]; + this.tileSorter.pulses = 0; + this.tileSorter.markDirty(); + } + } catch (Throwable var3) { + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/ContainerWindTurbine.java b/src/main/java/com/eloraam/redpower/machine/ContainerWindTurbine.java new file mode 100644 index 0000000..f6f9bc7 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/ContainerWindTurbine.java @@ -0,0 +1,94 @@ +package com.eloraam.redpower.machine; + +import java.util.List; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class ContainerWindTurbine extends Container { + private int windSpeed; + private TileWindTurbine tileWT; + + public ContainerWindTurbine(IInventory inv, TileWindTurbine wt) { + this.tileWT = wt; + this.addSlotToContainer(new Slot(wt, 0, 80, 35)); + + for(int i = 0; i < 3; ++i) { + for(int j = 0; j < 9; ++j) { + this.addSlotToContainer(new Slot(inv, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); + } + } + + for(int i = 0; i < 9; ++i) { + this.addSlotToContainer(new Slot(inv, i, 8 + i * 18, 142)); + } + + } + + public ItemStack slotClick(int a, int b, int c, EntityPlayer player) { + return !this.canInteractWith(player) ? null : super.slotClick(a, b, c, player); + } + + public boolean canInteractWith(EntityPlayer player) { + return this.tileWT.isUseableByPlayer(player); + } + + public ItemStack transferStackInSlot(EntityPlayer player, int i) { + ItemStack itemstack = null; + Slot slot = (Slot)super.inventorySlots.get(i); + if (slot != null && slot.getHasStack()) { + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); + if (i < 1) { + if (!this.mergeItemStack(itemstack1, 1, 37, true)) { + return null; + } + } else { + Slot sl0 = (Slot)super.inventorySlots.get(0); + ItemStack slst = sl0.getStack(); + if (slst != null && slst.stackSize != 0) { + return null; + } + + sl0.putStack(itemstack1.splitStack(1)); + } + + if (itemstack1.stackSize == 0) { + slot.putStack(null); + } else { + slot.onSlotChanged(); + } + + if (itemstack1.stackSize == itemstack.stackSize) { + return null; + } + + slot.onPickupFromSlot(player, itemstack1); + } + + return itemstack; + } + + public void detectAndSendChanges() { + super.detectAndSendChanges(); + + for(ICrafting ic : (List)super.crafters) { + if (this.windSpeed != this.tileWT.windSpeed) { + ic.sendProgressBarUpdate(this, 0, this.tileWT.windSpeed); + } + } + + this.windSpeed = this.tileWT.windSpeed; + } + + public void updateProgressBar(int i, int j) { + switch(i) { + case 0: + this.tileWT.windSpeed = j; + } + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/GuiAssemble.java b/src/main/java/com/eloraam/redpower/machine/GuiAssemble.java new file mode 100644 index 0000000..44917f1 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/GuiAssemble.java @@ -0,0 +1,114 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerCore; +import com.eloraam.redpower.core.PacketGuiEvent; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; + +public class GuiAssemble extends GuiContainer { + private static final ResourceLocation res1 = new ResourceLocation("rpmachine", "textures/gui/assembler.png"); + private static final ResourceLocation res2 = new ResourceLocation("rpmachine", "textures/gui/assembler2.png"); + private TileAssemble assemble; + + public GuiAssemble(InventoryPlayer pli, TileAssemble td) { + super(new ContainerAssemble(pli, td)); + this.assemble = td; + super.ySize = 195; + } + + public GuiAssemble(Container cn) { + super(cn); + super.ySize = 195; + } + + protected void drawGuiContainerForegroundLayer(int p1, int p2) { + super.fontRendererObj.drawString(I18n.format("tile.rpassemble.name", new Object[0]), 65, 6, 4210752); + super.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, super.ySize - 96 + 2, 4210752); + } + + protected void drawGuiContainerBackgroundLayer(float f, int p1, int p2) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + super.mc.renderEngine.bindTexture(this.assemble.mode == 0 ? res1 : res2); + int j = (super.width - super.xSize) / 2; + int k = (super.height - super.ySize) / 2; + this.drawTexturedModalRect(j, k, 0, 0, super.xSize, super.ySize); + this.drawTexturedModalRect(j + 152, k + 37, 196, 14 * this.assemble.mode, 14, 14); + if (this.assemble.mode == 0) { + this.drawTexturedModalRect(j + 6 + 18 * (this.assemble.select & 7), k + 16 + 18 * (this.assemble.select >> 3), 176, 0, 20, 20); + + for(int i = 1; i < 16; ++i) { + if ((this.assemble.skipSlots & 1 << i) != 0) { + this.drawTexturedModalRect(j + 8 + 18 * (i & 7), k + 18 + 18 * (i >> 3), 176, 20, 16, 16); + } + } + } + + } + + private void sendMode() { + if (!super.mc.theWorld.isRemote) { + this.assemble.updateBlockChange(); + } else { + RedPowerCore.sendPacketToServer(new PacketGuiEvent.GuiMessageEvent(1, super.inventorySlots.windowId, this.assemble.mode)); + } + + } + + private void sendSkip() { + if (!super.mc.theWorld.isRemote) { + this.assemble.updateBlockChange(); + } else { + RedPowerCore.sendPacketToServer(new PacketGuiEvent.GuiMessageEvent(2, super.inventorySlots.windowId, (byte)this.assemble.skipSlots)); + } + + } + + protected void mouseClicked(int i, int j, int k) { + int x = i - (super.width - super.xSize) / 2; + int y = j - (super.height - super.ySize) / 2; + if (x >= 152 && y >= 37 && x <= 166 && y <= 51) { + if (k == 0) { + ++this.assemble.mode; + if (this.assemble.mode > 1) { + this.assemble.mode = 0; + } + } else { + --this.assemble.mode; + if (this.assemble.mode < 0) { + this.assemble.mode = 1; + } + } + + this.sendMode(); + } else { + if (this.assemble.mode == 0 && super.mc.thePlayer.inventory.getItemStack() == null) { + boolean send = false; + + for(int v = 1; v < 16; ++v) { + int x2 = 8 + 18 * (v & 7); + int y2 = 18 + 18 * (v >> 3); + if (x >= x2 && x < x2 + 16 && y >= y2 && y < y2 + 16) { + if (super.inventorySlots.getSlot(v).getHasStack()) { + break; + } + + this.assemble.skipSlots ^= 1 << v; + send = true; + } + } + + if (send) { + this.sendSkip(); + return; + } + } + + super.mouseClicked(i, j, k); + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/GuiBatteryBox.java b/src/main/java/com/eloraam/redpower/machine/GuiBatteryBox.java new file mode 100644 index 0000000..1bb1df9 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/GuiBatteryBox.java @@ -0,0 +1,58 @@ +package com.eloraam.redpower.machine; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; + +public class GuiBatteryBox extends GuiContainer { + private static final ResourceLocation res = new ResourceLocation("rpmachine", "textures/gui/batbox.png"); + private TileBatteryBox tileBB; + + public GuiBatteryBox(InventoryPlayer pli, TileBatteryBox bb) { + super(new ContainerBatteryBox(pli, bb)); + this.tileBB = bb; + super.ySize = 170; + } + + public GuiBatteryBox(Container cn) { + super(cn); + super.ySize = 170; + } + + protected void drawGuiContainerForegroundLayer(int p1, int p2) { + super.fontRendererObj.drawString(I18n.format("tile.rpbatbox.name", new Object[0]), 60, 6, 4210752); + super.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, super.ySize - 96 + 2, 4210752); + } + + protected void drawGuiContainerBackgroundLayer(float f, int p1, int p2) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + super.mc.renderEngine.bindTexture(res); + int j = (super.width - super.xSize) / 2; + int k = (super.height - super.ySize) / 2; + this.drawTexturedModalRect(j, k, 0, 0, super.xSize, super.ySize); + int mx = this.tileBB.getMaxStorage(); + int s = this.tileBB.getChargeScaled(48); + this.drawTexturedModalRect(j + 71, k + 73 - s, 176, 48 - s, 5, s); + if (this.tileBB.Charge > 600) { + this.drawTexturedModalRect(j + 72, k + 17, 197, 16, 3, 6); + } + + if (this.tileBB.Charge > 900 && this.tileBB.Storage < mx) { + this.drawTexturedModalRect(j + 82, k + 37, 197, 0, 10, 8); + } + + if (this.tileBB.Charge < 800 && this.tileBB.Storage > 0) { + this.drawTexturedModalRect(j + 82, k + 55, 197, 8, 10, 8); + } + + s = this.tileBB.getStorageScaled(48); + this.drawTexturedModalRect(j + 98, k + 73 - s, 181, 48 - s, 16, s); + if (this.tileBB.Storage == mx) { + this.drawTexturedModalRect(j + 103, k + 17, 200, 16, 6, 6); + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/GuiBlueAlloyFurnace.java b/src/main/java/com/eloraam/redpower/machine/GuiBlueAlloyFurnace.java new file mode 100644 index 0000000..0e5a7a3 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/GuiBlueAlloyFurnace.java @@ -0,0 +1,49 @@ +package com.eloraam.redpower.machine; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; + +public class GuiBlueAlloyFurnace extends GuiContainer { + private static final ResourceLocation res = new ResourceLocation("rpmachine", "textures/gui/btafurnace.png"); + private TileBlueAlloyFurnace furnace; + + public GuiBlueAlloyFurnace(InventoryPlayer pli, TileBlueAlloyFurnace td) { + super(new ContainerBlueAlloyFurnace(pli, td)); + this.furnace = td; + } + + public GuiBlueAlloyFurnace(Container cn) { + super(cn); + } + + protected void drawGuiContainerForegroundLayer(int p1, int p2) { + super.fontRendererObj.drawString(I18n.format("tile.rpbafurnace.name", new Object[0]), 38, 6, 4210752); + super.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, super.ySize - 96 + 2, 4210752); + } + + protected void drawGuiContainerBackgroundLayer(float f, int p1, int p2) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + super.mc.renderEngine.bindTexture(res); + int j = (super.width - super.xSize) / 2; + int k = (super.height - super.ySize) / 2; + this.drawTexturedModalRect(j, k, 0, 0, super.xSize, super.ySize); + int s = this.furnace.getCookScaled(24); + this.drawTexturedModalRect(j + 107, k + 34, 176, 0, s + 1, 16); + s = this.furnace.cond.getChargeScaled(48); + this.drawTexturedModalRect(j + 19, k + 69 - s, 176, 65 - s, 5, s); + s = this.furnace.cond.getFlowScaled(48); + this.drawTexturedModalRect(j + 26, k + 69 - s, 176, 65 - s, 5, s); + if (this.furnace.cond.Charge > 600) { + this.drawTexturedModalRect(j + 20, k + 13, 181, 17, 3, 6); + } + + if (this.furnace.cond.Flow == -1) { + this.drawTexturedModalRect(j + 27, k + 13, 184, 17, 3, 6); + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/GuiBlueFurnace.java b/src/main/java/com/eloraam/redpower/machine/GuiBlueFurnace.java new file mode 100644 index 0000000..a445410 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/GuiBlueFurnace.java @@ -0,0 +1,49 @@ +package com.eloraam.redpower.machine; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; + +public class GuiBlueFurnace extends GuiContainer { + private static final ResourceLocation res = new ResourceLocation("rpmachine", "textures/gui/btfurnace.png"); + private TileBlueFurnace furnace; + + public GuiBlueFurnace(InventoryPlayer pli, TileBlueFurnace td) { + super(new ContainerBlueFurnace(pli, td)); + this.furnace = td; + } + + public GuiBlueFurnace(Container cn) { + super(cn); + } + + protected void drawGuiContainerForegroundLayer(int p1, int p2) { + super.fontRendererObj.drawString(I18n.format("tile.rpbfurnace.name", new Object[0]), 48, 6, 4210752); + super.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, super.ySize - 96 + 2, 4210752); + } + + protected void drawGuiContainerBackgroundLayer(float f, int p1, int p2) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + super.mc.renderEngine.bindTexture(res); + int j = (super.width - super.xSize) / 2; + int k = (super.height - super.ySize) / 2; + this.drawTexturedModalRect(j, k, 0, 0, super.xSize, super.ySize); + int s = this.furnace.getCookScaled(24); + this.drawTexturedModalRect(j + 89, k + 34, 176, 0, s + 1, 16); + s = this.furnace.cond.getChargeScaled(48); + this.drawTexturedModalRect(j + 25, k + 69 - s, 176, 65 - s, 5, s); + s = this.furnace.cond.getFlowScaled(48); + this.drawTexturedModalRect(j + 32, k + 69 - s, 176, 65 - s, 5, s); + if (this.furnace.cond.Charge > 600) { + this.drawTexturedModalRect(j + 26, k + 13, 181, 17, 3, 6); + } + + if (this.furnace.cond.Flow == -1) { + this.drawTexturedModalRect(j + 33, k + 13, 184, 17, 3, 6); + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/GuiBufferChest.java b/src/main/java/com/eloraam/redpower/machine/GuiBufferChest.java new file mode 100644 index 0000000..9ae5621 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/GuiBufferChest.java @@ -0,0 +1,35 @@ +package com.eloraam.redpower.machine; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; + +public class GuiBufferChest extends GuiContainer { + private static final ResourceLocation res = new ResourceLocation("rpmachine", "textures/gui/buffer.png"); + + public GuiBufferChest(InventoryPlayer pli, TileBufferChest td) { + super(new ContainerBufferChest(pli, td)); + super.ySize = 186; + } + + public GuiBufferChest(Container cn) { + super(cn); + super.ySize = 186; + } + + protected void drawGuiContainerForegroundLayer(int p1, int p2) { + super.fontRendererObj.drawString(I18n.format("tile.rpbuffer.name", new Object[0]), 70, 6, 4210752); + super.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, super.ySize - 96 + 2, 4210752); + } + + protected void drawGuiContainerBackgroundLayer(float f, int p1, int p2) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + super.mc.renderEngine.bindTexture(res); + int j = (super.width - super.xSize) / 2; + int k = (super.height - super.ySize) / 2; + this.drawTexturedModalRect(j, k, 0, 0, super.xSize, super.ySize); + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/GuiChargingBench.java b/src/main/java/com/eloraam/redpower/machine/GuiChargingBench.java new file mode 100644 index 0000000..a9649e0 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/GuiChargingBench.java @@ -0,0 +1,54 @@ +package com.eloraam.redpower.machine; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; + +public class GuiChargingBench extends GuiContainer { + private static final ResourceLocation res = new ResourceLocation("rpmachine", "textures/gui/charging.png"); + private TileChargingBench tileCB; + + public GuiChargingBench(InventoryPlayer pli, TileChargingBench cb) { + super(new ContainerChargingBench(pli, cb)); + this.tileCB = cb; + super.ySize = 186; + } + + public GuiChargingBench(Container cn) { + super(cn); + super.ySize = 186; + } + + protected void drawGuiContainerForegroundLayer(int p1, int p2) { + super.fontRendererObj.drawString(I18n.format("tile.rpcharge.name", new Object[0]), 60, 6, 4210752); + super.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, super.ySize - 96 + 2, 4210752); + } + + protected void drawGuiContainerBackgroundLayer(float f, int p1, int p2) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + super.mc.renderEngine.bindTexture(res); + int j = (super.width - super.xSize) / 2; + int k = (super.height - super.ySize) / 2; + this.drawTexturedModalRect(j, k, 0, 0, super.xSize, super.ySize); + int mx = this.tileCB.getMaxStorage(); + int s = this.tileCB.getChargeScaled(48); + this.drawTexturedModalRect(j + 21, k + 78 - s, 176, 48 - s, 5, s); + if (this.tileCB.cond.Charge > 600) { + this.drawTexturedModalRect(j + 22, k + 22, 197, 8, 3, 6); + } + + if (this.tileCB.cond.Charge > 600 && this.tileCB.Storage < mx) { + this.drawTexturedModalRect(j + 32, k + 51, 197, 0, 10, 8); + } + + s = this.tileCB.getStorageScaled(48); + this.drawTexturedModalRect(j + 48, k + 78 - s, 181, 48 - s, 16, s); + if (this.tileCB.Storage == mx) { + this.drawTexturedModalRect(j + 53, k + 22, 200, 8, 6, 6); + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/GuiDeploy.java b/src/main/java/com/eloraam/redpower/machine/GuiDeploy.java new file mode 100644 index 0000000..0068c32 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/GuiDeploy.java @@ -0,0 +1,34 @@ +package com.eloraam.redpower.machine; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; + +public class GuiDeploy extends GuiContainer { + private static final ResourceLocation res = new ResourceLocation("textures/gui/container/dispenser.png"); + private int inventoryRows = 3; + + public GuiDeploy(InventoryPlayer pli, TileDeploy td) { + super(new ContainerDeploy(pli, td)); + } + + public GuiDeploy(Container cn) { + super(cn); + } + + protected void drawGuiContainerForegroundLayer(int p1, int p2) { + super.fontRendererObj.drawString(I18n.format("tile.rpdeploy.name", new Object[0]), 60, 6, 4210752); + super.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, super.ySize - 96 + 2, 4210752); + } + + protected void drawGuiContainerBackgroundLayer(float f, int p1, int p2) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + super.mc.renderEngine.bindTexture(res); + int j = (super.width - super.xSize) / 2; + int k = (super.height - super.ySize) / 2; + this.drawTexturedModalRect(j, k, 0, 0, super.xSize, super.ySize); + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/GuiEject.java b/src/main/java/com/eloraam/redpower/machine/GuiEject.java new file mode 100644 index 0000000..9b26ff6 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/GuiEject.java @@ -0,0 +1,36 @@ +package com.eloraam.redpower.machine; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; + +public class GuiEject extends GuiContainer { + private static final ResourceLocation res = new ResourceLocation("textures/gui/container/dispenser.png"); + private TileEjectBase tileEject; + private int inventoryRows = 3; + + public GuiEject(InventoryPlayer pli, TileEjectBase td) { + super(new ContainerEject(pli, td)); + this.tileEject = td; + } + + public GuiEject(Container cn) { + super(cn); + } + + protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) { + super.fontRendererObj.drawString(I18n.format(this.tileEject.getInventoryName(), new Object[0]), 60, 6, 4210752); + super.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, super.ySize - 96 + 2, 4210752); + } + + protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + super.mc.renderEngine.bindTexture(res); + int j = (super.width - super.xSize) / 2; + int k = (super.height - super.ySize) / 2; + this.drawTexturedModalRect(j, k, 0, 0, super.xSize, super.ySize); + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/GuiFilter.java b/src/main/java/com/eloraam/redpower/machine/GuiFilter.java new file mode 100644 index 0000000..ecddd40 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/GuiFilter.java @@ -0,0 +1,100 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerCore; +import com.eloraam.redpower.core.PacketGuiEvent; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; + +public class GuiFilter extends GuiContainer { + static int[] paintColors = new int[]{ + 16777215, 16744448, 16711935, 7110911, 16776960, 65280, 16737408, 5460819, 9671571, 65535, 8388863, 255, 5187328, 32768, 16711680, 2039583 + }; + private static final ResourceLocation res = new ResourceLocation("rpmachine", "textures/gui/filter9.png"); + private TileFilter tileFilter; + + public GuiFilter(InventoryPlayer pli, TileFilter filter) { + super(new ContainerFilter(pli, filter)); + this.tileFilter = filter; + } + + public GuiFilter(Container cn) { + super(cn); + } + + protected void drawGuiContainerForegroundLayer(int p1, int p2) { + super.fontRendererObj.drawString(I18n.format(this.tileFilter.getInventoryName(), new Object[0]), 60, 6, 4210752); + super.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, super.ySize - 96 + 2, 4210752); + } + + protected void drawGuiContainerBackgroundLayer(float f, int p1, int p2) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + super.mc.renderEngine.bindTexture(res); + int j = (super.width - super.xSize) / 2; + int k = (super.height - super.ySize) / 2; + this.drawTexturedModalRect(j, k, 0, 0, super.xSize, super.ySize); + if (this.tileFilter.color > 0) { + this.rect(j + 122, k + 59, 4, 4, paintColors[this.tileFilter.color - 1]); + } else { + this.drawTexturedModalRect(j + 122, k + 59, 176, 0, 4, 4); + } + + } + + private void sendColor() { + if (super.mc.theWorld.isRemote) { + RedPowerCore.sendPacketToServer(new PacketGuiEvent.GuiMessageEvent(1, super.inventorySlots.windowId, this.tileFilter.color)); + } + + } + + private void changeColor(boolean incdec) { + if (incdec) { + ++this.tileFilter.color; + if (this.tileFilter.color > 16) { + this.tileFilter.color = 0; + } + } else { + --this.tileFilter.color; + if (this.tileFilter.color < 0) { + this.tileFilter.color = 16; + } + } + + this.sendColor(); + } + + protected void mouseClicked(int i, int j, int k) { + int x = i - (super.width - super.xSize) / 2; + int y = j - (super.height - super.ySize) / 2; + if (y >= 55 && y <= 66 && x >= 118 && x <= 129) { + this.changeColor(k == 0); + } else { + super.mouseClicked(i, j, k); + } + + } + + private void rect(int x, int y, int w, int h, int c) { + w += x; + h += y; + float r = (float)(c >> 16 & 0xFF) / 255.0F; + float g = (float)(c >> 8 & 0xFF) / 255.0F; + float b = (float)(c & 0xFF) / 255.0F; + Tessellator tess = Tessellator.instance; + GL11.glDisable(3553); + GL11.glColor4f(r, g, b, 1.0F); + tess.startDrawingQuads(); + tess.addVertex((double)x, (double)h, 0.0); + tess.addVertex((double)w, (double)h, 0.0); + tess.addVertex((double)w, (double)y, 0.0); + tess.addVertex((double)x, (double)y, 0.0); + tess.draw(); + GL11.glEnable(3553); + GL11.glColor3f(1.0F, 1.0F, 1.0F); + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/GuiItemDetect.java b/src/main/java/com/eloraam/redpower/machine/GuiItemDetect.java new file mode 100644 index 0000000..2f4ec2a --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/GuiItemDetect.java @@ -0,0 +1,66 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerCore; +import com.eloraam.redpower.core.PacketGuiEvent; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; + +public class GuiItemDetect extends GuiContainer { + private static final ResourceLocation res = new ResourceLocation("rpmachine", "textures/gui/itemdet.png"); + private TileItemDetect tileDetect; + + public GuiItemDetect(InventoryPlayer pli, TileItemDetect filter) { + super(new ContainerItemDetect(pli, filter)); + this.tileDetect = filter; + } + + public GuiItemDetect(Container cn) { + super(cn); + } + + protected void drawGuiContainerForegroundLayer(int p1, int p2) { + super.fontRendererObj.drawString(I18n.format("tile.rpitemdet.name", new Object[0]), 60, 6, 4210752); + super.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, super.ySize - 96 + 2, 4210752); + } + + protected void drawGuiContainerBackgroundLayer(float f, int p1, int p2) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + super.mc.renderEngine.bindTexture(res); + int j = (super.width - super.xSize) / 2; + int k = (super.height - super.ySize) / 2; + this.drawTexturedModalRect(j, k, 0, 0, super.xSize, super.ySize); + this.drawTexturedModalRect(j + 117, k + 54, 176, 14 * this.tileDetect.mode, 14, 14); + } + + private void sendButton(byte n) { + RedPowerCore.sendPacketToServer(new PacketGuiEvent.GuiMessageEvent(1, super.inventorySlots.windowId, n)); + } + + protected void mouseClicked(int i, int j, int k) { + int x = i - (super.width - super.xSize) / 2; + int y = j - (super.height - super.ySize) / 2; + if (x >= 117 && y >= 54 && x <= 131 && y <= 68) { + if (k == 0) { + ++this.tileDetect.mode; + if (this.tileDetect.mode > 2) { + this.tileDetect.mode = 0; + } + } else { + --this.tileDetect.mode; + if (this.tileDetect.mode < 0) { + this.tileDetect.mode = 2; + } + } + + if (super.mc.theWorld.isRemote) { + this.sendButton(this.tileDetect.mode); + } + } + + super.mouseClicked(i, j, k); + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/GuiManager.java b/src/main/java/com/eloraam/redpower/machine/GuiManager.java new file mode 100644 index 0000000..fb434f9 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/GuiManager.java @@ -0,0 +1,164 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerCore; +import com.eloraam.redpower.core.PacketGuiEvent; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; + +public class GuiManager extends GuiContainer { + static int[] paintColors = new int[]{ + 16777215, 16744448, 16711935, 7110911, 16776960, 65280, 16737408, 5460819, 9671571, 65535, 8388863, 255, 5187328, 32768, 16711680, 2039583 + }; + private static final ResourceLocation res = new ResourceLocation("rpmachine", "textures/gui/manager.png"); + private TileManager manager; + + public GuiManager(InventoryPlayer pli, TileManager td) { + super(new ContainerManager(pli, td)); + this.manager = td; + super.ySize = 186; + } + + public GuiManager(Container cn) { + super(cn); + super.ySize = 186; + } + + protected void drawGuiContainerForegroundLayer(int p1, int p2) { + super.fontRendererObj.drawString(I18n.format("tile.rpmanager.name", new Object[0]), 68, 6, 4210752); + super.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, super.ySize - 96 + 2, 4210752); + } + + protected void drawGuiContainerBackgroundLayer(float f, int p1, int p2) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + super.mc.renderEngine.bindTexture(res); + int j = (super.width - super.xSize) / 2; + int k = (super.height - super.ySize) / 2; + this.drawTexturedModalRect(j, k, 0, 0, super.xSize, super.ySize); + int s = this.manager.cond.getChargeScaled(48); + this.drawTexturedModalRect(j + 17, k + 76 - s, 176, 48 - s, 5, s); + s = this.manager.cond.getFlowScaled(48); + this.drawTexturedModalRect(j + 24, k + 76 - s, 176, 48 - s, 5, s); + if (this.manager.cond.Charge > 600) { + this.drawTexturedModalRect(j + 18, k + 20, 181, 0, 3, 6); + } + + if (this.manager.cond.Flow == -1) { + this.drawTexturedModalRect(j + 25, k + 20, 184, 0, 3, 6); + } + + this.drawTexturedModalRect(j + 153, k + 37, 191, 14 * this.manager.mode, 14, 14); + if (this.manager.color > 0) { + this.rect(j + 158, k + 78, 4, 4, paintColors[this.manager.color - 1]); + } else { + this.drawTexturedModalRect(j + 158, k + 78, 187, 0, 4, 4); + } + + String nm = String.format("%d", this.manager.priority); + super.fontRendererObj.drawStringWithShadow(nm, j + 160 - super.fontRendererObj.getStringWidth(nm) / 2, k + 58, 16777215); + } + + private void sendMode() { + if (super.mc.theWorld.isRemote) { + RedPowerCore.sendPacketToServer(new PacketGuiEvent.GuiMessageEvent(1, super.inventorySlots.windowId, this.manager.mode)); + } + + } + + private void sendColor() { + if (super.mc.theWorld.isRemote) { + RedPowerCore.sendPacketToServer(new PacketGuiEvent.GuiMessageEvent(2, super.inventorySlots.windowId, this.manager.color)); + } + + } + + private void sendPriority() { + if (super.mc.theWorld.isRemote) { + RedPowerCore.sendPacketToServer(new PacketGuiEvent.GuiMessageEvent(3, super.inventorySlots.windowId, (byte)this.manager.priority)); + } + + } + + protected void changeColor(boolean incdec) { + if (incdec) { + ++this.manager.color; + if (this.manager.color > 16) { + this.manager.color = 0; + } + } else { + --this.manager.color; + if (this.manager.color < 0) { + this.manager.color = 16; + } + } + + this.sendColor(); + } + + protected void mouseClicked(int i, int j, int k) { + int x = i - (super.width - super.xSize) / 2; + int y = j - (super.height - super.ySize) / 2; + if (x >= 154 && x <= 165) { + if (y >= 38 && y <= 50) { + if (k == 0) { + ++this.manager.mode; + if (this.manager.mode > 1) { + this.manager.mode = 0; + } + } else { + --this.manager.mode; + if (this.manager.mode < 0) { + this.manager.mode = 1; + } + } + + this.sendMode(); + } + + if (y >= 56 && y <= 68) { + if (k == 0) { + ++this.manager.priority; + if (this.manager.priority > 9) { + this.manager.priority = 0; + } + } else { + --this.manager.priority; + if (this.manager.priority < 0) { + this.manager.priority = 9; + } + } + + this.sendPriority(); + } + + if (y >= 74 && y <= 86) { + this.changeColor(k == 0); + } + } + + super.mouseClicked(i, j, k); + } + + private void rect(int x, int y, int w, int h, int c) { + w += x; + h += y; + float r = (float)(c >> 16 & 0xFF) / 255.0F; + float g = (float)(c >> 8 & 0xFF) / 255.0F; + float b = (float)(c & 0xFF) / 255.0F; + Tessellator tess = Tessellator.instance; + GL11.glDisable(3553); + GL11.glColor4f(r, g, b, 1.0F); + tess.startDrawingQuads(); + tess.addVertex((double)x, (double)h, 0.0); + tess.addVertex((double)w, (double)h, 0.0); + tess.addVertex((double)w, (double)y, 0.0); + tess.addVertex((double)x, (double)y, 0.0); + tess.draw(); + GL11.glEnable(3553); + GL11.glColor3f(1.0F, 1.0F, 1.0F); + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/GuiRegulator.java b/src/main/java/com/eloraam/redpower/machine/GuiRegulator.java new file mode 100644 index 0000000..240ad82 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/GuiRegulator.java @@ -0,0 +1,130 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerCore; +import com.eloraam.redpower.core.PacketGuiEvent; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; + +public class GuiRegulator extends GuiContainer { + static int[] paintColors = new int[]{ + 16777215, 16744448, 16711935, 7110911, 16776960, 65280, 16737408, 5460819, 9671571, 65535, 8388863, 255, 5187328, 32768, 16711680, 2039583 + }; + private static final ResourceLocation res = new ResourceLocation("rpmachine", "textures/gui/regulator.png"); + private TileRegulator tileRegulator; + + public GuiRegulator(InventoryPlayer pli, TileRegulator reg) { + super(new ContainerRegulator(pli, reg)); + this.tileRegulator = reg; + super.xSize = 211; + super.ySize = 167; + } + + public GuiRegulator(Container cn) { + super(cn); + super.xSize = 211; + super.ySize = 167; + } + + protected void drawGuiContainerForegroundLayer(int p1, int p2) { + super.fontRendererObj.drawString(I18n.format("this.tileRegulator.getInventoryName()", new Object[0]), 79, 6, 4210752); + super.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 25, super.ySize - 96 + 3, 4210752); + } + + protected void drawGuiContainerBackgroundLayer(float f, int p1, int p2) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + super.mc.renderEngine.bindTexture(res); + int j = (super.width - super.xSize) / 2; + int k = (super.height - super.ySize) / 2; + this.drawTexturedModalRect(j, k, 0, 0, super.xSize, super.ySize); + if (this.tileRegulator.color > 0) { + this.rect(j + 140, k + 60, 4, 4, paintColors[this.tileRegulator.color - 1]); + } else { + this.drawTexturedModalRect(j + 140, k + 60, 212, 0, 4, 4); + } + + this.drawTexturedModalRect(j + 135, k + 19, 216, 14 * this.tileRegulator.mode, 14, 14); + } + + private void sendColor() { + if (super.mc.theWorld.isRemote) { + RedPowerCore.sendPacketToServer(new PacketGuiEvent.GuiMessageEvent(1, super.inventorySlots.windowId, (byte)this.tileRegulator.color)); + } + + } + + private void sendMode() { + if (super.mc.theWorld.isRemote) { + RedPowerCore.sendPacketToServer(new PacketGuiEvent.GuiMessageEvent(2, super.inventorySlots.windowId, this.tileRegulator.mode)); + } + + } + + protected void changeColor(boolean incdec) { + if (incdec) { + ++this.tileRegulator.color; + if (this.tileRegulator.color > 16) { + this.tileRegulator.color = 0; + } + } else { + --this.tileRegulator.color; + if (this.tileRegulator.color < 0) { + this.tileRegulator.color = 16; + } + } + + this.sendColor(); + } + + protected void mouseClicked(int i, int j, int k) { + int x = i - (super.width - super.xSize) / 2; + int y = j - (super.height - super.ySize) / 2; + if (x >= 136 && x <= 147) { + if (y >= 56 && y <= 67) { + this.changeColor(k == 0); + return; + } + + if (y >= 19 && y <= 32) { + if (k == 0) { + ++this.tileRegulator.mode; + if (this.tileRegulator.mode > 1) { + this.tileRegulator.mode = 0; + } + } else { + --this.tileRegulator.mode; + if (this.tileRegulator.mode < 0) { + this.tileRegulator.mode = 1; + } + } + + this.sendMode(); + } + } + + super.mouseClicked(i, j, k); + } + + private void rect(int x, int y, int w, int h, int c) { + w += x; + h += y; + float r = (float)(c >> 16 & 0xFF) / 255.0F; + float g = (float)(c >> 8 & 0xFF) / 255.0F; + float b = (float)(c & 0xFF) / 255.0F; + Tessellator tess = Tessellator.instance; + GL11.glDisable(3553); + GL11.glColor4f(r, g, b, 1.0F); + tess.startDrawingQuads(); + tess.addVertex((double)x, (double)h, 0.0); + tess.addVertex((double)w, (double)h, 0.0); + tess.addVertex((double)w, (double)y, 0.0); + tess.addVertex((double)x, (double)y, 0.0); + tess.draw(); + GL11.glEnable(3553); + GL11.glColor3f(1.0F, 1.0F, 1.0F); + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/GuiRetriever.java b/src/main/java/com/eloraam/redpower/machine/GuiRetriever.java new file mode 100644 index 0000000..94e700a --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/GuiRetriever.java @@ -0,0 +1,142 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerCore; +import com.eloraam.redpower.core.PacketGuiEvent; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; + +public class GuiRetriever extends GuiContainer { + static int[] paintColors = new int[]{ + 16777215, 16744448, 16711935, 7110911, 16776960, 65280, 16737408, 5460819, 9671571, 65535, 8388863, 255, 5187328, 32768, 16711680, 2039583 + }; + private static final ResourceLocation res = new ResourceLocation("rpmachine", "textures/gui/retriever.png"); + private TileRetriever tileRetriever; + + public GuiRetriever(InventoryPlayer pli, TileRetriever retr) { + super(new ContainerRetriever(pli, retr)); + this.tileRetriever = retr; + } + + public GuiRetriever(Container cn) { + super(cn); + } + + protected void drawGuiContainerForegroundLayer(int p1, int p2) { + super.fontRendererObj.drawString(I18n.format("tile.rpretriever.name", new Object[0]), 65, 6, 4210752); + super.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, super.ySize - 96 + 2, 4210752); + } + + protected void drawGuiContainerBackgroundLayer(float f, int p1, int p2) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + super.mc.renderEngine.bindTexture(res); + int j = (super.width - super.xSize) / 2; + int k = (super.height - super.ySize) / 2; + this.drawTexturedModalRect(j, k, 0, 0, super.xSize, super.ySize); + int s = this.tileRetriever.cond.getChargeScaled(48); + this.drawTexturedModalRect(j + 10, k + 69 - s, 176, 48 - s, 5, s); + s = this.tileRetriever.cond.getFlowScaled(48); + this.drawTexturedModalRect(j + 17, k + 69 - s, 176, 48 - s, 5, s); + if (this.tileRetriever.cond.Charge > 600) { + this.drawTexturedModalRect(j + 11, k + 13, 181, 0, 3, 6); + } + + if (this.tileRetriever.cond.Flow == -1) { + this.drawTexturedModalRect(j + 18, k + 13, 184, 0, 3, 6); + } + + if (this.tileRetriever.color > 0) { + this.rect(j + 122, k + 59, 4, 4, paintColors[this.tileRetriever.color - 1]); + } else { + this.drawTexturedModalRect(j + 122, k + 59, 187, 0, 4, 4); + } + + this.drawTexturedModalRect(j + 45, k + 54, 211, 14 * this.tileRetriever.mode, 14, 14); + if (this.tileRetriever.mode == 0) { + this.drawTexturedModalRect(j + 60 + 18 * (this.tileRetriever.select % 3), k + 15 + 18 * (this.tileRetriever.select / 3), 191, 0, 20, 20); + } + + } + + private void sendColor() { + if (super.mc.theWorld.isRemote) { + RedPowerCore.sendPacketToServer(new PacketGuiEvent.GuiMessageEvent(1, super.inventorySlots.windowId, this.tileRetriever.color)); + } + + } + + private void sendMode() { + if (super.mc.theWorld.isRemote) { + RedPowerCore.sendPacketToServer(new PacketGuiEvent.GuiMessageEvent(2, super.inventorySlots.windowId, this.tileRetriever.mode)); + } + + } + + protected void changeColor(boolean incdec) { + if (incdec) { + ++this.tileRetriever.color; + if (this.tileRetriever.color > 16) { + this.tileRetriever.color = 0; + } + } else { + --this.tileRetriever.color; + if (this.tileRetriever.color < 0) { + this.tileRetriever.color = 16; + } + } + + this.sendColor(); + } + + protected void mouseClicked(int i, int j, int k) { + int x = i - (super.width - super.xSize) / 2; + int y = j - (super.height - super.ySize) / 2; + if (y >= 55 && y <= 66) { + if (x >= 118 && x <= 129) { + this.changeColor(k == 0); + return; + } + + if (x >= 45 && x <= 58) { + if (k == 0) { + ++this.tileRetriever.mode; + if (this.tileRetriever.mode > 1) { + this.tileRetriever.mode = 0; + } + } else { + --this.tileRetriever.mode; + if (this.tileRetriever.mode < 0) { + this.tileRetriever.mode = 1; + } + } + + this.sendMode(); + } + } + + super.mouseClicked(i, j, k); + } + + private void rect(int x, int y, int w, int h, int c) { + w += x; + h += y; + float r = (float)(c >> 16 & 0xFF) / 255.0F; + float g = (float)(c >> 8 & 0xFF) / 255.0F; + float b = (float)(c & 0xFF) / 255.0F; + Tessellator tess = Tessellator.instance; + GL11.glDisable(3553); + GL11.glColor4f(r, g, b, 1.0F); + tess.startDrawingQuads(); + tess.addVertex((double)x, (double)h, 0.0); + tess.addVertex((double)w, (double)h, 0.0); + tess.addVertex((double)w, (double)y, 0.0); + tess.addVertex((double)x, (double)y, 0.0); + tess.draw(); + GL11.glEnable(3553); + GL11.glColor3f(1.0F, 1.0F, 1.0F); + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/GuiSorter.java b/src/main/java/com/eloraam/redpower/machine/GuiSorter.java new file mode 100644 index 0000000..4c4deda --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/GuiSorter.java @@ -0,0 +1,211 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerCore; +import com.eloraam.redpower.core.PacketGuiEvent; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; + +public class GuiSorter extends GuiContainer { + static int[] paintColors = new int[]{ + 16777215, 16744448, 16711935, 7110911, 16776960, 65280, 16737408, 5460819, 9671571, 65535, 8388863, 255, 5187328, 32768, 16711680, 2039583 + }; + private static final ResourceLocation res = new ResourceLocation("rpmachine", "textures/gui/sortmachine.png"); + private TileSorter sorter; + + public GuiSorter(InventoryPlayer pli, TileSorter td) { + super(new ContainerSorter(pli, td)); + this.sorter = td; + super.ySize = 222; + } + + public GuiSorter(Container cn) { + super(cn); + super.ySize = 222; + } + + protected void drawGuiContainerForegroundLayer(int p1, int p2) { + super.fontRendererObj.drawString(I18n.format("tile.rpsorter.name", new Object[0]), 50, 6, 4210752); + super.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, super.ySize - 96 + 2, 4210752); + } + + protected void drawGuiContainerBackgroundLayer(float f, int p1, int p2) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + super.mc.renderEngine.bindTexture(res); + int j = (super.width - super.xSize) / 2; + int k = (super.height - super.ySize) / 2; + this.drawTexturedModalRect(j, k, 0, 0, super.xSize, super.ySize); + if (this.sorter.mode < 2) { + this.drawTexturedModalRect(j + 24 + 18 * this.sorter.column, k + 16, 176, 0, 20, 92); + } + + for(int s = 0; s < 8; ++s) { + if (this.sorter.colors[s] > 0) { + this.rect(j + 32 + s * 18, k + 114, 4, 4, paintColors[this.sorter.colors[s] - 1]); + } else { + this.drawTexturedModalRect(j + 32 + s * 18, k + 114, 187, 92, 4, 4); + } + } + + int var7 = this.sorter.cond.getChargeScaled(48); + this.drawTexturedModalRect(j + 8, k + 68 - var7, 176, 140 - var7, 5, var7); + var7 = this.sorter.cond.getFlowScaled(48); + this.drawTexturedModalRect(j + 15, k + 68 - var7, 176, 140 - var7, 5, var7); + if (this.sorter.cond.Charge > 600) { + this.drawTexturedModalRect(j + 9, k + 12, 181, 92, 3, 6); + } + + if (this.sorter.cond.Flow == -1) { + this.drawTexturedModalRect(j + 16, k + 12, 184, 92, 3, 6); + } + + this.drawTexturedModalRect(j + 7, k + 73, 210, 14 * this.sorter.automode, 14, 14); + this.drawTexturedModalRect(j + 7, k + 91, 196, 14 * this.sorter.mode, 14, 14); + if (this.sorter.mode == 4 || this.sorter.mode == 6) { + this.drawTexturedModalRect(j + 7, k + 109, 27, 109, 14, 14); + if (this.sorter.defcolor > 0) { + this.rect(j + 12, k + 114, 4, 4, paintColors[this.sorter.defcolor - 1]); + } else { + this.drawTexturedModalRect(j + 12, k + 114, 187, 92, 4, 4); + } + } + + } + + private void sendMode() { + if (super.mc.theWorld.isRemote) { + RedPowerCore.sendPacketToServer(new PacketGuiEvent.GuiMessageEvent(1, super.inventorySlots.windowId, this.sorter.mode)); + } + + } + + private void sendAutoMode() { + if (super.mc.theWorld.isRemote) { + RedPowerCore.sendPacketToServer(new PacketGuiEvent.GuiMessageEvent(4, super.inventorySlots.windowId, this.sorter.automode)); + } + + } + + private void sendColor(int n) { + if (super.mc.theWorld.isRemote) { + RedPowerCore.sendPacketToServer(new PacketGuiEvent.GuiMessageEvent(2, super.inventorySlots.windowId, (byte)n, this.sorter.colors[n])); + } + + } + + private void sendDefColor() { + if (super.mc.theWorld.isRemote) { + RedPowerCore.sendPacketToServer(new PacketGuiEvent.GuiMessageEvent(3, super.inventorySlots.windowId, this.sorter.defcolor)); + } + + } + + protected void changeColor(int n, boolean incdec) { + if (incdec) { + ++this.sorter.colors[n]; + if (this.sorter.colors[n] > 16) { + this.sorter.colors[n] = 0; + } + } else { + --this.sorter.colors[n]; + if (this.sorter.colors[n] < 0) { + this.sorter.colors[n] = 16; + } + } + + this.sendColor(n); + } + + protected void changeDefColor(boolean incdec) { + if (incdec) { + ++this.sorter.defcolor; + if (this.sorter.defcolor > 16) { + this.sorter.defcolor = 0; + } + } else { + --this.sorter.defcolor; + if (this.sorter.defcolor < 0) { + this.sorter.defcolor = 16; + } + } + + this.sendDefColor(); + } + + protected void mouseClicked(int i, int j, int k) { + int x = i - (super.width - super.xSize) / 2; + int y = j - (super.height - super.ySize) / 2; + if (x <= 21 && x >= 7) { + if (y <= 105 && y >= 91) { + if (k == 0) { + ++this.sorter.mode; + if (this.sorter.mode > 6) { + this.sorter.mode = 0; + } + } else { + --this.sorter.mode; + if (this.sorter.mode < 0) { + this.sorter.mode = 6; + } + } + + this.sendMode(); + } + + if (y <= 87 && y >= 73) { + if (k == 0) { + ++this.sorter.automode; + if (this.sorter.automode > 2) { + this.sorter.automode = 0; + } + } else { + --this.sorter.automode; + if (this.sorter.automode < 0) { + this.sorter.automode = 2; + } + } + + this.sendAutoMode(); + } + } + + if (y >= 110 && y <= 121) { + for(int n = 0; n < 8; ++n) { + if (x >= 28 + n * 18 && x <= 39 + n * 18) { + this.changeColor(n, k == 0); + return; + } + } + + if ((this.sorter.mode == 4 || this.sorter.mode == 6) && x >= 7 && x <= 21) { + this.changeDefColor(k == 0); + return; + } + } + + super.mouseClicked(i, j, k); + } + + private void rect(int x, int y, int w, int h, int c) { + w += x; + h += y; + float r = (float)(c >> 16 & 0xFF) / 255.0F; + float g = (float)(c >> 8 & 0xFF) / 255.0F; + float b = (float)(c & 0xFF) / 255.0F; + Tessellator tess = Tessellator.instance; + GL11.glDisable(3553); + GL11.glColor4f(r, g, b, 1.0F); + tess.startDrawingQuads(); + tess.addVertex((double)x, (double)h, 0.0); + tess.addVertex((double)w, (double)h, 0.0); + tess.addVertex((double)w, (double)y, 0.0); + tess.addVertex((double)x, (double)y, 0.0); + tess.draw(); + GL11.glEnable(3553); + GL11.glColor3f(1.0F, 1.0F, 1.0F); + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/GuiWindTurbine.java b/src/main/java/com/eloraam/redpower/machine/GuiWindTurbine.java new file mode 100644 index 0000000..7f5d620 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/GuiWindTurbine.java @@ -0,0 +1,38 @@ +package com.eloraam.redpower.machine; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; + +public class GuiWindTurbine extends GuiContainer { + private static final ResourceLocation res = new ResourceLocation("rpmachine", "textures/gui/windgui.png"); + private TileWindTurbine tileWT; + + public GuiWindTurbine(InventoryPlayer pli, TileWindTurbine wt) { + super(new ContainerWindTurbine(pli, wt)); + this.tileWT = wt; + super.ySize = 167; + } + + public GuiWindTurbine(Container cn) { + super(cn); + super.ySize = 167; + } + + protected void drawGuiContainerForegroundLayer(int p1, int p2) { + super.fontRendererObj.drawString(I18n.format("gui.windturbine", new Object[0]), 60, 6, 4210752); + super.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, super.ySize - 96 + 2, 4210752); + } + + protected void drawGuiContainerBackgroundLayer(float f, int p1, int p2) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + super.mc.renderEngine.bindTexture(res); + int j = (super.width - super.xSize) / 2; + int k = (super.height - super.ySize) / 2; + this.drawTexturedModalRect(j, k, 0, 0, super.xSize, super.ySize); + this.drawTexturedModalRect(j + 55, k + 65 - this.tileWT.getWindScaled(48), 176, 0, 5, 3); + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/ItemBattery.java b/src/main/java/com/eloraam/redpower/machine/ItemBattery.java new file mode 100644 index 0000000..6565e7a --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/ItemBattery.java @@ -0,0 +1,44 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.IChargeable; +import java.util.List; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +public class ItemBattery extends Item { + public ItemBattery() { + this.setMaxStackSize(1); + this.setNoRepair(); + this.setMaxDamage(1500); + this.setCreativeTab(CreativeTabs.tabRedstone); + this.setTextureName("rpmachine:battery"); + this.setUnlocalizedName("btbattery"); + } + + public ItemStack onItemRightClick(ItemStack ist, World world, EntityPlayer player) { + for(int i = 0; i < 9; ++i) { + ItemStack i1 = player.inventory.getStackInSlot(i); + if (i1 != null && i1.getItem() instanceof IChargeable && i1.getItemDamage() > 1) { + int d = Math.min(i1.getItemDamage() - 1, ist.getMaxDamage() - ist.getItemDamage()); + d = Math.min(d, 25); + ist.setItemDamage(ist.getItemDamage() + d); + i1.setItemDamage(i1.getItemDamage() - d); + player.inventory.markDirty(); + if (ist.getItemDamage() == ist.getMaxDamage()) { + return new ItemStack(RedPowerMachine.itemBatteryEmpty, 1); + } + break; + } + } + + return ist; + } + + public void getSubItems(Item item, CreativeTabs tab, List itemList) { + itemList.add(new ItemStack(this, 1, 1)); + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/ItemMachinePanel.java b/src/main/java/com/eloraam/redpower/machine/ItemMachinePanel.java new file mode 100644 index 0000000..fb6eba8 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/ItemMachinePanel.java @@ -0,0 +1,74 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.core.BlockExtended; +import com.eloraam.redpower.core.ItemExtended; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +public class ItemMachinePanel extends ItemExtended { + public ItemMachinePanel(Block block) { + super(block); + } + + public boolean onItemUse(ItemStack ist, EntityPlayer player, World world, int x, int y, int z, int side, float xp, float yp, float zp) { + Block bid = world.getBlock(x, y, z); + Block block = Block.getBlockFromItem(this); + if (bid == Blocks.snow) { + side = 1; + } else if (bid != Blocks.vine && bid != Blocks.tallgrass && bid != Blocks.deadbush) { + switch(side) { + case 0: + --y; + break; + case 1: + ++y; + break; + case 2: + --z; + break; + case 3: + ++z; + break; + case 4: + --x; + break; + default: + ++x; + } + } + + if (ist.stackSize == 0) { + return false; + } else if (!player.canPlayerEdit(x, y, z, side, ist)) { + return false; + } else if (y >= world.getHeight() - 1) { + return false; + } else if (!world.canPlaceEntityOnSide(world.getBlock(x, y, z), x, y, z, false, side, player, ist)) { + return false; + } else if (ist.getItemDamage() == 0 && !World.doesBlockHaveSolidTopSurface(world, x, y - 1, z)) { + return false; + } else { + if (world.setBlock(x, y, z, block, this.getMetadata(ist.getItemDamage()), 3)) { + if (world.getBlock(x, y, z) == block) { + BlockExtended bex = (BlockExtended)block; + bex.onBlockPlacedBy(world, x, y, z, side, player, ist); + } + + world.playSoundEffect( + (double)((float)x + 0.5F), + (double)((float)y + 0.5F), + (double)((float)z + 0.5F), + block.stepSound.getStepResourcePath(), + (block.stepSound.getVolume() + 1.0F) / 2.0F, + block.stepSound.getPitch() * 0.8F + ); + --ist.stackSize; + } + + return true; + } + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/ItemSonicDriver.java b/src/main/java/com/eloraam/redpower/machine/ItemSonicDriver.java new file mode 100644 index 0000000..513c63a --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/ItemSonicDriver.java @@ -0,0 +1,32 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.base.ItemScrewdriver; +import com.eloraam.redpower.core.IChargeable; +import com.google.common.collect.HashMultimap; +import com.google.common.collect.Multimap; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +public class ItemSonicDriver extends ItemScrewdriver implements IChargeable { + public ItemSonicDriver() { + this.setMaxDamage(400); + this.setNoRepair(); + } + + @Override + public boolean onItemUseFirst(ItemStack ist, EntityPlayer player, World world, int x, int y, int z, int side, float xp, float yp, float zp) { + return !world.isRemote && ist.getItemDamage() != ist.getMaxDamage() && super.onItemUseFirst(ist, player, world, x, y, z, side, xp, yp, zp); + } + + @Override + public Multimap getAttributeModifiers(ItemStack stack) { + return HashMultimap.create(); + } + + @Override + public boolean hitEntity(ItemStack ist, EntityLivingBase ent, EntityLivingBase hitter) { + return false; + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/ItemVoltmeter.java b/src/main/java/com/eloraam/redpower/machine/ItemVoltmeter.java new file mode 100644 index 0000000..a8eeb2b --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/ItemVoltmeter.java @@ -0,0 +1,55 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.core.BluePowerConductor; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.IBluePowerConnectable; +import com.eloraam.redpower.core.IPipeConnectable; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +public class ItemVoltmeter extends Item { + public ItemVoltmeter() { + this.setMaxStackSize(1); + this.setCreativeTab(CreativeTabs.tabTools); + this.setTextureName("rpmachine:voltmeter"); + this.setUnlocalizedName("voltmeter"); + } + + private boolean measureBlue(EntityPlayer player, World world, int x, int y, int z, int side) { + IBluePowerConnectable ibc = CoreLib.getTileEntity(world, x, y, z, IBluePowerConnectable.class); + if (ibc == null) { + return false; + } else { + BluePowerConductor bpc = ibc.getBlueConductor(side); + double v = bpc.getVoltage(); + CoreLib.writeChat(player, String.format("Reading %.2fV %.2fA (%.2fW)", v, bpc.Itot, v * bpc.Itot)); + return true; + } + } + + private boolean measurePressure(EntityPlayer player, World world, int x, int y, int z, int side) { + IPipeConnectable ipc = CoreLib.getTileEntity(world, x, y, z, IPipeConnectable.class); + if (ipc == null) { + return false; + } else { + int psi = ipc.getPipePressure(side); + CoreLib.writeChat(player, String.format("Reading %d psi", psi)); + return true; + } + } + + private boolean itemUseShared(ItemStack ist, EntityPlayer player, World world, int i, int j, int k, int l) { + return this.measureBlue(player, world, i, j, k, l) || this.measurePressure(player, world, i, j, k, l); + } + + public boolean onItemUse(ItemStack ist, EntityPlayer player, World world, int x, int y, int z, int side, float xp, float yp, float zp) { + return !player.isSneaking() && this.itemUseShared(ist, player, world, x, y, z, side); + } + + public boolean onItemUseFirst(ItemStack ist, EntityPlayer player, World world, int x, int y, int z, int side, float xp, float yp, float zp) { + return !world.isRemote && player.isSneaking() && this.itemUseShared(ist, player, world, x, y, z, side); + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/ItemWindmill.java b/src/main/java/com/eloraam/redpower/machine/ItemWindmill.java new file mode 100644 index 0000000..689b189 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/ItemWindmill.java @@ -0,0 +1,49 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerBase; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import java.util.List; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +public class ItemWindmill extends Item { + public int windmillType; + + public ItemWindmill(int tp) { + this.setTextureName("rpmachine:windTurbine"); + this.setMaxStackSize(1); + this.setMaxDamage(1000); + this.setUnlocalizedName("windTurbineWood"); + this.windmillType = tp; + this.setCreativeTab(CreativeTabs.tabMisc); + } + + @SideOnly(Side.CLIENT) + public void getSubItems(int id, CreativeTabs tab, List list) { + list.add(new ItemStack(this, 1, 0)); + } + + public boolean canFaceDirection(int dir) { + switch(this.windmillType) { + case 1: + return dir == 0; + case 2: + return dir > 1; + default: + return false; + } + } + + public ItemStack getBrokenItem() { + switch(this.windmillType) { + case 1: + return new ItemStack(RedPowerBase.blockMicro, 3, 5905); + case 2: + return new ItemStack(RedPowerBase.blockMicro, 1, 5905); + default: + return null; + } + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/MicroPlacementTube.java b/src/main/java/com/eloraam/redpower/machine/MicroPlacementTube.java new file mode 100644 index 0000000..1e11291 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/MicroPlacementTube.java @@ -0,0 +1,93 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.CoverLib; +import com.eloraam.redpower.core.CreativeExtraTabs; +import com.eloraam.redpower.core.IMicroPlacement; +import com.eloraam.redpower.core.RedPowerLib; +import com.eloraam.redpower.core.TileCovered; +import com.eloraam.redpower.core.WorldCoord; +import java.util.List; +import net.minecraft.block.Block; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +public class MicroPlacementTube implements IMicroPlacement { + private void blockUsed(World world, WorldCoord wc, ItemStack ist) { + --ist.stackSize; + CoreLib.placeNoise(world, wc.x, wc.y, wc.z, Block.getBlockFromItem(ist.getItem())); + world.markBlockForUpdate(wc.x, wc.y, wc.z); + RedPowerLib.updateIndirectNeighbors(world, wc.x, wc.y, wc.z, Block.getBlockFromItem(ist.getItem())); + } + + private boolean initialPlace(ItemStack ist, EntityPlayer player, World world, WorldCoord wc, int l) { + int md = ist.getItemDamage() >> 8; + Block bid = Block.getBlockFromItem(ist.getItem()); + if (!world.canPlaceEntityOnSide(world.getBlock(wc.x, wc.y, wc.z), wc.x, wc.y, wc.z, false, l, player, ist)) { + return false; + } else if (!world.setBlock(wc.x, wc.y, wc.z, bid, md, 3)) { + return true; + } else { + this.blockUsed(world, wc, ist); + return true; + } + } + + @Override + public boolean onPlaceMicro(ItemStack ist, EntityPlayer player, World world, WorldCoord wc, int size) { + wc.step(size); + Block bid = world.getBlock(wc.x, wc.y, wc.z); + if (bid != Block.getBlockFromItem(ist.getItem())) { + return this.initialPlace(ist, player, world, wc, size); + } else { + TileCovered tc = CoreLib.getTileEntity(world, wc, TileCovered.class); + if (tc == null) { + return false; + } else { + int eid = tc.getExtendedID(); + if (eid != 7 && eid != 8 && eid != 9 && eid != 10 && eid != 11) { + if (!CoverLib.tryMakeCompatible(world, wc, Block.getBlockFromItem(ist.getItem()), ist.getItemDamage())) { + return false; + } else { + this.blockUsed(world, wc, ist); + return true; + } + } else { + return false; + } + } + } + } + + @Override + public String getMicroName(int hb, int lb) { + return hb == 7 + ? "tile.rppipe" + : (hb == 8 ? "tile.rptube" : (hb == 9 ? "tile.rprstube" : (hb == 10 ? "tile.rprtube" : (hb == 11 ? "tile.rpmtube" : null)))); + } + + @Override + public void addCreativeItems(int hb, CreativeTabs tab, List items) { + if (tab == CreativeExtraTabs.tabMachine || tab == CreativeTabs.tabAllSearch) { + switch(hb) { + case 7: + items.add(new ItemStack(CoverLib.blockCoverPlate, 1, 1792)); + break; + case 8: + items.add(new ItemStack(CoverLib.blockCoverPlate, 1, 2048)); + break; + case 9: + items.add(new ItemStack(CoverLib.blockCoverPlate, 1, 2304)); + break; + case 10: + items.add(new ItemStack(CoverLib.blockCoverPlate, 1, 2560)); + break; + case 11: + items.add(new ItemStack(CoverLib.blockCoverPlate, 1, 2816)); + } + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/RenderAccel.java b/src/main/java/com/eloraam/redpower/machine/RenderAccel.java new file mode 100644 index 0000000..cd9b49b --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/RenderAccel.java @@ -0,0 +1,152 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.RenderContext; +import com.eloraam.redpower.core.RenderCustomBlock; +import com.eloraam.redpower.core.RenderModel; +import com.eloraam.redpower.core.TubeFlow; +import com.eloraam.redpower.core.TubeItem; +import com.eloraam.redpower.core.WorldCoord; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.entity.RenderItem; +import net.minecraft.client.renderer.entity.RenderManager; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.World; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public class RenderAccel extends RenderCustomBlock { + private RenderModel model = RenderModel.loadModel("rpmachine:models/accel.obj"); + private ResourceLocation modelRes = new ResourceLocation("rpmachine", "models/machine1.png"); + private RenderContext context = new RenderContext(); + private EntityItem item = new EntityItem((World)null); + private int[] paintColors = new int[]{ + 16777215, 16744448, 16711935, 7110911, 16776960, 65280, 16737408, 5460819, 9671571, 65535, 8388863, 255, 5187328, 32768, 16711680, 2039583 + }; + + public RenderAccel(Block block) { + super(block); + } + + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTicks) { + TileAccel accel = (TileAccel)tile; + World world = accel.getWorldObj(); + GL11.glDisable(2896); + Tessellator tess = Tessellator.instance; + this.context.setDefaults(); + this.context.setPos(x, y, z); + this.context.setOrientation(accel.Rotation, 0); + this.context.readGlobalLights(world, accel.xCoord, accel.yCoord, accel.zCoord); + if (accel.Charged) { + this.context.setBrightness(15728880); + } else { + this.context.setBrightness(this.getMixedBrightness(accel)); + } + + this.context.bindTexture(this.modelRes); + tess.startDrawingQuads(); + this.context.bindModelOffset(this.model, 0.5, 0.5, 0.5); + this.context.renderModelGroup(0, 0); + this.context.renderModelGroup(1, 1 + (accel.Charged ? 1 : 0)); + if (accel.Charged) { + this.context.setBrightness(this.getMixedBrightness(accel)); + } + + accel.recache(); + if ((accel.conCache & 1) > 0) { + this.context.renderModelGroup(2, 2); + } + + if ((accel.conCache & 2) > 0) { + this.context.renderModelGroup(2, 1); + } + + if ((accel.conCache & 4) > 0) { + this.context.renderModelGroup(3, 2); + } + + if ((accel.conCache & 8) > 0) { + this.context.renderModelGroup(3, 1); + } + + tess.draw(); + this.item.worldObj = world; + this.item.setPosition((double)accel.xCoord + 0.5, (double)accel.yCoord + 0.5, (double)accel.zCoord + 0.5); + RenderItem renderitem = (RenderItem)RenderManager.instance.getEntityClassRenderObject(EntityItem.class); + this.item.age = 0; + this.item.hoverStart = 0.0F; + WorldCoord offset = new WorldCoord(0, 0, 0); + TubeFlow flow = accel.getTubeFlow(); + int lv = accel.getWorldObj().getLightBrightnessForSkyBlocks(accel.xCoord, accel.yCoord, accel.zCoord, 0); + + for(TubeItem item : flow.contents) { + this.item.setEntityItemStack(item.item); + offset.x = 0; + offset.y = 0; + offset.z = 0; + offset.step(item.side); + double d = (double)item.progress / 128.0 * 0.5; + if (!item.scheduled) { + d = 0.5 - d; + } + + double yo = 0.0; + if (Item.getIdFromItem(item.item.getItem()) >= 256) { + yo += 0.1; + } + + renderitem.doRender( + this.item, + x + 0.5 + (double)offset.x * d, + y + 0.5 - (double)this.item.yOffset - yo + (double)offset.y * d, + z + 0.5 + (double)offset.z * d, + 0.0F, + 0.0F + ); + if (item.color > 0) { + this.context.bindBlockTexture(); + tess.startDrawingQuads(); + this.context.useNormal = true; + this.context.setDefaults(); + tess.setBrightness(lv); + this.context.setPos(x + (double)offset.x * d, y + (double)offset.y * d, z + (double)offset.z * d); + this.context.setTintHex(this.paintColors[item.color - 1]); + this.context.setIcon(RedPowerMachine.tubeItemOverlay); + this.context.renderBox(63, 0.26F, 0.26F, 0.26F, 0.74F, 0.74F, 0.74F); + tess.draw(); + } + } + + GL11.glEnable(2896); + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + super.block.setBlockBoundsForItemRender(); + this.context.setDefaults(); + if (type == ItemRenderType.INVENTORY) { + this.context.setPos(-0.5, -0.5, -0.5); + } else { + this.context.setPos(0.0, 0.0, 0.0); + } + + this.context.setOrientation(2, 0); + this.context.bindTexture(this.modelRes); + Tessellator tess = Tessellator.instance; + tess.startDrawingQuads(); + this.context.useNormal = true; + this.context.bindModelOffset(this.model, 0.5, 0.5, 0.5); + this.context.renderModelGroup(0, 0); + this.context.renderModelGroup(1, 1); + this.context.useNormal = false; + tess.draw(); + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/RenderBatteryBox.java b/src/main/java/com/eloraam/redpower/machine/RenderBatteryBox.java new file mode 100644 index 0000000..1a047c9 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/RenderBatteryBox.java @@ -0,0 +1,69 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.RenderContext; +import com.eloraam.redpower.core.RenderCustomBlock; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public class RenderBatteryBox extends RenderCustomBlock { + protected RenderContext context = new RenderContext(); + + public RenderBatteryBox(Block block) { + super(block); + } + + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTicks) { + TileBatteryBox battery = (TileBatteryBox)tile; + World world = tile.getWorldObj(); + GL11.glDisable(2896); + Tessellator tess = Tessellator.instance; + this.context.bindBlockTexture(); + this.context.setDefaults(); + this.context.setPos(x, y, z); + this.context.readGlobalLights(world, tile.xCoord, tile.yCoord, tile.zCoord); + this.context.setSize(0.0, 0.0, 0.0, 1.0, 1.0, 1.0); + this.context.setupBox(); + this.context.transform(); + IIcon side = RedPowerMachine.batterySide[battery.getStorageForRender()]; + this.context.setIcon(RedPowerMachine.electronicsBottom, RedPowerMachine.batteryTop, side, side, side, side); + tess.startDrawingQuads(); + this.context.renderGlobFaces(63); + tess.draw(); + GL11.glEnable(2896); + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + super.block.setBlockBoundsForItemRender(); + this.context.setDefaults(); + if (type == ItemRenderType.INVENTORY) { + this.context.setPos(-0.5, -0.5, -0.5); + } else { + this.context.setPos(0.0, 0.0, 0.0); + } + + this.context.useNormal = true; + Tessellator tess = Tessellator.instance; + tess.startDrawingQuads(); + short bat = 0; + if (item.stackTagCompound != null) { + bat = item.stackTagCompound.getShort("batLevel"); + } + + IIcon side = RedPowerMachine.batterySide[bat * 8 / 6000]; + this.context.setIcon(RedPowerMachine.electronicsBottom, RedPowerMachine.batteryTop, side, side, side, side); + this.context.renderBox(63, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0); + tess.draw(); + this.context.useNormal = false; + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/RenderBlueAlloyFurnace.java b/src/main/java/com/eloraam/redpower/machine/RenderBlueAlloyFurnace.java new file mode 100644 index 0000000..e99bdfe --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/RenderBlueAlloyFurnace.java @@ -0,0 +1,79 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.RenderContext; +import com.eloraam.redpower.core.RenderCustomBlock; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public class RenderBlueAlloyFurnace extends RenderCustomBlock { + protected RenderContext context = new RenderContext(); + + public RenderBlueAlloyFurnace(Block block) { + super(block); + } + + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTicks) { + TileBlueAlloyFurnace blueAlloyFurnace = (TileBlueAlloyFurnace)tile; + World world = blueAlloyFurnace.getWorldObj(); + GL11.glDisable(2896); + Tessellator tess = Tessellator.instance; + this.context.bindBlockTexture(); + this.context.setDefaults(); + this.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F); + this.context.setPos(x, y, z); + this.context.readGlobalLights(world, blueAlloyFurnace.xCoord, blueAlloyFurnace.yCoord, blueAlloyFurnace.zCoord); + this.context + .setIcon( + RedPowerMachine.electronicsBottom, + RedPowerMachine.btAlloyFurnaceTop, + blueAlloyFurnace.Active ? RedPowerMachine.btAlloyFurnaceFrontOn : RedPowerMachine.btAlloyFurnaceFront, + RedPowerMachine.btAlloyFurnaceSide, + RedPowerMachine.btAlloyFurnaceSide, + RedPowerMachine.btAlloyFurnaceSide + ); + this.context.setSize(0.0, 0.0, 0.0, 1.0, 1.0, 1.0); + this.context.setupBox(); + this.context.transform(); + this.context.rotateTextures(blueAlloyFurnace.Rotation); + tess.startDrawingQuads(); + this.context.renderGlobFaces(63); + tess.draw(); + GL11.glEnable(2896); + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + super.block.setBlockBoundsForItemRender(); + this.context.setDefaults(); + if (type == ItemRenderType.INVENTORY) { + this.context.setPos(-0.5, -0.5, -0.5); + } else { + this.context.setPos(0.0, 0.0, 0.0); + } + + this.context.useNormal = true; + Tessellator tess = Tessellator.instance; + tess.startDrawingQuads(); + this.context + .setIcon( + RedPowerMachine.electronicsBottom, + RedPowerMachine.btAlloyFurnaceTop, + RedPowerMachine.btAlloyFurnaceSide, + RedPowerMachine.btAlloyFurnaceSide, + RedPowerMachine.btAlloyFurnaceSide, + RedPowerMachine.btAlloyFurnaceFront + ); + this.context.renderBox(63, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0); + tess.draw(); + this.context.useNormal = false; + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/RenderBlueFurnace.java b/src/main/java/com/eloraam/redpower/machine/RenderBlueFurnace.java new file mode 100644 index 0000000..3df3991 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/RenderBlueFurnace.java @@ -0,0 +1,79 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.RenderContext; +import com.eloraam.redpower.core.RenderCustomBlock; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public class RenderBlueFurnace extends RenderCustomBlock { + protected RenderContext context = new RenderContext(); + + public RenderBlueFurnace(Block block) { + super(block); + } + + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTicks) { + TileBlueFurnace blueFurnace = (TileBlueFurnace)tile; + World world = blueFurnace.getWorldObj(); + GL11.glDisable(2896); + Tessellator tess = Tessellator.instance; + this.context.bindBlockTexture(); + this.context.setDefaults(); + this.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F); + this.context.setPos(x, y, z); + this.context.readGlobalLights(world, blueFurnace.xCoord, blueFurnace.yCoord, blueFurnace.zCoord); + this.context + .setIcon( + RedPowerMachine.electronicsBottom, + RedPowerMachine.btFurnaceTop, + blueFurnace.Active ? RedPowerMachine.btFurnaceFrontOn : RedPowerMachine.btFurnaceFront, + RedPowerMachine.btFurnaceSide, + RedPowerMachine.btFurnaceSide, + RedPowerMachine.btFurnaceSide + ); + this.context.setSize(0.0, 0.0, 0.0, 1.0, 1.0, 1.0); + this.context.setupBox(); + this.context.transform(); + this.context.rotateTextures(blueFurnace.Rotation); + tess.startDrawingQuads(); + this.context.renderGlobFaces(63); + tess.draw(); + GL11.glEnable(2896); + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + super.block.setBlockBoundsForItemRender(); + this.context.setDefaults(); + if (type == ItemRenderType.INVENTORY) { + this.context.setPos(-0.5, -0.5, -0.5); + } else { + this.context.setPos(0.0, 0.0, 0.0); + } + + this.context.useNormal = true; + Tessellator tess = Tessellator.instance; + tess.startDrawingQuads(); + this.context + .setIcon( + RedPowerMachine.electronicsBottom, + RedPowerMachine.btFurnaceTop, + RedPowerMachine.btFurnaceSide, + RedPowerMachine.btFurnaceSide, + RedPowerMachine.btFurnaceSide, + RedPowerMachine.btFurnaceFront + ); + this.context.renderBox(63, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0); + tess.draw(); + this.context.useNormal = false; + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/RenderBreaker.java b/src/main/java/com/eloraam/redpower/machine/RenderBreaker.java new file mode 100644 index 0000000..e8c116e --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/RenderBreaker.java @@ -0,0 +1,74 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.RenderContext; +import com.eloraam.redpower.core.RenderCustomBlock; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public class RenderBreaker extends RenderCustomBlock { + protected RenderContext context = new RenderContext(); + + public RenderBreaker(Block block) { + super(block); + } + + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTicks) { + TileBreaker breaker = (TileBreaker)tile; + World world = breaker.getWorldObj(); + GL11.glDisable(2896); + Tessellator tess = Tessellator.instance; + this.context.bindBlockTexture(); + this.context.setDefaults(); + this.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F); + IIcon front = breaker.Active ? RedPowerMachine.breakerFrontOn : RedPowerMachine.breakerFront; + IIcon side = breaker.Active ? RedPowerMachine.breakerSideOn : RedPowerMachine.breakerSide; + this.context.setPos(x, y, z); + this.context.readGlobalLights(world, breaker.xCoord, breaker.yCoord, breaker.zCoord); + this.context.setIcon(RedPowerMachine.breakerBack, front, side, side, side, side); + this.context.setSize(0.0, 0.0, 0.0, 1.0, 1.0, 1.0); + this.context.setupBox(); + this.context.transform(); + this.context.orientTextures(breaker.Rotation); + tess.startDrawingQuads(); + this.context.renderGlobFaces(63); + tess.draw(); + GL11.glEnable(2896); + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + super.block.setBlockBoundsForItemRender(); + this.context.setDefaults(); + if (type == ItemRenderType.INVENTORY) { + this.context.setPos(-0.5, -0.5, -0.5); + } else { + this.context.setPos(0.0, 0.0, 0.0); + } + + this.context.useNormal = true; + Tessellator tess = Tessellator.instance; + tess.startDrawingQuads(); + this.context + .setIcon( + RedPowerMachine.breakerBack, + RedPowerMachine.breakerFront, + RedPowerMachine.breakerSide, + RedPowerMachine.breakerSide, + RedPowerMachine.breakerSide, + RedPowerMachine.breakerSide + ); + this.context.renderBox(63, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0); + tess.draw(); + this.context.useNormal = false; + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/RenderBufferChest.java b/src/main/java/com/eloraam/redpower/machine/RenderBufferChest.java new file mode 100644 index 0000000..17496f2 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/RenderBufferChest.java @@ -0,0 +1,80 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.RenderContext; +import com.eloraam.redpower.core.RenderCustomBlock; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public class RenderBufferChest extends RenderCustomBlock { + protected RenderContext context = new RenderContext(); + + public RenderBufferChest(Block block) { + super(block); + } + + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTicks) { + TileBufferChest buffer = (TileBufferChest)tile; + World world = buffer.getWorldObj(); + GL11.glDisable(2896); + Tessellator tess = Tessellator.instance; + this.context.bindBlockTexture(); + this.context.setDefaults(); + this.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F); + this.context.setPos(x, y, z); + this.context.readGlobalLights(world, buffer.xCoord, buffer.yCoord, buffer.zCoord); + this.context + .setIcon( + RedPowerMachine.bufferBack, + RedPowerMachine.bufferFront, + RedPowerMachine.bufferSide, + RedPowerMachine.bufferSide, + RedPowerMachine.bufferSide, + RedPowerMachine.bufferSide + ); + this.context.setSize(0.0, 0.0, 0.0, 1.0, 1.0, 1.0); + this.context.setupBox(); + this.context.transform(); + this.context.orientTextures(buffer.Rotation); + tess.startDrawingQuads(); + this.context.renderGlobFaces(63); + tess.draw(); + GL11.glEnable(2896); + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + this.context.bindBlockTexture(); + super.block.setBlockBoundsForItemRender(); + this.context.setDefaults(); + if (type == ItemRenderType.INVENTORY) { + this.context.setPos(-0.5, -0.5, -0.5); + } else { + this.context.setPos(0.0, 0.0, 0.0); + } + + this.context.useNormal = true; + Tessellator tess = Tessellator.instance; + tess.startDrawingQuads(); + this.context + .setIcon( + RedPowerMachine.bufferBack, + RedPowerMachine.bufferFront, + RedPowerMachine.bufferSide, + RedPowerMachine.bufferSide, + RedPowerMachine.bufferSide, + RedPowerMachine.bufferSide + ); + this.context.renderBox(63, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0); + tess.draw(); + this.context.useNormal = false; + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/RenderChargingBench.java b/src/main/java/com/eloraam/redpower/machine/RenderChargingBench.java new file mode 100644 index 0000000..6110973 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/RenderChargingBench.java @@ -0,0 +1,90 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.RenderContext; +import com.eloraam.redpower.core.RenderCustomBlock; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public class RenderChargingBench extends RenderCustomBlock { + protected RenderContext context = new RenderContext(); + + public RenderChargingBench(Block block) { + super(block); + } + + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTicks) { + TileChargingBench charger = (TileChargingBench)tile; + World world = charger.getWorldObj(); + GL11.glDisable(2896); + Tessellator tess = Tessellator.instance; + this.context.bindBlockTexture(); + this.context.setDefaults(); + this.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F); + this.context.setPos(x, y, z); + this.context.readGlobalLights(world, charger.xCoord, charger.yCoord, charger.zCoord); + int s = charger.getStorageForRender(); + IIcon front = RedPowerMachine.btChargerFront[s]; + if (charger.Powered) { + front = RedPowerMachine.btChargerFrontPowered[s]; + } + + if (charger.Active) { + front = RedPowerMachine.btChargerFrontActive[s]; + } + + this.context + .setIcon( + RedPowerMachine.btChargerBottom, + RedPowerMachine.btChargerTop, + front, + RedPowerMachine.btChargerSide, + RedPowerMachine.btChargerSide, + RedPowerMachine.btChargerSide + ); + this.context.setSize(0.0, 0.0, 0.0, 1.0, 1.0, 1.0); + this.context.setupBox(); + this.context.transform(); + this.context.rotateTextures(charger.Rotation); + tess.startDrawingQuads(); + this.context.renderGlobFaces(63); + tess.draw(); + GL11.glEnable(2896); + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + super.block.setBlockBoundsForItemRender(); + this.context.setDefaults(); + if (type == ItemRenderType.INVENTORY) { + this.context.setPos(-0.5, -0.5, -0.5); + } else { + this.context.setPos(0.0, 0.0, 0.0); + } + + this.context.useNormal = true; + Tessellator tess = Tessellator.instance; + tess.startDrawingQuads(); + this.context + .setIcon( + RedPowerMachine.btChargerBottom, + RedPowerMachine.btChargerTop, + RedPowerMachine.btChargerSide, + RedPowerMachine.btChargerSide, + RedPowerMachine.btChargerSide, + RedPowerMachine.btChargerFront[0] + ); + this.context.renderBox(63, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0); + tess.draw(); + this.context.useNormal = false; + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/RenderFrame.java b/src/main/java/com/eloraam/redpower/machine/RenderFrame.java new file mode 100644 index 0000000..21bddc9 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/RenderFrame.java @@ -0,0 +1,102 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.RenderCovers; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public class RenderFrame extends RenderCovers { + public RenderFrame(Block block) { + super(block); + } + + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTicks) { + TileFrame frame = (TileFrame)tile; + World world = frame.getWorldObj(); + GL11.glDisable(2896); + Tessellator tess = Tessellator.instance; + super.context.bindBlockTexture(); + super.context.setDefaults(); + super.context.setTint(1.0F, 1.0F, 1.0F); + super.context.setPos(x, y, z); + super.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F); + super.context.readGlobalLights(world, frame.xCoord, frame.yCoord, frame.zCoord); + tess.startDrawingQuads(); + if (frame.CoverSides > 0) { + short[] sides = new short[6]; + + for(int ps = 0; ps < 6; ++ps) { + sides[ps] = frame.Covers[ps]; + int tx = sides[ps] >> 8; + if (tx == 1 || tx == 4) { + sides[ps] = (short)(sides[ps] - 256); + } + } + + super.coverRenderer.render(frame.CoverSides, sides); + } + + super.context.exactTextureCoordinates = true; + super.context.setIcon(RedPowerMachine.frameCovered); + + for(int ps = 0; ps < 6; ++ps) { + int pc = 1 << ps; + IIcon icon = RedPowerMachine.frameCrossed; + super.coverRenderer.start(); + if ((frame.CoverSides & pc) > 0) { + if ((frame.StickySides & pc) > 0) { + icon = RedPowerMachine.framePaneled; + } else { + icon = RedPowerMachine.frameCovered; + } + } else { + pc |= 1 << (ps ^ 1); + super.context.setIconNum(ps ^ 1, RedPowerMachine.frameCrossed); + } + + super.context.setIconNum(ps, icon); + super.coverRenderer.setSize(ps, 0.0625F); + super.context.calcBoundsGlobal(); + super.context.renderGlobFaces(pc); + } + + tess.draw(); + super.context.exactTextureCoordinates = false; + GL11.glEnable(2896); + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + super.block.setBlockBoundsForItemRender(); + super.context.setDefaults(); + if (type == ItemRenderType.INVENTORY) { + super.context.setPos(-0.5, -0.5, -0.5); + } else { + super.context.setPos(0.0, 0.0, 0.0); + } + + super.context.useNormal = true; + super.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F); + Tessellator tess = Tessellator.instance; + tess.startDrawingQuads(); + super.context.setIcon(RedPowerMachine.frameCrossed); + this.doubleBox(63, 0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F, 0.01F); + tess.draw(); + super.context.useNormal = false; + } + + private void doubleBox(int sides, float x1, float y1, float z1, float x2, float y2, float z2, float ino) { + int s2 = sides << 1 & 42 | sides >> 1 & 21; + super.context.renderBox(sides, (double)x1, (double)y1, (double)z1, (double)x2, (double)y2, (double)z2); + super.context.renderBox(s2, (double)(x2 - ino), (double)(y2 - ino), (double)(z2 - ino), (double)(x1 + ino), (double)(y1 + ino), (double)(z1 + ino)); + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/RenderFrameMoving.java b/src/main/java/com/eloraam/redpower/machine/RenderFrameMoving.java new file mode 100644 index 0000000..db148fb --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/RenderFrameMoving.java @@ -0,0 +1,119 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.RenderContext; +import com.eloraam.redpower.core.RenderCustomBlock; +import com.eloraam.redpower.core.WorldCoord; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.RenderHelper; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public class RenderFrameMoving extends RenderCustomBlock { + private RenderBlocks rblocks; + private RenderContext context = new RenderContext(); + + public RenderFrameMoving(Block block) { + super(block); + } + + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTicks) { + TileFrameMoving frame = (TileFrameMoving)tile; + World world = frame.getWorldObj(); + Tessellator tess = Tessellator.instance; + if (!tile.isInvalid()) { + Block block = frame.movingBlock; + if (block != null) { + this.context.bindBlockTexture(); + int lv = world.getLightBrightnessForSkyBlocks(tile.xCoord, tile.yCoord, tile.zCoord, 0); + tess.setBrightness(lv); + RenderHelper.disableStandardItemLighting(); + GL11.glBlendFunc(770, 771); + GL11.glEnable(3042); + GL11.glEnable(2884); + if (Minecraft.isAmbientOcclusionEnabled()) { + GL11.glShadeModel(7425); + } else { + GL11.glShadeModel(7424); + } + + IBlockAccess wba = this.rblocks.blockAccess; + this.rblocks.blockAccess = frame.getFrameBlockAccess(); + TileMotor tm = CoreLib.getTileEntity(frame.getWorldObj(), frame.motorX, frame.motorY, frame.motorZ, TileMotor.class); + GL11.glPushMatrix(); + if (tm != null) { + WorldCoord wc = new WorldCoord(0, 0, 0); + wc.step(tm.MoveDir); + float ms = tm.getMoveScaled(); + GL11.glTranslatef((float)wc.x * ms, (float)wc.y * ms, (float)wc.z * ms); + } + + tess.setTranslation(x - (double)frame.xCoord, y - (double)frame.yCoord, z - (double)frame.zCoord); + tess.setColorOpaque(1, 1, 1); + if (frame.movingCrate) { + this.context.setDefaults(); + this.context.setBrightness(lv); + this.context.setPos((double)frame.xCoord, (double)frame.yCoord, (double)frame.zCoord); + this.context.setIcon(RedPowerMachine.crate); + tess.startDrawingQuads(); + this.context.renderBox(63, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0); + tess.draw(); + } else { + label47: { + frame.doRefresh(frame.getFrameBlockAccess()); + if (frame.movingTileEntity != null) { + TileEntitySpecialRenderer tesr = TileEntityRendererDispatcher.instance.getSpecialRenderer(frame.movingTileEntity); + if (tesr != null) { + try { + double tileX = (double)frame.xCoord; + double tileY = (double)frame.yCoord; + double tileZ = (double)frame.zCoord; + tesr.renderTileEntityAt(frame.movingTileEntity, tileX, tileY, tileZ, partialTicks); + } catch (Exception var24) { + try { + tess.draw(); + } catch (Exception var23) { + } + } + break label47; + } + } + + tess.startDrawingQuads(); + this.rblocks.renderAllFaces = true; + this.rblocks.renderBlockByRenderType(block, frame.xCoord, frame.yCoord, frame.zCoord); + this.rblocks.renderAllFaces = false; + tess.draw(); + } + } + + tess.setTranslation(0.0, 0.0, 0.0); + GL11.glPopMatrix(); + this.rblocks.blockAccess = wba; + RenderHelper.enableStandardItemLighting(); + } + } + + } + + public void func_147496_a(World world) { + this.rblocks = new RenderBlocks(world); + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/RenderFrameRedstoneTube.java b/src/main/java/com/eloraam/redpower/machine/RenderFrameRedstoneTube.java new file mode 100644 index 0000000..c4bffc9 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/RenderFrameRedstoneTube.java @@ -0,0 +1,188 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.TubeFlow; +import com.eloraam.redpower.core.TubeItem; +import com.eloraam.redpower.core.TubeLib; +import com.eloraam.redpower.core.WorldCoord; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.entity.RenderItem; +import net.minecraft.client.renderer.entity.RenderManager; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public class RenderFrameRedstoneTube extends RenderTube { + public RenderFrameRedstoneTube(Block block) { + super(block); + } + + @Override + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTicks) { + TileFrameRedstoneTube frameRedstoneTube = (TileFrameRedstoneTube)tile; + World world = frameRedstoneTube.getWorldObj(); + GL11.glDisable(2896); + Tessellator tess = Tessellator.instance; + int lv = world.getLightBrightnessForSkyBlocks(frameRedstoneTube.xCoord, frameRedstoneTube.yCoord, frameRedstoneTube.zCoord, 0); + tess.setBrightness(lv); + super.context.bindBlockTexture(); + super.context.setDefaults(); + super.context.setTint(1.0F, 1.0F, 1.0F); + super.context.setPos(x, y, z); + super.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F); + super.context.readGlobalLights(world, frameRedstoneTube.xCoord, frameRedstoneTube.yCoord, frameRedstoneTube.zCoord); + tess.startDrawingQuads(); + if (frameRedstoneTube.CoverSides > 0) { + short[] sides = new short[6]; + + for(int ps = 0; ps < 6; ++ps) { + sides[ps] = frameRedstoneTube.Covers[ps]; + int tx = sides[ps] >> 8; + if (tx == 1 || tx == 4) { + sides[ps] = (short)(sides[ps] - 256); + } + } + + super.coverRenderer.render(frameRedstoneTube.CoverSides, sides); + } + + int cons = TubeLib.getConnections(world, frameRedstoneTube.xCoord, frameRedstoneTube.yCoord, frameRedstoneTube.zCoord) + | frameRedstoneTube.getConnectionMask() >> 24; + super.context.exactTextureCoordinates = true; + super.context.setIcon(RedPowerMachine.frameCovered); + int side = frameRedstoneTube.CoverSides | cons; + + for(int ps = 0; ps < 6; ++ps) { + int pc = 1 << ps; + IIcon icon = RedPowerMachine.frameCrossed; + super.coverRenderer.start(); + if ((side & pc) > 0) { + if ((frameRedstoneTube.StickySides & pc) > 0) { + icon = RedPowerMachine.framePaneled; + } else { + icon = RedPowerMachine.frameCovered; + } + } else { + pc |= 1 << (ps ^ 1); + super.context.setIconNum(ps ^ 1, RedPowerMachine.frameCrossed); + } + + super.context.setIconNum(ps, icon); + super.coverRenderer.setSize(ps, 0.0625F); + super.context.calcBoundsGlobal(); + super.context.renderGlobFaces(pc); + } + + super.context.exactTextureCoordinates = false; + super.context.setBrightness(this.getMixedBrightness(frameRedstoneTube)); + int ps = (frameRedstoneTube.PowerState + 84) / 85; + this.renderCenterBlock(cons, RedPowerMachine.redstoneTubeSide[ps], RedPowerMachine.redstoneTubeFace[ps]); + if (frameRedstoneTube.paintColor > 0) { + int pc = super.paintColors[frameRedstoneTube.paintColor - 1]; + super.context.setTint((float)(pc >> 16) / 255.0F, (float)(pc >> 8 & 0xFF) / 255.0F, (float)(pc & 0xFF) / 255.0F); + this.renderBlockPaint(cons, RedPowerMachine.baseTubeFaceColor, RedPowerMachine.baseTubeSideColor, frameRedstoneTube.getBlockMetadata()); + } + + tess.draw(); + super.item.worldObj = world; + super.item.setPosition(x + 0.5, y + 0.5, z + 0.5); + RenderItem renderitem = (RenderItem)RenderManager.instance.getEntityClassRenderObject(EntityItem.class); + super.item.age = 0; + super.item.hoverStart = 0.0F; + WorldCoord offset = new WorldCoord(0, 0, 0); + TubeFlow flow = frameRedstoneTube.getTubeFlow(); + + for(TubeItem item : flow.contents) { + super.item.setEntityItemStack(item.item); + offset.x = 0; + offset.y = 0; + offset.z = 0; + offset.step(item.side); + double d = (double)item.progress / 128.0 * 0.5; + if (!item.scheduled) { + d = 0.5 - d; + } + + double yo = 0.0; + if (Item.getIdFromItem(item.item.getItem()) >= 256) { + yo += 0.1; + } + + renderitem.doRender( + super.item, + x + 0.5 + (double)offset.x * d, + y + 0.5 - (double)super.item.yOffset - yo + (double)offset.y * d, + z + 0.5 + (double)offset.z * d, + 0.0F, + 0.0F + ); + if (item.color > 0) { + tess.startDrawingQuads(); + super.context.useNormal = true; + super.context.setDefaults(); + super.context.setBrightness(lv); + super.context.setPos(x + (double)offset.x * d, y + (double)offset.y * d, z + (double)offset.z * d); + super.context.setTintHex(super.paintColors[item.color - 1]); + super.context.setIcon(RedPowerMachine.tubeItemOverlay); + super.context.renderBox(63, 0.26F, 0.26F, 0.26F, 0.74F, 0.74F, 0.74F); + tess.draw(); + } + } + + GL11.glEnable(2896); + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + super.block.setBlockBoundsForItemRender(); + super.context.setDefaults(); + if (type == ItemRenderType.INVENTORY) { + super.context.setPos(-0.5, -0.5, -0.5); + } else { + super.context.setPos(0.0, 0.0, 0.0); + } + + super.context.useNormal = true; + super.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F); + Tessellator tess = Tessellator.instance; + tess.startDrawingQuads(); + super.context + .setIcon( + RedPowerMachine.frameCovered, + RedPowerMachine.frameCovered, + RedPowerMachine.frameCrossed, + RedPowerMachine.frameCrossed, + RedPowerMachine.frameCrossed, + RedPowerMachine.frameCrossed + ); + this.doubleBox(63, 0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F, 0.01F); + super.context + .setIcon( + RedPowerMachine.redstoneTubeFace[0], + RedPowerMachine.redstoneTubeFace[0], + RedPowerMachine.redstoneTubeSide[0], + RedPowerMachine.redstoneTubeSide[0], + RedPowerMachine.redstoneTubeSide[0], + RedPowerMachine.redstoneTubeSide[0] + ); + super.context.renderBox(63, 0.25, 0.0, 0.25, 0.75, 1.0, 0.75); + super.context.renderBox(63, 0.74F, 0.99F, 0.74F, 0.26F, 0.01F, 0.26F); + tess.draw(); + super.context.useNormal = false; + } + + private void doubleBox(int sides, float x1, float y1, float z1, float x2, float y2, float z2, float ino) { + int s2 = sides << 1 & 42 | sides >> 1 & 21; + super.context.renderBox(sides, (double)x1, (double)y1, (double)z1, (double)x2, (double)y2, (double)z2); + super.context.renderBox(s2, (double)(x2 - ino), (double)(y2 - ino), (double)(z2 - ino), (double)(x1 + ino), (double)(y1 + ino), (double)(z1 + ino)); + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/RenderFrameTube.java b/src/main/java/com/eloraam/redpower/machine/RenderFrameTube.java new file mode 100644 index 0000000..7f2e4d1 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/RenderFrameTube.java @@ -0,0 +1,186 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.TubeFlow; +import com.eloraam.redpower.core.TubeItem; +import com.eloraam.redpower.core.TubeLib; +import com.eloraam.redpower.core.WorldCoord; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.entity.RenderItem; +import net.minecraft.client.renderer.entity.RenderManager; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public class RenderFrameTube extends RenderTube { + public RenderFrameTube(Block block) { + super(block); + } + + @Override + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTicks) { + TileFrameTube frameTube = (TileFrameTube)tile; + World world = frameTube.getWorldObj(); + GL11.glDisable(2896); + Tessellator tess = Tessellator.instance; + int lv = world.getLightBrightnessForSkyBlocks(frameTube.xCoord, frameTube.yCoord, frameTube.zCoord, 0); + tess.setBrightness(lv); + super.context.bindBlockTexture(); + super.context.setDefaults(); + super.context.setTint(1.0F, 1.0F, 1.0F); + super.context.setPos(x, y, z); + super.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F); + super.context.readGlobalLights(world, frameTube.xCoord, frameTube.yCoord, frameTube.zCoord); + if (frameTube.CoverSides > 0) { + short[] sides = new short[6]; + + for(int ps = 0; ps < 6; ++ps) { + sides[ps] = frameTube.Covers[ps]; + int pc = sides[ps] >> 8; + if (pc == 1 || pc == 4) { + sides[ps] = (short)(sides[ps] - 256); + } + } + + super.coverRenderer.render(frameTube.CoverSides, sides); + } + + int conn = TubeLib.getConnections(world, frameTube.xCoord, frameTube.yCoord, frameTube.zCoord); + super.context.exactTextureCoordinates = true; + tess.startDrawingQuads(); + super.context.setIcon(RedPowerMachine.frameCovered); + int sides = frameTube.CoverSides | conn; + + for(int ps = 0; ps < 6; ++ps) { + int pc = 1 << ps; + IIcon icon = RedPowerMachine.frameCrossed; + super.coverRenderer.start(); + if ((sides & pc) > 0) { + if ((frameTube.StickySides & pc) > 0) { + icon = RedPowerMachine.framePaneled; + } else { + icon = RedPowerMachine.frameCovered; + } + } else { + pc |= 1 << (ps ^ 1); + super.context.setIconNum(ps ^ 1, RedPowerMachine.frameCrossed); + } + + super.context.setIconNum(ps, icon); + super.coverRenderer.setSize(ps, 0.0625F); + super.context.calcBoundsGlobal(); + super.context.renderGlobFaces(pc); + } + + super.context.exactTextureCoordinates = false; + super.context.setBrightness(this.getMixedBrightness(frameTube)); + this.renderCenterBlock(conn, RedPowerMachine.baseTubeSide, RedPowerMachine.baseTubeFace); + if (frameTube.paintColor > 0) { + int pcolor = super.paintColors[frameTube.paintColor - 1]; + super.context.setTint((float)(pcolor >> 16) / 255.0F, (float)(pcolor >> 8 & 0xFF) / 255.0F, (float)(pcolor & 0xFF) / 255.0F); + this.renderBlockPaint(conn, RedPowerMachine.baseTubeFaceColor, RedPowerMachine.baseTubeSideColor, frameTube.getBlockMetadata()); + } + + tess.draw(); + super.item.worldObj = world; + super.item.setPosition(x + 0.5, y + 0.5, z + 0.5); + RenderItem renderitem = (RenderItem)RenderManager.instance.getEntityClassRenderObject(EntityItem.class); + super.item.age = 0; + super.item.hoverStart = 0.0F; + WorldCoord offset = new WorldCoord(0, 0, 0); + TubeFlow flow = frameTube.getTubeFlow(); + + for(TubeItem item : flow.contents) { + super.item.setEntityItemStack(item.item); + offset.x = 0; + offset.y = 0; + offset.z = 0; + offset.step(item.side); + double d = (double)item.progress / 128.0 * 0.5; + if (!item.scheduled) { + d = 0.5 - d; + } + + double yo = 0.0; + if (Item.getIdFromItem(item.item.getItem()) >= 256) { + yo += 0.1; + } + + renderitem.doRender( + super.item, + x + 0.5 + (double)offset.x * d, + y + 0.5 - (double)super.item.yOffset - yo + (double)offset.y * d, + z + 0.5 + (double)offset.z * d, + 0.0F, + 0.0F + ); + if (item.color > 0) { + tess.startDrawingQuads(); + super.context.useNormal = true; + super.context.setDefaults(); + super.context.setBrightness(lv); + super.context.setPos(x + (double)offset.x * d, y + (double)offset.y * d, z + (double)offset.z * d); + super.context.setTintHex(super.paintColors[item.color - 1]); + super.context.setIcon(RedPowerMachine.tubeItemOverlay); + super.context.renderBox(63, 0.26F, 0.26F, 0.26F, 0.74F, 0.74F, 0.74F); + tess.draw(); + } + } + + GL11.glEnable(2896); + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + super.block.setBlockBoundsForItemRender(); + super.context.setDefaults(); + if (type == ItemRenderType.INVENTORY) { + super.context.setPos(-0.5, -0.5, -0.5); + } else { + super.context.setPos(0.0, 0.0, 0.0); + } + + super.context.useNormal = true; + super.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F); + Tessellator tess = Tessellator.instance; + tess.startDrawingQuads(); + super.context + .setIcon( + RedPowerMachine.frameCovered, + RedPowerMachine.frameCovered, + RedPowerMachine.frameCrossed, + RedPowerMachine.frameCrossed, + RedPowerMachine.frameCrossed, + RedPowerMachine.frameCrossed + ); + this.doubleBox(63, 0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F, 0.01F); + super.context + .setIcon( + RedPowerMachine.baseTubeFace, + RedPowerMachine.baseTubeFace, + RedPowerMachine.baseTubeSide, + RedPowerMachine.baseTubeSide, + RedPowerMachine.baseTubeSide, + RedPowerMachine.baseTubeSide + ); + super.context.renderBox(63, 0.25, 0.0, 0.25, 0.75, 1.0, 0.75); + super.context.renderBox(63, 0.74F, 0.99F, 0.74F, 0.26F, 0.01F, 0.26F); + tess.draw(); + super.context.useNormal = false; + } + + private void doubleBox(int sides, float x1, float y1, float z1, float x2, float y2, float z2, float ino) { + int s2 = sides << 1 & 42 | sides >> 1 & 21; + super.context.renderBox(sides, (double)x1, (double)y1, (double)z1, (double)x2, (double)y2, (double)z2); + super.context.renderBox(s2, (double)(x2 - ino), (double)(y2 - ino), (double)(z2 - ino), (double)(x1 + ino), (double)(y1 + ino), (double)(z1 + ino)); + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/RenderGrate.java b/src/main/java/com/eloraam/redpower/machine/RenderGrate.java new file mode 100644 index 0000000..679fddf --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/RenderGrate.java @@ -0,0 +1,91 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.RenderContext; +import com.eloraam.redpower.core.RenderCustomBlock; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public class RenderGrate extends RenderCustomBlock { + protected RenderContext context = new RenderContext(); + + public RenderGrate(Block block) { + super(block); + } + + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTicks) { + TileGrate grate = (TileGrate)tile; + World world = grate.getWorldObj(); + GL11.glDisable(2896); + Tessellator tess = Tessellator.instance; + this.context.bindBlockTexture(); + this.context.setDefaults(); + this.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F); + this.context.setPos(x, y, z); + this.context.readGlobalLights(world, grate.xCoord, grate.yCoord, grate.zCoord); + this.context + .setIcon( + RedPowerMachine.grateBack, + RedPowerMachine.grateSide, + RedPowerMachine.grateMossySide, + RedPowerMachine.grateMossySide, + RedPowerMachine.grateMossySide, + RedPowerMachine.grateMossySide + ); + this.context.setSize(0.0, 0.0, 0.0, 1.0, 1.0, 1.0); + this.context.setupBox(); + this.context.transform(); + this.context.orientTextures(grate.Rotation); + tess.startDrawingQuads(); + this.context.renderGlobFaces(63); + this.context + .setIcon( + RedPowerMachine.grateEmptyBack, + RedPowerMachine.grateSide, + RedPowerMachine.grateSide, + RedPowerMachine.grateSide, + RedPowerMachine.grateSide, + RedPowerMachine.grateSide + ); + this.context.setLocalLights(0.3F); + this.context.setBrightness(this.getMixedBrightness(grate)); + this.context.renderBox(63, 0.99, 0.99, 0.99, 0.01, 0.01, 0.01); + tess.draw(); + GL11.glEnable(2896); + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + super.block.setBlockBoundsForItemRender(); + this.context.setDefaults(); + if (type == ItemRenderType.INVENTORY) { + this.context.setPos(-0.5, -0.5, -0.5); + } else { + this.context.setPos(0.0, 0.0, 0.0); + } + + this.context.useNormal = true; + Tessellator tess = Tessellator.instance; + tess.startDrawingQuads(); + this.context + .setIcon( + RedPowerMachine.grateSide, + RedPowerMachine.grateBack, + RedPowerMachine.grateMossySide, + RedPowerMachine.grateMossySide, + RedPowerMachine.grateMossySide, + RedPowerMachine.grateMossySide + ); + this.context.doubleBox(63, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 0.01); + tess.draw(); + this.context.useNormal = false; + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/RenderMachine.java b/src/main/java/com/eloraam/redpower/machine/RenderMachine.java new file mode 100644 index 0000000..74790f9 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/RenderMachine.java @@ -0,0 +1,347 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.RenderContext; +import com.eloraam.redpower.core.RenderCustomBlock; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public class RenderMachine extends RenderCustomBlock { + protected RenderContext context = new RenderContext(); + + public RenderMachine(Block block) { + super(block); + } + + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTicks) { + TileMachine machine = (TileMachine)tile; + World world = machine.getWorldObj(); + int metadata = machine.getBlockMetadata(); + GL11.glDisable(2896); + Tessellator tess = Tessellator.instance; + this.context.bindBlockTexture(); + this.context.setDefaults(); + this.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F); + this.context.setPos(x, y, z); + this.context.readGlobalLights(world, machine.xCoord, machine.yCoord, machine.zCoord); + this.context.setBrightness(this.getMixedBrightness(machine)); + if (machine.getBlockType() == RedPowerMachine.blockMachine) { + switch(metadata) { + case 0: + this.context + .setIcon( + RedPowerMachine.deployerBack, + machine.Active ? RedPowerMachine.deployerFrontOn : RedPowerMachine.deployerFront, + RedPowerMachine.deployerSideAlt, + RedPowerMachine.deployerSideAlt, + RedPowerMachine.deployerSide, + RedPowerMachine.deployerSide + ); + break; + case 1: + case 2: + case 3: + case 6: + case 7: + case 9: + case 11: + default: { //TODO: WTF? + IIcon side = metadata == 3 + ? (machine.Active ? RedPowerMachine.filterSideOn : RedPowerMachine.filterSide) + : (machine.Active ? RedPowerMachine.transposerSideOn : RedPowerMachine.transposerSide); + this.context.setIcon(RedPowerMachine.breakerBack, RedPowerMachine.transposerFront, side, side, side, side); + break; + } + case 4: { + IIcon alt = machine.Active ? RedPowerMachine.detectorSideAltOn : RedPowerMachine.detectorSideAlt; + IIcon side; + if (machine.Charged) { + side = machine.Active ? RedPowerMachine.detectorSideChargedOn : RedPowerMachine.detectorSideCharged; + } else { + side = machine.Active ? RedPowerMachine.detectorSideOn : RedPowerMachine.detectorSide; + } + + this.context.setIcon(RedPowerMachine.regulatorBack, RedPowerMachine.regulatorFront, alt, alt, side, side); + break; + } + case 5: { + IIcon side; + if (machine.Charged) { + side = machine.Active ? RedPowerMachine.sorterSideChargedOn : RedPowerMachine.sorterSideCharged; + } else { + side = machine.Active ? RedPowerMachine.sorterSideOn : RedPowerMachine.sorterSide; + } + + this.context + .setIcon( + machine.Charged ? (machine.Active ? RedPowerMachine.sorterBackChargedOn : RedPowerMachine.sorterBackCharged) : RedPowerMachine.sorterBack, + RedPowerMachine.sorterFront, + side, + side, + side, + side + ); + break; + } + case 8: { + IIcon side; + if (machine.Charged) { + side = machine.Active ? RedPowerMachine.retrieverSideChargedOn : RedPowerMachine.retrieverSideCharged; + } else { + side = machine.Active ? RedPowerMachine.retrieverSideOn : RedPowerMachine.retrieverSide; + } + + this.context.setIcon(RedPowerMachine.retrieverBack, RedPowerMachine.retrieverFront, side, side, side, side); + break; + } + case 10: { + IIcon alt = machine.Active ? RedPowerMachine.regulatorSideAltCharged : RedPowerMachine.regulatorSideAlt; + IIcon side; + if (machine.Powered) { + side = machine.Active ? RedPowerMachine.regulatorSideChargedOn : RedPowerMachine.regulatorSideCharged; + } else { + side = machine.Active ? RedPowerMachine.regulatorSideOn : RedPowerMachine.regulatorSide; + } + + this.context.setIcon(RedPowerMachine.regulatorBack, RedPowerMachine.regulatorFront, alt, alt, side, side); + break; + } + case 12: + this.context + .setIcon( + RedPowerMachine.breakerBack, + machine.Active ? RedPowerMachine.igniterFrontOn : RedPowerMachine.igniterFront, + RedPowerMachine.igniterSideAlt, + RedPowerMachine.igniterSideAlt, + RedPowerMachine.igniterSide, + RedPowerMachine.igniterSide + ); + break; + case 13: + this.context + .setIcon( + machine.Active ? RedPowerMachine.assemblerBackOn : RedPowerMachine.assemblerBack, + machine.Active ? RedPowerMachine.assemblerFrontOn : RedPowerMachine.assemblerFront, + RedPowerMachine.assemblerSideAlt, + RedPowerMachine.assemblerSideAlt, + RedPowerMachine.assemblerSide, + RedPowerMachine.assemblerSide + ); + break; + case 14: { + IIcon side = machine.Active ? RedPowerMachine.ejectorSideOn : RedPowerMachine.ejectorSide; + this.context + .setIcon(RedPowerMachine.breakerBack, RedPowerMachine.bufferFront, side, side, RedPowerMachine.relaySideAlt, RedPowerMachine.relaySideAlt); + break; + } + case 15: { + IIcon side = machine.Active ? RedPowerMachine.relaySideOn : RedPowerMachine.relaySide; + this.context + .setIcon(RedPowerMachine.breakerBack, RedPowerMachine.bufferFront, side, side, RedPowerMachine.relaySideAlt, RedPowerMachine.relaySideAlt); + } + } + } else if (machine.getBlockType() == RedPowerMachine.blockMachine2) { + switch(metadata) { + case 0: { + IIcon side = machine.Charged + ? (machine.Active ? RedPowerMachine.sortronSideChargedOn : RedPowerMachine.sortronSideCharged) + : (machine.Active ? RedPowerMachine.sortronSideOn : RedPowerMachine.sortronSide); + IIcon alt = machine.Charged ? RedPowerMachine.sortronSideAltCharged : RedPowerMachine.sortronSideAlt; + this.context.setIcon(RedPowerMachine.sortronBack, RedPowerMachine.sortronFront, alt, alt, side, side); + break; + } + case 1: { + IIcon side = (machine.Charged ? RedPowerMachine.managerSideCharged : RedPowerMachine.managerSide)[(machine.Active ? 1 : 0) + + (!machine.Delay && !machine.Powered ? 0 : 2)]; + this.context.setIcon(RedPowerMachine.managerBack, RedPowerMachine.managerFront, side, side, side, side); + } + } + } + + this.context.setSize(0.0, 0.0, 0.0, 1.0, 1.0, 1.0); + this.context.setupBox(); + this.context.transform(); + this.context.orientTextures(machine.Rotation); + tess.startDrawingQuads(); + this.context.renderGlobFaces(63); + tess.draw(); + GL11.glEnable(2896); + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + Block block = Block.getBlockFromItem(item.getItem()); + int meta = item.getItemDamage(); + super.block.setBlockBoundsForItemRender(); + this.context.setDefaults(); + if (type == ItemRenderType.INVENTORY) { + this.context.setPos(-0.5, -0.5, -0.5); + } else { + this.context.setPos(0.0, 0.0, 0.0); + } + + this.context.useNormal = true; + Tessellator tess = Tessellator.instance; + tess.startDrawingQuads(); + if (block == RedPowerMachine.blockMachine) { + switch(meta) { + case 0: + this.context + .setIcon( + RedPowerMachine.deployerBack, + RedPowerMachine.deployerFront, + RedPowerMachine.deployerSideAlt, + RedPowerMachine.deployerSideAlt, + RedPowerMachine.deployerSide, + RedPowerMachine.deployerSide + ); + break; + case 1: + case 3: + case 6: + case 7: + case 9: + case 11: + default: + this.context + .setIcon( + RedPowerMachine.breakerBack, + RedPowerMachine.transposerFront, + RedPowerMachine.filterSide, + RedPowerMachine.filterSide, + RedPowerMachine.filterSide, + RedPowerMachine.filterSide + ); + break; + case 2: + this.context + .setIcon( + RedPowerMachine.breakerBack, + RedPowerMachine.transposerFront, + RedPowerMachine.transposerSide, + RedPowerMachine.transposerSide, + RedPowerMachine.transposerSide, + RedPowerMachine.transposerSide + ); + break; + case 4: + this.context + .setIcon( + RedPowerMachine.regulatorBack, + RedPowerMachine.regulatorFront, + RedPowerMachine.regulatorSideAlt, + RedPowerMachine.regulatorSideAlt, + RedPowerMachine.regulatorSide, + RedPowerMachine.regulatorSide + ); + break; + case 5: + this.context + .setIcon( + RedPowerMachine.sorterBack, + RedPowerMachine.sorterFront, + RedPowerMachine.sorterSide, + RedPowerMachine.sorterSide, + RedPowerMachine.sorterSide, + RedPowerMachine.sorterSide + ); + break; + case 8: + this.context + .setIcon( + RedPowerMachine.retrieverBack, + RedPowerMachine.retrieverFront, + RedPowerMachine.retrieverSide, + RedPowerMachine.retrieverSide, + RedPowerMachine.retrieverSide, + RedPowerMachine.retrieverSide + ); + break; + case 10: + this.context + .setIcon( + RedPowerMachine.regulatorBack, + RedPowerMachine.regulatorFront, + RedPowerMachine.regulatorSide, + RedPowerMachine.regulatorSide, + RedPowerMachine.regulatorSideAlt, + RedPowerMachine.regulatorSideAlt + ); + break; + case 12: + this.context + .setIcon( + RedPowerMachine.deployerBack, + RedPowerMachine.igniterFront, + RedPowerMachine.igniterSideAlt, + RedPowerMachine.igniterSideAlt, + RedPowerMachine.igniterSide, + RedPowerMachine.igniterSide + ); + break; + case 13: + this.context + .setIcon( + RedPowerMachine.assemblerBack, + RedPowerMachine.assemblerFront, + RedPowerMachine.assemblerSideAlt, + RedPowerMachine.assemblerSideAlt, + RedPowerMachine.assemblerSide, + RedPowerMachine.assemblerSide + ); + break; + case 14: + this.context + .setIcon( + RedPowerMachine.breakerBack, + RedPowerMachine.bufferFront, + RedPowerMachine.ejectorSide, + RedPowerMachine.ejectorSide, + RedPowerMachine.relaySideAlt, + RedPowerMachine.relaySideAlt + ); + break; + case 15: + this.context + .setIcon( + RedPowerMachine.breakerBack, + RedPowerMachine.bufferFront, + RedPowerMachine.relaySide, + RedPowerMachine.relaySide, + RedPowerMachine.relaySideAlt, + RedPowerMachine.relaySideAlt + ); + } + } else if (block == RedPowerMachine.blockMachine2) { + switch(meta) { + case 0: + this.context + .setIcon( + RedPowerMachine.sortronBack, + RedPowerMachine.sortronFront, + RedPowerMachine.sortronSideAlt, + RedPowerMachine.sortronSideAlt, + RedPowerMachine.sortronSide, + RedPowerMachine.sortronSide + ); + break; + case 1: + IIcon side = RedPowerMachine.managerSide[0]; + this.context.setIcon(RedPowerMachine.managerBack, RedPowerMachine.managerFront, side, side, side, side); + } + } + + this.context.renderBox(63, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0); + tess.draw(); + this.context.useNormal = false; + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/RenderMotor.java b/src/main/java/com/eloraam/redpower/machine/RenderMotor.java new file mode 100644 index 0000000..74df84b --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/RenderMotor.java @@ -0,0 +1,87 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.RenderContext; +import com.eloraam.redpower.core.RenderCustomBlock; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public class RenderMotor extends RenderCustomBlock { + protected RenderContext context = new RenderContext(); + + public RenderMotor(Block block) { + super(block); + } + + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTicks) { + TileMotor motor = (TileMotor)tile; + World world = motor.getWorldObj(); + Tessellator tess = Tessellator.instance; + GL11.glDisable(2896); + this.context.bindBlockTexture(); + this.context.setDefaults(); + this.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F); + this.context.setPos(x, y, z); + this.context.readGlobalLights(world, motor.xCoord, motor.yCoord, motor.zCoord); + this.context.setTexFlags(64); + if (motor.Active) { + this.context + .setIcon( + RedPowerMachine.motorBottom, + RedPowerMachine.motorTopActive, + RedPowerMachine.motorFrontActive, + RedPowerMachine.motorFrontActive, + RedPowerMachine.motorSide, + RedPowerMachine.motorSide + ); + } else { + IIcon tx = motor.Charged ? RedPowerMachine.motorFrontCharged : RedPowerMachine.motorFront; + this.context.setIcon(RedPowerMachine.motorBottom, RedPowerMachine.motorTop, tx, tx, RedPowerMachine.motorSide, RedPowerMachine.motorSide); + } + + this.context.setSize(0.0, 0.0, 0.0, 1.0, 1.0, 1.0); + this.context.setupBox(); + this.context.transform(); + this.context.orientTextureNew(motor.Rotation); + tess.startDrawingQuads(); + this.context.renderGlobFaces(63); + tess.draw(); + GL11.glEnable(2896); + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + super.block.setBlockBoundsForItemRender(); + this.context.setDefaults(); + if (type == ItemRenderType.INVENTORY) { + this.context.setPos(-0.5, -0.5, -0.5); + } else { + this.context.setPos(0.0, 0.0, 0.0); + } + + this.context.useNormal = true; + Tessellator tess = Tessellator.instance; + tess.startDrawingQuads(); + this.context + .setIcon( + RedPowerMachine.motorBottom, + RedPowerMachine.motorTop, + RedPowerMachine.motorFront, + RedPowerMachine.motorFront, + RedPowerMachine.motorSide, + RedPowerMachine.motorSide + ); + this.context.renderBox(63, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0); + tess.draw(); + this.context.useNormal = false; + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/RenderPipe.java b/src/main/java/com/eloraam/redpower/machine/RenderPipe.java new file mode 100644 index 0000000..9722d85 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/RenderPipe.java @@ -0,0 +1,241 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.PipeLib; +import com.eloraam.redpower.core.RenderCovers; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import net.minecraftforge.fluids.Fluid; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public class RenderPipe extends RenderCovers { + public RenderPipe(Block block) { + super(block); + } + + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTicks) { + TilePipe pipe = (TilePipe)tile; + World world = pipe.getWorldObj(); + Tessellator tess = Tessellator.instance; + GL11.glDisable(2896); + super.context.bindBlockTexture(); + super.context.exactTextureCoordinates = true; + super.context.setTexFlags(55); + super.context.setTint(1.0F, 1.0F, 1.0F); + super.context.setPos(x, y, z); + tess.startDrawingQuads(); + if (pipe.CoverSides > 0) { + super.context.readGlobalLights(world, pipe.xCoord, pipe.yCoord, pipe.zCoord); + this.renderCovers(pipe.CoverSides, pipe.Covers); + } + + int cons1 = PipeLib.getConnections(world, pipe.xCoord, pipe.yCoord, pipe.zCoord); + super.context.setBrightness(this.getMixedBrightness(pipe)); + super.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F); + super.context.setPos(x, y, z); + this.renderCenterBlock(cons1, RedPowerMachine.pipeSide, RedPowerMachine.pipeFace); + pipe.cacheFlange(); + this.renderFlanges(pipe.Flanges, RedPowerMachine.pipeFlanges); + tess.draw(); + int lvl = pipe.pipebuf.getLevel(); + Fluid fcl = pipe.pipebuf.Type; + if (fcl != null && lvl > 0) { + float lvn = Math.min(1.0F, (float)lvl / (float)pipe.pipebuf.getMaxLevel()); + pipe.cacheCon(); + int sides = pipe.ConCache; + int lv = world.getLightBrightnessForSkyBlocks(pipe.xCoord, pipe.yCoord, pipe.zCoord, 0); + GL11.glEnable(3042); + GL11.glBlendFunc(770, 771); + tess.startDrawingQuads(); + super.context.setBrightness(lv); + super.context.setPos(x, y, z); + super.context.setIcon(fcl.getIcon()); + if ((sides & 3) > 0) { + float y1 = 0.5F; + float y2 = 0.5F; + if ((sides & 1) > 0) { + y1 = 0.0F; + } + + if ((sides & 2) > 0) { + y2 = 1.0F; + } + + float n = 0.124F * lvn; + super.context.renderBox(60, (double)(0.5F - n), (double)y1, (double)(0.5F - n), (double)(0.5F + n), (double)y2, (double)(0.5F + n)); + } + + if ((sides & 12) > 0) { + float z1 = 0.5F; + float z2 = 0.5F; + if ((sides & 4) > 0) { + z1 = 0.0F; + } + + if ((sides & 8) > 0) { + z2 = 1.0F; + } + + float n = 0.248F * lvn; + super.context.renderBox(51, 0.376F, 0.376F, (double)z1, 0.624F, (double)(0.376F + n), (double)z2); + } + + if ((sides & 48) > 0) { + float x1 = 0.5F; + float x2 = 0.5F; + if ((sides & 16) > 0) { + x1 = 0.0F; + } + + if ((sides & 32) > 0) { + x2 = 1.0F; + } + + float n = 0.248F * lvn; + super.context.renderBox(15, (double)x1, 0.376F, 0.376F, (double)x2, (double)(0.376F + n), 0.624F); + } + + tess.draw(); + GL11.glDisable(3042); + } + + GL11.glEnable(2896); + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + super.block.setBlockBoundsForItemRender(); + super.context.setDefaults(); + if (type == ItemRenderType.INVENTORY) { + super.context.setPos(-0.5, -0.5, -0.5); + } else { + super.context.setPos(0.0, 0.0, 0.0); + } + + super.context.useNormal = true; + super.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F); + Tessellator tess = Tessellator.instance; + tess.startDrawingQuads(); + super.context.useNormal = true; + super.context + .setIcon( + RedPowerMachine.pipeFace, + RedPowerMachine.pipeFace, + RedPowerMachine.pipeSide, + RedPowerMachine.pipeSide, + RedPowerMachine.pipeSide, + RedPowerMachine.pipeSide + ); + super.context.renderBox(60, 0.375, 0.0, 0.375, 0.625, 1.0, 0.625); + super.context.renderBox(60, 0.624F, 0.999F, 0.624F, 0.376F, 0.001F, 0.376F); + this.renderFlanges(3, RedPowerMachine.pipeFlanges); + tess.draw(); + super.context.useNormal = false; + } + + private void doubleBox(int sides, float x1, float y1, float z1, float x2, float y2, float z2) { + int s2 = sides << 1 & 42 | sides >> 1 & 21; + super.context.renderBox(sides, (double)x1, (double)y1, (double)z1, (double)x2, (double)y2, (double)z2); + super.context.renderBox(s2, (double)x2, (double)y2, (double)z2, (double)x1, (double)y1, (double)z1); + } + + public void renderFlanges(int cons, IIcon tex) { + super.context.setIcon(tex); + if ((cons & 1) > 0) { + super.context.setTexFlags(0); + super.context.renderBox(63, 0.25, 0.0, 0.25, 0.75, 0.125, 0.75); + } + + if ((cons & 2) > 0) { + super.context.setTexFlags(112320); + super.context.renderBox(63, 0.25, 0.875, 0.25, 0.75, 1.0, 0.75); + } + + if ((cons & 4) > 0) { + super.context.setTexFlags(217134); + super.context.renderBox(63, 0.25, 0.25, 0.0, 0.75, 0.75, 0.125); + } + + if ((cons & 8) > 0) { + super.context.setTexFlags(188469); + super.context.renderBox(63, 0.25, 0.25, 0.875, 0.75, 0.75, 1.0); + } + + if ((cons & 16) > 0) { + super.context.setTexFlags(2944); + super.context.renderBox(63, 0.0, 0.25, 0.25, 0.125, 0.75, 0.75); + } + + if ((cons & 32) > 0) { + super.context.setTexFlags(3419); + super.context.renderBox(63, 0.875, 0.25, 0.25, 1.0, 0.75, 0.75); + } + + } + + public void renderCenterBlock(int cons, IIcon side, IIcon end) { + if (cons == 0) { + super.context.setIcon(end); + this.doubleBox(63, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F); + } else if (cons == 3) { + super.context.setTexFlags(1773); + super.context.setIcon(end, end, side, side, side, side); + this.doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 1.0F, 0.625F); + } else if (cons == 12) { + super.context.setTexFlags(184365); + super.context.setIcon(side, side, end, end, side, side); + this.doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 1.0F); + } else if (cons == 48) { + super.context.setTexFlags(187200); + super.context.setIcon(side, side, side, side, end, end); + this.doubleBox(15, 0.0F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F); + } else { + super.context.setIcon(end); + this.doubleBox(63 ^ cons, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F); + if ((cons & 1) > 0) { + super.context.setTexFlags(1773); + super.context.setIcon(end, end, side, side, side, side); + this.doubleBox(60, 0.375F, 0.0F, 0.375F, 0.625F, 0.375F, 0.625F); + } + + if ((cons & 2) > 0) { + super.context.setTexFlags(1773); + super.context.setIcon(end, end, side, side, side, side); + this.doubleBox(60, 0.375F, 0.625F, 0.375F, 0.625F, 1.0F, 0.625F); + } + + if ((cons & 4) > 0) { + super.context.setTexFlags(184365); + super.context.setIcon(side, side, end, end, side, side); + this.doubleBox(51, 0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 0.375F); + } + + if ((cons & 8) > 0) { + super.context.setTexFlags(184365); + super.context.setIcon(side, side, end, end, side, side); + this.doubleBox(51, 0.375F, 0.375F, 0.625F, 0.625F, 0.625F, 1.0F); + } + + if ((cons & 16) > 0) { + super.context.setTexFlags(187200); + super.context.setIcon(side, side, side, side, end, end); + this.doubleBox(15, 0.0F, 0.375F, 0.375F, 0.375F, 0.625F, 0.625F); + } + + if ((cons & 32) > 0) { + super.context.setTexFlags(187200); + super.context.setIcon(side, side, side, side, end, end); + this.doubleBox(15, 0.625F, 0.375F, 0.375F, 1.0F, 0.625F, 0.625F); + } + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/RenderPump.java b/src/main/java/com/eloraam/redpower/machine/RenderPump.java new file mode 100644 index 0000000..0c11905 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/RenderPump.java @@ -0,0 +1,94 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.core.RenderContext; +import com.eloraam.redpower.core.RenderCustomBlock; +import com.eloraam.redpower.core.RenderModel; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.World; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public class RenderPump extends RenderCustomBlock { + private RenderModel modelBase = RenderModel.loadModel("rpmachine:models/pump1.obj"); + private RenderModel modelSlide = RenderModel.loadModel("rpmachine:models/pump2.obj"); + private ResourceLocation modelRes = new ResourceLocation("rpmachine", "models/machine1.png"); + private RenderContext context = new RenderContext(); + private float lastPumpTick; + + public RenderPump(Block block) { + super(block); + } + + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTicks) { + TilePump pump = (TilePump)tile; + World world = pump.getWorldObj(); + GL11.glDisable(2896); + Tessellator tess = Tessellator.instance; + this.context.setDefaults(); + this.context.setPos(x, y, z); + this.context.setOrientation(0, pump.Rotation); + this.context.readGlobalLights(world, pump.xCoord, pump.yCoord, pump.zCoord); + this.context.setBrightness(this.getMixedBrightness(pump)); + this.context.bindTexture(this.modelRes); + tess.startDrawingQuads(); + this.context.bindModelOffset(this.modelBase, 0.5, 0.5, 0.5); + this.context.renderModelGroup(0, 0); + this.context.renderModelGroup(1, pump.Charged ? (pump.Active ? 3 : 2) : 1); + tess.draw(); + int lv = world.getLightBrightnessForSkyBlocks(pump.xCoord, pump.yCoord, pump.zCoord, 0); + this.context.bindTexture(this.modelRes); + tess.startDrawingQuads(); + tess.setBrightness(lv); + float pumpTick = 0.0F; + if (pump.Active) { + pumpTick += (float)pump.PumpTick; + if (pumpTick > 8.0F) { + pumpTick = 16.0F - pumpTick; + } + + pumpTick = (float)((double)pumpTick / 8.0); + } + + this.lastPumpTick = pumpTick; + this.context.useNormal = true; + this.context.setPos(x, y, z); + this.context.setOrientation(0, pump.Rotation); + float mod = this.lastPumpTick + (pumpTick - this.lastPumpTick) * partialTicks; + this.context.setRelPos(0.375 + 0.3125 * (double)mod, 0.0, 0.0); + this.context.bindModelOffset(this.modelSlide, 0.5, 0.5, 0.5); + this.context.renderModelGroup(0, 0); + tess.draw(); + GL11.glEnable(2896); + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + super.block.setBlockBoundsForItemRender(); + this.context.setDefaults(); + if (type == ItemRenderType.INVENTORY) { + this.context.setPos(-0.5, -0.5, -0.5); + } else { + this.context.setPos(0.0, 0.0, 0.0); + } + + this.context.bindTexture(this.modelRes); + Tessellator tess = Tessellator.instance; + tess.startDrawingQuads(); + this.context.useNormal = true; + this.context.bindModelOffset(this.modelBase, 0.5, 0.5, 0.5); + this.context.renderModelGroup(0, 0); + this.context.renderModelGroup(1, 1); + this.context.setRelPos(0.375, 0.0, 0.0); + this.context.bindModelOffset(this.modelSlide, 0.5, 0.5, 0.5); + this.context.renderModelGroup(0, 0); + this.context.useNormal = false; + tess.draw(); + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/RenderRedstoneTube.java b/src/main/java/com/eloraam/redpower/machine/RenderRedstoneTube.java new file mode 100644 index 0000000..79a403a --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/RenderRedstoneTube.java @@ -0,0 +1,136 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.TubeFlow; +import com.eloraam.redpower.core.TubeItem; +import com.eloraam.redpower.core.TubeLib; +import com.eloraam.redpower.core.WorldCoord; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.entity.RenderItem; +import net.minecraft.client.renderer.entity.RenderManager; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public class RenderRedstoneTube extends RenderTube { + public RenderRedstoneTube(Block block) { + super(block); + } + + @Override + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTicks) { + TileRedstoneTube redstoneTube = (TileRedstoneTube)tile; + World world = redstoneTube.getWorldObj(); + GL11.glDisable(2896); + Tessellator tess = Tessellator.instance; + int lv = world.getLightBrightnessForSkyBlocks(redstoneTube.xCoord, redstoneTube.yCoord, redstoneTube.zCoord, 0); + tess.setBrightness(lv); + tess.startDrawingQuads(); + super.context.bindBlockTexture(); + super.context.setTint(1.0F, 1.0F, 1.0F); + super.context.setPos(x, y, z); + if (redstoneTube.CoverSides > 0) { + super.context.readGlobalLights(world, redstoneTube.xCoord, redstoneTube.yCoord, redstoneTube.zCoord); + this.renderCovers(redstoneTube.CoverSides, redstoneTube.Covers); + } + + int cons1 = TubeLib.getConnections(world, redstoneTube.xCoord, redstoneTube.yCoord, redstoneTube.zCoord) | redstoneTube.getConnectionMask() >> 24; + super.context.setBrightness(this.getMixedBrightness(redstoneTube)); + super.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F); + super.context.setPos(x, y, z); + int ps = (redstoneTube.PowerState + 84) / 85; + this.renderCenterBlock(cons1, RedPowerMachine.redstoneTubeSide[ps], RedPowerMachine.redstoneTubeFace[ps]); + if (redstoneTube.paintColor > 0) { + int tc = super.paintColors[redstoneTube.paintColor - 1]; + super.context.setTint((float)(tc >> 16) / 255.0F, (float)(tc >> 8 & 0xFF) / 255.0F, (float)(tc & 0xFF) / 255.0F); + this.renderBlockPaint(cons1, RedPowerMachine.baseTubeFaceColor, RedPowerMachine.baseTubeSideColor, redstoneTube.getBlockMetadata()); + } + + tess.draw(); + super.item.worldObj = world; + super.item.setPosition(x + 0.5, y + 0.5, z + 0.5); + RenderItem renderitem = (RenderItem)RenderManager.instance.getEntityClassRenderObject(EntityItem.class); + super.item.age = 0; + super.item.hoverStart = 0.0F; + WorldCoord offset = new WorldCoord(0, 0, 0); + TubeFlow flow = redstoneTube.getTubeFlow(); + + for(TubeItem item : flow.contents) { + super.item.setEntityItemStack(item.item); + offset.x = 0; + offset.y = 0; + offset.z = 0; + offset.step(item.side); + double d = (double)item.progress / 128.0 * 0.5; + if (!item.scheduled) { + d = 0.5 - d; + } + + double yo = 0.0; + if (Item.getIdFromItem(item.item.getItem()) >= 256) { + yo += 0.1; + } + + renderitem.doRender( + super.item, + x + 0.5 + (double)offset.x * d, + y + 0.5 - (double)super.item.yOffset - yo + (double)offset.y * d, + z + 0.5 + (double)offset.z * d, + 0.0F, + 0.0F + ); + if (item.color > 0) { + super.context.bindBlockTexture(); + tess.startDrawingQuads(); + super.context.useNormal = true; + super.context.setDefaults(); + super.context.setBrightness(lv); + super.context.setPos(x + (double)offset.x * d, y + (double)offset.y * d, z + (double)offset.z * d); + super.context.setTintHex(super.paintColors[item.color - 1]); + super.context.setIcon(RedPowerMachine.tubeItemOverlay); + super.context.renderBox(63, 0.26F, 0.26F, 0.26F, 0.74F, 0.74F, 0.74F); + tess.draw(); + } + } + + GL11.glEnable(2896); + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + super.block.setBlockBoundsForItemRender(); + super.context.setDefaults(); + if (type == ItemRenderType.INVENTORY) { + super.context.setPos(-0.5, -0.5, -0.5); + } else { + super.context.setPos(0.0, 0.0, 0.0); + } + + super.context.useNormal = true; + super.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F); + Tessellator tess = Tessellator.instance; + tess.startDrawingQuads(); + super.context.useNormal = true; + super.context + .setIcon( + RedPowerMachine.redstoneTubeFace[0], + RedPowerMachine.redstoneTubeFace[0], + RedPowerMachine.redstoneTubeSide[0], + RedPowerMachine.redstoneTubeSide[0], + RedPowerMachine.redstoneTubeSide[0], + RedPowerMachine.redstoneTubeSide[0] + ); + super.context.renderBox(63, 0.25, 0.0, 0.25, 0.75, 1.0, 0.75); + super.context.renderBox(63, 0.74F, 0.99F, 0.74F, 0.26F, 0.01F, 0.26F); + tess.draw(); + super.context.useNormal = false; + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/RenderSolarPanel.java b/src/main/java/com/eloraam/redpower/machine/RenderSolarPanel.java new file mode 100644 index 0000000..5428118 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/RenderSolarPanel.java @@ -0,0 +1,78 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.RenderContext; +import com.eloraam.redpower.core.RenderCustomBlock; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public class RenderSolarPanel extends RenderCustomBlock { + protected RenderContext context = new RenderContext(); + + public RenderSolarPanel(Block block) { + super(block); + } + + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTicks) { + TileSolarPanel solarPanel = (TileSolarPanel)tile; + World world = solarPanel.getWorldObj(); + Tessellator tess = Tessellator.instance; + GL11.glDisable(2896); + this.context.bindBlockTexture(); + this.context.setDefaults(); + this.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F); + this.context.setPos(x, y, z); + this.context.readGlobalLights(world, solarPanel.xCoord, solarPanel.yCoord, solarPanel.zCoord); + this.context + .setIcon( + RedPowerMachine.electronicsBottom, + RedPowerMachine.solarPanelTop, + RedPowerMachine.solarPanelSide, + RedPowerMachine.solarPanelSide, + RedPowerMachine.solarPanelSide, + RedPowerMachine.solarPanelSide + ); + this.context.setSize(0.0, 0.0, 0.0, 1.0, 0.25, 1.0); + this.context.setupBox(); + this.context.transform(); + tess.startDrawingQuads(); + this.context.renderGlobFaces(62); + tess.draw(); + GL11.glEnable(2896); + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + super.block.setBlockBoundsForItemRender(); + this.context.setDefaults(); + if (type == ItemRenderType.INVENTORY) { + this.context.setPos(-0.5, -0.5, -0.5); + } else { + this.context.setPos(0.0, 0.0, 0.0); + } + + this.context.useNormal = true; + Tessellator tess = Tessellator.instance; + tess.startDrawingQuads(); + this.context + .setIcon( + RedPowerMachine.electronicsBottom, + RedPowerMachine.solarPanelTop, + RedPowerMachine.solarPanelSide, + RedPowerMachine.solarPanelSide, + RedPowerMachine.solarPanelSide, + RedPowerMachine.solarPanelSide + ); + this.context.renderBox(62, 0.0, 0.0, 0.0, 1.0, 0.25, 1.0); + tess.draw(); + this.context.useNormal = false; + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/RenderThermopile.java b/src/main/java/com/eloraam/redpower/machine/RenderThermopile.java new file mode 100644 index 0000000..455bd71 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/RenderThermopile.java @@ -0,0 +1,76 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.RenderContext; +import com.eloraam.redpower.core.RenderCustomBlock; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public class RenderThermopile extends RenderCustomBlock { + protected RenderContext context = new RenderContext(); + + public RenderThermopile(Block block) { + super(block); + } + + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTicks) { + TileThermopile thermopile = (TileThermopile)tile; + GL11.glDisable(2896); + Tessellator tess = Tessellator.instance; + this.context.bindBlockTexture(); + this.context.setDefaults(); + this.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F); + this.context.setPos(x, y, z); + this.context.readGlobalLights(thermopile.getWorldObj(), thermopile.xCoord, thermopile.yCoord, thermopile.zCoord); + this.context + .setIcon( + RedPowerMachine.thermopileTop, + RedPowerMachine.thermopileTop, + RedPowerMachine.thermopileSide, + RedPowerMachine.thermopileSide, + RedPowerMachine.thermopileFront, + RedPowerMachine.thermopileFront + ); + this.context.setSize(0.0, 0.0, 0.0, 1.0, 1.0, 1.0); + this.context.setupBox(); + this.context.transform(); + tess.startDrawingQuads(); + this.context.renderGlobFaces(63); + tess.draw(); + GL11.glEnable(2896); + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + super.block.setBlockBoundsForItemRender(); + this.context.setDefaults(); + if (type == ItemRenderType.INVENTORY) { + this.context.setPos(-0.5, -0.5, -0.5); + } else { + this.context.setPos(0.0, 0.0, 0.0); + } + + this.context.useNormal = true; + Tessellator tess = Tessellator.instance; + tess.startDrawingQuads(); + this.context + .setIcon( + RedPowerMachine.thermopileTop, + RedPowerMachine.thermopileTop, + RedPowerMachine.thermopileSide, + RedPowerMachine.thermopileSide, + RedPowerMachine.thermopileFront, + RedPowerMachine.thermopileFront + ); + this.context.renderBox(63, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0); + tess.draw(); + this.context.useNormal = false; + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/RenderTransformer.java b/src/main/java/com/eloraam/redpower/machine/RenderTransformer.java new file mode 100644 index 0000000..1731e7c --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/RenderTransformer.java @@ -0,0 +1,64 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.core.RenderContext; +import com.eloraam.redpower.core.RenderCustomBlock; +import com.eloraam.redpower.core.RenderModel; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.World; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public class RenderTransformer extends RenderCustomBlock { + protected RenderModel model = RenderModel.loadModel("rpmachine:models/transform.obj").scale(0.0625); + protected ResourceLocation modelRes = new ResourceLocation("rpmachine", "models/machine2.png"); + protected RenderContext context = new RenderContext(); + + public RenderTransformer(Block block) { + super(block); + } + + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTicks) { + TileTransformer transformer = (TileTransformer)tile; + World world = transformer.getWorldObj(); + GL11.glDisable(2896); + Tessellator tess = Tessellator.instance; + this.context.setDefaults(); + this.context.setPos(x, y, z); + this.context.setOrientation(transformer.Rotation >> 2, transformer.Rotation + 3 & 3); + this.context.readGlobalLights(world, transformer.xCoord, transformer.yCoord, transformer.zCoord); + this.context.setBrightness(this.getMixedBrightness(transformer)); + this.context.bindTexture(this.modelRes); + tess.startDrawingQuads(); + this.context.bindModelOffset(this.model, 0.5, 0.5, 0.5); + this.context.renderModelGroup(0, 0); + tess.draw(); + GL11.glEnable(2896); + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + super.block.setBlockBoundsForItemRender(); + this.context.setDefaults(); + if (type == ItemRenderType.INVENTORY) { + this.context.setPos(-0.5, -0.5, -0.5); + } else { + this.context.setPos(0.0, 0.0, 0.0); + } + + this.context.bindTexture(this.modelRes); + Tessellator tess = Tessellator.instance; + tess.startDrawingQuads(); + this.context.useNormal = true; + this.context.bindModelOffset(this.model, 0.5, 0.5, 0.5); + this.context.renderModelGroup(0, 0); + this.context.useNormal = false; + tess.draw(); + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/RenderTube.java b/src/main/java/com/eloraam/redpower/machine/RenderTube.java new file mode 100644 index 0000000..62ad72d --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/RenderTube.java @@ -0,0 +1,356 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.RenderCovers; +import com.eloraam.redpower.core.TubeFlow; +import com.eloraam.redpower.core.TubeItem; +import com.eloraam.redpower.core.TubeLib; +import com.eloraam.redpower.core.WorldCoord; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.entity.RenderItem; +import net.minecraft.client.renderer.entity.RenderManager; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public class RenderTube extends RenderCovers { + protected int[] paintColors = new int[]{ + 16777215, 16744448, 16711935, 7110911, 16776960, 65280, 16737408, 5460819, 9671571, 65535, 8388863, 255, 5187328, 32768, 16711680, 2039583 + }; + protected EntityItem item = new EntityItem((World)null); + + public RenderTube(Block block) { + super(block); + } + + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTicks) { + TileTube tube = (TileTube)tile; + World world = tube.getWorldObj(); + int metadata = tube.getBlockMetadata(); + GL11.glDisable(2896); + Tessellator tess = Tessellator.instance; + int lv = world.getLightBrightnessForSkyBlocks(tube.xCoord, tube.yCoord, tube.zCoord, 0); + tess.setBrightness(lv); + tess.startDrawingQuads(); + super.context.bindBlockTexture(); + super.context.exactTextureCoordinates = true; + super.context.setTexFlags(55); + super.context.setTint(1.0F, 1.0F, 1.0F); + super.context.setPos(x, y, z); + if (tube.CoverSides > 0) { + super.context.readGlobalLights(world, tube.xCoord, tube.yCoord, tube.zCoord); + this.renderCovers(tube.CoverSides, tube.Covers); + } + + int cons = TubeLib.getConnections(world, tube.xCoord, tube.yCoord, tube.zCoord); + super.context.setBrightness(this.getMixedBrightness(tube)); + super.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F); + super.context.setPos(x, y, z); + switch(metadata) { + case 10: + this.renderCenterBlock(cons, RedPowerMachine.restrictTubeSide, RedPowerMachine.restrictTubeFace); + break; + case 11: + if (this.renderMagFins(cons, metadata)) { + this.renderCenterBlock(cons, RedPowerMachine.magTubeSide, RedPowerMachine.magTubeFace); + } else { + this.renderCenterBlock(cons, RedPowerMachine.magTubeSideNR, RedPowerMachine.magTubeFaceNR); + } + break; + default: + this.renderCenterBlock(cons, RedPowerMachine.baseTubeSide, RedPowerMachine.baseTubeFace); + } + + if (tube.paintColor > 0) { + int tc = this.paintColors[tube.paintColor - 1]; + super.context.setTint((float)(tc >> 16) / 255.0F, (float)(tc >> 8 & 0xFF) / 255.0F, (float)(tc & 0xFF) / 255.0F); + if (metadata == 10) { + this.renderBlockPaint(cons, RedPowerMachine.restrictTubeFaceColor, RedPowerMachine.restrictTubeSideColor, metadata); + } else { + this.renderBlockPaint(cons, RedPowerMachine.baseTubeFaceColor, RedPowerMachine.baseTubeSideColor, metadata); + } + } + + tess.draw(); + this.item.worldObj = world; + this.item.setPosition((double)tube.xCoord + 0.5, (double)tube.yCoord + 0.5, (double)tube.zCoord + 0.5); + RenderItem renderitem = (RenderItem)RenderManager.instance.getEntityClassRenderObject(EntityItem.class); + this.item.age = 0; + this.item.hoverStart = 0.0F; + WorldCoord offset = new WorldCoord(0, 0, 0); + TubeFlow flow = tube.getTubeFlow(); + + for(TubeItem item : flow.contents) { + this.item.setEntityItemStack(item.item); + offset.x = 0; + offset.y = 0; + offset.z = 0; + offset.step(item.side); + double d = (double)item.progress / 128.0 * 0.5; + if (!item.scheduled) { + d = 0.5 - d; + } + + double yo = 0.0; + if (Item.getIdFromItem(item.item.getItem()) >= 256) { + yo += 0.1; + } + + renderitem.doRender( + this.item, + x + 0.5 + (double)offset.x * d, + y + 0.5 - (double)this.item.yOffset - yo + (double)offset.y * d, + z + 0.5 + (double)offset.z * d, + 0.0F, + 0.0F + ); + if (item.color > 0) { + super.context.bindBlockTexture(); + tess.startDrawingQuads(); + super.context.useNormal = true; + super.context.setDefaults(); + super.context.setBrightness(lv); + super.context.setPos(x + (double)offset.x * d, y + (double)offset.y * d, z + (double)offset.z * d); + super.context.setTintHex(this.paintColors[item.color - 1]); + super.context.setIcon(RedPowerMachine.tubeItemOverlay); + super.context.renderBox(63, 0.26F, 0.26F, 0.26F, 0.74F, 0.74F, 0.74F); + tess.draw(); + } + } + + GL11.glEnable(2896); + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + int meta = item.getItemDamage(); + super.block.setBlockBoundsForItemRender(); + super.context.setDefaults(); + if (type == ItemRenderType.INVENTORY) { + super.context.setPos(-0.5, -0.5, -0.5); + } else { + super.context.setPos(0.0, 0.0, 0.0); + } + + super.context.useNormal = true; + super.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F); + Tessellator tess = Tessellator.instance; + tess.startDrawingQuads(); + super.context.useNormal = true; + if (meta >> 8 == 10) { + super.context + .setIcon( + RedPowerMachine.baseTubeFace, + RedPowerMachine.baseTubeFace, + RedPowerMachine.restrictTubeSide, + RedPowerMachine.restrictTubeSide, + RedPowerMachine.restrictTubeSide, + RedPowerMachine.restrictTubeSide + ); + } else if (meta >> 8 == 11) { + this.renderMagFins(3, meta); + super.context + .setIcon( + RedPowerMachine.magTubeFaceNR, + RedPowerMachine.magTubeFaceNR, + RedPowerMachine.magTubeSideNR, + RedPowerMachine.magTubeSideNR, + RedPowerMachine.magTubeSideNR, + RedPowerMachine.magTubeSideNR + ); + } else { + super.context + .setIcon( + RedPowerMachine.baseTubeFace, + RedPowerMachine.baseTubeFace, + RedPowerMachine.baseTubeSide, + RedPowerMachine.baseTubeSide, + RedPowerMachine.baseTubeSide, + RedPowerMachine.baseTubeSide + ); + } + + super.context.renderBox(63, 0.25, 0.0, 0.25, 0.75, 1.0, 0.75); + super.context.renderBox(63, 0.74F, 0.99F, 0.74F, 0.26F, 0.01F, 0.26F); + tess.draw(); + super.context.useNormal = false; + } + + private void doubleBox(int sides, float x1, float y1, float z1, float x2, float y2, float z2) { + int s2 = sides << 1 & 42 | sides >> 1 & 21; + super.context.renderBox(sides, (double)x1, (double)y1, (double)z1, (double)x2, (double)y2, (double)z2); + super.context.renderBox(s2, (double)x2, (double)y2, (double)z2, (double)x1, (double)y1, (double)z1); + } + + public boolean renderMagFins(int cons, int md) { + if (cons == 3) { + super.context.setTexFlags(0); + super.context + .setIcon( + RedPowerMachine.magTubeFace, + RedPowerMachine.magTubeFace, + RedPowerMachine.magTubeRing, + RedPowerMachine.magTubeRing, + RedPowerMachine.magTubeRing, + RedPowerMachine.magTubeRing + ); + super.context.renderBox(63, 0.125, 0.125, 0.125, 0.875, 0.375, 0.875); + super.context.renderBox(63, 0.125, 0.625, 0.125, 0.875, 0.875, 0.875); + return true; + } else if (cons == 12) { + super.context.setTexFlags(147492); + super.context + .setIcon( + RedPowerMachine.magTubeRing, + RedPowerMachine.magTubeRing, + RedPowerMachine.magTubeFace, + RedPowerMachine.magTubeFace, + RedPowerMachine.magTubeRing, + RedPowerMachine.magTubeRing + ); + super.context.renderBox(63, 0.125, 0.125, 0.125, 0.875, 0.875, 0.375); + super.context.renderBox(63, 0.125, 0.125, 0.625, 0.875, 0.875, 0.875); + return true; + } else if (cons == 48) { + super.context.setTexFlags(2304); + super.context + .setIcon( + RedPowerMachine.magTubeRing, + RedPowerMachine.magTubeRing, + RedPowerMachine.magTubeRing, + RedPowerMachine.magTubeRing, + RedPowerMachine.magTubeFace, + RedPowerMachine.magTubeFace + ); + super.context.renderBox(63, 0.125, 0.125, 0.125, 0.375, 0.875, 0.875); + super.context.renderBox(63, 0.625, 0.125, 0.125, 0.875, 0.875, 0.875); + return true; + } else { + return false; + } + } + + public void renderCenterBlock(int cons, IIcon side, IIcon end) { + if (cons == 0) { + super.context.setIcon(end); + this.doubleBox(63, 0.25F, 0.25F, 0.25F, 0.75F, 0.75F, 0.75F); + } else if (cons == 3) { + super.context.setTexFlags(1773); + super.context.setIcon(end, end, side, side, side, side); + this.doubleBox(60, 0.25F, 0.0F, 0.25F, 0.75F, 1.0F, 0.75F); + } else if (cons == 12) { + super.context.setTexFlags(184365); + super.context.setIcon(side, side, end, end, side, side); + this.doubleBox(51, 0.25F, 0.25F, 0.0F, 0.75F, 0.75F, 1.0F); + } else if (cons == 48) { + super.context.setTexFlags(187200); + super.context.setIcon(side, side, side, side, end, end); + this.doubleBox(15, 0.0F, 0.25F, 0.25F, 1.0F, 0.75F, 0.75F); + } else { + super.context.setIcon(end); + this.doubleBox(63 ^ cons, 0.25F, 0.25F, 0.25F, 0.75F, 0.75F, 0.75F); + if ((cons & 1) > 0) { + super.context.setTexFlags(1773); + super.context.setIcon(end, end, side, side, side, side); + this.doubleBox(60, 0.25F, 0.0F, 0.25F, 0.75F, 0.25F, 0.75F); + } + + if ((cons & 2) > 0) { + super.context.setTexFlags(1773); + super.context.setIcon(end, end, side, side, side, side); + this.doubleBox(60, 0.25F, 0.75F, 0.25F, 0.75F, 1.0F, 0.75F); + } + + if ((cons & 4) > 0) { + super.context.setTexFlags(184365); + super.context.setIcon(side, side, end, end, side, side); + this.doubleBox(51, 0.25F, 0.25F, 0.0F, 0.75F, 0.75F, 0.25F); + } + + if ((cons & 8) > 0) { + super.context.setTexFlags(184365); + super.context.setIcon(side, side, end, end, side, side); + this.doubleBox(51, 0.25F, 0.25F, 0.75F, 0.75F, 0.75F, 1.0F); + } + + if ((cons & 16) > 0) { + super.context.setTexFlags(187200); + super.context.setIcon(side, side, side, side, end, end); + this.doubleBox(15, 0.0F, 0.25F, 0.25F, 0.25F, 0.75F, 0.75F); + } + + if ((cons & 32) > 0) { + super.context.setTexFlags(187200); + super.context.setIcon(side, side, side, side, end, end); + this.doubleBox(15, 0.75F, 0.25F, 0.25F, 1.0F, 0.75F, 0.75F); + } + } + + } + + public void renderBlockPaint(int cons, IIcon faceIcon, IIcon sideIcon, int meta) { + if (cons != 0) { + if (cons == 3) { + super.context.setTexFlags(1773); + super.context.setIcon(null, null, sideIcon, sideIcon, sideIcon, sideIcon); + this.doubleBox(60, 0.25F, 0.0F, 0.25F, 0.75F, 1.0F, 0.75F); + } else if (cons == 12) { + super.context.setTexFlags(184365); + super.context.setIcon(sideIcon, sideIcon, null, null, sideIcon, sideIcon); + this.doubleBox(51, 0.25F, 0.25F, 0.0F, 0.75F, 0.75F, 1.0F); + } else if (cons == 48) { + super.context.setTexFlags(187200); + super.context.setIcon(sideIcon, sideIcon, sideIcon, sideIcon, null, null); + this.doubleBox(15, 0.0F, 0.25F, 0.25F, 1.0F, 0.75F, 0.75F); + } else { + super.context.setIcon(faceIcon); + this.doubleBox(63 ^ cons, 0.25F, 0.25F, 0.25F, 0.75F, 0.75F, 0.75F); + if ((cons & 1) > 0) { + super.context.setTexFlags(1773); + super.context.setIcon(faceIcon, faceIcon, sideIcon, sideIcon, sideIcon, sideIcon); + this.doubleBox(60, 0.25F, 0.0F, 0.25F, 0.75F, 0.25F, 0.75F); + } + + if ((cons & 2) > 0) { + super.context.setTexFlags(1773); + super.context.setIcon(faceIcon, faceIcon, sideIcon, sideIcon, sideIcon, sideIcon); + this.doubleBox(60, 0.25F, 0.75F, 0.25F, 0.75F, 1.0F, 0.75F); + } + + if ((cons & 4) > 0) { + super.context.setTexFlags(184365); + super.context.setIcon(sideIcon, sideIcon, faceIcon, faceIcon, sideIcon, sideIcon); + this.doubleBox(51, 0.25F, 0.25F, 0.0F, 0.75F, 0.75F, 0.25F); + } + + if ((cons & 8) > 0) { + super.context.setTexFlags(184365); + super.context.setIcon(sideIcon, sideIcon, faceIcon, faceIcon, sideIcon, sideIcon); + this.doubleBox(51, 0.25F, 0.25F, 0.75F, 0.75F, 0.75F, 1.0F); + } + + if ((cons & 16) > 0) { + super.context.setTexFlags(187200); + super.context.setIcon(sideIcon, sideIcon, sideIcon, sideIcon, faceIcon, faceIcon); + this.doubleBox(15, 0.0F, 0.25F, 0.25F, 0.25F, 0.75F, 0.75F); + } + + if ((cons & 32) > 0) { + super.context.setTexFlags(187200); + super.context.setIcon(sideIcon, sideIcon, sideIcon, sideIcon, faceIcon, faceIcon); + this.doubleBox(15, 0.75F, 0.25F, 0.25F, 1.0F, 0.75F, 0.75F); + } + } + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/RenderWindTurbine.java b/src/main/java/com/eloraam/redpower/machine/RenderWindTurbine.java new file mode 100644 index 0000000..16cb136 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/RenderWindTurbine.java @@ -0,0 +1,145 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.Matrix3; +import com.eloraam.redpower.core.RenderContext; +import com.eloraam.redpower.core.RenderCustomBlock; +import com.eloraam.redpower.core.RenderModel; +import com.eloraam.redpower.core.WorldCoord; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.World; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public class RenderWindTurbine extends RenderCustomBlock { + private RenderContext turbineContext = new RenderContext(); + private RenderContext bladesContext = new RenderContext(); + private RenderModel modelWoodTurbine = RenderModel.loadModel("rpmachine:models/vawt.obj").scale(0.0625); + private RenderModel modelWoodWindmill = RenderModel.loadModel("rpmachine:models/windmill.obj").scale(0.0625); + private ResourceLocation modelRes = new ResourceLocation("rpmachine", "models/vawt.png"); + + public RenderWindTurbine(Block block) { + super(block); + } + + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTicks) { + TileWindTurbine windTurbine = (TileWindTurbine)tile; + World world = windTurbine.getWorldObj(); + Tessellator tess = Tessellator.instance; + GL11.glDisable(2896); + this.turbineContext.bindBlockTexture(); + this.turbineContext.setDefaults(); + this.turbineContext.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F); + this.turbineContext.setPos(x, y, z); + this.turbineContext.readGlobalLights(world, windTurbine.xCoord, windTurbine.yCoord, windTurbine.zCoord); + this.turbineContext + .setIcon( + RedPowerMachine.motorBottom, + RedPowerMachine.turbineFront, + RedPowerMachine.turbineSide, + RedPowerMachine.turbineSide, + RedPowerMachine.turbineSideAlt, + RedPowerMachine.turbineSideAlt + ); + this.turbineContext.setSize(0.0, 0.0, 0.0, 1.0, 1.0, 1.0); + this.turbineContext.setupBox(); + this.turbineContext.transform(); + this.turbineContext.orientTextures(windTurbine.Rotation); + tess.startDrawingQuads(); + this.turbineContext.renderGlobFaces(63); + tess.draw(); + if (windTurbine.hasBlades) { + byte wtt = windTurbine.windmillType; + this.bladesContext.bindTexture(this.modelRes); + this.bladesContext.setDefaults(); + tess.startDrawingQuads(); + WorldCoord wc = new WorldCoord(windTurbine); + wc.step(windTurbine.Rotation ^ 1); + tess.setBrightness(world.getLightBrightnessForSkyBlocks(wc.x, wc.y, wc.z, 0)); + this.bladesContext.useNormal = true; + if (windTurbine.hasBrakes) { + partialTicks = (float)((double)partialTicks * 0.1); + } + + double tm = (double)(partialTicks * (float)windTurbine.speed + (float)windTurbine.phase); + if (wtt == 2) { + tm = -tm; + } + + this.bladesContext.setOrientation(windTurbine.Rotation, 0); + this.bladesContext.basis = Matrix3.getRotY(-4.0E-6 * tm).multiply(this.bladesContext.basis); + this.bladesContext.setPos(x, y, z); + this.bladesContext.setRelPos(0.5, 0.875, 0.5); + switch(wtt) { + case 1: + this.bladesContext.bindModelOffset(this.modelWoodTurbine, 0.5, 0.5, 0.5); + break; + case 2: + this.bladesContext.bindModelOffset(this.modelWoodWindmill, 0.5, 0.5, 0.5); + break; + default: + return; + } + + this.bladesContext.setTint(1.0F, 1.0F, 1.0F); + this.bladesContext.renderModelGroup(0, 0); + switch(wtt) { + case 1: + this.bladesContext.setTint(1.0F, 1.0F, 1.0F); + this.bladesContext.renderModelGroup(1, 1); + this.bladesContext.renderModelGroup(1, 3); + this.bladesContext.renderModelGroup(1, 5); + this.bladesContext.setTint(1.0F, 0.1F, 0.1F); + this.bladesContext.renderModelGroup(1, 2); + this.bladesContext.renderModelGroup(1, 4); + this.bladesContext.renderModelGroup(1, 6); + break; + default: + this.bladesContext.setTint(1.0F, 1.0F, 1.0F); + this.bladesContext.renderModelGroup(1, 1); + this.bladesContext.renderModelGroup(1, 3); + this.bladesContext.setTint(1.0F, 0.1F, 0.1F); + this.bladesContext.renderModelGroup(1, 2); + this.bladesContext.renderModelGroup(1, 4); + } + + tess.draw(); + } + + GL11.glEnable(2896); + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + super.block.setBlockBoundsForItemRender(); + this.turbineContext.setDefaults(); + if (type == ItemRenderType.INVENTORY) { + this.turbineContext.setPos(-0.5, -0.5, -0.5); + } else { + this.turbineContext.setPos(0.0, 0.0, 0.0); + } + + this.turbineContext.useNormal = true; + Tessellator tess = Tessellator.instance; + tess.startDrawingQuads(); + this.turbineContext + .setIcon( + RedPowerMachine.motorBottom, + RedPowerMachine.turbineFront, + RedPowerMachine.turbineSide, + RedPowerMachine.turbineSide, + RedPowerMachine.turbineSideAlt, + RedPowerMachine.turbineSideAlt + ); + this.turbineContext.renderBox(63, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0); + tess.draw(); + this.turbineContext.useNormal = false; + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/TileAccel.java b/src/main/java/com/eloraam/redpower/machine/TileAccel.java new file mode 100644 index 0000000..06d72fa --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/TileAccel.java @@ -0,0 +1,286 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.core.BluePowerConductor; +import com.eloraam.redpower.core.BluePowerEndpoint; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.IBluePowerConnectable; +import com.eloraam.redpower.core.ITubeConnectable; +import com.eloraam.redpower.core.ITubeFlow; +import com.eloraam.redpower.core.RedPowerLib; +import com.eloraam.redpower.core.TubeFlow; +import com.eloraam.redpower.core.TubeItem; +import com.eloraam.redpower.core.WorldCoord; +import java.util.Iterator; +import net.minecraft.block.Block; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; + +public class TileAccel extends TileMachinePanel implements IBluePowerConnectable, ITubeFlow { + TubeFlow flow = new TubeFlow() { + @Override + public TileEntity getParent() { + return TileAccel.this; + } + + @Override + public boolean schedule(TubeItem item, TubeFlow.TubeScheduleContext context) { + item.scheduled = true; + item.progress = 0; + item.side = (byte)(item.side ^ 1); + TileAccel.this.recache(); + item.power = 0; + if (( + item.side == TileAccel.super.Rotation && (TileAccel.this.conCache & 2) > 0 + || item.side == (TileAccel.super.Rotation ^ 1) && (TileAccel.this.conCache & 8) > 0 + ) + && TileAccel.this.cond.getVoltage() >= 60.0) { + TileAccel.this.cond.drawPower((double)(100 * item.item.stackSize)); + item.power = 255; + } + + return true; + } + }; + BluePowerEndpoint cond = new BluePowerEndpoint() { + @Override + public TileEntity getParent() { + return TileAccel.this; + } + }; + private boolean hasChanged = false; + public int ConMask = -1; + public int conCache = -1; + + @Override + public int getTubeConnectableSides() { + return 3 << (super.Rotation & 6); + } + + @Override + public int getTubeConClass() { + return 17; + } + + @Override + public boolean canRouteItems() { + return true; + } + + @Override + public boolean tubeItemEnter(int side, int state, TubeItem item) { + if (state != 0) { + return false; + } else if (side != super.Rotation && side != (super.Rotation ^ 1)) { + return false; + } else { + item.side = (byte)side; + this.flow.add(item); + this.hasChanged = true; + this.markDirty(); + return true; + } + } + + @Override + public boolean tubeItemCanEnter(int side, int state, TubeItem item) { + return state == 0; + } + + @Override + public int tubeWeight(int side, int state) { + return 0; + } + + @Override + public void addTubeItem(TubeItem ti) { + ti.side = (byte)(ti.side ^ 1); + this.flow.add(ti); + this.hasChanged = true; + this.markDirty(); + } + + @Override + public TubeFlow getTubeFlow() { + return this.flow; + } + + @Override + public int getPartMaxRotation(int part, boolean sec) { + return sec ? 0 : 5; + } + + @Override + public int getLightValue() { + return super.Charged ? 6 : 0; + } + + public void recache() { + if (this.conCache < 0) { + WorldCoord wc = new WorldCoord(this); + ITubeConnectable fw = CoreLib.getTileEntity(super.worldObj, wc.coordStep(super.Rotation), ITubeConnectable.class); + ITubeConnectable bw = CoreLib.getTileEntity(super.worldObj, wc.coordStep(super.Rotation ^ 1), ITubeConnectable.class); + this.conCache = 0; + if (fw != null) { + int mcl = fw.getTubeConClass(); + if (mcl < 17) { + this.conCache |= 1; + } else if (mcl >= 17) { + this.conCache |= 2; + } + } + + if (bw != null) { + int mcl = bw.getTubeConClass(); + if (mcl < 17) { + this.conCache |= 4; + } else if (mcl >= 17) { + this.conCache |= 8; + } + } + } + + } + + @Override + public int getConnectableMask() { + return 1073741823; + } + + @Override + public int getConnectClass(int side) { + return 65; + } + + @Override + public int getCornerPowerMode() { + return 0; + } + + @Override + public BluePowerConductor getBlueConductor(int side) { + return this.cond; + } + + @Override + public void onHarvestPart(EntityPlayer player, int part, boolean willHarvest) { + this.flow.onRemove(); + this.breakBlock(willHarvest); + } + + @Override + public int getExtendedID() { + return 2; + } + + @Override + public void updateEntity() { + super.updateEntity(); + if (this.flow.update()) { + this.hasChanged = true; + } + + if (this.hasChanged) { + if (!super.worldObj.isRemote) { + this.markForUpdate(); + } + + this.markDirty(); + } + + if (!super.worldObj.isRemote) { + if (this.ConMask < 0) { + this.ConMask = RedPowerLib.getConnections(super.worldObj, this, super.xCoord, super.yCoord, super.zCoord); + this.cond.recache(this.ConMask, 0); + } + + this.cond.iterate(); + this.markDirty(); + if (this.cond.Flow == 0) { + if (super.Charged) { + super.Charged = false; + this.updateBlock(); + this.updateLight(); + } + } else if (!super.Charged) { + super.Charged = true; + this.updateBlock(); + this.updateLight(); + } + } + + } + + @Override + public void onBlockPlaced(ItemStack ist, int side, EntityLivingBase ent) { + super.Rotation = this.getFacing(ent); + RedPowerLib.updateIndirectNeighbors(super.worldObj, super.xCoord, super.yCoord, super.zCoord, super.blockType); + if (ent instanceof EntityPlayer) { + super.Owner = ((EntityPlayer)ent).getGameProfile(); + } + + } + + @Override + public void onBlockNeighborChange(Block block) { + this.ConMask = -1; + this.conCache = -1; + this.updateBlock(); + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + this.cond.readFromNBT(data); + this.flow.readFromNBT(data); + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + this.cond.writeToNBT(data); + this.flow.writeToNBT(data); + } + + @Override + protected void writeToPacket(NBTTagCompound data) { + int cs = this.flow.contents.size(); + if (cs > 6) { + cs = 6; + } + + data.setInteger("cs", cs); + Iterator tii = this.flow.contents.iterator(); + + for(int i = 0; i < cs; ++i) { + TubeItem ti = (TubeItem)tii.next(); + NBTTagCompound itag = new NBTTagCompound(); + ti.writeToPacket(itag); + data.setTag("cs" + i, itag); + } + + if (this.hasChanged) { + this.hasChanged = false; + data.setBoolean("data", true); + super.writeToPacket(data); + } + + } + + @Override + protected void readFromPacket(NBTTagCompound data) { + this.flow.contents.clear(); + int cs = data.getInteger("cs"); + + for(int i = 0; i < cs; ++i) { + this.flow.contents.add(TubeItem.newFromPacket((NBTTagCompound)data.getTag("cs" + i))); + } + + if (data.hasKey("data")) { + super.readFromPacket(data); + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/TileAssemble.java b/src/main/java/com/eloraam/redpower/machine/TileAssemble.java new file mode 100644 index 0000000..b0017b4 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/TileAssemble.java @@ -0,0 +1,357 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.IRedPowerWiring; +import com.eloraam.redpower.core.RedPowerLib; +import com.eloraam.redpower.core.WorldCoord; +import java.util.stream.IntStream; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraftforge.common.util.FakePlayer; + +public class TileAssemble extends TileDeployBase implements ISidedInventory, IRedPowerWiring { + private ItemStack[] contents = new ItemStack[34]; + public byte select = 0; + public byte mode = 0; + public int skipSlots = 65534; + public int ConMask = -1; + public int PowerState = 0; + + @Override + public int getExtendedID() { + return 13; + } + + @Override + public boolean onBlockActivated(EntityPlayer player) { + if (player.isSneaking()) { + return false; + } else { + if (!super.worldObj.isRemote) { + player.openGui(RedPowerMachine.instance, 11, super.worldObj, super.xCoord, super.yCoord, super.zCoord); + } + + return true; + } + } + + @Override + public void onBlockRemoval() { + for(int i = 0; i < 34; ++i) { + ItemStack ist = this.contents[i]; + if (ist != null && ist.stackSize > 0) { + CoreLib.dropItem(super.worldObj, super.xCoord, super.yCoord, super.zCoord, ist); + } + } + + } + + @Override + public void onBlockNeighborChange(Block block) { + this.ConMask = -1; + if (this.mode == 0) { + super.onBlockNeighborChange(block); + } + + RedPowerLib.updateCurrent(super.worldObj, super.xCoord, super.yCoord, super.zCoord); + } + + @Override + public int getConnectionMask() { + if (this.ConMask >= 0) { + return this.ConMask; + } else { + this.ConMask = RedPowerLib.getConnections(super.worldObj, this, super.xCoord, super.yCoord, super.zCoord); + return this.ConMask; + } + } + + @Override + public int getExtConnectionMask() { + return 0; + } + + @Override + public int getPoweringMask(int ch) { + return 0; + } + + @Override + public int scanPoweringStrength(int cons, int ch) { + return 0; + } + + @Override + public int getCurrentStrength(int cons, int ch) { + return -1; + } + + @Override + public void updateCurrentStrength() { + if (this.mode == 1) { + for(int slot = 0; slot < 16; ++slot) { + short wc = (short)RedPowerLib.getMaxCurrentStrength(super.worldObj, super.xCoord, super.yCoord, super.zCoord, 1073741823, 0, slot + 1); + if (wc > 0) { + this.PowerState |= 1 << slot; + } else { + this.PowerState &= ~(1 << slot); + } + } + + CoreLib.markBlockDirty(super.worldObj, super.xCoord, super.yCoord, super.zCoord); + if (this.PowerState == 0) { + if (super.Active) { + this.scheduleTick(5); + } + } else if (!super.Active) { + super.Active = true; + this.updateBlock(); + int var41 = Integer.numberOfTrailingZeros(this.PowerState); + if (this.contents[var41] != null) { + WorldCoord var4 = new WorldCoord(this); + var4.step(super.Rotation ^ 1); + int ms = this.getMatchingStack(var41); + if (ms >= 0) { + this.enableTowardsActive(var4, ms); + } + } + } + } + + } + + @Override + public int getConnectClass(int side) { + return this.mode == 0 ? 0 : 18; + } + + protected void packInv(ItemStack[] bkup, int act, FakePlayer player) { + for(int i = 0; i < 36; ++i) { + bkup[i] = player.inventory.getStackInSlot(i); + player.inventory.setInventorySlotContents(i, null); + } + + for(int i = 0; i < 18; ++i) { + if (act == i) { + player.inventory.setInventorySlotContents(0, this.contents[16 + i]); + } else { + player.inventory.setInventorySlotContents(i + 9, this.contents[16 + i]); + } + } + + } + + protected void unpackInv(ItemStack[] bkup, int act, FakePlayer player) { + for(int i = 0; i < 18; ++i) { + if (act == i) { + this.contents[16 + i] = player.inventory.getStackInSlot(0); + } else { + this.contents[16 + i] = player.inventory.getStackInSlot(i + 9); + } + } + + for(int i = 0; i < 36; ++i) { + player.inventory.setInventorySlotContents(i, bkup[i]); + } + + } + + protected int getMatchingStack(int stack) { + for(int i = 0; i < 18; ++i) { + ItemStack compareStack = this.contents[16 + i]; + if (this.contents[16 + i] != null && CoreLib.compareItemStack(compareStack, this.contents[stack]) == 0) { + return i; + } + } + + return -1; + } + + @Override + public void enableTowards(WorldCoord wc) { + if (this.contents[this.select] != null) { + int i = this.getMatchingStack(this.select); + if (i >= 0) { + this.enableTowardsActive(wc, i); + } + } + + for(int i = 0; i < 16; ++i) { + this.select = (byte)(this.select + 1 & 15); + if ((this.skipSlots & 1 << this.select) == 0 || this.select == 0) { + break; + } + } + + } + + protected void enableTowardsActive(WorldCoord wc, int act) { + ItemStack[] bkup = new ItemStack[36]; + FakePlayer player = CoreLib.getRedpowerPlayer(super.worldObj, super.xCoord, super.yCoord, super.zCoord, super.Rotation, super.Owner); + this.packInv(bkup, act, player); + ItemStack ist = this.contents[16 + act]; + if (ist != null && ist.stackSize > 0 && this.tryUseItemStack(ist, wc.x, wc.y, wc.z, 0, player)) { + if (player.isUsingItem()) { + player.stopUsingItem(); + } + + this.unpackInv(bkup, act, player); + if (this.contents[16 + act].stackSize == 0) { + this.contents[16 + act] = null; + } + + this.markDirty(); + } else { + this.unpackInv(bkup, act, player); + } + + } + + public int getSizeInventory() { + return 34; + } + + public ItemStack getStackInSlot(int i) { + return this.contents[i]; + } + + public ItemStack decrStackSize(int i, int j) { + if (this.contents[i] == null) { + return null; + } else if (this.contents[i].stackSize <= j) { + ItemStack tr = this.contents[i]; + this.contents[i] = null; + this.markDirty(); + return tr; + } else { + ItemStack tr = this.contents[i].splitStack(j); + if (this.contents[i].stackSize == 0) { + this.contents[i] = null; + } + + this.markDirty(); + return tr; + } + } + + public ItemStack getStackInSlotOnClosing(int i) { + if (this.contents[i] == null) { + return null; + } else { + ItemStack ist = this.contents[i]; + this.contents[i] = null; + return ist; + } + } + + public void setInventorySlotContents(int i, ItemStack ist) { + this.contents[i] = ist; + if (ist != null && ist.stackSize > this.getInventoryStackLimit()) { + ist.stackSize = this.getInventoryStackLimit(); + } + + if (ist != null && i < 16) { + this.skipSlots &= ~(1 << i); + } + + this.markDirty(); + } + + public String getInventoryName() { + return "tile.rpassemble.name"; + } + + public int getInventoryStackLimit() { + return 64; + } + + public boolean isUseableByPlayer(EntityPlayer player) { + return !this.isInvalid() + && super.worldObj.getTileEntity(super.xCoord, super.yCoord, super.zCoord) == this + && player.getDistanceSq((double)super.xCoord + 0.5, (double)super.yCoord + 0.5, (double)super.zCoord + 0.5) <= 64.0; + } + + public void closeInventory() { + } + + public void openInventory() { + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + NBTTagList items = data.getTagList("Items", 10); + this.contents = new ItemStack[this.getSizeInventory()]; + + for(int i = 0; i < items.tagCount(); ++i) { + NBTTagCompound item = items.getCompoundTagAt(i); + int j = item.getByte("Slot") & 255; + if (j >= 0 && j < this.contents.length) { + this.contents[j] = ItemStack.loadItemStackFromNBT(item); + } + } + + this.mode = data.getByte("mode"); + this.select = data.getByte("sel"); + this.skipSlots = data.getShort("ssl"); + this.PowerState = data.getInteger("psex"); + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + NBTTagList items = new NBTTagList(); + + for(int i = 0; i < this.contents.length; ++i) { + if (this.contents[i] != null) { + NBTTagCompound item = new NBTTagCompound(); + item.setByte("Slot", (byte)i); + this.contents[i].writeToNBT(item); + items.appendTag(item); + } + } + + data.setTag("Items", items); + data.setByte("mode", this.mode); + data.setByte("sel", this.select); + data.setShort("ssl", (short)this.skipSlots); + data.setInteger("psex", this.PowerState); + } + + @Override + protected void readFromPacket(NBTTagCompound tag) { + super.readFromPacket(tag); + this.mode = tag.getByte("mode"); + } + + @Override + protected void writeToPacket(NBTTagCompound tag) { + super.writeToPacket(tag); + tag.setByte("mode", this.mode); + } + + public int[] getAccessibleSlotsFromSide(int side) { + return side != (super.Rotation ^ 1) ? IntStream.range(16, 24).toArray() : new int[0]; + } + + public boolean canInsertItem(int slotID, ItemStack stack, int side) { + return side != (super.Rotation ^ 1) && slotID >= 16 && slotID < 24; + } + + public boolean canExtractItem(int slotID, ItemStack stack, int side) { + return side != (super.Rotation ^ 1) && slotID >= 16 && slotID < 24; + } + + public boolean hasCustomInventoryName() { + return false; + } + + public boolean isItemValidForSlot(int slotID, ItemStack stack) { + return true; + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/TileBatteryBox.java b/src/main/java/com/eloraam/redpower/machine/TileBatteryBox.java new file mode 100644 index 0000000..2eda10f --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/TileBatteryBox.java @@ -0,0 +1,374 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.BluePowerConductor; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.IBluePowerConnectable; +import com.eloraam.redpower.core.IFrameSupport; +import com.eloraam.redpower.core.RedPowerLib; +import com.eloraam.redpower.core.TileExtended; +import java.util.List; +import net.minecraft.block.Block; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +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.world.IBlockAccess; + +public class TileBatteryBox extends TileExtended implements IBluePowerConnectable, ISidedInventory, IFrameSupport { + BluePowerConductor cond = new BluePowerConductor() { + @Override + public TileEntity getParent() { + return TileBatteryBox.this; + } + + @Override + public double getInvCap() { + return 0.25; + } + }; + protected ItemStack[] contents = new ItemStack[2]; + public int Charge = 0; + public int Storage = 0; + public int ConMask = -1; + public boolean Powered = false; + + @Override + public int getConnectableMask() { + return 1073741823; + } + + @Override + public int getConnectClass(int side) { + return 65; + } + + @Override + public int getCornerPowerMode() { + return 0; + } + + @Override + public BluePowerConductor getBlueConductor(int side) { + return this.cond; + } + + public int[] getAccessibleSlotsFromSide(int side) { + switch(side) { + case 0: + return new int[]{0}; + case 1: + return new int[]{1}; + default: + return new int[0]; + } + } + + @Override + public void addHarvestContents(List ist) { + ItemStack is = new ItemStack(this.getBlockType(), 1, this.getExtendedID()); + if (this.Storage > 0) { + is.setTagCompound(new NBTTagCompound()); + is.stackTagCompound.setShort("batLevel", (short)this.Storage); + } + + ist.add(is); + } + + @Override + public void onBlockPlaced(ItemStack ist, int side, EntityLivingBase ent) { + if (ist.stackTagCompound != null) { + this.Storage = ist.stackTagCompound.getShort("batLevel"); + } + + if (ent instanceof EntityPlayer) { + super.Owner = ((EntityPlayer)ent).getGameProfile(); + } + + } + + @Override + public int getExtendedID() { + return 6; + } + + public Block getBlockType() { + return RedPowerMachine.blockMachine; + } + + public int getMaxStorage() { + return 6000; + } + + public int getStorageForRender() { + return Math.max(0, Math.min(this.Storage * 8 / this.getMaxStorage(), 8)); + } + + public int getChargeScaled(int i) { + return Math.min(i, i * this.Charge / 1000); + } + + public int getStorageScaled(int i) { + return Math.min(i, i * this.Storage / this.getMaxStorage()); + } + + @Override + public void updateEntity() { + super.updateEntity(); + if (!super.worldObj.isRemote) { + if (this.ConMask < 0) { + this.ConMask = RedPowerLib.getConnections(super.worldObj, this, super.xCoord, super.yCoord, super.zCoord); + this.cond.recache(this.ConMask, 0); + } + + this.cond.iterate(); + this.markDirty(); + this.Charge = (int)(this.cond.getVoltage() * 10.0); + int rs = this.getStorageForRender(); + if (this.contents[0] != null && this.Storage > 0) { + if (this.contents[0].getItem() == RedPowerMachine.itemBatteryEmpty) { + this.contents[0] = new ItemStack(RedPowerMachine.itemBatteryPowered, 1, RedPowerMachine.itemBatteryPowered.getMaxDamage()); + this.markDirty(); + } + + if (this.contents[0].getItem() == RedPowerMachine.itemBatteryPowered) { + int n = Math.min(this.contents[0].getItemDamage() - 1, this.Storage); + n = Math.min(n, 25); + this.Storage -= n; + this.contents[0].setItemDamage(this.contents[0].getItemDamage() - n); + this.markDirty(); + } + } + + if (this.contents[1] != null && this.contents[1].getItem() == RedPowerMachine.itemBatteryPowered) { + int n = Math.min(this.contents[1].getMaxDamage() - this.contents[1].getItemDamage(), this.getMaxStorage() - this.Storage); + n = Math.min(n, 25); + this.Storage += n; + this.contents[1].setItemDamage(this.contents[1].getItemDamage() + n); + if (this.contents[1].getItemDamage() == this.contents[1].getMaxDamage()) { + this.contents[1] = new ItemStack(RedPowerMachine.itemBatteryEmpty, 1); + } + + this.markDirty(); + } + + if (this.Charge > 900 && this.Storage < this.getMaxStorage()) { + int n = Math.min((this.Charge - 900) / 10, 10); + n = Math.min(n, this.getMaxStorage() - this.Storage); + this.cond.drawPower((double)(n * 1000)); + this.Storage += n; + } else if (this.Charge < 800 && this.Storage > 0 && !this.Powered) { + int n = Math.min((800 - this.Charge) / 10, 10); + n = Math.min(n, this.Storage); + this.cond.applyPower((double)(n * 1000)); + this.Storage -= n; + } + + if (rs != this.getStorageForRender()) { + this.updateBlock(); + } + } + + } + + public int getSizeInventory() { + return 2; + } + + public ItemStack getStackInSlot(int i) { + return this.contents[i]; + } + + public ItemStack decrStackSize(int i, int j) { + if (this.contents[i] == null) { + return null; + } else if (this.contents[i].stackSize <= j) { + ItemStack tr = this.contents[i]; + this.contents[i] = null; + this.markDirty(); + return tr; + } else { + ItemStack tr = this.contents[i].splitStack(j); + if (this.contents[i].stackSize == 0) { + this.contents[i] = null; + } + + this.markDirty(); + return tr; + } + } + + public ItemStack getStackInSlotOnClosing(int i) { + if (this.contents[i] == null) { + return null; + } else { + ItemStack ist = this.contents[i]; + this.contents[i] = null; + return ist; + } + } + + public void setInventorySlotContents(int i, ItemStack ist) { + this.contents[i] = ist; + if (ist != null && ist.stackSize > this.getInventoryStackLimit()) { + ist.stackSize = this.getInventoryStackLimit(); + } + + this.markDirty(); + } + + public String getInventoryName() { + return "tile.rpbatbox.name"; + } + + public int getInventoryStackLimit() { + return 1; + } + + public boolean isUseableByPlayer(EntityPlayer player) { + return !this.isInvalid() + && super.worldObj.getTileEntity(super.xCoord, super.yCoord, super.zCoord) == this + && player.getDistanceSq((double)super.xCoord + 0.5, (double)super.yCoord + 0.5, (double)super.zCoord + 0.5) <= 64.0; + } + + public void closeInventory() { + } + + public void openInventory() { + } + + @Override + public void onBlockNeighborChange(Block block) { + this.ConMask = -1; + if (RedPowerLib.isPowered(super.worldObj, super.xCoord, super.yCoord, super.zCoord, 16777215, 63)) { + if (!this.Powered) { + this.Powered = true; + this.markDirty(); + } + } else if (this.Powered) { + this.Powered = false; + this.markDirty(); + } + + } + + @Override + public boolean onBlockActivated(EntityPlayer player) { + if (player.isSneaking()) { + return false; + } else { + if (!super.worldObj.isRemote) { + player.openGui(RedPowerMachine.instance, 8, super.worldObj, super.xCoord, super.yCoord, super.zCoord); + } + + return true; + } + } + + @Override + public void onBlockRemoval() { + super.onBlockRemoval(); + + for(int i = 0; i < 2; ++i) { + ItemStack ist = this.contents[i]; + if (ist != null && ist.stackSize > 0) { + CoreLib.dropItem(super.worldObj, super.xCoord, super.yCoord, super.zCoord, ist); + } + } + + } + + @Override + public void writeFramePacket(NBTTagCompound tag) { + tag.setInteger("stor", this.Storage); + } + + @Override + public void readFramePacket(NBTTagCompound tag) { + this.Storage = tag.getInteger("stor"); + } + + @Override + public void onFrameRefresh(IBlockAccess iba) { + } + + @Override + public void onFramePickup(IBlockAccess iba) { + } + + @Override + public void onFrameDrop() { + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + NBTTagList items = data.getTagList("Items", 10); + this.contents = new ItemStack[this.getSizeInventory()]; + + for(int k = 0; k < items.tagCount(); ++k) { + NBTTagCompound item = items.getCompoundTagAt(k); + int j = item.getByte("Slot") & 255; + if (j >= 0 && j < this.contents.length) { + this.contents[j] = ItemStack.loadItemStackFromNBT(item); + } + } + + this.cond.readFromNBT(data); + this.Charge = data.getShort("chg"); + this.Storage = data.getShort("stor"); + byte var6 = data.getByte("ps"); + this.Powered = (var6 & 1) > 0; + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + NBTTagList items = new NBTTagList(); + + for(int ps = 0; ps < this.contents.length; ++ps) { + if (this.contents[ps] != null) { + NBTTagCompound item = new NBTTagCompound(); + item.setByte("Slot", (byte)ps); + this.contents[ps].writeToNBT(item); + items.appendTag(item); + } + } + + data.setTag("Items", items); + this.cond.writeToNBT(data); + data.setShort("chg", (short)this.Charge); + data.setShort("stor", (short)this.Storage); + int var5 = this.Powered ? 1 : 0; + data.setByte("ps", (byte)var5); + } + + @Override + protected void readFromPacket(NBTTagCompound tag) { + this.Storage = tag.getInteger("stor"); + } + + @Override + protected void writeToPacket(NBTTagCompound tag) { + tag.setInteger("stor", this.Storage); + } + + public boolean canInsertItem(int slotID, ItemStack itemStack, int side) { + return true; + } + + public boolean canExtractItem(int slotID, ItemStack itemStack, int side) { + return true; + } + + public boolean hasCustomInventoryName() { + return false; + } + + public boolean isItemValidForSlot(int slotID, ItemStack stack) { + return stack.getItem() == RedPowerMachine.itemBatteryEmpty || stack.getItem() == RedPowerMachine.itemBatteryPowered; + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/TileBlueAlloyFurnace.java b/src/main/java/com/eloraam/redpower/machine/TileBlueAlloyFurnace.java new file mode 100644 index 0000000..459b7b0 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/TileBlueAlloyFurnace.java @@ -0,0 +1,297 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.base.TileAppliance; +import com.eloraam.redpower.core.BluePowerConductor; +import com.eloraam.redpower.core.BluePowerEndpoint; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.CraftLib; +import com.eloraam.redpower.core.IBluePowerConnectable; +import com.eloraam.redpower.core.RedPowerLib; +import java.util.stream.IntStream; +import net.minecraft.block.Block; +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.world.EnumSkyBlock; + +public class TileBlueAlloyFurnace extends TileAppliance implements IInventory, ISidedInventory, IBluePowerConnectable { + BluePowerEndpoint cond = new BluePowerEndpoint() { + @Override + public TileEntity getParent() { + return TileBlueAlloyFurnace.this; + } + }; + private ItemStack[] contents = new ItemStack[10]; + int cooktime = 0; + public int ConMask = -1; + + @Override + public int getConnectableMask() { + return 1073741823; + } + + @Override + public int getConnectClass(int side) { + return 64; + } + + @Override + public int getCornerPowerMode() { + return 0; + } + + @Override + public BluePowerConductor getBlueConductor(int side) { + return this.cond; + } + + private void updateLight() { + super.worldObj.updateLightByType(EnumSkyBlock.Block, super.xCoord, super.yCoord, super.zCoord); + } + + @Override + public int getExtendedID() { + return 4; + } + + @Override + public void updateEntity() { + super.updateEntity(); + if (!super.worldObj.isRemote) { + if (this.ConMask < 0) { + this.ConMask = RedPowerLib.getConnections(super.worldObj, this, super.xCoord, super.yCoord, super.zCoord); + this.cond.recache(this.ConMask, 0); + } + + this.cond.iterate(); + this.markDirty(); + if (this.cond.getVoltage() < 60.0) { + if (super.Active && this.cond.Flow == 0) { + super.Active = false; + this.updateBlock(); + this.updateLight(); + } + } else { + boolean cs = this.canSmelt(); + if (cs) { + if (!super.Active) { + super.Active = true; + this.updateBlock(); + this.updateLight(); + } + + ++this.cooktime; + this.cond.drawPower(1000.0); + if (this.cooktime >= 100) { + this.cooktime = 0; + this.smeltItem(); + this.markDirty(); + } + } else { + if (super.Active) { + super.Active = false; + this.updateBlock(); + this.updateLight(); + } + + this.cooktime = 0; + } + } + } + + } + + private boolean canSmelt() { + ItemStack ist = CraftLib.getAlloyResult(this.contents, 0, 9, false); + if (ist == null) { + return false; + } else if (this.contents[9] == null) { + return true; + } else if (!this.contents[9].isItemEqual(ist)) { + return false; + } else { + int st = this.contents[9].stackSize + ist.stackSize; + return st <= this.getInventoryStackLimit() && st <= ist.getMaxStackSize(); + } + } + + private void smeltItem() { + if (this.canSmelt()) { + ItemStack ist = CraftLib.getAlloyResult(this.contents, 0, 9, true); + if (this.contents[9] == null) { + this.contents[9] = ist.copy(); + } else { + this.contents[9].stackSize += ist.stackSize; + } + } + + } + + int getCookScaled(int i) { + return this.cooktime * i / 100; + } + + @Override + public boolean onBlockActivated(EntityPlayer player) { + if (player.isSneaking()) { + return false; + } else { + if (!super.worldObj.isRemote) { + player.openGui(RedPowerMachine.instance, 10, super.worldObj, super.xCoord, super.yCoord, super.zCoord); + } + + return true; + } + } + + @Override + public void onBlockRemoval() { + for(int i = 0; i < 10; ++i) { + ItemStack ist = this.contents[i]; + if (ist != null && ist.stackSize > 0) { + CoreLib.dropItem(super.worldObj, super.xCoord, super.yCoord, super.zCoord, ist); + } + } + + } + + @Override + public void onBlockNeighborChange(Block block) { + this.ConMask = -1; + } + + public int getSizeInventory() { + return 10; + } + + public ItemStack getStackInSlot(int i) { + return this.contents[i]; + } + + public ItemStack decrStackSize(int i, int j) { + if (this.contents[i] == null) { + return null; + } else if (this.contents[i].stackSize <= j) { + ItemStack tr = this.contents[i]; + this.contents[i] = null; + this.markDirty(); + return tr; + } else { + ItemStack tr = this.contents[i].splitStack(j); + if (this.contents[i].stackSize == 0) { + this.contents[i] = null; + } + + this.markDirty(); + return tr; + } + } + + public ItemStack getStackInSlotOnClosing(int i) { + if (this.contents[i] == null) { + return null; + } else { + ItemStack ist = this.contents[i]; + this.contents[i] = null; + return ist; + } + } + + public void setInventorySlotContents(int i, ItemStack ist) { + this.contents[i] = ist; + if (ist != null && ist.stackSize > this.getInventoryStackLimit()) { + ist.stackSize = this.getInventoryStackLimit(); + } + + this.markDirty(); + } + + public String getInventoryName() { + return "tile.rpbafurnace.name"; + } + + public int getInventoryStackLimit() { + return 64; + } + + public boolean isUseableByPlayer(EntityPlayer player) { + return !this.isInvalid() + && super.worldObj.getTileEntity(super.xCoord, super.yCoord, super.zCoord) == this + && player.getDistanceSq((double)super.xCoord + 0.5, (double)super.yCoord + 0.5, (double)super.zCoord + 0.5) <= 64.0; + } + + public void closeInventory() { + } + + public void openInventory() { + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + NBTTagList items = data.getTagList("Items", 10); + this.contents = new ItemStack[this.getSizeInventory()]; + + for(int i = 0; i < items.tagCount(); ++i) { + NBTTagCompound item = items.getCompoundTagAt(i); + int j = item.getByte("Slot") & 255; + if (j >= 0 && j < this.contents.length) { + this.contents[j] = ItemStack.loadItemStackFromNBT(item); + } + } + + this.cooktime = data.getShort("CookTime"); + this.cond.readFromNBT(data); + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + NBTTagList items = new NBTTagList(); + + for(int i = 0; i < this.contents.length; ++i) { + if (this.contents[i] != null) { + NBTTagCompound item = new NBTTagCompound(); + item.setByte("Slot", (byte)i); + this.contents[i].writeToNBT(item); + items.appendTag(item); + } + } + + data.setTag("Items", items); + data.setShort("CookTime", (short)this.cooktime); + this.cond.writeToNBT(data); + } + + public int[] getAccessibleSlotsFromSide(int side) { + switch(side) { + case 0: + return new int[]{9}; + case 1: + return IntStream.range(0, 9).toArray(); + default: + return new int[0]; + } + } + + public boolean canInsertItem(int slotID, ItemStack itemStack, int side) { + return side == 0 && slotID >= 0 && slotID < 9; + } + + public boolean canExtractItem(int slotID, ItemStack itemStack, int side) { + return slotID == 9; + } + + public boolean hasCustomInventoryName() { + return false; + } + + public boolean isItemValidForSlot(int slotID, ItemStack stack) { + return slotID >= 0 && slotID < 9; + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/TileBlueFurnace.java b/src/main/java/com/eloraam/redpower/machine/TileBlueFurnace.java new file mode 100644 index 0000000..2de7500 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/TileBlueFurnace.java @@ -0,0 +1,310 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.base.TileAppliance; +import com.eloraam.redpower.core.BluePowerConductor; +import com.eloraam.redpower.core.BluePowerEndpoint; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.IBluePowerConnectable; +import com.eloraam.redpower.core.RedPowerLib; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.FurnaceRecipes; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.EnumSkyBlock; + +public class TileBlueFurnace extends TileAppliance implements IInventory, ISidedInventory, IBluePowerConnectable { + BluePowerEndpoint cond = new BluePowerEndpoint() { + @Override + public TileEntity getParent() { + return TileBlueFurnace.this; + } + }; + private ItemStack[] contents = new ItemStack[2]; + public int cooktime = 0; + public int ConMask = -1; + + @Override + public int getConnectableMask() { + return 1073741823; + } + + @Override + public int getConnectClass(int side) { + return 64; + } + + @Override + public int getCornerPowerMode() { + return 0; + } + + @Override + public BluePowerConductor getBlueConductor(int side) { + return this.cond; + } + + private void updateLight() { + super.worldObj.updateLightByType(EnumSkyBlock.Block, super.xCoord, super.yCoord, super.zCoord); + } + + @Override + public int getExtendedID() { + return 1; + } + + @Override + public void updateEntity() { + super.updateEntity(); + if (!super.worldObj.isRemote) { + if (this.ConMask < 0) { + this.ConMask = RedPowerLib.getConnections(super.worldObj, this, super.xCoord, super.yCoord, super.zCoord); + this.cond.recache(this.ConMask, 0); + } + + this.cond.iterate(); + this.markDirty(); + if (this.cond.getVoltage() < 60.0) { + if (super.Active && this.cond.Flow == 0) { + super.Active = false; + this.updateBlock(); + this.updateLight(); + } + } else { + boolean cs = this.canSmelt(); + if (cs) { + if (!super.Active) { + super.Active = true; + this.updateBlock(); + this.updateLight(); + } + + ++this.cooktime; + this.cond.drawPower(1000.0); + if (this.cooktime >= 100) { + this.cooktime = 0; + this.smeltItem(); + this.markDirty(); + } + } else { + if (super.Active) { + super.Active = false; + this.updateBlock(); + this.updateLight(); + } + + this.cooktime = 0; + } + } + } + + } + + private boolean canSmelt() { + if (this.contents[0] == null) { + return false; + } else { + ItemStack ist = FurnaceRecipes.smelting().getSmeltingResult(this.contents[0]); + if (ist == null) { + return false; + } else if (this.contents[1] == null) { + return true; + } else if (!this.contents[1].isItemEqual(ist)) { + return false; + } else { + int st = this.contents[1].stackSize + ist.stackSize; + return st <= this.getInventoryStackLimit() && st <= ist.getMaxStackSize(); + } + } + } + + private void smeltItem() { + if (this.canSmelt()) { + ItemStack ist = FurnaceRecipes.smelting().getSmeltingResult(this.contents[0]); + if (this.contents[1] == null) { + this.contents[1] = ist.copy(); + } else if (this.contents[1].isItemEqual(ist)) { + this.contents[1].stackSize += ist.stackSize; + } + + if (this.contents[0].getItem().getContainerItem() != null) { + this.contents[0] = new ItemStack(this.contents[0].getItem().getContainerItem()); + } else { + --this.contents[0].stackSize; + } + + if (this.contents[0].stackSize <= 0) { + this.contents[0] = null; + } + } + + } + + int getCookScaled(int i) { + return this.cooktime * i / 100; + } + + @Override + public boolean onBlockActivated(EntityPlayer player) { + if (player.isSneaking()) { + return false; + } else { + if (!super.worldObj.isRemote) { + player.openGui(RedPowerMachine.instance, 3, super.worldObj, super.xCoord, super.yCoord, super.zCoord); + } + + return true; + } + } + + @Override + public void onBlockRemoval() { + for(int i = 0; i < 2; ++i) { + ItemStack ist = this.contents[i]; + if (ist != null && ist.stackSize > 0) { + CoreLib.dropItem(super.worldObj, super.xCoord, super.yCoord, super.zCoord, ist); + } + } + + } + + @Override + public void onBlockNeighborChange(Block block) { + this.ConMask = -1; + } + + public int getSizeInventory() { + return 2; + } + + public ItemStack getStackInSlot(int i) { + return this.contents[i]; + } + + public ItemStack decrStackSize(int i, int j) { + if (this.contents[i] == null) { + return null; + } else if (this.contents[i].stackSize <= j) { + ItemStack tr = this.contents[i]; + this.contents[i] = null; + this.markDirty(); + return tr; + } else { + ItemStack tr = this.contents[i].splitStack(j); + if (this.contents[i].stackSize == 0) { + this.contents[i] = null; + } + + this.markDirty(); + return tr; + } + } + + public ItemStack getStackInSlotOnClosing(int i) { + if (this.contents[i] == null) { + return null; + } else { + ItemStack ist = this.contents[i]; + this.contents[i] = null; + return ist; + } + } + + public void setInventorySlotContents(int i, ItemStack ist) { + this.contents[i] = ist; + if (ist != null && ist.stackSize > this.getInventoryStackLimit()) { + ist.stackSize = this.getInventoryStackLimit(); + } + + this.markDirty(); + } + + public String getInventoryName() { + return "tile.rpbfurnace.name"; + } + + public int getInventoryStackLimit() { + return 64; + } + + public boolean isUseableByPlayer(EntityPlayer player) { + return !this.isInvalid() + && super.worldObj.getTileEntity(super.xCoord, super.yCoord, super.zCoord) == this + && player.getDistanceSq((double)super.xCoord + 0.5, (double)super.yCoord + 0.5, (double)super.zCoord + 0.5) <= 64.0; + } + + public void closeInventory() { + } + + public void openInventory() { + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + NBTTagList items = data.getTagList("Items", 10); + this.contents = new ItemStack[this.getSizeInventory()]; + + for(int i = 0; i < items.tagCount(); ++i) { + NBTTagCompound item = items.getCompoundTagAt(i); + int j = item.getByte("Slot") & 255; + if (j >= 0 && j < this.contents.length) { + this.contents[j] = ItemStack.loadItemStackFromNBT(item); + } + } + + this.cooktime = data.getShort("CookTime"); + this.cond.readFromNBT(data); + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + NBTTagList items = new NBTTagList(); + + for(int i = 0; i < this.contents.length; ++i) { + if (this.contents[i] != null) { + NBTTagCompound item = new NBTTagCompound(); + item.setByte("Slot", (byte)i); + this.contents[i].writeToNBT(item); + items.appendTag(item); + } + } + + data.setTag("Items", items); + data.setShort("CookTime", (short)this.cooktime); + this.cond.writeToNBT(data); + } + + public int[] getAccessibleSlotsFromSide(int side) { + switch(side) { + case 0: + return new int[]{1}; + case 1: + return new int[]{0}; + default: + return new int[0]; + } + } + + public boolean canInsertItem(int slotID, ItemStack stack, int side) { + return side == 1 && slotID == 0; + } + + public boolean canExtractItem(int slotID, ItemStack stack, int side) { + return side == 0 && slotID == 1; + } + + public boolean hasCustomInventoryName() { + return false; + } + + public boolean isItemValidForSlot(int slotID, ItemStack stack) { + return slotID == 0; + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/TileBreaker.java b/src/main/java/com/eloraam/redpower/machine/TileBreaker.java new file mode 100644 index 0000000..aa4dd85 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/TileBreaker.java @@ -0,0 +1,185 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.IConnectable; +import com.eloraam.redpower.core.IFrameLink; +import com.eloraam.redpower.core.ITubeConnectable; +import com.eloraam.redpower.core.RedPowerLib; +import com.eloraam.redpower.core.TubeBuffer; +import com.eloraam.redpower.core.TubeItem; +import com.eloraam.redpower.core.WorldCoord; +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.common.util.FakePlayer; + +public class TileBreaker extends TileMachine implements ITubeConnectable, IFrameLink, IConnectable { + TubeBuffer buffer = new TubeBuffer(); + + @Override + public boolean isFrameMoving() { + return false; + } + + @Override + public boolean canFrameConnectIn(int dir) { + return dir != (super.Rotation ^ 1); + } + + @Override + public boolean canFrameConnectOut(int dir) { + return false; + } + + @Override + public WorldCoord getFrameLinkset() { + return null; + } + + @Override + public int getConnectableMask() { + return 1073741823 ^ RedPowerLib.getConDirMask(super.Rotation ^ 1); + } + + @Override + public int getConnectClass(int side) { + return 0; + } + + @Override + public int getCornerPowerMode() { + return 0; + } + + @Override + public int getTubeConnectableSides() { + return 1 << super.Rotation; + } + + @Override + public int getTubeConClass() { + return 0; + } + + @Override + public boolean canRouteItems() { + return false; + } + + @Override + public boolean tubeItemEnter(int side, int state, TubeItem item) { + if (side == super.Rotation && state == 2) { + this.buffer.addBounce(item); + super.Active = true; + this.scheduleTick(5); + return true; + } else { + return false; + } + } + + @Override + public boolean tubeItemCanEnter(int side, int state, TubeItem item) { + return side == super.Rotation && state == 2; + } + + @Override + public int tubeWeight(int side, int state) { + return side == super.Rotation && state == 2 ? this.buffer.size() : 0; + } + + @Override + public void onBlockNeighborChange(Block block) { + int cm = this.getConnectableMask(); + if (RedPowerLib.isPowered(super.worldObj, super.xCoord, super.yCoord, super.zCoord, cm, cm >> 24)) { + if (!super.Powered) { + super.Powered = true; + this.markDirty(); + if (!super.Active) { + WorldCoord wc = new WorldCoord(super.xCoord, super.yCoord, super.zCoord); + wc.step(super.Rotation ^ 1); + Block bid = super.worldObj.getBlock(wc.x, wc.y, wc.z); + if (bid != Blocks.air + && bid.getBlockHardness(super.worldObj, wc.x, wc.y, wc.z) != -1.0F + && bid != Blocks.bedrock + && bid.getBlockHardness(super.worldObj, wc.x, wc.y, wc.z) >= 0.0F) { + super.Active = true; + this.updateBlock(); + int md = super.worldObj.getBlockMetadata(wc.x, wc.y, wc.z); + FakePlayer player = CoreLib.getRedpowerPlayer(super.worldObj, super.xCoord, super.yCoord, super.zCoord, super.Rotation, super.Owner); + this.buffer.addAll(bid.getDrops(super.worldObj, wc.x, wc.y, wc.z, md, 0)); + super.worldObj.setBlockToAir(wc.x, wc.y, wc.z); + + this.drainBuffer(); + if (!this.buffer.isEmpty()) { + this.scheduleTick(5); + } + } + } + } + } else { + if (super.Active && !this.isTickScheduled()) { + this.scheduleTick(5); + } + + if (super.Powered) { + super.Powered = false; + } + } + + } + + public void drainBuffer() { + while(!this.buffer.isEmpty()) { + TubeItem ti = this.buffer.getLast(); + if (!this.handleItem(ti)) { + this.buffer.plugged = true; + return; + } + + this.buffer.pop(); + if (this.buffer.plugged) { + return; + } + } + + } + + @Override + public void onBlockRemoval() { + this.buffer.onRemove(this); + } + + @Override + public void onTileTick() { + if (!this.buffer.isEmpty()) { + this.drainBuffer(); + if (!this.buffer.isEmpty()) { + this.scheduleTick(10); + } else { + this.scheduleTick(5); + } + } else if (!super.Powered) { + super.Active = false; + this.updateBlock(); + } + + } + + @Override + public int getExtendedID() { + return 1; + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + this.buffer.readFromNBT(data); + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + this.buffer.writeToNBT(data); + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/TileBufferChest.java b/src/main/java/com/eloraam/redpower/machine/TileBufferChest.java new file mode 100644 index 0000000..cd73660 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/TileBufferChest.java @@ -0,0 +1,229 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.base.TileAppliance; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.IRotatable; +import java.util.stream.IntStream; +import net.minecraft.entity.EntityLivingBase; +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 org.apache.commons.lang3.ArrayUtils; + +public class TileBufferChest extends TileAppliance implements IInventory, ISidedInventory, IRotatable { + private ItemStack[] contents = new ItemStack[20]; + + @Override + public int getExtendedID() { + return 2; + } + + public boolean canUpdate() { + return true; + } + + @Override + public boolean onBlockActivated(EntityPlayer player) { + if (player.isSneaking()) { + return false; + } else { + if (!super.worldObj.isRemote) { + player.openGui(RedPowerMachine.instance, 4, super.worldObj, super.xCoord, super.yCoord, super.zCoord); + } + + return true; + } + } + + public int getFacing(EntityLivingBase ent) { + int yawrx = (int)Math.floor((double)(ent.rotationYaw * 4.0F / 360.0F) + 0.5) & 3; + if (Math.abs(ent.posX - (double)super.xCoord) < 2.0 && Math.abs(ent.posZ - (double)super.zCoord) < 2.0) { + double p = ent.posY + 1.82 - (double)ent.yOffset - (double)super.yCoord; + if (p > 2.0) { + return 0; + } + + if (p < 0.0) { + return 1; + } + } + + switch(yawrx) { + case 0: + return 3; + case 1: + return 4; + case 2: + return 2; + default: + return 5; + } + } + + @Override + public void onBlockPlaced(ItemStack ist, int side, EntityLivingBase ent) { + super.Rotation = this.getFacing(ent); + if (ent instanceof EntityPlayer) { + super.Owner = ((EntityPlayer)ent).getGameProfile(); + } + + } + + @Override + public void onBlockRemoval() { + for(int i = 0; i < 20; ++i) { + ItemStack ist = this.contents[i]; + if (ist != null && ist.stackSize > 0) { + CoreLib.dropItem(super.worldObj, super.xCoord, super.yCoord, super.zCoord, ist); + } + } + + } + + @Override + public int getPartMaxRotation(int part, boolean sec) { + return sec ? 0 : 5; + } + + @Override + public int getPartRotation(int part, boolean sec) { + return sec ? 0 : super.Rotation; + } + + @Override + public void setPartRotation(int part, boolean sec, int rot) { + if (!sec) { + super.Rotation = rot; + this.updateBlockChange(); + } + + } + + public int getSizeInventory() { + return 20; + } + + public ItemStack getStackInSlot(int i) { + return this.contents[i]; + } + + public ItemStack decrStackSize(int i, int j) { + if (this.contents[i] == null) { + return null; + } else if (this.contents[i].stackSize <= j) { + ItemStack tr = this.contents[i]; + this.contents[i] = null; + this.markDirty(); + return tr; + } else { + ItemStack tr = this.contents[i].splitStack(j); + if (this.contents[i].stackSize == 0) { + this.contents[i] = null; + } + + this.markDirty(); + return tr; + } + } + + public ItemStack getStackInSlotOnClosing(int i) { + if (this.contents[i] == null) { + return null; + } else { + ItemStack ist = this.contents[i]; + this.contents[i] = null; + return ist; + } + } + + public void setInventorySlotContents(int i, ItemStack ist) { + this.contents[i] = ist; + if (ist != null && ist.stackSize > this.getInventoryStackLimit()) { + ist.stackSize = this.getInventoryStackLimit(); + } + + this.markDirty(); + } + + public String getInventoryName() { + return "tile.rpbuffer.name"; + } + + public int getInventoryStackLimit() { + return 64; + } + + public boolean isUseableByPlayer(EntityPlayer player) { + return !this.isInvalid() + && super.worldObj.getTileEntity(super.xCoord, super.yCoord, super.zCoord) == this + && player.getDistanceSq((double)super.xCoord + 0.5, (double)super.yCoord + 0.5, (double)super.zCoord + 0.5) <= 64.0; + } + + public void closeInventory() { + } + + public void openInventory() { + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + NBTTagList items = data.getTagList("Items", 10); + this.contents = new ItemStack[this.getSizeInventory()]; + + for(int i = 0; i < items.tagCount(); ++i) { + NBTTagCompound item = items.getCompoundTagAt(i); + int j = item.getByte("Slot") & 255; + if (j >= 0 && j < this.contents.length) { + this.contents[j] = ItemStack.loadItemStackFromNBT(item); + } + } + + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + NBTTagList items = new NBTTagList(); + + for(int i = 0; i < this.contents.length; ++i) { + if (this.contents[i] != null) { + NBTTagCompound item = new NBTTagCompound(); + item.setByte("Slot", (byte)i); + this.contents[i].writeToNBT(item); + items.appendTag(item); + } + } + + data.setTag("Items", items); + } + + public int[] getAccessibleSlotsFromSide(int side) { + boolean isFront = side == (super.Rotation ^ 1); + int start = isFront ? 0 : 4 * ((5 + side - (super.Rotation ^ 1)) % 6); + int end = isFront ? 20 : start + 4; + return IntStream.range(start, end).toArray(); + } + + public boolean canInsertItem(int slotID, ItemStack stack, int side) { + int[] slots = this.getAccessibleSlotsFromSide(side); + return ArrayUtils.contains(slots, slotID); + } + + public boolean canExtractItem(int slotID, ItemStack stack, int side) { + int[] slots = this.getAccessibleSlotsFromSide(side); + return ArrayUtils.contains(slots, slotID); + } + + public boolean hasCustomInventoryName() { + return false; + } + + public boolean isItemValidForSlot(int slotID, ItemStack stack) { + return true; + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/TileChargingBench.java b/src/main/java/com/eloraam/redpower/machine/TileChargingBench.java new file mode 100644 index 0000000..9cd8053 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/TileChargingBench.java @@ -0,0 +1,287 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.base.TileAppliance; +import com.eloraam.redpower.core.BluePowerConductor; +import com.eloraam.redpower.core.BluePowerEndpoint; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.IBluePowerConnectable; +import com.eloraam.redpower.core.IChargeable; +import com.eloraam.redpower.core.RedPowerLib; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.tileentity.TileEntity; + +public class TileChargingBench extends TileAppliance implements IInventory, IBluePowerConnectable { + BluePowerEndpoint cond = new BluePowerEndpoint() { + @Override + public TileEntity getParent() { + return TileChargingBench.this; + } + }; + public boolean Powered = false; + public int Storage = 0; + private ItemStack[] contents = new ItemStack[16]; + public int ConMask = -1; + + @Override + public int getConnectableMask() { + return 1073741823; + } + + @Override + public int getConnectClass(int side) { + return 64; + } + + @Override + public int getCornerPowerMode() { + return 0; + } + + @Override + public BluePowerConductor getBlueConductor(int side) { + return this.cond; + } + + @Override + public int getLightValue() { + return 0; + } + + @Override + public int getExtendedID() { + return 5; + } + + public int getMaxStorage() { + return 3000; + } + + public int getStorageForRender() { + return this.Storage * 4 / this.getMaxStorage(); + } + + public int getChargeScaled(int i) { + return Math.min(i, i * this.cond.Charge / 1000); + } + + public int getStorageScaled(int i) { + return Math.min(i, i * this.Storage / this.getMaxStorage()); + } + + @Override + public void updateEntity() { + super.updateEntity(); + if (!super.worldObj.isRemote) { + if (this.ConMask < 0) { + this.ConMask = RedPowerLib.getConnections(super.worldObj, this, super.xCoord, super.yCoord, super.zCoord); + this.cond.recache(this.ConMask, 0); + } + + this.cond.iterate(); + this.markDirty(); + if (this.cond.Flow == 0) { + if (this.Powered) { + this.Powered = false; + this.updateBlock(); + } + } else if (!this.Powered) { + this.Powered = true; + this.updateBlock(); + } + + int rs = this.getStorageForRender(); + if (this.cond.Charge > 600 && this.Storage < this.getMaxStorage()) { + int lastact = Math.min((this.cond.Charge - 600) / 40, 5); + lastact = Math.min(lastact, this.getMaxStorage() - this.Storage); + this.cond.drawPower((double)(lastact * 1000)); + this.Storage += lastact; + } + + boolean var5 = super.Active; + super.Active = false; + if (this.Storage > 0) { + for(int i = 0; i < 16; ++i) { + if (this.contents[i] != null && this.contents[i].getItem() instanceof IChargeable && this.contents[i].getItemDamage() > 1) { + int d = Math.min(this.contents[i].getItemDamage() - 1, this.Storage); + d = Math.min(d, 25); + this.contents[i].setItemDamage(this.contents[i].getItemDamage() - d); + this.Storage -= d; + this.markDirty(); + super.Active = true; + } + } + } + + if (rs != this.getStorageForRender() || var5 != super.Active) { + this.updateBlock(); + } + } + + } + + @Override + public boolean onBlockActivated(EntityPlayer player) { + if (player.isSneaking()) { + return false; + } else { + if (!super.worldObj.isRemote) { + player.openGui(RedPowerMachine.instance, 14, super.worldObj, super.xCoord, super.yCoord, super.zCoord); + } + + return true; + } + } + + @Override + public void onBlockRemoval() { + for(int i = 0; i < 2; ++i) { + ItemStack ist = this.contents[i]; + if (ist != null && ist.stackSize > 0) { + CoreLib.dropItem(super.worldObj, super.xCoord, super.yCoord, super.zCoord, ist); + } + } + + } + + @Override + public void onBlockNeighborChange(Block block) { + this.ConMask = -1; + } + + public int getSizeInventory() { + return 16; + } + + public ItemStack getStackInSlot(int i) { + return this.contents[i]; + } + + public ItemStack decrStackSize(int i, int j) { + if (this.contents[i] == null) { + return null; + } else if (this.contents[i].stackSize <= j) { + ItemStack tr = this.contents[i]; + this.contents[i] = null; + this.markDirty(); + return tr; + } else { + ItemStack tr = this.contents[i].splitStack(j); + if (this.contents[i].stackSize == 0) { + this.contents[i] = null; + } + + this.markDirty(); + return tr; + } + } + + public ItemStack getStackInSlotOnClosing(int i) { + if (this.contents[i] == null) { + return null; + } else { + ItemStack ist = this.contents[i]; + this.contents[i] = null; + return ist; + } + } + + public void setInventorySlotContents(int i, ItemStack ist) { + this.contents[i] = ist; + if (ist != null && ist.stackSize > this.getInventoryStackLimit()) { + ist.stackSize = this.getInventoryStackLimit(); + } + + this.markDirty(); + } + + public String getInventoryName() { + return "tile.rpcharge.name"; + } + + public int getInventoryStackLimit() { + return 64; + } + + public boolean isUseableByPlayer(EntityPlayer player) { + return !this.isInvalid() + && super.worldObj.getTileEntity(super.xCoord, super.yCoord, super.zCoord) == this + && player.getDistanceSq((double)super.xCoord + 0.5, (double)super.yCoord + 0.5, (double)super.zCoord + 0.5) <= 64.0; + } + + public void closeInventory() { + } + + public void openInventory() { + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + NBTTagList items = data.getTagList("Items", 10); + this.contents = new ItemStack[this.getSizeInventory()]; + + for(int k = 0; k < items.tagCount(); ++k) { + NBTTagCompound item = items.getCompoundTagAt(k); + int j = item.getByte("Slot") & 255; + if (j >= 0 && j < this.contents.length) { + this.contents[j] = ItemStack.loadItemStackFromNBT(item); + } + } + + this.cond.readFromNBT(data); + this.Storage = data.getShort("stor"); + byte var6 = data.getByte("ps"); + this.Powered = (var6 & 1) > 0; + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + NBTTagList items = new NBTTagList(); + + for(int i = 0; i < this.contents.length; ++i) { + if (this.contents[i] != null) { + NBTTagCompound item = new NBTTagCompound(); + item.setByte("Slot", (byte)i); + this.contents[i].writeToNBT(item); + items.appendTag(item); + } + } + + data.setTag("Items", items); + this.cond.writeToNBT(data); + data.setShort("stor", (short)this.Storage); + int ps = this.Powered ? 1 : 0; + data.setByte("ps2", (byte)ps); + } + + @Override + protected void readFromPacket(NBTTagCompound tag) { + super.Rotation = tag.getByte("rot"); + int ps = tag.getByte("ps"); + super.Active = (ps & 1) > 0; + this.Powered = (ps & 2) > 0; + this.Storage = tag.getInteger("stor"); + } + + @Override + protected void writeToPacket(NBTTagCompound tag) { + tag.setByte("rot", (byte)super.Rotation); + tag.setByte("ps", (byte)((super.Active ? 1 : 0) | (this.Powered ? 2 : 0))); + tag.setInteger("stor", this.Storage); + } + + public boolean hasCustomInventoryName() { + return false; + } + + public boolean isItemValidForSlot(int slotID, ItemStack itemStack) { + return itemStack.getItem() instanceof IChargeable; + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/TileDeploy.java b/src/main/java/com/eloraam/redpower/machine/TileDeploy.java new file mode 100644 index 0000000..c42e4c2 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/TileDeploy.java @@ -0,0 +1,201 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.WorldCoord; +import java.util.stream.IntStream; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraftforge.common.util.FakePlayer; + +public class TileDeploy extends TileDeployBase implements ISidedInventory { + private ItemStack[] contents = new ItemStack[9]; + + @Override + public boolean onBlockActivated(EntityPlayer player) { + if (player.isSneaking()) { + return false; + } else { + if (!super.worldObj.isRemote) { + player.openGui(RedPowerMachine.instance, 1, super.worldObj, super.xCoord, super.yCoord, super.zCoord); + } + + return true; + } + } + + @Override + public void onBlockRemoval() { + for(int i = 0; i < 9; ++i) { + ItemStack ist = this.contents[i]; + if (ist != null && ist.stackSize > 0) { + CoreLib.dropItem(super.worldObj, super.xCoord, super.yCoord, super.zCoord, ist); + } + } + + } + + protected void packInv(ItemStack[] bkup, FakePlayer player) { + for(int i = 0; i < 9; ++i) { + bkup[i] = player.inventory.getStackInSlot(i); + player.inventory.setInventorySlotContents(i, this.contents[i]); + } + + } + + protected void unpackInv(ItemStack[] bkup, FakePlayer player) { + for(int i = 0; i < 9; ++i) { + this.contents[i] = player.inventory.getStackInSlot(i); + player.inventory.setInventorySlotContents(i, bkup[i]); + } + + } + + @Override + public void enableTowards(WorldCoord wc) { + ItemStack[] bkup = new ItemStack[9]; + FakePlayer player = CoreLib.getRedpowerPlayer(super.worldObj, super.xCoord, super.yCoord, super.zCoord, super.Rotation, super.Owner); + this.packInv(bkup, player); + + for(int i = 0; i < 9; ++i) { + ItemStack ist = this.contents[i]; + if (ist != null && ist.stackSize > 0 && this.tryUseItemStack(ist, wc.x, wc.y, wc.z, i, player)) { + if (player.isUsingItem()) { + player.stopUsingItem(); + } + + this.unpackInv(bkup, player); + if (this.contents[i].stackSize == 0) { + this.contents[i] = null; + } + + this.markDirty(); + return; + } + } + + this.unpackInv(bkup, player); + } + + public int getSizeInventory() { + return 9; + } + + public ItemStack getStackInSlot(int i) { + return this.contents[i]; + } + + public ItemStack decrStackSize(int i, int j) { + if (this.contents[i] == null) { + return null; + } else if (this.contents[i].stackSize <= j) { + ItemStack tr = this.contents[i]; + this.contents[i] = null; + this.markDirty(); + return tr; + } else { + ItemStack tr = this.contents[i].splitStack(j); + if (this.contents[i].stackSize == 0) { + this.contents[i] = null; + } + + this.markDirty(); + return tr; + } + } + + public ItemStack getStackInSlotOnClosing(int i) { + if (this.contents[i] == null) { + return null; + } else { + ItemStack ist = this.contents[i]; + this.contents[i] = null; + return ist; + } + } + + public void setInventorySlotContents(int i, ItemStack ist) { + this.contents[i] = ist; + if (ist != null && ist.stackSize > this.getInventoryStackLimit()) { + ist.stackSize = this.getInventoryStackLimit(); + } + + this.markDirty(); + } + + public String getInventoryName() { + return "tile.rpdeploy.name"; + } + + public int getInventoryStackLimit() { + return 64; + } + + public boolean isUseableByPlayer(EntityPlayer player) { + return !this.isInvalid() + && super.worldObj.getTileEntity(super.xCoord, super.yCoord, super.zCoord) == this + && player.getDistanceSq((double)super.xCoord + 0.5, (double)super.yCoord + 0.5, (double)super.zCoord + 0.5) <= 64.0; + } + + public void closeInventory() { + } + + public void openInventory() { + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + NBTTagList items = data.getTagList("Items", 10); + this.contents = new ItemStack[this.getSizeInventory()]; + + for(int i = 0; i < items.tagCount(); ++i) { + NBTTagCompound item = items.getCompoundTagAt(i); + int j = item.getByte("Slot") & 255; + if (j >= 0 && j < this.contents.length) { + this.contents[j] = ItemStack.loadItemStackFromNBT(item); + } + } + + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + NBTTagList items = new NBTTagList(); + + for(int i = 0; i < this.contents.length; ++i) { + if (this.contents[i] != null) { + NBTTagCompound item = new NBTTagCompound(); + item.setByte("Slot", (byte)i); + this.contents[i].writeToNBT(item); + items.appendTag(item); + } + } + + data.setTag("Items", items); + } + + public int[] getAccessibleSlotsFromSide(int side) { + return side != (super.Rotation ^ 1) ? IntStream.range(0, 9).toArray() : new int[0]; + } + + public boolean canInsertItem(int slotID, ItemStack stack, int side) { + return side != (super.Rotation ^ 1); + } + + public boolean canExtractItem(int slotID, ItemStack stack, int side) { + return side != (super.Rotation ^ 1); + } + + public boolean hasCustomInventoryName() { + return false; + } + + public boolean isItemValidForSlot(int slotID, ItemStack stack) { + return true; + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/TileDeployBase.java b/src/main/java/com/eloraam/redpower/machine/TileDeployBase.java new file mode 100644 index 0000000..b38fc26 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/TileDeployBase.java @@ -0,0 +1,178 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.IConnectable; +import com.eloraam.redpower.core.IFrameLink; +import com.eloraam.redpower.core.RedPowerLib; +import com.eloraam.redpower.core.WorldCoord; +import cpw.mods.fml.common.eventhandler.Event.Result; +import java.util.List; +import net.minecraft.block.Block; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLiving; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.Vec3; +import net.minecraft.world.World; +import net.minecraftforge.common.util.FakePlayer; +import net.minecraftforge.event.ForgeEventFactory; +import net.minecraftforge.event.entity.player.PlayerInteractEvent; +import net.minecraftforge.event.entity.player.PlayerInteractEvent.Action; + +public abstract class TileDeployBase extends TileMachine implements IFrameLink, IConnectable { + @Override + public boolean isFrameMoving() { + return false; + } + + @Override + public boolean canFrameConnectIn(int dir) { + return dir != (super.Rotation ^ 1); + } + + @Override + public boolean canFrameConnectOut(int dir) { + return false; + } + + @Override + public WorldCoord getFrameLinkset() { + return null; + } + + @Override + public int getConnectableMask() { + return 1073741823 ^ RedPowerLib.getConDirMask(super.Rotation ^ 1); + } + + @Override + public int getConnectClass(int side) { + return 0; + } + + @Override + public int getCornerPowerMode() { + return 0; + } + + @Override + public Block getBlockType() { + return RedPowerMachine.blockMachine; + } + + protected static Entity traceEntities(World world, Entity exclude, Vec3 vs, Vec3 vlook) { + AxisAlignedBB aabb = AxisAlignedBB.getBoundingBox(vs.xCoord, vs.yCoord, vs.zCoord, vs.xCoord, vs.yCoord, vs.zCoord); + List elist = world.getEntitiesWithinAABBExcludingEntity( + exclude, aabb.addCoord(vlook.xCoord, vlook.yCoord, vlook.zCoord).expand(1.0, 1.0, 1.0) + ); + Vec3 v2 = vs.addVector(vlook.xCoord, vlook.yCoord, vlook.zCoord); + Entity entHit = null; + double edis = 0.0; + + for(Entity ent : elist) { + if (ent.canBeCollidedWith()) { + float cbs = ent.getCollisionBorderSize(); + AxisAlignedBB ab2 = ent.boundingBox.expand((double)cbs, (double)cbs, (double)cbs); + if (ab2.isVecInside(vs)) { + entHit = ent; + break; + } + + MovingObjectPosition mop = ab2.calculateIntercept(vs, v2); + if (mop != null) { + double d = vs.distanceTo(mop.hitVec); + if (d < edis || edis == 0.0) { + entHit = ent; + edis = d; + } + } + } + } + + return entHit; + } + + protected boolean useOnEntity(Entity ent, FakePlayer player) { + if (ent.interactFirst(player)) { + return true; + } else { + ItemStack ist = player.getCurrentEquippedItem(); + if (ist != null && ent instanceof EntityLiving) { + int iss = ist.stackSize; + ist.interactWithEntity(player, (EntityLivingBase)ent); + if (ist.stackSize != iss) { + return true; + } + } + + return false; + } + } + + protected boolean tryUseItemStack(ItemStack ist, int x, int y, int z, int slot, FakePlayer player) { + player.inventory.currentItem = slot; + WorldCoord wc = new WorldCoord(this); + wc.step(super.Rotation ^ 1); + if (!ForgeEventFactory.onPlayerInteract(player, Action.RIGHT_CLICK_BLOCK, wc.x, wc.y, wc.z, super.Rotation ^ 1, super.worldObj).isCanceled()) { + if (ist.getItem() != Items.dye && ist.getItem() != Items.minecart && ist.getItem() != Items.furnace_minecart && ist.getItem() != Items.chest_minecart) { + if (ist.getItem().onItemUseFirst(ist, player, super.worldObj, x, y, z, 1, 0.5F, 0.5F, 0.5F)) { + return true; + } + + if (ist.getItem().onItemUse(ist, player, super.worldObj, x, y - 1, z, 1, 0.5F, 0.5F, 0.5F)) { + return true; + } + } else if (ist.getItem().onItemUse(ist, player, super.worldObj, x, y, z, 1, 0.5F, 0.5F, 0.5F)) { + return true; + } + + int iss = ist.stackSize; + PlayerInteractEvent event = ForgeEventFactory.onPlayerInteract(player, Action.RIGHT_CLICK_AIR, 0, 0, 0, -1, super.worldObj); + if (event.useItem != Result.DENY) { + ItemStack ost = ist.useItemRightClick(super.worldObj, player); + if (ost == ist && ost.stackSize == iss) { + Vec3 lv = player.getLook(1.0F); + lv.xCoord *= 2.5; + lv.yCoord *= 2.5; + lv.zCoord *= 2.5; + Vec3 sv = Vec3.createVectorHelper((double)super.xCoord + 0.5, (double)super.yCoord + 0.5, (double)super.zCoord + 0.5); + Entity ent = traceEntities(super.worldObj, player, sv, lv); + return ent != null && this.useOnEntity(ent, player); + } + + player.inventory.setInventorySlotContents(slot, ost); + return true; + } + } + + return false; + } + + public abstract void enableTowards(WorldCoord var1); + + @Override + public void onBlockNeighborChange(Block block) { + int cm = this.getConnectableMask(); + if (!RedPowerLib.isPowered(super.worldObj, super.xCoord, super.yCoord, super.zCoord, cm, cm >> 24)) { + if (super.Active) { + this.scheduleTick(5); + } + } else if (!super.Active) { + super.Active = true; + this.updateBlock(); + WorldCoord wc = new WorldCoord(this); + wc.step(super.Rotation ^ 1); + this.enableTowards(wc); + } + + } + + @Override + public void onTileTick() { + super.Active = false; + this.updateBlock(); + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/TileEject.java b/src/main/java/com/eloraam/redpower/machine/TileEject.java new file mode 100644 index 0000000..1bf6b3e --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/TileEject.java @@ -0,0 +1,49 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.core.RedPowerLib; +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; + +public class TileEject extends TileEjectBase { + @Override + public int getExtendedID() { + return 14; + } + + @Override + public void onBlockNeighborChange(Block block) { + if (RedPowerLib.isPowered(super.worldObj, super.xCoord, super.yCoord, super.zCoord, 16777215, 63)) { + if (!super.Powered) { + super.Powered = true; + this.markDirty(); + if (!super.Active) { + super.Active = true; + if (this.handleExtract()) { + this.updateBlock(); + } + } + } + } else { + if (super.Active && !this.isTickScheduled()) { + this.scheduleTick(5); + } + + super.Powered = false; + this.markDirty(); + } + + } + + protected boolean handleExtract() { + for(int n = 0; n < this.getSizeInventory(); ++n) { + ItemStack ist = this.getStackInSlot(n); + if (ist != null && ist.stackSize != 0) { + this.addToBuffer(this.decrStackSize(n, 1)); + this.drainBuffer(); + return true; + } + } + + return false; + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/TileEjectBase.java b/src/main/java/com/eloraam/redpower/machine/TileEjectBase.java new file mode 100644 index 0000000..13a7bb3 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/TileEjectBase.java @@ -0,0 +1,240 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.ITubeConnectable; +import com.eloraam.redpower.core.TubeBuffer; +import com.eloraam.redpower.core.TubeItem; +import java.util.stream.IntStream; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; + +public class TileEjectBase extends TileMachine implements ISidedInventory, ITubeConnectable { + TubeBuffer buffer = new TubeBuffer(); + protected ItemStack[] contents = new ItemStack[9]; + + @Override + public int getTubeConnectableSides() { + return 1 << super.Rotation; + } + + @Override + public int getTubeConClass() { + return 0; + } + + @Override + public boolean canRouteItems() { + return false; + } + + @Override + public boolean tubeItemEnter(int side, int state, TubeItem item) { + if (side == super.Rotation && state == 2) { + this.buffer.addBounce(item); + super.Active = true; + this.updateBlock(); + this.scheduleTick(5); + return true; + } else { + return false; + } + } + + @Override + public boolean tubeItemCanEnter(int side, int state, TubeItem item) { + return side == super.Rotation && state == 2; + } + + @Override + public int tubeWeight(int side, int state) { + return side == super.Rotation && state == 2 ? this.buffer.size() : 0; + } + + protected void addToBuffer(ItemStack ist) { + this.buffer.addNew(ist); + } + + @Override + public boolean onBlockActivated(EntityPlayer player) { + if (player.isSneaking()) { + return false; + } else { + if (!super.worldObj.isRemote) { + player.openGui(RedPowerMachine.instance, 12, super.worldObj, super.xCoord, super.yCoord, super.zCoord); + } + + return true; + } + } + + @Override + public void onBlockRemoval() { + for(int i = 0; i < 9; ++i) { + ItemStack ist = this.contents[i]; + if (ist != null && ist.stackSize > 0) { + CoreLib.dropItem(super.worldObj, super.xCoord, super.yCoord, super.zCoord, ist); + } + } + + this.buffer.onRemove(this); + } + + public void drainBuffer() { + while(!this.buffer.isEmpty()) { + TubeItem ti = this.buffer.getLast(); + if (!this.handleItem(ti)) { + this.buffer.plugged = true; + return; + } + + this.buffer.pop(); + if (this.buffer.plugged) { + return; + } + } + + } + + @Override + public void onTileTick() { + if (!super.worldObj.isRemote) { + if (!this.buffer.isEmpty()) { + this.drainBuffer(); + if (!this.buffer.isEmpty()) { + this.scheduleTick(10); + } else { + this.scheduleTick(5); + } + } else if (!super.Powered) { + super.Active = false; + this.updateBlock(); + } + } + + } + + public int getSizeInventory() { + return 9; + } + + public ItemStack getStackInSlot(int i) { + return this.contents[i]; + } + + public ItemStack decrStackSize(int i, int j) { + if (this.contents[i] == null) { + return null; + } else if (this.contents[i].stackSize <= j) { + ItemStack tr = this.contents[i]; + this.contents[i] = null; + this.markDirty(); + return tr; + } else { + ItemStack tr = this.contents[i].splitStack(j); + if (this.contents[i].stackSize == 0) { + this.contents[i] = null; + } + + this.markDirty(); + return tr; + } + } + + public ItemStack getStackInSlotOnClosing(int i) { + if (this.contents[i] == null) { + return null; + } else { + ItemStack ist = this.contents[i]; + this.contents[i] = null; + return ist; + } + } + + public void setInventorySlotContents(int i, ItemStack ist) { + this.contents[i] = ist; + if (ist != null && ist.stackSize > this.getInventoryStackLimit()) { + ist.stackSize = this.getInventoryStackLimit(); + } + + this.markDirty(); + } + + public String getInventoryName() { + return "tile.rpeject.name"; + } + + public int getInventoryStackLimit() { + return 64; + } + + public boolean isUseableByPlayer(EntityPlayer player) { + return !this.isInvalid() + && super.worldObj.getTileEntity(super.xCoord, super.yCoord, super.zCoord) == this + && player.getDistanceSq((double)super.xCoord + 0.5, (double)super.yCoord + 0.5, (double)super.zCoord + 0.5) <= 64.0; + } + + public void closeInventory() { + } + + public void openInventory() { + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + NBTTagList items = data.getTagList("Items", 10); + this.contents = new ItemStack[this.getSizeInventory()]; + + for(int i = 0; i < items.tagCount(); ++i) { + NBTTagCompound item = items.getCompoundTagAt(i); + int j = item.getByte("Slot") & 255; + if (j >= 0 && j < this.contents.length) { + this.contents[j] = ItemStack.loadItemStackFromNBT(item); + } + } + + this.buffer.readFromNBT(data); + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + NBTTagList items = new NBTTagList(); + + for(int i = 0; i < this.contents.length; ++i) { + if (this.contents[i] != null) { + NBTTagCompound item = new NBTTagCompound(); + item.setByte("Slot", (byte)i); + this.contents[i].writeToNBT(item); + items.appendTag(item); + } + } + + data.setTag("Items", items); + this.buffer.writeToNBT(data); + } + + public int[] getAccessibleSlotsFromSide(int side) { + return IntStream.range(0, 9).toArray(); + } + + public boolean canInsertItem(int slotID, ItemStack stack, int side) { + return side != super.Rotation; + } + + public boolean canExtractItem(int slotID, ItemStack stack, int side) { + return side != super.Rotation; + } + + public boolean hasCustomInventoryName() { + return false; + } + + public boolean isItemValidForSlot(int slotID, ItemStack stack) { + return true; + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/TileFilter.java b/src/main/java/com/eloraam/redpower/machine/TileFilter.java new file mode 100644 index 0000000..4891b69 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/TileFilter.java @@ -0,0 +1,252 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.MachineLib; +import com.eloraam.redpower.core.TubeItem; +import java.util.stream.IntStream; +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; + +public class TileFilter extends TileTranspose implements ISidedInventory { + protected ItemStack[] contents = new ItemStack[9]; + protected MachineLib.FilterMap filterMap = null; + public byte color = 0; + + protected void regenFilterMap() { + this.filterMap = MachineLib.makeFilterMap(this.contents); + } + + @Override + public boolean tubeItemEnter(int side, int state, TubeItem item) { + if (side == (super.Rotation ^ 1) && state == 1) { + if (this.filterMap == null) { + this.regenFilterMap(); + } + + return this.filterMap.size() == 0 + ? super.tubeItemEnter(side, state, item) + : this.filterMap.containsKey(item.item) && super.tubeItemEnter(side, state, item); + } else { + return super.tubeItemEnter(side, state, item); + } + } + + @Override + public boolean tubeItemCanEnter(int side, int state, TubeItem item) { + if (side == (super.Rotation ^ 1) && state == 1) { + if (this.filterMap == null) { + this.regenFilterMap(); + } + + return this.filterMap.size() == 0 + ? super.tubeItemCanEnter(side, state, item) + : this.filterMap.containsKey(item.item) && super.tubeItemCanEnter(side, state, item); + } else { + return super.tubeItemCanEnter(side, state, item); + } + } + + @Override + protected void addToBuffer(ItemStack ist) { + super.buffer.addNewColor(ist, this.color); + } + + @Override + public boolean onBlockActivated(EntityPlayer player) { + if (player.isSneaking()) { + return false; + } else { + if (!super.worldObj.isRemote) { + player.openGui(RedPowerMachine.instance, 2, super.worldObj, super.xCoord, super.yCoord, super.zCoord); + } + + return true; + } + } + + @Override + public int getExtendedID() { + return 3; + } + + @Override + public void onBlockRemoval() { + super.onBlockRemoval(); + + for(int i = 0; i < 9; ++i) { + ItemStack ist = this.contents[i]; + if (ist != null && ist.stackSize > 0) { + CoreLib.dropItem(super.worldObj, super.xCoord, super.yCoord, super.zCoord, ist); + } + } + + } + + @Override + protected boolean handleExtract(IInventory inv, int[] slots) { + if (this.filterMap == null) { + this.regenFilterMap(); + } + + if (this.filterMap.size() == 0) { + ItemStack sm1 = MachineLib.collectOneStack(inv, slots, null); + if (sm1 == null) { + return false; + } else { + super.buffer.addNewColor(sm1, this.color); + this.drainBuffer(); + return true; + } + } else { + int sm = MachineLib.matchAnyStack(this.filterMap, inv, slots); + if (sm < 0) { + return false; + } else { + ItemStack coll = MachineLib.collectOneStack(inv, slots, this.contents[sm]); + super.buffer.addNewColor(coll, this.color); + this.drainBuffer(); + return true; + } + } + } + + @Override + protected boolean suckFilter(ItemStack ist) { + if (this.filterMap == null) { + this.regenFilterMap(); + } + + return this.filterMap.size() == 0 || this.filterMap.containsKey(ist); + } + + public int getSizeInventory() { + return 9; + } + + public ItemStack getStackInSlot(int i) { + return this.contents[i]; + } + + public ItemStack decrStackSize(int i, int j) { + if (this.contents[i] == null) { + return null; + } else if (this.contents[i].stackSize <= j) { + ItemStack tr = this.contents[i]; + this.contents[i] = null; + this.markDirty(); + return tr; + } else { + ItemStack tr = this.contents[i].splitStack(j); + if (this.contents[i].stackSize == 0) { + this.contents[i] = null; + } + + this.markDirty(); + return tr; + } + } + + public ItemStack getStackInSlotOnClosing(int i) { + if (this.contents[i] == null) { + return null; + } else { + ItemStack ist = this.contents[i]; + this.contents[i] = null; + return ist; + } + } + + public void setInventorySlotContents(int i, ItemStack ist) { + this.contents[i] = ist; + if (ist != null && ist.stackSize > this.getInventoryStackLimit()) { + ist.stackSize = this.getInventoryStackLimit(); + } + + this.markDirty(); + } + + public String getInventoryName() { + return "tile.rpfilter.name"; + } + + public int getInventoryStackLimit() { + return 64; + } + + public boolean isUseableByPlayer(EntityPlayer player) { + return !this.isInvalid() + && super.worldObj.getTileEntity(super.xCoord, super.yCoord, super.zCoord) == this + && player.getDistanceSq((double)super.xCoord + 0.5, (double)super.yCoord + 0.5, (double)super.zCoord + 0.5) <= 64.0; + } + + public void markDirty() { + this.filterMap = null; + super.markDirty(); + } + + public void closeInventory() { + } + + public void openInventory() { + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + NBTTagList items = data.getTagList("Items", 10); + this.contents = new ItemStack[this.getSizeInventory()]; + + for(int i = 0; i < items.tagCount(); ++i) { + NBTTagCompound item = items.getCompoundTagAt(i); + int j = item.getByte("Slot") & 255; + if (j >= 0 && j < this.contents.length) { + this.contents[j] = ItemStack.loadItemStackFromNBT(item); + } + } + + this.color = data.getByte("color"); + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + NBTTagList items = new NBTTagList(); + + for(int i = 0; i < this.contents.length; ++i) { + if (this.contents[i] != null) { + NBTTagCompound item = new NBTTagCompound(); + item.setByte("Slot", (byte)i); + this.contents[i].writeToNBT(item); + items.appendTag(item); + } + } + + data.setTag("Items", items); + data.setByte("color", this.color); + } + + public int[] getAccessibleSlotsFromSide(int side) { + return side != super.Rotation && side != (super.Rotation ^ 1) ? IntStream.range(0, 9).toArray() : new int[0]; + } + + public boolean canInsertItem(int slotID, ItemStack itemStack, int side) { + return side != super.Rotation && side != (super.Rotation ^ 1); + } + + public boolean canExtractItem(int slotID, ItemStack itemStack, int side) { + return side != super.Rotation && side != (super.Rotation ^ 1); + } + + public boolean hasCustomInventoryName() { + return false; + } + + public boolean isItemValidForSlot(int slotID, ItemStack itemStack) { + return true; + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/TileFrame.java b/src/main/java/com/eloraam/redpower/machine/TileFrame.java new file mode 100644 index 0000000..cd5b240 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/TileFrame.java @@ -0,0 +1,318 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.BlockMultipart; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.CoverLib; +import com.eloraam.redpower.core.IFrameLink; +import com.eloraam.redpower.core.IFrameSupport; +import com.eloraam.redpower.core.TileCoverable; +import com.eloraam.redpower.core.TileExtended; +import com.eloraam.redpower.core.WorldCoord; +import com.mojang.authlib.GameProfile; +import java.util.Arrays; +import java.util.List; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.IBlockAccess; + +public class TileFrame extends TileCoverable implements IFrameLink, IFrameSupport { + public int CoverSides = 0; + public int StickySides = 63; + public short[] Covers = new short[6]; + + @Override + public boolean isFrameMoving() { + return false; + } + + @Override + public boolean canFrameConnectIn(int dir) { + return (this.StickySides & 1 << dir) > 0; + } + + @Override + public boolean canFrameConnectOut(int dir) { + return (this.StickySides & 1 << dir) > 0; + } + + @Override + public WorldCoord getFrameLinkset() { + return null; + } + + @Override + public int getExtendedID() { + return 0; + } + + @Override + public void onBlockNeighborChange(Block block) { + } + + public Block getBlockType() { + return RedPowerMachine.blockFrame; + } + + @Override + public int getPartsMask() { + return this.CoverSides | 536870912; + } + + @Override + public int getSolidPartsMask() { + return this.CoverSides | 536870912; + } + + @Override + public boolean blockEmpty() { + return false; + } + + @Override + public void onHarvestPart(EntityPlayer player, int part, boolean willHarvest) { + if (part == 29) { + if (willHarvest) { + CoreLib.dropItem(super.worldObj, super.xCoord, super.yCoord, super.zCoord, new ItemStack(RedPowerMachine.blockFrame, 1)); + } + + if (this.CoverSides > 0) { + this.replaceWithCovers(); + this.updateBlockChange(); + } else { + this.deleteBlock(); + } + } else { + super.onHarvestPart(player, part, willHarvest); + } + + } + + @Override + public void addHarvestContents(List ist) { + super.addHarvestContents(ist); + ist.add(new ItemStack(RedPowerMachine.blockFrame, 1)); + } + + @Override + public float getPartStrength(EntityPlayer player, int part) { + BlockMachine bl = RedPowerMachine.blockMachine; + return part == 29 ? player.getBreakSpeed(bl, false, 0) / (bl.getHardness() * 30.0F) : super.getPartStrength(player, part); + } + + @Override + public void setPartBounds(BlockMultipart block, int part) { + if (part == 29) { + block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + } else { + super.setPartBounds(block, part); + } + + } + + @Override + public boolean canAddCover(int side, int cover) { + if (side > 5) { + return false; + } else { + int n = cover >> 8; + return (n == 0 || n == 1 || n == 3 || n == 4) && (this.CoverSides & 1 << side) <= 0; + } + } + + private void rebuildSticky() { + int ss = 0; + + for(int i = 0; i < 6; ++i) { + int m = 1 << i; + if ((this.CoverSides & m) == 0) { + ss |= m; + } else { + int n = this.Covers[i] >> 8; + if (n == 1 || n == 4) { + ss |= m; + } + } + } + + this.StickySides = ss; + } + + @Override + public boolean tryAddCover(int side, int cover) { + if (!this.canAddCover(side, cover)) { + return false; + } else { + this.CoverSides |= 1 << side; + this.Covers[side] = (short)cover; + this.rebuildSticky(); + this.updateBlockChange(); + return true; + } + } + + @Override + public int tryRemoveCover(int side) { + if ((this.CoverSides & 1 << side) == 0) { + return -1; + } else { + this.CoverSides &= ~(1 << side); + short tr = this.Covers[side]; + this.Covers[side] = 0; + this.rebuildSticky(); + this.updateBlockChange(); + return tr; + } + } + + @Override + public int getCover(int side) { + return (this.CoverSides & 1 << side) == 0 ? -1 : this.Covers[side]; + } + + @Override + public int getCoverMask() { + return this.CoverSides; + } + + public void replaceWithCovers() { + short[] covs = Arrays.copyOf(this.Covers, 29); + GameProfile owner = super.Owner; + CoverLib.replaceWithCovers(super.worldObj, super.xCoord, super.yCoord, super.zCoord, this.CoverSides, covs); + TileExtended te = CoreLib.getTileEntity(super.worldObj, super.xCoord, super.yCoord, super.zCoord, TileExtended.class); + if (te != null) { + te.Owner = owner; + } + + } + + @Override + public void writeFramePacket(NBTTagCompound tag) { + tag.setInteger("cvm", this.CoverSides); + byte[] cov = new byte[Integer.bitCount(this.CoverSides) * 2]; + int dp = 0; + + for(int i = 0; i < 6; ++i) { + if ((this.CoverSides & 1 << i) != 0) { + cov[dp] = (byte)(this.Covers[i] & 255); + cov[dp + 1] = (byte)(this.Covers[i] >> 8); + dp += 2; + } + } + + tag.setByteArray("cvs", cov); + } + + @Override + public void readFramePacket(NBTTagCompound tag) { + int cs2 = tag.getInteger("cvm") & 63; + this.CoverSides |= cs2; + byte[] cov = tag.getByteArray("cvs"); + if (cov != null && cs2 > 0) { + int sp = 0; + + for(int i = 0; i < 6; ++i) { + if ((cs2 & 1 << i) != 0) { + this.Covers[i] = (short)((cov[sp] & 255) + ((cov[sp + 1] & 255) << 8)); + sp += 2; + } + } + } + + this.markForUpdate(); + } + + @Override + public void onFramePickup(IBlockAccess iba) { + } + + @Override + public void onFrameRefresh(IBlockAccess iba) { + } + + @Override + public void onFrameDrop() { + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + int cs2 = data.getInteger("cvm") & 63; + this.CoverSides |= cs2; + byte[] cov = data.getByteArray("cvs"); + if (cov != null && cs2 > 0) { + int sp = 0; + + for(int i = 0; i < 6; ++i) { + if ((cs2 & 1 << i) != 0) { + this.Covers[i] = (short)((cov[sp] & 255) + ((cov[sp + 1] & 255) << 8)); + sp += 2; + } + } + } + + this.rebuildSticky(); + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + data.setInteger("cvm", this.CoverSides); + byte[] cov = new byte[Integer.bitCount(this.CoverSides) * 2]; + int dp = 0; + + for(int i = 0; i < 6; ++i) { + if ((this.CoverSides & 1 << i) != 0) { + cov[dp] = (byte)(this.Covers[i] & 255); + cov[dp + 1] = (byte)(this.Covers[i] >> 8); + dp += 2; + } + } + + data.setByteArray("cvs", cov); + } + + @Override + protected void readFromPacket(NBTTagCompound tag) { + int cs2 = tag.getInteger("cvm") & 63; + this.CoverSides = cs2; + byte[] cov = tag.getByteArray("cvs"); + if (cov != null && cs2 > 0) { + int sp = 0; + + for(int i = 0; i < 6; ++i) { + if ((cs2 & 1 << i) != 0) { + this.Covers[i] = (short)((cov[sp] & 255) + ((cov[sp + 1] & 255) << 8)); + sp += 2; + } + } + } + + this.rebuildSticky(); + this.markForUpdate(); + } + + @Override + protected void writeToPacket(NBTTagCompound tag) { + tag.setInteger("cvm", this.CoverSides); + byte[] cov = new byte[Integer.bitCount(this.CoverSides) * 2]; + int dp = 0; + + for(int i = 0; i < 6; ++i) { + if ((this.CoverSides & 1 << i) != 0) { + cov[dp] = (byte)(this.Covers[i] & 255); + cov[dp + 1] = (byte)(this.Covers[i] >> 8); + dp += 2; + } + } + + tag.setByteArray("cvs", cov); + } + + @Override + protected ItemStack getBasePickStack() { + return new ItemStack(RedPowerMachine.blockFrame, 1); + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/TileFrameMoving.java b/src/main/java/com/eloraam/redpower/machine/TileFrameMoving.java new file mode 100644 index 0000000..228040c --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/TileFrameMoving.java @@ -0,0 +1,432 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.BlockMultipart; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.IFrameLink; +import com.eloraam.redpower.core.IFrameSupport; +import com.eloraam.redpower.core.RedPowerLib; +import com.eloraam.redpower.core.TileMultipart; +import com.eloraam.redpower.core.WorldCoord; +import java.util.ArrayList; +import java.util.List; +import net.minecraft.block.Block; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraft.world.chunk.Chunk; +import net.minecraftforge.common.util.ForgeDirection; + +public class TileFrameMoving extends TileMultipart implements IFrameLink { + private TileFrameMoving.FrameBlockAccess frameBlockAccess = new TileFrameMoving.FrameBlockAccess(); + public int motorX; + public int motorY; + public int motorZ; + public Block movingBlock = Blocks.air; + public int movingBlockMeta = 0; + public boolean movingCrate = false; + public TileEntity movingTileEntity = null; + public byte lastMovePos = 0; + + @Override + public boolean isFrameMoving() { + return true; + } + + @Override + public boolean canFrameConnectIn(int dir) { + return true; + } + + @Override + public boolean canFrameConnectOut(int dir) { + return true; + } + + @Override + public WorldCoord getFrameLinkset() { + return new WorldCoord(this.motorX, this.motorY, this.motorZ); + } + + @Override + public int getExtendedID() { + return 1; + } + + @Override + public void onBlockNeighborChange(Block block) { + } + + public Block getBlockType() { + return RedPowerMachine.blockFrame; + } + + @Override + public int getPartsMask() { + return this.movingBlock == Blocks.air ? 0 : 536870912; + } + + @Override + public int getSolidPartsMask() { + return this.movingBlock == Blocks.air ? 0 : 536870912; + } + + @Override + public boolean blockEmpty() { + return false; + } + + @Override + public void onHarvestPart(EntityPlayer player, int part, boolean willHarvest) { + } + + @Override + public void addHarvestContents(List ist) { + super.addHarvestContents(ist); + } + + @Override + public float getPartStrength(EntityPlayer player, int part) { + return 0.0F; + } + + @Override + public void setPartBounds(BlockMultipart block, int part) { + TileMotor tm = CoreLib.getTileEntity(super.worldObj, this.motorX, this.motorY, this.motorZ, TileMotor.class); + if (tm != null) { + float ofs = tm.getMoveScaled(); + switch(tm.MoveDir) { + case 0: + block.setBlockBounds(0.0F, 0.0F - ofs, 0.0F, 1.0F, 1.0F - ofs, 1.0F); + break; + case 1: + block.setBlockBounds(0.0F, 0.0F + ofs, 0.0F, 1.0F, 1.0F + ofs, 1.0F); + break; + case 2: + block.setBlockBounds(0.0F, 0.0F, 0.0F - ofs, 1.0F, 1.0F, 1.0F - ofs); + break; + case 3: + block.setBlockBounds(0.0F, 0.0F, 0.0F + ofs, 1.0F, 1.0F, 1.0F + ofs); + break; + case 4: + block.setBlockBounds(0.0F - ofs, 0.0F, 0.0F, 1.0F - ofs, 1.0F, 1.0F); + break; + case 5: + block.setBlockBounds(0.0F + ofs, 0.0F, 0.0F, 1.0F + ofs, 1.0F, 1.0F); + } + } + + } + + public IBlockAccess getFrameBlockAccess() { + return this.frameBlockAccess; + } + + public void setContents(Block bid, int md, int mx, int my, int mz, TileEntity bte) { + this.movingBlock = bid; + this.movingBlockMeta = md; + this.motorX = mx; + this.motorY = my; + this.motorZ = mz; + this.movingTileEntity = bte; + if (this.movingTileEntity != null) { + if (RedPowerMachine.FrameAlwaysCrate) { + this.movingCrate = true; + } + + if (!(this.movingTileEntity instanceof IFrameSupport)) { + this.movingCrate = true; + } + } + + } + + public void doRefresh(IBlockAccess iba) { + if (this.movingTileEntity instanceof IFrameSupport) { + IFrameSupport ifs = (IFrameSupport)this.movingTileEntity; + ifs.onFrameRefresh(iba); + } + + } + + public void dropBlock() { + super.worldObj.setBlock(super.xCoord, super.yCoord, super.zCoord, this.movingBlock, this.movingBlockMeta, 3); + if (this.movingTileEntity != null) { + this.movingTileEntity.xCoord = super.xCoord; + this.movingTileEntity.yCoord = super.yCoord; + this.movingTileEntity.zCoord = super.zCoord; + this.movingTileEntity.validate(); + super.worldObj.setTileEntity(super.xCoord, super.yCoord, super.zCoord, this.movingTileEntity); + } + + super.worldObj.markBlockForUpdate(super.xCoord, super.yCoord, super.zCoord); + CoreLib.markBlockDirty(super.worldObj, super.xCoord, super.yCoord, super.zCoord); + RedPowerLib.updateIndirectNeighbors(super.worldObj, super.xCoord, super.yCoord, super.zCoord, this.movingBlock); + } + + private AxisAlignedBB getAABB(int dir, float dist) { + AxisAlignedBB aabb = AxisAlignedBB.getBoundingBox( + (double)super.xCoord, (double)super.yCoord, (double)super.zCoord, (double)(super.xCoord + 1), (double)(super.yCoord + 1), (double)(super.zCoord + 1) + ); + switch(dir) { + case 0: + aabb.minY -= (double)dist; + aabb.maxY -= (double)dist; + break; + case 1: + aabb.minY += (double)dist; + aabb.maxY += (double)dist; + break; + case 2: + aabb.minZ -= (double)dist; + aabb.maxZ -= (double)dist; + break; + case 3: + aabb.minZ += (double)dist; + aabb.maxZ += (double)dist; + break; + case 4: + aabb.minX -= (double)dist; + aabb.maxX -= (double)dist; + break; + case 5: + aabb.minX += (double)dist; + aabb.maxX += (double)dist; + } + + return aabb; + } + + void pushEntities(TileMotor tm) { + float prev = (float)this.lastMovePos / 16.0F; + float cur = (float)tm.MovePos / 16.0F; + this.lastMovePos = (byte)tm.MovePos; + float xm = 0.0F; + float ym = 0.0F; + float zm = 0.0F; + switch(tm.MoveDir) { + case 0: + ym -= cur - prev; + break; + case 1: + ym += cur - prev; + break; + case 2: + zm -= cur - prev; + break; + case 3: + zm += cur - prev; + break; + case 4: + xm -= cur - prev; + break; + case 5: + xm += cur - prev; + } + + AxisAlignedBB aabb = this.getAABB(tm.MoveDir, cur); + + for(Entity ent : new ArrayList(super.worldObj.getEntitiesWithinAABBExcludingEntity(null, aabb))) { + ent.moveEntity((double)xm, (double)ym, (double)zm); + } + + } + + @Override + public void updateEntity() { + super.updateEntity(); + TileMotor tm = CoreLib.getTileEntity(super.worldObj, this.motorX, this.motorY, this.motorZ, TileMotor.class); + if (tm != null && tm.MovePos >= 0) { + this.pushEntities(tm); + } else if (!super.worldObj.isRemote) { + this.dropBlock(); + } + + } + + public void validate() { + super.validate(); + if (this.movingTileEntity != null) { + this.movingTileEntity.setWorldObj(super.worldObj); + } + + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + this.motorX = data.getInteger("mx"); + this.motorY = data.getInteger("my"); + this.motorZ = data.getInteger("mz"); + this.movingBlock = Block.getBlockById(data.getInteger("mbid")); + this.movingBlockMeta = data.getInteger("mbmd"); + this.lastMovePos = data.getByte("lmp"); + if (data.hasKey("mte")) { + NBTTagCompound mte = data.getCompoundTag("mte"); + this.movingTileEntity = TileEntity.createAndLoadEntity(mte); + } else { + this.movingTileEntity = null; + } + + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + data.setInteger("mx", this.motorX); + data.setInteger("my", this.motorY); + data.setInteger("mz", this.motorZ); + data.setInteger("mbid", Block.getIdFromBlock(this.movingBlock)); + data.setInteger("mbmd", this.movingBlockMeta); + data.setByte("lmp", this.lastMovePos); + if (this.movingTileEntity != null) { + NBTTagCompound mte = new NBTTagCompound(); + this.movingTileEntity.writeToNBT(mte); + data.setTag("mte", mte); + } + + } + + @Override + protected void readFromPacket(NBTTagCompound tag) { + this.motorX = tag.getInteger("mx"); + this.motorY = tag.getInteger("my"); + this.motorZ = tag.getInteger("mz"); + this.movingBlock = Block.getBlockById(tag.getInteger("mbid")); + this.movingBlockMeta = tag.getInteger("mbmd"); + if (this.movingBlock != Blocks.air) { + this.movingTileEntity = this.movingBlock.createTileEntity(super.worldObj, this.movingBlockMeta); + if (this.movingTileEntity != null) { + if (!(this.movingTileEntity instanceof IFrameSupport)) { + this.movingCrate = true; + return; + } + + this.movingTileEntity.setWorldObj(super.worldObj); + this.movingTileEntity.xCoord = super.xCoord; + this.movingTileEntity.yCoord = super.yCoord; + this.movingTileEntity.zCoord = super.zCoord; + IFrameSupport ifs = (IFrameSupport)this.movingTileEntity; + ifs.readFramePacket(tag); + } + } + + } + + @Override + protected void writeToPacket(NBTTagCompound tag) { + tag.setInteger("mx", this.motorX); + tag.setInteger("my", this.motorY); + tag.setInteger("mz", this.motorZ); + tag.setInteger("mbid", Block.getIdFromBlock(this.movingBlock)); + tag.setInteger("mbmd", this.movingBlockMeta); + if (this.movingTileEntity instanceof IFrameSupport) { + IFrameSupport ifs = (IFrameSupport)this.movingTileEntity; + ifs.writeFramePacket(tag); + } + + } + + @Override + public AxisAlignedBB getRenderBoundingBox() { + TileMotor tm = CoreLib.getTileEntity(super.worldObj, this.motorX, this.motorY, this.motorZ, TileMotor.class); + if (tm != null && tm.MovePos >= 0) { + float prev = (float)this.lastMovePos / 16.0F; + float cur = (float)tm.MovePos / 16.0F; + this.lastMovePos = (byte)tm.MovePos; + float xm = 0.0F; + float ym = 0.0F; + float zm = 0.0F; + switch(tm.MoveDir) { + case 0: + ym -= cur - prev; + break; + case 1: + ym += cur - prev; + break; + case 2: + zm -= cur - prev; + break; + case 3: + zm += cur - prev; + break; + case 4: + xm -= cur - prev; + break; + case 5: + xm += cur - prev; + } + + return super.getRenderBoundingBox().addCoord((double)xm, (double)ym, (double)zm); + } else { + return super.getRenderBoundingBox(); + } + } + + private class FrameBlockAccess implements IBlockAccess { + private FrameBlockAccess() { + } + + private TileFrameMoving getFrame(int x, int y, int z) { + TileFrameMoving tfm = CoreLib.getTileEntity(TileFrameMoving.this.worldObj, x, y, z, TileFrameMoving.class); + return tfm == null + ? null + : (tfm.motorX == TileFrameMoving.this.motorX && tfm.motorY == TileFrameMoving.this.motorY && tfm.motorZ == TileFrameMoving.this.motorZ ? tfm : null); + } + + public Block getBlock(int x, int y, int z) { + TileFrameMoving tfm = this.getFrame(x, y, z); + return tfm == null ? Blocks.air : tfm.movingBlock; + } + + public TileEntity getTileEntity(int x, int y, int z) { + TileFrameMoving tfm = this.getFrame(x, y, z); + return tfm == null ? null : tfm.movingTileEntity; + } + + public int getLightBrightnessForSkyBlocks(int x, int y, int z, int value) { + return TileFrameMoving.this.worldObj.getLightBrightnessForSkyBlocks(x, y, z, value); + } + + public int getBlockMetadata(int x, int y, int z) { + TileFrameMoving tfm = this.getFrame(x, y, z); + return tfm == null ? 0 : tfm.movingBlockMeta; + } + + public boolean isAirBlock(int i, int j, int k) { + Block bid = this.getBlock(i, j, k); + return bid == Blocks.air || bid.isAir(TileFrameMoving.this.worldObj, i, j, k); + } + + public int getHeight() { + return TileFrameMoving.this.worldObj.getHeight(); + } + + public boolean extendedLevelsInChunkCache() { + return false; + } + + public BiomeGenBase getBiomeGenForCoords(int x, int z) { + return TileFrameMoving.this.worldObj.getBiomeGenForCoords(x, z); + } + + public int isBlockProvidingPowerTo(int x, int y, int z, int side) { + return 0; + } + + public boolean isSideSolid(int x, int y, int z, ForgeDirection side, boolean _default) { + if (x >= -30000000 && z >= -30000000 && x < 30000000 && z < 30000000) { + Chunk chunk = TileFrameMoving.this.worldObj.getChunkProvider().provideChunk(x >> 4, z >> 4); + return chunk != null && !chunk.isEmpty() ? this.getBlock(x, y, z).isSideSolid(this, x, y, z, side) : _default; + } else { + return _default; + } + } + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/TileFrameRedstoneTube.java b/src/main/java/com/eloraam/redpower/machine/TileFrameRedstoneTube.java new file mode 100644 index 0000000..82565f0 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/TileFrameRedstoneTube.java @@ -0,0 +1,148 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.BlockMultipart; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.IFrameLink; +import com.eloraam.redpower.core.WorldCoord; +import java.util.List; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +public class TileFrameRedstoneTube extends TileRedstoneTube implements IFrameLink { + public int StickySides = 63; + + @Override + public boolean isFrameMoving() { + return false; + } + + @Override + public boolean canFrameConnectIn(int dir) { + return (this.StickySides & 1 << dir) > 0; + } + + @Override + public boolean canFrameConnectOut(int dir) { + return (this.StickySides & 1 << dir) > 0; + } + + @Override + public WorldCoord getFrameLinkset() { + return null; + } + + @Override + public int getExtendedID() { + return 3; + } + + @Override + public Block getBlockType() { + return RedPowerMachine.blockFrame; + } + + @Override + public void onHarvestPart(EntityPlayer player, int part, boolean willHarvest) { + if (part == 29) { + if (willHarvest) { + CoreLib.dropItem(super.worldObj, super.xCoord, super.yCoord, super.zCoord, new ItemStack(this.getBlockType(), 1, 3)); + } + + super.flow.onRemove(); + if (super.CoverSides > 0) { + this.replaceWithCovers(); + this.updateBlockChange(); + } else { + this.deleteBlock(); + } + } else { + super.onHarvestPart(player, part, willHarvest); + } + + } + + @Override + public void addHarvestContents(List ist) { + this.addCoverableHarvestContents(ist); + ist.add(new ItemStack(this.getBlockType(), 1, 3)); + } + + @Override + public void setPartBounds(BlockMultipart block, int part) { + if (part == 29) { + block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + } else { + super.setPartBounds(block, part); + } + + } + + @Override + public boolean canAddCover(int side, int cover) { + if (side > 5) { + return false; + } else { + int n = cover >> 8; + return (n == 0 || n == 1 || n == 3 || n == 4) && (super.CoverSides & 1 << side) <= 0; + } + } + + private void rebuildSticky() { + int ss = 0; + + for(int i = 0; i < 6; ++i) { + int m = 1 << i; + if ((super.CoverSides & m) == 0) { + ss |= m; + } else { + int n = super.Covers[i] >> 8; + if (n == 1 || n == 4) { + ss |= m; + } + } + } + + this.StickySides = ss; + } + + @Override + public boolean tryAddCover(int side, int cover) { + if (!super.tryAddCover(side, cover)) { + return false; + } else { + this.rebuildSticky(); + return true; + } + } + + @Override + public int tryRemoveCover(int side) { + int tr = super.tryRemoveCover(side); + if (tr < 0) { + return tr; + } else { + this.rebuildSticky(); + return tr; + } + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + this.rebuildSticky(); + } + + @Override + protected void readFromPacket(NBTTagCompound data) { + super.readFromPacket(data); + this.rebuildSticky(); + } + + @Override + protected ItemStack getBasePickStack() { + return new ItemStack(this.getBlockType(), 1, 3); + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/TileFrameTube.java b/src/main/java/com/eloraam/redpower/machine/TileFrameTube.java new file mode 100644 index 0000000..751bfd4 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/TileFrameTube.java @@ -0,0 +1,150 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.BlockMultipart; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.IFrameLink; +import com.eloraam.redpower.core.WorldCoord; +import java.util.List; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +public class TileFrameTube extends TileTube implements IFrameLink { + public int StickySides = 63; + + @Override + public boolean isFrameMoving() { + return false; + } + + @Override + public boolean canFrameConnectIn(int dir) { + return (this.StickySides & 1 << dir) > 0; + } + + @Override + public boolean canFrameConnectOut(int dir) { + return (this.StickySides & 1 << dir) > 0; + } + + @Override + public WorldCoord getFrameLinkset() { + return null; + } + + @Override + public int getExtendedID() { + return 2; + } + + @Override + public Block getBlockType() { + return RedPowerMachine.blockFrame; + } + + @Override + public void onHarvestPart(EntityPlayer player, int part, boolean willHarvest) { + if (part == 29) { + if (willHarvest) { + CoreLib.dropItem(super.worldObj, super.xCoord, super.yCoord, super.zCoord, new ItemStack(this.getBlockType(), 1, 2)); + } + + super.flow.onRemove(); + if (super.CoverSides > 0) { + this.replaceWithCovers(); + this.updateBlockChange(); + } else { + this.deleteBlock(); + } + } else { + super.onHarvestPart(player, part, willHarvest); + } + + } + + @Override + public void addHarvestContents(List ist) { + this.addCoverableHarvestContents(ist); + ist.add(new ItemStack(this.getBlockType(), 1, 2)); + } + + @Override + public void setPartBounds(BlockMultipart block, int part) { + if (part == 29) { + block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + } else { + super.setPartBounds(block, part); + } + + } + + @Override + public boolean canAddCover(int side, int cover) { + if (side > 5) { + return false; + } else { + int n = cover >> 8; + return (n == 0 || n == 1 || n == 3 || n == 4) && (super.CoverSides & 1 << side) <= 0; + } + } + + void rebuildSticky() { + int ss = 0; + + for(int i = 0; i < 6; ++i) { + int m = 1 << i; + if ((super.CoverSides & m) == 0) { + ss |= m; + } else { + int n = super.Covers[i] >> 8; + if (n == 1 || n == 4) { + ss |= m; + } + } + } + + this.StickySides = ss; + } + + @Override + public boolean tryAddCover(int side, int cover) { + if (!super.tryAddCover(side, cover)) { + return false; + } else { + this.rebuildSticky(); + this.updateBlockChange(); + return true; + } + } + + @Override + public int tryRemoveCover(int side) { + int tr = super.tryRemoveCover(side); + if (tr < 0) { + return tr; + } else { + this.rebuildSticky(); + this.updateBlockChange(); + return tr; + } + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + this.rebuildSticky(); + } + + @Override + protected void readFromPacket(NBTTagCompound data) { + super.readFromPacket(data); + this.rebuildSticky(); + } + + @Override + protected ItemStack getBasePickStack() { + return new ItemStack(this.getBlockType(), 1, 2); + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/TileGrate.java b/src/main/java/com/eloraam/redpower/machine/TileGrate.java new file mode 100644 index 0000000..89fdba8 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/TileGrate.java @@ -0,0 +1,421 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.FluidBuffer; +import com.eloraam.redpower.core.IPipeConnectable; +import com.eloraam.redpower.core.PipeLib; +import com.eloraam.redpower.core.WorldCoord; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.Map; +import java.util.PriorityQueue; +import java.util.Queue; +import net.minecraft.block.Block; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.IBlockAccess; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; + +public class TileGrate extends TileMachinePanel implements IPipeConnectable { + private FluidBuffer gratebuf = new FluidBuffer() { + @Override + public TileEntity getParent() { + return TileGrate.this; + } + + @Override + public void onChange() { + TileGrate.this.markDirty(); + } + + @Override + public int getMaxLevel() { + return 1000; + } + }; + private TileGrate.GratePathfinder searchPath; + private int searchState = 0; + private int pressure; + + @Override + public int getPartMaxRotation(int part, boolean sec) { + return sec ? 0 : 5; + } + + @Override + public int getPipeConnectableSides() { + return 1 << super.Rotation; + } + + @Override + public int getPipeFlangeSides() { + return 1 << super.Rotation; + } + + @Override + public int getPipePressure(int side) { + return this.pressure; + } + + @Override + public FluidBuffer getPipeBuffer(int side) { + return this.gratebuf; + } + + @Override + public void onFramePickup(IBlockAccess iba) { + this.restartPath(); + } + + @Override + public int getExtendedID() { + return 3; + } + + @Override + public void onBlockPlaced(ItemStack ist, int side, EntityLivingBase ent) { + super.Rotation = ForgeDirection.getOrientation(this.getFacing(ent)).getOpposite().ordinal(); + this.updateBlockChange(); + if (ent instanceof EntityPlayer) { + super.Owner = ((EntityPlayer)ent).getGameProfile(); + } + + } + + @Override + public void onBlockNeighborChange(Block block) { + } + + @Override + public void updateEntity() { + super.updateEntity(); + if (!super.worldObj.isRemote) { + if (!this.isTickScheduled()) { + this.scheduleTick(5); + } + + WorldCoord wc = new WorldCoord(this); + wc.step(super.Rotation); + Integer pr = PipeLib.getPressure(super.worldObj, wc, super.Rotation ^ 1); + if (pr != null) { + this.pressure = pr - Integer.signum(pr); + } + + if (this.searchState == 1) { + this.searchPath.tryMapFluid(400); + } + + PipeLib.movePipeLiquid(super.worldObj, this, new WorldCoord(this), 1 << super.Rotation); + } + + } + + public void restartPath() { + this.searchPath = null; + this.searchState = 0; + } + + @Override + public void onTileTick() { + if (!super.worldObj.isRemote) { + if (this.pressure == 0) { + this.restartPath(); + } else if (this.pressure < -100) { + if (this.gratebuf.getLevel() >= this.gratebuf.getMaxLevel()) { + return; + } + + if (this.searchState == 2) { + this.restartPath(); + } + + if (this.searchState == 0) { + this.searchState = 1; + this.searchPath = new TileGrate.GratePathfinder(false); + if (this.gratebuf.Type == null) { + if (!this.searchPath.startSuck(new WorldCoord(this), 63 ^ 1 << super.Rotation)) { + this.restartPath(); + return; + } + } else { + this.searchPath.start(new WorldCoord(this), this.gratebuf.Type, 63 ^ 1 << super.Rotation); + } + } + + if (this.searchState == 1) { + if (!this.searchPath.tryMapFluid(400)) { + return; + } + + Fluid ty = this.searchPath.fluidClass; + int fluid = this.searchPath.trySuckFluid(ty.getDensity()); + if (fluid == 0) { + return; + } + + this.gratebuf.addLevel(ty, fluid); + } + } else if (this.pressure > 100) { + Fluid fluid = this.gratebuf.getFluidClass(); + if (fluid == null) { + return; + } + + int fq = fluid.getDensity(); + if (fq == 0) { + return; + } + + if (this.gratebuf.getLevel() < fq) { + return; + } + + if (this.gratebuf.Type == null) { + return; + } + + if (this.searchState == 1) { + this.restartPath(); + } + + if (this.searchState == 0) { + this.searchState = 2; + this.searchPath = new TileGrate.GratePathfinder(true); + this.searchPath.start(new WorldCoord(this), this.gratebuf.Type, 63 ^ 1 << super.Rotation); + } + + if (this.searchState == 2 && RedPowerMachine.AllowGrateDump) { + int fr = this.searchPath.tryDumpFluid(fq, 2000); + if (fr != fq) { + this.gratebuf.addLevel(this.gratebuf.Type, -fq); + } + } + } + } + + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + this.gratebuf.readFromNBT(data, "buf"); + this.pressure = data.getShort("pres"); + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + this.gratebuf.writeToNBT(data, "buf"); + data.setShort("pres", (short)this.pressure); + } + + public static class FluidCoord implements Comparable { + public WorldCoord wc; + public int dist; + + public FluidCoord(WorldCoord w, int d) { + this.wc = w; + this.dist = d; + } + + public int compareTo(TileGrate.FluidCoord wr) { + return this.wc.y == wr.wc.y ? this.dist - wr.dist : this.wc.y - wr.wc.y; + } + } + + public class GratePathfinder { + WorldCoord startPos; + Map backlink = new HashMap<>(); + Queue workset; + Queue allset = new PriorityQueue<>(1024, Collections.reverseOrder()); + public Fluid fluidClass; + + public GratePathfinder(boolean checkVertical) { + if (checkVertical) { + this.workset = new PriorityQueue<>(); + } else { + this.workset = new PriorityQueue<>(1024, Comparator.comparingInt(a -> a.dist)); + } + + } + + public void start(WorldCoord wc, Fluid tp, int sides) { + this.fluidClass = tp; + this.startPos = wc; + + for(int i = 0; i < 6; ++i) { + if ((sides & 1 << i) != 0) { + WorldCoord wc2 = wc.coordStep(i); + this.backlink.put(wc2, wc); + this.workset.add(new TileGrate.FluidCoord(wc2, 0)); + } + } + + } + + public boolean startSuck(WorldCoord wc, int sides) { + this.fluidClass = null; + this.startPos = wc; + + for(int i = 0; i < 6; ++i) { + if ((sides & 1 << i) != 0) { + WorldCoord wc2 = wc.coordStep(i); + this.backlink.put(wc2, wc); + this.workset.add(new TileGrate.FluidCoord(wc2, 0)); + Fluid fl = PipeLib.getFluid(TileGrate.this.worldObj, wc2); + if (fl != null) { + this.fluidClass = fl; + } + } + } + + return this.fluidClass != null; + } + + public boolean isConnected(WorldCoord wc) { + if (wc.compareTo(this.startPos) == 0) { + return true; + } else { + do { + wc = (WorldCoord)this.backlink.get(wc); + if (wc == null) { + return false; + } + + if (wc.compareTo(this.startPos) == 0) { + return true; + } + } while(PipeLib.getFluid(TileGrate.this.worldObj, wc) == this.fluidClass); + + return false; + } + } + + public void stepAdd(TileGrate.FluidCoord nc) { + for(int i = 0; i < 6; ++i) { + WorldCoord wc2 = nc.wc.coordStep(i); + if (!this.backlink.containsKey(wc2)) { + this.backlink.put(wc2, nc.wc); + this.workset.add(new TileGrate.FluidCoord(wc2, nc.dist + 1)); + } + } + + } + + public void stepMap(TileGrate.FluidCoord nc) { + for(int i = 0; i < 6; ++i) { + WorldCoord wc2 = nc.wc.coordStep(i); + if (PipeLib.getFluid(TileGrate.this.worldObj, wc2) == this.fluidClass && !this.backlink.containsKey(wc2)) { + this.backlink.put(wc2, nc.wc); + this.workset.add(new TileGrate.FluidCoord(wc2, nc.dist + 1)); + } + } + + } + + public int tryDumpFluid(int level, int tries) { + for(int i = 0; i < tries; ++i) { + TileGrate.FluidCoord nc = (TileGrate.FluidCoord)this.workset.poll(); + if (nc == null) { + TileGrate.this.restartPath(); + return level; + } + + if (!this.isConnected(nc.wc)) { + TileGrate.this.restartPath(); + return level; + } + + if (TileGrate.this.worldObj.isAirBlock(nc.wc.x, nc.wc.y, nc.wc.z)) { + if (level == this.fluidClass.getDensity() + && TileGrate.this.worldObj.setBlock(nc.wc.x, nc.wc.y, nc.wc.z, this.fluidClass.getBlock())) { + this.stepAdd(nc); + return 0; + } + } else if (PipeLib.getFluid(TileGrate.this.worldObj, nc.wc) == this.fluidClass) { + this.stepAdd(nc); + int lv1 = this.fluidClass.getDensity(TileGrate.this.worldObj, nc.wc.x, nc.wc.y, nc.wc.z); + if (lv1 < 1000) { + int lv2 = Math.min(lv1 + level, this.fluidClass.getDensity()); + if (lv2 == this.fluidClass.getDensity() + && TileGrate.this.worldObj.setBlock(nc.wc.x, nc.wc.y, nc.wc.z, this.fluidClass.getBlock())) { + level -= lv2 - lv1; + if (level == 0) { + return 0; + } + } + } + } + } + + return level; + } + + public boolean tryMapFluid(int tries) { + if (this.allset.size() > 32768) { + return true; + } else { + for(int i = 0; i < tries; ++i) { + TileGrate.FluidCoord nc = (TileGrate.FluidCoord)this.workset.poll(); + if (nc == null) { + return true; + } + + Fluid fluid = PipeLib.getFluid(TileGrate.this.worldObj, nc.wc); + if (fluid != null) { + this.stepMap(nc); + if (fluid == this.fluidClass) { + int lvl = PipeLib.getFluidAmount(TileGrate.this.worldObj, nc.wc); + if (lvl > 0) { + this.allset.add(nc); + } + } + } + } + + return false; + } + } + + public int trySuckFluid(int level) { + int tr = 0; + + while(!this.allset.isEmpty()) { + TileGrate.FluidCoord nc = (TileGrate.FluidCoord)this.allset.peek(); + if (!this.isConnected(nc.wc)) { + TileGrate.this.restartPath(); + return tr; + } + + if (PipeLib.getFluid(TileGrate.this.worldObj, nc.wc) != this.fluidClass) { + this.allset.poll(); + } else { + Fluid fluid = PipeLib.getFluid(TileGrate.this.worldObj, nc.wc); + if (fluid != null) { + int lvl = PipeLib.getFluidAmount(TileGrate.this.worldObj, nc.wc); + if (lvl <= 0) { + this.allset.poll(); + } else if (tr + lvl <= level) { + tr += lvl; + TileGrate.this.worldObj.setBlockToAir(nc.wc.x, nc.wc.y, nc.wc.z); + this.allset.poll(); + if (tr == level) { + return level; + } + } + } else { + this.allset.poll(); + } + } + } + + TileGrate.this.restartPath(); + return tr; + } + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/TileIgniter.java b/src/main/java/com/eloraam/redpower/machine/TileIgniter.java new file mode 100644 index 0000000..5ecf89f --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/TileIgniter.java @@ -0,0 +1,83 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.core.RedPowerLib; +import com.eloraam.redpower.core.WorldCoord; +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraftforge.common.util.ForgeDirection; + +public class TileIgniter extends TileMachine { + @Override + public int getExtendedID() { + return 12; + } + + private void fireAction() { + WorldCoord wc = new WorldCoord(this); + wc.step(super.Rotation ^ 1); + if (super.Active) { + if (super.worldObj.isAirBlock(wc.x, wc.y, wc.z)) { + super.worldObj.setBlock(wc.x, wc.y, wc.z, Blocks.fire); + } + } else { + Block block = super.worldObj.getBlock(wc.x, wc.y, wc.z); + if (block == Blocks.fire || block == Blocks.portal) { + super.worldObj.setBlockToAir(wc.x, wc.y, wc.z); + } + } + + } + + @Override + public void onBlockNeighborChange(Block block) { + if (!RedPowerLib.isPowered(super.worldObj, super.xCoord, super.yCoord, super.zCoord, 16777215, 63)) { + if (!super.Powered) { + return; + } + + super.Powered = false; + if (super.Delay) { + return; + } + + super.Active = false; + super.Delay = true; + this.fireAction(); + } else { + if (super.Powered) { + return; + } + + super.Powered = true; + if (super.Delay) { + return; + } + + if (super.Active) { + return; + } + + super.Active = true; + super.Delay = true; + this.fireAction(); + } + + this.scheduleTick(5); + this.updateBlock(); + } + + public boolean isOnFire(ForgeDirection face) { + return super.Rotation == face.ordinal() && super.Active; + } + + @Override + public void onTileTick() { + super.Delay = false; + if (super.Active != super.Powered) { + super.Active = super.Powered; + this.fireAction(); + this.updateBlock(); + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/TileItemDetect.java b/src/main/java/com/eloraam/redpower/machine/TileItemDetect.java new file mode 100644 index 0000000..f1c4ebb --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/TileItemDetect.java @@ -0,0 +1,336 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.ITubeConnectable; +import com.eloraam.redpower.core.MachineLib; +import com.eloraam.redpower.core.TubeBuffer; +import com.eloraam.redpower.core.TubeItem; +import java.util.stream.IntStream; +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; + +public class TileItemDetect extends TileMachine implements ITubeConnectable, IInventory, ISidedInventory { + private TubeBuffer buffer = new TubeBuffer(); + private int count = 0; + public byte mode = 0; + protected ItemStack[] contents = new ItemStack[9]; + protected MachineLib.FilterMap filterMap = null; + + private void regenFilterMap() { + this.filterMap = MachineLib.makeFilterMap(this.contents); + } + + @Override + public int getTubeConnectableSides() { + return 3 << (super.Rotation & -2); + } + + @Override + public int getTubeConClass() { + return 0; + } + + @Override + public boolean canRouteItems() { + return false; + } + + @Override + public boolean tubeItemEnter(int side, int state, TubeItem item) { + if (side == super.Rotation && state == 2) { + this.buffer.addBounce(item); + super.Active = true; + this.updateBlock(); + this.scheduleTick(5); + return true; + } else if (side != (super.Rotation ^ 1) || state != 1) { + return false; + } else if (!this.buffer.isEmpty()) { + return false; + } else { + this.buffer.add(item); + if (this.filterMap == null) { + this.regenFilterMap(); + } + + if (this.filterMap.size() == 0 || this.filterMap.containsKey(item.item)) { + if (this.mode == 0) { + this.count += item.item.stackSize; + } else if (this.mode == 1) { + ++this.count; + } + } + + super.Active = true; + this.updateBlock(); + this.scheduleTick(5); + this.drainBuffer(); + return true; + } + } + + @Override + public boolean tubeItemCanEnter(int side, int state, TubeItem item) { + return side == super.Rotation && state == 2 || side == (super.Rotation ^ 1) && state == 1 && this.buffer.isEmpty(); + } + + @Override + public int tubeWeight(int side, int state) { + return side == super.Rotation && state == 2 ? this.buffer.size() : 0; + } + + public void drainBuffer() { + while(!this.buffer.isEmpty()) { + TubeItem ti = this.buffer.getLast(); + if (!this.handleItem(ti)) { + this.buffer.plugged = true; + if (this.mode == 2 && !super.Powered) { + super.Delay = false; + super.Powered = true; + this.count = 0; + this.updateBlockChange(); + } + + return; + } + + this.buffer.pop(); + if (this.buffer.plugged) { + if (this.mode == 2 && !super.Powered) { + super.Delay = false; + super.Powered = true; + this.count = 0; + this.updateBlockChange(); + } + + return; + } + } + + if (this.mode == 2 && super.Powered) { + super.Powered = false; + this.updateBlockChange(); + } + + } + + @Override + public void updateEntity() { + super.updateEntity(); + if (!super.worldObj.isRemote && this.mode != 2) { + if (super.Powered) { + if (super.Delay) { + super.Delay = false; + this.markDirty(); + } else { + super.Powered = false; + if (this.count > 0) { + super.Delay = true; + } + + this.updateBlockChange(); + } + } else if (this.count != 0) { + if (super.Delay) { + super.Delay = false; + this.markDirty(); + } else { + --this.count; + super.Powered = true; + super.Delay = true; + this.updateBlockChange(); + } + } + } + + } + + @Override + public boolean isPoweringTo(int side) { + return side != (super.Rotation ^ 1) && super.Powered; + } + + @Override + public boolean onBlockActivated(EntityPlayer player) { + if (player.isSneaking()) { + return false; + } else { + if (!super.worldObj.isRemote) { + player.openGui(RedPowerMachine.instance, 6, super.worldObj, super.xCoord, super.yCoord, super.zCoord); + } + + return true; + } + } + + @Override + public int getExtendedID() { + return 4; + } + + @Override + public void onBlockRemoval() { + this.buffer.onRemove(this); + + for(int i = 0; i < 9; ++i) { + ItemStack ist = this.contents[i]; + if (ist != null && ist.stackSize > 0) { + CoreLib.dropItem(super.worldObj, super.xCoord, super.yCoord, super.zCoord, ist); + } + } + + } + + @Override + public void onTileTick() { + if (!super.worldObj.isRemote) { + if (!this.buffer.isEmpty()) { + this.drainBuffer(); + if (!this.buffer.isEmpty()) { + this.scheduleTick(10); + } else { + this.scheduleTick(5); + } + } else { + super.Active = false; + this.updateBlock(); + } + } + + } + + public int getSizeInventory() { + return 9; + } + + public ItemStack getStackInSlot(int i) { + return this.contents[i]; + } + + public ItemStack decrStackSize(int i, int j) { + if (this.contents[i] == null) { + return null; + } else if (this.contents[i].stackSize <= j) { + ItemStack tr = this.contents[i]; + this.contents[i] = null; + this.markDirty(); + return tr; + } else { + ItemStack tr = this.contents[i].splitStack(j); + if (this.contents[i].stackSize == 0) { + this.contents[i] = null; + } + + this.markDirty(); + return tr; + } + } + + public ItemStack getStackInSlotOnClosing(int i) { + if (this.contents[i] == null) { + return null; + } else { + ItemStack ist = this.contents[i]; + this.contents[i] = null; + return ist; + } + } + + public void setInventorySlotContents(int i, ItemStack ist) { + this.contents[i] = ist; + if (ist != null && ist.stackSize > this.getInventoryStackLimit()) { + ist.stackSize = this.getInventoryStackLimit(); + } + + this.markDirty(); + } + + public String getInventoryName() { + return "tile.rpitemdet.name"; + } + + public int getInventoryStackLimit() { + return 64; + } + + public boolean isUseableByPlayer(EntityPlayer player) { + return !this.isInvalid() + && super.worldObj.getTileEntity(super.xCoord, super.yCoord, super.zCoord) == this + && player.getDistanceSq((double)super.xCoord + 0.5, (double)super.yCoord + 0.5, (double)super.zCoord + 0.5) <= 64.0; + } + + public void markDirty() { + this.filterMap = null; + super.markDirty(); + } + + public void closeInventory() { + } + + public void openInventory() { + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + NBTTagList items = data.getTagList("Items", 10); + this.contents = new ItemStack[this.getSizeInventory()]; + + for(int i = 0; i < items.tagCount(); ++i) { + NBTTagCompound item = items.getCompoundTagAt(i); + int j = item.getByte("Slot") & 255; + if (j >= 0 && j < this.contents.length) { + this.contents[j] = ItemStack.loadItemStackFromNBT(item); + } + } + + this.buffer.readFromNBT(data); + this.count = data.getInteger("cnt"); + this.mode = data.getByte("mode"); + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + NBTTagList items = new NBTTagList(); + + for(int i = 0; i < this.contents.length; ++i) { + if (this.contents[i] != null) { + NBTTagCompound item = new NBTTagCompound(); + item.setByte("Slot", (byte)i); + this.contents[i].writeToNBT(item); + items.appendTag(item); + } + } + + data.setTag("Items", items); + this.buffer.writeToNBT(data); + data.setInteger("cnt", this.count); + data.setByte("mode", this.mode); + } + + public int[] getAccessibleSlotsFromSide(int side) { + return side != super.Rotation && side != (super.Rotation ^ 1) ? IntStream.range(0, 9).toArray() : new int[0]; + } + + public boolean canInsertItem(int slotID, ItemStack stack, int side) { + return side != super.Rotation && side != (super.Rotation ^ 1); + } + + public boolean canExtractItem(int slotID, ItemStack stack, int side) { + return side != super.Rotation && side != (super.Rotation ^ 1); + } + + public boolean hasCustomInventoryName() { + return false; + } + + public boolean isItemValidForSlot(int slotID, ItemStack stack) { + return true; + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/TileMachine.java b/src/main/java/com/eloraam/redpower/machine/TileMachine.java new file mode 100644 index 0000000..3365853 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/TileMachine.java @@ -0,0 +1,155 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.IFrameSupport; +import com.eloraam.redpower.core.IRotatable; +import com.eloraam.redpower.core.MachineLib; +import com.eloraam.redpower.core.TileExtended; +import com.eloraam.redpower.core.TubeItem; +import com.eloraam.redpower.core.WorldCoord; +import net.minecraft.block.Block; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.IBlockAccess; + +public class TileMachine extends TileExtended implements IRotatable, IFrameSupport { + public int Rotation = 0; + public boolean Active = false; + public boolean Powered = false; + public boolean Delay = false; + public boolean Charged = false; + + public int getFacing(EntityLivingBase ent) { + int yawrx = (int)Math.floor((double)(ent.rotationYaw * 4.0F / 360.0F) + 0.5) & 3; + if (Math.abs(ent.posX - (double)super.xCoord) < 2.0 && Math.abs(ent.posZ - (double)super.zCoord) < 2.0) { + double p = ent.posY + 1.82 - (double)ent.yOffset - (double)super.yCoord; + if (p > 2.0) { + return 0; + } + + if (p < 0.0) { + return 1; + } + } + + switch(yawrx) { + case 0: + return 3; + case 1: + return 4; + case 2: + return 2; + default: + return 5; + } + } + + protected boolean handleItem(TubeItem ti) { + return MachineLib.handleItem(super.worldObj, ti, new WorldCoord(super.xCoord, super.yCoord, super.zCoord), this.Rotation); + } + + public boolean isPoweringTo(int side) { + return false; + } + + @Override + public int getPartMaxRotation(int part, boolean sec) { + return sec ? 0 : 5; + } + + @Override + public int getPartRotation(int part, boolean sec) { + return sec ? 0 : this.Rotation; + } + + @Override + public void setPartRotation(int part, boolean sec, int rot) { + if (!sec) { + this.Rotation = rot; + this.updateBlockChange(); + } + + } + + @Override + public void onBlockPlaced(ItemStack ist, int side, EntityLivingBase ent) { + this.Rotation = this.getFacing(ent); + if (ent instanceof EntityPlayer) { + super.Owner = ((EntityPlayer)ent).getGameProfile(); + } + + } + + public Block getBlockType() { + return RedPowerMachine.blockMachine; + } + + @Override + public void writeFramePacket(NBTTagCompound tag) { + int ps = (this.Active ? 1 : 0) | (this.Powered ? 2 : 0) | (this.Delay ? 4 : 0) | (this.Charged ? 8 : 0); + tag.setByte("ps", (byte)ps); + tag.setByte("rot", (byte)this.Rotation); + } + + @Override + public void readFramePacket(NBTTagCompound tag) { + byte ps = tag.getByte("ps"); + this.Rotation = tag.getByte("rot"); + this.Active = (ps & 1) > 0; + this.Powered = (ps & 2) > 0; + this.Delay = (ps & 4) > 0; + this.Charged = (ps & 8) > 0; + } + + @Override + public void onFrameRefresh(IBlockAccess iba) { + } + + @Override + public void onFramePickup(IBlockAccess iba) { + } + + @Override + public void onFrameDrop() { + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + byte ps = data.getByte("ps"); + this.Rotation = data.getByte("rot"); + this.Active = (ps & 1) > 0; + this.Powered = (ps & 2) > 0; + this.Delay = (ps & 4) > 0; + this.Charged = (ps & 8) > 0; + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + int ps = (this.Active ? 1 : 0) | (this.Powered ? 2 : 0) | (this.Delay ? 4 : 0) | (this.Charged ? 8 : 0); + data.setByte("ps", (byte)ps); + data.setByte("rot", (byte)this.Rotation); + } + + @Override + protected void readFromPacket(NBTTagCompound tag) { + super.readFromPacket(tag); + byte ps = tag.getByte("ps"); + this.Rotation = tag.getByte("rot"); + this.Active = (ps & 1) > 0; + this.Powered = (ps & 2) > 0; + this.Delay = (ps & 4) > 0; + this.Charged = (ps & 8) > 0; + } + + @Override + protected void writeToPacket(NBTTagCompound tag) { + super.writeToPacket(tag); + int ps = (this.Active ? 1 : 0) | (this.Powered ? 2 : 0) | (this.Delay ? 4 : 0) | (this.Charged ? 8 : 0); + tag.setByte("ps", (byte)ps); + tag.setByte("rot", (byte)this.Rotation); + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/TileMachinePanel.java b/src/main/java/com/eloraam/redpower/machine/TileMachinePanel.java new file mode 100644 index 0000000..93f9e97 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/TileMachinePanel.java @@ -0,0 +1,192 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.BlockMultipart; +import com.eloraam.redpower.core.IFrameSupport; +import com.eloraam.redpower.core.IRotatable; +import com.eloraam.redpower.core.RedPowerLib; +import com.eloraam.redpower.core.TileMultipart; +import java.util.List; +import net.minecraft.block.Block; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.EnumSkyBlock; +import net.minecraft.world.IBlockAccess; + +public class TileMachinePanel extends TileMultipart implements IRotatable, IFrameSupport { + public int Rotation = 0; + public boolean Active = false; + public boolean Powered = false; + public boolean Delay = false; + public boolean Charged = false; + + public int getLightValue() { + return 0; + } + + void updateLight() { + super.worldObj.updateLightByType(EnumSkyBlock.Block, super.xCoord, super.yCoord, super.zCoord); + } + + public int getFacing(EntityLivingBase ent) { + int yawrx = (int)Math.floor((double)(ent.rotationYaw * 4.0F / 360.0F) + 0.5) & 3; + if (Math.abs(ent.posX - (double)super.xCoord) < 2.0 && Math.abs(ent.posZ - (double)super.zCoord) < 2.0) { + double p = ent.posY + 1.82 - (double)ent.yOffset - (double)super.yCoord; + if (p > 2.0) { + return 0; + } + + if (p < 0.0) { + return 1; + } + } + + switch(yawrx) { + case 0: + return 3; + case 1: + return 4; + case 2: + return 2; + default: + return 5; + } + } + + @Override + public void onBlockPlaced(ItemStack ist, int side, EntityLivingBase ent) { + this.Rotation = (int)Math.floor((double)(ent.rotationYaw * 4.0F / 360.0F) + 0.5) & 3; + RedPowerLib.updateIndirectNeighbors(super.worldObj, super.xCoord, super.yCoord, super.zCoord, super.blockType); + if (ent instanceof EntityPlayer) { + super.Owner = ((EntityPlayer)ent).getGameProfile(); + } + + } + + public Block getBlockType() { + return RedPowerMachine.blockMachinePanel; + } + + @Override + public void addHarvestContents(List ist) { + ist.add(new ItemStack(this.getBlockType(), 1, this.getExtendedID())); + } + + @Override + public void onHarvestPart(EntityPlayer player, int part, boolean willHarvest) { + this.breakBlock(willHarvest); + } + + @Override + public float getPartStrength(EntityPlayer player, int part) { + BlockMachinePanel bl = RedPowerMachine.blockMachinePanel; + return player.getBreakSpeed(bl, false, 0) / (bl.getHardness() * 30.0F); + } + + @Override + public boolean blockEmpty() { + return false; + } + + @Override + public void setPartBounds(BlockMultipart block, int part) { + block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + } + + @Override + public int getSolidPartsMask() { + return 1; + } + + @Override + public int getPartsMask() { + return 1; + } + + @Override + public int getPartMaxRotation(int part, boolean sec) { + return sec ? 0 : 3; + } + + @Override + public int getPartRotation(int part, boolean sec) { + return sec ? 0 : this.Rotation; + } + + @Override + public void setPartRotation(int part, boolean sec, int rot) { + if (!sec) { + this.Rotation = rot; + this.updateBlockChange(); + } + + } + + @Override + public void writeFramePacket(NBTTagCompound tag) { + tag.setByte("rot", (byte)this.Rotation); + int ps = (this.Active ? 1 : 0) | (this.Powered ? 2 : 0) | (this.Delay ? 4 : 0) | (this.Charged ? 8 : 0); + tag.setByte("ps", (byte)ps); + } + + @Override + public void readFramePacket(NBTTagCompound tag) { + this.Rotation = tag.getByte("rot"); + int ps = tag.getByte("ps"); + this.Active = (ps & 1) > 0; + this.Powered = (ps & 2) > 0; + this.Delay = (ps & 4) > 0; + this.Charged = (ps & 8) > 0; + } + + @Override + public void onFrameRefresh(IBlockAccess iba) { + } + + @Override + public void onFramePickup(IBlockAccess iba) { + } + + @Override + public void onFrameDrop() { + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + byte k = data.getByte("ps"); + this.Rotation = data.getByte("rot"); + this.Active = (k & 1) > 0; + this.Powered = (k & 2) > 0; + this.Delay = (k & 4) > 0; + this.Charged = (k & 8) > 0; + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + int ps = (this.Active ? 1 : 0) | (this.Powered ? 2 : 0) | (this.Delay ? 4 : 0) | (this.Charged ? 8 : 0); + data.setByte("ps", (byte)ps); + data.setByte("rot", (byte)this.Rotation); + } + + @Override + protected void readFromPacket(NBTTagCompound data) { + this.Rotation = data.getByte("rot"); + int ps = data.getByte("ps"); + this.Active = (ps & 1) > 0; + this.Powered = (ps & 2) > 0; + this.Delay = (ps & 4) > 0; + this.Charged = (ps & 8) > 0; + this.updateLight(); + } + + @Override + protected void writeToPacket(NBTTagCompound data) { + data.setByte("rot", (byte)this.Rotation); + int ps = (this.Active ? 1 : 0) | (this.Powered ? 2 : 0) | (this.Delay ? 4 : 0) | (this.Charged ? 8 : 0); + data.setByte("ps", (byte)ps); + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/TileMagTube.java b/src/main/java/com/eloraam/redpower/machine/TileMagTube.java new file mode 100644 index 0000000..f745c43 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/TileMagTube.java @@ -0,0 +1,42 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.core.BlockMultipart; + +public class TileMagTube extends TileTube { + @Override + public int getTubeConnectableSides() { + int tr = 63; + + for(int i = 0; i < 6; ++i) { + if ((super.CoverSides & 1 << i) > 0 && super.Covers[i] >> 8 < 3) { + tr &= ~(1 << i); + } + } + + return tr; + } + + public int getSpeed() { + return 128; + } + + @Override + public int getTubeConClass() { + return 18 + super.paintColor; + } + + @Override + public void setPartBounds(BlockMultipart block, int part) { + if (part == 29) { + block.setBlockBounds(0.125F, 0.125F, 0.125F, 0.875F, 0.875F, 0.875F); + } else { + super.setPartBounds(block, part); + } + + } + + @Override + public int getExtendedID() { + return 11; + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/TileManager.java b/src/main/java/com/eloraam/redpower/machine/TileManager.java new file mode 100644 index 0000000..da3a167 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/TileManager.java @@ -0,0 +1,626 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.BluePowerConductor; +import com.eloraam.redpower.core.BluePowerEndpoint; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.IBluePowerConnectable; +import com.eloraam.redpower.core.ITubeConnectable; +import com.eloraam.redpower.core.ITubeRequest; +import com.eloraam.redpower.core.MachineLib; +import com.eloraam.redpower.core.RedPowerLib; +import com.eloraam.redpower.core.TubeBuffer; +import com.eloraam.redpower.core.TubeItem; +import com.eloraam.redpower.core.TubeLib; +import com.eloraam.redpower.core.WorldCoord; +import java.util.stream.IntStream; +import net.minecraft.block.Block; +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; + +public class TileManager extends TileMachine implements IBluePowerConnectable, ISidedInventory, ITubeConnectable, ITubeRequest { + BluePowerEndpoint cond = new BluePowerEndpoint() { + @Override + public TileEntity getParent() { + return TileManager.this; + } + }; + TubeBuffer buffer = new TubeBuffer(); + protected ItemStack[] contents = new ItemStack[24]; + public int ConMask = -1; + public byte color = 0; + public byte mode = 0; + public int priority = 0; + public byte rqnum = 0; + protected MachineLib.FilterMap filterMap = null; + + @Override + public int getConnectableMask() { + return 1073741823; + } + + @Override + public int getConnectClass(int side) { + return 65; + } + + @Override + public int getCornerPowerMode() { + return 0; + } + + @Override + public BluePowerConductor getBlueConductor(int side) { + return this.cond; + } + + public int[] getAccessibleSlotsFromSide(int side) { + return side != super.Rotation && side != (super.Rotation ^ 1) ? IntStream.range(0, 24).toArray() : new int[0]; + } + + protected IInventory getConnectedInventory(boolean push) { + WorldCoord pos = new WorldCoord(this); + pos.step(super.Rotation ^ 1); + return MachineLib.getSideInventory(super.worldObj, pos, super.Rotation, push); + } + + protected void regenFilterMap() { + this.filterMap = MachineLib.makeFilterMap(this.contents, 0, 24); + } + + protected int[] getAcceptCounts() { + if (this.filterMap == null) { + this.regenFilterMap(); + } + + if (this.filterMap.size() == 0) { + return null; + } else { + IInventory inv = this.getConnectedInventory(true); + if (inv == null) { + return null; + } else { + int[] tr = MachineLib.genMatchCounts(this.filterMap); + int[] slots = IntStream.range(0, inv.getSizeInventory()).toArray(); + MachineLib.decMatchCounts(this.filterMap, tr, inv, slots); + return tr; + } + } + } + + protected int acceptCount(ItemStack ist) { + if (this.filterMap == null) { + this.regenFilterMap(); + } + + if (this.filterMap.size() == 0) { + return 0; + } else if (!this.filterMap.containsKey(ist)) { + return 0; + } else { + int[] match = this.getAcceptCounts(); + return match == null ? 0 : MachineLib.getMatchCount(this.filterMap, match, ist); + } + } + + protected void doRequest(int slot, int num) { + ItemStack rq = CoreLib.copyStack(this.contents[slot], Math.min(64, num)); + TubeItem tir = new TubeItem(0, rq); + tir.priority = (short)this.priority; + tir.color = this.color; + TubeLib.RequestRouteFinder rrf = new TubeLib.RequestRouteFinder(super.worldObj, tir); + if (rrf.find(new WorldCoord(this), 63) >= 0) { + WorldCoord wc = rrf.getResultPoint(); + ITubeRequest itr = CoreLib.getTileEntity(super.worldObj, wc, ITubeRequest.class); + itr.requestTubeItem(tir, true); + this.cond.drawPower(100.0); + this.scheduleTick(20); + } + + } + + protected void scanInventory() { + IInventory inv = this.getConnectedInventory(false); + if (inv != null) { + if (this.filterMap == null) { + this.regenFilterMap(); + } + + int[] ac = MachineLib.genMatchCounts(this.filterMap); + if (ac != null) { + for(int hrs = 0; hrs < inv.getSizeInventory(); ++hrs) { + ItemStack n = inv.getStackInSlot(hrs); + if (n != null && n.stackSize != 0) { + if (this.mode == 0) { + int mc = MachineLib.decMatchCount(this.filterMap, ac, n); + if (mc < n.stackSize) { + ItemStack rem = inv.decrStackSize(hrs, n.stackSize - mc); + this.cond.drawPower((double)(25 * n.stackSize)); + this.buffer.addNewColor(rem, this.color); + super.Active = true; + this.scheduleTick(5); + this.updateBlock(); + return; + } + } else if (this.mode == 1 && !this.filterMap.containsKey(n)) { + inv.setInventorySlotContents(hrs, null); + this.cond.drawPower((double)(25 * n.stackSize)); + this.buffer.addNewColor(n, this.color); + super.Active = true; + this.scheduleTick(5); + this.updateBlock(); + return; + } + } + } + + boolean var7 = false; + if (this.mode == 0) { + ac = this.getAcceptCounts(); + if (ac != null) { + var7 = true; + ++this.rqnum; + if (this.rqnum >= 24) { + this.rqnum = 0; + } + + for(int i = this.rqnum; i < ac.length; ++i) { + if (ac[i] != 0) { + var7 = false; + this.doRequest(i, ac[i]); + break; + } + } + + for(int i = 0; i < this.rqnum; ++i) { + if (ac[i] != 0) { + var7 = false; + this.doRequest(i, ac[i]); + break; + } + } + } + } + + if (super.Powered != var7) { + super.Powered = var7; + this.updateBlockChange(); + } + } + } + + } + + @Override + public int getTubeConnectableSides() { + return 1 << super.Rotation; + } + + @Override + public int getTubeConClass() { + return 0; + } + + @Override + public boolean canRouteItems() { + return false; + } + + private boolean handleTubeItem(TubeItem ti) { + if (this.cond.getVoltage() < 60.0) { + return false; + } else if (ti.priority > this.priority) { + return false; + } else if (ti.color != this.color && this.color != 0 && ti.color != 0) { + return false; + } else if (this.mode == 1) { + if (this.filterMap == null) { + this.regenFilterMap(); + } + + if (this.filterMap.size() == 0) { + return false; + } else if (!this.filterMap.containsKey(ti.item)) { + return false; + } else { + IInventory mc1 = this.getConnectedInventory(true); + int[] slots = IntStream.range(0, mc1.getSizeInventory()).toArray(); + if (MachineLib.addToInventoryCore(mc1, ti.item, slots, true)) { + super.Delay = true; + this.scheduleTick(5); + this.updateBlock(); + return true; + } else { + return false; + } + } + } else { + int mc = this.acceptCount(ti.item); + if (mc == 0) { + return false; + } else { + boolean tr = true; + ItemStack ist = ti.item; + if (mc < ist.stackSize) { + tr = false; + ist = ist.splitStack(mc); + } + + IInventory dest = this.getConnectedInventory(true); + int[] slots = IntStream.range(0, dest.getSizeInventory()).toArray(); + if (MachineLib.addToInventoryCore(dest, ist, slots, true)) { + super.Delay = true; + this.scheduleTick(5); + this.updateBlock(); + return tr; + } else { + return false; + } + } + } + } + + @Override + public boolean tubeItemEnter(int side, int state, TubeItem item) { + if (side != super.Rotation) { + return false; + } else if (state == 2) { + if (this.handleTubeItem(item)) { + return true; + } else { + this.buffer.addBounce(item); + super.Active = true; + this.updateBlock(); + this.scheduleTick(5); + return true; + } + } else { + return this.handleTubeItem(item); + } + } + + @Override + public boolean tubeItemCanEnter(int side, int state, TubeItem item) { + if (side != super.Rotation) { + return false; + } else if (state == 2) { + return true; + } else if (this.cond.getVoltage() < 60.0) { + return false; + } else if (item.priority > this.priority) { + return false; + } else if (item.color != this.color && this.color != 0 && item.color != 0) { + return false; + } else { + switch(this.mode) { + case 0: + return this.acceptCount(item.item) > 0; + case 1: + if (this.filterMap == null) { + this.regenFilterMap(); + } + + return this.filterMap.size() != 0 && this.filterMap.containsKey(item.item); + default: + return false; + } + } + } + + @Override + public int tubeWeight(int side, int state) { + return side == super.Rotation && state == 2 ? this.buffer.size() : 0; + } + + @Override + public boolean requestTubeItem(TubeItem rq, boolean act) { + if (super.Active) { + return false; + } else if (this.cond.getVoltage() < 60.0) { + return false; + } else { + if (this.filterMap == null) { + this.regenFilterMap(); + } + + if (this.filterMap.size() == 0) { + return false; + } else if (!this.filterMap.containsKey(rq.item)) { + return false; + } else if (rq.priority <= this.priority) { + return false; + } else if (rq.color != this.color && this.color > 0) { + return false; + } else { + IInventory inv = this.getConnectedInventory(false); + if (inv == null) { + return false; + } else { + for(int i = 0; i < inv.getSizeInventory(); ++i) { + ItemStack is2 = inv.getStackInSlot(i); + if (is2 != null && is2.stackSize != 0 && CoreLib.compareItemStack(rq.item, is2) == 0) { + if (act) { + ItemStack pull = inv.decrStackSize(i, Math.min(rq.item.stackSize, is2.stackSize)); + TubeItem ti = new TubeItem(0, pull); + this.cond.drawPower((double)(25 * ti.item.stackSize)); + ti.priority = rq.priority; + ti.color = this.color; + this.buffer.add(ti); + super.Active = true; + this.scheduleTick(5); + this.updateBlock(); + } + + return true; + } + } + + return false; + } + } + } + } + + @Override + public void updateEntity() { + super.updateEntity(); + if (!super.worldObj.isRemote) { + if (!this.isTickScheduled()) { + this.scheduleTick(10); + } + + if (this.ConMask < 0) { + this.ConMask = RedPowerLib.getConnections(super.worldObj, this, super.xCoord, super.yCoord, super.zCoord); + this.cond.recache(this.ConMask, 0); + } + + this.cond.iterate(); + this.markDirty(); + if (this.cond.Flow == 0) { + if (super.Charged) { + super.Charged = false; + this.updateBlock(); + } + } else if (!super.Charged) { + super.Charged = true; + this.updateBlock(); + } + } + + } + + @Override + public boolean isPoweringTo(int side) { + return side != (super.Rotation ^ 1) && super.Powered; + } + + @Override + public Block getBlockType() { + return RedPowerMachine.blockMachine2; + } + + @Override + public int getExtendedID() { + return 1; + } + + @Override + public boolean onBlockActivated(EntityPlayer player) { + if (player.isSneaking()) { + return false; + } else { + if (!super.worldObj.isRemote) { + player.openGui(RedPowerMachine.instance, 16, super.worldObj, super.xCoord, super.yCoord, super.zCoord); + } + + return true; + } + } + + @Override + public void onBlockNeighborChange(Block block) { + this.ConMask = -1; + } + + public void drainBuffer() { + while(!this.buffer.isEmpty()) { + TubeItem ti = this.buffer.getLast(); + if (this.handleTubeItem(ti)) { + this.buffer.pop(); + if (this.buffer.plugged) { + return; + } + } else { + if (!this.handleItem(ti)) { + this.buffer.plugged = true; + return; + } + + this.buffer.pop(); + if (this.buffer.plugged) { + return; + } + } + } + + } + + @Override + public void onTileTick() { + if (!super.worldObj.isRemote) { + boolean r = false; + if (super.Delay) { + super.Delay = false; + r = true; + } + + if (super.Active) { + if (!this.buffer.isEmpty()) { + this.drainBuffer(); + if (!this.buffer.isEmpty()) { + this.scheduleTick(10); + } else { + this.scheduleTick(5); + } + } else { + super.Active = false; + this.updateBlock(); + } + } else if (r) { + this.updateBlock(); + } else if (this.cond.getVoltage() >= 60.0) { + this.scanInventory(); + } + } + + } + + @Override + public void onBlockRemoval() { + super.onBlockRemoval(); + + for(ItemStack ist : this.contents) { + if (ist != null && ist.stackSize > 0) { + CoreLib.dropItem(super.worldObj, super.xCoord, super.yCoord, super.zCoord, ist); + } + } + + } + + public int getSizeInventory() { + return 24; + } + + public ItemStack getStackInSlot(int i) { + return this.contents[i]; + } + + public ItemStack decrStackSize(int i, int j) { + if (this.contents[i] == null) { + return null; + } else if (this.contents[i].stackSize <= j) { + ItemStack tr = this.contents[i]; + this.contents[i] = null; + this.markDirty(); + return tr; + } else { + ItemStack tr = this.contents[i].splitStack(j); + if (this.contents[i].stackSize == 0) { + this.contents[i] = null; + } + + this.markDirty(); + return tr; + } + } + + public ItemStack getStackInSlotOnClosing(int i) { + if (this.contents[i] == null) { + return null; + } else { + ItemStack ist = this.contents[i]; + this.contents[i] = null; + return ist; + } + } + + public void setInventorySlotContents(int i, ItemStack ist) { + this.contents[i] = ist; + if (ist != null && ist.stackSize > this.getInventoryStackLimit()) { + ist.stackSize = this.getInventoryStackLimit(); + } + + this.markDirty(); + } + + public String getInventoryName() { + return "tile.rpmanager.name"; + } + + public int getInventoryStackLimit() { + return 64; + } + + public boolean isUseableByPlayer(EntityPlayer player) { + return !this.isInvalid() + && super.worldObj.getTileEntity(super.xCoord, super.yCoord, super.zCoord) == this + && player.getDistanceSq((double)super.xCoord + 0.5, (double)super.yCoord + 0.5, (double)super.zCoord + 0.5) <= 64.0; + } + + public void markDirty() { + this.filterMap = null; + super.markDirty(); + } + + public void closeInventory() { + } + + public void openInventory() { + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + this.cond.readFromNBT(data); + NBTTagList items = data.getTagList("Items", 10); + this.contents = new ItemStack[this.getSizeInventory()]; + + for(int i = 0; i < items.tagCount(); ++i) { + NBTTagCompound item = items.getCompoundTagAt(i); + int j = item.getByte("Slot") & 255; + if (j >= 0 && j < this.contents.length) { + this.contents[j] = ItemStack.loadItemStackFromNBT(item); + } + } + + this.color = data.getByte("color"); + this.mode = data.getByte("mode"); + this.priority = data.getInteger("prio"); + this.rqnum = data.getByte("rqnum"); + this.buffer.readFromNBT(data); + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + this.cond.writeToNBT(data); + NBTTagList items = new NBTTagList(); + + for(int i = 0; i < this.contents.length; ++i) { + if (this.contents[i] != null) { + NBTTagCompound item = new NBTTagCompound(); + item.setByte("Slot", (byte)i); + this.contents[i].writeToNBT(item); + items.appendTag(item); + } + } + + data.setTag("Items", items); + data.setByte("color", this.color); + data.setByte("mode", this.mode); + data.setInteger("prio", this.priority); + data.setByte("rqnum", this.rqnum); + this.buffer.writeToNBT(data); + } + + public boolean canInsertItem(int slotID, ItemStack itemStack, int side) { + return side != super.Rotation && side != (super.Rotation ^ 1); + } + + public boolean canExtractItem(int slotID, ItemStack itemStack, int side) { + return side != super.Rotation && side != (super.Rotation ^ 1); + } + + public boolean hasCustomInventoryName() { + return false; + } + + public boolean isItemValidForSlot(int slotID, ItemStack itemStack) { + return true; + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/TileMotor.java b/src/main/java/com/eloraam/redpower/machine/TileMotor.java new file mode 100644 index 0000000..107f8a7 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/TileMotor.java @@ -0,0 +1,452 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.BluePowerConductor; +import com.eloraam.redpower.core.BluePowerEndpoint; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.FrameLib; +import com.eloraam.redpower.core.IBluePowerConnectable; +import com.eloraam.redpower.core.IFrameLink; +import com.eloraam.redpower.core.IFrameSupport; +import com.eloraam.redpower.core.IRotatable; +import com.eloraam.redpower.core.RedPowerLib; +import com.eloraam.redpower.core.TileExtended; +import com.eloraam.redpower.core.WorldCoord; +import java.util.ArrayList; +import java.util.List; +import net.minecraft.block.Block; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.IBlockAccess; +import net.minecraftforge.common.util.BlockSnapshot; +import net.minecraftforge.common.util.FakePlayer; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.event.ForgeEventFactory; + +public class TileMotor extends TileExtended implements IBluePowerConnectable, IRotatable, IFrameLink, IFrameSupport { + BluePowerEndpoint cond = new BluePowerEndpoint() { + @Override + public TileEntity getParent() { + return TileMotor.this; + } + }; + public int Rotation = 0; + public int MoveDir = 4; + public int MovePos = -1; + public boolean Powered = false; + public boolean Active = false; + public boolean Charged = false; + public int LinkSize = -1; + public int ConMask = -1; + + @Override + public int getConnectableMask() { + return 1073741823 ^ RedPowerLib.getConDirMask(this.Rotation >> 2 ^ 1); + } + + @Override + public int getConnectClass(int side) { + return 65; + } + + @Override + public int getCornerPowerMode() { + return 0; + } + + @Override + public WorldCoord getFrameLinkset() { + return null; + } + + @Override + public BluePowerConductor getBlueConductor(int side) { + return this.cond; + } + + @Override + public int getPartMaxRotation(int part, boolean sec) { + return this.MovePos >= 0 ? 0 : (sec ? 5 : 3); + } + + @Override + public int getPartRotation(int part, boolean sec) { + return sec ? this.Rotation >> 2 : this.Rotation & 3; + } + + @Override + public void setPartRotation(int part, boolean sec, int rot) { + if (this.MovePos < 0) { + if (sec) { + this.Rotation = this.Rotation & 3 | rot << 2; + } else { + this.Rotation = this.Rotation & -4 | rot & 3; + } + + this.updateBlockChange(); + } + + } + + @Override + public boolean isFrameMoving() { + return false; + } + + @Override + public boolean canFrameConnectIn(int dir) { + return dir != (this.Rotation >> 2 ^ 1); + } + + @Override + public boolean canFrameConnectOut(int dir) { + return dir == (this.Rotation >> 2 ^ 1); + } + + @Override + public int getExtendedID() { + return 7; + } + + public Block getBlockType() { + return RedPowerMachine.blockMachine; + } + + @Override + public void updateEntity() { + super.updateEntity(); + if (this.MovePos >= 0 && this.MovePos < 16) { + ++this.MovePos; + this.markDirty(); + } + + if (!super.worldObj.isRemote) { + if (this.MovePos >= 0) { + this.cond.drawPower((double)(100 + 10 * this.LinkSize)); + } + + if (this.MovePos >= 16) { + this.dropFrame(true); + this.MovePos = -1; + this.Active = false; + this.updateBlock(); + } + + if (this.ConMask < 0) { + this.ConMask = RedPowerLib.getConnections(super.worldObj, this, super.xCoord, super.yCoord, super.zCoord); + this.cond.recache(this.ConMask, 0); + } + + this.cond.iterate(); + this.markDirty(); + if (this.MovePos < 0) { + if (this.cond.getVoltage() < 60.0) { + if (this.Charged && this.cond.Flow == 0) { + this.Charged = false; + this.updateBlock(); + } + } else if (!this.Charged) { + this.Charged = true; + this.updateBlock(); + } + } + } + + } + + private int getDriveSide() { + short n; + switch(this.Rotation >> 2) { + case 0: + n = 13604; + break; + case 1: + n = 13349; + break; + case 2: + n = 20800; + break; + case 3: + n = 16720; + break; + case 4: + n = 8496; + break; + default: + n = 12576; + } + + int n1 = n >> ((this.Rotation & 3) << 2); + return n1 & 7; + } + + private void pickFrame() { + this.MoveDir = this.getDriveSide(); + WorldCoord wc = new WorldCoord(this); + FrameLib.FrameSolver fs = new FrameLib.FrameSolver(super.worldObj, wc.coordStep(this.Rotation >> 2 ^ 1), wc, this.MoveDir); + if (fs.solveLimit(RedPowerMachine.FrameLinkSize) && fs.addMoved()) { + this.LinkSize = fs.getFrameSet().size(); + this.MovePos = 0; + this.Active = true; + this.updateBlock(); + + for(WorldCoord sp : fs.getClearSet()) { + super.worldObj.setBlockToAir(sp.x, sp.y, sp.z); + } + + for(WorldCoord sp : fs.getFrameSet()) { + Block tfm = super.worldObj.getBlock(sp.x, sp.y, sp.z); + int ifs = super.worldObj.getBlockMetadata(sp.x, sp.y, sp.z); + TileEntity te = super.worldObj.getTileEntity(sp.x, sp.y, sp.z); + if (te != null) { + super.worldObj.removeTileEntity(sp.x, sp.y, sp.z); + } + + boolean ir = super.worldObj.isRemote; + super.worldObj.isRemote = true; + super.worldObj.setBlock(sp.x, sp.y, sp.z, RedPowerMachine.blockFrame, 1, 2); + super.worldObj.isRemote = ir; + TileFrameMoving tfm1 = CoreLib.getTileEntity(super.worldObj, sp, TileFrameMoving.class); + if (tfm1 != null) { + tfm1.setContents(tfm, ifs, super.xCoord, super.yCoord, super.zCoord, te); + } + } + + for(WorldCoord sp : fs.getFrameSet()) { + super.worldObj.markBlockForUpdate(sp.x, sp.y, sp.z); + CoreLib.markBlockDirty(super.worldObj, sp.x, sp.y, sp.z); + TileFrameMoving tfm2 = CoreLib.getTileEntity(super.worldObj, sp, TileFrameMoving.class); + if (tfm2 != null && tfm2.movingTileEntity instanceof IFrameSupport) { + IFrameSupport ifs1 = (IFrameSupport)tfm2.movingTileEntity; + ifs1.onFramePickup(tfm2.getFrameBlockAccess()); + } + } + } + + } + + private void dropFrame(boolean fw) { + WorldCoord wc = new WorldCoord(this); + FrameLib.FrameSolver fs = new FrameLib.FrameSolver(super.worldObj, wc.coordStep(this.Rotation >> 2 ^ 1), wc, -1); + if (fs.solve()) { + this.LinkSize = 0; + fs.sort(this.MoveDir); + List snapshots = new ArrayList(); + FakePlayer player = CoreLib.getRedpowerPlayer(super.worldObj, super.xCoord, super.yCoord, super.zCoord, this.Rotation >> 2, super.Owner); + + for(WorldCoord sp : fs.getFrameSet()) { + TileFrameMoving ifs = CoreLib.getTileEntity(super.worldObj, sp, TileFrameMoving.class); + if (ifs != null) { + WorldCoord s2 = sp.copy(); + if (fw) { + s2.step(this.MoveDir); + } + + if (!CoreLib.hasEditPermission(player, s2.x, s2.y, s2.z)) { + return; + } + + if (ifs.movingTileEntity != null) { + NBTTagCompound compound = new NBTTagCompound(); + ifs.movingTileEntity.writeToNBT(compound); + snapshots.add(new BlockSnapshot(super.worldObj, s2.x, s2.y, s2.z, ifs.movingBlock, ifs.movingBlockMeta, compound)); + } else { + snapshots.add(new BlockSnapshot(super.worldObj, sp.x, sp.y, sp.z, ifs.movingBlock, ifs.movingBlockMeta)); + } + } + } + + if (!snapshots.isEmpty() + && !ForgeEventFactory.onPlayerMultiBlockPlace(player, snapshots, ForgeDirection.getOrientation(this.Rotation >> 2 ^ 1)).isCanceled()) { + for(WorldCoord sp : fs.getFrameSet()) { + TileFrameMoving ifs = CoreLib.getTileEntity(super.worldObj, sp, TileFrameMoving.class); + if (ifs != null) { + ifs.pushEntities(this); + WorldCoord s2 = sp.copy(); + if (fw) { + s2.step(this.MoveDir); + } + + if (ifs.movingBlock != Blocks.air) { + boolean ir = super.worldObj.isRemote; + super.worldObj.isRemote = true; + super.worldObj.setBlock(s2.x, s2.y, s2.z, ifs.movingBlock, ifs.movingBlockMeta, 2); + super.worldObj.isRemote = ir; + if (ifs.movingTileEntity != null) { + ifs.movingTileEntity.xCoord = s2.x; + ifs.movingTileEntity.yCoord = s2.y; + ifs.movingTileEntity.zCoord = s2.z; + ifs.movingTileEntity.validate(); + super.worldObj.setTileEntity(s2.x, s2.y, s2.z, ifs.movingTileEntity); + } + } + + if (fw) { + super.worldObj.setBlockToAir(sp.x, sp.y, sp.z); + } + } + } + + for(WorldCoord sp : fs.getFrameSet()) { + IFrameSupport frameSupport = CoreLib.getTileEntity(super.worldObj, sp, IFrameSupport.class); + if (frameSupport != null) { + frameSupport.onFrameDrop(); + } + + super.worldObj.markBlockForUpdate(sp.x, sp.y, sp.z); + CoreLib.markBlockDirty(super.worldObj, sp.x, sp.y, sp.z); + RedPowerLib.updateIndirectNeighbors(super.worldObj, sp.x, sp.y, sp.z, super.worldObj.getBlock(sp.x, sp.y, sp.z)); + } + } + } + + } + + float getMoveScaled() { + return (float)this.MovePos / 16.0F; + } + + @Override + public void onBlockRemoval() { + if (this.MovePos >= 0) { + this.Active = false; + this.dropFrame(false); + } + + this.MovePos = -1; + } + + @Override + public void onBlockNeighborChange(Block block) { + this.ConMask = -1; + if (RedPowerLib.isPowered(super.worldObj, super.xCoord, super.yCoord, super.zCoord, 16777215, 63)) { + if (this.Charged && !this.Powered && this.MovePos < 0) { + this.Powered = true; + this.updateBlockChange(); + if (this.Powered) { + this.pickFrame(); + } + } + } else if (this.Powered) { + this.Powered = false; + this.updateBlockChange(); + } + + } + + public int getFacing(EntityLivingBase ent) { + int yawrx = (int)Math.floor((double)(ent.rotationYaw * 4.0F / 360.0F) + 0.5) & 3; + if (Math.abs(ent.posX - (double)super.xCoord) < 2.0 && Math.abs(ent.posZ - (double)super.zCoord) < 2.0) { + double p = ent.posY + 1.82 - (double)ent.yOffset - (double)super.yCoord; + if (p > 2.0) { + return 0 | yawrx; + } + + if (p < 0.0) { + return 4 | yawrx; + } + } + + switch(yawrx) { + case 0: + return 12; + case 1: + return 16; + case 2: + return 8; + default: + return 20; + } + } + + @Override + public void onBlockPlaced(ItemStack ist, int side, EntityLivingBase ent) { + this.Rotation = this.getFacing(ent); + if (ent instanceof EntityPlayer) { + super.Owner = ((EntityPlayer)ent).getGameProfile(); + } + + } + + @Override + public void writeFramePacket(NBTTagCompound tag) { + tag.setByte("rot", (byte)this.Rotation); + tag.setByte("mdir", (byte)this.MoveDir); + tag.setByte("mpos", (byte)(this.MovePos + 1)); + int ps = (this.Powered ? 1 : 0) | (this.Active ? 2 : 0) | (this.Charged ? 4 : 0); + tag.setByte("ps", (byte)ps); + } + + @Override + public void readFramePacket(NBTTagCompound tag) { + this.Rotation = tag.getByte("rot"); + this.MoveDir = tag.getByte("mdir"); + this.MovePos = tag.getByte("mpos") - 1; + int ps = tag.getByte("ps"); + this.Powered = (ps & 1) > 0; + this.Active = (ps & 2) > 0; + this.Charged = (ps & 4) > 0; + } + + @Override + public void onFrameRefresh(IBlockAccess iba) { + } + + @Override + public void onFramePickup(IBlockAccess iba) { + } + + @Override + public void onFrameDrop() { + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + this.Rotation = data.getByte("rot"); + this.MoveDir = data.getByte("mdir"); + this.MovePos = data.getByte("mpos"); + this.LinkSize = data.getInteger("links"); + this.cond.readFromNBT(data); + byte k = data.getByte("ps"); + this.Powered = (k & 1) > 0; + this.Active = (k & 2) > 0; + this.Charged = (k & 4) > 0; + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + data.setByte("rot", (byte)this.Rotation); + data.setByte("mdir", (byte)this.MoveDir); + data.setByte("mpos", (byte)this.MovePos); + data.setInteger("links", this.LinkSize); + this.cond.writeToNBT(data); + int ps = (this.Powered ? 1 : 0) | (this.Active ? 2 : 0) | (this.Charged ? 4 : 0); + data.setByte("ps", (byte)ps); + } + + @Override + protected void readFromPacket(NBTTagCompound tag) { + this.Rotation = tag.getByte("rot"); + this.MoveDir = tag.getByte("mdir"); + this.MovePos = tag.getByte("mpos") - 1; + int ps = tag.getByte("ps"); + this.Powered = (ps & 1) > 0; + this.Active = (ps & 2) > 0; + this.Charged = (ps & 4) > 0; + } + + @Override + protected void writeToPacket(NBTTagCompound tag) { + tag.setByte("rot", (byte)this.Rotation); + tag.setByte("mdir", (byte)this.MoveDir); + tag.setByte("mpos", (byte)(this.MovePos + 1)); + int ps = (this.Powered ? 1 : 0) | (this.Active ? 2 : 0) | (this.Charged ? 4 : 0); + tag.setByte("ps", (byte)ps); + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/TilePipe.java b/src/main/java/com/eloraam/redpower/machine/TilePipe.java new file mode 100644 index 0000000..27eff45 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/TilePipe.java @@ -0,0 +1,295 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerBase; +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.BlockMultipart; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.FluidBuffer; +import com.eloraam.redpower.core.IPipeConnectable; +import com.eloraam.redpower.core.PipeLib; +import com.eloraam.redpower.core.TileCovered; +import com.eloraam.redpower.core.WorldCoord; +import java.util.List; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.IBlockAccess; + +public class TilePipe extends TileCovered implements IPipeConnectable { + public FluidBuffer pipebuf = new FluidBuffer() { + @Override + public TileEntity getParent() { + return TilePipe.this; + } + + @Override + public void onChange() { + TilePipe.this.markDirty(); + } + }; + public int Pressure = 0; + public int ConCache = -1; + public int Flanges = -1; + private boolean hasChanged = false; + + @Override + public int getPipeConnectableSides() { + int tr = 63; + + for(int i = 0; i < 6; ++i) { + if ((super.CoverSides & 1 << i) > 0 && super.Covers[i] >> 8 < 3) { + tr &= ~(1 << i); + } + } + + return tr; + } + + @Override + public int getPipeFlangeSides() { + this.cacheCon(); + return this.ConCache != 3 && this.ConCache != 12 && this.ConCache != 48 ? (Integer.bitCount(this.ConCache) == 1 ? 0 : this.ConCache) : 0; + } + + @Override + public int getPipePressure(int side) { + return this.Pressure; + } + + @Override + public FluidBuffer getPipeBuffer(int side) { + return this.pipebuf; + } + + @Override + public boolean tryAddCover(int side, int cover) { + if (!super.tryAddCover(side, cover)) { + return false; + } else { + this.uncache(); + this.updateBlockChange(); + return true; + } + } + + @Override + public int tryRemoveCover(int side) { + int tr = super.tryRemoveCover(side); + if (tr < 0) { + return -1; + } else { + this.uncache(); + this.updateBlockChange(); + return tr; + } + } + + @Override + public boolean canUpdate() { + return true; + } + + @Override + public void updateEntity() { + super.updateEntity(); + if (!super.worldObj.isRemote) { + int pr = 0; + int d = 0; + int min = 0; + int max = 0; + this.cacheCon(); + + for(int i = 0; i < 6; ++i) { + if ((this.ConCache & 1 << i) != 0) { + WorldCoord wc = new WorldCoord(this); + wc.step(i); + Integer p = PipeLib.getPressure(super.worldObj, wc, i ^ 1); + if (p != null) { + min = Math.min(p, min); + max = Math.max(p, max); + pr += p; + ++d; + } + } + } + + if (d == 0) { + this.Pressure = 0; + } else { + if (min < 0) { + ++min; + } + + if (max > 0) { + --max; + } + + this.Pressure = Math.max(min, Math.min(max, pr / d + Integer.signum(pr))); + } + + PipeLib.movePipeLiquid(super.worldObj, this, new WorldCoord(this), this.ConCache); + this.markDirty(); + if ((super.worldObj.getWorldTime() & 16L) == 0L) { + this.hasChanged = true; + this.markForUpdate(); + this.markDirty(); + } + } + + } + + public void uncache() { + this.ConCache = -1; + this.Flanges = -1; + } + + public void cacheCon() { + if (this.ConCache < 0) { + this.ConCache = PipeLib.getConnections(super.worldObj, super.xCoord, super.yCoord, super.zCoord); + } + + } + + public void cacheFlange() { + if (this.Flanges < 0) { + this.cacheCon(); + this.Flanges = this.getPipeFlangeSides(); + this.Flanges |= PipeLib.getFlanges(super.worldObj, new WorldCoord(this), this.ConCache); + } + + } + + @Override + public void onFrameRefresh(IBlockAccess iba) { + if (this.ConCache < 0) { + this.ConCache = PipeLib.getConnections(iba, super.xCoord, super.yCoord, super.zCoord); + } + + this.Flanges = 0; + } + + @Override + public Block getBlockType() { + return RedPowerBase.blockMicro; + } + + @Override + public int getExtendedID() { + return 7; + } + + @Override + public void onBlockNeighborChange(Block block) { + int pf = this.Flanges; + int pc = this.ConCache; + this.uncache(); + this.cacheFlange(); + if (this.Flanges != pf || pc != this.ConCache) { + this.updateBlock(); + } + + } + + @Override + public int getPartsMask() { + return super.CoverSides | 536870912; + } + + @Override + public int getSolidPartsMask() { + return super.CoverSides | 536870912; + } + + @Override + public boolean blockEmpty() { + return false; + } + + @Override + public void onHarvestPart(EntityPlayer player, int part, boolean willHarvest) { + if (part == 29) { + if (willHarvest) { + CoreLib.dropItem(super.worldObj, super.xCoord, super.yCoord, super.zCoord, new ItemStack(RedPowerBase.blockMicro, 1, this.getExtendedID() << 8)); + } + + if (super.CoverSides > 0) { + this.replaceWithCovers(); + } else { + this.deleteBlock(); + } + + this.uncache(); + this.updateBlockChange(); + } else { + super.onHarvestPart(player, part, willHarvest); + } + + } + + @Override + public void addHarvestContents(List ist) { + super.addHarvestContents(ist); + ist.add(new ItemStack(RedPowerBase.blockMicro, 1, this.getExtendedID() << 8)); + } + + @Override + public float getPartStrength(EntityPlayer player, int part) { + BlockMachine bl = RedPowerMachine.blockMachine; + return part == 29 + ? player.getBreakSpeed(bl, false, 0, super.xCoord, super.yCoord, super.zCoord) / (bl.getHardness() * 30.0F) + : super.getPartStrength(player, part); + } + + @Override + public void setPartBounds(BlockMultipart block, int part) { + if (part == 29) { + block.setBlockBounds(0.25F, 0.25F, 0.25F, 0.75F, 0.75F, 0.75F); + } else { + super.setPartBounds(block, part); + } + + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + this.Pressure = data.getInteger("psi"); + this.pipebuf.readFromNBT(data, "buf"); + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + data.setInteger("psi", this.Pressure); + this.pipebuf.writeToNBT(data, "buf"); + } + + @Override + protected void readFromPacket(NBTTagCompound data) { + this.pipebuf.readFromPacket(data); + if (data.hasKey("itm")) { + this.ConCache = -1; + this.Flanges = -1; + super.readFromPacket(data); + } + + } + + @Override + protected void writeToPacket(NBTTagCompound data) { + this.pipebuf.writeToPacket(data); + if (this.hasChanged) { + this.hasChanged = false; + data.setBoolean("itm", true); + super.writeToPacket(data); + } + + } + + @Override + protected ItemStack getBasePickStack() { + return new ItemStack(RedPowerBase.blockMicro, 1, this.getExtendedID() << 8); + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/TilePump.java b/src/main/java/com/eloraam/redpower/machine/TilePump.java new file mode 100644 index 0000000..ad33956 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/TilePump.java @@ -0,0 +1,219 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.core.BluePowerConductor; +import com.eloraam.redpower.core.BluePowerEndpoint; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.FluidBuffer; +import com.eloraam.redpower.core.IBluePowerConnectable; +import com.eloraam.redpower.core.IPipeConnectable; +import com.eloraam.redpower.core.PipeLib; +import com.eloraam.redpower.core.RedPowerLib; +import com.eloraam.redpower.core.WorldCoord; +import net.minecraft.block.Block; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; + +public class TilePump extends TileMachinePanel implements IPipeConnectable, IBluePowerConnectable { + private TilePump.PumpBuffer inbuf = new TilePump.PumpBuffer(); + private TilePump.PumpBuffer outbuf = new TilePump.PumpBuffer(); + BluePowerEndpoint cond = new BluePowerEndpoint() { + @Override + public TileEntity getParent() { + return TilePump.this; + } + }; + public int ConMask = -1; + public byte PumpTick = 0; + + @Override + public int getPipeConnectableSides() { + return 12 << (((super.Rotation ^ 1) & 1) << 1); + } + + @Override + public int getPipeFlangeSides() { + return 12 << (((super.Rotation ^ 1) & 1) << 1); + } + + @Override + public int getPipePressure(int side) { + int rt = CoreLib.rotToSide(super.Rotation); + return !super.Active ? 0 : (side == rt ? 1000 : (side == ((rt ^ 1) & 0xFF) ? -1000 : 0)); + } + + @Override + public FluidBuffer getPipeBuffer(int side) { + int rt = CoreLib.rotToSide(super.Rotation); + return side == rt ? this.outbuf : (side == ((rt ^ 1) & 0xFF) ? this.inbuf : null); + } + + @Override + public int getConnectableMask() { + return 3 << ((super.Rotation & 1) << 1) | 17895680; + } + + @Override + public int getConnectClass(int side) { + return 65; + } + + @Override + public int getCornerPowerMode() { + return 0; + } + + @Override + public BluePowerConductor getBlueConductor(int side) { + return this.cond; + } + + @Override + public int getExtendedID() { + return 1; + } + + @Override + public void onBlockPlaced(ItemStack ist, int side, EntityLivingBase ent) { + super.Rotation = (int)Math.floor((double)(ent.rotationYaw * 4.0F / 360.0F) + 2.5) & 3; + if (ent instanceof EntityPlayer) { + super.Owner = ((EntityPlayer)ent).getGameProfile(); + } + + } + + @Override + public void onBlockNeighborChange(Block block) { + this.ConMask = -1; + if (RedPowerLib.isPowered(super.worldObj, super.xCoord, super.yCoord, super.zCoord, 16777215, 63)) { + if (!super.Powered) { + super.Powered = true; + this.markDirty(); + } + } else { + super.Powered = false; + this.markDirty(); + } + + } + + private void pumpFluid() { + if (this.inbuf.Type != null) { + int lv = Math.min(this.inbuf.getLevel(), this.outbuf.getMaxLevel() - this.outbuf.getLevel()); + lv = Math.min(lv, this.inbuf.getLevel() + this.inbuf.Delta); + if (lv > 0 && (this.inbuf.Type == this.outbuf.Type || this.outbuf.Type == null)) { + this.outbuf.addLevel(this.inbuf.Type, lv); + this.inbuf.addLevel(this.inbuf.Type, -lv); + } + } + + } + + @Override + public void updateEntity() { + super.updateEntity(); + if (super.worldObj.isRemote) { + if (super.Active) { + ++this.PumpTick; + if (this.PumpTick >= 16) { + this.PumpTick = 0; + } + } + } else { + if (this.ConMask < 0) { + this.ConMask = RedPowerLib.getConnections(super.worldObj, this, super.xCoord, super.yCoord, super.zCoord); + this.cond.recache(this.ConMask, 0); + } + + this.cond.iterate(); + this.markDirty(); + int rt = CoreLib.rotToSide(super.Rotation); + PipeLib.movePipeLiquid(super.worldObj, this, new WorldCoord(this), 3 << (rt & -2)); + boolean act = super.Active; + if (super.Active) { + ++this.PumpTick; + if (this.PumpTick == 8) { + this.cond.drawPower(10000.0); + this.pumpFluid(); + } + + if (this.PumpTick >= 16) { + this.PumpTick = 0; + super.Active = false; + } + + this.cond.drawPower(200.0); + } + + if (this.cond.getVoltage() < 60.0) { + if (super.Charged && this.cond.Flow == 0) { + super.Charged = false; + this.updateBlock(); + } + } else { + if (!super.Charged) { + super.Charged = true; + this.updateBlock(); + } + + if (super.Charged && super.Powered) { + super.Active = true; + } + + if (super.Active != act) { + this.updateBlock(); + } + } + } + + } + + @Override + public void onTileTick() { + if (!super.worldObj.isRemote && !super.Powered) { + super.Active = false; + this.updateBlock(); + } + + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + this.cond.readFromNBT(data); + this.inbuf.readFromNBT(data, "inb"); + this.outbuf.readFromNBT(data, "outb"); + this.PumpTick = data.getByte("ptk"); + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + this.cond.writeToNBT(data); + this.inbuf.writeToNBT(data, "inb"); + this.outbuf.writeToNBT(data, "outb"); + data.setByte("ptk", this.PumpTick); + } + + private class PumpBuffer extends FluidBuffer { + private PumpBuffer() { + } + + @Override + public TileEntity getParent() { + return TilePump.this; + } + + @Override + public void onChange() { + TilePump.this.markDirty(); + } + + @Override + public int getMaxLevel() { + return 1000; + } + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/TileRedstoneTube.java b/src/main/java/com/eloraam/redpower/machine/TileRedstoneTube.java new file mode 100644 index 0000000..8ced477 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/TileRedstoneTube.java @@ -0,0 +1,163 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.IRedPowerWiring; +import com.eloraam.redpower.core.RedPowerLib; +import net.minecraft.block.Block; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.IBlockAccess; + +public class TileRedstoneTube extends TileTube implements IRedPowerWiring { + public short PowerState = 0; + public int ConMask = -1; + + @Override + public int getConnectableMask() { + int tr = 63; + + for(int i = 0; i < 6; ++i) { + if ((super.CoverSides & 1 << i) > 0 && super.Covers[i] >> 8 < 3) { + tr &= ~(1 << i); + } + } + + return tr << 24; + } + + @Override + public int getConnectionMask() { + if (this.ConMask >= 0) { + return this.ConMask; + } else { + this.ConMask = RedPowerLib.getConnections(super.worldObj, this, super.xCoord, super.yCoord, super.zCoord); + return this.ConMask; + } + } + + @Override + public int getExtConnectionMask() { + return 0; + } + + @Override + public int getCornerPowerMode() { + return 0; + } + + @Override + public void onFrameRefresh(IBlockAccess iba) { + if (this.ConMask < 0) { + this.ConMask = RedPowerLib.getConnections(iba, this, super.xCoord, super.yCoord, super.zCoord); + } + + } + + @Override + public int getConnectClass(int side) { + return 1; + } + + @Override + public int getCurrentStrength(int cons, int ch) { + return ch != 0 ? -1 : ((cons & this.getConnectableMask()) == 0 ? -1 : this.PowerState); + } + + @Override + public int scanPoweringStrength(int cons, int ch) { + return ch != 0 ? 0 : (RedPowerLib.isPowered(super.worldObj, super.xCoord, super.yCoord, super.zCoord, cons, this.getConnectionMask()) ? 255 : 0); + } + + @Override + public void updateCurrentStrength() { + this.PowerState = (short)RedPowerLib.updateBlockCurrentStrength(super.worldObj, this, super.xCoord, super.yCoord, super.zCoord, 1073741823, 1); + CoreLib.markBlockDirty(super.worldObj, super.xCoord, super.yCoord, super.zCoord); + } + + @Override + public int getPoweringMask(int ch) { + return ch == 0 && this.PowerState != 0 ? this.getConnectableMask() : 0; + } + + @Override + public void onBlockNeighborChange(Block block) { + super.onBlockNeighborChange(block); + if (this.ConMask >= 0) { + this.markForUpdate(); + } + + this.ConMask = -1; + RedPowerLib.updateCurrent(super.worldObj, super.xCoord, super.yCoord, super.zCoord); + } + + @Override + public int getExtendedID() { + return 9; + } + + @Override + public boolean isBlockWeakPoweringTo(int side) { + if (!RedPowerLib.isSearching() && (this.getConnectionMask() & 16777216 << (side ^ 1)) != 0) { + if (RedPowerLib.isBlockRedstone(super.worldObj, super.xCoord, super.yCoord, super.zCoord, side ^ 1)) { + if (this.PowerState > 15) { + return true; + } + } else if (this.PowerState > 0) { + return true; + } + } + + return false; + } + + @Override + public boolean tryAddCover(int side, int cover) { + if (!this.canAddCover(side, cover)) { + return false; + } else { + super.CoverSides |= 1 << side; + super.Covers[side] = (short)cover; + this.ConMask = -1; + this.updateBlockChange(); + return true; + } + } + + @Override + public int tryRemoveCover(int side) { + if ((super.CoverSides & 1 << side) == 0) { + return -1; + } else { + super.CoverSides &= ~(1 << side); + short tr = super.Covers[side]; + super.Covers[side] = 0; + this.ConMask = -1; + this.updateBlockChange(); + return tr; + } + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + this.PowerState = (short)(data.getByte("pwr") & 255); + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + data.setByte("pwr", (byte)this.PowerState); + } + + @Override + protected void readFromPacket(NBTTagCompound data) { + this.PowerState = (short)(data.getByte("pwr") & 255); + this.ConMask = -1; + super.readFromPacket(data); + } + + @Override + protected void writeToPacket(NBTTagCompound data) { + data.setByte("pwr", (byte)this.PowerState); + super.writeToPacket(data); + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/TileRegulator.java b/src/main/java/com/eloraam/redpower/machine/TileRegulator.java new file mode 100644 index 0000000..5b1222a --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/TileRegulator.java @@ -0,0 +1,440 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.ITubeConnectable; +import com.eloraam.redpower.core.MachineLib; +import com.eloraam.redpower.core.TubeBuffer; +import com.eloraam.redpower.core.TubeItem; +import com.eloraam.redpower.core.WorldCoord; +import java.util.stream.IntStream; +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; + +public class TileRegulator extends TileMachine implements ITubeConnectable, ISidedInventory { + private TubeBuffer buffer = new TubeBuffer(); + public byte mode = 0; + protected ItemStack[] contents = new ItemStack[27]; + protected MachineLib.FilterMap inputMap = null; + protected MachineLib.FilterMap outputMap = null; + public int color = 0; + + private void regenFilterMap() { + this.inputMap = MachineLib.makeFilterMap(this.contents, 0, 9); + this.outputMap = MachineLib.makeFilterMap(this.contents, 18, 9); + } + + @Override + public int getTubeConnectableSides() { + return 3 << (super.Rotation & -2); + } + + @Override + public int getTubeConClass() { + return 0; + } + + @Override + public boolean canRouteItems() { + return false; + } + + @Override + public boolean tubeItemEnter(int side, int state, TubeItem item) { + if (side == super.Rotation && state == 2) { + this.buffer.addBounce(item); + super.Active = true; + this.updateBlock(); + this.scheduleTick(5); + return true; + } else if (side == (super.Rotation ^ 1) && state == 1) { + int ic = this.inCount(item.item); + if (ic == 0) { + return false; + } else { + boolean tr = true; + ItemStack ist = item.item; + if (ic < ist.stackSize) { + tr = false; + ist = ist.splitStack(ic); + } + + if (MachineLib.addToInventoryCore(this, ist, IntStream.range(0, 9).toArray(), true)) { + this.markDirty(); + this.scheduleTick(2); + this.markDirty(); + return tr; + } else { + this.markDirty(); + return false; + } + } + } else { + return false; + } + } + + @Override + public boolean tubeItemCanEnter(int side, int state, TubeItem item) { + return side == super.Rotation && state == 2 + || side == (super.Rotation ^ 1) + && state == 1 + && this.inCount(item.item) != 0 + && MachineLib.addToInventoryCore(this, item.item, IntStream.range(0, 9).toArray(), false); + } + + @Override + public int tubeWeight(int side, int state) { + return side == super.Rotation && state == 2 ? this.buffer.size() : 0; + } + + public int[] getAccessibleSlotsFromSide(int side) { + return side != super.Rotation && side != (super.Rotation ^ 1) ? new int[]{9} : new int[0]; + } + + public void drainBuffer() { + while(!this.buffer.isEmpty()) { + TubeItem ti = this.buffer.getLast(); + if (!this.handleItem(ti)) { + this.buffer.plugged = true; + return; + } + + this.buffer.pop(); + if (this.buffer.plugged) { + return; + } + } + + } + + @Override + public void updateEntity() { + super.updateEntity(); + if (!super.worldObj.isRemote && !this.isTickScheduled()) { + this.scheduleTick(10); + } + + } + + @Override + public boolean isPoweringTo(int side) { + return side != (super.Rotation ^ 1) && super.Powered; + } + + @Override + public boolean onBlockActivated(EntityPlayer player) { + if (player.isSneaking()) { + return false; + } else { + if (!super.worldObj.isRemote) { + player.openGui(RedPowerMachine.instance, 9, super.worldObj, super.xCoord, super.yCoord, super.zCoord); + } + + return true; + } + } + + @Override + public int getExtendedID() { + return 10; + } + + @Override + public void onBlockRemoval() { + this.buffer.onRemove(this); + + for(int i = 0; i < 27; ++i) { + ItemStack ist = this.contents[i]; + if (ist != null && ist.stackSize > 0) { + CoreLib.dropItem(super.worldObj, super.xCoord, super.yCoord, super.zCoord, ist); + } + } + + } + + private int[] scanInput() { + if (this.inputMap == null) { + this.regenFilterMap(); + } + + if (this.inputMap.size() == 0) { + return null; + } else { + int[] mc = MachineLib.genMatchCounts(this.inputMap); + MachineLib.decMatchCounts(this.inputMap, mc, this, IntStream.range(0, 9).toArray()); + return mc; + } + } + + private int inCount(ItemStack ist) { + if (this.inputMap == null) { + this.regenFilterMap(); + } + + if (this.inputMap.size() == 0) { + return 0; + } else if (!this.inputMap.containsKey(ist)) { + return 0; + } else { + int[] mc = MachineLib.genMatchCounts(this.inputMap); + MachineLib.decMatchCounts(this.inputMap, mc, this, IntStream.range(0, 9).toArray()); + return MachineLib.decMatchCount(this.inputMap, mc, ist); + } + } + + private int[] scanOutput() { + WorldCoord wc = new WorldCoord(this); + wc.step(super.Rotation); + IInventory inv = MachineLib.getInventory(super.worldObj, wc); + if (inv == null) { + return null; + } else { + int[] slots; + if (inv instanceof ISidedInventory) { + ISidedInventory mc = (ISidedInventory)inv; + slots = mc.getAccessibleSlotsFromSide((super.Rotation ^ 1) & 0xFF); + } else { + slots = IntStream.range(0, inv.getSizeInventory()).toArray(); + } + + if (this.outputMap == null) { + this.regenFilterMap(); + } + + if (this.outputMap.size() == 0) { + return null; + } else { + int[] mc1 = MachineLib.genMatchCounts(this.outputMap); + MachineLib.decMatchCounts(this.outputMap, mc1, inv, slots); + return mc1; + } + } + } + + private void handleTransfer(int[] omc) { + if (this.mode != 0 && omc != null) { + boolean var7 = false; + + for(int var8 = 0; var8 < 9; ++var8) { + while(omc[var8] > 0) { + ItemStack ist = this.contents[18 + var8].copy(); + int ss = Math.min(ist.stackSize, omc[var8]); + omc[var8] -= ss; + ist.stackSize = ss; + ItemStack is2 = MachineLib.collectOneStack(this, IntStream.range(0, 9).toArray(), ist); + if (is2 != null) { + this.buffer.addNewColor(is2, this.color); + var7 = true; + } + } + } + + if (!var7) { + return; + } + } else { + for(int ch = 0; ch < 9; ++ch) { + ItemStack i = this.contents[9 + ch]; + if (i != null && i.stackSize != 0) { + this.buffer.addNewColor(i, this.color); + this.contents[9 + ch] = null; + } + } + } + + this.markDirty(); + super.Powered = true; + super.Active = true; + this.updateBlockChange(); + this.drainBuffer(); + if (!this.buffer.isEmpty()) { + this.scheduleTick(10); + } else { + this.scheduleTick(5); + } + + } + + @Override + public void onTileTick() { + if (!super.worldObj.isRemote) { + if (super.Active) { + if (!this.buffer.isEmpty()) { + super.Powered = true; + this.drainBuffer(); + this.updateBlockChange(); + if (!this.buffer.isEmpty()) { + this.scheduleTick(10); + } + + return; + } + + super.Active = false; + this.updateBlock(); + } + + if (super.Powered) { + int[] omc = this.scanOutput(); + if (omc == null) { + super.Powered = false; + this.updateBlockChange(); + } else if (!MachineLib.isMatchEmpty(omc)) { + int[] imc = this.scanInput(); + if (imc != null && MachineLib.isMatchEmpty(imc)) { + this.handleTransfer(omc); + } else { + super.Powered = false; + this.updateBlockChange(); + } + } + } else { + int[] omc = this.scanOutput(); + if (omc != null && MachineLib.isMatchEmpty(omc)) { + super.Powered = true; + this.updateBlockChange(); + } else { + int[] imc = this.scanInput(); + if (imc != null && MachineLib.isMatchEmpty(imc)) { + this.handleTransfer(omc); + } else if (omc != null && this.mode == 1) { + this.handleTransfer(omc); + } + } + } + } + + } + + public int getSizeInventory() { + return 27; + } + + public ItemStack getStackInSlot(int i) { + return this.contents[i]; + } + + public ItemStack decrStackSize(int i, int j) { + if (this.contents[i] == null) { + return null; + } else if (this.contents[i].stackSize <= j) { + ItemStack tr = this.contents[i]; + this.contents[i] = null; + this.markDirty(); + return tr; + } else { + ItemStack tr = this.contents[i].splitStack(j); + if (this.contents[i].stackSize == 0) { + this.contents[i] = null; + } + + this.markDirty(); + return tr; + } + } + + public ItemStack getStackInSlotOnClosing(int i) { + if (this.contents[i] == null) { + return null; + } else { + ItemStack ist = this.contents[i]; + this.contents[i] = null; + return ist; + } + } + + public void setInventorySlotContents(int i, ItemStack ist) { + this.contents[i] = ist; + if (ist != null && ist.stackSize > this.getInventoryStackLimit()) { + ist.stackSize = this.getInventoryStackLimit(); + } + + this.markDirty(); + } + + public String getInventoryName() { + return "tile.rpregulate.name"; + } + + public int getInventoryStackLimit() { + return 64; + } + + public boolean isUseableByPlayer(EntityPlayer player) { + return !this.isInvalid() + && super.worldObj.getTileEntity(super.xCoord, super.yCoord, super.zCoord) == this + && player.getDistanceSq((double)super.xCoord + 0.5, (double)super.yCoord + 0.5, (double)super.zCoord + 0.5) <= 64.0; + } + + public void markDirty() { + this.inputMap = null; + this.outputMap = null; + super.markDirty(); + } + + public void closeInventory() { + } + + public void openInventory() { + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + NBTTagList items = data.getTagList("Items", 10); + this.contents = new ItemStack[this.getSizeInventory()]; + + for(int i = 0; i < items.tagCount(); ++i) { + NBTTagCompound item = items.getCompoundTagAt(i); + int j = item.getByte("Slot") & 255; + if (j >= 0 && j < this.contents.length) { + this.contents[j] = ItemStack.loadItemStackFromNBT(item); + } + } + + this.buffer.readFromNBT(data); + this.mode = data.getByte("mode"); + this.color = data.getByte("col"); + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + NBTTagList items = new NBTTagList(); + + for(int i = 0; i < this.contents.length; ++i) { + if (this.contents[i] != null) { + NBTTagCompound item = new NBTTagCompound(); + item.setByte("Slot", (byte)i); + this.contents[i].writeToNBT(item); + items.appendTag(item); + } + } + + data.setTag("Items", items); + this.buffer.writeToNBT(data); + data.setByte("mode", this.mode); + data.setByte("col", (byte)this.color); + } + + public boolean canInsertItem(int slotID, ItemStack itemStack, int side) { + return side != super.Rotation && side != (super.Rotation ^ 1); + } + + public boolean canExtractItem(int slotID, ItemStack itemStack, int side) { + return side != super.Rotation && side != (super.Rotation ^ 1); + } + + public boolean hasCustomInventoryName() { + return true; + } + + public boolean isItemValidForSlot(int slotID, ItemStack itemStack) { + return true; + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/TileRelay.java b/src/main/java/com/eloraam/redpower/machine/TileRelay.java new file mode 100644 index 0000000..0424207 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/TileRelay.java @@ -0,0 +1,75 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +public class TileRelay extends TileEjectBase { + @Override + public int getExtendedID() { + return 15; + } + + @Override + public void onTileTick() { + super.onTileTick(); + if (!super.worldObj.isRemote && !super.Active && this.handleExtract()) { + super.Active = true; + this.updateBlock(); + this.scheduleTick(5); + } + + } + + @Override + public void updateEntity() { + super.updateEntity(); + if (!this.isTickScheduled()) { + this.scheduleTick(10); + } + + } + + @Override + public boolean onBlockActivated(EntityPlayer player) { + if (player.isSneaking()) { + return false; + } else { + if (!super.worldObj.isRemote) { + player.openGui(RedPowerMachine.instance, 13, super.worldObj, super.xCoord, super.yCoord, super.zCoord); + } + + return true; + } + } + + protected boolean handleExtract() { + for(int n = 0; n < this.getSizeInventory(); ++n) { + ItemStack ist = this.getStackInSlot(n); + if (ist != null && ist.stackSize != 0) { + this.addToBuffer(super.contents[n]); + this.setInventorySlotContents(n, null); + this.drainBuffer(); + return true; + } + } + + return false; + } + + @Override + public String getInventoryName() { + return "tile.rprelay.name"; + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/TileRestrictTube.java b/src/main/java/com/eloraam/redpower/machine/TileRestrictTube.java new file mode 100644 index 0000000..df0917f --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/TileRestrictTube.java @@ -0,0 +1,13 @@ +package com.eloraam.redpower.machine; + +public class TileRestrictTube extends TileTube { + @Override + public int tubeWeight(int side, int state) { + return 1000000; + } + + @Override + public int getExtendedID() { + return 10; + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/TileRetriever.java b/src/main/java/com/eloraam/redpower/machine/TileRetriever.java new file mode 100644 index 0000000..266f0e6 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/TileRetriever.java @@ -0,0 +1,309 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.BluePowerConductor; +import com.eloraam.redpower.core.BluePowerEndpoint; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.IBluePowerConnectable; +import com.eloraam.redpower.core.ITubeConnectable; +import com.eloraam.redpower.core.MachineLib; +import com.eloraam.redpower.core.RedPowerLib; +import com.eloraam.redpower.core.TubeItem; +import com.eloraam.redpower.core.TubeLib; +import com.eloraam.redpower.core.WorldCoord; +import java.util.ArrayList; +import java.util.List; +import java.util.stream.IntStream; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.entity.Entity; +import net.minecraft.entity.item.EntityMinecartContainer; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Items; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; + +public class TileRetriever extends TileFilter implements IBluePowerConnectable { + BluePowerEndpoint cond = new BluePowerEndpoint() { + @Override + public TileEntity getParent() { + return TileRetriever.this; + } + }; + public int ConMask = -1; + public byte select = 0; + public byte mode = 0; + + @Override + public int getConnectableMask() { + return 1073741823; + } + + @Override + public int getConnectClass(int side) { + return 65; + } + + @Override + public int getCornerPowerMode() { + return 0; + } + + @Override + public BluePowerConductor getBlueConductor(int side) { + return this.cond; + } + + @Override + public boolean tubeItemEnter(int side, int state, TubeItem item) { + if (side == (super.Rotation ^ 1) && state == 3) { + if (!super.buffer.isEmpty()) { + return false; + } else { + if (super.filterMap == null) { + this.regenFilterMap(); + } + + if (super.filterMap.size() > 0 && !super.filterMap.containsKey(item.item)) { + return false; + } else { + super.buffer.addNewColor(item.item, super.color); + super.Delay = true; + this.updateBlock(); + this.scheduleTick(5); + this.drainBuffer(); + return true; + } + } + } else { + return side == super.Rotation && state == 2 && super.tubeItemEnter(side, state, item); + } + } + + @Override + public boolean tubeItemCanEnter(int side, int state, TubeItem item) { + if (side == (super.Rotation ^ 1) && state == 3) { + if (!super.buffer.isEmpty()) { + return false; + } else { + if (super.filterMap == null) { + this.regenFilterMap(); + } + + return super.filterMap.size() == 0 || super.filterMap.containsKey(item.item); + } + } else { + return side == super.Rotation && state == 2 && super.tubeItemCanEnter(side, state, item); + } + } + + private void stepSelect() { + for(int i = 0; i < 9; ++i) { + ++this.select; + if (this.select > 8) { + this.select = 0; + } + + ItemStack ct = super.contents[this.select]; + if (ct != null && ct.stackSize > 0) { + return; + } + } + + this.select = 0; + } + + @Override + protected boolean handleExtract(WorldCoord wc) { + ITubeConnectable itc = CoreLib.getTileEntity(super.getWorldObj(), wc, ITubeConnectable.class); + if (itc != null && itc.canRouteItems()) { + if (this.cond.getVoltage() < 60.0) { + return false; + } else { + if (super.filterMap == null) { + this.regenFilterMap(); + } + + TubeLib.InRouteFinder irf = new TubeLib.InRouteFinder(super.worldObj, super.filterMap); + if (this.mode == 0) { + irf.setSubFilt(this.select); + } + + int sm = irf.find(new WorldCoord(this), 1 << (super.Rotation ^ 1)); + if (sm < 0) { + return false; + } else { + WorldCoord dest = irf.getResultPoint(); + IInventory inv = MachineLib.getInventory(super.worldObj, dest); + if (inv == null) { + return false; + } else { + int side = irf.getResultSide(); + int[] slots; + if (inv instanceof ISidedInventory) { + ISidedInventory tt = (ISidedInventory)inv; + slots = tt.getAccessibleSlotsFromSide(side); + } else { + slots = IntStream.range(0, inv.getSizeInventory()).toArray(); + } + + dest.step(side); + TileTube tt1 = CoreLib.getTileEntity(super.worldObj, dest, TileTube.class); + if (tt1 == null) { + return false; + } else { + ItemStack ist = MachineLib.collectOneStack(inv, slots, super.contents[sm]); + if (ist == null) { + return false; + } else { + TubeItem ti = new TubeItem(side, ist); + this.cond.drawPower((double)(25 * ist.stackSize)); + ti.mode = 3; + tt1.addTubeItem(ti); + if (this.mode == 0) { + this.stepSelect(); + } + + return true; + } + } + } + } + } + } else { + return super.handleExtract(wc); + } + } + + @Override + public void updateEntity() { + super.updateEntity(); + if (!super.worldObj.isRemote) { + if (this.ConMask < 0) { + this.ConMask = RedPowerLib.getConnections(super.worldObj, this, super.xCoord, super.yCoord, super.zCoord); + this.cond.recache(this.ConMask, 0); + } + + this.cond.iterate(); + this.markDirty(); + if (this.cond.Flow == 0) { + if (super.Charged) { + super.Charged = false; + this.updateBlock(); + } + } else if (!super.Charged) { + super.Charged = true; + this.updateBlock(); + } + } + + } + + @Override + public void onBlockNeighborChange(Block block) { + this.ConMask = -1; + super.onBlockNeighborChange(block); + } + + @Override + public void onTileTick() { + super.onTileTick(); + if (super.Delay) { + super.Delay = false; + this.updateBlock(); + } + + } + + @Override + protected void doSuck() { + this.suckEntities(this.getSizeBox(2.55, 5.05, -0.95)); + } + + @Override + protected boolean suckFilter(ItemStack ist) { + if (this.cond.getVoltage() < 60.0) { + return false; + } else if (!super.suckFilter(ist)) { + return false; + } else { + this.cond.drawPower((double)(25 * ist.stackSize)); + return true; + } + } + + @Override + protected int suckEntity(Entity ent) { + if (!(ent instanceof EntityMinecartContainer)) { + return super.suckEntity(ent); + } else if (this.cond.getVoltage() < 60.0) { + return 0; + } else { + if (super.filterMap == null) { + this.regenFilterMap(); + } + + EntityMinecartContainer em = (EntityMinecartContainer)ent; + int[] slots = IntStream.range(0, em.getSizeInventory()).toArray(); + if (!MachineLib.emptyInventory(em, slots)) { + return super.suckEntity(ent); + } else { + List items = new ArrayList(); + items.add(new ItemStack(Items.minecart, 1)); + if (em.func_145820_n().getMaterial() != Material.air) { + items.add(new ItemStack(em.func_145820_n(), 1, em.getDisplayTileData())); + } + + for(ItemStack ist : items) { + super.buffer.addNewColor(ist, super.color); + } + + em.setDead(); + this.cond.drawPower(200.0); + return 2; + } + } + } + + @Override + public boolean onBlockActivated(EntityPlayer player) { + if (player.isSneaking()) { + return false; + } else { + if (!super.worldObj.isRemote) { + player.openGui(RedPowerMachine.instance, 7, super.worldObj, super.xCoord, super.yCoord, super.zCoord); + } + + return true; + } + } + + @Override + public int getExtendedID() { + return 8; + } + + @Override + public String getInventoryName() { + return "tile.rpretriever.name"; + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + this.cond.readFromNBT(data); + this.mode = data.getByte("mode"); + this.select = data.getByte("sel"); + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + this.cond.writeToNBT(data); + data.setByte("mode", this.mode); + data.setByte("sel", this.select); + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/TileSolarPanel.java b/src/main/java/com/eloraam/redpower/machine/TileSolarPanel.java new file mode 100644 index 0000000..8d0daba --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/TileSolarPanel.java @@ -0,0 +1,91 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.core.BlockMultipart; +import com.eloraam.redpower.core.BluePowerConductor; +import com.eloraam.redpower.core.IBluePowerConnectable; +import com.eloraam.redpower.core.RedPowerLib; +import net.minecraft.block.Block; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +public class TileSolarPanel extends TileMachinePanel implements IBluePowerConnectable { + BluePowerConductor cond = new BluePowerConductor() { + @Override + public TileEntity getParent() { + return TileSolarPanel.this; + } + + @Override + public double getInvCap() { + return 4.0; + } + }; + public int ConMask = -1; + + @Override + public void onBlockNeighborChange(Block block) { + this.ConMask = -1; + if (!World.doesBlockHaveSolidTopSurface(super.worldObj, super.xCoord, super.yCoord - 1, super.zCoord)) { + this.breakBlock(); + } + + } + + @Override + public void setPartBounds(BlockMultipart block, int part) { + block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.25F, 1.0F); + } + + @Override + public int getConnectableMask() { + return 16777231; + } + + @Override + public int getConnectClass(int side) { + return 64; + } + + @Override + public int getCornerPowerMode() { + return 0; + } + + @Override + public BluePowerConductor getBlueConductor(int side) { + return this.cond; + } + + @Override + public void updateEntity() { + if (!super.worldObj.isRemote) { + if (this.ConMask < 0) { + this.ConMask = RedPowerLib.getConnections(super.worldObj, this, super.xCoord, super.yCoord, super.zCoord); + this.cond.recache(this.ConMask, 0); + } + + this.cond.iterate(); + this.markDirty(); + if (this.cond.getVoltage() <= 100.0 + && super.worldObj.canBlockSeeTheSky(super.xCoord, super.yCoord, super.zCoord) + && super.worldObj.isDaytime() + && !super.worldObj.provider.hasNoSky) { + this.cond.applyDirect(2.0); + } + } + + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + this.cond.readFromNBT(data); + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + this.cond.writeToNBT(data); + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/TileSorter.java b/src/main/java/com/eloraam/redpower/machine/TileSorter.java new file mode 100644 index 0000000..a472f5d --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/TileSorter.java @@ -0,0 +1,791 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.BluePowerConductor; +import com.eloraam.redpower.core.BluePowerEndpoint; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.IBluePowerConnectable; +import com.eloraam.redpower.core.MachineLib; +import com.eloraam.redpower.core.RedPowerLib; +import com.eloraam.redpower.core.TubeBuffer; +import com.eloraam.redpower.core.TubeItem; +import com.eloraam.redpower.core.WorldCoord; +import net.minecraft.block.Block; +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; + +public class TileSorter extends TileTranspose implements IInventory, ISidedInventory, IBluePowerConnectable { + BluePowerEndpoint cond = new BluePowerEndpoint() { + @Override + public TileEntity getParent() { + return TileSorter.this; + } + }; + public int ConMask = -1; + private ItemStack[] contents = new ItemStack[40]; + public byte[] colors = new byte[8]; + public byte mode = 0; + public byte automode = 0; + public byte defcolor = 0; + public byte draining = -1; + public byte column = 0; + public int pulses = 0; + private MachineLib.FilterMap filterMap = null; + private TubeBuffer[] channelBuffers = new TubeBuffer[8]; + + public TileSorter() { + for(int i = 0; i < 8; ++i) { + this.channelBuffers[i] = new TubeBuffer(); + } + + } + + private void regenFilterMap() { + this.filterMap = MachineLib.makeFilterMap(this.contents); + } + + @Override + public int getConnectableMask() { + return 1073741823; + } + + @Override + public int getConnectClass(int side) { + return 65; + } + + @Override + public int getCornerPowerMode() { + return 0; + } + + @Override + public BluePowerConductor getBlueConductor(int side) { + return this.cond; + } + + public int[] getAccessibleSlotsFromSide(int side) { + return new int[0]; + } + + @Override + public void updateEntity() { + super.updateEntity(); + if (!super.worldObj.isRemote) { + if (!super.Powered) { + super.Delay = false; + } + + if (this.ConMask < 0) { + this.ConMask = RedPowerLib.getConnections(super.worldObj, this, super.xCoord, super.yCoord, super.zCoord); + this.cond.recache(this.ConMask, 0); + } + + this.cond.iterate(); + this.markDirty(); + if (this.cond.Flow == 0) { + if (super.Charged) { + super.Charged = false; + this.updateBlock(); + } + } else if (!super.Charged) { + super.Charged = true; + this.updateBlock(); + } + + if ((this.automode == 1 || this.automode == 2 && this.pulses > 0) && !this.isTickScheduled()) { + this.scheduleTick(10); + } + } + + } + + @Override + public boolean onBlockActivated(EntityPlayer player) { + if (player.isSneaking()) { + return false; + } else { + if (!super.worldObj.isRemote) { + player.openGui(RedPowerMachine.instance, 5, super.worldObj, super.xCoord, super.yCoord, super.zCoord); + } + + return true; + } + } + + @Override + public int getExtendedID() { + return 5; + } + + @Override + public void onBlockRemoval() { + super.onBlockRemoval(); + + for(int i = 0; i < 8; ++i) { + this.channelBuffers[i].onRemove(this); + } + + for(int i = 0; i < 40; ++i) { + ItemStack ist = this.contents[i]; + if (ist != null && ist.stackSize > 0) { + CoreLib.dropItem(super.worldObj, super.xCoord, super.yCoord, super.zCoord, ist); + } + } + + } + + @Override + public void onBlockNeighborChange(Block block) { + this.ConMask = -1; + if (this.automode == 0) { + super.onBlockNeighborChange(block); + } + + if (this.automode == 2) { + if (!RedPowerLib.isPowered(super.worldObj, super.xCoord, super.yCoord, super.zCoord, 16777215, 63)) { + super.Powered = false; + this.markDirty(); + return; + } + + if (super.Powered) { + return; + } + + super.Powered = true; + this.markDirty(); + if (super.Delay) { + return; + } + + super.Delay = true; + ++this.pulses; + } + + } + + protected int getColumnMatch(ItemStack ist) { + if (this.filterMap == null) { + this.regenFilterMap(); + } + + if (this.filterMap.size() == 0) { + return -2; + } else { + int i = this.filterMap.firstMatch(ist); + return i < 0 ? i : i & 7; + } + } + + protected void fireMatch() { + super.Active = true; + this.updateBlock(); + this.scheduleTick(5); + } + + protected boolean tryDrainBuffer(TubeBuffer buf) { + if (buf.isEmpty()) { + return false; + } else { + while(!buf.isEmpty()) { + TubeItem ti = buf.getLast(); + if (this.stuffCart(ti.item)) { + buf.pop(); + } else { + if (!this.handleItem(ti)) { + buf.plugged = true; + return true; + } + + buf.pop(); + if (buf.plugged) { + return true; + } + } + } + + return true; + } + } + + protected boolean tryDrainBuffer() { + for(int i = 0; i < 9; ++i) { + ++this.draining; + TubeBuffer buf; + if (this.draining > 7) { + this.draining = -1; + buf = super.buffer; + } else { + buf = this.channelBuffers[this.draining]; + } + + if (this.tryDrainBuffer(buf)) { + return false; + } + } + + return true; + } + + protected boolean isBufferEmpty() { + if (!super.buffer.isEmpty()) { + return false; + } else { + for(int i = 0; i < 8; ++i) { + if (!this.channelBuffers[i].isEmpty()) { + return false; + } + } + + return true; + } + } + + @Override + public void drainBuffer() { + this.tryDrainBuffer(); + } + + private boolean autoTick() { + if (super.Active) { + return false; + } else if (this.automode == 2 && this.pulses == 0) { + return false; + } else { + WorldCoord wc = new WorldCoord(this); + wc.step(super.Rotation ^ 1); + if (this.handleExtract(wc)) { + super.Active = true; + this.updateBlock(); + this.scheduleTick(5); + } else { + this.scheduleTick(10); + } + + return true; + } + } + + @Override + public void onTileTick() { + if (!super.worldObj.isRemote) { + if (this.automode == 1 && super.Powered) { + super.Powered = false; + this.updateBlock(); + } + + if ((this.automode <= 0 || !this.autoTick()) && super.Active) { + if (!this.tryDrainBuffer()) { + if (this.isBufferEmpty()) { + this.scheduleTick(5); + } else { + this.scheduleTick(10); + } + } else { + if (!super.Powered || this.automode == 2) { + super.Active = false; + this.updateBlock(); + } + + if (this.automode == 1 || this.automode == 2 && this.pulses > 0) { + this.scheduleTick(5); + } + } + } + } + + } + + @Override + public boolean tubeItemEnter(int side, int state, TubeItem item) { + if (side == super.Rotation && state == 2) { + int cm = this.getColumnMatch(item.item); + TubeBuffer buf = super.buffer; + if (cm >= 0 && this.mode > 1) { + buf = this.channelBuffers[cm]; + } + + buf.addBounce(item); + this.fireMatch(); + return true; + } else if (side != (super.Rotation ^ 1) || state != 1) { + return false; + } else if (item.priority > 0) { + return false; + } else if (this.automode == 0 && super.Powered) { + return false; + } else if (this.cond.getVoltage() < 60.0) { + return false; + } else { + int cm = this.getColumnMatch(item.item); + TubeBuffer buf = super.buffer; + if (cm >= 0 && this.mode > 1) { + buf = this.channelBuffers[cm]; + } + + if (!buf.isEmpty()) { + return false; + } else if (cm >= 0) { + this.cond.drawPower((double)(25 * item.item.stackSize)); + buf.addNewColor(item.item, this.colors[cm]); + this.fireMatch(); + this.tryDrainBuffer(buf); + return true; + } else if (this.mode == 4 || this.mode == 6) { + this.cond.drawPower((double)(25 * item.item.stackSize)); + buf.addNewColor(item.item, this.defcolor); + this.fireMatch(); + this.tryDrainBuffer(buf); + return true; + } else if (cm == -2) { + this.cond.drawPower((double)(25 * item.item.stackSize)); + buf.addNewColor(item.item, 0); + this.fireMatch(); + this.tryDrainBuffer(buf); + return true; + } else { + return false; + } + } + } + + @Override + public boolean tubeItemCanEnter(int side, int state, TubeItem item) { + if (side == super.Rotation && state == 2) { + return true; + } else if (side != (super.Rotation ^ 1) || state != 1) { + return false; + } else if (item.priority > 0) { + return false; + } else if (this.automode == 0 && super.Powered) { + return false; + } else if (this.cond.getVoltage() < 60.0) { + return false; + } else { + int cm = this.getColumnMatch(item.item); + TubeBuffer buf = super.buffer; + if (cm >= 0 && this.mode > 1) { + buf = this.channelBuffers[cm]; + } + + return buf.isEmpty() && (cm >= 0 || this.mode == 4 || this.mode == 6 || cm == -2); + } + } + + @Override + protected void addToBuffer(ItemStack ist) { + int cm = this.getColumnMatch(ist); + TubeBuffer buf = super.buffer; + if (cm >= 0 && this.mode > 1) { + buf = this.channelBuffers[cm]; + } + + if (cm < 0) { + if (this.mode != 4 && this.mode != 6) { + buf.addNewColor(ist, 0); + } else { + buf.addNewColor(ist, this.defcolor); + } + } else { + buf.addNewColor(ist, this.colors[cm]); + } + + } + + private void stepColumn() { + for(int i = 0; i < 8; ++i) { + ++this.column; + if (this.column > 7) { + if (this.pulses > 0) { + --this.pulses; + } + + this.column = 0; + } + + for(int a = 0; a < 5; ++a) { + ItemStack ct = this.contents[a * 8 + this.column]; + if (ct != null && ct.stackSize != 0) { + return; + } + } + } + + this.column = 0; + } + + private void checkColumn() { + for(int a = 0; a < 5; ++a) { + ItemStack ct = this.contents[a * 8 + this.column]; + if (ct != null && ct.stackSize != 0) { + return; + } + } + + this.stepColumn(); + this.markDirty(); + } + + @Override + protected boolean handleExtract(IInventory inv, int[] slots) { + if (this.cond.getVoltage() < 60.0) { + return false; + } else { + if (this.filterMap == null) { + this.regenFilterMap(); + } + + if (this.filterMap.size() == 0) { + ItemStack var8 = MachineLib.collectOneStack(inv, slots, null); + if (var8 == null) { + return false; + } else { + if (this.mode != 4 && this.mode != 6) { + super.buffer.addNew(var8); + } else { + super.buffer.addNewColor(var8, this.defcolor); + } + + this.cond.drawPower((double)(25 * var8.stackSize)); + this.drainBuffer(); + return true; + } + } else { + int sm; + ItemStack coll; + switch(this.mode) { + case 0: + this.checkColumn(); + sm = MachineLib.matchAnyStackCol(this.filterMap, inv, slots, this.column); + if (sm < 0) { + return false; + } + + coll = MachineLib.collectOneStack(inv, slots, this.contents[sm]); + super.buffer.addNewColor(coll, this.colors[sm & 7]); + this.cond.drawPower((double)(25 * coll.stackSize)); + this.stepColumn(); + this.drainBuffer(); + return true; + case 1: + this.checkColumn(); + if (!MachineLib.matchAllCol(this.filterMap, inv, slots, this.column)) { + return false; + } + + for(int n = 0; n < 5; ++n) { + ItemStack match = this.contents[n * 8 + this.column]; + if (match != null && match.stackSize != 0) { + coll = MachineLib.collectOneStack(inv, slots, match); + super.buffer.addNewColor(coll, this.colors[this.column]); + this.cond.drawPower((double)(25 * coll.stackSize)); + } + } + + this.stepColumn(); + this.drainBuffer(); + return true; + case 2: + sm = 0; + + while(sm < 8 && !MachineLib.matchAllCol(this.filterMap, inv, slots, sm)) { + ++sm; + } + + if (sm == 8) { + return false; + } else { + for(int n = 0; n < 5; ++n) { + ItemStack match = this.contents[n * 8 + sm]; + if (match != null && match.stackSize != 0) { + coll = MachineLib.collectOneStack(inv, slots, match); + this.channelBuffers[sm].addNewColor(coll, this.colors[sm]); + this.cond.drawPower((double)(25 * coll.stackSize)); + } + } + + if (this.pulses > 0) { + --this.pulses; + } + + this.drainBuffer(); + return true; + } + case 3: + sm = MachineLib.matchAnyStack(this.filterMap, inv, slots); + if (sm < 0) { + return false; + } + + coll = MachineLib.collectOneStack(inv, slots, this.contents[sm]); + this.channelBuffers[sm & 7].addNewColor(coll, this.colors[sm & 7]); + this.cond.drawPower((double)(25 * coll.stackSize)); + if (this.pulses > 0) { + --this.pulses; + } + + this.drainBuffer(); + return true; + case 4: + sm = MachineLib.matchAnyStack(this.filterMap, inv, slots); + if (sm < 0) { + coll = MachineLib.collectOneStack(inv, slots, null); + if (coll == null) { + return false; + } + + super.buffer.addNewColor(coll, this.defcolor); + } else { + coll = MachineLib.collectOneStack(inv, slots, this.contents[sm]); + this.channelBuffers[sm & 7].addNewColor(coll, this.colors[sm & 7]); + } + + this.cond.drawPower((double)(25 * coll.stackSize)); + if (this.pulses > 0) { + --this.pulses; + } + + this.drainBuffer(); + return true; + case 5: + sm = MachineLib.matchAnyStack(this.filterMap, inv, slots); + if (sm < 0) { + return false; + } + + coll = MachineLib.collectOneStackFuzzy(inv, slots, this.contents[sm]); + this.channelBuffers[sm & 7].addNewColor(coll, this.colors[sm & 7]); + this.cond.drawPower((double)(25 * coll.stackSize)); + if (this.pulses > 0) { + --this.pulses; + } + + this.drainBuffer(); + return true; + case 6: + sm = MachineLib.matchAnyStack(this.filterMap, inv, slots); + if (sm < 0) { + coll = MachineLib.collectOneStack(inv, slots, null); + if (coll == null) { + return false; + } + + super.buffer.addNewColor(coll, this.defcolor); + } else { + coll = MachineLib.collectOneStackFuzzy(inv, slots, this.contents[sm]); + this.channelBuffers[sm & 7].addNewColor(coll, this.colors[sm & 7]); + } + + this.cond.drawPower((double)(25 * coll.stackSize)); + if (this.pulses > 0) { + --this.pulses; + } + + this.drainBuffer(); + return true; + default: + return false; + } + } + } + } + + @Override + protected boolean suckFilter(ItemStack ist) { + if (this.cond.getVoltage() < 60.0) { + return false; + } else { + if (this.filterMap == null) { + this.regenFilterMap(); + } + + int cm = this.getColumnMatch(ist); + TubeBuffer buf = super.buffer; + if (cm >= 0 && this.mode > 1) { + buf = this.channelBuffers[cm]; + } + + if (buf.plugged) { + return false; + } else if (cm < 0) { + if (this.mode != 4 && this.mode != 6 && cm != -2) { + return false; + } else { + this.cond.drawPower((double)(25 * ist.stackSize)); + return true; + } + } else { + this.cond.drawPower((double)(25 * ist.stackSize)); + return true; + } + } + } + + public int getSizeInventory() { + return 40; + } + + public ItemStack getStackInSlot(int i) { + return this.contents[i]; + } + + public ItemStack decrStackSize(int i, int j) { + if (this.contents[i] == null) { + return null; + } else if (this.contents[i].stackSize <= j) { + ItemStack tr = this.contents[i]; + this.contents[i] = null; + this.markDirty(); + return tr; + } else { + ItemStack tr = this.contents[i].splitStack(j); + if (this.contents[i].stackSize == 0) { + this.contents[i] = null; + } + + this.markDirty(); + return tr; + } + } + + public ItemStack getStackInSlotOnClosing(int i) { + if (this.contents[i] == null) { + return null; + } else { + ItemStack ist = this.contents[i]; + this.contents[i] = null; + return ist; + } + } + + public void setInventorySlotContents(int i, ItemStack ist) { + this.contents[i] = ist; + if (ist != null && ist.stackSize > this.getInventoryStackLimit()) { + ist.stackSize = this.getInventoryStackLimit(); + } + + this.markDirty(); + } + + public String getInventoryName() { + return "tile.rpsorter.name"; + } + + public int getInventoryStackLimit() { + return 64; + } + + public boolean isUseableByPlayer(EntityPlayer player) { + return !this.isInvalid() + && super.worldObj.getTileEntity(super.xCoord, super.yCoord, super.zCoord) == this + && player.getDistanceSq((double)super.xCoord + 0.5, (double)super.yCoord + 0.5, (double)super.zCoord + 0.5) <= 64.0; + } + + public void markDirty() { + this.filterMap = null; + super.markDirty(); + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + NBTTagList items = data.getTagList("Items", 10); + this.contents = new ItemStack[this.getSizeInventory()]; + + for(int cols = 0; cols < items.tagCount(); ++cols) { + NBTTagCompound bufs = items.getCompoundTagAt(cols); + int i = bufs.getByte("Slot") & 255; + if (i >= 0 && i < this.contents.length) { + this.contents[i] = ItemStack.loadItemStackFromNBT(bufs); + } + } + + this.column = data.getByte("coln"); + byte[] cols = data.getByteArray("cols"); + if (cols.length >= 8) { + System.arraycopy(cols, 0, this.colors, 0, 8); + } + + this.mode = data.getByte("mode"); + this.automode = data.getByte("amode"); + this.draining = data.getByte("drain"); + if (this.mode == 4 || this.mode == 6) { + this.defcolor = data.getByte("defc"); + } + + this.pulses = data.getInteger("pulses"); + this.cond.readFromNBT(data); + NBTTagList buffers = data.getTagList("buffers", 10); + + for(int i = 0; i < buffers.tagCount(); ++i) { + NBTTagCompound buf = buffers.getCompoundTagAt(i); + this.channelBuffers[i].readFromNBT(buf); + } + + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + NBTTagList items = new NBTTagList(); + + for(int bufs = 0; bufs < this.contents.length; ++bufs) { + if (this.contents[bufs] != null) { + NBTTagCompound i = new NBTTagCompound(); + i.setByte("Slot", (byte)bufs); + this.contents[bufs].writeToNBT(i); + items.appendTag(i); + } + } + + data.setByte("coln", this.column); + data.setTag("Items", items); + data.setByteArray("cols", this.colors); + data.setByte("mode", this.mode); + data.setByte("amode", this.automode); + data.setByte("drain", this.draining); + data.setInteger("pulses", this.pulses); + if (this.mode == 4 || this.mode == 6) { + data.setByte("defc", this.defcolor); + } + + this.cond.writeToNBT(data); + NBTTagList buffers = new NBTTagList(); + + for(int i = 0; i < 8; ++i) { + NBTTagCompound buf = new NBTTagCompound(); + this.channelBuffers[i].writeToNBT(buf); + buffers.appendTag(buf); + } + + data.setTag("buffers", buffers); + } + + public boolean canInsertItem(int slotID, ItemStack itemStack, int side) { + return false; + } + + public boolean canExtractItem(int slotID, ItemStack itemStack, int side) { + return false; + } + + public boolean hasCustomInventoryName() { + return false; + } + + public void openInventory() { + } + + public void closeInventory() { + } + + public boolean isItemValidForSlot(int slotID, ItemStack itemStack) { + return true; + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/TileSortron.java b/src/main/java/com/eloraam/redpower/machine/TileSortron.java new file mode 100644 index 0000000..27dd933 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/TileSortron.java @@ -0,0 +1,469 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.BluePowerConductor; +import com.eloraam.redpower.core.BluePowerEndpoint; +import com.eloraam.redpower.core.IBluePowerConnectable; +import com.eloraam.redpower.core.IRedbusConnectable; +import com.eloraam.redpower.core.RedPowerLib; +import com.eloraam.redpower.core.TubeItem; +import net.minecraft.block.Block; +import net.minecraft.entity.Entity; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; + +public class TileSortron extends TileTranspose implements IBluePowerConnectable, IRedbusConnectable { + BluePowerEndpoint cond = new BluePowerEndpoint() { + @Override + public TileEntity getParent() { + return TileSortron.this; + } + }; + public int ConMask = -1; + private int rbaddr = 4; + private int cmdDelay = 0; + private int command = 0; + private int itemSlot = 0; + private int itemType = 0; + private int itemDamage = 0; + private int itemDamageMax = 0; + private int itemQty = 0; + private int itemColor = 0; + private int itemInColor = 0; + + @Override + public int getConnectableMask() { + return 1073741823; + } + + @Override + public int getConnectClass(int side) { + return 67; + } + + @Override + public int getCornerPowerMode() { + return 0; + } + + @Override + public BluePowerConductor getBlueConductor(int side) { + return this.cond; + } + + @Override + public int rbGetAddr() { + return this.rbaddr; + } + + @Override + public void rbSetAddr(int addr) { + this.rbaddr = addr; + } + + @Override + public int rbRead(int reg) { + switch(reg) { + case 0: + return this.command & 0xFF; + case 1: + return this.itemQty & 0xFF; + case 2: + return this.itemSlot & 0xFF; + case 3: + return this.itemSlot >> 8 & 0xFF; + case 4: + return this.itemType & 0xFF; + case 5: + return this.itemType >> 8 & 0xFF; + case 6: + return this.itemType >> 16 & 0xFF; + case 7: + return this.itemType >> 24 & 0xFF; + case 8: + return this.itemDamage & 0xFF; + case 9: + return this.itemDamage >> 8 & 0xFF; + case 10: + return this.itemDamageMax & 0xFF; + case 11: + return this.itemDamageMax >> 8 & 0xFF; + case 12: + return this.itemColor & 0xFF; + case 13: + return this.itemInColor & 0xFF; + default: + return 0; + } + } + + @Override + public void rbWrite(int reg, int dat) { + this.markDirty(); + switch(reg) { + case 0: + this.command = dat; + this.cmdDelay = 2; + break; + case 1: + this.itemQty = dat; + break; + case 2: + this.itemSlot = this.itemSlot & 0xFF00 | dat; + break; + case 3: + this.itemSlot = this.itemSlot & 0xFF | dat << 8; + break; + case 4: + this.itemType = this.itemType & -256 | dat; + break; + case 5: + this.itemType = this.itemType & -65281 | dat << 8; + break; + case 6: + this.itemType = this.itemType & -16711681 | dat << 16; + break; + case 7: + this.itemType = this.itemType & 16777215 | dat << 24; + break; + case 8: + this.itemDamage = this.itemDamage & 0xFF00 | dat; + break; + case 9: + this.itemDamage = this.itemDamage & 0xFF | dat << 8; + break; + case 10: + this.itemDamageMax = this.itemDamageMax & 0xFF00 | dat; + break; + case 11: + this.itemDamageMax = this.itemDamageMax & 0xFF | dat << 8; + break; + case 12: + this.itemColor = dat; + break; + case 13: + this.itemInColor = dat; + } + + } + + @Override + public void updateEntity() { + super.updateEntity(); + if (!super.worldObj.isRemote) { + if (this.ConMask < 0) { + this.ConMask = RedPowerLib.getConnections(super.worldObj, this, super.xCoord, super.yCoord, super.zCoord); + this.cond.recache(this.ConMask, 0); + } + + this.cond.iterate(); + this.markDirty(); + if (this.cmdDelay > 0 && --this.cmdDelay == 0) { + this.processCommand(); + } + + if (this.cond.Flow == 0) { + if (super.Charged) { + super.Charged = false; + this.updateBlock(); + } + } else if (!super.Charged) { + super.Charged = true; + this.updateBlock(); + } + } + + } + + @Override + public Block getBlockType() { + return RedPowerMachine.blockMachine2; + } + + @Override + public int getExtendedID() { + return 0; + } + + @Override + public void onBlockNeighborChange(Block block) { + this.ConMask = -1; + } + + @Override + public void onTileTick() { + if (!super.worldObj.isRemote && super.Active) { + if (!super.buffer.isEmpty()) { + this.drainBuffer(); + if (!super.buffer.isEmpty()) { + this.scheduleTick(10); + } else { + this.scheduleTick(5); + } + } else { + super.Active = false; + this.updateBlock(); + } + } + + } + + public static int hashItem(ItemStack ist) { + String in = ist.getItem().getUnlocalizedName(); + int hc; + if (in == null) { + hc = ist.getItem().hashCode(); + } else { + hc = in.hashCode(); + } + + if (ist.getHasSubtypes()) { + hc ^= ist.getItemDamage(); + } + + return hc; + } + + private void processCommand() { + if (this.cond.getVoltage() < 60.0) { + this.cmdDelay = 20; + } else { + IInventory inv; + switch(this.command) { + case 0: + break; + case 1: + inv = this.getConnectedInventory(false); + if (inv == null) { + this.command = 255; + } else { + this.itemSlot = inv.getSizeInventory(); + this.command = 0; + } + break; + case 2: + inv = this.getConnectedInventory(false); + if (inv == null) { + this.command = 255; + } else if (this.itemSlot >= inv.getSizeInventory()) { + this.command = 255; + } else { + ItemStack ist = inv.getStackInSlot(this.itemSlot); + if (ist != null && ist.stackSize != 0) { + this.itemQty = ist.stackSize; + this.itemType = hashItem(ist); + if (ist.isItemStackDamageable()) { + this.itemDamage = ist.getItemDamage(); + this.itemDamageMax = ist.getMaxDamage(); + } else { + this.itemDamage = 0; + this.itemDamageMax = 0; + } + + this.command = 0; + } else { + this.itemQty = 0; + this.itemType = 0; + this.itemDamage = 0; + this.itemDamageMax = 0; + this.command = 0; + } + } + break; + case 3: + if (super.Active) { + this.cmdDelay = 2; + return; + } + + inv = this.getConnectedInventory(false); + if (inv == null) { + this.command = 255; + } else if (this.itemSlot >= inv.getSizeInventory()) { + this.command = 255; + } else { + ItemStack ist = inv.getStackInSlot(this.itemSlot); + if (ist != null && ist.stackSize != 0) { + int i = Math.min(this.itemQty, ist.stackSize); + this.itemQty = i; + if (this.itemColor > 16) { + this.itemColor = 0; + } + + super.buffer.addNewColor(inv.decrStackSize(this.itemSlot, i), this.itemColor); + this.cond.drawPower((double)(50 * ist.stackSize)); + this.drainBuffer(); + super.Active = true; + this.command = 0; + this.updateBlock(); + this.scheduleTick(5); + } else { + this.itemQty = 0; + this.command = 0; + } + } + break; + case 4: + if (this.itemQty == 0) { + this.command = 0; + } + break; + default: + this.command = 255; + } + } + + } + + @Override + protected boolean handleExtract(IInventory inv, int[] slots) { + return false; + } + + @Override + protected void addToBuffer(ItemStack ist) { + if (this.itemColor > 16) { + this.itemColor = 0; + } + + super.buffer.addNewColor(ist, this.itemColor); + } + + @Override + protected int suckEntity(Entity ent) { + if (ent instanceof EntityItem) { + EntityItem ei = (EntityItem)ent; + ItemStack ist = ei.getEntityItem(); + if (ist.stackSize != 0 && !ei.isDead) { + int st = ist.stackSize; + if (!this.suckFilter(ist)) { + return st == ist.stackSize ? 0 : 2; + } else { + this.addToBuffer(ist); + ei.setDead(); + return 1; + } + } else { + return 0; + } + } else { + return 0; + } + } + + @Override + protected boolean suckFilter(ItemStack ist) { + if (this.command != 4) { + return false; + } else if (this.cond.getVoltage() < 60.0) { + return false; + } else if (this.itemType != 0 && this.itemType != hashItem(ist)) { + return false; + } else { + boolean tr = true; + if (this.itemQty < ist.stackSize) { + tr = false; + ist = ist.splitStack(this.itemQty); + if (this.itemColor > 16) { + this.itemColor = 0; + } + + super.buffer.addNewColor(ist, this.itemColor); + } + + this.itemQty -= ist.stackSize; + if (this.itemQty == 0) { + this.command = 0; + } + + this.cond.drawPower((double)(50 * ist.stackSize)); + return tr; + } + } + + @Override + public boolean tubeItemEnter(int side, int state, TubeItem item) { + if (side == super.Rotation && state == 2) { + return super.tubeItemEnter(side, state, item); + } else if (side != (super.Rotation ^ 1) || state != 1) { + return false; + } else if (this.command != 4) { + return false; + } else if (this.cond.getVoltage() < 60.0) { + return false; + } else if (this.itemType != 0 && this.itemType != hashItem(item.item)) { + return false; + } else if (this.itemInColor != 0 && this.itemInColor != item.color) { + return false; + } else { + boolean tr = true; + ItemStack ist = item.item; + if (this.itemQty < ist.stackSize) { + tr = false; + ist = ist.splitStack(this.itemQty); + } + + this.itemQty -= ist.stackSize; + if (this.itemQty == 0) { + this.command = 0; + } + + if (this.itemColor > 16) { + this.itemColor = 0; + } + + super.buffer.addNewColor(ist, this.itemColor); + this.cond.drawPower((double)(50 * ist.stackSize)); + this.drainBuffer(); + super.Active = true; + this.updateBlock(); + this.scheduleTick(5); + return tr; + } + } + + @Override + public boolean tubeItemCanEnter(int side, int state, TubeItem item) { + return side == super.Rotation && state == 2 + || side == (super.Rotation ^ 1) + && state == 1 + && this.command == 4 + && this.cond.getVoltage() >= 60.0 + && (this.itemType == 0 || this.itemType == hashItem(item.item)) + && (this.itemInColor == 0 || this.itemInColor == item.color); + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + this.cond.readFromNBT(data); + this.rbaddr = data.getByte("rbaddr") & 255; + this.cmdDelay = data.getByte("cmddelay") & 255; + this.command = data.getByte("cmd") & 255; + this.itemSlot = data.getShort("itemslot"); + this.itemType = data.getInteger("itemtype"); + this.itemDamage = data.getShort("itemdmg"); + this.itemDamageMax = data.getShort("itemdmgmax"); + this.itemQty = data.getByte("itemqty") & 255; + this.itemInColor = data.getByte("itemincolor") & 255; + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + this.cond.writeToNBT(data); + data.setByte("rbaddr", (byte)this.rbaddr); + data.setByte("cmddelay", (byte)this.cmdDelay); + data.setByte("cmd", (byte)this.command); + data.setShort("itemslot", (short)this.itemSlot); + data.setInteger("itemtype", this.itemType); + data.setShort("itemdmg", (short)this.itemDamage); + data.setShort("itemdmgmax", (short)this.itemDamageMax); + data.setByte("itemqty", (byte)this.itemQty); + data.setByte("itemcolor", (byte)this.itemColor); + data.setByte("itemincolor", (byte)this.itemInColor); + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/TileThermopile.java b/src/main/java/com/eloraam/redpower/machine/TileThermopile.java new file mode 100644 index 0000000..c0428fc --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/TileThermopile.java @@ -0,0 +1,177 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.RedPowerWorld; +import com.eloraam.redpower.core.BluePowerConductor; +import com.eloraam.redpower.core.IBluePowerConnectable; +import com.eloraam.redpower.core.RedPowerLib; +import com.eloraam.redpower.core.TileExtended; +import com.eloraam.redpower.core.WorldCoord; +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; + +public class TileThermopile extends TileExtended implements IBluePowerConnectable { + BluePowerConductor cond = new BluePowerConductor() { + @Override + public TileEntity getParent() { + return TileThermopile.this; + } + + @Override + public double getInvCap() { + return 4.0; + } + }; + public int tempHot = 0; + public int tempCold = 0; + public int ticks = 0; + public int ConMask = -1; + + @Override + public int getConnectableMask() { + return 1073741823; + } + + @Override + public int getConnectClass(int side) { + return 64; + } + + @Override + public int getCornerPowerMode() { + return 0; + } + + @Override + public BluePowerConductor getBlueConductor(int side) { + return this.cond; + } + + @Override + public int getExtendedID() { + return 11; + } + + public Block getBlockType() { + return RedPowerMachine.blockMachine; + } + + private void updateTemps() { + int hot = 0; + int cold = 0; + + for(int side = 0; side < 6; ++side) { + WorldCoord wc = new WorldCoord(this); + wc.step(side); + Block bid = super.worldObj.getBlock(wc.x, wc.y, wc.z); + if (super.worldObj.isAirBlock(wc.x, wc.y, wc.z)) { + if (super.worldObj.provider.isHellWorld) { + ++hot; + } else { + ++cold; + } + } else if (bid == Blocks.snow) { + cold += 100; + } else if (bid == Blocks.ice) { + cold += 100; + } else if (bid == Blocks.snow_layer) { + cold += 50; + } else if (bid == Blocks.torch) { + hot += 5; + } else if (bid == Blocks.lit_pumpkin) { + hot += 3; + } else if (bid == Blocks.flowing_water || bid == Blocks.water) { + cold += 25; + } else if (bid == Blocks.flowing_lava || bid == Blocks.lava) { + hot += 100; + } else if (bid == Blocks.fire) { + hot += 25; + } + } + + if (this.tempHot >= 100 && this.tempCold >= 200) { + for(int side = 0; side < 6; ++side) { + WorldCoord wc = new WorldCoord(this); + wc.step(side); + Block bid = super.worldObj.getBlock(wc.x, wc.y, wc.z); + if ((bid == Blocks.flowing_lava || bid == Blocks.lava) && super.worldObj.rand.nextInt(300) == 0) { + int md = super.worldObj.getBlockMetadata(wc.x, wc.y, wc.z); + super.worldObj.setBlock(wc.x, wc.y, wc.z, (Block)(md == 0 ? Blocks.obsidian : RedPowerWorld.blockStone), md > 0 ? 1 : 0, 3); + break; + } + } + } + + if (this.tempHot >= 100) { + for(int side = 0; side < 6; ++side) { + if (super.worldObj.rand.nextInt(300) == 0) { + WorldCoord wc = new WorldCoord(this); + wc.step(side); + Block bid = super.worldObj.getBlock(wc.x, wc.y, wc.z); + if (bid == Blocks.snow_layer) { + super.worldObj.setBlockToAir(wc.x, wc.y, wc.z); + break; + } + + if (bid == Blocks.ice || bid == Blocks.snow) { + super.worldObj.setBlock(wc.x, wc.y, wc.z, (Block)(super.worldObj.provider.isHellWorld ? Blocks.air : Blocks.flowing_water), 0, 3); + break; + } + } + } + } + + this.tempHot = hot; + this.tempCold = cold; + } + + @Override + public void updateEntity() { + super.updateEntity(); + if (!super.worldObj.isRemote) { + if (this.ConMask < 0) { + this.ConMask = RedPowerLib.getConnections(super.worldObj, this, super.xCoord, super.yCoord, super.zCoord); + this.cond.recache(this.ConMask, 0); + } + + this.cond.iterate(); + this.markDirty(); + if (this.cond.getVoltage() <= 100.0) { + ++this.ticks; + if (this.ticks > 20) { + this.ticks = 0; + this.updateTemps(); + } + + int diff = Math.min(this.tempHot, this.tempCold); + this.cond.applyDirect(0.005 * (double)diff); + } + } + + } + + @Override + public void onBlockNeighborChange(Block block) { + this.ConMask = -1; + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + this.cond.readFromNBT(data); + this.tempHot = data.getShort("hot"); + this.tempCold = data.getShort("cold"); + this.ticks = data.getByte("ticks"); + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + this.cond.writeToNBT(data); + data.setShort("hot", (short)this.tempHot); + data.setShort("cold", (short)this.tempCold); + data.setByte("ticks", (byte)this.ticks); + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/TileTransformer.java b/src/main/java/com/eloraam/redpower/machine/TileTransformer.java new file mode 100644 index 0000000..f747177 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/TileTransformer.java @@ -0,0 +1,190 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.core.BluePowerConductor; +import com.eloraam.redpower.core.BluePowerEndpoint; +import com.eloraam.redpower.core.IBluePowerConnectable; +import com.eloraam.redpower.core.RedPowerLib; +import net.minecraft.block.Block; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; + +public class TileTransformer extends TileMachinePanel implements IBluePowerConnectable { + BluePowerEndpoint cond = new BluePowerEndpoint() { + @Override + public TileEntity getParent() { + return TileTransformer.this; + } + }; + BluePowerEndpoint cond2 = new BluePowerEndpoint() { + @Override + public TileEntity getParent() { + return TileTransformer.this; + } + + @Override + public double getResistance() { + return 1.0; + } + + @Override + public double getIndScale() { + return 7.0E-4; + } + + @Override + public double getCondParallel() { + return 0.005; + } + + @Override + public double getInvCap() { + return 25.0; + } + + @Override + protected void computeVoltage() { + super.Vcap = TileTransformer.this.cond.getVoltage() * 100.0; + super.Itot = TileTransformer.this.cond.Itot * 0.01; + super.It1 = 0.0; + super.Icap = 0.0; + } + + @Override + public void applyCurrent(double Iin) { + TileTransformer.this.cond.applyCurrent(Iin * 100.0); + } + }; + public int ConMask1 = -1; + public int ConMask2 = -1; + + @Override + public int getPartMaxRotation(int part, boolean sec) { + return sec ? 0 : 3; + } + + @Override + public int getPartRotation(int part, boolean sec) { + return sec ? 0 : super.Rotation & 3; + } + + @Override + public void setPartRotation(int part, boolean sec, int rot) { + if (!sec) { + super.Rotation = rot & 3 | super.Rotation & -4; + this.updateBlockChange(); + } + + } + + @Override + public int getConnectableMask() { + return RedPowerLib.mapRotToCon(5, super.Rotation); + } + + @Override + public int getConnectClass(int side) { + int s = RedPowerLib.mapRotToCon(1, super.Rotation); + return (s & RedPowerLib.getConDirMask(side)) > 0 ? 64 : 68; + } + + @Override + public int getCornerPowerMode() { + return 0; + } + + @Override + public BluePowerConductor getBlueConductor(int side) { + return (RedPowerLib.mapRotToCon(1, super.Rotation) & RedPowerLib.getConDirMask(side)) > 0 ? this.cond : this.cond2; + } + + @Override + public int getExtendedID() { + return 4; + } + + @Override + public void onBlockPlaced(ItemStack ist, int side, EntityLivingBase ent) { + super.Rotation = (side ^ 1) << 2; + int yaw = (int)Math.floor((double)(ent.rotationYaw / 90.0F + 0.5F)); + int pitch = (int)Math.floor((double)(ent.rotationPitch / 90.0F + 0.5F)); + yaw &= 3; + int down = super.Rotation >> 2; + int rot; + switch(down) { + case 0: + rot = yaw; + break; + case 1: + rot = yaw ^ (yaw & 1) << 1; + break; + case 2: + rot = (yaw & 1) > 0 ? (pitch > 0 ? 2 : 0) : 1 - yaw & 3; + break; + case 3: + rot = (yaw & 1) > 0 ? (pitch > 0 ? 2 : 0) : yaw - 1 & 3; + break; + case 4: + rot = (yaw & 1) == 0 ? (pitch > 0 ? 2 : 0) : yaw - 2 & 3; + break; + case 5: + rot = (yaw & 1) == 0 ? (pitch > 0 ? 2 : 0) : 2 - yaw & 3; + break; + default: + rot = 0; + } + + super.Rotation = down << 2 | rot; + if (ent instanceof EntityPlayer) { + super.Owner = ((EntityPlayer)ent).getGameProfile(); + } + + } + + @Override + public void onBlockNeighborChange(Block block) { + this.ConMask1 = -1; + this.ConMask2 = -1; + } + + @Override + public void updateEntity() { + super.updateEntity(); + if (!super.worldObj.isRemote) { + if (this.ConMask1 < 0) { + int cm1 = RedPowerLib.getConnections(super.worldObj, this, super.xCoord, super.yCoord, super.zCoord); + this.ConMask1 = cm1 & RedPowerLib.mapRotToCon(1, super.Rotation); + this.ConMask2 = cm1 & RedPowerLib.mapRotToCon(4, super.Rotation); + this.cond.recache(this.ConMask1, 0); + this.cond2.recache(this.ConMask2, 0); + } + + this.cond.iterate(); + this.cond2.iterate(); + this.markDirty(); + } + + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + NBTTagCompound c1 = data.getCompoundTag("c1"); + this.cond.readFromNBT(c1); + NBTTagCompound c2 = data.getCompoundTag("c2"); + this.cond2.readFromNBT(c2); + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + NBTTagCompound c1 = new NBTTagCompound(); + this.cond.writeToNBT(c1); + NBTTagCompound c2 = new NBTTagCompound(); + this.cond2.writeToNBT(c2); + data.setTag("c1", c1); + data.setTag("c2", c2); + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/TileTranspose.java b/src/main/java/com/eloraam/redpower/machine/TileTranspose.java new file mode 100644 index 0000000..7fa4127 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/TileTranspose.java @@ -0,0 +1,346 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.core.ITubeConnectable; +import com.eloraam.redpower.core.MachineLib; +import com.eloraam.redpower.core.RedPowerLib; +import com.eloraam.redpower.core.TubeBuffer; +import com.eloraam.redpower.core.TubeItem; +import com.eloraam.redpower.core.WorldCoord; +import java.util.ArrayList; +import java.util.List; +import java.util.stream.IntStream; +import net.minecraft.block.Block; +import net.minecraft.block.BlockRail; +import net.minecraft.entity.Entity; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.item.EntityMinecartContainer; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.AxisAlignedBB; +import net.minecraftforge.common.util.ForgeDirection; + +public class TileTranspose extends TileMachine implements ITubeConnectable { + TubeBuffer buffer = new TubeBuffer(); + + @Override + public int getTubeConnectableSides() { + return 3 << (super.Rotation & -2); + } + + @Override + public int getTubeConClass() { + return 0; + } + + @Override + public boolean canRouteItems() { + return false; + } + + @Override + public boolean tubeItemEnter(int side, int state, TubeItem item) { + if (side == super.Rotation && state == 2) { + this.buffer.addBounce(item); + super.Active = true; + this.updateBlock(); + this.scheduleTick(5); + return true; + } else if (side != (super.Rotation ^ 1) || state != 1) { + return false; + } else if (super.Powered) { + return false; + } else if (!this.buffer.isEmpty()) { + return false; + } else { + this.addToBuffer(item.item); + super.Active = true; + this.updateBlock(); + this.scheduleTick(5); + this.drainBuffer(); + return true; + } + } + + @Override + public boolean tubeItemCanEnter(int side, int state, TubeItem item) { + return side == super.Rotation && state == 2 || side == (super.Rotation ^ 1) && state == 1 && this.buffer.isEmpty() && !super.Powered; + } + + @Override + public int tubeWeight(int side, int state) { + return side == super.Rotation && state == 2 ? this.buffer.size() : 0; + } + + protected void addToBuffer(ItemStack ist) { + this.buffer.addNew(ist); + } + + public boolean canSuck(int i, int j, int k) { + if (super.worldObj.getBlock(i, j, k).isSideSolid(super.worldObj, i, j, k, ForgeDirection.getOrientation(super.Rotation))) { + return false; + } else { + TileEntity te = super.worldObj.getTileEntity(i, j, k); + return te == null || !(te instanceof IInventory) && !(te instanceof ITubeConnectable); + } + } + + @Override + public void onBlockNeighborChange(Block block) { + if (RedPowerLib.isPowered(super.worldObj, super.xCoord, super.yCoord, super.zCoord, 16777215, 63)) { + if (!super.Powered) { + super.Powered = true; + this.markDirty(); + if (!super.Active) { + super.Active = true; + WorldCoord wc = new WorldCoord(super.xCoord, super.yCoord, super.zCoord); + wc.step(super.Rotation ^ 1); + if (this.canSuck(wc.x, wc.y, wc.z)) { + this.doSuck(); + this.updateBlock(); + } else if (this.handleExtract(wc)) { + this.updateBlock(); + } + } + } + } else { + if (super.Active && !this.isTickScheduled()) { + this.scheduleTick(5); + } + + super.Powered = false; + this.markDirty(); + } + + } + + protected IInventory getConnectedInventory(boolean push) { + WorldCoord pos = new WorldCoord(this); + pos.step(super.Rotation ^ 1); + return MachineLib.getSideInventory(super.worldObj, pos, super.Rotation, push); + } + + protected boolean handleExtract(WorldCoord wc) { + IInventory inv = MachineLib.getInventory(super.worldObj, wc); + if (inv == null) { + return false; + } else { + int[] slots; + if (inv instanceof ISidedInventory) { + ISidedInventory isi = (ISidedInventory)inv; + slots = isi.getAccessibleSlotsFromSide(super.Rotation); + } else { + slots = IntStream.range(0, inv.getSizeInventory()).toArray(); + } + + return this.handleExtract(inv, slots); + } + } + + protected boolean handleExtract(IInventory inv, int[] slots) { + for(int n : slots) { + ItemStack ist = inv.getStackInSlot(n); + if (ist != null && ist.stackSize != 0) { + this.addToBuffer(inv.decrStackSize(n, 1)); + this.drainBuffer(); + return true; + } + } + + return false; + } + + protected boolean handleExtract(IInventory inv, List slots) { + for(int n : slots) { + ItemStack ist = inv.getStackInSlot(n); + if (ist != null && ist.stackSize != 0) { + this.addToBuffer(inv.decrStackSize(n, 1)); + this.drainBuffer(); + return true; + } + } + + return false; + } + + protected AxisAlignedBB getSizeBox(double bw, double bf, double bb) { + double fx = (double)super.xCoord + 0.5; + double fy = (double)super.yCoord + 0.5; + double fz = (double)super.zCoord + 0.5; + switch(super.Rotation) { + case 0: + return AxisAlignedBB.getBoundingBox(fx - bw, (double)super.yCoord - bb, fz - bw, fx + bw, (double)super.yCoord + bf, fz + bw); + case 1: + return AxisAlignedBB.getBoundingBox(fx - bw, (double)(super.yCoord + 1) - bf, fz - bw, fx + bw, (double)(super.yCoord + 1) + bb, fz + bw); + case 2: + return AxisAlignedBB.getBoundingBox(fx - bw, fy - bw, (double)super.zCoord - bb, fx + bw, fy + bw, (double)super.zCoord + bf); + case 3: + return AxisAlignedBB.getBoundingBox(fx - bw, fy - bw, (double)(super.zCoord + 1) - bf, fx + bw, fy + bw, (double)(super.zCoord + 1) + bb); + case 4: + return AxisAlignedBB.getBoundingBox((double)super.xCoord - bb, fy - bw, fz - bw, (double)super.xCoord + bf, fy + bw, fz + bw); + default: + return AxisAlignedBB.getBoundingBox((double)(super.xCoord + 1) - bf, fy - bw, fz - bw, (double)(super.xCoord + 1) + bb, fy + bw, fz + bw); + } + } + + protected void doSuck() { + this.suckEntities(this.getSizeBox(1.55, 3.05, -0.95)); + } + + protected boolean suckFilter(ItemStack ist) { + return true; + } + + protected int suckEntity(Entity ent) { + if (ent instanceof EntityItem) { + EntityItem em1 = (EntityItem)ent; + ItemStack ist = em1.getEntityItem(); + if (ist.stackSize == 0 || em1.isDead) { + return 0; + } else if (!this.suckFilter(ist)) { + return 0; + } else { + this.addToBuffer(ist); + em1.setDead(); + return 1; + } + } else { + if (ent instanceof EntityMinecartContainer) { + if (super.Active) { + return 0; + } + + EntityMinecartContainer em = (EntityMinecartContainer)ent; + List slots = new ArrayList(em.getSizeInventory()); + + for(int i = 0; i < em.getSizeInventory(); ++i) { + slots.add(i); + } + + if (this.handleExtract(em, slots)) { + return 2; + } + } + + return 0; + } + } + + protected void suckEntities(AxisAlignedBB bb) { + boolean trig = false; + + for(Entity ent : (List)super.worldObj.getEntitiesWithinAABB(Entity.class, bb)) { + int i = this.suckEntity(ent); + if (i != 0) { + trig = true; + if (i == 2) { + break; + } + } + } + + if (trig) { + if (!super.Active) { + super.Active = true; + this.updateBlock(); + } + + this.drainBuffer(); + this.scheduleTick(5); + } + + } + + public boolean stuffCart(ItemStack ist) { + WorldCoord wc = new WorldCoord(this); + wc.step(super.Rotation); + Block bl = super.worldObj.getBlock(wc.x, wc.y, wc.z); + if (!(bl instanceof BlockRail)) { + return false; + } else { + for(EntityMinecartContainer em : (List)super.worldObj.getEntitiesWithinAABB(EntityMinecartContainer.class, this.getSizeBox(0.8, 0.05, 1.05))) { + int[] slots = IntStream.range(0, em.getSizeInventory()).toArray(); + if (MachineLib.addToInventoryCore(em, ist, slots, true)) { + return true; + } + } + + return false; + } + } + + public void drainBuffer() { + while(!this.buffer.isEmpty()) { + TubeItem ti = this.buffer.getLast(); + if (this.stuffCart(ti.item)) { + this.buffer.pop(); + } else { + if (!this.handleItem(ti)) { + this.buffer.plugged = true; + return; + } + + this.buffer.pop(); + if (this.buffer.plugged) { + return; + } + } + } + + } + + @Override + public AxisAlignedBB getCollisionBoundingBox() { + return this.getSizeBox(0.5, 0.95, 0.0); + } + + @Override + public void onEntityCollidedWithBlock(Entity ent) { + if (!super.worldObj.isRemote && !super.Powered && this.buffer.isEmpty()) { + this.suckEntities(this.getSizeBox(0.55, 1.05, -0.95)); + } + + } + + @Override + public void onBlockRemoval() { + this.buffer.onRemove(this); + } + + @Override + public void onTileTick() { + if (!super.worldObj.isRemote) { + if (!this.buffer.isEmpty()) { + this.drainBuffer(); + if (!this.buffer.isEmpty()) { + this.scheduleTick(10); + } else { + this.scheduleTick(5); + } + } else if (!super.Powered) { + super.Active = false; + this.updateBlock(); + } + } + + } + + @Override + public int getExtendedID() { + return 2; + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + this.buffer.readFromNBT(data); + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + this.buffer.writeToNBT(data); + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/TileTube.java b/src/main/java/com/eloraam/redpower/machine/TileTube.java new file mode 100644 index 0000000..9a3b559 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/TileTube.java @@ -0,0 +1,333 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerBase; +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.BlockMultipart; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.IPaintable; +import com.eloraam.redpower.core.ITubeFlow; +import com.eloraam.redpower.core.MachineLib; +import com.eloraam.redpower.core.TileCovered; +import com.eloraam.redpower.core.TubeFlow; +import com.eloraam.redpower.core.TubeItem; +import com.eloraam.redpower.core.TubeLib; +import java.util.List; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; + +public class TileTube extends TileCovered implements ITubeFlow, IPaintable { + protected TubeFlow flow = new TubeFlow() { + @Override + public TileEntity getParent() { + return TileTube.this; + } + + @Override + public boolean schedule(TubeItem item, TubeFlow.TubeScheduleContext context) { + item.scheduled = true; + item.progress = 0; + int i = context.cons & ~(1 << item.side); + if (i == 0) { + return true; + } else if (Integer.bitCount(i) == 1) { + item.side = (byte)Integer.numberOfTrailingZeros(i); + return true; + } else if (!TileTube.this.worldObj.isRemote) { + if (item.mode != 3) { + item.mode = 1; + } + + item.side = (byte)TubeLib.findRoute(context.world, context.wc, item, i, item.mode, TileTube.this.lastDir); + if (item.side >= 0) { + int m = i & ~((2 << TileTube.this.lastDir) - 1); + if (m == 0) { + m = i; + } + + if (m == 0) { + TileTube.this.lastDir = 0; + } else { + TileTube.this.lastDir = (byte)Integer.numberOfTrailingZeros(m); + } + } else { + if (item.mode == 1 && item.priority > 0) { + item.priority = 0; + item.side = (byte)TubeLib.findRoute(context.world, context.wc, item, context.cons, 1); + if (item.side >= 0) { + return true; + } + } + + item.side = (byte)TubeLib.findRoute(context.world, context.wc, item, context.cons, 2); + if (item.side >= 0) { + item.mode = 2; + return true; + } + + if (item.mode == 3) { + item.side = (byte)TubeLib.findRoute(context.world, context.wc, item, context.cons, 1); + item.mode = 1; + } + + if (item.side < 0) { + item.side = TileTube.this.lastDir; + int m = i & ~((2 << TileTube.this.lastDir) - 1); + if (m == 0) { + m = i; + } + + if (m == 0) { + TileTube.this.lastDir = 0; + } else { + TileTube.this.lastDir = (byte)Integer.numberOfTrailingZeros(m); + } + } + } + + return true; + } else { + return false; + } + } + + @Override + public boolean handleItem(TubeItem item, TubeFlow.TubeScheduleContext context) { + return MachineLib.addToInventory(TileTube.this.worldObj, item.item, context.dest, (item.side ^ 1) & 63); + } + }; + public byte lastDir = 0; + public byte paintColor = 0; + private boolean hasChanged = false; + + @Override + public int getTubeConnectableSides() { + int tr = 63; + + for(int i = 0; i < 6; ++i) { + if ((super.CoverSides & 1 << i) > 0 && super.Covers[i] >> 8 < 3) { + tr &= ~(1 << i); + } + } + + return tr; + } + + @Override + public int getTubeConClass() { + return this.paintColor; + } + + @Override + public boolean canRouteItems() { + return true; + } + + @Override + public boolean tubeItemEnter(int side, int state, TubeItem item) { + if (state != 0) { + return false; + } else if (item.color != 0 && this.paintColor != 0 && item.color != this.paintColor) { + return false; + } else { + item.side = (byte)side; + this.flow.add(item); + this.hasChanged = true; + this.markDirty(); + return true; + } + } + + @Override + public boolean tubeItemCanEnter(int side, int state, TubeItem item) { + return (item.color == 0 || this.paintColor == 0 || item.color == this.paintColor) && state == 0; + } + + @Override + public int tubeWeight(int side, int state) { + return 0; + } + + @Override + public void addTubeItem(TubeItem ti) { + ti.side = (byte)(ti.side ^ 1); + this.flow.add(ti); + this.hasChanged = true; + this.markDirty(); + } + + @Override + public TubeFlow getTubeFlow() { + return this.flow; + } + + @Override + public boolean tryPaint(int part, int side, int color) { + if (part == 29) { + if (this.paintColor == color) { + return false; + } else { + this.paintColor = (byte)color; + this.updateBlockChange(); + return true; + } + } else { + return false; + } + } + + @Override + public boolean canUpdate() { + return true; + } + + @Override + public void updateEntity() { + if (this.flow.update()) { + this.hasChanged = true; + } + + if (this.hasChanged) { + if (!super.worldObj.isRemote) { + this.markForUpdate(); + } + + this.markDirty(); + } + + } + + @Override + public Block getBlockType() { + return RedPowerBase.blockMicro; + } + + @Override + public int getExtendedID() { + return 8; + } + + @Override + public void onBlockNeighborChange(Block block) { + } + + @Override + public int getPartsMask() { + return super.CoverSides | 536870912; + } + + @Override + public int getSolidPartsMask() { + return super.CoverSides | 536870912; + } + + @Override + public boolean blockEmpty() { + return false; + } + + @Override + public void onHarvestPart(EntityPlayer player, int part, boolean willHarvest) { + if (part == 29) { + if (willHarvest) { + CoreLib.dropItem(super.worldObj, super.xCoord, super.yCoord, super.zCoord, new ItemStack(RedPowerBase.blockMicro, 1, this.getExtendedID() << 8)); + } + + this.flow.onRemove(); + if (super.CoverSides > 0) { + this.replaceWithCovers(); + } else { + this.deleteBlock(); + } + } else { + super.onHarvestPart(player, part, willHarvest); + } + + } + + @Override + public void addHarvestContents(List ist) { + super.addHarvestContents(ist); + ist.add(new ItemStack(RedPowerBase.blockMicro, 1, this.getExtendedID() << 8)); + } + + @Override + public float getPartStrength(EntityPlayer player, int part) { + BlockMachine bl = RedPowerMachine.blockMachine; + return part == 29 ? player.getBreakSpeed(bl, false, 0) / (bl.getHardness() * 30.0F) : super.getPartStrength(player, part); + } + + @Override + public void setPartBounds(BlockMultipart block, int part) { + if (part == 29) { + block.setBlockBounds(0.25F, 0.25F, 0.25F, 0.75F, 0.75F, 0.75F); + } else { + super.setPartBounds(block, part); + } + + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + this.flow.readFromNBT(data); + this.lastDir = data.getByte("lDir"); + this.paintColor = data.getByte("pCol"); + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + this.flow.writeToNBT(data); + data.setByte("lDir", this.lastDir); + data.setByte("pCol", this.paintColor); + } + + @Override + protected void readFromPacket(NBTTagCompound data) { + if (data.hasKey("flw")) { + this.flow.contents.clear(); + int cs = data.getInteger("cs"); + + for(int i = 0; i < cs; ++i) { + this.flow.contents.add(TubeItem.newFromPacket((NBTTagCompound)data.getTag("cs" + i))); + } + } else { + this.paintColor = data.getByte("pCol"); + super.readFromPacket(data); + } + + } + + @Override + protected void writeToPacket(NBTTagCompound data) { + if (this.hasChanged) { + this.hasChanged = false; + data.setBoolean("flw", true); + int cs = this.flow.contents.size(); + if (cs > 6) { + cs = 6; + } + + data.setInteger("cs", cs); + + for(int i = 0; i < cs; ++i) { + TubeItem ti = (TubeItem)this.flow.contents.get(i); + NBTTagCompound ftag = new NBTTagCompound(); + ti.writeToPacket(ftag); + data.setTag("cs" + i, ftag); + } + } else { + data.setByte("pCol", this.paintColor); + super.writeToPacket(data); + } + + } + + @Override + protected ItemStack getBasePickStack() { + return new ItemStack(RedPowerBase.blockMicro, 1, this.getExtendedID() << 8); + } +} diff --git a/src/main/java/com/eloraam/redpower/machine/TileWindTurbine.java b/src/main/java/com/eloraam/redpower/machine/TileWindTurbine.java new file mode 100644 index 0000000..d74b706 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/machine/TileWindTurbine.java @@ -0,0 +1,572 @@ +package com.eloraam.redpower.machine; + +import com.eloraam.redpower.RedPowerMachine; +import com.eloraam.redpower.core.BluePowerConductor; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.EnvironLib; +import com.eloraam.redpower.core.IBluePowerConnectable; +import com.eloraam.redpower.core.IMultiblock; +import com.eloraam.redpower.core.MultiLib; +import com.eloraam.redpower.core.RedPowerLib; +import com.eloraam.redpower.core.WorldCoord; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import java.util.ArrayList; +import java.util.List; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.AxisAlignedBB; + +public class TileWindTurbine extends TileMachine implements IInventory, IBluePowerConnectable, IMultiblock { + BluePowerConductor cond = new BluePowerConductor() { + @Override + public TileEntity getParent() { + return TileWindTurbine.this; + } + + @Override + public double getInvCap() { + return 0.25; + } + }; + private byte[] rayTrace = null; + private int efficiency = 0; + private int tracer = 0; + public int windSpeed = 0; + public int speed = 0; + public int phase = 0; + private int power = 0; + private int propTicks = 0; + public boolean hasBlades = false; + public boolean hasBrakes = false; + public byte windmillType = 0; + protected ItemStack[] contents = new ItemStack[1]; + public int ConMask = -1; + public int EConMask = -1; + + @Override + public int getConnectableMask() { + return 1073741823; + } + + @Override + public int getConnectClass(int side) { + return 65; + } + + @Override + public int getCornerPowerMode() { + return 2; + } + + @Override + public BluePowerConductor getBlueConductor(int side) { + return this.cond; + } + + @Override + public void setPartRotation(int part, boolean sec, int rot) { + this.teardownBlades(); + super.setPartRotation(part, sec, rot); + } + + @Override + public void onMultiRemoval(int num) { + ItemStack ist = this.contents[0]; + if (ist != null && ist.stackSize > 0) { + CoreLib.dropItem(super.worldObj, super.xCoord, super.yCoord + 1, super.zCoord, ist); + } + + this.contents[0] = null; + this.markDirty(); + this.teardownBlades(); + } + + @Override + public AxisAlignedBB getMultiBounds(int num) { + switch(this.windmillType) { + case 1: + return AxisAlignedBB.getBoundingBox(-2.5, 1.3, -2.5, 3.5, 9.0, 3.5); + case 2: + WorldCoord wc = new WorldCoord(0, 0, 0); + int right = WorldCoord.getRightDir(super.Rotation); + wc.step(super.Rotation ^ 1); + WorldCoord wc2 = wc.coordStep(super.Rotation ^ 1); + wc.step(right, 8); + wc2.step(right, -8); + return AxisAlignedBB.getBoundingBox( + (double)Math.min(wc.x, wc2.x) + 0.5, + -7.5, + Math.min((double)wc.z, (double)wc2.z + 0.5), + (double)Math.max(wc.x, wc2.x) + 0.5, + 8.5, + (double)Math.max(wc.z, wc2.z) + 0.5 + ); + default: + return AxisAlignedBB.getBoundingBox(0.0, 0.0, 0.0, 1.0, 1.0, 1.0); + } + } + + @Override + public float getMultiBlockStrength(int num, EntityPlayer player) { + return 0.08F; + } + + @Override + public int getExtendedID() { + return 9; + } + + @Override + public Block getBlockType() { + return RedPowerMachine.blockMachine; + } + + public List getRelayBlockList(int wmt) { + List tr = new ArrayList(); + int right = WorldCoord.getRightDir(super.Rotation); + switch(wmt) { + case 1: + for(int x = -3; x <= 3; ++x) { + for(int y = -3; y <= 3; ++y) { + for(int i = 1; i < 8; ++i) { + tr.add(new WorldCoord(x + super.xCoord, i + super.yCoord, y + super.zCoord)); + } + } + } + break; + case 2: + for(int x = -8; x <= 8; ++x) { + for(int y = -8; y <= 8; ++y) { + WorldCoord nc = new WorldCoord(this); + nc.step(super.Rotation ^ 1); + nc.step(right, x); + nc.y += y; + tr.add(nc); + } + } + } + + return tr; + } + + private void teardownBlades() { + this.hasBlades = false; + this.efficiency = 0; + this.speed = 0; + this.rayTrace = null; + this.updateBlock(); + List rbl = this.getRelayBlockList(this.windmillType); + MultiLib.removeRelays(super.worldObj, new WorldCoord(this), rbl); + } + + @Override + public void updateEntity() { + super.updateEntity(); + if (!super.worldObj.isRemote) { + if (!this.isTickScheduled()) { + this.scheduleTick(5); + } + + if (this.ConMask < 0) { + this.ConMask = RedPowerLib.getConnections(super.worldObj, this, super.xCoord, super.yCoord, super.zCoord); + this.EConMask = RedPowerLib.getExtConnections(super.worldObj, this, super.xCoord, super.yCoord, super.zCoord); + this.cond.recache(this.ConMask, this.EConMask); + } + + this.cond.iterate(); + this.markDirty(); + if (this.hasBlades) { + if (this.contents[0] == null || !(this.contents[0].getItem() instanceof ItemWindmill)) { + this.teardownBlades(); + return; + } + + ItemWindmill iwm = (ItemWindmill)this.contents[0].getItem(); + if (iwm.windmillType != this.windmillType) { + this.teardownBlades(); + return; + } + + if (this.propTicks <= 0) { + this.contents[0].setItemDamage(this.contents[0].getItemDamage() + 1); + if (this.contents[0].getItemDamage() > this.contents[0].getMaxDamage()) { + this.contents[0] = null; + this.markDirty(); + this.teardownBlades(); + this.contents[0] = iwm.getBrokenItem(); + this.markDirty(); + return; + } + + this.markDirty(); + this.propTicks += 6600; + } + + if (this.hasBrakes) { + return; + } + + --this.propTicks; + if (this.cond.getVoltage() > 130.0) { + return; + } + + this.cond.applyPower((double)(this.power / 5)); + } + } else if (this.hasBrakes) { + this.phase = (int)((double)this.phase + (double)this.speed * 0.1); + } else { + this.phase += this.speed; + } + + } + + private void traceAir0() { + int yh = super.yCoord + 1 + this.tracer / 28; + int xp = this.tracer % 7; + WorldCoord tp; + byte var6; + switch(this.tracer / 7 % 4) { + case 0: + var6 = 2; + tp = new WorldCoord(super.xCoord - 3 + xp, yh, super.zCoord - 4); + break; + case 1: + var6 = 4; + tp = new WorldCoord(super.xCoord - 4, yh, super.zCoord - 3 + xp); + break; + case 2: + var6 = 3; + tp = new WorldCoord(super.xCoord - 3 + xp, yh, super.zCoord + 4); + break; + default: + var6 = 5; + tp = new WorldCoord(super.xCoord + 4, yh, super.zCoord - 3 + xp); + } + + int i; + for(i = 0; i < 10 && super.worldObj.getBlock(tp.x, tp.y, tp.z) == Blocks.air; ++i) { + tp.step(var6); + } + + if (this.rayTrace == null) { + this.rayTrace = new byte[224]; + } + + this.efficiency = this.efficiency - this.rayTrace[this.tracer] + i; + this.rayTrace[this.tracer] = (byte)i; + ++this.tracer; + if (this.tracer >= 224) { + this.tracer = 0; + } + + } + + private void traceAir1() { + int yh = this.tracer / 17; + int xp = this.tracer % 17; + int dir2 = WorldCoord.getRightDir(super.Rotation); + WorldCoord tp = new WorldCoord(this); + tp.step(super.Rotation ^ 1, 2); + tp.step(dir2, xp - 8); + tp.y += yh; + + int i; + for(i = 0; i < 20 && super.worldObj.getBlock(tp.x, tp.y, tp.z) == Blocks.air; ++i) { + tp.step(super.Rotation ^ 1); + } + + if (this.rayTrace == null) { + this.rayTrace = new byte[289]; + } + + this.efficiency = this.efficiency - this.rayTrace[this.tracer] + i; + this.rayTrace[this.tracer] = (byte)i; + ++this.tracer; + if (this.tracer >= 289) { + this.tracer = 0; + } + + } + + public int getWindScaled(int i) { + return Math.min(i, i * this.windSpeed / 13333); + } + + private void tryDeployBlades() { + ItemWindmill iwm = (ItemWindmill)this.contents[0].getItem(); + if (iwm.canFaceDirection(super.Rotation)) { + List rbl = this.getRelayBlockList(iwm.windmillType); + if (MultiLib.isClear(super.worldObj, new WorldCoord(this), rbl)) { + this.windmillType = (byte)iwm.windmillType; + this.hasBlades = true; + MultiLib.addRelays(super.worldObj, new WorldCoord(this), 0, rbl); + this.updateBlock(); + } + } + + } + + @Override + public void onTileTick() { + if (!this.hasBlades && this.contents[0] != null && this.contents[0].getItem() instanceof ItemWindmill) { + this.tryDeployBlades(); + } + + if (!this.hasBrakes && this.cond.getVoltage() > 110.0) { + this.hasBrakes = true; + } else if (this.hasBrakes && this.cond.getVoltage() < 100.0) { + this.hasBrakes = false; + } + + this.windSpeed = (int)(10000.0 * EnvironLib.getWindSpeed(super.worldObj, new WorldCoord(this))); + if (this.hasBlades) { + switch(this.windmillType) { + case 1: + this.power = 2 * this.windSpeed * this.efficiency / 2240; + this.speed = this.power * this.power / 20000; + this.traceAir0(); + break; + case 2: + this.power = this.windSpeed * this.efficiency / 5780; + this.speed = this.power * this.power / 5000; + this.traceAir1(); + } + + this.updateBlock(); + } + + this.scheduleTick(20); + } + + public int getSizeInventory() { + return 1; + } + + public ItemStack getStackInSlot(int i) { + return this.contents[i]; + } + + public ItemStack decrStackSize(int i, int j) { + if (this.contents[i] == null) { + return null; + } else if (this.contents[i].stackSize <= j) { + ItemStack tr = this.contents[i]; + this.contents[i] = null; + this.markDirty(); + return tr; + } else { + ItemStack tr = this.contents[i].splitStack(j); + if (this.contents[i].stackSize == 0) { + this.contents[i] = null; + } + + this.markDirty(); + return tr; + } + } + + public ItemStack getStackInSlotOnClosing(int i) { + if (this.contents[i] == null) { + return null; + } else { + ItemStack ist = this.contents[i]; + this.contents[i] = null; + return ist; + } + } + + public void setInventorySlotContents(int i, ItemStack ist) { + this.contents[i] = ist; + if (ist != null && ist.stackSize > this.getInventoryStackLimit()) { + ist.stackSize = this.getInventoryStackLimit(); + } + + this.markDirty(); + } + + public String getInventoryName() { + return "gui.windturbine"; + } + + public int getInventoryStackLimit() { + return 64; + } + + public boolean isUseableByPlayer(EntityPlayer player) { + return !this.isInvalid() + && super.worldObj.getTileEntity(super.xCoord, super.yCoord, super.zCoord) == this + && player.getDistanceSq((double)super.xCoord + 0.5, (double)super.yCoord + 0.5, (double)super.zCoord + 0.5) <= 64.0; + } + + @Override + public void onBlockNeighborChange(Block block) { + this.ConMask = -1; + this.EConMask = -1; + } + + @Override + public boolean onBlockActivated(EntityPlayer player) { + if (player.isSneaking()) { + return false; + } else { + if (!super.worldObj.isRemote) { + player.openGui(RedPowerMachine.instance, 15, super.worldObj, super.xCoord, super.yCoord, super.zCoord); + } + + return true; + } + } + + @Override + public void onBlockRemoval() { + super.onBlockRemoval(); + if (this.hasBlades) { + this.teardownBlades(); + } + + ItemStack ist = this.contents[0]; + if (ist != null && ist.stackSize > 0) { + CoreLib.dropItem(super.worldObj, super.xCoord, super.yCoord, super.zCoord, ist); + } + + } + + @SideOnly(Side.CLIENT) + @Override + public double getMaxRenderDistanceSquared() { + return 1048576.0; + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + NBTTagList items = data.getTagList("Items", 10); + this.contents = new ItemStack[this.getSizeInventory()]; + + for(int rt = 0; rt < items.tagCount(); ++rt) { + NBTTagCompound i = items.getCompoundTagAt(rt); + int j = i.getByte("Slot") & 255; + if (j >= 0 && j < this.contents.length) { + this.contents[j] = ItemStack.loadItemStackFromNBT(i); + } + } + + this.windmillType = data.getByte("wmt"); + this.hasBlades = this.windmillType > 0; + this.efficiency = 0; + byte[] rays = data.getByteArray("rays"); + if (rays != null) { + switch(this.windmillType) { + case 1: + if (rays.length != 224) { + rays = null; + } + break; + case 2: + if (rays.length != 289) { + rays = null; + } + break; + default: + rays = null; + } + } + + this.rayTrace = rays; + if (rays != null) { + for(byte b : rays) { + this.efficiency += b; + } + } + + this.tracer = data.getInteger("tracer"); + this.speed = data.getInteger("speed"); + this.power = data.getInteger("spdpwr"); + this.propTicks = data.getInteger("proptick"); + this.cond.readFromNBT(data); + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + NBTTagList items = new NBTTagList(); + + for(int i = 0; i < this.contents.length; ++i) { + if (this.contents[i] != null) { + NBTTagCompound item = new NBTTagCompound(); + item.setByte("Slot", (byte)i); + this.contents[i].writeToNBT(item); + items.appendTag(item); + } + } + + data.setTag("Items", items); + if (!this.hasBlades) { + this.windmillType = 0; + } + + data.setByte("wmt", this.windmillType); + if (this.rayTrace != null) { + data.setByteArray("rays", this.rayTrace); + } + + data.setInteger("tracer", this.tracer); + data.setInteger("speed", this.speed); + data.setInteger("spdpwr", this.power); + data.setInteger("proptick", this.propTicks); + this.cond.writeToNBT(data); + } + + @Override + protected void readFromPacket(NBTTagCompound tag) { + super.readFromPacket(tag); + int ps = tag.getByte("ps"); + this.hasBlades = (ps & 1) > 0; + this.hasBrakes = (ps & 2) > 0; + this.windmillType = tag.getByte("wmt"); + this.speed = tag.getInteger("speed"); + } + + @Override + protected void writeToPacket(NBTTagCompound tag) { + super.writeToPacket(tag); + int ps = (this.hasBlades ? 1 : 0) | (this.hasBrakes ? 2 : 0); + tag.setByte("ps", (byte)ps); + tag.setByte("wmt", this.windmillType); + tag.setInteger("speed", this.speed); + } + + public boolean hasCustomInventoryName() { + return false; + } + + public void openInventory() { + } + + public void closeInventory() { + } + + @Override + public AxisAlignedBB getRenderBoundingBox() { + return AxisAlignedBB.getBoundingBox( + Double.NEGATIVE_INFINITY, + Double.NEGATIVE_INFINITY, + Double.NEGATIVE_INFINITY, + Double.POSITIVE_INFINITY, + Double.POSITIVE_INFINITY, + Double.POSITIVE_INFINITY + ); + } + + public boolean isItemValidForSlot(int slotID, ItemStack stack) { + return stack.getItem() == RedPowerMachine.itemWoodWindmill || stack.getItem() == RedPowerMachine.itemWoodTurbine; + } +} diff --git a/src/main/java/com/eloraam/redpower/nei/AlloyFurnaceOverlayHandler.java b/src/main/java/com/eloraam/redpower/nei/AlloyFurnaceOverlayHandler.java new file mode 100644 index 0000000..09301f4 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/nei/AlloyFurnaceOverlayHandler.java @@ -0,0 +1,24 @@ +package com.eloraam.redpower.nei; + +import codechicken.nei.PositionedStack; +import codechicken.nei.recipe.DefaultOverlayHandler; +import java.util.List; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.inventory.Slot; + +public class AlloyFurnaceOverlayHandler extends DefaultOverlayHandler { + public Slot[][] mapIngredSlots(GuiContainer gui, List ingredients) { + Slot[][] map = super.mapIngredSlots(gui, ingredients); + Slot[] ingredSlots = new Slot[9]; + + for(int i = 0; i < 9; ++i) { + ingredSlots[i] = (Slot)gui.inventorySlots.inventorySlots.get(i); + } + + for(int i = 0; i < map.length; ++i) { + map[i] = ingredSlots; + } + + return map; + } +} diff --git a/src/main/java/com/eloraam/redpower/nei/AlloyFurnaceRecipeHandler.java b/src/main/java/com/eloraam/redpower/nei/AlloyFurnaceRecipeHandler.java new file mode 100644 index 0000000..2bfb1f6 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/nei/AlloyFurnaceRecipeHandler.java @@ -0,0 +1,173 @@ +package com.eloraam.redpower.nei; + +import codechicken.lib.inventory.InventoryUtils; +import codechicken.nei.NEIServerUtils; +import codechicken.nei.PositionedStack; +import codechicken.nei.recipe.FurnaceRecipeHandler; +import codechicken.nei.recipe.ICraftingHandler; +import codechicken.nei.recipe.IUsageHandler; +import codechicken.nei.recipe.FurnaceRecipeHandler.FuelPair; +import codechicken.nei.recipe.TemplateRecipeHandler.CachedRecipe; +import codechicken.nei.recipe.TemplateRecipeHandler.RecipeTransferRect; +import com.eloraam.redpower.base.GuiAlloyFurnace; +import com.eloraam.redpower.core.CraftLib; +import com.eloraam.redpower.core.OreStack; +import cpw.mods.fml.common.FMLCommonHandler; +import java.awt.Rectangle; +import java.util.ArrayList; +import java.util.Comparator; +import java.util.List; +import net.minecraft.client.resources.I18n; +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; + +public class AlloyFurnaceRecipeHandler extends FurnaceRecipeHandler implements ICraftingHandler, IUsageHandler { + public void loadTransferRects() { + this.transferRects.add(new RecipeTransferRect(new Rectangle(11, 12, 18, 18), "fuel", new Object[0])); + this.transferRects.add(new RecipeTransferRect(new Rectangle(102, 23, 24, 18), "alloy", new Object[0])); + } + + public Class getGuiClass() { + return GuiAlloyFurnace.class; + } + + public void loadCraftingRecipes(String outputId, Object... results) { + if (outputId.equals("alloy") && this.getClass() == AlloyFurnaceRecipeHandler.class) { + for(List lrecipe : CraftLib.alloyRecipes) { + this.arecipes.add(new AlloyFurnaceRecipeHandler.CachedAlloyRecipe(lrecipe)); + } + } else { + super.loadCraftingRecipes(outputId, results); + } + + } + + public void loadCraftingRecipes(ItemStack result) { + for(List lrecipe : CraftLib.alloyRecipes) { + if (NEIServerUtils.areStacksSameTypeCrafting((ItemStack)lrecipe.get(1), result)) { + this.arecipes.add(new AlloyFurnaceRecipeHandler.CachedAlloyRecipe(lrecipe)); + } + } + + } + + public void loadUsageRecipes(String inputId, Object... ingredients) { + if (inputId.equals("fuel") && this.getClass() == AlloyFurnaceRecipeHandler.class) { + this.loadCraftingRecipes("alloy"); + } else { + super.loadUsageRecipes(inputId, ingredients); + } + + } + + public void loadUsageRecipes(ItemStack ingredient) { + for(List lrecipe : CraftLib.alloyRecipes) { + AlloyFurnaceRecipeHandler.CachedAlloyRecipe recipe = new AlloyFurnaceRecipeHandler.CachedAlloyRecipe(lrecipe); + if (recipe.contains(recipe.ingredients, ingredient)) { + this.arecipes.add(recipe); + } + } + + } + + public String getRecipeName() { + return I18n.format("tile.rpafurnace.name", new Object[0]); + } + + public String getGuiTexture() { + return "rpbase:textures/gui/afurnacegui.png"; + } + + public void drawExtras(int recipe) { + this.drawProgressBar(12, 14, 176, 0, 14, 14, 48, 7); + this.drawProgressBar(102, 23, 176, 14, 24, 16, 48, 0); + } + + public String getOverlayIdentifier() { + return "alloy"; + } + + public class AlloyDupeComparator implements Comparator> { + public int compare(List o1, List o2) { + ItemStack result1 = (ItemStack)o1.get(1); + ItemStack result2 = (ItemStack)o2.get(1); + int resultcompare = NEIServerUtils.compareStacks(result1, result2); + if (resultcompare != 0) { + return resultcompare; + } else { + ItemStack[] ingreds1 = (ItemStack[])o1.get(0); + ItemStack[] ingreds2 = (ItemStack[])o2.get(0); + int lengthcompare = Integer.valueOf(ingreds1.length).compareTo(ingreds2.length); + if (lengthcompare != 0) { + return lengthcompare; + } else { + for(int i = 0; i < ingreds1.length; ++i) { + int ingredcompare = NEIServerUtils.compareStacks(ingreds1[i], ingreds2[i]); + if (ingredcompare != 0) { + return ingredcompare; + } + } + + return 0; + } + } + } + } + + public class CachedAlloyRecipe extends CachedRecipe { + List ingredients = new ArrayList(); + ItemStack result; + + public CachedAlloyRecipe(Object[] ingreds, ItemStack result) { + super(); + + for(int i = 0; i < ingreds.length; ++i) { + Object ingred = null; + if (!(ingreds[i] instanceof OreStack)) { + if (ingreds[i] instanceof ItemStack) { + ingred = ingreds[i]; + } else { + FMLCommonHandler.instance().raiseException(new ClassCastException("not an ItemStack or OreStack"), "NEI", false); + } + } else { + OreStack ore = (OreStack)ingreds[i]; + List list = new ArrayList(OreDictionary.getOres(ore.material)); + + for(int j = 0; j < list.size(); ++j) { + list.set(j, InventoryUtils.copyStack((ItemStack)list.get(j), ore.quantity)); + } + + ingred = list; + } + + this.ingredients.add(new PositionedStack(ingred, 43 + i * 18, 6 + i / 3 * 18)); + } + + this.result = result; + } + + public CachedAlloyRecipe(List lrecipe) { + this((Object[])lrecipe.get(0), (ItemStack)lrecipe.get(1)); + } + + public PositionedStack getResult() { + return new PositionedStack(this.result, 136, 24); + } + + public List getIngredients() { + return this.ingredients; + } + + public List getOtherStacks() { + List slots = new ArrayList(); + slots.add( + new PositionedStack( + ((FuelPair)AlloyFurnaceRecipeHandler.afuels.get(AlloyFurnaceRecipeHandler.this.cycleticks / 48 % AlloyFurnaceRecipeHandler.afuels.size())).stack.item, + 12, + 31 + ) + ); + return slots; + } + } +} diff --git a/src/main/java/com/eloraam/redpower/nei/ComboGenerator.java b/src/main/java/com/eloraam/redpower/nei/ComboGenerator.java new file mode 100644 index 0000000..1682499 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/nei/ComboGenerator.java @@ -0,0 +1,90 @@ +package com.eloraam.redpower.nei; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.List; + +public class ComboGenerator { + public static List> generate(int sum) { + if (sum < 2) { + return null; + } else { + List> combos = new ArrayList(); + if (sum == 2) { + combos.add(new LinkedList(Arrays.asList(1, 1))); + return combos; + } else { + for(int base = 1; base <= sum / 2; ++base) { + label37: + for(LinkedList combo : generate(sum - base)) { + for(Integer i : combo) { + if (i < base) { + continue label37; + } + } + + combo.addFirst(base); + combos.add(combo); + } + + combos.add(new LinkedList(Arrays.asList(base, sum - base))); + } + + return combos; + } + } + } + + public static void print(List> combos) { + System.out.println("Combinations summing to: " + sum((LinkedList)combos.get(0))); + + for(LinkedList combo : combos) { + StringBuilder line = new StringBuilder(); + boolean comma = false; + + for(Integer i : combo) { + if (!comma) { + comma = true; + } else { + line.append(','); + } + + line.append(i); + } + + System.out.println(line); + } + + } + + public static List> removeNotContaining(List> combos, int required) { + Iterator> iterator = combos.iterator(); + + label23: + while(iterator.hasNext()) { + LinkedList combo = (LinkedList)iterator.next(); + + for(Integer i : combo) { + if (i == required) { + continue label23; + } + } + + iterator.remove(); + } + + return combos; + } + + private static int sum(LinkedList combo) { + int sum = 0; + + for(Integer i : combo) { + sum += i; + } + + return sum; + } +} diff --git a/src/main/java/com/eloraam/redpower/nei/MicroRecipeHandler.java b/src/main/java/com/eloraam/redpower/nei/MicroRecipeHandler.java new file mode 100644 index 0000000..00f4f97 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/nei/MicroRecipeHandler.java @@ -0,0 +1,438 @@ +package com.eloraam.redpower.nei; + +import codechicken.nei.PositionedStack; +import codechicken.nei.recipe.ShapedRecipeHandler; +import codechicken.nei.recipe.TemplateRecipeHandler.CachedRecipe; +import com.eloraam.redpower.RedPowerBase; +import com.eloraam.redpower.base.ItemHandsaw; +import com.eloraam.redpower.core.CoverLib; +import java.util.ArrayList; +import java.util.Collections; +import java.util.LinkedList; +import java.util.List; +import java.util.Random; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +public class MicroRecipeHandler extends ShapedRecipeHandler { + public static int[] covers = new int[]{0, 16, 27, 17, 28, 29, 30}; + public static int[] strips = new int[]{21, 22, 39, 23, 40, 41, 42}; + public static int[] corners = new int[]{18, 19, 35, 20, 36, 37, 38}; + public static int[] posts = new int[]{-1, 43, -1, 44, -1, 45, -1}; + public static int[] hollow = new int[]{24, 25, 31, 26, 32, 33, 34}; + public static ItemHandsaw[] saws; + public static int[] materials; + public static Random rand = new Random(); + + public MicroRecipeHandler() { + load(); + } + + public static void load() { + if (materials == null) { + List amaterial = new ArrayList(); + + for(int i = 0; i < 256; ++i) { + if (CoverLib.getItemStack(i) != null) { + amaterial.add(i); + } + } + + materials = new int[amaterial.size()]; + + for(int i = 0; i < amaterial.size(); ++i) { + materials[i] = amaterial.get(i); + } + } + + } + + public static PositionedStack position(ItemStack item, int row, int col) { + return new PositionedStack(item, 25 + col * 18, 6 + row * 18); + } + + public String getRecipeName() { + return "Microblocks"; + } + + public void loadCraftingRecipes(ItemStack ingred) { + ingred = ingred.copy(); + ingred.stackSize = 1; + if (CoverLib.getMaterial(ingred) != null) { + this.arecipes.add(new MicroRecipeHandler.GluingRecipe(covers, ingred, -1)); + this.arecipes.add(new MicroRecipeHandler.GluingRecipe(hollow, ingred, -1)); + } else if (ingred.getItem() == ItemHandsaw.getItemFromBlock(RedPowerBase.blockMicro) && isValidMicroType(ingred.getItemDamage() >> 8)) { + int type = ingred.getItemDamage() >> 8; + int material = ingred.getItemDamage() & 0xFF; + this.addCuttingRecipe(type, material); + this.addGluingRecipe(type, material); + this.addPostRecipe(type, material); + } + + } + + private void addPostRecipe(int type, int material) { + int thickness = getThickness(type); + int[] microclass = getMicroClass(type); + if (thickness % 2 == 0 && (microclass == posts || microclass == strips)) { + this.arecipes.add(new MicroRecipeHandler.PostRecipe(getMicro(type, material, 1))); + } + + } + + private void addGluingRecipe(int type, int material) { + int thickness = getThickness(type); + int[] microclass = getMicroClass(type); + if ((microclass == covers || microclass == hollow) && thickness > 1) { + this.arecipes.add(new MicroRecipeHandler.GluingRecipe(getMicroClass(type), getMicro(type, material, 1), -1)); + } + + if (thicknessPow2(thickness) && (microclass == covers || microclass == strips)) { + int[] subclass = getNextMicroClass(getMicroClass(type), false); + if (microclass == covers) { + this.arecipes + .add(new MicroRecipeHandler.GluingRecipe(getMicro(getNextMicroClass(subclass, false)[thickness - 1], material, 4), getMicro(type, material, 1))); + } + + this.arecipes.add(new MicroRecipeHandler.GluingRecipe(getMicro(subclass[thickness - 1], material, 2), getMicro(type, material, 1))); + } + + } + + private void addCuttingRecipe(int type, int material) { + int thickness = getThickness(type); + int[] microclass = getMicroClass(type); + if (microclass != covers && microclass != hollow) { + if (microclass == strips || microclass == corners) { + this.arecipes + .add( + new MicroRecipeHandler.CuttingRecipe( + getMicro(type, material, 2), getMicro(getNextMicroClass(microclass, true)[thickness - 1], material, 1), null + ) + ); + } + } else if (thickness <= 3 || microclass == covers && thickness == 4) { + this.arecipes.add(new MicroRecipeHandler.CuttingRecipe(getMicro(type, material, 2), getMicro(setThickness(type, thickness * 2), material, 1), null)); + } + + } + + public void loadUsageRecipes(ItemStack result) { + result = result.copy(); + result.stackSize = 1; + if (CoverLib.getMaterial(result) != null) { + this.arecipes.add(new MicroRecipeHandler.CuttingRecipe(getMicro(covers[3], getMaterial(result), 2), result, null)); + } else if (result.getItem() instanceof ItemHandsaw) { + this.addSawUsage(result); + } else if (result.getItem() == Item.getItemFromBlock(RedPowerBase.blockMicro) && isValidMicroType(result.getItemDamage() >> 8)) { + int type = result.getItemDamage() >> 8; + int material = result.getItemDamage() & 0xFF; + this.addCuttingUsage(type, material); + this.addGluingUsage(type, material); + this.addPostUsage(type, material); + } + + } + + private void addSawSplitting(int[] microclass, int thicknesses, ItemStack handsaw) { + for(int i = thicknesses; i >= 0; --i) { + this.arecipes.add(new MicroRecipeHandler.CuttingRecipe(setThickness(microclass[i], (i + 1) * 2), microclass[i], handsaw)); + } + + } + + private void addSawCutting(int[] microclass, ItemStack handsaw) { + int[] superclass = getNextMicroClass(microclass, true); + + for(int i = 6; i >= 0; --i) { + this.arecipes.add(new MicroRecipeHandler.CuttingRecipe(superclass[i], microclass[i], handsaw)); + } + + } + + private void addPostUsage(int type, int material) { + int thickness = getThickness(type); + int[] microclass = getMicroClass(type); + if (thickness % 2 == 0 && (microclass == posts || microclass == strips)) { + this.arecipes.add(new MicroRecipeHandler.PostRecipe(getMicro(swapPostType(type), material, 1))); + } + + } + + private void addGluingUsage(int type, int material) { + int thickness = getThickness(type); + int[] microclass = getMicroClass(type); + if (thicknessPow2(thickness) && (microclass == corners || microclass == strips)) { + int[] superclass = getNextMicroClass(microclass, true); + if (microclass == corners) { + this.arecipes + .add(new MicroRecipeHandler.GluingRecipe(getMicro(type, material, 4), getMicro(getNextMicroClass(superclass, true)[thickness - 1], material, 1))); + } + + this.arecipes.add(new MicroRecipeHandler.GluingRecipe(getMicro(type, material, 2), getMicro(superclass[thickness - 1], material, 1))); + } + + if (microclass == covers || microclass == hollow) { + for(int i = thickness + 1; i <= 8; ++i) { + this.arecipes.add(new MicroRecipeHandler.GluingRecipe(microclass, getMicro(setThickness(type, i), material, 1), thickness)); + } + } + + } + + private void addCuttingUsage(int type, int material) { + int thickness = getThickness(type); + int[] microclass = getMicroClass(type); + if (thickness % 2 == 0 && (microclass == covers || microclass == hollow)) { + this.arecipes + .add(new MicroRecipeHandler.CuttingRecipe(getMicro(setThickness(type, getThickness(type) / 2), material, 2), getMicro(type, material, 1), null)); + } + + if (microclass == covers || microclass == strips) { + this.arecipes + .add( + new MicroRecipeHandler.CuttingRecipe( + getMicro(getNextMicroClass(microclass, false)[getThickness(type) - 1], material, 2), getMicro(type, material, 1), null + ) + ); + } + + } + + private void addSawUsage(ItemStack ingredient) { + this.addSawSplitting(covers, 3, ingredient); + this.addSawSplitting(hollow, 2, ingredient); + this.addSawCutting(strips, ingredient); + this.addSawCutting(corners, ingredient); + } + + public static int swapPostType(int type) { + return containsInt(posts, type) ? strips[getThickness(type) - 1] : posts[getThickness(type) - 1]; + } + + public static boolean isValidMicroType(int type) { + return type == 0 || type >= 16 && type <= 45; + } + + public static int[] getNextMicroClass(int[] microclass, boolean higher) { + if (higher) { + if (microclass == corners) { + return strips; + } + + if (microclass == strips) { + return covers; + } + } else { + if (microclass == strips) { + return corners; + } + + if (microclass == covers) { + return strips; + } + } + + return null; + } + + public static int getMaterial(ItemStack stack) { + return stack.getItem() == Item.getItemFromBlock(CoverLib.blockCoverPlate) ? stack.getItemDamage() & 0xFF : CoverLib.getMaterial(stack); + } + + public static int getThickness(int type) { + return type == -1 ? 8 : getIndex(getMicroClass(type), type) + 1; + } + + public static int[] getMicroClass(int type) { + return containsInt(covers, type) + ? covers + : (containsInt(strips, type) ? strips : (containsInt(corners, type) ? corners : (containsInt(hollow, type) ? hollow : posts))); + } + + public static int setThickness(int type, int thickness) { + return thickness == 8 ? -1 : getMicroClass(type)[thickness - 1]; + } + + public static ItemStack getMicro(int type, int material, int quantity) { + if (type == -1) { + ItemStack stack = CoverLib.getItemStack(material).copy(); + stack.stackSize = quantity; + return stack; + } else { + return new ItemStack(CoverLib.blockCoverPlate, quantity, type << 8 | material); + } + } + + public static int getType(ItemStack stack) { + return stack.getItem() == Item.getItemFromBlock(CoverLib.blockCoverPlate) ? stack.getItemDamage() >> 8 : -1; + } + + public static boolean thicknessPow2(int thickness) { + return thickness == 1 || thickness == 2 || thickness == 4; + } + + public static boolean containsInt(int[] array, int i) { + return getIndex(array, i) != -1; + } + + public static int getIndex(int[] arr, int i) { + for(int j = 0; j < arr.length; ++j) { + if (arr[j] == i) { + return j; + } + } + + return -1; + } + + public class CuttingRecipe extends CachedRecipe { + ItemStack saw; + ItemStack ingred; + ItemStack result; + int cycletype; + List cyclemap = new ArrayList<>(); + + public CuttingRecipe(ItemStack result, ItemStack ingred, ItemStack saw) { + super(); + this.result = result; + this.ingred = ingred; + this.saw = saw; + this.cycletype = 0; + this.mapSharpSaws(); + } + + public CuttingRecipe(int typeingred, int typeresult, ItemStack saw) { + super(); + this.result = MicroRecipeHandler.getMicro(typeingred, 0, 1); + this.ingred = MicroRecipeHandler.getMicro(typeresult, 0, 2); + this.saw = saw; + this.cycletype = 1; + this.mapSoftMaterials(); + } + + public void mapSharpSaws() { + for(int i = 0; i < MicroRecipeHandler.saws.length; ++i) { + if (MicroRecipeHandler.saws[i].getSharpness() >= CoverLib.getHardness(MicroRecipeHandler.getMaterial(this.ingred))) { + this.cyclemap.add(i); + } + } + + } + + public void mapSoftMaterials() { + for(int i = 0; i < MicroRecipeHandler.materials.length; ++i) { + if (((ItemHandsaw)this.saw.getItem()).getSharpness() >= CoverLib.getHardness(MicroRecipeHandler.materials[i])) { + this.cyclemap.add(i); + } + } + + } + + public List getIngredients() { + int index = this.cyclemap.get(MicroRecipeHandler.this.cycleticks / 20 % this.cyclemap.size()); + if (this.cycletype == 0) { + this.saw = new ItemStack(MicroRecipeHandler.saws[index]); + } else { + this.ingred = MicroRecipeHandler.getMicro(MicroRecipeHandler.getType(this.ingred), MicroRecipeHandler.materials[index], 1); + } + + List ingreds = new ArrayList(); + int type = this.result.getItemDamage() >> 8; + if (!MicroRecipeHandler.containsInt(MicroRecipeHandler.covers, type) && !MicroRecipeHandler.containsInt(MicroRecipeHandler.hollow, type)) { + ingreds.add(MicroRecipeHandler.position(this.saw, 1, 0)); + } else { + ingreds.add(MicroRecipeHandler.position(this.saw, 0, 1)); + } + + ingreds.add(MicroRecipeHandler.position(this.ingred, 1, 1)); + return ingreds; + } + + public PositionedStack getResult() { + int index = this.cyclemap.get(MicroRecipeHandler.this.cycleticks / 20 % this.cyclemap.size()); + if (this.cycletype == 1) { + this.result = MicroRecipeHandler.getMicro(MicroRecipeHandler.getType(this.result), MicroRecipeHandler.materials[index], 2); + } + + return new PositionedStack(this.result, 119, 24); + } + } + + public class GluingRecipe extends CachedRecipe { + ItemStack result; + int[] microclass; + List> gluingcombos; + List ingreds = new ArrayList(); + int cycletype; + + public GluingRecipe(int[] microclass, ItemStack result, int usedthickness) { + super(); + this.result = result; + this.microclass = microclass; + this.gluingcombos = ComboGenerator.generate(MicroRecipeHandler.getThickness(MicroRecipeHandler.getType(result))); + if (usedthickness != -1) { + ComboGenerator.removeNotContaining(this.gluingcombos, usedthickness); + } + + this.cycletype = 0; + } + + public GluingRecipe(ItemStack micro, ItemStack result) { + super(); + this.result = result; + ItemStack m = micro.copy(); + m.stackSize = 1; + + for(int i = 0; i < micro.stackSize; ++i) { + int pos = i >= 2 ? i + 1 : i; + this.ingreds.add(MicroRecipeHandler.position(m, pos / 3, pos % 3)); + } + + this.cycletype = -1; + } + + public List getIngredients() { + if (this.cycletype == 0) { + this.ingreds.clear(); + int cycle = MicroRecipeHandler.this.cycleticks / 20 % this.gluingcombos.size(); + int material = MicroRecipeHandler.getMaterial(this.result); + LinkedList combo = (LinkedList)this.gluingcombos.get(cycle); + this.ingreds = new ArrayList(combo.size()); + + for(int i = 0; i < combo.size(); ++i) { + this.ingreds.add(MicroRecipeHandler.position(MicroRecipeHandler.getMicro(this.microclass[combo.get(i) - 1], material, 1), i / 3, i % 3)); + } + } + + return this.ingreds; + } + + public PositionedStack getResult() { + return new PositionedStack(this.result, 119, 24); + } + } + + public class PostRecipe extends CachedRecipe { + int type; + int material; + + public PostRecipe(ItemStack result) { + super(); + this.type = MicroRecipeHandler.getType(result); + this.material = MicroRecipeHandler.getMaterial(result); + } + + public List getIngredients() { + return new ArrayList( + Collections.singletonList( + MicroRecipeHandler.position(MicroRecipeHandler.getMicro(MicroRecipeHandler.swapPostType(this.type), this.material, 1), 1, 1) + ) + ); + } + + public PositionedStack getResult() { + return new PositionedStack(MicroRecipeHandler.getMicro(this.type, this.material, 1), 119, 24); + } + } +} diff --git a/src/main/java/com/eloraam/redpower/wiring/MicroPlacementJacket.java b/src/main/java/com/eloraam/redpower/wiring/MicroPlacementJacket.java new file mode 100644 index 0000000..5b43a17 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/wiring/MicroPlacementJacket.java @@ -0,0 +1,153 @@ +package com.eloraam.redpower.wiring; + +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.CoverLib; +import com.eloraam.redpower.core.CreativeExtraTabs; +import com.eloraam.redpower.core.IMicroPlacement; +import com.eloraam.redpower.core.RedPowerLib; +import com.eloraam.redpower.core.WorldCoord; +import java.util.List; +import net.minecraft.block.Block; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +public class MicroPlacementJacket implements IMicroPlacement { + private void blockUsed(World world, WorldCoord wc, ItemStack ist, EntityPlayer player) { + if (!player.capabilities.isCreativeMode) { + --ist.stackSize; + } + + CoreLib.placeNoise(world, wc.x, wc.y, wc.z, Block.getBlockFromItem(ist.getItem())); + world.markBlockForUpdate(wc.x, wc.y, wc.z); + RedPowerLib.updateIndirectNeighbors(world, wc.x, wc.y, wc.z, Block.getBlockFromItem(ist.getItem())); + } + + private int getWireMeta(int md) { + switch(md) { + case 64: + return 1; + case 65: + return 3; + case 66: + return 5; + default: + return 0; + } + } + + private boolean initialPlace(ItemStack ist, EntityPlayer player, World world, WorldCoord wc, int l) { + int md = ist.getItemDamage() >> 8; + Block bid = Block.getBlockFromItem(ist.getItem()); + md = this.getWireMeta(md); + if (!world.canPlaceEntityOnSide(bid, wc.x, wc.y, wc.z, false, l, player, null)) { + return false; + } else if (!world.setBlock(wc.x, wc.y, wc.z, bid, md, 3)) { + return true; + } else { + TileWiring tw = CoreLib.getTileEntity(world, wc, TileWiring.class); + if (tw == null) { + return false; + } else { + tw.CenterPost = (short)(ist.getItemDamage() & 0xFF); + tw.ConSides |= 64; + this.blockUsed(world, wc, ist, player); + return true; + } + } + } + + private boolean tryAddingJacket(World world, WorldCoord wc, ItemStack ist, EntityPlayer player) { + TileWiring tw = CoreLib.getTileEntity(world, wc, TileWiring.class); + if (tw == null) { + return false; + } else if ((tw.ConSides & 64) > 0) { + return false; + } else if (!CoverLib.checkPlacement(tw.CoverSides, tw.Covers, tw.ConSides, true)) { + return false; + } else { + tw.CenterPost = (short)(ist.getItemDamage() & 0xFF); + tw.ConSides |= 64; + tw.uncache(); + this.blockUsed(world, wc, ist, player); + return true; + } + } + + @Override + public boolean onPlaceMicro(ItemStack ist, EntityPlayer player, World world, WorldCoord wc, int size) { + int hb = ist.getItemDamage(); + hb >>= 8; + hb = this.getWireMeta(hb); + int dmg = hb << 8; + if (CoverLib.tryMakeCompatible(world, wc, Block.getBlockFromItem(ist.getItem()), dmg) && this.tryAddingJacket(world, wc, ist, player)) { + return true; + } else { + wc.step(size); + Block bid = world.getBlock(wc.x, wc.y, wc.z); + return bid != Block.getBlockFromItem(ist.getItem()) + ? this.initialPlace(ist, player, world, wc, size) + : CoverLib.tryMakeCompatible(world, wc, Block.getBlockFromItem(ist.getItem()), dmg) && this.tryAddingJacket(world, wc, ist, player); + } + } + + @Override + public String getMicroName(int hb, int lb) { + String nm; + switch(hb) { + case 64: + nm = CoverLib.getName(lb); + if (nm == null) { + return null; + } else { + if (CoverLib.isTransparent(lb)) { + return null; + } + + return "tile.rparmwire." + nm; + } + case 65: + nm = CoverLib.getName(lb); + if (nm == null) { + return null; + } else { + if (CoverLib.isTransparent(lb)) { + return null; + } + + return "tile.rparmcable." + nm; + } + case 66: + nm = CoverLib.getName(lb); + if (nm == null) { + return null; + } else { + if (CoverLib.isTransparent(lb)) { + return null; + } + + return "tile.rparmbwire." + nm; + } + default: + return null; + } + } + + @Override + public void addCreativeItems(int hb, CreativeTabs tab, List itemList) { + if (tab == CreativeExtraTabs.tabWires || tab == CreativeTabs.tabAllSearch) { + switch(hb) { + case 64: + itemList.add(new ItemStack(CoverLib.blockCoverPlate, 1, 16386)); + break; + case 65: + itemList.add(new ItemStack(CoverLib.blockCoverPlate, 1, 16666)); + break; + case 66: + itemList.add(new ItemStack(CoverLib.blockCoverPlate, 1, 16902)); + } + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/wiring/MicroPlacementWire.java b/src/main/java/com/eloraam/redpower/wiring/MicroPlacementWire.java new file mode 100644 index 0000000..9e852e4 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/wiring/MicroPlacementWire.java @@ -0,0 +1,157 @@ +package com.eloraam.redpower.wiring; + +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.CoverLib; +import com.eloraam.redpower.core.CreativeExtraTabs; +import com.eloraam.redpower.core.IMicroPlacement; +import com.eloraam.redpower.core.RedPowerLib; +import com.eloraam.redpower.core.TileCovered; +import com.eloraam.redpower.core.WorldCoord; +import java.util.List; +import net.minecraft.block.Block; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +public class MicroPlacementWire implements IMicroPlacement { + private void blockUsed(World world, WorldCoord wc, ItemStack ist) { + --ist.stackSize; + CoreLib.placeNoise(world, wc.x, wc.y, wc.z, Block.getBlockFromItem(ist.getItem())); + world.markBlockForUpdate(wc.x, wc.y, wc.z); + RedPowerLib.updateIndirectNeighbors(world, wc.x, wc.y, wc.z, Block.getBlockFromItem(ist.getItem())); + } + + private boolean initialPlace(ItemStack ist, EntityPlayer player, World world, WorldCoord wc, int l) { + int md = ist.getItemDamage() >> 8; + Block bid = Block.getBlockFromItem(ist.getItem()); + if (!world.canPlaceEntityOnSide(bid, wc.x, wc.y, wc.z, false, l, player, null)) { + return false; + } else if (!RedPowerLib.canSupportWire(world, wc.x, wc.y, wc.z, l ^ 1)) { + return false; + } else if (!world.setBlock(wc.x, wc.y, wc.z, bid, md, 3)) { + return true; + } else { + TileWiring tw = CoreLib.getTileEntity(world, wc, TileWiring.class); + if (tw == null) { + return false; + } else { + tw.ConSides = 1 << (l ^ 1); + tw.Metadata = ist.getItemDamage() & 0xFF; + this.blockUsed(world, wc, ist); + return true; + } + } + } + + @Override + public boolean onPlaceMicro(ItemStack ist, EntityPlayer player, World world, WorldCoord wc, int size) { + wc.step(size); + Block bid = world.getBlock(wc.x, wc.y, wc.z); + if (bid != Block.getBlockFromItem(ist.getItem())) { + return this.initialPlace(ist, player, world, wc, size); + } else { + TileCovered tc = CoreLib.getTileEntity(world, wc, TileCovered.class); + if (tc == null) { + return false; + } else { + int d = 1 << (size ^ 1); + if ((tc.CoverSides & d) > 0) { + return false; + } else { + int hb = ist.getItemDamage(); + if (!CoverLib.tryMakeCompatible(world, wc, Block.getBlockFromItem(ist.getItem()), hb)) { + return false; + } else { + TileWiring tw = CoreLib.getTileEntity(world, wc, TileWiring.class); + if (tw == null) { + return false; + } else if (!RedPowerLib.canSupportWire(world, wc.x, wc.y, wc.z, size ^ 1)) { + return false; + } else if (((tw.ConSides | tw.CoverSides) & d) > 0) { + return false; + } else { + d |= tw.ConSides; + int t = d & 63; + if (t == 3 || t == 12 || t == 48) { + return false; + } else if (!CoverLib.checkPlacement(tw.CoverSides, tw.Covers, t, (tw.ConSides & 64) > 0)) { + return false; + } else { + tw.ConSides = d; + tw.uncache(); + this.blockUsed(world, wc, ist); + return true; + } + } + } + } + } + } + } + + @Override + public String getMicroName(int hb, int lb) { + switch(hb) { + case 1: + switch(lb) { + case 0: + return "tile.rpwire"; + default: + return null; + } + case 2: + return "tile.rpinsulated." + CoreLib.rawColorNames[lb]; + case 3: + switch(lb) { + case 0: + return "tile.rpcable"; + default: + return "tile.rpcable." + CoreLib.rawColorNames[lb - 1]; + } + case 4: + default: + break; + case 5: + switch(lb) { + case 0: + return "tile.bluewire"; + case 1: + return "tile.bluewire10"; + case 2: + return "tile.bluewire1M"; + } + } + + return null; + } + + @Override + public void addCreativeItems(int hb, CreativeTabs tab, List items) { + if (tab == CreativeExtraTabs.tabWires || tab == CreativeTabs.tabAllSearch) { + switch(hb) { + case 1: + items.add(new ItemStack(CoverLib.blockCoverPlate, 1, 256)); + break; + case 2: + for(int i = 0; i < 16; ++i) { + items.add(new ItemStack(CoverLib.blockCoverPlate, 1, 512 + i)); + } + + return; + case 3: + for(int i = 0; i < 17; ++i) { + items.add(new ItemStack(CoverLib.blockCoverPlate, 1, 768 + i)); + } + case 4: + default: + break; + case 5: + items.add(new ItemStack(CoverLib.blockCoverPlate, 1, 1280)); + items.add(new ItemStack(CoverLib.blockCoverPlate, 1, 1281)); + items.add(new ItemStack(CoverLib.blockCoverPlate, 1, 1282)); + } + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/wiring/RenderRedwire.java b/src/main/java/com/eloraam/redpower/wiring/RenderRedwire.java new file mode 100644 index 0000000..5b76477 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/wiring/RenderRedwire.java @@ -0,0 +1,497 @@ +package com.eloraam.redpower.wiring; + +import com.eloraam.redpower.RedPowerWiring; +import com.eloraam.redpower.core.CoverRenderer; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public class RenderRedwire extends RenderWiring { + public RenderRedwire(Block block) { + super(block); + } + + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTicks) { + TileWiring wiring = (TileWiring)tile; + World world = wiring.getWorldObj(); + int metadata = wiring.getBlockMetadata(); + GL11.glDisable(2896); + Tessellator tess = Tessellator.instance; + super.context.bindBlockTexture(); + super.context.setBrightness(this.getMixedBrightness(wiring)); + super.context.setTexFlags(55); + super.context.setPos(x, y, z); + tess.startDrawingQuads(); + if (wiring.CoverSides > 0) { + super.context.setTint(1.0F, 1.0F, 1.0F); + super.context.readGlobalLights(world, wiring.xCoord, wiring.yCoord, wiring.zCoord); + this.renderCovers(wiring.CoverSides, wiring.Covers); + super.context.forceFlat = false; + super.context.lockTexture = false; + } + + if (metadata != 0) { + int indcon = wiring.getExtConnectionMask(); + int cons = wiring.getConnectionMask() | indcon; + int indconex = wiring.EConEMask; + switch(metadata) { + case 1: + TileRedwire tx = (TileRedwire)wiring; + super.context.setTint(0.3F + 0.7F * ((float)tx.PowerState / 255.0F), 0.0F, 0.0F); + this.setSideIcon(RedPowerWiring.redwireTop, RedPowerWiring.redwireFace, RedPowerWiring.redwireTop); + this.setWireSize(0.125F, 0.125F); + break; + case 2: + TileInsulatedWire tx1 = (TileInsulatedWire)wiring; + super.context.setTint(1.0F, 1.0F, 1.0F); + this.setSideIcon( + RedPowerWiring.insulatedTop[wiring.Metadata], + tx1.PowerState > 0 ? RedPowerWiring.insulatedFaceOn[wiring.Metadata] : RedPowerWiring.insulatedFaceOff[wiring.Metadata], + RedPowerWiring.insulatedTop[wiring.Metadata] + ); + this.setWireSize(0.25F, 0.188F); + break; + case 3: + super.context.setTint(1.0F, 1.0F, 1.0F); + if (wiring.Metadata == 0) { + this.setSideIcon(RedPowerWiring.bundledTop, RedPowerWiring.bundledFace, RedPowerWiring.bundledTop); + } else { + this.setSideIcon( + RedPowerWiring.bundledColTop[wiring.Metadata - 1], RedPowerWiring.bundledColFace[wiring.Metadata - 1], RedPowerWiring.bundledTop + ); + } + + this.setWireSize(0.375F, 0.25F); + case 4: + default: + break; + case 5: + super.context.setTint(1.0F, 1.0F, 1.0F); + switch(wiring.Metadata) { + case 0: + this.setSideIcon(RedPowerWiring.powerTop, RedPowerWiring.powerFace, RedPowerWiring.powerTop); + this.setWireSize(0.25F, 0.188F); + break; + case 1: + this.setSideIcon(RedPowerWiring.highPowerTop, RedPowerWiring.highPowerFace, RedPowerWiring.highPowerTop); + this.setWireSize(0.375F, 0.25F); + break; + case 2: + this.setSideIconJumbo( + RedPowerWiring.jumboSides, + RedPowerWiring.jumboTop, + RedPowerWiring.jumboCent, + RedPowerWiring.jumboCentSide, + RedPowerWiring.jumboEnd, + RedPowerWiring.jumboCorners + ); + this.setWireSize(0.5F, 0.3125F); + } + } + + this.renderWireBlock(wiring.ConSides, cons, indcon, indconex); + if ((metadata == 1 || metadata == 3 || metadata == 5) && (wiring.ConSides & 64) != 0) { + super.context.setTexFlags(0); + super.context.setOrientation(0, 0); + super.context.setTint(1.0F, 1.0F, 1.0F); + super.context.setLocalLights(0.5F, 1.0F, 0.7F, 0.7F, 0.7F, 0.7F); + IIcon icon; + switch(metadata) { + case 1: + icon = ((TileRedwire)wiring).PowerState > 0 ? RedPowerWiring.redwireCableOn : RedPowerWiring.redwireCableOff; + break; + case 3: + icon = RedPowerWiring.bundledCable; + break; + default: + icon = RedPowerWiring.bluewireCable; + } + + this.renderCenterBlock(cons >> 24 | wiring.ConSides & 63, CoverRenderer.coverIcons[wiring.CenterPost], icon); + } + } + + tess.draw(); + GL11.glEnable(2896); + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + int meta = item.getItemDamage(); + Tessellator tess = Tessellator.instance; + super.block.setBlockBoundsForItemRender(); + int bid = meta >> 8; + meta &= 255; + super.context.setDefaults(); + super.context.setTexFlags(55); + if (type == ItemRenderType.INVENTORY) { + super.context.setPos(-0.5, -0.5, -0.5); + } else { + super.context.setPos(0.0, 0.0, 0.0); + } + float th; + switch(bid) { + case 0: + case 16: + case 17: + case 27: + case 28: + case 29: + case 30: + switch(bid) { + case 0: + th = 0.063F; + break; + case 16: + th = 0.125F; + break; + case 17: + th = 0.25F; + break; + case 27: + th = 0.188F; + break; + case 28: + th = 0.313F; + break; + case 29: + th = 0.375F; + break; + case 30: + th = 0.438F; + break; + default: + return; + } + + super.context.setIcon(CoverRenderer.coverIcons[meta]); + super.context.setSize(0.0, 0.0, (double)(0.5F - th), 1.0, 1.0, (double)(0.5F + th)); + super.context.calcBounds(); + tess.startDrawingQuads(); + super.context.useNormal = true; + super.context.renderFaces(63); + super.context.useNormal = false; + tess.draw(); + return; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 46: + case 47: + case 48: + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + case 58: + case 59: + case 60: + case 61: + case 62: + case 63: + default: + if (type == ItemRenderType.INVENTORY) { + super.context.setPos(-0.5, -0.2F, -0.5); + } else { + super.context.setPos(0.0, 0.29999999701976776, 0.0); + } + + super.context.setOrientation(0, 0); + switch(bid) { + case 1: + this.setSideIcon(RedPowerWiring.redwireTop, RedPowerWiring.redwireFace, RedPowerWiring.redwireTop); + this.setWireSize(0.125F, 0.125F); + super.context.setTint(1.0F, 0.0F, 0.0F); + break; + case 2: + this.setSideIcon(RedPowerWiring.insulatedTop[meta], RedPowerWiring.insulatedFaceOff[meta], RedPowerWiring.insulatedTop[meta]); + this.setWireSize(0.25F, 0.188F); + break; + case 3: + switch(meta) { + case 0: + this.setSideIcon(RedPowerWiring.bundledTop, RedPowerWiring.bundledFace, RedPowerWiring.bundledTop); + break; + default: + this.setSideIcon(RedPowerWiring.bundledColTop[meta - 1], RedPowerWiring.bundledColFace[meta - 1], RedPowerWiring.bundledTop); + } + + this.setWireSize(0.375F, 0.25F); + break; + default: + if (bid != 5) { + return; + } + + switch(meta) { + case 0: + this.setSideIcon(RedPowerWiring.powerTop, RedPowerWiring.powerFace, RedPowerWiring.powerTop); + this.setWireSize(0.25F, 0.188F); + break; + case 1: + this.setSideIcon(RedPowerWiring.highPowerTop, RedPowerWiring.highPowerFace, RedPowerWiring.highPowerTop); + this.setWireSize(0.375F, 0.25F); + break; + case 2: + this.setSideIconJumbo( + RedPowerWiring.jumboSides, + RedPowerWiring.jumboTop, + RedPowerWiring.jumboCent, + RedPowerWiring.jumboCentSide, + RedPowerWiring.jumboEnd, + RedPowerWiring.jumboCorners + ); + this.setWireSize(0.5F, 0.3125F); + } + } + + super.context.useNormal = true; + tess.startDrawingQuads(); + this.renderSideWires(127, 0, 0); + tess.draw(); + super.context.useNormal = false; + return; + case 18: + case 19: + case 20: + case 35: + case 36: + case 37: + case 38: + switch(bid) { + case 18: + th = 0.063F; + break; + case 19: + th = 0.125F; + break; + case 20: + th = 0.25F; + break; + case 21: + case 22: + case 23: + case 24: + case 25: + case 26: + case 27: + case 28: + case 29: + case 30: + case 31: + case 32: + case 33: + case 34: + default: + return; + case 35: + th = 0.188F; + break; + case 36: + th = 0.313F; + break; + case 37: + th = 0.375F; + break; + case 38: + th = 0.438F; + } + + super.context.setIcon(CoverRenderer.coverIcons[meta]); + super.context.setSize((double)(0.5F - th), (double)(0.5F - th), (double)(0.5F - th), (double)(0.5F + th), (double)(0.5F + th), (double)(0.5F + th)); + super.context.calcBounds(); + tess.startDrawingQuads(); + super.context.useNormal = true; + super.context.renderFaces(63); + super.context.useNormal = false; + tess.draw(); + return; + case 21: + case 22: + case 23: + case 39: + case 40: + case 41: + case 42: + switch(bid) { + case 21: + th = 0.063F; + break; + case 22: + th = 0.125F; + break; + case 23: + th = 0.25F; + break; + case 24: + case 25: + case 26: + case 27: + case 28: + case 29: + case 30: + case 31: + case 32: + case 33: + case 34: + case 35: + case 36: + case 37: + case 38: + default: + return; + case 39: + th = 0.188F; + break; + case 40: + th = 0.313F; + break; + case 41: + th = 0.375F; + break; + case 42: + th = 0.438F; + } + + super.context.setIcon(CoverRenderer.coverIcons[meta]); + super.context.setSize((double)(0.5F - th), 0.0, (double)(0.5F - th), (double)(0.5F + th), 1.0, (double)(0.5F + th)); + super.context.calcBounds(); + tess.startDrawingQuads(); + super.context.useNormal = true; + super.context.renderFaces(63); + super.context.useNormal = false; + tess.draw(); + return; + case 24: + case 25: + case 26: + case 31: + case 32: + case 33: + case 34: + switch(bid) { + case 24: + th = 0.063F; + break; + case 25: + th = 0.125F; + break; + case 26: + th = 0.25F; + break; + case 27: + case 28: + case 29: + case 30: + default: + return; + case 31: + th = 0.188F; + break; + case 32: + th = 0.313F; + break; + case 33: + th = 0.375F; + break; + case 34: + th = 0.438F; + } + + super.context.setIcon(CoverRenderer.coverIcons[meta]); + tess.startDrawingQuads(); + super.context.useNormal = true; + super.context.renderBox(63, 0.0, 0.0, (double)(0.5F - th), 0.25, 1.0, (double)(0.5F + th)); + super.context.renderBox(63, 0.75, 0.0, (double)(0.5F - th), 1.0, 1.0, (double)(0.5F + th)); + super.context.renderBox(15, 0.25, 0.0, (double)(0.5F - th), 0.75, 0.25, (double)(0.5F + th)); + super.context.renderBox(15, 0.25, 0.75, (double)(0.5F - th), 0.75, 1.0, (double)(0.5F + th)); + super.context.useNormal = false; + tess.draw(); + return; + case 43: + case 44: + case 45: + switch(bid) { + case 43: + th = 0.125F; + break; + case 44: + th = 0.25F; + break; + case 45: + th = 0.375F; + break; + default: + return; + } + + super.context.setIcon(CoverRenderer.coverIcons[meta]); + super.context.setSize((double)(0.5F - th), 0.125, (double)(0.5F - th), (double)(0.5F + th), 0.875, (double)(0.5F + th)); + super.context.calcBounds(); + tess.startDrawingQuads(); + super.context.useNormal = true; + super.context.renderFaces(63); + super.context.setSize((double)(0.45F - th), 0.0, (double)(0.45F - th), (double)(0.55F + th), 0.125, (double)(0.55F + th)); + super.context.calcBounds(); + super.context.renderFaces(63); + super.context.setSize((double)(0.45F - th), 0.875, (double)(0.45F - th), (double)(0.55F + th), 1.0, (double)(0.55F + th)); + super.context.calcBounds(); + super.context.renderFaces(63); + super.context.useNormal = false; + tess.draw(); + return; + case 64: + case 65: + case 66: + super.context.setIcon(CoverRenderer.coverIcons[meta]); + tess.startDrawingQuads(); + super.context.useNormal = true; + super.context.renderBox(60, 0.25, 0.0, 0.25, 0.75, 1.0, 0.75); + super.context.renderBox(15, 0.0, 0.25, 0.25, 1.0, 0.75, 0.75); + super.context.renderBox(51, 0.25, 0.25, 0.0, 0.75, 0.75, 1.0); + tess.draw(); + tess.startDrawingQuads(); + switch(bid) { + case 64: + super.context.setIcon(RedPowerWiring.redwireCableOff); + break; + case 66: + super.context.setIcon(RedPowerWiring.bluewireCable); + break; + default: + super.context.setIcon(RedPowerWiring.bundledCable); + } + + super.context.renderBox(3, 0.25, 0.0, 0.25, 0.75, 1.0, 0.75); + super.context.renderBox(48, 0.0, 0.25, 0.25, 1.0, 0.75, 0.75); + super.context.renderBox(12, 0.25, 0.25, 0.0, 0.75, 0.75, 1.0); + tess.draw(); + super.context.useNormal = false; + } + } +} diff --git a/src/main/java/com/eloraam/redpower/wiring/RenderWiring.java b/src/main/java/com/eloraam/redpower/wiring/RenderWiring.java new file mode 100644 index 0000000..5fffe0b --- /dev/null +++ b/src/main/java/com/eloraam/redpower/wiring/RenderWiring.java @@ -0,0 +1,605 @@ +package com.eloraam.redpower.wiring; + +import com.eloraam.redpower.core.RedPowerLib; +import com.eloraam.redpower.core.RenderCovers; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.util.IIcon; + +@SideOnly(Side.CLIENT) +public abstract class RenderWiring extends RenderCovers { + private float wireWidth; + private float wireHeight; + private IIcon[][] sidetex = new IIcon[7][6]; + + public RenderWiring(Block block) { + super(block); + } + + public void setWireSize(float w, float h) { + this.wireWidth = w * 0.5F; + this.wireHeight = h; + } + + public void renderSideWire(int n) { + super.context.setLocalLights(0.5F, 1.0F, 0.7F, 0.7F, 0.7F, 0.7F); + switch(n) { + case 2: + super.context + .setSize(0.0, 0.0, (double)(0.5F - this.wireWidth), (double)(0.5F - this.wireWidth), (double)this.wireHeight, (double)(0.5F + this.wireWidth)); + super.context.calcBounds(); + super.context.renderFaces(54); + break; + case 3: + super.context + .setSize((double)(0.5F + this.wireWidth), 0.0, (double)(0.5F - this.wireWidth), 1.0, (double)this.wireHeight, (double)(0.5F + this.wireWidth)); + super.context.calcBounds(); + super.context.renderFaces(58); + break; + case 4: + super.context + .setSize((double)(0.5F - this.wireWidth), 0.0, 0.0, (double)(0.5F + this.wireWidth), (double)this.wireHeight, (double)(0.5F - this.wireWidth)); + super.context.calcBounds(); + super.context.renderFaces(30); + break; + case 5: + super.context + .setSize((double)(0.5F - this.wireWidth), 0.0, (double)(0.5F + this.wireWidth), (double)(0.5F + this.wireWidth), (double)this.wireHeight, 1.0); + super.context.calcBounds(); + super.context.renderFaces(46); + } + + } + + public void setSideIcon(IIcon top, IIcon cent, IIcon cfix) { + for(int j = 0; j < 6; ++j) { + this.sidetex[0][j] = j >> 1 == 0 ? cent : cfix; + } + + for(int i = 1; i < 3; ++i) { + for(int j = 0; j < 6; ++j) { + this.sidetex[i][j] = j >> 1 == i ? cent : top; + } + } + + for(int i = 1; i < 3; ++i) { + for(int j = 0; j < 6; ++j) { + this.sidetex[i + 2][j] = j >> 1 == i ? cent : cfix; + } + } + + for(int i = 0; i < 6; ++i) { + this.sidetex[5][i] = top; + this.sidetex[6][i] = top; + } + + this.sidetex[5][4] = cent; + this.sidetex[5][5] = cent; + this.sidetex[6][2] = cent; + this.sidetex[6][3] = cent; + this.sidetex[5][0] = cent; + this.sidetex[6][0] = cent; + super.context.setIcon(this.sidetex); + } + + public void setSideIconJumbo(IIcon sides, IIcon top, IIcon cent, IIcon centside, IIcon end, IIcon corners) { + for(int j = 0; j < 6; ++j) { + this.sidetex[0][j] = j >> 1 == 0 ? cent : centside; + } + + for(int i = 1; i < 3; ++i) { + for(int j = 0; j < 6; ++j) { + this.sidetex[i][j] = j >> 1 == 0 ? top : (j >> 1 == i ? end : sides); + } + } + + for(int i = 1; i < 3; ++i) { + for(int j = 0; j < 6; ++j) { + this.sidetex[i + 2][j] = j >> 1 == 0 ? top : (j >> 1 == i ? end : centside); + } + } + + for(int i = 0; i < 6; ++i) { + this.sidetex[5][i] = top; + this.sidetex[6][i] = top; + } + + this.sidetex[5][4] = corners; + this.sidetex[5][5] = corners; + this.sidetex[6][2] = corners; + this.sidetex[6][3] = corners; + this.sidetex[5][0] = corners; + this.sidetex[6][0] = corners; + super.context.setIcon(this.sidetex); + } + + public void renderSideWires(int cs, int ucs, int fn) { + int fxl = 0; + int fzl = 0; + int fc = 62; + int fxs1 = 0; + int fxs2 = 0; + int fzs1 = 0; + int fzs2 = 0; + byte stb = 3; + float x1 = (ucs & 4) == 0 ? 0.0F : this.wireHeight; + float x2 = (ucs & 8) == 0 ? 1.0F : 1.0F - this.wireHeight; + float z1 = (ucs & 1) == 0 ? 0.0F : this.wireHeight; + float z2 = (ucs & 2) == 0 ? 1.0F : 1.0F - this.wireHeight; + super.context.setLocalLights(0.5F, 1.0F, 0.7F, 0.7F, 0.7F, 0.7F); + cs |= ucs; + if ((cs & 12) == 0) { + fzl |= 62; + fc = 0; + if ((cs & 1) == 0) { + z1 = 0.26F; + } + + if ((cs & 2) == 0) { + z2 = 0.74F; + } + + stb = 1; + } else if ((cs & 3) == 0) { + fxl |= 62; + fc = 0; + if ((cs & 4) == 0) { + x1 = 0.26F; + } + + if ((cs & 8) == 0) { + x2 = 0.74F; + } + + stb = 1; + } else { + if ((cs & 7) == 3) { + fzl |= 28; + fc &= -17; + } else { + if ((cs & 1) > 0) { + fzs1 |= 20; + } + + if ((cs & 2) > 0) { + fzs2 |= 24; + } + } + + if ((cs & 11) == 3) { + fzl |= 44; + fc &= -33; + } else { + if ((cs & 1) > 0) { + fzs1 |= 36; + } + + if ((cs & 2) > 0) { + fzs2 |= 40; + } + } + + if ((cs & 13) == 12) { + fxl |= 52; + fc &= -5; + } else { + if ((cs & 4) > 0) { + fxs1 |= 20; + } + + if ((cs & 8) > 0) { + fxs2 |= 36; + } + } + + if ((cs & 14) == 12) { + fxl |= 56; + fc &= -9; + } else { + if ((cs & 4) > 0) { + fxs1 |= 24; + } + + if ((cs & 8) > 0) { + fxs2 |= 40; + } + } + + if ((cs & 1) > 0) { + fzs1 |= 2; + fc &= -5; + } + + if ((cs & 2) > 0) { + fzs2 |= 2; + fc &= -9; + } + + if ((cs & 4) > 0) { + fxs1 |= 2; + fc &= -17; + } + + if ((cs & 8) > 0) { + fxs2 |= 2; + fc &= -33; + } + + if ((cs & 64) > 0) { + fxs1 |= 1; + fxs2 |= 1; + fzs1 |= 1; + fzs2 |= 1; + fc |= 1; + } + } + + int tmpf = ~((ucs & 12) << 2); + fxl &= tmpf; + fxs1 &= tmpf; + fxs2 &= tmpf; + tmpf = ~((ucs & 3) << 2); + fzl &= tmpf; + fzs1 &= tmpf; + fzs2 &= tmpf; + char fxf = '讀'; + int fzf = 217640; + int fcf = 220032; + switch(fn) { + case 1: + case 2: + case 4: + fxf = 7512; + fcf = 220488; + case 3: + default: + if (fxl > 0) { + super.context.setSize((double)x1, 0.0, (double)(0.5F - this.wireWidth), (double)x2, (double)this.wireHeight, (double)(0.5F + this.wireWidth)); + super.context.calcBounds(); + super.context.setTexFlags(fxf); + super.context.setIconIndex(stb + 1); + super.context.renderFaces(fxl); + } + + if (fzl > 0) { + super.context.setSize((double)(0.5F - this.wireWidth), 0.0, (double)z1, (double)(0.5F + this.wireWidth), (double)this.wireHeight, (double)z2); + super.context.calcBounds(); + super.context.setTexFlags(fzf); + super.context.setIconIndex(stb); + super.context.renderFaces(fzl); + } + + if (fc > 0) { + super.context + .setSize( + (double)(0.5F - this.wireWidth), + 0.0, + (double)(0.5F - this.wireWidth), + (double)(0.5F + this.wireWidth), + (double)this.wireHeight, + (double)(0.5F + this.wireWidth) + ); + super.context.calcBounds(); + super.context.setTexFlags(fcf); + super.context.setIconIndex(0); + super.context.renderFaces(fc); + } + + if (fxs1 > 0) { + super.context + .setSize( + (double)x1, + 0.0, + (double)(0.5F - this.wireWidth), + (double)(0.5F - this.wireWidth), + (double)this.wireHeight, + (double)(0.5F + this.wireWidth) + ); + super.context.calcBounds(); + super.context.setTexFlags(fxf); + super.context.setIconIndex(stb + 1); + super.context.renderFaces(fxs1); + } + + if (fxs2 > 0) { + super.context + .setSize( + (double)(0.5F + this.wireWidth), + 0.0, + (double)(0.5F - this.wireWidth), + (double)x2, + (double)this.wireHeight, + (double)(0.5F + this.wireWidth) + ); + super.context.calcBounds(); + super.context.setTexFlags(fxf); + super.context.setIconIndex(stb + 1); + super.context.renderFaces(fxs2); + } + + if (fzs1 > 0) { + super.context + .setSize( + (double)(0.5F - this.wireWidth), + 0.0, + (double)z1, + (double)(0.5F + this.wireWidth), + (double)this.wireHeight, + (double)(0.5F - this.wireWidth) + ); + super.context.calcBounds(); + super.context.setTexFlags(fzf); + super.context.setIconIndex(stb); + super.context.renderFaces(fzs1); + } + + if (fzs2 > 0) { + super.context + .setSize( + (double)(0.5F - this.wireWidth), + 0.0, + (double)(0.5F + this.wireWidth), + (double)(0.5F + this.wireWidth), + (double)this.wireHeight, + (double)z2 + ); + super.context.calcBounds(); + super.context.setTexFlags(fzf); + super.context.setIconIndex(stb); + super.context.renderFaces(fzs2); + } + + if (fn < 2) { + super.context.setTexFlags(0); + } else { + if ((ucs & 2) > 0) { + super.context + .setSize( + (double)(0.5F - this.wireWidth), 0.0, (double)(1.0F - this.wireHeight), (double)(0.5F + this.wireWidth), (double)this.wireHeight, 1.0 + ); + super.context.calcBounds(); + super.context.setTexFlags(73728); + super.context.setIconIndex(5); + super.context.renderFaces(48); + } + + if ((ucs & 4) > 0) { + super.context + .setSize(0.0, 0.0, (double)(0.5F - this.wireWidth), (double)this.wireHeight, (double)this.wireHeight, (double)(0.5F + this.wireWidth)); + super.context.calcBounds(); + if (fn != 2 && fn != 4) { + super.context.setTexFlags(1728); + } else { + super.context.setTexFlags(1152); + } + + super.context.setIconIndex(6); + super.context.renderFaces(12); + } + + if ((ucs & 8) > 0) { + super.context + .setSize( + (double)(1.0F - this.wireHeight), 0.0, (double)(0.5F - this.wireWidth), 1.0, (double)this.wireHeight, (double)(0.5F + this.wireWidth) + ); + super.context.calcBounds(); + if (fn != 2 && fn != 4) { + super.context.setTexFlags(1152); + } else { + super.context.setTexFlags(1728); + } + + super.context.setIconIndex(6); + super.context.renderFaces(12); + } + + super.context.setTexFlags(0); + } + + } + } + + public void renderEndCaps(int cs, int fn) { + if (cs != 0) { + super.context.setIconIndex(5); + if ((cs & 1) > 0) { + super.context + .setSize((double)(0.5F - this.wireWidth), 0.0, (double)(1.0F - this.wireHeight), (double)(0.5F + this.wireWidth), (double)this.wireHeight, 1.0); + super.context.setRelPos(0.0, 0.0, -1.0); + super.context.setTexFlags(38444); + super.context.setLocalLights(0.7F, 1.0F, 0.7F, 1.0F, 0.7F, 0.7F); + super.context.calcBounds(); + super.context.renderFaces(55); + } + + if ((cs & 2) > 0) { + super.context.setSize((double)(0.5F - this.wireWidth), 0.0, 0.0, (double)(0.5F + this.wireWidth), (double)this.wireHeight, (double)this.wireHeight); + super.context.setRelPos(0.0, 0.0, 1.0); + super.context.setTexFlags(38444); + super.context.setLocalLights(0.7F, 1.0F, 0.7F, 1.0F, 0.7F, 0.7F); + super.context.calcBounds(); + super.context.renderFaces(59); + } + + super.context.setIconIndex(6); + if ((cs & 4) > 0) { + super.context + .setSize((double)(1.0F - this.wireHeight), 0.0, (double)(0.5F - this.wireWidth), 1.0, (double)this.wireHeight, (double)(0.5F + this.wireWidth)); + super.context.setRelPos(-1.0, 0.0, 0.0); + if (fn != 2 && fn != 4) { + super.context.setTexFlags(3); + } else { + super.context.setTexFlags(45658); + } + + super.context.setLocalLights(0.7F, 1.0F, 0.7F, 0.7F, 1.0F, 0.7F); + super.context.calcBounds(); + super.context.renderFaces(31); + } + + if ((cs & 8) > 0) { + super.context.setSize(0.0, 0.0, (double)(0.5F - this.wireWidth), (double)this.wireHeight, (double)this.wireHeight, (double)(0.5F + this.wireWidth)); + super.context.setRelPos(1.0, 0.0, 0.0); + if (fn != 2 && fn != 4) { + super.context.setTexFlags(102977); + } else { + super.context.setTexFlags(24); + } + + super.context.setLocalLights(0.7F, 1.0F, 0.7F, 0.7F, 0.7F, 1.0F); + super.context.calcBounds(); + super.context.renderFaces(47); + } + + super.context.setRelPos(0.0, 0.0, 0.0); + } + + } + + public void renderWireBlock(int consides, int cons, int indcon, int indconex) { + int ucons = 0; + indcon &= ~indconex; + if ((consides & 1) > 0) { + ucons |= 1118464; + } + + if ((consides & 2) > 0) { + ucons |= 2236928; + } + + if ((consides & 4) > 0) { + ucons |= 4456465; + } + + if ((consides & 8) > 0) { + ucons |= 8912930; + } + + if ((consides & 16) > 0) { + ucons |= 17476; + } + + if ((consides & 32) > 0) { + ucons |= 34952; + } + + if ((consides & 1) > 0) { + super.context.setOrientation(0, 0); + this.renderSideWires(RedPowerLib.mapConToLocal(cons, 0), RedPowerLib.mapConToLocal(ucons, 0), 0); + this.renderEndCaps(RedPowerLib.mapConToLocal(indconex, 0), 0); + } + + if ((consides & 2) > 0) { + super.context.setOrientation(1, 0); + this.renderSideWires(RedPowerLib.mapConToLocal(cons, 1), RedPowerLib.mapConToLocal(ucons, 1), 1); + this.renderEndCaps(RedPowerLib.mapConToLocal(indconex, 1), 1); + } + + if ((consides & 4) > 0) { + super.context.setOrientation(2, 0); + this.renderSideWires(RedPowerLib.mapConToLocal(cons, 2), RedPowerLib.mapConToLocal(ucons, 2), 2); + this.renderEndCaps(RedPowerLib.mapConToLocal(indcon, 2) & 14, 2); + this.renderEndCaps(RedPowerLib.mapConToLocal(indconex, 2), 2); + } + + if ((consides & 8) > 0) { + super.context.setOrientation(3, 0); + this.renderSideWires(RedPowerLib.mapConToLocal(cons, 3), RedPowerLib.mapConToLocal(ucons, 3), 3); + this.renderEndCaps(RedPowerLib.mapConToLocal(indcon, 3) & 14, 3); + this.renderEndCaps(RedPowerLib.mapConToLocal(indconex, 3), 3); + } + + if ((consides & 16) > 0) { + super.context.setOrientation(4, 0); + this.renderSideWires(RedPowerLib.mapConToLocal(cons, 4), RedPowerLib.mapConToLocal(ucons, 4), 4); + this.renderEndCaps(RedPowerLib.mapConToLocal(indcon, 4) & 14, 4); + this.renderEndCaps(RedPowerLib.mapConToLocal(indconex, 4), 4); + } + + if ((consides & 32) > 0) { + super.context.setOrientation(5, 0); + this.renderSideWires(RedPowerLib.mapConToLocal(cons, 5), RedPowerLib.mapConToLocal(ucons, 5), 5); + this.renderEndCaps(RedPowerLib.mapConToLocal(indcon, 5) & 14, 5); + this.renderEndCaps(RedPowerLib.mapConToLocal(indconex, 5), 5); + } + + } + + void setJacketIcons(int cons, IIcon[] tex, IIcon st) { + super.context + .setIcon( + (cons & 1) > 0 ? st : tex[0], + (cons & 2) > 0 ? st : tex[1], + (cons & 4) > 0 ? st : tex[2], + (cons & 8) > 0 ? st : tex[3], + (cons & 16) > 0 ? st : tex[4], + (cons & 32) > 0 ? st : tex[5] + ); + } + + public void renderCenterBlock(int cons, IIcon[] icon, IIcon sidtex) { + switch(cons) { + case 0: + this.setJacketIcons(3, icon, sidtex); + super.context.renderBox(63, 0.25, 0.25, 0.25, 0.75, 0.75, 0.75); + break; + case 3: + this.setJacketIcons(3, icon, sidtex); + super.context.renderBox(63, 0.25, 0.0, 0.25, 0.75, 1.0, 0.75); + break; + case 12: + this.setJacketIcons(12, icon, sidtex); + super.context.renderBox(63, 0.25, 0.25, 0.0, 0.75, 0.75, 1.0); + break; + case 48: + this.setJacketIcons(48, icon, sidtex); + super.context.renderBox(63, 0.0, 0.25, 0.25, 1.0, 0.75, 0.75); + break; + default: + if (Integer.bitCount(cons) > 1) { + super.context.setIcon(icon); + } else { + int rc = cons; + if (cons == 0) { + rc = 3; + } + + rc = (rc & 21) << 1 | (rc & 42) >> 1; + this.setJacketIcons(rc, icon, sidtex); + } + + super.context.renderBox(63 ^ cons, 0.25, 0.25, 0.25, 0.75, 0.75, 0.75); + if ((cons & 1) > 0) { + this.setJacketIcons(1, icon, sidtex); + super.context.renderBox(61, 0.25, 0.0, 0.25, 0.75, 0.25, 0.75); + } + + if ((cons & 2) > 0) { + this.setJacketIcons(2, icon, sidtex); + super.context.renderBox(62, 0.25, 0.75, 0.25, 0.75, 1.0, 0.75); + } + + if ((cons & 4) > 0) { + this.setJacketIcons(4, icon, sidtex); + super.context.renderBox(55, 0.25, 0.25, 0.0, 0.75, 0.75, 0.25); + } + + if ((cons & 8) > 0) { + this.setJacketIcons(8, icon, sidtex); + super.context.renderBox(59, 0.25, 0.25, 0.75, 0.75, 0.75, 1.0); + } + + if ((cons & 16) > 0) { + this.setJacketIcons(16, icon, sidtex); + super.context.renderBox(31, 0.0, 0.25, 0.25, 0.25, 0.75, 0.75); + } + + if ((cons & 32) > 0) { + this.setJacketIcons(32, icon, sidtex); + super.context.renderBox(47, 0.75, 0.25, 0.25, 1.0, 0.75, 0.75); + } + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/wiring/TileBluewire.java b/src/main/java/com/eloraam/redpower/wiring/TileBluewire.java new file mode 100644 index 0000000..45874a7 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/wiring/TileBluewire.java @@ -0,0 +1,169 @@ +package com.eloraam.redpower.wiring; + +import com.eloraam.redpower.core.BluePowerConductor; +import com.eloraam.redpower.core.IBluePowerConnectable; +import com.eloraam.redpower.core.RedPowerLib; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; + +public class TileBluewire extends TileWiring implements IBluePowerConnectable { + BluePowerConductor cond = new BluePowerConductor() { + @Override + public TileEntity getParent() { + return TileBluewire.this; + } + + @Override + public double getInvCap() { + switch(TileBluewire.this.Metadata) { + case 0: + return 8.0; + default: + return 800.0; + } + } + + @Override + public double getResistance() { + switch(TileBluewire.this.Metadata) { + case 0: + return 0.01; + default: + return 1.0; + } + } + + @Override + public double getIndScale() { + switch(TileBluewire.this.Metadata) { + case 0: + return 0.07; + default: + return 7.0E-4; + } + } + + @Override + public double getCondParallel() { + switch(TileBluewire.this.Metadata) { + case 0: + return 0.5; + default: + return 0.005; + } + } + }; + + @Override + public float getWireHeight() { + switch(super.Metadata) { + case 0: + return 0.188F; + case 1: + return 0.25F; + case 2: + return 0.3125F; + default: + return 0.25F; + } + } + + @Override + public int getExtendedID() { + return 5; + } + + @Override + public int getConnectClass(int side) { + switch(super.Metadata) { + case 0: + return 64; + case 1: + return 68; + default: + return 69; + } + } + + @Override + public BluePowerConductor getBlueConductor(int side) { + return this.cond; + } + + @Override + public int getConnectionMask() { + if (super.ConMask >= 0) { + return super.ConMask; + } else { + super.ConMask = RedPowerLib.getConnections(super.worldObj, this, super.xCoord, super.yCoord, super.zCoord); + if (super.EConMask < 0) { + super.EConMask = RedPowerLib.getExtConnections(super.worldObj, this, super.xCoord, super.yCoord, super.zCoord); + super.EConEMask = RedPowerLib.getExtConnectionExtras(super.worldObj, this, super.xCoord, super.yCoord, super.zCoord); + } + + if (!super.worldObj.isRemote) { + this.cond.recache(super.ConMask, super.EConMask); + } + + return super.ConMask; + } + } + + @Override + public int getExtConnectionMask() { + if (super.EConMask >= 0) { + return super.EConMask; + } else { + super.EConMask = RedPowerLib.getExtConnections(super.worldObj, this, super.xCoord, super.yCoord, super.zCoord); + super.EConEMask = RedPowerLib.getExtConnectionExtras(super.worldObj, this, super.xCoord, super.yCoord, super.zCoord); + if (super.ConMask < 0) { + super.ConMask = RedPowerLib.getConnections(super.worldObj, this, super.xCoord, super.yCoord, super.zCoord); + } + + if (!super.worldObj.isRemote) { + this.cond.recache(super.ConMask, super.EConMask); + } + + return super.EConMask; + } + } + + @Override + public boolean canUpdate() { + return true; + } + + @Override + public void updateEntity() { + if (!super.worldObj.isRemote) { + if (super.ConMask < 0 || super.EConMask < 0) { + if (super.ConMask < 0) { + super.ConMask = RedPowerLib.getConnections(super.worldObj, this, super.xCoord, super.yCoord, super.zCoord); + } + + if (super.EConMask < 0) { + super.EConMask = RedPowerLib.getExtConnections(super.worldObj, this, super.xCoord, super.yCoord, super.zCoord); + super.EConEMask = RedPowerLib.getExtConnectionExtras(super.worldObj, this, super.xCoord, super.yCoord, super.zCoord); + } + + this.cond.recache(super.ConMask, super.EConMask); + } + + this.cond.iterate(); + this.markDirty(); + } + + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + this.cond.readFromNBT(data); + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + this.cond.writeToNBT(data); + } +} diff --git a/src/main/java/com/eloraam/redpower/wiring/TileCable.java b/src/main/java/com/eloraam/redpower/wiring/TileCable.java new file mode 100644 index 0000000..50a7c72 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/wiring/TileCable.java @@ -0,0 +1,75 @@ +package com.eloraam.redpower.wiring; + +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.IRedPowerWiring; +import com.eloraam.redpower.core.RedPowerLib; +import net.minecraft.nbt.NBTTagCompound; + +public class TileCable extends TileWiring implements IRedPowerWiring { + public short[] PowerState = new short[16]; + + @Override + public float getWireHeight() { + return 0.25F; + } + + @Override + public int getExtendedID() { + return 3; + } + + @Override + public int getConnectClass(int side) { + return 18 + super.Metadata; + } + + @Override + public int scanPoweringStrength(int cons, int ch) { + return 0; + } + + @Override + public int getCurrentStrength(int cons, int ch) { + return ch >= 1 && ch <= 16 ? ((cons & this.getConnectableMask()) == 0 ? -1 : this.PowerState[ch - 1]) : -1; + } + + @Override + public void updateCurrentStrength() { + for(int ch = 0; ch < 16; ++ch) { + this.PowerState[ch] = (short)RedPowerLib.updateBlockCurrentStrength( + super.worldObj, this, super.xCoord, super.yCoord, super.zCoord, 1073741823, 2 << ch + ); + } + + CoreLib.markBlockDirty(super.worldObj, super.xCoord, super.yCoord, super.zCoord); + } + + @Override + public int getPoweringMask(int ch) { + return ch >= 1 && ch <= 16 ? (this.PowerState[ch - 1] == 0 ? 0 : this.getConnectableMask()) : 0; + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + byte[] pwr = data.getByteArray("pwrs"); + if (pwr != null) { + for(int i = 0; i < 16; ++i) { + this.PowerState[i] = (short)(pwr[i] & 255); + } + } + + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + byte[] pwr = new byte[16]; + + for(int i = 0; i < 16; ++i) { + pwr[i] = (byte)this.PowerState[i]; + } + + data.setByteArray("pwrs", pwr); + } +} diff --git a/src/main/java/com/eloraam/redpower/wiring/TileInsulatedWire.java b/src/main/java/com/eloraam/redpower/wiring/TileInsulatedWire.java new file mode 100644 index 0000000..a538766 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/wiring/TileInsulatedWire.java @@ -0,0 +1,93 @@ +package com.eloraam.redpower.wiring; + +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.IRedPowerWiring; +import com.eloraam.redpower.core.RedPowerLib; +import net.minecraft.nbt.NBTTagCompound; + +public class TileInsulatedWire extends TileWiring implements IRedPowerWiring { + public short PowerState = 0; + + @Override + public float getWireHeight() { + return 0.188F; + } + + @Override + public int getExtendedID() { + return 2; + } + + @Override + public boolean isBlockWeakPoweringTo(int side) { + if (RedPowerLib.isSearching()) { + return false; + } else { + int dir = RedPowerLib.getConDirMask(side ^ 1); + dir &= this.getConnectableMask(); + if (dir != 0) { + if (RedPowerLib.isBlockRedstone(super.worldObj, super.xCoord, super.yCoord, super.zCoord, side ^ 1)) { + if (this.PowerState > 15) { + return true; + } + } else if (this.PowerState > 0) { + return true; + } + } + + return false; + } + } + + @Override + public int getConnectClass(int side) { + return 2 + super.Metadata; + } + + @Override + public int scanPoweringStrength(int cons, int ch) { + return RedPowerLib.isPowered(super.worldObj, super.xCoord, super.yCoord, super.zCoord, cons, 0) ? 255 : 0; + } + + @Override + public int getCurrentStrength(int cons, int ch) { + return ch != 0 && ch != super.Metadata + 1 ? -1 : ((cons & this.getConnectableMask()) == 0 ? -1 : this.PowerState); + } + + @Override + public void updateCurrentStrength() { + this.PowerState = (short)RedPowerLib.updateBlockCurrentStrength( + super.worldObj, this, super.xCoord, super.yCoord, super.zCoord, 16777215, 1 | 2 << super.Metadata + ); + CoreLib.markBlockDirty(super.worldObj, super.xCoord, super.yCoord, super.zCoord); + } + + @Override + public int getPoweringMask(int ch) { + return this.PowerState == 0 ? 0 : (ch != 0 && ch != super.Metadata + 1 ? 0 : this.getConnectableMask()); + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + this.PowerState = (short)(data.getByte("pwr") & 255); + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + data.setByte("pwr", (byte)this.PowerState); + } + + @Override + protected void readFromPacket(NBTTagCompound data) { + this.PowerState = (short)(data.getByte("pwr") & 255); + super.readFromPacket(data); + } + + @Override + protected void writeToPacket(NBTTagCompound data) { + data.setByte("pwr", (byte)this.PowerState); + super.writeToPacket(data); + } +} diff --git a/src/main/java/com/eloraam/redpower/wiring/TileRedwire.java b/src/main/java/com/eloraam/redpower/wiring/TileRedwire.java new file mode 100644 index 0000000..f1bf148 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/wiring/TileRedwire.java @@ -0,0 +1,133 @@ +package com.eloraam.redpower.wiring; + +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.IRedPowerWiring; +import com.eloraam.redpower.core.RedPowerLib; +import net.minecraft.nbt.NBTTagCompound; + +public class TileRedwire extends TileWiring implements IRedPowerWiring { + public short PowerState = 0; + + @Override + public int getExtendedID() { + return 1; + } + + @Override + public boolean isBlockStrongPoweringTo(int side) { + if (RedPowerLib.isSearching()) { + return false; + } else { + int dir = 15 << ((side ^ 1) << 2); + dir &= this.getConnectableMask(); + return dir != 0 && this.PowerState > 0; + } + } + + @Override + public boolean isBlockWeakPoweringTo(int side) { + if (RedPowerLib.isSearching()) { + return false; + } else { + int dir = 15 << ((side ^ 1) << 2); + dir |= RedPowerLib.getConDirMask(side ^ 1); + dir &= this.getConnectableMask(); + if (dir != 0) { + if (RedPowerLib.isBlockRedstone(super.worldObj, super.xCoord, super.yCoord, super.zCoord, side ^ 1)) { + if (this.PowerState > 15) { + return true; + } + } else if (this.PowerState > 0) { + return true; + } + } + + return false; + } + } + + @Override + public int getConnectClass(int side) { + return 1; + } + + @Override + public int getConnectableMask() { + if (super.ConaMask >= 0) { + return super.ConaMask; + } else { + int tr = super.getConnectableMask(); + if ((super.ConSides & 1) > 0) { + tr |= 16777216; + } + + if ((super.ConSides & 2) > 0) { + tr |= 33554432; + } + + if ((super.ConSides & 4) > 0) { + tr |= 67108864; + } + + if ((super.ConSides & 8) > 0) { + tr |= 134217728; + } + + if ((super.ConSides & 16) > 0) { + tr |= 268435456; + } + + if ((super.ConSides & 32) > 0) { + tr |= 536870912; + } + + super.ConaMask = tr; + return tr; + } + } + + @Override + public int getCurrentStrength(int cons, int ch) { + return ch != 0 ? -1 : ((cons & this.getConnectableMask()) == 0 ? -1 : this.PowerState); + } + + @Override + public int scanPoweringStrength(int cons, int ch) { + return ch != 0 ? 0 : (RedPowerLib.isPowered(super.worldObj, super.xCoord, super.yCoord, super.zCoord, cons, super.ConSides) ? 255 : 0); + } + + @Override + public void updateCurrentStrength() { + this.PowerState = (short)RedPowerLib.updateBlockCurrentStrength(super.worldObj, this, super.xCoord, super.yCoord, super.zCoord, 1073741823, 1); + CoreLib.markBlockDirty(super.worldObj, super.xCoord, super.yCoord, super.zCoord); + } + + @Override + public int getPoweringMask(int ch) { + return ch == 0 && this.PowerState != 0 ? this.getConnectableMask() : 0; + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + this.PowerState = (short)(data.getByte("pwr") & 255); + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + data.setByte("pwr", (byte)this.PowerState); + } + + @Override + protected void readFromPacket(NBTTagCompound data) { + super.readFromPacket(data); + this.PowerState = (short)(data.getByte("pwr") & 255); + } + + @Override + protected void writeToPacket(NBTTagCompound data) { + super.writeToPacket(data); + data.setByte("pwr", (byte)this.PowerState); + } +} diff --git a/src/main/java/com/eloraam/redpower/wiring/TileWiring.java b/src/main/java/com/eloraam/redpower/wiring/TileWiring.java new file mode 100644 index 0000000..190c1e7 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/wiring/TileWiring.java @@ -0,0 +1,508 @@ +package com.eloraam.redpower.wiring; + +import com.eloraam.redpower.RedPowerBase; +import com.eloraam.redpower.base.BlockMicro; +import com.eloraam.redpower.core.BlockMultipart; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.CoverLib; +import com.eloraam.redpower.core.IWiring; +import com.eloraam.redpower.core.RedPowerLib; +import com.eloraam.redpower.core.TileCovered; +import java.util.Arrays; +import java.util.List; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.IBlockAccess; + +public abstract class TileWiring extends TileCovered implements IWiring { + public int ConSides = 0; + public int Metadata = 0; + public short CenterPost = 0; + public int ConMask = -1; + public int EConMask = -1; + public int EConEMask = -1; + public int ConaMask = -1; + + public float getWireHeight() { + return 0.125F; + } + + public void uncache0() { + this.EConMask = -1; + this.EConEMask = -1; + this.ConMask = -1; + } + + public void uncache() { + if (this.ConaMask >= 0 || this.EConMask >= 0 || this.ConMask >= 0) { + super.worldObj.markBlockForUpdate(super.xCoord, super.yCoord, super.zCoord); + } + + this.ConaMask = -1; + this.EConMask = -1; + this.EConEMask = -1; + this.ConMask = -1; + } + + private static int stripBlockConMask(int side) { + switch(side) { + case 0: + return 257; + case 1: + return 4098; + case 2: + return 65540; + case 3: + return 1048584; + case 4: + return 263168; + case 5: + return 540672; + case 6: + return 4196352; + case 7: + return 8421376; + case 8: + return 528; + case 9: + return 8224; + case 10: + return 131136; + default: + return 2097280; + } + } + + @Override + public int getConnectableMask() { + if (this.ConaMask >= 0) { + return this.ConaMask; + } else { + int tr = 0; + if ((this.ConSides & 1) > 0) { + tr |= 15; + } + + if ((this.ConSides & 2) > 0) { + tr |= 240; + } + + if ((this.ConSides & 4) > 0) { + tr |= 3840; + } + + if ((this.ConSides & 8) > 0) { + tr |= 61440; + } + + if ((this.ConSides & 16) > 0) { + tr |= 983040; + } + + if ((this.ConSides & 32) > 0) { + tr |= 15728640; + } + + if ((super.CoverSides & 1) > 0) { + tr &= -1118465; + } + + if ((super.CoverSides & 2) > 0) { + tr &= -2236929; + } + + if ((super.CoverSides & 4) > 0) { + tr &= -4456466; + } + + if ((super.CoverSides & 8) > 0) { + tr &= -8912931; + } + + if ((super.CoverSides & 16) > 0) { + tr &= -17477; + } + + if ((super.CoverSides & 32) > 0) { + tr &= -34953; + } + + for(int i = 0; i < 12; ++i) { + if ((super.CoverSides & 16384 << i) > 0) { + tr &= ~stripBlockConMask(i); + } + } + + if ((this.ConSides & 64) > 0) { + tr |= 1056964608; + + for(int var4 = 0; var4 < 6; ++var4) { + if ((super.CoverSides & 1 << var4) > 0) { + int j = super.Covers[var4] >> 8; + if (j < 3) { + tr &= ~(1 << var4 + 24); + } + + if (j == 5) { + tr &= 3 << (var4 & -2) + 24; + } + } + } + } + + this.ConaMask = tr; + return tr; + } + } + + @Override + public int getConnectionMask() { + if (this.ConMask >= 0) { + return this.ConMask; + } else { + this.ConMask = RedPowerLib.getConnections(super.worldObj, this, super.xCoord, super.yCoord, super.zCoord); + return this.ConMask; + } + } + + @Override + public int getExtConnectionMask() { + if (this.EConMask >= 0) { + return this.EConMask; + } else { + this.EConMask = RedPowerLib.getExtConnections(super.worldObj, this, super.xCoord, super.yCoord, super.zCoord); + this.EConEMask = RedPowerLib.getExtConnectionExtras(super.worldObj, this, super.xCoord, super.yCoord, super.zCoord); + return this.EConMask; + } + } + + @Override + public int getCornerPowerMode() { + return 1; + } + + @Override + public void onFrameRefresh(IBlockAccess iba) { + if (this.ConMask < 0) { + this.ConMask = RedPowerLib.getConnections(iba, this, super.xCoord, super.yCoord, super.zCoord); + } + + if (this.EConMask < 0) { + this.EConMask = RedPowerLib.getExtConnections(iba, this, super.xCoord, super.yCoord, super.zCoord); + this.EConEMask = RedPowerLib.getExtConnectionExtras(iba, this, super.xCoord, super.yCoord, super.zCoord); + } + + } + + @Override + public void onBlockNeighborChange(Block block) { + if (this.EConMask >= 0 || this.ConMask >= 0) { + super.worldObj.markBlockForUpdate(super.xCoord, super.yCoord, super.zCoord); + } + + this.ConMask = -1; + this.EConMask = -1; + this.EConEMask = -1; + this.refreshBlockSupport(); + RedPowerLib.updateCurrent(super.worldObj, super.xCoord, super.yCoord, super.zCoord); + this.updateBlock(); + } + + @Override + public int getExtendedMetadata() { + return this.Metadata; + } + + @Override + public void setExtendedMetadata(int md) { + this.Metadata = md; + } + + @Override + public boolean canAddCover(int side, int cover) { + if (side < 6 && (this.ConSides & 1 << side) > 0) { + return false; + } else if ((super.CoverSides & 1 << side) > 0) { + return false; + } else { + short[] test = Arrays.copyOf(super.Covers, 29); + test[side] = (short)cover; + return CoverLib.checkPlacement(super.CoverSides | 1 << side, test, this.ConSides, (this.ConSides & 64) > 0); + } + } + + @Override + public boolean tryAddCover(int side, int cover) { + if (!this.canAddCover(side, cover)) { + return false; + } else { + super.CoverSides |= 1 << side; + super.Covers[side] = (short)cover; + this.uncache(); + this.updateBlockChange(); + return true; + } + } + + @Override + public int tryRemoveCover(int side) { + int tr = super.tryRemoveCover(side); + if (tr < 0) { + return -1; + } else { + this.uncache(); + this.updateBlockChange(); + return tr; + } + } + + @Override + public boolean blockEmpty() { + return super.CoverSides == 0 && this.ConSides == 0; + } + + @Override + public void addHarvestContents(List ist) { + super.addHarvestContents(ist); + + for(int s = 0; s < 6; ++s) { + if ((this.ConSides & 1 << s) != 0) { + ist.add(new ItemStack(RedPowerBase.blockMicro, 1, this.getExtendedID() * 256 + this.Metadata)); + } + } + + if ((this.ConSides & 64) > 0) { + int td = 16384 + this.CenterPost; + if (this.getExtendedID() == 3) { + td += 256; + } + + if (this.getExtendedID() == 5) { + td += 512; + } + + ist.add(new ItemStack(RedPowerBase.blockMicro, 1, td)); + } + + } + + @Override + public int getPartsMask() { + return super.CoverSides | this.ConSides & 63 | (this.ConSides & 64) << 23; + } + + @Override + public int getSolidPartsMask() { + return super.CoverSides | (this.ConSides & 64) << 23; + } + + public boolean refreshBlockSupport() { + boolean all = false; + int s = this.ConSides & 63; + if (s == 3 || s == 12 || s == 48) { + all = true; + } + + for(int var3 = 0; var3 < 6; ++var3) { + if ((this.ConSides & 1 << var3) != 0 && (all || !RedPowerLib.canSupportWire(super.worldObj, super.xCoord, super.yCoord, super.zCoord, var3))) { + this.uncache(); + CoreLib.markBlockDirty(super.worldObj, super.xCoord, super.yCoord, super.zCoord); + CoreLib.dropItem( + super.worldObj, super.xCoord, super.yCoord, super.zCoord, new ItemStack(RedPowerBase.blockMicro, 1, this.getExtendedID() * 256 + this.Metadata) + ); + this.ConSides &= ~(1 << var3); + } + } + + if (this.ConSides == 0) { + if (super.CoverSides > 0) { + this.replaceWithCovers(); + } else { + this.deleteBlock(); + } + + return false; + } else { + return true; + } + } + + @Override + public void onHarvestPart(EntityPlayer player, int part, boolean willHarvest) { + if (part == 29 && (this.ConSides & 64) > 0) { + int td = 16384 + this.CenterPost; + if (this.getExtendedID() == 3) { + td += 256; + } + + if (this.getExtendedID() == 5) { + td += 512; + } + + if (willHarvest) { + CoreLib.dropItem(super.worldObj, super.xCoord, super.yCoord, super.zCoord, new ItemStack(RedPowerBase.blockMicro, 1, td)); + } + + this.ConSides &= 63; + } else { + if ((this.ConSides & 1 << part) <= 0) { + super.onHarvestPart(player, part, willHarvest); + return; + } + + if (willHarvest) { + CoreLib.dropItem( + super.worldObj, super.xCoord, super.yCoord, super.zCoord, new ItemStack(RedPowerBase.blockMicro, 1, this.getExtendedID() * 256 + this.Metadata) + ); + } + + this.ConSides &= ~(1 << part); + } + + this.uncache(); + if (this.ConSides == 0) { + if (super.CoverSides > 0) { + this.replaceWithCovers(); + } else { + this.deleteBlock(); + } + } + + CoreLib.markBlockDirty(super.worldObj, super.xCoord, super.yCoord, super.zCoord); + RedPowerLib.updateIndirectNeighbors(super.worldObj, super.xCoord, super.yCoord, super.zCoord, RedPowerBase.blockMicro); + } + + @Override + public float getPartStrength(EntityPlayer player, int part) { + BlockMicro bl = RedPowerBase.blockMicro; + return part == 29 && (this.ConSides & 64) > 0 + ? player.getBreakSpeed(bl, false, 0) / (bl.getHardness() * 30.0F) + : ((this.ConSides & 1 << part) > 0 ? player.getBreakSpeed(bl, false, 0) / (bl.getHardness() * 30.0F) : super.getPartStrength(player, part)); + } + + @Override + public void setPartBounds(BlockMultipart block, int part) { + if (part == 29) { + if ((this.ConSides & 64) == 0) { + super.setPartBounds(block, part); + return; + } + } else if ((this.ConSides & 1 << part) == 0) { + super.setPartBounds(block, part); + return; + } + + float wh = this.getWireHeight(); + switch(part) { + case 0: + block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, wh, 1.0F); + break; + case 1: + block.setBlockBounds(0.0F, 1.0F - wh, 0.0F, 1.0F, 1.0F, 1.0F); + break; + case 2: + block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, wh); + break; + case 3: + block.setBlockBounds(0.0F, 0.0F, 1.0F - wh, 1.0F, 1.0F, 1.0F); + break; + case 4: + block.setBlockBounds(0.0F, 0.0F, 0.0F, wh, 1.0F, 1.0F); + break; + case 5: + block.setBlockBounds(1.0F - wh, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + break; + case 29: + block.setBlockBounds(0.25F, 0.25F, 0.25F, 0.75F, 0.75F, 0.75F); + } + + } + + @Override + public void readFromNBT(NBTTagCompound data) { + super.readFromNBT(data); + this.ConSides = data.getByte("cons") & 255; + this.Metadata = data.getByte("md") & 255; + this.CenterPost = (short)(data.getByte("post") & 255); + } + + @Override + public void writeToNBT(NBTTagCompound data) { + super.writeToNBT(data); + data.setByte("cons", (byte)this.ConSides); + data.setByte("md", (byte)this.Metadata); + data.setShort("post", this.CenterPost); + } + + @Override + public void writeFramePacket(NBTTagCompound tag) { + tag.setInteger("md", this.Metadata); + tag.setInteger("cons", this.ConSides); + if ((this.ConSides & 64) > 0) { + tag.setShort("post", this.CenterPost); + } + + super.writeFramePacket(tag); + } + + @Override + public void readFramePacket(NBTTagCompound tag) { + this.Metadata = tag.getInteger("md"); + this.ConSides = tag.getInteger("cons"); + if ((this.ConSides & 64) > 0) { + this.CenterPost = tag.getShort("post"); + } + + this.ConaMask = -1; + this.EConMask = -1; + this.EConEMask = -1; + this.ConMask = -1; + super.readFramePacket(tag); + } + + @Override + protected void readFromPacket(NBTTagCompound data) { + this.Metadata = data.getInteger("md"); + this.ConSides = data.getInteger("cons"); + if ((this.ConSides & 64) > 0) { + this.CenterPost = data.getShort("post"); + } + + this.ConaMask = -1; + this.EConMask = -1; + this.EConEMask = -1; + this.ConMask = -1; + super.readFromPacket(data); + } + + @Override + protected void writeToPacket(NBTTagCompound data) { + data.setInteger("md", this.Metadata); + data.setInteger("cons", this.ConSides); + if ((this.ConSides & 64) > 0) { + data.setShort("post", this.CenterPost); + } + + super.writeToPacket(data); + } + + @Override + protected ItemStack getBasePickStack() { + if ((this.ConSides & 64) > 0) { + int td = 16384 + this.CenterPost; + if (this.getExtendedID() == 3) { + td += 256; + } + + if (this.getExtendedID() == 5) { + td += 512; + } + + return new ItemStack(RedPowerBase.blockMicro, 1, td); + } else { + return new ItemStack(RedPowerBase.blockMicro, 1, this.getExtendedID() * 256 + this.Metadata); + } + } +} diff --git a/src/main/java/com/eloraam/redpower/world/BlockBrickMossifier.java b/src/main/java/com/eloraam/redpower/world/BlockBrickMossifier.java new file mode 100644 index 0000000..3ba833f --- /dev/null +++ b/src/main/java/com/eloraam/redpower/world/BlockBrickMossifier.java @@ -0,0 +1,94 @@ +package com.eloraam.redpower.world; + +import com.eloraam.redpower.core.WorldCoord; +import java.util.Random; +import net.minecraft.block.Block; +import net.minecraft.block.BlockStoneBrick; +import net.minecraft.init.Blocks; +import net.minecraft.world.World; + +public class BlockBrickMossifier extends BlockStoneBrick { + public BlockBrickMossifier() { + this.setTickRandomly(true); + this.setHardness(1.5F); + this.setResistance(10.0F); + this.setStepSound(Block.soundTypeStone); + this.setBlockName("stonebricksmooth"); + } + + public void updateTick(World world, int i, int j, int k, Random random) { + switch(world.getBlockMetadata(i, j, k)) { + case 0: + this.crackBrick(world, i, j, k, random); + break; + case 1: + this.spreadMoss(world, i, j, k, random); + } + + } + + private void crackBrick(World world, int i, int j, int k, Random random) { + WorldCoord wc1 = new WorldCoord(i, j, k); + boolean lava = false; + boolean water = false; + + for(int n = 0; n < 6; ++n) { + WorldCoord wc2 = wc1.coordStep(n); + Block block = world.getBlock(wc2.x, wc2.y, wc2.z); + if (block == Blocks.water || block == Blocks.flowing_water) { + water = true; + } else if (block == Blocks.lava || block == Blocks.flowing_lava) { + lava = true; + } + } + + if (lava && water && random.nextInt(2) == 0) { + world.setBlock(i, j, k, this, 2, 3); + } + + } + + private void spreadMoss(World world, int i, int j, int k, Random random) { + if (world.isAirBlock(i, j + 1, k) && !world.canBlockSeeTheSky(i, j + 1, k)) { + WorldCoord wc1 = new WorldCoord(i, j, k); + + for(int n = 0; n < 4; ++n) { + WorldCoord wc2 = wc1.coordStep(2 + n); + Block block = world.getBlock(wc2.x, wc2.y, wc2.z); + Block rpb = block; + byte rpmd = 0; + if (block == Blocks.cobblestone) { + rpb = Blocks.mossy_cobblestone; + } else { + if (block != Blocks.stonebrick || world.getBlockMetadata(wc2.x, wc2.y, wc2.z) != 0) { + continue; + } + + rpmd = 1; + } + + if (world.isAirBlock(wc2.x, wc2.y + 1, wc2.z)) { + if (world.canBlockSeeTheSky(wc2.x, wc2.y + 1, wc2.z)) { + return; + } + + boolean wet = false; + + for(int m = 0; m < 4; ++m) { + WorldCoord wc3 = wc2.coordStep(2 + m); + Block bd2 = world.getBlock(wc3.x, wc3.y, wc3.z); + if (bd2 == Blocks.water || bd2 == Blocks.flowing_water) { + wet = true; + break; + } + } + + if (wet && random.nextInt(2) == 0) { + world.setBlock(wc2.x, wc2.y, wc2.z, rpb, rpmd, 3); + } + } + } + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/world/BlockCobbleMossifier.java b/src/main/java/com/eloraam/redpower/world/BlockCobbleMossifier.java new file mode 100644 index 0000000..78c6868 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/world/BlockCobbleMossifier.java @@ -0,0 +1,66 @@ +package com.eloraam.redpower.world; + +import com.eloraam.redpower.core.WorldCoord; +import java.util.Random; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.init.Blocks; +import net.minecraft.world.World; + +public class BlockCobbleMossifier extends Block { + public BlockCobbleMossifier() { + super(Material.rock); + this.setTickRandomly(true); + this.setHardness(2.0F); + this.setResistance(10.0F); + this.setStepSound(Block.soundTypeStone); + this.setBlockName("stoneMoss"); + this.setBlockTextureName("minecraft:stoneMoss"); + this.setCreativeTab(CreativeTabs.tabBlock); + } + + public void updateTick(World world, int i, int j, int k, Random random) { + if (world.isAirBlock(i, j + 1, k) && !world.canBlockSeeTheSky(i, j + 1, k)) { + WorldCoord wc1 = new WorldCoord(i, j, k); + + for(int n = 0; n < 4; ++n) { + WorldCoord wc2 = wc1.coordStep(2 + n); + Block block = world.getBlock(wc2.x, wc2.y, wc2.z); + Block rpb = block; + byte rpmd = 0; + if (block == Blocks.cobblestone) { + rpb = this; + } else { + if (block != Blocks.stonebrick || world.getBlockMetadata(wc2.x, wc2.y, wc2.z) != 0) { + continue; + } + + rpmd = 1; + } + + if (world.isAirBlock(wc2.x, wc2.y + 1, wc2.z)) { + if (world.canBlockSeeTheSky(wc2.x, wc2.y + 1, wc2.z)) { + return; + } + + boolean wet = false; + + for(int m = 0; m < 4; ++m) { + WorldCoord wc3 = wc2.coordStep(2 + m); + Block bd2 = world.getBlock(wc3.x, wc3.y, wc3.z); + if (bd2 == Blocks.water || bd2 == Blocks.flowing_water) { + wet = true; + break; + } + } + + if (wet && random.nextInt(2) == 0) { + world.setBlock(wc2.x, wc2.y, wc2.z, rpb, rpmd, 3); + } + } + } + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/world/BlockCustomCrops.java b/src/main/java/com/eloraam/redpower/world/BlockCustomCrops.java new file mode 100644 index 0000000..667e918 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/world/BlockCustomCrops.java @@ -0,0 +1,227 @@ +package com.eloraam.redpower.world; + +import com.eloraam.redpower.RedPowerWorld; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import java.util.ArrayList; +import java.util.List; +import java.util.Random; +import net.minecraft.block.Block; +import net.minecraft.block.BlockFlower; +import net.minecraft.block.IGrowable; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.IIcon; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.World; + +public class BlockCustomCrops extends BlockFlower implements IGrowable { + private IIcon[] icons = new IIcon[6]; + + public BlockCustomCrops() { + super(0); + this.setHardness(0.0F); + this.setStepSound(Block.soundTypeGrass); + this.setTickRandomly(true); + this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.25F, 1.0F); + } + + public IIcon getIcon(int side, int meta) { + if (meta > 6) { + meta = 6; + } + + return this.icons[meta]; + } + + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister register) { + for(int i = 0; i < this.icons.length; ++i) { + this.icons[i] = register.registerIcon("rpworld:flaxCrop/" + i); + } + + } + + public int getRenderType() { + return 6; + } + + public Item getItemDropped(int meta, Random random, int fortune) { + return null; + } + + public boolean fertilize(World world, int x, int y, int z) { + Random random = world.rand; + if (world.getBlockLightValue(x, y + 1, z) < 9) { + return false; + } else { + int md = world.getBlockMetadata(x, y, z); + if (md != 4 && md != 5) { + if (world.getBlock(x, y - 1, z) == Blocks.farmland && world.getBlockMetadata(x, y - 1, z) != 0 && world.isAirBlock(x, y + 1, z)) { + if (random.nextBoolean()) { + world.setBlockMetadataWithNotify(x, y, z, md + 1, 3); + if (md == 3) { + world.setBlock(x, y + 1, z, this, 1, 3); + } + + return true; + } + } else if (world.getBlock(x, y - 2, z) == Blocks.farmland + && world.getBlockMetadata(x, y - 2, z) != 0 + && world.isAirBlock(x, y + 1, z) + && random.nextBoolean()) { + if (md + 1 < 4) { + world.setBlock(x, y, z, this, md + 1, 3); + return true; + } + + if (world.getBlockMetadata(x, y, z) != 5) { + world.setBlock(x, y, z, this, 5, 3); + return true; + } + + return false; + } + } else if (world.getBlock(x, y - 1, z) == Blocks.farmland + && world.getBlockMetadata(x, y - 1, z) != 0 + && world.isAirBlock(x, y + 2, z) + && world.getBlock(x, y + 1, z) == this + && world.getBlockMetadata(x, y + 1, z) <= 3 + && random.nextBoolean()) { + int mdup = world.getBlockMetadata(x, y + 1, z); + if (mdup + 1 <= 3) { + world.setBlock(x, y + 1, z, this, mdup + 1, 3); + return true; + } + + if (world.getBlockMetadata(x, y + 1, z) != 5) { + world.setBlock(x, y + 1, z, this, 5, 3); + return true; + } + + return false; + } + + return false; + } + } + + public ArrayList getDrops(World world, int x, int y, int z, int metadata, int fortune) { + ArrayList tr = new ArrayList(); + if (metadata == 5) { + int n = 1 + world.rand.nextInt(3) + world.rand.nextInt(1 + fortune); + + while(n-- > 0) { + tr.add(new ItemStack(Items.string)); + } + } else { + for(int n = 0; n < 3 + fortune; ++n) { + if (world.rand.nextInt(8) <= metadata) { + tr.add(new ItemStack(RedPowerWorld.itemSeeds, 1, 0)); + } + } + } + + return tr; + } + + public void updateTick(World world, int x, int y, int z, Random random) { + super.updateTick(world, x, y, z, random); + if (world.getBlockLightValue(x, y + 1, z) >= 9) { + int md = world.getBlockMetadata(x, y, z); + if (md != 4 && md != 5) { + if (world.getBlock(x, y - 1, z) == Blocks.farmland && world.getBlockMetadata(x, y - 1, z) != 0 && world.isAirBlock(x, y + 1, z)) { + if (random.nextBoolean()) { + world.setBlockMetadataWithNotify(x, y, z, md + 1, 3); + if (md == 3) { + world.setBlock(x, y + 1, z, this, 1, 3); + } + } + } else if (world.getBlock(x, y - 2, z) == Blocks.farmland + && world.getBlockMetadata(x, y - 2, z) != 0 + && world.isAirBlock(x, y + 1, z) + && random.nextBoolean()) { + if (md + 1 < 4) { + world.setBlock(x, y, z, this, md + 1, 3); + } else if (world.getBlockMetadata(x, y, z) != 5) { + world.setBlock(x, y, z, this, 5, 3); + } + } + } + } + + } + + public boolean canBlockStay(World world, int x, int y, int z) { + int meta = world.getBlockMetadata(x, y, z); + if (world.getBlock(x, y - 1, z) == Blocks.farmland && world.getBlockMetadata(x, y - 1, z) > 0) { + if (meta != 4) { + return true; + } else { + int upperMeta = world.getBlockMetadata(x, y + 1, z); + return world.getBlock(x, y + 1, z) == this && upperMeta != 4 && world.getBlockLightValue(x, y + 1, z) >= 9; + } + } else if (world.getBlock(x, y - 2, z) == Blocks.farmland && world.getBlockMetadata(x, y - 2, z) > 0) { + int lowerMeta = world.getBlockMetadata(x, y - 1, z); + return world.getBlock(x, y - 1, z) == this && lowerMeta == 4 && world.getBlockLightValue(x, y, z) >= 9; + } else { + return false; + } + } + + @SideOnly(Side.CLIENT) + public void getSubBlocks(Item item, CreativeTabs tab, List items) { + } + + public AxisAlignedBB getSelectedBoundingBoxFromPool(World world, int x, int y, int z) { + int meta = world.getBlockMetadata(x, y, z); + double sy = (double)y; + double ex = (double)x + 1.0; + double ey = (double)y + 1.0; + double ez = (double)z + 1.0; + if (world.getBlock(x, y - 1, z) == this && world.getBlockMetadata(x, y - 1, z) == 4) { + --sy; + ey = (double)y + 0.25 * (double)Math.min(4, meta); + } else if (meta == 4 && world.getBlock(x, y + 1, z) == this) { + int upperMeta = world.getBlockMetadata(x, y + 1, z); + ey = (double)y + 1.0 + 0.25 * (double)Math.min(4, upperMeta == 5 ? 4 : upperMeta); + } else if (meta < 4) { + ey = (double)y + 0.25 * (double)meta; + } + + return AxisAlignedBB.getBoundingBox((double)x, sy, (double)z, ex, ey, ez); + } + + public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z, EntityPlayer player) { + return new ItemStack(RedPowerWorld.itemSeeds, 1, 0); + } + + public boolean func_149851_a(World world, int x, int y, int z, boolean isWorldRemote) { + int meta = world.getBlockMetadata(x, y, z); + if (meta != 4) { + return meta < 5; + } else { + return world.getBlock(x, y + 1, z) == this && world.getBlockMetadata(x, y + 1, z) < 5; + } + } + + public boolean func_149852_a(World world, Random rand, int x, int y, int z) { + return world.rand.nextFloat() < 0.45F; + } + + public void func_149853_b(World world, Random rand, int x, int y, int z) { + int meta = world.getBlockMetadata(x, y, z); + if (meta == 4 && world.getBlock(x, y + 1, z) == this && world.getBlockMetadata(x, y + 1, z) < 5) { + this.fertilize(world, x, y + 1, z); + } else { + this.fertilize(world, x, y, z); + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/world/BlockCustomFlower.java b/src/main/java/com/eloraam/redpower/world/BlockCustomFlower.java new file mode 100644 index 0000000..d6d2a6d --- /dev/null +++ b/src/main/java/com/eloraam/redpower/world/BlockCustomFlower.java @@ -0,0 +1,99 @@ +package com.eloraam.redpower.world; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import java.util.List; +import java.util.Random; +import net.minecraft.block.Block; +import net.minecraft.block.BlockFlower; +import net.minecraft.block.IGrowable; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import net.minecraft.world.chunk.Chunk; +import net.minecraftforge.event.terraingen.TerrainGen; + +public class BlockCustomFlower extends BlockFlower implements IGrowable { + public String[] names = new String[2]; + public IIcon[] icons = new IIcon[2]; + + public BlockCustomFlower(String... names) { + super(0); + this.names = names; + this.setHardness(0.0F); + this.setStepSound(Block.soundTypeGrass); + } + + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister registerer) { + for(int i = 0; i < 2; ++i) { + this.icons[i] = registerer.registerIcon(this.names[i]); + } + + } + + @SideOnly(Side.CLIENT) + public IIcon getIcon(int side, int meta) { + return this.icons[meta % this.icons.length]; + } + + public void updateTick(World world, int x, int y, int z, Random random) { + int md = world.getBlockMetadata(x, y, z); + if (!world.isRemote && (md == 1 || md == 2) && world.getBlockLightValue(x, y + 1, z) >= 9 && random.nextInt(300) == 0) { + if (md == 1) { + Chunk chunk = new Chunk(world, x >> 4, z >> 4); + chunk.setBlockMetadata(x, y, z, 2); + } else { + this.growTree(world, x, y, z); + } + } + + } + + public boolean growTree(World world, int x, int y, int z) { + world.setBlockToAir(x, y, z); + if (!TerrainGen.saplingGrowTree(world, world.rand, x, y, z)) { + return false; + } else { + WorldGenRubberTree wg = new WorldGenRubberTree(); + if (!wg.generate(world, world.rand, x, y, z)) { + world.setBlock(x, y, z, this, 1, 3); + return false; + } else { + return true; + } + } + } + + public int damageDropped(int i) { + return i == 2 ? 1 : i; + } + + @SideOnly(Side.CLIENT) + public void getSubBlocks(Item item, CreativeTabs tab, List items) { + items.add(new ItemStack(this, 1, 0)); + items.add(new ItemStack(this, 1, 1)); + } + + public AxisAlignedBB getCollisionBoundingBoxFromPool(World worldObj, int x, int y, int z) { + int meta = worldObj.getBlockMetadata(x, y, z); + return meta == 0 ? super.getCollisionBoundingBoxFromPool(worldObj, x, y, z) : Blocks.sapling.getCollisionBoundingBoxFromPool(worldObj, x, y, z); + } + + public boolean func_149851_a(World world, int x, int y, int z, boolean isWorldRemote) { + return world.getBlockMetadata(x, y, z) > 0; + } + + public boolean func_149852_a(World world, Random rand, int x, int y, int z) { + return (double)world.rand.nextFloat() < 0.45; + } + + public void func_149853_b(World world, Random rand, int x, int y, int z) { + this.growTree(world, x, y, z); + } +} diff --git a/src/main/java/com/eloraam/redpower/world/BlockCustomLeaves.java b/src/main/java/com/eloraam/redpower/world/BlockCustomLeaves.java new file mode 100644 index 0000000..f2b2b58 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/world/BlockCustomLeaves.java @@ -0,0 +1,138 @@ +package com.eloraam.redpower.world; + +import com.eloraam.redpower.RedPowerWorld; +import com.eloraam.redpower.core.WorldCoord; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.Random; +import net.minecraft.block.Block; +import net.minecraft.block.BlockLeaves; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +public class BlockCustomLeaves extends BlockLeaves { + private String opaque; + private IIcon opaqueIcon; + private String transparent; + private IIcon transparentIcon; + + public BlockCustomLeaves(String opaque, String transparent) { + this.opaque = opaque; + this.transparent = transparent; + this.setTickRandomly(true); + this.setHardness(0.2F); + this.setStepSound(Block.soundTypeGrass); + this.setLightOpacity(1); + } + + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister registerer) { + this.opaqueIcon = registerer.registerIcon(this.opaque); + this.transparentIcon = registerer.registerIcon(this.transparent); + } + + public boolean isOpaqueCube() { + super.field_150121_P = !Blocks.leaves.isOpaqueCube(); + return !super.field_150121_P; + } + + public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l) { + super.field_150121_P = !Blocks.leaves.isOpaqueCube(); + return super.shouldSideBeRendered(iblockaccess, i, j, k, l); + } + + public IIcon getIcon(int i, int j) { + super.field_150121_P = !Blocks.leaves.isOpaqueCube(); + return super.field_150121_P ? this.transparentIcon : this.opaqueIcon; + } + + public void breakBlock(World world, int x, int y, int z, Block block, int meta) { + if (world.getBlock(x, y, z) != this) { + updateLeaves(world, x, y, z, 1); + } + + } + + public static void updateLeaves(World world, int x, int y, int z, int radius) { + if (world.checkChunksExist(x - radius - 1, y - radius - 1, z - radius - 1, x + radius + 1, y + radius + 1, z + radius + 1)) { + for(int dx = -radius; dx <= radius; ++dx) { + for(int dy = -radius; dy <= radius; ++dy) { + for(int dz = -radius; dz <= radius; ++dz) { + if (world.getBlock(x + dx, y + dy, z + dz) == RedPowerWorld.blockLeaves) { + int md = world.getBlockMetadata(x + dx, y + dy, z + dz); + world.setBlock(x + dx, y + dy, z + dz, world.getBlock(x + dx, y + dy, z + dz), md | 8, 3); + } + } + } + } + } + + } + + public void updateTick(World world, int x, int y, int z, Random random) { + if (!world.isRemote) { + int md = world.getBlockMetadata(x, y, z); + if ((md & 8) != 0 && (md & 4) <= 0) { + HashMap wch = new HashMap(); + LinkedList fifo = new LinkedList(); + WorldCoord wc = new WorldCoord(x, y, z); + WorldCoord wcp = wc.copy(); + fifo.addLast(wc); + wch.put(wc, 4); + + while(fifo.size() > 0) { + wc = (WorldCoord)fifo.removeFirst(); + Integer stp = (Integer)wch.get(wc); + if (stp != null) { + for(int n = 0; n < 6; ++n) { + wcp.set(wc); + wcp.step(n); + if (!wch.containsKey(wcp)) { + Block block = world.getBlock(wcp.x, wcp.y, wcp.z); + if (block == RedPowerWorld.blockLogs) { + world.setBlock(x, y, z, RedPowerWorld.blockLeaves, md & -9, 3); + return; + } + + if (stp != 0 && block == this) { + wch.put(wcp, stp - 1); + fifo.addLast(wcp); + } + } + } + } + } + + this.dropBlockAsItem(world, x, y, z, md, 0); + world.setBlockToAir(x, y, z); + } + } + + } + + public Item getItemDropped(int i, Random random, int j) { + return Item.getItemFromBlock(RedPowerWorld.blockPlants); + } + + public int quantityDropped(int i, int fortune, Random random) { + return random.nextInt(20) != 0 ? 0 : 1; + } + + public int damageDropped(int i) { + return 1; + } + + public boolean isLeaves(IBlockAccess world, int x, int y, int z) { + return true; + } + + public String[] func_150125_e() { + return new String[]{this.getUnlocalizedName()}; + } +} diff --git a/src/main/java/com/eloraam/redpower/world/BlockCustomLog.java b/src/main/java/com/eloraam/redpower/world/BlockCustomLog.java new file mode 100644 index 0000000..5a68e4e --- /dev/null +++ b/src/main/java/com/eloraam/redpower/world/BlockCustomLog.java @@ -0,0 +1,54 @@ +package com.eloraam.redpower.world; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.block.BlockLog; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +public class BlockCustomLog extends BlockLog { + private String side; + private IIcon sideIcon; + private String top; + private IIcon topIcon; + + public BlockCustomLog(String side, String top) { + this.side = side; + this.top = top; + } + + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister register) { + this.sideIcon = register.registerIcon(this.side); + this.topIcon = register.registerIcon(this.top); + } + + public static int func_150165_c(int p_150165_0_) { + return p_150165_0_; + } + + @SideOnly(Side.CLIENT) + protected IIcon getSideIcon(int damage) { + return this.sideIcon; + } + + @SideOnly(Side.CLIENT) + protected IIcon getTopIcon(int damage) { + return this.topIcon; + } + + public int damageDropped(int i) { + return i == 1 ? 0 : i; + } + + public boolean isWood(IBlockAccess world, int x, int y, int z) { + return true; + } + + public void breakBlock(World world, int i, int j, int k, Block block, int meta) { + BlockCustomLeaves.updateLeaves(world, i, j, k, 4); + } +} diff --git a/src/main/java/com/eloraam/redpower/world/BlockCustomOre.java b/src/main/java/com/eloraam/redpower/world/BlockCustomOre.java new file mode 100644 index 0000000..1ec8699 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/world/BlockCustomOre.java @@ -0,0 +1,103 @@ +package com.eloraam.redpower.world; + +import com.eloraam.redpower.RedPowerBase; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import java.util.List; +import java.util.Random; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; + +public class BlockCustomOre extends Block { + private IIcon[] icons = new IIcon[8]; + + public BlockCustomOre() { + super(Material.rock); + this.setHardness(3.0F); + this.setResistance(5.0F); + this.setBlockName("rpores"); + this.setCreativeTab(CreativeTabs.tabBlock); + } + + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister register) { + for(int i = 0; i < this.icons.length; ++i) { + this.icons[i] = register.registerIcon("rpworld:ore/" + i); + } + + } + + public float getBlockHardness(World world, int x, int y, int z) { + return 3.0F; + } + + public IIcon getIcon(int side, int meta) { + return this.icons[meta]; + } + + public Item getItemDropped(int meta, Random random, int fortune) { + return (Item)(meta >= 3 && meta != 7 ? Item.getItemFromBlock(this) : RedPowerBase.itemResource); + } + + public int quantityDropped(int i, int fortune, Random random) { + if (i == 7) { + return 4 + random.nextInt(2) + random.nextInt(fortune + 1); + } else if (i < 3) { + int b = random.nextInt(fortune + 2) - 1; + if (b < 0) { + b = 0; + } + + return b + 1; + } else { + return 1; + } + } + + public int damageDropped(int i) { + return i == 7 ? 6 : i; + } + + @SideOnly(Side.CLIENT) + public void getSubBlocks(Item item, CreativeTabs tab, List list) { + for(int i = 0; i <= 7; ++i) { + list.add(new ItemStack(this, 1, i)); + } + + } + + public void dropBlockAsItemWithChance(World world, int x, int y, int z, int md, float chance, int fortune) { + super.dropBlockAsItemWithChance(world, x, y, z, md, chance, fortune); + byte min = 0; + byte max = 0; + switch(md) { + case 0: + case 1: + case 3: + case 4: + case 5: + case 6: + default: + break; + case 2: + min = 3; + max = 7; + break; + case 7: + min = 1; + max = 5; + } + + if (max > 0) { + this.dropXpOnBlockBreak(world, x, y, z, MathHelper.getRandomIntegerInRange(world.rand, min, max)); + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/world/BlockCustomStone.java b/src/main/java/com/eloraam/redpower/world/BlockCustomStone.java new file mode 100644 index 0000000..86acbba --- /dev/null +++ b/src/main/java/com/eloraam/redpower/world/BlockCustomStone.java @@ -0,0 +1,122 @@ +package com.eloraam.redpower.world; + +import com.eloraam.redpower.core.IBlockHardness; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import java.util.List; +import java.util.Random; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.World; + +public class BlockCustomStone extends Block implements IBlockHardness { + private String[] textures = new String[16]; + private IIcon[] icons = new IIcon[16]; + + public BlockCustomStone() { + super(Material.rock); + this.setHardness(3.0F); + this.setResistance(10.0F); + this.setCreativeTab(CreativeTabs.tabBlock); + } + + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister register) { + for(int i = 0; i < this.textures.length; ++i) { + if (this.textures[i] != null && !this.textures[i].trim().isEmpty()) { + this.icons[i] = register.registerIcon(this.textures[i]); + } else { + this.icons[i] = null; + } + } + + } + + @SideOnly(Side.CLIENT) + public IIcon getIcon(int side, int meta) { + return this.icons[meta]; + } + + public BlockCustomStone setBlockTexture(int meta, String textureName) { + this.textures[meta] = textureName; + return this; + } + + @Override + public float getPrototypicalHardness(int metadata) { + switch(metadata) { + case 0: + return 1.0F; + case 1: + return 2.5F; + case 2: + return 1.0F; + case 3: + return 2.5F; + case 4: + return 2.5F; + case 5: + return 2.5F; + case 6: + return 2.5F; + default: + return 3.0F; + } + } + + public float getBlockHardness(World world, int x, int y, int z) { + int md = world.getBlockMetadata(x, y, z); + return this.getPrototypicalHardness(md); + } + + public float getExplosionResistance(Entity exploder, World world, int X, int Y, int Z, double srcX, double srcY, double srcZ) { + int md = world.getBlockMetadata(X, Y, Z); + switch(md) { + case 1: + case 3: + case 4: + case 5: + case 6: + return 12.0F; + case 2: + default: + return 6.0F; + } + } + + public int getBlockTextureFromSideAndMetadata(int i, int j) { + return 16 + j; + } + + public Item getItemDropped(int meta, Random random, int fortune) { + return Item.getItemFromBlock(this); + } + + public int quantityDropped(Random random) { + return 1; + } + + public int damageDropped(int i) { + return i == 1 ? 3 : (i == 6 ? 3 : i); + } + + @SideOnly(Side.CLIENT) + public void getSubBlocks(Item item, CreativeTabs tab, List list) { + for(int i = 0; i <= 6; ++i) { + list.add(new ItemStack(this, 1, i)); + } + + } + + public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z, EntityPlayer player) { + return new ItemStack(this, 1, world.getBlockMetadata(x, y, z)); + } +} diff --git a/src/main/java/com/eloraam/redpower/world/BlockStorage.java b/src/main/java/com/eloraam/redpower/world/BlockStorage.java new file mode 100644 index 0000000..dfa19f6 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/world/BlockStorage.java @@ -0,0 +1,48 @@ +package com.eloraam.redpower.world; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import java.util.List; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + +public class BlockStorage extends Block { + private IIcon[] icons = new IIcon[8]; + + public BlockStorage() { + super(Material.iron); + this.setHardness(5.0F); + this.setResistance(10.0F); + this.setStepSound(Block.soundTypeMetal); + this.setCreativeTab(CreativeTabs.tabBlock); + } + + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister register) { + for(int i = 0; i < this.icons.length; ++i) { + this.icons[i] = register.registerIcon("rpworld:storage/" + i); + } + + } + + public IIcon getIcon(int side, int meta) { + return this.icons[meta]; + } + + public int damageDropped(int meta) { + return meta; + } + + @SideOnly(Side.CLIENT) + public void getSubBlocks(Item item, CreativeTabs tab, List items) { + for(int i = 0; i < 8; ++i) { + items.add(new ItemStack(this, 1, i)); + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/world/ContainerSeedBag.java b/src/main/java/com/eloraam/redpower/world/ContainerSeedBag.java new file mode 100644 index 0000000..e0e684a --- /dev/null +++ b/src/main/java/com/eloraam/redpower/world/ContainerSeedBag.java @@ -0,0 +1,110 @@ +package com.eloraam.redpower.world; + +import com.eloraam.redpower.core.SlotLocked; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class ContainerSeedBag extends Container { + private ItemStack itemBag; + private IInventory baginv; + private int hotbarIndex; + + public ContainerSeedBag(InventoryPlayer inv, IInventory bag, ItemStack stack) { + this.baginv = bag; + + for(int i = 0; i < 3; ++i) { + for(int j = 0; j < 3; ++j) { + this.addSlotToContainer(new ContainerSeedBag.SlotSeeds(bag, j + i * 3, 62 + j * 18, 17 + i * 18)); + } + } + + for(int i = 0; i < 3; ++i) { + for(int j = 0; j < 9; ++j) { + this.addSlotToContainer(new Slot(inv, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); + } + } + + for(int i = 0; i < 9; ++i) { + if (inv.currentItem == i) { + this.addSlotToContainer(new SlotLocked(inv, i, 8 + i * 18, 142)); + } else { + this.addSlotToContainer(new Slot(inv, i, 8 + i * 18, 142)); + } + } + + this.itemBag = stack; + this.hotbarIndex = inv.currentItem; + } + + public boolean canInteractWith(EntityPlayer player) { + return player.inventory.getCurrentItem() == this.itemBag; + } + + public ItemStack transferStackInSlot(EntityPlayer player, int slotId) { + if (!player.worldObj.isRemote && this.itemBag != player.getHeldItem()) { + player.closeScreen(); + return null; + } else { + ItemStack result = null; + Slot slot = (Slot)super.inventorySlots.get(slotId); + if (slot != null && slot.getHasStack()) { + ItemStack outStack = slot.getStack(); + if (!ItemSeedBag.canAdd(this.baginv, outStack)) { + return null; + } + + result = outStack.copy(); + if (slotId < 9) { + if (!this.mergeItemStack(outStack, 9, 45, true)) { + return null; + } + } else if (!this.mergeItemStack(outStack, 0, 9, false)) { + return null; + } + + if (outStack.stackSize == 0) { + slot.putStack(null); + } else { + slot.onSlotChanged(); + } + + if (outStack.stackSize == result.stackSize) { + return null; + } + + slot.onPickupFromSlot(player, outStack); + } + + return result; + } + } + + public ItemStack slotClick(int slotId, int dragModeOrBtn, int mode, EntityPlayer player) { + if (!this.canInteractWith(player)) { + return null; + } else { + if (mode == 2 && dragModeOrBtn >= 0 && dragModeOrBtn < 9) { + Slot hotbarSlot = this.getSlot(36 + dragModeOrBtn); + if (hotbarSlot instanceof SlotLocked) { + return null; + } + } + + return super.slotClick(slotId, dragModeOrBtn, mode, player); + } + } + + public static class SlotSeeds extends Slot { + public SlotSeeds(IInventory inv, int par2, int par3, int par4) { + super(inv, par2, par3, par4); + } + + public boolean isItemValid(ItemStack ist) { + return ItemSeedBag.canAdd(super.inventory, ist); + } + } +} diff --git a/src/main/java/com/eloraam/redpower/world/EnchantmentDisjunction.java b/src/main/java/com/eloraam/redpower/world/EnchantmentDisjunction.java new file mode 100644 index 0000000..63b9afc --- /dev/null +++ b/src/main/java/com/eloraam/redpower/world/EnchantmentDisjunction.java @@ -0,0 +1,37 @@ +package com.eloraam.redpower.world; + +import com.eloraam.redpower.RedPowerWorld; +import net.minecraft.enchantment.Enchantment; +import net.minecraft.enchantment.EnchantmentDamage; +import net.minecraft.enchantment.EnumEnchantmentType; +import net.minecraft.item.ItemStack; + +public class EnchantmentDisjunction extends Enchantment { + public EnchantmentDisjunction(int i, int j) { + super(i, j, EnumEnchantmentType.weapon); + } + + public int getMinEnchantability(int i) { + return 5 + 8 * i; + } + + public int getMaxEnchantability(int i) { + return this.getMinEnchantability(i) + 20; + } + + public int getMaxLevel() { + return 5; + } + + public String getName() { + return "enchantment.damage.disjunction"; + } + + public boolean canApply(ItemStack ist) { + return ist.getItem() == RedPowerWorld.itemAthame; + } + + public boolean canApplyTogether(Enchantment enchantment) { + return enchantment == this ? false : !(enchantment instanceof EnchantmentDamage); + } +} diff --git a/src/main/java/com/eloraam/redpower/world/EnchantmentVorpal.java b/src/main/java/com/eloraam/redpower/world/EnchantmentVorpal.java new file mode 100644 index 0000000..00a1c2b --- /dev/null +++ b/src/main/java/com/eloraam/redpower/world/EnchantmentVorpal.java @@ -0,0 +1,43 @@ +package com.eloraam.redpower.world; + +import net.minecraft.enchantment.Enchantment; +import net.minecraft.enchantment.EnchantmentDamage; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.util.DamageSource; + +public class EnchantmentVorpal extends EnchantmentDamage { + public EnchantmentVorpal(int i, int j) { + super(i, j, 0); + } + + public int getMinEnchantability(int i) { + return 20 + 10 * (i - 1); + } + + public int getMaxEnchantability(int i) { + return this.getMinEnchantability(i) + 50; + } + + public int getMaxLevel() { + return 4; + } + + public void func_151368_a(EntityLivingBase attacker, Entity target, int damage) { + if (target instanceof EntityLivingBase) { + EntityLivingBase targetLiving = (EntityLivingBase)target; + if (target.worldObj.rand.nextInt(100) < 2 * damage * damage) { + targetLiving.attackEntityFrom(DamageSource.magic, 100.0F); + } + } + + } + + public String getName() { + return "enchantment.damage.vorpal"; + } + + public boolean canApplyTogether(Enchantment enchantment) { + return enchantment != this; + } +} diff --git a/src/main/java/com/eloraam/redpower/world/GuiSeedBag.java b/src/main/java/com/eloraam/redpower/world/GuiSeedBag.java new file mode 100644 index 0000000..6c1fe08 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/world/GuiSeedBag.java @@ -0,0 +1,36 @@ +package com.eloraam.redpower.world; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.IInventory; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; + +public class GuiSeedBag extends GuiContainer { + private static final ResourceLocation res = new ResourceLocation("textures/gui/container/dispenser.png"); + + public GuiSeedBag(InventoryPlayer pli, IInventory td) { + super(new ContainerSeedBag(pli, td, null)); + super.ySize = 167; + } + + public GuiSeedBag(Container cn) { + super(cn); + super.ySize = 167; + } + + protected void drawGuiContainerForegroundLayer(int p1, int p2) { + super.fontRendererObj.drawString(I18n.format("item.rpSeedBag.name", new Object[0]), 65, 6, 4210752); + super.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, super.ySize - 94 + 2, 4210752); + } + + protected void drawGuiContainerBackgroundLayer(float f, int p1, int p2) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + super.mc.renderEngine.bindTexture(res); + int j = (super.width - super.xSize) / 2; + int k = (super.height - super.ySize) / 2; + this.drawTexturedModalRect(j, k, 0, 0, super.xSize, super.ySize); + } +} diff --git a/src/main/java/com/eloraam/redpower/world/ItemAthame.java b/src/main/java/com/eloraam/redpower/world/ItemAthame.java new file mode 100644 index 0000000..b369d33 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/world/ItemAthame.java @@ -0,0 +1,48 @@ +package com.eloraam.redpower.world; + +import com.eloraam.redpower.RedPowerBase; +import com.google.common.collect.HashMultimap; +import com.google.common.collect.Multimap; +import net.minecraft.block.Block; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.boss.EntityDragon; +import net.minecraft.entity.monster.EntityEnderman; +import net.minecraft.item.ItemStack; +import net.minecraft.item.ItemSword; +import net.minecraft.item.Item.ToolMaterial; +import net.minecraft.util.DamageSource; + +public class ItemAthame extends ItemSword { + public ItemAthame() { + super(ToolMaterial.EMERALD); + this.setMaxDamage(100); + this.setTextureName("rpworld:athame"); + this.setCreativeTab(CreativeTabs.tabCombat); + } + + public float func_150893_a(ItemStack stack, Block block) { + return 1.0F; + } + + public boolean hitEntity(ItemStack stack, EntityLivingBase victim, EntityLivingBase hunter) { + stack.damageItem(1, hunter); + if (victim instanceof EntityEnderman || victim instanceof EntityDragon) { + victim.attackEntityFrom(DamageSource.causeMobDamage(hunter), 25.0F); + } + + return true; + } + + public boolean getIsRepairable(ItemStack ist1, ItemStack ist2) { + return ist2.isItemEqual(RedPowerBase.itemIngotSilver); + } + + public int getItemEnchantability() { + return 30; + } + + public Multimap getAttributeModifiers(ItemStack stack) { + return HashMultimap.create(); + } +} diff --git a/src/main/java/com/eloraam/redpower/world/ItemCustomAxe.java b/src/main/java/com/eloraam/redpower/world/ItemCustomAxe.java new file mode 100644 index 0000000..3130e49 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/world/ItemCustomAxe.java @@ -0,0 +1,20 @@ +package com.eloraam.redpower.world; + +import com.eloraam.redpower.RedPowerBase; +import com.eloraam.redpower.RedPowerWorld; +import net.minecraft.item.ItemAxe; +import net.minecraft.item.ItemStack; +import net.minecraft.item.Item.ToolMaterial; + +public class ItemCustomAxe extends ItemAxe { + public ItemCustomAxe(ToolMaterial mat) { + super(mat); + } + + public boolean getIsRepairable(ItemStack ist1, ItemStack ist2) { + return super.toolMaterial == RedPowerWorld.toolMaterialRuby && ist2.isItemEqual(RedPowerBase.itemRuby) + || super.toolMaterial == RedPowerWorld.toolMaterialSapphire && ist2.isItemEqual(RedPowerBase.itemSapphire) + || super.toolMaterial == RedPowerWorld.toolMaterialGreenSapphire && ist2.isItemEqual(RedPowerBase.itemGreenSapphire) + || super.getIsRepairable(ist1, ist2); + } +} diff --git a/src/main/java/com/eloraam/redpower/world/ItemCustomFlower.java b/src/main/java/com/eloraam/redpower/world/ItemCustomFlower.java new file mode 100644 index 0000000..7c226a7 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/world/ItemCustomFlower.java @@ -0,0 +1,51 @@ +package com.eloraam.redpower.world; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import java.util.List; +import net.minecraft.block.Block; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + +public class ItemCustomFlower extends ItemBlock { + private BlockCustomFlower bl; + + public ItemCustomFlower(Block block) { + super((BlockCustomFlower)block); + this.bl = (BlockCustomFlower)block; + this.setMaxDamage(0); + this.setHasSubtypes(true); + this.setCreativeTab(CreativeTabs.tabDecorations); + } + + public IIcon getIconFromDamage(int damage) { + return this.bl.icons[damage]; + } + + public int getPlacedBlockMetadata(int i) { + return i; + } + + public int getMetadata(int i) { + return i; + } + + public String getUnlocalizedName(ItemStack itemstack) { + switch(itemstack.getItemDamage()) { + case 0: + return "tile.indigo"; + case 1: + return "tile.rubbersapling"; + default: + throw new IndexOutOfBoundsException(); + } + } + + @SideOnly(Side.CLIENT) + public void getSubItems(Item item, CreativeTabs tab, List itemList) { + this.bl.getSubBlocks(item, tab, itemList); + } +} diff --git a/src/main/java/com/eloraam/redpower/world/ItemCustomHoe.java b/src/main/java/com/eloraam/redpower/world/ItemCustomHoe.java new file mode 100644 index 0000000..66cf7e0 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/world/ItemCustomHoe.java @@ -0,0 +1,20 @@ +package com.eloraam.redpower.world; + +import com.eloraam.redpower.RedPowerBase; +import com.eloraam.redpower.RedPowerWorld; +import net.minecraft.item.ItemHoe; +import net.minecraft.item.ItemStack; +import net.minecraft.item.Item.ToolMaterial; + +public class ItemCustomHoe extends ItemHoe { + public ItemCustomHoe(ToolMaterial mat) { + super(mat); + } + + public boolean getIsRepairable(ItemStack ist1, ItemStack ist2) { + return super.theToolMaterial == RedPowerWorld.toolMaterialRuby && ist2.isItemEqual(RedPowerBase.itemRuby) + || super.theToolMaterial == RedPowerWorld.toolMaterialSapphire && ist2.isItemEqual(RedPowerBase.itemSapphire) + || super.theToolMaterial == RedPowerWorld.toolMaterialGreenSapphire && ist2.isItemEqual(RedPowerBase.itemGreenSapphire) + || super.getIsRepairable(ist1, ist2); + } +} diff --git a/src/main/java/com/eloraam/redpower/world/ItemCustomOre.java b/src/main/java/com/eloraam/redpower/world/ItemCustomOre.java new file mode 100644 index 0000000..91441f0 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/world/ItemCustomOre.java @@ -0,0 +1,40 @@ +package com.eloraam.redpower.world; + +import net.minecraft.block.Block; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; + +public class ItemCustomOre extends ItemBlock { + public ItemCustomOre(Block block) { + super(block); + this.setMaxDamage(0); + this.setHasSubtypes(true); + } + + public int getMetadata(int i) { + return i; + } + + public String getUnlocalizedName(ItemStack itemstack) { + switch(itemstack.getItemDamage()) { + case 0: + return "tile.oreRuby"; + case 1: + return "tile.oreGreenSapphire"; + case 2: + return "tile.oreSapphire"; + case 3: + return "tile.oreSilver"; + case 4: + return "tile.oreTin"; + case 5: + return "tile.oreCopper"; + case 6: + return "tile.oreTungsten"; + case 7: + return "tile.oreNikolite"; + default: + throw new IndexOutOfBoundsException(); + } + } +} diff --git a/src/main/java/com/eloraam/redpower/world/ItemCustomPickaxe.java b/src/main/java/com/eloraam/redpower/world/ItemCustomPickaxe.java new file mode 100644 index 0000000..1a40b0a --- /dev/null +++ b/src/main/java/com/eloraam/redpower/world/ItemCustomPickaxe.java @@ -0,0 +1,20 @@ +package com.eloraam.redpower.world; + +import com.eloraam.redpower.RedPowerBase; +import com.eloraam.redpower.RedPowerWorld; +import net.minecraft.item.ItemPickaxe; +import net.minecraft.item.ItemStack; +import net.minecraft.item.Item.ToolMaterial; + +public class ItemCustomPickaxe extends ItemPickaxe { + public ItemCustomPickaxe(ToolMaterial mat) { + super(mat); + } + + public boolean getIsRepairable(ItemStack ist1, ItemStack ist2) { + return super.toolMaterial == RedPowerWorld.toolMaterialRuby && ist2.isItemEqual(RedPowerBase.itemRuby) + || super.toolMaterial == RedPowerWorld.toolMaterialSapphire && ist2.isItemEqual(RedPowerBase.itemSapphire) + || super.toolMaterial == RedPowerWorld.toolMaterialGreenSapphire && ist2.isItemEqual(RedPowerBase.itemGreenSapphire) + || super.getIsRepairable(ist1, ist2); + } +} diff --git a/src/main/java/com/eloraam/redpower/world/ItemCustomSeeds.java b/src/main/java/com/eloraam/redpower/world/ItemCustomSeeds.java new file mode 100644 index 0000000..6dd40b6 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/world/ItemCustomSeeds.java @@ -0,0 +1,63 @@ +package com.eloraam.redpower.world; + +import com.eloraam.redpower.RedPowerWorld; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import java.util.List; +import net.minecraft.block.Block; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.common.EnumPlantType; +import net.minecraftforge.common.IPlantable; +import net.minecraftforge.common.util.ForgeDirection; + +public class ItemCustomSeeds extends Item implements IPlantable { + public ItemCustomSeeds() { + this.setMaxDamage(0); + this.setHasSubtypes(true); + this.setCreativeTab(CreativeTabs.tabMaterials); + this.setUnlocalizedName("seedFlax"); + this.setTextureName("rpworld:seedsFlax"); + } + + public boolean onItemUse(ItemStack ist, EntityPlayer player, World world, int i, int j, int k, int l, float xp, float yp, float zp) { + if (l != 1) { + return false; + } else { + Block soil = world.getBlock(i, j, k); + if (soil == null) { + return false; + } else if (soil.canSustainPlant(world, i, j, k, ForgeDirection.UP, this) && world.getBlockMetadata(i, j, k) >= 1 && world.isAirBlock(i, j + 1, k)) { + world.setBlock(i, j + 1, k, RedPowerWorld.blockCrops, 0, 3); + --ist.stackSize; + return true; + } else { + return false; + } + } + } + + @SideOnly(Side.CLIENT) + public void getSubItems(Item item, CreativeTabs tab, List list) { + for(int i = 0; i <= 0; ++i) { + list.add(new ItemStack(this, 1, i)); + } + + } + + public EnumPlantType getPlantType(IBlockAccess world, int x, int y, int z) { + return EnumPlantType.Crop; + } + + public Block getPlant(IBlockAccess world, int x, int y, int z) { + return RedPowerWorld.blockCrops; + } + + public int getPlantMetadata(IBlockAccess world, int x, int y, int z) { + return 0; + } +} diff --git a/src/main/java/com/eloraam/redpower/world/ItemCustomShovel.java b/src/main/java/com/eloraam/redpower/world/ItemCustomShovel.java new file mode 100644 index 0000000..df1895a --- /dev/null +++ b/src/main/java/com/eloraam/redpower/world/ItemCustomShovel.java @@ -0,0 +1,20 @@ +package com.eloraam.redpower.world; + +import com.eloraam.redpower.RedPowerBase; +import com.eloraam.redpower.RedPowerWorld; +import net.minecraft.item.ItemSpade; +import net.minecraft.item.ItemStack; +import net.minecraft.item.Item.ToolMaterial; + +public class ItemCustomShovel extends ItemSpade { + public ItemCustomShovel(ToolMaterial mat) { + super(mat); + } + + public boolean getIsRepairable(ItemStack ist1, ItemStack ist2) { + return super.toolMaterial == RedPowerWorld.toolMaterialRuby && ist2.isItemEqual(RedPowerBase.itemRuby) + || super.toolMaterial == RedPowerWorld.toolMaterialSapphire && ist2.isItemEqual(RedPowerBase.itemSapphire) + || super.toolMaterial == RedPowerWorld.toolMaterialGreenSapphire && ist2.isItemEqual(RedPowerBase.itemGreenSapphire) + || super.getIsRepairable(ist1, ist2); + } +} diff --git a/src/main/java/com/eloraam/redpower/world/ItemCustomStone.java b/src/main/java/com/eloraam/redpower/world/ItemCustomStone.java new file mode 100644 index 0000000..910fe76 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/world/ItemCustomStone.java @@ -0,0 +1,42 @@ +package com.eloraam.redpower.world; + +import net.minecraft.block.Block; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; + +public class ItemCustomStone extends ItemBlock { + public ItemCustomStone(Block block) { + super(block); + this.setMaxDamage(0); + this.setHasSubtypes(true); + } + + public int getPlacedBlockMetadata(int i) { + return i; + } + + public int getMetadata(int i) { + return i; + } + + public String getUnlocalizedName(ItemStack itemstack) { + switch(itemstack.getItemDamage()) { + case 0: + return "tile.marble"; + case 1: + return "tile.basalt"; + case 2: + return "tile.marbleBrick"; + case 3: + return "tile.basaltCobble"; + case 4: + return "tile.basaltBrick"; + case 5: + return "tile.basaltCircle"; + case 6: + return "tile.basaltPaver"; + default: + throw new IndexOutOfBoundsException(); + } + } +} diff --git a/src/main/java/com/eloraam/redpower/world/ItemCustomSword.java b/src/main/java/com/eloraam/redpower/world/ItemCustomSword.java new file mode 100644 index 0000000..a8fac4b --- /dev/null +++ b/src/main/java/com/eloraam/redpower/world/ItemCustomSword.java @@ -0,0 +1,23 @@ +package com.eloraam.redpower.world; + +import com.eloraam.redpower.RedPowerBase; +import com.eloraam.redpower.RedPowerWorld; +import net.minecraft.item.ItemStack; +import net.minecraft.item.ItemSword; +import net.minecraft.item.Item.ToolMaterial; + +public class ItemCustomSword extends ItemSword { + protected ToolMaterial toolMaterial2; + + public ItemCustomSword(ToolMaterial mat) { + super(mat); + this.toolMaterial2 = mat; + } + + public boolean getIsRepairable(ItemStack ist1, ItemStack ist2) { + return this.toolMaterial2 == RedPowerWorld.toolMaterialRuby && ist2.isItemEqual(RedPowerBase.itemRuby) + || this.toolMaterial2 == RedPowerWorld.toolMaterialSapphire && ist2.isItemEqual(RedPowerBase.itemSapphire) + || this.toolMaterial2 == RedPowerWorld.toolMaterialGreenSapphire && ist2.isItemEqual(RedPowerBase.itemGreenSapphire) + || super.getIsRepairable(ist1, ist2); + } +} diff --git a/src/main/java/com/eloraam/redpower/world/ItemPaintBrush.java b/src/main/java/com/eloraam/redpower/world/ItemPaintBrush.java new file mode 100644 index 0000000..29ddd11 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/world/ItemPaintBrush.java @@ -0,0 +1,53 @@ +package com.eloraam.redpower.world; + +import com.eloraam.redpower.RedPowerWorld; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.IPaintable; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.World; + +public class ItemPaintBrush extends Item { + private int color; + + public ItemPaintBrush(int col) { + this.color = col; + this.setMaxStackSize(1); + this.setMaxDamage(15); + this.setNoRepair(); + this.setCreativeTab(CreativeTabs.tabTools); + this.setTextureName("rpworld:paintBrush/" + col); + } + + private boolean itemUseShared(ItemStack ist, EntityPlayer player, World world, int x, int y, int z, int side) { + IPaintable ip = CoreLib.getTileEntity(world, x, y, z, IPaintable.class); + if (ip == null) { + return false; + } else { + MovingObjectPosition mop = CoreLib.retraceBlock(world, player, x, y, z); + if (mop == null) { + return false; + } else if (!ip.tryPaint(mop.subHit, mop.sideHit, this.color + 1)) { + return false; + } else { + ist.damageItem(1, player); + if (ist.stackSize == 0) { + player.inventory.setItemStack(new ItemStack(RedPowerWorld.itemBrushDry)); + } + + return true; + } + } + } + + public boolean onItemUse(ItemStack ist, EntityPlayer player, World world, int x, int y, int z, int side, float xp, float yp, float zp) { + return !world.isRemote && !player.isSneaking() && this.itemUseShared(ist, player, world, x, y, z, side); + } + + public boolean onItemUseFirst(ItemStack ist, EntityPlayer player, World world, int x, int y, int z, int side, float xp, float yp, float zp) { + return !world.isRemote && player.isSneaking() && this.itemUseShared(ist, player, world, x, y, z, side); + } +} diff --git a/src/main/java/com/eloraam/redpower/world/ItemPaintCan.java b/src/main/java/com/eloraam/redpower/world/ItemPaintCan.java new file mode 100644 index 0000000..55641c3 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/world/ItemPaintCan.java @@ -0,0 +1,36 @@ +package com.eloraam.redpower.world; + +import com.eloraam.redpower.RedPowerWorld; +import com.eloraam.redpower.core.ItemPartialCraft; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +public class ItemPaintCan extends ItemPartialCraft { + int color; + + public ItemPaintCan(int col) { + this.color = col; + this.setMaxDamage(15); + this.setCreativeTab(CreativeTabs.tabTools); + this.setTextureName("rpworld:paintCan/" + col); + } + + public ItemStack onItemRightClick(ItemStack ist, World world, EntityPlayer player) { + for(int n = 0; n < 9; ++n) { + ItemStack isl = player.inventory.getStackInSlot(n); + if (isl != null && isl.getItem() == RedPowerWorld.itemBrushDry && isl.stackSize == 1) { + player.inventory.setInventorySlotContents(n, new ItemStack(RedPowerWorld.itemBrushPaint[this.color])); + ist.damageItem(1, player); + if (ist.stackSize == 0) { + return new ItemStack(RedPowerWorld.itemPaintCanEmpty); + } + + return ist; + } + } + + return ist; + } +} diff --git a/src/main/java/com/eloraam/redpower/world/ItemSeedBag.java b/src/main/java/com/eloraam/redpower/world/ItemSeedBag.java new file mode 100644 index 0000000..7a09709 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/world/ItemSeedBag.java @@ -0,0 +1,356 @@ +package com.eloraam.redpower.world; + +import com.eloraam.redpower.RedPowerWorld; +import com.eloraam.redpower.core.CoreLib; +import com.eloraam.redpower.core.WorldCoord; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import java.util.List; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.util.IIcon; +import net.minecraft.util.StatCollector; +import net.minecraft.world.World; +import net.minecraftforge.common.IPlantable; +import net.minecraftforge.common.util.ForgeDirection; + +public class ItemSeedBag extends Item { + private IIcon emptyIcon; + private IIcon fullIcon; + + public ItemSeedBag() { + this.setMaxDamage(576); + this.setMaxStackSize(1); + this.setUnlocalizedName("rpSeedBag"); + this.setCreativeTab(CreativeTabs.tabMisc); + } + + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int meta) { + return meta > 0 ? this.fullIcon : this.emptyIcon; + } + + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister register) { + this.emptyIcon = register.registerIcon("rpworld:seedBagEmpty"); + this.fullIcon = register.registerIcon("rpworld:seedBagFull"); + } + + public static IInventory getBagInventory(ItemStack ist, EntityPlayer host) { + return !(ist.getItem() instanceof ItemSeedBag) ? null : new ItemSeedBag.InventorySeedBag(ist, host); + } + + public static boolean canAdd(IInventory inv, ItemStack ist) { + if (!(ist.getItem() instanceof IPlantable)) { + return false; + } else { + for(int i = 0; i < inv.getSizeInventory(); ++i) { + ItemStack is2 = inv.getStackInSlot(i); + if (is2 != null && is2.stackSize != 0 && CoreLib.compareItemStack(is2, ist) != 0) { + return false; + } + } + + return true; + } + } + + public static ItemStack getPlant(IInventory inv) { + for(int i = 0; i < inv.getSizeInventory(); ++i) { + ItemStack is2 = inv.getStackInSlot(i); + if (is2 != null && is2.stackSize != 0) { + return is2; + } + } + + return null; + } + + private static void decrPlant(IInventory inv) { + for(int i = 0; i < inv.getSizeInventory(); ++i) { + ItemStack is2 = inv.getStackInSlot(i); + if (is2 != null && is2.stackSize != 0) { + inv.decrStackSize(i, 1); + break; + } + } + + } + + public int getMaxItemUseDuration(ItemStack par1ItemStack) { + return 1; + } + + public ItemStack onItemRightClick(ItemStack ist, World world, EntityPlayer player) { + if (!world.isRemote && player.isSneaking()) { + player.openGui(RedPowerWorld.instance, 1, world, 0, 0, 0); + } + + return ist; + } + + public boolean onItemUse(ItemStack ist, EntityPlayer player, World world, int x, int y, int z, int side, float par8, float par9, float par10) { + if (side != 1) { + return false; + } else if (world.isRemote) { + return false; + } else if (player.isSneaking()) { + return false; + } else { + IInventory baginv = getBagInventory(ist, player); + ItemSeedBag.SpiralSearch search = new ItemSeedBag.SpiralSearch(new WorldCoord(x, y, z), 5); + + for(boolean st = false; search.again(); search.step()) { + Block soil = world.getBlock(search.point.x, search.point.y, search.point.z); + if (soil == Blocks.air) { + if (!st) { + break; + } + } else { + ItemStack plantstk = getPlant(baginv); + if (plantstk == null || !(plantstk.getItem() instanceof IPlantable)) { + break; + } + + IPlantable plant = (IPlantable)plantstk.getItem(); + if (soil != Blocks.air && soil.canSustainPlant(world, search.point.x, search.point.y, search.point.z, ForgeDirection.UP, plant)) { + if (!world.isAirBlock(search.point.x, search.point.y + 1, search.point.z)) { + if (!st) { + break; + } + } else { + st = true; + world.setBlock( + search.point.x, + search.point.y + 1, + search.point.z, + plant.getPlant(world, search.point.x, search.point.y + 1, search.point.z), + plant.getPlantMetadata(world, search.point.x, search.point.y + 1, search.point.z), + 3 + ); + if (!player.capabilities.isCreativeMode) { + decrPlant(baginv); + } + } + } else if (!st) { + break; + } + } + } + + return true; + } + } + + @SideOnly(Side.CLIENT) + public void addInformation(ItemStack ist, EntityPlayer player, List lines, boolean par4) { + if (ist.stackTagCompound != null && ist.getItemDamage() != 0) { + IInventory baginv = getBagInventory(ist, player); + + for(int i = 0; i < baginv.getSizeInventory(); ++i) { + ItemStack is2 = baginv.getStackInSlot(i); + if (is2 != null && is2.stackSize != 0) { + lines.add(StatCollector.translateToLocal("item." + is2.getItem().getUnlocalizedName(is2) + ".name")); + return; + } + } + } + + } + + public static class InventorySeedBag implements IInventory { + ItemStack bagitem; + ItemStack[] items; + EntityPlayer player; + + InventorySeedBag(ItemStack ist, EntityPlayer host) { + this.bagitem = ist; + this.player = host; + this.unpackInventory(); + } + + void unpackInventory() { + this.items = new ItemStack[9]; + if (this.bagitem.stackTagCompound != null) { + NBTTagList list = this.bagitem.stackTagCompound.getTagList("contents", 10); + + for(int i = 0; i < list.tagCount(); ++i) { + NBTTagCompound item = list.getCompoundTagAt(i); + byte slt = item.getByte("Slot"); + if (slt < 9) { + this.items[slt] = ItemStack.loadItemStackFromNBT(item); + } + } + } + + } + + private void packInventory() { + if (this.bagitem.stackTagCompound == null) { + this.bagitem.setTagCompound(new NBTTagCompound()); + } + + int itc = 0; + NBTTagList contents = new NBTTagList(); + + for(int i = 0; i < 9; ++i) { + if (this.items[i] != null) { + itc += this.items[i].stackSize; + NBTTagCompound cpd = new NBTTagCompound(); + this.items[i].writeToNBT(cpd); + cpd.setByte("Slot", (byte)i); + contents.appendTag(cpd); + } + } + + this.bagitem.stackTagCompound.setTag("contents", contents); + this.bagitem.setItemDamage(itc == 0 ? 0 : 577 - itc); + } + + public int getSizeInventory() { + return 9; + } + + public ItemStack getStackInSlot(int slot) { + return this.items[slot]; + } + + public ItemStack decrStackSize(int slot, int num) { + if (this.bagitem != this.player.getHeldItem()) { + this.markDirty(); + this.player.closeScreen(); + return null; + } else if (this.items[slot] == null) { + return null; + } else if (this.items[slot].stackSize <= num) { + ItemStack tr = this.items[slot]; + this.items[slot] = null; + this.markDirty(); + return tr; + } else { + ItemStack tr = this.items[slot].splitStack(num); + if (this.items[slot].stackSize == 0) { + this.items[slot] = null; + } + + this.markDirty(); + return tr; + } + } + + public ItemStack getStackInSlotOnClosing(int slot) { + if (this.items[slot] == null) { + return null; + } else { + ItemStack tr = this.items[slot]; + this.items[slot] = null; + return tr; + } + } + + public void setInventorySlotContents(int slot, ItemStack ist) { + if (this.bagitem != this.player.getHeldItem()) { + this.markDirty(); + this.player.closeScreen(); + } else { + this.items[slot] = ist; + if (ist != null && ist.stackSize > this.getInventoryStackLimit()) { + ist.stackSize = this.getInventoryStackLimit(); + } + + this.markDirty(); + } + } + + public String getInventoryName() { + return "item.rpSeedBag.name"; + } + + public int getInventoryStackLimit() { + return 64; + } + + public void markDirty() { + this.packInventory(); + } + + public boolean isUseableByPlayer(EntityPlayer pl) { + return true; + } + + public void openInventory() { + } + + public void closeInventory() { + } + + public boolean hasCustomInventoryName() { + return true; + } + + public boolean isItemValidForSlot(int slotID, ItemStack itemStack) { + return false; + } + } + + public static class SpiralSearch { + int curs; + int rem; + int ln; + int steps; + public WorldCoord point; + + public SpiralSearch(WorldCoord start, int size) { + this.point = start; + this.curs = 0; + this.rem = 1; + this.ln = 1; + this.steps = size * size; + } + + public boolean again() { + return this.steps > 0; + } + + public boolean step() { + if (--this.steps == 0) { + return false; + } else { + --this.rem; + switch(this.curs) { + case 0: + this.point.step(2); + break; + case 1: + this.point.step(4); + break; + case 2: + this.point.step(3); + break; + default: + this.point.step(5); + } + + if (this.rem > 0) { + return true; + } else { + this.curs = this.curs + 1 & 3; + this.rem = this.ln; + if ((this.curs & 1) > 0) { + ++this.ln; + } + + return true; + } + } + } + } +} diff --git a/src/main/java/com/eloraam/redpower/world/ItemSickle.java b/src/main/java/com/eloraam/redpower/world/ItemSickle.java new file mode 100644 index 0000000..6b53657 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/world/ItemSickle.java @@ -0,0 +1,95 @@ +package com.eloraam.redpower.world; + +import com.eloraam.redpower.RedPowerBase; +import com.eloraam.redpower.RedPowerWorld; +import java.util.HashSet; +import net.minecraft.block.Block; +import net.minecraft.block.BlockBush; +import net.minecraft.block.BlockLeavesBase; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.item.ItemTool; +import net.minecraft.item.Item.ToolMaterial; +import net.minecraft.world.World; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.world.BlockEvent.BreakEvent; + +public class ItemSickle extends ItemTool { + public int cropRadius = 2; + public int leafRadius = 1; + + public ItemSickle(ToolMaterial mat) { + super(3.0F, mat, new HashSet()); + this.setMaxStackSize(1); + } + + public float func_150893_a(ItemStack ist, Block bl) { + return !(bl instanceof BlockLeavesBase) && !(bl instanceof BlockBush) ? super.func_150893_a(ist, bl) : super.efficiencyOnProperMaterial; + } + + public boolean onBlockDestroyed(ItemStack ist, World world, Block block, int x, int y, int z, EntityLivingBase entity) { + boolean used = false; + if (!(entity instanceof EntityPlayer)) { + return false; + } else { + EntityPlayer player = (EntityPlayer)entity; + if (block != null && block instanceof BlockLeavesBase) { + for(int q = -this.leafRadius; q <= this.leafRadius; ++q) { + for(int r = -this.leafRadius; r <= this.leafRadius; ++r) { + for(int s = -this.leafRadius; s <= this.leafRadius; ++s) { + Block bl = world.getBlock(x + q, y + r, z + s); + int md = world.getBlockMetadata(x + q, y + r, z + s); + if (bl != null && bl instanceof BlockLeavesBase) { + BreakEvent event = new BreakEvent(x + q, y + r, z + s, world, bl, md, player); + if (!MinecraftForge.EVENT_BUS.post(event)) { + if (bl.canHarvestBlock(player, md)) { + bl.harvestBlock(world, player, x + q, y + r, z + s, md); + } + + world.setBlockToAir(x + q, y + r, z + s); + used = true; + } + } + } + } + } + } else if (block != null && block instanceof BlockBush) { + for(int q = -this.cropRadius; q <= this.cropRadius; ++q) { + for(int r = -this.cropRadius; r <= this.cropRadius; ++r) { + Block bl = world.getBlock(x + q, y, z + r); + int md = world.getBlockMetadata(x + q, y, z + r); + if (bl != null && bl instanceof BlockBush) { + BreakEvent event = new BreakEvent(x + q, y, z + r, world, bl, md, player); + if (!MinecraftForge.EVENT_BUS.post(event)) { + if (bl.canHarvestBlock(player, md)) { + bl.harvestBlock(world, player, x + q, y, z + r, md); + } + + world.setBlockToAir(x + q, y, z + r); + used = true; + } + } + } + } + } + + if (used) { + ist.damageItem(1, entity); + } + + return used; + } + } + + public boolean getIsRepairable(ItemStack self, ItemStack repairMaterial) { + return super.toolMaterial == RedPowerWorld.toolMaterialRuby && repairMaterial.isItemEqual(RedPowerBase.itemRuby) + || super.toolMaterial == RedPowerWorld.toolMaterialSapphire && repairMaterial.isItemEqual(RedPowerBase.itemSapphire) + || super.toolMaterial == RedPowerWorld.toolMaterialGreenSapphire && repairMaterial.isItemEqual(RedPowerBase.itemGreenSapphire) + || super.getIsRepairable(self, repairMaterial); + } + + public int getItemEnchantability() { + return 20; + } +} diff --git a/src/main/java/com/eloraam/redpower/world/ItemStorage.java b/src/main/java/com/eloraam/redpower/world/ItemStorage.java new file mode 100644 index 0000000..92c2ce7 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/world/ItemStorage.java @@ -0,0 +1,44 @@ +package com.eloraam.redpower.world; + +import net.minecraft.block.Block; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; + +public class ItemStorage extends ItemBlock { + public ItemStorage(Block block) { + super(block); + this.setMaxDamage(0); + this.setHasSubtypes(true); + } + + public int getPlacedBlockMetadata(int meta) { + return meta; + } + + public int getMetadata(int meta) { + return meta; + } + + public String getUnlocalizedName(ItemStack itemstack) { + switch(itemstack.getItemDamage()) { + case 0: + return "tile.blockRuby"; + case 1: + return "tile.blockGreenSapphire"; + case 2: + return "tile.blockSapphire"; + case 3: + return "tile.blockSilver"; + case 4: + return "tile.blockTin"; + case 5: + return "tile.blockCopper"; + case 6: + return "tile.blockTungsten"; + case 7: + return "tile.blockNikolite"; + default: + throw new IndexOutOfBoundsException(); + } + } +} diff --git a/src/main/java/com/eloraam/redpower/world/ItemWoolCard.java b/src/main/java/com/eloraam/redpower/world/ItemWoolCard.java new file mode 100644 index 0000000..93447a8 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/world/ItemWoolCard.java @@ -0,0 +1,21 @@ +package com.eloraam.redpower.world; + +import com.eloraam.redpower.core.ItemPartialCraft; +import net.minecraft.creativetab.CreativeTabs; + +public class ItemWoolCard extends ItemPartialCraft { + public ItemWoolCard() { + this.setUnlocalizedName("woolcard"); + this.setTextureName("rpworld:woolCard"); + this.setMaxDamage(63); + this.setCreativeTab(CreativeTabs.tabTools); + } + + public boolean isFull3D() { + return true; + } + + public boolean shouldRotateAroundWhenRendering() { + return true; + } +} diff --git a/src/main/java/com/eloraam/redpower/world/WorldEvents.java b/src/main/java/com/eloraam/redpower/world/WorldEvents.java new file mode 100644 index 0000000..c55ff68 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/world/WorldEvents.java @@ -0,0 +1,95 @@ +package com.eloraam.redpower.world; + +import com.eloraam.redpower.RedPowerWorld; +import com.eloraam.redpower.core.MachineLib; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.eventhandler.Event.Result; +import java.util.stream.IntStream; +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.entity.Entity; +import net.minecraft.entity.monster.EntityCreeper; +import net.minecraft.entity.monster.EntitySkeleton; +import net.minecraft.entity.monster.EntityZombie; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Items; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EntityDamageSource; +import net.minecraftforge.event.entity.living.LivingDeathEvent; +import net.minecraftforge.event.entity.player.BonemealEvent; +import net.minecraftforge.event.entity.player.EntityItemPickupEvent; + +public class WorldEvents { + @SubscribeEvent + public void onBonemeal(BonemealEvent ev) { + if (ev.block == RedPowerWorld.blockCrops) { + int md = ev.world.getBlockMetadata(ev.x, ev.y, ev.z); + if (md == 4 || md == 5) { + return; + } + + if (ev.world.isRemote) { + ev.setResult(Result.ALLOW); + return; + } + + if (RedPowerWorld.blockCrops.fertilize(ev.world, ev.x, ev.y, ev.z)) { + ev.setResult(Result.ALLOW); + } + } + + } + + @SubscribeEvent + public void onDeath(LivingDeathEvent ev) { + if (ev.source instanceof EntityDamageSource) { + EntityDamageSource eds = (EntityDamageSource)ev.source; + Entity ent = eds.getEntity(); + if (ent instanceof EntityPlayer) { + EntityPlayer epl = (EntityPlayer)ent; + ItemStack wpn = epl.getCurrentEquippedItem(); + if (EnchantmentHelper.getEnchantmentLevel(RedPowerWorld.enchantVorpal.effectId, wpn) != 0 && ev.entityLiving.getHealth() <= -20.0F) { + if (ev.entityLiving instanceof EntitySkeleton) { + EntitySkeleton ist = (EntitySkeleton)ev.entityLiving; + if (ist.getSkeletonType() == 1) { + return; + } + + ev.entityLiving.entityDropItem(new ItemStack(Items.skull, 1, 0), 0.0F); + } else if (ev.entityLiving instanceof EntityZombie) { + ev.entityLiving.entityDropItem(new ItemStack(Items.skull, 1, 2), 0.0F); + } else if (ev.entityLiving instanceof EntityPlayer) { + ItemStack ist1 = new ItemStack(Items.skull, 1, 3); + ist1.setTagCompound(new NBTTagCompound()); + ist1.getTagCompound().setString("SkullOwner", ev.entityLiving.getCommandSenderName()); + ev.entityLiving.entityDropItem(ist1, 0.0F); + } else if (ev.entityLiving instanceof EntityCreeper) { + ev.entityLiving.entityDropItem(new ItemStack(Items.skull, 1, 4), 0.0F); + } + } + } + } + + } + + @SubscribeEvent + public void onPickupItem(EntityItemPickupEvent ev) { + for(int i = 0; i < 9; ++i) { + ItemStack ist = ev.entityPlayer.inventory.getStackInSlot(i); + if (ist != null && ist.getItem() instanceof ItemSeedBag) { + IInventory inv = ItemSeedBag.getBagInventory(ist, ev.entityPlayer); + if (inv != null && ItemSeedBag.getPlant(inv) != null) { + ItemStack tpi = ev.item.getEntityItem(); + int[] slots = IntStream.range(0, inv.getSizeInventory()).toArray(); + if (ItemSeedBag.canAdd(inv, tpi) && MachineLib.addToInventoryCore(inv, tpi, slots, true)) { + ev.item.setDead(); + ev.setResult(Result.ALLOW); + return; + } + } + } + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/world/WorldGenCustomOre.java b/src/main/java/com/eloraam/redpower/world/WorldGenCustomOre.java new file mode 100644 index 0000000..fc8297b --- /dev/null +++ b/src/main/java/com/eloraam/redpower/world/WorldGenCustomOre.java @@ -0,0 +1,71 @@ +package com.eloraam.redpower.world; + +import java.util.Random; +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; +import net.minecraft.world.gen.feature.WorldGenerator; + +public class WorldGenCustomOre extends WorldGenerator { + protected Block minableBlock; + protected int minableBlockMeta; + protected int numberOfBlocks; + + public WorldGenCustomOre(Block block, int meta, int num) { + this.minableBlock = block; + this.minableBlockMeta = meta; + this.numberOfBlocks = num; + } + + public void tryGenerateBlock(World world, Random random, int i, int j, int k) { + if (world.getBlock(i, j, k) == Blocks.stone) { + world.setBlock(i, j, k, this.minableBlock, this.minableBlockMeta, 3); + } + + } + + public boolean generate(World world, Random random, int i, int j, int k) { + float f = random.nextFloat() * 3.141593F; + double d = (double)((float)(i + 8) + MathHelper.sin(f) * (float)this.numberOfBlocks / 8.0F); + double d1 = (double)((float)(i + 8) - MathHelper.sin(f) * (float)this.numberOfBlocks / 8.0F); + double d2 = (double)((float)(k + 8) + MathHelper.cos(f) * (float)this.numberOfBlocks / 8.0F); + double d3 = (double)((float)(k + 8) - MathHelper.cos(f) * (float)this.numberOfBlocks / 8.0F); + double d4 = (double)(j + random.nextInt(3) + 2); + double d5 = (double)(j + random.nextInt(3) + 2); + + for(int l = 0; l <= this.numberOfBlocks; ++l) { + double d6 = d + (d1 - d) * (double)l / (double)this.numberOfBlocks; + double d7 = d4 + (d5 - d4) * (double)l / (double)this.numberOfBlocks; + double d8 = d2 + (d3 - d2) * (double)l / (double)this.numberOfBlocks; + double d9 = random.nextDouble() * (double)this.numberOfBlocks / 16.0; + double d10 = (double)(MathHelper.sin((float)l * 3.141593F / (float)this.numberOfBlocks) + 1.0F) * d9 + 1.0; + double d11 = (double)(MathHelper.sin((float)l * 3.141593F / (float)this.numberOfBlocks) + 1.0F) * d9 + 1.0; + int i1 = MathHelper.floor_double(d6 - d10 / 2.0); + int j1 = MathHelper.floor_double(d7 - d11 / 2.0); + int k1 = MathHelper.floor_double(d8 - d10 / 2.0); + int l1 = MathHelper.floor_double(d6 + d10 / 2.0); + int i2 = MathHelper.floor_double(d7 + d11 / 2.0); + int j2 = MathHelper.floor_double(d8 + d10 / 2.0); + + for(int k2 = i1; k2 <= l1; ++k2) { + double d12 = ((double)k2 + 0.5 - d6) / (d10 / 2.0); + if (d12 * d12 < 1.0) { + for(int l2 = j1; l2 <= i2; ++l2) { + double d13 = ((double)l2 + 0.5 - d7) / (d11 / 2.0); + if (d12 * d12 + d13 * d13 < 1.0) { + for(int i3 = k1; i3 <= j2; ++i3) { + double d14 = ((double)i3 + 0.5 - d8) / (d10 / 2.0); + if (d12 * d12 + d13 * d13 + d14 * d14 < 1.0) { + this.tryGenerateBlock(world, random, k2, l2, i3); + } + } + } + } + } + } + } + + return true; + } +} diff --git a/src/main/java/com/eloraam/redpower/world/WorldGenHandler.java b/src/main/java/com/eloraam/redpower/world/WorldGenHandler.java new file mode 100644 index 0000000..68cd5ea --- /dev/null +++ b/src/main/java/com/eloraam/redpower/world/WorldGenHandler.java @@ -0,0 +1,131 @@ +package com.eloraam.redpower.world; + +import com.eloraam.redpower.RedPowerWorld; +import com.eloraam.redpower.core.Config; +import cpw.mods.fml.common.IWorldGenerator; +import java.util.Random; +import net.minecraft.world.World; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraft.world.chunk.IChunkProvider; +import net.minecraft.world.gen.feature.WorldGenFlowers; +import net.minecraftforge.common.BiomeDictionary; +import net.minecraftforge.common.BiomeDictionary.Type; + +public class WorldGenHandler implements IWorldGenerator { + public void generate(Random rin, int chunkX, int chunkZ, World world, IChunkProvider generator, IChunkProvider provider) { + BiomeGenBase biome = world.getWorldChunkManager().getBiomeGenAt(chunkX * 16 + 16, chunkZ * 16 + 16); + Random rand = new Random((long)(chunkX * 31 + chunkZ)); + if (!BiomeDictionary.isBiomeOfType(biome, Type.NETHER) && !BiomeDictionary.isBiomeOfType(biome, Type.END)) { + for(int a = 0; a < 2; ++a) { + int vc = chunkX * 16 + rand.nextInt(16); + int bgb = rand.nextInt(48); + int n = chunkZ * 16 + rand.nextInt(16); + new WorldGenCustomOre(RedPowerWorld.blockOres, 0, 7).generate(world, rand, vc, bgb, n); + } + + for(int a = 0; a < 2; ++a) { + int vc = chunkX * 16 + rand.nextInt(16); + int bgb = rand.nextInt(48); + int n = chunkZ * 16 + rand.nextInt(16); + new WorldGenCustomOre(RedPowerWorld.blockOres, 1, 7).generate(world, rand, vc, bgb, n); + } + + for(int a = 0; a < 2; ++a) { + int vc = chunkX * 16 + rand.nextInt(16); + int bgb = rand.nextInt(48); + int n = chunkZ * 16 + rand.nextInt(16); + new WorldGenCustomOre(RedPowerWorld.blockOres, 2, 7).generate(world, rand, vc, bgb, n); + } + + if (Config.getInt("settings.world.generate.silver", 1) > 0) { + for(int a = 0; a < 4; ++a) { + int vc = chunkX * 16 + rand.nextInt(16); + int bgb = rand.nextInt(32); + int n = chunkZ * 16 + rand.nextInt(16); + new WorldGenCustomOre(RedPowerWorld.blockOres, 3, 8).generate(world, rand, vc, bgb, n); + } + } + + if (Config.getInt("settings.world.generate.tin", 1) > 0) { + for(int a = 0; a < 10; ++a) { + int vc = chunkX * 16 + rand.nextInt(16); + int bgb = rand.nextInt(48); + int n = chunkZ * 16 + rand.nextInt(16); + new WorldGenCustomOre(RedPowerWorld.blockOres, 4, 8).generate(world, rand, vc, bgb, n); + } + } + + if (Config.getInt("settings.world.generate.copper", 1) > 0) { + for(int a = 0; a < 20; ++a) { + int vc = chunkX * 16 + rand.nextInt(16); + int bgb = rand.nextInt(64); + int n = chunkZ * 16 + rand.nextInt(16); + new WorldGenCustomOre(RedPowerWorld.blockOres, 5, 8).generate(world, rand, vc, bgb, n); + } + } + + for(int a = 0; a < 1; ++a) { + int vc = chunkX * 16 + rand.nextInt(16); + int bgb = rand.nextInt(16); + int n = chunkZ * 16 + rand.nextInt(16); + new WorldGenCustomOre(RedPowerWorld.blockOres, 6, 4).generate(world, rand, vc, bgb, n); + } + + for(int a = 0; a < 4; ++a) { + int vc = chunkX * 16 + rand.nextInt(16); + int bgb = rand.nextInt(16); + int n = chunkZ * 16 + rand.nextInt(16); + new WorldGenCustomOre(RedPowerWorld.blockOres, 7, 10).generate(world, rand, vc, bgb, n); + } + + if (Config.getInt("settings.world.generate.marble", 1) > 0) { + for(int a = 0; a < 4; ++a) { + int vc = chunkX * 16 + rand.nextInt(16); + int bgb = 32 + rand.nextInt(32); + int n = chunkZ * 16 + rand.nextInt(16); + new WorldGenMarble(RedPowerWorld.blockStone, 0, rand.nextInt(4096)).generate(world, rand, vc, bgb, n); + } + } + + if (Config.getInt("settings.world.generate.volcano", 1) > 0 && rand.nextFloat() <= 0.04F) { + int vc = Math.max(1, rand.nextInt(10) - 6); + vc *= vc; + + for(int a = 0; a < vc; ++a) { + int bgb = chunkX * 16 + rand.nextInt(16); + int n = rand.nextInt(32); + int x = chunkZ * 16 + rand.nextInt(16); + if (new WorldGenVolcano(RedPowerWorld.blockStone, 1, rand.nextInt(65536)).generate(world, rand, bgb, n, x)) { + break; + } + } + } + + byte ampl = 0; + if (BiomeDictionary.isBiomeOfType(biome, Type.JUNGLE)) { + ampl = 1; + } else if (BiomeDictionary.isBiomeOfType(biome, Type.FOREST)) { + ampl = 1; + } else if (BiomeDictionary.isBiomeOfType(biome, Type.PLAINS)) { + ampl = 4; + } + + for(int a = 0; a < ampl; ++a) { + int x = chunkX * 16 + rand.nextInt(16) + 8; + int z = rand.nextInt(128); + int y = chunkZ * 16 + rand.nextInt(16) + 8; + new WorldGenFlowers(RedPowerWorld.blockPlants).generate(world, rand, x, z, y); + } + + if (BiomeDictionary.isBiomeOfType(biome, Type.JUNGLE)) { + for(int a = 0; a < 6; ++a) { + int x = chunkX * 16 + rand.nextInt(16) + 8; + int z = chunkZ * 16 + rand.nextInt(16) + 8; + int y = world.getHeightValue(x, z); + new WorldGenRubberTree().generate(world, world.rand, x, y, z); + } + } + } + + } +} diff --git a/src/main/java/com/eloraam/redpower/world/WorldGenMarble.java b/src/main/java/com/eloraam/redpower/world/WorldGenMarble.java new file mode 100644 index 0000000..3566a88 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/world/WorldGenMarble.java @@ -0,0 +1,117 @@ +package com.eloraam.redpower.world; + +import java.util.Deque; +import java.util.HashSet; +import java.util.LinkedList; +import java.util.Random; +import java.util.Set; +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.util.ChunkCoordinates; +import net.minecraft.world.World; + +public class WorldGenMarble extends WorldGenCustomOre { + private Deque fillStack = new LinkedList(); + private Set fillStackTest = new HashSet(); + + public WorldGenMarble(Block block, int meta, int num) { + super(block, meta, num); + } + + private void addBlock(int x, int y, int z, int p) { + ChunkCoordinates sb = new ChunkCoordinates(x, y, z); + if (!this.fillStackTest.contains(sb)) { + this.fillStack.addLast(new WorldGenMarble.CoordSearchPath(x, y, z, p)); + this.fillStackTest.add(sb); + } + + } + + private void searchBlock(World world, int x, int y, int z, int p) { + if (world.isAirBlock(x - 1, y, z) + || world.isAirBlock(x + 1, y, z) + || world.isAirBlock(x, y - 1, z) + || world.isAirBlock(x, y + 1, z) + || world.isAirBlock(x, y, z - 1) + || world.isAirBlock(x, y, z + 1)) { + p = 6; + } + + this.addBlock(x - 1, y, z, p); + this.addBlock(x + 1, y, z, p); + this.addBlock(x, y - 1, z, p); + this.addBlock(x, y + 1, z, p); + this.addBlock(x, y, z - 1, p); + this.addBlock(x, y, z + 1, p); + } + + @Override + public boolean generate(World world, Random random, int x, int y, int z) { + if (!world.isAirBlock(x, y, z)) { + return false; + } else { + int l; + for(l = y; world.getBlock(x, l, z) != Blocks.stone; ++l) { + if (l > 96) { + return false; + } + } + + this.addBlock(x, l, z, 6); + + while(this.fillStack.size() > 0 && super.numberOfBlocks > 0) { + WorldGenMarble.CoordSearchPath sp = (WorldGenMarble.CoordSearchPath)this.fillStack.removeFirst(); + if (world.getBlock(sp.x, sp.y, sp.z) == Blocks.stone) { + world.setBlock(sp.x, sp.y, sp.z, super.minableBlock, super.minableBlockMeta, 3); + if (sp.p > 0) { + this.searchBlock(world, sp.x, sp.y, sp.z, sp.p - 1); + } + + --super.numberOfBlocks; + } + } + + return true; + } + } + + public static class CoordSearchPath { + private final int x; + private final int y; + private final int z; + private final int p; + + public CoordSearchPath(int x, int y, int z, int p) { + this.x = x; + this.y = y; + this.z = z; + this.p = p; + } + + public boolean equals(Object o) { + if (this == o) { + return true; + } else if (o != null && this.getClass() == o.getClass()) { + WorldGenMarble.CoordSearchPath that = (WorldGenMarble.CoordSearchPath)o; + if (this.x != that.x) { + return false; + } else if (this.y != that.y) { + return false; + } else if (this.z != that.z) { + return false; + } else { + return this.p == that.p; + } + } else { + return false; + } + } + + public int hashCode() { + int result = this.x; + result = 31 * result + this.y; + result = 31 * result + this.z; + return 31 * result + this.p; + } + } +} diff --git a/src/main/java/com/eloraam/redpower/world/WorldGenRubberTree.java b/src/main/java/com/eloraam/redpower/world/WorldGenRubberTree.java new file mode 100644 index 0000000..e14aa3d --- /dev/null +++ b/src/main/java/com/eloraam/redpower/world/WorldGenRubberTree.java @@ -0,0 +1,168 @@ +package com.eloraam.redpower.world; + +import com.eloraam.redpower.RedPowerWorld; +import com.eloraam.redpower.core.FractalLib; +import com.eloraam.redpower.core.Vector3; +import java.util.Random; +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.world.World; +import net.minecraft.world.gen.feature.WorldGenerator; + +public class WorldGenRubberTree extends WorldGenerator { + public void putLeaves(World world, int x, int y, int z) { + if (world.isAirBlock(x, y, z)) { + world.setBlock(x, y, z, RedPowerWorld.blockLeaves, 0, 3); + } + + } + + public boolean fillBlock(World world, int x, int y, int z) { + if (y >= 0 && y <= 126) { + Block bl = world.getBlock(x, y, z); + if (bl != null && bl.isWood(world, x, y, z)) { + return true; + } else if (bl != Blocks.air && bl != null && !bl.isLeaves(world, x, y, z) && bl != Blocks.tallgrass && bl != Blocks.grass && bl != Blocks.vine) { + return false; + } else { + world.setBlock(x, y, z, RedPowerWorld.blockLogs, 0, 3); + this.putLeaves(world, x, y - 1, z); + this.putLeaves(world, x, y + 1, z); + this.putLeaves(world, x, y, z - 1); + this.putLeaves(world, x, y, z + 1); + this.putLeaves(world, x - 1, y, z); + this.putLeaves(world, x + 1, y, z); + return true; + } + } else { + return false; + } + } + + public boolean generate(World world, Random random, int xPos, int yPos, int zPos) { + int trh = random.nextInt(6) + 25; + if (yPos >= 1 && yPos + trh + 2 <= world.getHeight()) { + for(int x = -1; x <= 1; ++x) { + for(int z = -1; z <= 1; ++z) { + Block bid = world.getBlock(xPos + x, yPos - 1, zPos + z); + if (bid != Blocks.grass && bid != Blocks.dirt) { + return false; + } + } + } + + byte rw = 1; + + for(int org = yPos; org < yPos + trh; ++org) { + if (org > yPos + 3) { + rw = 5; + } + + for(int x = xPos - rw; x <= xPos + rw; ++x) { + for(int z = zPos - rw; z <= zPos + rw; ++z) { + Block dest = world.getBlock(x, org, z); + if (dest != Blocks.air + && dest != null + && !dest.isLeaves(world, x, org, z) + && !dest.isWood(world, x, org, z) + && dest != Blocks.tallgrass + && dest != Blocks.grass + && dest != Blocks.vine) { + return false; + } + } + } + } + + for(int x = -1; x <= 1; ++x) { + for(int z = -1; z <= 1; ++z) { + world.setBlock(xPos + x, yPos - 1, zPos + z, Blocks.dirt); + } + } + + for(int var21 = 0; var21 <= 6; ++var21) { + for(int x = -1; x <= 1; ++x) { + for(int z = -1; z <= 1; ++z) { + world.setBlock(xPos + x, yPos + var21, zPos + z, RedPowerWorld.blockLogs, 1, 3); + } + } + + for(int x = -1; x <= 1; ++x) { + if (random.nextInt(5) == 1 && world.isAirBlock(xPos + x, yPos + var21, zPos - 2)) { + world.setBlock(xPos + x, yPos + var21, zPos - 2, Blocks.vine, 1, 3); + } + + if (random.nextInt(5) == 1 && world.isAirBlock(xPos + x, yPos + var21, zPos + 2)) { + world.setBlock(xPos + x, yPos + var21, zPos + 2, Blocks.vine, 4, 3); + } + } + + for(int z = -1; z <= 1; ++z) { + if (random.nextInt(5) == 1 && world.isAirBlock(xPos - 2, yPos + var21, zPos + z)) { + world.setBlock(xPos - 2, yPos + var21, zPos + z, Blocks.vine, 8, 3); + } + + if (random.nextInt(5) == 1 && world.isAirBlock(xPos + 2, yPos + var21, zPos + z)) { + world.setBlock(xPos + 2, yPos + var21, zPos + z, Blocks.vine, 2, 3); + } + } + } + + Vector3 var23 = new Vector3(); + Vector3 var24 = new Vector3(); + int nbr = random.nextInt(100) + 10; + + for(int br = 0; br < nbr; ++br) { + var24.set((double)random.nextFloat() - 0.5, (double)random.nextFloat(), (double)random.nextFloat() - 0.5); + var24.normalize(); + double m = ((double)nbr / 10.0 + 4.0) * (double)(1.0F + 1.0F * random.nextFloat()); + var24.x *= m; + var24.z *= m; + var24.y = var24.y * (double)(trh - 15) + (double)nbr / 10.0; + if (nbr < 8) { + switch(nbr - 1) { + case 0: + var23.set((double)(xPos - 1), (double)(yPos + 6), (double)(zPos - 1)); + break; + case 1: + var23.set((double)(xPos - 1), (double)(yPos + 6), (double)zPos); + break; + case 2: + var23.set((double)(xPos - 1), (double)(yPos + 6), (double)(zPos + 1)); + break; + case 3: + var23.set((double)xPos, (double)(yPos + 6), (double)(zPos + 1)); + break; + case 4: + var23.set((double)(xPos + 1), (double)(yPos + 6), (double)(zPos + 1)); + break; + case 5: + var23.set((double)(xPos + 1), (double)(yPos + 6), (double)zPos); + break; + case 6: + var23.set((double)(xPos + 1), (double)(yPos + 6), (double)(zPos - 1)); + break; + default: + var23.set((double)xPos, (double)(yPos + 6), (double)(zPos - 1)); + } + } else { + var23.set((double)(xPos + random.nextInt(3) - 1), (double)(yPos + 6), (double)(zPos + random.nextInt(3) - 1)); + } + + long brseed = random.nextLong(); + FractalLib.BlockSnake bsn = new FractalLib.BlockSnake(var23, var24, brseed); + + while(bsn.iterate()) { + Vector3 v = bsn.get(); + if (!this.fillBlock(world, (int)Math.floor(v.x), (int)Math.floor(v.y), (int)Math.floor(v.z))) { + break; + } + } + } + + return true; + } else { + return false; + } + } +} diff --git a/src/main/java/com/eloraam/redpower/world/WorldGenVolcano.java b/src/main/java/com/eloraam/redpower/world/WorldGenVolcano.java new file mode 100644 index 0000000..b7c0953 --- /dev/null +++ b/src/main/java/com/eloraam/redpower/world/WorldGenVolcano.java @@ -0,0 +1,141 @@ +package com.eloraam.redpower.world; + +import java.util.HashMap; +import java.util.LinkedList; +import java.util.Map; +import java.util.Random; +import net.minecraft.block.Block; +import net.minecraft.block.BlockBush; +import net.minecraft.block.BlockLeavesBase; +import net.minecraft.block.BlockLog; +import net.minecraft.block.BlockVine; +import net.minecraft.init.Blocks; +import net.minecraft.util.ChunkCoordinates; +import net.minecraft.world.ChunkCoordIntPair; +import net.minecraft.world.World; + +public class WorldGenVolcano extends WorldGenCustomOre { + private LinkedList fillStack = new LinkedList(); + private Map fillStackTest = new HashMap(); + + public WorldGenVolcano(Block block, int meta, int num) { + super(block, meta, num); + } + + private void addBlock(int x, int y, int z, int p) { + if (p > 0) { + ChunkCoordIntPair sb = new ChunkCoordIntPair(x, z); + Integer o = (Integer)this.fillStackTest.get(sb); + if (o == null || p > o) { + this.fillStack.addLast(new ChunkCoordinates(x, y, z)); + this.fillStackTest.put(sb, p); + } + } + + } + + private void searchBlock(int x, int y, int z, int p, Random random) { + int rp = random.nextInt(16); + this.addBlock(x - 1, y, z, (rp & 1) > 0 ? p - 1 : p); + this.addBlock(x + 1, y, z, (rp & 2) > 0 ? p - 1 : p); + this.addBlock(x, y, z - 1, (rp & 4) > 0 ? p - 1 : p); + this.addBlock(x, y, z + 1, (rp & 8) > 0 ? p - 1 : p); + } + + public boolean canReplace(World world, int x, int y, int z) { + Block block = world.getBlock(x, y, z); + return block == Blocks.air + || block == Blocks.flowing_water + || block == Blocks.water + || block instanceof BlockLog + || block instanceof BlockLeavesBase + || block instanceof BlockVine + || block instanceof BlockBush + || block == Blocks.snow + || block == Blocks.snow_layer + || block == Blocks.ice + || block == Blocks.packed_ice; + } + + public void eatTree(World world, int x, int y, int z) { + Block block = world.getBlock(x, y, z); + if (block == Blocks.snow) { + world.setBlockToAir(x, y, z); + } else if (block instanceof BlockLog || block instanceof BlockLeavesBase || block instanceof BlockVine) { + world.setBlockToAir(x, y, z); + this.eatTree(world, x, y + 1, z); + } + + } + + @Override + public boolean generate(World world, Random random, int x, int y, int z) { + if (world.getBlock(x, y, z) != Blocks.lava) { + return false; + } else { + int swh = world.getHeightValue(x, z); + + while(swh > 0 && this.canReplace(world, x, swh - 1, z)) { + --swh; + } + + int yTop; + for(yTop = y; yTop < swh; ++yTop) { + world.setBlock(x, yTop, z, Blocks.flowing_lava); + world.setBlock(x - 1, yTop, z, super.minableBlock, super.minableBlockMeta, 2); + world.setBlock(x + 1, yTop, z, super.minableBlock, super.minableBlockMeta, 2); + world.setBlock(x, yTop, z - 1, super.minableBlock, super.minableBlockMeta, 2); + world.setBlock(x, yTop, z + 1, super.minableBlock, super.minableBlockMeta, 2); + } + + int head = 3 + random.nextInt(4); + int spread = random.nextInt(3); + + label67: + while(super.numberOfBlocks > 0) { + while(this.fillStack.size() == 0) { + world.setBlock(x, yTop, z, Blocks.lava); + this.fillStackTest.clear(); + this.searchBlock(x, yTop, z, head, random); + if (++yTop > 125) { + break label67; + } + } + + ChunkCoordinates sp = (ChunkCoordinates)this.fillStack.removeFirst(); + if (!world.getChunkFromBlockCoords(sp.posX, sp.posZ).isEmpty()) { + int pow = this.fillStackTest.get(new ChunkCoordIntPair(sp.posX, sp.posZ)); + int hm = world.getHeightValue(sp.posX, sp.posZ) + 1; + + while(hm > 0 && this.canReplace(world, sp.posX, hm - 1, sp.posZ)) { + --hm; + } + + if (hm <= sp.posY && this.canReplace(world, sp.posX, hm, sp.posZ)) { + this.eatTree(world, sp.posX, hm, sp.posZ); + world.setBlock(sp.posX, hm, sp.posZ, super.minableBlock, super.minableBlockMeta, 2); + if (sp.posY > hm) { + pow = Math.max(pow, spread); + } + + this.searchBlock(sp.posX, hm, sp.posZ, pow, random); + --super.numberOfBlocks; + } + } + } + + world.setBlock(x, yTop, z, Blocks.lava, 0, 2); + + while(yTop > swh && world.getBlock(x, yTop, z) == Blocks.lava) { + world.markBlockForUpdate(x, yTop, z); + world.notifyBlocksOfNeighborChange(x, yTop, z, Blocks.lava); + world.scheduledUpdatesAreImmediate = true; + Blocks.lava.updateTick(world, x, yTop, z, random); + world.scheduledUpdatesAreImmediate = false; + --yTop; + } + + return true; + } + } +} diff --git a/src/main/resources/assets/rpbase/lang/en_US.lang b/src/main/resources/assets/rpbase/lang/en_US.lang new file mode 100644 index 0000000..ea9997b --- /dev/null +++ b/src/main/resources/assets/rpbase/lang/en_US.lang @@ -0,0 +1,147 @@ +achievement.rpAdvBench.desc=Construct a project table +achievement.rpAdvBench=Civilized Crafting +achievement.rpIngotBrass.desc=Smelt a brass ingot +achievement.rpIngotBrass=Brass Monkey +achievement.rpMakeAlloy.desc=Build an alloy furnace +achievement.rpMakeAlloy=Mixed Metal Surprise + +tile.marble.name=Marble +tile.marbleBrick.name=Marble Brick +tile.oreCopper.name=Copper Ore +tile.oreGreenSapphire.name=Green Sapphire Ore +tile.oreNikolite.name=Nikolite Ore +tile.oreRuby.name=Ruby Ore +tile.oreSapphire.name=Sapphire Ore +tile.oreSilver.name=Silver Ore +tile.oreTin.name=Tin Ore +tile.oreTungsten.name=Tungsten Ore +tile.basalt.name=Basalt +tile.basaltBrick.name=Basalt Brick +tile.basaltCircle.name=Chiseled Basalt Brick +tile.basaltCobble.name=Basalt Cobblestone +tile.basaltPaver.name=Basalt Paver +tile.blockCopper.name=Copper Block +tile.blockGreenSapphire.name=Green Sapphire Block +tile.blockRuby.name=Ruby Block +tile.blockSapphire.name=Sapphire Block +tile.blockSilver.name=Silver Block +tile.blockTin.name=Tin Block +tile.blockTungsten.name=Tungsten Block +tile.blockNikolite.name=Nikolite Block + +tile.rpabench.name=Project Table +tile.rpafurnace.name=Alloy Furnace + +tile.indigo.name=Indigo Flower +tile.rubbersapling.name=Rubber Sapling +tile.rpleaves.name=Leaves +tile.rplog.name=Rubberwood + +item.seedFlax.name=Flax Seeds +item.dyeIndigo.name=Indigo Dye + +item.ruby.name=Ruby +item.sapphire.name=Sapphire +item.greenSapphire.name=Green Sapphire +item.nikolite.name=Nikolite +item.nuggetCopper.name=Copper Nugget +item.nuggetIron.name=Iron Nugget +item.nuggetSilver.name=Silver Nugget +item.nuggetTin.name=Tin Nugget +item.nuggetTungsten.name=Tungsten Nugget +item.ingotBlue.name=Blue Alloy Ingot +item.ingotBrass.name=Brass Ingot +item.ingotCopper.name=Copper Ingot +item.ingotRed.name=Red Alloy Ingot +item.ingotSilver.name=Silver Ingot +item.ingotTin.name=Tin Ingot +item.ingotTungsten.name=Tungsten Ingot +item.dustTungsten.name=Tungsten Dust +item.dustSilver.name=Silver Dust + +item.tinplate.name=Tinplate +item.rpcanvas.name=Canvas +item.planBlank.name=Blank Plan +item.rpBag.name=Canvas Bag +item.rpSeedBag.name=Seed Bag +item.screwdriver.name=Screwdriver + +item.rplumar.black.name=Black Lumar +item.rplumar.blue.name=Blue Lumar +item.rplumar.brown.name=Brown Lumar +item.rplumar.cyan.name=Cyan Lumar +item.rplumar.gray.name=Gray Lumar +item.rplumar.green.name=Green Lumar +item.rplumar.lightBlue.name=Light Blue Lumar +item.rplumar.lime.name=Lime Lumar +item.rplumar.magenta.name=Magenta Lumar +item.rplumar.orange.name=Orange Lumar +item.rplumar.pink.name=Pink Lumar +item.rplumar.purple.name=Purple Lumar +item.rplumar.red.name=Red Lumar +item.rplumar.silver.name=Light Gray Lumar +item.rplumar.white.name=White Lumar +item.rplumar.yellow.name=Yellow Lumar + +item.paintcan.empty.name=Paint Can +item.paintcan.black.name=Black Paint +item.paintcan.blue.name=Blue Paint +item.paintcan.brown.name=Brown Paint +item.paintcan.cyan.name=Cyan Paint +item.paintcan.gray.name=Gray Paint +item.paintcan.green.name=Green Paint +item.paintcan.lightBlue.name=Light Blue Paint +item.paintcan.lime.name=Lime Paint +item.paintcan.magenta.name=Magenta Paint +item.paintcan.orange.name=Orange Paint +item.paintcan.pink.name=Pink Paint +item.paintcan.purple.name=Purple Paint +item.paintcan.red.name=Red Paint +item.paintcan.silver.name=Light Gray Paint +item.paintcan.white.name=White Paint +item.paintcan.yellow.name=Yellow Paint + +item.paintbrush.dry.name=Paint Brush +item.paintbrush.black.name=Black Paint Brush +item.paintbrush.blue.name=Blue Paint Brush +item.paintbrush.brown.name=Brown Paint Brush +item.paintbrush.cyan.name=Cyan Paint Brush +item.paintbrush.gray.name=Gray Paint Brush +item.paintbrush.green.name=Green Paint Brush +item.paintbrush.lightBlue.name=Light Blue Paint Brush +item.paintbrush.lime.name=Lime Paint Brush +item.paintbrush.magenta.name=Magenta Paint Brush +item.paintbrush.orange.name=Orange Paint Brush +item.paintbrush.pink.name=Pink Paint Brush +item.paintbrush.purple.name=Purple Paint Brush +item.paintbrush.red.name=Red Paint Brush +item.paintbrush.silver.name=Light Gray Paint Brush +item.paintbrush.white.name=White Paint Brush +item.paintbrush.yellow.name=Yellow Paint Brush + +item.athame.name=Athame +item.swordRuby.name=Ruby Sword +item.swordSapphire.name=Sapphire Sword +item.swordGreenSapphire.name=Green Sapphire Sword +item.pickaxeRuby.name=Ruby Pickaxe +item.pickaxeSapphire.name=Sapphire Pickaxe +item.pickaxeGreenSapphire.name=Green Sapphire Pickaxe +item.axeRuby.name=Ruby Axe +item.axeSapphire.name=Sapphire Axe +item.axeGreenSapphire.name=Green Sapphire Axe +item.shovelRuby.name=Ruby Shovel +item.shovelSapphire.name=Sapphire Shovel +item.shovelGreenSapphire.name=Green Sapphire Shovel +item.hoeRuby.name=Ruby Hoe +item.hoeSapphire.name=Sapphire Hoe +item.hoeGreenSapphire.name=Green Sapphire Hoe +item.sickleWood.name=Wood Sickle +item.sickleStone.name=Stone Sickle +item.sickleIron.name=Iron Sickle +item.sickleGold.name=Gold Sickle +item.sickleDiamond.name=Diamond Sickle +item.sickleRuby.name=Ruby Sickle +item.sickleSapphire.name=Sapphire Sickle +item.sickleGreenSapphire.name=Green Sapphire Sickle + +gui.busid=Set Bus Id \ No newline at end of file diff --git a/src/main/resources/assets/rpbase/lang/ru_RU.lang b/src/main/resources/assets/rpbase/lang/ru_RU.lang new file mode 100644 index 0000000..7420c70 --- /dev/null +++ b/src/main/resources/assets/rpbase/lang/ru_RU.lang @@ -0,0 +1,147 @@ +achievement.rpAdvBench.desc=Сделать проектный стол +achievement.rpAdvBench=Цивилизованное производство +achievement.rpIngotBrass.desc=Выплавить латунный слиток +achievement.rpIngotBrass=Латунная обезьянка +achievement.rpMakeAlloy.desc=Сделать плавильную печь +achievement.rpMakeAlloy=Сюприз со смешанным металлом + +tile.marble.name=Мрамор +tile.marbleBrick.name=Мраморный кирпич +tile.oreCopper.name=Медная руда +tile.oreGreenSapphire.name=Руда зеленого сапфира +tile.oreNikolite.name=Николитовая руда +tile.oreRuby.name=Рубиновая руда +tile.oreSapphire.name=Сапфировая руда +tile.oreSilver.name=Серебряная руда +tile.oreTin.name=Оловянная руда +tile.oreTungsten.name=Вольфрамовая руда +tile.basalt.name=Базальт +tile.basaltBrick.name=Базальтовый кирпич +tile.basaltCircle.name=Резной базальтовый кирпич +tile.basaltCobble.name=Базальтовый булыжник +tile.basaltPaver.name=Базальтовый асфальт +tile.blockCopper.name=Медный блок +tile.blockGreenSapphire.name=Блок зеленого сапфира +tile.blockRuby.name=Рубиновый блок +tile.blockSapphire.name=Сапфировый блок +tile.blockSilver.name=Серебряный блок +tile.blockTin.name=Оловянный блок +tile.blockTungsten.name=Вольфрамовый блок +tile.blockNikolite.name=Блок николита + +tile.rpabench.name=Проектный стол +tile.rpafurnace.name=Плавильная печь + +tile.indigo.name=Цветок индиго +tile.rubbersapling.name=Саженец каучукового дерева +tile.rpleaves.name=Листья каучукового дерева +tile.rplog.name=Каучуковое дерево + +item.seedFlax.name=Семяна льна +item.dyeIndigo.name=Краситель индиго + +item.ruby.name=Рубин +item.sapphire.name=Сапфир +item.greenSapphire.name=Зеленый сапфир +item.nikolite.name=Николит +item.nuggetCopper.name=Медный самородок +item.nuggetIron.name=Железный самородок +item.nuggetSilver.name=Серебряный самородок +item.nuggetTin.name=Оловянный самородок +item.nuggetTungsten.name=Вольфрамовый самородок +item.ingotBlue.name=Слиток синего сплава +item.ingotBrass.name=Слиток латуни +item.ingotCopper.name=Медный слиток +item.ingotRed.name=Слиток красного сплава +item.ingotSilver.name=Серебряный слиток +item.ingotTin.name=Оловянный слиток +item.ingotTungsten.name=Вольфрамовый слиток +item.dustTungsten.name=Вольфрамовая пыль +item.dustSilver.name=Серебряная пыль + +item.tinplate.name=Оловянная пластина +item.rpcanvas.name=Полотно +item.planBlank.name=Пустой план +item.rpBag.name=Брезентовая сумка +item.rpSeedBag.name=Сумка для семян +item.screwdriver.name=Отвертка + +item.rplumar.black.name=Черный светящийся порошок +item.rplumar.blue.name=Синий светящийся порошок +item.rplumar.brown.name=Коричневый светящийся порошок +item.rplumar.cyan.name=Бирюзовый светящийся порошок +item.rplumar.gray.name=Серый светящийся порошок +item.rplumar.green.name=Зеленый светящийся порошок +item.rplumar.lightBlue.name=Голубой светящийся порошок +item.rplumar.lime.name=Лаймовый светящийся порошок +item.rplumar.magenta.name=Пурпурный светящийся порошок +item.rplumar.orange.name=Оранжевый светящийся порошок +item.rplumar.pink.name=Розовый светящийся порошок +item.rplumar.purple.name=Фиолетовый светящийся порошок +item.rplumar.red.name=Красный светящийся порошок +item.rplumar.silver.name=Светло-серый светящийся порошок +item.rplumar.white.name=Белый светящийся порошок +item.rplumar.yellow.name=Желтый светящийся порошок + +item.paintcan.empty.name=Банка для краски +item.paintcan.black.name=Черная краска +item.paintcan.blue.name=Синяя краска +item.paintcan.brown.name=Коричневая краска +item.paintcan.cyan.name=Бирюзовая краска +item.paintcan.gray.name=Серая краска +item.paintcan.green.name=Зеленая краска +item.paintcan.lightBlue.name=Голубая краска +item.paintcan.lime.name=Лаймовая краска +item.paintcan.magenta.name=Пурпурная краска +item.paintcan.orange.name=Оранжевая краска +item.paintcan.pink.name=Розовая краска +item.paintcan.purple.name=Фиолетовая краска +item.paintcan.red.name=Красная краска +item.paintcan.silver.name=Светло-серая краска +item.paintcan.white.name=Белая краска +item.paintcan.yellow.name=Желтая краска + +item.paintbrush.dry.name=Кисточка +item.paintbrush.black.name=Черная кисточка +item.paintbrush.blue.name=Синяя кисточка +item.paintbrush.brown.name=Коричневая кисточка +item.paintbrush.cyan.name=Бирюзовая кисточка +item.paintbrush.gray.name=Серая кисточка +item.paintbrush.green.name=Зеленая кисточка +item.paintbrush.lightBlue.name=Голубая кисточка +item.paintbrush.lime.name=Лаймовая кисточка +item.paintbrush.magenta.name=Пурпурная кисточка +item.paintbrush.orange.name=Оранжевая кисточка +item.paintbrush.pink.name=Розовая кисточка +item.paintbrush.purple.name=Фиолетовая кисточка +item.paintbrush.red.name=Красная кисточка +item.paintbrush.silver.name=Светло-серая кисточка +item.paintbrush.white.name=Белая кисточка +item.paintbrush.yellow.name=Желтая кисточка + +item.athame.name=Афем +item.swordRuby.name=Рубиновый меч +item.swordSapphire.name=Сапфировый меч +item.swordGreenSapphire.name=Меч из зеленого сапфира +item.pickaxeRuby.name=Рубиновая кирка +item.pickaxeSapphire.name=Сапфировая кирка +item.pickaxeGreenSapphire.name=Кирка из зеленого сапфира +item.axeRuby.name=Рубиновый топор +item.axeSapphire.name=Сапфировый топор +item.axeGreenSapphire.name=Топор из зеленого сапфира +item.shovelRuby.name=Рубиновая лопата +item.shovelSapphire.name=Сапфировая лопата +item.shovelGreenSapphire.name=Ломата из зеленого сапфира +item.hoeRuby.name=Рубиновая мотыга +item.hoeSapphire.name=Сапфировая мотыга +item.hoeGreenSapphire.name=Мотыга из зеленого сапфира +item.sickleWood.name=Деревянный серп +item.sickleStone.name=Каменный серп +item.sickleIron.name=Железный серп +item.sickleGold.name=Золотой серп +item.sickleDiamond.name=Алмазный серп +item.sickleRuby.name=Рубиновый серп +item.sickleSapphire.name=Сапфировый серп +item.sickleGreenSapphire.name=Серп из зеленого сапфира + +gui.busid=Укажите адрес шины \ No newline at end of file diff --git a/src/main/resources/assets/rpbase/rpbanner.png b/src/main/resources/assets/rpbase/rpbanner.png new file mode 100644 index 0000000..5e3bfbb Binary files /dev/null and b/src/main/resources/assets/rpbase/rpbanner.png differ diff --git a/src/main/resources/assets/rpbase/textures/blocks/alloyFurnaceFront.png b/src/main/resources/assets/rpbase/textures/blocks/alloyFurnaceFront.png new file mode 100644 index 0000000..2ef7b15 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/blocks/alloyFurnaceFront.png differ diff --git a/src/main/resources/assets/rpbase/textures/blocks/alloyFurnaceFrontOn.png b/src/main/resources/assets/rpbase/textures/blocks/alloyFurnaceFrontOn.png new file mode 100644 index 0000000..9e40e00 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/blocks/alloyFurnaceFrontOn.png differ diff --git a/src/main/resources/assets/rpbase/textures/blocks/alloyFurnaceSide.png b/src/main/resources/assets/rpbase/textures/blocks/alloyFurnaceSide.png new file mode 100644 index 0000000..df6f158 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/blocks/alloyFurnaceSide.png differ diff --git a/src/main/resources/assets/rpbase/textures/blocks/alloyFurnaceVert.png b/src/main/resources/assets/rpbase/textures/blocks/alloyFurnaceVert.png new file mode 100644 index 0000000..abb68a6 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/blocks/alloyFurnaceVert.png differ diff --git a/src/main/resources/assets/rpbase/textures/blocks/projectTableBottom.png b/src/main/resources/assets/rpbase/textures/blocks/projectTableBottom.png new file mode 100644 index 0000000..a3c7b2b Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/blocks/projectTableBottom.png differ diff --git a/src/main/resources/assets/rpbase/textures/blocks/projectTableFront.png b/src/main/resources/assets/rpbase/textures/blocks/projectTableFront.png new file mode 100644 index 0000000..89bc0b9 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/blocks/projectTableFront.png differ diff --git a/src/main/resources/assets/rpbase/textures/blocks/projectTableSide.png b/src/main/resources/assets/rpbase/textures/blocks/projectTableSide.png new file mode 100644 index 0000000..bb0d456 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/blocks/projectTableSide.png differ diff --git a/src/main/resources/assets/rpbase/textures/blocks/projectTableTop.png b/src/main/resources/assets/rpbase/textures/blocks/projectTableTop.png new file mode 100644 index 0000000..1ebaeab Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/blocks/projectTableTop.png differ diff --git a/src/main/resources/assets/rpbase/textures/gui/advbench.png b/src/main/resources/assets/rpbase/textures/gui/advbench.png new file mode 100644 index 0000000..67f1ae5 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/gui/advbench.png differ diff --git a/src/main/resources/assets/rpbase/textures/gui/afurnacegui.png b/src/main/resources/assets/rpbase/textures/gui/afurnacegui.png new file mode 100644 index 0000000..95ca448 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/gui/afurnacegui.png differ diff --git a/src/main/resources/assets/rpbase/textures/gui/baggui.png b/src/main/resources/assets/rpbase/textures/gui/baggui.png new file mode 100644 index 0000000..954cec3 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/gui/baggui.png differ diff --git a/src/main/resources/assets/rpbase/textures/gui/idgui.png b/src/main/resources/assets/rpbase/textures/gui/idgui.png new file mode 100644 index 0000000..8539c4b Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/gui/idgui.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/bag/0.png b/src/main/resources/assets/rpbase/textures/items/bag/0.png new file mode 100644 index 0000000..8b1635f Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/bag/0.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/bag/1.png b/src/main/resources/assets/rpbase/textures/items/bag/1.png new file mode 100644 index 0000000..b4d54f2 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/bag/1.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/bag/10.png b/src/main/resources/assets/rpbase/textures/items/bag/10.png new file mode 100644 index 0000000..7dcac44 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/bag/10.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/bag/11.png b/src/main/resources/assets/rpbase/textures/items/bag/11.png new file mode 100644 index 0000000..17031a6 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/bag/11.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/bag/12.png b/src/main/resources/assets/rpbase/textures/items/bag/12.png new file mode 100644 index 0000000..6bc0a37 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/bag/12.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/bag/13.png b/src/main/resources/assets/rpbase/textures/items/bag/13.png new file mode 100644 index 0000000..b1326bd Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/bag/13.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/bag/14.png b/src/main/resources/assets/rpbase/textures/items/bag/14.png new file mode 100644 index 0000000..5cbbdf8 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/bag/14.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/bag/15.png b/src/main/resources/assets/rpbase/textures/items/bag/15.png new file mode 100644 index 0000000..36f15a2 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/bag/15.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/bag/2.png b/src/main/resources/assets/rpbase/textures/items/bag/2.png new file mode 100644 index 0000000..570b7cd Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/bag/2.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/bag/3.png b/src/main/resources/assets/rpbase/textures/items/bag/3.png new file mode 100644 index 0000000..3048c21 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/bag/3.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/bag/4.png b/src/main/resources/assets/rpbase/textures/items/bag/4.png new file mode 100644 index 0000000..691e713 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/bag/4.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/bag/5.png b/src/main/resources/assets/rpbase/textures/items/bag/5.png new file mode 100644 index 0000000..5a7a81e Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/bag/5.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/bag/6.png b/src/main/resources/assets/rpbase/textures/items/bag/6.png new file mode 100644 index 0000000..1be09d8 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/bag/6.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/bag/7.png b/src/main/resources/assets/rpbase/textures/items/bag/7.png new file mode 100644 index 0000000..7646c86 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/bag/7.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/bag/8.png b/src/main/resources/assets/rpbase/textures/items/bag/8.png new file mode 100644 index 0000000..b9c87f5 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/bag/8.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/bag/9.png b/src/main/resources/assets/rpbase/textures/items/bag/9.png new file mode 100644 index 0000000..7016c7e Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/bag/9.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/bouleSilicon.png b/src/main/resources/assets/rpbase/textures/items/bouleSilicon.png new file mode 100644 index 0000000..9d986ed Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/bouleSilicon.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/btMotor.png b/src/main/resources/assets/rpbase/textures/items/btMotor.png new file mode 100644 index 0000000..afd2999 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/btMotor.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/canvas.png b/src/main/resources/assets/rpbase/textures/items/canvas.png new file mode 100644 index 0000000..4c3847e Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/canvas.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/copperCoil.png b/src/main/resources/assets/rpbase/textures/items/copperCoil.png new file mode 100644 index 0000000..025b2f4 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/copperCoil.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/copperIngot.png b/src/main/resources/assets/rpbase/textures/items/copperIngot.png new file mode 100644 index 0000000..55991c3 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/copperIngot.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/diamondDrawplate.png b/src/main/resources/assets/rpbase/textures/items/diamondDrawplate.png new file mode 100644 index 0000000..41dcbc1 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/diamondDrawplate.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/dustSilver.png b/src/main/resources/assets/rpbase/textures/items/dustSilver.png new file mode 100644 index 0000000..804ca21 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/dustSilver.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/dustTungsten.png b/src/main/resources/assets/rpbase/textures/items/dustTungsten.png new file mode 100644 index 0000000..f1eec55 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/dustTungsten.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/dyeIndigo.png b/src/main/resources/assets/rpbase/textures/items/dyeIndigo.png new file mode 100644 index 0000000..0b43aed Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/dyeIndigo.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/fineCopper.png b/src/main/resources/assets/rpbase/textures/items/fineCopper.png new file mode 100644 index 0000000..4c749ce Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/fineCopper.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/fineIron.png b/src/main/resources/assets/rpbase/textures/items/fineIron.png new file mode 100644 index 0000000..929fee4 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/fineIron.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/greenSapphire.png b/src/main/resources/assets/rpbase/textures/items/greenSapphire.png new file mode 100644 index 0000000..3d042d3 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/greenSapphire.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/ingotBlue.png b/src/main/resources/assets/rpbase/textures/items/ingotBlue.png new file mode 100644 index 0000000..434b177 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/ingotBlue.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/ingotBrass.png b/src/main/resources/assets/rpbase/textures/items/ingotBrass.png new file mode 100644 index 0000000..8641222 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/ingotBrass.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/ingotRed.png b/src/main/resources/assets/rpbase/textures/items/ingotRed.png new file mode 100644 index 0000000..7f4c94d Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/ingotRed.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/ingotTungsten.png b/src/main/resources/assets/rpbase/textures/items/ingotTungsten.png new file mode 100644 index 0000000..1ff8a43 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/ingotTungsten.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/lumar/0.png b/src/main/resources/assets/rpbase/textures/items/lumar/0.png new file mode 100644 index 0000000..3d1ddfd Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/lumar/0.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/lumar/1.png b/src/main/resources/assets/rpbase/textures/items/lumar/1.png new file mode 100644 index 0000000..0e1cae3 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/lumar/1.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/lumar/10.png b/src/main/resources/assets/rpbase/textures/items/lumar/10.png new file mode 100644 index 0000000..60e56e3 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/lumar/10.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/lumar/11.png b/src/main/resources/assets/rpbase/textures/items/lumar/11.png new file mode 100644 index 0000000..fb13ab6 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/lumar/11.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/lumar/12.png b/src/main/resources/assets/rpbase/textures/items/lumar/12.png new file mode 100644 index 0000000..db98841 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/lumar/12.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/lumar/13.png b/src/main/resources/assets/rpbase/textures/items/lumar/13.png new file mode 100644 index 0000000..db755ea Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/lumar/13.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/lumar/14.png b/src/main/resources/assets/rpbase/textures/items/lumar/14.png new file mode 100644 index 0000000..c74eeb1 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/lumar/14.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/lumar/15.png b/src/main/resources/assets/rpbase/textures/items/lumar/15.png new file mode 100644 index 0000000..aebde3f Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/lumar/15.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/lumar/2.png b/src/main/resources/assets/rpbase/textures/items/lumar/2.png new file mode 100644 index 0000000..e0228c9 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/lumar/2.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/lumar/3.png b/src/main/resources/assets/rpbase/textures/items/lumar/3.png new file mode 100644 index 0000000..0c8804d Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/lumar/3.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/lumar/4.png b/src/main/resources/assets/rpbase/textures/items/lumar/4.png new file mode 100644 index 0000000..e572f51 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/lumar/4.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/lumar/5.png b/src/main/resources/assets/rpbase/textures/items/lumar/5.png new file mode 100644 index 0000000..0dd9cee Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/lumar/5.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/lumar/6.png b/src/main/resources/assets/rpbase/textures/items/lumar/6.png new file mode 100644 index 0000000..699827b Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/lumar/6.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/lumar/7.png b/src/main/resources/assets/rpbase/textures/items/lumar/7.png new file mode 100644 index 0000000..9671922 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/lumar/7.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/lumar/8.png b/src/main/resources/assets/rpbase/textures/items/lumar/8.png new file mode 100644 index 0000000..c6a1efa Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/lumar/8.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/lumar/9.png b/src/main/resources/assets/rpbase/textures/items/lumar/9.png new file mode 100644 index 0000000..3cc222d Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/lumar/9.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/nikolite.png b/src/main/resources/assets/rpbase/textures/items/nikolite.png new file mode 100644 index 0000000..2ff85f1 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/nikolite.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/nuggetCopper.png b/src/main/resources/assets/rpbase/textures/items/nuggetCopper.png new file mode 100644 index 0000000..6377fc7 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/nuggetCopper.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/nuggetIron.png b/src/main/resources/assets/rpbase/textures/items/nuggetIron.png new file mode 100644 index 0000000..30d6ffa Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/nuggetIron.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/nuggetSilver.png b/src/main/resources/assets/rpbase/textures/items/nuggetSilver.png new file mode 100644 index 0000000..dd8ca21 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/nuggetSilver.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/nuggetTin.png b/src/main/resources/assets/rpbase/textures/items/nuggetTin.png new file mode 100644 index 0000000..9ac516d Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/nuggetTin.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/nuggetTungsten.png b/src/main/resources/assets/rpbase/textures/items/nuggetTungsten.png new file mode 100644 index 0000000..f37894a Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/nuggetTungsten.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/paintCan.png b/src/main/resources/assets/rpbase/textures/items/paintCan.png new file mode 100644 index 0000000..3832777 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/paintCan.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/planBlank.png b/src/main/resources/assets/rpbase/textures/items/planBlank.png new file mode 100644 index 0000000..1e170b7 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/planBlank.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/planFull.png b/src/main/resources/assets/rpbase/textures/items/planFull.png new file mode 100644 index 0000000..376ca93 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/planFull.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/ruby.png b/src/main/resources/assets/rpbase/textures/items/ruby.png new file mode 100644 index 0000000..e493e6b Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/ruby.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/sapphire.png b/src/main/resources/assets/rpbase/textures/items/sapphire.png new file mode 100644 index 0000000..357411f Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/sapphire.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/screwdriver.png b/src/main/resources/assets/rpbase/textures/items/screwdriver.png new file mode 100644 index 0000000..188e4a6 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/screwdriver.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/silverIngot.png b/src/main/resources/assets/rpbase/textures/items/silverIngot.png new file mode 100644 index 0000000..a7f940d Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/silverIngot.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/tinIngot.png b/src/main/resources/assets/rpbase/textures/items/tinIngot.png new file mode 100644 index 0000000..693ae21 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/tinIngot.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/tinPlate.png b/src/main/resources/assets/rpbase/textures/items/tinPlate.png new file mode 100644 index 0000000..5f49bdb Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/tinPlate.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/waferBlue.png b/src/main/resources/assets/rpbase/textures/items/waferBlue.png new file mode 100644 index 0000000..1f46c19 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/waferBlue.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/waferRed.png b/src/main/resources/assets/rpbase/textures/items/waferRed.png new file mode 100644 index 0000000..d389f4f Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/waferRed.png differ diff --git a/src/main/resources/assets/rpbase/textures/items/waferSilicon.png b/src/main/resources/assets/rpbase/textures/items/waferSilicon.png new file mode 100644 index 0000000..503b9b2 Binary files /dev/null and b/src/main/resources/assets/rpbase/textures/items/waferSilicon.png differ diff --git a/src/main/resources/assets/rpcompat/lang/en_US.lang b/src/main/resources/assets/rpcompat/lang/en_US.lang new file mode 100644 index 0000000..074b69e --- /dev/null +++ b/src/main/resources/assets/rpcompat/lang/en_US.lang @@ -0,0 +1,4 @@ +tile.rpbtengine.name=Blulectric Engine + +item.rpbgear.name=Brass Gear +item.densePlateTungsten.name=Dense Tungsten Plate \ No newline at end of file diff --git a/src/main/resources/assets/rpcompat/lang/ru_RU.lang b/src/main/resources/assets/rpcompat/lang/ru_RU.lang new file mode 100644 index 0000000..016cf2f --- /dev/null +++ b/src/main/resources/assets/rpcompat/lang/ru_RU.lang @@ -0,0 +1,4 @@ +tile.rpbtengine.name=Блутрческий двигатель + +item.rpbgear.name=Латунная шестерня +item.densePlateTungsten.name=Плотная вольфрамовая пластина \ No newline at end of file diff --git a/src/main/resources/assets/rpcompat/models/btengine1.obj b/src/main/resources/assets/rpcompat/models/btengine1.obj new file mode 100644 index 0000000..5e195f7 --- /dev/null +++ b/src/main/resources/assets/rpcompat/models/btengine1.obj @@ -0,0 +1,125 @@ +v 0.000000 0.000000 0.000000 +v 16.000000 0.000000 0.000000 +v 16.000000 0.000000 16.000000 +v 0.000000 0.000000 16.000000 +v 0.000000 10.000000 0.000000 +v 16.000000 10.000000 0.000000 +v 16.000000 10.000000 16.000000 +v 0.000000 10.000000 16.000000 +v 14.000000 0.000000 0.000000 +v 14.000000 0.000000 16.000000 +v 14.000000 10.000000 0.000000 +v 14.000000 10.000000 16.000000 +v 1.999999 0.000000 16.000000 +v 2.000001 0.000000 0.000000 +v 1.999999 10.000000 16.000000 +v 2.000001 10.000000 0.000000 +v 0.000000 0.000000 2.000000 +v 16.000000 0.000000 2.000000 +v 0.000000 10.000000 2.000000 +v 16.000000 10.000000 2.000000 +v 16.000000 0.000000 14.000002 +v 0.000000 0.000000 13.999998 +v 16.000000 10.000000 14.000002 +v 0.000000 10.000000 13.999998 +v 0.000000 4.000000 0.000000 +v 16.000000 4.000000 0.000000 +v 16.000000 4.000000 16.000000 +v 0.000000 4.000000 16.000000 +v 0.000000 7.000000 0.000000 +v 16.000000 7.000000 0.000000 +v 16.000000 7.000000 16.000000 +v 0.000000 7.000000 16.000000 +v 4.000000 16.000000 4.000000 +v 12.000000 16.000000 4.000000 +v 12.000000 16.000000 12.000000 +v 4.000000 16.000000 12.000000 +v 4.000000 10.000000 4.000000 +v 12.000000 10.000000 4.000000 +v 12.000000 10.000000 12.000000 +v 4.000000 10.000000 12.000000 + +vt 0.125000 0.875000 +vt 0.187500 0.875000 +vt 0.187500 0.914062 +vt 0.125000 0.914062 +vt 0.375000 0.937500 +vt 0.375000 0.875000 +vt 0.437500 0.875000 +vt 0.437500 0.937500 +vt 0.500000 0.875000 +vt 0.500000 0.937500 +vt 0.375000 0.914062 +vt 0.312500 0.914062 +vt 0.312500 0.875000 +vt 0.562500 0.875000 +vt 0.562500 0.937500 +vt 0.265625 0.890625 +vt 0.296875 0.890625 +vt 0.296875 0.921875 +vt 0.265625 0.921875 +vt 0.171875 0.914062 +vt 0.171875 0.937500 +vt 0.140625 0.937500 +vt 0.140625 0.914062 + +vt 0.062500 0.875000 +vt 0.062500 0.914062 +vt 0.203125 0.890625 +vt 0.234375 0.890625 +vt 0.234375 0.921875 +vt 0.203125 0.921875 +vt 0.109375 0.914062 +vt 0.109375 0.937500 +vt 0.078125 0.937500 +vt 0.078125 0.914062 + +vt 0.000000 0.875000 +vt 0.000000 0.914062 +vt 0.046875 0.914062 +vt 0.046875 0.937500 +vt 0.015625 0.937500 +vt 0.015625 0.914062 + +g 0 +f 1/5 2/6 3/7 4/8 +f 8/7 7/9 6/10 5/8 +f 12/11 11/12 9/13 10/6 +f 16/11 15/12 13/13 14/6 +f 20/11 19/12 17/13 18/6 +f 24/11 23/12 21/13 22/6 +f 28/9 27/14 26/15 25/10 +f 29/10 30/9 31/14 32/15 + +g 1_1 +f 2/34 1/24 5/25 6/35 +f 6/25 7/35 3/34 2/24 +f 7/25 8/35 4/34 3/24 +f 1/34 4/24 8/25 5/35 +f 36/26 35/27 34/28 33/29 +f 40/36 36/37 33/38 37/39 +f 37/36 33/37 34/38 38/39 +f 38/36 34/37 35/38 39/39 +f 39/36 35/37 36/38 40/39 + +g 1_2 +f 2/24 1/1 5/4 6/25 +f 6/4 7/25 3/24 2/1 +f 7/4 8/25 4/24 3/1 +f 1/24 4/1 8/4 5/25 +f 36/26 35/27 34/28 33/29 +f 40/30 36/31 33/32 37/33 +f 37/30 33/31 34/32 38/33 +f 38/30 34/31 35/32 39/33 +f 39/30 35/31 36/32 40/33 + +g 1_3 +f 2/1 1/2 5/3 6/4 +f 6/3 7/4 3/1 2/2 +f 7/3 8/4 4/1 3/2 +f 1/1 4/2 8/3 5/4 +f 36/16 35/17 34/18 33/19 +f 40/20 36/21 33/22 37/23 +f 37/20 33/21 34/22 38/23 +f 38/20 34/21 35/22 39/23 +f 39/20 35/21 36/22 40/23 diff --git a/src/main/resources/assets/rpcompat/models/btengine2.obj b/src/main/resources/assets/rpcompat/models/btengine2.obj new file mode 100644 index 0000000..c05d616 --- /dev/null +++ b/src/main/resources/assets/rpcompat/models/btengine2.obj @@ -0,0 +1,23 @@ +v 2.000000 10.000000 2.000000 +v 14.000000 10.000000 2.000000 +v 14.000000 10.000000 14.000000 +v 2.000000 10.000000 14.000000 +v 2.000000 13.000000 2.000000 +v 14.000000 13.000000 2.000000 +v 14.000000 13.000000 14.000000 +v 2.000000 13.000000 14.000000 +vt 0.632812 0.875000 +vt 0.679688 0.875000 +vt 0.679688 0.886719 +vt 0.632812 0.886719 +vt 0.617188 0.882812 +vt 0.617188 0.929688 +vt 0.570312 0.929688 +vt 0.570312 0.882812 +g 0 +f 2/1 1/2 5/3 6/4 +f 6/3 7/4 3/1 2/2 +f 7/3 8/4 4/1 3/2 +f 1/1 4/2 8/3 5/4 +f 1/5 2/6 3/7 4/8 +f 8/7 7/8 6/5 5/6 diff --git a/src/main/resources/assets/rpcompat/models/btengine3.obj b/src/main/resources/assets/rpcompat/models/btengine3.obj new file mode 100644 index 0000000..c6172d3 --- /dev/null +++ b/src/main/resources/assets/rpcompat/models/btengine3.obj @@ -0,0 +1,107 @@ +v 7.369397 -1.500000 0.000000 +v 5.257074 -1.500000 -1.045697 +v 4.952058 -1.500000 -2.051211 +v 6.127429 -1.500000 -4.094218 +v 5.210949 -1.500000 -5.210951 +v 2.977890 -1.500000 -4.456733 +v 2.051205 -1.500000 -4.952060 +v 1.437697 -1.500000 -7.227799 +v -0.000003 -1.500000 -7.369400 +v -1.045701 -1.500000 -5.257080 +v -2.051211 -1.500000 -4.952060 +v -4.094222 -1.500000 -6.127432 +v -5.210955 -1.500000 -5.210951 +v -4.456737 -1.500000 -2.977897 +v -4.952065 -1.500000 -2.051208 +v -7.227804 -1.500000 -1.437698 +v -7.369403 -1.500000 0.000000 +v -5.257080 -1.500000 1.045698 +v -4.952065 -1.500000 2.051216 +v -6.127435 -1.500000 4.094221 +v -5.210951 -1.500000 5.210959 +v -2.977893 -1.500000 4.456741 +v -2.051207 -1.500000 4.952060 +v -1.437694 -1.500000 7.227802 +v 0.000005 -1.500000 7.369401 +v 1.045701 -1.500000 5.257076 +v 2.051214 -1.500000 4.952054 +v 4.094226 -1.500000 6.127425 +v 5.210955 -1.500000 5.210944 +v 4.456739 -1.500000 2.977887 +v 4.952058 -1.500000 2.051201 +v 7.227798 -1.500000 1.437686 +v 7.369397 1.500000 0.000000 +v 5.257074 1.500000 -1.045697 +v 4.952058 1.500000 -2.051211 +v 6.127429 1.500000 -4.094218 +v 5.210949 1.500000 -5.210951 +v 2.977890 1.500000 -4.456733 +v 2.051205 1.500000 -4.952060 +v 1.437697 1.500000 -7.227799 +v -0.000003 1.500000 -7.369400 +v -1.045701 1.500000 -5.257080 +v -2.051211 1.500000 -4.952060 +v -4.094222 1.500000 -6.127432 +v -5.210955 1.500000 -5.210951 +v -4.456737 1.500000 -2.977897 +v -4.952065 1.500000 -2.051208 +v -7.227804 1.500000 -1.437698 +v -7.369403 1.500000 0.000000 +v -5.257080 1.500000 1.045698 +v -4.952065 1.500000 2.051216 +v -6.127435 1.500000 4.094221 +v -5.210951 1.500000 5.210959 +v -2.977893 1.500000 4.456741 +v -2.051207 1.500000 4.952060 +v -1.437694 1.500000 7.227802 +v 0.000005 1.500000 7.369401 +v 1.045701 1.500000 5.257076 +v 2.051214 1.500000 4.952054 +v 4.094226 1.500000 6.127425 +v 5.210955 1.500000 5.210944 +v 4.456739 1.500000 2.977887 +v 4.952058 1.500000 2.051201 +v 7.227798 1.500000 1.437686 +vt 0.644531 0.902344 +vt 0.636719 0.902344 +vt 0.636719 0.890625 +vt 0.644531 0.890625 +vt 0.675781 0.902344 +vt 0.664062 0.902344 +vt 0.664062 0.890625 +vt 0.675781 0.890625 +vt 0.656250 0.902344 +vt 0.656250 0.890625 +g 0 +f 41/1 40/2 8/3 9/4 +f 36/5 35/6 3/7 4/8 +f 62/9 61/1 29/4 30/10 +f 57/1 56/2 24/3 25/4 +f 52/5 51/6 19/7 20/8 +f 47/6 46/9 14/10 15/7 +f 42/9 41/1 9/4 10/10 +f 37/3 36/4 4/1 5/2 +f 63/6 62/9 30/10 31/7 +f 58/9 57/1 25/4 26/10 +f 53/1 52/2 20/3 21/4 +f 48/5 47/6 15/7 16/8 +f 43/6 42/9 10/10 11/7 +f 38/9 37/1 5/4 6/10 +f 64/5 63/6 31/7 32/8 +f 59/6 58/9 26/10 27/7 +f 54/9 53/1 21/4 22/10 +f 49/1 48/2 16/3 17/4 +f 44/5 43/6 11/7 12/8 +f 39/6 38/9 6/10 7/7 +f 1/4 2/10 34/9 33/1 +f 1/4 33/1 64/2 32/3 +f 60/5 59/6 27/7 28/8 +f 55/6 54/9 22/10 23/7 +f 50/9 49/1 17/4 18/10 +f 45/1 44/2 12/3 13/4 +f 40/5 39/6 7/7 8/8 +f 35/6 34/9 2/10 3/7 +f 61/1 60/2 28/3 29/4 +f 56/5 55/6 23/7 24/8 +f 51/6 50/9 18/10 19/7 +f 46/9 45/1 13/4 14/10 diff --git a/src/main/resources/assets/rpcompat/models/compat1.png b/src/main/resources/assets/rpcompat/models/compat1.png new file mode 100644 index 0000000..0157ac6 Binary files /dev/null and b/src/main/resources/assets/rpcompat/models/compat1.png differ diff --git a/src/main/resources/assets/rpcompat/textures/items/densePlateTungsten.png b/src/main/resources/assets/rpcompat/textures/items/densePlateTungsten.png new file mode 100644 index 0000000..ebe8d88 Binary files /dev/null and b/src/main/resources/assets/rpcompat/textures/items/densePlateTungsten.png differ diff --git a/src/main/resources/assets/rpcompat/textures/items/gear.png b/src/main/resources/assets/rpcompat/textures/items/gear.png new file mode 100644 index 0000000..c8f4f86 Binary files /dev/null and b/src/main/resources/assets/rpcompat/textures/items/gear.png differ diff --git a/src/main/resources/assets/rpcontrol/forth/redforth.img b/src/main/resources/assets/rpcontrol/forth/redforth.img new file mode 100644 index 0000000..2c2a238 Binary files /dev/null and b/src/main/resources/assets/rpcontrol/forth/redforth.img differ diff --git a/src/main/resources/assets/rpcontrol/forth/redforthxp.img b/src/main/resources/assets/rpcontrol/forth/redforthxp.img new file mode 100644 index 0000000..2d75140 Binary files /dev/null and b/src/main/resources/assets/rpcontrol/forth/redforthxp.img differ diff --git a/src/main/resources/assets/rpcontrol/forth/rpcboot.bin b/src/main/resources/assets/rpcontrol/forth/rpcboot.bin new file mode 100644 index 0000000..0a17857 Binary files /dev/null and b/src/main/resources/assets/rpcontrol/forth/rpcboot.bin differ diff --git a/src/main/resources/assets/rpcontrol/lang/en_US.lang b/src/main/resources/assets/rpcontrol/lang/en_US.lang new file mode 100644 index 0000000..8dbe567 --- /dev/null +++ b/src/main/resources/assets/rpcontrol/lang/en_US.lang @@ -0,0 +1,18 @@ +tile.rpcpu.name=Central Processing Unit +tile.rpdiskdrive.name=Disk Drive +tile.rpdisplay.name=Monitor +tile.rpioexp.name=IO Expander +tile.rpbackplane.name=Backplane +tile.rpram.name=8K RAM Module +tile.ribbon.name=Ribbon Cable + +item.disk.forth.name=FORTH Boot Disk +item.disk.forthxp.name=Extended FORTH Disk +item.disk.name=Blank Floppy + +gui.cpu.diskid=Disk: %d +gui.cpu.consoleid=Console: %d +gui.cpu.selfid=ID: %d +gui.cpu.start=START +gui.cpu.halt=HALT +gui.cpu.reset=RESET \ No newline at end of file diff --git a/src/main/resources/assets/rpcontrol/lang/ru_RU.lang b/src/main/resources/assets/rpcontrol/lang/ru_RU.lang new file mode 100644 index 0000000..62ef2b5 --- /dev/null +++ b/src/main/resources/assets/rpcontrol/lang/ru_RU.lang @@ -0,0 +1,18 @@ +tile.rpcpu.name=Центральный процессор +tile.rpdiskdrive.name=Дисковод +tile.rpdisplay.name=Монитор +tile.rpioexp.name=Расширитель Ввода/Вывода +tile.rpbackplane.name=Объединительная плата +tile.rpram.name=Модуль ОЗУ на 8K +tile.ribbon.name=Ленточный кабель + +item.disk.forth.name=Загрузочная дискета с FORTH +item.disk.forthxp.name=Расширенная дискета с FORTH +item.disk.name=Пустая дискета + +gui.cpu.diskid=Дисковод: %d +gui.cpu.consoleid=Консоль: %d +gui.cpu.selfid=ID: %d +gui.cpu.start=ПУСК +gui.cpu.halt=СТОП +gui.cpu.reset=СБРОС \ No newline at end of file diff --git a/src/main/resources/assets/rpcontrol/models/modem.obj b/src/main/resources/assets/rpcontrol/models/modem.obj new file mode 100644 index 0000000..25fdccd --- /dev/null +++ b/src/main/resources/assets/rpcontrol/models/modem.obj @@ -0,0 +1,470 @@ +# 18 Vertices +v 1.000000 0.000000 1.000000 +v 0.000000 0.000000 1.000000 +v 0.000000 0.000000 0.000000 +v 1.000000 0.000000 0.000000 +v 1.000000 0.500000 0.000000 +v 0.000000 0.500000 0.000000 +v 0.000000 0.500000 1.000000 +v 1.000000 0.500000 1.000000 +v 0.000000 0.312500 0.250000 +v 0.000000 0.187500 0.250000 +v 0.000000 0.187500 0.375000 +v 0.000000 0.312500 0.375000 +v 0.000000 0.187500 0.500000 +v 0.000000 0.312500 0.500000 +v 0.000000 0.187500 0.625000 +v 0.000000 0.312500 0.625000 +v 0.000000 0.187500 0.750000 +v 0.000000 0.312500 0.750000 + +# 304 Texture Coordinates +vtc 0.312500 0.812500 0.500000 0.500000 0.500000 +vtc 0.312500 0.750000 0.500000 0.500000 0.500000 +vtc 0.375000 0.750000 0.500000 0.500000 0.500000 +vtc 0.375000 0.812500 0.500000 0.500000 0.500000 +vtc 0.000000 0.812500 1.000000 1.000000 1.000000 +vtc 0.000000 0.750000 1.000000 1.000000 1.000000 +vtc 0.062500 0.750000 1.000000 1.000000 1.000000 +vtc 0.062500 0.812500 1.000000 1.000000 1.000000 +vtc 0.062500 0.781250 0.800000 0.800000 0.800000 +vtc 0.062500 0.750000 0.800000 0.800000 0.800000 +vtc 0.125000 0.750000 0.800000 0.800000 0.800000 +vtc 0.125000 0.781250 0.800000 0.800000 0.800000 +vtc 0.125000 0.781250 0.800000 0.800000 0.800000 +vtc 0.125000 0.750000 0.800000 0.800000 0.800000 +vtc 0.062500 0.750000 0.800000 0.800000 0.800000 +vtc 0.062500 0.781250 0.800000 0.800000 0.800000 +vtc 0.250000 0.781250 0.600000 0.600000 0.600000 +vtc 0.250000 0.750000 0.600000 0.600000 0.600000 +vtc 0.312500 0.750000 0.600000 0.600000 0.600000 +vtc 0.312500 0.781250 0.600000 0.600000 0.600000 +vtc 0.125000 0.781250 0.600000 0.600000 0.600000 +vtc 0.125000 0.750000 0.600000 0.600000 0.600000 +vtc 0.187500 0.750000 0.600000 0.600000 0.600000 +vtc 0.187500 0.781250 0.600000 0.600000 0.600000 +vtc 0.375000 0.812500 0.500000 0.500000 0.500000 +vtc 0.375000 0.750000 0.500000 0.500000 0.500000 +vtc 0.437500 0.750000 0.500000 0.500000 0.500000 +vtc 0.437500 0.812500 0.500000 0.500000 0.500000 +vtc 0.000000 0.812500 1.000000 1.000000 1.000000 +vtc 0.000000 0.750000 1.000000 1.000000 1.000000 +vtc 0.062500 0.750000 1.000000 1.000000 1.000000 +vtc 0.062500 0.812500 1.000000 1.000000 1.000000 +vtc 0.062500 0.781250 0.800000 0.800000 0.800000 +vtc 0.062500 0.750000 0.800000 0.800000 0.800000 +vtc 0.125000 0.750000 0.800000 0.800000 0.800000 +vtc 0.125000 0.781250 0.800000 0.800000 0.800000 +vtc 0.125000 0.781250 0.800000 0.800000 0.800000 +vtc 0.125000 0.750000 0.800000 0.800000 0.800000 +vtc 0.062500 0.750000 0.800000 0.800000 0.800000 +vtc 0.062500 0.781250 0.800000 0.800000 0.800000 +vtc 0.250000 0.781250 0.600000 0.600000 0.600000 +vtc 0.250000 0.750000 0.600000 0.600000 0.600000 +vtc 0.312500 0.750000 0.600000 0.600000 0.600000 +vtc 0.312500 0.781250 0.600000 0.600000 0.600000 +vtc 0.187500 0.781250 0.600000 0.600000 0.600000 +vtc 0.187500 0.750000 0.600000 0.600000 0.600000 +vtc 0.250000 0.750000 0.600000 0.600000 0.600000 +vtc 0.250000 0.781250 0.600000 0.600000 0.600000 +vtc 0.437500 0.812500 0.600000 0.600000 0.600000 +vtc 0.437500 0.804688 0.600000 0.600000 0.600000 +vtc 0.445313 0.804688 0.600000 0.600000 0.600000 +vtc 0.445313 0.812500 0.600000 0.600000 0.600000 +vtc 0.445313 0.812500 0.600000 0.600000 0.600000 +vtc 0.445313 0.804688 0.600000 0.600000 0.600000 +vtc 0.453125 0.804688 0.600000 0.600000 0.600000 +vtc 0.453125 0.812500 0.600000 0.600000 0.600000 +vtc 0.453125 0.812500 0.600000 0.600000 0.600000 +vtc 0.453125 0.804688 0.600000 0.600000 0.600000 +vtc 0.460938 0.804688 0.600000 0.600000 0.600000 +vtc 0.460938 0.812500 0.600000 0.600000 0.600000 +vtc 0.460938 0.812500 0.600000 0.600000 0.600000 +vtc 0.460938 0.804688 0.600000 0.600000 0.600000 +vtc 0.468750 0.804688 0.600000 0.600000 0.600000 +vtc 0.468750 0.812500 0.600000 0.600000 0.600000 +vtc 0.468750 0.812500 0.600000 0.600000 0.600000 +vtc 0.468750 0.804688 0.600000 0.600000 0.600000 +vtc 0.476563 0.804688 0.600000 0.600000 0.600000 +vtc 0.476563 0.812500 0.600000 0.600000 0.600000 +vtc 0.476563 0.812500 0.600000 0.600000 0.600000 +vtc 0.476563 0.804688 0.600000 0.600000 0.600000 +vtc 0.484375 0.804688 0.600000 0.600000 0.600000 +vtc 0.484375 0.812500 0.600000 0.600000 0.600000 +vtc 0.484375 0.812500 0.600000 0.600000 0.600000 +vtc 0.484375 0.804688 0.600000 0.600000 0.600000 +vtc 0.492188 0.804688 0.600000 0.600000 0.600000 +vtc 0.492188 0.812500 0.600000 0.600000 0.600000 +vtc 0.492188 0.812500 0.600000 0.600000 0.600000 +vtc 0.492188 0.804688 0.600000 0.600000 0.600000 +vtc 0.500000 0.804688 0.600000 0.600000 0.600000 +vtc 0.500000 0.812500 0.600000 0.600000 0.600000 +vtc 0.437500 0.804688 0.600000 0.600000 0.600000 +vtc 0.437500 0.796875 0.600000 0.600000 0.600000 +vtc 0.445313 0.796875 0.600000 0.600000 0.600000 +vtc 0.445313 0.804688 0.600000 0.600000 0.600000 +vtc 0.445313 0.804688 0.600000 0.600000 0.600000 +vtc 0.445313 0.796875 0.600000 0.600000 0.600000 +vtc 0.453125 0.796875 0.600000 0.600000 0.600000 +vtc 0.453125 0.804688 0.600000 0.600000 0.600000 +vtc 0.453125 0.804688 0.600000 0.600000 0.600000 +vtc 0.453125 0.796875 0.600000 0.600000 0.600000 +vtc 0.460938 0.796875 0.600000 0.600000 0.600000 +vtc 0.460938 0.804688 0.600000 0.600000 0.600000 +vtc 0.460938 0.804688 0.600000 0.600000 0.600000 +vtc 0.460938 0.796875 0.600000 0.600000 0.600000 +vtc 0.468750 0.796875 0.600000 0.600000 0.600000 +vtc 0.468750 0.804688 0.600000 0.600000 0.600000 +vtc 0.468750 0.804688 0.600000 0.600000 0.600000 +vtc 0.468750 0.796875 0.600000 0.600000 0.600000 +vtc 0.476563 0.796875 0.600000 0.600000 0.600000 +vtc 0.476563 0.804688 0.600000 0.600000 0.600000 +vtc 0.476563 0.804688 0.600000 0.600000 0.600000 +vtc 0.476563 0.796875 0.600000 0.600000 0.600000 +vtc 0.484375 0.796875 0.600000 0.600000 0.600000 +vtc 0.484375 0.804688 0.600000 0.600000 0.600000 +vtc 0.484375 0.804688 0.600000 0.600000 0.600000 +vtc 0.484375 0.796875 0.600000 0.600000 0.600000 +vtc 0.492188 0.796875 0.600000 0.600000 0.600000 +vtc 0.492188 0.804688 0.600000 0.600000 0.600000 +vtc 0.492188 0.804688 0.600000 0.600000 0.600000 +vtc 0.492188 0.796875 0.600000 0.600000 0.600000 +vtc 0.500000 0.796875 0.600000 0.600000 0.600000 +vtc 0.500000 0.804688 0.600000 0.600000 0.600000 +vtc 0.437500 0.812500 0.600000 0.600000 0.600000 +vtc 0.437500 0.804688 0.600000 0.600000 0.600000 +vtc 0.445313 0.804688 0.600000 0.600000 0.600000 +vtc 0.445313 0.812500 0.600000 0.600000 0.600000 +vtc 0.445313 0.812500 0.600000 0.600000 0.600000 +vtc 0.445313 0.804688 0.600000 0.600000 0.600000 +vtc 0.453125 0.804688 0.600000 0.600000 0.600000 +vtc 0.453125 0.812500 0.600000 0.600000 0.600000 +vtc 0.453125 0.812500 0.600000 0.600000 0.600000 +vtc 0.453125 0.804688 0.600000 0.600000 0.600000 +vtc 0.460938 0.804688 0.600000 0.600000 0.600000 +vtc 0.460938 0.812500 0.600000 0.600000 0.600000 +vtc 0.460938 0.812500 0.600000 0.600000 0.600000 +vtc 0.460938 0.804688 0.600000 0.600000 0.600000 +vtc 0.468750 0.804688 0.600000 0.600000 0.600000 +vtc 0.468750 0.812500 0.600000 0.600000 0.600000 +vtc 0.468750 0.812500 0.600000 0.600000 0.600000 +vtc 0.468750 0.804688 0.600000 0.600000 0.600000 +vtc 0.476563 0.804688 0.600000 0.600000 0.600000 +vtc 0.476563 0.812500 0.600000 0.600000 0.600000 +vtc 0.476563 0.812500 0.600000 0.600000 0.600000 +vtc 0.476563 0.804688 0.600000 0.600000 0.600000 +vtc 0.484375 0.804688 0.600000 0.600000 0.600000 +vtc 0.484375 0.812500 0.600000 0.600000 0.600000 +vtc 0.484375 0.812500 0.600000 0.600000 0.600000 +vtc 0.484375 0.804688 0.600000 0.600000 0.600000 +vtc 0.492188 0.804688 0.600000 0.600000 0.600000 +vtc 0.492188 0.812500 0.600000 0.600000 0.600000 +vtc 0.492188 0.812500 0.600000 0.600000 0.600000 +vtc 0.492188 0.804688 0.600000 0.600000 0.600000 +vtc 0.500000 0.804688 0.600000 0.600000 0.600000 +vtc 0.500000 0.812500 0.600000 0.600000 0.600000 +vtc 0.437500 0.804688 0.600000 0.600000 0.600000 +vtc 0.437500 0.796875 0.600000 0.600000 0.600000 +vtc 0.445313 0.796875 0.600000 0.600000 0.600000 +vtc 0.445313 0.804688 0.600000 0.600000 0.600000 +vtc 0.445313 0.804688 0.600000 0.600000 0.600000 +vtc 0.445313 0.796875 0.600000 0.600000 0.600000 +vtc 0.453125 0.796875 0.600000 0.600000 0.600000 +vtc 0.453125 0.804688 0.600000 0.600000 0.600000 +vtc 0.453125 0.804688 0.600000 0.600000 0.600000 +vtc 0.453125 0.796875 0.600000 0.600000 0.600000 +vtc 0.460938 0.796875 0.600000 0.600000 0.600000 +vtc 0.460938 0.804688 0.600000 0.600000 0.600000 +vtc 0.460938 0.804688 0.600000 0.600000 0.600000 +vtc 0.460938 0.796875 0.600000 0.600000 0.600000 +vtc 0.468750 0.796875 0.600000 0.600000 0.600000 +vtc 0.468750 0.804688 0.600000 0.600000 0.600000 +vtc 0.468750 0.804688 0.600000 0.600000 0.600000 +vtc 0.468750 0.796875 0.600000 0.600000 0.600000 +vtc 0.476563 0.796875 0.600000 0.600000 0.600000 +vtc 0.476563 0.804688 0.600000 0.600000 0.600000 +vtc 0.476563 0.804688 0.600000 0.600000 0.600000 +vtc 0.476563 0.796875 0.600000 0.600000 0.600000 +vtc 0.484375 0.796875 0.600000 0.600000 0.600000 +vtc 0.484375 0.804688 0.600000 0.600000 0.600000 +vtc 0.484375 0.804688 0.600000 0.600000 0.600000 +vtc 0.484375 0.796875 0.600000 0.600000 0.600000 +vtc 0.492188 0.796875 0.600000 0.600000 0.600000 +vtc 0.492188 0.804688 0.600000 0.600000 0.600000 +vtc 0.492188 0.804688 0.600000 0.600000 0.600000 +vtc 0.492188 0.796875 0.600000 0.600000 0.600000 +vtc 0.500000 0.796875 0.600000 0.600000 0.600000 +vtc 0.500000 0.804688 0.600000 0.600000 0.600000 +vtc 0.437500 0.812500 0.600000 0.600000 0.600000 +vtc 0.437500 0.804688 0.600000 0.600000 0.600000 +vtc 0.445313 0.804688 0.600000 0.600000 0.600000 +vtc 0.445313 0.812500 0.600000 0.600000 0.600000 +vtc 0.445313 0.812500 0.600000 0.600000 0.600000 +vtc 0.445313 0.804688 0.600000 0.600000 0.600000 +vtc 0.453125 0.804688 0.600000 0.600000 0.600000 +vtc 0.453125 0.812500 0.600000 0.600000 0.600000 +vtc 0.453125 0.812500 0.600000 0.600000 0.600000 +vtc 0.453125 0.804688 0.600000 0.600000 0.600000 +vtc 0.460938 0.804688 0.600000 0.600000 0.600000 +vtc 0.460938 0.812500 0.600000 0.600000 0.600000 +vtc 0.460938 0.812500 0.600000 0.600000 0.600000 +vtc 0.460938 0.804688 0.600000 0.600000 0.600000 +vtc 0.468750 0.804688 0.600000 0.600000 0.600000 +vtc 0.468750 0.812500 0.600000 0.600000 0.600000 +vtc 0.468750 0.812500 0.600000 0.600000 0.600000 +vtc 0.468750 0.804688 0.600000 0.600000 0.600000 +vtc 0.476563 0.804688 0.600000 0.600000 0.600000 +vtc 0.476563 0.812500 0.600000 0.600000 0.600000 +vtc 0.476563 0.812500 0.600000 0.600000 0.600000 +vtc 0.476563 0.804688 0.600000 0.600000 0.600000 +vtc 0.484375 0.804688 0.600000 0.600000 0.600000 +vtc 0.484375 0.812500 0.600000 0.600000 0.600000 +vtc 0.484375 0.812500 0.600000 0.600000 0.600000 +vtc 0.484375 0.804688 0.600000 0.600000 0.600000 +vtc 0.492188 0.804688 0.600000 0.600000 0.600000 +vtc 0.492188 0.812500 0.600000 0.600000 0.600000 +vtc 0.492188 0.812500 0.600000 0.600000 0.600000 +vtc 0.492188 0.804688 0.600000 0.600000 0.600000 +vtc 0.500000 0.804688 0.600000 0.600000 0.600000 +vtc 0.500000 0.812500 0.600000 0.600000 0.600000 +vtc 0.437500 0.804688 0.600000 0.600000 0.600000 +vtc 0.437500 0.796875 0.600000 0.600000 0.600000 +vtc 0.445313 0.796875 0.600000 0.600000 0.600000 +vtc 0.445313 0.804688 0.600000 0.600000 0.600000 +vtc 0.445313 0.804688 0.600000 0.600000 0.600000 +vtc 0.445313 0.796875 0.600000 0.600000 0.600000 +vtc 0.453125 0.796875 0.600000 0.600000 0.600000 +vtc 0.453125 0.804688 0.600000 0.600000 0.600000 +vtc 0.453125 0.804688 0.600000 0.600000 0.600000 +vtc 0.453125 0.796875 0.600000 0.600000 0.600000 +vtc 0.460938 0.796875 0.600000 0.600000 0.600000 +vtc 0.460938 0.804688 0.600000 0.600000 0.600000 +vtc 0.460938 0.804688 0.600000 0.600000 0.600000 +vtc 0.460938 0.796875 0.600000 0.600000 0.600000 +vtc 0.468750 0.796875 0.600000 0.600000 0.600000 +vtc 0.468750 0.804688 0.600000 0.600000 0.600000 +vtc 0.468750 0.804688 0.600000 0.600000 0.600000 +vtc 0.468750 0.796875 0.600000 0.600000 0.600000 +vtc 0.476563 0.796875 0.600000 0.600000 0.600000 +vtc 0.476563 0.804688 0.600000 0.600000 0.600000 +vtc 0.476563 0.804688 0.600000 0.600000 0.600000 +vtc 0.476563 0.796875 0.600000 0.600000 0.600000 +vtc 0.484375 0.796875 0.600000 0.600000 0.600000 +vtc 0.484375 0.804688 0.600000 0.600000 0.600000 +vtc 0.484375 0.804688 0.600000 0.600000 0.600000 +vtc 0.484375 0.796875 0.600000 0.600000 0.600000 +vtc 0.492188 0.796875 0.600000 0.600000 0.600000 +vtc 0.492188 0.804688 0.600000 0.600000 0.600000 +vtc 0.492188 0.804688 0.600000 0.600000 0.600000 +vtc 0.492188 0.796875 0.600000 0.600000 0.600000 +vtc 0.500000 0.796875 0.600000 0.600000 0.600000 +vtc 0.500000 0.804688 0.600000 0.600000 0.600000 +vtc 0.437500 0.812500 0.600000 0.600000 0.600000 +vtc 0.437500 0.804688 0.600000 0.600000 0.600000 +vtc 0.445313 0.804688 0.600000 0.600000 0.600000 +vtc 0.445313 0.812500 0.600000 0.600000 0.600000 +vtc 0.445313 0.812500 0.600000 0.600000 0.600000 +vtc 0.445313 0.804688 0.600000 0.600000 0.600000 +vtc 0.453125 0.804688 0.600000 0.600000 0.600000 +vtc 0.453125 0.812500 0.600000 0.600000 0.600000 +vtc 0.453125 0.812500 0.600000 0.600000 0.600000 +vtc 0.453125 0.804688 0.600000 0.600000 0.600000 +vtc 0.460938 0.804688 0.600000 0.600000 0.600000 +vtc 0.460938 0.812500 0.600000 0.600000 0.600000 +vtc 0.460938 0.812500 0.600000 0.600000 0.600000 +vtc 0.460938 0.804688 0.600000 0.600000 0.600000 +vtc 0.468750 0.804688 0.600000 0.600000 0.600000 +vtc 0.468750 0.812500 0.600000 0.600000 0.600000 +vtc 0.468750 0.812500 0.600000 0.600000 0.600000 +vtc 0.468750 0.804688 0.600000 0.600000 0.600000 +vtc 0.476563 0.804688 0.600000 0.600000 0.600000 +vtc 0.476563 0.812500 0.600000 0.600000 0.600000 +vtc 0.476563 0.812500 0.600000 0.600000 0.600000 +vtc 0.476563 0.804688 0.600000 0.600000 0.600000 +vtc 0.484375 0.804688 0.600000 0.600000 0.600000 +vtc 0.484375 0.812500 0.600000 0.600000 0.600000 +vtc 0.484375 0.812500 0.600000 0.600000 0.600000 +vtc 0.484375 0.804688 0.600000 0.600000 0.600000 +vtc 0.492188 0.804688 0.600000 0.600000 0.600000 +vtc 0.492188 0.812500 0.600000 0.600000 0.600000 +vtc 0.492188 0.812500 0.600000 0.600000 0.600000 +vtc 0.492188 0.804688 0.600000 0.600000 0.600000 +vtc 0.500000 0.804688 0.600000 0.600000 0.600000 +vtc 0.500000 0.812500 0.600000 0.600000 0.600000 +vtc 0.437500 0.804688 0.600000 0.600000 0.600000 +vtc 0.437500 0.796875 0.600000 0.600000 0.600000 +vtc 0.445313 0.796875 0.600000 0.600000 0.600000 +vtc 0.445313 0.804688 0.600000 0.600000 0.600000 +vtc 0.445313 0.804688 0.600000 0.600000 0.600000 +vtc 0.445313 0.796875 0.600000 0.600000 0.600000 +vtc 0.453125 0.796875 0.600000 0.600000 0.600000 +vtc 0.453125 0.804688 0.600000 0.600000 0.600000 +vtc 0.453125 0.804688 0.600000 0.600000 0.600000 +vtc 0.453125 0.796875 0.600000 0.600000 0.600000 +vtc 0.460938 0.796875 0.600000 0.600000 0.600000 +vtc 0.460938 0.804688 0.600000 0.600000 0.600000 +vtc 0.460938 0.804688 0.600000 0.600000 0.600000 +vtc 0.460938 0.796875 0.600000 0.600000 0.600000 +vtc 0.468750 0.796875 0.600000 0.600000 0.600000 +vtc 0.468750 0.804688 0.600000 0.600000 0.600000 +vtc 0.468750 0.804688 0.600000 0.600000 0.600000 +vtc 0.468750 0.796875 0.600000 0.600000 0.600000 +vtc 0.476563 0.796875 0.600000 0.600000 0.600000 +vtc 0.476563 0.804688 0.600000 0.600000 0.600000 +vtc 0.476563 0.804688 0.600000 0.600000 0.600000 +vtc 0.476563 0.796875 0.600000 0.600000 0.600000 +vtc 0.484375 0.796875 0.600000 0.600000 0.600000 +vtc 0.484375 0.804688 0.600000 0.600000 0.600000 +vtc 0.484375 0.804688 0.600000 0.600000 0.600000 +vtc 0.484375 0.796875 0.600000 0.600000 0.600000 +vtc 0.492188 0.796875 0.600000 0.600000 0.600000 +vtc 0.492188 0.804688 0.600000 0.600000 0.600000 +vtc 0.492188 0.804688 0.600000 0.600000 0.600000 +vtc 0.492188 0.796875 0.600000 0.600000 0.600000 +vtc 0.500000 0.796875 0.600000 0.600000 0.600000 +vtc 0.500000 0.804688 0.600000 0.600000 0.600000 + +# 6 Groups +g 0 +g 1_1 +f 1/1 2/2 3/3 4/4 +f 5/5 6/6 7/7 8/8 +f 5/9 4/10 3/11 6/12 +f 7/13 2/14 1/15 8/16 +f 6/17 3/18 2/19 7/20 +f 8/21 1/22 4/23 5/24 +g 1_2 +f 1/25 2/26 3/27 4/28 +f 5/29 6/30 7/31 8/32 +f 5/33 4/34 3/35 6/36 +f 7/37 2/38 1/39 8/40 +f 6/41 3/42 2/43 7/44 +f 8/45 1/46 4/47 5/48 +g 2_1 +f 9/49 10/50 11/51 12/52 +g 2_2 +f 9/53 10/54 11/55 12/56 +g 2_3 +f 9/57 10/58 11/59 12/60 +g 2_4 +f 9/61 10/62 11/63 12/64 +g 2_5 +f 9/65 10/66 11/67 12/68 +g 2_6 +f 9/69 10/70 11/71 12/72 +g 2_7 +f 9/73 10/74 11/75 12/76 +g 2_8 +f 9/77 10/78 11/79 12/80 +g 2_9 +f 9/81 10/82 11/83 12/84 +g 2_10 +f 9/85 10/86 11/87 12/88 +g 2_11 +f 9/89 10/90 11/91 12/92 +g 2_12 +f 9/93 10/94 11/95 12/96 +g 2_13 +f 9/97 10/98 11/99 12/100 +g 2_14 +f 9/101 10/102 11/103 12/104 +g 2_15 +f 9/105 10/106 11/107 12/108 +g 2_16 +f 9/109 10/110 11/111 12/112 +g 3_1 +f 12/113 11/114 13/115 14/116 +g 3_2 +f 12/117 11/118 13/119 14/120 +g 3_3 +f 12/121 11/122 13/123 14/124 +g 3_4 +f 12/125 11/126 13/127 14/128 +g 3_5 +f 12/129 11/130 13/131 14/132 +g 3_6 +f 12/133 11/134 13/135 14/136 +g 3_7 +f 12/137 11/138 13/139 14/140 +g 3_8 +f 12/141 11/142 13/143 14/144 +g 3_9 +f 12/145 11/146 13/147 14/148 +g 3_10 +f 12/149 11/150 13/151 14/152 +g 3_11 +f 12/153 11/154 13/155 14/156 +g 3_12 +f 12/157 11/158 13/159 14/160 +g 3_13 +f 12/161 11/162 13/163 14/164 +g 3_14 +f 12/165 11/166 13/167 14/168 +g 3_15 +f 12/169 11/170 13/171 14/172 +g 3_16 +f 12/173 11/174 13/175 14/176 +g 4_1 +f 14/177 13/178 15/179 16/180 +g 4_2 +f 14/181 13/182 15/183 16/184 +g 4_3 +f 14/185 13/186 15/187 16/188 +g 4_4 +f 14/189 13/190 15/191 16/192 +g 4_5 +f 14/193 13/194 15/195 16/196 +g 4_6 +f 14/197 13/198 15/199 16/200 +g 4_7 +f 14/201 13/202 15/203 16/204 +g 4_8 +f 14/205 13/206 15/207 16/208 +g 4_9 +f 14/209 13/210 15/211 16/212 +g 4_10 +f 14/213 13/214 15/215 16/216 +g 4_11 +f 14/217 13/218 15/219 16/220 +g 4_12 +f 14/221 13/222 15/223 16/224 +g 4_13 +f 14/225 13/226 15/227 16/228 +g 4_14 +f 14/229 13/230 15/231 16/232 +g 4_15 +f 14/233 13/234 15/235 16/236 +g 4_16 +f 14/237 13/238 15/239 16/240 +g 5_1 +f 16/241 15/242 17/243 18/244 +g 5_2 +f 16/245 15/246 17/247 18/248 +g 5_3 +f 16/249 15/250 17/251 18/252 +g 5_4 +f 16/253 15/254 17/255 18/256 +g 5_5 +f 16/257 15/258 17/259 18/260 +g 5_6 +f 16/261 15/262 17/263 18/264 +g 5_7 +f 16/265 15/266 17/267 18/268 +g 5_8 +f 16/269 15/270 17/271 18/272 +g 5_9 +f 16/273 15/274 17/275 18/276 +g 5_10 +f 16/277 15/278 17/279 18/280 +g 5_11 +f 16/281 15/282 17/283 18/284 +g 5_12 +f 16/285 15/286 17/287 18/288 +g 5_13 +f 16/289 15/290 17/291 18/292 +g 5_14 +f 16/293 15/294 17/295 18/296 +g 5_15 +f 16/297 15/298 17/299 18/300 +g 5_16 +f 16/301 15/302 17/303 18/304 diff --git a/src/main/resources/assets/rpcontrol/models/modem.png b/src/main/resources/assets/rpcontrol/models/modem.png new file mode 100644 index 0000000..ee19fe9 Binary files /dev/null and b/src/main/resources/assets/rpcontrol/models/modem.png differ diff --git a/src/main/resources/assets/rpcontrol/textures/blocks/backplaneFace.png b/src/main/resources/assets/rpcontrol/textures/blocks/backplaneFace.png new file mode 100644 index 0000000..ac7dd1c Binary files /dev/null and b/src/main/resources/assets/rpcontrol/textures/blocks/backplaneFace.png differ diff --git a/src/main/resources/assets/rpcontrol/textures/blocks/backplaneSide.png b/src/main/resources/assets/rpcontrol/textures/blocks/backplaneSide.png new file mode 100644 index 0000000..cf8c070 Binary files /dev/null and b/src/main/resources/assets/rpcontrol/textures/blocks/backplaneSide.png differ diff --git a/src/main/resources/assets/rpcontrol/textures/blocks/backplaneTop.png b/src/main/resources/assets/rpcontrol/textures/blocks/backplaneTop.png new file mode 100644 index 0000000..b40b1f4 Binary files /dev/null and b/src/main/resources/assets/rpcontrol/textures/blocks/backplaneTop.png differ diff --git a/src/main/resources/assets/rpcontrol/textures/blocks/cpuFront.png b/src/main/resources/assets/rpcontrol/textures/blocks/cpuFront.png new file mode 100644 index 0000000..8dda9ef Binary files /dev/null and b/src/main/resources/assets/rpcontrol/textures/blocks/cpuFront.png differ diff --git a/src/main/resources/assets/rpcontrol/textures/blocks/diskDriveFront.png b/src/main/resources/assets/rpcontrol/textures/blocks/diskDriveFront.png new file mode 100644 index 0000000..0fe87cc Binary files /dev/null and b/src/main/resources/assets/rpcontrol/textures/blocks/diskDriveFront.png differ diff --git a/src/main/resources/assets/rpcontrol/textures/blocks/diskDriveFrontFull.png b/src/main/resources/assets/rpcontrol/textures/blocks/diskDriveFrontFull.png new file mode 100644 index 0000000..39c9016 Binary files /dev/null and b/src/main/resources/assets/rpcontrol/textures/blocks/diskDriveFrontFull.png differ diff --git a/src/main/resources/assets/rpcontrol/textures/blocks/diskDriveFrontOn.png b/src/main/resources/assets/rpcontrol/textures/blocks/diskDriveFrontOn.png new file mode 100644 index 0000000..151f9ee Binary files /dev/null and b/src/main/resources/assets/rpcontrol/textures/blocks/diskDriveFrontOn.png differ diff --git a/src/main/resources/assets/rpcontrol/textures/blocks/diskDriveSide.png b/src/main/resources/assets/rpcontrol/textures/blocks/diskDriveSide.png new file mode 100644 index 0000000..783c53d Binary files /dev/null and b/src/main/resources/assets/rpcontrol/textures/blocks/diskDriveSide.png differ diff --git a/src/main/resources/assets/rpcontrol/textures/blocks/diskDriveTop.png b/src/main/resources/assets/rpcontrol/textures/blocks/diskDriveTop.png new file mode 100644 index 0000000..31ac571 Binary files /dev/null and b/src/main/resources/assets/rpcontrol/textures/blocks/diskDriveTop.png differ diff --git a/src/main/resources/assets/rpcontrol/textures/blocks/displayFront.png b/src/main/resources/assets/rpcontrol/textures/blocks/displayFront.png new file mode 100644 index 0000000..7b33a7d Binary files /dev/null and b/src/main/resources/assets/rpcontrol/textures/blocks/displayFront.png differ diff --git a/src/main/resources/assets/rpcontrol/textures/blocks/peripheralBack.png b/src/main/resources/assets/rpcontrol/textures/blocks/peripheralBack.png new file mode 100644 index 0000000..830b877 Binary files /dev/null and b/src/main/resources/assets/rpcontrol/textures/blocks/peripheralBack.png differ diff --git a/src/main/resources/assets/rpcontrol/textures/blocks/peripheralBottom.png b/src/main/resources/assets/rpcontrol/textures/blocks/peripheralBottom.png new file mode 100644 index 0000000..1581015 Binary files /dev/null and b/src/main/resources/assets/rpcontrol/textures/blocks/peripheralBottom.png differ diff --git a/src/main/resources/assets/rpcontrol/textures/blocks/peripheralSide.png b/src/main/resources/assets/rpcontrol/textures/blocks/peripheralSide.png new file mode 100644 index 0000000..c8ec348 Binary files /dev/null and b/src/main/resources/assets/rpcontrol/textures/blocks/peripheralSide.png differ diff --git a/src/main/resources/assets/rpcontrol/textures/blocks/peripheralTop.png b/src/main/resources/assets/rpcontrol/textures/blocks/peripheralTop.png new file mode 100644 index 0000000..cc0982e Binary files /dev/null and b/src/main/resources/assets/rpcontrol/textures/blocks/peripheralTop.png differ diff --git a/src/main/resources/assets/rpcontrol/textures/blocks/ram8kFace.png b/src/main/resources/assets/rpcontrol/textures/blocks/ram8kFace.png new file mode 100644 index 0000000..70b3495 Binary files /dev/null and b/src/main/resources/assets/rpcontrol/textures/blocks/ram8kFace.png differ diff --git a/src/main/resources/assets/rpcontrol/textures/blocks/ram8kSide.png b/src/main/resources/assets/rpcontrol/textures/blocks/ram8kSide.png new file mode 100644 index 0000000..72d5288 Binary files /dev/null and b/src/main/resources/assets/rpcontrol/textures/blocks/ram8kSide.png differ diff --git a/src/main/resources/assets/rpcontrol/textures/blocks/ram8kTop.png b/src/main/resources/assets/rpcontrol/textures/blocks/ram8kTop.png new file mode 100644 index 0000000..3305e33 Binary files /dev/null and b/src/main/resources/assets/rpcontrol/textures/blocks/ram8kTop.png differ diff --git a/src/main/resources/assets/rpcontrol/textures/blocks/ribbonFace.png b/src/main/resources/assets/rpcontrol/textures/blocks/ribbonFace.png new file mode 100644 index 0000000..49a4578 Binary files /dev/null and b/src/main/resources/assets/rpcontrol/textures/blocks/ribbonFace.png differ diff --git a/src/main/resources/assets/rpcontrol/textures/blocks/ribbonTop.png b/src/main/resources/assets/rpcontrol/textures/blocks/ribbonTop.png new file mode 100644 index 0000000..e86102f Binary files /dev/null and b/src/main/resources/assets/rpcontrol/textures/blocks/ribbonTop.png differ diff --git a/src/main/resources/assets/rpcontrol/textures/gui/cpugui.png b/src/main/resources/assets/rpcontrol/textures/gui/cpugui.png new file mode 100644 index 0000000..683eaa6 Binary files /dev/null and b/src/main/resources/assets/rpcontrol/textures/gui/cpugui.png differ diff --git a/src/main/resources/assets/rpcontrol/textures/gui/displaygui.png b/src/main/resources/assets/rpcontrol/textures/gui/displaygui.png new file mode 100644 index 0000000..6071d1f Binary files /dev/null and b/src/main/resources/assets/rpcontrol/textures/gui/displaygui.png differ diff --git a/src/main/resources/assets/rpcontrol/textures/items/disk.png b/src/main/resources/assets/rpcontrol/textures/items/disk.png new file mode 100644 index 0000000..13be704 Binary files /dev/null and b/src/main/resources/assets/rpcontrol/textures/items/disk.png differ diff --git a/src/main/resources/assets/rpcontrol/textures/items/diskForth.png b/src/main/resources/assets/rpcontrol/textures/items/diskForth.png new file mode 100644 index 0000000..bec2b5e Binary files /dev/null and b/src/main/resources/assets/rpcontrol/textures/items/diskForth.png differ diff --git a/src/main/resources/assets/rpcontrol/textures/items/diskForthExtended.png b/src/main/resources/assets/rpcontrol/textures/items/diskForthExtended.png new file mode 100644 index 0000000..8b171ef Binary files /dev/null and b/src/main/resources/assets/rpcontrol/textures/items/diskForthExtended.png differ diff --git a/src/main/resources/assets/rpcore/default.cfg b/src/main/resources/assets/rpcore/default.cfg new file mode 100644 index 0000000..45d9f6f --- /dev/null +++ b/src/main/resources/assets/rpcore/default.cfg @@ -0,0 +1,37 @@ +# RedPower 2 Configuration + +enchant { + disjunction.id=79 + vorpal.id=80 +} + +settings { + compat.gear.altRecipe=0 + + logic.enableSounds=1 + machine { + frame { + alwayscrate=0 + linksize=1000 + } + + } + + world { + generate { + copper=1 + silver=1 + tin=1 + volcano=1 + marble=1 + } + + tweaks { + craftcircle=1 + spreadmoss=1 + unbricks=1 + } + + } + +} diff --git a/src/main/resources/assets/rpcore/lang/en_US.lang b/src/main/resources/assets/rpcore/lang/en_US.lang new file mode 100644 index 0000000..036e56d --- /dev/null +++ b/src/main/resources/assets/rpcore/lang/en_US.lang @@ -0,0 +1,2055 @@ +itemGroup.RPMicroblocks=RedPower Microblocks + +achievement.rpMakeSaw.desc=Craft a diamond handsaw +achievement.rpMakeSaw=It Slices, it Dices + +enchantment.damage.disjunction=Disjunction +enchantment.damage.vorpal=Vorpal + +item.handsawDiamond.name=Diamond Handsaw +item.handsawGreenSapphire.name=Green Sapphire Handsaw +item.handsawIron.name=Iron Handsaw +item.handsawRuby.name=Ruby Handsaw +item.handsawSapphire.name=Sapphire Handsaw + +tile.rpcov3.basalt.name=Basalt Triple Cover +tile.rpcov3.basaltBrick.name=Basalt Brick Triple Cover +tile.rpcov3.basaltCircle.name=Chiseled Basalt Brick Triple Cover +tile.rpcov3.basaltCobble.name=Basalt Cobblestone Triple Cover +tile.rpcov3.basaltPaver.name=Basalt Paver Triple Cover +tile.rpcov3.books.name=Bookshelf Triple Cover +tile.rpcov3.brick.name=Brick Triple Cover +tile.rpcov3.clay.name=Clay Triple Cover +tile.rpcov3.cobble.name=Cobblestone Triple Cover +tile.rpcov3.copperBlock.name=Copper Block Triple Cover +tile.rpcov3.diamond.name=Diamond Triple Cover +tile.rpcov3.dirt.name=Dirt Triple Cover +tile.rpcov3.glass.name=Glass Triple Cover +tile.rpcov3.gold.name=Gold Triple Cover +tile.rpcov3.greenSapphireBlock.name=Green Sapphire Block Triple Cover +tile.rpcov3.iron.name=Iron Triple Cover +tile.rpcov3.lapis.name=Lapis Lazuli Triple Cover +tile.rpcov3.marble.name=Marble Triple Cover +tile.rpcov3.marbleBrick.name=Marble Brick Triple Cover +tile.rpcov3.moss.name=Moss Stone Triple Cover +tile.rpcov3.netherbrick.name=Nether Brick Triple Cover +tile.rpcov3.netherrack.name=Netherrack Triple Cover +tile.rpcov3.obsidian.name=Obsidian Triple Cover +tile.rpcov3.planks.name=Wooden Plank Triple Cover +tile.rpcov3.planks1.name=Wooden Plank Triple Cover +tile.rpcov3.planks2.name=Wooden Plank Triple Cover +tile.rpcov3.planks3.name=Wooden Plank Triple Cover +tile.rpcov3.pumpkin.name=Pumpkin Triple Cover +tile.rpcov3.rplog.name=Rubberwood Triple Cover +tile.rpcov3.rubyBlock.name=Ruby Block Triple Cover +tile.rpcov3.sandstone.name=Sandstone Triple Cover +tile.rpcov3.sandstone1.name=Sandstone Triple Cover +tile.rpcov3.sandstone2.name=Sandstone Triple Cover +tile.rpcov3.sapphireBlock.name=Sapphire Block Triple Cover +tile.rpcov3.silverBlock.name=Silver Block Triple Cover +tile.rpcov3.slab.name=Polished Stone Triple Cover +tile.rpcov3.snow.name=Snow Triple Cover +tile.rpcov3.soul.name=Soul Sand Triple Cover +tile.rpcov3.stone.name=Stone Triple Cover +tile.rpcov3.stonebrick.name=Stone Brick Triple Cover +tile.rpcov3.stonebrick1.name=Stone Brick Triple Cover +tile.rpcov3.stonebrick2.name=Stone Brick Triple Cover +tile.rpcov3.stonebrick3.name=Stone Brick Triple Cover +tile.rpcov3.tinBlock.name=Tin Block Triple Cover +tile.rpcov3.tungstenBlock.name=Tungsten Block Triple Cover +tile.rpcov3.wood.name=Oak Wood Triple Cover +tile.rpcov3.wood1.name=Spruce Wood Triple Cover +tile.rpcov3.wood2.name=Birch Wood Triple Cover +tile.rpcov3.wood3.name=Jungle Wood Triple Cover +tile.rpcov3.wool.black.name=Black Wool Triple Cover +tile.rpcov3.wool.blue.name=Blue Wool Triple Cover +tile.rpcov3.wool.brown.name=Brown Wool Triple Cover +tile.rpcov3.wool.cyan.name=Cyan Wool Triple Cover +tile.rpcov3.wool.gray.name=Gray Wool Triple Cover +tile.rpcov3.wool.green.name=Green Wool Triple Cover +tile.rpcov3.wool.lightBlue.name=Light Blue Wool Triple Cover +tile.rpcov3.wool.lime.name=Lime Wool Triple Cover +tile.rpcov3.wool.magenta.name=Magenta Wool Triple Cover +tile.rpcov3.wool.orange.name=Orange Wool Triple Cover +tile.rpcov3.wool.pink.name=Pink Wool Triple Cover +tile.rpcov3.wool.purple.name=Purple Wool Triple Cover +tile.rpcov3.wool.red.name=Red Wool Triple Cover +tile.rpcov3.wool.silver.name=Light Gray Wool Triple Cover +tile.rpcov3.wool.white.name=White Wool Triple Cover +tile.rpcov3.wool.yellow.name=Yellow Wool Triple Cover + +tile.rpcov3c.basalt.name=Basalt Triple Cover Corner +tile.rpcov3c.basaltBrick.name=Basalt Brick Triple Cover Corner +tile.rpcov3c.basaltCircle.name=Chiseled Basalt Brick Triple Cover Corner +tile.rpcov3c.basaltCobble.name=Basalt Cobblestone Triple Cover Corner +tile.rpcov3c.basaltPaver.name=Basalt Paver Triple Cover Corner +tile.rpcov3c.books.name=Bookshelf Triple Cover Corner +tile.rpcov3c.brick.name=Brick Triple Cover Corner +tile.rpcov3c.clay.name=Clay Triple Cover Corner +tile.rpcov3c.cobble.name=Cobblestone Triple Cover Corner +tile.rpcov3c.copperBlock.name=Copper Block Triple Cover Corner +tile.rpcov3c.diamond.name=Diamond Triple Cover Corner +tile.rpcov3c.dirt.name=Dirt Triple Cover Corner +tile.rpcov3c.glass.name=Glass Triple Cover Corner +tile.rpcov3c.gold.name=Gold Triple Cover Corner +tile.rpcov3c.greenSapphireBlock.name=Green Sapphire Block Triple Cover Corner +tile.rpcov3c.iron.name=Iron Triple Cover Corner +tile.rpcov3c.lapis.name=Lapis Lazuli Triple Cover Corner +tile.rpcov3c.marble.name=Marble Triple Cover Corner +tile.rpcov3c.marbleBrick.name=Marble Brick Triple Cover Corner +tile.rpcov3c.moss.name=Moss Stone Triple Cover Corner +tile.rpcov3c.netherbrick.name=Nether Brick Triple Cover Corner +tile.rpcov3c.netherrack.name=Netherrack Triple Cover Corner +tile.rpcov3c.obsidian.name=Obsidian Triple Cover Corner +tile.rpcov3c.planks.name=Wooden Plank Triple Cover Corner +tile.rpcov3c.planks1.name=Wooden Plank Triple Cover Corner +tile.rpcov3c.planks2.name=Wooden Plank Triple Cover Corner +tile.rpcov3c.planks3.name=Wooden Plank Triple Cover Corner +tile.rpcov3c.pumpkin.name=Pumpkin Triple Cover Corner +tile.rpcov3c.rplog.name=Rubberwood Triple Cover Corner +tile.rpcov3c.rubyBlock.name=Ruby Block Triple Cover Corner +tile.rpcov3c.sandstone.name=Sandstone Triple Cover Corner +tile.rpcov3c.sandstone1.name=Sandstone Triple Cover Corner +tile.rpcov3c.sandstone2.name=Sandstone Triple Cover Corner +tile.rpcov3c.sapphireBlock.name=Sapphire Block Triple Cover Corner +tile.rpcov3c.silverBlock.name=Silver Block Triple Cover Corner +tile.rpcov3c.slab.name=Polished Stone Triple Cover Corner +tile.rpcov3c.snow.name=Snow Triple Cover Corner +tile.rpcov3c.soul.name=Soul Sand Triple Cover Corner +tile.rpcov3c.stone.name=Stone Triple Cover Corner +tile.rpcov3c.stonebrick.name=Stone Brick Triple Cover Corner +tile.rpcov3c.stonebrick1.name=Stone Brick Triple Cover Corner +tile.rpcov3c.stonebrick2.name=Stone Brick Triple Cover Corner +tile.rpcov3c.stonebrick3.name=Stone Brick Triple Cover Corner +tile.rpcov3c.tinBlock.name=Tin Block Triple Cover Corner +tile.rpcov3c.tungstenBlock.name=Tungsten Block Triple Cover Corner +tile.rpcov3c.wood.name=Oak Wood Triple Cover Corner +tile.rpcov3c.wood1.name=Spruce Wood Triple Cover Corner +tile.rpcov3c.wood2.name=Birch Wood Triple Cover Corner +tile.rpcov3c.wood3.name=Jungle Wood Triple Cover Corner +tile.rpcov3c.wool.black.name=Black Wool Triple Cover Corner +tile.rpcov3c.wool.blue.name=Blue Wool Triple Cover Corner +tile.rpcov3c.wool.brown.name=Brown Wool Triple Cover Corner +tile.rpcov3c.wool.cyan.name=Cyan Wool Triple Cover Corner +tile.rpcov3c.wool.gray.name=Gray Wool Triple Cover Corner +tile.rpcov3c.wool.green.name=Green Wool Triple Cover Corner +tile.rpcov3c.wool.lightBlue.name=Light Blue Wool Triple Cover Corner +tile.rpcov3c.wool.lime.name=Lime Wool Triple Cover Corner +tile.rpcov3c.wool.magenta.name=Magenta Wool Triple Cover Corner +tile.rpcov3c.wool.orange.name=Orange Wool Triple Cover Corner +tile.rpcov3c.wool.pink.name=Pink Wool Triple Cover Corner +tile.rpcov3c.wool.purple.name=Purple Wool Triple Cover Corner +tile.rpcov3c.wool.red.name=Red Wool Triple Cover Corner +tile.rpcov3c.wool.silver.name=Light Gray Wool Triple Cover Corner +tile.rpcov3c.wool.white.name=White Wool Triple Cover Corner +tile.rpcov3c.wool.yellow.name=Yellow Wool Triple Cover Corner + +tile.rpcov3s.basalt.name=Basalt Triple Cover Strip +tile.rpcov3s.basaltBrick.name=Basalt Brick Triple Cover Strip +tile.rpcov3s.basaltCircle.name=Chiseled Basalt Brick Triple Cover Strip +tile.rpcov3s.basaltCobble.name=Basalt Cobblestone Triple Cover Strip +tile.rpcov3s.basaltPaver.name=Basalt Paver Triple Cover Strip +tile.rpcov3s.books.name=Bookshelf Triple Cover Strip +tile.rpcov3s.brick.name=Brick Triple Cover Strip +tile.rpcov3s.clay.name=Clay Triple Cover Strip +tile.rpcov3s.cobble.name=Cobblestone Triple Cover Strip +tile.rpcov3s.copperBlock.name=Copper Block Triple Cover Strip +tile.rpcov3s.diamond.name=Diamond Triple Cover Strip +tile.rpcov3s.dirt.name=Dirt Triple Cover Strip +tile.rpcov3s.glass.name=Glass Triple Cover Strip +tile.rpcov3s.gold.name=Gold Triple Cover Strip +tile.rpcov3s.greenSapphireBlock.name=Green Sapphire Block Triple Cover Strip +tile.rpcov3s.iron.name=Iron Triple Cover Strip +tile.rpcov3s.lapis.name=Lapis Lazuli Triple Cover Strip +tile.rpcov3s.marble.name=Marble Triple Cover Strip +tile.rpcov3s.marbleBrick.name=Marble Brick Triple Cover Strip +tile.rpcov3s.moss.name=Moss Stone Triple Cover Strip +tile.rpcov3s.netherbrick.name=Nether Brick Triple Cover Strip +tile.rpcov3s.netherrack.name=Netherrack Triple Cover Strip +tile.rpcov3s.obsidian.name=Obsidian Triple Cover Strip +tile.rpcov3s.planks.name=Wooden Plank Triple Cover Strip +tile.rpcov3s.planks1.name=Wooden Plank Triple Cover Strip +tile.rpcov3s.planks2.name=Wooden Plank Triple Cover Strip +tile.rpcov3s.planks3.name=Wooden Plank Triple Cover Strip +tile.rpcov3s.pumpkin.name=Pumpkin Triple Cover Strip +tile.rpcov3s.rplog.name=Rubberwood Triple Cover Strip +tile.rpcov3s.rubyBlock.name=Ruby Block Triple Cover Strip +tile.rpcov3s.sandstone.name=Sandstone Triple Cover Strip +tile.rpcov3s.sandstone1.name=Sandstone Triple Cover Strip +tile.rpcov3s.sandstone2.name=Sandstone Triple Cover Strip +tile.rpcov3s.sapphireBlock.name=Sapphire Block Triple Cover Strip +tile.rpcov3s.silverBlock.name=Silver Block Triple Cover Strip +tile.rpcov3s.slab.name=Polished Stone Triple Cover Strip +tile.rpcov3s.snow.name=Snow Triple Cover Strip +tile.rpcov3s.soul.name=Soul Sand Triple Cover Strip +tile.rpcov3s.stone.name=Stone Triple Cover Strip +tile.rpcov3s.stonebrick.name=Stone Brick Triple Cover Strip +tile.rpcov3s.stonebrick1.name=Stone Brick Triple Cover Strip +tile.rpcov3s.stonebrick2.name=Stone Brick Triple Cover Strip +tile.rpcov3s.stonebrick3.name=Stone Brick Triple Cover Strip +tile.rpcov3s.tinBlock.name=Tin Block Triple Cover Strip +tile.rpcov3s.tungstenBlock.name=Tungsten Block Triple Cover Strip +tile.rpcov3s.wood.name=Oak Wood Triple Cover Strip +tile.rpcov3s.wood1.name=Spruce Wood Triple Cover Strip +tile.rpcov3s.wood2.name=Birch Wood Triple Cover Strip +tile.rpcov3s.wood3.name=Jungle Wood Triple Cover Strip +tile.rpcov3s.wool.black.name=Black Wool Triple Cover Strip +tile.rpcov3s.wool.blue.name=Blue Wool Triple Cover Strip +tile.rpcov3s.wool.brown.name=Brown Wool Triple Cover Strip +tile.rpcov3s.wool.cyan.name=Cyan Wool Triple Cover Strip +tile.rpcov3s.wool.gray.name=Gray Wool Triple Cover Strip +tile.rpcov3s.wool.green.name=Green Wool Triple Cover Strip +tile.rpcov3s.wool.lightBlue.name=Light Blue Wool Triple Cover Strip +tile.rpcov3s.wool.lime.name=Lime Wool Triple Cover Strip +tile.rpcov3s.wool.magenta.name=Magenta Wool Triple Cover Strip +tile.rpcov3s.wool.orange.name=Orange Wool Triple Cover Strip +tile.rpcov3s.wool.pink.name=Pink Wool Triple Cover Strip +tile.rpcov3s.wool.purple.name=Purple Wool Triple Cover Strip +tile.rpcov3s.wool.red.name=Red Wool Triple Cover Strip +tile.rpcov3s.wool.silver.name=Light Gray Wool Triple Cover Strip +tile.rpcov3s.wool.white.name=White Wool Triple Cover Strip +tile.rpcov3s.wool.yellow.name=Yellow Wool Triple Cover Strip + +tile.rpcov5.basalt.name=Basalt Cover Slab +tile.rpcov5.basaltBrick.name=Basalt Brick Cover Slab +tile.rpcov5.basaltCircle.name=Chiseled Basalt Brick Cover Slab +tile.rpcov5.basaltCobble.name=Basalt Cobblestone Cover Slab +tile.rpcov5.basaltPaver.name=Basalt Paver Cover Slab +tile.rpcov5.books.name=Bookshelf Cover Slab +tile.rpcov5.brick.name=Brick Cover Slab +tile.rpcov5.clay.name=Clay Cover Slab +tile.rpcov5.cobble.name=Cobblestone Cover Slab +tile.rpcov5.copperBlock.name=Copper Block Cover Slab +tile.rpcov5.diamond.name=Diamond Cover Slab +tile.rpcov5.dirt.name=Dirt Cover Slab +tile.rpcov5.glass.name=Glass Cover Slab +tile.rpcov5.gold.name=Gold Cover Slab +tile.rpcov5.greenSapphireBlock.name=Green Sapphire Block Cover Slab +tile.rpcov5.iron.name=Iron Cover Slab +tile.rpcov5.lapis.name=Lapis Lazuli Cover Slab +tile.rpcov5.marble.name=Marble Cover Slab +tile.rpcov5.marbleBrick.name=Marble Brick Cover Slab +tile.rpcov5.moss.name=Moss Stone Cover Slab +tile.rpcov5.netherbrick.name=Nether Brick Cover Slab +tile.rpcov5.netherrack.name=Netherrack Cover Slab +tile.rpcov5.obsidian.name=Obsidian Cover Slab +tile.rpcov5.planks.name=Wooden Plank Cover Slab +tile.rpcov5.planks1.name=Wooden Plank Cover Slab +tile.rpcov5.planks2.name=Wooden Plank Cover Slab +tile.rpcov5.planks3.name=Wooden Plank Cover Slab +tile.rpcov5.pumpkin.name=Pumpkin Cover Slab +tile.rpcov5.rplog.name=Rubberwood Cover Slab +tile.rpcov5.rubyBlock.name=Ruby Block Cover Slab +tile.rpcov5.sandstone.name=Sandstone Cover Slab +tile.rpcov5.sandstone1.name=Sandstone Cover Slab +tile.rpcov5.sandstone2.name=Sandstone Cover Slab +tile.rpcov5.sapphireBlock.name=Sapphire Block Cover Slab +tile.rpcov5.silverBlock.name=Silver Block Cover Slab +tile.rpcov5.slab.name=Polished Stone Cover Slab +tile.rpcov5.snow.name=Snow Cover Slab +tile.rpcov5.soul.name=Soul Sand Cover Slab +tile.rpcov5.stone.name=Stone Cover Slab +tile.rpcov5.stonebrick.name=Stone Brick Cover Slab +tile.rpcov5.stonebrick1.name=Stone Brick Cover Slab +tile.rpcov5.stonebrick2.name=Stone Brick Cover Slab +tile.rpcov5.stonebrick3.name=Stone Brick Cover Slab +tile.rpcov5.tinBlock.name=Tin Block Cover Slab +tile.rpcov5.tungstenBlock.name=Tungsten Block Cover Slab +tile.rpcov5.wood.name=Oak Wood Cover Slab +tile.rpcov5.wood1.name=Spruce Wood Cover Slab +tile.rpcov5.wood2.name=Birch Wood Cover Slab +tile.rpcov5.wood3.name=Jungle Wood Cover Slab +tile.rpcov5.wool.black.name=Black Wool Cover Slab +tile.rpcov5.wool.blue.name=Blue Wool Cover Slab +tile.rpcov5.wool.brown.name=Brown Wool Cover Slab +tile.rpcov5.wool.cyan.name=Cyan Wool Cover Slab +tile.rpcov5.wool.gray.name=Gray Wool Cover Slab +tile.rpcov5.wool.green.name=Green Wool Cover Slab +tile.rpcov5.wool.lightBlue.name=Light Blue Wool Cover Slab +tile.rpcov5.wool.lime.name=Lime Wool Cover Slab +tile.rpcov5.wool.magenta.name=Magenta Wool Cover Slab +tile.rpcov5.wool.orange.name=Orange Wool Cover Slab +tile.rpcov5.wool.pink.name=Pink Wool Cover Slab +tile.rpcov5.wool.purple.name=Purple Wool Cover Slab +tile.rpcov5.wool.red.name=Red Wool Cover Slab +tile.rpcov5.wool.silver.name=Light Gray Wool Cover Slab +tile.rpcov5.wool.white.name=White Wool Cover Slab +tile.rpcov5.wool.yellow.name=Yellow Wool Cover Slab + +tile.rpcov5c.basalt.name=Basalt Cover Slab Corner +tile.rpcov5c.basaltBrick.name=Basalt Brick Cover Slab Corner +tile.rpcov5c.basaltCircle.name=Chiseled Basalt Brick Cover Slab Corner +tile.rpcov5c.basaltCobble.name=Basalt Cobblestone Cover Slab Corner +tile.rpcov5c.basaltPaver.name=Basalt Paver Cover Slab Corner +tile.rpcov5c.books.name=Bookshelf Cover Slab Corner +tile.rpcov5c.brick.name=Brick Cover Slab Corner +tile.rpcov5c.clay.name=Clay Cover Slab Corner +tile.rpcov5c.cobble.name=Cobblestone Cover Slab Corner +tile.rpcov5c.copperBlock.name=Copper Block Cover Slab Corner +tile.rpcov5c.diamond.name=Diamond Cover Slab Corner +tile.rpcov5c.dirt.name=Dirt Cover Slab Corner +tile.rpcov5c.glass.name=Glass Cover Slab Corner +tile.rpcov5c.gold.name=Gold Cover Slab Corner +tile.rpcov5c.greenSapphireBlock.name=Green Sapphire Block Cover Slab Corner +tile.rpcov5c.iron.name=Iron Cover Slab Corner +tile.rpcov5c.lapis.name=Lapis Lazuli Cover Slab Corner +tile.rpcov5c.marble.name=Marble Cover Slab Corner +tile.rpcov5c.marbleBrick.name=Marble Brick Cover Slab Corner +tile.rpcov5c.moss.name=Moss Stone Cover Slab Corner +tile.rpcov5c.netherbrick.name=Nether Brick Cover Slab Corner +tile.rpcov5c.netherrack.name=Netherrack Cover Slab Corner +tile.rpcov5c.obsidian.name=Obsidian Cover Slab Corner +tile.rpcov5c.planks.name=Wooden Plank Cover Slab Corner +tile.rpcov5c.planks1.name=Wooden Plank Cover Slab Corner +tile.rpcov5c.planks2.name=Wooden Plank Cover Slab Corner +tile.rpcov5c.planks3.name=Wooden Plank Cover Slab Corner +tile.rpcov5c.pumpkin.name=Pumpkin Cover Slab Corner +tile.rpcov5c.rplog.name=Rubberwood Cover Slab Corner +tile.rpcov5c.rubyBlock.name=Ruby Block Cover Slab Corner +tile.rpcov5c.sandstone.name=Sandstone Cover Slab Corner +tile.rpcov5c.sandstone1.name=Sandstone Cover Slab Corner +tile.rpcov5c.sandstone2.name=Sandstone Cover Slab Corner +tile.rpcov5c.sapphireBlock.name=Sapphire Block Cover Slab Corner +tile.rpcov5c.silverBlock.name=Silver Block Cover Slab Corner +tile.rpcov5c.slab.name=Polished Stone Cover Slab Corner +tile.rpcov5c.snow.name=Snow Cover Slab Corner +tile.rpcov5c.soul.name=Soul Sand Cover Slab Corner +tile.rpcov5c.stone.name=Stone Cover Slab Corner +tile.rpcov5c.stonebrick.name=Stone Brick Cover Slab Corner +tile.rpcov5c.stonebrick1.name=Stone Brick Cover Slab Corner +tile.rpcov5c.stonebrick2.name=Stone Brick Cover Slab Corner +tile.rpcov5c.stonebrick3.name=Stone Brick Cover Slab Corner +tile.rpcov5c.tinBlock.name=Tin Block Cover Slab Corner +tile.rpcov5c.tungstenBlock.name=Tungsten Block Cover Slab Corner +tile.rpcov5c.wood.name=Oak Wood Cover Slab Corner +tile.rpcov5c.wood1.name=Spruce Wood Cover Slab Corner +tile.rpcov5c.wood2.name=Birch Wood Cover Slab Corner +tile.rpcov5c.wood3.name=Jungle Wood Cover Slab Corner +tile.rpcov5c.wool.black.name=Black Wool Cover Slab Corner +tile.rpcov5c.wool.blue.name=Blue Wool Cover Slab Corner +tile.rpcov5c.wool.brown.name=Brown Wool Cover Slab Corner +tile.rpcov5c.wool.cyan.name=Cyan Wool Cover Slab Corner +tile.rpcov5c.wool.gray.name=Gray Wool Cover Slab Corner +tile.rpcov5c.wool.green.name=Green Wool Cover Slab Corner +tile.rpcov5c.wool.lightBlue.name=Light Blue Wool Cover Slab Corner +tile.rpcov5c.wool.lime.name=Lime Wool Cover Slab Corner +tile.rpcov5c.wool.magenta.name=Magenta Wool Cover Slab Corner +tile.rpcov5c.wool.orange.name=Orange Wool Cover Slab Corner +tile.rpcov5c.wool.pink.name=Pink Wool Cover Slab Corner +tile.rpcov5c.wool.purple.name=Purple Wool Cover Slab Corner +tile.rpcov5c.wool.red.name=Red Wool Cover Slab Corner +tile.rpcov5c.wool.silver.name=Light Gray Wool Cover Slab Corner +tile.rpcov5c.wool.white.name=White Wool Cover Slab Corner +tile.rpcov5c.wool.yellow.name=Yellow Wool Cover Slab Corner + +tile.rpcov5s.basalt.name=Basalt Cover Slab Strip +tile.rpcov5s.basaltBrick.name=Basalt Brick Cover Slab Strip +tile.rpcov5s.basaltCircle.name=Chiseled Basalt Brick Cover Slab Strip +tile.rpcov5s.basaltCobble.name=Basalt Cobblestone Cover Slab Strip +tile.rpcov5s.basaltPaver.name=Basalt Paver Cover Slab Strip +tile.rpcov5s.books.name=Bookshelf Cover Slab Strip +tile.rpcov5s.brick.name=Brick Cover Slab Strip +tile.rpcov5s.clay.name=Clay Cover Slab Strip +tile.rpcov5s.cobble.name=Cobblestone Cover Slab Strip +tile.rpcov5s.copperBlock.name=Copper Block Cover Slab Strip +tile.rpcov5s.diamond.name=Diamond Cover Slab Strip +tile.rpcov5s.dirt.name=Dirt Cover Slab Strip +tile.rpcov5s.glass.name=Glass Cover Slab Strip +tile.rpcov5s.gold.name=Gold Cover Slab Strip +tile.rpcov5s.greenSapphireBlock.name=Green Sapphire Block Cover Slab Strip +tile.rpcov5s.iron.name=Iron Cover Slab Strip +tile.rpcov5s.lapis.name=Lapis Lazuli Cover Slab Strip +tile.rpcov5s.marble.name=Marble Cover Slab Strip +tile.rpcov5s.marbleBrick.name=Marble Brick Cover Slab Strip +tile.rpcov5s.moss.name=Moss Stone Cover Slab Strip +tile.rpcov5s.netherbrick.name=Nether Brick Cover Slab Strip +tile.rpcov5s.netherrack.name=Netherrack Cover Slab Strip +tile.rpcov5s.obsidian.name=Obsidian Cover Slab Strip +tile.rpcov5s.planks.name=Wooden Plank Cover Slab Strip +tile.rpcov5s.planks1.name=Wooden Plank Cover Slab Strip +tile.rpcov5s.planks2.name=Wooden Plank Cover Slab Strip +tile.rpcov5s.planks3.name=Wooden Plank Cover Slab Strip +tile.rpcov5s.pumpkin.name=Pumpkin Cover Slab Strip +tile.rpcov5s.rplog.name=Rubberwood Cover Slab Strip +tile.rpcov5s.rubyBlock.name=Ruby Block Cover Slab Strip +tile.rpcov5s.sandstone.name=Sandstone Cover Slab Strip +tile.rpcov5s.sandstone1.name=Sandstone Cover Slab Strip +tile.rpcov5s.sandstone2.name=Sandstone Cover Slab Strip +tile.rpcov5s.sapphireBlock.name=Sapphire Block Cover Slab Strip +tile.rpcov5s.silverBlock.name=Silver Block Cover Slab Strip +tile.rpcov5s.slab.name=Polished Stone Cover Slab Strip +tile.rpcov5s.snow.name=Snow Cover Slab Strip +tile.rpcov5s.soul.name=Soul Sand Cover Slab Strip +tile.rpcov5s.stone.name=Stone Cover Slab Strip +tile.rpcov5s.stonebrick.name=Stone Brick Cover Slab Strip +tile.rpcov5s.stonebrick1.name=Stone Brick Cover Slab Strip +tile.rpcov5s.stonebrick2.name=Stone Brick Cover Slab Strip +tile.rpcov5s.stonebrick3.name=Stone Brick Cover Slab Strip +tile.rpcov5s.tinBlock.name=Tin Block Cover Slab Strip +tile.rpcov5s.tungstenBlock.name=Tungsten Block Cover Slab Strip +tile.rpcov5s.wood.name=Oak Wood Cover Slab Strip +tile.rpcov5s.wood1.name=Spruce Wood Cover Slab Strip +tile.rpcov5s.wood2.name=Birch Wood Cover Slab Strip +tile.rpcov5s.wood3.name=Jungle Wood Cover Slab Strip +tile.rpcov5s.wool.black.name=Black Wool Cover Slab Strip +tile.rpcov5s.wool.blue.name=Blue Wool Cover Slab Strip +tile.rpcov5s.wool.brown.name=Brown Wool Cover Slab Strip +tile.rpcov5s.wool.cyan.name=Cyan Wool Cover Slab Strip +tile.rpcov5s.wool.gray.name=Gray Wool Cover Slab Strip +tile.rpcov5s.wool.green.name=Green Wool Cover Slab Strip +tile.rpcov5s.wool.lightBlue.name=Light Blue Wool Cover Slab Strip +tile.rpcov5s.wool.lime.name=Lime Wool Cover Slab Strip +tile.rpcov5s.wool.magenta.name=Magenta Wool Cover Slab Strip +tile.rpcov5s.wool.orange.name=Orange Wool Cover Slab Strip +tile.rpcov5s.wool.pink.name=Pink Wool Cover Slab Strip +tile.rpcov5s.wool.purple.name=Purple Wool Cover Slab Strip +tile.rpcov5s.wool.red.name=Red Wool Cover Slab Strip +tile.rpcov5s.wool.silver.name=Light Gray Wool Cover Slab Strip +tile.rpcov5s.wool.white.name=White Wool Cover Slab Strip +tile.rpcov5s.wool.yellow.name=Yellow Wool Cover Slab Strip + +tile.rpcov6.basalt.name=Basalt Triple Panel +tile.rpcov6.basaltBrick.name=Basalt Brick Triple Panel +tile.rpcov6.basaltCircle.name=Chiseled Basalt Brick Triple Panel +tile.rpcov6.basaltCobble.name=Basalt Cobblestone Triple Panel +tile.rpcov6.basaltPaver.name=Basalt Paver Triple Panel +tile.rpcov6.books.name=Bookshelf Triple Panel +tile.rpcov6.brick.name=Brick Triple Panel +tile.rpcov6.clay.name=Clay Triple Panel +tile.rpcov6.cobble.name=Cobblestone Triple Panel +tile.rpcov6.copperBlock.name=Copper Block Triple Panel +tile.rpcov6.diamond.name=Diamond Triple Panel +tile.rpcov6.dirt.name=Dirt Triple Panel +tile.rpcov6.glass.name=Glass Triple Panel +tile.rpcov6.gold.name=Gold Triple Panel +tile.rpcov6.greenSapphireBlock.name=Green Sapphire Block Triple Panel +tile.rpcov6.iron.name=Iron Triple Panel +tile.rpcov6.lapis.name=Lapis Lazuli Triple Panel +tile.rpcov6.marble.name=Marble Triple Panel +tile.rpcov6.marbleBrick.name=Marble Brick Triple Panel +tile.rpcov6.moss.name=Moss Stone Triple Panel +tile.rpcov6.netherbrick.name=Nether Brick Triple Panel +tile.rpcov6.netherrack.name=Netherrack Triple Panel +tile.rpcov6.obsidian.name=Obsidian Triple Panel +tile.rpcov6.planks.name=Wooden Plank Triple Panel +tile.rpcov6.planks1.name=Wooden Plank Triple Panel +tile.rpcov6.planks2.name=Wooden Plank Triple Panel +tile.rpcov6.planks3.name=Wooden Plank Triple Panel +tile.rpcov6.pumpkin.name=Pumpkin Triple Panel +tile.rpcov6.rplog.name=Rubberwood Triple Panel +tile.rpcov6.rubyBlock.name=Ruby Block Triple Panel +tile.rpcov6.sandstone.name=Sandstone Triple Panel +tile.rpcov6.sandstone1.name=Sandstone Triple Panel +tile.rpcov6.sandstone2.name=Sandstone Triple Panel +tile.rpcov6.sapphireBlock.name=Sapphire Block Triple Panel +tile.rpcov6.silverBlock.name=Silver Block Triple Panel +tile.rpcov6.slab.name=Polished Stone Triple Panel +tile.rpcov6.snow.name=Snow Triple Panel +tile.rpcov6.soul.name=Soul Sand Triple Panel +tile.rpcov6.stone.name=Stone Triple Panel +tile.rpcov6.stonebrick.name=Stone Brick Triple Panel +tile.rpcov6.stonebrick1.name=Stone Brick Triple Panel +tile.rpcov6.stonebrick2.name=Stone Brick Triple Panel +tile.rpcov6.stonebrick3.name=Stone Brick Triple Panel +tile.rpcov6.tinBlock.name=Tin Block Triple Panel +tile.rpcov6.tungstenBlock.name=Tungsten Block Triple Panel +tile.rpcov6.wood.name=Oak Wood Triple Panel +tile.rpcov6.wood1.name=Spruce Wood Triple Panel +tile.rpcov6.wood2.name=Birch Wood Triple Panel +tile.rpcov6.wood3.name=Jungle Wood Triple Panel +tile.rpcov6.wool.black.name=Black Wool Triple Panel +tile.rpcov6.wool.blue.name=Blue Wool Triple Panel +tile.rpcov6.wool.brown.name=Brown Wool Triple Panel +tile.rpcov6.wool.cyan.name=Cyan Wool Triple Panel +tile.rpcov6.wool.gray.name=Gray Wool Triple Panel +tile.rpcov6.wool.green.name=Green Wool Triple Panel +tile.rpcov6.wool.lightBlue.name=Light Blue Wool Triple Panel +tile.rpcov6.wool.lime.name=Lime Wool Triple Panel +tile.rpcov6.wool.magenta.name=Magenta Wool Triple Panel +tile.rpcov6.wool.orange.name=Orange Wool Triple Panel +tile.rpcov6.wool.pink.name=Pink Wool Triple Panel +tile.rpcov6.wool.purple.name=Purple Wool Triple Panel +tile.rpcov6.wool.red.name=Red Wool Triple Panel +tile.rpcov6.wool.silver.name=Light Gray Wool Triple Panel +tile.rpcov6.wool.white.name=White Wool Triple Panel +tile.rpcov6.wool.yellow.name=Yellow Wool Triple Panel + +tile.rpcov6c.basalt.name=Basalt Triple Panel Corner +tile.rpcov6c.basaltBrick.name=Basalt Brick Triple Panel Corner +tile.rpcov6c.basaltCircle.name=Chiseled Basalt Brick Triple Panel Corner +tile.rpcov6c.basaltCobble.name=Basalt Cobblestone Triple Panel Corner +tile.rpcov6c.basaltPaver.name=Basalt Paver Triple Panel Corner +tile.rpcov6c.books.name=Bookshelf Triple Panel Corner +tile.rpcov6c.brick.name=Brick Triple Panel Corner +tile.rpcov6c.clay.name=Clay Triple Panel Corner +tile.rpcov6c.cobble.name=Cobblestone Triple Panel Corner +tile.rpcov6c.copperBlock.name=Copper Block Triple Panel Corner +tile.rpcov6c.diamond.name=Diamond Triple Panel Corner +tile.rpcov6c.dirt.name=Dirt Triple Panel Corner +tile.rpcov6c.glass.name=Glass Triple Panel Corner +tile.rpcov6c.gold.name=Gold Triple Panel Corner +tile.rpcov6c.greenSapphireBlock.name=Green Sapphire Block Triple Panel Corner +tile.rpcov6c.iron.name=Iron Triple Panel Corner +tile.rpcov6c.lapis.name=Lapis Lazuli Triple Panel Corner +tile.rpcov6c.marble.name=Marble Triple Panel Corner +tile.rpcov6c.marbleBrick.name=Marble Brick Triple Panel Corner +tile.rpcov6c.moss.name=Moss Stone Triple Panel Corner +tile.rpcov6c.netherbrick.name=Nether Brick Triple Panel Corner +tile.rpcov6c.netherrack.name=Netherrack Triple Panel Corner +tile.rpcov6c.obsidian.name=Obsidian Triple Panel Corner +tile.rpcov6c.planks.name=Wooden Plank Triple Panel Corner +tile.rpcov6c.planks1.name=Wooden Plank Triple Panel Corner +tile.rpcov6c.planks2.name=Wooden Plank Triple Panel Corner +tile.rpcov6c.planks3.name=Wooden Plank Triple Panel Corner +tile.rpcov6c.pumpkin.name=Pumpkin Triple Panel Corner +tile.rpcov6c.rplog.name=Rubberwood Triple Panel Corner +tile.rpcov6c.rubyBlock.name=Ruby Block Triple Panel Corner +tile.rpcov6c.sandstone.name=Sandstone Triple Panel Corner +tile.rpcov6c.sandstone1.name=Sandstone Triple Panel Corner +tile.rpcov6c.sandstone2.name=Sandstone Triple Panel Corner +tile.rpcov6c.sapphireBlock.name=Sapphire Block Triple Panel Corner +tile.rpcov6c.silverBlock.name=Silver Block Triple Panel Corner +tile.rpcov6c.slab.name=Polished Stone Triple Panel Corner +tile.rpcov6c.snow.name=Snow Triple Panel Corner +tile.rpcov6c.soul.name=Soul Sand Triple Panel Corner +tile.rpcov6c.stone.name=Stone Triple Panel Corner +tile.rpcov6c.stonebrick.name=Stone Brick Triple Panel Corner +tile.rpcov6c.stonebrick1.name=Stone Brick Triple Panel Corner +tile.rpcov6c.stonebrick2.name=Stone Brick Triple Panel Corner +tile.rpcov6c.stonebrick3.name=Stone Brick Triple Panel Corner +tile.rpcov6c.tinBlock.name=Tin Block Triple Panel Corner +tile.rpcov6c.tungstenBlock.name=Tungsten Block Triple Panel Corner +tile.rpcov6c.wood.name=Oak Wood Triple Panel Corner +tile.rpcov6c.wood1.name=Spruce Wood Triple Panel Corner +tile.rpcov6c.wood2.name=Birch Wood Triple Panel Corner +tile.rpcov6c.wood3.name=Jungle Wood Triple Panel Corner +tile.rpcov6c.wool.black.name=Black Wool Triple Panel Corner +tile.rpcov6c.wool.blue.name=Blue Wool Triple Panel Corner +tile.rpcov6c.wool.brown.name=Brown Wool Triple Panel Corner +tile.rpcov6c.wool.cyan.name=Cyan Wool Triple Panel Corner +tile.rpcov6c.wool.gray.name=Gray Wool Triple Panel Corner +tile.rpcov6c.wool.green.name=Green Wool Triple Panel Corner +tile.rpcov6c.wool.lightBlue.name=Light Blue Wool Triple Panel Corner +tile.rpcov6c.wool.lime.name=Lime Wool Triple Panel Corner +tile.rpcov6c.wool.magenta.name=Magenta Wool Triple Panel Corner +tile.rpcov6c.wool.orange.name=Orange Wool Triple Panel Corner +tile.rpcov6c.wool.pink.name=Pink Wool Triple Panel Corner +tile.rpcov6c.wool.purple.name=Purple Wool Triple Panel Corner +tile.rpcov6c.wool.red.name=Red Wool Triple Panel Corner +tile.rpcov6c.wool.silver.name=Light Gray Wool Triple Panel Corner +tile.rpcov6c.wool.white.name=White Wool Triple Panel Corner +tile.rpcov6c.wool.yellow.name=Yellow Wool Triple Panel Corner +tile.rpcov6s.basalt.name=Basalt Triple Panel Strip +tile.rpcov6s.basaltBrick.name=Basalt Brick Triple Panel Strip +tile.rpcov6s.basaltCircle.name=Chiseled Basalt Brick Triple Panel Strip +tile.rpcov6s.basaltCobble.name=Basalt Cobblestone Triple Panel Strip +tile.rpcov6s.basaltPaver.name=Basalt Paver Triple Panel Strip +tile.rpcov6s.books.name=Bookshelf Triple Panel Strip +tile.rpcov6s.brick.name=Brick Triple Panel Strip +tile.rpcov6s.clay.name=Clay Triple Panel Strip +tile.rpcov6s.cobble.name=Cobblestone Triple Panel Strip +tile.rpcov6s.copperBlock.name=Copper Block Triple Panel Strip +tile.rpcov6s.diamond.name=Diamond Triple Panel Strip +tile.rpcov6s.dirt.name=Dirt Triple Panel Strip +tile.rpcov6s.glass.name=Glass Triple Panel Strip +tile.rpcov6s.gold.name=Gold Triple Panel Strip +tile.rpcov6s.greenSapphireBlock.name=Green Sapphire Block Triple Panel Strip +tile.rpcov6s.iron.name=Iron Triple Panel Strip +tile.rpcov6s.lapis.name=Lapis Lazuli Triple Panel Strip +tile.rpcov6s.marble.name=Marble Triple Panel Strip +tile.rpcov6s.marbleBrick.name=Marble Brick Triple Panel Strip +tile.rpcov6s.moss.name=Moss Stone Triple Panel Strip +tile.rpcov6s.netherbrick.name=Nether Brick Triple Panel Strip +tile.rpcov6s.netherrack.name=Netherrack Triple Panel Strip +tile.rpcov6s.obsidian.name=Obsidian Triple Panel Strip +tile.rpcov6s.planks.name=Wooden Plank Triple Panel Strip +tile.rpcov6s.planks1.name=Wooden Plank Triple Panel Strip +tile.rpcov6s.planks2.name=Wooden Plank Triple Panel Strip +tile.rpcov6s.planks3.name=Wooden Plank Triple Panel Strip +tile.rpcov6s.pumpkin.name=Pumpkin Triple Panel Strip +tile.rpcov6s.rplog.name=Rubberwood Triple Panel Strip +tile.rpcov6s.rubyBlock.name=Ruby Block Triple Panel Strip +tile.rpcov6s.sandstone.name=Sandstone Triple Panel Strip +tile.rpcov6s.sandstone1.name=Sandstone Triple Panel Strip +tile.rpcov6s.sandstone2.name=Sandstone Triple Panel Strip +tile.rpcov6s.sapphireBlock.name=Sapphire Block Triple Panel Strip +tile.rpcov6s.silverBlock.name=Silver Block Triple Panel Strip +tile.rpcov6s.slab.name=Polished Stone Triple Panel Strip +tile.rpcov6s.snow.name=Snow Triple Panel Strip +tile.rpcov6s.soul.name=Soul Sand Triple Panel Strip +tile.rpcov6s.stone.name=Stone Triple Panel Strip +tile.rpcov6s.stonebrick.name=Stone Brick Triple Panel Strip +tile.rpcov6s.stonebrick1.name=Stone Brick Triple Panel Strip +tile.rpcov6s.stonebrick2.name=Stone Brick Triple Panel Strip +tile.rpcov6s.stonebrick3.name=Stone Brick Triple Panel Strip +tile.rpcov6s.tinBlock.name=Tin Block Triple Panel Strip +tile.rpcov6s.tungstenBlock.name=Tungsten Block Triple Panel Strip +tile.rpcov6s.wood.name=Oak Wood Triple Panel Strip +tile.rpcov6s.wood1.name=Spruce Wood Triple Panel Strip +tile.rpcov6s.wood2.name=Birch Wood Triple Panel Strip +tile.rpcov6s.wood3.name=Jungle Wood Triple Panel Strip +tile.rpcov6s.wool.black.name=Black Wool Triple Panel Strip +tile.rpcov6s.wool.blue.name=Blue Wool Triple Panel Strip +tile.rpcov6s.wool.brown.name=Brown Wool Triple Panel Strip +tile.rpcov6s.wool.cyan.name=Cyan Wool Triple Panel Strip +tile.rpcov6s.wool.gray.name=Gray Wool Triple Panel Strip +tile.rpcov6s.wool.green.name=Green Wool Triple Panel Strip +tile.rpcov6s.wool.lightBlue.name=Light Blue Wool Triple Panel Strip +tile.rpcov6s.wool.lime.name=Lime Wool Triple Panel Strip +tile.rpcov6s.wool.magenta.name=Magenta Wool Triple Panel Strip +tile.rpcov6s.wool.orange.name=Orange Wool Triple Panel Strip +tile.rpcov6s.wool.pink.name=Pink Wool Triple Panel Strip +tile.rpcov6s.wool.purple.name=Purple Wool Triple Panel Strip +tile.rpcov6s.wool.red.name=Red Wool Triple Panel Strip +tile.rpcov6s.wool.silver.name=Light Gray Wool Triple Panel Strip +tile.rpcov6s.wool.white.name=White Wool Triple Panel Strip +tile.rpcov6s.wool.yellow.name=Yellow Wool Triple Panel Strip + +tile.rpcov7.basalt.name=Basalt Anticover +tile.rpcov7.basaltBrick.name=Basalt Brick Anticover +tile.rpcov7.basaltCircle.name=Chiseled Basalt Brick Anticover +tile.rpcov7.basaltCobble.name=Basalt Cobblestone Anticover +tile.rpcov7.basaltPaver.name=Basalt Paver Anticover +tile.rpcov7.books.name=Bookshelf Anticover +tile.rpcov7.brick.name=Brick Anticover +tile.rpcov7.clay.name=Clay Anticover +tile.rpcov7.cobble.name=Cobblestone Anticover +tile.rpcov7.copperBlock.name=Copper Block Anticover +tile.rpcov7.diamond.name=Diamond Anticover +tile.rpcov7.dirt.name=Dirt Anticover +tile.rpcov7.glass.name=Glass Anticover +tile.rpcov7.gold.name=Gold Anticover +tile.rpcov7.greenSapphireBlock.name=Green Sapphire Block Anticover +tile.rpcov7.iron.name=Iron Anticover +tile.rpcov7.lapis.name=Lapis Lazuli Anticover +tile.rpcov7.marble.name=Marble Anticover +tile.rpcov7.marbleBrick.name=Marble Brick Anticover +tile.rpcov7.moss.name=Moss Stone Anticover +tile.rpcov7.netherbrick.name=Nether Brick Anticover +tile.rpcov7.netherrack.name=Netherrack Anticover +tile.rpcov7.obsidian.name=Obsidian Anticover +tile.rpcov7.planks.name=Wooden Plank Anticover +tile.rpcov7.planks1.name=Wooden Plank Anticover +tile.rpcov7.planks2.name=Wooden Plank Anticover +tile.rpcov7.planks3.name=Wooden Plank Anticover +tile.rpcov7.pumpkin.name=Pumpkin Anticover +tile.rpcov7.rplog.name=Rubberwood Anticover +tile.rpcov7.rubyBlock.name=Ruby Block Anticover +tile.rpcov7.sandstone.name=Sandstone Anticover +tile.rpcov7.sandstone1.name=Sandstone Anticover +tile.rpcov7.sandstone2.name=Sandstone Anticover +tile.rpcov7.sapphireBlock.name=Sapphire Block Anticover +tile.rpcov7.silverBlock.name=Silver Block Anticover +tile.rpcov7.slab.name=Polished Stone Anticover +tile.rpcov7.snow.name=Snow Anticover +tile.rpcov7.soul.name=Soul Sand Anticover +tile.rpcov7.stone.name=Stone Anticover +tile.rpcov7.stonebrick.name=Stone Brick Anticover +tile.rpcov7.stonebrick1.name=Stone Brick Anticover +tile.rpcov7.stonebrick2.name=Stone Brick Anticover +tile.rpcov7.stonebrick3.name=Stone Brick Anticover +tile.rpcov7.tinBlock.name=Tin Block Anticover +tile.rpcov7.tungstenBlock.name=Tungsten Block Anticover +tile.rpcov7.wood.name=Oak Wood Anticover +tile.rpcov7.wood1.name=Spruce Wood Anticover +tile.rpcov7.wood2.name=Birch Wood Anticover +tile.rpcov7.wood3.name=Jungle Wood Anticover +tile.rpcov7.wool.black.name=Black Wool Anticover +tile.rpcov7.wool.blue.name=Blue Wool Anticover +tile.rpcov7.wool.brown.name=Brown Wool Anticover +tile.rpcov7.wool.cyan.name=Cyan Wool Anticover +tile.rpcov7.wool.gray.name=Gray Wool Anticover +tile.rpcov7.wool.green.name=Green Wool Anticover +tile.rpcov7.wool.lightBlue.name=Light Blue Wool Anticover +tile.rpcov7.wool.lime.name=Lime Wool Anticover +tile.rpcov7.wool.magenta.name=Magenta Wool Anticover +tile.rpcov7.wool.orange.name=Orange Wool Anticover +tile.rpcov7.wool.pink.name=Pink Wool Anticover +tile.rpcov7.wool.purple.name=Purple Wool Anticover +tile.rpcov7.wool.red.name=Red Wool Anticover +tile.rpcov7.wool.silver.name=Light Gray Wool Anticover +tile.rpcov7.wool.white.name=White Wool Anticover +tile.rpcov7.wool.yellow.name=Yellow Wool Anticover + +tile.rpcov7c.basalt.name=Basalt Anticover Corner +tile.rpcov7c.basaltBrick.name=Basalt Brick Anticover Corner +tile.rpcov7c.basaltCircle.name=Chiseled Basalt Brick Anticover Corner +tile.rpcov7c.basaltCobble.name=Basalt Cobblestone Anticover Corner +tile.rpcov7c.basaltPaver.name=Basalt Paver Anticover Corner +tile.rpcov7c.books.name=Bookshelf Anticover Corner +tile.rpcov7c.brick.name=Brick Anticover Corner +tile.rpcov7c.clay.name=Clay Anticover Corner +tile.rpcov7c.cobble.name=Cobblestone Anticover Corner +tile.rpcov7c.copperBlock.name=Copper Block Anticover Corner +tile.rpcov7c.diamond.name=Diamond Anticover Corner +tile.rpcov7c.dirt.name=Dirt Anticover Corner +tile.rpcov7c.glass.name=Glass Anticover Corner +tile.rpcov7c.gold.name=Gold Anticover Corner +tile.rpcov7c.greenSapphireBlock.name=Green Sapphire Block Anticover Corner +tile.rpcov7c.iron.name=Iron Anticover Corner +tile.rpcov7c.lapis.name=Lapis Lazuli Anticover Corner +tile.rpcov7c.marble.name=Marble Anticover Corner +tile.rpcov7c.marbleBrick.name=Marble Brick Anticover Corner +tile.rpcov7c.moss.name=Moss Stone Anticover Corner +tile.rpcov7c.netherbrick.name=Nether Brick Anticover Corner +tile.rpcov7c.netherrack.name=Netherrack Anticover Corner +tile.rpcov7c.obsidian.name=Obsidian Anticover Corner +tile.rpcov7c.planks.name=Wooden Plank Anticover Corner +tile.rpcov7c.planks1.name=Wooden Plank Anticover Corner +tile.rpcov7c.planks2.name=Wooden Plank Anticover Corner +tile.rpcov7c.planks3.name=Wooden Plank Anticover Corner +tile.rpcov7c.pumpkin.name=Pumpkin Anticover Corner +tile.rpcov7c.rplog.name=Rubberwood Anticover Corner +tile.rpcov7c.rubyBlock.name=Ruby Block Anticover Corner +tile.rpcov7c.sandstone.name=Sandstone Anticover Corner +tile.rpcov7c.sandstone1.name=Sandstone Anticover Corner +tile.rpcov7c.sandstone2.name=Sandstone Anticover Corner +tile.rpcov7c.sapphireBlock.name=Sapphire Block Anticover Corner +tile.rpcov7c.silverBlock.name=Silver Block Anticover Corner +tile.rpcov7c.slab.name=Polished Stone Anticover Corner +tile.rpcov7c.snow.name=Snow Anticover Corner +tile.rpcov7c.soul.name=Soul Sand Anticover Corner +tile.rpcov7c.stone.name=Stone Anticover Corner +tile.rpcov7c.stonebrick.name=Stone Brick Anticover Corner +tile.rpcov7c.stonebrick1.name=Stone Brick Anticover Corner +tile.rpcov7c.stonebrick2.name=Stone Brick Anticover Corner +tile.rpcov7c.stonebrick3.name=Stone Brick Anticover Corner +tile.rpcov7c.tinBlock.name=Tin Block Anticover Corner +tile.rpcov7c.tungstenBlock.name=Tungsten Block Anticover Corner +tile.rpcov7c.wood.name=Oak Wood Anticover Corner +tile.rpcov7c.wood1.name=Spruce Wood Anticover Corner +tile.rpcov7c.wood2.name=Birch Wood Anticover Corner +tile.rpcov7c.wood3.name=Jungle Wood Anticover Corner +tile.rpcov7c.wool.black.name=Black Wool Anticover Corner +tile.rpcov7c.wool.blue.name=Blue Wool Anticover Corner +tile.rpcov7c.wool.brown.name=Brown Wool Anticover Corner +tile.rpcov7c.wool.cyan.name=Cyan Wool Anticover Corner +tile.rpcov7c.wool.gray.name=Gray Wool Anticover Corner +tile.rpcov7c.wool.green.name=Green Wool Anticover Corner +tile.rpcov7c.wool.lightBlue.name=Light Blue Wool Anticover Corner +tile.rpcov7c.wool.lime.name=Lime Wool Anticover Corner +tile.rpcov7c.wool.magenta.name=Magenta Wool Anticover Corner +tile.rpcov7c.wool.orange.name=Orange Wool Anticover Corner +tile.rpcov7c.wool.pink.name=Pink Wool Anticover Corner +tile.rpcov7c.wool.purple.name=Purple Wool Anticover Corner +tile.rpcov7c.wool.red.name=Red Wool Anticover Corner +tile.rpcov7c.wool.silver.name=Light Gray Wool Anticover Corner +tile.rpcov7c.wool.white.name=White Wool Anticover Corner +tile.rpcov7c.wool.yellow.name=Yellow Wool Anticover Corner +tile.rpcov7s.basalt.name=Basalt Anticover Strip +tile.rpcov7s.basaltBrick.name=Basalt Brick Anticover Strip +tile.rpcov7s.basaltCircle.name=Chiseled Basalt Brick Anticover Strip +tile.rpcov7s.basaltCobble.name=Basalt Cobblestone Anticover Strip +tile.rpcov7s.basaltPaver.name=Basalt Paver Anticover Strip +tile.rpcov7s.books.name=Bookshelf Anticover Strip +tile.rpcov7s.brick.name=Brick Anticover Strip +tile.rpcov7s.clay.name=Clay Anticover Strip +tile.rpcov7s.cobble.name=Cobblestone Anticover Strip +tile.rpcov7s.copperBlock.name=Copper Block Anticover Strip +tile.rpcov7s.diamond.name=Diamond Anticover Strip +tile.rpcov7s.dirt.name=Dirt Anticover Strip +tile.rpcov7s.glass.name=Glass Anticover Strip +tile.rpcov7s.gold.name=Gold Anticover Strip +tile.rpcov7s.greenSapphireBlock.name=Green Sapphire Block Anticover Strip +tile.rpcov7s.iron.name=Iron Anticover Strip +tile.rpcov7s.lapis.name=Lapis Lazuli Anticover Strip +tile.rpcov7s.marble.name=Marble Anticover Strip +tile.rpcov7s.marbleBrick.name=Marble Brick Anticover Strip +tile.rpcov7s.moss.name=Moss Stone Anticover Strip +tile.rpcov7s.netherbrick.name=Nether Brick Anticover Strip +tile.rpcov7s.netherrack.name=Netherrack Anticover Strip +tile.rpcov7s.obsidian.name=Obsidian Anticover Strip +tile.rpcov7s.planks.name=Wooden Plank Anticover Strip +tile.rpcov7s.planks1.name=Wooden Plank Anticover Strip +tile.rpcov7s.planks2.name=Wooden Plank Anticover Strip +tile.rpcov7s.planks3.name=Wooden Plank Anticover Strip +tile.rpcov7s.pumpkin.name=Pumpkin Anticover Strip +tile.rpcov7s.rplog.name=Rubberwood Anticover Strip +tile.rpcov7s.rubyBlock.name=Ruby Block Anticover Strip +tile.rpcov7s.sandstone.name=Sandstone Anticover Strip +tile.rpcov7s.sandstone1.name=Sandstone Anticover Strip +tile.rpcov7s.sandstone2.name=Sandstone Anticover Strip +tile.rpcov7s.sapphireBlock.name=Sapphire Block Anticover Strip +tile.rpcov7s.silverBlock.name=Silver Block Anticover Strip +tile.rpcov7s.slab.name=Polished Stone Anticover Strip +tile.rpcov7s.snow.name=Snow Anticover Strip +tile.rpcov7s.soul.name=Soul Sand Anticover Strip +tile.rpcov7s.stone.name=Stone Anticover Strip +tile.rpcov7s.stonebrick.name=Stone Brick Anticover Strip +tile.rpcov7s.stonebrick1.name=Stone Brick Anticover Strip +tile.rpcov7s.stonebrick2.name=Stone Brick Anticover Strip +tile.rpcov7s.stonebrick3.name=Stone Brick Anticover Strip +tile.rpcov7s.tinBlock.name=Tin Block Anticover Strip +tile.rpcov7s.tungstenBlock.name=Tungsten Block Anticover Strip +tile.rpcov7s.wood.name=Oak Wood Anticover Strip +tile.rpcov7s.wood1.name=Spruce Wood Anticover Strip +tile.rpcov7s.wood2.name=Birch Wood Anticover Strip +tile.rpcov7s.wood3.name=Jungle Wood Anticover Strip +tile.rpcov7s.wool.black.name=Black Wool Anticover Strip +tile.rpcov7s.wool.blue.name=Blue Wool Anticover Strip +tile.rpcov7s.wool.brown.name=Brown Wool Anticover Strip +tile.rpcov7s.wool.cyan.name=Cyan Wool Anticover Strip +tile.rpcov7s.wool.gray.name=Gray Wool Anticover Strip +tile.rpcov7s.wool.green.name=Green Wool Anticover Strip +tile.rpcov7s.wool.lightBlue.name=Light Blue Wool Anticover Strip +tile.rpcov7s.wool.lime.name=Lime Wool Anticover Strip +tile.rpcov7s.wool.magenta.name=Magenta Wool Anticover Strip +tile.rpcov7s.wool.orange.name=Orange Wool Anticover Strip +tile.rpcov7s.wool.pink.name=Pink Wool Anticover Strip +tile.rpcov7s.wool.purple.name=Purple Wool Anticover Strip +tile.rpcov7s.wool.red.name=Red Wool Anticover Strip +tile.rpcov7s.wool.silver.name=Light Gray Wool Anticover Strip +tile.rpcov7s.wool.white.name=White Wool Anticover Strip +tile.rpcov7s.wool.yellow.name=Yellow Wool Anticover Strip + +tile.rpcovc.basalt.name=Basalt Cover Corner +tile.rpcovc.basaltBrick.name=Basalt Brick Cover Corner +tile.rpcovc.basaltCircle.name=Chiseled Basalt Brick Cover Corner +tile.rpcovc.basaltCobble.name=Basalt Cobblestone Cover Corner +tile.rpcovc.basaltPaver.name=Basalt Paver Cover Corner +tile.rpcovc.books.name=Bookshelf Cover Corner +tile.rpcovc.brick.name=Brick Cover Corner +tile.rpcovc.clay.name=Clay Cover Corner +tile.rpcovc.cobble.name=Cobblestone Cover Corner +tile.rpcovc.copperBlock.name=Copper Block Cover Corner +tile.rpcovc.diamond.name=Diamond Cover Corner +tile.rpcovc.dirt.name=Dirt Cover Corner +tile.rpcovc.glass.name=Glass Cover Corner +tile.rpcovc.gold.name=Gold Cover Corner +tile.rpcovc.greenSapphireBlock.name=Green Sapphire Block Cover Corner +tile.rpcovc.iron.name=Iron Cover Corner +tile.rpcovc.lapis.name=Lapis Lazuli Cover Corner +tile.rpcovc.marble.name=Marble Cover Corner +tile.rpcovc.marbleBrick.name=Marble Brick Cover Corner +tile.rpcovc.moss.name=Moss Stone Cover Corner +tile.rpcovc.netherbrick.name=Nether Brick Cover Corner +tile.rpcovc.netherrack.name=Netherrack Cover Corner +tile.rpcovc.obsidian.name=Obsidian Cover Corner +tile.rpcovc.planks.name=Wooden Plank Cover Corner +tile.rpcovc.planks1.name=Wooden Plank Cover Corner +tile.rpcovc.planks2.name=Wooden Plank Cover Corner +tile.rpcovc.planks3.name=Wooden Plank Cover Corner +tile.rpcovc.pumpkin.name=Pumpkin Cover Corner +tile.rpcovc.rplog.name=Rubberwood Cover Corner +tile.rpcovc.rubyBlock.name=Ruby Block Cover Corner +tile.rpcovc.sandstone.name=Sandstone Cover Corner +tile.rpcovc.sandstone1.name=Sandstone Cover Corner +tile.rpcovc.sandstone2.name=Sandstone Cover Corner +tile.rpcovc.sapphireBlock.name=Sapphire Block Cover Corner +tile.rpcovc.silverBlock.name=Silver Block Cover Corner +tile.rpcovc.slab.name=Polished Stone Cover Corner +tile.rpcovc.snow.name=Snow Cover Corner +tile.rpcovc.soul.name=Soul Sand Cover Corner +tile.rpcovc.stone.name=Stone Cover Corner +tile.rpcovc.stonebrick.name=Stone Brick Cover Corner +tile.rpcovc.stonebrick1.name=Stone Brick Cover Corner +tile.rpcovc.stonebrick2.name=Stone Brick Cover Corner +tile.rpcovc.stonebrick3.name=Stone Brick Cover Corner +tile.rpcovc.tinBlock.name=Tin Block Cover Corner +tile.rpcovc.tungstenBlock.name=Tungsten Block Cover Corner +tile.rpcovc.wood.name=Oak Wood Cover Corner +tile.rpcovc.wood1.name=Spruce Wood Cover Corner +tile.rpcovc.wood2.name=Birch Wood Cover Corner +tile.rpcovc.wood3.name=Jungle Wood Cover Corner +tile.rpcovc.wool.black.name=Black Wool Cover Corner +tile.rpcovc.wool.blue.name=Blue Wool Cover Corner +tile.rpcovc.wool.brown.name=Brown Wool Cover Corner +tile.rpcovc.wool.cyan.name=Cyan Wool Cover Corner +tile.rpcovc.wool.gray.name=Gray Wool Cover Corner +tile.rpcovc.wool.green.name=Green Wool Cover Corner +tile.rpcovc.wool.lightBlue.name=Light Blue Wool Cover Corner +tile.rpcovc.wool.lime.name=Lime Wool Cover Corner +tile.rpcovc.wool.magenta.name=Magenta Wool Cover Corner +tile.rpcovc.wool.orange.name=Orange Wool Cover Corner +tile.rpcovc.wool.pink.name=Pink Wool Cover Corner +tile.rpcovc.wool.purple.name=Purple Wool Cover Corner +tile.rpcovc.wool.red.name=Red Wool Cover Corner +tile.rpcovc.wool.silver.name=Light Gray Wool Cover Corner +tile.rpcovc.wool.white.name=White Wool Cover Corner +tile.rpcovc.wool.yellow.name=Yellow Wool Cover Corner + +tile.rpcover.basalt.name=Basalt Cover +tile.rpcover.basaltBrick.name=Basalt Brick Cover +tile.rpcover.basaltCircle.name=Chiseled Basalt Brick Cover +tile.rpcover.basaltCobble.name=Basalt Cobblestone Cover +tile.rpcover.basaltPaver.name=Basalt Paver Cover +tile.rpcover.books.name=Bookshelf Cover +tile.rpcover.brick.name=Brick Cover +tile.rpcover.clay.name=Clay Cover +tile.rpcover.cobble.name=Cobblestone Cover +tile.rpcover.copperBlock.name=Copper Block Cover +tile.rpcover.diamond.name=Diamond Cover +tile.rpcover.dirt.name=Dirt Cover +tile.rpcover.glass.name=Glass Cover +tile.rpcover.gold.name=Gold Cover +tile.rpcover.greenSapphireBlock.name=Green Sapphire Block Cover +tile.rpcover.iron.name=Iron Cover +tile.rpcover.lapis.name=Lapis Lazuli Cover +tile.rpcover.marble.name=Marble Cover +tile.rpcover.marbleBrick.name=Marble Brick Cover +tile.rpcover.moss.name=Moss Stone Cover +tile.rpcover.netherbrick.name=Nether Brick Cover +tile.rpcover.netherrack.name=Netherrack Cover +tile.rpcover.obsidian.name=Obsidian Cover +tile.rpcover.planks.name=Wooden Plank Cover +tile.rpcover.planks1.name=Wooden Plank Cover +tile.rpcover.planks2.name=Wooden Plank Cover +tile.rpcover.planks3.name=Wooden Plank Cover +tile.rpcover.pumpkin.name=Pumpkin Cover +tile.rpcover.rplog.name=Rubberwood Cover +tile.rpcover.rubyBlock.name=Ruby Block Cover +tile.rpcover.sandstone.name=Sandstone Cover +tile.rpcover.sandstone1.name=Sandstone Cover +tile.rpcover.sandstone2.name=Sandstone Cover +tile.rpcover.sapphireBlock.name=Sapphire Block Cover +tile.rpcover.silverBlock.name=Silver Block Cover +tile.rpcover.slab.name=Polished Stone Cover +tile.rpcover.snow.name=Snow Cover +tile.rpcover.soul.name=Soul Sand Cover +tile.rpcover.stone.name=Stone Cover +tile.rpcover.stonebrick.name=Stone Brick Cover +tile.rpcover.stonebrick1.name=Stone Brick Cover +tile.rpcover.stonebrick2.name=Stone Brick Cover +tile.rpcover.stonebrick3.name=Stone Brick Cover +tile.rpcover.tinBlock.name=Tin Block Cover +tile.rpcover.tungstenBlock.name=Tungsten Block Cover +tile.rpcover.wood.name=Oak Wood Cover +tile.rpcover.wood1.name=Spruce Wood Cover +tile.rpcover.wood2.name=Birch Wood Cover +tile.rpcover.wood3.name=Jungle Wood Cover +tile.rpcover.wool.black.name=Black Wool Cover +tile.rpcover.wool.blue.name=Blue Wool Cover +tile.rpcover.wool.brown.name=Brown Wool Cover +tile.rpcover.wool.cyan.name=Cyan Wool Cover +tile.rpcover.wool.gray.name=Gray Wool Cover +tile.rpcover.wool.green.name=Green Wool Cover +tile.rpcover.wool.lightBlue.name=Light Blue Wool Cover +tile.rpcover.wool.lime.name=Lime Wool Cover +tile.rpcover.wool.magenta.name=Magenta Wool Cover +tile.rpcover.wool.orange.name=Orange Wool Cover +tile.rpcover.wool.pink.name=Pink Wool Cover +tile.rpcover.wool.purple.name=Purple Wool Cover +tile.rpcover.wool.red.name=Red Wool Cover +tile.rpcover.wool.silver.name=Light Gray Wool Cover +tile.rpcover.wool.white.name=White Wool Cover +tile.rpcover.wool.yellow.name=Yellow Wool Cover + +tile.rpcovs.basalt.name=Basalt Cover Strip +tile.rpcovs.basaltBrick.name=Basalt Brick Cover Strip +tile.rpcovs.basaltCircle.name=Chiseled Basalt Brick Cover Strip +tile.rpcovs.basaltCobble.name=Basalt Cobblestone Cover Strip +tile.rpcovs.basaltPaver.name=Basalt Paver Cover Strip +tile.rpcovs.books.name=Bookshelf Cover Strip +tile.rpcovs.brick.name=Brick Cover Strip +tile.rpcovs.clay.name=Clay Cover Strip +tile.rpcovs.cobble.name=Cobblestone Cover Strip +tile.rpcovs.copperBlock.name=Copper Block Cover Strip +tile.rpcovs.diamond.name=Diamond Cover Strip +tile.rpcovs.dirt.name=Dirt Cover Strip +tile.rpcovs.glass.name=Glass Cover Strip +tile.rpcovs.gold.name=Gold Cover Strip +tile.rpcovs.greenSapphireBlock.name=Green Sapphire Block Cover Strip +tile.rpcovs.iron.name=Iron Cover Strip +tile.rpcovs.lapis.name=Lapis Lazuli Cover Strip +tile.rpcovs.marble.name=Marble Cover Strip +tile.rpcovs.marbleBrick.name=Marble Brick Cover Strip +tile.rpcovs.moss.name=Moss Stone Cover Strip +tile.rpcovs.netherbrick.name=Nether Brick Cover Strip +tile.rpcovs.netherrack.name=Netherrack Cover Strip +tile.rpcovs.obsidian.name=Obsidian Cover Strip +tile.rpcovs.planks.name=Wooden Plank Cover Strip +tile.rpcovs.planks1.name=Wooden Plank Cover Strip +tile.rpcovs.planks2.name=Wooden Plank Cover Strip +tile.rpcovs.planks3.name=Wooden Plank Cover Strip +tile.rpcovs.pumpkin.name=Pumpkin Cover Strip +tile.rpcovs.rplog.name=Rubberwood Cover Strip +tile.rpcovs.rubyBlock.name=Ruby Block Cover Strip +tile.rpcovs.sandstone.name=Sandstone Cover Strip +tile.rpcovs.sandstone1.name=Sandstone Cover Strip +tile.rpcovs.sandstone2.name=Sandstone Cover Strip +tile.rpcovs.sapphireBlock.name=Sapphire Block Cover Strip +tile.rpcovs.silverBlock.name=Silver Block Cover Strip +tile.rpcovs.slab.name=Polished Stone Cover Strip +tile.rpcovs.snow.name=Snow Cover Strip +tile.rpcovs.soul.name=Soul Sand Cover Strip +tile.rpcovs.stone.name=Stone Cover Strip +tile.rpcovs.stonebrick.name=Stone Brick Cover Strip +tile.rpcovs.stonebrick1.name=Stone Brick Cover Strip +tile.rpcovs.stonebrick2.name=Stone Brick Cover Strip +tile.rpcovs.stonebrick3.name=Stone Brick Cover Strip +tile.rpcovs.tinBlock.name=Tin Block Cover Strip +tile.rpcovs.tungstenBlock.name=Tungsten Block Cover Strip +tile.rpcovs.wood.name=Oak Wood Cover Strip +tile.rpcovs.wood1.name=Spruce Wood Cover Strip +tile.rpcovs.wood2.name=Birch Wood Cover Strip +tile.rpcovs.wood3.name=Jungle Wood Cover Strip +tile.rpcovs.wool.black.name=Black Wool Cover Strip +tile.rpcovs.wool.blue.name=Blue Wool Cover Strip +tile.rpcovs.wool.brown.name=Brown Wool Cover Strip +tile.rpcovs.wool.cyan.name=Cyan Wool Cover Strip +tile.rpcovs.wool.gray.name=Gray Wool Cover Strip +tile.rpcovs.wool.green.name=Green Wool Cover Strip +tile.rpcovs.wool.lightBlue.name=Light Blue Wool Cover Strip +tile.rpcovs.wool.lime.name=Lime Wool Cover Strip +tile.rpcovs.wool.magenta.name=Magenta Wool Cover Strip +tile.rpcovs.wool.orange.name=Orange Wool Cover Strip +tile.rpcovs.wool.pink.name=Pink Wool Cover Strip +tile.rpcovs.wool.purple.name=Purple Wool Cover Strip +tile.rpcovs.wool.red.name=Red Wool Cover Strip +tile.rpcovs.wool.silver.name=Light Gray Wool Cover Strip +tile.rpcovs.wool.white.name=White Wool Cover Strip +tile.rpcovs.wool.yellow.name=Yellow Wool Cover Strip + +tile.rphcov3.basalt.name=Basalt Hollow Triple Cover +tile.rphcov3.basaltBrick.name=Basalt Brick Hollow Triple Cover +tile.rphcov3.basaltCircle.name=Chiseled Basalt Brick Hollow Triple Cover +tile.rphcov3.basaltCobble.name=Basalt Cobblestone Hollow Triple Cover +tile.rphcov3.basaltPaver.name=Basalt Paver Hollow Triple Cover +tile.rphcov3.books.name=Bookshelf Hollow Triple Cover +tile.rphcov3.brick.name=Brick Hollow Triple Cover +tile.rphcov3.clay.name=Clay Hollow Triple Cover +tile.rphcov3.cobble.name=Cobblestone Hollow Triple Cover +tile.rphcov3.copperBlock.name=Copper Block Hollow Triple Cover +tile.rphcov3.diamond.name=Diamond Hollow Triple Cover +tile.rphcov3.dirt.name=Dirt Hollow Triple Cover +tile.rphcov3.glass.name=Glass Hollow Triple Cover +tile.rphcov3.gold.name=Gold Hollow Triple Cover +tile.rphcov3.greenSapphireBlock.name=Green Sapphire Block Hollow Triple Cover +tile.rphcov3.iron.name=Iron Hollow Triple Cover +tile.rphcov3.lapis.name=Lapis Lazuli Hollow Triple Cover +tile.rphcov3.marble.name=Marble Hollow Triple Cover +tile.rphcov3.marbleBrick.name=Marble Brick Hollow Triple Cover +tile.rphcov3.moss.name=Moss Stone Hollow Triple Cover +tile.rphcov3.netherbrick.name=Nether Brick Hollow Triple Cover +tile.rphcov3.netherrack.name=Netherrack Hollow Triple Cover +tile.rphcov3.obsidian.name=Obsidian Hollow Triple Cover +tile.rphcov3.planks.name=Wooden Plank Hollow Triple Cover +tile.rphcov3.planks1.name=Wooden Plank Hollow Triple Cover +tile.rphcov3.planks2.name=Wooden Plank Hollow Triple Cover +tile.rphcov3.planks3.name=Wooden Plank Hollow Triple Cover +tile.rphcov3.pumpkin.name=Pumpkin Hollow Triple Cover +tile.rphcov3.rplog.name=Rubberwood Hollow Triple Cover +tile.rphcov3.rubyBlock.name=Ruby Block Hollow Triple Cover +tile.rphcov3.sandstone.name=Sandstone Hollow Triple Cover +tile.rphcov3.sandstone1.name=Sandstone Hollow Triple Cover +tile.rphcov3.sandstone2.name=Sandstone Hollow Triple Cover +tile.rphcov3.sapphireBlock.name=Sapphire Block Hollow Triple Cover +tile.rphcov3.silverBlock.name=Silver Block Hollow Triple Cover +tile.rphcov3.slab.name=Polished Stone Hollow Triple Cover +tile.rphcov3.snow.name=Snow Hollow Triple Cover +tile.rphcov3.soul.name=Soul Sand Hollow Triple Cover +tile.rphcov3.stone.name=Stone Hollow Triple Cover +tile.rphcov3.stonebrick.name=Stone Brick Hollow Triple Cover +tile.rphcov3.stonebrick1.name=Stone Brick Hollow Triple Cover +tile.rphcov3.stonebrick2.name=Stone Brick Hollow Triple Cover +tile.rphcov3.stonebrick3.name=Stone Brick Hollow Triple Cover +tile.rphcov3.tinBlock.name=Tin Block Hollow Triple Cover +tile.rphcov3.tungstenBlock.name=Tungsten Block Hollow Triple Cover +tile.rphcov3.wood.name=Oak Wood Hollow Triple Cover +tile.rphcov3.wood1.name=Spruce Wood Hollow Triple Cover +tile.rphcov3.wood2.name=Birch Wood Hollow Triple Cover +tile.rphcov3.wood3.name=Jungle Wood Hollow Triple Cover +tile.rphcov3.wool.black.name=Black Wool Hollow Triple Cover +tile.rphcov3.wool.blue.name=Blue Wool Hollow Triple Cover +tile.rphcov3.wool.brown.name=Brown Wool Hollow Triple Cover +tile.rphcov3.wool.cyan.name=Cyan Wool Hollow Triple Cover +tile.rphcov3.wool.gray.name=Gray Wool Hollow Triple Cover +tile.rphcov3.wool.green.name=Green Wool Hollow Triple Cover +tile.rphcov3.wool.lightBlue.name=Light Blue Wool Hollow Triple Cover +tile.rphcov3.wool.lime.name=Lime Wool Hollow Triple Cover +tile.rphcov3.wool.magenta.name=Magenta Wool Hollow Triple Cover +tile.rphcov3.wool.orange.name=Orange Wool Hollow Triple Cover +tile.rphcov3.wool.pink.name=Pink Wool Hollow Triple Cover +tile.rphcov3.wool.purple.name=Purple Wool Hollow Triple Cover +tile.rphcov3.wool.red.name=Red Wool Hollow Triple Cover +tile.rphcov3.wool.silver.name=Light Gray Wool Hollow Triple Cover +tile.rphcov3.wool.white.name=White Wool Hollow Triple Cover +tile.rphcov3.wool.yellow.name=Yellow Wool Hollow Triple Cover + +tile.rphcov5.basalt.name=Basalt Hollow Cover Slab +tile.rphcov5.basaltBrick.name=Basalt Brick Hollow Cover Slab +tile.rphcov5.basaltCircle.name=Chiseled Basalt Brick Hollow Cover Slab +tile.rphcov5.basaltCobble.name=Basalt Cobblestone Hollow Cover Slab +tile.rphcov5.basaltPaver.name=Basalt Paver Hollow Cover Slab +tile.rphcov5.books.name=Bookshelf Hollow Cover Slab +tile.rphcov5.brick.name=Brick Hollow Cover Slab +tile.rphcov5.clay.name=Clay Hollow Cover Slab +tile.rphcov5.cobble.name=Cobblestone Hollow Cover Slab +tile.rphcov5.copperBlock.name=Copper Block Hollow Cover Slab +tile.rphcov5.diamond.name=Diamond Hollow Cover Slab +tile.rphcov5.dirt.name=Dirt Hollow Cover Slab +tile.rphcov5.glass.name=Glass Hollow Cover Slab +tile.rphcov5.gold.name=Gold Hollow Cover Slab +tile.rphcov5.greenSapphireBlock.name=Green Sapphire Block Hollow Cover Slab +tile.rphcov5.iron.name=Iron Hollow Cover Slab +tile.rphcov5.lapis.name=Lapis Lazuli Hollow Cover Slab +tile.rphcov5.marble.name=Marble Hollow Cover Slab +tile.rphcov5.marbleBrick.name=Marble Brick Hollow Cover Slab +tile.rphcov5.moss.name=Moss Stone Hollow Cover Slab +tile.rphcov5.netherbrick.name=Nether Brick Hollow Cover Slab +tile.rphcov5.netherrack.name=Netherrack Hollow Cover Slab +tile.rphcov5.obsidian.name=Obsidian Hollow Cover Slab +tile.rphcov5.planks.name=Wooden Plank Hollow Cover Slab +tile.rphcov5.planks1.name=Wooden Plank Hollow Cover Slab +tile.rphcov5.planks2.name=Wooden Plank Hollow Cover Slab +tile.rphcov5.planks3.name=Wooden Plank Hollow Cover Slab +tile.rphcov5.pumpkin.name=Pumpkin Hollow Cover Slab +tile.rphcov5.rplog.name=Rubberwood Hollow Cover Slab +tile.rphcov5.rubyBlock.name=Ruby Block Hollow Cover Slab +tile.rphcov5.sandstone.name=Sandstone Hollow Cover Slab +tile.rphcov5.sandstone1.name=Sandstone Hollow Cover Slab +tile.rphcov5.sandstone2.name=Sandstone Hollow Cover Slab +tile.rphcov5.sapphireBlock.name=Sapphire Block Hollow Cover Slab +tile.rphcov5.silverBlock.name=Silver Block Hollow Cover Slab +tile.rphcov5.slab.name=Polished Stone Hollow Cover Slab +tile.rphcov5.snow.name=Snow Hollow Cover Slab +tile.rphcov5.soul.name=Soul Sand Hollow Cover Slab +tile.rphcov5.stone.name=Stone Hollow Cover Slab +tile.rphcov5.stonebrick.name=Stone Brick Hollow Cover Slab +tile.rphcov5.stonebrick1.name=Stone Brick Hollow Cover Slab +tile.rphcov5.stonebrick2.name=Stone Brick Hollow Cover Slab +tile.rphcov5.stonebrick3.name=Stone Brick Hollow Cover Slab +tile.rphcov5.tinBlock.name=Tin Block Hollow Cover Slab +tile.rphcov5.tungstenBlock.name=Tungsten Block Hollow Cover Slab +tile.rphcov5.wood.name=Oak Wood Hollow Cover Slab +tile.rphcov5.wood1.name=Spruce Wood Hollow Cover Slab +tile.rphcov5.wood2.name=Birch Wood Hollow Cover Slab +tile.rphcov5.wood3.name=Jungle Wood Hollow Cover Slab +tile.rphcov5.wool.black.name=Black Wool Hollow Cover Slab +tile.rphcov5.wool.blue.name=Blue Wool Hollow Cover Slab +tile.rphcov5.wool.brown.name=Brown Wool Hollow Cover Slab +tile.rphcov5.wool.cyan.name=Cyan Wool Hollow Cover Slab +tile.rphcov5.wool.gray.name=Gray Wool Hollow Cover Slab +tile.rphcov5.wool.green.name=Green Wool Hollow Cover Slab +tile.rphcov5.wool.lightBlue.name=Light Blue Wool Hollow Cover Slab +tile.rphcov5.wool.lime.name=Lime Wool Hollow Cover Slab +tile.rphcov5.wool.magenta.name=Magenta Wool Hollow Cover Slab +tile.rphcov5.wool.orange.name=Orange Wool Hollow Cover Slab +tile.rphcov5.wool.pink.name=Pink Wool Hollow Cover Slab +tile.rphcov5.wool.purple.name=Purple Wool Hollow Cover Slab +tile.rphcov5.wool.red.name=Red Wool Hollow Cover Slab +tile.rphcov5.wool.silver.name=Light Gray Wool Hollow Cover Slab +tile.rphcov5.wool.white.name=White Wool Hollow Cover Slab +tile.rphcov5.wool.yellow.name=Yellow Wool Hollow Cover Slab + +tile.rphcov6.basalt.name=Basalt Hollow Triple Panel +tile.rphcov6.basaltBrick.name=Basalt Brick Hollow Triple Panel +tile.rphcov6.basaltCircle.name=Chiseled Basalt Brick Hollow Triple Panel +tile.rphcov6.basaltCobble.name=Basalt Cobblestone Hollow Triple Panel +tile.rphcov6.basaltPaver.name=Basalt Paver Hollow Triple Panel +tile.rphcov6.books.name=Bookshelf Hollow Triple Panel +tile.rphcov6.brick.name=Brick Hollow Triple Panel +tile.rphcov6.clay.name=Clay Hollow Triple Panel +tile.rphcov6.cobble.name=Cobblestone Hollow Triple Panel +tile.rphcov6.copperBlock.name=Copper Block Hollow Triple Panel +tile.rphcov6.diamond.name=Diamond Hollow Triple Panel +tile.rphcov6.dirt.name=Dirt Hollow Triple Panel +tile.rphcov6.glass.name=Glass Hollow Triple Panel +tile.rphcov6.gold.name=Gold Hollow Triple Panel +tile.rphcov6.greenSapphireBlock.name=Green Sapphire Block Hollow Triple Panel +tile.rphcov6.iron.name=Iron Hollow Triple Panel +tile.rphcov6.lapis.name=Lapis Lazuli Hollow Triple Panel +tile.rphcov6.marble.name=Marble Hollow Triple Panel +tile.rphcov6.marbleBrick.name=Marble Brick Hollow Triple Panel +tile.rphcov6.moss.name=Moss Stone Hollow Triple Panel +tile.rphcov6.netherbrick.name=Nether Brick Hollow Triple Panel +tile.rphcov6.netherrack.name=Netherrack Hollow Triple Panel +tile.rphcov6.obsidian.name=Obsidian Hollow Triple Panel +tile.rphcov6.planks.name=Wooden Plank Hollow Triple Panel +tile.rphcov6.planks1.name=Wooden Plank Hollow Triple Panel +tile.rphcov6.planks2.name=Wooden Plank Hollow Triple Panel +tile.rphcov6.planks3.name=Wooden Plank Hollow Triple Panel +tile.rphcov6.pumpkin.name=Pumpkin Hollow Triple Panel +tile.rphcov6.rplog.name=Rubberwood Hollow Triple Panel +tile.rphcov6.rubyBlock.name=Ruby Block Hollow Triple Panel +tile.rphcov6.sandstone.name=Sandstone Hollow Triple Panel +tile.rphcov6.sandstone1.name=Sandstone Hollow Triple Panel +tile.rphcov6.sandstone2.name=Sandstone Hollow Triple Panel +tile.rphcov6.sapphireBlock.name=Sapphire Block Hollow Triple Panel +tile.rphcov6.silverBlock.name=Silver Block Hollow Triple Panel +tile.rphcov6.slab.name=Polished Stone Hollow Triple Panel +tile.rphcov6.snow.name=Snow Hollow Triple Panel +tile.rphcov6.soul.name=Soul Sand Hollow Triple Panel +tile.rphcov6.stone.name=Stone Hollow Triple Panel +tile.rphcov6.stonebrick.name=Stone Brick Hollow Triple Panel +tile.rphcov6.stonebrick1.name=Stone Brick Hollow Triple Panel +tile.rphcov6.stonebrick2.name=Stone Brick Hollow Triple Panel +tile.rphcov6.stonebrick3.name=Stone Brick Hollow Triple Panel +tile.rphcov6.tinBlock.name=Tin Block Hollow Triple Panel +tile.rphcov6.tungstenBlock.name=Tungsten Block Hollow Triple Panel +tile.rphcov6.wood.name=Oak Wood Hollow Triple Panel +tile.rphcov6.wood1.name=Spruce Wood Hollow Triple Panel +tile.rphcov6.wood2.name=Birch Wood Hollow Triple Panel +tile.rphcov6.wood3.name=Jungle Wood Hollow Triple Panel +tile.rphcov6.wool.black.name=Black Wool Hollow Triple Panel +tile.rphcov6.wool.blue.name=Blue Wool Hollow Triple Panel +tile.rphcov6.wool.brown.name=Brown Wool Hollow Triple Panel +tile.rphcov6.wool.cyan.name=Cyan Wool Hollow Triple Panel +tile.rphcov6.wool.gray.name=Gray Wool Hollow Triple Panel +tile.rphcov6.wool.green.name=Green Wool Hollow Triple Panel +tile.rphcov6.wool.lightBlue.name=Light Blue Wool Hollow Triple Panel +tile.rphcov6.wool.lime.name=Lime Wool Hollow Triple Panel +tile.rphcov6.wool.magenta.name=Magenta Wool Hollow Triple Panel +tile.rphcov6.wool.orange.name=Orange Wool Hollow Triple Panel +tile.rphcov6.wool.pink.name=Pink Wool Hollow Triple Panel +tile.rphcov6.wool.purple.name=Purple Wool Hollow Triple Panel +tile.rphcov6.wool.red.name=Red Wool Hollow Triple Panel +tile.rphcov6.wool.silver.name=Light Gray Wool Hollow Triple Panel +tile.rphcov6.wool.white.name=White Wool Hollow Triple Panel +tile.rphcov6.wool.yellow.name=Yellow Wool Hollow Triple Panel + +tile.rphcov7.basalt.name=Basalt Hollow Anticover +tile.rphcov7.basaltBrick.name=Basalt Brick Hollow Anticover +tile.rphcov7.basaltCircle.name=Chiseled Basalt Brick Hollow Anticover +tile.rphcov7.basaltCobble.name=Basalt Cobblestone Hollow Anticover +tile.rphcov7.basaltPaver.name=Basalt Paver Hollow Anticover +tile.rphcov7.books.name=Bookshelf Hollow Anticover +tile.rphcov7.brick.name=Brick Hollow Anticover +tile.rphcov7.clay.name=Clay Hollow Anticover +tile.rphcov7.cobble.name=Cobblestone Hollow Anticover +tile.rphcov7.copperBlock.name=Copper Block Hollow Anticover +tile.rphcov7.diamond.name=Diamond Hollow Anticover +tile.rphcov7.dirt.name=Dirt Hollow Anticover +tile.rphcov7.glass.name=Glass Hollow Anticover +tile.rphcov7.gold.name=Gold Hollow Anticover +tile.rphcov7.greenSapphireBlock.name=Green Sapphire Block Hollow Anticover +tile.rphcov7.iron.name=Iron Hollow Anticover +tile.rphcov7.lapis.name=Lapis Lazuli Hollow Anticover +tile.rphcov7.marble.name=Marble Hollow Anticover +tile.rphcov7.marbleBrick.name=Marble Brick Hollow Anticover +tile.rphcov7.moss.name=Moss Stone Hollow Anticover +tile.rphcov7.netherbrick.name=Nether Brick Hollow Anticover +tile.rphcov7.netherrack.name=Netherrack Hollow Anticover +tile.rphcov7.obsidian.name=Obsidian Hollow Anticover +tile.rphcov7.planks.name=Wooden Plank Hollow Anticover +tile.rphcov7.planks1.name=Wooden Plank Hollow Anticover +tile.rphcov7.planks2.name=Wooden Plank Hollow Anticover +tile.rphcov7.planks3.name=Wooden Plank Hollow Anticover +tile.rphcov7.pumpkin.name=Pumpkin Hollow Anticover +tile.rphcov7.rplog.name=Rubberwood Hollow Anticover +tile.rphcov7.rubyBlock.name=Ruby Block Hollow Anticover +tile.rphcov7.sandstone.name=Sandstone Hollow Anticover +tile.rphcov7.sandstone1.name=Sandstone Hollow Anticover +tile.rphcov7.sandstone2.name=Sandstone Hollow Anticover +tile.rphcov7.sapphireBlock.name=Sapphire Block Hollow Anticover +tile.rphcov7.silverBlock.name=Silver Block Hollow Anticover +tile.rphcov7.slab.name=Polished Stone Hollow Anticover +tile.rphcov7.snow.name=Snow Hollow Anticover +tile.rphcov7.soul.name=Soul Sand Hollow Anticover +tile.rphcov7.stone.name=Stone Hollow Anticover +tile.rphcov7.stonebrick.name=Stone Brick Hollow Anticover +tile.rphcov7.stonebrick1.name=Stone Brick Hollow Anticover +tile.rphcov7.stonebrick2.name=Stone Brick Hollow Anticover +tile.rphcov7.stonebrick3.name=Stone Brick Hollow Anticover +tile.rphcov7.tinBlock.name=Tin Block Hollow Anticover +tile.rphcov7.tungstenBlock.name=Tungsten Block Hollow Anticover +tile.rphcov7.wood.name=Oak Wood Hollow Anticover +tile.rphcov7.wood1.name=Spruce Wood Hollow Anticover +tile.rphcov7.wood2.name=Birch Wood Hollow Anticover +tile.rphcov7.wood3.name=Jungle Wood Hollow Anticover +tile.rphcov7.wool.black.name=Black Wool Hollow Anticover +tile.rphcov7.wool.blue.name=Blue Wool Hollow Anticover +tile.rphcov7.wool.brown.name=Brown Wool Hollow Anticover +tile.rphcov7.wool.cyan.name=Cyan Wool Hollow Anticover +tile.rphcov7.wool.gray.name=Gray Wool Hollow Anticover +tile.rphcov7.wool.green.name=Green Wool Hollow Anticover +tile.rphcov7.wool.lightBlue.name=Light Blue Wool Hollow Anticover +tile.rphcov7.wool.lime.name=Lime Wool Hollow Anticover +tile.rphcov7.wool.magenta.name=Magenta Wool Hollow Anticover +tile.rphcov7.wool.orange.name=Orange Wool Hollow Anticover +tile.rphcov7.wool.pink.name=Pink Wool Hollow Anticover +tile.rphcov7.wool.purple.name=Purple Wool Hollow Anticover +tile.rphcov7.wool.red.name=Red Wool Hollow Anticover +tile.rphcov7.wool.silver.name=Light Gray Wool Hollow Anticover +tile.rphcov7.wool.white.name=White Wool Hollow Anticover +tile.rphcov7.wool.yellow.name=Yellow Wool Hollow Anticover + +tile.rphcover.basalt.name=Hollow Basalt Cover +tile.rphcover.basaltBrick.name=Hollow Basalt Brick Cover +tile.rphcover.basaltCircle.name=Hollow Chiseled Basalt Brick Cover +tile.rphcover.basaltCobble.name=Hollow Basalt Cobblestone Cover +tile.rphcover.basaltPaver.name=Hollow Basalt Paver Cover +tile.rphcover.books.name=Hollow Bookshelf Cover +tile.rphcover.brick.name=Hollow Brick Cover +tile.rphcover.clay.name=Hollow Clay Cover +tile.rphcover.cobble.name=Hollow Cobblestone Cover +tile.rphcover.copperBlock.name=Hollow Copper Block Cover +tile.rphcover.diamond.name=Hollow Diamond Cover +tile.rphcover.dirt.name=Hollow Dirt Cover +tile.rphcover.glass.name=Hollow Glass Cover +tile.rphcover.gold.name=Hollow Gold Cover +tile.rphcover.greenSapphireBlock.name=Hollow Green Sapphire Block Cover +tile.rphcover.iron.name=Hollow Iron Cover +tile.rphcover.lapis.name=Hollow Lapis Lazuli Cover +tile.rphcover.marble.name=Hollow Marble Cover +tile.rphcover.marbleBrick.name=Hollow Marble Brick Cover +tile.rphcover.moss.name=Hollow Moss Stone Cover +tile.rphcover.netherbrick.name=Hollow Nether Brick Cover +tile.rphcover.netherrack.name=Hollow Netherrack Cover +tile.rphcover.obsidian.name=Hollow Obsidian Cover +tile.rphcover.planks.name=Hollow Wooden Plank Cover +tile.rphcover.planks1.name=Hollow Wooden Plank Cover +tile.rphcover.planks2.name=Hollow Wooden Plank Cover +tile.rphcover.planks3.name=Hollow Wooden Plank Cover +tile.rphcover.pumpkin.name=Hollow Pumpkin Cover +tile.rphcover.rplog.name=Hollow Rubberwood Cover +tile.rphcover.rubyBlock.name=Hollow Ruby Block Cover +tile.rphcover.sandstone.name=Hollow Sandstone Cover +tile.rphcover.sandstone1.name=Hollow Sandstone Cover +tile.rphcover.sandstone2.name=Hollow Sandstone Cover +tile.rphcover.sapphireBlock.name=Hollow Sapphire Block Cover +tile.rphcover.silverBlock.name=Hollow Silver Block Cover +tile.rphcover.slab.name=Hollow Polished Stone Cover +tile.rphcover.snow.name=Hollow Snow Cover +tile.rphcover.soul.name=Hollow Soul Sand Cover +tile.rphcover.stone.name=Hollow Stone Cover +tile.rphcover.stonebrick.name=Hollow Stone Brick Cover +tile.rphcover.stonebrick1.name=Hollow Stone Brick Cover +tile.rphcover.stonebrick2.name=Hollow Stone Brick Cover +tile.rphcover.stonebrick3.name=Hollow Stone Brick Cover +tile.rphcover.tinBlock.name=Hollow Tin Block Cover +tile.rphcover.tungstenBlock.name=Hollow Tungsten Block Cover +tile.rphcover.wood.name=Hollow Oak Wood Cover +tile.rphcover.wood1.name=Hollow Spruce Wood Cover +tile.rphcover.wood2.name=Hollow Birch Wood Cover +tile.rphcover.wood3.name=Hollow Jungle Wood Cover +tile.rphcover.wool.black.name=Hollow Black Wool Cover +tile.rphcover.wool.blue.name=Hollow Blue Wool Cover +tile.rphcover.wool.brown.name=Hollow Brown Wool Cover +tile.rphcover.wool.cyan.name=Hollow Cyan Wool Cover +tile.rphcover.wool.gray.name=Hollow Gray Wool Cover +tile.rphcover.wool.green.name=Hollow Green Wool Cover +tile.rphcover.wool.lightBlue.name=Hollow Light Blue Wool Cover +tile.rphcover.wool.lime.name=Hollow Lime Wool Cover +tile.rphcover.wool.magenta.name=Hollow Magenta Wool Cover +tile.rphcover.wool.orange.name=Hollow Orange Wool Cover +tile.rphcover.wool.pink.name=Hollow Pink Wool Cover +tile.rphcover.wool.purple.name=Hollow Purple Wool Cover +tile.rphcover.wool.red.name=Hollow Red Wool Cover +tile.rphcover.wool.silver.name=Hollow Light Gray Wool Cover +tile.rphcover.wool.white.name=Hollow White Wool Cover +tile.rphcover.wool.yellow.name=Hollow Yellow Wool Cover + +tile.rphpanel.basalt.name=Hollow Basalt Panel +tile.rphpanel.basaltBrick.name=Hollow Basalt Brick Panel +tile.rphpanel.basaltCircle.name=Hollow Chiseled Basalt Brick Panel +tile.rphpanel.basaltCobble.name=Hollow Basalt Cobblestone Panel +tile.rphpanel.basaltPaver.name=Hollow Basalt Paver Panel +tile.rphpanel.books.name=Hollow Bookshelf Panel +tile.rphpanel.brick.name=Hollow Brick Panel +tile.rphpanel.clay.name=Hollow Clay Panel +tile.rphpanel.cobble.name=Hollow Cobblestone Panel +tile.rphpanel.copperBlock.name=Hollow Copper Block Panel +tile.rphpanel.diamond.name=Hollow Diamond Panel +tile.rphpanel.dirt.name=Hollow Dirt Panel +tile.rphpanel.glass.name=Hollow Glass Panel +tile.rphpanel.gold.name=Hollow Gold Panel +tile.rphpanel.greenSapphireBlock.name=Hollow Green Sapphire Block Panel +tile.rphpanel.iron.name=Hollow Iron Panel +tile.rphpanel.lapis.name=Hollow Lapis Lazuli Panel +tile.rphpanel.marble.name=Hollow Marble Panel +tile.rphpanel.marbleBrick.name=Hollow Marble Brick Panel +tile.rphpanel.moss.name=Hollow Moss Stone Panel +tile.rphpanel.netherbrick.name=Hollow Nether Brick Panel +tile.rphpanel.netherrack.name=Hollow Netherrack Panel +tile.rphpanel.obsidian.name=Hollow Obsidian Panel +tile.rphpanel.planks.name=Hollow Wooden Plank Panel +tile.rphpanel.planks1.name=Hollow Wooden Plank Panel +tile.rphpanel.planks2.name=Hollow Wooden Plank Panel +tile.rphpanel.planks3.name=Hollow Wooden Plank Panel +tile.rphpanel.pumpkin.name=Hollow Pumpkin Panel +tile.rphpanel.rplog.name=Hollow Rubberwood Panel +tile.rphpanel.rubyBlock.name=Hollow Ruby Block Panel +tile.rphpanel.sandstone.name=Hollow Sandstone Panel +tile.rphpanel.sandstone1.name=Hollow Sandstone Panel +tile.rphpanel.sandstone2.name=Hollow Sandstone Panel +tile.rphpanel.sapphireBlock.name=Hollow Sapphire Block Panel +tile.rphpanel.silverBlock.name=Hollow Silver Block Panel +tile.rphpanel.slab.name=Hollow Polished Stone Panel +tile.rphpanel.snow.name=Hollow Snow Panel +tile.rphpanel.soul.name=Hollow Soul Sand Panel +tile.rphpanel.stone.name=Hollow Stone Panel +tile.rphpanel.stonebrick.name=Hollow Stone Brick Panel +tile.rphpanel.stonebrick1.name=Hollow Stone Brick Panel +tile.rphpanel.stonebrick2.name=Hollow Stone Brick Panel +tile.rphpanel.stonebrick3.name=Hollow Stone Brick Panel +tile.rphpanel.tinBlock.name=Hollow Tin Block Panel +tile.rphpanel.tungstenBlock.name=Hollow Tungsten Block Panel +tile.rphpanel.wood.name=Hollow Oak Wood Panel +tile.rphpanel.wood1.name=Hollow Spruce Wood Panel +tile.rphpanel.wood2.name=Hollow Birch Wood Panel +tile.rphpanel.wood3.name=Hollow Jungle Wood Panel +tile.rphpanel.wool.black.name=Hollow Black Wool Panel +tile.rphpanel.wool.blue.name=Hollow Blue Wool Panel +tile.rphpanel.wool.brown.name=Hollow Brown Wool Panel +tile.rphpanel.wool.cyan.name=Hollow Cyan Wool Panel +tile.rphpanel.wool.gray.name=Hollow Gray Wool Panel +tile.rphpanel.wool.green.name=Hollow Green Wool Panel +tile.rphpanel.wool.lightBlue.name=Hollow Light Blue Wool Panel +tile.rphpanel.wool.lime.name=Hollow Lime Wool Panel +tile.rphpanel.wool.magenta.name=Hollow Magenta Wool Panel +tile.rphpanel.wool.orange.name=Hollow Orange Wool Panel +tile.rphpanel.wool.pink.name=Hollow Pink Wool Panel +tile.rphpanel.wool.purple.name=Hollow Purple Wool Panel +tile.rphpanel.wool.red.name=Hollow Red Wool Panel +tile.rphpanel.wool.silver.name=Hollow Light Gray Wool Panel +tile.rphpanel.wool.white.name=Hollow White Wool Panel +tile.rphpanel.wool.yellow.name=Hollow Yellow Wool Panel + +tile.rphslab.basalt.name=Hollow Basalt Slab +tile.rphslab.basaltBrick.name=Hollow Basalt Brick Slab +tile.rphslab.basaltCircle.name=Hollow Chiseled Basalt Brick Slab +tile.rphslab.basaltCobble.name=Hollow Basalt Cobblestone Slab +tile.rphslab.basaltPaver.name=Hollow Basalt Paver Slab +tile.rphslab.books.name=Hollow Bookshelf Slab +tile.rphslab.brick.name=Hollow Brick Slab +tile.rphslab.clay.name=Hollow Clay Slab +tile.rphslab.cobble.name=Hollow Cobblestone Slab +tile.rphslab.copperBlock.name=Hollow Copper Block Slab +tile.rphslab.diamond.name=Hollow Diamond Slab +tile.rphslab.dirt.name=Hollow Dirt Slab +tile.rphslab.glass.name=Hollow Glass Slab +tile.rphslab.gold.name=Hollow Gold Slab +tile.rphslab.greenSapphireBlock.name=Hollow Green Sapphire Block Slab +tile.rphslab.iron.name=Hollow Iron Slab +tile.rphslab.lapis.name=Hollow Lapis Lazuli Slab +tile.rphslab.marble.name=Hollow Marble Slab +tile.rphslab.marbleBrick.name=Hollow Marble Brick Slab +tile.rphslab.moss.name=Hollow Moss Stone Slab +tile.rphslab.netherbrick.name=Hollow Nether Brick Slab +tile.rphslab.netherrack.name=Hollow Netherrack Slab +tile.rphslab.obsidian.name=Hollow Obsidian Slab +tile.rphslab.planks.name=Hollow Wooden Plank Slab +tile.rphslab.planks1.name=Hollow Wooden Plank Slab +tile.rphslab.planks2.name=Hollow Wooden Plank Slab +tile.rphslab.planks3.name=Hollow Wooden Plank Slab +tile.rphslab.pumpkin.name=Hollow Pumpkin Slab +tile.rphslab.rplog.name=Hollow Rubberwood Slab +tile.rphslab.rubyBlock.name=Hollow Ruby Block Slab +tile.rphslab.sandstone.name=Hollow Sandstone Slab +tile.rphslab.sandstone1.name=Hollow Sandstone Slab +tile.rphslab.sandstone2.name=Hollow Sandstone Slab +tile.rphslab.sapphireBlock.name=Hollow Sapphire Block Slab +tile.rphslab.silverBlock.name=Hollow Silver Block Slab +tile.rphslab.slab.name=Hollow Polished Stone Slab +tile.rphslab.snow.name=Hollow Snow Slab +tile.rphslab.soul.name=Hollow Soul Sand Slab +tile.rphslab.stone.name=Hollow Stone Slab +tile.rphslab.stonebrick.name=Hollow Stone Brick Slab +tile.rphslab.stonebrick1.name=Hollow Stone Brick Slab +tile.rphslab.stonebrick2.name=Hollow Stone Brick Slab +tile.rphslab.stonebrick3.name=Hollow Stone Brick Slab +tile.rphslab.tinBlock.name=Hollow Tin Block Slab +tile.rphslab.tungstenBlock.name=Hollow Tungsten Block Slab +tile.rphslab.wood.name=Hollow Oak Wood Slab +tile.rphslab.wood1.name=Hollow Spruce Wood Slab +tile.rphslab.wood2.name=Hollow Birch Wood Slab +tile.rphslab.wood3.name=Hollow Jungle Wood Slab +tile.rphslab.wool.black.name=Hollow Black Wool Slab +tile.rphslab.wool.blue.name=Hollow Blue Wool Slab +tile.rphslab.wool.brown.name=Hollow Brown Wool Slab +tile.rphslab.wool.cyan.name=Hollow Cyan Wool Slab +tile.rphslab.wool.gray.name=Hollow Gray Wool Slab +tile.rphslab.wool.green.name=Hollow Green Wool Slab +tile.rphslab.wool.lightBlue.name=Hollow Light Blue Wool Slab +tile.rphslab.wool.lime.name=Hollow Lime Wool Slab +tile.rphslab.wool.magenta.name=Hollow Magenta Wool Slab +tile.rphslab.wool.orange.name=Hollow Orange Wool Slab +tile.rphslab.wool.pink.name=Hollow Pink Wool Slab +tile.rphslab.wool.purple.name=Hollow Purple Wool Slab +tile.rphslab.wool.red.name=Hollow Red Wool Slab +tile.rphslab.wool.silver.name=Hollow Light Gray Wool Slab +tile.rphslab.wool.white.name=Hollow White Wool Slab +tile.rphslab.wool.yellow.name=Hollow Yellow Wool Slab + +tile.rppanc.basalt.name=Basalt Panel Corner +tile.rppanc.basaltBrick.name=Basalt Brick Panel Corner +tile.rppanc.basaltCircle.name=Chiseled Basalt Brick Panel Corner +tile.rppanc.basaltCobble.name=Basalt Cobblestone Panel Corner +tile.rppanc.basaltPaver.name=Basalt Paver Panel Corner +tile.rppanc.books.name=Bookshelf Panel Corner +tile.rppanc.brick.name=Brick Panel Corner +tile.rppanc.clay.name=Clay Panel Corner +tile.rppanc.cobble.name=Cobblestone Panel Corner +tile.rppanc.copperBlock.name=Copper Block Panel Corner +tile.rppanc.diamond.name=Diamond Panel Corner +tile.rppanc.dirt.name=Dirt Panel Corner +tile.rppanc.glass.name=Glass Panel Corner +tile.rppanc.gold.name=Gold Panel Corner +tile.rppanc.greenSapphireBlock.name=Green Sapphire Block Panel Corner +tile.rppanc.iron.name=Iron Panel Corner +tile.rppanc.lapis.name=Lapis Lazuli Panel Corner +tile.rppanc.marble.name=Marble Panel Corner +tile.rppanc.marbleBrick.name=Marble Brick Panel Corner +tile.rppanc.moss.name=Moss Stone Panel Corner +tile.rppanc.netherbrick.name=Nether Brick Panel Corner +tile.rppanc.netherrack.name=Netherrack Panel Corner +tile.rppanc.obsidian.name=Obsidian Panel Corner +tile.rppanc.planks.name=Wooden Plank Panel Corner +tile.rppanc.planks1.name=Wooden Plank Panel Corner +tile.rppanc.planks2.name=Wooden Plank Panel Corner +tile.rppanc.planks3.name=Wooden Plank Panel Corner +tile.rppanc.pumpkin.name=Pumpkin Panel Corner +tile.rppanc.rplog.name=Rubberwood Panel Corner +tile.rppanc.rubyBlock.name=Ruby Block Panel Corner +tile.rppanc.sandstone.name=Sandstone Panel Corner +tile.rppanc.sandstone1.name=Sandstone Panel Corner +tile.rppanc.sandstone2.name=Sandstone Panel Corner +tile.rppanc.sapphireBlock.name=Sapphire Block Panel Corner +tile.rppanc.silverBlock.name=Silver Block Panel Corner +tile.rppanc.slab.name=Polished Stone Panel Corner +tile.rppanc.snow.name=Snow Panel Corner +tile.rppanc.soul.name=Soul Sand Panel Corner +tile.rppanc.stone.name=Stone Panel Corner +tile.rppanc.stonebrick.name=Stone Brick Panel Corner +tile.rppanc.stonebrick1.name=Stone Brick Panel Corner +tile.rppanc.stonebrick2.name=Stone Brick Panel Corner +tile.rppanc.stonebrick3.name=Stone Brick Panel Corner +tile.rppanc.tinBlock.name=Tin Block Panel Corner +tile.rppanc.tungstenBlock.name=Tungsten Block Panel Corner +tile.rppanc.wood.name=Oak Wood Panel Corner +tile.rppanc.wood1.name=Spruce Wood Panel Corner +tile.rppanc.wood2.name=Birch Wood Panel Corner +tile.rppanc.wood3.name=Jungle Wood Panel Corner +tile.rppanc.wool.black.name=Black Wool Panel Corner +tile.rppanc.wool.blue.name=Blue Wool Panel Corner +tile.rppanc.wool.brown.name=Brown Wool Panel Corner +tile.rppanc.wool.cyan.name=Cyan Wool Panel Corner +tile.rppanc.wool.gray.name=Gray Wool Panel Corner +tile.rppanc.wool.green.name=Green Wool Panel Corner +tile.rppanc.wool.lightBlue.name=Light Blue Wool Panel Corner +tile.rppanc.wool.lime.name=Lime Wool Panel Corner +tile.rppanc.wool.magenta.name=Magenta Wool Panel Corner +tile.rppanc.wool.orange.name=Orange Wool Panel Corner +tile.rppanc.wool.pink.name=Pink Wool Panel Corner +tile.rppanc.wool.purple.name=Purple Wool Panel Corner +tile.rppanc.wool.red.name=Red Wool Panel Corner +tile.rppanc.wool.silver.name=Light Gray Wool Panel Corner +tile.rppanc.wool.white.name=White Wool Panel Corner +tile.rppanc.wool.yellow.name=Yellow Wool Panel Corner + +tile.rppanel.basalt.name=Basalt Panel +tile.rppanel.basaltBrick.name=Basalt Brick Panel +tile.rppanel.basaltCircle.name=Chiseled Basalt Brick Panel +tile.rppanel.basaltCobble.name=Basalt Cobblestone Panel +tile.rppanel.basaltPaver.name=Basalt Paver Panel +tile.rppanel.books.name=Bookshelf Panel +tile.rppanel.brick.name=Brick Panel +tile.rppanel.clay.name=Clay Panel +tile.rppanel.cobble.name=Cobblestone Panel +tile.rppanel.copperBlock.name=Copper Block Panel +tile.rppanel.diamond.name=Diamond Panel +tile.rppanel.dirt.name=Dirt Panel +tile.rppanel.glass.name=Glass Panel +tile.rppanel.gold.name=Gold Panel +tile.rppanel.greenSapphireBlock.name=Green Sapphire Block Panel +tile.rppanel.iron.name=Iron Panel +tile.rppanel.lapis.name=Lapis Lazuli Panel +tile.rppanel.marble.name=Marble Panel +tile.rppanel.marbleBrick.name=Marble Brick Panel +tile.rppanel.moss.name=Moss Stone Panel +tile.rppanel.netherbrick.name=Nether Brick Panel +tile.rppanel.netherrack.name=Netherrack Panel +tile.rppanel.obsidian.name=Obsidian Panel +tile.rppanel.planks.name=Wooden Plank Panel +tile.rppanel.planks1.name=Wooden Plank Panel +tile.rppanel.planks2.name=Wooden Plank Panel +tile.rppanel.planks3.name=Wooden Plank Panel +tile.rppanel.pumpkin.name=Pumpkin Panel +tile.rppanel.rplog.name=Rubberwood Panel +tile.rppanel.rubyBlock.name=Ruby Block Panel +tile.rppanel.sandstone.name=Sandstone Panel +tile.rppanel.sandstone1.name=Sandstone Panel +tile.rppanel.sandstone2.name=Sandstone Panel +tile.rppanel.sapphireBlock.name=Sapphire Block Panel +tile.rppanel.silverBlock.name=Silver Block Panel +tile.rppanel.slab.name=Polished Stone Panel +tile.rppanel.snow.name=Snow Panel +tile.rppanel.soul.name=Soul Sand Panel +tile.rppanel.stone.name=Stone Panel +tile.rppanel.stonebrick.name=Stone Brick Panel +tile.rppanel.stonebrick1.name=Stone Brick Panel +tile.rppanel.stonebrick2.name=Stone Brick Panel +tile.rppanel.stonebrick3.name=Stone Brick Panel +tile.rppanel.tinBlock.name=Tin Block Panel +tile.rppanel.tungstenBlock.name=Tungsten Block Panel +tile.rppanel.wood.name=Oak Wood Panel +tile.rppanel.wood1.name=Spruce Wood Panel +tile.rppanel.wood2.name=Birch Wood Panel +tile.rppanel.wood3.name=Jungle Wood Panel +tile.rppanel.wool.black.name=Black Wool Panel +tile.rppanel.wool.blue.name=Blue Wool Panel +tile.rppanel.wool.brown.name=Brown Wool Panel +tile.rppanel.wool.cyan.name=Cyan Wool Panel +tile.rppanel.wool.gray.name=Gray Wool Panel +tile.rppanel.wool.green.name=Green Wool Panel +tile.rppanel.wool.lightBlue.name=Light Blue Wool Panel +tile.rppanel.wool.lime.name=Lime Wool Panel +tile.rppanel.wool.magenta.name=Magenta Wool Panel +tile.rppanel.wool.orange.name=Orange Wool Panel +tile.rppanel.wool.pink.name=Pink Wool Panel +tile.rppanel.wool.purple.name=Purple Wool Panel +tile.rppanel.wool.red.name=Red Wool Panel +tile.rppanel.wool.silver.name=Light Gray Wool Panel +tile.rppanel.wool.white.name=White Wool Panel +tile.rppanel.wool.yellow.name=Yellow Wool Panel + +tile.rppans.basalt.name=Basalt Panel Strip +tile.rppans.basaltBrick.name=Basalt Brick Panel Strip +tile.rppans.basaltCircle.name=Chiseled Basalt Brick Panel Strip +tile.rppans.basaltCobble.name=Basalt Cobblestone Panel Strip +tile.rppans.basaltPaver.name=Basalt Paver Panel Strip +tile.rppans.books.name=Bookshelf Panel Strip +tile.rppans.brick.name=Brick Panel Strip +tile.rppans.clay.name=Clay Panel Strip +tile.rppans.cobble.name=Cobblestone Panel Strip +tile.rppans.copperBlock.name=Copper Block Panel Strip +tile.rppans.diamond.name=Diamond Panel Strip +tile.rppans.dirt.name=Dirt Panel Strip +tile.rppans.glass.name=Glass Panel Strip +tile.rppans.gold.name=Gold Panel Strip +tile.rppans.greenSapphireBlock.name=Green Sapphire Block Panel Strip +tile.rppans.iron.name=Iron Panel Strip +tile.rppans.lapis.name=Lapis Lazuli Panel Strip +tile.rppans.marble.name=Marble Panel Strip +tile.rppans.marbleBrick.name=Marble Brick Panel Strip +tile.rppans.moss.name=Moss Stone Panel Strip +tile.rppans.netherbrick.name=Nether Brick Panel Strip +tile.rppans.netherrack.name=Netherrack Panel Strip +tile.rppans.obsidian.name=Obsidian Panel Strip +tile.rppans.planks.name=Wooden Plank Panel Strip +tile.rppans.planks1.name=Wooden Plank Panel Strip +tile.rppans.planks2.name=Wooden Plank Panel Strip +tile.rppans.planks3.name=Wooden Plank Panel Strip +tile.rppans.pumpkin.name=Pumpkin Panel Strip +tile.rppans.rplog.name=Rubberwood Panel Strip +tile.rppans.rubyBlock.name=Ruby Block Panel Strip +tile.rppans.sandstone.name=Sandstone Panel Strip +tile.rppans.sandstone1.name=Sandstone Panel Strip +tile.rppans.sandstone2.name=Sandstone Panel Strip +tile.rppans.sapphireBlock.name=Sapphire Block Panel Strip +tile.rppans.silverBlock.name=Silver Block Panel Strip +tile.rppans.slab.name=Polished Stone Panel Strip +tile.rppans.snow.name=Snow Panel Strip +tile.rppans.soul.name=Soul Sand Panel Strip +tile.rppans.stone.name=Stone Panel Strip +tile.rppans.stonebrick.name=Stone Brick Panel Strip +tile.rppans.stonebrick1.name=Stone Brick Panel Strip +tile.rppans.stonebrick2.name=Stone Brick Panel Strip +tile.rppans.stonebrick3.name=Stone Brick Panel Strip +tile.rppans.tungstenBlock.name=Tungsten Block Panel Strip +tile.rppans.wood.name=Oak Wood Panel Strip +tile.rppans.wood1.name=Spruce Wood Panel Strip +tile.rppans.wood2.name=Birch Wood Panel Strip +tile.rppans.wood3.name=Jungle Wood Panel Strip +tile.rppans.wool.black.name=Black Wool Panel Strip +tile.rppans.wool.blue.name=Blue Wool Panel Strip +tile.rppans.wool.brown.name=Brown Wool Panel Strip +tile.rppans.wool.cyan.name=Cyan Wool Panel Strip +tile.rppans.wool.gray.name=Gray Wool Panel Strip +tile.rppans.wool.green.name=Green Wool Panel Strip +tile.rppans.wool.lightBlue.name=Light Blue Wool Panel Strip +tile.rppans.wool.lime.name=Lime Wool Panel Strip +tile.rppans.wool.magenta.name=Magenta Wool Panel Strip +tile.rppans.wool.orange.name=Orange Wool Panel Strip +tile.rppans.wool.pink.name=Pink Wool Panel Strip +tile.rppans.wool.purple.name=Purple Wool Panel Strip +tile.rppans.wool.red.name=Red Wool Panel Strip +tile.rppans.wool.silver.name=Light Gray Wool Panel Strip +tile.rppans.wool.white.name=White Wool Panel Strip +tile.rppans.wool.yellow.name=Yellow Wool Panel Strip + +tile.rppole1.basalt.name=Basalt Post +tile.rppole1.basaltBrick.name=Basalt Brick Post +tile.rppole1.basaltCircle.name=Chiseled Basalt Brick Post +tile.rppole1.basaltCobble.name=Basalt Cobblestone Post +tile.rppole1.basaltPaver.name=Basalt Paver Post +tile.rppole1.books.name=Bookshelf Post +tile.rppole1.brick.name=Brick Post +tile.rppole1.clay.name=Clay Post +tile.rppole1.cobble.name=Cobblestone Post +tile.rppole1.copperBlock.name=Copper Block Post +tile.rppole1.diamond.name=Diamond Post +tile.rppole1.dirt.name=Dirt Post +tile.rppole1.glass.name=Glass Post +tile.rppole1.gold.name=Gold Post +tile.rppole1.greenSapphireBlock.name=Green Sapphire Block Post +tile.rppole1.iron.name=Iron Post +tile.rppole1.lapis.name=Lapis Lazuli Post +tile.rppole1.marble.name=Marble Post +tile.rppole1.marbleBrick.name=Marble Brick Post +tile.rppole1.moss.name=Moss Stone Post +tile.rppole1.netherbrick.name=Nether Brick Post +tile.rppole1.netherrack.name=Netherrack Post +tile.rppole1.obsidian.name=Obsidian Post +tile.rppole1.planks.name=Wooden Plank Post +tile.rppole1.planks1.name=Wooden Plank Post +tile.rppole1.planks2.name=Wooden Plank Post +tile.rppole1.planks3.name=Wooden Plank Post +tile.rppole1.pumpkin.name=Pumpkin Post +tile.rppole1.rplog.name=Rubberwood Post +tile.rppole1.rubyBlock.name=Ruby Block Post +tile.rppole1.sandstone.name=Sandstone Post +tile.rppole1.sandstone1.name=Sandstone Post +tile.rppole1.sandstone2.name=Sandstone Post +tile.rppole1.sapphireBlock.name=Sapphire Block Post +tile.rppole1.silverBlock.name=Silver Block Post +tile.rppole1.slab.name=Polished Stone Post +tile.rppole1.snow.name=Snow Post +tile.rppole1.soul.name=Soul Sand Post +tile.rppole1.stone.name=Stone Post +tile.rppole1.stonebrick.name=Stone Brick Post +tile.rppole1.stonebrick1.name=Stone Brick Post +tile.rppole1.stonebrick2.name=Stone Brick Post +tile.rppole1.stonebrick3.name=Stone Brick Post +tile.rppole1.tungstenBlock.name=Tungsten Block Post +tile.rppole1.wood.name=Oak Wood Post +tile.rppole1.wood1.name=Spruce Wood Post +tile.rppole1.wood2.name=Birch Wood Post +tile.rppole1.wood3.name=Jungle Wood Post +tile.rppole1.wool.black.name=Black Wool Post +tile.rppole1.wool.blue.name=Blue Wool Post +tile.rppole1.wool.brown.name=Brown Wool Post +tile.rppole1.wool.cyan.name=Cyan Wool Post +tile.rppole1.wool.gray.name=Gray Wool Post +tile.rppole1.wool.green.name=Green Wool Post +tile.rppole1.wool.lightBlue.name=Light Blue Wool Post +tile.rppole1.wool.lime.name=Lime Wool Post +tile.rppole1.wool.magenta.name=Magenta Wool Post +tile.rppole1.wool.orange.name=Orange Wool Post +tile.rppole1.wool.pink.name=Pink Wool Post +tile.rppole1.wool.purple.name=Purple Wool Post +tile.rppole1.wool.red.name=Red Wool Post +tile.rppole1.wool.silver.name=Light Gray Wool Post +tile.rppole1.wool.white.name=White Wool Post +tile.rppole1.wool.yellow.name=Yellow Wool Post + +tile.rppole2.basalt.name=Basalt Pillar +tile.rppole2.basaltBrick.name=Basalt Brick Pillar +tile.rppole2.basaltCircle.name=Chiseled Basalt Brick Pillar +tile.rppole2.basaltCobble.name=Basalt Cobblestone Pillar +tile.rppole2.basaltPaver.name=Basalt Paver Pillar +tile.rppole2.books.name=Bookshelf Pillar +tile.rppole2.brick.name=Brick Pillar +tile.rppole2.clay.name=Clay Pillar +tile.rppole2.cobble.name=Cobblestone Pillar +tile.rppole2.copperBlock.name=Copper Block Pillar +tile.rppole2.diamond.name=Diamond Pillar +tile.rppole2.dirt.name=Dirt Pillar +tile.rppole2.glass.name=Glass Pillar +tile.rppole2.gold.name=Gold Pillar +tile.rppole2.greenSapphireBlock.name=Green Sapphire Block Pillar +tile.rppole2.iron.name=Iron Pillar +tile.rppole2.lapis.name=Lapis Lazuli Pillar +tile.rppole2.marble.name=Marble Pillar +tile.rppole2.marbleBrick.name=Marble Brick Pillar +tile.rppole2.moss.name=Moss Stone Pillar +tile.rppole2.netherbrick.name=Nether Brick Pillar +tile.rppole2.netherrack.name=Netherrack Pillar +tile.rppole2.obsidian.name=Obsidian Pillar +tile.rppole2.planks.name=Wooden Plank Pillar +tile.rppole2.planks1.name=Wooden Plank Pillar +tile.rppole2.planks2.name=Wooden Plank Pillar +tile.rppole2.planks3.name=Wooden Plank Pillar +tile.rppole2.pumpkin.name=Pumpkin Pillar +tile.rppole2.rplog.name=Rubberwood Pillar +tile.rppole2.rubyBlock.name=Ruby Block Pillar +tile.rppole2.sandstone.name=Sandstone Pillar +tile.rppole2.sandstone1.name=Sandstone Pillar +tile.rppole2.sandstone2.name=Sandstone Pillar +tile.rppole2.sapphireBlock.name=Sapphire Block Pillar +tile.rppole2.silverBlock.name=Silver Block Pillar +tile.rppole2.slab.name=Polished Stone Pillar +tile.rppole2.snow.name=Snow Pillar +tile.rppole2.soul.name=Soul Sand Pillar +tile.rppole2.stone.name=Stone Pillar +tile.rppole2.stonebrick.name=Stone Brick Pillar +tile.rppole2.stonebrick1.name=Stone Brick Pillar +tile.rppole2.stonebrick2.name=Stone Brick Pillar +tile.rppole2.stonebrick3.name=Stone Brick Pillar +tile.rppole2.tinBlock.name=Tin Block Pillar +tile.rppole2.tungstenBlock.name=Tungsten Block Pillar +tile.rppole2.wood.name=Oak Wood Pillar +tile.rppole2.wood1.name=Spruce Wood Pillar +tile.rppole2.wood2.name=Birch Wood Pillar +tile.rppole2.wood3.name=Jungle Wood Pillar +tile.rppole2.wool.black.name=Black Wool Pillar +tile.rppole2.wool.blue.name=Blue Wool Pillar +tile.rppole2.wool.brown.name=Brown Wool Pillar +tile.rppole2.wool.cyan.name=Cyan Wool Pillar +tile.rppole2.wool.gray.name=Gray Wool Pillar +tile.rppole2.wool.green.name=Green Wool Pillar +tile.rppole2.wool.lightBlue.name=Light Blue Wool Pillar +tile.rppole2.wool.lime.name=Lime Wool Pillar +tile.rppole2.wool.magenta.name=Magenta Wool Pillar +tile.rppole2.wool.orange.name=Orange Wool Pillar +tile.rppole2.wool.pink.name=Pink Wool Pillar +tile.rppole2.wool.purple.name=Purple Wool Pillar +tile.rppole2.wool.red.name=Red Wool Pillar +tile.rppole2.wool.silver.name=Light Gray Wool Pillar +tile.rppole2.wool.white.name=White Wool Pillar +tile.rppole2.wool.yellow.name=Yellow Wool Pillar + +tile.rppole3.basalt.name=Basalt Column +tile.rppole3.basaltBrick.name=Basalt Brick Column +tile.rppole3.basaltCircle.name=Chiseled Basalt Brick Column +tile.rppole3.basaltCobble.name=Basalt Cobblestone Column +tile.rppole3.basaltPaver.name=Basalt Paver Column +tile.rppole3.books.name=Bookshelf Column +tile.rppole3.brick.name=Brick Column +tile.rppole3.clay.name=Clay Column +tile.rppole3.cobble.name=Cobblestone Column +tile.rppole3.copperBlock.name=Copper Block Column +tile.rppole3.diamond.name=Diamond Column +tile.rppole3.dirt.name=Dirt Column +tile.rppole3.glass.name=Glass Column +tile.rppole3.gold.name=Gold Column +tile.rppole3.greenSapphireBlock.name=Green Sapphire Block Column +tile.rppole3.iron.name=Iron Column +tile.rppole3.lapis.name=Lapis Lazuli Column +tile.rppole3.marble.name=Marble Column +tile.rppole3.marbleBrick.name=Marble Brick Column +tile.rppole3.moss.name=Moss Stone Column +tile.rppole3.netherbrick.name=Nether Brick Column +tile.rppole3.netherrack.name=Netherrack Column +tile.rppole3.obsidian.name=Obsidian Column +tile.rppole3.planks.name=Wooden Plank Column +tile.rppole3.planks1.name=Wooden Plank Column +tile.rppole3.planks2.name=Wooden Plank Column +tile.rppole3.planks3.name=Wooden Plank Column +tile.rppole3.pumpkin.name=Pumpkin Column +tile.rppole3.rplog.name=Rubberwood Column +tile.rppole3.rubyBlock.name=Ruby Block Column +tile.rppole3.sandstone.name=Sandstone Column +tile.rppole3.sandstone1.name=Sandstone Column +tile.rppole3.sandstone2.name=Sandstone Column +tile.rppole3.sapphireBlock.name=Sapphire Block Column +tile.rppole3.silverBlock.name=Silver Block Column +tile.rppole3.slab.name=Polished Stone Column +tile.rppole3.snow.name=Snow Column +tile.rppole3.soul.name=Soul Sand Column +tile.rppole3.stone.name=Stone Column +tile.rppole3.stonebrick.name=Stone Brick Column +tile.rppole3.stonebrick1.name=Stone Brick Column +tile.rppole3.stonebrick2.name=Stone Brick Column +tile.rppole3.stonebrick3.name=Stone Brick Column +tile.rppole3.tinBlock.name=Tin Block Column +tile.rppole3.tungstenBlock.name=Tungsten Block Column +tile.rppole3.wood.name=Oak Wood Column +tile.rppole3.wood1.name=Spruce Wood Column +tile.rppole3.wood2.name=Birch Wood Column +tile.rppole3.wood3.name=Jungle Wood Column +tile.rppole3.wool.black.name=Black Wool Column +tile.rppole3.wool.blue.name=Blue Wool Column +tile.rppole3.wool.brown.name=Brown Wool Column +tile.rppole3.wool.cyan.name=Cyan Wool Column +tile.rppole3.wool.gray.name=Gray Wool Column +tile.rppole3.wool.green.name=Green Wool Column +tile.rppole3.wool.lightBlue.name=Light Blue Wool Column +tile.rppole3.wool.lime.name=Lime Wool Column +tile.rppole3.wool.magenta.name=Magenta Wool Column +tile.rppole3.wool.orange.name=Orange Wool Column +tile.rppole3.wool.pink.name=Pink Wool Column +tile.rppole3.wool.purple.name=Purple Wool Column +tile.rppole3.wool.red.name=Red Wool Column +tile.rppole3.wool.silver.name=Light Gray Wool Column +tile.rppole3.wool.white.name=White Wool Column +tile.rppole3.wool.yellow.name=Yellow Wool Column + +tile.rpslab.basalt.name=Basalt Slab +tile.rpslab.basaltBrick.name=Basalt Brick Slab +tile.rpslab.basaltCircle.name=Chiseled Basalt Brick Slab +tile.rpslab.basaltCobble.name=Basalt Cobblestone Slab +tile.rpslab.basaltPaver.name=Basalt Paver Slab +tile.rpslab.books.name=Bookshelf Slab +tile.rpslab.brick.name=Brick Slab +tile.rpslab.clay.name=Clay Slab +tile.rpslab.cobble.name=Cobblestone Slab +tile.rpslab.copperBlock.name=Copper Block Slab +tile.rpslab.diamond.name=Diamond Slab +tile.rpslab.dirt.name=Dirt Slab +tile.rpslab.glass.name=Glass Slab +tile.rpslab.gold.name=Gold Slab +tile.rpslab.greenSapphireBlock.name=Green Sapphire Block Slab +tile.rpslab.iron.name=Iron Slab +tile.rpslab.lapis.name=Lapis Lazuli Slab +tile.rpslab.marble.name=Marble Slab +tile.rpslab.marbleBrick.name=Marble Brick Slab +tile.rpslab.moss.name=Moss Stone Slab +tile.rpslab.netherbrick.name=Nether Brick Slab +tile.rpslab.netherrack.name=Netherrack Slab +tile.rpslab.obsidian.name=Obsidian Slab +tile.rpslab.planks.name=Wooden Plank Slab +tile.rpslab.planks1.name=Wooden Plank Slab +tile.rpslab.planks2.name=Wooden Plank Slab +tile.rpslab.planks3.name=Wooden Plank Slab +tile.rpslab.pumpkin.name=Pumpkin Slab +tile.rpslab.rplog.name=Rubberwood Slab +tile.rpslab.rubyBlock.name=Ruby Block Slab +tile.rpslab.sandstone.name=Sandstone Slab +tile.rpslab.sandstone1.name=Sandstone Slab +tile.rpslab.sandstone2.name=Sandstone Slab +tile.rpslab.sapphireBlock.name=Sapphire Block Slab +tile.rpslab.silverBlock.name=Silver Block Slab +tile.rpslab.slab.name=Polished Stone Slab +tile.rpslab.snow.name=Snow Slab +tile.rpslab.soul.name=Soul Sand Slab +tile.rpslab.stone.name=Stone Slab +tile.rpslab.stonebrick.name=Stone Brick Slab +tile.rpslab.stonebrick1.name=Stone Brick Slab +tile.rpslab.stonebrick2.name=Stone Brick Slab +tile.rpslab.stonebrick3.name=Stone Brick Slab +tile.rpslab.tinBlock.name=Tin Block Slab +tile.rpslab.tungstenBlock.name=Tungsten Block Slab +tile.rpslab.wood.name=Oak Wood Slab +tile.rpslab.wood1.name=Spruce Wood Slab +tile.rpslab.wood2.name=Birch Wood Slab +tile.rpslab.wood3.name=Jungle Wood Slab +tile.rpslab.wool.black.name=Black Wool Slab +tile.rpslab.wool.blue.name=Blue Wool Slab +tile.rpslab.wool.brown.name=Brown Wool Slab +tile.rpslab.wool.cyan.name=Cyan Wool Slab +tile.rpslab.wool.gray.name=Gray Wool Slab +tile.rpslab.wool.green.name=Green Wool Slab +tile.rpslab.wool.lightBlue.name=Light Blue Wool Slab +tile.rpslab.wool.lime.name=Lime Wool Slab +tile.rpslab.wool.magenta.name=Magenta Wool Slab +tile.rpslab.wool.orange.name=Orange Wool Slab +tile.rpslab.wool.pink.name=Pink Wool Slab +tile.rpslab.wool.purple.name=Purple Wool Slab +tile.rpslab.wool.red.name=Red Wool Slab +tile.rpslab.wool.silver.name=Light Gray Wool Slab +tile.rpslab.wool.white.name=White Wool Slab +tile.rpslab.wool.yellow.name=Yellow Wool Slab + +tile.rpslabc.basalt.name=Basalt Slab Corner +tile.rpslabc.basaltBrick.name=Basalt Brick Slab Corner +tile.rpslabc.basaltCircle.name=Chiseled Basalt Brick Slab Corner +tile.rpslabc.basaltCobble.name=Basalt Cobblestone Slab Corner +tile.rpslabc.basaltPaver.name=Basalt Paver Slab Corner +tile.rpslabc.books.name=Bookshelf Slab Corner +tile.rpslabc.brick.name=Brick Slab Corner +tile.rpslabc.clay.name=Clay Slab Corner +tile.rpslabc.cobble.name=Cobblestone Slab Corner +tile.rpslabc.copperBlock.name=Copper Block Slab Corner +tile.rpslabc.diamond.name=Diamond Slab Corner +tile.rpslabc.dirt.name=Dirt Slab Corner +tile.rpslabc.glass.name=Glass Slab Corner +tile.rpslabc.gold.name=Gold Slab Corner +tile.rpslabc.greenSapphireBlock.name=Green Sapphire Block Slab Corner +tile.rpslabc.iron.name=Iron Slab Corner +tile.rpslabc.lapis.name=Lapis Lazuli Slab Corner +tile.rpslabc.marble.name=Marble Slab Corner +tile.rpslabc.marbleBrick.name=Marble Brick Slab Corner +tile.rpslabc.moss.name=Moss Stone Slab Corner +tile.rpslabc.netherbrick.name=Nether Brick Slab Corner +tile.rpslabc.netherrack.name=Netherrack Slab Corner +tile.rpslabc.obsidian.name=Obsidian Slab Corner +tile.rpslabc.planks.name=Wooden Plank Slab Corner +tile.rpslabc.planks1.name=Wooden Plank Slab Corner +tile.rpslabc.planks2.name=Wooden Plank Slab Corner +tile.rpslabc.planks3.name=Wooden Plank Slab Corner +tile.rpslabc.pumpkin.name=Pumpkin Slab Corner +tile.rpslabc.rplog.name=Rubberwood Slab Corner +tile.rpslabc.rubyBlock.name=Ruby Block Slab Corner +tile.rpslabc.sandstone.name=Sandstone Slab Corner +tile.rpslabc.sandstone1.name=Sandstone Slab Corner +tile.rpslabc.sandstone2.name=Sandstone Slab Corner +tile.rpslabc.sapphireBlock.name=Sapphire Block Slab Corner +tile.rpslabc.silverBlock.name=Silver Block Slab Corner +tile.rpslabc.slab.name=Polished Stone Slab Corner +tile.rpslabc.snow.name=Snow Slab Corner +tile.rpslabc.soul.name=Soul Sand Slab Corner +tile.rpslabc.stone.name=Stone Slab Corner +tile.rpslabc.stonebrick.name=Stone Brick Slab Corner +tile.rpslabc.stonebrick1.name=Stone Brick Slab Corner +tile.rpslabc.stonebrick2.name=Stone Brick Slab Corner +tile.rpslabc.stonebrick3.name=Stone Brick Slab Corner +tile.rpslabc.tinBlock.name=Tin Block Slab Corner +tile.rpslabc.tungstenBlock.name=Tungsten Block Slab Corner +tile.rpslabc.wood.name=Oak Wood Slab Corner +tile.rpslabc.wood1.name=Spruce Wood Slab Corner +tile.rpslabc.wood2.name=Birch Wood Slab Corner +tile.rpslabc.wood3.name=Jungle Wood Slab Corner +tile.rpslabc.wool.black.name=Black Wool Slab Corner +tile.rpslabc.wool.blue.name=Blue Wool Slab Corner +tile.rpslabc.wool.brown.name=Brown Wool Slab Corner +tile.rpslabc.wool.cyan.name=Cyan Wool Slab Corner +tile.rpslabc.wool.gray.name=Gray Wool Slab Corner +tile.rpslabc.wool.green.name=Green Wool Slab Corner +tile.rpslabc.wool.lightBlue.name=Light Blue Wool Slab Corner +tile.rpslabc.wool.lime.name=Lime Wool Slab Corner +tile.rpslabc.wool.magenta.name=Magenta Wool Slab Corner +tile.rpslabc.wool.orange.name=Orange Wool Slab Corner +tile.rpslabc.wool.pink.name=Pink Wool Slab Corner +tile.rpslabc.wool.purple.name=Purple Wool Slab Corner +tile.rpslabc.wool.red.name=Red Wool Slab Corner +tile.rpslabc.wool.silver.name=Light Gray Wool Slab Corner +tile.rpslabc.wool.white.name=White Wool Slab Corner +tile.rpslabc.wool.yellow.name=Yellow Wool Slab Corner + +tile.rpslabs.basalt.name=Basalt Slab Strip +tile.rpslabs.basaltBrick.name=Basalt Brick Slab Strip +tile.rpslabs.basaltCircle.name=Chiseled Basalt Brick Slab Strip +tile.rpslabs.basaltCobble.name=Basalt Cobblestone Slab Strip +tile.rpslabs.basaltPaver.name=Basalt Paver Slab Strip +tile.rpslabs.books.name=Bookshelf Slab Strip +tile.rpslabs.brick.name=Brick Slab Strip +tile.rpslabs.clay.name=Clay Slab Strip +tile.rpslabs.cobble.name=Cobblestone Slab Strip +tile.rpslabs.copperBlock.name=Copper Block Slab Strip +tile.rpslabs.diamond.name=Diamond Slab Strip +tile.rpslabs.dirt.name=Dirt Slab Strip +tile.rpslabs.glass.name=Glass Slab Strip +tile.rpslabs.gold.name=Gold Slab Strip +tile.rpslabs.greenSapphireBlock.name=Green Sapphire Block Slab Strip +tile.rpslabs.iron.name=Iron Slab Strip +tile.rpslabs.lapis.name=Lapis Lazuli Slab Strip +tile.rpslabs.marble.name=Marble Slab Strip +tile.rpslabs.marbleBrick.name=Marble Brick Slab Strip +tile.rpslabs.moss.name=Moss Stone Slab Strip +tile.rpslabs.netherbrick.name=Nether Brick Slab Strip +tile.rpslabs.netherrack.name=Netherrack Slab Strip +tile.rpslabs.obsidian.name=Obsidian Slab Strip +tile.rpslabs.planks.name=Wooden Plank Slab Strip +tile.rpslabs.planks1.name=Wooden Plank Slab Strip +tile.rpslabs.planks2.name=Wooden Plank Slab Strip +tile.rpslabs.planks3.name=Wooden Plank Slab Strip +tile.rpslabs.pumpkin.name=Pumpkin Slab Strip +tile.rpslabs.rplog.name=Rubberwood Slab Strip +tile.rpslabs.rubyBlock.name=Ruby Block Slab Strip +tile.rpslabs.sandstone.name=Sandstone Slab Strip +tile.rpslabs.sandstone1.name=Sandstone Slab Strip +tile.rpslabs.sandstone2.name=Sandstone Slab Strip +tile.rpslabs.sapphireBlock.name=Sapphire Block Slab Strip +tile.rpslabs.silverBlock.name=Silver Block Slab Strip +tile.rpslabs.slab.name=Polished Stone Slab Strip +tile.rpslabs.snow.name=Snow Slab Strip +tile.rpslabs.soul.name=Soul Sand Slab Strip +tile.rpslabs.stone.name=Stone Slab Strip +tile.rpslabs.stonebrick.name=Stone Brick Slab Strip +tile.rpslabs.stonebrick1.name=Stone Brick Slab Strip +tile.rpslabs.stonebrick2.name=Stone Brick Slab Strip +tile.rpslabs.stonebrick3.name=Stone Brick Slab Strip +tile.rpslabs.tinBlock.name=Tin Block Slab Strip +tile.rpslabs.tungstenBlock.name=Tungsten Block Slab Strip +tile.rpslabs.wood.name=Oak Wood Slab Strip +tile.rpslabs.wood1.name=Spruce Wood Slab Strip +tile.rpslabs.wood2.name=Birch Wood Slab Strip +tile.rpslabs.wood3.name=Jungle Wood Slab Strip +tile.rpslabs.wool.black.name=Black Wool Slab Strip +tile.rpslabs.wool.blue.name=Blue Wool Slab Strip +tile.rpslabs.wool.brown.name=Brown Wool Slab Strip +tile.rpslabs.wool.cyan.name=Cyan Wool Slab Strip +tile.rpslabs.wool.gray.name=Gray Wool Slab Strip +tile.rpslabs.wool.green.name=Green Wool Slab Strip +tile.rpslabs.wool.lightBlue.name=Light Blue Wool Slab Strip +tile.rpslabs.wool.lime.name=Lime Wool Slab Strip +tile.rpslabs.wool.magenta.name=Magenta Wool Slab Strip +tile.rpslabs.wool.orange.name=Orange Wool Slab Strip +tile.rpslabs.wool.pink.name=Pink Wool Slab Strip +tile.rpslabs.wool.purple.name=Purple Wool Slab Strip +tile.rpslabs.wool.red.name=Red Wool Slab Strip +tile.rpslabs.wool.silver.name=Light Gray Wool Slab Strip +tile.rpslabs.wool.white.name=White Wool Slab Strip +tile.rpslabs.wool.yellow.name=Yellow Wool Slab Strip \ No newline at end of file diff --git a/src/main/resources/assets/rpcore/lang/ru_RU.lang b/src/main/resources/assets/rpcore/lang/ru_RU.lang new file mode 100644 index 0000000..7e9803e --- /dev/null +++ b/src/main/resources/assets/rpcore/lang/ru_RU.lang @@ -0,0 +1,2059 @@ +itemGroup.RPMicroblocks=RedPower - Микроблоки + +achievement.rpMakeSaw.desc=Сделать алмазную ножовку +achievement.rpMakeSaw=Это - ломтик, это - кусочек\! + +enchantment.damage.disjunction=Разобщение +enchantment.damage.vorpal=Вострота + +item.handsawDiamond.name=Алмазная ножовка +item.handsawGreenSapphire.name=Ножовка из зеленого сапфира +item.handsawIron.name=Железная ножовка +item.handsawRuby.name=Рубиновая ножовка +item.handsawSapphire.name=Сапфировая ножовка + +tile.rpcov3.basalt.name=Тройное покрытие из базальта +tile.rpcov3.basaltBrick.name=Тройное покрытие из базальтового кирпича +tile.rpcov3.basaltCircle.name=Тройное покрытие из резного базальтового кирпича +tile.rpcov3.basaltCobble.name=Тройное покрытие из базальтового булыжника +tile.rpcov3.basaltPaver.name=Тройное покрытие из базальтового асфальта +tile.rpcov3.books.name=Тройное покрытие из книжной полки +tile.rpcov3.brick.name=Тройное покрытие из кирпича +tile.rpcov3.clay.name=Тройное покрытие из глины +tile.rpcov3.cobble.name=Тройное покрытие из булыжника +tile.rpcov3.copperBlock.name=Тройное покрытие из блока меди +tile.rpcov3.diamond.name=Тройное покрытие из алмазного блока +tile.rpcov3.dirt.name=Тройное покрытие из земли +tile.rpcov3.emeraldBlock.name=Тройное покрытие из изумрудного блока +tile.rpcov3.glass.name=Тройное покрытие из стекла +tile.rpcov3.gold.name=Тройное покрытие из блока золота +tile.rpcov3.greenSapphireBlock.name=Тройное покрытие из блока зеленого сапфира +tile.rpcov3.iron.name=Тройное покрытие из блока железа +tile.rpcov3.lapis.name=Тройное покрытие из лазуритового блока +tile.rpcov3.marble.name=Тройное покрытие из мрамора +tile.rpcov3.marbleBrick.name=Тройное покрытие из мраморного кирпича +tile.rpcov3.moss.name=Тройное покрытие из булыжника со мхом +tile.rpcov3.netherbrick.name=Тройное покрытие из адского кирпича +tile.rpcov3.netherrack.name=Тройное покрытие из адского камня +tile.rpcov3.obsidian.name=Тройное покрытие из обсидиана +tile.rpcov3.planks.name=Тройное покрытие из досок +tile.rpcov3.planks1.name=Тройное покрытие из досок +tile.rpcov3.planks2.name=Тройное покрытие из досок +tile.rpcov3.planks3.name=Тройное покрытие из досок +tile.rpcov3.pumpkin.name=Тройное покрытие из тыквы +tile.rpcov3.rplog.name=Тройное покрытие из каучукового дерева +tile.rpcov3.rubyBlock.name=Тройное покрытие из лазуритового блока +tile.rpcov3.sandstone.name=Тройное покрытие из песчаника +tile.rpcov3.sandstone1.name=Тройное покрытие из песчаника +tile.rpcov3.sandstone2.name=Тройное покрытие из песчаника +tile.rpcov3.sapphireBlock.name=Тройное покрытие из сапфирового блока +tile.rpcov3.silverBlock.name=Рейка тройного покрытия из блока серебра +tile.rpcov3.slab.name=Тройное покрытие из каменных ступенек +tile.rpcov3.snow.name=Тройное покрытие из снега +tile.rpcov3.soul.name=Тройное покрытие из песка душ +tile.rpcov3.stone.name=Тройное покрытие из камня +tile.rpcov3.stonebrick.name=Тройное покрытие из каменного кирпича +tile.rpcov3.stonebrick1.name=Тройное покрытие из каменного кирпича +tile.rpcov3.stonebrick2.name=Тройное покрытие из каменного кирпича +tile.rpcov3.stonebrick3.name=Тройное покрытие из каменного кирпича +tile.rpcov3.tinBlock.name=Тройное покрытие из блока олова +tile.rpcov3.tungstenBlock.name=Тройное покрытие из блока вольфрама +tile.rpcov3.wood.name=Тройное покрытие из дерева +tile.rpcov3.wood1.name=Тройное покрытие из дерева +tile.rpcov3.wood2.name=Тройное покрытие из досок +tile.rpcov3.wood3.name=Тройное покрытие из дерева +tile.rpcov3.wool.black.name=Тройное покрытие из черной шерсти +tile.rpcov3.wool.blue.name=Тройное покрытие из синей шерсти +tile.rpcov3.wool.brown.name=Тройное покрытие из коричневой шерсти +tile.rpcov3.wool.cyan.name=Тройное покрытие из бирюзовой шерсти +tile.rpcov3.wool.gray.name=Тройное покрытие из серой шерсти +tile.rpcov3.wool.green.name=Тройное покрытие из зеленой шерсти +tile.rpcov3.wool.lightBlue.name=Тройное покрытие из голубой шерсти +tile.rpcov3.wool.lime.name=Тройное покрытие из лаймовой шерсти +tile.rpcov3.wool.magenta.name=Тройное покрытие из пурпурной шерсти +tile.rpcov3.wool.orange.name=Тройное покрытие из оранжевой шерсти +tile.rpcov3.wool.pink.name=Тройное покрытие из розовой шерсти +tile.rpcov3.wool.purple.name=Тройное покрытие из фиолетовой шерсти +tile.rpcov3.wool.red.name=Тройное покрытие из красной шерсти +tile.rpcov3.wool.silver.name=Тройное покрытие из светло-серой шерсти +tile.rpcov3.wool.white.name=Тройное покрытие из белой шерсти +tile.rpcov3.wool.yellow.name=Тройное покрытие из желтой шерсти +tile.rpcov3c.basalt.name=Угол тройного покрытия из базальта +tile.rpcov3c.basaltBrick.name=Угол тройного покрытия из базальтового кирпича +tile.rpcov3c.basaltCircle.name=Рейка покрытия из резного базальтового кирпича +tile.rpcov3c.basaltCobble.name=Угол тройного покрытия из базальтового булыжника +tile.rpcov3c.basaltPaver.name=Угол тройного покрытия из базальтового асфальта +tile.rpcov3c.books.name=Угол тройного покрытия из книжной полки +tile.rpcov3c.brick.name=Угол тройного покрытия из кирпича +tile.rpcov3c.clay.name=Угол тройного покрытия из глины +tile.rpcov3c.cobble.name=Угол тройного покрытия из булыжника +tile.rpcov3c.copperBlock.name=Угол тройного покрытия из блока меди +tile.rpcov3c.diamond.name=Угол тройного покрытия из алмазного блока +tile.rpcov3c.dirt.name=Угол тройного покрытия из земли +tile.rpcov3c.emeraldBlock.name=Угол тройного покрытия из изумрудного блока +tile.rpcov3c.glass.name=Угол тройного покрытия из стекла +tile.rpcov3c.gold.name=Угол тройного покрытия из блока золота +tile.rpcov3c.greenSapphireBlock.name=Угол тройного покрытия из блока зеленого сапфира +tile.rpcov3c.iron.name=Угол тройного покрытия из блока железа +tile.rpcov3c.lapis.name=Угол тройного покрытия из лазуритового блока +tile.rpcov3c.marble.name=Угол тройного покрытия из мрамора +tile.rpcov3c.marbleBrick.name=Угол тройного покрытия из мраморного кирпича +tile.rpcov3c.moss.name=Угол тройного покрытия из булыжника со мхом +tile.rpcov3c.netherbrick.name=Угол тройного покрытия из адского кирпича +tile.rpcov3c.netherrack.name=Угол тройного покрытия из адского камня +tile.rpcov3c.obsidian.name=Угол тройного покрытия из обсидиана +tile.rpcov3c.planks.name=Угол тройного покрытия из досок +tile.rpcov3c.planks1.name=Угол тройного покрытия из досок +tile.rpcov3c.planks2.name=Угол тройного покрытия из досок +tile.rpcov3c.planks3.name=Угол тройного покрытия из досок +tile.rpcov3c.pumpkin.name=Угол тройного покрытия из тыквы +tile.rpcov3c.rplog.name=Угол тройного покрытия из каучукового дерева +tile.rpcov3c.rubyBlock.name=Угол тройного покрытия из рубинового блока +tile.rpcov3c.sandstone.name=Угол тройной панели из песчаника +tile.rpcov3c.sandstone1.name=Угол тройного покрытия из песчаника +tile.rpcov3c.sandstone2.name=Угол тройного покрытия из песчаника +tile.rpcov3c.sapphireBlock.name=Угол тройного покрытия из сапфирового блока +tile.rpcov3c.silverBlock.name=Угол тройного покрытия из блока серебра +tile.rpcov3c.slab.name=Угол тройного покрытия из каменных ступенек +tile.rpcov3c.snow.name=Угол тройного покрытия из снега +tile.rpcov3c.soul.name=Угол тройного покрытия из песка душ +tile.rpcov3c.stone.name=Угол тройного покрытия из камня +tile.rpcov3c.stonebrick.name=Угол тройного покрытия из каменного кирпича +tile.rpcov3c.stonebrick1.name=Угол тройного покрытия из каменного кирпича +tile.rpcov3c.stonebrick2.name=Угол тройного покрытия из каменного кирпича +tile.rpcov3c.stonebrick3.name=Угол тройного покрытия из каменного кирпича +tile.rpcov3c.tinBlock.name=Угол тройного покрытия из блока олова +tile.rpcov3c.tungstenBlock.name=Угол тройного покрытия из блока вольфрама +tile.rpcov3c.wood.name=Угол тройного покрытия из дерева +tile.rpcov3c.wood1.name=Угол тройного покрытия из дерева +tile.rpcov3c.wood2.name=Угол тройного покрытия из дерева +tile.rpcov3c.wood3.name=Угол тройного покрытия из дерева +tile.rpcov3c.wool.black.name=Угол тройного покрытия из черной шерсти +tile.rpcov3c.wool.blue.name=Угол тройного покрытия из синей шерсти +tile.rpcov3c.wool.brown.name=Угол тройного покрытия из оранжевой шерсти +tile.rpcov3c.wool.cyan.name=Угол тройного покрытия из бирюзовой шерсти +tile.rpcov3c.wool.gray.name=Угол тройного покрытия из серой шерсти +tile.rpcov3c.wool.green.name=Угол тройного покрытия из зеленой шерсти +tile.rpcov3c.wool.lightBlue.name=Угол тройного покрытия из голубой шерсти +tile.rpcov3c.wool.lime.name=Угол тройного покрытия из лаймовой шерсти +tile.rpcov3c.wool.magenta.name=Угол тройного покрытия из пурпурной шерсти +tile.rpcov3c.wool.orange.name=Угол тройного покрытия из оранжевой шерсти +tile.rpcov3c.wool.pink.name=Угол тройного покрытия из розовой шерсти +tile.rpcov3c.wool.purple.name=Угол тройного покрытия из фиолетовой шерсти +tile.rpcov3c.wool.red.name=Угол тройного покрытия из красной шерсти +tile.rpcov3c.wool.silver.name=Угол тройного покрытия из светло-серой шерсти +tile.rpcov3c.wool.white.name=Угол тройного покрытия из белой шерсти +tile.rpcov3c.wool.yellow.name=Угол тройного покрытия из желтой шерсти +tile.rpcov3s.basalt.name=Рейка тройного покрытия из базальта +tile.rpcov3s.basaltBrick.name=Рейка тройного покрытия из базальтового кирпича +tile.rpcov3s.basaltCircle.name=Рейка тройного покрытия из резного базальтового кирпича +tile.rpcov3s.basaltCobble.name=Рейка тройного покрытия из базальтового булыжника +tile.rpcov3s.basaltPaver.name=Рейка тройного покрытия из базальтового асфальта +tile.rpcov3s.books.name=Рейка тройного покрытия из книжной полки +tile.rpcov3s.brick.name=Рейка тройного покрытия из кирпича +tile.rpcov3s.clay.name=Рейка тройного покрытия из глины +tile.rpcov3s.cobble.name=Рейка тройного покрытия из булыжника +tile.rpcov3s.copperBlock.name=Рейка тройного покрытия из блока меди +tile.rpcov3s.diamond.name=Рейка тройного покрытия из алмазного блока +tile.rpcov3s.dirt.name=Рейка тройного покрытия из земли +tile.rpcov3s.emeraldBlock.name=Рейка тройного покрытия из изумрудного блока +tile.rpcov3s.glass.name=Рейка тройного покрытия из стекла +tile.rpcov3s.gold.name=Рейка тройного покрытия из блока золота +tile.rpcov3s.greenSapphireBlock.name=Рейка тройного покрытия из блока зеленого сапфира +tile.rpcov3s.iron.name=Рейка тройного покрытия из блока железа +tile.rpcov3s.lapis.name=Рейка тройного покрытия из лазуритового блока +tile.rpcov3s.marble.name=Рейка тройного покрытия из мрамора +tile.rpcov3s.marbleBrick.name=Рейка тройного покрытия из мраморного кирпича +tile.rpcov3s.moss.name=Рейка тройного покрытия из булыжника со мхом +tile.rpcov3s.netherbrick.name=Рейка тройного покрытия из адского кирпича +tile.rpcov3s.netherrack.name=Рейка тройного покрытия из адского камня +tile.rpcov3s.obsidian.name=Рейка тройного покрытия из обсидиана +tile.rpcov3s.planks.name=Рейка тройного покрытия из досок +tile.rpcov3s.planks1.name=Рейка тройного покрытия из досок +tile.rpcov3s.planks2.name=Рейка тройного покрытия из досок +tile.rpcov3s.planks3.name=Рейка тройного покрытия из досок +tile.rpcov3s.pumpkin.name=Рейка тройного покрытия из тыквы +tile.rpcov3s.rplog.name=Рейка тройного покрытия из каучукового дерева +tile.rpcov3s.rubyBlock.name=Рейка тройного покрытия из рубинового блока +tile.rpcov3s.sandstone.name=Рейка тройного покрытия из песчаника +tile.rpcov3s.sandstone1.name=Рейка тройного покрытия из песчаника +tile.rpcov3s.sandstone2.name=Рейка тройного покрытия из песчаника +tile.rpcov3s.sapphireBlock.name=Рейка тройного покрытия из сапфирового блока +tile.rpcov3s.silverBlock.name=Рейка тройного покрытия из блока серебра +tile.rpcov3s.slab.name=Рейка тройного покрытия из каменных ступенек +tile.rpcov3s.snow.name=Рейка тройного покрытия из снега +tile.rpcov3s.soul.name=Рейка тройного покрытия из песка душ +tile.rpcov3s.stone.name=Рейка тройного покрытия из камня +tile.rpcov3s.stonebrick.name=Рейка тройного покрытия из каменного кирпича +tile.rpcov3s.stonebrick1.name=Рейка тройного покрытия из каменного кирпича +tile.rpcov3s.stonebrick2.name=Рейка тройного покрытия из каменного кирпича +tile.rpcov3s.stonebrick3.name=Рейка тройного покрытия из каменного кирпича +tile.rpcov3s.tinBlock.name=Рейка тройного покрытия из блока олова +tile.rpcov3s.tungstenBlock.name=Рейка тройного покрытия из блока вольфрама +tile.rpcov3s.wood.name=Рейка тройного покрытия из досок +tile.rpcov3s.wood1.name=Рейка тройного покрытия из дерева +tile.rpcov3s.wood2.name=Рейка тройного покрытия из дерева +tile.rpcov3s.wood3.name=Рейка тройного покрытия из дерева +tile.rpcov3s.wool.black.name=Рейка тройного покрытия из черной шерсти +tile.rpcov3s.wool.blue.name=Рейка тройного покрытия из синей шерсти +tile.rpcov3s.wool.brown.name=Рейка тройного покрытия из коричневой шерсти +tile.rpcov3s.wool.cyan.name=Рейка тройного покрытия из бирюзовой шерсти +tile.rpcov3s.wool.gray.name=Рейка тройного покрытия из серой шерсти +tile.rpcov3s.wool.green.name=Рейка тройного покрытия из зеленой шерсти +tile.rpcov3s.wool.lightBlue.name=Рейка тройного покрытия из голубой шерсти +tile.rpcov3s.wool.lime.name=Рейка тройного покрытия из лаймовой шерсти +tile.rpcov3s.wool.magenta.name=Рейка тройного покрытия из пурпурной шерсти +tile.rpcov3s.wool.orange.name=Рейка тройного покрытия из оранжевой шерсти +tile.rpcov3s.wool.pink.name=Рейка тройного покрытия из розовой шерсти +tile.rpcov3s.wool.purple.name=Рейка тройного покрытия из фиолетовой шерсти +tile.rpcov3s.wool.red.name=Рейка тройного покрытия из красной шерсти +tile.rpcov3s.wool.silver.name=Рейка тройного покрытия из светло-серой шерсти +tile.rpcov3s.wool.white.name=Рейка тройного покрытия из белой шерсти +tile.rpcov3s.wool.yellow.name=Рейка тройного покрытия из желтой шерсти +tile.rpcov5.basalt.name=Плиточное покрытие из базальта +tile.rpcov5.basaltBrick.name=Плиточное покрытие из базальтового кирпича +tile.rpcov5.basaltCircle.name=Плиточное покрытие из резного базальтового кирпича +tile.rpcov5.basaltCobble.name=Плиточное покрытие из базальтового булыжника +tile.rpcov5.basaltPaver.name=Плиточное покрытие из базальтового асфальта +tile.rpcov5.books.name=Плиточное покрытие из книжной полки +tile.rpcov5.brick.name=Плиточное покртыие из кирпича +tile.rpcov5.clay.name=Плиточное покрытие из глины +tile.rpcov5.cobble.name=Плиточное покрытие из булыжника +tile.rpcov5.copperBlock.name=Плиточное покрытие из блока меди +tile.rpcov5.diamond.name=Плиточное покрытие из алмазного блока +tile.rpcov5.dirt.name=плиточное покрытие из земли +tile.rpcov5.emeraldBlock.name=Плиточное покрытие из изумрудного блока +tile.rpcov5.glass.name=Плиточное покрытие из стекла +tile.rpcov5.gold.name=Плиточное покрытие из блока золота +tile.rpcov5.greenSapphireBlock.name=Плиточное покрытие из блока зеленого сапфира +tile.rpcov5.iron.name=Плиточное покрытие из блока железа +tile.rpcov5.lapis.name=Плиточное покрытие из лазуритового блока +tile.rpcov5.marble.name=Плиточное покрытие из мрамора +tile.rpcov5.marbleBrick.name=Плиточное покрытие из мраморного кирпича +tile.rpcov5.moss.name=Плиточное покрытие из булыжника со мхом +tile.rpcov5.netherbrick.name=Плиточное покрытие из адского кирпича +tile.rpcov5.netherrack.name=Плиточное покрытие из адского камня +tile.rpcov5.obsidian.name=Плиточное покрытие из обсидиана +tile.rpcov5.planks.name=Плиточное покрытие из досок +tile.rpcov5.planks1.name=Плиточное покрытие из досок +tile.rpcov5.planks2.name=Плиточное покрытие из досок +tile.rpcov5.planks3.name=Плиточное покрытие из досок +tile.rpcov5.pumpkin.name=Плиточное покрытие из тыквы +tile.rpcov5.rplog.name=Плиточное покрытие из каучукового дерева +tile.rpcov5.rubyBlock.name=Плиточное покрытие из рубинового блока +tile.rpcov5.sandstone.name=Плиточное покрытие из песчаника +tile.rpcov5.sandstone1.name=Плиточное покрытие из песчаника +tile.rpcov5.sandstone2.name=Плиточное покрытие из песчаника +tile.rpcov5.sapphireBlock.name=Плиточное покрытие из сапфирового блока +tile.rpcov5.silverBlock.name=Плиточное покрытие из блока серебра +tile.rpcov5.slab.name=Плиточное покрытие из каменных ступенек +tile.rpcov5.snow.name=Плиточное покрытие из снега +tile.rpcov5.soul.name=Плиточное покрытие из песка душ +tile.rpcov5.stone.name=Плиточное покрытие из камня +tile.rpcov5.stonebrick.name=Плиточное покрытие из каменного кирпича +tile.rpcov5.stonebrick1.name=Плиточное покрытие из каменного кирпича +tile.rpcov5.stonebrick2.name=Плиточное покрытие из каменного кирпича +tile.rpcov5.stonebrick3.name=Плиточное покрытие из каменного кирпича +tile.rpcov5.tinBlock.name=Плиточное покрытие из блока олова +tile.rpcov5.tungstenBlock.name=Плиточное покрытие из блока вольфрама +tile.rpcov5.wood.name=Плиточное покрытие из дерева +tile.rpcov5.wood1.name=Плиточное покрытие из дерева +tile.rpcov5.wood2.name=Плиточное покрытие из дерева +tile.rpcov5.wood3.name=Плиточное покрытие из дерева +tile.rpcov5.wool.black.name=Плиточное покрытие из черной шерсти +tile.rpcov5.wool.blue.name=Плиточное покрытие из синей шерсти +tile.rpcov5.wool.brown.name=плиточное покрытие из коричневой шерсти +tile.rpcov5.wool.cyan.name=Плиточное покрытие из бирюзовой шерсти +tile.rpcov5.wool.gray.name=Плиточное покрытие из серой шерсти +tile.rpcov5.wool.green.name=Плиточное покрытие из зеленой шерсти +tile.rpcov5.wool.lightBlue.name=Плиточное покрытие из голубой шерсти +tile.rpcov5.wool.lime.name=Плиточное покрытие из лаймовой шерсти +tile.rpcov5.wool.magenta.name=Плиточное покрытие из пурпурной шерсти +tile.rpcov5.wool.orange.name=Плиточное покрытие из оранжевой шерсти +tile.rpcov5.wool.pink.name=Плиточное покрытие из розовой шерсти +tile.rpcov5.wool.purple.name=Плиточное покрытие из фиолетовой шерсти +tile.rpcov5.wool.red.name=Плиточное покрытие из красной шерсти +tile.rpcov5.wool.silver.name=Плиточное покрытие из светло-серой шерсти +tile.rpcov5.wool.white.name=Плиточное покрытие из белой шерсти +tile.rpcov5.wool.yellow.name=Плиточное покрытие из желтой шерсти +tile.rpcov5c.basalt.name=Угол плиточного покрытия из базальта +tile.rpcov5c.basaltBrick.name=Угол плиточного покрытия из базальтового кирпича +tile.rpcov5c.basaltCircle.name=Угол плиточного покрытия из резного базальтового кирпича +tile.rpcov5c.basaltCobble.name=Угол плиточного покрытия из базальтового булыжника +tile.rpcov5c.basaltPaver.name=Угол плиточного покрытия из базальтового асфальта +tile.rpcov5c.books.name=Угол плиточного покрытия из книжной полки +tile.rpcov5c.brick.name=Угол плиточного покрытия из кирпича +tile.rpcov5c.clay.name=Угол плиточного покрытия из глины +tile.rpcov5c.cobble.name=Угол плиточного покрытия из булыжника +tile.rpcov5c.copperBlock.name=Угол плиточного покрытия из блока меди +tile.rpcov5c.diamond.name=Угол плиточного покрытия из алмазного блока +tile.rpcov5c.dirt.name=Угол плиточного покрытия из земли +tile.rpcov5c.emeraldBlock.name=Угол плиточного покрытия из изумрудного блока +tile.rpcov5c.glass.name=Угол плиточного покрытия из стекла +tile.rpcov5c.gold.name=Угол плиточного покрытия из блока золота +tile.rpcov5c.greenSapphireBlock.name=Угол плиточного покрытия из блока зеленого сапфира +tile.rpcov5c.iron.name=Угол плиточного покрытия из блока железа +tile.rpcov5c.lapis.name=Угол плиточного покрытия из лазуритового блока +tile.rpcov5c.marble.name=Угол плиточного покрытия из мрамора +tile.rpcov5c.marbleBrick.name=Угол плиточного покрытия из мраморного кирпича +tile.rpcov5c.moss.name=Угол плиточного покрытия из булыжника со мхом +tile.rpcov5c.netherbrick.name=Угол плиточного покрытия из адского кирпича +tile.rpcov5c.netherrack.name=Угол плиточного покрытия из адского камня +tile.rpcov5c.obsidian.name=Угол плиточного покрытия из обсидиана +tile.rpcov5c.planks.name=Угол плиточного покрытия из досок +tile.rpcov5c.planks1.name=Угол плиточного покрытия из досок +tile.rpcov5c.planks2.name=Угол плиточного покрытия из досок +tile.rpcov5c.planks3.name=Угол плиточного покрытия из досок +tile.rpcov5c.pumpkin.name=Угол плиточного покрытия из тыквы +tile.rpcov5c.rplog.name=Угол плиточного покрытия из каучукового дерева +tile.rpcov5c.rubyBlock.name=Угол плиточного покрытия из рубинового блока +tile.rpcov5c.sandstone.name=Угол плиточного покрытия из песчаника +tile.rpcov5c.sandstone1.name=Угол плиточного покрытия из песчаника +tile.rpcov5c.sandstone2.name=Угол плиточного покрытия из песчаника +tile.rpcov5c.sapphireBlock.name=Угол плиточного покрытия из сапфирового блока +tile.rpcov5c.silverBlock.name=Угол плиточного покрытия из блока серебра +tile.rpcov5c.slab.name=Угол плиточного покрытия из каменных ступенек +tile.rpcov5c.snow.name=Угол плиточного покрытия из снега +tile.rpcov5c.soul.name=Угол плиточного покрытия из песка душ +tile.rpcov5c.stone.name=Угол плиточного покрытия из камня +tile.rpcov5c.stonebrick.name=Угол плиточного покрытия из каменного кирпича +tile.rpcov5c.stonebrick1.name=Угол плиточного покрытия из каменного кирпича +tile.rpcov5c.stonebrick2.name=Угол плиточного покрытия из каменного кирпича +tile.rpcov5c.stonebrick3.name=Угол плиточного покрытия из каменного кирпича +tile.rpcov5c.tinBlock.name=Угол плиточного покрытия из блока олова +tile.rpcov5c.tungstenBlock.name=Угол плиточного покрытия из блока вольфрама +tile.rpcov5c.wood.name=Угол плиточного покрытия из дерева +tile.rpcov5c.wood1.name=Угол плиточного покрытия из дерева +tile.rpcov5c.wood2.name=Угол плиточного покрытия из дерева +tile.rpcov5c.wood3.name=Угол плиточного покрытия из дерева +tile.rpcov5c.wool.black.name=Угол плиточного покрытия из черной шерсти +tile.rpcov5c.wool.blue.name=Угол плиточного покрытия из синей шерсти +tile.rpcov5c.wool.brown.name=Угол плиточного покрытия из коричневой шерсти +tile.rpcov5c.wool.cyan.name=Угол плиточного покрытия из бирюзовой шерсти +tile.rpcov5c.wool.gray.name=Угол плиточного покрытия из серой шерсти +tile.rpcov5c.wool.green.name=Угол плиточного покрытия из зеленой шерсти +tile.rpcov5c.wool.lightBlue.name=Угол плиточного покрытия из голубой шерсти +tile.rpcov5c.wool.lime.name=Угол плиточного покрытия из лаймовой шерсти +tile.rpcov5c.wool.magenta.name=Угол плиточного покрытия из пурпурной шерсти +tile.rpcov5c.wool.orange.name=Угол плиточного покрытия из оранжевой шерсти +tile.rpcov5c.wool.pink.name=Угол плиточного покрытия из розовой шерсти +tile.rpcov5c.wool.purple.name=Угол плиточного покрытия из фиолетовой шерсти +tile.rpcov5c.wool.red.name=Угол плиточного покрытия из красной шерсти +tile.rpcov5c.wool.silver.name=Угол плиточного покрытия из светло-серой шерсти +tile.rpcov5c.wool.white.name=Угол плиточного покрытия из белой шерсти +tile.rpcov5c.wool.yellow.name=Угол плиточного покрытия из желтой шерсти +tile.rpcov5s.basalt.name=Рейка плиточного покрытия из базальта +tile.rpcov5s.basaltBrick.name=Рейка плиточного покрытия из базальтового кирпича +tile.rpcov5s.basaltCircle.name=Рейка плиточного покрытия из резного базальтового кирпича +tile.rpcov5s.basaltCobble.name=Рейка плиточного покрытия из базальтового булыжника +tile.rpcov5s.basaltPaver.name=Рейка плиточного покрытия из базальтового асфальта +tile.rpcov5s.books.name=Рейка плиточного покрытия из книжной полки +tile.rpcov5s.brick.name=Рейка плиточного покрытия из кирпича +tile.rpcov5s.clay.name=Рейка плиточного покрытия из глины +tile.rpcov5s.cobble.name=Рейка плиточного покрытия из булыжника +tile.rpcov5s.copperBlock.name=Рейка плиточного покрытия из блока меди +tile.rpcov5s.diamond.name=Рейка плиточного покрытия из алмазного блока +tile.rpcov5s.dirt.name=Рейка плиточного покрытия из земли +tile.rpcov5s.emeraldBlock.name=Рейка плиточного покрытия из изумрудного блока +tile.rpcov5s.glass.name=Рейка плиточного покрытия из стекла +tile.rpcov5s.gold.name=Рейка плиточного покрытия из блока золота +tile.rpcov5s.greenSapphireBlock.name=Рейка плиточного покрытия из блока зеленого сапфира +tile.rpcov5s.iron.name=Рейка плиточного покрытия из блока железа +tile.rpcov5s.lapis.name=Рейка плиточного покрытия из лазуритового блока +tile.rpcov5s.marble.name=Рейка плиточного покрытия из мрамора +tile.rpcov5s.marbleBrick.name=Рейка плиточного покрытия из мраморного кирпича +tile.rpcov5s.moss.name=Рейка плиточного покрытия из булыжника со мхом +tile.rpcov5s.netherbrick.name=Рейка плиточного покрытия из адского кирпича +tile.rpcov5s.netherrack.name=Рейка плиточного покрытия из адского кирпича +tile.rpcov5s.obsidian.name=Рейка плиточного покрытия из обсидиана +tile.rpcov5s.planks.name=Рейка плиточного покрытия из досок +tile.rpcov5s.planks1.name=Рейка плиточного покрытия из досок +tile.rpcov5s.planks2.name=Рейка плиточного покрытия из досок +tile.rpcov5s.planks3.name=Рейка плиточного покрытия из досок +tile.rpcov5s.pumpkin.name=Рейка плиточного покрытия из алмазного блока +tile.rpcov5s.rplog.name=Рейка плиточного покрытия из каучукового дерева +tile.rpcov5s.rubyBlock.name=Рейка плиточного покрытия из рубинового блока +tile.rpcov5s.sandstone.name=Рейка плиточного покрытия из песчаника +tile.rpcov5s.sandstone1.name=Рейка плиточного покрытия из песчаника +tile.rpcov5s.sandstone2.name=Рейка плиточного покрытия из песчаника +tile.rpcov5s.sapphireBlock.name=Рейка плиточного покрытия из сапфирового блока +tile.rpcov5s.silverBlock.name=Рейка плиточного покрытия из блока серебра +tile.rpcov5s.slab.name=Рейка плиточного покрытия из каменных ступенек +tile.rpcov5s.snow.name=Рейка плиточного покрытия из снега +tile.rpcov5s.soul.name=Рейка плиточного покрытия из песка душ +tile.rpcov5s.stone.name=Рейка плиточного покрытия из камня +tile.rpcov5s.stonebrick.name=Рейка плиточного покрытия из каменного кирпича +tile.rpcov5s.stonebrick1.name=Рейка плиточного покрытия из каменного кирпича +tile.rpcov5s.stonebrick2.name=Рейка плиточного покрытия из каменного кирпича +tile.rpcov5s.stonebrick3.name=Рейка плиточного покрытия из каменного кирпича +tile.rpcov5s.tinBlock.name=Рейка плиточного покрытия из блока олова +tile.rpcov5s.tungstenBlock.name=Рейка плиточного покрытия из блока вольфрама +tile.rpcov5s.wood.name=Рейка плиточного покрытия из дерева +tile.rpcov5s.wood1.name=Рейка плиточного покрытия из дерева +tile.rpcov5s.wood2.name=Рейка плиточного покрытия из дерева +tile.rpcov5s.wood3.name=Рейка плиточного покрытия из дерева +tile.rpcov5s.wool.black.name=Рейка плиточного покрытия из черной шерсти +tile.rpcov5s.wool.blue.name=Рейка плиточного покрытия из синей шерсти +tile.rpcov5s.wool.brown.name=Рейка плиточного покрытия из коричневой шерсти +tile.rpcov5s.wool.cyan.name=Рейка плиточного покрытия из бирюзовой шерсти +tile.rpcov5s.wool.gray.name=Рейка плиточного покрытия из светло-серой шерсти +tile.rpcov5s.wool.green.name=Рейка плиточного покрытия из зеленой шерсти +tile.rpcov5s.wool.lightBlue.name=Рейка плиточного покрытия из голубой шерсти +tile.rpcov5s.wool.lime.name=Рейка плиточного покрытия из лаймовой шерсти +tile.rpcov5s.wool.magenta.name=Рейка плиточного покрытия из пурпурной шерсти +tile.rpcov5s.wool.orange.name=Рейка плиточного покрытия из оранжевой шерсти +tile.rpcov5s.wool.pink.name=Рейка плиточного покрытия из розовой шерсти +tile.rpcov5s.wool.purple.name=Рейка плиточного покрытия из фиолетовой шерсти +tile.rpcov5s.wool.red.name=Рейка плиточного покрытия из красной шерсти +tile.rpcov5s.wool.silver.name=Рейка плиточного покрытия из светло-серой шерсти +tile.rpcov5s.wool.white.name=Рейка плиточного покрытия из белой шерсти +tile.rpcov5s.wool.yellow.name=Рейка плиточного покрытия из желтой шерсти +tile.rpcov6.basalt.name=Тройная панель из базальта +tile.rpcov6.basaltBrick.name=Тройная панель из базальтового кирпича +tile.rpcov6.basaltCircle.name=Тройная панель из резного базальтового кирпича +tile.rpcov6.basaltCobble.name=Тройная панель из базальтового булыжника +tile.rpcov6.basaltPaver.name=Тройная панель из базальтового асфальта +tile.rpcov6.books.name=Тройная панель из книжной полки +tile.rpcov6.brick.name=Тройная панель из кирпича +tile.rpcov6.clay.name=Тройная панель из глины +tile.rpcov6.cobble.name=Тройная панель из булыжника +tile.rpcov6.copperBlock.name=Тройная панель из блока меди +tile.rpcov6.diamond.name=Тройная панель из алмазного блока +tile.rpcov6.dirt.name=Тройная панель из земли +tile.rpcov6.emeraldBlock.name=Тройная панель из изумрудного блока +tile.rpcov6.glass.name=Тройная панель из стекла +tile.rpcov6.gold.name=Тройная панель из блока золота +tile.rpcov6.greenSapphireBlock.name=Тройная панель из блока зеленого сапфира +tile.rpcov6.iron.name=Тройная панель из блока железа +tile.rpcov6.lapis.name=Тройная панель из лазуритового блока +tile.rpcov6.marble.name=Тройная панель из мрамора +tile.rpcov6.marbleBrick.name=Тройная панель из мраморного кирпича +tile.rpcov6.moss.name=Тройная панель из булыжника со мхом +tile.rpcov6.netherbrick.name=Тройная панель из адского кирпича +tile.rpcov6.netherrack.name=Тройная панель из адского камня +tile.rpcov6.obsidian.name=Тройная панель из обсидиана +tile.rpcov6.planks.name=Тройная панель из досок +tile.rpcov6.planks1.name=Тройная панель из досок +tile.rpcov6.planks2.name=Тройная панель из досок +tile.rpcov6.planks3.name=Тройная панель из досок +tile.rpcov6.pumpkin.name=Тройная панель из тыквы +tile.rpcov6.rplog.name=Тройная панель из каучукового дерева +tile.rpcov6.rubyBlock.name=Тройная панель из рубинового блока +tile.rpcov6.sandstone.name=Тройная панель из песчаника +tile.rpcov6.sandstone1.name=Тройная панель из песчаника +tile.rpcov6.sandstone2.name=Тройная панель из песчаника +tile.rpcov6.sapphireBlock.name=Тройная панель из сапфирового блока +tile.rpcov6.silverBlock.name=Тройная панель из блока серебра +tile.rpcov6.slab.name=Тройная панель из каменных ступенек +tile.rpcov6.snow.name=Тройная панель из снега +tile.rpcov6.soul.name=Тройная панель из песка душ +tile.rpcov6.stone.name=Тройная панель из камня +tile.rpcov6.stonebrick.name=Тройная панель из каменного кирпича +tile.rpcov6.stonebrick1.name=Тройная панель из каменного кирпича +tile.rpcov6.stonebrick2.name=Тройная панель в оболочке из каменного кирпича +tile.rpcov6.stonebrick3.name=Тройная панель из каменного кирпича +tile.rpcov6.tinBlock.name=Тройная панель из блока олова +tile.rpcov6.tungstenBlock.name=Тройная панель из блока вольфрама +tile.rpcov6.wood.name=Тройная панель из дерева +tile.rpcov6.wood1.name=Тройная панель из дерева +tile.rpcov6.wood2.name=Тройная панель из дерева +tile.rpcov6.wood3.name=Тройная панель из дерева +tile.rpcov6.wool.black.name=Тройная панель из черной шерсти +tile.rpcov6.wool.blue.name=Тройная панель из синей шерсти +tile.rpcov6.wool.brown.name=Тройная панель из коричневой шерсти +tile.rpcov6.wool.cyan.name=Тройная панель из бирюзовой шерсти +tile.rpcov6.wool.gray.name=Тройная панель из серой шерсти +tile.rpcov6.wool.green.name=Тройная панель из зеленой шерсти +tile.rpcov6.wool.lightBlue.name=Тройная панель из голубой шерсти +tile.rpcov6.wool.lime.name=Тройная панель из лаймовой шерсти +tile.rpcov6.wool.magenta.name=Тройная панель из пурпурной шерсти +tile.rpcov6.wool.orange.name=Тройная панель из оранжевой шерсти +tile.rpcov6.wool.pink.name=Тройная панель из розовой шерсти +tile.rpcov6.wool.purple.name=Тройная панель из фиолетовой шерсти +tile.rpcov6.wool.red.name=Тройная панель из красной шерсти +tile.rpcov6.wool.silver.name=Тройная панель из светло-серой шерсти +tile.rpcov6.wool.white.name=Тройная панель из белой шерсти +tile.rpcov6.wool.yellow.name=Тройная панель из желтой шерсти +tile.rpcov6c.basalt.name=Угол тройной панели из базальта +tile.rpcov6c.basaltBrick.name=Угол тройной панели из базальтового кирпича +tile.rpcov6c.basaltCircle.name=Угол тройной панели из резного базальтового кирпича +tile.rpcov6c.basaltCobble.name=Угол тройной панели из базальтового булыжника +tile.rpcov6c.basaltPaver.name=Угол тройной панели зи базальтового асфальта +tile.rpcov6c.books.name=Угол тройной панели из книжной полки +tile.rpcov6c.brick.name=Угол тройной панели из кирпича +tile.rpcov6c.clay.name=Угол тройной панели из глины +tile.rpcov6c.cobble.name=Угол тройной панели из булыжника +tile.rpcov6c.copperBlock.name=Угол тройной панели из блока меди +tile.rpcov6c.diamond.name=Угол тройной панели из алмазного блока +tile.rpcov6c.dirt.name=Угол тройной панели из земли +tile.rpcov6c.emeraldBlock.name=Угол тройной панели из изумрудного блока +tile.rpcov6c.glass.name=Угол тройной панели из стекла +tile.rpcov6c.gold.name=Угол тройной панели из блока золота +tile.rpcov6c.greenSapphireBlock.name=Угол тройной панели из блока зеленого сапфира +tile.rpcov6c.iron.name=Угол тройной панели из блока железа +tile.rpcov6c.lapis.name=Угол тройной панели из лазуритового блока +tile.rpcov6c.marble.name=Угол тройной панели из мрамора +tile.rpcov6c.marbleBrick.name=Угол тройной панели из мраморного кирпича +tile.rpcov6c.moss.name=Угол тройной панели из булыжника со мхом +tile.rpcov6c.netherbrick.name=Угол тройной панели из адского кирпича +tile.rpcov6c.netherrack.name=Угол тройной панели из адского камня +tile.rpcov6c.obsidian.name=Угол тройной панели из обсидиана +tile.rpcov6c.planks.name=Угол тройной панели из досок +tile.rpcov6c.planks1.name=Угол тройной панели из досок +tile.rpcov6c.planks2.name=Угол тройной панели из досок +tile.rpcov6c.planks3.name=Угол тройной панели из досок +tile.rpcov6c.pumpkin.name=Угол тройной панели из тыквы +tile.rpcov6c.rplog.name=Угол тройной панели из каучукового дерева +tile.rpcov6c.rubyBlock.name=Угол тройной панели из рубинового блока +tile.rpcov6c.sandstone.name=Угол тройной панели из песчаника +tile.rpcov6c.sandstone1.name=Угол тройной панели из песчаника +tile.rpcov6c.sandstone2.name=Угол тройной панели из песчаника +tile.rpcov6c.sapphireBlock.name=Угол тройной панели из сапфирового блока +tile.rpcov6c.silverBlock.name=Угол тройной панели из блока серебра +tile.rpcov6c.slab.name=Угол тройной панели из каменных ступенек +tile.rpcov6c.snow.name=Угол тройной панели из дерева +tile.rpcov6c.soul.name=Угол тройной панели из песка душ +tile.rpcov6c.stone.name=Угол тройной панели из камня +tile.rpcov6c.stonebrick.name=Угол тройной панели из каменного кирпича +tile.rpcov6c.stonebrick1.name=Угол тройной панели из каменного кирпича +tile.rpcov6c.stonebrick2.name=Угол тройной панели из каменного кирпича +tile.rpcov6c.stonebrick3.name=Угол тройной панели из каменного кирпича +tile.rpcov6c.tinBlock.name=Угол тройной панели из блока олова +tile.rpcov6c.tungstenBlock.name=Угол тройной панели из блока вольфрама +tile.rpcov6c.wood.name=Угол тройной панели из дерева +tile.rpcov6c.wood1.name=Угол тройной панели из дерева +tile.rpcov6c.wood2.name=Угол тройной панели из дерева +tile.rpcov6c.wood3.name=Угол тройной панели из дерева +tile.rpcov6c.wool.black.name=Угол тройной панели из черной шерсти +tile.rpcov6c.wool.blue.name=Угол тройной панели из синей шерсти +tile.rpcov6c.wool.brown.name=Угол тройной панели из коричневой шерсти +tile.rpcov6c.wool.cyan.name=Угол тройной панели из бирюзовой шерсти +tile.rpcov6c.wool.gray.name=Угол тройной панели из серой шерсти +tile.rpcov6c.wool.green.name=Угол тройной панели из зеленой шерсти +tile.rpcov6c.wool.lightBlue.name=Угол тройной панели из голубой шерсти +tile.rpcov6c.wool.lime.name=Угол тройной панели из лаймовой шерст +tile.rpcov6c.wool.magenta.name=Угол тройной панели из пурпурной шерсти +tile.rpcov6c.wool.orange.name=Угол тройной панели из оранжевой шерсти +tile.rpcov6c.wool.pink.name=Угол тройной панели из розовой шерсти +tile.rpcov6c.wool.purple.name=Угол тройной панели из фиолетовой шерсти +tile.rpcov6c.wool.red.name=Угол тройной панели из красной шерсти +tile.rpcov6c.wool.silver.name=Угол тройной панели из светло-серой шерсти +tile.rpcov6c.wool.white.name=Угол тройной панели из желтой шерсти +tile.rpcov6c.wool.yellow.name=Угол тройной панели из желтой шерсти +tile.rpcov6s.basalt.name=Рейка тройной панели из базальта +tile.rpcov6s.basaltBrick.name=Рейка тройной панели из базальтового кирпича +tile.rpcov6s.basaltCircle.name=Рейка тройной панели из резного базальтового кирпича +tile.rpcov6s.basaltCobble.name=Рейка тройной панели из базальтового булыжника +tile.rpcov6s.basaltPaver.name=Рейка тройной панели из базальтового асфальта +tile.rpcov6s.books.name=Рейка тройной панели из книжной полки +tile.rpcov6s.brick.name=Рейка тройной панели из кирпича +tile.rpcov6s.clay.name=Рейка тройной панели из глины +tile.rpcov6s.cobble.name=Рейка тройной панели из булыжника +tile.rpcov6s.copperBlock.name=Рейка тройной панели из блока меди +tile.rpcov6s.diamond.name=Рейка тройной панели из алмазного блока +tile.rpcov6s.dirt.name=Рейка тройной панели из земли +tile.rpcov6s.emeraldBlock.name=Рейка тройной панели из изумрудного блока +tile.rpcov6s.glass.name=Рейка тройной панели из стекла +tile.rpcov6s.gold.name=Рейка тройной панели из блока золота +tile.rpcov6s.greenSapphireBlock.name=Рейка тройной панели из блока зеленого сапфира +tile.rpcov6s.iron.name=Рейка тройной панели из блока железа +tile.rpcov6s.lapis.name=Рейка тройной панели из лазуритового блока +tile.rpcov6s.marble.name=Рейка тройной панели из мрамора +tile.rpcov6s.marbleBrick.name=Рейка тройной панели из мраморного кирпича +tile.rpcov6s.moss.name=Рейка тройной панели из булыжника со мхом +tile.rpcov6s.netherbrick.name=Рейка тройной панели из адского кирпича +tile.rpcov6s.netherrack.name=Рейка тройной панели из адского камня +tile.rpcov6s.obsidian.name=Рейка тройной панели из обсидиана +tile.rpcov6s.planks.name=Рейка тройной панели из досок +tile.rpcov6s.planks1.name=Рейка тройной панели из досок +tile.rpcov6s.planks2.name=Рейка тройной панели из досок +tile.rpcov6s.planks3.name=Рейка тройной панели из досок +tile.rpcov6s.pumpkin.name=Рейка тройной панели из тыквы +tile.rpcov6s.rplog.name=Рейка тройной панели из каучукового дерева +tile.rpcov6s.rubyBlock.name=Рейка тройной панели из рубинового блока +tile.rpcov6s.sandstone.name=Рейка тройной панели из песчаника +tile.rpcov6s.sandstone1.name=Рейка тройной панели из песчаника +tile.rpcov6s.sandstone2.name=Рейка тройной панели из песчаника +tile.rpcov6s.sapphireBlock.name=Рейка тройной панели из сапфирового блока +tile.rpcov6s.silverBlock.name=Рейка тройной панели из блока серебра +tile.rpcov6s.slab.name=Рейка тройной панели из каменных ступенек +tile.rpcov6s.snow.name=Рейка тройной панели из снега +tile.rpcov6s.soul.name=Рейка тройной панели из песка душ +tile.rpcov6s.stone.name=Рейка тройной панели из камня +tile.rpcov6s.stonebrick.name=Рейка тройной панели из каменного кирпича +tile.rpcov6s.stonebrick1.name=Рейка тройной панели из каменного кирпича +tile.rpcov6s.stonebrick2.name=Рейка тройной панели из каменного кирпича +tile.rpcov6s.stonebrick3.name=Рейка тройной панели из каменного кирпича +tile.rpcov6s.tinBlock.name=Рейка тройной панели из блока олова +tile.rpcov6s.tungstenBlock.name=Рейка тройной панели из блока вольфрама +tile.rpcov6s.wood.name=Рейка тройной панели из дерева +tile.rpcov6s.wood1.name=Рейка тройной панели из дерева +tile.rpcov6s.wood2.name=Рейка тройной панели из дерева +tile.rpcov6s.wood3.name=Рейка тройной панели из дерева +tile.rpcov6s.wool.black.name=Рейка тройной панели из черной шерсти +tile.rpcov6s.wool.blue.name=Рейка тройной панели из синей шерсти +tile.rpcov6s.wool.brown.name=Рейка тройной панели из коричневой шерсти +tile.rpcov6s.wool.cyan.name=Рейка тройной панели из бирюзовой шерсти +tile.rpcov6s.wool.gray.name=Рейка тройной панели из серой шерсти +tile.rpcov6s.wool.green.name=Рейка тройной панели из зеленой шерсти +tile.rpcov6s.wool.lightBlue.name=Рейка тройной панели из голубой шерсти +tile.rpcov6s.wool.lime.name=Рейка тройной панели из лаймовой шерсти +tile.rpcov6s.wool.magenta.name=Рейка тройной панели из пурпурной шерсти +tile.rpcov6s.wool.orange.name=Рейка тройной панели из оранжевой шерсти +tile.rpcov6s.wool.pink.name=Рейка тройной панели из розовой шерсати +tile.rpcov6s.wool.purple.name=Рейка тройной панели из фиолетовой шерсти +tile.rpcov6s.wool.red.name=Рейка тройной панели из красной шерсти +tile.rpcov6s.wool.silver.name=Рейка тройной панели из светло-серой шерсти +tile.rpcov6s.wool.white.name=Рейка тройной панели из белой шерсти +tile.rpcov6s.wool.yellow.name=Рейка тройной панели из желтой шерсти +tile.rpcov7.basalt.name=Антипокрытие из базальта +tile.rpcov7.basaltBrick.name=Антипокрытие из базальтового кирпича +tile.rpcov7.basaltCircle.name=Антипокрытие из резного базальтового кирпича +tile.rpcov7.basaltCobble.name=Антипокрытие из базальтового булыжника +tile.rpcov7.basaltPaver.name=Антипокрытие из базальтового асфальта +tile.rpcov7.books.name=Антипокрытие из книжной полки +tile.rpcov7.brick.name=Антипокрытие из кирпича +tile.rpcov7.clay.name=Антипокрытие из глины +tile.rpcov7.cobble.name=Антипокрытие из булыжника +tile.rpcov7.copperBlock.name=Антипокрытие из блока меди +tile.rpcov7.diamond.name=Антипокрытие из алмазного блока +tile.rpcov7.dirt.name=Антипокрытие из земли +tile.rpcov7.emeraldBlock.name=Антипокрытие из изумрудного блока +tile.rpcov7.glass.name=Антипокрытие из стекла +tile.rpcov7.gold.name=Антипокрытие из блока золота +tile.rpcov7.greenSapphireBlock.name=Антипокрытие из сапфирового блока +tile.rpcov7.iron.name=Антипокрытие из блока железа +tile.rpcov7.lapis.name=Антипокрытие из лазуритового блока +tile.rpcov7.marble.name=Антипокрытие из мрамора +tile.rpcov7.marbleBrick.name=Антипокрытие из мраморного кирпича +tile.rpcov7.moss.name=Антипокрытие из булыжника со мхом +tile.rpcov7.netherbrick.name=Антипокрытие из адского кирпича +tile.rpcov7.netherrack.name=Антипокрытие из адского камня +tile.rpcov7.obsidian.name=Антипокрытие из обсидиана +tile.rpcov7.planks.name=Антипокрытие из досок +tile.rpcov7.planks1.name=Антипокрытие из досок +tile.rpcov7.planks2.name=Антипокрытие из досок +tile.rpcov7.planks3.name=Антипокрытие из досок +tile.rpcov7.pumpkin.name=Антипокрытие из тыквы +tile.rpcov7.rplog.name=Антипокрытие из каучукового дерева +tile.rpcov7.rubyBlock.name=Антипокрытие из рубинового блока +tile.rpcov7.sandstone.name=Антипокрытие из песчаника +tile.rpcov7.sandstone1.name=Антипокрытие из песчаника +tile.rpcov7.sandstone2.name=Антипокрытие из песчаника +tile.rpcov7.sapphireBlock.name=Антипокрытие из сапфирового блока +tile.rpcov7.silverBlock.name=Антипокрытие из блока серебра +tile.rpcov7.slab.name=Антипокрытие из каменных ступенек +tile.rpcov7.snow.name=Антипокрытие из снега +tile.rpcov7.soul.name=Антипокрытие из песка душ +tile.rpcov7.stone.name=Антипокрытие из камня +tile.rpcov7.stonebrick.name=Антипокрытие из каменного кирпича +tile.rpcov7.stonebrick1.name=Антипокрытие из каменного кирпича +tile.rpcov7.stonebrick2.name=Антипокрытие из каменного кирпича +tile.rpcov7.stonebrick3.name=Антипокрытие из каменного кирпича +tile.rpcov7.tinBlock.name=Антипокрытие из блока олова +tile.rpcov7.tungstenBlock.name=Антипокрытие из блока вольфрама +tile.rpcov7.wood.name=Антипокрытие из дерева +tile.rpcov7.wood1.name=Антипокрытие из дерева +tile.rpcov7.wood2.name=Антипокрытие из дерева +tile.rpcov7.wood3.name=Антипокрытие из досок +tile.rpcov7.wool.black.name=Антипокрытие из черной шерсти +tile.rpcov7.wool.blue.name=Антипокрытие из синей шерсти +tile.rpcov7.wool.brown.name=Антипокрытие из коричневого дерева +tile.rpcov7.wool.cyan.name=Антипокрытие из бирюзовой шерсти +tile.rpcov7.wool.gray.name=Антипокрытие из серой шерсти +tile.rpcov7.wool.green.name=Антипокрытие из зеленой шерсти +tile.rpcov7.wool.lightBlue.name=Антипокрытие из голубой шерсти +tile.rpcov7.wool.lime.name=Антипокрытие из лаймовой шерсти +tile.rpcov7.wool.magenta.name=Антипокрытие из пурпурной шерсти +tile.rpcov7.wool.orange.name=Антипокрытие из оранжевой шерсти +tile.rpcov7.wool.pink.name=Антипокрытие из розовой шерсти +tile.rpcov7.wool.purple.name=Антипокрытие из фиолетовой шерсти +tile.rpcov7.wool.red.name=Антипокрытие из красной шерсти +tile.rpcov7.wool.silver.name=Антипокрытие из светло-серой шерсти +tile.rpcov7.wool.white.name=Антипокрытие из белой шерсти +tile.rpcov7.wool.yellow.name=Антипокрытие из желтой шерсти +tile.rpcov7c.basalt.name=Угол антипокрытия из базальта +tile.rpcov7c.basaltBrick.name=Угол антипокрытия из базальтового кирпича +tile.rpcov7c.basaltCircle.name=Угол антипокрытия из резного базальтового кирпича +tile.rpcov7c.basaltCobble.name=Угол антипокрытия из базальтового булыжника +tile.rpcov7c.basaltPaver.name=Угол антипокрытия из базальтового асфальта +tile.rpcov7c.books.name=Угол антипокрытия из книжной полки +tile.rpcov7c.brick.name=Угол антипокрытия из кирпича +tile.rpcov7c.clay.name=Угол антипокрытия из глины +tile.rpcov7c.cobble.name=Угол антипокрытия из булыжника +tile.rpcov7c.copperBlock.name=Угол антипокрытия из блока меди +tile.rpcov7c.diamond.name=Угол антипокрытия из алмазного блока +tile.rpcov7c.dirt.name=Угол антипокрытия из земли +tile.rpcov7c.emeraldBlock.name=Угол антипокрытия из изумрудного блока +tile.rpcov7c.glass.name=Угол антипокрытия из кирпича +tile.rpcov7c.gold.name=Угол антипокрытия из блока золота +tile.rpcov7c.greenSapphireBlock.name=Угол антипокрытия из блока зеленого сапфира +tile.rpcov7c.iron.name=Угол антипокрытия из блока железа +tile.rpcov7c.lapis.name=Угол антипокрытия из лазуритового блока +tile.rpcov7c.marble.name=Угол антипокрытия из мрамора +tile.rpcov7c.marbleBrick.name=Угол антипокрытия из мраморного кирпича +tile.rpcov7c.moss.name=Угол антипокрытия из булыжника со мхом +tile.rpcov7c.netherbrick.name=Угол антипокрытия из адского кирпича +tile.rpcov7c.netherrack.name=Угол антипокрытия из адского камня +tile.rpcov7c.obsidian.name=Угол антипокрытия из обсидиана +tile.rpcov7c.planks.name=Угол антипокрытия из досок +tile.rpcov7c.planks1.name=Угол антипокрытия из досок +tile.rpcov7c.planks2.name=Угол антипокрытия из досок +tile.rpcov7c.planks3.name=Угол антипокрытия из досок +tile.rpcov7c.pumpkin.name=Угол антипокрытия из тыквы +tile.rpcov7c.rplog.name=Угол антипокрытия из каучукового дерева +tile.rpcov7c.rubyBlock.name=Угол антипокрытия из рубинового блока +tile.rpcov7c.sandstone.name=Угол антипокрытия из песчаника +tile.rpcov7c.sandstone1.name=Угол антипокрытия из песчаника +tile.rpcov7c.sandstone2.name=Угол антипокрытия из песчаника +tile.rpcov7c.sapphireBlock.name=Угол антипокрытия из сапфирового блока +tile.rpcov7c.silverBlock.name=Угол антипокрытия из блока серебра +tile.rpcov7c.slab.name=Угол антипокрытия из каменных ступенек +tile.rpcov7c.snow.name=Угол антипокрытия из снега +tile.rpcov7c.soul.name=Угол антипокрытия из песка душ +tile.rpcov7c.stone.name=Угол антипокрытия из камня +tile.rpcov7c.stonebrick.name=Угол антипокрытия из каменного кирпича +tile.rpcov7c.stonebrick1.name=Угол антипокрытия из каменного кирпича +tile.rpcov7c.stonebrick2.name=Угол антипокрытия из каменного кирпича +tile.rpcov7c.stonebrick3.name=Угол антипокрытия из каменного кирпича +tile.rpcov7c.tinBlock.name=Угол антипокрытия из блока олова +tile.rpcov7c.tungstenBlock.name=Угол антипокрытия из блока вольфрама +tile.rpcov7c.wood.name=Угол антипокрытия из дерева +tile.rpcov7c.wood1.name=Угол антипокрытия из дерева +tile.rpcov7c.wood2.name=Угол антипокрытия из дерева +tile.rpcov7c.wood3.name=Угол антипокрытия из дерева +tile.rpcov7c.wool.black.name=Угол антипокрытия из черной шерсти +tile.rpcov7c.wool.blue.name=Угол антипокрытия из синей шерсти +tile.rpcov7c.wool.brown.name=Угол антипокрытия из коричневой шерсти +tile.rpcov7c.wool.cyan.name=Угол антипокрытия из бирюзовой шерсти +tile.rpcov7c.wool.gray.name=Угол антипокрытие из серой шерсти +tile.rpcov7c.wool.green.name=Угол антипокрытия из зеленой шерсти +tile.rpcov7c.wool.lightBlue.name=Угол антипокрытия из голубой шерсти +tile.rpcov7c.wool.lime.name=Угол антипокрытия из лаймовой шерсти +tile.rpcov7c.wool.magenta.name=Угол антипокрытия из пурпурной шерсти +tile.rpcov7c.wool.orange.name=Угол антипокрытия из оранжевой шерсти +tile.rpcov7c.wool.pink.name=Угол антипокрытия из розовой шерсти +tile.rpcov7c.wool.purple.name=Угол антипокрытия из фиолетовой шерсти +tile.rpcov7c.wool.red.name=Угол антипокрытия из красной шерсти +tile.rpcov7c.wool.silver.name=Угол антипокрытия из светло-серой шерсти +tile.rpcov7c.wool.white.name=Угол антипокрытия из белой шерсти +tile.rpcov7c.wool.yellow.name=Угол антипокрытия из желтой шерсти +tile.rpcov7s.basalt.name=Рейка антипокрытия из базальта +tile.rpcov7s.basaltBrick.name=Рейка антипокрытия из базальтового кирпича +tile.rpcov7s.basaltCircle.name=Рейка антипокрытия из резного базальтового блока +tile.rpcov7s.basaltCobble.name=Рейка антипокрытия из базальтового булыжника +tile.rpcov7s.basaltPaver.name=Рейка антипокрытия из базальтового асфальта +tile.rpcov7s.books.name=Рейка антипокрытия из книжной полки +tile.rpcov7s.brick.name=Рейка антипокрытия из кирпича +tile.rpcov7s.clay.name=Рейка антипокрытия из глины +tile.rpcov7s.cobble.name=Рейка антипокрытия из булыжника +tile.rpcov7s.copperBlock.name=Рейка антипокрытия из блока меди +tile.rpcov7s.diamond.name=Рейка антипокрытия из алмазного блока +tile.rpcov7s.dirt.name=Рейка антипокрытия из земли +tile.rpcov7s.emeraldBlock.name=Рейка антипокрытия из изумрудного блока +tile.rpcov7s.glass.name=Рейка антипокрытия из кирпича +tile.rpcov7s.gold.name=Рейка антипокрытия из блока золота +tile.rpcov7s.greenSapphireBlock.name=Рейка антипокрытия из блока зеленого сапфира +tile.rpcov7s.iron.name=Рейка антипокрытия из блока железа +tile.rpcov7s.lapis.name=Рейка антипокрытия из лазуритового блока +tile.rpcov7s.marble.name=Рейка антипокрытия из мрамора +tile.rpcov7s.marbleBrick.name=Рейка антипокрытия из мраморного кирпича +tile.rpcov7s.moss.name=Рейка антипокрытия из булыжника со мхом +tile.rpcov7s.netherbrick.name=Рейка антипокрытия из адского кирпича +tile.rpcov7s.netherrack.name=Рейка антипокрытия из адского камня +tile.rpcov7s.obsidian.name=Рейка антипокрытия из стекла +tile.rpcov7s.planks.name=Рейка антипокрытия из досок +tile.rpcov7s.planks1.name=Рейка антипокрытия из досок +tile.rpcov7s.planks2.name=Рейка антипокрытия из досок +tile.rpcov7s.planks3.name=Рейка антипокрытия из досок +tile.rpcov7s.pumpkin.name=Рейка антипокрытия из тыквы +tile.rpcov7s.rplog.name=Рейка антипокрытия из каучукового дерева +tile.rpcov7s.rubyBlock.name=Рейка антипокрытия из рубинового блока +tile.rpcov7s.sandstone.name=Рейка антипокрытия из песчаника +tile.rpcov7s.sandstone1.name=Рейка антипокрытия из песчаника +tile.rpcov7s.sandstone2.name=Рейка антипокрытия из песчаника +tile.rpcov7s.sapphireBlock.name=Рейка антипокрытия из сапфирового блока +tile.rpcov7s.silverBlock.name=Рейка антипокрытия из блока серебра +tile.rpcov7s.slab.name=Рейка антипокрытия из каменных ступенек +tile.rpcov7s.snow.name=Рейка антипокрытия из снега +tile.rpcov7s.soul.name=Рейка антипокрытия из песка душ +tile.rpcov7s.stone.name=Рейка антипокрытия из камня +tile.rpcov7s.stonebrick.name=Рейка антипокрытия из каменного кирпича +tile.rpcov7s.stonebrick1.name=Рейка антипокрытия из каменного кирпича +tile.rpcov7s.stonebrick2.name=Рейка антипокрытия из каменного кирпича +tile.rpcov7s.stonebrick3.name=Рейка антипокрытия из каменного кирпича +tile.rpcov7s.tinBlock.nametinBlock.name=Рейка антипокрытия из блока олова +tile.rpcov7s.tungstenBlock.nametinBlock.name=Рейка антипокрытия из блока вольфрама +tile.rpcov7s.wood.name=Рейка антипокрытия из дерева +tile.rpcov7s.wood1.name=Рейка антипокрытия из дерева +tile.rpcov7s.wood2.name=Рейка антипокрытия из дерева +tile.rpcov7s.wood3.name=Рейка антипокрытия из дерева +tile.rpcov7s.wool.black.name=Рейка антипокрытия из черной шерсти +tile.rpcov7s.wool.blue.name=Рейка антипокрытия из синей шерсти +tile.rpcov7s.wool.brown.name=Рейка антипокрытия из коричневой шерсти +tile.rpcov7s.wool.cyan.name=Рейка антипокрытия из бирюзовой шерсти +tile.rpcov7s.wool.gray.name=Рейка антипокрытия из серой шерсти +tile.rpcov7s.wool.green.name=Рейка антипокрытия из зеленой шерсти +tile.rpcov7s.wool.lightBlue.name=Рейка антипокрытия из голубой шерсти +tile.rpcov7s.wool.lime.name=Рейка антипокрытия из лаймовой шерсти +tile.rpcov7s.wool.magenta.name=Рейка антипокрытия из пурпурной шерсти +tile.rpcov7s.wool.orange.name=Рейка антипокрытия из оранжевой шерсти +tile.rpcov7s.wool.pink.name=Рейка антипокрытия из розовой шерсти +tile.rpcov7s.wool.purple.name=Рейка антипокрытия из фиолетовой шерсти +tile.rpcov7s.wool.red.name=Рейка антипокрытия из красной шерсти +tile.rpcov7s.wool.silver.name=Рейка антипокрытия из светло-серой шерсти +tile.rpcov7s.wool.white.name=Рейка антипокрытия из белой шерсти +tile.rpcov7s.wool.yellow.name=Рейка антипокрытия из желтой шерсти +tile.rpcovc.basalt.name=Угол покрытия из базальта +tile.rpcovc.basaltBrick.name=Угол покрытия из базальтового кирпича +tile.rpcovc.basaltCircle.name=Угол покрытия из резного базальтового кирпича +tile.rpcovc.basaltCobble.name=Угол покрытия из базальтового булыжника +tile.rpcovc.basaltPaver.name=Угол покрытия из базальтового асфальта +tile.rpcovc.books.name=Угол покрытия из книжной полки +tile.rpcovc.brick.name=Угол покрытия из кирпича +tile.rpcovc.clay.name=Угол покрытия из глины +tile.rpcovc.cobble.name=Угол покрытия из булыжника +tile.rpcovc.copperBlock.name=Угол покрытия из блока меди +tile.rpcovc.diamond.name=Угол покрытия из алмазного блока +tile.rpcovc.dirt.name=Угол покрытия из земли +tile.rpcovc.emeraldBlock.name=Угол покрыти я из изумрудного блока +tile.rpcovc.glass.name=Угол покрытия из стекла +tile.rpcovc.gold.name=Угол покрытия из блока золота +tile.rpcovc.greenSapphireBlock.name=Угол покрытия из блока зеленого сапфира +tile.rpcovc.iron.name=Угол покрытия из блока железа +tile.rpcovc.lapis.name=Угол покрытия из лазуритового блока +tile.rpcovc.marble.name=Угол покрытия из мрамора +tile.rpcovc.marbleBrick.name=Угол покрытия из мраморного кирпича +tile.rpcovc.moss.name=Угол покрытия из булыжника со мхом +tile.rpcovc.netherbrick.name=Угол покрытия из адского кирпича +tile.rpcovc.netherrack.name=Угол покрытия из адского камня +tile.rpcovc.obsidian.name=Угол покрытия из обсидиана +tile.rpcovc.planks.name=Угол покрытия из досок +tile.rpcovc.planks1.name=Угол покрытия из досок +tile.rpcovc.planks2.name=Угол покрытия из досок +tile.rpcovc.planks3.name=Угол покрытия из досок +tile.rpcovc.pumpkin.name=Угол покрытия из тыквы +tile.rpcovc.rplog.name=Угол покрытия из каучукового дерева +tile.rpcovc.rubyBlock.name=Угол покрытия из рубинового блока +tile.rpcovc.sandstone.name=Угол покрытия из песчаника +tile.rpcovc.sandstone1.name=Угол покрытия из песчаника +tile.rpcovc.sandstone2.name=Угол покрытия из песчаника +tile.rpcovc.sapphireBlock.name=Угол покрытия из сапфирового блока +tile.rpcovc.silverBlock.name=Угол покрытия из блока серебра +tile.rpcovc.slab.name=Угол покрытия из каменных ступенек +tile.rpcovc.snow.name=Угол покрытия из снега +tile.rpcovc.soul.name=Угол покрытия из песка душ +tile.rpcovc.stone.name=Угол покрытия из камня +tile.rpcovc.stonebrick.name=Угол покрытия из каменного кирпича +tile.rpcovc.stonebrick1.name=Угол покрытия из каменного кирпича +tile.rpcovc.stonebrick2.name=Угол покрытия из каменного кирпича +tile.rpcovc.stonebrick3.name=Угол покрытия из каменного кирпича +tile.rpcovc.tinBlock.name=Угол покрытия из блока олова +tile.rpcovc.tungstenBlock.name=Угол покрытия из блока вольфрама +tile.rpcovc.wood.name=Угол покрытия из дерева +tile.rpcovc.wood1.name=Угол покрытия из дерева +tile.rpcovc.wood2.name=Угол покрытия из дерева +tile.rpcovc.wood3.name=Угол покрытия из дерева +tile.rpcovc.wool.black.name=Угол покрытия из черной шерсти +tile.rpcovc.wool.blue.name=Угол покрытия из синей шерсти +tile.rpcovc.wool.brown.name=Угол покрытия из коричневой шерсти +tile.rpcovc.wool.cyan.name=Угол покрытия из бирюзовой шерсти +tile.rpcovc.wool.gray.name=Угол покрытия из серой шерсти +tile.rpcovc.wool.green.name=Угол покрытия из зеленой шерсти +tile.rpcovc.wool.lightBlue.name=Угол покрытия из голубой шерсти +tile.rpcovc.wool.lime.name=Угол покрытия из лаймовой шерсти +tile.rpcovc.wool.magenta.name=Угол покрытия из пурпурной шерсти +tile.rpcovc.wool.orange.name=Угол покрытия из оранжевой шерсти +tile.rpcovc.wool.pink.name=Угол покрытия из розовой шерсти +tile.rpcovc.wool.purple.name=Угол покрытия из фиолетовой шерсти +tile.rpcovc.wool.red.name=Угол покрытия из красной шерсти +tile.rpcovc.wool.silver.name=Угол покрытия из светло-серой шерсти +tile.rpcovc.wool.white.name=Угол покрытия из белой шерсти +tile.rpcovc.wool.yellow.name=Угол покрытия из желтой шерсти +tile.rpcover.basalt.name=Покрытие из базальта +tile.rpcover.basaltBrick.name=Покрытие из базальтового кирпича +tile.rpcover.basaltCircle.name=Покрытие из резного базальтового кирпича +tile.rpcover.basaltCobble.name=Покрытие из базальтового булыжника +tile.rpcover.basaltPaver.name=Покрытие из базальтового асфальта +tile.rpcover.books.name=Покрытие из книжной полки +tile.rpcover.brick.name=Покрытие из кирпича +tile.rpcover.clay.name=Покрытие из глины +tile.rpcover.cobble.name=Покрытие из булыжника +tile.rpcover.copperBlock.name=Покрытие из блока меди +tile.rpcover.diamond.name=Покрытие из алмазного блока +tile.rpcover.dirt.name=Покрытие из земли +tile.rpcover.emeraldBlock.name=Покрытие из изумрудного блока +tile.rpcover.glass.name=Покрытие из стекла +tile.rpcover.gold.name=Покрытие из блока золота +tile.rpcover.greenSapphireBlock.name=Покрытие из блока серебра +tile.rpcover.iron.name=Покрытие из блока железа +tile.rpcover.lapis.name=Покрытие из лазуритового блока +tile.rpcover.marble.name=Покрытие из мрамора +tile.rpcover.marbleBrick.name=Покрытие из мраморного кирпича +tile.rpcover.moss.name=Покрытие из булыжника со мхом +tile.rpcover.netherbrick.name=Покрытие из адского кирпича +tile.rpcover.netherrack.name=Покрытие из адского камня +tile.rpcover.obsidian.name=Покрытие из обсидиана +tile.rpcover.planks.name=Покрытие из досок +tile.rpcover.planks1.name=Покрытие из досок +tile.rpcover.planks2.name=Покрытие из досок +tile.rpcover.planks3.name=Покрытие из досок +tile.rpcover.pumpkin.name=Покрытие из тыквы +tile.rpcover.rplog.name=Покрытие из каучукового дерева +tile.rpcover.rubyBlock.name=Покрытие из рубинового блока +tile.rpcover.sandstone.name=Покрытие из песчаника +tile.rpcover.sandstone1.name=Покрытие из песчаника +tile.rpcover.sandstone2.name=Покрытие из песчаника +tile.rpcover.sapphireBlock.name=Покрытие из сапфирового блока +tile.rpcover.silverBlock.name=Покрытие из блока серебра +tile.rpcover.slab.name=Покрытие из каменных ступенек +tile.rpcover.snow.name=Покрытие из снега +tile.rpcover.soul.name=Покрытие из песка душ +tile.rpcover.stone.name=Покрытие из камня +tile.rpcover.stonebrick.name=Покрытие из каменного кирпича +tile.rpcover.stonebrick1.name=Покрытие из каменного кирпича +tile.rpcover.stonebrick2.name=Покрытие из каменного кирпича +tile.rpcover.stonebrick3.name=Покрытие из каменного кирпича +tile.rpcover.tinBlock.name=Покрытие из блока олова +tile.rpcover.tungstenBlock.name=Покрытие из блока вольфрама +tile.rpcover.wood.name=Покрытие из дерева +tile.rpcover.wood1.name=Покрытие из дерева +tile.rpcover.wood2.name=Покрытие из дерева +tile.rpcover.wood3.name=Покрытие из дерева +tile.rpcover.wool.black.name=Покрытие из черной шерсти +tile.rpcover.wool.blue.name=Покрытие из синей шерсти +tile.rpcover.wool.brown.name=Покрытие из коричневой шерсти +tile.rpcover.wool.cyan.name=Покрытие из бирюзовой шерсти +tile.rpcover.wool.gray.name=Покрытие из серой шерсти +tile.rpcover.wool.green.name=Покрытие из зеленой шерсти +tile.rpcover.wool.lightBlue.name=Покрытие из голубой шерсти +tile.rpcover.wool.lime.name=Покрытие из лаймовой шерсти +tile.rpcover.wool.magenta.name=Покрытие из пурпурной шерсти +tile.rpcover.wool.orange.name=Покрытие из оранжевой шерсти +tile.rpcover.wool.pink.name=Покрытие из розовой шерсти +tile.rpcover.wool.purple.name=Покрытие из фиолетовой шерсти +tile.rpcover.wool.red.name=Покрытие из красной шерсти +tile.rpcover.wool.silver.name=Покрытие из светло-серой шерсти +tile.rpcover.wool.white.name=Покрытие из белой шерсти +tile.rpcover.wool.yellow.name=Покрытие из желтой шерсти +tile.rpcovs.basalt.name=Рейка покрытия из базальта +tile.rpcovs.basaltBrick.name=Рейка покрытия из базальтового кирпича +tile.rpcovs.basaltCircle.name=Рейка покрытия из резного базальтового кирпича +tile.rpcovs.basaltCobble.name=Рейка покрытия из базальтового булыжника +tile.rpcovs.basaltPaver.name=Рейка покрытия из базальтового асфальта +tile.rpcovs.books.name=Рейка покрытия из книжной полки +tile.rpcovs.brick.name=Рейка покрытия из кирпича +tile.rpcovs.clay.name=Рейка покрытия из глины +tile.rpcovs.cobble.name=Рейка покрытия из булыжника +tile.rpcovs.copperBlock.name=Рейка покрытия из блока меди +tile.rpcovs.diamond.name=Рейка покрытия из алмазного блока +tile.rpcovs.dirt.name=Рейка покрытия из земли +tile.rpcovs.emeraldBlock.name=Рейка покрытия из изумрудного блока +tile.rpcovs.glass.name=Рейка покрытия из стекла +tile.rpcovs.gold.name=Рейка покрытия из блока золота +tile.rpcovs.greenSapphireBlock.name=Рейка покрытия из блока зеленого сапфира +tile.rpcovs.iron.name=Рейка покрытия из блока железа +tile.rpcovs.lapis.name=Рейка покрытия из лазуритового блока +tile.rpcovs.marble.name=Рейка покрытия из мрамора +tile.rpcovs.marbleBrick.name=Рейка покрытия из мраморного кирпича +tile.rpcovs.moss.name=Рейка покрытия из булыжника со мхом +tile.rpcovs.netherbrick.name=Рейка покрытия из адского кирпича +tile.rpcovs.netherrack.name=Рейка покрытия из адского камня +tile.rpcovs.obsidian.name=Рейка покрытия из обсидиана +tile.rpcovs.planks.name=Рейка покрытия из досок +tile.rpcovs.planks1.name=Рейка покрытия из досок +tile.rpcovs.planks2.name=Рейка покрытия из досок +tile.rpcovs.planks3.name=Рейка покрытия из досок +tile.rpcovs.pumpkin.name=Рейка покрытия из тыквы +tile.rpcovs.rplog.name=Рейка покрытия из каучукового дерева +tile.rpcovs.rubyBlock.name=Рейка покрытия из рубинового блока +tile.rpcovs.sandstone.name=Рейка покрытия из песчаника +tile.rpcovs.sandstone1.name=Рейка покрытия из песчаника +tile.rpcovs.sandstone2.name=Рейка покрытия из песчаника +tile.rpcovs.sapphireBlock.name=Рейка покрытия из сапфирового блока +tile.rpcovs.silverBlock.name=Рейка покрытия из блока серебра +tile.rpcovs.slab.name=Рейка покрытия из каменных ступенек +tile.rpcovs.snow.name=Рейка покрытия из снега +tile.rpcovs.soul.name=Рейка покрытия из песка душ +tile.rpcovs.stone.name=Рейка покрытия из камня +tile.rpcovs.stonebrick.name=Рейка покрытия из каменного кирпича +tile.rpcovs.stonebrick1.name=Рейка покрытия из каменного кирпича +tile.rpcovs.stonebrick2.name=Рейка покрытия из каменного кирпича +tile.rpcovs.stonebrick3.name=Рейка покрытия из каменного кирпича +tile.rpcovs.tinBlock.name=Рейка покрытия из блока олова +tile.rpcovs.tungstenBlock.name=Рейка покрытия из блока вольфрама +tile.rpcovs.wood.name=Рейка покрытия из дерева +tile.rpcovs.wood1.name=Рейка покрытия из дерева +tile.rpcovs.wood2.name=Рейка покрытия из дерева +tile.rpcovs.wood3.name=Рейка покрытия из дерева +tile.rpcovs.wool.black.name=Рейка покрытия из черной шерсти +tile.rpcovs.wool.blue.name=Рейка покрытия из синей шерсти +tile.rpcovs.wool.brown.name=Рейка покрытия из коричневой шерсти +tile.rpcovs.wool.cyan.name=Рейка покрытия из бирюзовой шерсти +tile.rpcovs.wool.gray.name=Рейка покрытия из серой шерсти +tile.rpcovs.wool.green.name=Рейка покрытия из зеленой шерсти +tile.rpcovs.wool.lightBlue.name=Рейка покрытия из голубой шерсти +tile.rpcovs.wool.lime.name=Рейка покрытия из лаймовой шерсти +tile.rpcovs.wool.magenta.name=Рейка покрытия из пурпурной шерсти +tile.rpcovs.wool.orange.name=Рейка покрытия из оранжевой шерсти +tile.rpcovs.wool.pink.name=Рейка покрытия из розовой шерсти +tile.rpcovs.wool.purple.name=Рейка покрытия из фиолетовой шерсти +tile.rpcovs.wool.red.name=Рейка покрытия из красной шерсти +tile.rpcovs.wool.silver.name=Рейка покрытия из светло-серой шерсти +tile.rpcovs.wool.white.name=Рейка покрытия из белой шерсти +tile.rpcovs.wool.yellow.name=Рейка покрытия из желтой шерсти +tile.rphcov3.basalt.name=Полое тройное покрытие из базальта +tile.rphcov3.basaltBrick.name=Полое тройное покрытие из базальтового кирпича +tile.rphcov3.basaltCircle.name=Полое тройное покрытие из резного базальтового кирпича +tile.rphcov3.basaltCobble.name=Полое тройное покрытие из базальтового булыжника +tile.rphcov3.basaltPaver.name=Полое тройное покрытие из базальтового асфальта +tile.rphcov3.books.name=Полое тройное покрытие из книжной полки +tile.rphcov3.brick.name=Полое тройное покрытие из кирпича +tile.rphcov3.clay.name=Полое тройное покрытие из глины +tile.rphcov3.cobble.name=Полое тройное покрытие из булыжника +tile.rphcov3.copperBlock.name=Полое тройное покртыие из блока меди +tile.rphcov3.diamond.name=Полое тройное покрытие из алмазного блока +tile.rphcov3.dirt.name=Полое тройное покрытие из земли +tile.rphcov3.emeraldBlock.name=Полое тройное покрытие из изумрудного блока +tile.rphcov3.glass.name=Полое тройное покрытие из стекла +tile.rphcov3.gold.name=Полое тройное покрытие из блока золота +tile.rphcov3.greenSapphireBlock.name=Полое тройное покрытие из блока зеленого сапфира +tile.rphcov3.iron.name=Полое тройное покрытие из блока железа +tile.rphcov3.lapis.name=Полое тройное покрытие из лазуритового блока +tile.rphcov3.marble.name=Полое тройное покрытие из мрамора +tile.rphcov3.marbleBrick.name=Полое тройное покрытие из мраморонго кирпича +tile.rphcov3.moss.name=Полое тройное покрытие из булыжника со мхом +tile.rphcov3.netherbrick.name=Полое тройное покрытие из адского кирпича +tile.rphcov3.netherrack.name=Полое тройное покрытие из адского камня +tile.rphcov3.obsidian.name=Полое тройное покрытие из обсидиана +tile.rphcov3.planks.name=Полое тройное покрытие из досок +tile.rphcov3.planks1.name=Полое тройное покрытие из досок +tile.rphcov3.planks2.name=Полое тройное покрытие из досок +tile.rphcov3.planks3.name=Полое тройное покрытие из досок +tile.rphcov3.pumpkin.name=Полое тройное покрытие из тыквы +tile.rphcov3.rplog.name=Полое тройное покрытие из каучукового дерева +tile.rphcov3.rubyBlock.name=Полое тройное покрытие из рубинового блока +tile.rphcov3.sandstone.name=Полое тройное покрытие из песчаника +tile.rphcov3.sandstone1.name=Полое тройное покрытие из песчаника +tile.rphcov3.sandstone2.name=Полое тройное покрытие из песчаника +tile.rphcov3.sapphireBlock.name=Полое тройное покрытие из сапфирового блока +tile.rphcov3.silverBlock.name=Полое тройное покрытие из блока серебра +tile.rphcov3.slab.name=Полое тройное покрытие из каменных ступенек +tile.rphcov3.snow.name=Полое тройное покрытие из снега +tile.rphcov3.soul.name=Полое тройное покрытие из песка душ +tile.rphcov3.stone.name=Полое тройное покрытие из камня +tile.rphcov3.stonebrick.name=Полое тройное покрытие из каменного кирпича +tile.rphcov3.stonebrick1.name=Полое тройное покрытие из каменного кирпича +tile.rphcov3.stonebrick2.name=Полое тройное покрытие из каменного кирпича +tile.rphcov3.stonebrick3.name=Полое тройной покрытие из каменного кирпича +tile.rphcov3.tinBlock.name=Полое тройное покрытие из блока олова +tile.rphcov3.tungstenBlock.name=Полое тройное покрытие из блока вольфрама +tile.rphcov3.wood.name=Полое тройное покрытие из дерева +tile.rphcov3.wood1.name=Полое тройное покрытие из дерева +tile.rphcov3.wood2.name=Полое тройное покрытие из дерева +tile.rphcov3.wood3.name=Полое тройное покрытие из дерева +tile.rphcov3.wool.black.name=Полое тройное покрытие из черной шерсти +tile.rphcov3.wool.blue.name=Полое тройное покрытие из синей шерсти +tile.rphcov3.wool.brown.name=Полое тройное покрытие из коричневой шерсти +tile.rphcov3.wool.cyan.name=Полое тройное покрытие из бирюзовой шерсти +tile.rphcov3.wool.gray.name=Полое тройное покрытие из серой шерсти +tile.rphcov3.wool.green.name=Полое тройное покрытие из зеленой шерсти +tile.rphcov3.wool.lightBlue.name=Полое тройное покрытие из голубой шерсти +tile.rphcov3.wool.lime.name=Полое тройное покрытие из лаймовой шерсти +tile.rphcov3.wool.magenta.name=Полое тройное покрытие из пурпурной шерсти +tile.rphcov3.wool.orange.name=Полое тройное покрытие из оранжевой шерсти +tile.rphcov3.wool.pink.name=Полое тройное покрытие из розовой шерсти +tile.rphcov3.wool.purple.name=Полое тройное покрытие из фиолетовой шерсти +tile.rphcov3.wool.red.name=Полое тройное покрытие из красной шерсти +tile.rphcov3.wool.silver.name=Полое тройное покрытие из светло-серой шерсти +tile.rphcov3.wool.white.name=Полое тройное покрытие из белой шерсти +tile.rphcov3.wool.yellow.name=Полое тройное покрытие из желтой шерсти +tile.rphcov5.basalt.name=Полое плиточное покрытие из базальта +tile.rphcov5.basaltBrick.name=Полое плиточное покрытие из базальтового кирпича +tile.rphcov5.basaltCircle.name=Полое плиточное покрытие из резного базальтового кирпича +tile.rphcov5.basaltCobble.name=Полое плиточное покрытие из базальтового булыжника +tile.rphcov5.basaltPaver.name=Полое плиточное покрытие из базальтового асфальта +tile.rphcov5.books.name=Полое плиточное покрытие из книжной полки +tile.rphcov5.brick.name=Полое плиточное покрытие из кирпича +tile.rphcov5.clay.name=Полое плиточное покрытие из глины +tile.rphcov5.cobble.name=Полое плиточное покрытие из булыжника +tile.rphcov5.copperBlock.name=Полое плиточное покрытие из блока меди +tile.rphcov5.diamond.name=Полое плиточное покрытие из алмазного блока +tile.rphcov5.dirt.name=Полое плиточное покрытие из земли +tile.rphcov5.emeraldBlock.name=Полое плиточное покрытие из изумрудного блока +tile.rphcov5.glass.name=Полое плиточное покрытие из стекла +tile.rphcov5.gold.name=Полое плиточное покрытие из блока золота +tile.rphcov5.greenSapphireBlock.name=Полое плиточное покрытие из блока зеленого сапфира +tile.rphcov5.iron.name=Полое плиточноре покрытие из блока железа +tile.rphcov5.lapis.name=Полое плиточное покрытие из лазуритового блока +tile.rphcov5.marble.name=Полое плиточное покрытие из мрамора +tile.rphcov5.marbleBrick.name=Полое плиточное покрытие из мраморного кирпича +tile.rphcov5.moss.name=Полое плиточное покрытие из булыжника со мхом +tile.rphcov5.netherbrick.name=Полое плиточное покрытие из адского кирпича +tile.rphcov5.netherrack.name=Полое плиточное покрытие из адского камня +tile.rphcov5.obsidian.name=Полое плиточное покрытие из обсидиана +tile.rphcov5.planks.name=Полое плиточное покрытие из досок +tile.rphcov5.planks1.name=Полое плиточное покрытие из досок +tile.rphcov5.planks2.name=Полое плиточное покрытие из досок +tile.rphcov5.planks3.name=Полое плиточное покрытие из досок +tile.rphcov5.pumpkin.name=Полое плиточное покрытие из тыквы +tile.rphcov5.rplog.name=Полое плиточное покрытие из каучукового дерева +tile.rphcov5.rubyBlock.name=Полое плиточное покрытие из рубинового блока +tile.rphcov5.sandstone.name=Полое плиточное покрытие из песчаника +tile.rphcov5.sandstone1.name=Полое плиточное покрытие из песчаника +tile.rphcov5.sandstone2.name=Полое плиточное покрытие из песчаника +tile.rphcov5.sapphireBlock.name=Полое плиточное покрытие из сапфирового блока +tile.rphcov5.silverBlock.name=Полое плиточное покрытие из блока серебра +tile.rphcov5.slab.name=Полое плиточное покрытие из каменных ступенек +tile.rphcov5.snow.name=Полое плиточное покрытие из снега +tile.rphcov5.soul.name=Полое плиточное покрытие из песка душ +tile.rphcov5.stone.name=Полое плиточное покрытие из камня +tile.rphcov5.stonebrick.name=Полое плиточное покрытие из каменного кирпича +tile.rphcov5.stonebrick1.name=Полое плиточное покрытие из каменного кирпича +tile.rphcov5.stonebrick2.name=Полое плиточное покрытие из каменного кирпича +tile.rphcov5.stonebrick3.name=Полое плиточное покрытие из каменного кирпича +tile.rphcov5.tinBlock.name=Полое плиточное покрытие из блока олова +tile.rphcov5.tungstenBlock.name=Полое плиточное покрытие из блока вольфрама +tile.rphcov5.wood.name=Полое плиточное покрытие из дерева +tile.rphcov5.wood1.name=Полое плиточное покрытие из дерева +tile.rphcov5.wood2.name=Полая плиточное покрытие из дерева +tile.rphcov5.wood3.name=Полое плиточное покрытие из дерева +tile.rphcov5.wool.black.name=Полое плиточное покрытие из белой шерсти +tile.rphcov5.wool.blue.name=Полое плиточное покрытие из синей шерсти +tile.rphcov5.wool.brown.name=Полое плиточное покрытие из коричневой шерсти +tile.rphcov5.wool.cyan.name=Полое плиточное покрытие из бирюзовой шерсти +tile.rphcov5.wool.gray.name=Полое плиточное покрытие из серой шерсти +tile.rphcov5.wool.green.name=Полое плиточное покрытие из зеленой шерсти +tile.rphcov5.wool.lightBlue.name=Полое плиточное покрытие из голубой шерсти +tile.rphcov5.wool.lime.name=Полое плиточное покрытие из лаймовой шерсти +tile.rphcov5.wool.magenta.name=Полое плиточное покрытие из пурпурной шерсти +tile.rphcov5.wool.orange.name=Полое плиточное покрытие из оранжевой шерсти +tile.rphcov5.wool.pink.name=Полое плиточное покрытие из розовой шерсти +tile.rphcov5.wool.purple.name=Полое плиточное покрытие из фиолетовой шерсти +tile.rphcov5.wool.red.name=Полое плиточное покрытие из красной шерсти +tile.rphcov5.wool.silver.name=Полое плиточное покрытие из светло-серой шерсти +tile.rphcov5.wool.white.name=Полое плиточное покрытие из белой шерсти +tile.rphcov5.wool.yellow.name=Полое плиточное покрытие из желтой шерсти +tile.rphcov6.basalt.name=Полая тройная панель из базальта +tile.rphcov6.basaltBrick.name=Полая тройная панель из базальтового кирпича +tile.rphcov6.basaltCircle.name=Полая тройная панель из резного базальтового кирпича +tile.rphcov6.basaltCobble.name=Полая тройная панель из базальтового булыжника +tile.rphcov6.basaltPaver.name=Полая тройная панель из базальтового +tile.rphcov6.books.name=Полая тройная панель из книжной полки +tile.rphcov6.brick.name=Полая тройная панель из кирпича +tile.rphcov6.clay.name=Полая тройная панель из глины +tile.rphcov6.cobble.name=Полая тройная панель из булыжника +tile.rphcov6.copperBlock.name=Полая тройная панель из блока меди +tile.rphcov6.diamond.name=Полая тройная панель из алмазного блока +tile.rphcov6.dirt.name=Полая тройная панель из земли +tile.rphcov6.emeraldBlock.name=Полая тройная панель из изумрудного блока +tile.rphcov6.glass.name=Полая тройная панель из стекла +tile.rphcov6.gold.name=Полая тройная панель из блока золота +tile.rphcov6.greenSapphireBlock.name=Полая тройная панель из блока зеленого сапфира +tile.rphcov6.iron.name=Полая тройная панель из блока железа +tile.rphcov6.lapis.name=Полая тройная панель из лазуритового блока +tile.rphcov6.marble.name=Полая тройная панель из мрамора +tile.rphcov6.marbleBrick.name=Полая тройная панель из мраморного кирпича +tile.rphcov6.moss.name=Полая тройная панель из булыжника со мхом +tile.rphcov6.netherbrick.name=Полая тройная панель из адского кирпича +tile.rphcov6.netherrack.name=Полая тройная панель из адского камня +tile.rphcov6.obsidian.name=Полая тройная панель из обсидиана +tile.rphcov6.planks.name=Полая тройная панель из досок +tile.rphcov6.planks1.name=Полая тройная панель из досок +tile.rphcov6.planks2.name=Полая тройная панель из досок +tile.rphcov6.planks3.name=Полая тройная панель из досок +tile.rphcov6.pumpkin.name=Полая тройная панель из тыквы +tile.rphcov6.rplog.name=Полая тройная панель из каучукового дерева +tile.rphcov6.rubyBlock.name=Полая тройная панель из рубинового блока +tile.rphcov6.sandstone.name=Полая тройная панель из песчаника +tile.rphcov6.sandstone1.name=Полая тройная панель из песчаника +tile.rphcov6.sandstone2.name=Полая тройная панель из песчаника +tile.rphcov6.sapphireBlock.name=Полая тройная панель из сапфирового блока +tile.rphcov6.silverBlock.name=Полая тройная панель из блока серебра +tile.rphcov6.slab.name=Полая тройная панель из каменных ступенек +tile.rphcov6.snow.name=Полая тройная панель из снега +tile.rphcov6.soul.name=Полая тройная панель из песка душ +tile.rphcov6.stone.name=Полая тройная панель из камня +tile.rphcov6.stonebrick.name=Полая тройная панель из каменного кирпича +tile.rphcov6.stonebrick1.name=Полая тройная панель из каменного кирпича +tile.rphcov6.stonebrick2.name=Полая тройная панель из каменного кирпича +tile.rphcov6.stonebrick3.name=Полая тройная панель из каменного кирпича +tile.rphcov6.tinBlock.name=Полая тройная панель из блока олова +tile.rphcov6.tungstenBlock.name=Полая тройная панель из блока вольфрама +tile.rphcov6.wood.name=Полая тройная панель из дерева +tile.rphcov6.wood1.name=Полая тройная панель из дерева +tile.rphcov6.wood2.name=Полая тройная панель из дерева +tile.rphcov6.wood3.name=Полая тройная панель из дерева +tile.rphcov6.wool.black.name=Полая тройная панель из черной шерсти +tile.rphcov6.wool.blue.name=Полая тройная панель из синей шерсти +tile.rphcov6.wool.brown.name=Полая тройная панель из коричневой шерсти +tile.rphcov6.wool.cyan.name=Полая тройная панель из бирюзовой шерсти +tile.rphcov6.wool.gray.name=Полая тройная панель из серой шерсти +tile.rphcov6.wool.green.name=Полая тройная панель из зеленой шерсти +tile.rphcov6.wool.lightBlue.name=Полая тройная панель из голубой шерсти +tile.rphcov6.wool.lime.name=Полая тройная панель из лаймовой шерсти +tile.rphcov6.wool.magenta.name=Полая тройная панель из пурпурной шерсти +tile.rphcov6.wool.orange.name=Полая тройная панель из оранжевой шерсти +tile.rphcov6.wool.pink.name=Полая тройная панель из розовой шерсти +tile.rphcov6.wool.purple.name=Полая тройная панель из фиолетовой шерсти +tile.rphcov6.wool.red.name=Полая тройная панель из красной шерсти +tile.rphcov6.wool.silver.name=Полая тройная панель из светло-серой шерсти +tile.rphcov6.wool.white.name=Полая тройная панель из белой шерсти +tile.rphcov6.wool.yellow.name=Полая тройная панель из желтой шерсти +tile.rphcov7.basalt.name=Полое антипокрытие из базальта +tile.rphcov7.basaltBrick.name=Полое антипокрытие из базальтового кирпича +tile.rphcov7.basaltCircle.name=Полое антипокрытие из резного базальтового кирпича +tile.rphcov7.basaltCobble.name=Полое антипокрытие из базальтового булыжника +tile.rphcov7.basaltPaver.name=Полое антипокрытие из базальтового асфальта +tile.rphcov7.books.name=Полое антипокрытие из книжной полки +tile.rphcov7.brick.name=Полое антипокрытие из кирпича +tile.rphcov7.clay.name=Полое антипокрытие из глины +tile.rphcov7.cobble.name=Полое антипокрытие из булыжника +tile.rphcov7.copperBlock.name=Полое антипокрытие из блока меди +tile.rphcov7.diamond.name=Полое антипокрытие из алмазного блока +tile.rphcov7.dirt.name=Полое антипокрытие из земли +tile.rphcov7.emeraldBlock.name=Полое антипокрытие из изумрудного блока +tile.rphcov7.glass.name=Полое антипокрытие из стекла +tile.rphcov7.gold.name=Полое антипокрытие из блока золота +tile.rphcov7.greenSapphireBlock.name=Полое антипокрытие из блока зеленого сапфира +tile.rphcov7.iron.name=Полое антипокрытие из блока железа +tile.rphcov7.lapis.name=Полое антипокрытие из лазуритового блока +tile.rphcov7.marble.name=Полое антипокрытие из мрамора +tile.rphcov7.marbleBrick.name=Полое антипокрытие из мраморного кирпича +tile.rphcov7.moss.name=Полое антипокрытие из булыжника со мхом +tile.rphcov7.netherbrick.name=Полое антипокрытие из адского кирпича +tile.rphcov7.netherrack.name=Полое антипокрытие из адского камня +tile.rphcov7.obsidian.name=Полое антипокрытие из обсидиана +tile.rphcov7.planks.name=Полое антипокрытие из досок +tile.rphcov7.planks1.name=Полое антипокрытие из досок +tile.rphcov7.planks2.name=Полое антипокрытие из досок +tile.rphcov7.planks3.name=Полое антипокрытие из досок +tile.rphcov7.pumpkin.name=Полое антипокрытие из тыквы +tile.rphcov7.rplog.name=Полое антипокрытие из каучукового дерева +tile.rphcov7.rubyBlock.name=Полое антипокрытие из рубинового блока +tile.rphcov7.sandstone.name=Полое антипокрытие из песчаника +tile.rphcov7.sandstone1.name=Полое антипокрытие из песчаника +tile.rphcov7.sandstone2.name=Полое антипокрытие из песчаника +tile.rphcov7.sapphireBlock.name=Полое антипокрытие из сапфирового блока +tile.rphcov7.silverBlock.name=Полое антипокрытие из блока серебра +tile.rphcov7.slab.name=Полое антипокрытие из каменных ступенек +tile.rphcov7.snow.name=Полое антипокрытие из снега +tile.rphcov7.soul.name=Полое антипокрытие из песка душ +tile.rphcov7.stone.name=Полое антипокрытие из камня +tile.rphcov7.stonebrick.name=Полое антипокрытие из каменного кирпича +tile.rphcov7.stonebrick1.name=Полое антипокрытие из каменного кирпича +tile.rphcov7.stonebrick2.name=Полое антипокрытие из каменного кирпича +tile.rphcov7.stonebrick3.name=Полое антипокрытие из каменного кирпича +tile.rphcov7.tinBlock.name=Полое антипокрытие из блока олова +tile.rphcov7.tungstenBlock.name=Полое антипокрытие из блока вольфрама +tile.rphcov7.wood.name=Полое антипокрытие из дерева +tile.rphcov7.wood1.name=Полое антипокрытие из дерева +tile.rphcov7.wood2.name=Полое антипокрытие из дерева +tile.rphcov7.wood3.name=Полое антипокрытие из дерева +tile.rphcov7.wool.black.name=Полое антипокрытие из черной шерсти +tile.rphcov7.wool.blue.name=Полое антипокрытие из синей шерсти +tile.rphcov7.wool.brown.name=Полое антипокрытие из коричневой шерсти +tile.rphcov7.wool.cyan.name=Полое антипокрытие из бирюзовой шерсти +tile.rphcov7.wool.gray.name=Полое антипокрытие из серой шерсти +tile.rphcov7.wool.green.name=Полое антипокрытие из зеленой шерсти +tile.rphcov7.wool.lightBlue.name=Полое антипокрытие из голубой шерсти +tile.rphcov7.wool.lime.name=Полое антипокрытие из лаймовой шерсти +tile.rphcov7.wool.magenta.name=Полое антипокрытие из пурпурной шерсти +tile.rphcov7.wool.orange.name=Полое антипокрытие из оранжевой шерсти +tile.rphcov7.wool.pink.name=Полое антипокрытие из розовой шерсти +tile.rphcov7.wool.purple.name=Полое антипокрытие из фиолетовой шерсти +tile.rphcov7.wool.red.name=Полое антипокрытие из красной шерсти +tile.rphcov7.wool.silver.name=Полое антипокрытие из светло-серой шерсти +tile.rphcov7.wool.white.name=Полое антипокрытие из белой шерсти +tile.rphcov7.wool.yellow.name=Полое антипокрытие из желтой шерсти +tile.rphcover.basalt.name=Полое покрытие из базальта +tile.rphcover.basaltBrick.name=Полое покрытие из базальтового кирпича +tile.rphcover.basaltCircle.name=Полое покрытие из резного базальтового кирпича +tile.rphcover.basaltCobble.name=Полое покрытие из базальтового булыжника +tile.rphcover.basaltPaver.name=Полое покрытие из базальтового асфальта +tile.rphcover.books.name=Полое покрытие из книжной полки +tile.rphcover.brick.name=Полое покрытие из кирпича +tile.rphcover.clay.name=Полое покрытие из глины +tile.rphcover.cobble.name=Полое покрытие из булыжника +tile.rphcover.copperBlock.name=Полое покрытие из блока меди +tile.rphcover.diamond.name=Полое покрытие из алмазного блока +tile.rphcover.dirt.name=Полое покрытие из земли +tile.rphcover.emeraldBlock.name=Полое покрытие из изумрудного блока +tile.rphcover.glass.name=Полое покрытие из стекла +tile.rphcover.gold.name=Полое покрытие из блока золота +tile.rphcover.greenSapphireBlock.name=Полое покрытие из блока зеленого сапфира +tile.rphcover.iron.name=Полое покрытие из блока железа +tile.rphcover.lapis.name=Полое покрытие из лазуритового блока +tile.rphcover.marble.name=Полое покрытие из мрамора +tile.rphcover.marbleBrick.name=Полое покрытие из мраморного кирпича +tile.rphcover.moss.name=Полое покрытие из булыжника со мхом +tile.rphcover.netherbrick.name=Полое покрытие из адского кирпича +tile.rphcover.netherrack.name=Полое покрытие из адского камня +tile.rphcover.obsidian.name=Полое покрытие из обсидиана +tile.rphcover.planks.name=Полое покрытие из досок +tile.rphcover.planks1.name=Полое покрытие из досок +tile.rphcover.planks2.name=Полое покрытие из досок +tile.rphcover.planks3.name=Полое покрытие из досок +tile.rphcover.pumpkin.name=Полое покрытие из тыквы +tile.rphcover.rplog.name=Полое покрытие из каучукового дерева +tile.rphcover.rubyBlock.name=Полое покрытие из рубинового блока +tile.rphcover.sandstone.name=Полое покрытие из песчаника +tile.rphcover.sandstone1.name=Полое покрытие из песчаника +tile.rphcover.sandstone2.name=Полое покрытие из песчаника +tile.rphcover.sapphireBlock.name=Полое покрытие из сапфирового блока +tile.rphcover.silverBlock.name=Полое покрытие из блока серебра +tile.rphcover.slab.name=Полое покрытие из каменных ступенек +tile.rphcover.snow.name=Полое покрытие из снега +tile.rphcover.soul.name=Полое покрытие из песка душ +tile.rphcover.stone.name=Полое покрытие из камня +tile.rphcover.stonebrick.name=Полое покрытие из каменного кирпича +tile.rphcover.stonebrick1.name=Полое покрытие из каменного кирпича +tile.rphcover.stonebrick2.name=Полое покрытие из каменного кирпича +tile.rphcover.stonebrick3.name=Полое покрытие из каменного кирпича +tile.rphcover.tinBlock.name=Полое покрытие из блока олова +tile.rphcover.tungstenBlock.name=Полое покрытие из блока вольфрама +tile.rphcover.wood.name=Полое покрытие из дерева +tile.rphcover.wood1.name=Полое покрытие из дерева +tile.rphcover.wood2.name=Полое покрытие из дерева +tile.rphcover.wood3.name=Полое покрытие из дерева +tile.rphcover.wool.black.name=Полое покрытие из черной шерсти +tile.rphcover.wool.blue.name=Полое покрытие из синей шерсти +tile.rphcover.wool.brown.name=Полое покрытие из коричневой шерсти +tile.rphcover.wool.cyan.name=Полое покрытие из бирюзовой шерсти +tile.rphcover.wool.gray.name=Полое покрытие из серой шерсти +tile.rphcover.wool.green.name=Полое покрытие из зеленой шерсти +tile.rphcover.wool.lightBlue.name=Полое покрытие из голубой шерсти +tile.rphcover.wool.lime.name=Полое покрытие из лаймовой шерсти +tile.rphcover.wool.magenta.name=Полое покрытие из пурпурной шерсти +tile.rphcover.wool.orange.name=Полое покрытие из оранжевой шерсти +tile.rphcover.wool.pink.name=Полое покрытие из розовой шерсти +tile.rphcover.wool.purple.name=Полое покрытие из фиолетовой шерсти +tile.rphcover.wool.red.name=Полое покрытие из красной шерсти +tile.rphcover.wool.silver.name=Полое покрытие из светло-серой шерсти +tile.rphcover.wool.white.name=Полое покрытие из белой шерсти +tile.rphcover.wool.yellow.name=Полое покрытие из желтой шерсти +tile.rphpanel.basalt.name=Полая панель из базальта +tile.rphpanel.basaltBrick.name=Полая панель из базальтового кирпича +tile.rphpanel.basaltCircle.name=Полая панель из срезного базальтового кирпича +tile.rphpanel.basaltCobble.name=Полая панель из базальтового булыжника +tile.rphpanel.basaltPaver.name=Полая панель из базальтового асфальта +tile.rphpanel.books.name=Полая панель из книжной полки +tile.rphpanel.brick.name=Полая панель из кирпича +tile.rphpanel.clay.name=Полая панель из глины +tile.rphpanel.cobble.name=Полая панель из булыжника +tile.rphpanel.copperBlock.name=Полая панель из блока меди +tile.rphpanel.diamond.name=Полая панель из алмазного блока +tile.rphpanel.dirt.name=Полая панель из земли +tile.rphpanel.emeraldBlock.name=Полая панель из изумрудного блока +tile.rphpanel.glass.name=Полая панель из стекла +tile.rphpanel.gold.name=Полая панель из блока золота +tile.rphpanel.greenSapphireBlock.name=Полая панель из блока зеленого сапфира +tile.rphpanel.iron.name=Полая панель из блока железа +tile.rphpanel.lapis.name=Полая панель из лазуритового блока +tile.rphpanel.marble.name=Полая панель из мрамора +tile.rphpanel.marbleBrick.name=Полая панель из мраморного кирпича +tile.rphpanel.moss.name=Полая панель из булыжника со мхом +tile.rphpanel.netherbrick.name=Полая панель из адского кирпича +tile.rphpanel.netherrack.name=Полая панель из адского камня +tile.rphpanel.obsidian.name=Полая панель из обсидиана +tile.rphpanel.planks.name=Полая панель из досок +tile.rphpanel.planks1.name=Полая панель из досок +tile.rphpanel.planks2.name=Полая панель из досок +tile.rphpanel.planks3.name=Полая панель из досок +tile.rphpanel.pumpkin.name=Полая панель из тыквы +tile.rphpanel.rplog.name=Полая панель из каучукового дерева +tile.rphpanel.rubyBlock.name=Полая панель из рубинового блока +tile.rphpanel.sandstone.name=Полая панель из песчаника +tile.rphpanel.sandstone1.name=Полая панель из песчаника +tile.rphpanel.sandstone2.name=Полая панель из песчаника +tile.rphpanel.sapphireBlock.name=Полая панель из сапфирового блока +tile.rphpanel.silverBlock.name=Полая панель из блока серебра +tile.rphpanel.slab.name=Полая панель из каменных ступенек +tile.rphpanel.snow.name=Полая панель из снега +tile.rphpanel.soul.name=Полая панель из песка душ +tile.rphpanel.stone.name=Полая панель из камня +tile.rphpanel.stonebrick.name=Полая панель из каменного кирпича +tile.rphpanel.stonebrick1.name=Полая панель из каменного кирпича +tile.rphpanel.stonebrick2.name=Полая панель из каменного кирпича +tile.rphpanel.stonebrick3.name=Полая панель из каменного кирпича +tile.rphpanel.tinBlock.name=Полая панель из блока олова +tile.rphpanel.tungstenBlock.name=Полая панель из блока вольфрама +tile.rphpanel.wood.name=полая панель из дерева +tile.rphpanel.wood1.name=Полая панель из дерева +tile.rphpanel.wood2.name=Полая панель из дерева +tile.rphpanel.wood3.name=Полая панель из дерева +tile.rphpanel.wool.black.name=Полая панель из черной шерсти +tile.rphpanel.wool.blue.name=Полая панель из синей шерсти +tile.rphpanel.wool.brown.name=Полая панель из коричневой шерсти +tile.rphpanel.wool.cyan.name=Полая панель из бирюзовой шерсти +tile.rphpanel.wool.gray.name=Полая панель из серой шерсти +tile.rphpanel.wool.green.name=Полая панель из зеленой шерсти +tile.rphpanel.wool.lightBlue.name=Полая панель из голубой шести +tile.rphpanel.wool.lime.name=Полая панель из лаймовой шерсти +tile.rphpanel.wool.magenta.name=Полая панель из пурпурной шерсти +tile.rphpanel.wool.orange.name=Полая панель из оранжевой шерсти +tile.rphpanel.wool.pink.name=Полая панель из розовой шерсти +tile.rphpanel.wool.purple.name=Полая панель из фиолетовой шерсти +tile.rphpanel.wool.red.name=Полая панель из красной шерсти +tile.rphpanel.wool.silver.name=Полая панель из светло-серой шерсти +tile.rphpanel.wool.white.name=Полая панель из белой шерсти +tile.rphpanel.wool.yellow.name=Полая панель из желтой шерсти +tile.rphslab.basalt.name=Полая плита из базальта +tile.rphslab.basaltBrick.name=Полая плита из базальтового булыжника +tile.rphslab.basaltCircle.name=Полая плита из резного базальтового кирпича +tile.rphslab.basaltCobble.name=Полая плита из базальтового булыжника +tile.rphslab.basaltPaver.name=Полая плита из базальтового асфальта +tile.rphslab.books.name=Полая плита из книжной полки +tile.rphslab.brick.name=Полая плита из кирпича +tile.rphslab.clay.name=Полая плита из глины +tile.rphslab.cobble.name=Полая плита из булыжника +tile.rphslab.copperBlock.name=Полая плита из блока меди +tile.rphslab.diamond.name=Полая плита из алмазного блока +tile.rphslab.dirt.name=Полая плита из земли +tile.rphslab.emeraldBlock.name=Полая плита из изумрудного блока +tile.rphslab.glass.name=Полая плита из стекла +tile.rphslab.gold.name=Полая плита из блока золота +tile.rphslab.greenSapphireBlock.name=Полая плита из блока зеленого сапфира +tile.rphslab.iron.name=Полая плита из блока железа +tile.rphslab.lapis.name=Полая плита из лазуритового блока +tile.rphslab.marble.name=Полая плита из мрамора +tile.rphslab.marbleBrick.name=Полая плита из мраморного кирпича +tile.rphslab.moss.name=Полая плита из булыжника со мхом +tile.rphslab.netherbrick.name=Полая плита из адского кирпича +tile.rphslab.netherrack.name=Полая плита из адского камня +tile.rphslab.obsidian.name=Полая плита из обсидиана +tile.rphslab.planks.name=Полая плита из досок +tile.rphslab.planks1.name=Полая плита из досок +tile.rphslab.planks2.name=Полая плита из досок +tile.rphslab.planks3.name=Полая плита из досок +tile.rphslab.pumpkin.name=Полая плита из тыквы +tile.rphslab.rplog.name=Полая плита из каучукового дерева +tile.rphslab.rubyBlock.name=Полая плита из рубинового блока +tile.rphslab.sandstone.name=Полая плита из песчаника +tile.rphslab.sandstone1.name=Полая плита из песчаника +tile.rphslab.sandstone2.name=Полая плита из песчаника +tile.rphslab.sapphireBlock.name=Полая плита из сапфирового блока +tile.rphslab.silverBlock.name=\=Полая плита из блока серебра +tile.rphslab.slab.name=Полая плита из каменных ступенек +tile.rphslab.snow.name=Полая плита из снега +tile.rphslab.soul.name=Полая плита из песка душ +tile.rphslab.stone.name=Полая плита из камня +tile.rphslab.stonebrick.name=Полая плита из каменного кирпича +tile.rphslab.stonebrick1.name=Полая плита из каменного кирпича +tile.rphslab.stonebrick2.name=Полая плита из каменного кирпича +tile.rphslab.stonebrick3.name=Полая плита из каменного кирпича +tile.rphslab.tinBlock.name=Полая плита из блока олова +tile.rphslab.tungstenBlock.name=Полая плита из блока вольфрама +tile.rphslab.wood.name=Полая плита из дерева +tile.rphslab.wood1.name=Полая плита из дерева +tile.rphslab.wood2.name=Полая плита из дерева +tile.rphslab.wood3.name=Полая плита из дерева +tile.rphslab.wool.black.name=Полая плита из черной шерсти +tile.rphslab.wool.blue.name=Полая плита из синей шерсти +tile.rphslab.wool.brown.name=Полая плита из коричневой шерсти +tile.rphslab.wool.cyan.name=Полая плита из бирюзовой шерсти +tile.rphslab.wool.gray.name=Полая плита из серой шерсти +tile.rphslab.wool.green.name=Полая плита из желеной шерсти +tile.rphslab.wool.lightBlue.name=Полая плита из голубой шерсти +tile.rphslab.wool.lime.name=Полая плита из лаймовой шерсти +tile.rphslab.wool.magenta.name=Полая плита из пурпурной шерсти +tile.rphslab.wool.orange.name=Полая плита из оранжевой шерсти +tile.rphslab.wool.pink.name=Полая плита из розовой шерсти +tile.rphslab.wool.purple.name=Полая плита из фиолетовой шерсти +tile.rphslab.wool.red.name=Полая плита из красной шерсти +tile.rphslab.wool.silver.name=Полая плита из светло-серой шерсти +tile.rphslab.wool.white.name=Полая плита из белой шерсти +tile.rphslab.wool.yellow.name=Полая плита из желтой шерсти +tile.rppanc.basalt.name=Угол панели из базальта +tile.rppanc.basaltBrick.name=Угол панели из базальтового кирпича +tile.rppanc.basaltCircle.name=Угол панели из резного базальтового кирп +tile.rppanc.basaltCobble.name=Угол панели из базальтового булыжника +tile.rppanc.basaltPaver.name=Угол панели из базальтового асфальта +tile.rppanc.books.name=Угол панели из книжной полки +tile.rppanc.brick.name=Угол панели из кирпича +tile.rppanc.clay.name=Угол панели из глины +tile.rppanc.cobble.name=Угол панели из булыжника +tile.rppanc.copperBlock.name=Угол панели из блока меди +tile.rppanc.diamond.name=Угол панели из алмазного блока +tile.rppanc.dirt.name=Угол панели из земли +tile.rppanc.emeraldBlock.name=Угол панели из изумрудного блока +tile.rppanc.glass.name=Угол панели из стекла +tile.rppanc.gold.name=Угол панели из блока золота +tile.rppanc.greenSapphireBlock.name=Угол панели из блока зеленого сапфира +tile.rppanc.iron.name=Угол панели из блока железа +tile.rppanc.lapis.name=Угол панели из лазуритового блока +tile.rppanc.marble.name=Угол панели из мрамора +tile.rppanc.marbleBrick.name=Угол панели из мраморного кирпича +tile.rppanc.moss.name=Угол панели из булыжника со мхом +tile.rppanc.netherbrick.name=Угол панели из адского кирпича +tile.rppanc.netherrack.name=Угол панели из адского камня +tile.rppanc.obsidian.name=Угол панели из обсидиана +tile.rppanc.planks.name=Угол панели из досок +tile.rppanc.planks1.name=Угол панели из досок +tile.rppanc.planks2.name=Угол панели из досок +tile.rppanc.planks3.name=Угол панели из досок +tile.rppanc.pumpkin.name=Угол панели из тыквы +tile.rppanc.rplog.name=Угол панели из каучукового дерева +tile.rppanc.rubyBlock.name=Угол панели из рубинового блока +tile.rppanc.sandstone.name=Угол панели из песчаника +tile.rppanc.sandstone1.name=Угол панели из песчаника +tile.rppanc.sandstone2.name=Угол панели из песчаника +tile.rppanc.sapphireBlock.name=Угол панели из сапфирового блока +tile.rppanc.silverBlock.name=Угол панели из блока серебра +tile.rppanc.slab.name=Угол панели из каменных ступенек +tile.rppanc.snow.name=Угол панели из снега +tile.rppanc.soul.name=Угол панели из песка душ +tile.rppanc.stone.name=Угол панели из камня +tile.rppanc.stonebrick.name=Угол панели из каменного кирпича +tile.rppanc.stonebrick1.name=Угол панели из каменного кирпича +tile.rppanc.stonebrick2.name=Угол панели из каменного кирпича +tile.rppanc.stonebrick3.name=Угол панели из каменного кирпича +tile.rppanc.tinBlock.name=Угол панели из блока олова +tile.rppanc.tungstenBlock.name=Угол панели из блока вольфрама +tile.rppanc.wood.name=Угол панели из дерева +tile.rppanc.wood1.name=Угол панели из дерева +tile.rppanc.wood2.name=Угол панели из дерева +tile.rppanc.wood3.name=Угол панели из дерева +tile.rppanc.wool.black.name=Угол панели из черной шерсти +tile.rppanc.wool.blue.name=Угол панели из синей шерсти +tile.rppanc.wool.brown.name=Угол панели из коричневой шерсти +tile.rppanc.wool.cyan.name=Угол панели из бирюзовой шерсти +tile.rppanc.wool.gray.name=Угол панели из серой шерсти +tile.rppanc.wool.green.name=Угол панели из зеленой шерсти +tile.rppanc.wool.lightBlue.name=Угол панели из голубой шерсти +tile.rppanc.wool.lime.name=Угол панели из лаймовой шерсти +tile.rppanc.wool.magenta.name=Угол панели из пурпурной шерст +tile.rppanc.wool.orange.name=Угол панели из оранжевой шерсти +tile.rppanc.wool.pink.name=Угол панели из розовой шерсти +tile.rppanc.wool.purple.name=Угол панели из фиолетовой шерсти +tile.rppanc.wool.red.name=Угол панели из красной шерсти +tile.rppanc.wool.silver.name=Угол панели из светло-серой шерсти +tile.rppanc.wool.white.name=Угол панели из белой шерсти +tile.rppanc.wool.yellow.name=Угол панели из желтой шерсти +tile.rppanel.basalt.name=Панель из базальта +tile.rppanel.basaltBrick.name=Панель из базальтового кирпича +tile.rppanel.basaltCircle.name=Панель из резного базальтового кирпича +tile.rppanel.basaltCobble.name=Панель из базальтового булыжника +tile.rppanel.basaltPaver.name=Панель из базальтового асфальта +tile.rppanel.books.name=Панель из книжной полки +tile.rppanel.brick.name=Панель из кирпича +tile.rppanel.clay.name=Панель из глины +tile.rppanel.cobble.name=Панель из булыжника +tile.rppanel.copperBlock.name=Панель из блока меди +tile.rppanel.diamond.name=Панель из алмазного блока +tile.rppanel.dirt.name=Панель из земли +tile.rppanel.emeraldBlock.name=Панель из изумрудного блока +tile.rppanel.glass.name=Панель из стекла +tile.rppanel.gold.name=Панель из блока золота +tile.rppanel.greenSapphireBlock.name=Панель из зеленого сапфирового сапфира +tile.rppanel.iron.name=Панель из блока железа +tile.rppanel.lapis.name=Панель из лазуритового блока +tile.rppanel.marble.name=Панель из мрамора +tile.rppanel.marbleBrick.name=Панель из мраморного кирпича +tile.rppanel.moss.name=Панель из булыжника со мхом +tile.rppanel.netherbrick.name=Панель из адского кирпича +tile.rppanel.netherrack.name=Панель из адского камня +tile.rppanel.obsidian.name=Панель из обсидиана +tile.rppanel.planks.name=Панель из досок +tile.rppanel.planks1.name=Панель из досок +tile.rppanel.planks2.name=Панель из досок +tile.rppanel.planks3.name=Панель из досок +tile.rppanel.pumpkin.name=Панель из тыквы +tile.rppanel.rplog.name=Панель из каучукового дерева +tile.rppanel.rubyBlock.name=Панель из рубинового блока +tile.rppanel.sandstone.name=Панель из песчаника +tile.rppanel.sandstone1.name=Панель из песчаника +tile.rppanel.sandstone2.name=Панель из песчаника +tile.rppanel.sapphireBlock.name=Панель из сапфирового блока +tile.rppanel.silverBlock.name=Панель из блока серебра +tile.rppanel.slab.name=Панель из каменных ступенек +tile.rppanel.snow.name=Панель из снега +tile.rppanel.soul.name=Панель из песка душ +tile.rppanel.stone.name=Панель из камня +tile.rppanel.stonebrick.name=Панель из каменного кирпича +tile.rppanel.stonebrick1.name=Панель из каменного кирпича +tile.rppanel.stonebrick2.name=Панель из каменного кирпича +tile.rppanel.stonebrick3.name=Панель из каменного кирпича +tile.rppanel.tinBlock.name=Панель из блока олова +tile.rppanel.tungstenBlock.name=Панель из блока вольфрама +tile.rppanel.wood.name=Панель из дерева +tile.rppanel.wood1.name=Панель из дерева +tile.rppanel.wood2.name=Панель из дерева +tile.rppanel.wood3.name=Панель из дерева +tile.rppanel.wool.black.name=Панель из черной шерсти +tile.rppanel.wool.blue.name=Панель из синей шерсти +tile.rppanel.wool.brown.name=Панель из коричневой шерсти +tile.rppanel.wool.cyan.name=Панель из бирюзовой шерсти +tile.rppanel.wool.gray.name=Панель из серой шерсти +tile.rppanel.wool.green.name=Панель из зеленой шерсти +tile.rppanel.wool.lightBlue.name=Панель из голубой шерсти +tile.rppanel.wool.lime.name=Панель из лаймовой шерсти +tile.rppanel.wool.magenta.name=Панель из пурпурной шерсти +tile.rppanel.wool.orange.name=Панель из оранжевой шерсти +tile.rppanel.wool.pink.name=Панель из розовой шерсти +tile.rppanel.wool.purple.name=Панель из фиолетовой шерсти +tile.rppanel.wool.red.name=Панель из красной шерсти +tile.rppanel.wool.silver.name=Панель из светло-серой шерсти +tile.rppanel.wool.white.name=Панель из белой шерсти +tile.rppanel.wool.yellow.name=Панель из желтой шерсти +tile.rppans.basalt.name=Рейка панели из базальта +tile.rppans.basaltBrick.name=Рейка панели из базальтового кирпича +tile.rppans.basaltCircle.name=Рейка панели из резного базальтового кирпича +tile.rppans.basaltCobble.name=Рейка панели из базальтового булыжника +tile.rppans.basaltPaver.name=Рейка панели из базальтового кирпича +tile.rppans.books.name=Рейка панели из книжной полки +tile.rppans.brick.name=Рейка панели из кирпича +tile.rppans.clay.name=Рейка панели из глины +tile.rppans.cobble.name=Рейка панели из булыжника +tile.rppans.copperBlock.name=Рейка панели из блока меди +tile.rppans.diamond.name=Рейка панели из алмазного блока +tile.rppans.dirt.name=Рейка панели из земли +tile.rppans.emeraldBlock.name=Рейка панели изумрудного блока +tile.rppans.glass.name=Рейка панели из стекла +tile.rppans.gold.name=Рейка панели из блока золота +tile.rppans.greenSapphireBlock.name=Полое тройное покрытие из блока зеленого сапфира +tile.rppans.iron.name=Рейка панели из блока железа +tile.rppans.lapis.name=Рейка панели из лазуритового блока +tile.rppans.marble.name=Рейка панели из мрамора +tile.rppans.marbleBrick.name=Рейка панели из мраморного кирпича +tile.rppans.moss.name=Рейка панели из булыжника со мхом +tile.rppans.netherbrick.name=Рейка панели из адского кирпича +tile.rppans.netherrack.name=Рейка панели из адского камня +tile.rppans.obsidian.name=Рейка панели из обсидиана +tile.rppans.planks.name=Рейка панели из досок +tile.rppans.planks1.name=Рейка панели из досок +tile.rppans.planks2.name=Рейка панели из досок +tile.rppans.planks3.name=Рейка панели из досок +tile.rppans.pumpkin.name=Рейка панели из тыквы +tile.rppans.rplog.name=Рейка панели из каучукового дерева +tile.rppans.rubyBlock.name=Рейка панели из рубинового блока +tile.rppans.sandstone.name=Рейка панели из песчаника +tile.rppans.sandstone1.name=Рейка панели из песчаника +tile.rppans.sandstone2.name=Рейка панели из песчаника +tile.rppans.sapphireBlock.name=Рейка панели из сапфирового блока +tile.rppans.silverBlock.name=Рейка панели из блока серебра +tile.rppans.slab.name=Рейка панели из каменных ступенек +tile.rppans.snow.name=Рейка панели из снега +tile.rppans.soul.name=Рейка панели из песка душ +tile.rppans.stone.name=Рейка панели из камня +tile.rppans.stonebrick.name=Рейка панели из каменного кирпича +tile.rppans.stonebrick1.name=Рейка панели из каменного кирпича +tile.rppans.stonebrick2.name=Рейка панели из каменного кирпича +tile.rppans.stonebrick3.name=Рейка панели из каменного кирпича +tile.rppans.tinBlock.name=Рейка панели из блока олова +tile.rppans.tungstenBlock.name=Рейка панели из блока вольфрама +tile.rppans.wood.name=Рейка панели из дерева +tile.rppans.wood1.name=Рейка панели из дерева +tile.rppans.wood2.name=Рейка панели из дерева +tile.rppans.wood3.name=Рейка панели из досок +tile.rppans.wool.black.name=Рейка панели из черной шерсти +tile.rppans.wool.blue.name=Рейка панели из синей шерсти +tile.rppans.wool.brown.name=Рейка панели из коричневой шерсти +tile.rppans.wool.cyan.name=Рейка панели из бирюзовой шерсти +tile.rppans.wool.gray.name=Рейка панели из серой шерсти +tile.rppans.wool.green.name=Рейка панели из зеленой шерсти +tile.rppans.wool.lightBlue.name=Рейка панели из голубой шерсти +tile.rppans.wool.lime.name=Рейка панели из лаймовой шерсти +tile.rppans.wool.magenta.name=Рейка панели из пурпурной шерсти +tile.rppans.wool.orange.name=Рейка панели из оранжевой шерсти +tile.rppans.wool.pink.name=Рейка панели из розовой шерсти +tile.rppans.wool.purple.name=Рейка панели из фиолетовой шерсти +tile.rppans.wool.red.name=Рейка панели из красной шерсти +tile.rppans.wool.silver.name=Рейка панели из светло-серой шерсти +tile.rppans.wool.white.name=Рейка панели из белой шерсти +tile.rppans.wool.yellow.name=Рейка панели из желтой шерсти +tile.rppole1.basalt.name=Столб из базальта +tile.rppole1.basaltBrick.name=Столб из базальтового кирпича +tile.rppole1.basaltCircle.name=Столб из резного базальтового кирпича +tile.rppole1.basaltCobble.name=Столб из базальтового булыжника +tile.rppole1.basaltPaver.name=Столб из базальтового асфальта +tile.rppole1.books.name=Столб из книжной полки +tile.rppole1.brick.name=Столб из кирпича +tile.rppole1.clay.name=Столб из глины +tile.rppole1.cobble.name=Столб из булыжника +tile.rppole1.copperBlock.name=Столб из блока меди +tile.rppole1.diamond.name=Столб из алмазного блока +tile.rppole1.dirt.name=Столб из земли +tile.rppole1.emeraldBlock.name=Столб из изумрудного блока +tile.rppole1.glass.name=Столб из стекла +tile.rppole1.gold.name=Столб из блока золота +tile.rppole1.greenSapphireBlock.name=Столб из блока зеленого сапфира +tile.rppole1.iron.name=Столб из блока железа +tile.rppole1.lapis.name=Столб из лазуритового блока +tile.rppole1.marble.name=Столб из мрамора +tile.rppole1.marbleBrick.name=Столб из мраморного кирпича +tile.rppole1.moss.name=Столб из булыжника со мхом +tile.rppole1.netherbrick.name=Столб из адского кирпича +tile.rppole1.netherrack.name=Столб из адского камня +tile.rppole1.obsidian.name=Столб из обсидиана +tile.rppole1.planks.name=Столб из досок +tile.rppole1.planks1.name=Столб из досок +tile.rppole1.planks2.name=Столб из досок +tile.rppole1.planks3.name=Столб из досок +tile.rppole1.pumpkin.name=Столб из тыквы +tile.rppole1.rplog.name=Столб из каучукового дерева +tile.rppole1.rubyBlock.name=Столб из рубинового блока +tile.rppole1.sandstone.name=Столб из песчаника +tile.rppole1.sandstone1.name=Столб из песчаника +tile.rppole1.sandstone2.name=Столб из песчаника +tile.rppole1.sapphireBlock.name=Столб из сапфирового блока +tile.rppole1.silverBlock.name=Столб из блока серебра +tile.rppole1.slab.name=Столб из каменных ступенек +tile.rppole1.snow.name=Столб из снега +tile.rppole1.soul.name=Столб из песка душ +tile.rppole1.stone.name=Столб из камня +tile.rppole1.stonebrick.name=Столб из каменного кирпича +tile.rppole1.stonebrick1.name=Стоб из каменного кирпича +tile.rppole1.stonebrick2.name=Столб из каменного кирпича +tile.rppole1.stonebrick3.name=Столб из каменного кирпича +tile.rppole1.tinBlock.name=Столб из блока олова +tile.rppole1.tungstenBlock.name=Столб из блока вольфрама +tile.rppole1.wood.name=Стоб из дерева +tile.rppole1.wood1.name=Столб из дерева +tile.rppole1.wood2.name=Столб из дерева +tile.rppole1.wood3.name=Столб из дерева +tile.rppole1.wool.black.name=Столб из черной шерсти +tile.rppole1.wool.blue.name=Столб из синей шерсти +tile.rppole1.wool.brown.name=Столб из коричневой шерсти +tile.rppole1.wool.cyan.name=Столб из бирюзовой шерсти +tile.rppole1.wool.gray.name=Столб из серой шерсти +tile.rppole1.wool.green.name=Столб из зеленой шерсти +tile.rppole1.wool.lightBlue.name=Столб из голубой шерсти +tile.rppole1.wool.lime.name=Столб из лаймовой шерсти +tile.rppole1.wool.magenta.name=Столб из пурпурной шерсти +tile.rppole1.wool.orange.name=Столб из оранжевой шерсти +tile.rppole1.wool.pink.name=Столб из розовой шерсти +tile.rppole1.wool.purple.name=Столб из фиолетовой шерсти +tile.rppole1.wool.red.name=Столб из красной шерсти +tile.rppole1.wool.silver.name=Столб из светло-серой шерсти +tile.rppole1.wool.white.name=Столб из белой шерсти +tile.rppole1.wool.yellow.name=Столб из желтой шерсти +tile.rppole2.basalt.name=Опора из базальта +tile.rppole2.basaltBrick.name=Опора из базальтового кирпича +tile.rppole2.basaltCircle.name=Опора из резного базальтового кирпича +tile.rppole2.basaltCobble.name=Опора из базальтового булыжника +tile.rppole2.basaltPaver.name=Опора из базальтового асфальта +tile.rppole2.books.name=Опора из книжной полки +tile.rppole2.brick.name=Опора из кирпича +tile.rppole2.clay.name=Столб из глины +tile.rppole2.cobble.name=Опора из булыжника +tile.rppole2.copperBlock.name=Опора из блока меди +tile.rppole2.diamond.name=Опора из алмазного блока +tile.rppole2.dirt.name=Опора из земли +tile.rppole2.emeraldBlock.name=Опора из изумрудного блока +tile.rppole2.glass.name=Опора из стекла +tile.rppole2.gold.name=Опора из блока золота +tile.rppole2.greenSapphireBlock.name=Опора из блока зеленого сапфира +tile.rppole2.iron.name=Опора из блока железа +tile.rppole2.lapis.name=Опора из лазуритового блока +tile.rppole2.marble.name=Опора из мрамора +tile.rppole2.marbleBrick.name=Опора из мраморного кирпича +tile.rppole2.moss.name=Опора из булыжника со мхом +tile.rppole2.netherbrick.name=Опора из адского камня +tile.rppole2.netherrack.name=Опора из адского камня +tile.rppole2.obsidian.name=Опора из обсидиана +tile.rppole2.planks.name=Опора из досок +tile.rppole2.planks1.name=Опора из досок +tile.rppole2.planks2.name=Опора из досок +tile.rppole2.planks3.name=Опора из досок +tile.rppole2.pumpkin.name=Опора из тыквы +tile.rppole2.rplog.name=Опора из каучукового дерева +tile.rppole2.rubyBlock.name=Опора из рубинового блока +tile.rppole2.sandstone.name=Опора из песчаника +tile.rppole2.sandstone1.name=Опора из песчаника +tile.rppole2.sandstone2.name=Опора из песчаника +tile.rppole2.sapphireBlock.name=Опора из сапфирового блока +tile.rppole2.silverBlock.name=Опора из блока серебра +tile.rppole2.slab.name=Опора из каменных ступенек +tile.rppole2.snow.name=Опора из снега +tile.rppole2.soul.name=Опора из песка душ +tile.rppole2.stone.name=Опора из камня +tile.rppole2.stonebrick.name=Опора из каменного кирпича +tile.rppole2.stonebrick1.name=Опора из каменного кирпича +tile.rppole2.stonebrick2.name=Опора из каменного кирпича +tile.rppole2.stonebrick3.name=Опора из каменного кирпича +tile.rppole2.tinBlock.name=Опора из блока олова +tile.rppole2.tungstenBlock.name=Опора из блока вольфрама +tile.rppole2.wood.name=Опора из дерева +tile.rppole2.wood1.name=Опора из дерева +tile.rppole2.wood2.name=Опора из дерева +tile.rppole2.wood3.name=Опора из дерева +tile.rppole2.wool.black.name=Опора из черной шерсти +tile.rppole2.wool.blue.name=Опора из синей шерсти +tile.rppole2.wool.brown.name=Опора из коричневой шерсти +tile.rppole2.wool.cyan.name=Опора из бирюзовой шерсти +tile.rppole2.wool.gray.name=Опора из серой шерсти +tile.rppole2.wool.green.name=Опора из зеленой шерсти +tile.rppole2.wool.lightBlue.name=Опора из голубой шерсти +tile.rppole2.wool.lime.name=Опора из лаймовой шерсти +tile.rppole2.wool.magenta.name=Опора из пурпурной шерсти +tile.rppole2.wool.orange.name=Опора из оранжевой шерсти +tile.rppole2.wool.pink.name=Опора из розовой шерсти +tile.rppole2.wool.purple.name=Опораиз фиолетовой шерсти +tile.rppole2.wool.red.name=Опора из красной шерсти +tile.rppole2.wool.silver.name=Опора из светло-серой шерсти +tile.rppole2.wool.white.name=Опора из белой шерсти +tile.rppole2.wool.yellow.name=Опора из желтой шерсти +tile.rppole3.basalt.name=Колонна из базальта +tile.rppole3.basaltBrick.name=Колонна из базальтового кирпича +tile.rppole3.basaltCircle.name=Колонна из резного базальтового кирпича +tile.rppole3.basaltCobble.name=Колонна из базальтового булыжника +tile.rppole3.basaltPaver.name=Колонна из базальтового асфальта +tile.rppole3.books.name=Колонна из книжной полки +tile.rppole3.brick.name=Колонна из кирпича +tile.rppole3.clay.name=Колонна из глины +tile.rppole3.cobble.name=Колонна из булыжника +tile.rppole3.copperBlock.name=Колонна из блока меди +tile.rppole3.diamond.name=Колонна из алмазного блока +tile.rppole3.dirt.name=Колонна из земли +tile.rppole3.emeraldBlock.name=Колонна из изумрудного блока +tile.rppole3.glass.name=Колонна из стекла +tile.rppole3.gold.name=Колонна из блока золота +tile.rppole3.greenSapphireBlock.name=Колонна из зеле сапфирового блока +tile.rppole3.iron.name=Колонна из блока железа +tile.rppole3.lapis.name=Колонна из лазуритового блока +tile.rppole3.marble.name=Колонна из мрамора +tile.rppole3.marbleBrick.name=Колонна из мраморного кирпича +tile.rppole3.moss.name=Колонна из булыжника со мхом +tile.rppole3.netherbrick.name=Колонна из адского кирпича +tile.rppole3.netherrack.name=Колонна из адского камня +tile.rppole3.obsidian.name=Колонна из обсидиана +tile.rppole3.planks.name=Колонна из досок +tile.rppole3.planks1.name=Колонна из досок +tile.rppole3.planks2.name=Колонка из досок +tile.rppole3.planks3.name=Колонна из досок +tile.rppole3.pumpkin.name=Колонна из тыквы +tile.rppole3.rplog.name=Колонна из каучукового дерева +tile.rppole3.rubyBlock.name=Колонна из рубинового блока +tile.rppole3.sandstone.name=Колонна из песчаника +tile.rppole3.sandstone1.name=Колонна из песчаника +tile.rppole3.sandstone2.name=Колонна из песчаника +tile.rppole3.sapphireBlock.name=Колонна из сапфирового блока +tile.rppole3.silverBlock.name=Колонна из блока серебра +tile.rppole3.slab.name=Колонна из каменных ступенек +tile.rppole3.snow.name=Колонна из снега +tile.rppole3.soul.name=Колонна из песка душ +tile.rppole3.stone.name=Колонна из камня +tile.rppole3.stonebrick.name=Колонна из каменного кирпича +tile.rppole3.stonebrick1.name=Колонна из каменного кирпича +tile.rppole3.stonebrick2.name=Колонна из каменного кирпича +tile.rppole3.stonebrick3.name=Колонна из каменного кирпича +tile.rppole3.tinBlock.name=Колонна из блока олова +tile.rppole3.tungstenBlock.name=Колонна из блока вольфрама +tile.rppole3.wood.name=Колонна из дерева +tile.rppole3.wood1.name=Колонна из дерева +tile.rppole3.wood2.name=Колонна из дерева +tile.rppole3.wood3.name=Колонна из дерева +tile.rppole3.wool.black.name=Колонна из черной шерсти +tile.rppole3.wool.blue.name=Колонна из синей шерсти +tile.rppole3.wool.brown.name=Колонна из коричневой шерсти +tile.rppole3.wool.cyan.name=Колонная из бирюзовой шерсти +tile.rppole3.wool.gray.name=Колонна из серой шерсти +tile.rppole3.wool.green.name=Колонна из зеленой шерсти +tile.rppole3.wool.lightBlue.name=Колонна из голубой шерсти +tile.rppole3.wool.lime.name=Колонна из лаймовой шерсти +tile.rppole3.wool.magenta.name=Колонна из пурпурной шерсти +tile.rppole3.wool.orange.name=Колонна из оранжевой шерсти +tile.rppole3.wool.pink.name=Колонна из розовой шерсти +tile.rppole3.wool.purple.name=Колонна из фиолетовой шерсти +tile.rppole3.wool.red.name=Колонна из красной шерсти +tile.rppole3.wool.silver.name=Колонна из светло-серой шерсти +tile.rppole3.wool.white.name=Колонна из белой шерсти +tile.rppole3.wool.yellow.name=Колонна из желтой шерсти +tile.rpslab.basalt.name=Плита из базальта +tile.rpslab.basaltBrick.name=Плита из базальтового кирпича +tile.rpslab.basaltCircle.name=Плита из резного базальтового кирпича +tile.rpslab.basaltCobble.name=Плита из базальтового булыжника +tile.rpslab.basaltPaver.name=Плита из базальтового асфальта +tile.rpslab.books.name=Плита из книжной полки +tile.rpslab.brick.name=Плита из кирпича +tile.rpslab.clay.name=Плита из глины +tile.rpslab.cobble.name=Плита из булыжника +tile.rpslab.copperBlock.name=Плита из блока меди +tile.rpslab.diamond.name=Плита из алмазного блока +tile.rpslab.dirt.name=Плита из земли +tile.rpslab.emeraldBlock.name=Плита из изумрудного блока +tile.rpslab.glass.name=Плита из стекла +tile.rpslab.gold.name=Плита из блока золота +tile.rpslab.greenSapphireBlock.name=Плита из блока зеленого сапфира +tile.rpslab.iron.name=Плита из блока железа +tile.rpslab.lapis.name=Плита из лазуритовго блока +tile.rpslab.marble.name=Плита из мрамора +tile.rpslab.marbleBrick.name=Плита из мраморного кирпича +tile.rpslab.moss.name=Плита из булыжника со мхом +tile.rpslab.netherbrick.name=Плита из адского кирпича +tile.rpslab.netherrack.name=Плита из адского камня +tile.rpslab.obsidian.name=Плита из обсидиана +tile.rpslab.planks.name=Плита из досок +tile.rpslab.planks1.name=Плита из дерева +tile.rpslab.planks2.name=Плита из досок +tile.rpslab.planks3.name=Плита из досок +tile.rpslab.pumpkin.name=Плита из тыквы +tile.rpslab.rplog.name=Плита из каучукового дерева +tile.rpslab.rubyBlock.name=Плита из рубинового блока +tile.rpslab.sandstone.name=Плита из песчаника +tile.rpslab.sandstone1.name=Плита из песчаника +tile.rpslab.sandstone2.name=Плита из песчаника +tile.rpslab.sapphireBlock.name=Плита из сапфирового блока +tile.rpslab.silverBlock.name=Плита из блока серебра +tile.rpslab.slab.name=Плита из каменных ступенек +tile.rpslab.snow.name=Плита из снега +tile.rpslab.soul.name=Плита из песка душ +tile.rpslab.stone.name=Плита из камня +tile.rpslab.stonebrick.name=Плита из каменного кирпича +tile.rpslab.stonebrick1.name=Плита из каменного кирпича +tile.rpslab.stonebrick2.name=Плита из каменного кирпича +tile.rpslab.stonebrick3.name=Плита из каменного кирпича +tile.rpslab.tinBlock.name=Плита из блока олова +tile.rpslab.tungstenBlock.name=Плита из блока вольфрама +tile.rpslab.wood.name=Плита из дерева +tile.rpslab.wood1.name=Плита из дерева +tile.rpslab.wood2.name=Плита из дерева +tile.rpslab.wood3.name=Плита из дерева +tile.rpslab.wool.black.name=Плита из черной шерсти +tile.rpslab.wool.blue.name=Плита из синей шерсти +tile.rpslab.wool.brown.name=Плита из коричневой шерсти +tile.rpslab.wool.cyan.name=Плита из бирюзовой шерсти +tile.rpslab.wool.gray.name=Плита из серой шерсти +tile.rpslab.wool.green.name=Плита из зеленой шерсти +tile.rpslab.wool.lightBlue.name=Плита из голубой шерсти +tile.rpslab.wool.lime.name=Плита из лаймовой шерсти +tile.rpslab.wool.magenta.name=Плита из пурпурной шерсти +tile.rpslab.wool.orange.name=Плита из оранжевой шерсти +tile.rpslab.wool.pink.name=Плита из розовой шерсти +tile.rpslab.wool.purple.name=Плита из фиолетовой шерсти +tile.rpslab.wool.red.name=Плита из красной шерсти +tile.rpslab.wool.silver.name=Плита из светло-серой шерсти +tile.rpslab.wool.white.name=Плита из белой шерсти +tile.rpslab.wool.yellow.name=Плита из желтой шерсти +tile.rpslabc.basalt.name=Угол плиты из базальта +tile.rpslabc.basaltBrick.name=Угол плиты из базальтового кирпича +tile.rpslabc.basaltCircle.name=Угол плиты из резного базальтового кирпича +tile.rpslabc.basaltCobble.name=Угол плиты из базальтового булыжника +tile.rpslabc.basaltPaver.name=Угол плиты из базальтового асфальта +tile.rpslabc.books.name=Угол плиты из книжной полки +tile.rpslabc.brick.name=Угол плиты из кирпича +tile.rpslabc.clay.name=Угол плиты из глины +tile.rpslabc.cobble.name=Угол плиты из булыжника +tile.rpslabc.copperBlock.name=Угол плиты из блока меди +tile.rpslabc.diamond.name=Угол плиты из алмазного блока +tile.rpslabc.dirt.name=Угол плиты из земли +tile.rpslabc.emeraldBlock.name=Угол плиты из изумрудного блока +tile.rpslabc.glass.name=Угол плиты из стекла +tile.rpslabc.gold.name=Угол плиты из золотого блока +tile.rpslabc.greenSapphireBlock.name=Угол плиты из блока зеленого сапфира +tile.rpslabc.iron.name=Угол плиты из блока железа +tile.rpslabc.lapis.name=Угол плиты из лазуритового блока +tile.rpslabc.marble.name=Угол плиты из мрамора +tile.rpslabc.marbleBrick.name=Угол плиты из мраморного кирпича +tile.rpslabc.moss.name=Угол плиты из булыжника со мхом +tile.rpslabc.netherbrick.name=Угол плиты из адского кирпича +tile.rpslabc.netherrack.name=Угол плиты из адского камня +tile.rpslabc.obsidian.name=Угол плиты из обсидиана +tile.rpslabc.planks.name=Угол покрытия из досок +tile.rpslabc.planks1.name=Угол плиты из досок +tile.rpslabc.planks2.name=Угол плиты из досок +tile.rpslabc.planks3.name=Угол плиты из досок +tile.rpslabc.pumpkin.name=Угол плиты из тыквы +tile.rpslabc.rplog.name=Угол плиты из каучукового дерева +tile.rpslabc.rubyBlock.name=Угол плиты из рубинового блока +tile.rpslabc.sandstone.name=Угол плиты из песчаника +tile.rpslabc.sandstone1.name=Угол плиты из песчаника +tile.rpslabc.sandstone2.name=Угол плиты из песчаника +tile.rpslabc.sapphireBlock.name=Угол плиты из сапфирового блока +tile.rpslabc.silverBlock.name=Угол плиты из блока серебра +tile.rpslabc.slab.name=Угол плиты из каменных ступенек +tile.rpslabc.snow.name=Угол плиты из снега +tile.rpslabc.soul.name=Угол плиты из песка душ +tile.rpslabc.stone.name=Угол плиты из камня +tile.rpslabc.stonebrick.name=Угол плиты из каменного кирпича +tile.rpslabc.stonebrick1.name=Угол плиты из каменного кирпича +tile.rpslabc.stonebrick2.name=Угол плиты из каменного кирпича +tile.rpslabc.stonebrick3.name=Угол плиты из каменного кирпича +tile.rpslabc.tinBlock.name=Угол плиты из блока олова +tile.rpslabc.tungstenBlock.name=Угол плиты из блока вольфрама +tile.rpslabc.wood.name=Угол плиты из дерева +tile.rpslabc.wood1.name=Угол плиты из дерева +tile.rpslabc.wood2.name=Угол плиты из дерева +tile.rpslabc.wood3.name=Угол плиты из дерева +tile.rpslabc.wool.black.name=Угол плиты из черной шерсти +tile.rpslabc.wool.blue.name=Угол плиты из синей шерсти +tile.rpslabc.wool.brown.name=Угол плиты из коричневой шерсти +tile.rpslabc.wool.cyan.name=Угол плиты из бирюзовой шерсти +tile.rpslabc.wool.gray.name=Угол плиты из серой шерсти +tile.rpslabc.wool.green.name=Угол плиты из зеленой шерсти +tile.rpslabc.wool.lightBlue.name=Угол плиты из голубой шерсти +tile.rpslabc.wool.lime.name=Угол плиты из лаймовой шерсти +tile.rpslabc.wool.magenta.name=Угол плиты из пурпурной шерсти +tile.rpslabc.wool.orange.name=Угол плиты из оранжевой шерсти +tile.rpslabc.wool.pink.name=Угол плиты из розовой шерсти +tile.rpslabc.wool.purple.name=Угол плиты из фиолетовой шерсти +tile.rpslabc.wool.red.name=Угол плиты из красной шерсти +tile.rpslabc.wool.silver.name=Угол плиты из светло-серой шерсти +tile.rpslabc.wool.white.name=Угол плиты из белой шерсти +tile.rpslabc.wool.yellow.name=Угол плиты из желтой шерсти +tile.rpslabs.basalt.name=Рейка плиты из базальта +tile.rpslabs.basaltBrick.name=Рейка плиты из базальтового кирпича +tile.rpslabs.basaltCircle.name=Рейка плиты из резного базальтового кирпича +tile.rpslabs.basaltCobble.name=Рейка плиты из базальтового булыжника +tile.rpslabs.basaltPaver.name=Рейка плиты из базальтового асфальта +tile.rpslabs.books.name=Рейка плиты из книжной полки +tile.rpslabs.brick.name=Рейка плиты из кирпича +tile.rpslabs.clay.name=Рейка плиты из глины +tile.rpslabs.cobble.name=Рейка плиты из булыжника +tile.rpslabs.copperBlock.name=Рейка плиты из блока меди +tile.rpslabs.diamond.name=Рейка плиты из алмазного блока +tile.rpslabs.dirt.name=Рейка плиты из земли +tile.rpslabs.emeraldBlock.name=Рейка плиты из изумрудного блока +tile.rpslabs.glass.name=Рейка плиты из стекла +tile.rpslabs.gold.name=Рейка плиты из блока золота +tile.rpslabs.greenSapphireBlock.name=Рейка плиты из блока зеленого сапфира +tile.rpslabs.iron.name=Рейка плиты из блока железа +tile.rpslabs.lapis.name=Рейка плита из лазуритового блока +tile.rpslabs.marble.name=Рейка плиты из мрамора +tile.rpslabs.marbleBrick.name=Рейка плиты из мраморного кирпича +tile.rpslabs.moss.name=Рейка плиты из булыжника со мхом +tile.rpslabs.netherbrick.name=Рейка плиты из адского кирпича +tile.rpslabs.netherrack.name=Рейка плиты из адского камня +tile.rpslabs.obsidian.name=Рейка плиты из обсидиана +tile.rpslabs.planks.name=Рейка плиты из дерева +tile.rpslabs.planks1.name=Рейка плиты из досок +tile.rpslabs.planks2.name=Рейка плиты из досок +tile.rpslabs.planks3.name=Рейка плиты из досок +tile.rpslabs.pumpkin.name=Рейка плиты из тыквы +tile.rpslabs.rplog.name=Рейка плиты из каучукового дерева +tile.rpslabs.rubyBlock.name=Рейка плиты из рубинового блока +tile.rpslabs.sandstone.name=Рейка плиты из песчаника +tile.rpslabs.sandstone1.name=Рейка плиты из песчаника +tile.rpslabs.sandstone2.name=Рейка плиты из песчаника +tile.rpslabs.sapphireBlock.name=Рейка плиты сапфирового блока +tile.rpslabs.silverBlock.name=Рейка плиты из блока серебра +tile.rpslabs.slab.name=Рейка плиты из каменных ступенек +tile.rpslabs.snow.name=Рейка плиты из снега +tile.rpslabs.soul.name=Рейка плиты из песка душ +tile.rpslabs.stone.name=Рейка плиты из камня +tile.rpslabs.stonebrick.name=Рейка плиты из каменного кирпича +tile.rpslabs.stonebrick1.name=Рейка плиты из каменного кирпича +tile.rpslabs.stonebrick2.name=Рейка плиты из каменного кирпича +tile.rpslabs.stonebrick3.name=Рейка плиты из каменного кирпича +tile.rpslabs.tungstenBlock.name=Рейка плиты из блока вольфрама +tile.rpslabs.wood.name=Рейка плиты из дерева +tile.rpslabs.wood1.name=Рейка плиты из дерева +tile.rpslabs.wood2.name=Рейка плиты из дерева +tile.rpslabs.wood3.name=Рейка плиты из дерева +tile.rpslabs.wool.black.name=Рейка плиты из черной шерсти +tile.rpslabs.wool.blue.name=Рейка плиты из синей шерсти +tile.rpslabs.wool.brown.name=Рейка плиты из коричневой шерсти +tile.rpslabs.wool.cyan.name=Рейка плиты из бирюзовой шерсти +tile.rpslabs.wool.gray.name=Рейка плиты из серой шерсти +tile.rpslabs.wool.green.name=Рейка плиты из зеленой шерсти +tile.rpslabs.wool.lightBlue.name=Рейка плиты из голубой шерсти +tile.rpslabs.wool.lime.name=Рейка плиты из лаймовой шерсти +tile.rpslabs.wool.magenta.name=Рейка плиты из пурпурной шерсти +tile.rpslabs.wool.orange.name=Рейка плиты из оранжевой шерсти +tile.rpslabs.wool.pink.name=Рейка плиты из розовой шерсти +tile.rpslabs.wool.purple.name=Рейка плиты из фиолетовой шерсти +tile.rpslabs.wool.red.name=Рейка плиты из красной шерсти +tile.rpslabs.wool.silver.name=Рейка плиты из светло-серой шерсти +tile.rpslabs.wool.white.name=Рейка плиты из белой шерсти +tile.rpslabs.wool.yellow.name=Рейка плиты из желтой шерсти \ No newline at end of file diff --git a/src/main/resources/assets/rpcore/textures/blocks/missing.png b/src/main/resources/assets/rpcore/textures/blocks/missing.png new file mode 100644 index 0000000..0a64e27 Binary files /dev/null and b/src/main/resources/assets/rpcore/textures/blocks/missing.png differ diff --git a/src/main/resources/assets/rplighting/lang/en_US.lang b/src/main/resources/assets/rplighting/lang/en_US.lang new file mode 100644 index 0000000..4cd1e16 --- /dev/null +++ b/src/main/resources/assets/rplighting/lang/en_US.lang @@ -0,0 +1,103 @@ +itemGroup.RPLights=RedPower Lighting + +tile.rplamp.black.name=Black Lamp +tile.rplamp.blue.name=Blue Lamp +tile.rplamp.brown.name=Brown Lamp +tile.rplamp.cyan.name=Cyan Lamp +tile.rplamp.gray.name=Gray Lamp +tile.rplamp.green.name=Green Lamp +tile.rplamp.lightBlue.name=Light Blue Lamp +tile.rplamp.lime.name=Lime Lamp +tile.rplamp.magenta.name=Magenta Lamp +tile.rplamp.orange.name=Orange Lamp +tile.rplamp.pink.name=Pink Lamp +tile.rplamp.purple.name=Purple Lamp +tile.rplamp.red.name=Red Lamp +tile.rplamp.silver.name=Light Gray Lamp +tile.rplamp.white.name=White Lamp +tile.rplamp.yellow.name=Yellow Lamp + +tile.rpshlamp.black.name=Black Fixture +tile.rpshlamp.blue.name=Blue Fixture +tile.rpshlamp.brown.name=Brown Fixture +tile.rpshlamp.cyan.name=Cyan Fixture +tile.rpshlamp.gray.name=Gray Fixture +tile.rpshlamp.green.name=Green Fixture +tile.rpshlamp.lightBlue.name=Light Blue Fixture +tile.rpshlamp.lime.name=Lime Fixture +tile.rpshlamp.magenta.name=Magenta Fixture +tile.rpshlamp.orange.name=Orange Fixture +tile.rpshlamp.pink.name=Pink Fixture +tile.rpshlamp.purple.name=Purple Fixture +tile.rpshlamp.red.name=Red Fixture +tile.rpshlamp.silver.name=Light Gray Fixture +tile.rpshlamp.white.name=White Fixture +tile.rpshlamp.yellow.name=Yellow Fixture + +tile.rpilamp.black.name=Inverted Black Lamp +tile.rpilamp.blue.name=Inverted Blue Lamp +tile.rpilamp.brown.name=Inverted Brown Lamp +tile.rpilamp.cyan.name=Inverted Cyan Lamp +tile.rpilamp.gray.name=Inverted Gray Lamp +tile.rpilamp.green.name=Inverted Green Lamp +tile.rpilamp.lightBlue.name=Inverted Light Blue Lamp +tile.rpilamp.lime.name=Inverted Lime Lamp +tile.rpilamp.magenta.name=Inverted Magenta Lamp +tile.rpilamp.orange.name=Inverted Orange Lamp +tile.rpilamp.pink.name=Inverted Pink Lamp +tile.rpilamp.purple.name=Inverted Purple Lamp +tile.rpilamp.red.name=Inverted Red Lamp +tile.rpilamp.silver.name=Inverted Light Gray Lamp +tile.rpilamp.white.name=Inverted White Lamp +tile.rpilamp.yellow.name=Inverted Yellow Lamp + +tile.rpishlamp.black.name=Inverted Black Fixture +tile.rpishlamp.blue.name=Inverted Blue Fixture +tile.rpishlamp.brown.name=Inverted Brown Fixture +tile.rpishlamp.cyan.name=Inverted Cyan Fixture +tile.rpishlamp.gray.name=Inverted Gray Fixture +tile.rpishlamp.green.name=Inverted Green Fixture +tile.rpishlamp.lightBlue.name=Inverted Light Blue Fixture +tile.rpishlamp.lime.name=Inverted Lime Fixture +tile.rpishlamp.magenta.name=Inverted Magenta Fixture +tile.rpishlamp.orange.name=Inverted Orange Fixture +tile.rpishlamp.pink.name=Inverted Pink Fixture +tile.rpishlamp.purple.name=Inverted Purple Fixture +tile.rpishlamp.red.name=Inverted Red Fixture +tile.rpishlamp.silver.name=Inverted Light Gray Fixture +tile.rpishlamp.white.name=Inverted White Fixture +tile.rpishlamp.yellow.name=Inverted Yellow Fixture + +tile.rpshlamp2.black.name=Black Cage Lamp +tile.rpshlamp2.blue.name=Blue Cage Lamp +tile.rpshlamp2.brown.name=Brown Cage Lamp +tile.rpshlamp2.cyan.name=Cyan Cage Lamp +tile.rpshlamp2.gray.name=Gray Cage Lamp +tile.rpshlamp2.green.name=Green Cage Lamp +tile.rpshlamp2.lightBlue.name=Light Blue Cage Lamp +tile.rpshlamp2.lime.name=Lime Cage Lamp +tile.rpshlamp2.magenta.name=Magenta Cage Lamp +tile.rpshlamp2.orange.name=Orange Cage Lamp +tile.rpshlamp2.pink.name=Pink Cage Lamp +tile.rpshlamp2.purple.name=Purple Cage Lamp +tile.rpshlamp2.red.name=Red Cage Lamp +tile.rpshlamp2.silver.name=Light Gray Cage Lamp +tile.rpshlamp2.white.name=White Cage Lamp +tile.rpshlamp2.yellow.name=Yellow Cage Lamp + +tile.rpishlamp2.black.name=Inverted Black Cage Lamp +tile.rpishlamp2.blue.name=Inverted Blue Cage Lamp +tile.rpishlamp2.brown.name=Inverted Brown Cage Lamp +tile.rpishlamp2.cyan.name=Inverted Cyan Cage Lamp +tile.rpishlamp2.gray.name=Inverted Gray Cage Lamp +tile.rpishlamp2.green.name=Inverted Green Cage Lamp +tile.rpishlamp2.lightBlue.name=Inverted Light Blue Cage Lamp +tile.rpishlamp2.lime.name=Inverted Lime Cage Lamp +tile.rpishlamp2.magenta.name=Inverted Magenta Cage Lamp +tile.rpishlamp2.orange.name=Inverted Orange Cage Lamp +tile.rpishlamp2.pink.name=Inverted Pink Cage Lamp +tile.rpishlamp2.purple.name=Inverted Purple Cage Lamp +tile.rpishlamp2.red.name=Inverted Red Cage Lamp +tile.rpishlamp2.silver.name=Inverted Light Gray Cage Lamp +tile.rpishlamp2.white.name=Inverted White Cage Lamp +tile.rpishlamp2.yellow.name=Inverted Yellow Cage Lamp \ No newline at end of file diff --git a/src/main/resources/assets/rplighting/lang/ru_RU.lang b/src/main/resources/assets/rplighting/lang/ru_RU.lang new file mode 100644 index 0000000..19f207c --- /dev/null +++ b/src/main/resources/assets/rplighting/lang/ru_RU.lang @@ -0,0 +1,103 @@ +itemGroup.RPLights=RedPower - Освещение + +tile.rplamp.black.name=Чераня лампа +tile.rplamp.blue.name=Синяя лампа +tile.rplamp.brown.name=Коричневая лампа +tile.rplamp.cyan.name=Бирюзовая лампа +tile.rplamp.gray.name=Серая лампа +tile.rplamp.green.name=Зеленая лампа +tile.rplamp.lightBlue.name=Голубая лампа +tile.rplamp.lime.name=Лаймовая лампа +tile.rplamp.magenta.name=Сиреневая лампа +tile.rplamp.orange.name=Оранжевая лампа +tile.rplamp.pink.name=Розовая лампа +tile.rplamp.purple.name=Фиолетовая лампа +tile.rplamp.red.name=Красная лампа +tile.rplamp.silver.name=Светло-серая лампа +tile.rplamp.white.name=Белая лампа +tile.rplamp.yellow.name=Желтая лампа + +tile.rpshlamp.black.name=Черный светильник +tile.rpshlamp.blue.name=Синий светильник +tile.rpshlamp.brown.name=Коричневый светильник +tile.rpshlamp.cyan.name=Бирюзовый светильник +tile.rpshlamp.gray.name=Серый светильник +tile.rpshlamp.green.name=Зеленый светильник +tile.rpshlamp.lightBlue.name=Голубой светильник +tile.rpshlamp.lime.name=Лаймовый светильник +tile.rpshlamp.magenta.name=Сиреневый светильник +tile.rpshlamp.orange.name=Оранжевый светильник +tile.rpshlamp.pink.name=Розовый светильник +tile.rpshlamp.purple.name=Фиолетовый светильник +tile.rpshlamp.red.name=Красный светильник +tile.rpshlamp.silver.name=Светло-серый светильник +tile.rpshlamp.white.name=Белый светильник +tile.rpshlamp.yellow.name=Желтый светильник + +tile.rpilamp.black.name=Инвертированная черная лампа +tile.rpilamp.blue.name=Инвертированная синяя лампа +tile.rpilamp.brown.name=Инвертированная коричневая лампа +tile.rpilamp.cyan.name=Инвертированная бирюзовая лампа +tile.rpilamp.gray.name=Инвертированная серая лампа +tile.rpilamp.green.name=Инвертированная зеленая лампа +tile.rpilamp.lightBlue.name=Инвертированная голубая лампа +tile.rpilamp.lime.name=Инвертированная лаймовая лампа +tile.rpilamp.magenta.name=Инвертированная сиреневая лампа +tile.rpilamp.orange.name=Инвертированная оранжевая лампа +tile.rpilamp.pink.name=Инвертированная розовая лампа +tile.rpilamp.purple.name=Инвертированная фиолетовая лампа +tile.rpilamp.red.name=Инвертированная красная лампа +tile.rpilamp.silver.name=Инвертированная светло-серая лампа +tile.rpilamp.white.name=Инвертированная белая лампа +tile.rpilamp.yellow.name=Инвертированная желтая лампа + +tile.rpishlamp.black.name=Инвертированный черный светильник +tile.rpishlamp.blue.name=Инвертированный синий светильник +tile.rpishlamp.brown.name=Инвертированный коричневый светильник +tile.rpishlamp.cyan.name=Инвертированный бирюзовый светильник +tile.rpishlamp.gray.name=Инвертированный серый светильник +tile.rpishlamp.green.name=Инвертированный зеленый светильник +tile.rpishlamp.lightBlue.name=Инвертированный голубой светильник +tile.rpishlamp.lime.name=Инвертированный лаймовый светильник +tile.rpishlamp.magenta.name=Инвертированный сиреневый светильник +tile.rpishlamp.orange.name=Инвертированный оранжевый светильник +tile.rpishlamp.pink.name=Инвертированный розовый светильник +tile.rpishlamp.purple.name=Инвертированный фиолетовый светильник +tile.rpishlamp.red.name=Инвертированный красный светильник +tile.rpishlamp.silver.name=Инвертированный светло-серый светильник +tile.rpishlamp.white.name=Инвертированный белый светильник +tile.rpishlamp.yellow.name=Инвертированный желтый светильник + +tile.rpshlamp2.black.name=Черная лампа в клетке +tile.rpshlamp2.blue.name=Синяя лампа в клетке +tile.rpshlamp2.brown.name=Коричневая лампа в клетке +tile.rpshlamp2.cyan.name=Бирюзовая лампа в клетке +tile.rpshlamp2.gray.name=Серая лампа в клетке +tile.rpshlamp2.green.name=Зеленая лампа в клетке +tile.rpshlamp2.lightBlue.name=Голубая лампа в клетке +tile.rpshlamp2.lime.name=Лаймовая лампа в клетке +tile.rpshlamp2.magenta.name=Сиреневая лампа в клетке +tile.rpshlamp2.orange.name=Оранжевая лампа в клетке +tile.rpshlamp2.pink.name=Розовая лампа в клетке +tile.rpshlamp2.purple.name=Фиолетовая лампа в клетке +tile.rpshlamp2.red.name=Красная лампа в клетке +tile.rpshlamp2.silver.name=Светло-серая лампа в клетке +tile.rpshlamp2.white.name=Белая лампа в клетке +tile.rpshlamp2.yellow.name=Желтая лампа в клетке + +tile.rpishlamp2.black.name=Инвертированная черная лампа в клетке +tile.rpishlamp2.blue.name=Инвертированная синяя лампа в клетке +tile.rpishlamp2.brown.name=Инвертированная коричневая лампа в клетке +tile.rpishlamp2.cyan.name=Инвертированная бирюзовая лампа в клетке +tile.rpishlamp2.gray.name=Инвертированная серая лампа в клетке +tile.rpishlamp2.green.name=Инвертированная зеленая лампа в клетке +tile.rpishlamp2.lightBlue.name=Инвертированная голубая лампа в клетке +tile.rpishlamp2.lime.name=Инвертированная лаймовая лампа в клетке +tile.rpishlamp2.magenta.name=Инвертированная сиреневая лампа в клетке +tile.rpishlamp2.orange.name=Инвертированная оранжевая лампа в клетке +tile.rpishlamp2.pink.name=Инвертированная розовая лампа в клетке +tile.rpishlamp2.purple.name=Инвертированная фиолетовая лампа в клетке +tile.rpishlamp2.red.name=Инвертированная красная лампа в клетке +tile.rpishlamp2.silver.name=Инвертированная светло-серая лампа в клетке +tile.rpishlamp2.white.name=Инвертированная белая лампа в клетке +tile.rpishlamp2.yellow.name=Инвертированная желтая лампа в клетке \ No newline at end of file diff --git a/src/main/resources/assets/rplighting/models/shlamp.png b/src/main/resources/assets/rplighting/models/shlamp.png new file mode 100644 index 0000000..f8ca282 Binary files /dev/null and b/src/main/resources/assets/rplighting/models/shlamp.png differ diff --git a/src/main/resources/assets/rplighting/models/shlamp1.obj b/src/main/resources/assets/rplighting/models/shlamp1.obj new file mode 100644 index 0000000..23743c5 --- /dev/null +++ b/src/main/resources/assets/rplighting/models/shlamp1.obj @@ -0,0 +1,112 @@ +# 24 Vertices +v 0.875000 0.000000 0.875000 +v 0.125000 0.000000 0.875000 +v 0.125000 0.000000 0.125000 +v 0.875000 0.000000 0.125000 +v 0.875000 0.125000 0.125000 +v 0.125000 0.125000 0.125000 +v 0.125000 0.125000 0.875000 +v 0.875000 0.125000 0.875000 +v 0.812500 0.500000 0.187500 +v 0.812500 0.125000 0.187500 +v 0.187500 0.125000 0.187500 +v 0.187500 0.500000 0.187500 +v 0.187500 0.500000 0.812500 +v 0.187500 0.125000 0.812500 +v 0.812500 0.125000 0.812500 +v 0.812500 0.500000 0.812500 +v 0.862500 0.550000 0.137500 +v 0.137500 0.550000 0.137500 +v 0.137500 0.550000 0.862500 +v 0.862500 0.550000 0.862500 +v 0.862500 0.125000 0.137500 +v 0.137500 0.125000 0.137500 +v 0.137500 0.125000 0.862500 +v 0.862500 0.125000 0.862500 + +# 64 Texture Coordinates +vtc 0.007813 0.804688 0.500000 0.500000 0.500000 +vtc 0.007813 0.757813 0.500000 0.500000 0.500000 +vtc 0.054688 0.757813 0.500000 0.500000 0.500000 +vtc 0.054688 0.804688 0.500000 0.500000 0.500000 +vtc 0.007813 0.804688 0.700000 0.700000 0.700000 +vtc 0.007813 0.757813 0.700000 0.700000 0.700000 +vtc 0.054688 0.757813 0.700000 0.700000 0.700000 +vtc 0.054688 0.804688 0.700000 0.700000 0.700000 +vtc 0.007813 0.757813 0.800000 0.800000 0.800000 +vtc 0.007813 0.750000 0.800000 0.800000 0.800000 +vtc 0.054688 0.750000 0.800000 0.800000 0.800000 +vtc 0.054688 0.757813 0.800000 0.800000 0.800000 +vtc 0.007813 0.757813 0.800000 0.800000 0.800000 +vtc 0.007813 0.750000 0.800000 0.800000 0.800000 +vtc 0.054688 0.750000 0.800000 0.800000 0.800000 +vtc 0.054688 0.757813 0.800000 0.800000 0.800000 +vtc 0.007813 0.757813 0.600000 0.600000 0.600000 +vtc 0.007813 0.750000 0.600000 0.600000 0.600000 +vtc 0.054688 0.750000 0.600000 0.600000 0.600000 +vtc 0.054688 0.757813 0.600000 0.600000 0.600000 +vtc 0.007813 0.757813 0.600000 0.600000 0.600000 +vtc 0.007813 0.750000 0.600000 0.600000 0.600000 +vtc 0.054688 0.750000 0.600000 0.600000 0.600000 +vtc 0.054688 0.757813 0.600000 0.600000 0.600000 +vtc 0.136719 0.781250 1.000000 1.000000 1.000000 +vtc 0.136719 0.757813 1.000000 1.000000 1.000000 +vtc 0.175781 0.757813 1.000000 1.000000 1.000000 +vtc 0.175781 0.781250 1.000000 1.000000 1.000000 +vtc 0.136719 0.781250 1.000000 1.000000 1.000000 +vtc 0.136719 0.757813 1.000000 1.000000 1.000000 +vtc 0.175781 0.757813 1.000000 1.000000 1.000000 +vtc 0.175781 0.781250 1.000000 1.000000 1.000000 +vtc 0.136719 0.781250 1.000000 1.000000 1.000000 +vtc 0.136719 0.757813 1.000000 1.000000 1.000000 +vtc 0.175781 0.757813 1.000000 1.000000 1.000000 +vtc 0.175781 0.781250 1.000000 1.000000 1.000000 +vtc 0.136719 0.781250 1.000000 1.000000 1.000000 +vtc 0.136719 0.757813 1.000000 1.000000 1.000000 +vtc 0.175781 0.757813 1.000000 1.000000 1.000000 +vtc 0.175781 0.781250 1.000000 1.000000 1.000000 +vtc 0.074219 0.800781 1.000000 1.000000 1.000000 +vtc 0.074219 0.761719 1.000000 1.000000 1.000000 +vtc 0.113281 0.761719 1.000000 1.000000 1.000000 +vtc 0.113281 0.800781 1.000000 1.000000 1.000000 +vtc 0.008594 0.991406 1.000000 1.000000 1.000000 +vtc 0.008594 0.946094 1.000000 1.000000 1.000000 +vtc 0.053906 0.946094 1.000000 1.000000 1.000000 +vtc 0.053906 0.991406 1.000000 1.000000 1.000000 +vtc 0.008594 0.971875 1.000000 1.000000 1.000000 +vtc 0.008594 0.945313 1.000000 1.000000 1.000000 +vtc 0.053906 0.945313 1.000000 1.000000 1.000000 +vtc 0.053906 0.971875 1.000000 1.000000 1.000000 +vtc 0.008594 0.971875 1.000000 1.000000 1.000000 +vtc 0.008594 0.945313 1.000000 1.000000 1.000000 +vtc 0.053906 0.945313 1.000000 1.000000 1.000000 +vtc 0.053906 0.971875 1.000000 1.000000 1.000000 +vtc 0.008594 0.971875 1.000000 1.000000 1.000000 +vtc 0.008594 0.945313 1.000000 1.000000 1.000000 +vtc 0.053906 0.945313 1.000000 1.000000 1.000000 +vtc 0.053906 0.971875 1.000000 1.000000 1.000000 +vtc 0.008594 0.971875 1.000000 1.000000 1.000000 +vtc 0.008594 0.945313 1.000000 1.000000 1.000000 +vtc 0.053906 0.945313 1.000000 1.000000 1.000000 +vtc 0.053906 0.971875 1.000000 1.000000 1.000000 + +# 3 Groups +g 0 +f 1/1 2/2 3/3 4/4 +f 5/5 6/6 7/7 8/8 +f 5/9 4/10 3/11 6/12 +f 7/13 2/14 1/15 8/16 +f 6/17 3/18 2/19 7/20 +f 8/21 1/22 4/23 5/24 +g 1 +f 9/25 10/26 11/27 12/28 +f 13/29 14/30 15/31 16/32 +f 12/33 11/34 14/35 13/36 +f 16/37 15/38 10/39 9/40 +f 9/41 12/42 13/43 16/44 +g 2 +f 17/45 18/46 19/47 20/48 +f 17/49 21/50 22/51 18/52 +f 19/53 23/54 24/55 20/56 +f 18/57 22/58 23/59 19/60 +f 20/61 24/62 21/63 17/64 diff --git a/src/main/resources/assets/rplighting/models/shlamp2.obj b/src/main/resources/assets/rplighting/models/shlamp2.obj new file mode 100644 index 0000000..5d92c30 --- /dev/null +++ b/src/main/resources/assets/rplighting/models/shlamp2.obj @@ -0,0 +1,170 @@ +# 32 Vertices +v 0.812500 0.000000 0.812500 +v 0.187500 0.000000 0.812500 +v 0.187500 0.000000 0.187500 +v 0.812500 0.000000 0.187500 +v 0.812500 0.125000 0.187500 +v 0.187500 0.125000 0.187500 +v 0.187500 0.125000 0.812500 +v 0.812500 0.125000 0.812500 +v 0.750000 0.750000 0.250000 +v 0.250000 0.750000 0.250000 +v 0.250000 0.750000 0.750000 +v 0.750000 0.750000 0.750000 +v 0.750000 0.125000 0.250000 +v 0.250000 0.125000 0.250000 +v 0.250000 0.125000 0.750000 +v 0.750000 0.125000 0.750000 +v 0.687500 0.687500 0.312500 +v 0.687500 0.125000 0.312500 +v 0.312500 0.125000 0.312500 +v 0.312500 0.687500 0.312500 +v 0.312500 0.687500 0.687500 +v 0.312500 0.125000 0.687500 +v 0.687500 0.125000 0.687500 +v 0.687500 0.687500 0.687500 +v 0.718750 0.718750 0.281250 +v 0.281250 0.718750 0.281250 +v 0.281250 0.718750 0.718750 +v 0.718750 0.718750 0.718750 +v 0.718750 0.125000 0.281250 +v 0.281250 0.125000 0.281250 +v 0.281250 0.125000 0.718750 +v 0.718750 0.125000 0.718750 + +# 104 Texture Coordinates +vtc 0.199219 0.800781 0.500000 0.500000 0.500000 +vtc 0.199219 0.761719 0.500000 0.500000 0.500000 +vtc 0.238281 0.761719 0.500000 0.500000 0.500000 +vtc 0.238281 0.800781 0.500000 0.500000 0.500000 +vtc 0.199219 0.800781 0.700000 0.700000 0.700000 +vtc 0.199219 0.761719 0.700000 0.700000 0.700000 +vtc 0.238281 0.761719 0.700000 0.700000 0.700000 +vtc 0.238281 0.800781 0.700000 0.700000 0.700000 +vtc 0.199219 0.757813 0.800000 0.800000 0.800000 +vtc 0.199219 0.750000 0.800000 0.800000 0.800000 +vtc 0.238281 0.750000 0.800000 0.800000 0.800000 +vtc 0.238281 0.757813 0.800000 0.800000 0.800000 +vtc 0.199219 0.757813 0.800000 0.800000 0.800000 +vtc 0.199219 0.750000 0.800000 0.800000 0.800000 +vtc 0.238281 0.750000 0.800000 0.800000 0.800000 +vtc 0.238281 0.757813 0.800000 0.800000 0.800000 +vtc 0.199219 0.757813 0.600000 0.600000 0.600000 +vtc 0.199219 0.750000 0.600000 0.600000 0.600000 +vtc 0.238281 0.750000 0.600000 0.600000 0.600000 +vtc 0.238281 0.757813 0.600000 0.600000 0.600000 +vtc 0.199219 0.757813 0.600000 0.600000 0.600000 +vtc 0.199219 0.750000 0.600000 0.600000 0.600000 +vtc 0.238281 0.750000 0.600000 0.600000 0.600000 +vtc 0.238281 0.757813 0.600000 0.600000 0.600000 +vtc 0.390625 0.796875 0.700000 0.700000 0.700000 +vtc 0.390625 0.765625 0.700000 0.700000 0.700000 +vtc 0.421875 0.765625 0.700000 0.700000 0.700000 +vtc 0.421875 0.796875 0.700000 0.700000 0.700000 +vtc 0.453125 0.796875 0.800000 0.800000 0.800000 +vtc 0.453125 0.757813 0.800000 0.800000 0.800000 +vtc 0.484375 0.757813 0.800000 0.800000 0.800000 +vtc 0.484375 0.796875 0.800000 0.800000 0.800000 +vtc 0.453125 0.796875 0.800000 0.800000 0.800000 +vtc 0.453125 0.757813 0.800000 0.800000 0.800000 +vtc 0.484375 0.757813 0.800000 0.800000 0.800000 +vtc 0.484375 0.796875 0.800000 0.800000 0.800000 +vtc 0.453125 0.796875 0.600000 0.600000 0.600000 +vtc 0.453125 0.757813 0.600000 0.600000 0.600000 +vtc 0.484375 0.757813 0.600000 0.600000 0.600000 +vtc 0.484375 0.796875 0.600000 0.600000 0.600000 +vtc 0.453125 0.796875 0.600000 0.600000 0.600000 +vtc 0.453125 0.757813 0.600000 0.600000 0.600000 +vtc 0.484375 0.757813 0.600000 0.600000 0.600000 +vtc 0.484375 0.796875 0.600000 0.600000 0.600000 +vtc 0.421875 0.765625 0.500000 0.500000 0.500000 +vtc 0.421875 0.796875 0.500000 0.500000 0.500000 +vtc 0.390625 0.796875 0.500000 0.500000 0.500000 +vtc 0.390625 0.765625 0.500000 0.500000 0.500000 +vtc 0.484375 0.757813 0.800000 0.800000 0.800000 +vtc 0.484375 0.796875 0.800000 0.800000 0.800000 +vtc 0.453125 0.796875 0.800000 0.800000 0.800000 +vtc 0.453125 0.757813 0.800000 0.800000 0.800000 +vtc 0.484375 0.757813 0.800000 0.800000 0.800000 +vtc 0.484375 0.796875 0.800000 0.800000 0.800000 +vtc 0.453125 0.796875 0.800000 0.800000 0.800000 +vtc 0.453125 0.757813 0.800000 0.800000 0.800000 +vtc 0.484375 0.757813 0.600000 0.600000 0.600000 +vtc 0.484375 0.796875 0.600000 0.600000 0.600000 +vtc 0.453125 0.796875 0.600000 0.600000 0.600000 +vtc 0.453125 0.757813 0.600000 0.600000 0.600000 +vtc 0.484375 0.757813 0.600000 0.600000 0.600000 +vtc 0.484375 0.796875 0.600000 0.600000 0.600000 +vtc 0.453125 0.796875 0.600000 0.600000 0.600000 +vtc 0.453125 0.757813 0.600000 0.600000 0.600000 +vtc 0.332031 0.792969 1.000000 1.000000 1.000000 +vtc 0.332031 0.757813 1.000000 1.000000 1.000000 +vtc 0.355469 0.757813 1.000000 1.000000 1.000000 +vtc 0.355469 0.792969 1.000000 1.000000 1.000000 +vtc 0.332031 0.792969 1.000000 1.000000 1.000000 +vtc 0.332031 0.757813 1.000000 1.000000 1.000000 +vtc 0.355469 0.757813 1.000000 1.000000 1.000000 +vtc 0.355469 0.792969 1.000000 1.000000 1.000000 +vtc 0.332031 0.792969 1.000000 1.000000 1.000000 +vtc 0.332031 0.757813 1.000000 1.000000 1.000000 +vtc 0.355469 0.757813 1.000000 1.000000 1.000000 +vtc 0.355469 0.792969 1.000000 1.000000 1.000000 +vtc 0.332031 0.792969 1.000000 1.000000 1.000000 +vtc 0.332031 0.757813 1.000000 1.000000 1.000000 +vtc 0.355469 0.757813 1.000000 1.000000 1.000000 +vtc 0.355469 0.792969 1.000000 1.000000 1.000000 +vtc 0.269531 0.792969 1.000000 1.000000 1.000000 +vtc 0.269531 0.769531 1.000000 1.000000 1.000000 +vtc 0.292969 0.769531 1.000000 1.000000 1.000000 +vtc 0.292969 0.792969 1.000000 1.000000 1.000000 +vtc 0.017578 0.982422 1.000000 1.000000 1.000000 +vtc 0.017578 0.955078 1.000000 1.000000 1.000000 +vtc 0.044922 0.955078 1.000000 1.000000 1.000000 +vtc 0.044922 0.982422 1.000000 1.000000 1.000000 +vtc 0.017578 0.982422 1.000000 1.000000 1.000000 +vtc 0.017578 0.945313 1.000000 1.000000 1.000000 +vtc 0.044922 0.945313 1.000000 1.000000 1.000000 +vtc 0.044922 0.982422 1.000000 1.000000 1.000000 +vtc 0.017578 0.982422 1.000000 1.000000 1.000000 +vtc 0.017578 0.945313 1.000000 1.000000 1.000000 +vtc 0.044922 0.945313 1.000000 1.000000 1.000000 +vtc 0.044922 0.982422 1.000000 1.000000 1.000000 +vtc 0.017578 0.982422 1.000000 1.000000 1.000000 +vtc 0.017578 0.945313 1.000000 1.000000 1.000000 +vtc 0.044922 0.945313 1.000000 1.000000 1.000000 +vtc 0.044922 0.982422 1.000000 1.000000 1.000000 +vtc 0.017578 0.982422 1.000000 1.000000 1.000000 +vtc 0.017578 0.945313 1.000000 1.000000 1.000000 +vtc 0.044922 0.945313 1.000000 1.000000 1.000000 +vtc 0.044922 0.982422 1.000000 1.000000 1.000000 + +# 3 Groups +g 0 +f 1/1 2/2 3/3 4/4 +f 5/5 6/6 7/7 8/8 +f 5/9 4/10 3/11 6/12 +f 7/13 2/14 1/15 8/16 +f 6/17 3/18 2/19 7/20 +f 8/21 1/22 4/23 5/24 +f 9/25 10/26 11/27 12/28 +f 9/29 13/30 14/31 10/32 +f 11/33 15/34 16/35 12/36 +f 10/37 14/38 15/39 11/40 +f 12/41 16/42 13/43 9/44 +f 10/45 9/46 12/47 11/48 +f 15/49 11/50 12/51 16/52 +f 13/53 9/54 10/55 14/56 +f 16/57 12/58 9/59 13/60 +f 14/61 10/62 11/63 15/64 +g 1 +f 17/65 18/66 19/67 20/68 +f 21/69 22/70 23/71 24/72 +f 20/73 19/74 22/75 21/76 +f 24/77 23/78 18/79 17/80 +f 17/81 20/82 21/83 24/84 +g 2 +f 25/85 26/86 27/87 28/88 +f 25/89 29/90 30/91 26/92 +f 27/93 31/94 32/95 28/96 +f 26/97 30/98 31/99 27/100 +f 28/101 32/102 29/103 25/104 diff --git a/src/main/resources/assets/rplighting/textures/blocks/lampOff/0.png b/src/main/resources/assets/rplighting/textures/blocks/lampOff/0.png new file mode 100644 index 0000000..1284de3 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/lampOff/0.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/lampOff/1.png b/src/main/resources/assets/rplighting/textures/blocks/lampOff/1.png new file mode 100644 index 0000000..fd3fcf4 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/lampOff/1.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/lampOff/10.png b/src/main/resources/assets/rplighting/textures/blocks/lampOff/10.png new file mode 100644 index 0000000..41ecbef Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/lampOff/10.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/lampOff/11.png b/src/main/resources/assets/rplighting/textures/blocks/lampOff/11.png new file mode 100644 index 0000000..8613809 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/lampOff/11.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/lampOff/12.png b/src/main/resources/assets/rplighting/textures/blocks/lampOff/12.png new file mode 100644 index 0000000..4878d3b Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/lampOff/12.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/lampOff/13.png b/src/main/resources/assets/rplighting/textures/blocks/lampOff/13.png new file mode 100644 index 0000000..4e860b4 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/lampOff/13.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/lampOff/14.png b/src/main/resources/assets/rplighting/textures/blocks/lampOff/14.png new file mode 100644 index 0000000..63ada1e Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/lampOff/14.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/lampOff/15.png b/src/main/resources/assets/rplighting/textures/blocks/lampOff/15.png new file mode 100644 index 0000000..16d9166 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/lampOff/15.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/lampOff/2.png b/src/main/resources/assets/rplighting/textures/blocks/lampOff/2.png new file mode 100644 index 0000000..f33d0b6 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/lampOff/2.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/lampOff/3.png b/src/main/resources/assets/rplighting/textures/blocks/lampOff/3.png new file mode 100644 index 0000000..b585058 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/lampOff/3.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/lampOff/4.png b/src/main/resources/assets/rplighting/textures/blocks/lampOff/4.png new file mode 100644 index 0000000..c71c89f Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/lampOff/4.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/lampOff/5.png b/src/main/resources/assets/rplighting/textures/blocks/lampOff/5.png new file mode 100644 index 0000000..1146176 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/lampOff/5.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/lampOff/6.png b/src/main/resources/assets/rplighting/textures/blocks/lampOff/6.png new file mode 100644 index 0000000..6b2be5d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/lampOff/6.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/lampOff/7.png b/src/main/resources/assets/rplighting/textures/blocks/lampOff/7.png new file mode 100644 index 0000000..8150dad Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/lampOff/7.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/lampOff/8.png b/src/main/resources/assets/rplighting/textures/blocks/lampOff/8.png new file mode 100644 index 0000000..1f7dcf4 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/lampOff/8.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/lampOff/9.png b/src/main/resources/assets/rplighting/textures/blocks/lampOff/9.png new file mode 100644 index 0000000..13d62e6 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/lampOff/9.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/lampOn/0.png b/src/main/resources/assets/rplighting/textures/blocks/lampOn/0.png new file mode 100644 index 0000000..1284de3 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/lampOn/0.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/lampOn/1.png b/src/main/resources/assets/rplighting/textures/blocks/lampOn/1.png new file mode 100644 index 0000000..af37f42 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/lampOn/1.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/lampOn/10.png b/src/main/resources/assets/rplighting/textures/blocks/lampOn/10.png new file mode 100644 index 0000000..83e980b Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/lampOn/10.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/lampOn/11.png b/src/main/resources/assets/rplighting/textures/blocks/lampOn/11.png new file mode 100644 index 0000000..cfd568b Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/lampOn/11.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/lampOn/12.png b/src/main/resources/assets/rplighting/textures/blocks/lampOn/12.png new file mode 100644 index 0000000..3398fc8 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/lampOn/12.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/lampOn/13.png b/src/main/resources/assets/rplighting/textures/blocks/lampOn/13.png new file mode 100644 index 0000000..690e484 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/lampOn/13.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/lampOn/14.png b/src/main/resources/assets/rplighting/textures/blocks/lampOn/14.png new file mode 100644 index 0000000..7350b67 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/lampOn/14.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/lampOn/15.png b/src/main/resources/assets/rplighting/textures/blocks/lampOn/15.png new file mode 100644 index 0000000..16d9166 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/lampOn/15.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/lampOn/2.png b/src/main/resources/assets/rplighting/textures/blocks/lampOn/2.png new file mode 100644 index 0000000..929a36b Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/lampOn/2.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/lampOn/3.png b/src/main/resources/assets/rplighting/textures/blocks/lampOn/3.png new file mode 100644 index 0000000..d1ed876 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/lampOn/3.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/lampOn/4.png b/src/main/resources/assets/rplighting/textures/blocks/lampOn/4.png new file mode 100644 index 0000000..6ec21cd Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/lampOn/4.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/lampOn/5.png b/src/main/resources/assets/rplighting/textures/blocks/lampOn/5.png new file mode 100644 index 0000000..c55fd53 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/lampOn/5.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/lampOn/6.png b/src/main/resources/assets/rplighting/textures/blocks/lampOn/6.png new file mode 100644 index 0000000..2d4fd52 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/lampOn/6.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/lampOn/7.png b/src/main/resources/assets/rplighting/textures/blocks/lampOn/7.png new file mode 100644 index 0000000..8150dad Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/lampOn/7.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/lampOn/8.png b/src/main/resources/assets/rplighting/textures/blocks/lampOn/8.png new file mode 100644 index 0000000..1f7dcf4 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/lampOn/8.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/lampOn/9.png b/src/main/resources/assets/rplighting/textures/blocks/lampOn/9.png new file mode 100644 index 0000000..52f6e77 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/lampOn/9.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line0/0.png b/src/main/resources/assets/rplighting/textures/blocks/out/line0/0.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line0/0.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line0/1.png b/src/main/resources/assets/rplighting/textures/blocks/out/line0/1.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line0/1.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line0/10.png b/src/main/resources/assets/rplighting/textures/blocks/out/line0/10.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line0/10.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line0/11.png b/src/main/resources/assets/rplighting/textures/blocks/out/line0/11.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line0/11.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line0/12.png b/src/main/resources/assets/rplighting/textures/blocks/out/line0/12.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line0/12.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line0/13.png b/src/main/resources/assets/rplighting/textures/blocks/out/line0/13.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line0/13.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line0/14.png b/src/main/resources/assets/rplighting/textures/blocks/out/line0/14.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line0/14.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line0/15.png b/src/main/resources/assets/rplighting/textures/blocks/out/line0/15.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line0/15.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line0/2.png b/src/main/resources/assets/rplighting/textures/blocks/out/line0/2.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line0/2.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line0/3.png b/src/main/resources/assets/rplighting/textures/blocks/out/line0/3.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line0/3.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line0/4.png b/src/main/resources/assets/rplighting/textures/blocks/out/line0/4.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line0/4.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line0/5.png b/src/main/resources/assets/rplighting/textures/blocks/out/line0/5.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line0/5.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line0/6.png b/src/main/resources/assets/rplighting/textures/blocks/out/line0/6.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line0/6.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line0/7.png b/src/main/resources/assets/rplighting/textures/blocks/out/line0/7.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line0/7.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line0/8.png b/src/main/resources/assets/rplighting/textures/blocks/out/line0/8.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line0/8.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line0/9.png b/src/main/resources/assets/rplighting/textures/blocks/out/line0/9.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line0/9.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line1/0.png b/src/main/resources/assets/rplighting/textures/blocks/out/line1/0.png new file mode 100644 index 0000000..1284de3 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line1/0.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line1/1.png b/src/main/resources/assets/rplighting/textures/blocks/out/line1/1.png new file mode 100644 index 0000000..fd3fcf4 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line1/1.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line1/10.png b/src/main/resources/assets/rplighting/textures/blocks/out/line1/10.png new file mode 100644 index 0000000..41ecbef Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line1/10.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line1/11.png b/src/main/resources/assets/rplighting/textures/blocks/out/line1/11.png new file mode 100644 index 0000000..8613809 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line1/11.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line1/12.png b/src/main/resources/assets/rplighting/textures/blocks/out/line1/12.png new file mode 100644 index 0000000..4878d3b Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line1/12.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line1/13.png b/src/main/resources/assets/rplighting/textures/blocks/out/line1/13.png new file mode 100644 index 0000000..4e860b4 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line1/13.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line1/14.png b/src/main/resources/assets/rplighting/textures/blocks/out/line1/14.png new file mode 100644 index 0000000..63ada1e Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line1/14.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line1/15.png b/src/main/resources/assets/rplighting/textures/blocks/out/line1/15.png new file mode 100644 index 0000000..16d9166 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line1/15.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line1/2.png b/src/main/resources/assets/rplighting/textures/blocks/out/line1/2.png new file mode 100644 index 0000000..f33d0b6 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line1/2.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line1/3.png b/src/main/resources/assets/rplighting/textures/blocks/out/line1/3.png new file mode 100644 index 0000000..b585058 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line1/3.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line1/4.png b/src/main/resources/assets/rplighting/textures/blocks/out/line1/4.png new file mode 100644 index 0000000..c71c89f Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line1/4.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line1/5.png b/src/main/resources/assets/rplighting/textures/blocks/out/line1/5.png new file mode 100644 index 0000000..1146176 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line1/5.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line1/6.png b/src/main/resources/assets/rplighting/textures/blocks/out/line1/6.png new file mode 100644 index 0000000..6b2be5d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line1/6.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line1/7.png b/src/main/resources/assets/rplighting/textures/blocks/out/line1/7.png new file mode 100644 index 0000000..8150dad Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line1/7.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line1/8.png b/src/main/resources/assets/rplighting/textures/blocks/out/line1/8.png new file mode 100644 index 0000000..1f7dcf4 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line1/8.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line1/9.png b/src/main/resources/assets/rplighting/textures/blocks/out/line1/9.png new file mode 100644 index 0000000..13d62e6 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line1/9.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line10/0.png b/src/main/resources/assets/rplighting/textures/blocks/out/line10/0.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line10/0.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line10/1.png b/src/main/resources/assets/rplighting/textures/blocks/out/line10/1.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line10/1.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line10/10.png b/src/main/resources/assets/rplighting/textures/blocks/out/line10/10.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line10/10.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line10/11.png b/src/main/resources/assets/rplighting/textures/blocks/out/line10/11.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line10/11.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line10/12.png b/src/main/resources/assets/rplighting/textures/blocks/out/line10/12.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line10/12.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line10/13.png b/src/main/resources/assets/rplighting/textures/blocks/out/line10/13.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line10/13.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line10/14.png b/src/main/resources/assets/rplighting/textures/blocks/out/line10/14.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line10/14.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line10/15.png b/src/main/resources/assets/rplighting/textures/blocks/out/line10/15.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line10/15.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line10/2.png b/src/main/resources/assets/rplighting/textures/blocks/out/line10/2.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line10/2.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line10/3.png b/src/main/resources/assets/rplighting/textures/blocks/out/line10/3.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line10/3.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line10/4.png b/src/main/resources/assets/rplighting/textures/blocks/out/line10/4.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line10/4.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line10/5.png b/src/main/resources/assets/rplighting/textures/blocks/out/line10/5.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line10/5.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line10/6.png b/src/main/resources/assets/rplighting/textures/blocks/out/line10/6.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line10/6.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line10/7.png b/src/main/resources/assets/rplighting/textures/blocks/out/line10/7.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line10/7.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line10/8.png b/src/main/resources/assets/rplighting/textures/blocks/out/line10/8.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line10/8.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line10/9.png b/src/main/resources/assets/rplighting/textures/blocks/out/line10/9.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line10/9.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line11/0.png b/src/main/resources/assets/rplighting/textures/blocks/out/line11/0.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line11/0.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line11/1.png b/src/main/resources/assets/rplighting/textures/blocks/out/line11/1.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line11/1.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line11/10.png b/src/main/resources/assets/rplighting/textures/blocks/out/line11/10.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line11/10.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line11/11.png b/src/main/resources/assets/rplighting/textures/blocks/out/line11/11.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line11/11.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line11/12.png b/src/main/resources/assets/rplighting/textures/blocks/out/line11/12.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line11/12.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line11/13.png b/src/main/resources/assets/rplighting/textures/blocks/out/line11/13.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line11/13.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line11/14.png b/src/main/resources/assets/rplighting/textures/blocks/out/line11/14.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line11/14.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line11/15.png b/src/main/resources/assets/rplighting/textures/blocks/out/line11/15.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line11/15.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line11/2.png b/src/main/resources/assets/rplighting/textures/blocks/out/line11/2.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line11/2.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line11/3.png b/src/main/resources/assets/rplighting/textures/blocks/out/line11/3.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line11/3.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line11/4.png b/src/main/resources/assets/rplighting/textures/blocks/out/line11/4.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line11/4.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line11/5.png b/src/main/resources/assets/rplighting/textures/blocks/out/line11/5.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line11/5.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line11/6.png b/src/main/resources/assets/rplighting/textures/blocks/out/line11/6.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line11/6.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line11/7.png b/src/main/resources/assets/rplighting/textures/blocks/out/line11/7.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line11/7.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line11/8.png b/src/main/resources/assets/rplighting/textures/blocks/out/line11/8.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line11/8.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line11/9.png b/src/main/resources/assets/rplighting/textures/blocks/out/line11/9.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line11/9.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line12/0.png b/src/main/resources/assets/rplighting/textures/blocks/out/line12/0.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line12/0.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line12/1.png b/src/main/resources/assets/rplighting/textures/blocks/out/line12/1.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line12/1.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line12/10.png b/src/main/resources/assets/rplighting/textures/blocks/out/line12/10.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line12/10.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line12/11.png b/src/main/resources/assets/rplighting/textures/blocks/out/line12/11.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line12/11.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line12/12.png b/src/main/resources/assets/rplighting/textures/blocks/out/line12/12.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line12/12.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line12/13.png b/src/main/resources/assets/rplighting/textures/blocks/out/line12/13.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line12/13.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line12/14.png b/src/main/resources/assets/rplighting/textures/blocks/out/line12/14.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line12/14.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line12/15.png b/src/main/resources/assets/rplighting/textures/blocks/out/line12/15.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line12/15.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line12/2.png b/src/main/resources/assets/rplighting/textures/blocks/out/line12/2.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line12/2.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line12/3.png b/src/main/resources/assets/rplighting/textures/blocks/out/line12/3.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line12/3.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line12/4.png b/src/main/resources/assets/rplighting/textures/blocks/out/line12/4.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line12/4.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line12/5.png b/src/main/resources/assets/rplighting/textures/blocks/out/line12/5.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line12/5.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line12/6.png b/src/main/resources/assets/rplighting/textures/blocks/out/line12/6.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line12/6.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line12/7.png b/src/main/resources/assets/rplighting/textures/blocks/out/line12/7.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line12/7.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line12/8.png b/src/main/resources/assets/rplighting/textures/blocks/out/line12/8.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line12/8.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line12/9.png b/src/main/resources/assets/rplighting/textures/blocks/out/line12/9.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line12/9.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line13/0.png b/src/main/resources/assets/rplighting/textures/blocks/out/line13/0.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line13/0.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line13/1.png b/src/main/resources/assets/rplighting/textures/blocks/out/line13/1.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line13/1.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line13/10.png b/src/main/resources/assets/rplighting/textures/blocks/out/line13/10.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line13/10.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line13/11.png b/src/main/resources/assets/rplighting/textures/blocks/out/line13/11.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line13/11.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line13/12.png b/src/main/resources/assets/rplighting/textures/blocks/out/line13/12.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line13/12.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line13/13.png b/src/main/resources/assets/rplighting/textures/blocks/out/line13/13.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line13/13.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line13/14.png b/src/main/resources/assets/rplighting/textures/blocks/out/line13/14.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line13/14.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line13/15.png b/src/main/resources/assets/rplighting/textures/blocks/out/line13/15.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line13/15.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line13/2.png b/src/main/resources/assets/rplighting/textures/blocks/out/line13/2.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line13/2.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line13/3.png b/src/main/resources/assets/rplighting/textures/blocks/out/line13/3.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line13/3.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line13/4.png b/src/main/resources/assets/rplighting/textures/blocks/out/line13/4.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line13/4.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line13/5.png b/src/main/resources/assets/rplighting/textures/blocks/out/line13/5.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line13/5.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line13/6.png b/src/main/resources/assets/rplighting/textures/blocks/out/line13/6.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line13/6.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line13/7.png b/src/main/resources/assets/rplighting/textures/blocks/out/line13/7.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line13/7.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line13/8.png b/src/main/resources/assets/rplighting/textures/blocks/out/line13/8.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line13/8.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line13/9.png b/src/main/resources/assets/rplighting/textures/blocks/out/line13/9.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line13/9.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line14/0.png b/src/main/resources/assets/rplighting/textures/blocks/out/line14/0.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line14/0.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line14/1.png b/src/main/resources/assets/rplighting/textures/blocks/out/line14/1.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line14/1.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line14/10.png b/src/main/resources/assets/rplighting/textures/blocks/out/line14/10.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line14/10.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line14/11.png b/src/main/resources/assets/rplighting/textures/blocks/out/line14/11.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line14/11.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line14/12.png b/src/main/resources/assets/rplighting/textures/blocks/out/line14/12.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line14/12.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line14/13.png b/src/main/resources/assets/rplighting/textures/blocks/out/line14/13.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line14/13.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line14/14.png b/src/main/resources/assets/rplighting/textures/blocks/out/line14/14.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line14/14.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line14/15.png b/src/main/resources/assets/rplighting/textures/blocks/out/line14/15.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line14/15.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line14/2.png b/src/main/resources/assets/rplighting/textures/blocks/out/line14/2.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line14/2.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line14/3.png b/src/main/resources/assets/rplighting/textures/blocks/out/line14/3.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line14/3.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line14/4.png b/src/main/resources/assets/rplighting/textures/blocks/out/line14/4.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line14/4.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line14/5.png b/src/main/resources/assets/rplighting/textures/blocks/out/line14/5.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line14/5.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line14/6.png b/src/main/resources/assets/rplighting/textures/blocks/out/line14/6.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line14/6.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line14/7.png b/src/main/resources/assets/rplighting/textures/blocks/out/line14/7.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line14/7.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line14/8.png b/src/main/resources/assets/rplighting/textures/blocks/out/line14/8.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line14/8.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line14/9.png b/src/main/resources/assets/rplighting/textures/blocks/out/line14/9.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line14/9.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line15/0.png b/src/main/resources/assets/rplighting/textures/blocks/out/line15/0.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line15/0.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line15/1.png b/src/main/resources/assets/rplighting/textures/blocks/out/line15/1.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line15/1.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line15/10.png b/src/main/resources/assets/rplighting/textures/blocks/out/line15/10.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line15/10.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line15/11.png b/src/main/resources/assets/rplighting/textures/blocks/out/line15/11.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line15/11.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line15/12.png b/src/main/resources/assets/rplighting/textures/blocks/out/line15/12.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line15/12.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line15/13.png b/src/main/resources/assets/rplighting/textures/blocks/out/line15/13.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line15/13.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line15/14.png b/src/main/resources/assets/rplighting/textures/blocks/out/line15/14.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line15/14.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line15/15.png b/src/main/resources/assets/rplighting/textures/blocks/out/line15/15.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line15/15.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line15/2.png b/src/main/resources/assets/rplighting/textures/blocks/out/line15/2.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line15/2.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line15/3.png b/src/main/resources/assets/rplighting/textures/blocks/out/line15/3.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line15/3.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line15/4.png b/src/main/resources/assets/rplighting/textures/blocks/out/line15/4.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line15/4.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line15/5.png b/src/main/resources/assets/rplighting/textures/blocks/out/line15/5.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line15/5.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line15/6.png b/src/main/resources/assets/rplighting/textures/blocks/out/line15/6.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line15/6.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line15/7.png b/src/main/resources/assets/rplighting/textures/blocks/out/line15/7.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line15/7.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line15/8.png b/src/main/resources/assets/rplighting/textures/blocks/out/line15/8.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line15/8.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line15/9.png b/src/main/resources/assets/rplighting/textures/blocks/out/line15/9.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line15/9.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line2/0.png b/src/main/resources/assets/rplighting/textures/blocks/out/line2/0.png new file mode 100644 index 0000000..1284de3 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line2/0.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line2/1.png b/src/main/resources/assets/rplighting/textures/blocks/out/line2/1.png new file mode 100644 index 0000000..af37f42 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line2/1.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line2/10.png b/src/main/resources/assets/rplighting/textures/blocks/out/line2/10.png new file mode 100644 index 0000000..83e980b Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line2/10.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line2/11.png b/src/main/resources/assets/rplighting/textures/blocks/out/line2/11.png new file mode 100644 index 0000000..cfd568b Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line2/11.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line2/12.png b/src/main/resources/assets/rplighting/textures/blocks/out/line2/12.png new file mode 100644 index 0000000..3398fc8 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line2/12.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line2/13.png b/src/main/resources/assets/rplighting/textures/blocks/out/line2/13.png new file mode 100644 index 0000000..690e484 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line2/13.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line2/14.png b/src/main/resources/assets/rplighting/textures/blocks/out/line2/14.png new file mode 100644 index 0000000..7350b67 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line2/14.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line2/15.png b/src/main/resources/assets/rplighting/textures/blocks/out/line2/15.png new file mode 100644 index 0000000..16d9166 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line2/15.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line2/2.png b/src/main/resources/assets/rplighting/textures/blocks/out/line2/2.png new file mode 100644 index 0000000..929a36b Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line2/2.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line2/3.png b/src/main/resources/assets/rplighting/textures/blocks/out/line2/3.png new file mode 100644 index 0000000..d1ed876 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line2/3.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line2/4.png b/src/main/resources/assets/rplighting/textures/blocks/out/line2/4.png new file mode 100644 index 0000000..6ec21cd Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line2/4.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line2/5.png b/src/main/resources/assets/rplighting/textures/blocks/out/line2/5.png new file mode 100644 index 0000000..c55fd53 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line2/5.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line2/6.png b/src/main/resources/assets/rplighting/textures/blocks/out/line2/6.png new file mode 100644 index 0000000..2d4fd52 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line2/6.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line2/7.png b/src/main/resources/assets/rplighting/textures/blocks/out/line2/7.png new file mode 100644 index 0000000..8150dad Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line2/7.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line2/8.png b/src/main/resources/assets/rplighting/textures/blocks/out/line2/8.png new file mode 100644 index 0000000..1f7dcf4 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line2/8.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line2/9.png b/src/main/resources/assets/rplighting/textures/blocks/out/line2/9.png new file mode 100644 index 0000000..52f6e77 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line2/9.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line3/0.png b/src/main/resources/assets/rplighting/textures/blocks/out/line3/0.png new file mode 100644 index 0000000..57505ce Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line3/0.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line3/1.png b/src/main/resources/assets/rplighting/textures/blocks/out/line3/1.png new file mode 100644 index 0000000..e681812 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line3/1.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line3/10.png b/src/main/resources/assets/rplighting/textures/blocks/out/line3/10.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line3/10.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line3/11.png b/src/main/resources/assets/rplighting/textures/blocks/out/line3/11.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line3/11.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line3/12.png b/src/main/resources/assets/rplighting/textures/blocks/out/line3/12.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line3/12.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line3/13.png b/src/main/resources/assets/rplighting/textures/blocks/out/line3/13.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line3/13.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line3/14.png b/src/main/resources/assets/rplighting/textures/blocks/out/line3/14.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line3/14.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line3/15.png b/src/main/resources/assets/rplighting/textures/blocks/out/line3/15.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line3/15.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line3/2.png b/src/main/resources/assets/rplighting/textures/blocks/out/line3/2.png new file mode 100644 index 0000000..87fabe8 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line3/2.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line3/3.png b/src/main/resources/assets/rplighting/textures/blocks/out/line3/3.png new file mode 100644 index 0000000..4e4bc2c Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line3/3.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line3/4.png b/src/main/resources/assets/rplighting/textures/blocks/out/line3/4.png new file mode 100644 index 0000000..caa7f73 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line3/4.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line3/5.png b/src/main/resources/assets/rplighting/textures/blocks/out/line3/5.png new file mode 100644 index 0000000..11e4e58 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line3/5.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line3/6.png b/src/main/resources/assets/rplighting/textures/blocks/out/line3/6.png new file mode 100644 index 0000000..17e9362 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line3/6.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line3/7.png b/src/main/resources/assets/rplighting/textures/blocks/out/line3/7.png new file mode 100644 index 0000000..9613c25 Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line3/7.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line3/8.png b/src/main/resources/assets/rplighting/textures/blocks/out/line3/8.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line3/8.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line3/9.png b/src/main/resources/assets/rplighting/textures/blocks/out/line3/9.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line3/9.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line4/0.png b/src/main/resources/assets/rplighting/textures/blocks/out/line4/0.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line4/0.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line4/1.png b/src/main/resources/assets/rplighting/textures/blocks/out/line4/1.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line4/1.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line4/10.png b/src/main/resources/assets/rplighting/textures/blocks/out/line4/10.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line4/10.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line4/11.png b/src/main/resources/assets/rplighting/textures/blocks/out/line4/11.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line4/11.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line4/12.png b/src/main/resources/assets/rplighting/textures/blocks/out/line4/12.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line4/12.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line4/13.png b/src/main/resources/assets/rplighting/textures/blocks/out/line4/13.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line4/13.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line4/14.png b/src/main/resources/assets/rplighting/textures/blocks/out/line4/14.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line4/14.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line4/15.png b/src/main/resources/assets/rplighting/textures/blocks/out/line4/15.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line4/15.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line4/2.png b/src/main/resources/assets/rplighting/textures/blocks/out/line4/2.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line4/2.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line4/3.png b/src/main/resources/assets/rplighting/textures/blocks/out/line4/3.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line4/3.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line4/4.png b/src/main/resources/assets/rplighting/textures/blocks/out/line4/4.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line4/4.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line4/5.png b/src/main/resources/assets/rplighting/textures/blocks/out/line4/5.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line4/5.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line4/6.png b/src/main/resources/assets/rplighting/textures/blocks/out/line4/6.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line4/6.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line4/7.png b/src/main/resources/assets/rplighting/textures/blocks/out/line4/7.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line4/7.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line4/8.png b/src/main/resources/assets/rplighting/textures/blocks/out/line4/8.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line4/8.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line4/9.png b/src/main/resources/assets/rplighting/textures/blocks/out/line4/9.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line4/9.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line5/0.png b/src/main/resources/assets/rplighting/textures/blocks/out/line5/0.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line5/0.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line5/1.png b/src/main/resources/assets/rplighting/textures/blocks/out/line5/1.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line5/1.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line5/10.png b/src/main/resources/assets/rplighting/textures/blocks/out/line5/10.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line5/10.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line5/11.png b/src/main/resources/assets/rplighting/textures/blocks/out/line5/11.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line5/11.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line5/12.png b/src/main/resources/assets/rplighting/textures/blocks/out/line5/12.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line5/12.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line5/13.png b/src/main/resources/assets/rplighting/textures/blocks/out/line5/13.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line5/13.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line5/14.png b/src/main/resources/assets/rplighting/textures/blocks/out/line5/14.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line5/14.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line5/15.png b/src/main/resources/assets/rplighting/textures/blocks/out/line5/15.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line5/15.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line5/2.png b/src/main/resources/assets/rplighting/textures/blocks/out/line5/2.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line5/2.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line5/3.png b/src/main/resources/assets/rplighting/textures/blocks/out/line5/3.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line5/3.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line5/4.png b/src/main/resources/assets/rplighting/textures/blocks/out/line5/4.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line5/4.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line5/5.png b/src/main/resources/assets/rplighting/textures/blocks/out/line5/5.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line5/5.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line5/6.png b/src/main/resources/assets/rplighting/textures/blocks/out/line5/6.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line5/6.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line5/7.png b/src/main/resources/assets/rplighting/textures/blocks/out/line5/7.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line5/7.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line5/8.png b/src/main/resources/assets/rplighting/textures/blocks/out/line5/8.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line5/8.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line5/9.png b/src/main/resources/assets/rplighting/textures/blocks/out/line5/9.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line5/9.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line6/0.png b/src/main/resources/assets/rplighting/textures/blocks/out/line6/0.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line6/0.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line6/1.png b/src/main/resources/assets/rplighting/textures/blocks/out/line6/1.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line6/1.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line6/10.png b/src/main/resources/assets/rplighting/textures/blocks/out/line6/10.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line6/10.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line6/11.png b/src/main/resources/assets/rplighting/textures/blocks/out/line6/11.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line6/11.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line6/12.png b/src/main/resources/assets/rplighting/textures/blocks/out/line6/12.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line6/12.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line6/13.png b/src/main/resources/assets/rplighting/textures/blocks/out/line6/13.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line6/13.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line6/14.png b/src/main/resources/assets/rplighting/textures/blocks/out/line6/14.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line6/14.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line6/15.png b/src/main/resources/assets/rplighting/textures/blocks/out/line6/15.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line6/15.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line6/2.png b/src/main/resources/assets/rplighting/textures/blocks/out/line6/2.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line6/2.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line6/3.png b/src/main/resources/assets/rplighting/textures/blocks/out/line6/3.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line6/3.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line6/4.png b/src/main/resources/assets/rplighting/textures/blocks/out/line6/4.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line6/4.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line6/5.png b/src/main/resources/assets/rplighting/textures/blocks/out/line6/5.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line6/5.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line6/6.png b/src/main/resources/assets/rplighting/textures/blocks/out/line6/6.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line6/6.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line6/7.png b/src/main/resources/assets/rplighting/textures/blocks/out/line6/7.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line6/7.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line6/8.png b/src/main/resources/assets/rplighting/textures/blocks/out/line6/8.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line6/8.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line6/9.png b/src/main/resources/assets/rplighting/textures/blocks/out/line6/9.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line6/9.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line7/0.png b/src/main/resources/assets/rplighting/textures/blocks/out/line7/0.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line7/0.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line7/1.png b/src/main/resources/assets/rplighting/textures/blocks/out/line7/1.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line7/1.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line7/10.png b/src/main/resources/assets/rplighting/textures/blocks/out/line7/10.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line7/10.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line7/11.png b/src/main/resources/assets/rplighting/textures/blocks/out/line7/11.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line7/11.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line7/12.png b/src/main/resources/assets/rplighting/textures/blocks/out/line7/12.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line7/12.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line7/13.png b/src/main/resources/assets/rplighting/textures/blocks/out/line7/13.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line7/13.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line7/14.png b/src/main/resources/assets/rplighting/textures/blocks/out/line7/14.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line7/14.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line7/15.png b/src/main/resources/assets/rplighting/textures/blocks/out/line7/15.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line7/15.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line7/2.png b/src/main/resources/assets/rplighting/textures/blocks/out/line7/2.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line7/2.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line7/3.png b/src/main/resources/assets/rplighting/textures/blocks/out/line7/3.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line7/3.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line7/4.png b/src/main/resources/assets/rplighting/textures/blocks/out/line7/4.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line7/4.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line7/5.png b/src/main/resources/assets/rplighting/textures/blocks/out/line7/5.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line7/5.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line7/6.png b/src/main/resources/assets/rplighting/textures/blocks/out/line7/6.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line7/6.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line7/7.png b/src/main/resources/assets/rplighting/textures/blocks/out/line7/7.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line7/7.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line7/8.png b/src/main/resources/assets/rplighting/textures/blocks/out/line7/8.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line7/8.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line7/9.png b/src/main/resources/assets/rplighting/textures/blocks/out/line7/9.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line7/9.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line8/0.png b/src/main/resources/assets/rplighting/textures/blocks/out/line8/0.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line8/0.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line8/1.png b/src/main/resources/assets/rplighting/textures/blocks/out/line8/1.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line8/1.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line8/10.png b/src/main/resources/assets/rplighting/textures/blocks/out/line8/10.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line8/10.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line8/11.png b/src/main/resources/assets/rplighting/textures/blocks/out/line8/11.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line8/11.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line8/12.png b/src/main/resources/assets/rplighting/textures/blocks/out/line8/12.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line8/12.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line8/13.png b/src/main/resources/assets/rplighting/textures/blocks/out/line8/13.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line8/13.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line8/14.png b/src/main/resources/assets/rplighting/textures/blocks/out/line8/14.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line8/14.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line8/15.png b/src/main/resources/assets/rplighting/textures/blocks/out/line8/15.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line8/15.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line8/2.png b/src/main/resources/assets/rplighting/textures/blocks/out/line8/2.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line8/2.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line8/3.png b/src/main/resources/assets/rplighting/textures/blocks/out/line8/3.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line8/3.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line8/4.png b/src/main/resources/assets/rplighting/textures/blocks/out/line8/4.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line8/4.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line8/5.png b/src/main/resources/assets/rplighting/textures/blocks/out/line8/5.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line8/5.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line8/6.png b/src/main/resources/assets/rplighting/textures/blocks/out/line8/6.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line8/6.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line8/7.png b/src/main/resources/assets/rplighting/textures/blocks/out/line8/7.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line8/7.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line8/8.png b/src/main/resources/assets/rplighting/textures/blocks/out/line8/8.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line8/8.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line8/9.png b/src/main/resources/assets/rplighting/textures/blocks/out/line8/9.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line8/9.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line9/0.png b/src/main/resources/assets/rplighting/textures/blocks/out/line9/0.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line9/0.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line9/1.png b/src/main/resources/assets/rplighting/textures/blocks/out/line9/1.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line9/1.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line9/10.png b/src/main/resources/assets/rplighting/textures/blocks/out/line9/10.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line9/10.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line9/11.png b/src/main/resources/assets/rplighting/textures/blocks/out/line9/11.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line9/11.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line9/12.png b/src/main/resources/assets/rplighting/textures/blocks/out/line9/12.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line9/12.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line9/13.png b/src/main/resources/assets/rplighting/textures/blocks/out/line9/13.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line9/13.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line9/14.png b/src/main/resources/assets/rplighting/textures/blocks/out/line9/14.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line9/14.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line9/15.png b/src/main/resources/assets/rplighting/textures/blocks/out/line9/15.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line9/15.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line9/2.png b/src/main/resources/assets/rplighting/textures/blocks/out/line9/2.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line9/2.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line9/3.png b/src/main/resources/assets/rplighting/textures/blocks/out/line9/3.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line9/3.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line9/4.png b/src/main/resources/assets/rplighting/textures/blocks/out/line9/4.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line9/4.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line9/5.png b/src/main/resources/assets/rplighting/textures/blocks/out/line9/5.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line9/5.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line9/6.png b/src/main/resources/assets/rplighting/textures/blocks/out/line9/6.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line9/6.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line9/7.png b/src/main/resources/assets/rplighting/textures/blocks/out/line9/7.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line9/7.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line9/8.png b/src/main/resources/assets/rplighting/textures/blocks/out/line9/8.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line9/8.png differ diff --git a/src/main/resources/assets/rplighting/textures/blocks/out/line9/9.png b/src/main/resources/assets/rplighting/textures/blocks/out/line9/9.png new file mode 100644 index 0000000..6c4b66d Binary files /dev/null and b/src/main/resources/assets/rplighting/textures/blocks/out/line9/9.png differ diff --git a/src/main/resources/assets/rplogic/lang/en_US.lang b/src/main/resources/assets/rplogic/lang/en_US.lang new file mode 100644 index 0000000..ab61033 --- /dev/null +++ b/src/main/resources/assets/rplogic/lang/en_US.lang @@ -0,0 +1,36 @@ +tile.irand.name=AND Gate +tile.irbuf.name=Buffer Gate +tile.irbusxcvr.name=Bus Transceiver +tile.ircounter.name=Counter +tile.irdlatch.name=Transparent Latch +tile.irlatch.name=RS Latch +tile.irmux.name=Multiplexer +tile.irnand.name=NAND Gate +tile.irnor.name=NOR Gate +tile.irnot.name=NOT Gate +tile.iror.name=OR Gate +tile.irpulse.name=Pulse Former +tile.irrand.name=Randomizer +tile.irrepeater.name=Repeater +tile.irseq.name=Sequencer +tile.irstate.name=State Cell +tile.irsync.name=Synchronizer +tile.irtimer.name=Timer +tile.irtoggle.name=Toggle Latch +tile.irxnor.name=XNOR Gate +tile.irxor.name=XOR Gate +tile.rpainv.name=Invert Cell +tile.rpanc.name=Null Cell +tile.rpaninv.name=Non-Invert Cell +tile.rplightsensor.name=Light Sensor + +item.iranode.name=Stone Anode +item.irbundle.name=Stone Bundle +item.ircathode.name=Stone Cathode +item.irchip.name=Silicon Chip +item.irplate.name=Plate Assembly +item.irpointer.name=Stone Pointer +item.irredwire.name=Stone Redwire +item.irtchip.name=Tainted Silicon Chip +item.irwafer.name=Stone Wafer +item.irwire.name=Stone Wire \ No newline at end of file diff --git a/src/main/resources/assets/rplogic/lang/ru_RU.lang b/src/main/resources/assets/rplogic/lang/ru_RU.lang new file mode 100644 index 0000000..54dc434 --- /dev/null +++ b/src/main/resources/assets/rplogic/lang/ru_RU.lang @@ -0,0 +1,36 @@ +tile.irand.name=Элемент "И" +tile.irbuf.name=Буферный элемент +tile.irbusxcvr.name=Шинный приемопередатчик +tile.ircounter.name=Счетчик +tile.irdlatch.name=Прозрачный переключатель +tile.irlatch.name=Триггер "ИЛИ НЕ" +tile.irmux.name=Мультиплексер +tile.irnand.name=Элемент "И НЕ" +tile.irnor.name=Элемент "ИЛИ НЕ" +tile.irnot.name=Элемент "НЕ" +tile.iror.name=Элемент "ИЛИ" +tile.irpulse.name=Формирователь импульса +tile.irrand.name=Рандомизатор +tile.irrepeater.name=Повторитель +tile.irseq.name=Секвенсер +tile.irstate.name=Штатный передатчик +tile.irsync.name=Синхронизатор +tile.irtimer.name=Таймер +tile.irtoggle.name=Тумблер +tile.irxnor.name=Элемент "ИСКЛЮЧАЮЩЕЕ ИЛИ НЕ" +tile.irxor.name=Элемент "ИСКЛЮЧАЮЩЕЕ ИЛИ" +tile.rpainv.name=Инверторный элемент +tile.rpanc.name=Нулевой элемент +tile.rpaninv.name=Неинверторный элемент +tile.rplightsensor.name=Датчик света + +item.iranode.name=Анод +item.irbundle.name=Связка проводов +item.ircathode.name=Катод +item.irchip.name=Кремниевый чип +item.irplate.name=Комплект плат +item.irpointer.name=Указатель +item.irredwire.name=Красный провод +item.irtchip.name=Испорченный кремниевый чип +item.irwafer.name=Каменная вафля +item.irwire.name=Провод \ No newline at end of file diff --git a/src/main/resources/assets/rplogic/models/arraycells.obj b/src/main/resources/assets/rplogic/models/arraycells.obj new file mode 100644 index 0000000..4d959bb --- /dev/null +++ b/src/main/resources/assets/rplogic/models/arraycells.obj @@ -0,0 +1,608 @@ +# 112 Vertices +v 1.000000 1.000000 0.125000 +v 1.000000 0.000000 0.125000 +v 0.000000 0.000000 0.125000 +v 0.000000 1.000000 0.125000 +v 0.000000 1.000000 0.187500 +v 0.000000 0.000000 0.187500 +v 1.000000 0.000000 0.187500 +v 1.000000 1.000000 0.187500 +v 1.000000 1.000000 0.812500 +v 1.000000 0.000000 0.812500 +v 0.000000 0.000000 0.812500 +v 0.000000 1.000000 0.812500 +v 0.000000 1.000000 0.875000 +v 0.000000 0.000000 0.875000 +v 1.000000 0.000000 0.875000 +v 1.000000 1.000000 0.875000 +v 1.000000 0.562500 1.000000 +v 0.000000 0.562500 1.000000 +v 0.000000 0.562500 0.000000 +v 1.000000 0.562500 0.000000 +v 1.000000 0.625000 0.000000 +v 0.000000 0.625000 0.000000 +v 0.000000 0.625000 1.000000 +v 1.000000 0.625000 1.000000 +v 0.125000 1.000000 0.000000 +v 0.125000 0.000000 0.000000 +v 0.125000 0.000000 1.000000 +v 0.125000 1.000000 1.000000 +v 0.187500 1.000000 1.000000 +v 0.187500 0.000000 1.000000 +v 0.187500 0.000000 0.000000 +v 0.187500 1.000000 0.000000 +v 0.812500 1.000000 0.000000 +v 0.812500 0.000000 0.000000 +v 0.812500 0.000000 1.000000 +v 0.812500 1.000000 1.000000 +v 0.875000 1.000000 1.000000 +v 0.875000 0.000000 1.000000 +v 0.875000 0.000000 0.000000 +v 0.875000 1.000000 0.000000 +v 1.000000 0.125000 0.000000 +v 0.000000 0.125000 0.000000 +v 0.000000 0.125000 1.000000 +v 1.000000 0.125000 1.000000 +v 1.000000 0.000000 0.000000 +v 0.000000 0.000000 0.000000 +v 0.000000 0.000000 1.000000 +v 1.000000 0.000000 1.000000 +v 1.000000 0.187500 0.000000 +v 0.000000 0.187500 0.000000 +v 0.000000 0.187500 1.000000 +v 1.000000 0.187500 1.000000 +v 0.000000 1.000000 0.000000 +v 0.000000 1.000000 1.000000 +v 1.000000 1.000000 1.000000 +v 1.000000 1.000000 0.000000 +v 1.000000 1.000000 0.437500 +v 1.000000 0.000000 0.437500 +v 0.000000 0.000000 0.437500 +v 0.000000 1.000000 0.437500 +v 0.000000 1.000000 0.562500 +v 0.000000 0.000000 0.562500 +v 1.000000 0.000000 0.562500 +v 1.000000 1.000000 0.562500 +v 0.250000 1.000000 1.000000 +v 0.250000 0.000000 1.000000 +v 0.250000 0.000000 0.000000 +v 0.250000 1.000000 0.000000 +v 0.750000 1.000000 0.000000 +v 0.750000 0.000000 0.000000 +v 0.750000 0.000000 1.000000 +v 0.750000 1.000000 1.000000 +v 1.000000 1.000000 0.250000 +v 1.000000 0.000000 0.250000 +v 0.000000 0.000000 0.250000 +v 0.000000 1.000000 0.250000 +v 0.000000 1.000000 0.375000 +v 0.000000 0.000000 0.375000 +v 1.000000 0.000000 0.375000 +v 1.000000 1.000000 0.375000 +v 0.437500 1.000000 0.000000 +v 0.437500 0.000000 0.000000 +v 0.437500 0.000000 1.000000 +v 0.437500 1.000000 1.000000 +v 0.562500 1.000000 1.000000 +v 0.562500 0.000000 1.000000 +v 0.562500 0.000000 0.000000 +v 0.562500 1.000000 0.000000 +v 1.000000 0.750000 0.000000 +v 0.000000 0.750000 0.000000 +v 0.000000 0.750000 1.000000 +v 1.000000 0.750000 1.000000 +v 1.000000 0.500000 1.000000 +v 0.000000 0.500000 1.000000 +v 0.000000 0.500000 0.000000 +v 1.000000 0.500000 0.000000 +v 0.312500 1.000000 0.000000 +v 0.312500 0.000000 0.000000 +v 0.312500 0.000000 1.000000 +v 0.312500 1.000000 1.000000 +v 0.687500 1.000000 1.000000 +v 0.687500 0.000000 1.000000 +v 0.687500 0.000000 0.000000 +v 0.687500 1.000000 0.000000 +v 1.000000 1.000000 0.312500 +v 1.000000 0.000000 0.312500 +v 0.000000 0.000000 0.312500 +v 0.000000 1.000000 0.312500 +v 0.000000 1.000000 0.687500 +v 0.000000 0.000000 0.687500 +v 1.000000 0.000000 0.687500 +v 1.000000 1.000000 0.687500 + +# 380 Texture Coordinates +vtc 0.375000 0.875000 0.800000 0.800000 0.800000 +vtc 0.375000 0.812500 0.800000 0.800000 0.800000 +vtc 0.437500 0.812500 0.800000 0.800000 0.800000 +vtc 0.437500 0.875000 0.800000 0.800000 0.800000 +vtc 0.375000 0.875000 0.800000 0.800000 0.800000 +vtc 0.375000 0.812500 0.800000 0.800000 0.800000 +vtc 0.437500 0.812500 0.800000 0.800000 0.800000 +vtc 0.437500 0.875000 0.800000 0.800000 0.800000 +vtc 0.375000 0.875000 0.800000 0.800000 0.800000 +vtc 0.375000 0.812500 0.800000 0.800000 0.800000 +vtc 0.437500 0.812500 0.800000 0.800000 0.800000 +vtc 0.437500 0.875000 0.800000 0.800000 0.800000 +vtc 0.375000 0.875000 0.800000 0.800000 0.800000 +vtc 0.375000 0.812500 0.800000 0.800000 0.800000 +vtc 0.437500 0.812500 0.800000 0.800000 0.800000 +vtc 0.437500 0.875000 0.800000 0.800000 0.800000 +vtc 0.500000 0.875000 0.500000 0.500000 0.500000 +vtc 0.500000 0.812500 0.500000 0.500000 0.500000 +vtc 0.562500 0.812500 0.500000 0.500000 0.500000 +vtc 0.562500 0.875000 0.500000 0.500000 0.500000 +vtc 0.437500 0.875000 1.000000 1.000000 1.000000 +vtc 0.437500 0.812500 1.000000 1.000000 1.000000 +vtc 0.500000 0.812500 1.000000 1.000000 1.000000 +vtc 0.500000 0.875000 1.000000 1.000000 1.000000 +vtc 0.562500 0.875000 0.600000 0.600000 0.600000 +vtc 0.562500 0.812500 0.600000 0.600000 0.600000 +vtc 0.625000 0.812500 0.600000 0.600000 0.600000 +vtc 0.625000 0.875000 0.600000 0.600000 0.600000 +vtc 0.562500 0.875000 0.600000 0.600000 0.600000 +vtc 0.562500 0.812500 0.600000 0.600000 0.600000 +vtc 0.625000 0.812500 0.600000 0.600000 0.600000 +vtc 0.625000 0.875000 0.600000 0.600000 0.600000 +vtc 0.562500 0.875000 0.600000 0.600000 0.600000 +vtc 0.562500 0.812500 0.600000 0.600000 0.600000 +vtc 0.625000 0.812500 0.600000 0.600000 0.600000 +vtc 0.625000 0.875000 0.600000 0.600000 0.600000 +vtc 0.562500 0.875000 0.600000 0.600000 0.600000 +vtc 0.562500 0.812500 0.600000 0.600000 0.600000 +vtc 0.625000 0.812500 0.600000 0.600000 0.600000 +vtc 0.625000 0.875000 0.600000 0.600000 0.600000 +vtc 0.125000 1.000000 1.000000 1.000000 1.000000 +vtc 0.125000 0.937500 1.000000 1.000000 1.000000 +vtc 0.187500 0.937500 1.000000 1.000000 1.000000 +vtc 0.187500 1.000000 1.000000 1.000000 1.000000 +vtc 0.062500 0.945313 0.800000 0.800000 0.800000 +vtc 0.062500 0.937500 0.800000 0.800000 0.800000 +vtc 0.125000 0.937500 0.800000 0.800000 0.800000 +vtc 0.125000 0.945313 0.800000 0.800000 0.800000 +vtc 0.062500 0.945313 0.800000 0.800000 0.800000 +vtc 0.062500 0.937500 0.800000 0.800000 0.800000 +vtc 0.125000 0.937500 0.800000 0.800000 0.800000 +vtc 0.125000 0.945313 0.800000 0.800000 0.800000 +vtc 0.062500 0.945313 0.600000 0.600000 0.600000 +vtc 0.062500 0.937500 0.600000 0.600000 0.600000 +vtc 0.125000 0.937500 0.600000 0.600000 0.600000 +vtc 0.125000 0.945313 0.600000 0.600000 0.600000 +vtc 0.062500 0.945313 0.600000 0.600000 0.600000 +vtc 0.062500 0.937500 0.600000 0.600000 0.600000 +vtc 0.125000 0.937500 0.600000 0.600000 0.600000 +vtc 0.125000 0.945313 0.600000 0.600000 0.600000 +vtc 0.187500 1.000000 1.000000 1.000000 1.000000 +vtc 0.187500 0.937500 1.000000 1.000000 1.000000 +vtc 0.250000 0.937500 1.000000 1.000000 1.000000 +vtc 0.250000 1.000000 1.000000 1.000000 1.000000 +vtc 0.062500 0.945313 0.800000 0.800000 0.800000 +vtc 0.062500 0.937500 0.800000 0.800000 0.800000 +vtc 0.125000 0.937500 0.800000 0.800000 0.800000 +vtc 0.125000 0.945313 0.800000 0.800000 0.800000 +vtc 0.062500 0.945313 0.800000 0.800000 0.800000 +vtc 0.062500 0.937500 0.800000 0.800000 0.800000 +vtc 0.125000 0.937500 0.800000 0.800000 0.800000 +vtc 0.125000 0.945313 0.800000 0.800000 0.800000 +vtc 0.062500 0.945313 0.600000 0.600000 0.600000 +vtc 0.062500 0.937500 0.600000 0.600000 0.600000 +vtc 0.125000 0.937500 0.600000 0.600000 0.600000 +vtc 0.125000 0.945313 0.600000 0.600000 0.600000 +vtc 0.062500 0.945313 0.600000 0.600000 0.600000 +vtc 0.062500 0.937500 0.600000 0.600000 0.600000 +vtc 0.125000 0.937500 0.600000 0.600000 0.600000 +vtc 0.125000 0.945313 0.600000 0.600000 0.600000 +vtc 0.250000 1.000000 1.000000 1.000000 1.000000 +vtc 0.250000 0.937500 1.000000 1.000000 1.000000 +vtc 0.312500 0.937500 1.000000 1.000000 1.000000 +vtc 0.312500 1.000000 1.000000 1.000000 1.000000 +vtc 0.062500 0.945313 0.800000 0.800000 0.800000 +vtc 0.062500 0.937500 0.800000 0.800000 0.800000 +vtc 0.125000 0.937500 0.800000 0.800000 0.800000 +vtc 0.125000 0.945313 0.800000 0.800000 0.800000 +vtc 0.062500 0.945313 0.800000 0.800000 0.800000 +vtc 0.062500 0.937500 0.800000 0.800000 0.800000 +vtc 0.125000 0.937500 0.800000 0.800000 0.800000 +vtc 0.125000 0.945313 0.800000 0.800000 0.800000 +vtc 0.062500 0.945313 0.600000 0.600000 0.600000 +vtc 0.062500 0.937500 0.600000 0.600000 0.600000 +vtc 0.125000 0.937500 0.600000 0.600000 0.600000 +vtc 0.125000 0.945313 0.600000 0.600000 0.600000 +vtc 0.062500 0.945313 0.600000 0.600000 0.600000 +vtc 0.062500 0.937500 0.600000 0.600000 0.600000 +vtc 0.125000 0.937500 0.600000 0.600000 0.600000 +vtc 0.125000 0.945313 0.600000 0.600000 0.600000 +vtc 0.312500 1.000000 1.000000 1.000000 1.000000 +vtc 0.312500 0.937500 1.000000 1.000000 1.000000 +vtc 0.375000 0.937500 1.000000 1.000000 1.000000 +vtc 0.375000 1.000000 1.000000 1.000000 1.000000 +vtc 0.062500 0.945313 0.800000 0.800000 0.800000 +vtc 0.062500 0.937500 0.800000 0.800000 0.800000 +vtc 0.125000 0.937500 0.800000 0.800000 0.800000 +vtc 0.125000 0.945313 0.800000 0.800000 0.800000 +vtc 0.062500 0.945313 0.800000 0.800000 0.800000 +vtc 0.062500 0.937500 0.800000 0.800000 0.800000 +vtc 0.125000 0.937500 0.800000 0.800000 0.800000 +vtc 0.125000 0.945313 0.800000 0.800000 0.800000 +vtc 0.062500 0.945313 0.600000 0.600000 0.600000 +vtc 0.062500 0.937500 0.600000 0.600000 0.600000 +vtc 0.125000 0.937500 0.600000 0.600000 0.600000 +vtc 0.125000 0.945313 0.600000 0.600000 0.600000 +vtc 0.062500 0.945313 0.600000 0.600000 0.600000 +vtc 0.062500 0.937500 0.600000 0.600000 0.600000 +vtc 0.125000 0.937500 0.600000 0.600000 0.600000 +vtc 0.125000 0.945313 0.600000 0.600000 0.600000 +vtc 0.375000 1.000000 1.000000 1.000000 1.000000 +vtc 0.375000 0.937500 1.000000 1.000000 1.000000 +vtc 0.437500 0.937500 1.000000 1.000000 1.000000 +vtc 0.437500 1.000000 1.000000 1.000000 1.000000 +vtc 0.062500 0.945313 0.800000 0.800000 0.800000 +vtc 0.062500 0.937500 0.800000 0.800000 0.800000 +vtc 0.125000 0.937500 0.800000 0.800000 0.800000 +vtc 0.125000 0.945313 0.800000 0.800000 0.800000 +vtc 0.062500 0.945313 0.800000 0.800000 0.800000 +vtc 0.062500 0.937500 0.800000 0.800000 0.800000 +vtc 0.125000 0.937500 0.800000 0.800000 0.800000 +vtc 0.125000 0.945313 0.800000 0.800000 0.800000 +vtc 0.062500 0.945313 0.600000 0.600000 0.600000 +vtc 0.062500 0.937500 0.600000 0.600000 0.600000 +vtc 0.125000 0.937500 0.600000 0.600000 0.600000 +vtc 0.125000 0.945313 0.600000 0.600000 0.600000 +vtc 0.062500 0.945313 0.600000 0.600000 0.600000 +vtc 0.062500 0.937500 0.600000 0.600000 0.600000 +vtc 0.125000 0.937500 0.600000 0.600000 0.600000 +vtc 0.125000 0.945313 0.600000 0.600000 0.600000 +vtc 0.437500 1.000000 1.000000 1.000000 1.000000 +vtc 0.437500 0.937500 1.000000 1.000000 1.000000 +vtc 0.500000 0.937500 1.000000 1.000000 1.000000 +vtc 0.500000 1.000000 1.000000 1.000000 1.000000 +vtc 0.062500 0.945313 0.800000 0.800000 0.800000 +vtc 0.062500 0.937500 0.800000 0.800000 0.800000 +vtc 0.125000 0.937500 0.800000 0.800000 0.800000 +vtc 0.125000 0.945313 0.800000 0.800000 0.800000 +vtc 0.062500 0.945313 0.800000 0.800000 0.800000 +vtc 0.062500 0.937500 0.800000 0.800000 0.800000 +vtc 0.125000 0.937500 0.800000 0.800000 0.800000 +vtc 0.125000 0.945313 0.800000 0.800000 0.800000 +vtc 0.062500 0.945313 0.600000 0.600000 0.600000 +vtc 0.062500 0.937500 0.600000 0.600000 0.600000 +vtc 0.125000 0.937500 0.600000 0.600000 0.600000 +vtc 0.125000 0.945313 0.600000 0.600000 0.600000 +vtc 0.062500 0.945313 0.600000 0.600000 0.600000 +vtc 0.062500 0.937500 0.600000 0.600000 0.600000 +vtc 0.125000 0.937500 0.600000 0.600000 0.600000 +vtc 0.125000 0.945313 0.600000 0.600000 0.600000 +vtc 0.500000 1.000000 1.000000 1.000000 1.000000 +vtc 0.500000 0.937500 1.000000 1.000000 1.000000 +vtc 0.562500 0.937500 1.000000 1.000000 1.000000 +vtc 0.562500 1.000000 1.000000 1.000000 1.000000 +vtc 0.062500 0.945313 0.800000 0.800000 0.800000 +vtc 0.062500 0.937500 0.800000 0.800000 0.800000 +vtc 0.125000 0.937500 0.800000 0.800000 0.800000 +vtc 0.125000 0.945313 0.800000 0.800000 0.800000 +vtc 0.062500 0.945313 0.800000 0.800000 0.800000 +vtc 0.062500 0.937500 0.800000 0.800000 0.800000 +vtc 0.125000 0.937500 0.800000 0.800000 0.800000 +vtc 0.125000 0.945313 0.800000 0.800000 0.800000 +vtc 0.062500 0.945313 0.600000 0.600000 0.600000 +vtc 0.062500 0.937500 0.600000 0.600000 0.600000 +vtc 0.125000 0.937500 0.600000 0.600000 0.600000 +vtc 0.125000 0.945313 0.600000 0.600000 0.600000 +vtc 0.062500 0.945313 0.600000 0.600000 0.600000 +vtc 0.062500 0.937500 0.600000 0.600000 0.600000 +vtc 0.125000 0.937500 0.600000 0.600000 0.600000 +vtc 0.125000 0.945313 0.600000 0.600000 0.600000 +vtc 0.625000 0.875000 1.000000 1.000000 1.000000 +vtc 0.625000 0.812500 1.000000 1.000000 1.000000 +vtc 0.687500 0.812500 1.000000 1.000000 1.000000 +vtc 0.687500 0.875000 1.000000 1.000000 1.000000 +vtc 0.125000 0.937500 0.600000 0.600000 0.600000 +vtc 0.125000 0.875000 0.600000 0.600000 0.600000 +vtc 0.187500 0.875000 0.600000 0.600000 0.600000 +vtc 0.187500 0.937500 0.600000 0.600000 0.600000 +vtc 0.125000 0.937500 0.600000 0.600000 0.600000 +vtc 0.125000 0.875000 0.600000 0.600000 0.600000 +vtc 0.187500 0.875000 0.600000 0.600000 0.600000 +vtc 0.187500 0.937500 0.600000 0.600000 0.600000 +vtc 0.687500 0.875000 0.800000 0.800000 0.800000 +vtc 0.687500 0.812500 0.800000 0.800000 0.800000 +vtc 0.750000 0.812500 0.800000 0.800000 0.800000 +vtc 0.750000 0.875000 0.800000 0.800000 0.800000 +vtc 0.687500 0.875000 0.800000 0.800000 0.800000 +vtc 0.687500 0.812500 0.800000 0.800000 0.800000 +vtc 0.750000 0.812500 0.800000 0.800000 0.800000 +vtc 0.750000 0.875000 0.800000 0.800000 0.800000 +vtc 0.062500 0.937500 1.000000 1.000000 1.000000 +vtc 0.062500 0.875000 1.000000 1.000000 1.000000 +vtc 0.125000 0.875000 1.000000 1.000000 1.000000 +vtc 0.125000 0.937500 1.000000 1.000000 1.000000 +vtc 0.125000 0.937500 0.600000 0.600000 0.600000 +vtc 0.125000 0.875000 0.600000 0.600000 0.600000 +vtc 0.187500 0.875000 0.600000 0.600000 0.600000 +vtc 0.187500 0.937500 0.600000 0.600000 0.600000 +vtc 0.125000 0.937500 0.600000 0.600000 0.600000 +vtc 0.125000 0.875000 0.600000 0.600000 0.600000 +vtc 0.187500 0.875000 0.600000 0.600000 0.600000 +vtc 0.187500 0.937500 0.600000 0.600000 0.600000 +vtc 0.187500 0.937500 0.600000 0.600000 0.600000 +vtc 0.187500 0.875000 0.600000 0.600000 0.600000 +vtc 0.250000 0.875000 0.600000 0.600000 0.600000 +vtc 0.250000 0.937500 0.600000 0.600000 0.600000 +vtc 0.375000 0.937500 0.600000 0.600000 0.600000 +vtc 0.375000 0.875000 0.600000 0.600000 0.600000 +vtc 0.437500 0.875000 0.600000 0.600000 0.600000 +vtc 0.437500 0.937500 0.600000 0.600000 0.600000 +vtc 0.312500 0.937500 0.600000 0.600000 0.600000 +vtc 0.312500 0.875000 0.600000 0.600000 0.600000 +vtc 0.375000 0.875000 0.600000 0.600000 0.600000 +vtc 0.375000 0.937500 0.600000 0.600000 0.600000 +vtc 0.250000 0.937500 0.600000 0.600000 0.600000 +vtc 0.250000 0.875000 0.600000 0.600000 0.600000 +vtc 0.312500 0.875000 0.600000 0.600000 0.600000 +vtc 0.312500 0.937500 0.600000 0.600000 0.600000 +vtc 0.437500 0.937500 0.800000 0.800000 0.800000 +vtc 0.437500 0.875000 0.800000 0.800000 0.800000 +vtc 0.500000 0.875000 0.800000 0.800000 0.800000 +vtc 0.500000 0.937500 0.800000 0.800000 0.800000 +vtc 0.500000 0.937500 0.800000 0.800000 0.800000 +vtc 0.500000 0.875000 0.800000 0.800000 0.800000 +vtc 0.562500 0.875000 0.800000 0.800000 0.800000 +vtc 0.562500 0.937500 0.800000 0.800000 0.800000 +vtc 0.562500 0.937500 0.800000 0.800000 0.800000 +vtc 0.562500 0.875000 0.800000 0.800000 0.800000 +vtc 0.625000 0.875000 0.800000 0.800000 0.800000 +vtc 0.625000 0.937500 0.800000 0.800000 0.800000 +vtc 0.625000 0.937500 0.800000 0.800000 0.800000 +vtc 0.625000 0.875000 0.800000 0.800000 0.800000 +vtc 0.687500 0.875000 0.800000 0.800000 0.800000 +vtc 0.687500 0.937500 0.800000 0.800000 0.800000 +vtc 0.750000 0.875000 0.600000 0.600000 0.600000 +vtc 0.750000 0.812500 0.600000 0.600000 0.600000 +vtc 0.812500 0.812500 0.600000 0.600000 0.600000 +vtc 0.812500 0.875000 0.600000 0.600000 0.600000 +vtc 0.750000 0.875000 0.600000 0.600000 0.600000 +vtc 0.750000 0.812500 0.600000 0.600000 0.600000 +vtc 0.812500 0.812500 0.600000 0.600000 0.600000 +vtc 0.812500 0.875000 0.600000 0.600000 0.600000 +vtc 0.937500 0.937500 0.500000 0.500000 0.500000 +vtc 0.937500 0.875000 0.500000 0.500000 0.500000 +vtc 1.000000 0.875000 0.500000 0.500000 0.500000 +vtc 1.000000 0.937500 0.500000 0.500000 0.500000 +vtc 0.937500 0.937500 1.000000 1.000000 1.000000 +vtc 0.937500 0.875000 1.000000 1.000000 1.000000 +vtc 1.000000 0.875000 1.000000 1.000000 1.000000 +vtc 1.000000 0.937500 1.000000 1.000000 1.000000 +vtc 0.812500 0.937500 0.800000 0.800000 0.800000 +vtc 0.812500 0.875000 0.800000 0.800000 0.800000 +vtc 0.875000 0.875000 0.800000 0.800000 0.800000 +vtc 0.875000 0.937500 0.800000 0.800000 0.800000 +vtc 0.812500 0.937500 0.800000 0.800000 0.800000 +vtc 0.812500 0.875000 0.800000 0.800000 0.800000 +vtc 0.875000 0.875000 0.800000 0.800000 0.800000 +vtc 0.875000 0.937500 0.800000 0.800000 0.800000 +vtc 0.687500 0.937500 0.500000 0.500000 0.500000 +vtc 0.687500 0.875000 0.500000 0.500000 0.500000 +vtc 0.750000 0.875000 0.500000 0.500000 0.500000 +vtc 0.750000 0.937500 0.500000 0.500000 0.500000 +vtc 0.750000 0.937500 0.800000 0.800000 0.800000 +vtc 0.750000 0.875000 0.800000 0.800000 0.800000 +vtc 0.812500 0.875000 0.800000 0.800000 0.800000 +vtc 0.812500 0.937500 0.800000 0.800000 0.800000 +vtc 0.750000 0.937500 0.800000 0.800000 0.800000 +vtc 0.750000 0.875000 0.800000 0.800000 0.800000 +vtc 0.812500 0.875000 0.800000 0.800000 0.800000 +vtc 0.812500 0.937500 0.800000 0.800000 0.800000 +vtc 0.875000 0.937500 0.600000 0.600000 0.600000 +vtc 0.875000 0.875000 0.600000 0.600000 0.600000 +vtc 0.937500 0.875000 0.600000 0.600000 0.600000 +vtc 0.937500 0.937500 0.600000 0.600000 0.600000 +vtc 0.875000 0.937500 0.600000 0.600000 0.600000 +vtc 0.875000 0.875000 0.600000 0.600000 0.600000 +vtc 0.937500 0.875000 0.600000 0.600000 0.600000 +vtc 0.937500 0.937500 0.600000 0.600000 0.600000 +vtc 0.937500 0.937500 0.500000 0.500000 0.500000 +vtc 0.937500 0.875000 0.500000 0.500000 0.500000 +vtc 1.000000 0.875000 0.500000 0.500000 0.500000 +vtc 1.000000 0.937500 0.500000 0.500000 0.500000 +vtc 0.937500 0.937500 1.000000 1.000000 1.000000 +vtc 0.937500 0.875000 1.000000 1.000000 1.000000 +vtc 1.000000 0.875000 1.000000 1.000000 1.000000 +vtc 1.000000 0.937500 1.000000 1.000000 1.000000 +vtc 0.812500 0.937500 0.800000 0.800000 0.800000 +vtc 0.812500 0.875000 0.800000 0.800000 0.800000 +vtc 0.875000 0.875000 0.800000 0.800000 0.800000 +vtc 0.875000 0.937500 0.800000 0.800000 0.800000 +vtc 0.812500 0.937500 0.800000 0.800000 0.800000 +vtc 0.812500 0.875000 0.800000 0.800000 0.800000 +vtc 0.875000 0.875000 0.800000 0.800000 0.800000 +vtc 0.875000 0.937500 0.800000 0.800000 0.800000 +vtc 0.187500 0.875000 0.600000 0.600000 0.600000 +vtc 0.187500 0.812500 0.600000 0.600000 0.600000 +vtc 0.250000 0.812500 0.600000 0.600000 0.600000 +vtc 0.250000 0.875000 0.600000 0.600000 0.600000 +vtc 0.250000 0.875000 0.600000 0.600000 0.600000 +vtc 0.250000 0.812500 0.600000 0.600000 0.600000 +vtc 0.312500 0.812500 0.600000 0.600000 0.600000 +vtc 0.312500 0.875000 0.600000 0.600000 0.600000 +vtc 0.125000 0.875000 0.800000 0.800000 0.800000 +vtc 0.125000 0.812500 0.800000 0.800000 0.800000 +vtc 0.187500 0.812500 0.800000 0.800000 0.800000 +vtc 0.187500 0.875000 0.800000 0.800000 0.800000 +vtc 0.125000 0.875000 0.800000 0.800000 0.800000 +vtc 0.125000 0.812500 0.800000 0.800000 0.800000 +vtc 0.187500 0.812500 0.800000 0.800000 0.800000 +vtc 0.187500 0.875000 0.800000 0.800000 0.800000 +vtc 0.250000 0.875000 0.600000 0.600000 0.600000 +vtc 0.250000 0.812500 0.600000 0.600000 0.600000 +vtc 0.312500 0.812500 0.600000 0.600000 0.600000 +vtc 0.312500 0.875000 0.600000 0.600000 0.600000 +vtc 0.187500 0.875000 0.600000 0.600000 0.600000 +vtc 0.187500 0.812500 0.600000 0.600000 0.600000 +vtc 0.250000 0.812500 0.600000 0.600000 0.600000 +vtc 0.250000 0.875000 0.600000 0.600000 0.600000 +vtc 0.125000 0.875000 0.800000 0.800000 0.800000 +vtc 0.125000 0.812500 0.800000 0.800000 0.800000 +vtc 0.187500 0.812500 0.800000 0.800000 0.800000 +vtc 0.187500 0.875000 0.800000 0.800000 0.800000 +vtc 0.125000 0.875000 0.800000 0.800000 0.800000 +vtc 0.125000 0.812500 0.800000 0.800000 0.800000 +vtc 0.187500 0.812500 0.800000 0.800000 0.800000 +vtc 0.187500 0.875000 0.800000 0.800000 0.800000 +vtc 0.312500 0.875000 0.600000 0.600000 0.600000 +vtc 0.312500 0.812500 0.600000 0.600000 0.600000 +vtc 0.375000 0.812500 0.600000 0.600000 0.600000 +vtc 0.375000 0.875000 0.600000 0.600000 0.600000 +vtc 0.312500 0.875000 0.600000 0.600000 0.600000 +vtc 0.312500 0.812500 0.600000 0.600000 0.600000 +vtc 0.375000 0.812500 0.600000 0.600000 0.600000 +vtc 0.375000 0.875000 0.600000 0.600000 0.600000 +vtc 0.125000 0.875000 0.800000 0.800000 0.800000 +vtc 0.125000 0.812500 0.800000 0.800000 0.800000 +vtc 0.187500 0.812500 0.800000 0.800000 0.800000 +vtc 0.187500 0.875000 0.800000 0.800000 0.800000 +vtc 0.125000 0.875000 0.800000 0.800000 0.800000 +vtc 0.125000 0.812500 0.800000 0.800000 0.800000 +vtc 0.187500 0.812500 0.800000 0.800000 0.800000 +vtc 0.187500 0.875000 0.800000 0.800000 0.800000 +vtc 0.125000 0.875000 0.800000 0.800000 0.800000 +vtc 0.125000 0.812500 0.800000 0.800000 0.800000 +vtc 0.187500 0.812500 0.800000 0.800000 0.800000 +vtc 0.187500 0.875000 0.800000 0.800000 0.800000 +vtc 0.125000 0.875000 0.800000 0.800000 0.800000 +vtc 0.125000 0.812500 0.800000 0.800000 0.800000 +vtc 0.187500 0.812500 0.800000 0.800000 0.800000 +vtc 0.187500 0.875000 0.800000 0.800000 0.800000 +vtc 0.000000 0.875000 1.000000 1.000000 1.000000 +vtc 0.000000 0.812500 1.000000 1.000000 1.000000 +vtc 0.062500 0.812500 1.000000 1.000000 1.000000 +vtc 0.062500 0.875000 1.000000 1.000000 1.000000 +vtc 0.062500 0.875000 0.600000 0.600000 0.600000 +vtc 0.062500 0.812500 0.600000 0.600000 0.600000 +vtc 0.125000 0.812500 0.600000 0.600000 0.600000 +vtc 0.125000 0.875000 0.600000 0.600000 0.600000 +vtc 0.062500 0.875000 0.600000 0.600000 0.600000 +vtc 0.062500 0.812500 0.600000 0.600000 0.600000 +vtc 0.125000 0.812500 0.600000 0.600000 0.600000 +vtc 0.125000 0.875000 0.600000 0.600000 0.600000 +vtc 0.062500 0.875000 0.800000 0.800000 0.800000 +vtc 0.062500 0.812500 0.800000 0.800000 0.800000 +vtc 0.125000 0.812500 0.800000 0.800000 0.800000 +vtc 0.125000 0.875000 0.800000 0.800000 0.800000 +vtc 0.062500 0.875000 0.800000 0.800000 0.800000 +vtc 0.062500 0.812500 0.800000 0.800000 0.800000 +vtc 0.125000 0.812500 0.800000 0.800000 0.800000 +vtc 0.125000 0.875000 0.800000 0.800000 0.800000 + +# 6 Groups +g 0 +f 1/1 2/2 3/3 4/4 +f 5/5 6/6 7/7 8/8 +f 9/9 10/10 11/11 12/12 +f 13/13 14/14 15/15 16/16 +f 17/17 18/18 19/19 20/20 +f 21/21 22/22 23/23 24/24 +f 25/25 26/26 27/27 28/28 +f 29/29 30/30 31/31 32/32 +f 33/33 34/34 35/35 36/36 +f 37/37 38/38 39/39 40/40 +g 1_1 +f 41/41 42/42 43/43 44/44 +f 41/45 45/46 46/47 42/48 +f 43/49 47/50 48/51 44/52 +f 42/53 46/54 47/55 43/56 +f 44/57 48/58 45/59 41/60 +g 1_2 +f 41/61 42/62 43/63 44/64 +f 41/65 45/66 46/67 42/68 +f 43/69 47/70 48/71 44/72 +f 42/73 46/74 47/75 43/76 +f 44/77 48/78 45/79 41/80 +g 1_3 +f 41/81 42/82 43/83 44/84 +f 41/85 45/86 46/87 42/88 +f 43/89 47/90 48/91 44/92 +f 42/93 46/94 47/95 43/96 +f 44/97 48/98 45/99 41/100 +g 1_4 +f 41/101 42/102 43/103 44/104 +f 41/105 45/106 46/107 42/108 +f 43/109 47/110 48/111 44/112 +f 42/113 46/114 47/115 43/116 +f 44/117 48/118 45/119 41/120 +g 1_5 +f 41/121 42/122 43/123 44/124 +f 41/125 45/126 46/127 42/128 +f 43/129 47/130 48/131 44/132 +f 42/133 46/134 47/135 43/136 +f 44/137 48/138 45/139 41/140 +g 1_6 +f 41/141 42/142 43/143 44/144 +f 41/145 45/146 46/147 42/148 +f 43/149 47/150 48/151 44/152 +f 42/153 46/154 47/155 43/156 +f 44/157 48/158 45/159 41/160 +g 1_7 +f 41/161 42/162 43/163 44/164 +f 41/165 45/166 46/167 42/168 +f 43/169 47/170 48/171 44/172 +f 42/173 46/174 47/175 43/176 +f 44/177 48/178 45/179 41/180 +g 2_1 +f 49/181 50/182 51/183 52/184 +f 53/185 46/186 47/187 54/188 +f 55/189 48/190 45/191 56/192 +f 57/193 58/194 59/195 60/196 +f 61/197 62/198 63/199 64/200 +g 2_2 +f 49/201 50/202 51/203 52/204 +f 53/205 46/206 47/207 54/208 +f 55/209 48/210 45/211 56/212 +f 25/213 26/214 27/215 28/216 +f 65/217 66/218 67/219 68/220 +f 69/221 70/222 71/223 72/224 +f 37/225 38/226 39/227 40/228 +f 73/229 74/230 75/231 76/232 +f 77/233 78/234 79/235 80/236 +f 57/237 58/238 59/239 60/240 +f 61/241 62/242 63/243 64/244 +g 3_1 +f 81/245 82/246 83/247 84/248 +f 85/249 86/250 87/251 88/252 +f 24/253 23/254 22/255 21/256 +f 89/257 90/258 91/259 92/260 +f 56/261 45/262 46/263 53/264 +f 54/265 47/266 48/267 55/268 +g 3_2 +f 93/269 94/270 95/271 96/272 +f 57/273 58/274 59/275 60/276 +f 61/277 62/278 63/279 64/280 +f 81/281 82/282 83/283 84/284 +f 85/285 86/286 87/287 88/288 +f 24/289 23/290 22/291 21/292 +f 89/293 90/294 91/295 92/296 +f 56/297 45/298 46/299 53/300 +f 54/301 47/302 48/303 55/304 +g 4_1 +f 81/305 82/306 83/307 84/308 +f 85/309 86/310 87/311 88/312 +f 56/313 45/314 46/315 53/316 +f 4/317 3/318 2/319 1/320 +g 4_2 +f 81/321 82/322 83/323 84/324 +f 85/325 86/326 87/327 88/328 +f 16/329 15/330 14/331 13/332 +f 54/333 47/334 48/335 55/336 +g 4_3 +f 81/337 82/338 83/339 84/340 +f 85/341 86/342 87/343 88/344 +f 56/345 45/346 46/347 53/348 +f 4/349 3/350 2/351 1/352 +f 16/353 15/354 14/355 13/356 +f 54/357 47/358 48/359 55/360 +g 5 +f 20/361 19/362 18/363 17/364 +f 97/365 98/366 99/367 100/368 +f 101/369 102/370 103/371 104/372 +f 105/373 106/374 107/375 108/376 +f 109/377 110/378 111/379 112/380 diff --git a/src/main/resources/assets/rplogic/models/arraytex.png b/src/main/resources/assets/rplogic/models/arraytex.png new file mode 100644 index 0000000..8a51bf6 Binary files /dev/null and b/src/main/resources/assets/rplogic/models/arraytex.png differ diff --git a/src/main/resources/assets/rplogic/models/busxcvr.obj b/src/main/resources/assets/rplogic/models/busxcvr.obj new file mode 100644 index 0000000..423dade --- /dev/null +++ b/src/main/resources/assets/rplogic/models/busxcvr.obj @@ -0,0 +1,1360 @@ +# 98 Vertices +v 1.000000 0.250000 0.000000 +v 0.000000 0.250000 0.000000 +v 0.000000 0.250000 1.000000 +v 1.000000 0.250000 1.000000 +v 1.000000 1.000000 0.062500 +v 1.000000 0.000000 0.062500 +v 0.000000 0.000000 0.062500 +v 0.000000 1.000000 0.062500 +v 0.000000 1.000000 0.437500 +v 0.000000 0.000000 0.437500 +v 1.000000 0.000000 0.437500 +v 1.000000 1.000000 0.437500 +v 1.000000 1.000000 0.562500 +v 1.000000 0.000000 0.562500 +v 0.000000 0.000000 0.562500 +v 0.000000 1.000000 0.562500 +v 0.000000 1.000000 0.937500 +v 0.000000 0.000000 0.937500 +v 1.000000 0.000000 0.937500 +v 1.000000 1.000000 0.937500 +v 0.312500 1.000000 0.000000 +v 0.312500 0.000000 0.000000 +v 0.312500 0.000000 1.000000 +v 0.312500 1.000000 1.000000 +v 0.687500 1.000000 1.000000 +v 0.687500 0.000000 1.000000 +v 0.687500 0.000000 0.000000 +v 0.687500 1.000000 0.000000 +v 1.000000 1.000000 0.125000 +v 1.000000 0.000000 0.125000 +v 0.000000 0.000000 0.125000 +v 0.000000 1.000000 0.125000 +v 0.000000 1.000000 0.875000 +v 0.000000 0.000000 0.875000 +v 1.000000 0.000000 0.875000 +v 1.000000 1.000000 0.875000 +v 0.062500 1.000000 0.000000 +v 0.062500 0.000000 0.000000 +v 0.062500 0.000000 1.000000 +v 0.062500 1.000000 1.000000 +v 0.250000 1.000000 1.000000 +v 0.250000 0.000000 1.000000 +v 0.250000 0.000000 0.000000 +v 0.250000 1.000000 0.000000 +v 0.750000 1.000000 0.000000 +v 0.750000 0.000000 0.000000 +v 0.750000 0.000000 1.000000 +v 0.750000 1.000000 1.000000 +v 0.937500 1.000000 1.000000 +v 0.937500 0.000000 1.000000 +v 0.937500 0.000000 0.000000 +v 0.937500 1.000000 0.000000 +v 1.000000 1.000000 0.312500 +v 1.000000 0.000000 0.312500 +v 0.000000 0.000000 0.312500 +v 0.000000 1.000000 0.312500 +v 0.000000 1.000000 0.375000 +v 0.000000 0.000000 0.375000 +v 1.000000 0.000000 0.375000 +v 1.000000 1.000000 0.375000 +v 1.000000 1.000000 0.625000 +v 1.000000 0.000000 0.625000 +v 0.000000 0.000000 0.625000 +v 0.000000 1.000000 0.625000 +v 0.000000 1.000000 0.687500 +v 0.000000 0.000000 0.687500 +v 1.000000 0.000000 0.687500 +v 1.000000 1.000000 0.687500 +v 0.000000 1.000000 0.000000 +v 0.000000 0.000000 0.000000 +v 0.000000 0.000000 1.000000 +v 0.000000 1.000000 1.000000 +v 1.000000 1.000000 1.000000 +v 1.000000 0.000000 1.000000 +v 1.000000 0.000000 0.000000 +v 1.000000 1.000000 0.000000 +v 1.000000 0.125000 0.000000 +v 0.000000 0.125000 0.000000 +v 0.000000 0.125000 1.000000 +v 1.000000 0.125000 1.000000 +v 0.500000 0.250000 0.125000 +v 0.375000 0.250000 0.125000 +v 0.375000 0.250000 0.250000 +v 0.500000 0.250000 0.250000 +v 0.375000 0.250000 0.375000 +v 0.500000 0.250000 0.375000 +v 0.625000 0.250000 0.125000 +v 0.625000 0.250000 0.250000 +v 0.625000 0.250000 0.375000 +v 0.500000 0.250000 0.625000 +v 0.375000 0.250000 0.625000 +v 0.375000 0.250000 0.750000 +v 0.500000 0.250000 0.750000 +v 0.375000 0.250000 0.875000 +v 0.500000 0.250000 0.875000 +v 0.625000 0.250000 0.625000 +v 0.625000 0.250000 0.750000 +v 0.625000 0.250000 0.875000 + +# 896 Texture Coordinates +vtc 0.000000 0.812500 1.000000 1.000000 1.000000 +vtc 0.000000 0.750000 1.000000 1.000000 1.000000 +vtc 0.062500 0.750000 1.000000 1.000000 1.000000 +vtc 0.062500 0.812500 1.000000 1.000000 1.000000 +vtc 0.125000 0.812500 0.800000 0.800000 0.800000 +vtc 0.125000 0.750000 0.800000 0.800000 0.800000 +vtc 0.187500 0.750000 0.800000 0.800000 0.800000 +vtc 0.187500 0.812500 0.800000 0.800000 0.800000 +vtc 0.125000 0.812500 0.800000 0.800000 0.800000 +vtc 0.125000 0.750000 0.800000 0.800000 0.800000 +vtc 0.187500 0.750000 0.800000 0.800000 0.800000 +vtc 0.187500 0.812500 0.800000 0.800000 0.800000 +vtc 0.125000 0.812500 0.800000 0.800000 0.800000 +vtc 0.125000 0.750000 0.800000 0.800000 0.800000 +vtc 0.187500 0.750000 0.800000 0.800000 0.800000 +vtc 0.187500 0.812500 0.800000 0.800000 0.800000 +vtc 0.125000 0.812500 0.800000 0.800000 0.800000 +vtc 0.125000 0.750000 0.800000 0.800000 0.800000 +vtc 0.187500 0.750000 0.800000 0.800000 0.800000 +vtc 0.187500 0.812500 0.800000 0.800000 0.800000 +vtc 0.187500 0.812500 0.600000 0.600000 0.600000 +vtc 0.187500 0.750000 0.600000 0.600000 0.600000 +vtc 0.250000 0.750000 0.600000 0.600000 0.600000 +vtc 0.250000 0.812500 0.600000 0.600000 0.600000 +vtc 0.187500 0.812500 0.600000 0.600000 0.600000 +vtc 0.187500 0.750000 0.600000 0.600000 0.600000 +vtc 0.250000 0.750000 0.600000 0.600000 0.600000 +vtc 0.250000 0.812500 0.600000 0.600000 0.600000 +vtc 0.312500 0.812500 0.800000 0.800000 0.800000 +vtc 0.312500 0.750000 0.800000 0.800000 0.800000 +vtc 0.375000 0.750000 0.800000 0.800000 0.800000 +vtc 0.375000 0.812500 0.800000 0.800000 0.800000 +vtc 0.250000 0.812500 0.800000 0.800000 0.800000 +vtc 0.250000 0.750000 0.800000 0.800000 0.800000 +vtc 0.312500 0.750000 0.800000 0.800000 0.800000 +vtc 0.312500 0.812500 0.800000 0.800000 0.800000 +vtc 0.437500 0.812500 0.600000 0.600000 0.600000 +vtc 0.437500 0.750000 0.600000 0.600000 0.600000 +vtc 0.500000 0.750000 0.600000 0.600000 0.600000 +vtc 0.500000 0.812500 0.600000 0.600000 0.600000 +vtc 0.375000 0.812500 0.600000 0.600000 0.600000 +vtc 0.375000 0.750000 0.600000 0.600000 0.600000 +vtc 0.437500 0.750000 0.600000 0.600000 0.600000 +vtc 0.437500 0.812500 0.600000 0.600000 0.600000 +vtc 0.375000 0.812500 0.600000 0.600000 0.600000 +vtc 0.375000 0.750000 0.600000 0.600000 0.600000 +vtc 0.437500 0.750000 0.600000 0.600000 0.600000 +vtc 0.437500 0.812500 0.600000 0.600000 0.600000 +vtc 0.500000 0.812500 0.600000 0.600000 0.600000 +vtc 0.500000 0.750000 0.600000 0.600000 0.600000 +vtc 0.562500 0.750000 0.600000 0.600000 0.600000 +vtc 0.562500 0.812500 0.600000 0.600000 0.600000 +vtc 0.687500 0.812500 0.800000 0.800000 0.800000 +vtc 0.687500 0.750000 0.800000 0.800000 0.800000 +vtc 0.750000 0.750000 0.800000 0.800000 0.800000 +vtc 0.750000 0.812500 0.800000 0.800000 0.800000 +vtc 0.625000 0.812500 0.800000 0.800000 0.800000 +vtc 0.625000 0.750000 0.800000 0.800000 0.800000 +vtc 0.687500 0.750000 0.800000 0.800000 0.800000 +vtc 0.687500 0.812500 0.800000 0.800000 0.800000 +vtc 0.562500 0.812500 0.800000 0.800000 0.800000 +vtc 0.562500 0.750000 0.800000 0.800000 0.800000 +vtc 0.625000 0.750000 0.800000 0.800000 0.800000 +vtc 0.625000 0.812500 0.800000 0.800000 0.800000 +vtc 0.750000 0.812500 0.800000 0.800000 0.800000 +vtc 0.750000 0.750000 0.800000 0.800000 0.800000 +vtc 0.812500 0.750000 0.800000 0.800000 0.800000 +vtc 0.812500 0.812500 0.800000 0.800000 0.800000 +vtc 0.812500 0.812500 0.600000 0.600000 0.600000 +vtc 0.812500 0.750000 0.600000 0.600000 0.600000 +vtc 0.875000 0.750000 0.600000 0.600000 0.600000 +vtc 0.875000 0.812500 0.600000 0.600000 0.600000 +vtc 0.875000 0.812500 0.600000 0.600000 0.600000 +vtc 0.875000 0.750000 0.600000 0.600000 0.600000 +vtc 0.937500 0.750000 0.600000 0.600000 0.600000 +vtc 0.937500 0.812500 0.600000 0.600000 0.600000 +vtc 0.125000 0.812500 1.000000 1.000000 1.000000 +vtc 0.125000 0.750000 1.000000 1.000000 1.000000 +vtc 0.062500 0.750000 1.000000 1.000000 1.000000 +vtc 0.062500 0.812500 1.000000 1.000000 1.000000 +vtc 0.125000 0.812500 0.800000 0.800000 0.800000 +vtc 0.125000 0.750000 0.800000 0.800000 0.800000 +vtc 0.187500 0.750000 0.800000 0.800000 0.800000 +vtc 0.187500 0.812500 0.800000 0.800000 0.800000 +vtc 0.125000 0.812500 0.800000 0.800000 0.800000 +vtc 0.125000 0.750000 0.800000 0.800000 0.800000 +vtc 0.187500 0.750000 0.800000 0.800000 0.800000 +vtc 0.187500 0.812500 0.800000 0.800000 0.800000 +vtc 0.125000 0.812500 0.800000 0.800000 0.800000 +vtc 0.125000 0.750000 0.800000 0.800000 0.800000 +vtc 0.187500 0.750000 0.800000 0.800000 0.800000 +vtc 0.187500 0.812500 0.800000 0.800000 0.800000 +vtc 0.125000 0.812500 0.800000 0.800000 0.800000 +vtc 0.125000 0.750000 0.800000 0.800000 0.800000 +vtc 0.187500 0.750000 0.800000 0.800000 0.800000 +vtc 0.187500 0.812500 0.800000 0.800000 0.800000 +vtc 0.250000 0.812500 0.600000 0.600000 0.600000 +vtc 0.250000 0.750000 0.600000 0.600000 0.600000 +vtc 0.187500 0.750000 0.600000 0.600000 0.600000 +vtc 0.187500 0.812500 0.600000 0.600000 0.600000 +vtc 0.250000 0.812500 0.600000 0.600000 0.600000 +vtc 0.250000 0.750000 0.600000 0.600000 0.600000 +vtc 0.187500 0.750000 0.600000 0.600000 0.600000 +vtc 0.187500 0.812500 0.600000 0.600000 0.600000 +vtc 0.250000 0.812500 0.800000 0.800000 0.800000 +vtc 0.250000 0.750000 0.800000 0.800000 0.800000 +vtc 0.312500 0.750000 0.800000 0.800000 0.800000 +vtc 0.312500 0.812500 0.800000 0.800000 0.800000 +vtc 0.312500 0.812500 0.800000 0.800000 0.800000 +vtc 0.312500 0.750000 0.800000 0.800000 0.800000 +vtc 0.375000 0.750000 0.800000 0.800000 0.800000 +vtc 0.375000 0.812500 0.800000 0.800000 0.800000 +vtc 0.500000 0.812500 0.600000 0.600000 0.600000 +vtc 0.500000 0.750000 0.600000 0.600000 0.600000 +vtc 0.437500 0.750000 0.600000 0.600000 0.600000 +vtc 0.437500 0.812500 0.600000 0.600000 0.600000 +vtc 0.437500 0.812500 0.600000 0.600000 0.600000 +vtc 0.437500 0.750000 0.600000 0.600000 0.600000 +vtc 0.375000 0.750000 0.600000 0.600000 0.600000 +vtc 0.375000 0.812500 0.600000 0.600000 0.600000 +vtc 0.437500 0.812500 0.600000 0.600000 0.600000 +vtc 0.437500 0.750000 0.600000 0.600000 0.600000 +vtc 0.375000 0.750000 0.600000 0.600000 0.600000 +vtc 0.375000 0.812500 0.600000 0.600000 0.600000 +vtc 0.562500 0.812500 0.600000 0.600000 0.600000 +vtc 0.562500 0.750000 0.600000 0.600000 0.600000 +vtc 0.500000 0.750000 0.600000 0.600000 0.600000 +vtc 0.500000 0.812500 0.600000 0.600000 0.600000 +vtc 0.750000 0.812500 0.800000 0.800000 0.800000 +vtc 0.750000 0.750000 0.800000 0.800000 0.800000 +vtc 0.812500 0.750000 0.800000 0.800000 0.800000 +vtc 0.812500 0.812500 0.800000 0.800000 0.800000 +vtc 0.562500 0.812500 0.800000 0.800000 0.800000 +vtc 0.562500 0.750000 0.800000 0.800000 0.800000 +vtc 0.625000 0.750000 0.800000 0.800000 0.800000 +vtc 0.625000 0.812500 0.800000 0.800000 0.800000 +vtc 0.625000 0.812500 0.800000 0.800000 0.800000 +vtc 0.625000 0.750000 0.800000 0.800000 0.800000 +vtc 0.687500 0.750000 0.800000 0.800000 0.800000 +vtc 0.687500 0.812500 0.800000 0.800000 0.800000 +vtc 0.687500 0.812500 0.800000 0.800000 0.800000 +vtc 0.687500 0.750000 0.800000 0.800000 0.800000 +vtc 0.750000 0.750000 0.800000 0.800000 0.800000 +vtc 0.750000 0.812500 0.800000 0.800000 0.800000 +vtc 0.875000 0.812500 0.600000 0.600000 0.600000 +vtc 0.875000 0.750000 0.600000 0.600000 0.600000 +vtc 0.812500 0.750000 0.600000 0.600000 0.600000 +vtc 0.812500 0.812500 0.600000 0.600000 0.600000 +vtc 0.937500 0.812500 0.600000 0.600000 0.600000 +vtc 0.937500 0.750000 0.600000 0.600000 0.600000 +vtc 0.875000 0.750000 0.600000 0.600000 0.600000 +vtc 0.875000 0.812500 0.600000 0.600000 0.600000 +vtc 0.062500 0.812500 1.000000 1.000000 1.000000 +vtc 0.062500 0.750000 1.000000 1.000000 1.000000 +vtc 0.125000 0.750000 1.000000 1.000000 1.000000 +vtc 0.125000 0.812500 1.000000 1.000000 1.000000 +vtc 0.125000 0.812500 0.800000 0.800000 0.800000 +vtc 0.125000 0.750000 0.800000 0.800000 0.800000 +vtc 0.187500 0.750000 0.800000 0.800000 0.800000 +vtc 0.187500 0.812500 0.800000 0.800000 0.800000 +vtc 0.125000 0.812500 0.800000 0.800000 0.800000 +vtc 0.125000 0.750000 0.800000 0.800000 0.800000 +vtc 0.187500 0.750000 0.800000 0.800000 0.800000 +vtc 0.187500 0.812500 0.800000 0.800000 0.800000 +vtc 0.125000 0.812500 0.800000 0.800000 0.800000 +vtc 0.125000 0.750000 0.800000 0.800000 0.800000 +vtc 0.187500 0.750000 0.800000 0.800000 0.800000 +vtc 0.187500 0.812500 0.800000 0.800000 0.800000 +vtc 0.125000 0.812500 0.800000 0.800000 0.800000 +vtc 0.125000 0.750000 0.800000 0.800000 0.800000 +vtc 0.187500 0.750000 0.800000 0.800000 0.800000 +vtc 0.187500 0.812500 0.800000 0.800000 0.800000 +vtc 0.187500 0.812500 0.600000 0.600000 0.600000 +vtc 0.187500 0.750000 0.600000 0.600000 0.600000 +vtc 0.250000 0.750000 0.600000 0.600000 0.600000 +vtc 0.250000 0.812500 0.600000 0.600000 0.600000 +vtc 0.187500 0.812500 0.600000 0.600000 0.600000 +vtc 0.187500 0.750000 0.600000 0.600000 0.600000 +vtc 0.250000 0.750000 0.600000 0.600000 0.600000 +vtc 0.250000 0.812500 0.600000 0.600000 0.600000 +vtc 0.312500 0.812500 0.800000 0.800000 0.800000 +vtc 0.312500 0.750000 0.800000 0.800000 0.800000 +vtc 0.375000 0.750000 0.800000 0.800000 0.800000 +vtc 0.375000 0.812500 0.800000 0.800000 0.800000 +vtc 0.250000 0.812500 0.800000 0.800000 0.800000 +vtc 0.250000 0.750000 0.800000 0.800000 0.800000 +vtc 0.312500 0.750000 0.800000 0.800000 0.800000 +vtc 0.312500 0.812500 0.800000 0.800000 0.800000 +vtc 0.437500 0.812500 0.600000 0.600000 0.600000 +vtc 0.437500 0.750000 0.600000 0.600000 0.600000 +vtc 0.500000 0.750000 0.600000 0.600000 0.600000 +vtc 0.500000 0.812500 0.600000 0.600000 0.600000 +vtc 0.375000 0.812500 0.600000 0.600000 0.600000 +vtc 0.375000 0.750000 0.600000 0.600000 0.600000 +vtc 0.437500 0.750000 0.600000 0.600000 0.600000 +vtc 0.437500 0.812500 0.600000 0.600000 0.600000 +vtc 0.375000 0.812500 0.600000 0.600000 0.600000 +vtc 0.375000 0.750000 0.600000 0.600000 0.600000 +vtc 0.437500 0.750000 0.600000 0.600000 0.600000 +vtc 0.437500 0.812500 0.600000 0.600000 0.600000 +vtc 0.500000 0.812500 0.600000 0.600000 0.600000 +vtc 0.500000 0.750000 0.600000 0.600000 0.600000 +vtc 0.562500 0.750000 0.600000 0.600000 0.600000 +vtc 0.562500 0.812500 0.600000 0.600000 0.600000 +vtc 0.687500 0.812500 0.800000 0.800000 0.800000 +vtc 0.687500 0.750000 0.800000 0.800000 0.800000 +vtc 0.750000 0.750000 0.800000 0.800000 0.800000 +vtc 0.750000 0.812500 0.800000 0.800000 0.800000 +vtc 0.625000 0.812500 0.800000 0.800000 0.800000 +vtc 0.625000 0.750000 0.800000 0.800000 0.800000 +vtc 0.687500 0.750000 0.800000 0.800000 0.800000 +vtc 0.687500 0.812500 0.800000 0.800000 0.800000 +vtc 0.562500 0.812500 0.800000 0.800000 0.800000 +vtc 0.562500 0.750000 0.800000 0.800000 0.800000 +vtc 0.625000 0.750000 0.800000 0.800000 0.800000 +vtc 0.625000 0.812500 0.800000 0.800000 0.800000 +vtc 0.750000 0.812500 0.800000 0.800000 0.800000 +vtc 0.750000 0.750000 0.800000 0.800000 0.800000 +vtc 0.812500 0.750000 0.800000 0.800000 0.800000 +vtc 0.812500 0.812500 0.800000 0.800000 0.800000 +vtc 0.812500 0.812500 0.600000 0.600000 0.600000 +vtc 0.812500 0.750000 0.600000 0.600000 0.600000 +vtc 0.875000 0.750000 0.600000 0.600000 0.600000 +vtc 0.875000 0.812500 0.600000 0.600000 0.600000 +vtc 0.875000 0.812500 0.600000 0.600000 0.600000 +vtc 0.875000 0.750000 0.600000 0.600000 0.600000 +vtc 0.937500 0.750000 0.600000 0.600000 0.600000 +vtc 0.937500 0.812500 0.600000 0.600000 0.600000 +vtc 0.062500 0.812500 1.000000 1.000000 1.000000 +vtc 0.062500 0.750000 1.000000 1.000000 1.000000 +vtc 0.000000 0.750000 1.000000 1.000000 1.000000 +vtc 0.000000 0.812500 1.000000 1.000000 1.000000 +vtc 0.125000 0.812500 0.800000 0.800000 0.800000 +vtc 0.125000 0.750000 0.800000 0.800000 0.800000 +vtc 0.187500 0.750000 0.800000 0.800000 0.800000 +vtc 0.187500 0.812500 0.800000 0.800000 0.800000 +vtc 0.125000 0.812500 0.800000 0.800000 0.800000 +vtc 0.125000 0.750000 0.800000 0.800000 0.800000 +vtc 0.187500 0.750000 0.800000 0.800000 0.800000 +vtc 0.187500 0.812500 0.800000 0.800000 0.800000 +vtc 0.125000 0.812500 0.800000 0.800000 0.800000 +vtc 0.125000 0.750000 0.800000 0.800000 0.800000 +vtc 0.187500 0.750000 0.800000 0.800000 0.800000 +vtc 0.187500 0.812500 0.800000 0.800000 0.800000 +vtc 0.125000 0.812500 0.800000 0.800000 0.800000 +vtc 0.125000 0.750000 0.800000 0.800000 0.800000 +vtc 0.187500 0.750000 0.800000 0.800000 0.800000 +vtc 0.187500 0.812500 0.800000 0.800000 0.800000 +vtc 0.250000 0.812500 0.600000 0.600000 0.600000 +vtc 0.250000 0.750000 0.600000 0.600000 0.600000 +vtc 0.187500 0.750000 0.600000 0.600000 0.600000 +vtc 0.187500 0.812500 0.600000 0.600000 0.600000 +vtc 0.250000 0.812500 0.600000 0.600000 0.600000 +vtc 0.250000 0.750000 0.600000 0.600000 0.600000 +vtc 0.187500 0.750000 0.600000 0.600000 0.600000 +vtc 0.187500 0.812500 0.600000 0.600000 0.600000 +vtc 0.250000 0.812500 0.800000 0.800000 0.800000 +vtc 0.250000 0.750000 0.800000 0.800000 0.800000 +vtc 0.312500 0.750000 0.800000 0.800000 0.800000 +vtc 0.312500 0.812500 0.800000 0.800000 0.800000 +vtc 0.312500 0.812500 0.800000 0.800000 0.800000 +vtc 0.312500 0.750000 0.800000 0.800000 0.800000 +vtc 0.375000 0.750000 0.800000 0.800000 0.800000 +vtc 0.375000 0.812500 0.800000 0.800000 0.800000 +vtc 0.500000 0.812500 0.600000 0.600000 0.600000 +vtc 0.500000 0.750000 0.600000 0.600000 0.600000 +vtc 0.437500 0.750000 0.600000 0.600000 0.600000 +vtc 0.437500 0.812500 0.600000 0.600000 0.600000 +vtc 0.437500 0.812500 0.600000 0.600000 0.600000 +vtc 0.437500 0.750000 0.600000 0.600000 0.600000 +vtc 0.375000 0.750000 0.600000 0.600000 0.600000 +vtc 0.375000 0.812500 0.600000 0.600000 0.600000 +vtc 0.437500 0.812500 0.600000 0.600000 0.600000 +vtc 0.437500 0.750000 0.600000 0.600000 0.600000 +vtc 0.375000 0.750000 0.600000 0.600000 0.600000 +vtc 0.375000 0.812500 0.600000 0.600000 0.600000 +vtc 0.562500 0.812500 0.600000 0.600000 0.600000 +vtc 0.562500 0.750000 0.600000 0.600000 0.600000 +vtc 0.500000 0.750000 0.600000 0.600000 0.600000 +vtc 0.500000 0.812500 0.600000 0.600000 0.600000 +vtc 0.750000 0.812500 0.800000 0.800000 0.800000 +vtc 0.750000 0.750000 0.800000 0.800000 0.800000 +vtc 0.812500 0.750000 0.800000 0.800000 0.800000 +vtc 0.812500 0.812500 0.800000 0.800000 0.800000 +vtc 0.562500 0.812500 0.800000 0.800000 0.800000 +vtc 0.562500 0.750000 0.800000 0.800000 0.800000 +vtc 0.625000 0.750000 0.800000 0.800000 0.800000 +vtc 0.625000 0.812500 0.800000 0.800000 0.800000 +vtc 0.625000 0.812500 0.800000 0.800000 0.800000 +vtc 0.625000 0.750000 0.800000 0.800000 0.800000 +vtc 0.687500 0.750000 0.800000 0.800000 0.800000 +vtc 0.687500 0.812500 0.800000 0.800000 0.800000 +vtc 0.687500 0.812500 0.800000 0.800000 0.800000 +vtc 0.687500 0.750000 0.800000 0.800000 0.800000 +vtc 0.750000 0.750000 0.800000 0.800000 0.800000 +vtc 0.750000 0.812500 0.800000 0.800000 0.800000 +vtc 0.875000 0.812500 0.600000 0.600000 0.600000 +vtc 0.875000 0.750000 0.600000 0.600000 0.600000 +vtc 0.812500 0.750000 0.600000 0.600000 0.600000 +vtc 0.812500 0.812500 0.600000 0.600000 0.600000 +vtc 0.937500 0.812500 0.600000 0.600000 0.600000 +vtc 0.937500 0.750000 0.600000 0.600000 0.600000 +vtc 0.875000 0.750000 0.600000 0.600000 0.600000 +vtc 0.875000 0.812500 0.600000 0.600000 0.600000 +vtc 0.687500 1.000000 1.000000 1.000000 1.000000 +vtc 0.687500 0.937500 1.000000 1.000000 1.000000 +vtc 0.750000 0.937500 1.000000 1.000000 1.000000 +vtc 0.750000 1.000000 1.000000 1.000000 1.000000 +vtc 0.562500 0.945313 0.800000 0.800000 0.800000 +vtc 0.562500 0.937500 0.800000 0.800000 0.800000 +vtc 0.625000 0.937500 0.800000 0.800000 0.800000 +vtc 0.625000 0.945313 0.800000 0.800000 0.800000 +vtc 0.562500 0.945313 0.800000 0.800000 0.800000 +vtc 0.562500 0.937500 0.800000 0.800000 0.800000 +vtc 0.625000 0.937500 0.800000 0.800000 0.800000 +vtc 0.625000 0.945313 0.800000 0.800000 0.800000 +vtc 0.000000 0.945313 0.600000 0.600000 0.600000 +vtc 0.000000 0.937500 0.600000 0.600000 0.600000 +vtc 0.062500 0.937500 0.600000 0.600000 0.600000 +vtc 0.062500 0.945313 0.600000 0.600000 0.600000 +vtc 0.000000 0.945313 0.600000 0.600000 0.600000 +vtc 0.000000 0.937500 0.600000 0.600000 0.600000 +vtc 0.062500 0.937500 0.600000 0.600000 0.600000 +vtc 0.062500 0.945313 0.600000 0.600000 0.600000 +vtc 0.750000 1.000000 1.000000 1.000000 1.000000 +vtc 0.750000 0.937500 1.000000 1.000000 1.000000 +vtc 0.812500 0.937500 1.000000 1.000000 1.000000 +vtc 0.812500 1.000000 1.000000 1.000000 1.000000 +vtc 0.562500 0.945313 0.800000 0.800000 0.800000 +vtc 0.562500 0.937500 0.800000 0.800000 0.800000 +vtc 0.625000 0.937500 0.800000 0.800000 0.800000 +vtc 0.625000 0.945313 0.800000 0.800000 0.800000 +vtc 0.625000 0.945313 0.800000 0.800000 0.800000 +vtc 0.625000 0.937500 0.800000 0.800000 0.800000 +vtc 0.687500 0.937500 0.800000 0.800000 0.800000 +vtc 0.687500 0.945313 0.800000 0.800000 0.800000 +vtc 0.000000 0.945313 0.600000 0.600000 0.600000 +vtc 0.000000 0.937500 0.600000 0.600000 0.600000 +vtc 0.062500 0.937500 0.600000 0.600000 0.600000 +vtc 0.062500 0.945313 0.600000 0.600000 0.600000 +vtc 0.000000 0.945313 0.600000 0.600000 0.600000 +vtc 0.000000 0.937500 0.600000 0.600000 0.600000 +vtc 0.062500 0.937500 0.600000 0.600000 0.600000 +vtc 0.062500 0.945313 0.600000 0.600000 0.600000 +vtc 0.812500 1.000000 1.000000 1.000000 1.000000 +vtc 0.812500 0.937500 1.000000 1.000000 1.000000 +vtc 0.875000 0.937500 1.000000 1.000000 1.000000 +vtc 0.875000 1.000000 1.000000 1.000000 1.000000 +vtc 0.625000 0.945313 0.800000 0.800000 0.800000 +vtc 0.625000 0.937500 0.800000 0.800000 0.800000 +vtc 0.687500 0.937500 0.800000 0.800000 0.800000 +vtc 0.687500 0.945313 0.800000 0.800000 0.800000 +vtc 0.562500 0.945313 0.800000 0.800000 0.800000 +vtc 0.562500 0.937500 0.800000 0.800000 0.800000 +vtc 0.625000 0.937500 0.800000 0.800000 0.800000 +vtc 0.625000 0.945313 0.800000 0.800000 0.800000 +vtc 0.000000 0.945313 0.600000 0.600000 0.600000 +vtc 0.000000 0.937500 0.600000 0.600000 0.600000 +vtc 0.062500 0.937500 0.600000 0.600000 0.600000 +vtc 0.062500 0.945313 0.600000 0.600000 0.600000 +vtc 0.000000 0.945313 0.600000 0.600000 0.600000 +vtc 0.000000 0.937500 0.600000 0.600000 0.600000 +vtc 0.062500 0.937500 0.600000 0.600000 0.600000 +vtc 0.062500 0.945313 0.600000 0.600000 0.600000 +vtc 0.875000 1.000000 1.000000 1.000000 1.000000 +vtc 0.875000 0.937500 1.000000 1.000000 1.000000 +vtc 0.937500 0.937500 1.000000 1.000000 1.000000 +vtc 0.937500 1.000000 1.000000 1.000000 1.000000 +vtc 0.625000 0.945313 0.800000 0.800000 0.800000 +vtc 0.625000 0.937500 0.800000 0.800000 0.800000 +vtc 0.687500 0.937500 0.800000 0.800000 0.800000 +vtc 0.687500 0.945313 0.800000 0.800000 0.800000 +vtc 0.625000 0.945313 0.800000 0.800000 0.800000 +vtc 0.625000 0.937500 0.800000 0.800000 0.800000 +vtc 0.687500 0.937500 0.800000 0.800000 0.800000 +vtc 0.687500 0.945313 0.800000 0.800000 0.800000 +vtc 0.000000 0.945313 0.600000 0.600000 0.600000 +vtc 0.000000 0.937500 0.600000 0.600000 0.600000 +vtc 0.062500 0.937500 0.600000 0.600000 0.600000 +vtc 0.062500 0.945313 0.600000 0.600000 0.600000 +vtc 0.000000 0.945313 0.600000 0.600000 0.600000 +vtc 0.000000 0.937500 0.600000 0.600000 0.600000 +vtc 0.062500 0.937500 0.600000 0.600000 0.600000 +vtc 0.062500 0.945313 0.600000 0.600000 0.600000 +vtc 0.937500 1.000000 1.000000 1.000000 1.000000 +vtc 0.937500 0.992188 1.000000 1.000000 1.000000 +vtc 0.945313 0.992188 1.000000 1.000000 1.000000 +vtc 0.945313 1.000000 1.000000 1.000000 1.000000 +vtc 0.945313 1.000000 1.000000 1.000000 1.000000 +vtc 0.945313 0.992188 1.000000 1.000000 1.000000 +vtc 0.953125 0.992188 1.000000 1.000000 1.000000 +vtc 0.953125 1.000000 1.000000 1.000000 1.000000 +vtc 0.953125 1.000000 1.000000 1.000000 1.000000 +vtc 0.953125 0.992188 1.000000 1.000000 1.000000 +vtc 0.960938 0.992188 1.000000 1.000000 1.000000 +vtc 0.960938 1.000000 1.000000 1.000000 1.000000 +vtc 0.960938 1.000000 1.000000 1.000000 1.000000 +vtc 0.960938 0.992188 1.000000 1.000000 1.000000 +vtc 0.968750 0.992188 1.000000 1.000000 1.000000 +vtc 0.968750 1.000000 1.000000 1.000000 1.000000 +vtc 0.968750 1.000000 1.000000 1.000000 1.000000 +vtc 0.968750 0.992188 1.000000 1.000000 1.000000 +vtc 0.976563 0.992188 1.000000 1.000000 1.000000 +vtc 0.976563 1.000000 1.000000 1.000000 1.000000 +vtc 0.976563 1.000000 1.000000 1.000000 1.000000 +vtc 0.976563 0.992188 1.000000 1.000000 1.000000 +vtc 0.984375 0.992188 1.000000 1.000000 1.000000 +vtc 0.984375 1.000000 1.000000 1.000000 1.000000 +vtc 0.984375 1.000000 1.000000 1.000000 1.000000 +vtc 0.984375 0.992188 1.000000 1.000000 1.000000 +vtc 0.992188 0.992188 1.000000 1.000000 1.000000 +vtc 0.992188 1.000000 1.000000 1.000000 1.000000 +vtc 0.992188 1.000000 1.000000 1.000000 1.000000 +vtc 0.992188 0.992188 1.000000 1.000000 1.000000 +vtc 1.000000 0.992188 1.000000 1.000000 1.000000 +vtc 1.000000 1.000000 1.000000 1.000000 1.000000 +vtc 0.937500 0.992188 1.000000 1.000000 1.000000 +vtc 0.937500 0.984375 1.000000 1.000000 1.000000 +vtc 0.945313 0.984375 1.000000 1.000000 1.000000 +vtc 0.945313 0.992188 1.000000 1.000000 1.000000 +vtc 0.945313 0.992188 1.000000 1.000000 1.000000 +vtc 0.945313 0.984375 1.000000 1.000000 1.000000 +vtc 0.953125 0.984375 1.000000 1.000000 1.000000 +vtc 0.953125 0.992188 1.000000 1.000000 1.000000 +vtc 0.953125 0.992188 1.000000 1.000000 1.000000 +vtc 0.953125 0.984375 1.000000 1.000000 1.000000 +vtc 0.960938 0.984375 1.000000 1.000000 1.000000 +vtc 0.960938 0.992188 1.000000 1.000000 1.000000 +vtc 0.960938 0.992188 1.000000 1.000000 1.000000 +vtc 0.960938 0.984375 1.000000 1.000000 1.000000 +vtc 0.968750 0.984375 1.000000 1.000000 1.000000 +vtc 0.968750 0.992188 1.000000 1.000000 1.000000 +vtc 0.968750 0.992188 1.000000 1.000000 1.000000 +vtc 0.968750 0.984375 1.000000 1.000000 1.000000 +vtc 0.976563 0.984375 1.000000 1.000000 1.000000 +vtc 0.976563 0.992188 1.000000 1.000000 1.000000 +vtc 0.976563 0.992188 1.000000 1.000000 1.000000 +vtc 0.976563 0.984375 1.000000 1.000000 1.000000 +vtc 0.984375 0.984375 1.000000 1.000000 1.000000 +vtc 0.984375 0.992188 1.000000 1.000000 1.000000 +vtc 0.984375 0.992188 1.000000 1.000000 1.000000 +vtc 0.984375 0.984375 1.000000 1.000000 1.000000 +vtc 0.992188 0.984375 1.000000 1.000000 1.000000 +vtc 0.992188 0.992188 1.000000 1.000000 1.000000 +vtc 0.992188 0.992188 1.000000 1.000000 1.000000 +vtc 0.992188 0.984375 1.000000 1.000000 1.000000 +vtc 1.000000 0.984375 1.000000 1.000000 1.000000 +vtc 1.000000 0.992188 1.000000 1.000000 1.000000 +vtc 0.937500 1.000000 1.000000 1.000000 1.000000 +vtc 0.937500 0.992188 1.000000 1.000000 1.000000 +vtc 0.945313 0.992188 1.000000 1.000000 1.000000 +vtc 0.945313 1.000000 1.000000 1.000000 1.000000 +vtc 0.945313 1.000000 1.000000 1.000000 1.000000 +vtc 0.945313 0.992188 1.000000 1.000000 1.000000 +vtc 0.953125 0.992188 1.000000 1.000000 1.000000 +vtc 0.953125 1.000000 1.000000 1.000000 1.000000 +vtc 0.953125 1.000000 1.000000 1.000000 1.000000 +vtc 0.953125 0.992188 1.000000 1.000000 1.000000 +vtc 0.960938 0.992188 1.000000 1.000000 1.000000 +vtc 0.960938 1.000000 1.000000 1.000000 1.000000 +vtc 0.960938 1.000000 1.000000 1.000000 1.000000 +vtc 0.960938 0.992188 1.000000 1.000000 1.000000 +vtc 0.968750 0.992188 1.000000 1.000000 1.000000 +vtc 0.968750 1.000000 1.000000 1.000000 1.000000 +vtc 0.968750 1.000000 1.000000 1.000000 1.000000 +vtc 0.968750 0.992188 1.000000 1.000000 1.000000 +vtc 0.976563 0.992188 1.000000 1.000000 1.000000 +vtc 0.976563 1.000000 1.000000 1.000000 1.000000 +vtc 0.976563 1.000000 1.000000 1.000000 1.000000 +vtc 0.976563 0.992188 1.000000 1.000000 1.000000 +vtc 0.984375 0.992188 1.000000 1.000000 1.000000 +vtc 0.984375 1.000000 1.000000 1.000000 1.000000 +vtc 0.984375 1.000000 1.000000 1.000000 1.000000 +vtc 0.984375 0.992188 1.000000 1.000000 1.000000 +vtc 0.992188 0.992188 1.000000 1.000000 1.000000 +vtc 0.992188 1.000000 1.000000 1.000000 1.000000 +vtc 0.992188 1.000000 1.000000 1.000000 1.000000 +vtc 0.992188 0.992188 1.000000 1.000000 1.000000 +vtc 1.000000 0.992188 1.000000 1.000000 1.000000 +vtc 1.000000 1.000000 1.000000 1.000000 1.000000 +vtc 0.937500 0.992188 1.000000 1.000000 1.000000 +vtc 0.937500 0.984375 1.000000 1.000000 1.000000 +vtc 0.945313 0.984375 1.000000 1.000000 1.000000 +vtc 0.945313 0.992188 1.000000 1.000000 1.000000 +vtc 0.945313 0.992188 1.000000 1.000000 1.000000 +vtc 0.945313 0.984375 1.000000 1.000000 1.000000 +vtc 0.953125 0.984375 1.000000 1.000000 1.000000 +vtc 0.953125 0.992188 1.000000 1.000000 1.000000 +vtc 0.953125 0.992188 1.000000 1.000000 1.000000 +vtc 0.953125 0.984375 1.000000 1.000000 1.000000 +vtc 0.960938 0.984375 1.000000 1.000000 1.000000 +vtc 0.960938 0.992188 1.000000 1.000000 1.000000 +vtc 0.960938 0.992188 1.000000 1.000000 1.000000 +vtc 0.960938 0.984375 1.000000 1.000000 1.000000 +vtc 0.968750 0.984375 1.000000 1.000000 1.000000 +vtc 0.968750 0.992188 1.000000 1.000000 1.000000 +vtc 0.968750 0.992188 1.000000 1.000000 1.000000 +vtc 0.968750 0.984375 1.000000 1.000000 1.000000 +vtc 0.976563 0.984375 1.000000 1.000000 1.000000 +vtc 0.976563 0.992188 1.000000 1.000000 1.000000 +vtc 0.976563 0.992188 1.000000 1.000000 1.000000 +vtc 0.976563 0.984375 1.000000 1.000000 1.000000 +vtc 0.984375 0.984375 1.000000 1.000000 1.000000 +vtc 0.984375 0.992188 1.000000 1.000000 1.000000 +vtc 0.984375 0.992188 1.000000 1.000000 1.000000 +vtc 0.984375 0.984375 1.000000 1.000000 1.000000 +vtc 0.992188 0.984375 1.000000 1.000000 1.000000 +vtc 0.992188 0.992188 1.000000 1.000000 1.000000 +vtc 0.992188 0.992188 1.000000 1.000000 1.000000 +vtc 0.992188 0.984375 1.000000 1.000000 1.000000 +vtc 1.000000 0.984375 1.000000 1.000000 1.000000 +vtc 1.000000 0.992188 1.000000 1.000000 1.000000 +vtc 0.937500 1.000000 1.000000 1.000000 1.000000 +vtc 0.937500 0.992188 1.000000 1.000000 1.000000 +vtc 0.945313 0.992188 1.000000 1.000000 1.000000 +vtc 0.945313 1.000000 1.000000 1.000000 1.000000 +vtc 0.945313 1.000000 1.000000 1.000000 1.000000 +vtc 0.945313 0.992188 1.000000 1.000000 1.000000 +vtc 0.953125 0.992188 1.000000 1.000000 1.000000 +vtc 0.953125 1.000000 1.000000 1.000000 1.000000 +vtc 0.953125 1.000000 1.000000 1.000000 1.000000 +vtc 0.953125 0.992188 1.000000 1.000000 1.000000 +vtc 0.960938 0.992188 1.000000 1.000000 1.000000 +vtc 0.960938 1.000000 1.000000 1.000000 1.000000 +vtc 0.960938 1.000000 1.000000 1.000000 1.000000 +vtc 0.960938 0.992188 1.000000 1.000000 1.000000 +vtc 0.968750 0.992188 1.000000 1.000000 1.000000 +vtc 0.968750 1.000000 1.000000 1.000000 1.000000 +vtc 0.968750 1.000000 1.000000 1.000000 1.000000 +vtc 0.968750 0.992188 1.000000 1.000000 1.000000 +vtc 0.976563 0.992188 1.000000 1.000000 1.000000 +vtc 0.976563 1.000000 1.000000 1.000000 1.000000 +vtc 0.976563 1.000000 1.000000 1.000000 1.000000 +vtc 0.976563 0.992188 1.000000 1.000000 1.000000 +vtc 0.984375 0.992188 1.000000 1.000000 1.000000 +vtc 0.984375 1.000000 1.000000 1.000000 1.000000 +vtc 0.984375 1.000000 1.000000 1.000000 1.000000 +vtc 0.984375 0.992188 1.000000 1.000000 1.000000 +vtc 0.992188 0.992188 1.000000 1.000000 1.000000 +vtc 0.992188 1.000000 1.000000 1.000000 1.000000 +vtc 0.992188 1.000000 1.000000 1.000000 1.000000 +vtc 0.992188 0.992188 1.000000 1.000000 1.000000 +vtc 1.000000 0.992188 1.000000 1.000000 1.000000 +vtc 1.000000 1.000000 1.000000 1.000000 1.000000 +vtc 0.937500 0.992188 1.000000 1.000000 1.000000 +vtc 0.937500 0.984375 1.000000 1.000000 1.000000 +vtc 0.945313 0.984375 1.000000 1.000000 1.000000 +vtc 0.945313 0.992188 1.000000 1.000000 1.000000 +vtc 0.945313 0.992188 1.000000 1.000000 1.000000 +vtc 0.945313 0.984375 1.000000 1.000000 1.000000 +vtc 0.953125 0.984375 1.000000 1.000000 1.000000 +vtc 0.953125 0.992188 1.000000 1.000000 1.000000 +vtc 0.953125 0.992188 1.000000 1.000000 1.000000 +vtc 0.953125 0.984375 1.000000 1.000000 1.000000 +vtc 0.960938 0.984375 1.000000 1.000000 1.000000 +vtc 0.960938 0.992188 1.000000 1.000000 1.000000 +vtc 0.960938 0.992188 1.000000 1.000000 1.000000 +vtc 0.960938 0.984375 1.000000 1.000000 1.000000 +vtc 0.968750 0.984375 1.000000 1.000000 1.000000 +vtc 0.968750 0.992188 1.000000 1.000000 1.000000 +vtc 0.968750 0.992188 1.000000 1.000000 1.000000 +vtc 0.968750 0.984375 1.000000 1.000000 1.000000 +vtc 0.976563 0.984375 1.000000 1.000000 1.000000 +vtc 0.976563 0.992188 1.000000 1.000000 1.000000 +vtc 0.976563 0.992188 1.000000 1.000000 1.000000 +vtc 0.976563 0.984375 1.000000 1.000000 1.000000 +vtc 0.984375 0.984375 1.000000 1.000000 1.000000 +vtc 0.984375 0.992188 1.000000 1.000000 1.000000 +vtc 0.984375 0.992188 1.000000 1.000000 1.000000 +vtc 0.984375 0.984375 1.000000 1.000000 1.000000 +vtc 0.992188 0.984375 1.000000 1.000000 1.000000 +vtc 0.992188 0.992188 1.000000 1.000000 1.000000 +vtc 0.992188 0.992188 1.000000 1.000000 1.000000 +vtc 0.992188 0.984375 1.000000 1.000000 1.000000 +vtc 1.000000 0.984375 1.000000 1.000000 1.000000 +vtc 1.000000 0.992188 1.000000 1.000000 1.000000 +vtc 0.937500 1.000000 1.000000 1.000000 1.000000 +vtc 0.937500 0.992188 1.000000 1.000000 1.000000 +vtc 0.945313 0.992188 1.000000 1.000000 1.000000 +vtc 0.945313 1.000000 1.000000 1.000000 1.000000 +vtc 0.945313 1.000000 1.000000 1.000000 1.000000 +vtc 0.945313 0.992188 1.000000 1.000000 1.000000 +vtc 0.953125 0.992188 1.000000 1.000000 1.000000 +vtc 0.953125 1.000000 1.000000 1.000000 1.000000 +vtc 0.953125 1.000000 1.000000 1.000000 1.000000 +vtc 0.953125 0.992188 1.000000 1.000000 1.000000 +vtc 0.960938 0.992188 1.000000 1.000000 1.000000 +vtc 0.960938 1.000000 1.000000 1.000000 1.000000 +vtc 0.960938 1.000000 1.000000 1.000000 1.000000 +vtc 0.960938 0.992188 1.000000 1.000000 1.000000 +vtc 0.968750 0.992188 1.000000 1.000000 1.000000 +vtc 0.968750 1.000000 1.000000 1.000000 1.000000 +vtc 0.968750 1.000000 1.000000 1.000000 1.000000 +vtc 0.968750 0.992188 1.000000 1.000000 1.000000 +vtc 0.976563 0.992188 1.000000 1.000000 1.000000 +vtc 0.976563 1.000000 1.000000 1.000000 1.000000 +vtc 0.976563 1.000000 1.000000 1.000000 1.000000 +vtc 0.976563 0.992188 1.000000 1.000000 1.000000 +vtc 0.984375 0.992188 1.000000 1.000000 1.000000 +vtc 0.984375 1.000000 1.000000 1.000000 1.000000 +vtc 0.984375 1.000000 1.000000 1.000000 1.000000 +vtc 0.984375 0.992188 1.000000 1.000000 1.000000 +vtc 0.992188 0.992188 1.000000 1.000000 1.000000 +vtc 0.992188 1.000000 1.000000 1.000000 1.000000 +vtc 0.992188 1.000000 1.000000 1.000000 1.000000 +vtc 0.992188 0.992188 1.000000 1.000000 1.000000 +vtc 1.000000 0.992188 1.000000 1.000000 1.000000 +vtc 1.000000 1.000000 1.000000 1.000000 1.000000 +vtc 0.937500 0.992188 1.000000 1.000000 1.000000 +vtc 0.937500 0.984375 1.000000 1.000000 1.000000 +vtc 0.945313 0.984375 1.000000 1.000000 1.000000 +vtc 0.945313 0.992188 1.000000 1.000000 1.000000 +vtc 0.945313 0.992188 1.000000 1.000000 1.000000 +vtc 0.945313 0.984375 1.000000 1.000000 1.000000 +vtc 0.953125 0.984375 1.000000 1.000000 1.000000 +vtc 0.953125 0.992188 1.000000 1.000000 1.000000 +vtc 0.953125 0.992188 1.000000 1.000000 1.000000 +vtc 0.953125 0.984375 1.000000 1.000000 1.000000 +vtc 0.960938 0.984375 1.000000 1.000000 1.000000 +vtc 0.960938 0.992188 1.000000 1.000000 1.000000 +vtc 0.960938 0.992188 1.000000 1.000000 1.000000 +vtc 0.960938 0.984375 1.000000 1.000000 1.000000 +vtc 0.968750 0.984375 1.000000 1.000000 1.000000 +vtc 0.968750 0.992188 1.000000 1.000000 1.000000 +vtc 0.968750 0.992188 1.000000 1.000000 1.000000 +vtc 0.968750 0.984375 1.000000 1.000000 1.000000 +vtc 0.976563 0.984375 1.000000 1.000000 1.000000 +vtc 0.976563 0.992188 1.000000 1.000000 1.000000 +vtc 0.976563 0.992188 1.000000 1.000000 1.000000 +vtc 0.976563 0.984375 1.000000 1.000000 1.000000 +vtc 0.984375 0.984375 1.000000 1.000000 1.000000 +vtc 0.984375 0.992188 1.000000 1.000000 1.000000 +vtc 0.984375 0.992188 1.000000 1.000000 1.000000 +vtc 0.984375 0.984375 1.000000 1.000000 1.000000 +vtc 0.992188 0.984375 1.000000 1.000000 1.000000 +vtc 0.992188 0.992188 1.000000 1.000000 1.000000 +vtc 0.992188 0.992188 1.000000 1.000000 1.000000 +vtc 0.992188 0.984375 1.000000 1.000000 1.000000 +vtc 1.000000 0.984375 1.000000 1.000000 1.000000 +vtc 1.000000 0.992188 1.000000 1.000000 1.000000 +vtc 0.937500 1.000000 1.000000 1.000000 1.000000 +vtc 0.937500 0.992188 1.000000 1.000000 1.000000 +vtc 0.945313 0.992188 1.000000 1.000000 1.000000 +vtc 0.945313 1.000000 1.000000 1.000000 1.000000 +vtc 0.945313 1.000000 1.000000 1.000000 1.000000 +vtc 0.945313 0.992188 1.000000 1.000000 1.000000 +vtc 0.953125 0.992188 1.000000 1.000000 1.000000 +vtc 0.953125 1.000000 1.000000 1.000000 1.000000 +vtc 0.953125 1.000000 1.000000 1.000000 1.000000 +vtc 0.953125 0.992188 1.000000 1.000000 1.000000 +vtc 0.960938 0.992188 1.000000 1.000000 1.000000 +vtc 0.960938 1.000000 1.000000 1.000000 1.000000 +vtc 0.960938 1.000000 1.000000 1.000000 1.000000 +vtc 0.960938 0.992188 1.000000 1.000000 1.000000 +vtc 0.968750 0.992188 1.000000 1.000000 1.000000 +vtc 0.968750 1.000000 1.000000 1.000000 1.000000 +vtc 0.968750 1.000000 1.000000 1.000000 1.000000 +vtc 0.968750 0.992188 1.000000 1.000000 1.000000 +vtc 0.976563 0.992188 1.000000 1.000000 1.000000 +vtc 0.976563 1.000000 1.000000 1.000000 1.000000 +vtc 0.976563 1.000000 1.000000 1.000000 1.000000 +vtc 0.976563 0.992188 1.000000 1.000000 1.000000 +vtc 0.984375 0.992188 1.000000 1.000000 1.000000 +vtc 0.984375 1.000000 1.000000 1.000000 1.000000 +vtc 0.984375 1.000000 1.000000 1.000000 1.000000 +vtc 0.984375 0.992188 1.000000 1.000000 1.000000 +vtc 0.992188 0.992188 1.000000 1.000000 1.000000 +vtc 0.992188 1.000000 1.000000 1.000000 1.000000 +vtc 0.992188 1.000000 1.000000 1.000000 1.000000 +vtc 0.992188 0.992188 1.000000 1.000000 1.000000 +vtc 1.000000 0.992188 1.000000 1.000000 1.000000 +vtc 1.000000 1.000000 1.000000 1.000000 1.000000 +vtc 0.937500 0.992188 1.000000 1.000000 1.000000 +vtc 0.937500 0.984375 1.000000 1.000000 1.000000 +vtc 0.945313 0.984375 1.000000 1.000000 1.000000 +vtc 0.945313 0.992188 1.000000 1.000000 1.000000 +vtc 0.945313 0.992188 1.000000 1.000000 1.000000 +vtc 0.945313 0.984375 1.000000 1.000000 1.000000 +vtc 0.953125 0.984375 1.000000 1.000000 1.000000 +vtc 0.953125 0.992188 1.000000 1.000000 1.000000 +vtc 0.953125 0.992188 1.000000 1.000000 1.000000 +vtc 0.953125 0.984375 1.000000 1.000000 1.000000 +vtc 0.960938 0.984375 1.000000 1.000000 1.000000 +vtc 0.960938 0.992188 1.000000 1.000000 1.000000 +vtc 0.960938 0.992188 1.000000 1.000000 1.000000 +vtc 0.960938 0.984375 1.000000 1.000000 1.000000 +vtc 0.968750 0.984375 1.000000 1.000000 1.000000 +vtc 0.968750 0.992188 1.000000 1.000000 1.000000 +vtc 0.968750 0.992188 1.000000 1.000000 1.000000 +vtc 0.968750 0.984375 1.000000 1.000000 1.000000 +vtc 0.976563 0.984375 1.000000 1.000000 1.000000 +vtc 0.976563 0.992188 1.000000 1.000000 1.000000 +vtc 0.976563 0.992188 1.000000 1.000000 1.000000 +vtc 0.976563 0.984375 1.000000 1.000000 1.000000 +vtc 0.984375 0.984375 1.000000 1.000000 1.000000 +vtc 0.984375 0.992188 1.000000 1.000000 1.000000 +vtc 0.984375 0.992188 1.000000 1.000000 1.000000 +vtc 0.984375 0.984375 1.000000 1.000000 1.000000 +vtc 0.992188 0.984375 1.000000 1.000000 1.000000 +vtc 0.992188 0.992188 1.000000 1.000000 1.000000 +vtc 0.992188 0.992188 1.000000 1.000000 1.000000 +vtc 0.992188 0.984375 1.000000 1.000000 1.000000 +vtc 1.000000 0.984375 1.000000 1.000000 1.000000 +vtc 1.000000 0.992188 1.000000 1.000000 1.000000 +vtc 0.937500 1.000000 1.000000 1.000000 1.000000 +vtc 0.937500 0.992188 1.000000 1.000000 1.000000 +vtc 0.945313 0.992188 1.000000 1.000000 1.000000 +vtc 0.945313 1.000000 1.000000 1.000000 1.000000 +vtc 0.945313 1.000000 1.000000 1.000000 1.000000 +vtc 0.945313 0.992188 1.000000 1.000000 1.000000 +vtc 0.953125 0.992188 1.000000 1.000000 1.000000 +vtc 0.953125 1.000000 1.000000 1.000000 1.000000 +vtc 0.953125 1.000000 1.000000 1.000000 1.000000 +vtc 0.953125 0.992188 1.000000 1.000000 1.000000 +vtc 0.960938 0.992188 1.000000 1.000000 1.000000 +vtc 0.960938 1.000000 1.000000 1.000000 1.000000 +vtc 0.960938 1.000000 1.000000 1.000000 1.000000 +vtc 0.960938 0.992188 1.000000 1.000000 1.000000 +vtc 0.968750 0.992188 1.000000 1.000000 1.000000 +vtc 0.968750 1.000000 1.000000 1.000000 1.000000 +vtc 0.968750 1.000000 1.000000 1.000000 1.000000 +vtc 0.968750 0.992188 1.000000 1.000000 1.000000 +vtc 0.976563 0.992188 1.000000 1.000000 1.000000 +vtc 0.976563 1.000000 1.000000 1.000000 1.000000 +vtc 0.976563 1.000000 1.000000 1.000000 1.000000 +vtc 0.976563 0.992188 1.000000 1.000000 1.000000 +vtc 0.984375 0.992188 1.000000 1.000000 1.000000 +vtc 0.984375 1.000000 1.000000 1.000000 1.000000 +vtc 0.984375 1.000000 1.000000 1.000000 1.000000 +vtc 0.984375 0.992188 1.000000 1.000000 1.000000 +vtc 0.992188 0.992188 1.000000 1.000000 1.000000 +vtc 0.992188 1.000000 1.000000 1.000000 1.000000 +vtc 0.992188 1.000000 1.000000 1.000000 1.000000 +vtc 0.992188 0.992188 1.000000 1.000000 1.000000 +vtc 1.000000 0.992188 1.000000 1.000000 1.000000 +vtc 1.000000 1.000000 1.000000 1.000000 1.000000 +vtc 0.937500 0.992188 1.000000 1.000000 1.000000 +vtc 0.937500 0.984375 1.000000 1.000000 1.000000 +vtc 0.945313 0.984375 1.000000 1.000000 1.000000 +vtc 0.945313 0.992188 1.000000 1.000000 1.000000 +vtc 0.945313 0.992188 1.000000 1.000000 1.000000 +vtc 0.945313 0.984375 1.000000 1.000000 1.000000 +vtc 0.953125 0.984375 1.000000 1.000000 1.000000 +vtc 0.953125 0.992188 1.000000 1.000000 1.000000 +vtc 0.953125 0.992188 1.000000 1.000000 1.000000 +vtc 0.953125 0.984375 1.000000 1.000000 1.000000 +vtc 0.960938 0.984375 1.000000 1.000000 1.000000 +vtc 0.960938 0.992188 1.000000 1.000000 1.000000 +vtc 0.960938 0.992188 1.000000 1.000000 1.000000 +vtc 0.960938 0.984375 1.000000 1.000000 1.000000 +vtc 0.968750 0.984375 1.000000 1.000000 1.000000 +vtc 0.968750 0.992188 1.000000 1.000000 1.000000 +vtc 0.968750 0.992188 1.000000 1.000000 1.000000 +vtc 0.968750 0.984375 1.000000 1.000000 1.000000 +vtc 0.976563 0.984375 1.000000 1.000000 1.000000 +vtc 0.976563 0.992188 1.000000 1.000000 1.000000 +vtc 0.976563 0.992188 1.000000 1.000000 1.000000 +vtc 0.976563 0.984375 1.000000 1.000000 1.000000 +vtc 0.984375 0.984375 1.000000 1.000000 1.000000 +vtc 0.984375 0.992188 1.000000 1.000000 1.000000 +vtc 0.984375 0.992188 1.000000 1.000000 1.000000 +vtc 0.984375 0.984375 1.000000 1.000000 1.000000 +vtc 0.992188 0.984375 1.000000 1.000000 1.000000 +vtc 0.992188 0.992188 1.000000 1.000000 1.000000 +vtc 0.992188 0.992188 1.000000 1.000000 1.000000 +vtc 0.992188 0.984375 1.000000 1.000000 1.000000 +vtc 1.000000 0.984375 1.000000 1.000000 1.000000 +vtc 1.000000 0.992188 1.000000 1.000000 1.000000 +vtc 0.937500 1.000000 1.000000 1.000000 1.000000 +vtc 0.937500 0.992188 1.000000 1.000000 1.000000 +vtc 0.945313 0.992188 1.000000 1.000000 1.000000 +vtc 0.945313 1.000000 1.000000 1.000000 1.000000 +vtc 0.945313 1.000000 1.000000 1.000000 1.000000 +vtc 0.945313 0.992188 1.000000 1.000000 1.000000 +vtc 0.953125 0.992188 1.000000 1.000000 1.000000 +vtc 0.953125 1.000000 1.000000 1.000000 1.000000 +vtc 0.953125 1.000000 1.000000 1.000000 1.000000 +vtc 0.953125 0.992188 1.000000 1.000000 1.000000 +vtc 0.960938 0.992188 1.000000 1.000000 1.000000 +vtc 0.960938 1.000000 1.000000 1.000000 1.000000 +vtc 0.960938 1.000000 1.000000 1.000000 1.000000 +vtc 0.960938 0.992188 1.000000 1.000000 1.000000 +vtc 0.968750 0.992188 1.000000 1.000000 1.000000 +vtc 0.968750 1.000000 1.000000 1.000000 1.000000 +vtc 0.968750 1.000000 1.000000 1.000000 1.000000 +vtc 0.968750 0.992188 1.000000 1.000000 1.000000 +vtc 0.976563 0.992188 1.000000 1.000000 1.000000 +vtc 0.976563 1.000000 1.000000 1.000000 1.000000 +vtc 0.976563 1.000000 1.000000 1.000000 1.000000 +vtc 0.976563 0.992188 1.000000 1.000000 1.000000 +vtc 0.984375 0.992188 1.000000 1.000000 1.000000 +vtc 0.984375 1.000000 1.000000 1.000000 1.000000 +vtc 0.984375 1.000000 1.000000 1.000000 1.000000 +vtc 0.984375 0.992188 1.000000 1.000000 1.000000 +vtc 0.992188 0.992188 1.000000 1.000000 1.000000 +vtc 0.992188 1.000000 1.000000 1.000000 1.000000 +vtc 0.992188 1.000000 1.000000 1.000000 1.000000 +vtc 0.992188 0.992188 1.000000 1.000000 1.000000 +vtc 1.000000 0.992188 1.000000 1.000000 1.000000 +vtc 1.000000 1.000000 1.000000 1.000000 1.000000 +vtc 0.937500 0.992188 1.000000 1.000000 1.000000 +vtc 0.937500 0.984375 1.000000 1.000000 1.000000 +vtc 0.945313 0.984375 1.000000 1.000000 1.000000 +vtc 0.945313 0.992188 1.000000 1.000000 1.000000 +vtc 0.945313 0.992188 1.000000 1.000000 1.000000 +vtc 0.945313 0.984375 1.000000 1.000000 1.000000 +vtc 0.953125 0.984375 1.000000 1.000000 1.000000 +vtc 0.953125 0.992188 1.000000 1.000000 1.000000 +vtc 0.953125 0.992188 1.000000 1.000000 1.000000 +vtc 0.953125 0.984375 1.000000 1.000000 1.000000 +vtc 0.960938 0.984375 1.000000 1.000000 1.000000 +vtc 0.960938 0.992188 1.000000 1.000000 1.000000 +vtc 0.960938 0.992188 1.000000 1.000000 1.000000 +vtc 0.960938 0.984375 1.000000 1.000000 1.000000 +vtc 0.968750 0.984375 1.000000 1.000000 1.000000 +vtc 0.968750 0.992188 1.000000 1.000000 1.000000 +vtc 0.968750 0.992188 1.000000 1.000000 1.000000 +vtc 0.968750 0.984375 1.000000 1.000000 1.000000 +vtc 0.976563 0.984375 1.000000 1.000000 1.000000 +vtc 0.976563 0.992188 1.000000 1.000000 1.000000 +vtc 0.976563 0.992188 1.000000 1.000000 1.000000 +vtc 0.976563 0.984375 1.000000 1.000000 1.000000 +vtc 0.984375 0.984375 1.000000 1.000000 1.000000 +vtc 0.984375 0.992188 1.000000 1.000000 1.000000 +vtc 0.984375 0.992188 1.000000 1.000000 1.000000 +vtc 0.984375 0.984375 1.000000 1.000000 1.000000 +vtc 0.992188 0.984375 1.000000 1.000000 1.000000 +vtc 0.992188 0.992188 1.000000 1.000000 1.000000 +vtc 0.992188 0.992188 1.000000 1.000000 1.000000 +vtc 0.992188 0.984375 1.000000 1.000000 1.000000 +vtc 1.000000 0.984375 1.000000 1.000000 1.000000 +vtc 1.000000 0.992188 1.000000 1.000000 1.000000 +vtc 0.937500 1.000000 1.000000 1.000000 1.000000 +vtc 0.937500 0.992188 1.000000 1.000000 1.000000 +vtc 0.945313 0.992188 1.000000 1.000000 1.000000 +vtc 0.945313 1.000000 1.000000 1.000000 1.000000 +vtc 0.945313 1.000000 1.000000 1.000000 1.000000 +vtc 0.945313 0.992188 1.000000 1.000000 1.000000 +vtc 0.953125 0.992188 1.000000 1.000000 1.000000 +vtc 0.953125 1.000000 1.000000 1.000000 1.000000 +vtc 0.953125 1.000000 1.000000 1.000000 1.000000 +vtc 0.953125 0.992188 1.000000 1.000000 1.000000 +vtc 0.960938 0.992188 1.000000 1.000000 1.000000 +vtc 0.960938 1.000000 1.000000 1.000000 1.000000 +vtc 0.960938 1.000000 1.000000 1.000000 1.000000 +vtc 0.960938 0.992188 1.000000 1.000000 1.000000 +vtc 0.968750 0.992188 1.000000 1.000000 1.000000 +vtc 0.968750 1.000000 1.000000 1.000000 1.000000 +vtc 0.968750 1.000000 1.000000 1.000000 1.000000 +vtc 0.968750 0.992188 1.000000 1.000000 1.000000 +vtc 0.976563 0.992188 1.000000 1.000000 1.000000 +vtc 0.976563 1.000000 1.000000 1.000000 1.000000 +vtc 0.976563 1.000000 1.000000 1.000000 1.000000 +vtc 0.976563 0.992188 1.000000 1.000000 1.000000 +vtc 0.984375 0.992188 1.000000 1.000000 1.000000 +vtc 0.984375 1.000000 1.000000 1.000000 1.000000 +vtc 0.984375 1.000000 1.000000 1.000000 1.000000 +vtc 0.984375 0.992188 1.000000 1.000000 1.000000 +vtc 0.992188 0.992188 1.000000 1.000000 1.000000 +vtc 0.992188 1.000000 1.000000 1.000000 1.000000 +vtc 0.992188 1.000000 1.000000 1.000000 1.000000 +vtc 0.992188 0.992188 1.000000 1.000000 1.000000 +vtc 1.000000 0.992188 1.000000 1.000000 1.000000 +vtc 1.000000 1.000000 1.000000 1.000000 1.000000 +vtc 0.937500 0.992188 1.000000 1.000000 1.000000 +vtc 0.937500 0.984375 1.000000 1.000000 1.000000 +vtc 0.945313 0.984375 1.000000 1.000000 1.000000 +vtc 0.945313 0.992188 1.000000 1.000000 1.000000 +vtc 0.945313 0.992188 1.000000 1.000000 1.000000 +vtc 0.945313 0.984375 1.000000 1.000000 1.000000 +vtc 0.953125 0.984375 1.000000 1.000000 1.000000 +vtc 0.953125 0.992188 1.000000 1.000000 1.000000 +vtc 0.953125 0.992188 1.000000 1.000000 1.000000 +vtc 0.953125 0.984375 1.000000 1.000000 1.000000 +vtc 0.960938 0.984375 1.000000 1.000000 1.000000 +vtc 0.960938 0.992188 1.000000 1.000000 1.000000 +vtc 0.960938 0.992188 1.000000 1.000000 1.000000 +vtc 0.960938 0.984375 1.000000 1.000000 1.000000 +vtc 0.968750 0.984375 1.000000 1.000000 1.000000 +vtc 0.968750 0.992188 1.000000 1.000000 1.000000 +vtc 0.968750 0.992188 1.000000 1.000000 1.000000 +vtc 0.968750 0.984375 1.000000 1.000000 1.000000 +vtc 0.976563 0.984375 1.000000 1.000000 1.000000 +vtc 0.976563 0.992188 1.000000 1.000000 1.000000 +vtc 0.976563 0.992188 1.000000 1.000000 1.000000 +vtc 0.976563 0.984375 1.000000 1.000000 1.000000 +vtc 0.984375 0.984375 1.000000 1.000000 1.000000 +vtc 0.984375 0.992188 1.000000 1.000000 1.000000 +vtc 0.984375 0.992188 1.000000 1.000000 1.000000 +vtc 0.984375 0.984375 1.000000 1.000000 1.000000 +vtc 0.992188 0.984375 1.000000 1.000000 1.000000 +vtc 0.992188 0.992188 1.000000 1.000000 1.000000 +vtc 0.992188 0.992188 1.000000 1.000000 1.000000 +vtc 0.992188 0.984375 1.000000 1.000000 1.000000 +vtc 1.000000 0.984375 1.000000 1.000000 1.000000 +vtc 1.000000 0.992188 1.000000 1.000000 1.000000 + +# 11 Groups +g 0 +g 1_1 +f 1/1 2/2 3/3 4/4 +f 5/5 6/6 7/7 8/8 +f 9/9 10/10 11/11 12/12 +f 13/13 14/14 15/15 16/16 +f 17/17 18/18 19/19 20/20 +f 21/21 22/22 23/23 24/24 +f 25/25 26/26 27/27 28/28 +f 29/29 30/30 31/31 32/32 +f 33/33 34/34 35/35 36/36 +f 37/37 38/38 39/39 40/40 +f 41/41 42/42 43/43 44/44 +f 45/45 46/46 47/47 48/48 +f 49/49 50/50 51/51 52/52 +f 53/53 54/54 55/55 56/56 +f 57/57 58/58 59/59 60/60 +f 61/61 62/62 63/63 64/64 +f 65/65 66/66 67/67 68/68 +f 69/69 70/70 71/71 72/72 +f 73/73 74/74 75/75 76/76 +g 1_2 +f 1/77 2/78 3/79 4/80 +f 5/81 6/82 7/83 8/84 +f 9/85 10/86 11/87 12/88 +f 13/89 14/90 15/91 16/92 +f 17/93 18/94 19/95 20/96 +f 21/97 22/98 23/99 24/100 +f 25/101 26/102 27/103 28/104 +f 29/105 30/106 31/107 32/108 +f 33/109 34/110 35/111 36/112 +f 37/113 38/114 39/115 40/116 +f 41/117 42/118 43/119 44/120 +f 45/121 46/122 47/123 48/124 +f 49/125 50/126 51/127 52/128 +f 53/129 54/130 55/131 56/132 +f 57/133 58/134 59/135 60/136 +f 61/137 62/138 63/139 64/140 +f 65/141 66/142 67/143 68/144 +f 69/145 70/146 71/147 72/148 +f 73/149 74/150 75/151 76/152 +g 1_3 +f 1/153 2/154 3/155 4/156 +f 5/157 6/158 7/159 8/160 +f 9/161 10/162 11/163 12/164 +f 13/165 14/166 15/167 16/168 +f 17/169 18/170 19/171 20/172 +f 21/173 22/174 23/175 24/176 +f 25/177 26/178 27/179 28/180 +f 29/181 30/182 31/183 32/184 +f 33/185 34/186 35/187 36/188 +f 37/189 38/190 39/191 40/192 +f 41/193 42/194 43/195 44/196 +f 45/197 46/198 47/199 48/200 +f 49/201 50/202 51/203 52/204 +f 53/205 54/206 55/207 56/208 +f 57/209 58/210 59/211 60/212 +f 61/213 62/214 63/215 64/216 +f 65/217 66/218 67/219 68/220 +f 69/221 70/222 71/223 72/224 +f 73/225 74/226 75/227 76/228 +g 1_4 +f 1/229 2/230 3/231 4/232 +f 5/233 6/234 7/235 8/236 +f 9/237 10/238 11/239 12/240 +f 13/241 14/242 15/243 16/244 +f 17/245 18/246 19/247 20/248 +f 21/249 22/250 23/251 24/252 +f 25/253 26/254 27/255 28/256 +f 29/257 30/258 31/259 32/260 +f 33/261 34/262 35/263 36/264 +f 37/265 38/266 39/267 40/268 +f 41/269 42/270 43/271 44/272 +f 45/273 46/274 47/275 48/276 +f 49/277 50/278 51/279 52/280 +f 53/281 54/282 55/283 56/284 +f 57/285 58/286 59/287 60/288 +f 61/289 62/290 63/291 64/292 +f 65/293 66/294 67/295 68/296 +f 69/297 70/298 71/299 72/300 +f 73/301 74/302 75/303 76/304 +g 2_1 +f 77/305 78/306 79/307 80/308 +f 77/309 75/310 70/311 78/312 +f 79/313 71/314 74/315 80/316 +f 78/317 70/318 71/319 79/320 +f 80/321 74/322 75/323 77/324 +g 2_2 +f 77/325 78/326 79/327 80/328 +f 77/329 75/330 70/331 78/332 +f 79/333 71/334 74/335 80/336 +f 78/337 70/338 71/339 79/340 +f 80/341 74/342 75/343 77/344 +g 2_3 +f 77/345 78/346 79/347 80/348 +f 77/349 75/350 70/351 78/352 +f 79/353 71/354 74/355 80/356 +f 78/357 70/358 71/359 79/360 +f 80/361 74/362 75/363 77/364 +g 2_4 +f 77/365 78/366 79/367 80/368 +f 77/369 75/370 70/371 78/372 +f 79/373 71/374 74/375 80/376 +f 78/377 70/378 71/379 79/380 +f 80/381 74/382 75/383 77/384 +g 3_1 +f 81/385 82/386 83/387 84/388 +g 3_2 +f 81/389 82/390 83/391 84/392 +g 3_3 +f 81/393 82/394 83/395 84/396 +g 3_4 +f 81/397 82/398 83/399 84/400 +g 3_5 +f 81/401 82/402 83/403 84/404 +g 3_6 +f 81/405 82/406 83/407 84/408 +g 3_7 +f 81/409 82/410 83/411 84/412 +g 3_8 +f 81/413 82/414 83/415 84/416 +g 3_9 +f 81/417 82/418 83/419 84/420 +g 3_10 +f 81/421 82/422 83/423 84/424 +g 3_11 +f 81/425 82/426 83/427 84/428 +g 3_12 +f 81/429 82/430 83/431 84/432 +g 3_13 +f 81/433 82/434 83/435 84/436 +g 3_14 +f 81/437 82/438 83/439 84/440 +g 3_15 +f 81/441 82/442 83/443 84/444 +g 3_16 +f 81/445 82/446 83/447 84/448 +g 4_1 +f 84/449 83/450 85/451 86/452 +g 4_2 +f 84/453 83/454 85/455 86/456 +g 4_3 +f 84/457 83/458 85/459 86/460 +g 4_4 +f 84/461 83/462 85/463 86/464 +g 4_5 +f 84/465 83/466 85/467 86/468 +g 4_6 +f 84/469 83/470 85/471 86/472 +g 4_7 +f 84/473 83/474 85/475 86/476 +g 4_8 +f 84/477 83/478 85/479 86/480 +g 4_9 +f 84/481 83/482 85/483 86/484 +g 4_10 +f 84/485 83/486 85/487 86/488 +g 4_11 +f 84/489 83/490 85/491 86/492 +g 4_12 +f 84/493 83/494 85/495 86/496 +g 4_13 +f 84/497 83/498 85/499 86/500 +g 4_14 +f 84/501 83/502 85/503 86/504 +g 4_15 +f 84/505 83/506 85/507 86/508 +g 4_16 +f 84/509 83/510 85/511 86/512 +g 5_1 +f 87/513 81/514 84/515 88/516 +g 5_2 +f 87/517 81/518 84/519 88/520 +g 5_3 +f 87/521 81/522 84/523 88/524 +g 5_4 +f 87/525 81/526 84/527 88/528 +g 5_5 +f 87/529 81/530 84/531 88/532 +g 5_6 +f 87/533 81/534 84/535 88/536 +g 5_7 +f 87/537 81/538 84/539 88/540 +g 5_8 +f 87/541 81/542 84/543 88/544 +g 5_9 +f 87/545 81/546 84/547 88/548 +g 5_10 +f 87/549 81/550 84/551 88/552 +g 5_11 +f 87/553 81/554 84/555 88/556 +g 5_12 +f 87/557 81/558 84/559 88/560 +g 5_13 +f 87/561 81/562 84/563 88/564 +g 5_14 +f 87/565 81/566 84/567 88/568 +g 5_15 +f 87/569 81/570 84/571 88/572 +g 5_16 +f 87/573 81/574 84/575 88/576 +g 6_1 +f 88/577 84/578 86/579 89/580 +g 6_2 +f 88/581 84/582 86/583 89/584 +g 6_3 +f 88/585 84/586 86/587 89/588 +g 6_4 +f 88/589 84/590 86/591 89/592 +g 6_5 +f 88/593 84/594 86/595 89/596 +g 6_6 +f 88/597 84/598 86/599 89/600 +g 6_7 +f 88/601 84/602 86/603 89/604 +g 6_8 +f 88/605 84/606 86/607 89/608 +g 6_9 +f 88/609 84/610 86/611 89/612 +g 6_10 +f 88/613 84/614 86/615 89/616 +g 6_11 +f 88/617 84/618 86/619 89/620 +g 6_12 +f 88/621 84/622 86/623 89/624 +g 6_13 +f 88/625 84/626 86/627 89/628 +g 6_14 +f 88/629 84/630 86/631 89/632 +g 6_15 +f 88/633 84/634 86/635 89/636 +g 6_16 +f 88/637 84/638 86/639 89/640 +g 7_1 +f 90/641 91/642 92/643 93/644 +g 7_2 +f 90/645 91/646 92/647 93/648 +g 7_3 +f 90/649 91/650 92/651 93/652 +g 7_4 +f 90/653 91/654 92/655 93/656 +g 7_5 +f 90/657 91/658 92/659 93/660 +g 7_6 +f 90/661 91/662 92/663 93/664 +g 7_7 +f 90/665 91/666 92/667 93/668 +g 7_8 +f 90/669 91/670 92/671 93/672 +g 7_9 +f 90/673 91/674 92/675 93/676 +g 7_10 +f 90/677 91/678 92/679 93/680 +g 7_11 +f 90/681 91/682 92/683 93/684 +g 7_12 +f 90/685 91/686 92/687 93/688 +g 7_13 +f 90/689 91/690 92/691 93/692 +g 7_14 +f 90/693 91/694 92/695 93/696 +g 7_15 +f 90/697 91/698 92/699 93/700 +g 7_16 +f 90/701 91/702 92/703 93/704 +g 8_1 +f 93/705 92/706 94/707 95/708 +g 8_2 +f 93/709 92/710 94/711 95/712 +g 8_3 +f 93/713 92/714 94/715 95/716 +g 8_4 +f 93/717 92/718 94/719 95/720 +g 8_5 +f 93/721 92/722 94/723 95/724 +g 8_6 +f 93/725 92/726 94/727 95/728 +g 8_7 +f 93/729 92/730 94/731 95/732 +g 8_8 +f 93/733 92/734 94/735 95/736 +g 8_9 +f 93/737 92/738 94/739 95/740 +g 8_10 +f 93/741 92/742 94/743 95/744 +g 8_11 +f 93/745 92/746 94/747 95/748 +g 8_12 +f 93/749 92/750 94/751 95/752 +g 8_13 +f 93/753 92/754 94/755 95/756 +g 8_14 +f 93/757 92/758 94/759 95/760 +g 8_15 +f 93/761 92/762 94/763 95/764 +g 8_16 +f 93/765 92/766 94/767 95/768 +g 9_1 +f 96/769 90/770 93/771 97/772 +g 9_2 +f 96/773 90/774 93/775 97/776 +g 9_3 +f 96/777 90/778 93/779 97/780 +g 9_4 +f 96/781 90/782 93/783 97/784 +g 9_5 +f 96/785 90/786 93/787 97/788 +g 9_6 +f 96/789 90/790 93/791 97/792 +g 9_7 +f 96/793 90/794 93/795 97/796 +g 9_8 +f 96/797 90/798 93/799 97/800 +g 9_9 +f 96/801 90/802 93/803 97/804 +g 9_10 +f 96/805 90/806 93/807 97/808 +g 9_11 +f 96/809 90/810 93/811 97/812 +g 9_12 +f 96/813 90/814 93/815 97/816 +g 9_13 +f 96/817 90/818 93/819 97/820 +g 9_14 +f 96/821 90/822 93/823 97/824 +g 9_15 +f 96/825 90/826 93/827 97/828 +g 9_16 +f 96/829 90/830 93/831 97/832 +g 10_1 +f 97/833 93/834 95/835 98/836 +g 10_2 +f 97/837 93/838 95/839 98/840 +g 10_3 +f 97/841 93/842 95/843 98/844 +g 10_4 +f 97/845 93/846 95/847 98/848 +g 10_5 +f 97/849 93/850 95/851 98/852 +g 10_6 +f 97/853 93/854 95/855 98/856 +g 10_7 +f 97/857 93/858 95/859 98/860 +g 10_8 +f 97/861 93/862 95/863 98/864 +g 10_9 +f 97/865 93/866 95/867 98/868 +g 10_10 +f 97/869 93/870 95/871 98/872 +g 10_11 +f 97/873 93/874 95/875 98/876 +g 10_12 +f 97/877 93/878 95/879 98/880 +g 10_13 +f 97/881 93/882 95/883 98/884 +g 10_14 +f 97/885 93/886 95/887 98/888 +g 10_15 +f 97/889 93/890 95/891 98/892 +g 10_16 +f 97/893 93/894 95/895 98/896 diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/0.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/0.png new file mode 100644 index 0000000..fe2a204 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/0.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/1.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/1.png new file mode 100644 index 0000000..bc0d0f8 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/1.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/10.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/10.png new file mode 100644 index 0000000..0a64e27 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/10.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/100.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/100.png new file mode 100644 index 0000000..36e55cb Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/100.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/101.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/101.png new file mode 100644 index 0000000..157ec5d Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/101.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/102.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/102.png new file mode 100644 index 0000000..afc84e6 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/102.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/103.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/103.png new file mode 100644 index 0000000..a719bec Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/103.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/104.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/104.png new file mode 100644 index 0000000..cbf2b13 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/104.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/105.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/105.png new file mode 100644 index 0000000..61f54d2 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/105.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/106.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/106.png new file mode 100644 index 0000000..738cd8f Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/106.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/107.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/107.png new file mode 100644 index 0000000..191ed91 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/107.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/108.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/108.png new file mode 100644 index 0000000..9cf8f88 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/108.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/109.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/109.png new file mode 100644 index 0000000..ac5052f Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/109.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/11.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/11.png new file mode 100644 index 0000000..0a64e27 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/11.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/110.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/110.png new file mode 100644 index 0000000..3e60b13 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/110.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/111.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/111.png new file mode 100644 index 0000000..c47fb9b Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/111.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/112.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/112.png new file mode 100644 index 0000000..4fc5fa1 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/112.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/113.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/113.png new file mode 100644 index 0000000..bdfebd9 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/113.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/114.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/114.png new file mode 100644 index 0000000..840367c Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/114.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/115.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/115.png new file mode 100644 index 0000000..d6f6226 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/115.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/116.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/116.png new file mode 100644 index 0000000..3323e36 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/116.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/117.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/117.png new file mode 100644 index 0000000..64f4848 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/117.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/118.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/118.png new file mode 100644 index 0000000..a4c0e69 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/118.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/119.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/119.png new file mode 100644 index 0000000..7505504 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/119.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/12.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/12.png new file mode 100644 index 0000000..0a64e27 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/12.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/120.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/120.png new file mode 100644 index 0000000..a47af43 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/120.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/121.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/121.png new file mode 100644 index 0000000..24b733c Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/121.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/122.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/122.png new file mode 100644 index 0000000..ccb0180 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/122.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/123.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/123.png new file mode 100644 index 0000000..974c59a Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/123.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/124.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/124.png new file mode 100644 index 0000000..c915265 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/124.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/125.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/125.png new file mode 100644 index 0000000..d2be1db Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/125.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/126.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/126.png new file mode 100644 index 0000000..a4eeb01 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/126.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/127.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/127.png new file mode 100644 index 0000000..42f50ac Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/127.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/128.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/128.png new file mode 100644 index 0000000..4a2e08e Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/128.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/129.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/129.png new file mode 100644 index 0000000..94caa30 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/129.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/13.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/13.png new file mode 100644 index 0000000..0a64e27 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/13.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/130.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/130.png new file mode 100644 index 0000000..cd272c0 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/130.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/131.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/131.png new file mode 100644 index 0000000..3279c8a Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/131.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/132.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/132.png new file mode 100644 index 0000000..e3b0e9a Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/132.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/133.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/133.png new file mode 100644 index 0000000..26e9ce9 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/133.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/134.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/134.png new file mode 100644 index 0000000..ecda82a Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/134.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/135.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/135.png new file mode 100644 index 0000000..93b73f5 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/135.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/136.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/136.png new file mode 100644 index 0000000..6e36f10 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/136.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/137.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/137.png new file mode 100644 index 0000000..e3588bc Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/137.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/138.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/138.png new file mode 100644 index 0000000..ad38200 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/138.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/139.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/139.png new file mode 100644 index 0000000..8767a26 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/139.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/14.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/14.png new file mode 100644 index 0000000..0a64e27 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/14.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/140.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/140.png new file mode 100644 index 0000000..8f8bfdf Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/140.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/141.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/141.png new file mode 100644 index 0000000..c9cbac8 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/141.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/142.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/142.png new file mode 100644 index 0000000..4d9dba5 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/142.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/143.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/143.png new file mode 100644 index 0000000..60caac1 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/143.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/144.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/144.png new file mode 100644 index 0000000..95af771 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/144.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/145.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/145.png new file mode 100644 index 0000000..fc0079c Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/145.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/146.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/146.png new file mode 100644 index 0000000..a65ac85 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/146.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/147.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/147.png new file mode 100644 index 0000000..0e9b010 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/147.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/148.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/148.png new file mode 100644 index 0000000..d8eaf39 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/148.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/149.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/149.png new file mode 100644 index 0000000..b314325 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/149.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/15.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/15.png new file mode 100644 index 0000000..0a64e27 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/15.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/150.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/150.png new file mode 100644 index 0000000..70c444d Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/150.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/151.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/151.png new file mode 100644 index 0000000..4ae9321 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/151.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/152.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/152.png new file mode 100644 index 0000000..88d7e67 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/152.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/153.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/153.png new file mode 100644 index 0000000..61bf0e3 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/153.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/154.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/154.png new file mode 100644 index 0000000..99aee2d Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/154.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/155.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/155.png new file mode 100644 index 0000000..5432583 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/155.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/156.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/156.png new file mode 100644 index 0000000..f137fda Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/156.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/157.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/157.png new file mode 100644 index 0000000..2104882 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/157.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/158.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/158.png new file mode 100644 index 0000000..0c3cf27 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/158.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/159.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/159.png new file mode 100644 index 0000000..31f0f6c Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/159.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/16.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/16.png new file mode 100644 index 0000000..d28c218 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/16.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/160.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/160.png new file mode 100644 index 0000000..45e953f Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/160.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/161.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/161.png new file mode 100644 index 0000000..ad564a7 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/161.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/162.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/162.png new file mode 100644 index 0000000..35d24db Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/162.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/163.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/163.png new file mode 100644 index 0000000..3e011d0 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/163.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/164.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/164.png new file mode 100644 index 0000000..5119ef9 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/164.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/165.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/165.png new file mode 100644 index 0000000..0aab7d5 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/165.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/166.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/166.png new file mode 100644 index 0000000..5d9d02e Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/166.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/167.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/167.png new file mode 100644 index 0000000..0156912 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/167.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/168.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/168.png new file mode 100644 index 0000000..45ee499 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/168.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/169.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/169.png new file mode 100644 index 0000000..07118c6 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/169.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/17.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/17.png new file mode 100644 index 0000000..04f15a5 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/17.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/170.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/170.png new file mode 100644 index 0000000..9868c88 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/170.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/171.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/171.png new file mode 100644 index 0000000..289c196 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/171.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/172.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/172.png new file mode 100644 index 0000000..9282b26 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/172.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/173.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/173.png new file mode 100644 index 0000000..91b45e7 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/173.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/174.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/174.png new file mode 100644 index 0000000..36517d9 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/174.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/175.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/175.png new file mode 100644 index 0000000..5b765ed Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/175.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/176.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/176.png new file mode 100644 index 0000000..3cd6e4b Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/176.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/177.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/177.png new file mode 100644 index 0000000..594a2ae Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/177.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/178.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/178.png new file mode 100644 index 0000000..cb38606 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/178.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/179.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/179.png new file mode 100644 index 0000000..dff812f Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/179.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/18.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/18.png new file mode 100644 index 0000000..cce38fc Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/18.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/180.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/180.png new file mode 100644 index 0000000..12e8316 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/180.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/181.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/181.png new file mode 100644 index 0000000..dc5678e Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/181.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/182.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/182.png new file mode 100644 index 0000000..58e44da Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/182.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/183.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/183.png new file mode 100644 index 0000000..abc518d Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/183.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/184.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/184.png new file mode 100644 index 0000000..7e96386 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/184.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/185.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/185.png new file mode 100644 index 0000000..6a18625 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/185.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/186.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/186.png new file mode 100644 index 0000000..62b928c Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/186.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/187.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/187.png new file mode 100644 index 0000000..0398f54 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/187.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/188.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/188.png new file mode 100644 index 0000000..4c78297 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/188.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/189.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/189.png new file mode 100644 index 0000000..4c9a658 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/189.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/19.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/19.png new file mode 100644 index 0000000..ec57e79 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/19.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/190.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/190.png new file mode 100644 index 0000000..e69b125 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/190.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/191.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/191.png new file mode 100644 index 0000000..cef7fd7 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/191.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/192.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/192.png new file mode 100644 index 0000000..7ee2151 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/192.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/193.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/193.png new file mode 100644 index 0000000..c54abc3 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/193.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/194.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/194.png new file mode 100644 index 0000000..6f2970a Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/194.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/195.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/195.png new file mode 100644 index 0000000..ae02ac2 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/195.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/196.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/196.png new file mode 100644 index 0000000..dd10834 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/196.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/197.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/197.png new file mode 100644 index 0000000..cc0c275 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/197.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/198.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/198.png new file mode 100644 index 0000000..d93a2f3 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/198.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/199.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/199.png new file mode 100644 index 0000000..2e34539 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/199.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/2.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/2.png new file mode 100644 index 0000000..c09114e Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/2.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/20.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/20.png new file mode 100644 index 0000000..aab11d2 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/20.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/200.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/200.png new file mode 100644 index 0000000..b22b103 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/200.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/201.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/201.png new file mode 100644 index 0000000..bc324e1 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/201.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/202.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/202.png new file mode 100644 index 0000000..cf0a98b Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/202.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/203.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/203.png new file mode 100644 index 0000000..266e63d Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/203.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/204.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/204.png new file mode 100644 index 0000000..f12bd72 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/204.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/205.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/205.png new file mode 100644 index 0000000..db0a818 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/205.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/206.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/206.png new file mode 100644 index 0000000..3df5b46 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/206.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/207.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/207.png new file mode 100644 index 0000000..29cea80 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/207.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/208.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/208.png new file mode 100644 index 0000000..0771a34 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/208.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/209.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/209.png new file mode 100644 index 0000000..1ae4664 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/209.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/21.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/21.png new file mode 100644 index 0000000..c28a5c7 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/21.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/210.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/210.png new file mode 100644 index 0000000..8df3604 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/210.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/211.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/211.png new file mode 100644 index 0000000..8998257 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/211.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/212.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/212.png new file mode 100644 index 0000000..fc5f810 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/212.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/213.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/213.png new file mode 100644 index 0000000..cf2ae88 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/213.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/214.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/214.png new file mode 100644 index 0000000..8df5343 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/214.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/215.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/215.png new file mode 100644 index 0000000..51fedf5 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/215.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/216.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/216.png new file mode 100644 index 0000000..1f05797 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/216.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/217.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/217.png new file mode 100644 index 0000000..a29e264 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/217.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/218.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/218.png new file mode 100644 index 0000000..d22505b Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/218.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/219.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/219.png new file mode 100644 index 0000000..4c2e00b Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/219.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/22.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/22.png new file mode 100644 index 0000000..8e1adfd Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/22.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/220.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/220.png new file mode 100644 index 0000000..a179c1a Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/220.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/221.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/221.png new file mode 100644 index 0000000..dc8a479 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/221.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/222.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/222.png new file mode 100644 index 0000000..bb22a2f Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/222.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/223.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/223.png new file mode 100644 index 0000000..8b29d0a Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/223.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/224.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/224.png new file mode 100644 index 0000000..818ae0b Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/224.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/225.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/225.png new file mode 100644 index 0000000..21b4e92 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/225.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/226.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/226.png new file mode 100644 index 0000000..20f6d30 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/226.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/227.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/227.png new file mode 100644 index 0000000..86cc987 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/227.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/228.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/228.png new file mode 100644 index 0000000..d6c2e64 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/228.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/229.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/229.png new file mode 100644 index 0000000..a2fd25f Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/229.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/23.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/23.png new file mode 100644 index 0000000..c56a33c Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/23.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/230.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/230.png new file mode 100644 index 0000000..0791c38 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/230.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/231.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/231.png new file mode 100644 index 0000000..3b49080 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/231.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/24.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/24.png new file mode 100644 index 0000000..9f2c470 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/24.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/25.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/25.png new file mode 100644 index 0000000..02dc2eb Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/25.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/26.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/26.png new file mode 100644 index 0000000..a391fcd Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/26.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/27.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/27.png new file mode 100644 index 0000000..98543da Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/27.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/28.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/28.png new file mode 100644 index 0000000..58c0a46 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/28.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/29.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/29.png new file mode 100644 index 0000000..7231929 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/29.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/3.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/3.png new file mode 100644 index 0000000..0da9245 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/3.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/30.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/30.png new file mode 100644 index 0000000..7947edd Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/30.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/31.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/31.png new file mode 100644 index 0000000..cf27d18 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/31.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/32.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/32.png new file mode 100644 index 0000000..3c7d80a Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/32.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/33.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/33.png new file mode 100644 index 0000000..be4a3e9 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/33.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/34.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/34.png new file mode 100644 index 0000000..83be4ad Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/34.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/35.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/35.png new file mode 100644 index 0000000..77ad85b Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/35.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/36.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/36.png new file mode 100644 index 0000000..99b5689 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/36.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/37.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/37.png new file mode 100644 index 0000000..d7899d4 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/37.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/38.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/38.png new file mode 100644 index 0000000..e2dd385 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/38.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/39.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/39.png new file mode 100644 index 0000000..e4a51a4 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/39.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/4.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/4.png new file mode 100644 index 0000000..84f1834 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/4.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/40.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/40.png new file mode 100644 index 0000000..c06dfaf Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/40.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/41.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/41.png new file mode 100644 index 0000000..af637bb Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/41.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/42.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/42.png new file mode 100644 index 0000000..7346e0c Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/42.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/43.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/43.png new file mode 100644 index 0000000..ecb844d Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/43.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/44.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/44.png new file mode 100644 index 0000000..904866b Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/44.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/45.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/45.png new file mode 100644 index 0000000..5c326be Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/45.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/46.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/46.png new file mode 100644 index 0000000..d64c447 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/46.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/47.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/47.png new file mode 100644 index 0000000..80f6fd9 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/47.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/48.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/48.png new file mode 100644 index 0000000..4001a2a Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/48.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/49.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/49.png new file mode 100644 index 0000000..37c0415 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/49.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/5.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/5.png new file mode 100644 index 0000000..2c7f0af Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/5.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/50.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/50.png new file mode 100644 index 0000000..3f241e5 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/50.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/51.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/51.png new file mode 100644 index 0000000..eeac6d4 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/51.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/52.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/52.png new file mode 100644 index 0000000..ac5b1f7 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/52.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/53.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/53.png new file mode 100644 index 0000000..d465c20 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/53.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/54.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/54.png new file mode 100644 index 0000000..be6abee Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/54.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/55.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/55.png new file mode 100644 index 0000000..6afc292 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/55.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/56.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/56.png new file mode 100644 index 0000000..8f9a3b0 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/56.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/57.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/57.png new file mode 100644 index 0000000..21a779c Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/57.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/58.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/58.png new file mode 100644 index 0000000..ba2cc4c Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/58.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/59.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/59.png new file mode 100644 index 0000000..73a3f0f Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/59.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/6.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/6.png new file mode 100644 index 0000000..502a9cf Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/6.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/60.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/60.png new file mode 100644 index 0000000..9a23306 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/60.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/61.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/61.png new file mode 100644 index 0000000..6e87eb6 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/61.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/62.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/62.png new file mode 100644 index 0000000..c71359c Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/62.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/63.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/63.png new file mode 100644 index 0000000..e533258 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/63.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/64.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/64.png new file mode 100644 index 0000000..c54c815 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/64.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/65.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/65.png new file mode 100644 index 0000000..f283512 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/65.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/66.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/66.png new file mode 100644 index 0000000..2937735 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/66.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/67.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/67.png new file mode 100644 index 0000000..fa6cb50 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/67.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/68.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/68.png new file mode 100644 index 0000000..0938d1a Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/68.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/69.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/69.png new file mode 100644 index 0000000..fd40d6e Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/69.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/7.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/7.png new file mode 100644 index 0000000..7d6bb29 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/7.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/70.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/70.png new file mode 100644 index 0000000..0a35e2b Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/70.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/71.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/71.png new file mode 100644 index 0000000..b4982a2 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/71.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/72.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/72.png new file mode 100644 index 0000000..a23dc6b Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/72.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/73.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/73.png new file mode 100644 index 0000000..0f6e838 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/73.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/74.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/74.png new file mode 100644 index 0000000..9788eb7 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/74.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/75.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/75.png new file mode 100644 index 0000000..5d4e8b4 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/75.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/76.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/76.png new file mode 100644 index 0000000..baca827 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/76.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/77.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/77.png new file mode 100644 index 0000000..22ce00a Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/77.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/78.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/78.png new file mode 100644 index 0000000..4191ee4 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/78.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/79.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/79.png new file mode 100644 index 0000000..44a034d Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/79.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/8.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/8.png new file mode 100644 index 0000000..be64909 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/8.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/80.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/80.png new file mode 100644 index 0000000..67ec91b Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/80.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/81.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/81.png new file mode 100644 index 0000000..47800fd Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/81.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/82.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/82.png new file mode 100644 index 0000000..ab76e28 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/82.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/83.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/83.png new file mode 100644 index 0000000..d9e952f Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/83.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/84.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/84.png new file mode 100644 index 0000000..23c22b8 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/84.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/85.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/85.png new file mode 100644 index 0000000..14a0165 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/85.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/86.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/86.png new file mode 100644 index 0000000..f1d5b50 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/86.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/87.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/87.png new file mode 100644 index 0000000..6c30d9b Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/87.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/88.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/88.png new file mode 100644 index 0000000..f5d76f9 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/88.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/89.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/89.png new file mode 100644 index 0000000..196dd5b Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/89.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/9.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/9.png new file mode 100644 index 0000000..71df443 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/9.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/90.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/90.png new file mode 100644 index 0000000..4dee950 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/90.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/91.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/91.png new file mode 100644 index 0000000..b37defb Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/91.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/92.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/92.png new file mode 100644 index 0000000..3a09662 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/92.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/93.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/93.png new file mode 100644 index 0000000..f48ca72 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/93.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/94.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/94.png new file mode 100644 index 0000000..7c6866a Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/94.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/95.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/95.png new file mode 100644 index 0000000..6ba0c79 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/95.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/96.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/96.png new file mode 100644 index 0000000..fd2a6d3 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/96.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/97.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/97.png new file mode 100644 index 0000000..b91a369 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/97.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/98.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/98.png new file mode 100644 index 0000000..107d598 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/98.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic1/99.png b/src/main/resources/assets/rplogic/textures/blocks/logic1/99.png new file mode 100644 index 0000000..3bb047d Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic1/99.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/0.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/0.png new file mode 100644 index 0000000..fe2a204 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/0.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/1.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/1.png new file mode 100644 index 0000000..e63a39e Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/1.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/10.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/10.png new file mode 100644 index 0000000..0a64e27 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/10.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/100.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/100.png new file mode 100644 index 0000000..ed83cb6 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/100.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/101.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/101.png new file mode 100644 index 0000000..0a4509a Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/101.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/102.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/102.png new file mode 100644 index 0000000..22703e9 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/102.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/103.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/103.png new file mode 100644 index 0000000..4ead638 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/103.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/104.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/104.png new file mode 100644 index 0000000..7a8683f Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/104.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/105.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/105.png new file mode 100644 index 0000000..6f5e63a Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/105.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/106.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/106.png new file mode 100644 index 0000000..8e74f9b Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/106.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/107.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/107.png new file mode 100644 index 0000000..e966d18 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/107.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/108.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/108.png new file mode 100644 index 0000000..8696a3d Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/108.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/109.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/109.png new file mode 100644 index 0000000..848d8f4 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/109.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/11.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/11.png new file mode 100644 index 0000000..0a64e27 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/11.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/110.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/110.png new file mode 100644 index 0000000..de2bd76 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/110.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/111.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/111.png new file mode 100644 index 0000000..18a0224 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/111.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/112.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/112.png new file mode 100644 index 0000000..32df1d4 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/112.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/113.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/113.png new file mode 100644 index 0000000..e3ec077 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/113.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/114.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/114.png new file mode 100644 index 0000000..ae95091 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/114.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/115.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/115.png new file mode 100644 index 0000000..2192e6f Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/115.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/116.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/116.png new file mode 100644 index 0000000..ec24eb4 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/116.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/117.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/117.png new file mode 100644 index 0000000..3f50862 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/117.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/118.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/118.png new file mode 100644 index 0000000..f137407 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/118.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/119.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/119.png new file mode 100644 index 0000000..0492d0b Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/119.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/12.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/12.png new file mode 100644 index 0000000..0a64e27 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/12.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/120.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/120.png new file mode 100644 index 0000000..ae505d0 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/120.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/121.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/121.png new file mode 100644 index 0000000..3b74f8e Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/121.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/122.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/122.png new file mode 100644 index 0000000..8fb091f Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/122.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/123.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/123.png new file mode 100644 index 0000000..28737a3 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/123.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/124.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/124.png new file mode 100644 index 0000000..d493d8d Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/124.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/125.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/125.png new file mode 100644 index 0000000..ab09986 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/125.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/126.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/126.png new file mode 100644 index 0000000..a7bb7b5 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/126.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/127.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/127.png new file mode 100644 index 0000000..2625c58 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/127.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/128.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/128.png new file mode 100644 index 0000000..a2103ee Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/128.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/129.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/129.png new file mode 100644 index 0000000..e9dc930 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/129.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/13.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/13.png new file mode 100644 index 0000000..0a64e27 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/13.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/130.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/130.png new file mode 100644 index 0000000..a0c8c22 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/130.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/131.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/131.png new file mode 100644 index 0000000..632928f Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/131.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/132.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/132.png new file mode 100644 index 0000000..517bc42 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/132.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/133.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/133.png new file mode 100644 index 0000000..6008729 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/133.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/134.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/134.png new file mode 100644 index 0000000..4f02fb8 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/134.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/135.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/135.png new file mode 100644 index 0000000..d1b48d0 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/135.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/136.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/136.png new file mode 100644 index 0000000..87e39d0 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/136.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/137.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/137.png new file mode 100644 index 0000000..62fc533 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/137.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/138.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/138.png new file mode 100644 index 0000000..d923a5c Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/138.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/139.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/139.png new file mode 100644 index 0000000..40c7b7b Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/139.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/14.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/14.png new file mode 100644 index 0000000..0a64e27 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/14.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/140.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/140.png new file mode 100644 index 0000000..af6a509 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/140.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/141.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/141.png new file mode 100644 index 0000000..ace619b Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/141.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/142.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/142.png new file mode 100644 index 0000000..e655dda Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/142.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/143.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/143.png new file mode 100644 index 0000000..5663074 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/143.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/144.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/144.png new file mode 100644 index 0000000..0fae885 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/144.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/145.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/145.png new file mode 100644 index 0000000..b67db94 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/145.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/146.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/146.png new file mode 100644 index 0000000..ebfedd5 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/146.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/147.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/147.png new file mode 100644 index 0000000..4c56872 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/147.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/148.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/148.png new file mode 100644 index 0000000..aea049a Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/148.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/149.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/149.png new file mode 100644 index 0000000..707cded Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/149.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/15.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/15.png new file mode 100644 index 0000000..0a64e27 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/15.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/150.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/150.png new file mode 100644 index 0000000..d28d53c Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/150.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/151.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/151.png new file mode 100644 index 0000000..3d541e9 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/151.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/152.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/152.png new file mode 100644 index 0000000..03e23b1 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/152.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/153.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/153.png new file mode 100644 index 0000000..cf4e947 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/153.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/154.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/154.png new file mode 100644 index 0000000..b4f5a23 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/154.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/155.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/155.png new file mode 100644 index 0000000..b7ee59a Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/155.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/156.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/156.png new file mode 100644 index 0000000..9f16696 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/156.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/157.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/157.png new file mode 100644 index 0000000..d539956 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/157.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/158.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/158.png new file mode 100644 index 0000000..f64f72c Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/158.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/159.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/159.png new file mode 100644 index 0000000..e2e7344 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/159.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/16.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/16.png new file mode 100644 index 0000000..490bf1f Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/16.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/160.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/160.png new file mode 100644 index 0000000..3e3ab1b Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/160.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/161.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/161.png new file mode 100644 index 0000000..5ec9ad6 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/161.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/162.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/162.png new file mode 100644 index 0000000..1f8df93 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/162.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/163.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/163.png new file mode 100644 index 0000000..dea53bd Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/163.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/164.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/164.png new file mode 100644 index 0000000..1441e5c Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/164.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/165.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/165.png new file mode 100644 index 0000000..d47f65c Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/165.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/166.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/166.png new file mode 100644 index 0000000..86ee9cf Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/166.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/167.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/167.png new file mode 100644 index 0000000..47fa23f Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/167.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/168.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/168.png new file mode 100644 index 0000000..5070ae0 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/168.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/169.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/169.png new file mode 100644 index 0000000..cbf1a4c Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/169.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/17.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/17.png new file mode 100644 index 0000000..540f982 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/17.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/170.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/170.png new file mode 100644 index 0000000..fb9edbc Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/170.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/171.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/171.png new file mode 100644 index 0000000..edd7e6a Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/171.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/172.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/172.png new file mode 100644 index 0000000..38fc52e Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/172.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/173.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/173.png new file mode 100644 index 0000000..777f96d Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/173.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/174.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/174.png new file mode 100644 index 0000000..86c5425 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/174.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/175.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/175.png new file mode 100644 index 0000000..41c3cdb Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/175.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/176.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/176.png new file mode 100644 index 0000000..fe89eb9 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/176.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/177.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/177.png new file mode 100644 index 0000000..ad49f60 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/177.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/178.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/178.png new file mode 100644 index 0000000..811001e Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/178.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/179.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/179.png new file mode 100644 index 0000000..53495ee Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/179.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/18.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/18.png new file mode 100644 index 0000000..886fa79 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/18.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/180.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/180.png new file mode 100644 index 0000000..bcfeb7d Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/180.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/181.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/181.png new file mode 100644 index 0000000..54a5bdd Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/181.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/182.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/182.png new file mode 100644 index 0000000..006bcc7 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/182.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/183.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/183.png new file mode 100644 index 0000000..925a0c0 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/183.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/184.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/184.png new file mode 100644 index 0000000..f010262 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/184.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/185.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/185.png new file mode 100644 index 0000000..fdc3369 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/185.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/186.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/186.png new file mode 100644 index 0000000..2988d2b Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/186.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/187.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/187.png new file mode 100644 index 0000000..254dd8c Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/187.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/188.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/188.png new file mode 100644 index 0000000..22933ca Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/188.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/189.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/189.png new file mode 100644 index 0000000..b4d3047 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/189.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/19.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/19.png new file mode 100644 index 0000000..1efb57f Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/19.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/190.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/190.png new file mode 100644 index 0000000..a715990 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/190.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/191.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/191.png new file mode 100644 index 0000000..c6fc23e Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/191.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/192.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/192.png new file mode 100644 index 0000000..70c9718 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/192.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/193.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/193.png new file mode 100644 index 0000000..cd70e6e Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/193.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/194.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/194.png new file mode 100644 index 0000000..fc4c164 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/194.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/195.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/195.png new file mode 100644 index 0000000..dfd9635 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/195.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/196.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/196.png new file mode 100644 index 0000000..f14fad2 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/196.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/197.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/197.png new file mode 100644 index 0000000..3d1bbe3 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/197.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/198.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/198.png new file mode 100644 index 0000000..4a48c5e Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/198.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/199.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/199.png new file mode 100644 index 0000000..81d45e6 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/199.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/2.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/2.png new file mode 100644 index 0000000..a35dccf Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/2.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/20.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/20.png new file mode 100644 index 0000000..d947b5f Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/20.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/200.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/200.png new file mode 100644 index 0000000..9065232 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/200.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/201.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/201.png new file mode 100644 index 0000000..5b55438 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/201.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/202.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/202.png new file mode 100644 index 0000000..a931cd4 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/202.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/203.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/203.png new file mode 100644 index 0000000..5445840 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/203.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/204.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/204.png new file mode 100644 index 0000000..bbca529 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/204.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/205.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/205.png new file mode 100644 index 0000000..9f886ab Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/205.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/206.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/206.png new file mode 100644 index 0000000..4fa6a85 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/206.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/207.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/207.png new file mode 100644 index 0000000..61d4038 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/207.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/208.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/208.png new file mode 100644 index 0000000..001015d Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/208.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/209.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/209.png new file mode 100644 index 0000000..98e325d Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/209.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/21.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/21.png new file mode 100644 index 0000000..cf92432 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/21.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/210.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/210.png new file mode 100644 index 0000000..ab66244 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/210.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/211.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/211.png new file mode 100644 index 0000000..88d7b37 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/211.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/212.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/212.png new file mode 100644 index 0000000..2025f38 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/212.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/213.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/213.png new file mode 100644 index 0000000..5ba23ed Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/213.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/214.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/214.png new file mode 100644 index 0000000..7419514 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/214.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/215.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/215.png new file mode 100644 index 0000000..fbe20c3 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/215.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/216.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/216.png new file mode 100644 index 0000000..7a7ce53 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/216.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/217.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/217.png new file mode 100644 index 0000000..9868b86 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/217.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/218.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/218.png new file mode 100644 index 0000000..3baf23f Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/218.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/219.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/219.png new file mode 100644 index 0000000..31c6933 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/219.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/22.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/22.png new file mode 100644 index 0000000..3222be5 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/22.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/220.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/220.png new file mode 100644 index 0000000..d555e1b Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/220.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/221.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/221.png new file mode 100644 index 0000000..58280c0 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/221.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/222.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/222.png new file mode 100644 index 0000000..4d323ed Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/222.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/223.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/223.png new file mode 100644 index 0000000..767dc06 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/223.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/224.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/224.png new file mode 100644 index 0000000..d51cf48 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/224.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/225.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/225.png new file mode 100644 index 0000000..017fb92 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/225.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/226.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/226.png new file mode 100644 index 0000000..02a42b1 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/226.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/227.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/227.png new file mode 100644 index 0000000..fb3b57a Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/227.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/228.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/228.png new file mode 100644 index 0000000..dfbb9d7 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/228.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/229.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/229.png new file mode 100644 index 0000000..2afa168 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/229.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/23.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/23.png new file mode 100644 index 0000000..0fc004a Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/23.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/230.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/230.png new file mode 100644 index 0000000..18ba861 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/230.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/231.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/231.png new file mode 100644 index 0000000..9d296ed Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/231.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/232.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/232.png new file mode 100644 index 0000000..cef0dca Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/232.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/233.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/233.png new file mode 100644 index 0000000..b7d0d00 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/233.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/234.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/234.png new file mode 100644 index 0000000..22f317f Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/234.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/235.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/235.png new file mode 100644 index 0000000..7e10fda Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/235.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/236.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/236.png new file mode 100644 index 0000000..c995399 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/236.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/237.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/237.png new file mode 100644 index 0000000..429352b Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/237.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/238.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/238.png new file mode 100644 index 0000000..d338ec9 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/238.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/239.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/239.png new file mode 100644 index 0000000..1117adf Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/239.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/24.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/24.png new file mode 100644 index 0000000..d2e0b0b Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/24.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/240.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/240.png new file mode 100644 index 0000000..a731eb4 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/240.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/241.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/241.png new file mode 100644 index 0000000..b331dac Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/241.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/242.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/242.png new file mode 100644 index 0000000..f71795c Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/242.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/243.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/243.png new file mode 100644 index 0000000..817e901 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/243.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/244.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/244.png new file mode 100644 index 0000000..fa97efa Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/244.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/245.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/245.png new file mode 100644 index 0000000..cfa849b Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/245.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/246.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/246.png new file mode 100644 index 0000000..736f2ee Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/246.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/247.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/247.png new file mode 100644 index 0000000..87031ad Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/247.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/248.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/248.png new file mode 100644 index 0000000..3aac18e Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/248.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/249.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/249.png new file mode 100644 index 0000000..bff5686 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/249.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/25.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/25.png new file mode 100644 index 0000000..4918545 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/25.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/250.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/250.png new file mode 100644 index 0000000..c046c66 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/250.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/251.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/251.png new file mode 100644 index 0000000..38c669c Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/251.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/252.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/252.png new file mode 100644 index 0000000..7b3d1d7 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/252.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/253.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/253.png new file mode 100644 index 0000000..2c8da61 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/253.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/254.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/254.png new file mode 100644 index 0000000..8d71000 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/254.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/255.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/255.png new file mode 100644 index 0000000..f6e95e1 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/255.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/26.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/26.png new file mode 100644 index 0000000..c7098f2 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/26.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/27.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/27.png new file mode 100644 index 0000000..8ea5b6c Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/27.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/28.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/28.png new file mode 100644 index 0000000..be9e227 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/28.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/29.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/29.png new file mode 100644 index 0000000..0d7179f Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/29.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/3.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/3.png new file mode 100644 index 0000000..3f2bf22 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/3.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/30.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/30.png new file mode 100644 index 0000000..9eb9a41 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/30.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/31.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/31.png new file mode 100644 index 0000000..9e55d97 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/31.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/32.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/32.png new file mode 100644 index 0000000..1505b30 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/32.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/33.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/33.png new file mode 100644 index 0000000..d54fdaf Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/33.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/34.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/34.png new file mode 100644 index 0000000..5919836 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/34.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/35.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/35.png new file mode 100644 index 0000000..1f49416 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/35.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/36.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/36.png new file mode 100644 index 0000000..672c596 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/36.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/37.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/37.png new file mode 100644 index 0000000..9f62911 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/37.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/38.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/38.png new file mode 100644 index 0000000..939c83f Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/38.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/39.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/39.png new file mode 100644 index 0000000..3217e8a Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/39.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/4.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/4.png new file mode 100644 index 0000000..ee0e135 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/4.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/40.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/40.png new file mode 100644 index 0000000..25526db Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/40.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/41.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/41.png new file mode 100644 index 0000000..83f6094 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/41.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/42.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/42.png new file mode 100644 index 0000000..ea08ca5 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/42.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/43.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/43.png new file mode 100644 index 0000000..9b5c5ff Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/43.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/44.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/44.png new file mode 100644 index 0000000..f8241fb Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/44.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/45.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/45.png new file mode 100644 index 0000000..ac87e98 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/45.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/46.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/46.png new file mode 100644 index 0000000..3dbdf68 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/46.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/47.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/47.png new file mode 100644 index 0000000..3c57b38 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/47.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/48.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/48.png new file mode 100644 index 0000000..c17c90d Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/48.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/49.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/49.png new file mode 100644 index 0000000..f39aea5 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/49.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/5.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/5.png new file mode 100644 index 0000000..259dd6d Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/5.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/50.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/50.png new file mode 100644 index 0000000..cf4b788 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/50.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/51.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/51.png new file mode 100644 index 0000000..7e9cf12 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/51.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/52.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/52.png new file mode 100644 index 0000000..c395980 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/52.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/53.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/53.png new file mode 100644 index 0000000..6c632c2 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/53.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/54.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/54.png new file mode 100644 index 0000000..0716471 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/54.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/55.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/55.png new file mode 100644 index 0000000..bf21ab6 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/55.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/56.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/56.png new file mode 100644 index 0000000..1a564df Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/56.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/57.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/57.png new file mode 100644 index 0000000..94968be Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/57.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/58.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/58.png new file mode 100644 index 0000000..41f506f Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/58.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/59.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/59.png new file mode 100644 index 0000000..e4f843b Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/59.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/6.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/6.png new file mode 100644 index 0000000..a79e562 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/6.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/60.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/60.png new file mode 100644 index 0000000..cb9d942 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/60.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/61.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/61.png new file mode 100644 index 0000000..17ac50d Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/61.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/62.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/62.png new file mode 100644 index 0000000..3e941f4 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/62.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/63.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/63.png new file mode 100644 index 0000000..27d1de3 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/63.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/64.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/64.png new file mode 100644 index 0000000..71a5985 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/64.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/65.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/65.png new file mode 100644 index 0000000..702b03e Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/65.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/66.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/66.png new file mode 100644 index 0000000..29e7c61 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/66.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/67.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/67.png new file mode 100644 index 0000000..658237a Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/67.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/68.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/68.png new file mode 100644 index 0000000..67f2a69 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/68.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/69.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/69.png new file mode 100644 index 0000000..f688fd3 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/69.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/7.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/7.png new file mode 100644 index 0000000..a79f008 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/7.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/70.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/70.png new file mode 100644 index 0000000..dc1dbd5 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/70.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/71.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/71.png new file mode 100644 index 0000000..178dfb0 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/71.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/72.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/72.png new file mode 100644 index 0000000..3797b96 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/72.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/73.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/73.png new file mode 100644 index 0000000..1731e1f Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/73.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/74.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/74.png new file mode 100644 index 0000000..7d9534d Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/74.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/75.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/75.png new file mode 100644 index 0000000..505987f Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/75.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/76.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/76.png new file mode 100644 index 0000000..aaca032 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/76.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/77.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/77.png new file mode 100644 index 0000000..082d8a2 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/77.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/78.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/78.png new file mode 100644 index 0000000..7d74b5a Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/78.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/79.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/79.png new file mode 100644 index 0000000..3f9ba7d Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/79.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/8.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/8.png new file mode 100644 index 0000000..0a64e27 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/8.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/80.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/80.png new file mode 100644 index 0000000..c909c0c Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/80.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/81.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/81.png new file mode 100644 index 0000000..d6c70c1 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/81.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/82.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/82.png new file mode 100644 index 0000000..cf04919 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/82.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/83.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/83.png new file mode 100644 index 0000000..030d564 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/83.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/84.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/84.png new file mode 100644 index 0000000..cad0142 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/84.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/85.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/85.png new file mode 100644 index 0000000..a9bd746 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/85.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/86.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/86.png new file mode 100644 index 0000000..3dd64bb Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/86.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/87.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/87.png new file mode 100644 index 0000000..4fd24dd Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/87.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/88.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/88.png new file mode 100644 index 0000000..8da7c7e Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/88.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/89.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/89.png new file mode 100644 index 0000000..0f5ddd6 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/89.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/9.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/9.png new file mode 100644 index 0000000..0a64e27 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/9.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/90.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/90.png new file mode 100644 index 0000000..5c58e22 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/90.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/91.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/91.png new file mode 100644 index 0000000..af9e849 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/91.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/92.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/92.png new file mode 100644 index 0000000..db483d5 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/92.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/93.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/93.png new file mode 100644 index 0000000..eb9a982 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/93.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/94.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/94.png new file mode 100644 index 0000000..d693498 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/94.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/95.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/95.png new file mode 100644 index 0000000..8c294a7 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/95.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/96.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/96.png new file mode 100644 index 0000000..68bc846 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/96.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/97.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/97.png new file mode 100644 index 0000000..a80f5b9 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/97.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/98.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/98.png new file mode 100644 index 0000000..8658213 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/98.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/logic2/99.png b/src/main/resources/assets/rplogic/textures/blocks/logic2/99.png new file mode 100644 index 0000000..db09d08 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/logic2/99.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/sensors/0.png b/src/main/resources/assets/rplogic/textures/blocks/sensors/0.png new file mode 100644 index 0000000..fe2a204 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/sensors/0.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/sensors/1.png b/src/main/resources/assets/rplogic/textures/blocks/sensors/1.png new file mode 100644 index 0000000..e27a02f Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/sensors/1.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/sensors/10.png b/src/main/resources/assets/rplogic/textures/blocks/sensors/10.png new file mode 100644 index 0000000..0a64e27 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/sensors/10.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/sensors/11.png b/src/main/resources/assets/rplogic/textures/blocks/sensors/11.png new file mode 100644 index 0000000..0a64e27 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/sensors/11.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/sensors/12.png b/src/main/resources/assets/rplogic/textures/blocks/sensors/12.png new file mode 100644 index 0000000..0a64e27 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/sensors/12.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/sensors/13.png b/src/main/resources/assets/rplogic/textures/blocks/sensors/13.png new file mode 100644 index 0000000..0a64e27 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/sensors/13.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/sensors/14.png b/src/main/resources/assets/rplogic/textures/blocks/sensors/14.png new file mode 100644 index 0000000..0a64e27 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/sensors/14.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/sensors/15.png b/src/main/resources/assets/rplogic/textures/blocks/sensors/15.png new file mode 100644 index 0000000..0a64e27 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/sensors/15.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/sensors/16.png b/src/main/resources/assets/rplogic/textures/blocks/sensors/16.png new file mode 100644 index 0000000..3590cad Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/sensors/16.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/sensors/17.png b/src/main/resources/assets/rplogic/textures/blocks/sensors/17.png new file mode 100644 index 0000000..1e8f0f3 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/sensors/17.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/sensors/18.png b/src/main/resources/assets/rplogic/textures/blocks/sensors/18.png new file mode 100644 index 0000000..dc4f59f Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/sensors/18.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/sensors/19.png b/src/main/resources/assets/rplogic/textures/blocks/sensors/19.png new file mode 100644 index 0000000..d7dc384 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/sensors/19.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/sensors/2.png b/src/main/resources/assets/rplogic/textures/blocks/sensors/2.png new file mode 100644 index 0000000..a05485c Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/sensors/2.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/sensors/20.png b/src/main/resources/assets/rplogic/textures/blocks/sensors/20.png new file mode 100644 index 0000000..229d4cc Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/sensors/20.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/sensors/21.png b/src/main/resources/assets/rplogic/textures/blocks/sensors/21.png new file mode 100644 index 0000000..dddddf4 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/sensors/21.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/sensors/22.png b/src/main/resources/assets/rplogic/textures/blocks/sensors/22.png new file mode 100644 index 0000000..681cbb6 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/sensors/22.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/sensors/3.png b/src/main/resources/assets/rplogic/textures/blocks/sensors/3.png new file mode 100644 index 0000000..0a64e27 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/sensors/3.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/sensors/4.png b/src/main/resources/assets/rplogic/textures/blocks/sensors/4.png new file mode 100644 index 0000000..0a64e27 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/sensors/4.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/sensors/5.png b/src/main/resources/assets/rplogic/textures/blocks/sensors/5.png new file mode 100644 index 0000000..0a64e27 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/sensors/5.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/sensors/6.png b/src/main/resources/assets/rplogic/textures/blocks/sensors/6.png new file mode 100644 index 0000000..0a64e27 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/sensors/6.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/sensors/7.png b/src/main/resources/assets/rplogic/textures/blocks/sensors/7.png new file mode 100644 index 0000000..0a64e27 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/sensors/7.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/sensors/8.png b/src/main/resources/assets/rplogic/textures/blocks/sensors/8.png new file mode 100644 index 0000000..0a64e27 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/sensors/8.png differ diff --git a/src/main/resources/assets/rplogic/textures/blocks/sensors/9.png b/src/main/resources/assets/rplogic/textures/blocks/sensors/9.png new file mode 100644 index 0000000..0a64e27 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/blocks/sensors/9.png differ diff --git a/src/main/resources/assets/rplogic/textures/gui/countergui.png b/src/main/resources/assets/rplogic/textures/gui/countergui.png new file mode 100644 index 0000000..8bfd907 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/gui/countergui.png differ diff --git a/src/main/resources/assets/rplogic/textures/gui/timersgui.png b/src/main/resources/assets/rplogic/textures/gui/timersgui.png new file mode 100644 index 0000000..c45ab88 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/gui/timersgui.png differ diff --git a/src/main/resources/assets/rplogic/textures/items/anode.png b/src/main/resources/assets/rplogic/textures/items/anode.png new file mode 100644 index 0000000..19b8b39 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/items/anode.png differ diff --git a/src/main/resources/assets/rplogic/textures/items/bundle.png b/src/main/resources/assets/rplogic/textures/items/bundle.png new file mode 100644 index 0000000..804c1f4 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/items/bundle.png differ diff --git a/src/main/resources/assets/rplogic/textures/items/cathode.png b/src/main/resources/assets/rplogic/textures/items/cathode.png new file mode 100644 index 0000000..663b68f Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/items/cathode.png differ diff --git a/src/main/resources/assets/rplogic/textures/items/chip.png b/src/main/resources/assets/rplogic/textures/items/chip.png new file mode 100644 index 0000000..bd0afa8 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/items/chip.png differ diff --git a/src/main/resources/assets/rplogic/textures/items/plate.png b/src/main/resources/assets/rplogic/textures/items/plate.png new file mode 100644 index 0000000..b6aa450 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/items/plate.png differ diff --git a/src/main/resources/assets/rplogic/textures/items/pointer.png b/src/main/resources/assets/rplogic/textures/items/pointer.png new file mode 100644 index 0000000..7e25601 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/items/pointer.png differ diff --git a/src/main/resources/assets/rplogic/textures/items/redWire.png b/src/main/resources/assets/rplogic/textures/items/redWire.png new file mode 100644 index 0000000..5de8eb5 Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/items/redWire.png differ diff --git a/src/main/resources/assets/rplogic/textures/items/tchip.png b/src/main/resources/assets/rplogic/textures/items/tchip.png new file mode 100644 index 0000000..0d4dbca Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/items/tchip.png differ diff --git a/src/main/resources/assets/rplogic/textures/items/wafer.png b/src/main/resources/assets/rplogic/textures/items/wafer.png new file mode 100644 index 0000000..b302bca Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/items/wafer.png differ diff --git a/src/main/resources/assets/rplogic/textures/items/wire.png b/src/main/resources/assets/rplogic/textures/items/wire.png new file mode 100644 index 0000000..d11dc8f Binary files /dev/null and b/src/main/resources/assets/rplogic/textures/items/wire.png differ diff --git a/src/main/resources/assets/rpmachine/lang/en_US.lang b/src/main/resources/assets/rpmachine/lang/en_US.lang new file mode 100644 index 0000000..0019eac --- /dev/null +++ b/src/main/resources/assets/rpmachine/lang/en_US.lang @@ -0,0 +1,70 @@ +itemGroup.RPMachines=RedPower Machinery + +achievement.rpBreaker.desc=Build a block breaker +achievement.rpBreaker=OM NOM NOM\! +achievement.rpDeploy.desc=Build a deployer +achievement.rpDeploy=Steve in a Box +achievement.rpFrames.desc=Build a Frame Motor +achievement.rpFrames=I Like to Move it, Move it. +achievement.rpIngotBlue.desc=Smelt a blue alloy ingot +achievement.rpIngotBlue=Now in Blueberry\! +achievement.rpPump.desc=Build a Pump +achievement.rpPump=I Drink Your Milkshake\! +achievement.rpTranspose.desc=Build a transposer +achievement.rpTranspose=Dual Cyclonic Action\! + +tile.rpdeploy.name=Deployer +tile.rpeject.name=Ejector +tile.rpfilter.name=Filter +tile.rpframe.name=Support Frame +tile.rpgrate.name=Grate +tile.rpibutton.name=Iron Button +tile.rpignite.name=Igniter +tile.rpitemdet.name=Item Detector +tile.rpkgen.name=Kinetic Generator +tile.rpmanager.name=Manager +tile.rpmotor.name=Frame Motor +tile.rpmtube.name=Magtube +tile.rppipe.name=Fluid Pipe +tile.rppump.name=Pump +tile.rpassemble.name=Assembler +tile.rpbafurnace.name=Blulectric Alloy Furnace +tile.rpbatbox.name=Battery Box +tile.rpbfurnace.name=Blulectric Furnace +tile.rpbreaker.name=Block Breaker +tile.rpbuffer.name=Buffer +tile.rpcharge.name=Charging Bench +tile.rpregulate.name=Regulator +tile.rprelay.name=Relay +tile.rpretriever.name=Retriever +tile.rprstube.name=Redstone Tube +tile.rprtframe.name=Redstone Tube Frame +tile.rprtube.name=Restriction Tube +tile.rpsolar.name=Solar Panel +tile.rpsorter.name=Sorting Machine +tile.rpsortron.name=Sortron +tile.rptframe.name=Tube Frame +tile.rpthermo.name=Thermopile +tile.rptransformer.name=Voltage Transformer +tile.rptranspose.name=Transposer +tile.rptube.name=Pneumatic Tube +tile.rpaccel.name=Accelerator + +item.btbattery.name=BT Battery +item.btmotor.name=Blulectric Motor +item.coppercoil.name=Copper Coil +item.finecopper.name=Fine Copper Wire +item.fineiron.name=Fine Iron Wire +item.voltmeter.name=Voltmeter +item.waferBlue.name=Blue-Doped Wafer +item.waferRed.name=Red-Doped Wafer +item.waferSilicon.name=Silicon Wafer +item.bouleSilicon.name=Silicon Boule +item.windmillWood.name=Wooden Windmill +item.windSailWood.name=Wooden Sail +item.windTurbineWood.name=Wooden Wind Turbine +item.woolcard.name=Wool Card +item.sonicDriver.name=Sonic Screwdriver +item.drawplateDiamond.name=Diamond Drawplate + +gui.windturbine=Wind Turbine \ No newline at end of file diff --git a/src/main/resources/assets/rpmachine/lang/ru_RU.lang b/src/main/resources/assets/rpmachine/lang/ru_RU.lang new file mode 100644 index 0000000..4836e3f --- /dev/null +++ b/src/main/resources/assets/rpmachine/lang/ru_RU.lang @@ -0,0 +1,70 @@ +itemGroup.RPMachines=RedPower - Оборудование + +achievement.rpBreaker.desc=Сделать разрушитель блоков +achievement.rpBreaker=АМ НЯМ НЯМ\! +achievement.rpDeploy.desc=Сделать установших +achievement.rpDeploy=Стив в коробке +achievement.rpFrames.desc=Сделать двигатель каркасов +achievement.rpFrames=Я люблю дигать, двигать. +achievement.rpIngotBlue.desc=Выплавить слиток синего сплава +achievement.rpIngotBlue=Теперь в чернике\! +achievement.rpPump.desc=Сделать помпу +achievement.rpPump=Я пью твой молочный коктейль\! +achievement.rpTranspose.desc=Сделать транспортировщик +achievement.rpTranspose=Двойное зацикливание\! + +tile.rpdeploy.name=Установщик +tile.rpeject.name=Выталкиватель +tile.rpfilter.name=Фильтр +tile.rpframe.name=Несущий каркас +tile.rpgrate.name=Колосник +tile.rpibutton.name=Железная кнопка +tile.rpignite.name=Поджигатель +tile.rpitemdet.name=Датчик предметов +tile.rpkgen.name=Кинетический генератор +tile.rpmanager.name=Менеджер +tile.rpmotor.name=Двигатель каркасов +tile.rpmtube.name=Скоростная труба +tile.rppipe.name=Труба для жидкостей +tile.rppump.name=Помпа +tile.rpassemble.name=Сборщик +tile.rpbafurnace.name=Блулектрическая плавильная печь +tile.rpbatbox.name=Аккумулятор +tile.rpbfurnace.name=Блулектрическая печь +tile.rpbreaker.name=Разрушитель блоков +tile.rpbuffer.name=Буфер +tile.rpcharge.name=Подзарядочный стол +tile.rpregulate.name=Регулятор +tile.rprelay.name=Реле +tile.rpretriever.name=Поисковик +tile.rprstube.name=Редстоун-труба +tile.rprtframe.name=Несущий каркас с редстоун-трубой +tile.rprtube.name=Ограничивающая труба +tile.rpsolar.name=Солнечная панель +tile.rpsorter.name=Сортировочная машина +tile.rpsortron.name=Сортирон +tile.rptframe.name=Несущий каркас с трубой +tile.rpthermo.name=Термоэлемент +tile.rptransformer.name=Трансформатор напряжения +tile.rptranspose.name=Транспортировщик +tile.rptube.name=Пневматическая труба +tile.rpaccel.name=Ускоритель + +item.btbattery.name=Батарейка +item.btmotor.name=Блутрический мотор +item.coppercoil.name=Медная катушка +item.finecopper.name=Высококачественный медный провод +item.fineiron.name=Высококачественный железный провод +item.voltmeter.name=Вольтметр +item.waferBlue.name=Синий чип +item.waferRed.name=Красный чип +item.waferSilicon.name=Кремниевый чип +item.bouleSilicon.name=Кремниевый монокристалл +item.windmillWood.name=Деревянная мельница +item.windSailWood.name=Деревянные паруса +item.windTurbineWood.name=Деревянная ветротурбина +item.woolcard.name=Чесалка +item.sonicDriver.name=Ультразвуковая отвертка +item.drawplateDiamond.name=Алмазная волока + +gui.windturbine=Ветротурбина \ No newline at end of file diff --git a/src/main/resources/assets/rpmachine/models/accel.obj b/src/main/resources/assets/rpmachine/models/accel.obj new file mode 100644 index 0000000..0b490a1 --- /dev/null +++ b/src/main/resources/assets/rpmachine/models/accel.obj @@ -0,0 +1,292 @@ +# 40 Vertices +v 0.625000 1.000000 0.000000 +v 0.625000 0.000000 0.000000 +v 0.625000 0.000000 1.000000 +v 0.625000 1.000000 1.000000 +v 0.375000 1.000000 1.000000 +v 0.375000 0.000000 1.000000 +v 0.375000 0.000000 0.000000 +v 0.375000 1.000000 0.000000 +v 1.000000 1.000000 0.625000 +v 1.000000 0.000000 0.625000 +v 0.000000 0.000000 0.625000 +v 0.000000 1.000000 0.625000 +v 0.000000 1.000000 0.375000 +v 0.000000 0.000000 0.375000 +v 1.000000 0.000000 0.375000 +v 1.000000 1.000000 0.375000 +v 1.000000 0.250000 1.000000 +v 0.000000 0.250000 1.000000 +v 0.000000 0.250000 0.000000 +v 1.000000 0.250000 0.000000 +v 1.000000 0.750000 0.000000 +v 0.000000 0.750000 0.000000 +v 0.000000 0.750000 1.000000 +v 1.000000 0.750000 1.000000 +v 0.750000 0.250000 0.250000 +v 0.750000 0.000000 0.250000 +v 0.250000 0.000000 0.250000 +v 0.250000 0.250000 0.250000 +v 0.250000 0.250000 0.750000 +v 0.250000 0.000000 0.750000 +v 0.750000 0.000000 0.750000 +v 0.750000 0.250000 0.750000 +v 0.750000 1.000000 0.250000 +v 0.750000 0.750000 0.250000 +v 0.250000 0.750000 0.250000 +v 0.250000 1.000000 0.250000 +v 0.250000 1.000000 0.750000 +v 0.250000 0.750000 0.750000 +v 0.750000 0.750000 0.750000 +v 0.750000 1.000000 0.750000 + +# 192 Texture Coordinates +vtc 0.250000 0.937500 0.600000 0.600000 0.600000 +vtc 0.250000 0.875000 0.600000 0.600000 0.600000 +vtc 0.312500 0.875000 0.600000 0.600000 0.600000 +vtc 0.312500 0.937500 0.600000 0.600000 0.600000 +vtc 0.250000 0.937500 0.600000 0.600000 0.600000 +vtc 0.250000 0.875000 0.600000 0.600000 0.600000 +vtc 0.312500 0.875000 0.600000 0.600000 0.600000 +vtc 0.312500 0.937500 0.600000 0.600000 0.600000 +vtc 0.250000 0.937500 0.800000 0.800000 0.800000 +vtc 0.250000 0.875000 0.800000 0.800000 0.800000 +vtc 0.312500 0.875000 0.800000 0.800000 0.800000 +vtc 0.312500 0.937500 0.800000 0.800000 0.800000 +vtc 0.250000 0.937500 0.800000 0.800000 0.800000 +vtc 0.250000 0.875000 0.800000 0.800000 0.800000 +vtc 0.312500 0.875000 0.800000 0.800000 0.800000 +vtc 0.312500 0.937500 0.800000 0.800000 0.800000 +vtc 0.000000 0.937500 1.000000 1.000000 1.000000 +vtc 0.000000 0.875000 1.000000 1.000000 1.000000 +vtc 0.062500 0.875000 1.000000 1.000000 1.000000 +vtc 0.062500 0.937500 1.000000 1.000000 1.000000 +vtc 0.000000 0.937500 1.000000 1.000000 1.000000 +vtc 0.000000 0.875000 1.000000 1.000000 1.000000 +vtc 0.062500 0.875000 1.000000 1.000000 1.000000 +vtc 0.062500 0.937500 1.000000 1.000000 1.000000 +vtc 0.140625 0.937500 0.800000 0.800000 0.800000 +vtc 0.171875 0.937500 0.800000 0.800000 0.800000 +vtc 0.171875 0.875000 0.800000 0.800000 0.800000 +vtc 0.140625 0.875000 0.800000 0.800000 0.800000 +vtc 0.140625 0.937500 0.800000 0.800000 0.800000 +vtc 0.171875 0.937500 0.800000 0.800000 0.800000 +vtc 0.171875 0.875000 0.800000 0.800000 0.800000 +vtc 0.140625 0.875000 0.800000 0.800000 0.800000 +vtc 0.140625 0.937500 0.600000 0.600000 0.600000 +vtc 0.171875 0.937500 0.600000 0.600000 0.600000 +vtc 0.171875 0.875000 0.600000 0.600000 0.600000 +vtc 0.140625 0.875000 0.600000 0.600000 0.600000 +vtc 0.140625 0.937500 0.600000 0.600000 0.600000 +vtc 0.171875 0.937500 0.600000 0.600000 0.600000 +vtc 0.171875 0.875000 0.600000 0.600000 0.600000 +vtc 0.140625 0.875000 0.600000 0.600000 0.600000 +vtc 0.062500 0.937500 1.000000 1.000000 1.000000 +vtc 0.062500 0.875000 1.000000 1.000000 1.000000 +vtc 0.125000 0.875000 1.000000 1.000000 1.000000 +vtc 0.125000 0.937500 1.000000 1.000000 1.000000 +vtc 0.062500 0.937500 1.000000 1.000000 1.000000 +vtc 0.062500 0.875000 1.000000 1.000000 1.000000 +vtc 0.125000 0.875000 1.000000 1.000000 1.000000 +vtc 0.125000 0.937500 1.000000 1.000000 1.000000 +vtc 0.203125 0.937500 1.000000 1.000000 1.000000 +vtc 0.234375 0.937500 1.000000 1.000000 1.000000 +vtc 0.234375 0.875000 1.000000 1.000000 1.000000 +vtc 0.203125 0.875000 1.000000 1.000000 1.000000 +vtc 0.203125 0.937500 1.000000 1.000000 1.000000 +vtc 0.234375 0.937500 1.000000 1.000000 1.000000 +vtc 0.234375 0.875000 1.000000 1.000000 1.000000 +vtc 0.203125 0.875000 1.000000 1.000000 1.000000 +vtc 0.203125 0.937500 1.000000 1.000000 1.000000 +vtc 0.234375 0.937500 1.000000 1.000000 1.000000 +vtc 0.234375 0.875000 1.000000 1.000000 1.000000 +vtc 0.203125 0.875000 1.000000 1.000000 1.000000 +vtc 0.203125 0.937500 1.000000 1.000000 1.000000 +vtc 0.234375 0.937500 1.000000 1.000000 1.000000 +vtc 0.234375 0.875000 1.000000 1.000000 1.000000 +vtc 0.203125 0.875000 1.000000 1.000000 1.000000 +vtc 0.328125 0.890625 0.800000 0.800000 0.800000 +vtc 0.328125 0.875000 0.800000 0.800000 0.800000 +vtc 0.359375 0.875000 0.800000 0.800000 0.800000 +vtc 0.359375 0.890625 0.800000 0.800000 0.800000 +vtc 0.328125 0.890625 0.800000 0.800000 0.800000 +vtc 0.328125 0.875000 0.800000 0.800000 0.800000 +vtc 0.359375 0.875000 0.800000 0.800000 0.800000 +vtc 0.359375 0.890625 0.800000 0.800000 0.800000 +vtc 0.328125 0.890625 0.600000 0.600000 0.600000 +vtc 0.328125 0.875000 0.600000 0.600000 0.600000 +vtc 0.359375 0.875000 0.600000 0.600000 0.600000 +vtc 0.359375 0.890625 0.600000 0.600000 0.600000 +vtc 0.328125 0.890625 0.600000 0.600000 0.600000 +vtc 0.328125 0.875000 0.600000 0.600000 0.600000 +vtc 0.359375 0.875000 0.600000 0.600000 0.600000 +vtc 0.359375 0.890625 0.600000 0.600000 0.600000 +vtc 0.359375 0.875000 0.800000 0.800000 0.800000 +vtc 0.359375 0.890625 0.800000 0.800000 0.800000 +vtc 0.328125 0.890625 0.800000 0.800000 0.800000 +vtc 0.328125 0.875000 0.800000 0.800000 0.800000 +vtc 0.359375 0.875000 0.800000 0.800000 0.800000 +vtc 0.359375 0.890625 0.800000 0.800000 0.800000 +vtc 0.328125 0.890625 0.800000 0.800000 0.800000 +vtc 0.328125 0.875000 0.800000 0.800000 0.800000 +vtc 0.359375 0.875000 0.600000 0.600000 0.600000 +vtc 0.359375 0.890625 0.600000 0.600000 0.600000 +vtc 0.328125 0.890625 0.600000 0.600000 0.600000 +vtc 0.328125 0.875000 0.600000 0.600000 0.600000 +vtc 0.359375 0.875000 0.600000 0.600000 0.600000 +vtc 0.359375 0.890625 0.600000 0.600000 0.600000 +vtc 0.328125 0.890625 0.600000 0.600000 0.600000 +vtc 0.328125 0.875000 0.600000 0.600000 0.600000 +vtc 0.015625 0.703125 0.800000 0.800000 0.800000 +vtc 0.015625 0.687500 0.800000 0.800000 0.800000 +vtc 0.046875 0.687500 0.800000 0.800000 0.800000 +vtc 0.046875 0.703125 0.800000 0.800000 0.800000 +vtc 0.015625 0.703125 0.800000 0.800000 0.800000 +vtc 0.015625 0.687500 0.800000 0.800000 0.800000 +vtc 0.046875 0.687500 0.800000 0.800000 0.800000 +vtc 0.046875 0.703125 0.800000 0.800000 0.800000 +vtc 0.015625 0.703125 0.600000 0.600000 0.600000 +vtc 0.015625 0.687500 0.600000 0.600000 0.600000 +vtc 0.046875 0.687500 0.600000 0.600000 0.600000 +vtc 0.046875 0.703125 0.600000 0.600000 0.600000 +vtc 0.015625 0.703125 0.600000 0.600000 0.600000 +vtc 0.015625 0.687500 0.600000 0.600000 0.600000 +vtc 0.046875 0.687500 0.600000 0.600000 0.600000 +vtc 0.046875 0.703125 0.600000 0.600000 0.600000 +vtc 0.046875 0.687500 0.800000 0.800000 0.800000 +vtc 0.046875 0.703125 0.800000 0.800000 0.800000 +vtc 0.015625 0.703125 0.800000 0.800000 0.800000 +vtc 0.015625 0.687500 0.800000 0.800000 0.800000 +vtc 0.046875 0.687500 0.800000 0.800000 0.800000 +vtc 0.046875 0.703125 0.800000 0.800000 0.800000 +vtc 0.015625 0.703125 0.800000 0.800000 0.800000 +vtc 0.015625 0.687500 0.800000 0.800000 0.800000 +vtc 0.046875 0.687500 0.600000 0.600000 0.600000 +vtc 0.046875 0.703125 0.600000 0.600000 0.600000 +vtc 0.015625 0.703125 0.600000 0.600000 0.600000 +vtc 0.015625 0.687500 0.600000 0.600000 0.600000 +vtc 0.046875 0.687500 0.600000 0.600000 0.600000 +vtc 0.046875 0.703125 0.600000 0.600000 0.600000 +vtc 0.015625 0.703125 0.600000 0.600000 0.600000 +vtc 0.015625 0.687500 0.600000 0.600000 0.600000 +vtc 0.328125 0.937500 0.800000 0.800000 0.800000 +vtc 0.328125 0.921875 0.800000 0.800000 0.800000 +vtc 0.359375 0.921875 0.800000 0.800000 0.800000 +vtc 0.359375 0.937500 0.800000 0.800000 0.800000 +vtc 0.328125 0.937500 0.800000 0.800000 0.800000 +vtc 0.328125 0.921875 0.800000 0.800000 0.800000 +vtc 0.359375 0.921875 0.800000 0.800000 0.800000 +vtc 0.359375 0.937500 0.800000 0.800000 0.800000 +vtc 0.328125 0.937500 0.600000 0.600000 0.600000 +vtc 0.328125 0.921875 0.600000 0.600000 0.600000 +vtc 0.359375 0.921875 0.600000 0.600000 0.600000 +vtc 0.359375 0.937500 0.600000 0.600000 0.600000 +vtc 0.328125 0.937500 0.600000 0.600000 0.600000 +vtc 0.328125 0.921875 0.600000 0.600000 0.600000 +vtc 0.359375 0.921875 0.600000 0.600000 0.600000 +vtc 0.359375 0.937500 0.600000 0.600000 0.600000 +vtc 0.359375 0.921875 0.800000 0.800000 0.800000 +vtc 0.359375 0.937500 0.800000 0.800000 0.800000 +vtc 0.328125 0.937500 0.800000 0.800000 0.800000 +vtc 0.328125 0.921875 0.800000 0.800000 0.800000 +vtc 0.359375 0.921875 0.800000 0.800000 0.800000 +vtc 0.359375 0.937500 0.800000 0.800000 0.800000 +vtc 0.328125 0.937500 0.800000 0.800000 0.800000 +vtc 0.328125 0.921875 0.800000 0.800000 0.800000 +vtc 0.359375 0.921875 0.600000 0.600000 0.600000 +vtc 0.359375 0.937500 0.600000 0.600000 0.600000 +vtc 0.328125 0.937500 0.600000 0.600000 0.600000 +vtc 0.328125 0.921875 0.600000 0.600000 0.600000 +vtc 0.359375 0.921875 0.600000 0.600000 0.600000 +vtc 0.359375 0.937500 0.600000 0.600000 0.600000 +vtc 0.328125 0.937500 0.600000 0.600000 0.600000 +vtc 0.328125 0.921875 0.600000 0.600000 0.600000 +vtc 0.015625 0.750000 0.800000 0.800000 0.800000 +vtc 0.015625 0.734375 0.800000 0.800000 0.800000 +vtc 0.046875 0.734375 0.800000 0.800000 0.800000 +vtc 0.046875 0.750000 0.800000 0.800000 0.800000 +vtc 0.015625 0.750000 0.800000 0.800000 0.800000 +vtc 0.015625 0.734375 0.800000 0.800000 0.800000 +vtc 0.046875 0.734375 0.800000 0.800000 0.800000 +vtc 0.046875 0.750000 0.800000 0.800000 0.800000 +vtc 0.015625 0.750000 0.600000 0.600000 0.600000 +vtc 0.015625 0.734375 0.600000 0.600000 0.600000 +vtc 0.046875 0.734375 0.600000 0.600000 0.600000 +vtc 0.046875 0.750000 0.600000 0.600000 0.600000 +vtc 0.015625 0.750000 0.600000 0.600000 0.600000 +vtc 0.015625 0.734375 0.600000 0.600000 0.600000 +vtc 0.046875 0.734375 0.600000 0.600000 0.600000 +vtc 0.046875 0.750000 0.600000 0.600000 0.600000 +vtc 0.046875 0.734375 0.800000 0.800000 0.800000 +vtc 0.046875 0.750000 0.800000 0.800000 0.800000 +vtc 0.015625 0.750000 0.800000 0.800000 0.800000 +vtc 0.015625 0.734375 0.800000 0.800000 0.800000 +vtc 0.046875 0.734375 0.800000 0.800000 0.800000 +vtc 0.046875 0.750000 0.800000 0.800000 0.800000 +vtc 0.015625 0.750000 0.800000 0.800000 0.800000 +vtc 0.015625 0.734375 0.800000 0.800000 0.800000 +vtc 0.046875 0.734375 0.600000 0.600000 0.600000 +vtc 0.046875 0.750000 0.600000 0.600000 0.600000 +vtc 0.015625 0.750000 0.600000 0.600000 0.600000 +vtc 0.015625 0.734375 0.600000 0.600000 0.600000 +vtc 0.046875 0.734375 0.600000 0.600000 0.600000 +vtc 0.046875 0.750000 0.600000 0.600000 0.600000 +vtc 0.015625 0.750000 0.600000 0.600000 0.600000 +vtc 0.015625 0.734375 0.600000 0.600000 0.600000 + +# 4 Groups +g 0 +f 1/1 2/2 3/3 4/4 +f 5/5 6/6 7/7 8/8 +f 9/9 10/10 11/11 12/12 +f 13/13 14/14 15/15 16/16 +g 1_1 +f 17/17 18/18 19/19 20/20 +f 21/21 22/22 23/23 24/24 +f 21/25 20/26 19/27 22/28 +f 23/29 18/30 17/31 24/32 +f 22/33 19/34 18/35 23/36 +f 24/37 17/38 20/39 21/40 +g 1_2 +f 17/41 18/42 19/43 20/44 +f 21/45 22/46 23/47 24/48 +f 21/49 20/50 19/51 22/52 +f 23/53 18/54 17/55 24/56 +f 22/57 19/58 18/59 23/60 +f 24/61 17/62 20/63 21/64 +g 2_1 +f 25/65 26/66 27/67 28/68 +f 29/69 30/70 31/71 32/72 +f 28/73 27/74 30/75 29/76 +f 32/77 31/78 26/79 25/80 +f 30/81 29/82 32/83 31/84 +f 26/85 25/86 28/87 27/88 +f 31/89 32/90 25/91 26/92 +f 27/93 28/94 29/95 30/96 +g 2_2 +f 25/97 26/98 27/99 28/100 +f 29/101 30/102 31/103 32/104 +f 28/105 27/106 30/107 29/108 +f 32/109 31/110 26/111 25/112 +f 30/113 29/114 32/115 31/116 +f 26/117 25/118 28/119 27/120 +f 31/121 32/122 25/123 26/124 +f 27/125 28/126 29/127 30/128 +g 3_1 +f 33/129 34/130 35/131 36/132 +f 37/133 38/134 39/135 40/136 +f 36/137 35/138 38/139 37/140 +f 40/141 39/142 34/143 33/144 +f 38/145 37/146 40/147 39/148 +f 34/149 33/150 36/151 35/152 +f 39/153 40/154 33/155 34/156 +f 35/157 36/158 37/159 38/160 +g 3_2 +f 33/161 34/162 35/163 36/164 +f 37/165 38/166 39/167 40/168 +f 36/169 35/170 38/171 37/172 +f 40/173 39/174 34/175 33/176 +f 38/177 37/178 40/179 39/180 +f 34/181 33/182 36/183 35/184 +f 39/185 40/186 33/187 34/188 +f 35/189 36/190 37/191 38/192 diff --git a/src/main/resources/assets/rpmachine/models/machine1.png b/src/main/resources/assets/rpmachine/models/machine1.png new file mode 100644 index 0000000..d69e2ac Binary files /dev/null and b/src/main/resources/assets/rpmachine/models/machine1.png differ diff --git a/src/main/resources/assets/rpmachine/models/machine2.png b/src/main/resources/assets/rpmachine/models/machine2.png new file mode 100644 index 0000000..318317e Binary files /dev/null and b/src/main/resources/assets/rpmachine/models/machine2.png differ diff --git a/src/main/resources/assets/rpmachine/models/pump1.obj b/src/main/resources/assets/rpmachine/models/pump1.obj new file mode 100644 index 0000000..dcb92e0 --- /dev/null +++ b/src/main/resources/assets/rpmachine/models/pump1.obj @@ -0,0 +1,170 @@ +# 36 Vertices +v 1.000000 0.250000 0.000000 +v 0.000000 0.250000 0.000000 +v 0.000000 0.250000 1.000000 +v 1.000000 0.250000 1.000000 +v 0.875000 1.000000 0.000000 +v 0.875000 0.000000 0.000000 +v 0.875000 0.000000 1.000000 +v 0.875000 1.000000 1.000000 +v 0.375000 1.000000 1.000000 +v 0.375000 0.000000 1.000000 +v 0.375000 0.000000 0.000000 +v 0.375000 1.000000 0.000000 +v 1.000000 0.500000 1.000000 +v 0.000000 0.500000 1.000000 +v 0.000000 0.500000 0.000000 +v 1.000000 0.500000 0.000000 +v 1.000000 0.750000 0.000000 +v 0.000000 0.750000 0.000000 +v 0.000000 0.750000 1.000000 +v 1.000000 0.750000 1.000000 +v 1.000000 1.125000 0.375000 +v 1.000000 0.125000 0.375000 +v 0.000000 0.125000 0.375000 +v 0.000000 1.125000 0.375000 +v 0.000000 1.125000 0.625000 +v 0.000000 0.125000 0.625000 +v 1.000000 0.125000 0.625000 +v 1.000000 1.125000 0.625000 +v 1.000000 0.000000 1.000000 +v 0.000000 0.000000 1.000000 +v 0.000000 0.000000 0.000000 +v 1.000000 0.000000 0.000000 +v 1.000000 1.000000 0.000000 +v 0.000000 1.000000 0.000000 +v 0.000000 1.000000 1.000000 +v 1.000000 1.000000 1.000000 + +# 100 Texture Coordinates +vtc 0.437500 0.875000 1.000000 1.000000 1.000000 +vtc 0.437500 0.812500 1.000000 1.000000 1.000000 +vtc 0.500000 0.812500 1.000000 1.000000 1.000000 +vtc 0.500000 0.875000 1.000000 1.000000 1.000000 +vtc 0.312500 0.875000 0.600000 0.600000 0.600000 +vtc 0.312500 0.812500 0.600000 0.600000 0.600000 +vtc 0.375000 0.812500 0.600000 0.600000 0.600000 +vtc 0.375000 0.875000 0.600000 0.600000 0.600000 +vtc 0.312500 0.875000 0.600000 0.600000 0.600000 +vtc 0.312500 0.812500 0.600000 0.600000 0.600000 +vtc 0.375000 0.812500 0.600000 0.600000 0.600000 +vtc 0.375000 0.875000 0.600000 0.600000 0.600000 +vtc 0.500000 0.875000 0.500000 0.500000 0.500000 +vtc 0.500000 0.812500 0.500000 0.500000 0.500000 +vtc 0.562500 0.812500 0.500000 0.500000 0.500000 +vtc 0.562500 0.875000 0.500000 0.500000 0.500000 +vtc 0.500000 0.875000 1.000000 1.000000 1.000000 +vtc 0.500000 0.812500 1.000000 1.000000 1.000000 +vtc 0.562500 0.812500 1.000000 1.000000 1.000000 +vtc 0.562500 0.875000 1.000000 1.000000 1.000000 +vtc 0.500000 0.875000 0.800000 0.800000 0.800000 +vtc 0.562500 0.875000 0.800000 0.800000 0.800000 +vtc 0.562500 0.812500 0.800000 0.800000 0.800000 +vtc 0.500000 0.812500 0.800000 0.800000 0.800000 +vtc 0.500000 0.812500 0.800000 0.800000 0.800000 +vtc 0.562500 0.812500 0.800000 0.800000 0.800000 +vtc 0.562500 0.875000 0.800000 0.800000 0.800000 +vtc 0.500000 0.875000 0.800000 0.800000 0.800000 +vtc 0.375000 0.437500 0.500000 0.500000 0.500000 +vtc 0.375000 0.375000 0.500000 0.500000 0.500000 +vtc 0.437500 0.375000 0.500000 0.500000 0.500000 +vtc 0.437500 0.437500 0.500000 0.500000 0.500000 +vtc 0.375000 0.875000 1.000000 1.000000 1.000000 +vtc 0.375000 0.812500 1.000000 1.000000 1.000000 +vtc 0.437500 0.812500 1.000000 1.000000 1.000000 +vtc 0.437500 0.875000 1.000000 1.000000 1.000000 +vtc 0.187500 0.875000 0.800000 0.800000 0.800000 +vtc 0.187500 0.812500 0.800000 0.800000 0.800000 +vtc 0.125000 0.812500 0.800000 0.800000 0.800000 +vtc 0.125000 0.875000 0.800000 0.800000 0.800000 +vtc 0.125000 0.875000 0.800000 0.800000 0.800000 +vtc 0.125000 0.812500 0.800000 0.800000 0.800000 +vtc 0.187500 0.812500 0.800000 0.800000 0.800000 +vtc 0.187500 0.875000 0.800000 0.800000 0.800000 +vtc 0.000000 0.875000 0.600000 0.600000 0.600000 +vtc 0.000000 0.812500 0.600000 0.600000 0.600000 +vtc 0.062500 0.812500 0.600000 0.600000 0.600000 +vtc 0.062500 0.875000 0.600000 0.600000 0.600000 +vtc 0.062500 0.875000 0.600000 0.600000 0.600000 +vtc 0.062500 0.812500 0.600000 0.600000 0.600000 +vtc 0.125000 0.812500 0.600000 0.600000 0.600000 +vtc 0.125000 0.875000 0.600000 0.600000 0.600000 +vtc 0.375000 0.437500 0.500000 0.500000 0.500000 +vtc 0.375000 0.375000 0.500000 0.500000 0.500000 +vtc 0.437500 0.375000 0.500000 0.500000 0.500000 +vtc 0.437500 0.437500 0.500000 0.500000 0.500000 +vtc 0.375000 0.875000 1.000000 1.000000 1.000000 +vtc 0.375000 0.812500 1.000000 1.000000 1.000000 +vtc 0.437500 0.812500 1.000000 1.000000 1.000000 +vtc 0.437500 0.875000 1.000000 1.000000 1.000000 +vtc 0.250000 0.875000 0.800000 0.800000 0.800000 +vtc 0.250000 0.812500 0.800000 0.800000 0.800000 +vtc 0.187500 0.812500 0.800000 0.800000 0.800000 +vtc 0.187500 0.875000 0.800000 0.800000 0.800000 +vtc 0.187500 0.875000 0.800000 0.800000 0.800000 +vtc 0.187500 0.812500 0.800000 0.800000 0.800000 +vtc 0.250000 0.812500 0.800000 0.800000 0.800000 +vtc 0.250000 0.875000 0.800000 0.800000 0.800000 +vtc 0.000000 0.875000 0.600000 0.600000 0.600000 +vtc 0.000000 0.812500 0.600000 0.600000 0.600000 +vtc 0.062500 0.812500 0.600000 0.600000 0.600000 +vtc 0.062500 0.875000 0.600000 0.600000 0.600000 +vtc 0.062500 0.875000 0.600000 0.600000 0.600000 +vtc 0.062500 0.812500 0.600000 0.600000 0.600000 +vtc 0.125000 0.812500 0.600000 0.600000 0.600000 +vtc 0.125000 0.875000 0.600000 0.600000 0.600000 +vtc 0.375000 0.437500 0.500000 0.500000 0.500000 +vtc 0.375000 0.375000 0.500000 0.500000 0.500000 +vtc 0.437500 0.375000 0.500000 0.500000 0.500000 +vtc 0.437500 0.437500 0.500000 0.500000 0.500000 +vtc 0.375000 0.875000 1.000000 1.000000 1.000000 +vtc 0.375000 0.812500 1.000000 1.000000 1.000000 +vtc 0.437500 0.812500 1.000000 1.000000 1.000000 +vtc 0.437500 0.875000 1.000000 1.000000 1.000000 +vtc 0.312500 0.875000 0.800000 0.800000 0.800000 +vtc 0.312500 0.812500 0.800000 0.800000 0.800000 +vtc 0.250000 0.812500 0.800000 0.800000 0.800000 +vtc 0.250000 0.875000 0.800000 0.800000 0.800000 +vtc 0.250000 0.875000 0.800000 0.800000 0.800000 +vtc 0.250000 0.812500 0.800000 0.800000 0.800000 +vtc 0.312500 0.812500 0.800000 0.800000 0.800000 +vtc 0.312500 0.875000 0.800000 0.800000 0.800000 +vtc 0.000000 0.875000 0.600000 0.600000 0.600000 +vtc 0.000000 0.812500 0.600000 0.600000 0.600000 +vtc 0.062500 0.812500 0.600000 0.600000 0.600000 +vtc 0.062500 0.875000 0.600000 0.600000 0.600000 +vtc 0.062500 0.875000 0.600000 0.600000 0.600000 +vtc 0.062500 0.812500 0.600000 0.600000 0.600000 +vtc 0.125000 0.812500 0.600000 0.600000 0.600000 +vtc 0.125000 0.875000 0.600000 0.600000 0.600000 + +# 2 Groups +g 0 +f 1/1 2/2 3/3 4/4 +f 5/5 6/6 7/7 8/8 +f 9/9 10/10 11/11 12/12 +f 13/13 14/14 15/15 16/16 +f 17/17 18/18 19/19 20/20 +f 21/21 22/22 23/23 24/24 +f 25/25 26/26 27/27 28/28 +g 1_1 +f 29/29 30/30 31/31 32/32 +f 33/33 34/34 35/35 36/36 +f 33/37 32/38 31/39 34/40 +f 35/41 30/42 29/43 36/44 +f 34/45 31/46 30/47 35/48 +f 36/49 29/50 32/51 33/52 +g 1_2 +f 29/53 30/54 31/55 32/56 +f 33/57 34/58 35/59 36/60 +f 33/61 32/62 31/63 34/64 +f 35/65 30/66 29/67 36/68 +f 34/69 31/70 30/71 35/72 +f 36/73 29/74 32/75 33/76 +g 1_3 +f 29/77 30/78 31/79 32/80 +f 33/81 34/82 35/83 36/84 +f 33/85 32/86 31/87 34/88 +f 35/89 30/90 29/91 36/92 +f 34/93 31/94 30/95 35/96 +f 36/97 29/98 32/99 33/100 diff --git a/src/main/resources/assets/rpmachine/models/pump2.obj b/src/main/resources/assets/rpmachine/models/pump2.obj new file mode 100644 index 0000000..3263e14 --- /dev/null +++ b/src/main/resources/assets/rpmachine/models/pump2.obj @@ -0,0 +1,44 @@ +# 8 Vertices +v 0.187500 0.312500 0.812500 +v 0.000000 0.312500 0.812500 +v 0.000000 0.312500 0.187500 +v 0.187500 0.312500 0.187500 +v 0.187500 0.937500 0.187500 +v 0.000000 0.937500 0.187500 +v 0.000000 0.937500 0.812500 +v 0.187500 0.937500 0.812500 + +# 24 Texture Coordinates +vtc 0.636719 0.824219 0.500000 0.500000 0.500000 +vtc 0.636719 0.812500 0.500000 0.500000 0.500000 +vtc 0.675781 0.812500 0.500000 0.500000 0.500000 +vtc 0.675781 0.824219 0.500000 0.500000 0.500000 +vtc 0.636719 0.824219 1.000000 1.000000 1.000000 +vtc 0.636719 0.812500 1.000000 1.000000 1.000000 +vtc 0.675781 0.812500 1.000000 1.000000 1.000000 +vtc 0.675781 0.824219 1.000000 1.000000 1.000000 +vtc 0.636719 0.824219 0.800000 0.800000 0.800000 +vtc 0.675781 0.824219 0.800000 0.800000 0.800000 +vtc 0.675781 0.812500 0.800000 0.800000 0.800000 +vtc 0.636719 0.812500 0.800000 0.800000 0.800000 +vtc 0.636719 0.812500 0.800000 0.800000 0.800000 +vtc 0.675781 0.812500 0.800000 0.800000 0.800000 +vtc 0.675781 0.824219 0.800000 0.800000 0.800000 +vtc 0.636719 0.824219 0.800000 0.800000 0.800000 +vtc 0.574219 0.863281 0.600000 0.600000 0.600000 +vtc 0.574219 0.824219 0.600000 0.600000 0.600000 +vtc 0.613281 0.824219 0.600000 0.600000 0.600000 +vtc 0.613281 0.863281 0.600000 0.600000 0.600000 +vtc 0.574219 0.863281 0.600000 0.600000 0.600000 +vtc 0.574219 0.824219 0.600000 0.600000 0.600000 +vtc 0.613281 0.824219 0.600000 0.600000 0.600000 +vtc 0.613281 0.863281 0.600000 0.600000 0.600000 + +# 1 Groups +g 0 +f 1/1 2/2 3/3 4/4 +f 5/5 6/6 7/7 8/8 +f 5/9 4/10 3/11 6/12 +f 7/13 2/14 1/15 8/16 +f 6/17 3/18 2/19 7/20 +f 8/21 1/22 4/23 5/24 diff --git a/src/main/resources/assets/rpmachine/models/transform.obj b/src/main/resources/assets/rpmachine/models/transform.obj new file mode 100644 index 0000000..df43828 --- /dev/null +++ b/src/main/resources/assets/rpmachine/models/transform.obj @@ -0,0 +1,107 @@ +v 0.000000 2.000000 16.000000 +v 6.000000 16.000000 16.000000 +v 0.000000 2.000000 0.000000 +v 6.000000 16.000000 0.000000 +v 16.000000 2.000000 16.000000 +v 6.000000 2.000000 0.000000 +v 16.000000 2.000000 0.000000 +v 6.000000 2.000000 16.000000 +v 0.000000 0.000000 16.000000 +v 0.000000 0.000000 0.000000 +v 16.000000 0.000000 16.000000 +v 16.000000 0.000000 0.000000 +v 1.000000 2.000000 14.000000 +v 1.000000 2.000000 2.000000 +v 15.000000 2.000000 14.000000 +v 15.000000 2.000000 2.000000 +v 1.000000 14.000000 14.000000 +v 1.000000 14.000000 2.000000 +v 15.000000 14.000000 14.000000 +v 15.000000 14.000000 2.000000 +v 16.000000 16.000000 0.000000 +v 16.000000 16.000000 16.000000 +v 0.000000 16.000000 0.000000 +v 0.000000 16.000000 16.000000 +v 10.000000 16.000000 16.000000 +v 10.000000 16.000000 0.000000 +v 10.000000 2.000000 0.000000 +v 10.000000 2.000000 16.000000 +v 0.000000 2.000000 12.000000 +v 0.000000 2.000000 4.000000 +v 0.000000 5.000000 12.000000 +v 0.000000 5.000000 4.000000 +v 16.000000 2.000000 12.000000 +v 16.000000 2.000000 4.000000 +v 16.000000 5.000000 12.000000 +v 16.000000 5.000000 4.000000 +vt 0.187500 0.937500 +vt 0.187500 0.875000 +vt 0.250000 0.875000 +vt 0.250000 0.937500 +vt 0.437500 0.937500 +vt 0.437500 0.882812 +vt 0.500000 0.882812 +vt 0.500000 0.937500 +vt 0.062500 0.875000 +vt 0.062500 0.937500 +vt 0.000000 0.937500 +vt 0.000000 0.875000 +vt 0.375000 0.937500 +vt 0.375000 0.882812 +vt 0.500000 0.875000 +vt 0.562500 0.875000 +vt 0.562500 0.937500 +vt 0.125000 0.875000 +vt 0.125000 0.937500 +vt 0.625000 0.937500 +vt 0.625000 0.875000 +vt 0.757812 0.878906 +vt 0.804688 0.878906 +vt 0.804688 0.933594 +vt 0.757812 0.933594 +vt 0.878906 0.929688 +vt 0.878906 0.882812 +vt 0.933594 0.882812 +vt 0.933594 0.929688 +vt 0.816406 0.929688 +vt 0.816406 0.882812 +vt 0.871094 0.882812 +vt 0.871094 0.929688 +vt 0.679688 0.882812 +vt 0.679688 0.929688 +vt 0.632812 0.929688 +vt 0.632812 0.882812 +vt 0.695312 0.929688 +vt 0.695312 0.882812 +vt 0.742188 0.882812 +vt 0.742188 0.929688 +vt 0.312500 0.937500 +vt 0.312500 0.875000 +vt 0.375000 0.886719 +vt 0.312500 0.886719 +vt 0.375000 0.875000 +vt 0.312500 0.890625 +vt 0.375000 0.890625 +vt 0.375000 0.902344 +vt 0.312500 0.902344 +vt 0.312500 0.906250 +vt 0.375000 0.906250 + +g 0 +f 24/1 9/2 11/3 22/4 +f 25/5 28/6 27/7 26/8 +f 9/9 24/10 23/11 10/12 +f 8/6 2/5 4/13 6/14 +f 3/15 1/16 5/17 7/8 +f 22/10 11/9 12/18 21/19 +f 11/20 9/21 10/16 12/17 +f 19/22 20/23 18/24 17/25 +f 20/26 16/27 14/28 18/29 +f 17/30 13/31 15/32 19/33 +f 13/34 17/35 18/36 14/37 +f 19/38 15/39 16/40 20/41 +f 21/19 12/18 10/2 23/1 +f 22/42 21/4 23/3 24/43 +f 34/44 30/45 32/43 36/46 +f 29/47 33/48 35/49 31/50 +f 31/13 35/42 36/51 32/52 diff --git a/src/main/resources/assets/rpmachine/models/vawt.obj b/src/main/resources/assets/rpmachine/models/vawt.obj new file mode 100644 index 0000000..7423417 --- /dev/null +++ b/src/main/resources/assets/rpmachine/models/vawt.obj @@ -0,0 +1,503 @@ +# VAWT Model +v -16.697224 126.487503 43.408737 +v -0.198903 126.487503 47.508175 +v -0.078331 126.487503 47.022930 +v -16.576649 126.487503 42.923492 +v -16.697224 8.512497 43.408737 +v -0.198903 8.512497 47.508175 +v -0.078331 8.512497 47.022930 +v -16.576651 8.512497 42.923492 +v 16.576651 8.512497 -42.923492 +v 0.078331 8.512497 -47.022930 +v 0.198903 8.512497 -47.508175 +v 16.697224 8.512497 -43.408737 +v 16.576649 126.487503 -42.923492 +v 0.078331 126.487503 -47.022930 +v 0.198903 126.487503 -47.508175 +v 16.697224 126.487503 -43.408737 +v -45.941685 126.487503 7.244141 +v -41.242744 126.487503 23.581821 +v -40.762222 126.487503 23.443623 +v -45.461163 126.487503 7.105942 +v -45.941685 8.512497 7.244141 +v -41.242744 8.512497 23.581821 +v -40.762222 8.512497 23.443623 +v -45.461159 8.512497 7.105938 +v 45.461159 8.512497 -7.105938 +v 40.762222 8.512497 -23.443623 +v 41.242744 8.512497 -23.581821 +v 45.941685 8.512497 -7.244141 +v 45.461163 126.487503 -7.105942 +v 40.762222 126.487503 -23.443623 +v 41.242744 126.487503 -23.581821 +v 45.941685 126.487503 -7.244141 +v -29.244442 126.487503 -36.164600 +v -41.043823 126.487503 -23.926363 +v -40.683884 126.487503 -23.579317 +v -28.884502 126.487503 -35.817554 +v -29.244442 8.512497 -36.164600 +v -41.043823 8.512497 -23.926363 +v -40.683884 8.512497 -23.579317 +v -28.884499 8.512497 -35.817554 +v 28.884499 8.512497 35.817554 +v 40.683884 8.512497 23.579317 +v 41.043823 8.512497 23.926363 +v 29.244442 8.512497 36.164600 +v 28.884502 126.487503 35.817554 +v 40.683884 126.487503 23.579317 +v 41.043823 126.487503 23.926363 +v 29.244442 126.487503 36.164600 +v 2.000000 0.000000 2.000000 +v -2.000000 0.000000 2.000000 +v -2.000000 0.000000 -2.000000 +v 2.000001 0.000000 -1.999999 +v 1.999999 128.000000 2.000001 +v -2.000001 128.000000 1.999999 +v -1.999999 128.000000 -2.000001 +v 2.000000 128.000000 -2.000000 +v 0.500000 7.500000 47.500000 +v -0.500000 7.500000 47.500000 +v -0.500000 7.500000 -47.500000 +v 0.500000 7.500000 -47.500000 +v 0.500000 8.500000 47.500000 +v -0.500000 8.500000 47.500000 +v -0.500000 8.500000 -47.500000 +v 0.500000 8.500000 -47.500000 +v 0.500000 127.500000 -47.500000 +v -0.500000 127.500000 -47.500000 +v -0.500000 127.500000 47.500000 +v 0.500000 127.500000 47.500000 +v 0.500000 126.500000 -47.500000 +v -0.500000 126.500000 -47.500000 +v -0.500000 126.500000 47.500000 +v 0.500000 126.500000 47.500000 +v 1.000000 128.000000 -48.000000 +v -1.000000 128.000000 -48.000000 +v -1.000001 128.000000 -46.000000 +v 0.999999 128.000000 -46.000000 +v 1.000000 7.000000 -48.000000 +v -1.000000 7.000000 -48.000000 +v -1.000000 7.000000 -46.000000 +v 1.000000 7.000000 -46.000000 +v -1.000000 7.000000 46.000000 +v 1.000000 7.000000 46.000000 +v 0.999999 7.000000 48.000000 +v -1.000001 7.000000 48.000000 +v -1.000000 128.000000 46.000000 +v 1.000000 128.000000 46.000000 +v 0.999999 128.000000 48.000000 +v -1.000000 128.000000 48.000000 +v 42.069225 128.000000 -23.133965 +v 41.069225 128.000000 -24.866013 +v 39.337173 128.000000 -23.866020 +v 40.337173 128.000000 -22.133965 +v 42.069225 7.000000 -23.133965 +v 41.069225 7.000000 -24.866020 +v 39.337173 7.000000 -23.866020 +v 40.337173 7.000000 -22.133965 +v -40.337173 7.000000 22.133965 +v -39.337173 7.000000 23.866020 +v -41.069225 7.000000 24.866020 +v -42.069225 7.000000 23.133965 +v -40.337173 128.000000 22.133965 +v -39.337173 128.000000 23.866020 +v -41.069225 128.000000 24.866020 +v -42.069225 128.000000 23.133965 +v 40.886211 126.500000 -24.183006 +v 41.386211 126.500000 -23.316978 +v -40.886211 126.500000 24.183006 +v -41.386211 126.500000 23.316978 +v 40.886211 127.500000 -24.183006 +v 41.386211 127.500000 -23.316978 +v -40.886211 127.500000 24.183006 +v -41.386211 127.500000 23.316978 +v -41.386211 8.500000 23.316978 +v -40.886211 8.500000 24.183006 +v 41.386211 8.500000 -23.316978 +v 40.886211 8.500000 -24.183006 +v -41.386211 7.500000 23.316978 +v -40.886211 7.500000 24.183006 +v 41.386211 7.500000 -23.316978 +v 40.886211 7.500000 -24.183006 +v -41.386204 7.500000 -23.317001 +v -40.886204 7.500000 -24.183029 +v 41.386204 7.500000 23.317001 +v 40.886204 7.500000 24.183029 +v -41.386204 8.500000 -23.317001 +v -40.886204 8.500000 -24.183029 +v 41.386204 8.500000 23.317001 +v 40.886204 8.500000 24.183029 +v 40.886204 127.500000 24.183029 +v 41.386204 127.500000 23.317001 +v -40.886204 127.500000 -24.183029 +v -41.386204 127.500000 -23.317001 +v 40.886204 126.500000 24.183029 +v 41.386204 126.500000 23.317001 +v -40.886204 126.500000 -24.183029 +v -41.386204 126.500000 -23.317001 +v 41.069210 128.000000 24.866043 +v 42.069218 128.000000 23.133991 +v 40.337166 128.000000 22.133987 +v 39.337158 128.000000 23.866043 +v 41.069210 7.000000 24.866043 +v 42.069218 7.000000 23.133991 +v 40.337166 7.000000 22.133987 +v 39.337158 7.000000 23.866043 +v -39.337158 7.000000 -23.866043 +v -40.337166 7.000000 -22.133987 +v -42.069218 7.000000 -23.133991 +v -41.069210 7.000000 -24.866043 +v -39.337158 128.000000 -23.866043 +v -40.337166 128.000000 -22.133987 +v -42.069202 128.000000 -23.133995 +v -41.069210 128.000000 -24.866043 +v -40.177860 7.500000 23.891901 +v -41.177860 7.500000 23.891901 +v -41.177860 7.500000 -23.891901 +v -40.177860 7.500000 -23.891901 +v -40.177860 8.500000 23.891901 +v -41.177860 8.500000 23.891901 +v -41.177860 8.500000 -23.891901 +v -40.177860 8.500000 -23.891901 +v -40.177860 127.500000 -23.891901 +v -41.177860 127.500000 -23.891901 +v -41.177860 127.500000 23.891901 +v -40.177860 127.500000 23.891901 +v -40.177860 126.500000 -23.891901 +v -41.177860 126.500000 -23.891901 +v -41.177860 126.500000 23.891901 +v -40.177860 126.500000 23.891901 +v 40.177868 7.500000 -23.891897 +v 41.177868 7.500000 -23.891897 +v 41.177853 7.500000 23.891905 +v 40.177853 7.500000 23.891905 +v 40.177868 8.500000 -23.891897 +v 41.177868 8.500000 -23.891897 +v 41.177853 8.500000 23.891905 +v 40.177853 8.500000 23.891905 +v 40.177853 127.500000 23.891905 +v 41.177853 127.500000 23.891905 +v 41.177868 127.500000 -23.891897 +v 40.177868 127.500000 -23.891897 +v 40.177853 126.500000 23.891905 +v 41.177853 126.500000 23.891905 +v 41.177868 126.500000 -23.891897 +v 40.177868 126.500000 -23.891897 +v 40.779919 7.500000 22.849106 +v 41.279919 7.500000 23.715130 +v -0.102070 7.500000 47.607025 +v -0.602070 7.500000 46.740997 +v 40.779919 8.500000 22.849106 +v 41.279919 8.500000 23.715130 +v -0.102070 8.500000 47.607025 +v -0.602070 8.500000 46.740997 +v -0.602070 127.500000 46.740997 +v -0.102070 127.500000 47.607025 +v 41.279919 127.500000 23.715130 +v 40.779919 127.500000 22.849106 +v -0.602070 126.500000 46.740997 +v -0.102070 126.500000 47.607025 +v 41.279919 126.500000 23.715130 +v 40.779919 126.500000 22.849106 +v -40.779926 7.500000 -22.849113 +v -41.279926 7.500000 -23.715137 +v 0.102077 7.500000 -47.607018 +v 0.602077 7.500000 -46.740990 +v -40.779926 8.500000 -22.849113 +v -41.279926 8.500000 -23.715137 +v 0.102077 8.500000 -47.607018 +v 0.602077 8.500000 -46.740990 +v 0.602077 127.500000 -46.740990 +v 0.102077 127.500000 -47.607018 +v -41.279926 127.500000 -23.715137 +v -40.779926 127.500000 -22.849113 +v 0.602077 126.500000 -46.740990 +v 0.102077 126.500000 -47.607018 +v -41.279926 126.500000 -23.715137 +v -40.779926 126.500000 -22.849113 +v -0.602047 7.500000 -46.740997 +v -0.102047 7.500000 -47.607029 +v 41.279930 7.500000 -23.715111 +v 40.779930 7.500000 -22.849083 +v -0.602047 8.500000 -46.740997 +v -0.102047 8.500000 -47.607029 +v 41.279930 8.500000 -23.715111 +v 40.779930 8.500000 -22.849083 +v 40.779930 127.500000 -22.849083 +v 41.279930 127.500000 -23.715111 +v -0.102047 127.500000 -47.607029 +v -0.602047 127.500000 -46.740997 +v 40.779930 126.500000 -22.849083 +v 41.279930 126.500000 -23.715111 +v -0.102047 126.500000 -47.607029 +v -0.602047 126.500000 -46.740997 +v 0.602043 7.500000 46.741005 +v 0.102043 7.500000 47.607037 +v -41.279930 7.500000 23.715096 +v -40.779926 7.500000 22.849075 +v 0.602043 8.500000 46.741005 +v 0.102043 8.500000 47.607037 +v -41.279930 8.500000 23.715096 +v -40.779926 8.500000 22.849075 +v -40.779926 127.500000 22.849075 +v -41.279930 127.500000 23.715096 +v 0.102043 127.500000 47.607037 +v 0.602043 127.500000 46.741005 +v -40.779926 126.500000 22.849075 +v -41.279930 126.500000 23.715096 +v 0.102043 126.500000 47.607037 +v 0.602043 126.500000 46.741005 +vt 0.277344 0.500000 +vt 0.277344 1.000000 +vt 0.273438 1.000000 +vt 0.273438 0.500000 +vt 0.140625 1.000000 +vt 0.140625 0.500000 +vt 0.203125 0.500000 +vt 0.203125 1.000000 +vt 0.269531 0.500000 +vt 0.269531 1.000000 +vt 0.207031 1.000000 +vt 0.207031 0.500000 +vt 0.140625 0.496094 +vt 0.140625 0.492188 +vt 0.203125 0.492188 +vt 0.203125 0.496094 +vt 0.207031 0.492188 +vt 0.269531 0.492188 +vt 0.269531 0.496094 +vt 0.207031 0.496094 +vt 0.019531 0.480469 +vt 0.035156 0.480469 +vt 0.035156 0.496094 +vt 0.019531 0.496094 +vt 0.000000 0.480469 +vt 0.015625 0.480469 +vt 0.015625 0.496094 +vt 0.000000 0.496094 +vt 0.015625 0.500000 +vt 0.015625 1.000000 +vt 0.000000 1.000000 +vt 0.000000 0.500000 +vt 0.062500 0.500000 +vt 0.062500 1.000000 +vt 0.046875 1.000000 +vt 0.046875 0.500000 +vt 0.031250 1.000000 +vt 0.031250 0.500000 +vt 0.101562 1.000000 +vt 0.097656 1.000000 +vt 0.097656 0.500000 +vt 0.101562 0.500000 +vt 0.089844 1.000000 +vt 0.089844 0.500000 +vt 0.093750 0.500000 +vt 0.093750 1.000000 +vt 0.085938 0.500000 +vt 0.085938 1.000000 +vt 0.074219 0.500000 +vt 0.078125 0.500000 +vt 0.078125 1.000000 +vt 0.074219 1.000000 +vt 0.066406 0.500000 +vt 0.070312 0.500000 +vt 0.070312 1.000000 +vt 0.066406 1.000000 +vt 0.082031 0.500000 +vt 0.082031 1.000000 +vt 0.136719 0.500000 +vt 0.136719 1.000000 +vt 0.128906 1.000000 +vt 0.128906 0.500000 +vt 0.113281 0.500000 +vt 0.113281 1.000000 +vt 0.105469 1.000000 +vt 0.105469 0.500000 +vt 0.121094 0.500000 +vt 0.121094 1.000000 +vt 0.105469 0.488281 +vt 0.113281 0.488281 +vt 0.113281 0.496094 +vt 0.105469 0.496094 +vt 0.117188 0.488281 +vt 0.125000 0.488281 +vt 0.125000 0.496094 +vt 0.117188 0.496094 +vt 0.316406 1.000000 +vt 0.312500 1.000000 +vt 0.312500 0.750000 +vt 0.316406 0.750000 +vt 0.304688 1.000000 +vt 0.304688 0.750000 +vt 0.308594 0.750000 +vt 0.308594 1.000000 +vt 0.300781 0.750000 +vt 0.300781 1.000000 +vt 0.289062 0.750000 +vt 0.292969 0.750000 +vt 0.292969 1.000000 +vt 0.289062 1.000000 +vt 0.281250 0.750000 +vt 0.285156 0.750000 +vt 0.285156 1.000000 +vt 0.281250 1.000000 +vt 0.296875 0.750000 +vt 0.296875 1.000000 + +g 0 +f 49/21 50/22 51/23 52/24 +f 53/25 56/26 55/27 54/28 +f 49/29 53/30 54/31 50/32 +f 50/33 54/34 55/35 51/36 +f 51/36 55/35 56/37 52/38 +f 53/30 49/29 52/38 56/37 +f 59/39 60/40 57/41 58/42 +f 61/43 64/44 63/45 62/46 +f 58/45 62/41 63/40 59/46 +f 60/47 64/44 61/43 57/48 +f 69/49 65/50 68/51 72/52 +f 71/53 67/54 66/55 70/56 +f 68/55 65/54 66/49 67/52 +f 70/50 69/57 72/58 71/51 +f 77/59 73/60 76/61 80/62 +f 78/63 74/64 73/65 77/66 +f 79/67 75/68 74/64 78/63 +f 80/62 76/61 75/68 79/67 +f 76/69 73/70 74/71 75/72 +f 78/73 77/74 80/75 79/76 +f 83/73 84/74 81/75 82/76 +f 85/69 88/70 87/71 86/72 +f 81/62 85/61 86/68 82/67 +f 82/67 86/68 87/64 83/63 +f 83/63 87/64 88/65 84/66 +f 84/59 88/60 85/61 81/62 +f 93/59 89/60 92/61 96/62 +f 94/63 90/64 89/65 93/66 +f 95/67 91/68 90/64 94/63 +f 96/62 92/61 91/68 95/67 +f 92/69 89/70 90/71 91/72 +f 94/73 93/74 96/75 95/76 +f 99/73 100/74 97/75 98/76 +f 101/69 104/70 103/71 102/72 +f 97/62 101/61 102/68 98/67 +f 98/67 102/68 103/64 99/63 +f 99/63 103/64 104/65 100/66 +f 100/59 104/60 101/61 97/62 +f 107/50 108/57 105/58 106/51 +f 109/55 112/54 111/49 110/52 +f 106/53 110/54 111/55 107/56 +f 108/49 112/50 109/51 105/52 +f 117/47 113/44 116/43 120/48 +f 119/45 115/41 114/40 118/46 +f 116/43 113/44 114/45 115/46 +f 118/39 117/40 120/41 119/42 +f 123/39 124/40 121/41 122/42 +f 125/43 128/44 127/45 126/46 +f 122/45 126/41 127/40 123/46 +f 124/47 128/44 125/43 121/48 +f 133/49 129/50 132/51 136/52 +f 135/53 131/54 130/55 134/56 +f 132/55 129/54 130/49 131/52 +f 134/50 133/57 136/58 135/51 +f 141/59 137/60 140/61 144/62 +f 142/63 138/64 137/65 141/66 +f 143/67 139/68 138/64 142/63 +f 144/62 140/61 139/68 143/67 +f 140/69 137/70 138/71 139/72 +f 142/73 141/74 144/75 143/76 +f 147/73 148/74 145/75 146/76 +f 149/69 152/70 151/71 150/72 +f 145/62 149/61 150/68 146/67 +f 146/67 150/68 151/64 147/63 +f 147/63 151/64 152/65 148/66 +f 148/59 152/60 149/61 145/62 +f 155/77 156/78 153/79 154/80 +f 157/81 160/82 159/83 158/84 +f 154/83 158/79 159/78 155/84 +f 156/85 160/82 157/81 153/86 +f 165/87 161/88 164/89 168/90 +f 167/91 163/92 162/93 166/94 +f 164/93 161/92 162/87 163/90 +f 166/88 165/95 168/96 167/89 +f 171/77 172/78 169/79 170/80 +f 173/81 176/82 175/83 174/84 +f 170/83 174/79 175/78 171/84 +f 172/85 176/82 173/81 169/86 +f 181/87 177/88 180/89 184/90 +f 183/91 179/92 178/93 182/94 +f 180/93 177/92 178/87 179/90 +f 182/88 181/95 184/96 183/89 +f 187/77 188/78 185/79 186/80 +f 189/81 192/82 191/83 190/84 +f 186/83 190/79 191/78 187/84 +f 188/85 192/82 189/81 185/86 +f 197/87 193/88 196/89 200/90 +f 199/91 195/92 194/93 198/94 +f 196/93 193/92 194/87 195/90 +f 198/88 197/95 200/96 199/89 +f 203/77 204/78 201/79 202/80 +f 205/81 208/82 207/83 206/84 +f 202/83 206/79 207/78 203/84 +f 204/85 208/82 205/81 201/86 +f 213/87 209/88 212/89 216/90 +f 215/91 211/92 210/93 214/94 +f 212/93 209/92 210/87 211/90 +f 214/88 213/95 216/96 215/89 +f 219/77 220/78 217/79 218/80 +f 221/81 224/82 223/83 222/84 +f 218/83 222/79 223/78 219/84 +f 220/85 224/82 221/81 217/86 +f 229/87 225/88 228/89 232/90 +f 231/91 227/92 226/93 230/94 +f 228/93 225/92 226/87 227/90 +f 230/88 229/95 232/96 231/89 +f 235/77 236/78 233/79 234/80 +f 237/81 240/82 239/83 238/84 +f 234/83 238/79 239/78 235/84 +f 236/85 240/82 237/81 233/86 +f 245/87 241/88 244/89 248/90 +f 247/91 243/92 242/93 246/94 +f 244/93 241/92 242/87 243/90 +f 246/88 245/95 248/96 247/89 + +g 1_1 +f 5/1 1/2 4/3 8/4 +f 1/5 5/6 6/7 2/8 +f 8/9 4/10 3/11 7/12 +f 4/13 1/14 2/15 3/16 +f 6/17 5/18 8/19 7/20 + +g 1_2 +f 41/19 42/20 43/17 44/18 +f 45/13 48/14 47/15 46/16 +f 41/9 45/10 46/11 42/12 +f 43/7 47/8 48/5 44/6 +f 45/3 41/4 44/1 48/2 + +g 1_3 +f 33/19 34/20 35/17 36/18 +f 37/13 40/14 39/15 38/16 +f 33/9 37/10 38/11 34/12 +f 35/7 39/8 40/5 36/6 +f 37/3 33/4 36/1 40/2 + +g 1_4 +f 9/19 10/20 11/17 12/18 +f 13/13 16/14 15/15 14/16 +f 9/9 13/10 14/11 10/12 +f 11/7 15/8 16/5 12/6 +f 13/3 9/4 12/1 16/2 + +g 1_5 +f 29/1 25/2 28/3 32/4 +f 25/5 29/6 30/7 26/8 +f 32/9 28/10 27/11 31/12 +f 28/13 25/14 26/15 27/16 +f 30/17 29/18 32/19 31/20 + +g 1_6 +f 21/1 17/2 20/3 24/4 +f 17/5 21/6 22/7 18/8 +f 24/9 20/10 19/11 23/12 +f 20/13 17/14 18/15 19/16 +f 22/17 21/18 24/19 23/20 diff --git a/src/main/resources/assets/rpmachine/models/vawt.png b/src/main/resources/assets/rpmachine/models/vawt.png new file mode 100644 index 0000000..61a846b Binary files /dev/null and b/src/main/resources/assets/rpmachine/models/vawt.png differ diff --git a/src/main/resources/assets/rpmachine/models/windmill.obj b/src/main/resources/assets/rpmachine/models/windmill.obj new file mode 100644 index 0000000..d13ae08 --- /dev/null +++ b/src/main/resources/assets/rpmachine/models/windmill.obj @@ -0,0 +1,160 @@ +v -126.487503 8.408737 16.697220 +v -126.487503 12.508171 0.198891 +v -126.487503 12.022926 0.078323 +v -126.487503 7.923492 16.576645 +v -16.512497 8.408737 16.697224 +v -16.512501 12.508175 0.198902 +v -16.512501 12.022930 0.078331 +v -16.512497 7.923492 16.576651 +v -16.697224 8.408737 -126.487503 +v -0.198903 12.508171 -126.487503 +v -0.078331 12.022926 -126.487503 +v -16.576649 7.923492 -126.487503 +v -16.697224 8.408737 -16.512497 +v -0.198903 12.508175 -16.512501 +v -0.078331 12.022930 -16.512501 +v -16.576651 7.923492 -16.512497 +v 126.487503 8.408737 -16.697205 +v 126.487503 12.508171 -0.198883 +v 126.487503 12.022926 -0.078308 +v 126.487503 7.923492 -16.576630 +v 16.512501 8.408737 -16.697224 +v 16.512501 12.508175 -0.198902 +v 16.512501 12.022930 -0.078330 +v 16.512501 7.923492 -16.576651 +v 16.697212 8.408737 126.487503 +v 0.198892 12.508171 126.487503 +v 0.078320 12.022926 126.487503 +v 16.576637 7.923492 126.487503 +v 16.697224 8.408737 16.512499 +v 0.198902 12.508175 16.512501 +v 0.078331 12.022930 16.512501 +v 16.576651 7.923492 16.512499 +v 2.000000 0.000000 2.000000 +v -2.000000 0.000000 2.000000 +v -2.000000 0.000000 -2.000000 +v 2.000001 0.000000 -1.999999 +v 1.999999 16.000000 2.000001 +v -2.000001 16.000000 1.999999 +v -1.999999 16.000000 -2.000001 +v 2.000000 16.000000 -2.000000 +v -1.000000 11.000000 128.000000 +v 1.000000 11.000000 128.000000 +v 0.999999 13.000000 128.000000 +v -1.000001 13.000000 128.000000 +v -1.000000 11.000000 -128.000000 +v 1.000000 11.000000 -128.000000 +v 0.999999 13.000000 -128.000000 +v -1.000000 13.000000 -128.000000 +v 128.000000 11.000000 1.000008 +v 128.000000 11.000000 -0.999985 +v 128.000000 13.000000 -0.999985 +v 128.000000 13.000000 1.000008 +v -128.000000 11.000000 0.999985 +v -128.000000 11.000000 -1.000008 +v -128.000000 13.000000 -1.000008 +v -128.000000 13.000000 0.999985 +vt 0.277344 0.531250 +vt 0.277344 1.000000 +vt 0.273438 1.000000 +vt 0.273438 0.531250 +vt 0.140625 1.000000 +vt 0.140625 0.531250 +vt 0.203125 0.531250 +vt 0.203125 1.000000 +vt 0.269531 0.531250 +vt 0.269531 1.000000 +vt 0.207031 1.000000 +vt 0.207031 0.531250 +vt 0.140625 0.496094 +vt 0.140625 0.492188 +vt 0.203125 0.492188 +vt 0.203125 0.496094 +vt 0.207031 0.492188 +vt 0.269531 0.492188 +vt 0.269531 0.496094 +vt 0.207031 0.496094 +vt 0.019531 0.480469 +vt 0.035156 0.480469 +vt 0.035156 0.496094 +vt 0.019531 0.496094 +vt 0.000000 0.480469 +vt 0.015625 0.480469 +vt 0.015625 0.496094 +vt 0.000000 0.496094 +vt 0.015625 0.414062 +vt 0.015625 0.476562 +vt 0.000000 0.476562 +vt 0.000000 0.414062 +vt 0.062500 0.414062 +vt 0.062500 0.476562 +vt 0.046875 0.476562 +vt 0.046875 0.414062 +vt 0.031250 0.476562 +vt 0.031250 0.414062 +vt 0.117188 0.488281 +vt 0.125000 0.488281 +vt 0.125000 0.496094 +vt 0.117188 0.496094 +vt 0.105469 0.488281 +vt 0.113281 0.488281 +vt 0.113281 0.496094 +vt 0.105469 0.496094 +vt 0.343750 0.000000 +vt 0.343750 1.000000 +vt 0.335938 1.000000 +vt 0.335938 0.000000 +vt 0.328125 1.000000 +vt 0.328125 0.000000 +vt 0.320312 1.000000 +vt 0.320312 0.000000 +vt 0.351562 0.000000 +vt 0.351562 1.000000 + +g 0 +f 33/21 34/22 35/23 36/24 +f 37/25 40/26 39/27 38/28 +f 33/29 37/30 38/31 34/32 +f 34/33 38/34 39/35 35/36 +f 35/36 39/35 40/37 36/38 +f 37/30 33/29 36/38 40/37 +f 43/39 44/40 41/41 42/42 +f 45/43 48/44 47/45 46/46 +f 41/47 45/48 46/49 42/50 +f 42/50 46/49 47/51 43/52 +f 43/52 47/51 48/53 44/54 +f 44/55 48/56 45/48 41/47 +f 51/39 52/40 49/41 50/42 +f 53/43 56/44 55/45 54/46 +f 49/47 53/48 54/49 50/50 +f 50/50 54/49 55/51 51/52 +f 51/52 55/51 56/53 52/54 +f 52/55 56/56 53/48 49/47 + +g 1_1 +f 29/1 25/2 28/3 32/4 +f 25/5 29/6 30/7 26/8 +f 32/9 28/10 27/11 31/12 +f 28/13 25/14 26/15 27/16 +f 30/17 29/18 32/19 31/20 + +g 1_2 +f 21/1 17/2 20/3 24/4 +f 17/5 21/6 22/7 18/8 +f 24/9 20/10 19/11 23/12 +f 20/13 17/14 18/15 19/16 +f 22/17 21/18 24/19 23/20 + +g 1_3 +f 13/1 9/2 12/3 16/4 +f 9/5 13/6 14/7 10/8 +f 16/9 12/10 11/11 15/12 +f 12/13 9/14 10/15 11/16 +f 14/17 13/18 16/19 15/20 + +g 1_4 +f 5/1 1/2 4/3 8/4 +f 1/5 5/6 6/7 2/8 +f 8/9 4/10 3/11 7/12 +f 4/13 1/14 2/15 3/16 +f 6/17 5/18 8/19 7/20 diff --git a/src/main/resources/assets/rpmachine/textures/blocks/assemblerBack.png b/src/main/resources/assets/rpmachine/textures/blocks/assemblerBack.png new file mode 100644 index 0000000..cd04bf2 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/assemblerBack.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/assemblerBackOn.png b/src/main/resources/assets/rpmachine/textures/blocks/assemblerBackOn.png new file mode 100644 index 0000000..e790a1a Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/assemblerBackOn.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/assemblerFront.png b/src/main/resources/assets/rpmachine/textures/blocks/assemblerFront.png new file mode 100644 index 0000000..1a70cee Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/assemblerFront.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/assemblerFrontOn.png b/src/main/resources/assets/rpmachine/textures/blocks/assemblerFrontOn.png new file mode 100644 index 0000000..221643d Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/assemblerFrontOn.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/assemblerSide.png b/src/main/resources/assets/rpmachine/textures/blocks/assemblerSide.png new file mode 100644 index 0000000..88e8d67 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/assemblerSide.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/assemblerSideAlt.png b/src/main/resources/assets/rpmachine/textures/blocks/assemblerSideAlt.png new file mode 100644 index 0000000..833d801 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/assemblerSideAlt.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/batterySide/0.png b/src/main/resources/assets/rpmachine/textures/blocks/batterySide/0.png new file mode 100644 index 0000000..cd53752 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/batterySide/0.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/batterySide/1.png b/src/main/resources/assets/rpmachine/textures/blocks/batterySide/1.png new file mode 100644 index 0000000..78e23fb Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/batterySide/1.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/batterySide/2.png b/src/main/resources/assets/rpmachine/textures/blocks/batterySide/2.png new file mode 100644 index 0000000..403d7b2 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/batterySide/2.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/batterySide/3.png b/src/main/resources/assets/rpmachine/textures/blocks/batterySide/3.png new file mode 100644 index 0000000..3eb427d Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/batterySide/3.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/batterySide/4.png b/src/main/resources/assets/rpmachine/textures/blocks/batterySide/4.png new file mode 100644 index 0000000..90c9516 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/batterySide/4.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/batterySide/5.png b/src/main/resources/assets/rpmachine/textures/blocks/batterySide/5.png new file mode 100644 index 0000000..1d7e675 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/batterySide/5.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/batterySide/6.png b/src/main/resources/assets/rpmachine/textures/blocks/batterySide/6.png new file mode 100644 index 0000000..3ac184e Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/batterySide/6.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/batterySide/7.png b/src/main/resources/assets/rpmachine/textures/blocks/batterySide/7.png new file mode 100644 index 0000000..150beca Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/batterySide/7.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/batterySide/8.png b/src/main/resources/assets/rpmachine/textures/blocks/batterySide/8.png new file mode 100644 index 0000000..eaa09ee Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/batterySide/8.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/batteryTop.png b/src/main/resources/assets/rpmachine/textures/blocks/batteryTop.png new file mode 100644 index 0000000..fe64c41 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/batteryTop.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/breakerBack.png b/src/main/resources/assets/rpmachine/textures/blocks/breakerBack.png new file mode 100644 index 0000000..0412f2a Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/breakerBack.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/breakerFront.png b/src/main/resources/assets/rpmachine/textures/blocks/breakerFront.png new file mode 100644 index 0000000..5adb9d7 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/breakerFront.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/breakerFrontOn.png b/src/main/resources/assets/rpmachine/textures/blocks/breakerFrontOn.png new file mode 100644 index 0000000..2a22b5b Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/breakerFrontOn.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/breakerSide.png b/src/main/resources/assets/rpmachine/textures/blocks/breakerSide.png new file mode 100644 index 0000000..85e3484 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/breakerSide.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/breakerSideOn.png b/src/main/resources/assets/rpmachine/textures/blocks/breakerSideOn.png new file mode 100644 index 0000000..5e3cc57 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/breakerSideOn.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/btAlloyFurnaceFront.png b/src/main/resources/assets/rpmachine/textures/blocks/btAlloyFurnaceFront.png new file mode 100644 index 0000000..65b69a0 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/btAlloyFurnaceFront.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/btAlloyFurnaceFrontOn.png b/src/main/resources/assets/rpmachine/textures/blocks/btAlloyFurnaceFrontOn.png new file mode 100644 index 0000000..49d6099 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/btAlloyFurnaceFrontOn.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/btAlloyFurnaceSide.png b/src/main/resources/assets/rpmachine/textures/blocks/btAlloyFurnaceSide.png new file mode 100644 index 0000000..1101b6b Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/btAlloyFurnaceSide.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/btAlloyFurnaceTop.png b/src/main/resources/assets/rpmachine/textures/blocks/btAlloyFurnaceTop.png new file mode 100644 index 0000000..46ba778 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/btAlloyFurnaceTop.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/btChargerBottom.png b/src/main/resources/assets/rpmachine/textures/blocks/btChargerBottom.png new file mode 100644 index 0000000..0816732 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/btChargerBottom.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/btChargerFront/0.png b/src/main/resources/assets/rpmachine/textures/blocks/btChargerFront/0.png new file mode 100644 index 0000000..4dc4327 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/btChargerFront/0.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/btChargerFront/1.png b/src/main/resources/assets/rpmachine/textures/blocks/btChargerFront/1.png new file mode 100644 index 0000000..a536d31 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/btChargerFront/1.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/btChargerFront/2.png b/src/main/resources/assets/rpmachine/textures/blocks/btChargerFront/2.png new file mode 100644 index 0000000..7711123 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/btChargerFront/2.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/btChargerFront/3.png b/src/main/resources/assets/rpmachine/textures/blocks/btChargerFront/3.png new file mode 100644 index 0000000..568d0a0 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/btChargerFront/3.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/btChargerFront/4.png b/src/main/resources/assets/rpmachine/textures/blocks/btChargerFront/4.png new file mode 100644 index 0000000..858d326 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/btChargerFront/4.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/btChargerFrontActive/0.png b/src/main/resources/assets/rpmachine/textures/blocks/btChargerFrontActive/0.png new file mode 100644 index 0000000..f96b27f Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/btChargerFrontActive/0.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/btChargerFrontActive/1.png b/src/main/resources/assets/rpmachine/textures/blocks/btChargerFrontActive/1.png new file mode 100644 index 0000000..a098142 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/btChargerFrontActive/1.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/btChargerFrontActive/2.png b/src/main/resources/assets/rpmachine/textures/blocks/btChargerFrontActive/2.png new file mode 100644 index 0000000..1cf2b21 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/btChargerFrontActive/2.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/btChargerFrontActive/3.png b/src/main/resources/assets/rpmachine/textures/blocks/btChargerFrontActive/3.png new file mode 100644 index 0000000..c8551cc Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/btChargerFrontActive/3.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/btChargerFrontActive/4.png b/src/main/resources/assets/rpmachine/textures/blocks/btChargerFrontActive/4.png new file mode 100644 index 0000000..abde225 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/btChargerFrontActive/4.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/btChargerFrontPowered/0.png b/src/main/resources/assets/rpmachine/textures/blocks/btChargerFrontPowered/0.png new file mode 100644 index 0000000..d30e855 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/btChargerFrontPowered/0.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/btChargerFrontPowered/1.png b/src/main/resources/assets/rpmachine/textures/blocks/btChargerFrontPowered/1.png new file mode 100644 index 0000000..3450784 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/btChargerFrontPowered/1.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/btChargerFrontPowered/2.png b/src/main/resources/assets/rpmachine/textures/blocks/btChargerFrontPowered/2.png new file mode 100644 index 0000000..44db0de Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/btChargerFrontPowered/2.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/btChargerFrontPowered/3.png b/src/main/resources/assets/rpmachine/textures/blocks/btChargerFrontPowered/3.png new file mode 100644 index 0000000..94b6939 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/btChargerFrontPowered/3.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/btChargerFrontPowered/4.png b/src/main/resources/assets/rpmachine/textures/blocks/btChargerFrontPowered/4.png new file mode 100644 index 0000000..4c86aae Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/btChargerFrontPowered/4.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/btChargerSide.png b/src/main/resources/assets/rpmachine/textures/blocks/btChargerSide.png new file mode 100644 index 0000000..4a3050b Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/btChargerSide.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/btChargerSideOn.png b/src/main/resources/assets/rpmachine/textures/blocks/btChargerSideOn.png new file mode 100644 index 0000000..4f6ef0c Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/btChargerSideOn.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/btChargerTop.png b/src/main/resources/assets/rpmachine/textures/blocks/btChargerTop.png new file mode 100644 index 0000000..521d86c Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/btChargerTop.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/btChargerTopOn.png b/src/main/resources/assets/rpmachine/textures/blocks/btChargerTopOn.png new file mode 100644 index 0000000..7d0cabb Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/btChargerTopOn.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/btFurnaceFront.png b/src/main/resources/assets/rpmachine/textures/blocks/btFurnaceFront.png new file mode 100644 index 0000000..50dea63 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/btFurnaceFront.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/btFurnaceFrontOn.png b/src/main/resources/assets/rpmachine/textures/blocks/btFurnaceFrontOn.png new file mode 100644 index 0000000..dacd183 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/btFurnaceFrontOn.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/btFurnaceSide.png b/src/main/resources/assets/rpmachine/textures/blocks/btFurnaceSide.png new file mode 100644 index 0000000..f371349 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/btFurnaceSide.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/btFurnaceTop.png b/src/main/resources/assets/rpmachine/textures/blocks/btFurnaceTop.png new file mode 100644 index 0000000..4921a89 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/btFurnaceTop.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/bufferBack.png b/src/main/resources/assets/rpmachine/textures/blocks/bufferBack.png new file mode 100644 index 0000000..43e290a Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/bufferBack.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/bufferFront.png b/src/main/resources/assets/rpmachine/textures/blocks/bufferFront.png new file mode 100644 index 0000000..1d0e358 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/bufferFront.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/bufferSide.png b/src/main/resources/assets/rpmachine/textures/blocks/bufferSide.png new file mode 100644 index 0000000..4ea324d Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/bufferSide.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/crate.png b/src/main/resources/assets/rpmachine/textures/blocks/crate.png new file mode 100644 index 0000000..071de5d Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/crate.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/deployerBack.png b/src/main/resources/assets/rpmachine/textures/blocks/deployerBack.png new file mode 100644 index 0000000..1aa84ca Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/deployerBack.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/deployerFront.png b/src/main/resources/assets/rpmachine/textures/blocks/deployerFront.png new file mode 100644 index 0000000..18da77f Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/deployerFront.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/deployerFrontOn.png b/src/main/resources/assets/rpmachine/textures/blocks/deployerFrontOn.png new file mode 100644 index 0000000..ac6de22 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/deployerFrontOn.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/deployerSide.png b/src/main/resources/assets/rpmachine/textures/blocks/deployerSide.png new file mode 100644 index 0000000..edb3f2e Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/deployerSide.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/deployerSideAlt.png b/src/main/resources/assets/rpmachine/textures/blocks/deployerSideAlt.png new file mode 100644 index 0000000..c2b3b96 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/deployerSideAlt.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/detectorBack.png b/src/main/resources/assets/rpmachine/textures/blocks/detectorBack.png new file mode 100644 index 0000000..bbf96c6 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/detectorBack.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/detectorFront.png b/src/main/resources/assets/rpmachine/textures/blocks/detectorFront.png new file mode 100644 index 0000000..457d4d4 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/detectorFront.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/detectorSide.png b/src/main/resources/assets/rpmachine/textures/blocks/detectorSide.png new file mode 100644 index 0000000..51d10c9 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/detectorSide.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/detectorSideAlt.png b/src/main/resources/assets/rpmachine/textures/blocks/detectorSideAlt.png new file mode 100644 index 0000000..ba327fb Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/detectorSideAlt.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/detectorSideAltOn.png b/src/main/resources/assets/rpmachine/textures/blocks/detectorSideAltOn.png new file mode 100644 index 0000000..6ad2a18 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/detectorSideAltOn.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/detectorSideCharged.png b/src/main/resources/assets/rpmachine/textures/blocks/detectorSideCharged.png new file mode 100644 index 0000000..af2991f Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/detectorSideCharged.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/detectorSideChargedOn.png b/src/main/resources/assets/rpmachine/textures/blocks/detectorSideChargedOn.png new file mode 100644 index 0000000..09cd2e2 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/detectorSideChargedOn.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/detectorSideOn.png b/src/main/resources/assets/rpmachine/textures/blocks/detectorSideOn.png new file mode 100644 index 0000000..20d5991 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/detectorSideOn.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/ejectorSide.png b/src/main/resources/assets/rpmachine/textures/blocks/ejectorSide.png new file mode 100644 index 0000000..1b553a0 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/ejectorSide.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/ejectorSideOn.png b/src/main/resources/assets/rpmachine/textures/blocks/ejectorSideOn.png new file mode 100644 index 0000000..f108695 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/ejectorSideOn.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/electronicsBottom.png b/src/main/resources/assets/rpmachine/textures/blocks/electronicsBottom.png new file mode 100644 index 0000000..e0289b1 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/electronicsBottom.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/filterSide.png b/src/main/resources/assets/rpmachine/textures/blocks/filterSide.png new file mode 100644 index 0000000..e66bccd Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/filterSide.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/filterSideOn.png b/src/main/resources/assets/rpmachine/textures/blocks/filterSideOn.png new file mode 100644 index 0000000..7af81af Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/filterSideOn.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/frameCovered.png b/src/main/resources/assets/rpmachine/textures/blocks/frameCovered.png new file mode 100644 index 0000000..4bab05c Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/frameCovered.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/frameCrossed.png b/src/main/resources/assets/rpmachine/textures/blocks/frameCrossed.png new file mode 100644 index 0000000..4bb1f54 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/frameCrossed.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/framePaneled.png b/src/main/resources/assets/rpmachine/textures/blocks/framePaneled.png new file mode 100644 index 0000000..734a1ea Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/framePaneled.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/grateBack.png b/src/main/resources/assets/rpmachine/textures/blocks/grateBack.png new file mode 100644 index 0000000..62f7deb Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/grateBack.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/grateEmptyBack.png b/src/main/resources/assets/rpmachine/textures/blocks/grateEmptyBack.png new file mode 100644 index 0000000..6c2ddbd Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/grateEmptyBack.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/grateMossySide.png b/src/main/resources/assets/rpmachine/textures/blocks/grateMossySide.png new file mode 100644 index 0000000..a8f8b21 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/grateMossySide.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/grateSide.png b/src/main/resources/assets/rpmachine/textures/blocks/grateSide.png new file mode 100644 index 0000000..2540917 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/grateSide.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/igniterFront.png b/src/main/resources/assets/rpmachine/textures/blocks/igniterFront.png new file mode 100644 index 0000000..eb15e60 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/igniterFront.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/igniterFrontOn.png b/src/main/resources/assets/rpmachine/textures/blocks/igniterFrontOn.png new file mode 100644 index 0000000..22820b4 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/igniterFrontOn.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/igniterSide.png b/src/main/resources/assets/rpmachine/textures/blocks/igniterSide.png new file mode 100644 index 0000000..670f688 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/igniterSide.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/igniterSideAlt.png b/src/main/resources/assets/rpmachine/textures/blocks/igniterSideAlt.png new file mode 100644 index 0000000..700851f Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/igniterSideAlt.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/magneticTubeFace.png b/src/main/resources/assets/rpmachine/textures/blocks/magneticTubeFace.png new file mode 100644 index 0000000..db1264f Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/magneticTubeFace.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/magneticTubeFaceNR.png b/src/main/resources/assets/rpmachine/textures/blocks/magneticTubeFaceNR.png new file mode 100644 index 0000000..ed7f76e Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/magneticTubeFaceNR.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/magneticTubeRing.png b/src/main/resources/assets/rpmachine/textures/blocks/magneticTubeRing.png new file mode 100644 index 0000000..0c62e4c Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/magneticTubeRing.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/magneticTubeSide.png b/src/main/resources/assets/rpmachine/textures/blocks/magneticTubeSide.png new file mode 100644 index 0000000..b7a3f2f Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/magneticTubeSide.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/magneticTubeSideNR.png b/src/main/resources/assets/rpmachine/textures/blocks/magneticTubeSideNR.png new file mode 100644 index 0000000..22586f6 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/magneticTubeSideNR.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/managerBack.png b/src/main/resources/assets/rpmachine/textures/blocks/managerBack.png new file mode 100644 index 0000000..5d40bac Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/managerBack.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/managerFront.png b/src/main/resources/assets/rpmachine/textures/blocks/managerFront.png new file mode 100644 index 0000000..662063e Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/managerFront.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/managerSide/0.png b/src/main/resources/assets/rpmachine/textures/blocks/managerSide/0.png new file mode 100644 index 0000000..325a799 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/managerSide/0.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/managerSide/1.png b/src/main/resources/assets/rpmachine/textures/blocks/managerSide/1.png new file mode 100644 index 0000000..a11a2d1 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/managerSide/1.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/managerSide/2.png b/src/main/resources/assets/rpmachine/textures/blocks/managerSide/2.png new file mode 100644 index 0000000..ebd6324 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/managerSide/2.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/managerSide/3.png b/src/main/resources/assets/rpmachine/textures/blocks/managerSide/3.png new file mode 100644 index 0000000..be65a03 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/managerSide/3.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/managerSideCharged/0.png b/src/main/resources/assets/rpmachine/textures/blocks/managerSideCharged/0.png new file mode 100644 index 0000000..dd88e86 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/managerSideCharged/0.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/managerSideCharged/1.png b/src/main/resources/assets/rpmachine/textures/blocks/managerSideCharged/1.png new file mode 100644 index 0000000..8887c38 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/managerSideCharged/1.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/managerSideCharged/2.png b/src/main/resources/assets/rpmachine/textures/blocks/managerSideCharged/2.png new file mode 100644 index 0000000..d847d47 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/managerSideCharged/2.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/managerSideCharged/3.png b/src/main/resources/assets/rpmachine/textures/blocks/managerSideCharged/3.png new file mode 100644 index 0000000..7c5b7c0 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/managerSideCharged/3.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/motorBottom.png b/src/main/resources/assets/rpmachine/textures/blocks/motorBottom.png new file mode 100644 index 0000000..5bc6e59 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/motorBottom.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/motorFront.png b/src/main/resources/assets/rpmachine/textures/blocks/motorFront.png new file mode 100644 index 0000000..bfb9809 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/motorFront.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/motorFrontActive.png b/src/main/resources/assets/rpmachine/textures/blocks/motorFrontActive.png new file mode 100644 index 0000000..f687041 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/motorFrontActive.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/motorFrontActive.png.mcmeta b/src/main/resources/assets/rpmachine/textures/blocks/motorFrontActive.png.mcmeta new file mode 100644 index 0000000..b799c5d --- /dev/null +++ b/src/main/resources/assets/rpmachine/textures/blocks/motorFrontActive.png.mcmeta @@ -0,0 +1,11 @@ +{ + "animation": { + "frametime": 2, + "frames": [ + 3, + 2, + 1, + 0 + ] + } +} diff --git a/src/main/resources/assets/rpmachine/textures/blocks/motorFrontCharged.png b/src/main/resources/assets/rpmachine/textures/blocks/motorFrontCharged.png new file mode 100644 index 0000000..adb3378 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/motorFrontCharged.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/motorSide.png b/src/main/resources/assets/rpmachine/textures/blocks/motorSide.png new file mode 100644 index 0000000..6b81acd Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/motorSide.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/motorTop.png b/src/main/resources/assets/rpmachine/textures/blocks/motorTop.png new file mode 100644 index 0000000..967b86b Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/motorTop.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/motorTopActive.png b/src/main/resources/assets/rpmachine/textures/blocks/motorTopActive.png new file mode 100644 index 0000000..6ec2160 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/motorTopActive.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/motorTopActive.png.mcmeta b/src/main/resources/assets/rpmachine/textures/blocks/motorTopActive.png.mcmeta new file mode 100644 index 0000000..b799c5d --- /dev/null +++ b/src/main/resources/assets/rpmachine/textures/blocks/motorTopActive.png.mcmeta @@ -0,0 +1,11 @@ +{ + "animation": { + "frametime": 2, + "frames": [ + 3, + 2, + 1, + 0 + ] + } +} diff --git a/src/main/resources/assets/rpmachine/textures/blocks/pipeFace.png b/src/main/resources/assets/rpmachine/textures/blocks/pipeFace.png new file mode 100644 index 0000000..bee5abc Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/pipeFace.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/pipeFlanges.png b/src/main/resources/assets/rpmachine/textures/blocks/pipeFlanges.png new file mode 100644 index 0000000..cdcd7de Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/pipeFlanges.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/pipeSide.png b/src/main/resources/assets/rpmachine/textures/blocks/pipeSide.png new file mode 100644 index 0000000..5097b4c Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/pipeSide.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/redstoneTubeFace/0.png b/src/main/resources/assets/rpmachine/textures/blocks/redstoneTubeFace/0.png new file mode 100644 index 0000000..adefdae Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/redstoneTubeFace/0.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/redstoneTubeFace/1.png b/src/main/resources/assets/rpmachine/textures/blocks/redstoneTubeFace/1.png new file mode 100644 index 0000000..d6c0cb2 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/redstoneTubeFace/1.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/redstoneTubeFace/2.png b/src/main/resources/assets/rpmachine/textures/blocks/redstoneTubeFace/2.png new file mode 100644 index 0000000..c6e6e1d Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/redstoneTubeFace/2.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/redstoneTubeFace/3.png b/src/main/resources/assets/rpmachine/textures/blocks/redstoneTubeFace/3.png new file mode 100644 index 0000000..44e9465 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/redstoneTubeFace/3.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/redstoneTubeSide/0.png b/src/main/resources/assets/rpmachine/textures/blocks/redstoneTubeSide/0.png new file mode 100644 index 0000000..43cb3fa Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/redstoneTubeSide/0.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/redstoneTubeSide/1.png b/src/main/resources/assets/rpmachine/textures/blocks/redstoneTubeSide/1.png new file mode 100644 index 0000000..f6a7c6f Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/redstoneTubeSide/1.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/redstoneTubeSide/2.png b/src/main/resources/assets/rpmachine/textures/blocks/redstoneTubeSide/2.png new file mode 100644 index 0000000..303db22 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/redstoneTubeSide/2.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/redstoneTubeSide/3.png b/src/main/resources/assets/rpmachine/textures/blocks/redstoneTubeSide/3.png new file mode 100644 index 0000000..43d185c Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/redstoneTubeSide/3.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/regulatorBack.png b/src/main/resources/assets/rpmachine/textures/blocks/regulatorBack.png new file mode 100644 index 0000000..bbf96c6 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/regulatorBack.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/regulatorFront.png b/src/main/resources/assets/rpmachine/textures/blocks/regulatorFront.png new file mode 100644 index 0000000..457d4d4 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/regulatorFront.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/regulatorSide.png b/src/main/resources/assets/rpmachine/textures/blocks/regulatorSide.png new file mode 100644 index 0000000..d952280 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/regulatorSide.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/regulatorSideAlt.png b/src/main/resources/assets/rpmachine/textures/blocks/regulatorSideAlt.png new file mode 100644 index 0000000..5542b19 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/regulatorSideAlt.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/regulatorSideAltCharged.png b/src/main/resources/assets/rpmachine/textures/blocks/regulatorSideAltCharged.png new file mode 100644 index 0000000..7a925d1 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/regulatorSideAltCharged.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/regulatorSideCharged.png b/src/main/resources/assets/rpmachine/textures/blocks/regulatorSideCharged.png new file mode 100644 index 0000000..9ec9b5d Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/regulatorSideCharged.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/regulatorSideChargedOn.png b/src/main/resources/assets/rpmachine/textures/blocks/regulatorSideChargedOn.png new file mode 100644 index 0000000..76ecee3 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/regulatorSideChargedOn.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/regulatorSideOn.png b/src/main/resources/assets/rpmachine/textures/blocks/regulatorSideOn.png new file mode 100644 index 0000000..bb7864e Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/regulatorSideOn.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/relaySide.png b/src/main/resources/assets/rpmachine/textures/blocks/relaySide.png new file mode 100644 index 0000000..1ddede8 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/relaySide.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/relaySideAlt.png b/src/main/resources/assets/rpmachine/textures/blocks/relaySideAlt.png new file mode 100644 index 0000000..1a1dccc Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/relaySideAlt.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/relaySideOn.png b/src/main/resources/assets/rpmachine/textures/blocks/relaySideOn.png new file mode 100644 index 0000000..4e855a7 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/relaySideOn.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/restrictionTubeFace.png b/src/main/resources/assets/rpmachine/textures/blocks/restrictionTubeFace.png new file mode 100644 index 0000000..a047595 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/restrictionTubeFace.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/restrictionTubeFaceColor.png b/src/main/resources/assets/rpmachine/textures/blocks/restrictionTubeFaceColor.png new file mode 100644 index 0000000..a32d9a9 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/restrictionTubeFaceColor.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/restrictionTubeSide.png b/src/main/resources/assets/rpmachine/textures/blocks/restrictionTubeSide.png new file mode 100644 index 0000000..99a36fd Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/restrictionTubeSide.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/restrictionTubeSideColor.png b/src/main/resources/assets/rpmachine/textures/blocks/restrictionTubeSideColor.png new file mode 100644 index 0000000..872537f Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/restrictionTubeSideColor.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/retrieverBack.png b/src/main/resources/assets/rpmachine/textures/blocks/retrieverBack.png new file mode 100644 index 0000000..e5aec79 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/retrieverBack.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/retrieverFront.png b/src/main/resources/assets/rpmachine/textures/blocks/retrieverFront.png new file mode 100644 index 0000000..3ccf1c2 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/retrieverFront.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/retrieverSide.png b/src/main/resources/assets/rpmachine/textures/blocks/retrieverSide.png new file mode 100644 index 0000000..4f9f73d Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/retrieverSide.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/retrieverSideCharged.png b/src/main/resources/assets/rpmachine/textures/blocks/retrieverSideCharged.png new file mode 100644 index 0000000..eed7d8e Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/retrieverSideCharged.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/retrieverSideChargedOn.png b/src/main/resources/assets/rpmachine/textures/blocks/retrieverSideChargedOn.png new file mode 100644 index 0000000..b9ebaeb Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/retrieverSideChargedOn.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/retrieverSideOn.png b/src/main/resources/assets/rpmachine/textures/blocks/retrieverSideOn.png new file mode 100644 index 0000000..a2a7bc9 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/retrieverSideOn.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/solarPanelSide.png b/src/main/resources/assets/rpmachine/textures/blocks/solarPanelSide.png new file mode 100644 index 0000000..d33d77c Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/solarPanelSide.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/solarPanelTop.png b/src/main/resources/assets/rpmachine/textures/blocks/solarPanelTop.png new file mode 100644 index 0000000..060d812 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/solarPanelTop.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/sorterBack.png b/src/main/resources/assets/rpmachine/textures/blocks/sorterBack.png new file mode 100644 index 0000000..c5675dc Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/sorterBack.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/sorterBackCharged.png b/src/main/resources/assets/rpmachine/textures/blocks/sorterBackCharged.png new file mode 100644 index 0000000..bcf09cf Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/sorterBackCharged.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/sorterBackChargedOn.png b/src/main/resources/assets/rpmachine/textures/blocks/sorterBackChargedOn.png new file mode 100644 index 0000000..11a5f6e Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/sorterBackChargedOn.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/sorterFront.png b/src/main/resources/assets/rpmachine/textures/blocks/sorterFront.png new file mode 100644 index 0000000..969b783 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/sorterFront.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/sorterSide.png b/src/main/resources/assets/rpmachine/textures/blocks/sorterSide.png new file mode 100644 index 0000000..bdcbe83 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/sorterSide.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/sorterSideCharged.png b/src/main/resources/assets/rpmachine/textures/blocks/sorterSideCharged.png new file mode 100644 index 0000000..677d677 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/sorterSideCharged.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/sorterSideChargedOn.png b/src/main/resources/assets/rpmachine/textures/blocks/sorterSideChargedOn.png new file mode 100644 index 0000000..6d3b395 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/sorterSideChargedOn.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/sorterSideOn.png b/src/main/resources/assets/rpmachine/textures/blocks/sorterSideOn.png new file mode 100644 index 0000000..2933046 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/sorterSideOn.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/sortronBack.png b/src/main/resources/assets/rpmachine/textures/blocks/sortronBack.png new file mode 100644 index 0000000..9a5ff58 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/sortronBack.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/sortronFront.png b/src/main/resources/assets/rpmachine/textures/blocks/sortronFront.png new file mode 100644 index 0000000..baadd4d Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/sortronFront.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/sortronSide.png b/src/main/resources/assets/rpmachine/textures/blocks/sortronSide.png new file mode 100644 index 0000000..4948d9e Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/sortronSide.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/sortronSideAlt.png b/src/main/resources/assets/rpmachine/textures/blocks/sortronSideAlt.png new file mode 100644 index 0000000..8642e05 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/sortronSideAlt.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/sortronSideAltCharged.png b/src/main/resources/assets/rpmachine/textures/blocks/sortronSideAltCharged.png new file mode 100644 index 0000000..e21cf61 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/sortronSideAltCharged.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/sortronSideCharged.png b/src/main/resources/assets/rpmachine/textures/blocks/sortronSideCharged.png new file mode 100644 index 0000000..00306ca Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/sortronSideCharged.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/sortronSideChargedOn.png b/src/main/resources/assets/rpmachine/textures/blocks/sortronSideChargedOn.png new file mode 100644 index 0000000..ebf1fa1 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/sortronSideChargedOn.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/sortronSideOn.png b/src/main/resources/assets/rpmachine/textures/blocks/sortronSideOn.png new file mode 100644 index 0000000..d07c810 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/sortronSideOn.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/thermopileFront.png b/src/main/resources/assets/rpmachine/textures/blocks/thermopileFront.png new file mode 100644 index 0000000..ae96bd2 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/thermopileFront.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/thermopileSide.png b/src/main/resources/assets/rpmachine/textures/blocks/thermopileSide.png new file mode 100644 index 0000000..b07ad3d Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/thermopileSide.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/thermopileTop.png b/src/main/resources/assets/rpmachine/textures/blocks/thermopileTop.png new file mode 100644 index 0000000..f799963 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/thermopileTop.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/transposerFront.png b/src/main/resources/assets/rpmachine/textures/blocks/transposerFront.png new file mode 100644 index 0000000..9903391 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/transposerFront.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/transposerSide.png b/src/main/resources/assets/rpmachine/textures/blocks/transposerSide.png new file mode 100644 index 0000000..3fb03af Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/transposerSide.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/transposerSideOn.png b/src/main/resources/assets/rpmachine/textures/blocks/transposerSideOn.png new file mode 100644 index 0000000..2ccb0da Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/transposerSideOn.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/tubeFace.png b/src/main/resources/assets/rpmachine/textures/blocks/tubeFace.png new file mode 100644 index 0000000..2ff08e0 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/tubeFace.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/tubeFaceColor.png b/src/main/resources/assets/rpmachine/textures/blocks/tubeFaceColor.png new file mode 100644 index 0000000..3a0e78c Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/tubeFaceColor.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/tubeItemOverlay.png b/src/main/resources/assets/rpmachine/textures/blocks/tubeItemOverlay.png new file mode 100644 index 0000000..1344dc0 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/tubeItemOverlay.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/tubeSide.png b/src/main/resources/assets/rpmachine/textures/blocks/tubeSide.png new file mode 100644 index 0000000..1bbebb7 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/tubeSide.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/tubeSideColor.png b/src/main/resources/assets/rpmachine/textures/blocks/tubeSideColor.png new file mode 100644 index 0000000..fce95e5 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/tubeSideColor.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/turbineFront.png b/src/main/resources/assets/rpmachine/textures/blocks/turbineFront.png new file mode 100644 index 0000000..baab32f Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/turbineFront.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/turbineSide.png b/src/main/resources/assets/rpmachine/textures/blocks/turbineSide.png new file mode 100644 index 0000000..6b21262 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/turbineSide.png differ diff --git a/src/main/resources/assets/rpmachine/textures/blocks/turbineSideAlt.png b/src/main/resources/assets/rpmachine/textures/blocks/turbineSideAlt.png new file mode 100644 index 0000000..a7d6aac Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/blocks/turbineSideAlt.png differ diff --git a/src/main/resources/assets/rpmachine/textures/gui/assembler.png b/src/main/resources/assets/rpmachine/textures/gui/assembler.png new file mode 100644 index 0000000..17a727d Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/gui/assembler.png differ diff --git a/src/main/resources/assets/rpmachine/textures/gui/assembler2.png b/src/main/resources/assets/rpmachine/textures/gui/assembler2.png new file mode 100644 index 0000000..608a18f Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/gui/assembler2.png differ diff --git a/src/main/resources/assets/rpmachine/textures/gui/batbox.png b/src/main/resources/assets/rpmachine/textures/gui/batbox.png new file mode 100644 index 0000000..1913a73 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/gui/batbox.png differ diff --git a/src/main/resources/assets/rpmachine/textures/gui/btafurnace.png b/src/main/resources/assets/rpmachine/textures/gui/btafurnace.png new file mode 100644 index 0000000..8fe810a Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/gui/btafurnace.png differ diff --git a/src/main/resources/assets/rpmachine/textures/gui/btfurnace.png b/src/main/resources/assets/rpmachine/textures/gui/btfurnace.png new file mode 100644 index 0000000..faedab1 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/gui/btfurnace.png differ diff --git a/src/main/resources/assets/rpmachine/textures/gui/buffer.png b/src/main/resources/assets/rpmachine/textures/gui/buffer.png new file mode 100644 index 0000000..4713ebc Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/gui/buffer.png differ diff --git a/src/main/resources/assets/rpmachine/textures/gui/charging.png b/src/main/resources/assets/rpmachine/textures/gui/charging.png new file mode 100644 index 0000000..7a39b02 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/gui/charging.png differ diff --git a/src/main/resources/assets/rpmachine/textures/gui/filter.png b/src/main/resources/assets/rpmachine/textures/gui/filter.png new file mode 100644 index 0000000..e38b9f0 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/gui/filter.png differ diff --git a/src/main/resources/assets/rpmachine/textures/gui/filter9.png b/src/main/resources/assets/rpmachine/textures/gui/filter9.png new file mode 100644 index 0000000..3c2074f Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/gui/filter9.png differ diff --git a/src/main/resources/assets/rpmachine/textures/gui/itemdet.png b/src/main/resources/assets/rpmachine/textures/gui/itemdet.png new file mode 100644 index 0000000..4f55bed Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/gui/itemdet.png differ diff --git a/src/main/resources/assets/rpmachine/textures/gui/manager.png b/src/main/resources/assets/rpmachine/textures/gui/manager.png new file mode 100644 index 0000000..767a3bd Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/gui/manager.png differ diff --git a/src/main/resources/assets/rpmachine/textures/gui/regulator.png b/src/main/resources/assets/rpmachine/textures/gui/regulator.png new file mode 100644 index 0000000..201386f Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/gui/regulator.png differ diff --git a/src/main/resources/assets/rpmachine/textures/gui/retriever.png b/src/main/resources/assets/rpmachine/textures/gui/retriever.png new file mode 100644 index 0000000..f812cc1 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/gui/retriever.png differ diff --git a/src/main/resources/assets/rpmachine/textures/gui/sortmachine.png b/src/main/resources/assets/rpmachine/textures/gui/sortmachine.png new file mode 100644 index 0000000..953c2ae Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/gui/sortmachine.png differ diff --git a/src/main/resources/assets/rpmachine/textures/gui/windgui.png b/src/main/resources/assets/rpmachine/textures/gui/windgui.png new file mode 100644 index 0000000..5c51516 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/gui/windgui.png differ diff --git a/src/main/resources/assets/rpmachine/textures/items/battery.png b/src/main/resources/assets/rpmachine/textures/items/battery.png new file mode 100644 index 0000000..53b2783 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/items/battery.png differ diff --git a/src/main/resources/assets/rpmachine/textures/items/emptyBattery.png b/src/main/resources/assets/rpmachine/textures/items/emptyBattery.png new file mode 100644 index 0000000..53b2783 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/items/emptyBattery.png differ diff --git a/src/main/resources/assets/rpmachine/textures/items/sonicScrewdriver.png b/src/main/resources/assets/rpmachine/textures/items/sonicScrewdriver.png new file mode 100644 index 0000000..f7a2e84 Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/items/sonicScrewdriver.png differ diff --git a/src/main/resources/assets/rpmachine/textures/items/voltmeter.png b/src/main/resources/assets/rpmachine/textures/items/voltmeter.png new file mode 100644 index 0000000..4785c1e Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/items/voltmeter.png differ diff --git a/src/main/resources/assets/rpmachine/textures/items/windSailWood.png b/src/main/resources/assets/rpmachine/textures/items/windSailWood.png new file mode 100644 index 0000000..6a6b09d Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/items/windSailWood.png differ diff --git a/src/main/resources/assets/rpmachine/textures/items/windTurbine.png b/src/main/resources/assets/rpmachine/textures/items/windTurbine.png new file mode 100644 index 0000000..4aa176f Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/items/windTurbine.png differ diff --git a/src/main/resources/assets/rpmachine/textures/items/windmill.png b/src/main/resources/assets/rpmachine/textures/items/windmill.png new file mode 100644 index 0000000..c06b03c Binary files /dev/null and b/src/main/resources/assets/rpmachine/textures/items/windmill.png differ diff --git a/src/main/resources/assets/rpwiring/lang/en_US.lang b/src/main/resources/assets/rpwiring/lang/en_US.lang new file mode 100644 index 0000000..efe8368 --- /dev/null +++ b/src/main/resources/assets/rpwiring/lang/en_US.lang @@ -0,0 +1,240 @@ +itemGroup.RPWires=RedPower Wiring and Logic + +achievement.rpIngotRed.desc=Smelt a red alloy ingot +achievement.rpIngotRed=Won't Blow Away\! + +tile.rpwire.name=Red Alloy Wire + +tile.rpinsulated.black.name=Black Insulated Wire +tile.rpinsulated.blue.name=Blue Insulated Wire +tile.rpinsulated.brown.name=Brown Insulated Wire +tile.rpinsulated.cyan.name=Cyan Insulated Wire +tile.rpinsulated.gray.name=Gray Insulated Wire +tile.rpinsulated.green.name=Green Insulated Wire +tile.rpinsulated.lightBlue.name=Light Blue Insulated Wire +tile.rpinsulated.lime.name=Lime Insulated Wire +tile.rpinsulated.magenta.name=Magenta Insulated Wire +tile.rpinsulated.orange.name=Orange Insulated Wire +tile.rpinsulated.pink.name=Pink Insulated Wire +tile.rpinsulated.purple.name=Purple Insulated Wire +tile.rpinsulated.red.name=Red Insulated Wire +tile.rpinsulated.silver.name=Light Gray Insulated Wire +tile.rpinsulated.white.name=White Insulated Wire +tile.rpinsulated.yellow.name=Yellow Insulated Wire + +tile.rpcable.name=Bundled Cable +tile.rpcable.black.name=Black Bundled Cable +tile.rpcable.blue.name=Blue Bundled Cable +tile.rpcable.brown.name=Brown Bundled Cable +tile.rpcable.cyan.name=Cyan Bundled Cable +tile.rpcable.gray.name=Gray Bundled Cable +tile.rpcable.green.name=Green Bundled Cable +tile.rpcable.lightBlue.name=Light Blue Bundled Cable +tile.rpcable.lime.name=Lime Bundled Cable +tile.rpcable.magenta.name=Magenta Bundled Cable +tile.rpcable.orange.name=Orange Bundled Cable +tile.rpcable.pink.name=Pink Bundled Cable +tile.rpcable.purple.name=Purple Bundled Cable +tile.rpcable.red.name=Red Bundled Cable +tile.rpcable.silver.name=Light Gray Bundled Cable +tile.rpcable.white.name=White Bundled Cable +tile.rpcable.yellow.name=Yellow Bundled Cable + +tile.rparmcable.basalt.name=Basalt Jacketed Cable +tile.rparmcable.basaltBrick.name=Basalt Brick Jacketed Cable +tile.rparmcable.basaltCircle.name=Chiseled Basalt Brick Jacketed Cable +tile.rparmcable.basaltCobble.name=Basalt Cobblestone Jacketed Cable +tile.rparmcable.basaltPaver.name=Basalt Paver Jacketed Cable +tile.rparmcable.books.name=Bookshelf Jacketed Cable +tile.rparmcable.brick.name=Brick Jacketed Cable +tile.rparmcable.clay.name=Clay Jacketed Cable +tile.rparmcable.cobble.name=Cobblestone Jacketed Cable +tile.rparmcable.copperBlock.name=Copper Block Jacketed Cable +tile.rparmcable.diamond.name=Diamond Jacketed Cable +tile.rparmcable.dirt.name=Dirt Jacketed Cable +tile.rparmcable.gold.name=Gold Jacketed Cable +tile.rparmcable.greenSapphireBlock.name=Green Sapphire Block Jacketed Cable +tile.rparmcable.iron.name=Iron Jacketed Cable +tile.rparmcable.lapis.name=Lapis Lazuli Jacketed Cable +tile.rparmcable.marble.name=Marble Jacketed Cable +tile.rparmcable.marbleBrick.name=Marble Brick Jacketed Cable +tile.rparmcable.moss.name=Moss Stone Jacketed Cable +tile.rparmcable.netherbrick.name=Nether Brick Jacketed Cable +tile.rparmcable.netherrack.name=Netherrack Jacketed Cable +tile.rparmcable.obsidian.name=Obsidian Jacketed Cable +tile.rparmcable.planks.name=Wooden Plank Jacketed Cable +tile.rparmcable.planks1.name=Wooden Plank Jacketed Cable +tile.rparmcable.planks2.name=Wooden Plank Jacketed Cable +tile.rparmcable.planks3.name=Wooden Plank Jacketed Cable +tile.rparmcable.pumpkin.name=Pumpkin Jacketed Cable +tile.rparmcable.rplog.name=Rubberwood Jacketed Cable +tile.rparmcable.rubyBlock.name=Ruby Block Jacketed Cable +tile.rparmcable.sandstone.name=Sandstone Jacketed Cable +tile.rparmcable.sandstone1.name=Sandstone Jacketed Cable +tile.rparmcable.sandstone2.name=Sandstone Jacketed Cable +tile.rparmcable.sapphireBlock.name=Sapphire Block Jacketed Cable +tile.rparmcable.silverBlock.name=Silver Block Jacketed Cable +tile.rparmcable.slab.name=Polished Stone Jacketed Cable +tile.rparmcable.snow.name=Snow Jacketed Cable +tile.rparmcable.soul.name=Soul Sand Jacketed Cable +tile.rparmcable.stone.name=Stone Jacketed Cable +tile.rparmcable.stonebrick.name=Stone Brick Jacketed Cable +tile.rparmcable.stonebrick1.name=Stone Brick Jacketed Cable +tile.rparmcable.stonebrick2.name=Stone Brick Jacketed Cable +tile.rparmcable.stonebrick3.name=Stone Brick Jacketed Cable +tile.rparmcable.tinBlock.name=Tin Block Jacketed Cable +tile.rparmcable.tungstenBlock.name=Tungsten Block Jacketed Cable +tile.rparmcable.wood.name=Oak Wood Jacketed Cable +tile.rparmcable.wood1.name=Spruce Wood Jacketed Cable +tile.rparmcable.wood2.name=Birch Wood Jacketed Cable +tile.rparmcable.wood3.name=Jungle Wood Jacketed Cable +tile.rparmcable.wool.black.name=Black Wool Jacketed Cable +tile.rparmcable.wool.blue.name=Blue Wool Jacketed Cable +tile.rparmcable.wool.brown.name=Brown Wool Jacketed Cable +tile.rparmcable.wool.cyan.name=Cyan Wool Jacketed Cable +tile.rparmcable.wool.gray.name=Gray Wool Jacketed Cable +tile.rparmcable.wool.green.name=Green Wool Jacketed Cable +tile.rparmcable.wool.lightBlue.name=Light Blue Wool Jacketed Cable +tile.rparmcable.wool.lime.name=Lime Wool Jacketed Cable +tile.rparmcable.wool.magenta.name=Magenta Wool Jacketed Cable +tile.rparmcable.wool.orange.name=Orange Wool Jacketed Cable +tile.rparmcable.wool.pink.name=Pink Wool Jacketed Cable +tile.rparmcable.wool.purple.name=Purple Wool Jacketed Cable +tile.rparmcable.wool.red.name=Red Wool Jacketed Cable +tile.rparmcable.wool.silver.name=Light Gray Wool Jacketed Cable +tile.rparmcable.wool.white.name=White Wool Jacketed Cable +tile.rparmcable.wool.yellow.name=Yellow Wool Jacketed Cable + +tile.rparmwire.basalt.name=Basalt Jacketed Wire +tile.rparmwire.basaltBrick.name=Basalt Brick Jacketed Wire +tile.rparmwire.basaltCircle.name=Chiseled Basalt Brick Jacketed Wire +tile.rparmwire.basaltCobble.name=Basalt Cobblestone Jacketed Wire +tile.rparmwire.basaltPaver.name=Basalt Paver Jacketed Wire +tile.rparmwire.books.name=Bookshelf Jacketed Wire +tile.rparmwire.brick.name=Brick Jacketed Wire +tile.rparmwire.clay.name=Clay Jacketed Wire +tile.rparmwire.cobble.name=Cobblestone Jacketed Wire +tile.rparmwire.copperBlock.name=Copper Block Jacketed Wire +tile.rparmwire.diamond.name=Diamond Jacketed Wire +tile.rparmwire.dirt.name=Dirt Jacketed Wire +tile.rparmwire.gold.name=Gold Jacketed Wire +tile.rparmwire.greenSapphireBlock.name=Green Sapphire Block Jacketed Wire +tile.rparmwire.iron.name=Iron Jacketed Wire +tile.rparmwire.lapis.name=Lapis Lazuli Jacketed Wire +tile.rparmwire.marble.name=Marble Jacketed Wire +tile.rparmwire.marbleBrick.name=Marble Brick Jacketed Wire +tile.rparmwire.moss.name=Moss Stone Jacketed Wire +tile.rparmwire.netherbrick.name=Nether Brick Jacketed Wire +tile.rparmwire.netherrack.name=Netherrack Jacketed Wire +tile.rparmwire.obsidian.name=Obsidian Jacketed Wire +tile.rparmwire.planks.name=Wooden Plank Jacketed Wire +tile.rparmwire.planks1.name=Wooden Plank Jacketed Wire +tile.rparmwire.planks2.name=Wooden Plank Jacketed Wire +tile.rparmwire.planks3.name=Wooden Plank Jacketed Wire +tile.rparmwire.pumpkin.name=Pumpkin Jacketed Wire +tile.rparmwire.rplog.name=Rubberwood Jacketed Wire +tile.rparmwire.rubyBlock.name=Ruby Block Jacketed Wire +tile.rparmwire.sandstone.name=Sandstone Jacketed Wire +tile.rparmwire.sandstone1.name=Sandstone Jacketed Wire +tile.rparmwire.sandstone2.name=Sandstone Jacketed Wire +tile.rparmwire.sapphireBlock.name=Sapphire Block Jacketed Wire +tile.rparmwire.silverBlock.name=Silver Block Jacketed Wire +tile.rparmwire.slab.name=Polished Stone Jacketed Wire +tile.rparmwire.snow.name=Snow Jacketed Wire +tile.rparmwire.soul.name=Soul Sand Jacketed Wire +tile.rparmwire.stone.name=Stone Jacketed Wire +tile.rparmwire.stonebrick.name=Stone Brick Jacketed Wire +tile.rparmwire.stonebrick1.name=Stone Brick Jacketed Wire +tile.rparmwire.stonebrick2.name=Stone Brick Jacketed Wire +tile.rparmwire.stonebrick3.name=Stone Brick Jacketed Wire +tile.rparmwire.tinBlock.name=Tin Block Jacketed Wire +tile.rparmwire.tungstenBlock.name=Tungsten Block Jacketed Wire +tile.rparmwire.wood.name=Oak Wood Jacketed Wire +tile.rparmwire.wood1.name=Spruce Wood Jacketed Wire +tile.rparmwire.wood2.name=Birch Wood Jacketed Wire +tile.rparmwire.wood3.name=Jungle Wood Jacketed Wire +tile.rparmwire.wool.black.name=Black Wool Jacketed Wire +tile.rparmwire.wool.blue.name=Blue Wool Jacketed Wire +tile.rparmwire.wool.brown.name=Brown Wool Jacketed Wire +tile.rparmwire.wool.cyan.name=Cyan Wool Jacketed Wire +tile.rparmwire.wool.gray.name=Gray Wool Jacketed Wire +tile.rparmwire.wool.green.name=Green Wool Jacketed Wire +tile.rparmwire.wool.lightBlue.name=Light Blue Wool Jacketed Wire +tile.rparmwire.wool.lime.name=Lime Wool Jacketed Wire +tile.rparmwire.wool.magenta.name=Magenta Wool Jacketed Wire +tile.rparmwire.wool.orange.name=Orange Wool Jacketed Wire +tile.rparmwire.wool.pink.name=Pink Wool Jacketed Wire +tile.rparmwire.wool.purple.name=Purple Wool Jacketed Wire +tile.rparmwire.wool.red.name=Red Wool Jacketed Wire +tile.rparmwire.wool.silver.name=Light Gray Wool Jacketed Wire +tile.rparmwire.wool.white.name=White Wool Jacketed Wire +tile.rparmwire.wool.yellow.name=Yellow Wool Jacketed Wire + +tile.rparmbwire.basalt.name=Basalt Jacketed Bluewire +tile.rparmbwire.basaltBrick.name=Basalt Brick Jacketed Bluewire +tile.rparmbwire.basaltCircle.name=Chiseled Basalt Brick Jacketed Bluewire +tile.rparmbwire.basaltCobble.name=Basalt Cobblestone Jacketed Bluewire +tile.rparmbwire.basaltPaver.name=Basalt Paver Jacketed Bluewire +tile.rparmbwire.books.name=Bookshelf Jacketed Bluewire +tile.rparmbwire.brick.name=Brick Jacketed Bluewire +tile.rparmbwire.clay.name=Clay Jacketed Bluewire +tile.rparmbwire.cobble.name=Cobblestone Jacketed Bluewire +tile.rparmbwire.copperBlock.name=Copper Block Jacketed Bluewire +tile.rparmbwire.diamond.name=Diamond Jacketed Bluewire +tile.rparmbwire.dirt.name=Dirt Jacketed Bluewire +tile.rparmbwire.gold.name=Gold Jacketed Bluewire +tile.rparmbwire.greenSapphireBlock.name=Green Sapphire Block Jacketed Bluewire +tile.rparmbwire.iron.name=Iron Jacketed Bluewire +tile.rparmbwire.lapis.name=Lapis Lazuli Jacketed Bluewire +tile.rparmbwire.marble.name=Marble Jacketed Bluewire +tile.rparmbwire.marbleBrick.name=Marble Brick Jacketed Bluewire +tile.rparmbwire.moss.name=Moss Stone Jacketed Bluewire +tile.rparmbwire.netherbrick.name=Nether Brick Jacketed Bluewire +tile.rparmbwire.netherrack.name=Netherrack Jacketed Bluewire +tile.rparmbwire.obsidian.name=Obsidian Jacketed Bluewire +tile.rparmbwire.planks.name=Wooden Plank Jacketed Bluewire +tile.rparmbwire.planks1.name=Wooden Plank Jacketed Bluewire +tile.rparmbwire.planks2.name=Wooden Plank Jacketed Bluewire +tile.rparmbwire.planks3.name=Wooden Plank Jacketed Bluewire +tile.rparmbwire.pumpkin.name=Pumpkin Jacketed Bluewire +tile.rparmbwire.rplog.name=Rubberwood Jacketed Bluewire +tile.rparmbwire.rubyBlock.name=Ruby Block Jacketed Bluewire +tile.rparmbwire.sandstone.name=Sandstone Jacketed Bluewire +tile.rparmbwire.sandstone1.name=Sandstone Jacketed Bluewire +tile.rparmbwire.sandstone2.name=Sandstone Jacketed Bluewire +tile.rparmbwire.sapphireBlock.name=Sapphire Block Jacketed Bluewire +tile.rparmbwire.silverBlock.name=Silver Block Jacketed Bluewire +tile.rparmbwire.slab.name=Polished Stone Jacketed Bluewire +tile.rparmbwire.snow.name=Snow Jacketed Bluewire +tile.rparmbwire.soul.name=Soul Sand Jacketed Bluewire +tile.rparmbwire.stone.name=Stone Jacketed Bluewire +tile.rparmbwire.stonebrick.name=Stone Brick Jacketed Bluewire +tile.rparmbwire.stonebrick1.name=Stone Brick Jacketed Bluewire +tile.rparmbwire.stonebrick2.name=Stone Brick Jacketed Bluewire +tile.rparmbwire.stonebrick3.name=Stone Brick Jacketed Bluewire +tile.rparmbwire.tinBlock.name=Tin Block Jacketed Bluewire +tile.rparmbwire.tungstenBlock.name=Tungsten Block Jacketed Bluewire +tile.rparmbwire.wood.name=Oak Wood Jacketed Bluewire +tile.rparmbwire.wood1.name=Spruce Wood Jacketed Bluewire +tile.rparmbwire.wood2.name=Birch Wood Jacketed Bluewire +tile.rparmbwire.wood3.name=Jungle Wood Jacketed Bluewire +tile.rparmbwire.wool.black.name=Black Wool Jacketed Bluewire +tile.rparmbwire.wool.blue.name=Blue Wool Jacketed Bluewire +tile.rparmbwire.wool.brown.name=Brown Wool Jacketed Bluewire +tile.rparmbwire.wool.cyan.name=Cyan Wool Jacketed Bluewire +tile.rparmbwire.wool.gray.name=Gray Wool Jacketed Bluewire +tile.rparmbwire.wool.green.name=Green Wool Jacketed Bluewire +tile.rparmbwire.wool.lightBlue.name=Light Blue Wool Jacketed Bluewire +tile.rparmbwire.wool.lime.name=Lime Wool Jacketed Bluewire +tile.rparmbwire.wool.magenta.name=Magenta Wool Jacketed Bluewire +tile.rparmbwire.wool.orange.name=Orange Wool Jacketed Bluewire +tile.rparmbwire.wool.pink.name=Pink Wool Jacketed Bluewire +tile.rparmbwire.wool.purple.name=Purple Wool Jacketed Bluewire +tile.rparmbwire.wool.red.name=Red Wool Jacketed Bluewire +tile.rparmbwire.wool.silver.name=Light Gray Wool Jacketed Bluewire +tile.rparmbwire.wool.white.name=White Wool Jacketed Bluewire +tile.rparmbwire.wool.yellow.name=Yellow Wool Jacketed Bluewire + +tile.bluewire.name=Blue Alloy Wire +tile.bluewire10.name=10kV Wire +tile.bluewire1M.name=1MV Wire \ No newline at end of file diff --git a/src/main/resources/assets/rpwiring/lang/ru_RU.lang b/src/main/resources/assets/rpwiring/lang/ru_RU.lang new file mode 100644 index 0000000..8cd5a7c --- /dev/null +++ b/src/main/resources/assets/rpwiring/lang/ru_RU.lang @@ -0,0 +1,243 @@ +itemGroup.RPWires=RedPower - Провода и логические элементы + +achievement.rpIngotRed.desc=Выплавить слиток красного сплава +achievement.rpIngotRed=Он не взорвется! + +tile.rpwire.name=Провод из красного сплава + +tile.rpinsulated.black.name=Черный изолированный провод +tile.rpinsulated.blue.name=Синий изолированный провод +tile.rpinsulated.brown.name=Коричневый изолированный провод +tile.rpinsulated.cyan.name=Голубой изолированный провод +tile.rpinsulated.gray.name=Серый изолированный провод +tile.rpinsulated.green.name=Зеленый изолированный провод +tile.rpinsulated.lightBlue.name=Голубой изолированный провод +tile.rpinsulated.lime.name=Салатовый изолированный провод +tile.rpinsulated.magenta.name=Пурпурный изолированный провод +tile.rpinsulated.orange.name=Провод в оболочке из оранжевой шерсти +tile.rpinsulated.pink.name=Розовый изолированный провод +tile.rpinsulated.purple.name=Фиолетовый изолированный провод +tile.rpinsulated.red.name=Красный изолированный провод +tile.rpinsulated.silver.name=Светло-серый изолированный провод +tile.rpinsulated.white.name=Белый изолированный провод +tile.rpinsulated.yellow.name=Желтый изолированный провод + +tile.rpcable.name=Связка проводов +tile.rpcable.black.name=Черная связка проводов +tile.rpcable.blue.name=Синяя связка проводов +tile.rpcable.brown.name=Коричневая связка проводов +tile.rpcable.cyan.name=Голубая связка проводов +tile.rpcable.gray.name=Серая связка проводов +tile.rpcable.green.name=Зеленая связка проводов +tile.rpcable.lightBlue.name=Голубая связка проводов +tile.rpcable.lime.name=Салатовая связка проводов +tile.rpcable.magenta.name=Пурпурная связка проводов +tile.rpcable.orange.name=Оранжевая связка проводов +tile.rpcable.pink.name=Розовая связка проводов +tile.rpcable.purple.name=Фиолетовая связка проводов +tile.rpcable.red.name=Красная связка проводов +tile.rpcable.silver.name=Светло-серая связка проводов +tile.rpcable.white.name=Белая связка проводов +tile.rpcable.yellow.name=Желтая связка проводов + +tile.rparmcable.basalt.name=Связка проводов в оболочке из базальта +tile.rparmcable.basaltBrick.name=Связка проводов в оболочке из базальтового кирпича +tile.rparmcable.basaltCircle.name=Связка проводов в оболочке из резного базальтового кирпича +tile.rparmcable.basaltCobble.name=Связка проводов в оболочке из базальтового булыжника +tile.rparmcable.basaltPaver.name=Связка проводов в оболочке из базальтового асфальта +tile.rparmcable.books.name=Связка проводов в оболочке из книжной полки +tile.rparmcable.brick.name=Связка проводов в оболочке из кирпича +tile.rparmcable.clay.name=Связка проводов в оболочке из глины +tile.rparmcable.cobble.name=Связка проводов в оболочке из булыжника +tile.rparmcable.copperBlock.name=Связка проводов в оболочке из блока меди +tile.rparmcable.diamond.name=Связка проводов в оболочке из алмазного блока +tile.rparmcable.dirt.name=Связка проводов в оболочке из земли +tile.rparmcable.emeraldBlock.name=Связка проводов в оболочке из изумрудного блока +tile.rparmcable.gold.name=Связка проводов в оболочке из блока золота +tile.rparmcable.greenSapphireBlock.name=Провод в оболочке из зеленого сапфирового сапфира +tile.rparmcable.iron.name=Связка проводов в оболочке из блока железа +tile.rparmcable.lapis.name=Связка проводов в оболочке из лазуритового блока +tile.rparmcable.marble.name=Связка проводов в оболочке из мрамора +tile.rparmcable.marbleBrick.name=Связка проводов в оболочке из мраморного кирпича +tile.rparmcable.moss.name=Связка проводов в оболочке из булыжника со мхом +tile.rparmcable.netherbrick.name=Связка проводов в оболочке из адского кирпича +tile.rparmcable.netherrack.name=Связка проводов в оболочке из адского камня +tile.rparmcable.obsidian.name=Связка проводов в оболочке из обсидиана +tile.rparmcable.planks.name=Связка проводов из досок +tile.rparmcable.planks1.name=Связка проводов в оболочке из досок +tile.rparmcable.planks2.name=Связка проводов в оболочке из досок +tile.rparmcable.planks3.name=Связка проводов в оболочке из досок +tile.rparmcable.pumpkin.name=Связка проводов в оболочке из тыквы +tile.rparmcable.rplog.name=Связка проводов в оболочке из каучукового дерева +tile.rparmcable.rubyBlock.name=Связка проводов в оболочке из рубинового блока +tile.rparmcable.sandstone.name=Связка проводов в оболочке из песчаника +tile.rparmcable.sandstone1.name=Связка проводов в оболочке из песчаника +tile.rparmcable.sandstone2.name=Связка проводов в оболочке из песчаника +tile.rparmcable.sapphireBlock.name=Связка проводов в оболочке из сапфирового блока +tile.rparmcable.silverBlock.name=Связка проводов в оболочке из блока серебра +tile.rparmcable.slab.name=Связка проводов в оболочке из каменных ступенек +tile.rparmcable.snow.name=Связка проводов в оболочке из снега +tile.rparmcable.soul.name=Связка проводов в оболочке из песка душ +tile.rparmcable.stone.name=Связка проводов в оболочке из камня +tile.rparmcable.stonebrick.name=Связка проводов в оболочке из каменного кирпича +tile.rparmcable.stonebrick1.name=Связка проводов в оболочке из каменного кирпича +tile.rparmcable.stonebrick2.name=Связка проводов в оболочке из каменного кирпича +tile.rparmcable.stonebrick3.name=Связка проводов в оболочке из каменного кирпича +tile.rparmcable.tinBlock.name=Связка проводов в оболочке из блока олова +tile.rparmcable.tungstenBlock.name=Связка проводов в оболочке из блока вольфрама +tile.rparmcable.wood.name=Связка проводов в оболочке из дерева +tile.rparmcable.wood1.name=Связка проводов в оболочке из дерева +tile.rparmcable.wood2.name=Связка проводов в оболочке из дерева +tile.rparmcable.wood3.name=Связка проводов в оболочке из дерева +tile.rparmcable.wool.black.name=Связка проводов в оболочке из черной шерсти +tile.rparmcable.wool.blue.name=Связка проводов в оболочке из синей шерсти +tile.rparmcable.wool.brown.name=Связка проводов в оболочке из коричневой шерсти +tile.rparmcable.wool.cyan.name=Связка проводов в оболочке из голубой шерсти +tile.rparmcable.wool.gray.name=Связка проводов в оболочке из серой шерсти +tile.rparmcable.wool.green.name=Связка проводов в оболочке из зеленой шерсти +tile.rparmcable.wool.lightBlue.name=Связка проводов в оболочке из голубой шерсти +tile.rparmcable.wool.lime.name=Связка проводов в оболочке из салатовой шерсти +tile.rparmcable.wool.magenta.name=Связка проводов в оболочке из пурпурной шерсти +tile.rparmcable.wool.orange.name=Связка проводов в обочке из оранжевой шерсти +tile.rparmcable.wool.pink.name=Связка проводов в оболочке из розовой шерсти +tile.rparmcable.wool.purple.name=Связка проводов в оболочке из фиолетовой шерсти +tile.rparmcable.wool.red.name=Провод в оболочке из красной шерсти +tile.rparmcable.wool.silver.name=Связка проводов в оболочке из светло-серой шерсти +tile.rparmcable.wool.white.name=Связка проводов в оболочке из белой шерсти +tile.rparmcable.wool.yellow.name=Связка проводов в оболочке из желтой шерсти + +tile.rparmwire.basalt.name=Провод в оболочке из базальта +tile.rparmwire.basaltBrick.name=Провод в оболочке из базальтового кирпича +tile.rparmwire.basaltCircle.name=Провод в оболочке из резного базальтового кирпича +tile.rparmwire.basaltCobble.name=Провод в оболочке из базальтового булыжника +tile.rparmwire.basaltPaver.name=Провод в оболочке из базальтового асфальта +tile.rparmwire.books.name=Провод в оболочке из книжной полки +tile.rparmwire.brick.name=Провод в оболочке из кирпича +tile.rparmwire.clay.name=Провод в оболочке из глины +tile.rparmwire.cobble.name=Провод в оболочке из булыжника +tile.rparmwire.copperBlock.name=Провод в оболочке из блока меди +tile.rparmwire.diamond.name=Провод в оболочке из алмазного блока +tile.rparmwire.dirt.name=Провод в оболочке из земли +tile.rparmwire.emeraldBlock.name=Провод в оболочке из изумрудного блока +tile.rparmwire.gold.name=Провод в оболочке из блока золота +tile.rparmwire.greenSapphireBlock.name=Провод в оболочке из блока зеленого сапфира +tile.rparmwire.iron.name=Провод в оболочке из блока железа +tile.rparmwire.lapis.name=Провод в оболочке из лазуритового блока +tile.rparmwire.marble.name=Провод в оболочке из мрамора +tile.rparmwire.marbleBrick.name=Провод в оболочке из мраморного кирпича +tile.rparmwire.moss.name=Провод в оболочке из булыжника со мхом +tile.rparmwire.netherbrick.name=Провод в оболочке из адского кирпича +tile.rparmwire.netherrack.name=Провод в оболочке из адского камня +tile.rparmwire.obsidian.name=Провод в оболочке из обсидиана +tile.rparmwire.planks.name=Провод в оболочке из досок +tile.rparmwire.planks1.name=Провод в оболочке из досок +tile.rparmwire.planks2.name=Провод в оболочке из досок +tile.rparmwire.planks3.name=Провод в оболочке из досок +tile.rparmwire.pumpkin.name=Провод в оболочке из тыквы +tile.rparmwire.rplog.name=Провод в оболочке из каучукового дерева +tile.rparmwire.rubyBlock.name=Провод в оболочке из рубинового блока +tile.rparmwire.sandstone.name=Провод в оболочке из песчаника +tile.rparmwire.sandstone1.name=Провод в оболочке из песчаника +tile.rparmwire.sandstone2.name=Провод в оболочке из песчаника +tile.rparmwire.sapphireBlock.name=Провод в оболочке из сапфирового блока +tile.rparmwire.silverBlock.name=Провод в оболочке из блока серебра +tile.rparmwire.slab.name=Провод в оболочке из каменых ступенек +tile.rparmwire.snow.name=Провод в оболочке из снега +tile.rparmwire.soul.name=Провод в оболочке из песка душ +tile.rparmwire.stone.name=Провод в оболочке из камня +tile.rparmwire.stonebrick.name=Провод в оболочке из каменного кирпича +tile.rparmwire.stonebrick1.name=Провод в оболчоке из каменного кирпича +tile.rparmwire.stonebrick2.name=Провод в оболочке из каменного кирпича +tile.rparmwire.stonebrick3.name=Провод в оболочке из каменного кирпича +tile.rparmwire.tinBlock.name=Провод в оболочке из блока олова +tile.rparmwire.tungstenBlock.name=Провод в оболочке из блока вольфрама +tile.rparmwire.wood.name=Провод в оболочке из дерева +tile.rparmwire.wood1.name=Провод в оболочке из дерева +tile.rparmwire.wood2.name=Провод в оболочке из дерева +tile.rparmwire.wood3.name=Провод в оболочке из дерева +tile.rparmwire.wool.black.name=Провод в оболочке из черной шерсти +tile.rparmwire.wool.blue.name=Провод в оболочке из синей шерсти +tile.rparmwire.wool.brown.name=Провод в оболочке из коричневой шерсти +tile.rparmwire.wool.cyan.name=Провод в оболочке из голубой шерсти +tile.rparmwire.wool.gray.name=Провод в оболочке из серой шерсти +tile.rparmwire.wool.green.name=Провод в оболочке из зеленой шерсти +tile.rparmwire.wool.lightBlue.name=Провод в оболочке из голубой шерсти +tile.rparmwire.wool.lime.name=Провод в оболочке из салатовой шерсти +tile.rparmwire.wool.magenta.name=Провод в оболочке из пурпурной шерсти +tile.rparmwire.wool.orange.name=Провод в оболочке из оранжевой шерсти +tile.rparmwire.wool.pink.name=Провод в оболочке из розовой шерсти +tile.rparmwire.wool.purple.name=Провод в оболочке и фиолетовой шерсти +tile.rparmwire.wool.red.name=Провод в оболочке из красной шерсти +tile.rparmwire.wool.silver.name=Провод в оболочке из светло-серой шерсти +tile.rparmwire.wool.white.name=Провод в оболочке из белой шерсти +tile.rparmwire.wool.yellow.name=Провод в оболочке из желтой шерсти + +tile.rparmbwire.basalt.name=Блутрический провод в оболочке из базальта +tile.rparmbwire.basaltBrick.name=Блутрический провод в оболочке из базальтового кирпича +tile.rparmbwire.basaltCircle.name=Блутрический провод в оболочке из резного базальтового кирпича +tile.rparmbwire.basaltCobble.name=Блутрический провод в оболочке из базальтового булыжника +tile.rparmbwire.basaltPaver.name=Блутрический провод в оболочке из базальтового асфальта +tile.rparmbwire.books.name=Блутрический провод в оболочке из книжной полки +tile.rparmbwire.brick.name=Блутрический провод в оболочке из кирпича +tile.rparmbwire.clay.name=Блутрический провод в оболочке из глины +tile.rparmbwire.cobble.name=Блутрический провод в оболочке из булыжника +tile.rparmbwire.copperBlock.name=Блутрический провод в оболочке из блока меди +tile.rparmbwire.diamond.name=Блутрический провод в оболочке из алмазного блока +tile.rparmbwire.dirt.name=Блутрический провод в оболочке из земли +tile.rparmbwire.emeraldBlock.name=Блутрический провод в оболочке из изумрудного блока +tile.rparmbwire.gold.name=Блутрический провод в оболочке из блока золота +tile.rparmbwire.greenSapphireBlock.name=Блутрический провод в оболочке из зеленого сапфирового блока +tile.rparmbwire.iron.name=Блутрические проводода в оболочке из блока железа +tile.rparmbwire.lapis.name=Блутрический провод в оболочке из лазуритового блока +tile.rparmbwire.marble.name=Блутрический провод в оболочке из мрамора +tile.rparmbwire.marbleBrick.name=Блутрический провод в оболочке из мраморного кирпича +tile.rparmbwire.moss.name=Блутрический провод в оболочке из булыжника со мхом +tile.rparmbwire.netherbrick.name=Блутрический провод в оболочке из адского кирпича +tile.rparmbwire.netherrack.name=Блутрический провод в оболочке из адского камня +tile.rparmbwire.obsidian.name=Блутрический провод в оболочке из обсидиана +tile.rparmbwire.planks.name=Блутрические рповода в оболочке из досок +tile.rparmbwire.planks1.name=Блутрический провод в оболочке из досок +tile.rparmbwire.planks2.name=Блутрические провоода в оболочке из досок +tile.rparmbwire.planks3.name=Блутрический провод в оболочке из досок +tile.rparmbwire.pumpkin.name=Блутрический провод в оболочке из тыквы +tile.rparmbwire.rplog.name=Блутрический провод в оболочке из каучукового дерева +tile.rparmbwire.rubyBlock.name=Блутрический провод в оболочке из рубинового блока +tile.rparmbwire.sandstone.name=Блутрический провод в оболочке из песчаника +tile.rparmbwire.sandstone1.name=Блутрические повода в оболочке из песчаника +tile.rparmbwire.sandstone2.name=Блутрический провод в оболочке из песчаника +tile.rparmbwire.sapphireBlock.name=Блутрический провод в оболочке из сапфирового блока +tile.rparmbwire.silverBlock.name=Блутрический провод в оболочке из блока серебра +tile.rparmbwire.slab.name=Блутрический провод в оболочке из каменных ступенек +tile.rparmbwire.snow.name=Блутрический провод в оболочке из снега +tile.rparmbwire.soul.name=Блутрический провод в оболочке из песка душ +tile.rparmbwire.stone.name=Блутрический провод в оболочке из камня +tile.rparmbwire.stonebrick.name=Блутрический провод в оболочке из каменного кирпича +tile.rparmbwire.stonebrick1.name=Блутрический провод в оболочке из каменного кирпича +tile.rparmbwire.stonebrick2.name=Блутрический провод в оболочке из каменного кирпича +tile.rparmbwire.stonebrick3.name=Блутрический провод в оболочке из каменного кирпича +tile.rparmbwire.tinBlock.name=Блутрический провод в оболочке из блока олова +tile.rparmbwire.tungstenBlock.name=Блутрический провод в оболочке из блока вольфрама +tile.rparmbwire.wood.name=Блутрический провод в оболочке из дерева +tile.rparmbwire.wood1.name=Блутрический провод в оболочке из дерева +tile.rparmbwire.wood2.name=Блутрические порвода в оболочке из дерева +tile.rparmbwire.wood3.name=Блутрический провод в оболочке из дерева +tile.rparmbwire.wool.black.name=Блутрический провод в оболочке из черной шерсти +tile.rparmbwire.wool.blue.name=Блутрический провод в оболочке из синей шерсти +tile.rparmbwire.wool.brown.name=Блутрический провод в оболочке из коричневой шерсти +tile.rparmbwire.wool.cyan.name=Блутрический провод в оболочке из голубой шерсти +tile.rparmbwire.wool.gray.name=Блутрический провод в оболочке из серой шерсти +tile.rparmbwire.wool.green.name=Блутрический провод в оболочке из зеленой шерсти +tile.rparmbwire.wool.lightBlue.name=Блутрический провод в оболочке из голубой шерсти +tile.rparmbwire.wool.lime.name=Блутрический провод в оболочке из салатовой шерсти +tile.rparmbwire.wool.magenta.name=Блутрический провод в оболочке из пурпуной шерсти +tile.rparmbwire.wool.orange.name=Блутрический провод в оболочке из оранжевой шерсти +tile.rparmbwire.wool.pink.name=Блутрический провод в оболочке из розовой шерсти +tile.rparmbwire.wool.purple.name=Блутрический провод в оболочке из фиолетовой шерсти +tile.rparmbwire.wool.red.name=Блутрический провод в оболочке +tile.rparmbwire.wool.silver.name=Блутрический провод в оболочке из светло-серой шерсти +tile.rparmbwire.wool.white.name=Блутрический провод в оболочке из белой шерсти +tile.rparmbwire.wool.yellow.name=Блутрический провод в оболочке из желтой шерсти + +tile.bluewire.name=Провод из синего сплава +tile.bluewire10.name=Провод на 10кВ +tile.bluewire1M.name=Провод на 1МВ \ No newline at end of file diff --git a/src/main/resources/assets/rpwiring/textures/blocks/bluewireCable.png b/src/main/resources/assets/rpwiring/textures/blocks/bluewireCable.png new file mode 100644 index 0000000..d773b27 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/bluewireCable.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/bundledCable.png b/src/main/resources/assets/rpwiring/textures/blocks/bundledCable.png new file mode 100644 index 0000000..73508b7 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/bundledCable.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/0.png b/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/0.png new file mode 100644 index 0000000..ed70bf4 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/0.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/1.png b/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/1.png new file mode 100644 index 0000000..a4e5941 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/1.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/10.png b/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/10.png new file mode 100644 index 0000000..f3f55ef Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/10.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/11.png b/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/11.png new file mode 100644 index 0000000..43f6df1 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/11.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/12.png b/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/12.png new file mode 100644 index 0000000..84ad9e7 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/12.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/13.png b/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/13.png new file mode 100644 index 0000000..6a54b00 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/13.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/14.png b/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/14.png new file mode 100644 index 0000000..fcdbffe Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/14.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/15.png b/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/15.png new file mode 100644 index 0000000..dedd77c Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/15.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/2.png b/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/2.png new file mode 100644 index 0000000..72111a7 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/2.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/3.png b/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/3.png new file mode 100644 index 0000000..99b228d Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/3.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/4.png b/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/4.png new file mode 100644 index 0000000..df007da Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/4.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/5.png b/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/5.png new file mode 100644 index 0000000..dd81b4f Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/5.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/6.png b/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/6.png new file mode 100644 index 0000000..166035c Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/6.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/7.png b/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/7.png new file mode 100644 index 0000000..d35dac9 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/7.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/8.png b/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/8.png new file mode 100644 index 0000000..f3d70ac Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/8.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/9.png b/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/9.png new file mode 100644 index 0000000..4822d35 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/bundledColFace/9.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/0.png b/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/0.png new file mode 100644 index 0000000..b151b07 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/0.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/1.png b/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/1.png new file mode 100644 index 0000000..6e40fa2 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/1.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/10.png b/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/10.png new file mode 100644 index 0000000..0e045c5 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/10.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/11.png b/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/11.png new file mode 100644 index 0000000..6af1738 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/11.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/12.png b/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/12.png new file mode 100644 index 0000000..f8d87a8 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/12.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/13.png b/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/13.png new file mode 100644 index 0000000..f6467c0 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/13.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/14.png b/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/14.png new file mode 100644 index 0000000..daae6d6 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/14.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/15.png b/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/15.png new file mode 100644 index 0000000..d797b89 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/15.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/2.png b/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/2.png new file mode 100644 index 0000000..d5711c6 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/2.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/3.png b/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/3.png new file mode 100644 index 0000000..474f1db Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/3.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/4.png b/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/4.png new file mode 100644 index 0000000..f8fa0d4 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/4.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/5.png b/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/5.png new file mode 100644 index 0000000..f25c802 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/5.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/6.png b/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/6.png new file mode 100644 index 0000000..1756fa0 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/6.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/7.png b/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/7.png new file mode 100644 index 0000000..2bf40f8 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/7.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/8.png b/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/8.png new file mode 100644 index 0000000..534c655 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/8.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/9.png b/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/9.png new file mode 100644 index 0000000..2a9e5ef Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/bundledColTop/9.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/bundledFace.png b/src/main/resources/assets/rpwiring/textures/blocks/bundledFace.png new file mode 100644 index 0000000..5fadd6c Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/bundledFace.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/bundledTop.png b/src/main/resources/assets/rpwiring/textures/blocks/bundledTop.png new file mode 100644 index 0000000..5c5e078 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/bundledTop.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/highPowerFace.png b/src/main/resources/assets/rpwiring/textures/blocks/highPowerFace.png new file mode 100644 index 0000000..d863860 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/highPowerFace.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/highPowerTop.png b/src/main/resources/assets/rpwiring/textures/blocks/highPowerTop.png new file mode 100644 index 0000000..bae4b16 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/highPowerTop.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/.png new file mode 100644 index 0000000..8e8dbd0 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/0.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/0.png new file mode 100644 index 0000000..c06fe10 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/0.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/1.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/1.png new file mode 100644 index 0000000..96e6788 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/1.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/10.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/10.png new file mode 100644 index 0000000..a3a69d6 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/10.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/11.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/11.png new file mode 100644 index 0000000..ad37b45 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/11.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/12.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/12.png new file mode 100644 index 0000000..4e7cf90 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/12.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/13.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/13.png new file mode 100644 index 0000000..6df0302 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/13.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/14.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/14.png new file mode 100644 index 0000000..88bdf1b Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/14.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/15.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/15.png new file mode 100644 index 0000000..007a714 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/15.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/2.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/2.png new file mode 100644 index 0000000..ea6a451 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/2.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/3.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/3.png new file mode 100644 index 0000000..c74a044 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/3.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/4.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/4.png new file mode 100644 index 0000000..9ae5b99 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/4.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/5.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/5.png new file mode 100644 index 0000000..18c325c Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/5.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/6.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/6.png new file mode 100644 index 0000000..8e8dbd0 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/6.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/7.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/7.png new file mode 100644 index 0000000..9d1b086 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/7.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/8.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/8.png new file mode 100644 index 0000000..84aa73e Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/8.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/9.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/9.png new file mode 100644 index 0000000..7b97dc7 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOff/9.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/0.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/0.png new file mode 100644 index 0000000..a494036 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/0.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/1.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/1.png new file mode 100644 index 0000000..40be4e9 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/1.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/10.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/10.png new file mode 100644 index 0000000..ac901e6 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/10.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/11.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/11.png new file mode 100644 index 0000000..e82cff9 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/11.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/12.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/12.png new file mode 100644 index 0000000..6d2c12a Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/12.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/13.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/13.png new file mode 100644 index 0000000..a067bc6 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/13.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/14.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/14.png new file mode 100644 index 0000000..ce5f712 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/14.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/15.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/15.png new file mode 100644 index 0000000..38c9fad Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/15.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/2.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/2.png new file mode 100644 index 0000000..3983eef Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/2.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/3.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/3.png new file mode 100644 index 0000000..a8ab752 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/3.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/4.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/4.png new file mode 100644 index 0000000..ed2c506 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/4.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/5.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/5.png new file mode 100644 index 0000000..0c48e17 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/5.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/6.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/6.png new file mode 100644 index 0000000..253d308 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/6.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/7.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/7.png new file mode 100644 index 0000000..e15bb2e Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/7.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/8.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/8.png new file mode 100644 index 0000000..eee2790 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/8.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/9.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/9.png new file mode 100644 index 0000000..f2522b5 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedFaceOn/9.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/0.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/0.png new file mode 100644 index 0000000..6f6310a Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/0.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/1.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/1.png new file mode 100644 index 0000000..0b32587 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/1.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/10.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/10.png new file mode 100644 index 0000000..6858b32 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/10.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/11.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/11.png new file mode 100644 index 0000000..390245b Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/11.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/12.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/12.png new file mode 100644 index 0000000..696ca88 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/12.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/13.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/13.png new file mode 100644 index 0000000..27968c4 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/13.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/14.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/14.png new file mode 100644 index 0000000..fab16a2 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/14.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/15.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/15.png new file mode 100644 index 0000000..f6caf5e Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/15.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/2.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/2.png new file mode 100644 index 0000000..7281e5d Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/2.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/3.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/3.png new file mode 100644 index 0000000..1bd9c1b Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/3.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/4.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/4.png new file mode 100644 index 0000000..084a6e9 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/4.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/5.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/5.png new file mode 100644 index 0000000..466a6b7 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/5.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/6.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/6.png new file mode 100644 index 0000000..8bfc2dd Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/6.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/7.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/7.png new file mode 100644 index 0000000..7a283e9 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/7.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/8.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/8.png new file mode 100644 index 0000000..e218efa Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/8.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/9.png b/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/9.png new file mode 100644 index 0000000..cb8b20a Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/insulatedTop/9.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/jumboCent.png b/src/main/resources/assets/rpwiring/textures/blocks/jumboCent.png new file mode 100644 index 0000000..e628cef Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/jumboCent.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/jumboCentSide.png b/src/main/resources/assets/rpwiring/textures/blocks/jumboCentSide.png new file mode 100644 index 0000000..21da7f0 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/jumboCentSide.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/jumboCorners.png b/src/main/resources/assets/rpwiring/textures/blocks/jumboCorners.png new file mode 100644 index 0000000..189224c Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/jumboCorners.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/jumboEnd.png b/src/main/resources/assets/rpwiring/textures/blocks/jumboEnd.png new file mode 100644 index 0000000..91cc718 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/jumboEnd.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/jumboSides.png b/src/main/resources/assets/rpwiring/textures/blocks/jumboSides.png new file mode 100644 index 0000000..5df2d6f Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/jumboSides.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/jumboTop.png b/src/main/resources/assets/rpwiring/textures/blocks/jumboTop.png new file mode 100644 index 0000000..94c6a4a Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/jumboTop.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/powerFace.png b/src/main/resources/assets/rpwiring/textures/blocks/powerFace.png new file mode 100644 index 0000000..147f1a0 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/powerFace.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/powerTop.png b/src/main/resources/assets/rpwiring/textures/blocks/powerTop.png new file mode 100644 index 0000000..16dce46 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/powerTop.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/redwireCableOff.png b/src/main/resources/assets/rpwiring/textures/blocks/redwireCableOff.png new file mode 100644 index 0000000..61e89cd Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/redwireCableOff.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/redwireCableOn.png b/src/main/resources/assets/rpwiring/textures/blocks/redwireCableOn.png new file mode 100644 index 0000000..0e45289 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/redwireCableOn.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/redwireFace.png b/src/main/resources/assets/rpwiring/textures/blocks/redwireFace.png new file mode 100644 index 0000000..cdfa907 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/redwireFace.png differ diff --git a/src/main/resources/assets/rpwiring/textures/blocks/redwireTop.png b/src/main/resources/assets/rpwiring/textures/blocks/redwireTop.png new file mode 100644 index 0000000..3f04264 Binary files /dev/null and b/src/main/resources/assets/rpwiring/textures/blocks/redwireTop.png differ diff --git a/src/main/resources/assets/rpworld/textures/blocks/basalt.png b/src/main/resources/assets/rpworld/textures/blocks/basalt.png new file mode 100644 index 0000000..ef3c432 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/blocks/basalt.png differ diff --git a/src/main/resources/assets/rpworld/textures/blocks/basaltBrick.png b/src/main/resources/assets/rpworld/textures/blocks/basaltBrick.png new file mode 100644 index 0000000..c35ec84 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/blocks/basaltBrick.png differ diff --git a/src/main/resources/assets/rpworld/textures/blocks/basaltCobble.png b/src/main/resources/assets/rpworld/textures/blocks/basaltCobble.png new file mode 100644 index 0000000..691bbd3 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/blocks/basaltCobble.png differ diff --git a/src/main/resources/assets/rpworld/textures/blocks/basaltPaver.png b/src/main/resources/assets/rpworld/textures/blocks/basaltPaver.png new file mode 100644 index 0000000..49d3adf Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/blocks/basaltPaver.png differ diff --git a/src/main/resources/assets/rpworld/textures/blocks/chiseledBasaltBrick.png b/src/main/resources/assets/rpworld/textures/blocks/chiseledBasaltBrick.png new file mode 100644 index 0000000..4ef8e12 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/blocks/chiseledBasaltBrick.png differ diff --git a/src/main/resources/assets/rpworld/textures/blocks/flaxCrop/0.png b/src/main/resources/assets/rpworld/textures/blocks/flaxCrop/0.png new file mode 100644 index 0000000..c6070b6 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/blocks/flaxCrop/0.png differ diff --git a/src/main/resources/assets/rpworld/textures/blocks/flaxCrop/1.png b/src/main/resources/assets/rpworld/textures/blocks/flaxCrop/1.png new file mode 100644 index 0000000..2d37236 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/blocks/flaxCrop/1.png differ diff --git a/src/main/resources/assets/rpworld/textures/blocks/flaxCrop/2.png b/src/main/resources/assets/rpworld/textures/blocks/flaxCrop/2.png new file mode 100644 index 0000000..4b41429 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/blocks/flaxCrop/2.png differ diff --git a/src/main/resources/assets/rpworld/textures/blocks/flaxCrop/3.png b/src/main/resources/assets/rpworld/textures/blocks/flaxCrop/3.png new file mode 100644 index 0000000..bad2bfd Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/blocks/flaxCrop/3.png differ diff --git a/src/main/resources/assets/rpworld/textures/blocks/flaxCrop/4.png b/src/main/resources/assets/rpworld/textures/blocks/flaxCrop/4.png new file mode 100644 index 0000000..53f6809 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/blocks/flaxCrop/4.png differ diff --git a/src/main/resources/assets/rpworld/textures/blocks/flaxCrop/5.png b/src/main/resources/assets/rpworld/textures/blocks/flaxCrop/5.png new file mode 100644 index 0000000..3a8ad03 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/blocks/flaxCrop/5.png differ diff --git a/src/main/resources/assets/rpworld/textures/blocks/indigoFlower.png b/src/main/resources/assets/rpworld/textures/blocks/indigoFlower.png new file mode 100644 index 0000000..4fdf202 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/blocks/indigoFlower.png differ diff --git a/src/main/resources/assets/rpworld/textures/blocks/marble.png b/src/main/resources/assets/rpworld/textures/blocks/marble.png new file mode 100644 index 0000000..304676d Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/blocks/marble.png differ diff --git a/src/main/resources/assets/rpworld/textures/blocks/marbleBrick.png b/src/main/resources/assets/rpworld/textures/blocks/marbleBrick.png new file mode 100644 index 0000000..29b5f31 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/blocks/marbleBrick.png differ diff --git a/src/main/resources/assets/rpworld/textures/blocks/ore/0.png b/src/main/resources/assets/rpworld/textures/blocks/ore/0.png new file mode 100644 index 0000000..1a046b3 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/blocks/ore/0.png differ diff --git a/src/main/resources/assets/rpworld/textures/blocks/ore/1.png b/src/main/resources/assets/rpworld/textures/blocks/ore/1.png new file mode 100644 index 0000000..6cc9c93 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/blocks/ore/1.png differ diff --git a/src/main/resources/assets/rpworld/textures/blocks/ore/2.png b/src/main/resources/assets/rpworld/textures/blocks/ore/2.png new file mode 100644 index 0000000..c635305 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/blocks/ore/2.png differ diff --git a/src/main/resources/assets/rpworld/textures/blocks/ore/3.png b/src/main/resources/assets/rpworld/textures/blocks/ore/3.png new file mode 100644 index 0000000..c1048ca Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/blocks/ore/3.png differ diff --git a/src/main/resources/assets/rpworld/textures/blocks/ore/4.png b/src/main/resources/assets/rpworld/textures/blocks/ore/4.png new file mode 100644 index 0000000..0f0e63e Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/blocks/ore/4.png differ diff --git a/src/main/resources/assets/rpworld/textures/blocks/ore/5.png b/src/main/resources/assets/rpworld/textures/blocks/ore/5.png new file mode 100644 index 0000000..fbd2a36 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/blocks/ore/5.png differ diff --git a/src/main/resources/assets/rpworld/textures/blocks/ore/6.png b/src/main/resources/assets/rpworld/textures/blocks/ore/6.png new file mode 100644 index 0000000..fffabf9 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/blocks/ore/6.png differ diff --git a/src/main/resources/assets/rpworld/textures/blocks/ore/7.png b/src/main/resources/assets/rpworld/textures/blocks/ore/7.png new file mode 100644 index 0000000..13b0aa1 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/blocks/ore/7.png differ diff --git a/src/main/resources/assets/rpworld/textures/blocks/rubberLeaves_opaque.png b/src/main/resources/assets/rpworld/textures/blocks/rubberLeaves_opaque.png new file mode 100644 index 0000000..60c7a91 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/blocks/rubberLeaves_opaque.png differ diff --git a/src/main/resources/assets/rpworld/textures/blocks/rubberLeaves_transparent.png b/src/main/resources/assets/rpworld/textures/blocks/rubberLeaves_transparent.png new file mode 100644 index 0000000..ea379b8 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/blocks/rubberLeaves_transparent.png differ diff --git a/src/main/resources/assets/rpworld/textures/blocks/rubberLogSide.png b/src/main/resources/assets/rpworld/textures/blocks/rubberLogSide.png new file mode 100644 index 0000000..efaa9c8 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/blocks/rubberLogSide.png differ diff --git a/src/main/resources/assets/rpworld/textures/blocks/rubberLogTop.png b/src/main/resources/assets/rpworld/textures/blocks/rubberLogTop.png new file mode 100644 index 0000000..d4203eb Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/blocks/rubberLogTop.png differ diff --git a/src/main/resources/assets/rpworld/textures/blocks/rubberSapling.png b/src/main/resources/assets/rpworld/textures/blocks/rubberSapling.png new file mode 100644 index 0000000..aa565ed Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/blocks/rubberSapling.png differ diff --git a/src/main/resources/assets/rpworld/textures/blocks/storage/0.png b/src/main/resources/assets/rpworld/textures/blocks/storage/0.png new file mode 100644 index 0000000..d28b2d9 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/blocks/storage/0.png differ diff --git a/src/main/resources/assets/rpworld/textures/blocks/storage/1.png b/src/main/resources/assets/rpworld/textures/blocks/storage/1.png new file mode 100644 index 0000000..838f49e Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/blocks/storage/1.png differ diff --git a/src/main/resources/assets/rpworld/textures/blocks/storage/2.png b/src/main/resources/assets/rpworld/textures/blocks/storage/2.png new file mode 100644 index 0000000..32591a0 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/blocks/storage/2.png differ diff --git a/src/main/resources/assets/rpworld/textures/blocks/storage/3.png b/src/main/resources/assets/rpworld/textures/blocks/storage/3.png new file mode 100644 index 0000000..d31fd60 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/blocks/storage/3.png differ diff --git a/src/main/resources/assets/rpworld/textures/blocks/storage/4.png b/src/main/resources/assets/rpworld/textures/blocks/storage/4.png new file mode 100644 index 0000000..32c8a00 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/blocks/storage/4.png differ diff --git a/src/main/resources/assets/rpworld/textures/blocks/storage/5.png b/src/main/resources/assets/rpworld/textures/blocks/storage/5.png new file mode 100644 index 0000000..79a47a8 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/blocks/storage/5.png differ diff --git a/src/main/resources/assets/rpworld/textures/blocks/storage/6.png b/src/main/resources/assets/rpworld/textures/blocks/storage/6.png new file mode 100644 index 0000000..637c184 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/blocks/storage/6.png differ diff --git a/src/main/resources/assets/rpworld/textures/blocks/storage/7.png b/src/main/resources/assets/rpworld/textures/blocks/storage/7.png new file mode 100644 index 0000000..e94042c Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/blocks/storage/7.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/athame.png b/src/main/resources/assets/rpworld/textures/items/athame.png new file mode 100644 index 0000000..bfe354b Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/athame.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/axeGreenSapphire.png b/src/main/resources/assets/rpworld/textures/items/axeGreenSapphire.png new file mode 100644 index 0000000..bc7ec63 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/axeGreenSapphire.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/axeRuby.png b/src/main/resources/assets/rpworld/textures/items/axeRuby.png new file mode 100644 index 0000000..1d77772 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/axeRuby.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/axeSapphire.png b/src/main/resources/assets/rpworld/textures/items/axeSapphire.png new file mode 100644 index 0000000..c8d80f0 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/axeSapphire.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/brushDry.png b/src/main/resources/assets/rpworld/textures/items/brushDry.png new file mode 100644 index 0000000..4462757 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/brushDry.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/handsawDiamond.png b/src/main/resources/assets/rpworld/textures/items/handsawDiamond.png new file mode 100644 index 0000000..a65a2da Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/handsawDiamond.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/handsawGreenSapphire.png b/src/main/resources/assets/rpworld/textures/items/handsawGreenSapphire.png new file mode 100644 index 0000000..bf939d8 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/handsawGreenSapphire.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/handsawIron.png b/src/main/resources/assets/rpworld/textures/items/handsawIron.png new file mode 100644 index 0000000..1319ca4 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/handsawIron.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/handsawRuby.png b/src/main/resources/assets/rpworld/textures/items/handsawRuby.png new file mode 100644 index 0000000..a5e539d Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/handsawRuby.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/handsawSapphire.png b/src/main/resources/assets/rpworld/textures/items/handsawSapphire.png new file mode 100644 index 0000000..a7db0f0 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/handsawSapphire.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/hoeGreenSapphire.png b/src/main/resources/assets/rpworld/textures/items/hoeGreenSapphire.png new file mode 100644 index 0000000..f08d33d Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/hoeGreenSapphire.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/hoeRuby.png b/src/main/resources/assets/rpworld/textures/items/hoeRuby.png new file mode 100644 index 0000000..8f38109 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/hoeRuby.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/hoeSapphire.png b/src/main/resources/assets/rpworld/textures/items/hoeSapphire.png new file mode 100644 index 0000000..958eb82 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/hoeSapphire.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/itemSeedsFlax.png b/src/main/resources/assets/rpworld/textures/items/itemSeedsFlax.png new file mode 100644 index 0000000..c695b00 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/itemSeedsFlax.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/paintBrush/0.png b/src/main/resources/assets/rpworld/textures/items/paintBrush/0.png new file mode 100644 index 0000000..2e1f748 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/paintBrush/0.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/paintBrush/1.png b/src/main/resources/assets/rpworld/textures/items/paintBrush/1.png new file mode 100644 index 0000000..ed42f84 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/paintBrush/1.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/paintBrush/10.png b/src/main/resources/assets/rpworld/textures/items/paintBrush/10.png new file mode 100644 index 0000000..dd278e2 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/paintBrush/10.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/paintBrush/11.png b/src/main/resources/assets/rpworld/textures/items/paintBrush/11.png new file mode 100644 index 0000000..7d7fcbc Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/paintBrush/11.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/paintBrush/12.png b/src/main/resources/assets/rpworld/textures/items/paintBrush/12.png new file mode 100644 index 0000000..193c0eb Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/paintBrush/12.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/paintBrush/13.png b/src/main/resources/assets/rpworld/textures/items/paintBrush/13.png new file mode 100644 index 0000000..6188ba5 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/paintBrush/13.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/paintBrush/14.png b/src/main/resources/assets/rpworld/textures/items/paintBrush/14.png new file mode 100644 index 0000000..ee0840a Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/paintBrush/14.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/paintBrush/15.png b/src/main/resources/assets/rpworld/textures/items/paintBrush/15.png new file mode 100644 index 0000000..14bcc19 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/paintBrush/15.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/paintBrush/2.png b/src/main/resources/assets/rpworld/textures/items/paintBrush/2.png new file mode 100644 index 0000000..ef3c71e Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/paintBrush/2.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/paintBrush/3.png b/src/main/resources/assets/rpworld/textures/items/paintBrush/3.png new file mode 100644 index 0000000..f93ed68 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/paintBrush/3.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/paintBrush/4.png b/src/main/resources/assets/rpworld/textures/items/paintBrush/4.png new file mode 100644 index 0000000..4f44249 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/paintBrush/4.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/paintBrush/5.png b/src/main/resources/assets/rpworld/textures/items/paintBrush/5.png new file mode 100644 index 0000000..2935221 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/paintBrush/5.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/paintBrush/6.png b/src/main/resources/assets/rpworld/textures/items/paintBrush/6.png new file mode 100644 index 0000000..2b400ad Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/paintBrush/6.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/paintBrush/7.png b/src/main/resources/assets/rpworld/textures/items/paintBrush/7.png new file mode 100644 index 0000000..2ee7e03 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/paintBrush/7.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/paintBrush/8.png b/src/main/resources/assets/rpworld/textures/items/paintBrush/8.png new file mode 100644 index 0000000..25b7211 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/paintBrush/8.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/paintBrush/9.png b/src/main/resources/assets/rpworld/textures/items/paintBrush/9.png new file mode 100644 index 0000000..21323cb Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/paintBrush/9.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/paintCan/0.png b/src/main/resources/assets/rpworld/textures/items/paintCan/0.png new file mode 100644 index 0000000..8f1043e Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/paintCan/0.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/paintCan/1.png b/src/main/resources/assets/rpworld/textures/items/paintCan/1.png new file mode 100644 index 0000000..2d49f7a Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/paintCan/1.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/paintCan/10.png b/src/main/resources/assets/rpworld/textures/items/paintCan/10.png new file mode 100644 index 0000000..3025211 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/paintCan/10.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/paintCan/11.png b/src/main/resources/assets/rpworld/textures/items/paintCan/11.png new file mode 100644 index 0000000..4c37c86 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/paintCan/11.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/paintCan/12.png b/src/main/resources/assets/rpworld/textures/items/paintCan/12.png new file mode 100644 index 0000000..4430497 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/paintCan/12.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/paintCan/13.png b/src/main/resources/assets/rpworld/textures/items/paintCan/13.png new file mode 100644 index 0000000..c98e3c4 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/paintCan/13.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/paintCan/14.png b/src/main/resources/assets/rpworld/textures/items/paintCan/14.png new file mode 100644 index 0000000..53ff450 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/paintCan/14.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/paintCan/15.png b/src/main/resources/assets/rpworld/textures/items/paintCan/15.png new file mode 100644 index 0000000..d6c03f8 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/paintCan/15.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/paintCan/2.png b/src/main/resources/assets/rpworld/textures/items/paintCan/2.png new file mode 100644 index 0000000..482078a Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/paintCan/2.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/paintCan/3.png b/src/main/resources/assets/rpworld/textures/items/paintCan/3.png new file mode 100644 index 0000000..00ecd99 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/paintCan/3.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/paintCan/4.png b/src/main/resources/assets/rpworld/textures/items/paintCan/4.png new file mode 100644 index 0000000..adffe24 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/paintCan/4.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/paintCan/5.png b/src/main/resources/assets/rpworld/textures/items/paintCan/5.png new file mode 100644 index 0000000..cc87f5f Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/paintCan/5.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/paintCan/6.png b/src/main/resources/assets/rpworld/textures/items/paintCan/6.png new file mode 100644 index 0000000..a9b2cf2 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/paintCan/6.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/paintCan/7.png b/src/main/resources/assets/rpworld/textures/items/paintCan/7.png new file mode 100644 index 0000000..4e8ff0b Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/paintCan/7.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/paintCan/8.png b/src/main/resources/assets/rpworld/textures/items/paintCan/8.png new file mode 100644 index 0000000..fe297b0 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/paintCan/8.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/paintCan/9.png b/src/main/resources/assets/rpworld/textures/items/paintCan/9.png new file mode 100644 index 0000000..efaa880 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/paintCan/9.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/paintCanEmpty.png b/src/main/resources/assets/rpworld/textures/items/paintCanEmpty.png new file mode 100644 index 0000000..3832777 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/paintCanEmpty.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/pickaxeGreenSapphire.png b/src/main/resources/assets/rpworld/textures/items/pickaxeGreenSapphire.png new file mode 100644 index 0000000..5bebf48 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/pickaxeGreenSapphire.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/pickaxeRuby.png b/src/main/resources/assets/rpworld/textures/items/pickaxeRuby.png new file mode 100644 index 0000000..6a42dc2 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/pickaxeRuby.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/pickaxeSapphire.png b/src/main/resources/assets/rpworld/textures/items/pickaxeSapphire.png new file mode 100644 index 0000000..6682824 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/pickaxeSapphire.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/seedBagEmpty.png b/src/main/resources/assets/rpworld/textures/items/seedBagEmpty.png new file mode 100644 index 0000000..306948d Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/seedBagEmpty.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/seedBagFull.png b/src/main/resources/assets/rpworld/textures/items/seedBagFull.png new file mode 100644 index 0000000..4bb56f7 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/seedBagFull.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/seedsFlax.png b/src/main/resources/assets/rpworld/textures/items/seedsFlax.png new file mode 100644 index 0000000..c695b00 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/seedsFlax.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/shovelGreenSapphire.png b/src/main/resources/assets/rpworld/textures/items/shovelGreenSapphire.png new file mode 100644 index 0000000..d9b5a9c Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/shovelGreenSapphire.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/shovelRuby.png b/src/main/resources/assets/rpworld/textures/items/shovelRuby.png new file mode 100644 index 0000000..89e89e4 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/shovelRuby.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/shovelSapphire.png b/src/main/resources/assets/rpworld/textures/items/shovelSapphire.png new file mode 100644 index 0000000..1577df4 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/shovelSapphire.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/sickleDiamond.png b/src/main/resources/assets/rpworld/textures/items/sickleDiamond.png new file mode 100644 index 0000000..f6663fa Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/sickleDiamond.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/sickleGold.png b/src/main/resources/assets/rpworld/textures/items/sickleGold.png new file mode 100644 index 0000000..769b6a5 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/sickleGold.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/sickleGreenSapphire.png b/src/main/resources/assets/rpworld/textures/items/sickleGreenSapphire.png new file mode 100644 index 0000000..7b3fd23 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/sickleGreenSapphire.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/sickleIron.png b/src/main/resources/assets/rpworld/textures/items/sickleIron.png new file mode 100644 index 0000000..b5dcfda Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/sickleIron.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/sickleRuby.png b/src/main/resources/assets/rpworld/textures/items/sickleRuby.png new file mode 100644 index 0000000..5110586 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/sickleRuby.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/sickleSapphire.png b/src/main/resources/assets/rpworld/textures/items/sickleSapphire.png new file mode 100644 index 0000000..c415501 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/sickleSapphire.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/sickleStone.png b/src/main/resources/assets/rpworld/textures/items/sickleStone.png new file mode 100644 index 0000000..7f783be Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/sickleStone.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/sickleWood.png b/src/main/resources/assets/rpworld/textures/items/sickleWood.png new file mode 100644 index 0000000..fb15b6b Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/sickleWood.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/swordGreenSapphire.png b/src/main/resources/assets/rpworld/textures/items/swordGreenSapphire.png new file mode 100644 index 0000000..053dcfd Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/swordGreenSapphire.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/swordRuby.png b/src/main/resources/assets/rpworld/textures/items/swordRuby.png new file mode 100644 index 0000000..2019a67 Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/swordRuby.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/swordSapphire.png b/src/main/resources/assets/rpworld/textures/items/swordSapphire.png new file mode 100644 index 0000000..d1d6dae Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/swordSapphire.png differ diff --git a/src/main/resources/assets/rpworld/textures/items/woolCard.png b/src/main/resources/assets/rpworld/textures/items/woolCard.png new file mode 100644 index 0000000..17af50c Binary files /dev/null and b/src/main/resources/assets/rpworld/textures/items/woolCard.png differ diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info new file mode 100644 index 0000000..368ff77 --- /dev/null +++ b/src/main/resources/mcmod.info @@ -0,0 +1,136 @@ +[ +{ + "modid": "RedPowerCore", + "name": "RedPower", + "description": "Power your world, comrade!", + "version": "2.0 Prerelease 6", + "credits": "Made by Eloraam. Ported by Radviger.", + "logoFile": "assets/rpbase/rpbanner.png", + + "url": "http://www.eloraam.com/", + "authors": [ "Eloraam" ], + "dependencies": [ + "mod_MinecraftForge" + ] +}, +{ + "modid": "RedPowerBase", + "name": "RP Base", + "description": "Power your world, comrade! (Core items)", + "version": "", + "credits": "Made by Eloraam. Ported by Radviger", + "logoFile": "assets/rpbase/rpbanner.png", + + "url": "http://www.eloraam.com/", + "authors": [ "Eloraam" ], + "parent": "RedPowerCore", + "dependencies": [ + "mod_MinecraftForge" + ] +}, +{ + "modid": "RedPowerWiring", + "name": "RP Wiring", + "description": "Power your world, comrade! (Wires)", + "version": "", + "credits": "Made by Eloraam. Ported by Radviger", + "logoFile": "assets/rpbase/rpbanner.png", + + "url": "http://www.eloraam.com/", + "authors": [ "Eloraam" ], + "parent": "RedPowerCore", + "dependencies": [ + "mod_MinecraftForge" + ] +}, +{ + "modid": "RedPowerLogic", + "name": "RP Logic", + "description": "Power your world, comrade! (Logic Gates)", + "version": "", + "credits": "Made by Eloraam. Ported by Radviger", + "logoFile": "assets/rpbase/rpbanner.png", + + "url": "http://www.eloraam.com/", + "authors": [ "Eloraam" ], + "parent": "RedPowerCore", + "dependencies": [ + "mod_MinecraftForge" + ] +}, +{ + "modid": "RedPowerLighting", + "name": "RP Lighting", + "description": "Power your world, comrade! (Lighting)", + "version": "", + "credits": "Made by Eloraam. Ported by Radviger", + "logoFile": "assets/rpbase/rpbanner.png", + + "url": "http://www.eloraam.com/", + "authors": [ "Eloraam" ], + "parent": "RedPowerCore", + "dependencies": [ + "mod_MinecraftForge" + ] +}, +{ + "modid": "RedPowerWorld", + "name": "RP World", + "description": "Power your world, comrade! (World Gen)", + "version": "", + "credits": "Made by Eloraam. Ported by Radviger", + "logoFile": "assets/rpbase/rpbanner.png", + + "url": "http://www.eloraam.com/", + "authors": [ "Eloraam" ], + "parent": "RedPowerCore", + "dependencies": [ + "mod_MinecraftForge" + ] +}, +{ + "modid": "RedPowerMachine", + "name": "RP Machine", + "description": "Power your world, comrade! (Machines)", + "version": "", + "credits": "Made by Eloraam. Ported by Radviger", + "logoFile": "assets/rpbase/rpbanner.png", + + "url": "http://www.eloraam.com/", + "authors": [ "Eloraam" ], + "parent": "RedPowerCore", + "dependencies": [ + "mod_MinecraftForge" + ] +}, +{ + "modid": "RedPowerControl", + "name": "RP Control", + "description": "Power your world, comrade! (Computers)", + "version": "", + "credits": "Made by Eloraam. Ported by Radviger", + "logoFile": "assets/rpbase/rpbanner.png", + + "url": "http://www.eloraam.com/", + "authors": [ "Eloraam" ], + "parent": "RedPowerCore", + "dependencies": [ + "mod_MinecraftForge" + ] +}, +{ + "modid": "RedPowerCompat", + "name": "RP Compat", + "description": "Power your world, comrade! (Compatibility)", + "version": "", + "credits": "Made by Eloraam. Ported by Radviger", + "logoFile": "assets/rpbase/rpbanner.png", + + "url": "http://www.eloraam.com/", + "authors": [ "Eloraam" ], + "parent": "RedPowerCore", + "dependencies": [ + "mod_MinecraftForge" + ] +} +]