mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-28 15:46:01 +00:00
commit
e20674dfff
41 files changed
+184
-162
No files matched your search
@@ -6,7 +6,14 @@ output
|
||||
|
||||
Mekanism*.jar
|
||||
MDK.zip
|
||||
/run
|
||||
/gradle
|
||||
*.bat
|
||||
*.classpath
|
||||
*.project
|
||||
/.settings
|
||||
|
||||
*.mtl
|
||||
*.blend1
|
||||
*.blend2
|
||||
/bin
|
||||
@@ -1,5 +1,7 @@
|
||||
package mekanism.api;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
@@ -169,13 +171,18 @@ public class Coord4D
|
||||
|
||||
/**
|
||||
* Returns a new Coord4D from a tag compound.
|
||||
* @param nbtTags - tag compound to read from
|
||||
* @param data - tag compound to read from
|
||||
* @return the Coord4D from the tag compound
|
||||
*/
|
||||
public static Coord4D read(NBTTagCompound nbtTags)
|
||||
public static Coord4D read(ByteBuf data)
|
||||
{
|
||||
return new Coord4D(nbtTags.getInteger("x"), nbtTags.getInteger("y"), nbtTags.getInteger("z"), nbtTags.getInteger("dimensionId"));
|
||||
return new Coord4D(data.readInt(), data.readInt(), data.readInt(), data.readInt());
|
||||
}
|
||||
|
||||
public static Coord4D read(NBTTagCompound tag)
|
||||
{
|
||||
return new Coord4D(tag.getInteger("x"), tag.getInteger("y"), tag.getInteger("z"), tag.getInteger("id"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new Coord4D from a ByteArrayDataInput.
|
||||
|
||||
@@ -17,7 +17,7 @@ public class MekanismAPI
|
||||
{
|
||||
for(ItemInfo i : cardboardBoxIgnore)
|
||||
{
|
||||
if(i.block == item && (i.meta == OreDictionary.WILDCARD_VALUE || i.meta == meta))
|
||||
if(i.block == Block.getBlockFromItem(item) && (i.meta == OreDictionary.WILDCARD_VALUE || i.meta == meta))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ import mekanism.client.gui.GuiProgress.ProgressBar;
|
||||
import mekanism.client.gui.GuiSlot.SlotOverlay;
|
||||
import mekanism.client.gui.GuiSlot.SlotType;
|
||||
import mekanism.client.render.MekanismRenderer;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.inventory.container.ContainerChemicalCrystallizer;
|
||||
import mekanism.common.network.PacketTileEntity;
|
||||
@@ -158,7 +159,7 @@ public class GuiChemicalCrystallizer extends GuiMekanism
|
||||
data.add(0);
|
||||
|
||||
Mekanism.packetPipeline.sendToServer(new PacketTileEntity(Coord4D.get(tileEntity), data));
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ import java.util.List;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.ListUtils;
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mekanism.api.gas.GasTank;
|
||||
import mekanism.client.gui.GuiEnergyInfo.IInfoHandler;
|
||||
import mekanism.client.gui.GuiGasGauge.IGasInfoHandler;
|
||||
@@ -13,15 +12,13 @@ import mekanism.client.gui.GuiProgress.IProgressInfoHandler;
|
||||
import mekanism.client.gui.GuiProgress.ProgressBar;
|
||||
import mekanism.client.gui.GuiSlot.SlotOverlay;
|
||||
import mekanism.client.gui.GuiSlot.SlotType;
|
||||
import mekanism.client.render.MekanismRenderer;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.inventory.container.ContainerChemicalInfuser;
|
||||
import mekanism.common.network.PacketTileEntity;
|
||||
import mekanism.common.tile.TileEntityChemicalInfuser;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@@ -132,7 +129,7 @@ public class GuiChemicalInfuser extends GuiMekanism
|
||||
data.add(0);
|
||||
|
||||
Mekanism.packetPipeline.sendToServer(new PacketTileEntity(Coord4D.get(tileEntity), data));
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
}
|
||||
else if(xAxis > 114 && xAxis < 132 && yAxis > 13 && yAxis < 21)
|
||||
{
|
||||
@@ -140,7 +137,7 @@ public class GuiChemicalInfuser extends GuiMekanism
|
||||
data.add(1);
|
||||
|
||||
Mekanism.packetPipeline.sendToServer(new PacketTileEntity(Coord4D.get(tileEntity), data));
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ import java.util.List;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.ListUtils;
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mekanism.api.gas.GasTank;
|
||||
import mekanism.client.gui.GuiEnergyInfo.IInfoHandler;
|
||||
import mekanism.client.gui.GuiFluidGauge.IFluidInfoHandler;
|
||||
@@ -15,15 +14,13 @@ import mekanism.client.gui.GuiProgress.IProgressInfoHandler;
|
||||
import mekanism.client.gui.GuiProgress.ProgressBar;
|
||||
import mekanism.client.gui.GuiSlot.SlotOverlay;
|
||||
import mekanism.client.gui.GuiSlot.SlotType;
|
||||
import mekanism.client.render.MekanismRenderer;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.inventory.container.ContainerChemicalWasher;
|
||||
import mekanism.common.network.PacketTileEntity;
|
||||
import mekanism.common.tile.TileEntityChemicalWasher;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidTank;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@@ -123,7 +120,7 @@ public class GuiChemicalWasher extends GuiMekanism
|
||||
data.add(0);
|
||||
|
||||
Mekanism.packetPipeline.sendToServer(new PacketTileEntity(Coord4D.get(tileEntity), data));
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import mekanism.api.Coord4D;
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.client.render.MekanismRenderer;
|
||||
import mekanism.common.IInvConfiguration;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.SideData;
|
||||
import mekanism.common.block.BlockMachine.MachineType;
|
||||
import mekanism.common.inventory.container.ContainerNull;
|
||||
@@ -254,19 +254,19 @@ public class GuiConfiguration extends GuiMekanism
|
||||
if(xAxis >= 6 && xAxis <= 20 && yAxis >= 6 && yAxis <= 20)
|
||||
{
|
||||
int guiId = MachineType.get(tile.getBlockType(), tile.getBlockMetadata()).guiId;
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketSimpleGui(Coord4D.get(tile), guiId));
|
||||
}
|
||||
|
||||
if(xAxis >= 156 && xAxis <= 170 && yAxis >= 6 && yAxis <= 20)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketConfigurationUpdate(ConfigurationPacket.EJECT, Coord4D.get(tile)));
|
||||
}
|
||||
|
||||
if(xAxis >= 156 && xAxis <= 170 && yAxis >= 21 && yAxis <= 35)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketConfigurationUpdate(ConfigurationPacket.STRICT_INPUT, Coord4D.get(tile)));
|
||||
}
|
||||
}
|
||||
@@ -278,7 +278,7 @@ public class GuiConfiguration extends GuiMekanism
|
||||
|
||||
if(xAxis >= 80 && xAxis <= 96 && yAxis >= 49 && yAxis <= 65)
|
||||
{
|
||||
mc.sndManager.playSoundFX("mekanism:etc.Ding", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketConfigurationUpdate(ConfigurationPacket.EJECT_COLOR, Coord4D.get(tile), button));
|
||||
}
|
||||
|
||||
@@ -289,7 +289,7 @@ public class GuiConfiguration extends GuiMekanism
|
||||
|
||||
if(xAxis >= x && xAxis <= x+14 && yAxis >= y && yAxis <= y+14)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketConfigurationUpdate(ConfigurationPacket.SIDE_DATA, Coord4D.get(tile), button, i));
|
||||
}
|
||||
}
|
||||
@@ -301,7 +301,7 @@ public class GuiConfiguration extends GuiMekanism
|
||||
|
||||
if(xAxis >= x && xAxis <= x+14 && yAxis >= y && yAxis <= y+14)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketConfigurationUpdate(ConfigurationPacket.INPUT_COLOR, Coord4D.get(tile), button, i));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ package mekanism.client.gui;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.IRedstoneControl;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.network.PacketSimpleGui;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
@@ -67,7 +67,7 @@ public class GuiConfigurationTab extends GuiElement
|
||||
if(xAxis >= -21 && xAxis <= -3 && yAxis >= 10 && yAxis <= 28)
|
||||
{
|
||||
Mekanism.packetPipeline.sendToServer(new PacketSimpleGui(Coord4D.get(tileEntity), 9));
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,8 +135,8 @@ public class GuiDictionary extends GuiMekanism
|
||||
itemType.stackSize = 1;
|
||||
|
||||
oreDictNames = MekanismUtils.getOreDictName(itemType);
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
|
||||
playClickSound();
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -159,7 +159,7 @@ public class GuiDictionary extends GuiMekanism
|
||||
oreDictNames = new ArrayList<String>();
|
||||
}
|
||||
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import mekanism.api.ListUtils;
|
||||
import mekanism.client.gui.GuiEnergyInfo.IInfoHandler;
|
||||
import mekanism.client.gui.GuiSlot.SlotOverlay;
|
||||
import mekanism.client.gui.GuiSlot.SlotType;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.inventory.container.ContainerDigitalMiner;
|
||||
import mekanism.common.miner.ThreadMinerSearch.State;
|
||||
import mekanism.common.network.PacketDigitalMinerGui;
|
||||
@@ -293,7 +293,7 @@ public class GuiDigitalMiner extends GuiMekanism
|
||||
|
||||
if(xAxis >= 147 && xAxis <= 161 && yAxis >= 47 && yAxis <= 61)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
|
||||
ArrayList data = new ArrayList();
|
||||
data.add(0);
|
||||
@@ -303,7 +303,7 @@ public class GuiDigitalMiner extends GuiMekanism
|
||||
|
||||
if(xAxis >= 147 && xAxis <= 161 && yAxis >= 63 && yAxis <= 77)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
|
||||
ArrayList data = new ArrayList();
|
||||
data.add(1);
|
||||
@@ -313,7 +313,7 @@ public class GuiDigitalMiner extends GuiMekanism
|
||||
|
||||
if(xAxis >= 131 && xAxis <= 145 && yAxis >= 47 && yAxis <= 61)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
|
||||
ArrayList data = new ArrayList();
|
||||
data.add(5);
|
||||
@@ -323,7 +323,7 @@ public class GuiDigitalMiner extends GuiMekanism
|
||||
|
||||
if(xAxis >= 131 && xAxis <= 145 && yAxis >= 63 && yAxis <= 77)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
|
||||
ArrayList data = new ArrayList();
|
||||
data.add(9);
|
||||
@@ -371,7 +371,7 @@ public class GuiDigitalMiner extends GuiMekanism
|
||||
Mekanism.packetPipeline.sendToServer(new PacketTileEntity(Coord4D.get(tileEntity), data));
|
||||
}
|
||||
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.inventory.container.ContainerNull;
|
||||
import mekanism.common.miner.MItemStackFilter;
|
||||
import mekanism.common.miner.MMaterialFilter;
|
||||
@@ -172,17 +172,17 @@ public class GuiDigitalMinerConfig extends GuiMekanism
|
||||
|
||||
if(filter instanceof MItemStackFilter)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketDigitalMinerGui(MinerGuiPacket.SERVER_INDEX, Coord4D.get(tileEntity), 1, getFilterIndex()+i));
|
||||
}
|
||||
else if(filter instanceof MOreDictFilter)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketDigitalMinerGui(MinerGuiPacket.SERVER_INDEX, Coord4D.get(tileEntity), 2, getFilterIndex()+i));
|
||||
}
|
||||
else if(filter instanceof MMaterialFilter)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketDigitalMinerGui(MinerGuiPacket.SERVER_INDEX, Coord4D.get(tileEntity), 3, getFilterIndex()+i));
|
||||
}
|
||||
}
|
||||
@@ -191,25 +191,25 @@ public class GuiDigitalMinerConfig extends GuiMekanism
|
||||
|
||||
if(xAxis >= 5 && xAxis <= 16 && yAxis >= 5 && yAxis <= 16)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketDigitalMinerGui(MinerGuiPacket.SERVER, Coord4D.get(tileEntity), 4));
|
||||
}
|
||||
|
||||
if(xAxis >= 39 && xAxis <= 50 && yAxis >= 67 && yAxis <= 78)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
setRadius();
|
||||
}
|
||||
|
||||
if(xAxis >= 39 && xAxis <= 50 && yAxis >= 92 && yAxis <= 103)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
setMinY();
|
||||
}
|
||||
|
||||
if(xAxis >= 39 && xAxis <= 50 && yAxis >= 117 && yAxis <= 128)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
setMaxY();
|
||||
}
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ public class GuiElectricChest extends GuiMekanism
|
||||
|
||||
if(!isBlock)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.chestclosed", 1.0F, 1.0F);
|
||||
mc.theWorld.playSoundEffect(tileEntity.xCoord + 0.5, tileEntity.yCoord + 0.5, tileEntity.zCoord + 0.5, "random.chestopen", 0.5f, mc.theWorld.rand.nextFloat() * 0.1F + 0.9F);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ public class GuiElectricChest extends GuiMekanism
|
||||
|
||||
if(xAxis >= 179 && xAxis <= 197 && yAxis >= 88 && yAxis <= 106)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
|
||||
if(isBlock)
|
||||
{
|
||||
|
||||
@@ -5,6 +5,7 @@ import java.util.List;
|
||||
import mekanism.common.ObfuscatedNames;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -66,6 +67,11 @@ public abstract class GuiElement
|
||||
{
|
||||
return guiObj.getFont();
|
||||
}
|
||||
|
||||
protected void playClickSound()
|
||||
{
|
||||
Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
}
|
||||
|
||||
public abstract void renderBackground(int xAxis, int yAxis, int guiWidth, int guiHeight);
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package mekanism.client.gui;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.inventory.container.ContainerNull;
|
||||
import mekanism.common.network.PacketDigitalMinerGui;
|
||||
import mekanism.common.network.PacketDigitalMinerGui.MinerGuiPacket;
|
||||
@@ -107,7 +107,7 @@ public class GuiMFilterSelect extends GuiMekanism
|
||||
|
||||
if(xAxis >= 5 && xAxis <= 16 && yAxis >= 5 && yAxis <= 16)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketDigitalMinerGui(MinerGuiPacket.SERVER, Coord4D.get(tileEntity), 0));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ package mekanism.client.gui;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.inventory.container.ContainerFilter;
|
||||
import mekanism.common.miner.MItemStackFilter;
|
||||
import mekanism.common.network.PacketDigitalMinerGui;
|
||||
@@ -198,7 +198,7 @@ public class GuiMItemStackFilter extends GuiMekanism
|
||||
|
||||
if(xAxis >= 5 && xAxis <= 16 && yAxis >= 5 && yAxis <= 16)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketDigitalMinerGui(MinerGuiPacket.SERVER, Coord4D.get(tileEntity), isNew ? 5 : 0));
|
||||
}
|
||||
|
||||
@@ -222,7 +222,7 @@ public class GuiMItemStackFilter extends GuiMekanism
|
||||
filter.itemType = null;
|
||||
}
|
||||
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ package mekanism.client.gui;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.inventory.container.ContainerFilter;
|
||||
import mekanism.common.miner.MMaterialFilter;
|
||||
import mekanism.common.network.PacketDigitalMinerGui;
|
||||
@@ -198,7 +198,7 @@ public class GuiMMaterialFilter extends GuiMekanism
|
||||
|
||||
if(xAxis >= 5 && xAxis <= 16 && yAxis >= 5 && yAxis <= 16)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketDigitalMinerGui(MinerGuiPacket.SERVER, Coord4D.get(tileEntity), isNew ? 5 : 0));
|
||||
}
|
||||
|
||||
@@ -222,7 +222,7 @@ public class GuiMMaterialFilter extends GuiMekanism
|
||||
filter.materialItem = null;
|
||||
}
|
||||
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import java.util.List;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.inventory.container.ContainerFilter;
|
||||
import mekanism.common.miner.MOreDictFilter;
|
||||
import mekanism.common.network.PacketDigitalMinerGui;
|
||||
@@ -262,13 +262,13 @@ public class GuiMOreDictFilter extends GuiMekanism
|
||||
|
||||
if(xAxis >= 5 && xAxis <= 16 && yAxis >= 5 && yAxis <= 16)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketDigitalMinerGui(MinerGuiPacket.SERVER, Coord4D.get(tileEntity), isNew ? 5 : 0));
|
||||
}
|
||||
|
||||
if(xAxis >= 131 && xAxis <= 143 && yAxis >= 47 && yAxis <= 59)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
setOreDictKey();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,13 +9,15 @@ import mekanism.common.IInvConfiguration;
|
||||
import mekanism.common.SideData;
|
||||
import mekanism.common.item.ItemConfigurator;
|
||||
import mekanism.common.tile.TileEntityContainerBlock;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@@ -186,4 +188,9 @@ public abstract class GuiMekanism extends GuiContainer implements IGuiWrapper
|
||||
{
|
||||
return fontRendererObj;
|
||||
}
|
||||
|
||||
protected void playClickSound()
|
||||
{
|
||||
Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@ import mekanism.client.gui.GuiProgress.IProgressInfoHandler;
|
||||
import mekanism.client.gui.GuiProgress.ProgressBar;
|
||||
import mekanism.client.gui.GuiSlot.SlotOverlay;
|
||||
import mekanism.client.gui.GuiSlot.SlotType;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.inventory.container.ContainerMetallurgicInfuser;
|
||||
import mekanism.common.network.PacketTileEntity;
|
||||
import mekanism.common.tile.TileEntityMetallurgicInfuser;
|
||||
@@ -121,7 +121,7 @@ public class GuiMetallurgicInfuser extends GuiMekanism
|
||||
data.add(0);
|
||||
|
||||
Mekanism.packetPipeline.sendToServer(new PacketTileEntity(Coord4D.get(tileEntity), data));
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package mekanism.client.gui;
|
||||
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.energy.IEnergizedItem;
|
||||
import mekanism.common.IElectricChest;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.network.PacketElectricChest;
|
||||
import mekanism.common.network.PacketElectricChest.ElectricChestPacketType;
|
||||
import mekanism.common.tile.TileEntityElectricChest;
|
||||
@@ -121,14 +121,14 @@ public class GuiPasswordEnter extends GuiScreen
|
||||
if(passwordField.getText() == null || passwordField.getText() == "")
|
||||
{
|
||||
displayText = EnumColor.DARK_RED + MekanismUtils.localize("gui.password.fieldsEmpty");
|
||||
mc.sndManager.playSoundFX("mekanism:etc.Error", 1.0F, 1.0F);
|
||||
// TODO Not sure how to play custom sounds mc.sndManager.playSoundFX("mekanism:etc.Error", 1.0F, 1.0F);
|
||||
ticker = 30;
|
||||
}
|
||||
else if(!getPassword().equals(passwordField.getText()))
|
||||
{
|
||||
displayText = EnumColor.DARK_RED + MekanismUtils.localize("gui.password.invalid");
|
||||
passwordField.setText("");
|
||||
mc.sndManager.playSoundFX("mekanism:etc.Error", 1.0F, 1.0F);
|
||||
// TODO Not sure how to play custom sounds mc.sndManager.playSoundFX("mekanism:etc.Error", 1.0F, 1.0F);
|
||||
ticker = 30;
|
||||
}
|
||||
else {
|
||||
@@ -142,7 +142,7 @@ public class GuiPasswordEnter extends GuiScreen
|
||||
Mekanism.packetPipeline.sendToServer(new PacketElectricChest(ElectricChestPacketType.SERVER_OPEN, true, false));
|
||||
}
|
||||
|
||||
mc.sndManager.playSoundFX("mekanism:etc.Success", 1.0F, 1.0F);
|
||||
// TODO Not sure how to play custom sounds mc.sndManager.playSoundFX("mekanism:etc.Success", 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package mekanism.client.gui;
|
||||
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.common.IElectricChest;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.network.PacketElectricChest;
|
||||
import mekanism.common.network.PacketElectricChest.ElectricChestPacketType;
|
||||
import mekanism.common.tile.TileEntityElectricChest;
|
||||
|
||||
@@ -1,18 +1,22 @@
|
||||
package mekanism.client.gui;
|
||||
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.item.ItemPortableTeleporter;
|
||||
import mekanism.common.network.PacketDigitUpdate;
|
||||
import mekanism.common.network.PacketPortableTeleport;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import sun.net.www.content.text.plain;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -99,25 +103,25 @@ public class GuiPortableTeleporter extends GuiScreen
|
||||
{
|
||||
Mekanism.packetPipeline.sendToServer(new PacketDigitUpdate(0, getIncrementedNumber(((ItemPortableTeleporter)itemStack.getItem()).getDigit(itemStack, 0))));
|
||||
((ItemPortableTeleporter)itemStack.getItem()).setDigit(itemStack, 0, getIncrementedNumber(((ItemPortableTeleporter)itemStack.getItem()).getDigit(itemStack, 0)));
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
}
|
||||
else if(xAxis > 62 && xAxis < 76 && yAxis > 44 && yAxis < 58)
|
||||
{
|
||||
Mekanism.packetPipeline.sendToServer(new PacketDigitUpdate(1, getIncrementedNumber(((ItemPortableTeleporter)itemStack.getItem()).getDigit(itemStack, 1))));
|
||||
((ItemPortableTeleporter)itemStack.getItem()).setDigit(itemStack, 1, getIncrementedNumber(((ItemPortableTeleporter)itemStack.getItem()).getDigit(itemStack, 1)));
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
}
|
||||
else if(xAxis > 101 && xAxis < 115 && yAxis > 44 && yAxis < 58)
|
||||
{
|
||||
Mekanism.packetPipeline.sendToServer(new PacketDigitUpdate(2, getIncrementedNumber(((ItemPortableTeleporter)itemStack.getItem()).getDigit(itemStack, 2))));
|
||||
((ItemPortableTeleporter)itemStack.getItem()).setDigit(itemStack, 2, getIncrementedNumber(((ItemPortableTeleporter)itemStack.getItem()).getDigit(itemStack, 2)));
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
}
|
||||
else if(xAxis > 140 && xAxis < 154 && yAxis > 44 && yAxis < 58)
|
||||
{
|
||||
Mekanism.packetPipeline.sendToServer(new PacketDigitUpdate(3, getIncrementedNumber(((ItemPortableTeleporter)itemStack.getItem()).getDigit(itemStack, 3))));
|
||||
((ItemPortableTeleporter)itemStack.getItem()).setDigit(itemStack, 3, getIncrementedNumber(((ItemPortableTeleporter)itemStack.getItem()).getDigit(itemStack, 3)));
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,11 +3,10 @@ package mekanism.client.gui;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.IRedstoneControl;
|
||||
import mekanism.common.IRedstoneControl.RedstoneControl;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.network.PacketRedstoneControl;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
@@ -73,7 +72,7 @@ public class GuiRedstoneControl extends GuiElement
|
||||
RedstoneControl current = control.getControlType();
|
||||
int ordinalToSet = current.ordinal() < (RedstoneControl.values().length-1) ? current.ordinal()+1 : 0;
|
||||
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketRedstoneControl(Coord4D.get(tileEntity), RedstoneControl.values()[ordinalToSet]));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,29 +103,29 @@ public class GuiRobitCrafting extends GuiMekanism
|
||||
|
||||
if(xAxis >= 179 && xAxis <= 197 && yAxis >= 10 && yAxis <= 28)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketRobit(RobitPacketType.GUI, 0, entityId));
|
||||
mc.thePlayer.openGui(Mekanism.instance, 21, mc.theWorld, entityId, 0, 0);
|
||||
}
|
||||
else if(xAxis >= 179 && xAxis <= 197 && yAxis >= 30 && yAxis <= 48)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
}
|
||||
else if(xAxis >= 179 && xAxis <= 197 && yAxis >= 50 && yAxis <= 68)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketRobit(RobitPacketType.GUI, 2, entityId));
|
||||
mc.thePlayer.openGui(Mekanism.instance, 23, mc.theWorld, entityId, 0, 0);
|
||||
}
|
||||
else if(xAxis >= 179 && xAxis <= 197 && yAxis >= 70 && yAxis <= 88)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketRobit(RobitPacketType.GUI, 3, entityId));
|
||||
mc.thePlayer.openGui(Mekanism.instance, 24, mc.theWorld, entityId, 0, 0);
|
||||
}
|
||||
else if(xAxis >= 179 && xAxis <= 197 && yAxis >= 90 && yAxis <= 108)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketRobit(RobitPacketType.GUI, 4, entityId));
|
||||
mc.thePlayer.openGui(Mekanism.instance, 25, mc.theWorld, entityId, 0, 0);
|
||||
}
|
||||
|
||||
@@ -103,29 +103,29 @@ public class GuiRobitInventory extends GuiMekanism
|
||||
|
||||
if(xAxis >= 179 && xAxis <= 197 && yAxis >= 10 && yAxis <= 28)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketRobit(RobitPacketType.GUI, 0, robit.getEntityId()));
|
||||
mc.thePlayer.openGui(Mekanism.instance, 21, mc.theWorld, robit.getEntityId(), 0, 0);
|
||||
}
|
||||
else if(xAxis >= 179 && xAxis <= 197 && yAxis >= 30 && yAxis <= 48)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketRobit(RobitPacketType.GUI, 1, robit.getEntityId()));
|
||||
mc.thePlayer.openGui(Mekanism.instance, 22, mc.theWorld, robit.getEntityId(), 0, 0);
|
||||
}
|
||||
else if(xAxis >= 179 && xAxis <= 197 && yAxis >= 50 && yAxis <= 68)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
}
|
||||
else if(xAxis >= 179 && xAxis <= 197 && yAxis >= 70 && yAxis <= 88)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketRobit(RobitPacketType.GUI, 3, robit.getEntityId()));
|
||||
mc.thePlayer.openGui(Mekanism.instance, 24, mc.theWorld, robit.getEntityId(), 0, 0);
|
||||
}
|
||||
else if(xAxis >= 179 && xAxis <= 197 && yAxis >= 90 && yAxis <= 108)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketRobit(RobitPacketType.GUI, 4, robit.getEntityId()));
|
||||
mc.thePlayer.openGui(Mekanism.instance, 25, mc.theWorld, robit.getEntityId(), 0, 0);
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ public class GuiRobitMain extends GuiMekanism
|
||||
private void toggleNameChange()
|
||||
{
|
||||
displayNameChange = !displayNameChange;
|
||||
confirmName.drawButton = displayNameChange;
|
||||
confirmName.visible = displayNameChange;
|
||||
nameChangeField.setFocused(displayNameChange);
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ public class GuiRobitMain extends GuiMekanism
|
||||
|
||||
buttonList.clear();
|
||||
buttonList.add(confirmName = new GuiButton(0, guiWidth + 58, guiHeight + 47, 60, 20, MekanismUtils.localize("gui.confirm")));
|
||||
confirmName.drawButton = displayNameChange;
|
||||
confirmName.visible = displayNameChange;
|
||||
|
||||
nameChangeField = new GuiTextField(fontRendererObj, guiWidth + 48, guiHeight + 21, 80, 12);
|
||||
nameChangeField.setMaxStringLength(12);
|
||||
@@ -266,51 +266,51 @@ public class GuiRobitMain extends GuiMekanism
|
||||
|
||||
if(xAxis >= 179 && xAxis <= 197 && yAxis >= 10 && yAxis <= 28)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
}
|
||||
else if(xAxis >= 179 && xAxis <= 197 && yAxis >= 30 && yAxis <= 48)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketRobit(RobitPacketType.GUI, 1, robit.getEntityId()));
|
||||
mc.thePlayer.openGui(Mekanism.instance, 22, mc.theWorld, robit.getEntityId(), 0, 0);
|
||||
}
|
||||
else if(xAxis >= 179 && xAxis <= 197 && yAxis >= 50 && yAxis <= 68)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketRobit(RobitPacketType.GUI, 2, robit.getEntityId()));
|
||||
mc.thePlayer.openGui(Mekanism.instance, 23, mc.theWorld, robit.getEntityId(), 0, 0);
|
||||
}
|
||||
else if(xAxis >= 179 && xAxis <= 197 && yAxis >= 70 && yAxis <= 88)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketRobit(RobitPacketType.GUI, 3, robit.getEntityId()));
|
||||
mc.thePlayer.openGui(Mekanism.instance, 24, mc.theWorld, robit.getEntityId(), 0, 0);
|
||||
}
|
||||
else if(xAxis >= 179 && xAxis <= 197 && yAxis >= 90 && yAxis <= 108)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketRobit(RobitPacketType.GUI, 4, robit.getEntityId()));
|
||||
mc.thePlayer.openGui(Mekanism.instance, 25, mc.theWorld, robit.getEntityId(), 0, 0);
|
||||
}
|
||||
else if(xAxis >= 152 && xAxis <= 170 && yAxis >= 54 && yAxis <= 72)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketRobit(RobitPacketType.FOLLOW, robit.getEntityId()));
|
||||
}
|
||||
else if(xAxis >= 6 && xAxis <= 24 && yAxis >= 54 && yAxis <= 72)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
toggleNameChange();
|
||||
}
|
||||
else if(xAxis >= 6 && xAxis <= 24 && yAxis >= 16 && yAxis <= 34)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketRobit(RobitPacketType.GO_HOME, robit.getEntityId()));
|
||||
mc.displayGuiScreen(null);
|
||||
}
|
||||
else if(xAxis >= 6 && xAxis <= 24 && yAxis >= 35 && yAxis <= 53)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketRobit(RobitPacketType.DROP_PICKUP, robit.getEntityId()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ package mekanism.client.gui;
|
||||
import java.util.List;
|
||||
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.inventory.container.ContainerRobitRepair;
|
||||
import mekanism.common.network.PacketRobit;
|
||||
import mekanism.common.network.PacketRobit.RobitPacketType;
|
||||
@@ -15,7 +14,6 @@ import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.ContainerRepair;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.network.packet.Packet250CustomPayload;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -147,31 +145,31 @@ public class GuiRobitRepair extends GuiMekanism implements ICrafting
|
||||
|
||||
if(xAxis >= 179 && xAxis <= 197 && yAxis >= 10 && yAxis <= 28)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketRobit(RobitPacketType.GUI, 0, entityId));
|
||||
mc.thePlayer.openGui(Mekanism.instance, 21, mc.theWorld, entityId, 0, 0);
|
||||
}
|
||||
else if(xAxis >= 179 && xAxis <= 197 && yAxis >= 30 && yAxis <= 48)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketRobit(RobitPacketType.GUI, 1, entityId));
|
||||
mc.thePlayer.openGui(Mekanism.instance, 22, mc.theWorld, entityId, 0, 0);
|
||||
}
|
||||
else if(xAxis >= 179 && xAxis <= 197 && yAxis >= 50 && yAxis <= 68)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketRobit(RobitPacketType.GUI, 2, entityId));
|
||||
mc.thePlayer.openGui(Mekanism.instance, 23, mc.theWorld, entityId, 0, 0);
|
||||
}
|
||||
else if(xAxis >= 179 && xAxis <= 197 && yAxis >= 70 && yAxis <= 88)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketRobit(RobitPacketType.GUI, 3, entityId));
|
||||
mc.thePlayer.openGui(Mekanism.instance, 24, mc.theWorld, entityId, 0, 0);
|
||||
}
|
||||
else if(xAxis >= 179 && xAxis <= 197 && yAxis >= 90 && yAxis <= 108)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,29 +110,29 @@ public class GuiRobitSmelting extends GuiMekanism
|
||||
|
||||
if(xAxis >= 179 && xAxis <= 197 && yAxis >= 10 && yAxis <= 28)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketRobit(RobitPacketType.GUI, 0, robit.getEntityId()));
|
||||
mc.thePlayer.openGui(Mekanism.instance, 21, mc.theWorld, robit.getEntityId(), 0, 0);
|
||||
}
|
||||
else if(xAxis >= 179 && xAxis <= 197 && yAxis >= 30 && yAxis <= 48)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketRobit(RobitPacketType.GUI, 1, robit.getEntityId()));
|
||||
mc.thePlayer.openGui(Mekanism.instance, 22, mc.theWorld, robit.getEntityId(), 0, 0);
|
||||
}
|
||||
else if(xAxis >= 179 && xAxis <= 197 && yAxis >= 50 && yAxis <= 68)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketRobit(RobitPacketType.GUI, 2, robit.getEntityId()));
|
||||
mc.thePlayer.openGui(Mekanism.instance, 23, mc.theWorld, robit.getEntityId(), 0, 0);
|
||||
}
|
||||
else if(xAxis >= 179 && xAxis <= 197 && yAxis >= 70 && yAxis <= 88)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
}
|
||||
else if(xAxis >= 179 && xAxis <= 197 && yAxis >= 90 && yAxis <= 108)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketRobit(RobitPacketType.GUI, 4, robit.getEntityId()));
|
||||
mc.thePlayer.openGui(Mekanism.instance, 25, mc.theWorld, robit.getEntityId(), 0, 0);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ package mekanism.client.gui;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mekanism.api.gas.GasTank;
|
||||
import mekanism.client.gui.GuiFluidGauge.IFluidInfoHandler;
|
||||
import mekanism.client.gui.GuiGasGauge.IGasInfoHandler;
|
||||
@@ -11,15 +10,13 @@ import mekanism.client.gui.GuiProgress.IProgressInfoHandler;
|
||||
import mekanism.client.gui.GuiProgress.ProgressBar;
|
||||
import mekanism.client.gui.GuiSlot.SlotOverlay;
|
||||
import mekanism.client.gui.GuiSlot.SlotType;
|
||||
import mekanism.client.render.MekanismRenderer;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.inventory.container.ContainerRotaryCondensentrator;
|
||||
import mekanism.common.network.PacketTileEntity;
|
||||
import mekanism.common.tile.TileEntityRotaryCondensentrator;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidTank;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@@ -157,7 +154,7 @@ public class GuiRotaryCondensentrator extends GuiMekanism
|
||||
data.add(0);
|
||||
|
||||
Mekanism.packetPipeline.sendToServer(new PacketTileEntity(Coord4D.get(tileEntity), data));
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import java.util.ArrayList;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mekanism.client.render.MekanismRenderer;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.inventory.container.ContainerSalinationController;
|
||||
import mekanism.common.network.PacketTileEntity;
|
||||
import mekanism.common.tile.TileEntitySalinationController;
|
||||
@@ -156,7 +156,7 @@ public class GuiSalinationController extends GuiMekanism
|
||||
data.add(0);
|
||||
|
||||
Mekanism.packetPipeline.sendToServer(new PacketTileEntity(Coord4D.get(tileEntity), data));
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,12 +3,11 @@ package mekanism.client.gui;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.network.PacketTileEntity;
|
||||
import mekanism.common.tile.TileEntityFactory;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -71,7 +70,7 @@ public class GuiSortingTab extends GuiElement
|
||||
ArrayList data = new ArrayList();
|
||||
data.add(0);
|
||||
Mekanism.packetPipeline.sendToServer(new PacketTileEntity(Coord4D.get(tileEntity), data));
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package mekanism.client.gui;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.inventory.container.ContainerNull;
|
||||
import mekanism.common.network.PacketLogisticalSorterGui;
|
||||
import mekanism.common.network.PacketLogisticalSorterGui.SorterGuiPacket;
|
||||
@@ -107,7 +107,7 @@ public class GuiTFilterSelect extends GuiMekanism
|
||||
|
||||
if(xAxis >= 5 && xAxis <= 16 && yAxis >= 5 && yAxis <= 16)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketLogisticalSorterGui(SorterGuiPacket.SERVER, Coord4D.get(tileEntity), 0));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -295,7 +295,7 @@ public class GuiTItemStackFilter extends GuiMekanism
|
||||
{
|
||||
if(xAxis >= 5 && xAxis <= 16 && yAxis >= 5 && yAxis <= 16)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketLogisticalSorterGui(SorterGuiPacket.SERVER, Coord4D.get(tileEntity), isNew ? 4 : 0));
|
||||
}
|
||||
|
||||
@@ -313,12 +313,12 @@ public class GuiTItemStackFilter extends GuiMekanism
|
||||
filter.itemType = null;
|
||||
}
|
||||
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
}
|
||||
|
||||
if(xAxis >= 128 && xAxis <= 139 && yAxis >= 44 && yAxis <= 55)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
filter.sizeMode = !filter.sizeMode;
|
||||
}
|
||||
}
|
||||
@@ -330,7 +330,7 @@ public class GuiTItemStackFilter extends GuiMekanism
|
||||
|
||||
if(xAxis >= 12 && xAxis <= 28 && yAxis >= 44 && yAxis <= 60)
|
||||
{
|
||||
mc.sndManager.playSoundFX("mekanism:etc.Ding", 1.0F, 1.0F);
|
||||
// TODO Not sure how to play custom sounds mc.sndManager.playSoundFX("mekanism:etc.Ding", 1.0F, 1.0F);
|
||||
|
||||
if(button == 0)
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ package mekanism.client.gui;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.client.render.MekanismRenderer;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.inventory.container.ContainerFilter;
|
||||
import mekanism.common.network.PacketEditFilter;
|
||||
import mekanism.common.network.PacketLogisticalSorterGui;
|
||||
@@ -226,7 +226,7 @@ public class GuiTMaterialFilter extends GuiMekanism
|
||||
{
|
||||
if(xAxis >= 5 && xAxis <= 16 && yAxis >= 5 && yAxis <= 16)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketLogisticalSorterGui(SorterGuiPacket.SERVER, Coord4D.get(tileEntity), isNew ? 4 : 0));
|
||||
}
|
||||
|
||||
@@ -250,7 +250,7 @@ public class GuiTMaterialFilter extends GuiMekanism
|
||||
filter.materialItem = null;
|
||||
}
|
||||
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -261,7 +261,7 @@ public class GuiTMaterialFilter extends GuiMekanism
|
||||
|
||||
if(xAxis >= 12 && xAxis <= 28 && yAxis >= 44 && yAxis <= 60)
|
||||
{
|
||||
mc.sndManager.playSoundFX("mekanism:etc.Ding", 1.0F, 1.0F);
|
||||
// TODO Not sure how to play custom sounds mc.sndManager.playSoundFX("mekanism:etc.Ding", 1.0F, 1.0F);
|
||||
|
||||
if(button == 0)
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ import java.util.List;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.client.render.MekanismRenderer;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.inventory.container.ContainerFilter;
|
||||
import mekanism.common.network.PacketEditFilter;
|
||||
import mekanism.common.network.PacketLogisticalSorterGui;
|
||||
@@ -289,13 +289,13 @@ public class GuiTOreDictFilter extends GuiMekanism
|
||||
{
|
||||
if(xAxis >= 5 && xAxis <= 16 && yAxis >= 5 && yAxis <= 16)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketLogisticalSorterGui(SorterGuiPacket.SERVER, Coord4D.get(tileEntity), isNew ? 4 : 0));
|
||||
}
|
||||
|
||||
if(xAxis >= 131 && xAxis <= 143 && yAxis >= 47 && yAxis <= 59)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
setOreDictKey();
|
||||
}
|
||||
}
|
||||
@@ -307,7 +307,7 @@ public class GuiTOreDictFilter extends GuiMekanism
|
||||
|
||||
if(xAxis >= 12 && xAxis <= 28 && yAxis >= 44 && yAxis <= 60)
|
||||
{
|
||||
mc.sndManager.playSoundFX("mekanism:etc.Ding", 1.0F, 1.0F);
|
||||
// TODO Not sure how to play custom sounds mc.sndManager.playSoundFX("mekanism:etc.Ding", 1.0F, 1.0F);
|
||||
|
||||
if(button == 0)
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ import java.util.ArrayList;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.client.gui.GuiSlot.SlotOverlay;
|
||||
import mekanism.client.gui.GuiSlot.SlotType;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.inventory.container.ContainerTeleporter;
|
||||
import mekanism.common.network.PacketTileEntity;
|
||||
import mekanism.common.tile.TileEntityTeleporter;
|
||||
@@ -67,7 +67,7 @@ public class GuiTeleporter extends GuiMekanism
|
||||
|
||||
Mekanism.packetPipeline.sendToServer(new PacketTileEntity(Coord4D.get(tileEntity), data));
|
||||
tileEntity.code.digitOne = getIncrementedNumber(tileEntity.code.digitOne);
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
}
|
||||
else if(xAxis > 62 && xAxis < 76 && yAxis > 44 && yAxis < 58)
|
||||
{
|
||||
@@ -76,7 +76,7 @@ public class GuiTeleporter extends GuiMekanism
|
||||
|
||||
Mekanism.packetPipeline.sendToServer(new PacketTileEntity(Coord4D.get(tileEntity), data));
|
||||
tileEntity.code.digitTwo = getIncrementedNumber(tileEntity.code.digitTwo);
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
}
|
||||
else if(xAxis > 101 && xAxis < 115 && yAxis > 44 && yAxis < 58)
|
||||
{
|
||||
@@ -85,7 +85,7 @@ public class GuiTeleporter extends GuiMekanism
|
||||
|
||||
Mekanism.packetPipeline.sendToServer(new PacketTileEntity(Coord4D.get(tileEntity), data));
|
||||
tileEntity.code.digitThree = getIncrementedNumber(tileEntity.code.digitThree);
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
}
|
||||
else if(xAxis > 140 && xAxis < 154 && yAxis > 44 && yAxis < 58)
|
||||
{
|
||||
@@ -94,7 +94,7 @@ public class GuiTeleporter extends GuiMekanism
|
||||
|
||||
Mekanism.packetPipeline.sendToServer(new PacketTileEntity(Coord4D.get(tileEntity), data));
|
||||
tileEntity.code.digitFour = getIncrementedNumber(tileEntity.code.digitFour);
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,11 +2,10 @@ package mekanism.client.gui;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.IUpgradeTile;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.network.PacketRemoveUpgrade;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
@@ -81,13 +80,13 @@ public class GuiUpgradeManagement extends GuiElement
|
||||
{
|
||||
if(xAxis >= 179 && xAxis <= 198 && yAxis >= 47 && yAxis <= 54)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketRemoveUpgrade(Coord4D.get(tileEntity), (byte)0));
|
||||
}
|
||||
|
||||
if(xAxis >= 179 && xAxis <= 198 && yAxis >= 57 && yAxis <= 64)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
playClickSound();
|
||||
Mekanism.packetPipeline.sendToServer(new PacketRemoveUpgrade(Coord4D.get(tileEntity), (byte)1));
|
||||
}
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.EnumSkyBlock;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
@@ -713,7 +714,8 @@ public class BlockBasic extends Block
|
||||
}
|
||||
|
||||
world.func_147479_m(x, y, z);
|
||||
world.updateAllLightTypes(x, y, z);
|
||||
world.updateLightByType(EnumSkyBlock.Block, x, y, z);
|
||||
world.updateLightByType(EnumSkyBlock.Sky, x, y, z);
|
||||
|
||||
if(!world.isRemote && world.getTileEntity(x, y, z) != null)
|
||||
{
|
||||
|
||||
@@ -203,7 +203,7 @@ public class BlockCardboardBox extends BlockContainer
|
||||
|
||||
public NBTTagCompound write(NBTTagCompound nbtTags)
|
||||
{
|
||||
nbtTags.setInteger("id", id);
|
||||
nbtTags.setInteger("id", Block.getIdFromBlock(block));
|
||||
nbtTags.setInteger("meta", meta);
|
||||
|
||||
if(tileTag != null)
|
||||
@@ -218,7 +218,7 @@ public class BlockCardboardBox extends BlockContainer
|
||||
{
|
||||
BlockData data = new BlockData();
|
||||
|
||||
data.id = nbtTags.getInteger("id");
|
||||
data.block = Block.getBlockById(nbtTags.getInteger("id"));
|
||||
data.meta = nbtTags.getInteger("meta");
|
||||
|
||||
if(nbtTags.hasKey("tileTag"))
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package mekanism.common.entity;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
@@ -69,7 +71,7 @@ public class EntityBalloon extends Entity implements IEntityAdditionalSpawnData
|
||||
|
||||
public EntityBalloon(EntityLivingBase entity, EnumColor c)
|
||||
{
|
||||
this(entity.getWorldObj());
|
||||
this(entity.worldObj);
|
||||
|
||||
latchedEntity = entity;
|
||||
setPosition(latchedEntity.posX, latchedEntity.posY + latchedEntity.height + 1.7F, latchedEntity.posZ);
|
||||
@@ -343,7 +345,7 @@ public class EntityBalloon extends Entity implements IEntityAdditionalSpawnData
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeSpawnData(ByteArrayDataOutput data)
|
||||
public void writeSpawnData(ByteBuf data)
|
||||
{
|
||||
data.writeDouble(posX);
|
||||
data.writeDouble(posY);
|
||||
@@ -371,7 +373,7 @@ public class EntityBalloon extends Entity implements IEntityAdditionalSpawnData
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readSpawnData(ByteArrayDataInput data)
|
||||
public void readSpawnData(ByteBuf data)
|
||||
{
|
||||
setPosition(data.readDouble(), data.readDouble(), data.readDouble());
|
||||
|
||||
@@ -410,7 +412,7 @@ public class EntityBalloon extends Entity implements IEntityAdditionalSpawnData
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInRangeToRenderVec3D(Vec3 par1Vec3)
|
||||
public boolean isInRangeToRender3d(double p_145770_1_, double p_145770_3_, double p_145770_5_)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -25,8 +25,8 @@ import net.minecraft.entity.ai.EntityAISwimming;
|
||||
import net.minecraft.entity.ai.EntityAIWatchClosest;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -37,6 +37,7 @@ import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import net.minecraftforge.common.util.Constants;
|
||||
import cofh.api.energy.IEnergyContainerItem;
|
||||
|
||||
public class EntityRobit extends EntityCreature implements IInventory, ISustainedInventory, IEntityBreathable
|
||||
@@ -86,8 +87,8 @@ public class EntityRobit extends EntityCreature implements IInventory, ISustaine
|
||||
{
|
||||
super.applyEntityAttributes();
|
||||
|
||||
getEntityAttribute(SharedMonsterAttributes.movementSpeed).setAttribute(0.3);
|
||||
getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(1);
|
||||
getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.3);
|
||||
getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(1);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -188,7 +189,7 @@ public class EntityRobit extends EntityCreature implements IInventory, ISustaine
|
||||
|
||||
setEnergy(getEnergy() + (item.extractEnergy(itemStack, toTransfer, false)*Mekanism.FROM_TE));
|
||||
}
|
||||
else if(inventory[27].itemID == Items.redstone.itemID && getEnergy()+Mekanism.ENERGY_PER_REDSTONE <= MAX_ELECTRICITY)
|
||||
else if(inventory[27].getItem() == Items.redstone && getEnergy()+Mekanism.ENERGY_PER_REDSTONE <= MAX_ELECTRICITY)
|
||||
{
|
||||
setEnergy(getEnergy() + Mekanism.ENERGY_PER_REDSTONE);
|
||||
inventory[27].stackSize--;
|
||||
@@ -219,7 +220,7 @@ public class EntityRobit extends EntityCreature implements IInventory, ISustaine
|
||||
|
||||
if(inventory[29].stackSize == 0)
|
||||
{
|
||||
inventory[29] = inventory[29].getItem().getContainerItemStack(inventory[29]);
|
||||
inventory[29] = inventory[29].getItem().getContainerItem(inventory[29]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -384,7 +385,7 @@ public class EntityRobit extends EntityCreature implements IInventory, ISustaine
|
||||
}
|
||||
}
|
||||
else {
|
||||
entityplayer.openGui(Mekanism.instance, 21, worldObj, entityId, 0, 0);
|
||||
entityplayer.openGui(Mekanism.instance, 21, worldObj, getEntityId(), 0, 0);
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -463,12 +464,12 @@ public class EntityRobit extends EntityCreature implements IInventory, ISustaine
|
||||
|
||||
homeLocation = Coord4D.read(nbtTags);
|
||||
|
||||
NBTTagList tagList = nbtTags.getTagList("Items");
|
||||
NBTTagList tagList = nbtTags.getTagList("Items", Constants.NBT.TAG_COMPOUND);
|
||||
inventory = new ItemStack[getSizeInventory()];
|
||||
|
||||
for(int tagCount = 0; tagCount < tagList.tagCount(); tagCount++)
|
||||
{
|
||||
NBTTagCompound tagCompound = (NBTTagCompound)tagList.tagAt(tagCount);
|
||||
NBTTagCompound tagCompound = (NBTTagCompound)tagList.getCompoundTagAt(tagCount);
|
||||
byte slotID = tagCompound.getByte("Slot");
|
||||
|
||||
if(slotID >= 0 && slotID < inventory.length)
|
||||
@@ -632,15 +633,15 @@ public class EntityRobit extends EntityCreature implements IInventory, ISustaine
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInvName()
|
||||
public String getInventoryName()
|
||||
{
|
||||
return "Robit";
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isInvNameLocalized()
|
||||
public boolean hasCustomInventoryName()
|
||||
{
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -659,10 +660,10 @@ public class EntityRobit extends EntityCreature implements IInventory, ISustaine
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openChest() {}
|
||||
public void openInventory() {}
|
||||
|
||||
@Override
|
||||
public void closeChest() {}
|
||||
public void closeInventory() {}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack itemstack)
|
||||
@@ -682,7 +683,7 @@ public class EntityRobit extends EntityCreature implements IInventory, ISustaine
|
||||
|
||||
for(int slots = 0; slots < nbtTags.tagCount(); slots++)
|
||||
{
|
||||
NBTTagCompound tagCompound = (NBTTagCompound)nbtTags.tagAt(slots);
|
||||
NBTTagCompound tagCompound = (NBTTagCompound)nbtTags.getCompoundTagAt(slots);
|
||||
byte slotID = tagCompound.getByte("Slot");
|
||||
|
||||
if(slotID >= 0 && slotID < inventory.length)
|
||||
@@ -711,7 +712,6 @@ public class EntityRobit extends EntityCreature implements IInventory, ISustaine
|
||||
return tagList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTranslatedEntityName()
|
||||
{
|
||||
return getName().isEmpty() ? "Robit" : getName();
|
||||
|
||||
Reference in new issue
Block a user