mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 04:52:25 +00:00
<1000 errors
This commit is contained in:
1 parent
c6a09b5658
commit
af008b9395
99 files changed
+470
-484
No files matched your search
@@ -10,6 +10,7 @@ import mekanism.common.Mekanism;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
|
||||
public final class HolidayManager
|
||||
{
|
||||
@@ -102,13 +103,13 @@ public final class HolidayManager
|
||||
public void onEvent(EntityPlayer player)
|
||||
{
|
||||
String themedLines = getThemedLines(new EnumColor[] {EnumColor.DARK_GREEN, EnumColor.DARK_RED}, 13);
|
||||
player.addChatMessage(new ChatComponentText(themedLines + EnumColor.DARK_BLUE + "[Mekanism]" + themedLines));
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.RED + "Merry Christmas, " + EnumColor.DARK_BLUE + player.getName() + EnumColor.RED + "!"));
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.RED + "May you have plenty of Christmas cheer"));
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.RED + "and have a relaxing holiday with your"));
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.RED + "family :)"));
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.DARK_GREY + "-aidancbrady"));
|
||||
player.addChatMessage(new ChatComponentText(themedLines + EnumColor.DARK_BLUE + "[=======]" + themedLines));
|
||||
player.addChatMessage(new TextComponentString(themedLines + EnumColor.DARK_BLUE + "[Mekanism]" + themedLines));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.RED + "Merry Christmas, " + EnumColor.DARK_BLUE + player.getName() + EnumColor.RED + "!"));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.RED + "May you have plenty of Christmas cheer"));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.RED + "and have a relaxing holiday with your"));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.RED + "family :)"));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.DARK_GREY + "-aidancbrady"));
|
||||
player.addChatMessage(new TextComponentString(themedLines + EnumColor.DARK_BLUE + "[=======]" + themedLines));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -151,12 +152,12 @@ public final class HolidayManager
|
||||
public void onEvent(EntityPlayer player)
|
||||
{
|
||||
String themedLines = getThemedLines(new EnumColor[] {EnumColor.WHITE, EnumColor.YELLOW}, 13);
|
||||
player.addChatMessage(new ChatComponentText(themedLines + EnumColor.DARK_BLUE + "[Mekanism]" + themedLines));
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.AQUA + "Happy New Year, " + EnumColor.DARK_BLUE + player.getName() + EnumColor.RED + "!"));
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.AQUA + "Best wishes to you as we enter this"));
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.AQUA + "new and exciting year of " + calendar.get(Calendar.YEAR) + "! :)"));
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.DARK_GREY + "-aidancbrady"));
|
||||
player.addChatMessage(new ChatComponentText(themedLines + EnumColor.DARK_BLUE + "[=======]" + themedLines));
|
||||
player.addChatMessage(new TextComponentString(themedLines + EnumColor.DARK_BLUE + "[Mekanism]" + themedLines));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.AQUA + "Happy New Year, " + EnumColor.DARK_BLUE + player.getName() + EnumColor.RED + "!"));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.AQUA + "Best wishes to you as we enter this"));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.AQUA + "new and exciting year of " + calendar.get(Calendar.YEAR) + "! :)"));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.DARK_GREY + "-aidancbrady"));
|
||||
player.addChatMessage(new TextComponentString(themedLines + EnumColor.DARK_BLUE + "[=======]" + themedLines));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ import net.minecraft.client.settings.KeyBinding;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.client.FMLClientHandler;
|
||||
import net.minecraftforge.fml.client.registry.ClientRegistry;
|
||||
@@ -83,7 +84,7 @@ public class MekanismKeyHandler extends MekKeyHandler
|
||||
int toSet = configurator.getState(toolStack).ordinal() < ConfiguratorMode.values().length-1 ? configurator.getState(toolStack).ordinal() + 1 : 0;
|
||||
configurator.setState(toolStack, ConfiguratorMode.values()[toSet]);
|
||||
Mekanism.packetHandler.sendToServer(new ConfiguratorStateMessage(configurator.getState(toolStack)));
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.GREY + LangUtils.localize("tooltip.configureState") + ": " + configurator.getColor(configurator.getState(toolStack)) + configurator.getStateDisplay(configurator.getState(toolStack))));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.GREY + LangUtils.localize("tooltip.configureState") + ": " + configurator.getColor(configurator.getState(toolStack)) + configurator.getStateDisplay(configurator.getState(toolStack))));
|
||||
}
|
||||
else if(player.isSneaking() && item instanceof ItemElectricBow)
|
||||
{
|
||||
@@ -91,7 +92,7 @@ public class MekanismKeyHandler extends MekKeyHandler
|
||||
|
||||
bow.setFireState(toolStack, !bow.getFireState(toolStack));
|
||||
Mekanism.packetHandler.sendToServer(new ElectricBowStateMessage(bow.getFireState(toolStack)));
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.GREY + LangUtils.localize("tooltip.fireMode") + ": " + (bow.getFireState(toolStack) ? EnumColor.DARK_GREEN : EnumColor.DARK_RED) + LangUtils.transOnOff(bow.getFireState(toolStack))));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.GREY + LangUtils.localize("tooltip.fireMode") + ": " + (bow.getFireState(toolStack) ? EnumColor.DARK_GREEN : EnumColor.DARK_RED) + LangUtils.transOnOff(bow.getFireState(toolStack))));
|
||||
}
|
||||
else if(player.isSneaking() && item instanceof ItemBlockMachine)
|
||||
{
|
||||
@@ -101,7 +102,7 @@ public class MekanismKeyHandler extends MekKeyHandler
|
||||
{
|
||||
machine.setBucketMode(toolStack, !machine.getBucketMode(toolStack));
|
||||
Mekanism.packetHandler.sendToServer(new PortableTankStateMessage(machine.getBucketMode(toolStack)));
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.GREY + LangUtils.localize("tooltip.portableTank.bucketMode") + ": " + (machine.getBucketMode(toolStack) ? EnumColor.DARK_GREEN : EnumColor.DARK_RED) + LangUtils.transOnOff(machine.getBucketMode(toolStack))));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.GREY + LangUtils.localize("tooltip.portableTank.bucketMode") + ": " + (machine.getBucketMode(toolStack) ? EnumColor.DARK_GREEN : EnumColor.DARK_RED) + LangUtils.transOnOff(machine.getBucketMode(toolStack))));
|
||||
}
|
||||
}
|
||||
else if(player.isSneaking() && item instanceof ItemWalkieTalkie)
|
||||
@@ -122,7 +123,7 @@ public class MekanismKeyHandler extends MekKeyHandler
|
||||
|
||||
flamethrower.incrementMode(toolStack);
|
||||
Mekanism.packetHandler.sendToServer(new PacketFlamethrowerData.FlamethrowerDataMessage(PacketFlamethrowerData.FlamethrowerPacket.MODE, null, false));
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.GREY + LangUtils.localize("tooltip.flamethrower.modeBump") + ": " + flamethrower.getMode(toolStack).getName()));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.GREY + LangUtils.localize("tooltip.flamethrower.modeBump") + ": " + flamethrower.getMode(toolStack).getName()));
|
||||
}
|
||||
}
|
||||
else if(kb == armorModeSwitchKey)
|
||||
|
||||
@@ -279,7 +279,7 @@ public class GuiMItemStackFilter extends GuiMekanism
|
||||
{
|
||||
if(stack.getItem() instanceof ItemBlock)
|
||||
{
|
||||
if(Block.getBlockFromItem(stack.getItem()) != Blocks.bedrock)
|
||||
if(Block.getBlockFromItem(stack.getItem()) != Blocks.BEDROCK)
|
||||
{
|
||||
filter.itemType = stack.copy();
|
||||
filter.itemType.stackSize = 1;
|
||||
@@ -304,7 +304,7 @@ public class GuiMItemStackFilter extends GuiMekanism
|
||||
{
|
||||
if(stack.getItem() instanceof ItemBlock)
|
||||
{
|
||||
if(Block.getBlockFromItem(stack.getItem()) != Blocks.bedrock)
|
||||
if(Block.getBlockFromItem(stack.getItem()) != Blocks.BEDROCK)
|
||||
{
|
||||
toUse = stack.copy();
|
||||
toUse.stackSize = 1;
|
||||
|
||||
@@ -261,7 +261,7 @@ public class GuiMMaterialFilter extends GuiMekanism
|
||||
{
|
||||
if(stack.getItem() instanceof ItemBlock)
|
||||
{
|
||||
if(Block.getBlockFromItem(stack.getItem()) != Blocks.bedrock)
|
||||
if(Block.getBlockFromItem(stack.getItem()) != Blocks.BEDROCK)
|
||||
{
|
||||
filter.materialItem = stack.copy();
|
||||
filter.materialItem.stackSize = 1;
|
||||
@@ -286,7 +286,7 @@ public class GuiMMaterialFilter extends GuiMekanism
|
||||
{
|
||||
if(stack.getItem() instanceof ItemBlock)
|
||||
{
|
||||
if(Block.getBlockFromItem(stack.getItem()) != Blocks.bedrock)
|
||||
if(Block.getBlockFromItem(stack.getItem()) != Blocks.BEDROCK)
|
||||
{
|
||||
toUse = stack.copy();
|
||||
toUse.stackSize = 1;
|
||||
|
||||
@@ -332,7 +332,7 @@ public class GuiMOreDictFilter extends GuiMekanism
|
||||
{
|
||||
if(stack.getItem() instanceof ItemBlock)
|
||||
{
|
||||
if(Block.getBlockFromItem(stack.getItem()) != Blocks.bedrock)
|
||||
if(Block.getBlockFromItem(stack.getItem()) != Blocks.BEDROCK)
|
||||
{
|
||||
toUse = stack.copy();
|
||||
toUse.stackSize = 1;
|
||||
|
||||
@@ -244,7 +244,7 @@ public class GuiTMaterialFilter extends GuiMekanism
|
||||
{
|
||||
if(stack.getItem() instanceof ItemBlock)
|
||||
{
|
||||
if(Block.getBlockFromItem(stack.getItem()) != Blocks.bedrock)
|
||||
if(Block.getBlockFromItem(stack.getItem()) != Blocks.BEDROCK)
|
||||
{
|
||||
filter.materialItem = stack.copy();
|
||||
filter.materialItem.stackSize = 1;
|
||||
|
||||
@@ -20,6 +20,6 @@ public class CombinerRecipeWrapper extends AdvancedMachineRecipeWrapper
|
||||
@Override
|
||||
public List<ItemStack> getFuelStacks(Gas gasType)
|
||||
{
|
||||
return ListUtils.asList(new ItemStack(Blocks.cobblestone));
|
||||
return ListUtils.asList(new ItemStack(Blocks.COBBLESTONE));
|
||||
}
|
||||
}
|
||||
@@ -293,7 +293,7 @@ public class CTM {
|
||||
}
|
||||
|
||||
// check that we aren't already connected outwards from this side
|
||||
ret &= !obscuring.getBlock().isFullCube() || !obscuring.equals(state);
|
||||
ret &= !obscuring.isFullCube() || !obscuring.equals(state);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
package mekanism.client.render.ctm;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
|
||||
/**
|
||||
* Chisel Face, basically a list of IChiselTexture's
|
||||
*/
|
||||
public final class CTMFace {
|
||||
|
||||
private List<TextureCTM> textureList;
|
||||
|
||||
private List<CTMFace> childFaces;
|
||||
|
||||
private EnumWorldBlockLayer layer;
|
||||
|
||||
public CTMFace() {
|
||||
this(new ArrayList<>(), new ArrayList<>());
|
||||
}
|
||||
|
||||
public CTMFace(EnumWorldBlockLayer layer) {
|
||||
this();
|
||||
setLayer(layer);
|
||||
}
|
||||
|
||||
public CTMFace(List<TextureCTM> textureList, List<CTMFace> childFaces) {
|
||||
this.textureList = textureList;
|
||||
this.childFaces = childFaces;
|
||||
}
|
||||
|
||||
public List<TextureCTM> getTextureList(){
|
||||
List<TextureCTM> list = new ArrayList<>();
|
||||
list.addAll(this.textureList);
|
||||
for (CTMFace face : childFaces){
|
||||
list.addAll(face.getTextureList());
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public void addTexture(TextureCTM texture){
|
||||
this.textureList.add(texture);
|
||||
}
|
||||
|
||||
public void addChildFace(CTMFace face){
|
||||
this.childFaces.add(face);
|
||||
}
|
||||
|
||||
public boolean removeTexture(TextureCTM texture){
|
||||
return this.textureList.remove(texture);
|
||||
}
|
||||
|
||||
public boolean removeChildFace(CTMFace face){
|
||||
return this.childFaces.remove(face);
|
||||
}
|
||||
|
||||
public TextureAtlasSprite getParticle(){
|
||||
if (textureList.get(0) != null) {
|
||||
return textureList.get(0).getParticle();
|
||||
}
|
||||
else {
|
||||
return childFaces.get(0).getParticle();
|
||||
}
|
||||
}
|
||||
|
||||
public void setLayer(EnumWorldBlockLayer layer){
|
||||
this.layer = layer;
|
||||
}
|
||||
|
||||
public EnumWorldBlockLayer getLayer(){
|
||||
return this.layer;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -7,16 +7,16 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.model.IBakedModel;
|
||||
import net.minecraft.client.resources.model.ModelResourceLocation;
|
||||
import net.minecraft.client.resources.model.ModelRotation;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.client.renderer.block.model.ModelRotation;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.event.ModelBakeEvent;
|
||||
import net.minecraftforge.client.event.TextureStitchEvent;
|
||||
import net.minecraftforge.client.model.Attributes;
|
||||
import net.minecraftforge.client.model.IModel;
|
||||
import net.minecraftforge.client.model.TRSRTransformation;
|
||||
import net.minecraftforge.common.model.TRSRTransformation;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
@@ -79,6 +79,6 @@ public class CTMRegistry
|
||||
register(callbacks[0]);
|
||||
register(callbacks[1]);
|
||||
|
||||
return new TextureCTM(EnumWorldBlockLayer.SOLID, callbacks);
|
||||
return new TextureCTM(BlockRenderLayer.SOLID, callbacks);
|
||||
}
|
||||
}
|
||||
@@ -10,16 +10,16 @@ import java.util.stream.Collectors;
|
||||
import net.minecraft.client.renderer.block.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class TextureCTM
|
||||
{
|
||||
protected EnumWorldBlockLayer layer;
|
||||
protected BlockRenderLayer layer;
|
||||
|
||||
public TextureSpriteCallback[] sprites;
|
||||
|
||||
public TextureCTM(EnumWorldBlockLayer layer, TextureSpriteCallback[] sprites)
|
||||
public TextureCTM(BlockRenderLayer layer, TextureSpriteCallback[] sprites)
|
||||
{
|
||||
this.layer = layer;
|
||||
this.sprites = sprites;
|
||||
|
||||
@@ -347,9 +347,9 @@ public class BakedCustomItemModel implements IBakedModel, IPerspectiveAwareModel
|
||||
GlStateManager.rotate(135, 0.0F, 1.0F, 0.0F);
|
||||
GlStateManager.rotate(-20, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
if(type == TransformType.FIRST_PERSON || type == TransformType.THIRD_PERSON)
|
||||
if(type == TransformType.FIRST_PERSON_RIGHT_HAND || type == TransformType.THIRD_PERSON)
|
||||
{
|
||||
if(type == TransformType.FIRST_PERSON)
|
||||
if(type == TransformType.FIRST_PERSON_RIGHT_HAND)
|
||||
{
|
||||
GlStateManager.rotate(55, 0.0F, 1.0F, 0.0F);
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.client.renderer.vertex.VertexFormat;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumFacing.Axis;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
@@ -56,7 +57,7 @@ public class TransmitterModel extends OBJBakedModelBase implements ISmartMultipa
|
||||
public IBakedModel handlePartState(IBlockState state)
|
||||
{
|
||||
IExtendedBlockState extended = (IExtendedBlockState)state;
|
||||
EnumWorldBlockLayer layer = MinecraftForgeClient.getRenderLayer();
|
||||
BlockRenderLayer layer = MinecraftForgeClient.getRenderLayer();
|
||||
ColorProperty colorProp = extended.getValue(ColorProperty.INSTANCE);
|
||||
int color = -1;
|
||||
|
||||
@@ -67,7 +68,7 @@ public class TransmitterModel extends OBJBakedModelBase implements ISmartMultipa
|
||||
|
||||
OBJState obj = extended.getValue(OBJProperty.instance);
|
||||
|
||||
if(layer != EnumWorldBlockLayer.TRANSLUCENT)
|
||||
if(layer != BlockRenderLayer.TRANSLUCENT)
|
||||
{
|
||||
color = -1;
|
||||
}
|
||||
@@ -115,7 +116,7 @@ public class TransmitterModel extends OBJBakedModelBase implements ISmartMultipa
|
||||
{
|
||||
ColorProperty prop = ((IExtendedBlockState)tempState).getValue(ColorProperty.INSTANCE);
|
||||
|
||||
if(MinecraftForgeClient.getRenderLayer() == EnumWorldBlockLayer.TRANSLUCENT && prop != null && prop.color != null)
|
||||
if(MinecraftForgeClient.getRenderLayer() == BlockRenderLayer.TRANSLUCENT && prop != null && prop.color != null)
|
||||
{
|
||||
return new float[] {prop.color.getColor(0), prop.color.getColor(1), prop.color.getColor(2), 1};
|
||||
}
|
||||
@@ -134,7 +135,7 @@ public class TransmitterModel extends OBJBakedModelBase implements ISmartMultipa
|
||||
ConnectionProperty connection = ((IExtendedBlockState)tempState).getValue(ConnectionProperty.INSTANCE);
|
||||
boolean sideIconOverride = getIconStatus(side, connection) > 0;
|
||||
|
||||
if(MinecraftForgeClient.getRenderLayer() == EnumWorldBlockLayer.TRANSLUCENT)
|
||||
if(MinecraftForgeClient.getRenderLayer() == BlockRenderLayer.TRANSLUCENT)
|
||||
{
|
||||
if(prop != null && prop.color != null)
|
||||
{
|
||||
|
||||
@@ -4,6 +4,7 @@ import mekanism.client.render.ColourTemperature;
|
||||
import mekanism.client.render.MekanismRenderer;
|
||||
import mekanism.common.multipart.PartThermodynamicConductor;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@@ -20,7 +21,7 @@ public class RenderThermodynamicConductor extends RenderTransmitterBase<PartTher
|
||||
{
|
||||
push();
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
WorldRenderer worldRenderer = tessellator.getWorldRenderer();
|
||||
VertexBuffer worldRenderer = tessellator.getBuffer();
|
||||
GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5);
|
||||
|
||||
for(EnumFacing side : EnumFacing.VALUES)
|
||||
@@ -37,7 +38,7 @@ public class RenderThermodynamicConductor extends RenderTransmitterBase<PartTher
|
||||
pop();
|
||||
}
|
||||
|
||||
public void renderHeatSide(WorldRenderer renderer, EnumFacing side, PartThermodynamicConductor cable)
|
||||
public void renderHeatSide(VertexBuffer renderer, EnumFacing side, PartThermodynamicConductor cable)
|
||||
{
|
||||
bindTexture(MekanismRenderer.getBlocksTexture());
|
||||
renderTransparency(renderer, MekanismRenderer.heatIcon, getModelForSide(cable, side), ColourTemperature.fromTemperature(cable.temperature, cable.getBaseColour()));
|
||||
|
||||
@@ -2,6 +2,7 @@ package mekanism.client.sound;
|
||||
|
||||
import net.minecraft.client.audio.ISound.AttenuationType;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -17,7 +18,7 @@ public interface ISoundSource
|
||||
public float getFrequency();
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Vec3 getSoundPosition();
|
||||
public Vec3d getSoundPosition();
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean shouldRepeat();
|
||||
|
||||
@@ -848,37 +848,37 @@ public class Mekanism
|
||||
RecipeHandler.addOsmiumCompressorRecipe(new ItemStack(Items.GLOWSTONE_DUST), new ItemStack(MekanismItems.Ingot, 1, 3));
|
||||
|
||||
//Crusher Recipes
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Items.diamond), new ItemStack(MekanismItems.OtherDust, 1, 0));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Items.iron_ingot), new ItemStack(MekanismItems.Dust, 1, Resource.IRON.ordinal()));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Items.gold_ingot), new ItemStack(MekanismItems.Dust, 1, Resource.GOLD.ordinal()));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Blocks.gravel), new ItemStack(Blocks.sand));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Blocks.stone), new ItemStack(Blocks.cobblestone));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Blocks.cobblestone), new ItemStack(Blocks.gravel));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Blocks.stonebrick, 1, 2), new ItemStack(Blocks.stone));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Blocks.stonebrick, 1, 0), new ItemStack(Blocks.stonebrick, 1, 2));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Blocks.stonebrick, 1, 3), new ItemStack(Blocks.stonebrick, 1, 0));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Items.flint), new ItemStack(Items.gunpowder));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Blocks.sandstone), new ItemStack(Blocks.sand, 2));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Items.DIAMOND), new ItemStack(MekanismItems.OtherDust, 1, 0));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Items.IRON_INGOT), new ItemStack(MekanismItems.Dust, 1, Resource.IRON.ordinal()));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Items.GOLD_INGOT), new ItemStack(MekanismItems.Dust, 1, Resource.GOLD.ordinal()));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Blocks.GRAVEL), new ItemStack(Blocks.SAND));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Blocks.STONE), new ItemStack(Blocks.COBBLESTONE));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Blocks.COBBLESTONE), new ItemStack(Blocks.GRAVEL));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Blocks.STONEBRICK, 1, 2), new ItemStack(Blocks.STONE));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Blocks.STONEBRICK, 1, 0), new ItemStack(Blocks.STONEBRICK, 1, 2));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Blocks.STONEBRICK, 1, 3), new ItemStack(Blocks.STONEBRICK, 1, 0));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Items.FLINT), new ItemStack(Items.GUNPOWDER));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Blocks.SANDSTONE), new ItemStack(Blocks.SAND, 2));
|
||||
|
||||
for(int i = 0; i < 16; i++)
|
||||
{
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Blocks.wool, 1, i), new ItemStack(Items.string, 4));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Blocks.WOOL, 1, i), new ItemStack(Items.STRING, 4));
|
||||
}
|
||||
|
||||
//BioFuel Crusher Recipes
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Blocks.tallgrass), new ItemStack(MekanismItems.BioFuel, 4));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Items.reeds), new ItemStack(MekanismItems.BioFuel, 2));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Items.wheat_seeds), new ItemStack(MekanismItems.BioFuel, 2));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Items.wheat), new ItemStack(MekanismItems.BioFuel, 4));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Items.pumpkin_seeds), new ItemStack(MekanismItems.BioFuel, 2));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Items.melon_seeds), new ItemStack(MekanismItems.BioFuel, 2));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Items.apple), new ItemStack(MekanismItems.BioFuel, 4));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Items.bread), new ItemStack(MekanismItems.BioFuel, 4));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Items.potato), new ItemStack(MekanismItems.BioFuel, 4));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Items.carrot), new ItemStack(MekanismItems.BioFuel, 4));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Items.rotten_flesh), new ItemStack(MekanismItems.BioFuel, 2));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Items.melon), new ItemStack(MekanismItems.BioFuel, 4));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Blocks.pumpkin), new ItemStack(MekanismItems.BioFuel, 6));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Blocks.TALLGRASS), new ItemStack(MekanismItems.BioFuel, 4));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Items.REEDS), new ItemStack(MekanismItems.BioFuel, 2));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Items.WHEAT_SEEDS), new ItemStack(MekanismItems.BioFuel, 2));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Items.WHEAT), new ItemStack(MekanismItems.BioFuel, 4));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Items.PUMPKIN_SEEDS), new ItemStack(MekanismItems.BioFuel, 2));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Items.MELON_SEEDS), new ItemStack(MekanismItems.BioFuel, 2));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Items.APPLE), new ItemStack(MekanismItems.BioFuel, 4));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Items.BREAD), new ItemStack(MekanismItems.BioFuel, 4));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Items.POTATO), new ItemStack(MekanismItems.BioFuel, 4));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Items.CARROT), new ItemStack(MekanismItems.BioFuel, 4));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Items.ROTTEN_FLESH), new ItemStack(MekanismItems.BioFuel, 2));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Items.MELON), new ItemStack(MekanismItems.BioFuel, 4));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Blocks.PUMPKIN), new ItemStack(MekanismItems.BioFuel, 6));
|
||||
|
||||
//Purification Chamber Recipes
|
||||
RecipeHandler.addPurificationChamberRecipe(new ItemStack(Blocks.GRAVEL), new ItemStack(Items.FLINT));
|
||||
@@ -891,45 +891,45 @@ public class Mekanism
|
||||
|
||||
//Precision Sawmill Recipes
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.LADDER, 3), new ItemStack(Items.STICK, 7));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.TORCH, 4), new ItemStack(Items.STICK), new ItemStack(Items.coal), 1);
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.TORCH, 4), new ItemStack(Items.STICK), new ItemStack(Items.COAL), 1);
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.CHEST), new ItemStack(Blocks.PLANKS, 8));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.TRAPDOOR), new ItemStack(Blocks.PLANKS, 3));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Items.BOAT), new ItemStack(Blocks.PLANKS, 5));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Items.BED), new ItemStack(Blocks.PLANKS, 3), new ItemStack(Blocks.wool, 3), 1);
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Items.BED), new ItemStack(Blocks.PLANKS, 3), new ItemStack(Blocks.WOOL, 3), 1);
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Items.OAK_DOOR), new ItemStack(Blocks.PLANKS, 6, 0));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Items.SPRUCE_DOOR), new ItemStack(Blocks.PLANKS, 6, 1));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Items.BIRCH_DOOR), new ItemStack(Blocks.PLANKS, 6, 2));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Items.JUNGLE_DOOR), new ItemStack(Blocks.PLANKS, 6, 3));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Items.acacia_door), new ItemStack(Blocks.PLANKS, 6, 4));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Items.dark_oak_door), new ItemStack(Blocks.PLANKS, 6, 5));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.jukebox), new ItemStack(Blocks.PLANKS, 8), new ItemStack(Items.diamond), 1);
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.bookshelf), new ItemStack(Blocks.PLANKS, 6), new ItemStack(Items.book, 3), 1);
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.wooden_pressure_plate), new ItemStack(Blocks.PLANKS, 2));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.oak_fence), new ItemStack(Items.STICK, 3));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.spruce_fence), new ItemStack(Items.STICK, 3));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.birch_fence), new ItemStack(Items.STICK, 3));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.jungle_fence), new ItemStack(Items.STICK, 3));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.acacia_fence), new ItemStack(Items.STICK, 3));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.dark_oak_fence), new ItemStack(Items.STICK, 3));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.oak_fence_gate), new ItemStack(Blocks.PLANKS, 2, 0), new ItemStack(Items.STICK, 4), 1);
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.spruce_fence_gate), new ItemStack(Blocks.PLANKS, 2, 1), new ItemStack(Items.STICK, 4), 1);
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.birch_fence_gate), new ItemStack(Blocks.PLANKS, 2, 2), new ItemStack(Items.STICK, 4), 1);
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.jungle_fence_gate), new ItemStack(Blocks.PLANKS, 2, 3), new ItemStack(Items.STICK, 4), 1);
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.acacia_fence_gate), new ItemStack(Blocks.PLANKS, 2, 4), new ItemStack(Items.STICK, 4), 1);
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.dark_oak_fence_gate), new ItemStack(Blocks.PLANKS, 2, 5), new ItemStack(Items.STICK, 4), 1);
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.noteblock), new ItemStack(Blocks.PLANKS, 8), new ItemStack(Items.redstone), 1);
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.redstone_torch), new ItemStack(Items.STICK), new ItemStack(Items.redstone), 1);
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.crafting_table), new ItemStack(Blocks.PLANKS, 4));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Items.ACACIA_DOOR), new ItemStack(Blocks.PLANKS, 6, 4));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Items.DARK_OAK_DOOR), new ItemStack(Blocks.PLANKS, 6, 5));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.JUKEBOX), new ItemStack(Blocks.PLANKS, 8), new ItemStack(Items.DIAMOND), 1);
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.BOOKSHELF), new ItemStack(Blocks.PLANKS, 6), new ItemStack(Items.BOOK, 3), 1);
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.WOODEN_PRESSURE_PLATE), new ItemStack(Blocks.PLANKS, 2));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.OAK_FENCE), new ItemStack(Items.STICK, 3));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.SPRUCE_FENCE), new ItemStack(Items.STICK, 3));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.BIRCH_FENCE), new ItemStack(Items.STICK, 3));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.JUNGLE_FENCE), new ItemStack(Items.STICK, 3));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.ACACIA_FENCE), new ItemStack(Items.STICK, 3));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.DARK_OAK_FENCE), new ItemStack(Items.STICK, 3));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.OAK_FENCE_GATE), new ItemStack(Blocks.PLANKS, 2, 0), new ItemStack(Items.STICK, 4), 1);
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.SPRUCE_FENCE_GATE), new ItemStack(Blocks.PLANKS, 2, 1), new ItemStack(Items.STICK, 4), 1);
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.BIRCH_FENCE_GATE), new ItemStack(Blocks.PLANKS, 2, 2), new ItemStack(Items.STICK, 4), 1);
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.JUNGLE_FENCE_GATE), new ItemStack(Blocks.PLANKS, 2, 3), new ItemStack(Items.STICK, 4), 1);
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.ACACIA_FENCE_GATE), new ItemStack(Blocks.PLANKS, 2, 4), new ItemStack(Items.STICK, 4), 1);
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.DARK_OAK_FENCE_GATE), new ItemStack(Blocks.PLANKS, 2, 5), new ItemStack(Items.STICK, 4), 1);
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.NOTEBLOCK), new ItemStack(Blocks.PLANKS, 8), new ItemStack(Items.REDSTONE), 1);
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.REDSTONE_TORCH), new ItemStack(Items.STICK), new ItemStack(Items.REDSTONE), 1);
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.CRAFTING_TABLE), new ItemStack(Blocks.PLANKS, 4));
|
||||
|
||||
//Metallurgic Infuser Recipes
|
||||
RecipeHandler.addMetallurgicInfuserRecipe(InfuseRegistry.get("CARBON"), 10, new ItemStack(Items.iron_ingot), new ItemStack(MekanismItems.EnrichedIron));
|
||||
RecipeHandler.addMetallurgicInfuserRecipe(InfuseRegistry.get("CARBON"), 10, new ItemStack(Items.IRON_INGOT), new ItemStack(MekanismItems.EnrichedIron));
|
||||
RecipeHandler.addMetallurgicInfuserRecipe(InfuseRegistry.get("CARBON"), 10, new ItemStack(MekanismItems.EnrichedIron), new ItemStack(MekanismItems.OtherDust, 1, 1));
|
||||
RecipeHandler.addMetallurgicInfuserRecipe(InfuseRegistry.get("REDSTONE"), 10, new ItemStack(Items.iron_ingot), new ItemStack(MekanismItems.EnrichedAlloy));
|
||||
RecipeHandler.addMetallurgicInfuserRecipe(InfuseRegistry.get("FUNGI"), 10, new ItemStack(Blocks.dirt), new ItemStack(Blocks.mycelium));
|
||||
RecipeHandler.addMetallurgicInfuserRecipe(InfuseRegistry.get("BIO"), 10, new ItemStack(Blocks.cobblestone), new ItemStack(Blocks.mossy_cobblestone));
|
||||
RecipeHandler.addMetallurgicInfuserRecipe(InfuseRegistry.get("BIO"), 10, new ItemStack(Blocks.stonebrick, 1, 0), new ItemStack(Blocks.stonebrick, 1, 1));
|
||||
RecipeHandler.addMetallurgicInfuserRecipe(InfuseRegistry.get("BIO"), 10, new ItemStack(Blocks.sand), new ItemStack(Blocks.dirt));
|
||||
RecipeHandler.addMetallurgicInfuserRecipe(InfuseRegistry.get("BIO"), 10, new ItemStack(Blocks.dirt), new ItemStack(Blocks.dirt, 1, 2));
|
||||
RecipeHandler.addMetallurgicInfuserRecipe(InfuseRegistry.get("REDSTONE"), 10, new ItemStack(Items.IRON_INGOT), new ItemStack(MekanismItems.EnrichedAlloy));
|
||||
RecipeHandler.addMetallurgicInfuserRecipe(InfuseRegistry.get("FUNGI"), 10, new ItemStack(Blocks.DIRT), new ItemStack(Blocks.MYCELIUM));
|
||||
RecipeHandler.addMetallurgicInfuserRecipe(InfuseRegistry.get("BIO"), 10, new ItemStack(Blocks.COBBLESTONE), new ItemStack(Blocks.MOSSY_COBBLESTONE));
|
||||
RecipeHandler.addMetallurgicInfuserRecipe(InfuseRegistry.get("BIO"), 10, new ItemStack(Blocks.STONEBRICK, 1, 0), new ItemStack(Blocks.STONEBRICK, 1, 1));
|
||||
RecipeHandler.addMetallurgicInfuserRecipe(InfuseRegistry.get("BIO"), 10, new ItemStack(Blocks.SAND), new ItemStack(Blocks.DIRT));
|
||||
RecipeHandler.addMetallurgicInfuserRecipe(InfuseRegistry.get("BIO"), 10, new ItemStack(Blocks.DIRT), new ItemStack(Blocks.DIRT, 1, 2));
|
||||
RecipeHandler.addMetallurgicInfuserRecipe(InfuseRegistry.get("DIAMOND"), 10, new ItemStack(MekanismItems.EnrichedAlloy), new ItemStack(MekanismItems.ReinforcedAlloy));
|
||||
RecipeHandler.addMetallurgicInfuserRecipe(InfuseRegistry.get("OBSIDIAN"), 10, new ItemStack(MekanismItems.ReinforcedAlloy), new ItemStack(MekanismItems.AtomicAlloy));
|
||||
|
||||
@@ -989,14 +989,14 @@ public class Mekanism
|
||||
|
||||
//Infuse objects
|
||||
InfuseRegistry.registerInfuseObject(new ItemStack(MekanismItems.BioFuel), new InfuseObject(InfuseRegistry.get("BIO"), 5));
|
||||
InfuseRegistry.registerInfuseObject(new ItemStack(Items.coal, 1, 0), new InfuseObject(InfuseRegistry.get("CARBON"), 10));
|
||||
InfuseRegistry.registerInfuseObject(new ItemStack(Items.coal, 1, 1), new InfuseObject(InfuseRegistry.get("CARBON"), 20));
|
||||
InfuseRegistry.registerInfuseObject(new ItemStack(Items.COAL, 1, 0), new InfuseObject(InfuseRegistry.get("CARBON"), 10));
|
||||
InfuseRegistry.registerInfuseObject(new ItemStack(Items.COAL, 1, 1), new InfuseObject(InfuseRegistry.get("CARBON"), 20));
|
||||
InfuseRegistry.registerInfuseObject(new ItemStack(MekanismItems.CompressedCarbon), new InfuseObject(InfuseRegistry.get("CARBON"), 80));
|
||||
InfuseRegistry.registerInfuseObject(new ItemStack(Items.redstone), new InfuseObject(InfuseRegistry.get("REDSTONE"), 10));
|
||||
InfuseRegistry.registerInfuseObject(new ItemStack(Blocks.redstone_block), new InfuseObject(InfuseRegistry.get("REDSTONE"), 90));
|
||||
InfuseRegistry.registerInfuseObject(new ItemStack(Items.REDSTONE), new InfuseObject(InfuseRegistry.get("REDSTONE"), 10));
|
||||
InfuseRegistry.registerInfuseObject(new ItemStack(Blocks.REDSTONE_BLOCK), new InfuseObject(InfuseRegistry.get("REDSTONE"), 90));
|
||||
InfuseRegistry.registerInfuseObject(new ItemStack(MekanismItems.CompressedRedstone), new InfuseObject(InfuseRegistry.get("REDSTONE"), 80));
|
||||
InfuseRegistry.registerInfuseObject(new ItemStack(Blocks.red_mushroom), new InfuseObject(InfuseRegistry.get("FUNGI"), 10));
|
||||
InfuseRegistry.registerInfuseObject(new ItemStack(Blocks.brown_mushroom), new InfuseObject(InfuseRegistry.get("FUNGI"), 10));
|
||||
InfuseRegistry.registerInfuseObject(new ItemStack(Blocks.RED_MUSHROOM), new InfuseObject(InfuseRegistry.get("FUNGI"), 10));
|
||||
InfuseRegistry.registerInfuseObject(new ItemStack(Blocks.BROWN_MUSHROOM), new InfuseObject(InfuseRegistry.get("FUNGI"), 10));
|
||||
InfuseRegistry.registerInfuseObject(new ItemStack(MekanismItems.CompressedDiamond), new InfuseObject(InfuseRegistry.get("DIAMOND"), 80));
|
||||
InfuseRegistry.registerInfuseObject(new ItemStack(MekanismItems.CompressedObsidian), new InfuseObject(InfuseRegistry.get("OBSIDIAN"), 80));
|
||||
|
||||
|
||||
@@ -61,9 +61,9 @@ public class MekanismItems
|
||||
public static final Item CompressedRedstone = new ItemMekanism().setUnlocalizedName("CompressedRedstone");
|
||||
public static final Item CompressedDiamond = new ItemMekanism().setUnlocalizedName("CompressedDiamond");
|
||||
public static final Item CompressedObsidian = new ItemMekanism().setUnlocalizedName("CompressedObsidian");
|
||||
public static final Item BrineBucket = new ItemMekanism().setMaxStackSize(1).setContainerItem(Items.bucket).setUnlocalizedName("BrineBucket");
|
||||
public static final Item LithiumBucket = new ItemMekanism().setMaxStackSize(1).setContainerItem(Items.bucket).setUnlocalizedName("LithiumBucket");
|
||||
public static final Item HeavyWaterBucket = new ItemMekanism().setMaxStackSize(1).setContainerItem(Items.bucket).setUnlocalizedName("HeavyWaterBucket");
|
||||
public static final Item BrineBucket = new ItemMekanism().setMaxStackSize(1).setContainerItem(Items.BUCKET).setUnlocalizedName("BrineBucket");
|
||||
public static final Item LithiumBucket = new ItemMekanism().setMaxStackSize(1).setContainerItem(Items.BUCKET).setUnlocalizedName("LithiumBucket");
|
||||
public static final Item HeavyWaterBucket = new ItemMekanism().setMaxStackSize(1).setContainerItem(Items.BUCKET).setUnlocalizedName("HeavyWaterBucket");
|
||||
public static final Item SpeedUpgrade = new ItemUpgrade(Upgrade.SPEED).setUnlocalizedName("SpeedUpgrade");
|
||||
public static final Item EnergyUpgrade = new ItemUpgrade(Upgrade.ENERGY).setUnlocalizedName("EnergyUpgrade");
|
||||
public static final Item FilterUpgrade = new ItemUpgrade(Upgrade.FILTER).setUnlocalizedName("FilterUpgrade");
|
||||
|
||||
@@ -40,6 +40,7 @@ import mekanism.common.util.SecurityUtils;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.PropertyEnum;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
@@ -51,9 +52,12 @@ import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.EnumBlockRenderType;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.world.EnumSkyBlock;
|
||||
import net.minecraft.world.Explosion;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
@@ -103,7 +107,7 @@ public abstract class BlockBasic extends Block implements ICTMBlock
|
||||
|
||||
public BlockBasic()
|
||||
{
|
||||
super(Material.iron);
|
||||
super(Material.IRON);
|
||||
setHardness(5F);
|
||||
setResistance(20F);
|
||||
setCreativeTab(Mekanism.tabMekanism);
|
||||
@@ -125,7 +129,7 @@ public abstract class BlockBasic extends Block implements ICTMBlock
|
||||
public abstract BasicBlock getBasicBlock();
|
||||
|
||||
@Override
|
||||
public BlockState createBlockState()
|
||||
public BlockStateContainer createBlockState()
|
||||
{
|
||||
return new BlockStateBasic(this, getTypeProperty());
|
||||
}
|
||||
@@ -200,7 +204,7 @@ public abstract class BlockBasic extends Block implements ICTMBlock
|
||||
@Override
|
||||
public IBlockState getExtendedState(IBlockState stateIn, IBlockAccess w, BlockPos pos)
|
||||
{
|
||||
if(stateIn.getBlock() == null || stateIn.getBlock().getMaterial() == Material.air)
|
||||
if(stateIn.getBlock() == null || stateIn.getMaterial() == Material.AIR)
|
||||
{
|
||||
return stateIn;
|
||||
}
|
||||
@@ -561,9 +565,9 @@ public abstract class BlockBasic extends Block implements ICTMBlock
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public EnumWorldBlockLayer getBlockLayer()
|
||||
public BlockRenderLayer getBlockLayer()
|
||||
{
|
||||
return EnumWorldBlockLayer.CUTOUT;
|
||||
return BlockRenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
public static boolean manageInventory(EntityPlayer player, TileEntityDynamicTank tileEntity)
|
||||
@@ -688,28 +692,27 @@ public abstract class BlockBasic extends Block implements ICTMBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube()
|
||||
public boolean isOpaqueCube(IBlockState state)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFullCube()
|
||||
public boolean isFullCube(IBlockState state)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType()
|
||||
public EnumBlockRenderType getRenderType(IBlockState state)
|
||||
{
|
||||
return 3;
|
||||
return EnumBlockRenderType.MODEL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLightValue(IBlockAccess world, BlockPos pos)
|
||||
public int getLightValue(IBlockState state, IBlockAccess world, BlockPos pos)
|
||||
{
|
||||
TileEntity tileEntity = world.getTileEntity(pos);
|
||||
IBlockState state = world.getBlockState(pos);
|
||||
int metadata = state.getBlock().getMetaFromState(state);
|
||||
|
||||
if(tileEntity instanceof IActiveState)
|
||||
|
||||
@@ -7,6 +7,7 @@ import mekanism.common.tile.TileEntityAdvancedBoundingBlock;
|
||||
import mekanism.common.tile.TileEntityBoundingBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
@@ -14,18 +15,19 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockBounding extends Block
|
||||
{
|
||||
public BlockBounding()
|
||||
{
|
||||
super(Material.iron);
|
||||
super(Material.IRON);
|
||||
setHardness(3.5F);
|
||||
setResistance(8F);
|
||||
}
|
||||
|
||||
public BlockState createBlockState()
|
||||
public BlockStateContainer createBlockState()
|
||||
{
|
||||
return new BlockStateBounding(this);
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import mekanism.common.tile.TileEntityCardboardBox;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -21,6 +22,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockCardboardBox extends BlockContainer
|
||||
@@ -29,14 +31,14 @@ public class BlockCardboardBox extends BlockContainer
|
||||
|
||||
public BlockCardboardBox()
|
||||
{
|
||||
super(Material.cloth);
|
||||
super(Material.CLOTH);
|
||||
setCreativeTab(Mekanism.tabMekanism);
|
||||
setHardness(0.5F);
|
||||
setResistance(1F);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BlockState createBlockState()
|
||||
protected BlockStateContainer createBlockState()
|
||||
{
|
||||
return new BlockStateCardboardBox(this);
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ import mekanism.common.util.SecurityUtils;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@@ -33,6 +34,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
@@ -53,14 +55,14 @@ public class BlockEnergyCube extends BlockContainer
|
||||
{
|
||||
public BlockEnergyCube()
|
||||
{
|
||||
super(Material.iron);
|
||||
super(Material.IRON);
|
||||
setHardness(2F);
|
||||
setResistance(4F);
|
||||
setCreativeTab(Mekanism.tabMekanism);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState createBlockState()
|
||||
public BlockStateContainer createBlockState()
|
||||
{
|
||||
return new BlockStateEnergyCube(this);
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ import mekanism.common.util.SecurityUtils;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
@@ -29,6 +30,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import buildcraft.api.tools.IToolWrench;
|
||||
@@ -37,7 +39,7 @@ public class BlockGasTank extends BlockContainer
|
||||
{
|
||||
public BlockGasTank()
|
||||
{
|
||||
super(Material.iron);
|
||||
super(Material.IRON);
|
||||
setBlockBounds(0.2F, 0.0F, 0.2F, 0.8F, 1.0F, 0.8F);
|
||||
setHardness(3.5F);
|
||||
setResistance(8F);
|
||||
@@ -45,7 +47,7 @@ public class BlockGasTank extends BlockContainer
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BlockState createBlockState()
|
||||
protected BlockStateContainer createBlockState()
|
||||
{
|
||||
return new BlockStateGasTank(this);
|
||||
}
|
||||
|
||||
@@ -53,6 +53,7 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.PropertyEnum;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
@@ -65,11 +66,14 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.EnumBlockRenderType;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.world.Explosion;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
@@ -133,7 +137,7 @@ public abstract class BlockMachine extends BlockContainer implements ICTMBlock
|
||||
|
||||
public BlockMachine()
|
||||
{
|
||||
super(Material.iron);
|
||||
super(Material.IRON);
|
||||
setHardness(3.5F);
|
||||
setResistance(16F);
|
||||
setCreativeTab(Mekanism.tabMekanism);
|
||||
@@ -159,7 +163,7 @@ public abstract class BlockMachine extends BlockContainer implements ICTMBlock
|
||||
@Override
|
||||
public IBlockState getExtendedState(IBlockState stateIn, IBlockAccess w, BlockPos pos)
|
||||
{
|
||||
if(stateIn.getBlock() == null || stateIn.getBlock().getMaterial() == Material.air)
|
||||
if(stateIn.getBlock() == null || stateIn.getMaterial() == Material.AIR)
|
||||
{
|
||||
return stateIn;
|
||||
}
|
||||
@@ -171,7 +175,7 @@ public abstract class BlockMachine extends BlockContainer implements ICTMBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState createBlockState()
|
||||
public BlockStateContainer createBlockState()
|
||||
{
|
||||
return new BlockStateMachine(this, getTypeProperty());
|
||||
}
|
||||
@@ -635,24 +639,24 @@ public abstract class BlockMachine extends BlockContainer implements ICTMBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType()
|
||||
public EnumBlockRenderType getRenderType(IBlockState state)
|
||||
{
|
||||
return 3;
|
||||
return EnumBlockRenderType.MODEL;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public EnumWorldBlockLayer getBlockLayer()
|
||||
public BlockRenderLayer getBlockLayer()
|
||||
{
|
||||
return EnumWorldBlockLayer.CUTOUT;
|
||||
return BlockRenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getPlayerRelativeBlockHardness(EntityPlayer player, World world, BlockPos pos)
|
||||
public float getPlayerRelativeBlockHardness(IBlockState state, EntityPlayer player, World world, BlockPos pos)
|
||||
{
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
|
||||
return SecurityUtils.canAccess(player, tile) ? super.getPlayerRelativeBlockHardness(player, world, pos) : 0.0F;
|
||||
return SecurityUtils.canAccess(player, tile) ? super.getPlayerRelativeBlockHardness(state, player, world, pos) : 0.0F;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -7,6 +7,7 @@ import mekanism.common.block.states.BlockStateOre;
|
||||
import mekanism.common.block.states.BlockStateOre.EnumOreType;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
@@ -26,14 +27,14 @@ public class BlockOre extends Block
|
||||
{
|
||||
public BlockOre()
|
||||
{
|
||||
super(Material.rock);
|
||||
super(Material.ROCK);
|
||||
setHardness(3F);
|
||||
setResistance(5F);
|
||||
setCreativeTab(Mekanism.tabMekanism);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BlockState createBlockState()
|
||||
protected BlockStateContainer createBlockState()
|
||||
{
|
||||
return new BlockStateOre(this);
|
||||
}
|
||||
@@ -41,7 +42,7 @@ public class BlockOre extends Block
|
||||
@Override
|
||||
public IBlockState getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getDefaultState().withProperty(BlockStateOre.typeProperty, EnumOreType.values()[meta]);
|
||||
return getDefaultState().withProperty(BlockStateOre.typeProperty, EnumOreType.values()[meta]);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -10,6 +10,7 @@ import mekanism.common.block.states.BlockStatePlastic;
|
||||
import mekanism.common.block.states.BlockStatePlastic.PlasticBlockType;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
@@ -17,6 +18,7 @@ import net.minecraft.item.EnumDyeColor;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
@@ -28,7 +30,7 @@ public class BlockPlastic extends Block
|
||||
|
||||
public BlockPlastic(PlasticBlockType blockType)
|
||||
{
|
||||
super(Material.wood);
|
||||
super(Material.WOOD);
|
||||
type = blockType;
|
||||
setHardness(type == PlasticBlockType.REINFORCED ? 50F : 5F);
|
||||
setResistance(type == PlasticBlockType.REINFORCED ? 2000F : 10F);
|
||||
@@ -41,7 +43,7 @@ public class BlockPlastic extends Block
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BlockState createBlockState()
|
||||
protected BlockStateContainer createBlockState()
|
||||
{
|
||||
return new BlockStatePlastic(this);
|
||||
}
|
||||
@@ -59,14 +61,14 @@ public class BlockPlastic extends Block
|
||||
}
|
||||
|
||||
@Override
|
||||
public Vec3 modifyAcceleration(World world, BlockPos pos, Entity e, Vec3 motion)
|
||||
public Vec3d modifyAcceleration(World world, BlockPos pos, Entity e, Vec3 motion)
|
||||
{
|
||||
if(type == PlasticBlockType.ROAD)
|
||||
{
|
||||
double boost = 1.6;
|
||||
|
||||
double a = Math.atan2(motion.xCoord, motion.zCoord);
|
||||
return new Vec3(motion.xCoord + Math.sin(a) * boost * slipperiness, motion.yCoord, motion.zCoord + Math.cos(a) * boost * slipperiness);
|
||||
return new Vec3d(motion.xCoord + Math.sin(a) * boost * slipperiness, motion.yCoord, motion.zCoord + Math.cos(a) * boost * slipperiness);
|
||||
}
|
||||
|
||||
return motion;
|
||||
@@ -104,13 +106,13 @@ public class BlockPlastic extends Block
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLightValue()
|
||||
public int getLightValue(IBlockState state, IBlockAccess world, BlockPos pos)
|
||||
{
|
||||
if(type == PlasticBlockType.GLOW)
|
||||
{
|
||||
return 10;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,7 @@ import mekanism.common.Mekanism;
|
||||
import net.minecraft.block.BlockFence;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.IProperty;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.client.renderer.block.statemap.StateMapperBase;
|
||||
@@ -26,14 +27,14 @@ public class BlockPlasticFence extends BlockFence
|
||||
{
|
||||
public BlockPlasticFence()
|
||||
{
|
||||
super(Material.clay);
|
||||
super(Material.CLAY);
|
||||
setCreativeTab(Mekanism.tabMekanism);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BlockState createBlockState()
|
||||
protected BlockStateContainer createBlockState()
|
||||
{
|
||||
return new BlockState(this, new IProperty[] {NORTH, EAST, WEST, SOUTH, colorProperty});
|
||||
return new BlockStateContainer(this, new IProperty[] {NORTH, EAST, WEST, SOUTH, colorProperty});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,8 +2,9 @@ package mekanism.common.block.states;
|
||||
|
||||
import mekanism.common.block.BlockBounding;
|
||||
import net.minecraft.block.properties.PropertyBool;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
|
||||
public class BlockStateBounding extends BlockState
|
||||
public class BlockStateBounding extends BlockStateContainer
|
||||
{
|
||||
public static PropertyBool advancedProperty = PropertyBool.create("advanced");
|
||||
|
||||
|
||||
@@ -2,12 +2,13 @@ package mekanism.common.block.states;
|
||||
|
||||
import mekanism.common.block.BlockCardboardBox;
|
||||
import net.minecraft.block.properties.PropertyBool;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.client.renderer.block.statemap.StateMapperBase;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class BlockStateCardboardBox extends BlockState
|
||||
public class BlockStateCardboardBox extends BlockStateContainer
|
||||
{
|
||||
public static PropertyBool storageProperty = PropertyBool.create("storage");
|
||||
|
||||
|
||||
@@ -6,8 +6,9 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.block.properties.PropertyBool;
|
||||
import net.minecraft.block.properties.PropertyDirection;
|
||||
import net.minecraft.block.properties.PropertyEnum;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
|
||||
public class BlockStateFacing extends BlockState
|
||||
public class BlockStateFacing extends BlockStateContainer
|
||||
{
|
||||
public static final PropertyDirection facingProperty = PropertyDirection.create("facing");
|
||||
|
||||
|
||||
@@ -2,12 +2,13 @@ package mekanism.common.block.states;
|
||||
|
||||
import mekanism.common.block.BlockOre;
|
||||
import net.minecraft.block.properties.PropertyEnum;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
|
||||
/**
|
||||
* Created by ben on 23/12/14.
|
||||
*/
|
||||
public class BlockStateOre extends BlockState
|
||||
public class BlockStateOre extends BlockStateContainer
|
||||
{
|
||||
public static final PropertyEnum<EnumOreType> typeProperty = PropertyEnum.create("type", EnumOreType.class);
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package mekanism.common.block.states;
|
||||
|
||||
import mekanism.common.block.BlockPlastic;
|
||||
import net.minecraft.block.properties.PropertyEnum;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.client.renderer.block.statemap.StateMapperBase;
|
||||
@@ -9,7 +10,7 @@ import net.minecraft.item.EnumDyeColor;
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class BlockStatePlastic extends BlockState
|
||||
public class BlockStatePlastic extends BlockStateContainer
|
||||
{
|
||||
public static PropertyEnum<EnumDyeColor> colorProperty = PropertyEnum.create("color", EnumDyeColor.class);
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import java.util.ArrayList;
|
||||
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mekanism.api.gas.GasTank;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.frequency.Frequency;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -106,7 +107,7 @@ public class InventoryFrequency extends Frequency
|
||||
if(storedFluid.getFluid() != null)
|
||||
{
|
||||
data.add(true);
|
||||
data.add(storedFluid.getFluid().getFluid().getName());
|
||||
data.add(FluidRegistry.getFluidName(storedFluid.getFluid()));
|
||||
data.add(storedFluid.getFluidAmount());
|
||||
}
|
||||
else {
|
||||
@@ -138,7 +139,7 @@ public class InventoryFrequency extends Frequency
|
||||
|
||||
if(dataStream.readBoolean())
|
||||
{
|
||||
storedFluid.setFluid(new FluidStack(FluidRegistry.getFluid(dataStream.readInt()), dataStream.readInt()));
|
||||
storedFluid.setFluid(new FluidStack(FluidRegistry.getFluid(PacketHandler.readString(dataStream)), dataStream.readInt()));
|
||||
}
|
||||
else {
|
||||
storedFluid.setFluid(null);
|
||||
|
||||
@@ -23,6 +23,9 @@ import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.util.math.RayTraceResult.Type;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.common.registry.IEntityAdditionalSpawnData;
|
||||
|
||||
@@ -107,15 +110,15 @@ public class EntityFlame extends Entity implements IEntityAdditionalSpawnData
|
||||
|
||||
private void calculateVector()
|
||||
{
|
||||
Vec3 localVec = new Vec3(posX, posY, posZ);
|
||||
Vec3 motionVec = new Vec3(posX + motionX*2, posY + motionY*2, posZ + motionZ*2);
|
||||
Vec3d localVec = new Vec3d(posX, posY, posZ);
|
||||
Vec3d motionVec = new Vec3d(posX + motionX*2, posY + motionY*2, posZ + motionZ*2);
|
||||
RayTraceResult mop = worldObj.rayTraceBlocks(localVec, motionVec, true, false, false);
|
||||
localVec = new Vec3(posX, posY, posZ);
|
||||
motionVec = new Vec3(posX + motionX, posY + motionY, posZ + motionZ);
|
||||
localVec = new Vec3d(posX, posY, posZ);
|
||||
motionVec = new Vec3d(posX + motionX, posY + motionY, posZ + motionZ);
|
||||
|
||||
if(mop != null)
|
||||
{
|
||||
motionVec = new Vec3(mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord);
|
||||
motionVec = new Vec3d(mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord);
|
||||
}
|
||||
|
||||
Entity entity = null;
|
||||
@@ -161,7 +164,7 @@ public class EntityFlame extends Entity implements IEntityAdditionalSpawnData
|
||||
|
||||
if(mop != null)
|
||||
{
|
||||
if(mop.typeOfHit == MovingObjectType.ENTITY && mop.entityHit != null && !mop.entityHit.isImmuneToFire())
|
||||
if(mop.typeOfHit == Type.ENTITY && mop.entityHit != null && !mop.entityHit.isImmuneToFire())
|
||||
{
|
||||
if(mop.entityHit instanceof EntityItem && mode != ItemFlamethrower.FlamethrowerMode.COMBAT)
|
||||
{
|
||||
@@ -177,7 +180,7 @@ public class EntityFlame extends Entity implements IEntityAdditionalSpawnData
|
||||
burn(mop.entityHit);
|
||||
}
|
||||
}
|
||||
else if(mop.typeOfHit == MovingObjectType.BLOCK)
|
||||
else if(mop.typeOfHit == Type.BLOCK)
|
||||
{
|
||||
IBlockState state = worldObj.getBlockState(mop.getBlockPos());
|
||||
Block block = state.getBlock();
|
||||
@@ -191,7 +194,7 @@ public class EntityFlame extends Entity implements IEntityAdditionalSpawnData
|
||||
{
|
||||
if(mode == ItemFlamethrower.FlamethrowerMode.INFERNO && !worldObj.isRemote)
|
||||
{
|
||||
worldObj.setBlockState(sideCoord.getPos(), Blocks.fire.getDefaultState());
|
||||
worldObj.setBlockState(sideCoord.getPos(), Blocks.FIRE.getDefaultState());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -244,7 +247,7 @@ public class EntityFlame extends Entity implements IEntityAdditionalSpawnData
|
||||
Block b = state.getBlock();
|
||||
Block newBlock = Block.getBlockFromItem(result.getItem());
|
||||
|
||||
if(newBlock != null && newBlock != Blocks.air)
|
||||
if(newBlock != null && newBlock != Blocks.AIR)
|
||||
{
|
||||
worldObj.setBlockState(block.getPos(), Block.getBlockFromItem(result.getItem()).getStateFromMeta(result.getItemDamage()), 3);
|
||||
}
|
||||
|
||||
@@ -35,13 +35,13 @@ import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.pathfinding.PathNavigateGround;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.tileentity.TileEntityFurnace;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import net.minecraftforge.common.util.Constants;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
import net.minecraftforge.fml.common.Optional.Interface;
|
||||
import cofh.api.energy.IEnergyContainerItem;
|
||||
|
||||
@@ -156,7 +156,7 @@ public class EntityRobit extends EntityCreature implements IInventory, ISustaine
|
||||
return;
|
||||
}
|
||||
|
||||
if(!(homeLocation.getTileEntity(MinecraftServer.getServer().worldServerForDimension(homeLocation.dimensionId)) instanceof TileEntityChargepad))
|
||||
if(!(homeLocation.getTileEntity(FMLCommonHandler.instance().getMinecraftServerInstance().worldServerForDimension(homeLocation.dimensionId)) instanceof TileEntityChargepad))
|
||||
{
|
||||
drop();
|
||||
setDead();
|
||||
@@ -195,7 +195,7 @@ public class EntityRobit extends EntityCreature implements IInventory, ISustaine
|
||||
|
||||
setEnergy(getEnergy() + (item.extractEnergy(itemStack, toTransfer, false)* general.FROM_TE));
|
||||
}
|
||||
else if(inventory[27].getItem() == Items.redstone && getEnergy()+ general.ENERGY_PER_REDSTONE <= MAX_ELECTRICITY)
|
||||
else if(inventory[27].getItem() == Items.REDSTONE && getEnergy()+ general.ENERGY_PER_REDSTONE <= MAX_ELECTRICITY)
|
||||
{
|
||||
setEnergy(getEnergy() + general.ENERGY_PER_REDSTONE);
|
||||
inventory[27].stackSize--;
|
||||
@@ -304,7 +304,7 @@ public class EntityRobit extends EntityCreature implements IInventory, ISustaine
|
||||
{
|
||||
setFollowing(false);
|
||||
|
||||
if(worldObj.provider.getDimensionId() != homeLocation.dimensionId)
|
||||
if(worldObj.provider.getDimension() != homeLocation.dimensionId)
|
||||
{
|
||||
travelToDimension(homeLocation.dimensionId);
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ public final class MekanismHooks
|
||||
try {
|
||||
Recipes.macerator.addRecipe(new RecipeInputOreDict("ingotOsmium"), null, new ItemStack(MekanismItems.Dust, 1, Resource.OSMIUM.ordinal()));
|
||||
Recipes.macerator.addRecipe(new RecipeInputOreDict("ingotRefinedObsidian"), null, new ItemStack(MekanismItems.OtherDust, 1, 5));
|
||||
Recipes.macerator.addRecipe(new RecipeInputOreDict("ingotRefinedGlowstone"), null, new ItemStack(Items.glowstone_dust));
|
||||
Recipes.macerator.addRecipe(new RecipeInputOreDict("ingotRefinedGlowstone"), null, new ItemStack(Items.GLOWSTONE_DUST));
|
||||
Recipes.macerator.addRecipe(new RecipeInputOreDict("ingotSteel"), null, new ItemStack(MekanismItems.OtherDust, 1, 1));
|
||||
} catch(Exception e) {}
|
||||
|
||||
|
||||
@@ -45,11 +45,11 @@ public final class OreDictManager
|
||||
|
||||
if(!Recipe.PRECISION_SAWMILL.containsRecipe(wildStack))
|
||||
{
|
||||
RecipeHandler.addPrecisionSawmillRecipe(wildStack, new ItemStack(Items.stick, 6), new ItemStack(MekanismItems.Sawdust), 0.25);
|
||||
RecipeHandler.addPrecisionSawmillRecipe(wildStack, new ItemStack(Items.STICK, 6), new ItemStack(MekanismItems.Sawdust), 0.25);
|
||||
}
|
||||
}
|
||||
else {
|
||||
RecipeHandler.addPrecisionSawmillRecipe(StackUtils.size(ore, 1), new ItemStack(Items.stick, 6), new ItemStack(MekanismItems.Sawdust), 0.25);
|
||||
RecipeHandler.addPrecisionSawmillRecipe(StackUtils.size(ore, 1), new ItemStack(Items.STICK, 6), new ItemStack(MekanismItems.Sawdust), 0.25);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ public final class OreDictManager
|
||||
{
|
||||
for(ItemStack ore : OreDictionary.getOres("woodRubber"))
|
||||
{
|
||||
RecipeHandler.addPrecisionSawmillRecipe(StackUtils.size(ore, 1), new ItemStack(Blocks.planks, 4), StackUtils.size(OreDictionary.getOres("itemRubber").get(0), 1), 1F);
|
||||
RecipeHandler.addPrecisionSawmillRecipe(StackUtils.size(ore, 1), new ItemStack(Blocks.PLANKS, 4), StackUtils.size(OreDictionary.getOres("itemRubber").get(0), 1), 1F);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -196,7 +196,7 @@ public final class OreDictManager
|
||||
|
||||
for(ItemStack ore : OreDictionary.getOres("oreQuartz"))
|
||||
{
|
||||
RecipeHandler.addEnrichmentChamberRecipe(StackUtils.size(ore, 1), new ItemStack(Items.quartz, 6));
|
||||
RecipeHandler.addEnrichmentChamberRecipe(StackUtils.size(ore, 1), new ItemStack(Items.QUARTZ, 6));
|
||||
}
|
||||
|
||||
for(ItemStack ore : OreDictionary.getOres("crystalFluix"))
|
||||
@@ -230,12 +230,12 @@ public final class OreDictManager
|
||||
|
||||
for(ItemStack ore : OreDictionary.getOres("ingotRedstone"))
|
||||
{
|
||||
RecipeHandler.addCrusherRecipe(StackUtils.size(ore, 1), new ItemStack(Items.redstone));
|
||||
RecipeHandler.addCrusherRecipe(StackUtils.size(ore, 1), new ItemStack(Items.REDSTONE));
|
||||
}
|
||||
|
||||
for(ItemStack ore : OreDictionary.getOres("ingotRefinedGlowstone"))
|
||||
{
|
||||
RecipeHandler.addCrusherRecipe(StackUtils.size(ore, 1), new ItemStack(Items.glowstone_dust));
|
||||
RecipeHandler.addCrusherRecipe(StackUtils.size(ore, 1), new ItemStack(Items.GLOWSTONE_DUST));
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -256,20 +256,20 @@ public final class OreDictManager
|
||||
} catch(Exception e) {}
|
||||
|
||||
try {
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Items.coal), StackUtils.size(OreDictionary.getOres("dustCoal").get(0), 1));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Items.COAL), StackUtils.size(OreDictionary.getOres("dustCoal").get(0), 1));
|
||||
} catch(Exception e) {}
|
||||
|
||||
try {
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Items.coal, 1, 1), StackUtils.size(OreDictionary.getOres("dustCharcoal").get(0), 1));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Items.COAL, 1, 1), StackUtils.size(OreDictionary.getOres("dustCharcoal").get(0), 1));
|
||||
} catch(Exception e) {}
|
||||
|
||||
try {
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Items.gunpowder), StackUtils.size(OreDictionary.getOres("dustSaltpeter").get(0), 1));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Items.GUNPOWDER), StackUtils.size(OreDictionary.getOres("dustSaltpeter").get(0), 1));
|
||||
} catch(Exception e) {}
|
||||
|
||||
for(ItemStack ore : OreDictionary.getOres("dustSaltpeter"))
|
||||
{
|
||||
RecipeHandler.addEnrichmentChamberRecipe(StackUtils.size(ore, 1), new ItemStack(Items.gunpowder));
|
||||
RecipeHandler.addEnrichmentChamberRecipe(StackUtils.size(ore, 1), new ItemStack(Items.GUNPOWDER));
|
||||
}
|
||||
|
||||
for(ItemStack ore : OreDictionary.getOres("ingotSteel"))
|
||||
@@ -279,7 +279,7 @@ public final class OreDictManager
|
||||
|
||||
for(ItemStack ore : OreDictionary.getOres("dustLapis"))
|
||||
{
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Items.dye, 1, 4), StackUtils.size(ore, 1));
|
||||
RecipeHandler.addCrusherRecipe(new ItemStack(Items.DYE, 1, 4), StackUtils.size(ore, 1));
|
||||
}
|
||||
|
||||
for(ItemStack ore : OreDictionary.getOres("dustLithium"))
|
||||
@@ -289,14 +289,14 @@ public final class OreDictManager
|
||||
|
||||
for(ItemStack ore : OreDictionary.getOres("dustObsidian"))
|
||||
{
|
||||
RecipeHandler.addCombinerRecipe(StackUtils.size(ore, 4), new ItemStack(Blocks.obsidian));
|
||||
RecipeHandler.addCombinerRecipe(StackUtils.size(ore, 4), new ItemStack(Blocks.OBSIDIAN));
|
||||
RecipeHandler.addMetallurgicInfuserRecipe(InfuseRegistry.get("DIAMOND"), 10, StackUtils.size(ore, 1), new ItemStack(MekanismItems.OtherDust, 1, 5));
|
||||
}
|
||||
|
||||
for(ItemStack ore : OreDictionary.getOres("dustDiamond"))
|
||||
{
|
||||
InfuseRegistry.registerInfuseObject(ore, new InfuseObject(InfuseRegistry.get("DIAMOND"), 10));
|
||||
RecipeHandler.addEnrichmentChamberRecipe(StackUtils.size(ore, 1), new ItemStack(Items.diamond));
|
||||
RecipeHandler.addEnrichmentChamberRecipe(StackUtils.size(ore, 1), new ItemStack(Items.DIAMOND));
|
||||
}
|
||||
|
||||
for(ItemStack ore : OreDictionary.getOres("dustTin"))
|
||||
|
||||
@@ -4,6 +4,7 @@ import mekanism.common.entity.EntityRobit;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.IContainerListener;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.inventory.SlotFurnaceOutput;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -50,9 +51,9 @@ public class ContainerRobitSmelting extends Container
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCraftGuiOpened(ICrafting icrafting)
|
||||
public void addListener(IContainerListener icrafting)
|
||||
{
|
||||
super.onCraftGuiOpened(icrafting);
|
||||
super.addListener(icrafting);
|
||||
icrafting.sendProgressBarUpdate(this, 0, robit.furnaceCookTime);
|
||||
icrafting.sendProgressBarUpdate(this, 1, robit.furnaceBurnTime);
|
||||
icrafting.sendProgressBarUpdate(this, 2, robit.currentItemBurnTime);
|
||||
@@ -63,9 +64,9 @@ public class ContainerRobitSmelting extends Container
|
||||
{
|
||||
super.detectAndSendChanges();
|
||||
|
||||
for(int i = 0; i < crafters.size(); ++i)
|
||||
for(int i = 0; i < listeners.size(); ++i)
|
||||
{
|
||||
ICrafting icrafting = (ICrafting)crafters.get(i);
|
||||
IContainerListener icrafting = (IContainerListener)listeners.get(i);
|
||||
|
||||
if(lastCookTime != robit.furnaceCookTime)
|
||||
{
|
||||
|
||||
@@ -39,7 +39,7 @@ public class ItemAtomicDisassembler extends ItemEnergized
|
||||
@Override
|
||||
public boolean canHarvestBlock(Block block, ItemStack stack)
|
||||
{
|
||||
return block != Blocks.bedrock;
|
||||
return block != Blocks.BEDROCK;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -226,11 +226,11 @@ public class ItemAtomicDisassembler extends ItemEnergized
|
||||
}
|
||||
|
||||
Block block1 = world.getBlockState(pos).getBlock();
|
||||
boolean air = block1.isAir(world, pos.up());
|
||||
boolean air = block1.isAir(world.getBlockState(pos.up()), world, pos.up());
|
||||
|
||||
if(side != EnumFacing.DOWN && air && (block1 == Blocks.grass || block1 == Blocks.dirt))
|
||||
if(side != EnumFacing.DOWN && air && (block1 == Blocks.GRASS || block1 == Blocks.DIRT))
|
||||
{
|
||||
Block farm = Blocks.farmland;
|
||||
Block farm = Blocks.FARMLAND;
|
||||
world.playSoundEffect(pos.getX() + 0.5F, pos.getY() + 0.5F, pos.getZ() + 0.5F, farm.stepSound.getStepSound(), (farm.stepSound.getVolume() + 1.0F) / 2.0F, farm.stepSound.getFrequency() * 0.8F);
|
||||
|
||||
if(world.isRemote)
|
||||
|
||||
@@ -17,6 +17,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemConfigurationCard extends ItemMekanism
|
||||
@@ -58,7 +59,7 @@ public class ItemConfigurationCard extends ItemMekanism
|
||||
{
|
||||
data.setString("dataType", getNameFromTile(tileEntity));
|
||||
setData(stack, data);
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.GREY + LangUtils.localize("tooltip.configurationCard.got").replaceAll("%s", EnumColor.INDIGO + LangUtils.localize(data.getString("dataType")) + EnumColor.GREY)));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.GREY + LangUtils.localize("tooltip.configurationCard.got").replaceAll("%s", EnumColor.INDIGO + LangUtils.localize(data.getString("dataType")) + EnumColor.GREY)));
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -74,11 +75,11 @@ public class ItemConfigurationCard extends ItemMekanism
|
||||
((ISpecialConfigData)tileEntity).setConfigurationData(getData(stack));
|
||||
}
|
||||
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.DARK_GREEN + LangUtils.localize("tooltip.configurationCard.set").replaceAll("%s", EnumColor.INDIGO + LangUtils.localize(getDataType(stack)) + EnumColor.DARK_GREEN)));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.DARK_GREEN + LangUtils.localize("tooltip.configurationCard.set").replaceAll("%s", EnumColor.INDIGO + LangUtils.localize(getDataType(stack)) + EnumColor.DARK_GREEN)));
|
||||
setData(stack, null);
|
||||
}
|
||||
else {
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.RED + LangUtils.localize("tooltip.configurationCard.unequal") + "."));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.RED + LangUtils.localize("tooltip.configurationCard.unequal") + "."));
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -34,6 +34,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.common.Optional.Interface;
|
||||
import net.minecraftforge.fml.common.Optional.InterfaceList;
|
||||
@@ -82,7 +83,7 @@ public class ItemConfigurator extends ItemEnergized implements IMekWrench, ITool
|
||||
{
|
||||
if(!player.isSneaking())
|
||||
{
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " " + getViewModeText(getState(stack).getTransmission()) + ": " + initial.color + initial.localize() + " (" + initial.color.getColoredName() + ")"));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " " + getViewModeText(getState(stack).getTransmission()) + ": " + initial.color + initial.localize() + " (" + initial.color.getColoredName() + ")"));
|
||||
}
|
||||
else {
|
||||
if(getEnergy(stack) >= ENERGY_PER_CONFIGURE)
|
||||
@@ -92,7 +93,7 @@ public class ItemConfigurator extends ItemEnergized implements IMekWrench, ITool
|
||||
setEnergy(stack, getEnergy(stack) - ENERGY_PER_CONFIGURE);
|
||||
MekanismUtils.incrementOutput(config, getState(stack).getTransmission(), MekanismUtils.getBaseOrientation(side, config.getOrientation()));
|
||||
SideData data = config.getConfig().getOutput(getState(stack).getTransmission(), side, config.getOrientation());
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " " + getToggleModeText(getState(stack).getTransmission()) + ": " + data.color + data.localize() + " (" + data.color.getColoredName() + ")"));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " " + getToggleModeText(getState(stack).getTransmission()) + ": " + data.color + data.localize() + " (" + data.color.getColoredName() + ")"));
|
||||
|
||||
if(config instanceof TileEntityBasicBlock)
|
||||
{
|
||||
|
||||
@@ -12,6 +12,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemDictionary extends ItemMekanism
|
||||
@@ -39,15 +40,15 @@ public class ItemDictionary extends ItemMekanism
|
||||
|
||||
if(!names.isEmpty())
|
||||
{
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " " + LangUtils.localize("tooltip.keysFound") + ":"));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " " + LangUtils.localize("tooltip.keysFound") + ":"));
|
||||
|
||||
for(String name : names)
|
||||
{
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.DARK_GREEN + " - " + name));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.DARK_GREEN + " - " + name));
|
||||
}
|
||||
}
|
||||
else {
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " " + LangUtils.localize("tooltip.noKey") + "."));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " " + LangUtils.localize("tooltip.noKey") + "."));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemNetworkReader extends ItemEnergized
|
||||
@@ -44,21 +45,21 @@ public class ItemNetworkReader extends ItemEnergized
|
||||
|
||||
IGridTransmitter transmitter = MekanismUtils.getCapability(tileEntity, Capabilities.GRID_TRANSMITTER_CAPABILITY, side.getOpposite());
|
||||
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.GREY + "------------- " + EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " -------------"));
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.GREY + " *Transmitters: " + EnumColor.DARK_GREY + transmitter.getTransmitterNetworkSize()));
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.GREY + " *Acceptors: " + EnumColor.DARK_GREY + transmitter.getTransmitterNetworkAcceptorSize()));
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.GREY + " *Needed: " + EnumColor.DARK_GREY + transmitter.getTransmitterNetworkNeeded()));
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.GREY + " *Buffer: " + EnumColor.DARK_GREY + transmitter.getTransmitterNetworkBuffer()));
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.GREY + " *Throughput: " + EnumColor.DARK_GREY + transmitter.getTransmitterNetworkFlow()));
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.GREY + " *Capacity: " + EnumColor.DARK_GREY + transmitter.getTransmitterNetworkCapacity()));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.GREY + "------------- " + EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " -------------"));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.GREY + " *Transmitters: " + EnumColor.DARK_GREY + transmitter.getTransmitterNetworkSize()));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.GREY + " *Acceptors: " + EnumColor.DARK_GREY + transmitter.getTransmitterNetworkAcceptorSize()));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.GREY + " *Needed: " + EnumColor.DARK_GREY + transmitter.getTransmitterNetworkNeeded()));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.GREY + " *Buffer: " + EnumColor.DARK_GREY + transmitter.getTransmitterNetworkBuffer()));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.GREY + " *Throughput: " + EnumColor.DARK_GREY + transmitter.getTransmitterNetworkFlow()));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.GREY + " *Capacity: " + EnumColor.DARK_GREY + transmitter.getTransmitterNetworkCapacity()));
|
||||
|
||||
if(MekanismUtils.hasCapability(tileEntity, Capabilities.HEAT_TRANSFER_CAPABILITY, side.getOpposite()))
|
||||
{
|
||||
IHeatTransfer transfer = MekanismUtils.getCapability(tileEntity, Capabilities.HEAT_TRANSFER_CAPABILITY, side.getOpposite());
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.GREY + " *Temperature: " + EnumColor.DARK_GREY + transfer.getTemp() + "K above ambient"));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.GREY + " *Temperature: " + EnumColor.DARK_GREY + transfer.getTemp() + "K above ambient"));
|
||||
}
|
||||
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.GREY + "------------- " + EnumColor.DARK_BLUE + "[=======]" + EnumColor.GREY + " -------------"));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.GREY + "------------- " + EnumColor.DARK_BLUE + "[=======]" + EnumColor.GREY + " -------------"));
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -67,9 +68,9 @@ public class ItemNetworkReader extends ItemEnergized
|
||||
if(drain) setEnergy(stack, getEnergy(stack)-ENERGY_PER_USE);
|
||||
|
||||
IHeatTransfer transfer = MekanismUtils.getCapability(tileEntity, Capabilities.HEAT_TRANSFER_CAPABILITY, side.getOpposite());
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.GREY + "------------- " + EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " -------------"));
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.GREY + " *Temperature: " + EnumColor.DARK_GREY + transfer.getTemp() + "K above ambient"));
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.GREY + "------------- " + EnumColor.DARK_BLUE + "[=======]" + EnumColor.GREY + " -------------"));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.GREY + "------------- " + EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " -------------"));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.GREY + " *Temperature: " + EnumColor.DARK_GREY + transfer.getTemp() + "K above ambient"));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.GREY + "------------- " + EnumColor.DARK_BLUE + "[=======]" + EnumColor.GREY + " -------------"));
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -90,9 +91,9 @@ public class ItemNetworkReader extends ItemEnergized
|
||||
|
||||
if(transmitter.getTransmitterNetwork().possibleAcceptors.containsKey(coord.offset(iterSide.getOpposite())) && !iteratedNetworks.contains(transmitter.getTransmitterNetwork()))
|
||||
{
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.GREY + "------------- " + EnumColor.DARK_BLUE + "[" + transmitter.getTransmissionType().getName() + "]" + EnumColor.GREY + " -------------"));
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.GREY + " *Connected sides: " + EnumColor.DARK_GREY + transmitter.getTransmitterNetwork().acceptorDirections.get(coord.offset(iterSide.getOpposite()))));
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.GREY + "------------- " + EnumColor.DARK_BLUE + "[=======]" + EnumColor.GREY + " -------------"));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.GREY + "------------- " + EnumColor.DARK_BLUE + "[" + transmitter.getTransmissionType().getName() + "]" + EnumColor.GREY + " -------------"));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.GREY + " *Connected sides: " + EnumColor.DARK_GREY + transmitter.getTransmitterNetwork().acceptorDirections.get(coord.offset(iterSide.getOpposite()))));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.GREY + "------------- " + EnumColor.DARK_BLUE + "[=======]" + EnumColor.GREY + " -------------"));
|
||||
|
||||
iteratedNetworks.add(transmitter.getTransmitterNetwork());
|
||||
}
|
||||
@@ -106,14 +107,14 @@ public class ItemNetworkReader extends ItemEnergized
|
||||
if(player.isSneaking() && MekanismAPI.debug)
|
||||
{
|
||||
String[] strings = TransmitterNetworkRegistry.getInstance().toStrings();
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.GREY + "---------- " + EnumColor.DARK_BLUE + "[Mekanism Debug]" + EnumColor.GREY + " ----------"));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.GREY + "---------- " + EnumColor.DARK_BLUE + "[Mekanism Debug]" + EnumColor.GREY + " ----------"));
|
||||
|
||||
for(String s : strings)
|
||||
{
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.DARK_GREY + s));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.DARK_GREY + s));
|
||||
}
|
||||
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.GREY + "------------- " + EnumColor.DARK_BLUE + "[=======]" + EnumColor.GREY + " -------------"));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.GREY + "------------- " + EnumColor.DARK_BLUE + "[=======]" + EnumColor.GREY + " -------------"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ import net.minecraft.client.settings.GameSettings;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemPortableTeleporter extends ItemEnergized implements IOwnerItem
|
||||
@@ -52,7 +53,7 @@ public class ItemPortableTeleporter extends ItemEnergized implements IOwnerItem
|
||||
if(getOwner(itemstack) == null)
|
||||
{
|
||||
setOwner(itemstack, entityplayer.getName());
|
||||
entityplayer.addChatMessage(new ChatComponentText(EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.GREY + LangUtils.localize("gui.nowOwn")));
|
||||
entityplayer.addChatMessage(new TextComponentString(EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.GREY + LangUtils.localize("gui.nowOwn")));
|
||||
}
|
||||
else {
|
||||
if(SecurityUtils.canAccess(entityplayer, itemstack))
|
||||
@@ -77,9 +78,9 @@ public class ItemPortableTeleporter extends ItemEnergized implements IOwnerItem
|
||||
|
||||
int neededEnergy = 1000;
|
||||
|
||||
if(entity.worldObj.provider.getDimensionId() != coords.dimensionId)
|
||||
if(entity.worldObj.provider.getDimension() != coords.dimensionId)
|
||||
{
|
||||
neededEnergy+=10000;
|
||||
neededEnergy += 10000;
|
||||
}
|
||||
|
||||
int distance = (int)entity.getDistance(coords.xCoord, coords.yCoord, coords.zCoord);
|
||||
|
||||
@@ -7,6 +7,7 @@ import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemSeismicReader extends ItemEnergized
|
||||
@@ -33,7 +34,7 @@ public class ItemSeismicReader extends ItemEnergized
|
||||
{
|
||||
if(!world.isRemote)
|
||||
{
|
||||
entityplayer.addChatMessage(new ChatComponentText(EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.RED + LangUtils.localize("tooltip.seismicReader.needsEnergy")));
|
||||
entityplayer.addChatMessage(new TextComponentString(EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.RED + LangUtils.localize("tooltip.seismicReader.needsEnergy")));
|
||||
}
|
||||
|
||||
return itemstack;
|
||||
@@ -42,7 +43,7 @@ public class ItemSeismicReader extends ItemEnergized
|
||||
{
|
||||
if(!world.isRemote)
|
||||
{
|
||||
entityplayer.addChatMessage(new ChatComponentText(EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.RED + LangUtils.localize("tooltip.seismicReader.noVibrations")));
|
||||
entityplayer.addChatMessage(new TextComponentString(EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.RED + LangUtils.localize("tooltip.seismicReader.noVibrations")));
|
||||
}
|
||||
|
||||
return itemstack;
|
||||
|
||||
@@ -2,27 +2,20 @@ package mekanism.common.multipart;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/*
|
||||
import codechicken.lib.vec.BlockCoord;
|
||||
import codechicken.lib.vec.Vector3;
|
||||
import codechicken.microblock.HollowMicroblock;
|
||||
import codechicken.multipart.JItemMultiPart;
|
||||
import codechicken.multipart.TMultiPart;
|
||||
import codechicken.multipart.TileMultipart;
|
||||
*/
|
||||
import mcmultipart.item.ItemMultiPart;
|
||||
import mcmultipart.multipart.IMultipart;
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.base.IMetaItem;
|
||||
import mekanism.common.util.LangUtils;
|
||||
//import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
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.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.util.text.translation.I18n;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemGlowPanel extends ItemMultiPart implements IMetaItem
|
||||
@@ -35,7 +28,7 @@ public class ItemGlowPanel extends ItemMultiPart implements IMetaItem
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMultipart createPart(World world, BlockPos pos, EnumFacing orientation, Vec3 vHit, ItemStack item, EntityPlayer player)
|
||||
public IMultipart createPart(World world, BlockPos pos, EnumFacing orientation, Vec3d vHit, ItemStack item, EntityPlayer player)
|
||||
{
|
||||
EnumColor col = EnumColor.DYES[item.getItemDamage()];
|
||||
|
||||
@@ -67,7 +60,7 @@ public class ItemGlowPanel extends ItemMultiPart implements IMetaItem
|
||||
EnumColor colour = EnumColor.DYES[stack.getItemDamage()];
|
||||
String colourName;
|
||||
|
||||
if(StatCollector.canTranslate(getUnlocalizedName(stack) + "." + colour.dyeName))
|
||||
if(I18n.canTranslate(getUnlocalizedName(stack) + "." + colour.dyeName))
|
||||
{
|
||||
return LangUtils.localize(getUnlocalizedName(stack) + "." + colour.dyeName);
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.World;
|
||||
/*
|
||||
import codechicken.lib.vec.BlockCoord;
|
||||
@@ -42,7 +43,7 @@ public class ItemPartTransmitter extends ItemMultiPart implements IMetaItem
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMultipart createPart(World world, BlockPos pos, EnumFacing dir, Vec3 hit, ItemStack stack, EntityPlayer player)
|
||||
public IMultipart createPart(World world, BlockPos pos, EnumFacing dir, Vec3d hit, ItemStack stack, EntityPlayer player)
|
||||
{
|
||||
TransmitterType type = TransmitterType.values()[stack.getItemDamage()];
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
|
||||
public class PartDiversionTransporter extends PartLogisticalTransporter
|
||||
{
|
||||
@@ -47,11 +48,13 @@ public class PartDiversionTransporter extends PartLogisticalTransporter
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbtTags)
|
||||
public NBTTagCompound writeToNBT(NBTTagCompound nbtTags)
|
||||
{
|
||||
super.writeToNBT(nbtTags);
|
||||
|
||||
nbtTags.setIntArray("modes", modes);
|
||||
|
||||
return nbtTags;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -124,7 +127,7 @@ public class PartDiversionTransporter extends PartLogisticalTransporter
|
||||
refreshConnections();
|
||||
notifyPartUpdate();
|
||||
notifyTileChange();
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " " + LangUtils.localize("tooltip.configurator.toggleDiverter") + ": " + EnumColor.RED + description));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " " + LangUtils.localize("tooltip.configurator.toggleDiverter") + ": " + EnumColor.RED + description));
|
||||
Coord4D coord = new Coord4D(getPos(), getWorld());
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(coord, getNetworkedData(new ArrayList<Object>())), new Range4D(coord));
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ import mekanism.api.Coord4D;
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.common.MekanismItems;
|
||||
import mekanism.common.block.states.BlockStateFacing;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -165,7 +166,7 @@ public class PartGlowPanel extends Multipart implements IOccludingPart
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState createBlockState()
|
||||
public BlockStateContainer createBlockState()
|
||||
{
|
||||
return new GlowPanelBlockState();
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.common.property.IExtendedBlockState;
|
||||
import net.minecraftforge.common.util.Constants.NBT;
|
||||
@@ -336,7 +337,7 @@ public class PartLogisticalTransporter extends PartTransmitter<IInventory, Inven
|
||||
notifyTileChange();
|
||||
PathfinderCache.onChanged(new Coord4D(getPos(), getWorld()));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(new Coord4D(getPos(), getWorld()), getNetworkedData(new ArrayList())), new Range4D(new Coord4D(getPos(), getWorld())));
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " " + LangUtils.localize("tooltip.configurator.toggleColor") + ": " + (getTransmitter().getColor() != null ? getTransmitter().getColor().getColoredName() : EnumColor.BLACK + LangUtils.localize("gui.none"))));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " " + LangUtils.localize("tooltip.configurator.toggleColor") + ": " + (getTransmitter().getColor() != null ? getTransmitter().getColor().getColoredName() : EnumColor.BLACK + LangUtils.localize("gui.none"))));
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -345,7 +346,7 @@ public class PartLogisticalTransporter extends PartTransmitter<IInventory, Inven
|
||||
public boolean onRightClick(EntityPlayer player, EnumFacing side)
|
||||
{
|
||||
super.onRightClick(player, side);
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " " + LangUtils.localize("tooltip.configurator.viewColor") + ": " + (getTransmitter().getColor() != null ? getTransmitter().getColor().getColoredName() : "None")));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " " + LangUtils.localize("tooltip.configurator.viewColor") + ": " + (getTransmitter().getColor() != null ? getTransmitter().getColor().getColoredName() : "None")));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,10 +7,13 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import mcmultipart.MCMultiPartMod;
|
||||
import mcmultipart.block.TileMultipartContainer;
|
||||
import mcmultipart.multipart.IMultipart;
|
||||
import mcmultipart.multipart.INormallyOccludingPart;
|
||||
import mcmultipart.multipart.Multipart;
|
||||
import mcmultipart.raytrace.PartMOP;
|
||||
import mcmultipart.raytrace.RayTraceUtils;
|
||||
import mcmultipart.raytrace.RayTraceUtils.AdvancedRayTraceResultPart;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.IConfigurable;
|
||||
@@ -25,6 +28,7 @@ import mekanism.common.multipart.TransmitterType.Size;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.properties.IProperty;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -32,11 +36,14 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
import net.minecraft.util.ITickable;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.obj.OBJModel.OBJProperty;
|
||||
import net.minecraftforge.client.model.obj.OBJModel.OBJState;
|
||||
@@ -46,7 +53,7 @@ import net.minecraftforge.common.property.IExtendedBlockState;
|
||||
import net.minecraftforge.common.property.IUnlistedProperty;
|
||||
//import net.minecraft.util.IIcon;
|
||||
|
||||
public abstract class PartSidedPipe extends Multipart implements IOccludingPart, /*ISlotOccludingPart, ISidedHollowConnect, JIconHitEffects, INeighborTileChange,*/ ITileNetwork, IBlockableConnection, IConfigurable, ITransmitter, ITickable
|
||||
public abstract class PartSidedPipe extends Multipart implements INormallyOccludingPart, /*ISlotOccludingPart, ISidedHollowConnect, JIconHitEffects, INeighborTileChange,*/ ITileNetwork, IBlockableConnection, IConfigurable, ITransmitter, ITickable
|
||||
{
|
||||
public static AxisAlignedBB[] smallSides = new AxisAlignedBB[7];
|
||||
public static AxisAlignedBB[] largeSides = new AxisAlignedBB[7];
|
||||
@@ -561,7 +568,7 @@ public abstract class PartSidedPipe extends Multipart implements IOccludingPart,
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbtTags)
|
||||
public NBTTagCompound writeToNBT(NBTTagCompound nbtTags)
|
||||
{
|
||||
super.writeToNBT(nbtTags);
|
||||
|
||||
@@ -571,6 +578,8 @@ public abstract class PartSidedPipe extends Multipart implements IOccludingPart,
|
||||
{
|
||||
nbtTags.setInteger("connection" + i, connectionTypes[i].ordinal());
|
||||
}
|
||||
|
||||
return nbtTags;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -799,7 +808,7 @@ public abstract class PartSidedPipe extends Multipart implements IOccludingPart,
|
||||
sendDesc = true;
|
||||
|
||||
onModeChange(EnumFacing.getFront(hitSide.ordinal()));
|
||||
player.addChatMessage(new ChatComponentText("Connection type changed to " + connectionTypes[hitSide.ordinal()].toString()));
|
||||
player.addChatMessage(new TextComponentString("Connection type changed to " + connectionTypes[hitSide.ordinal()].toString()));
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -814,9 +823,9 @@ public abstract class PartSidedPipe extends Multipart implements IOccludingPart,
|
||||
|
||||
private PartMOP reTrace(World world, BlockPos pos, EntityPlayer player)
|
||||
{
|
||||
Vec3 start = RayTraceUtils.getStart(player);
|
||||
Vec3 end = RayTraceUtils.getEnd(player);
|
||||
RayTraceResultPart result = ((TileMultipart)world.getTileEntity(pos)).getPartContainer().collisionRayTrace(start, end);
|
||||
Vec3d start = RayTraceUtils.getStart(player);
|
||||
Vec3d end = RayTraceUtils.getEnd(player);
|
||||
AdvancedRayTraceResultPart result = ((TileMultipartContainer)world.getTileEntity(pos)).getPartContainer().collisionRayTrace(start, end);
|
||||
|
||||
return result == null ? null : result.hit;
|
||||
}
|
||||
@@ -863,7 +872,7 @@ public abstract class PartSidedPipe extends Multipart implements IOccludingPart,
|
||||
refreshConnections();
|
||||
notifyTileChange();
|
||||
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " Redstone sensitivity turned " + EnumColor.INDIGO + (redstoneReactive ? "on." : "off.")));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " Redstone sensitivity turned " + EnumColor.INDIGO + (redstoneReactive ? "on." : "off.")));
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -876,7 +885,7 @@ public abstract class PartSidedPipe extends Multipart implements IOccludingPart,
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState createBlockState()
|
||||
public BlockStateContainer createBlockState()
|
||||
{
|
||||
return new ExtendedBlockState(MCMultiPartMod.multipart, new IProperty[0], new IUnlistedProperty[] {OBJProperty.instance, ColorProperty.INSTANCE, ConnectionProperty.INSTANCE});
|
||||
}
|
||||
@@ -902,9 +911,9 @@ public abstract class PartSidedPipe extends Multipart implements IOccludingPart,
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canRenderInLayer(EnumWorldBlockLayer layer)
|
||||
public boolean canRenderInLayer(BlockRenderLayer layer)
|
||||
{
|
||||
return layer == EnumWorldBlockLayer.CUTOUT || (transparencyRender() && layer == EnumWorldBlockLayer.TRANSLUCENT);
|
||||
return layer == BlockRenderLayer.CUTOUT || (transparencyRender() && layer == BlockRenderLayer.TRANSLUCENT);
|
||||
}
|
||||
|
||||
public void notifyTileChange()
|
||||
|
||||
@@ -14,6 +14,8 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.fml.common.Optional.Interface;
|
||||
import net.minecraftforge.fml.common.Optional.InterfaceList;
|
||||
@@ -103,9 +105,9 @@ public class TileEntityAdvancedBoundingBlock extends TileEntityBoundingBlock imp
|
||||
}
|
||||
|
||||
@Override
|
||||
public IChatComponent getDisplayName()
|
||||
public ITextComponent getDisplayName()
|
||||
{
|
||||
return new ChatComponentText(getName());
|
||||
return new TextComponentString(getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -37,9 +37,9 @@ public class TileEntityAmbientAccumulator extends TileEntityContainerBlock imple
|
||||
{
|
||||
if(!worldObj.isRemote)
|
||||
{
|
||||
if(cachedRecipe == null || worldObj.provider.getDimensionId() != cachedDimensionId)
|
||||
if(cachedRecipe == null || worldObj.provider.getDimension() != cachedDimensionId)
|
||||
{
|
||||
cachedDimensionId = worldObj.provider.getDimensionId();
|
||||
cachedDimensionId = worldObj.provider.getDimension();
|
||||
cachedRecipe = RecipeHandler.getDimensionGas(new IntegerInput(cachedDimensionId));
|
||||
}
|
||||
|
||||
|
||||
@@ -200,7 +200,7 @@ public abstract class TileEntityBasicBlock extends TileEntity implements IWrench
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbtTags)
|
||||
public NBTTagCompound writeToNBT(NBTTagCompound nbtTags)
|
||||
{
|
||||
super.writeToNBT(nbtTags);
|
||||
|
||||
@@ -211,6 +211,8 @@ public abstract class TileEntityBasicBlock extends TileEntity implements IWrench
|
||||
{
|
||||
component.write(nbtTags);
|
||||
}
|
||||
|
||||
return nbtTags;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -285,7 +287,7 @@ public abstract class TileEntityBasicBlock extends TileEntity implements IWrench
|
||||
@Method(modid = "IC2")
|
||||
public ItemStack getWrenchDrop(EntityPlayer entityPlayer)
|
||||
{
|
||||
return getBlockType().getPickBlock(null, worldObj, getPos(), entityPlayer);
|
||||
return getBlockType().getPickBlock(worldObj.getBlockState(getPos()), null, worldObj, getPos(), entityPlayer);
|
||||
}
|
||||
|
||||
public boolean isPowered()
|
||||
|
||||
@@ -29,6 +29,8 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.ITickable;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
import net.minecraftforge.fml.common.Optional.Interface;
|
||||
import powercrystals.minefactoryreloaded.api.IDeepStorageUnit;
|
||||
@@ -450,9 +452,9 @@ public class TileEntityBin extends TileEntityBasicBlock implements ISidedInvento
|
||||
}
|
||||
|
||||
@Override
|
||||
public IChatComponent getDisplayName()
|
||||
public ITextComponent getDisplayName()
|
||||
{
|
||||
return new ChatComponentText(getName());
|
||||
return new TextComponentString(getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -228,7 +228,7 @@ public class TileEntityBoilerCasing extends TileEntityMultiblock<SynchronizedBoi
|
||||
if(structure.waterStored != null)
|
||||
{
|
||||
data.add(1);
|
||||
data.add(structure.waterStored.getFluid().getName());
|
||||
data.add(FluidRegistry.getFluidName(structure.waterStored));
|
||||
data.add(structure.waterStored.amount);
|
||||
}
|
||||
else {
|
||||
@@ -238,7 +238,7 @@ public class TileEntityBoilerCasing extends TileEntityMultiblock<SynchronizedBoi
|
||||
if(structure.steamStored != null)
|
||||
{
|
||||
data.add(1);
|
||||
data.add(structure.steamStored.getFluid().getName());
|
||||
data.add(FluidRegistry.getFluidName(structure.steamStored));
|
||||
data.add(structure.steamStored.amount);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -100,7 +100,7 @@ public class TileEntityBoundingBlock extends TileEntity implements ITileNetwork
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbtTags)
|
||||
public NBTTagCompound writeToNBT(NBTTagCompound nbtTags)
|
||||
{
|
||||
super.writeToNBT(nbtTags);
|
||||
|
||||
@@ -109,6 +109,8 @@ public class TileEntityBoundingBlock extends TileEntity implements ITileNetwork
|
||||
nbtTags.setInteger("mainZ", mainPos.getZ());
|
||||
nbtTags.setInteger("prevPower", prevPower);
|
||||
nbtTags.setBoolean("receivedCoords", receivedCoords);
|
||||
|
||||
return nbtTags;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -20,7 +20,7 @@ public class TileEntityCardboardBox extends TileEntity
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbtTags)
|
||||
public NBTTagCompound writeToNBT(NBTTagCompound nbtTags)
|
||||
{
|
||||
super.writeToNBT(nbtTags);
|
||||
|
||||
@@ -28,5 +28,7 @@ public class TileEntityCardboardBox extends TileEntity
|
||||
{
|
||||
nbtTags.setTag("storedData", storedData.write(new NBTTagCompound()));
|
||||
}
|
||||
|
||||
return nbtTags;
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,7 @@ import mekanism.api.gas.IGasHandler;
|
||||
import mekanism.api.gas.IGasItem;
|
||||
import mekanism.api.gas.ITubeConnection;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.Upgrade;
|
||||
import mekanism.common.Upgrade.IUpgradeInfoHandler;
|
||||
import mekanism.common.base.IRedstoneControl;
|
||||
@@ -241,7 +242,7 @@ public class TileEntityChemicalWasher extends TileEntityNoisyElectricBlock imple
|
||||
|
||||
if(dataStream.readBoolean())
|
||||
{
|
||||
fluidTank.setFluid(new FluidStack(FluidRegistry.getFluid(dataStream.readInt()), dataStream.readInt()));
|
||||
fluidTank.setFluid(new FluidStack(FluidRegistry.getFluid(PacketHandler.readString(dataStream)), dataStream.readInt()));
|
||||
}
|
||||
else {
|
||||
fluidTank.setFluid(null);
|
||||
@@ -284,7 +285,7 @@ public class TileEntityChemicalWasher extends TileEntityNoisyElectricBlock imple
|
||||
if(fluidTank.getFluid() != null)
|
||||
{
|
||||
data.add(true);
|
||||
data.add(fluidTank.getFluid().getFluid().getID());
|
||||
data.add(FluidRegistry.getFluidName(fluidTank.getFluid()));
|
||||
data.add(fluidTank.getFluidAmount());
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -30,7 +30,7 @@ public class TileEntityCombiner extends TileEntityAdvancedElectricMachine<Combin
|
||||
@Override
|
||||
public GasStack getItemGas(ItemStack itemstack)
|
||||
{
|
||||
if(itemstack.getItem() instanceof ItemBlock && Block.getBlockFromItem(itemstack.getItem()) == Blocks.cobblestone)
|
||||
if(itemstack.getItem() instanceof ItemBlock && Block.getBlockFromItem(itemstack.getItem()) == Blocks.COBBLESTONE)
|
||||
{
|
||||
return new GasStack(GasRegistry.getGas("liquidStone"), 200);
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I
|
||||
toRemove.add(chunk);
|
||||
}
|
||||
|
||||
worldObj.playAuxSFXAtEntity(null, 2001, coord.getPos(), Block.getIdFromBlock(block) + (meta << 12));
|
||||
worldObj.playEvent(null, 2001, coord.getPos(), Block.getStateId(state));
|
||||
|
||||
missingStack = null;
|
||||
}
|
||||
@@ -1034,7 +1034,7 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I
|
||||
|
||||
public Coord4D getStartingCoord()
|
||||
{
|
||||
return new Coord4D(getPos().getX()-radius, minY, getPos().getZ()-radius, worldObj.provider.getDimensionId());
|
||||
return new Coord4D(getPos().getX()-radius, minY, getPos().getZ()-radius, worldObj.provider.getDimension());
|
||||
}
|
||||
|
||||
public Coord4D getCoordFromIndex(int index)
|
||||
@@ -1046,7 +1046,7 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I
|
||||
int y = start.yCoord+(index/diameter/diameter);
|
||||
int z = start.zCoord+(index/diameter)%diameter;
|
||||
|
||||
return new Coord4D(x, y, z, worldObj.provider.getDimensionId());
|
||||
return new Coord4D(x, y, z, worldObj.provider.getDimension());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -215,7 +215,7 @@ public class TileEntityDynamicTank extends TileEntityMultiblock<SynchronizedTank
|
||||
if(structure.fluidStored != null)
|
||||
{
|
||||
data.add(1);
|
||||
data.add(structure.fluidStored.getFluid().getName());
|
||||
data.add(FluidRegistry.getFluidName(structure.fluidStored));
|
||||
data.add(structure.fluidStored.amount);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -36,6 +36,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.common.util.Constants.NBT;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
@@ -293,7 +294,7 @@ public class TileEntityElectricPump extends TileEntityElectricBlock implements I
|
||||
if(fluidTank.getFluid() != null)
|
||||
{
|
||||
data.add(1);
|
||||
data.add(fluidTank.getFluid().getFluid().getName());
|
||||
data.add(FluidRegistry.getFluidName(fluidTank.getFluid()));
|
||||
data.add(fluidTank.getFluid().amount);
|
||||
}
|
||||
else {
|
||||
@@ -510,7 +511,7 @@ public class TileEntityElectricPump extends TileEntityElectricBlock implements I
|
||||
{
|
||||
reset();
|
||||
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.GREY + LangUtils.localize("tooltip.configurator.pumpReset")));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.GREY + LangUtils.localize("tooltip.configurator.pumpReset")));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -456,7 +456,7 @@ public class TileEntityElectrolyticSeparator extends TileEntityElectricBlock imp
|
||||
if(fluidTank.getFluid() != null)
|
||||
{
|
||||
data.add(true);
|
||||
data.add(fluidTank.getFluid().getFluid().getName());
|
||||
data.add(FluidRegistry.getFluidName(fluidTank.getFluid()));
|
||||
data.add(fluidTank.getFluidAmount());
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -25,10 +25,12 @@ import mekanism.common.util.InventoryUtils;
|
||||
import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.SoundEvents;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidContainerRegistry;
|
||||
@@ -395,13 +397,13 @@ public class TileEntityFluidTank extends TileEntityContainerBlock implements IAc
|
||||
|
||||
if(valve > 0)
|
||||
{
|
||||
data.add(valveFluid.getName());
|
||||
data.add(FluidRegistry.getFluidName(valveFluid));
|
||||
}
|
||||
|
||||
if(fluidTank.getFluid() != null)
|
||||
{
|
||||
data.add(1);
|
||||
data.add(fluidTank.getFluid().getFluid().getName());
|
||||
data.add(FluidRegistry.getFluidName(fluidTank.getFluid()));
|
||||
data.add(fluidTank.getFluid().amount);
|
||||
}
|
||||
else {
|
||||
@@ -449,7 +451,7 @@ public class TileEntityFluidTank extends TileEntityContainerBlock implements IAc
|
||||
if(!worldObj.isRemote)
|
||||
{
|
||||
setActive(!getActive());
|
||||
worldObj.playSoundEffect(getPos().getX(), getPos().getY(), getPos().getZ(), "random.click", 0.3F, 1);
|
||||
worldObj.playSound(null, getPos().getX(), getPos().getY(), getPos().getZ(), SoundEvents.UI_BUTTON_CLICK, SoundCategory.BLOCKS, 0.3F, 1);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -33,6 +33,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.common.util.Constants.NBT;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
@@ -266,7 +267,7 @@ public class TileEntityFluidicPlenisher extends TileEntityElectricBlock implemen
|
||||
if(fluidTank.getFluid() != null)
|
||||
{
|
||||
data.add(1);
|
||||
data.add(fluidTank.getFluid().getFluid().getName());
|
||||
data.add(FluidRegistry.getFluidName(fluidTank.getFluid()));
|
||||
data.add(fluidTank.getFluid().amount);
|
||||
}
|
||||
else {
|
||||
@@ -490,7 +491,7 @@ public class TileEntityFluidicPlenisher extends TileEntityElectricBlock implemen
|
||||
usedNodes.clear();
|
||||
finishedCalc = false;
|
||||
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.GREY + LangUtils.localize("tooltip.configurator.plenisherReset")));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.GREY + LangUtils.localize("tooltip.configurator.plenisherReset")));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
@@ -436,7 +437,7 @@ public class TileEntityInductionPort extends TileEntityInductionCasing implement
|
||||
{
|
||||
mode = !mode;
|
||||
String modeText = " " + (mode ? EnumColor.DARK_RED : EnumColor.DARK_GREEN) + LangUtils.transOutputInput(mode) + ".";
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.GREY + LangUtils.localize("tooltip.configurator.inductionPortMode") + modeText));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.GREY + LangUtils.localize("tooltip.configurator.inductionPortMode") + modeText));
|
||||
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList<Object>())), new Range4D(Coord4D.get(this)));
|
||||
markDirty();
|
||||
|
||||
@@ -16,7 +16,7 @@ import mekanism.common.Mekanism;
|
||||
import mekanism.common.base.IActiveState;
|
||||
import mekanism.common.network.PacketTileEntity.TileEntityMessage;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -59,7 +59,7 @@ public class TileEntityLaser extends TileEntityNoisyElectricBlock implements IAc
|
||||
|
||||
if(hitCoord != null)
|
||||
{
|
||||
Block blockHit = hitCoord.getBlock(worldObj);
|
||||
IBlockState blockHit = hitCoord.getBlockState(worldObj);
|
||||
TileEntity tileHit = hitCoord.getTileEntity(worldObj);
|
||||
float hardness = blockHit.getBlockHardness(worldObj, hitCoord.getPos());
|
||||
|
||||
@@ -91,7 +91,7 @@ public class TileEntityLaser extends TileEntityNoisyElectricBlock implements IAc
|
||||
|
||||
if(hitCoord != null)
|
||||
{
|
||||
Block blockHit = hitCoord.getBlock(worldObj);
|
||||
IBlockState blockHit = hitCoord.getBlockState(worldObj);
|
||||
TileEntity tileHit = hitCoord.getTileEntity(worldObj);
|
||||
float hardness = blockHit.getBlockHardness(worldObj, hitCoord.getPos());
|
||||
|
||||
|
||||
@@ -19,11 +19,12 @@ import mekanism.common.network.PacketTileEntity.TileEntityMessage;
|
||||
import mekanism.common.security.ISecurityTile;
|
||||
import mekanism.common.tile.component.TileComponentSecurity;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
|
||||
@@ -86,7 +87,7 @@ public class TileEntityLaserAmplifier extends TileEntityContainerBlock implement
|
||||
|
||||
if(hitCoord != null)
|
||||
{
|
||||
Block blockHit = hitCoord.getBlock(worldObj);
|
||||
IBlockState blockHit = hitCoord.getBlockState(worldObj);
|
||||
TileEntity tileHit = hitCoord.getTileEntity(worldObj);
|
||||
float hardness = blockHit.getBlockHardness(worldObj, hitCoord.getPos());
|
||||
|
||||
@@ -138,7 +139,7 @@ public class TileEntityLaserAmplifier extends TileEntityContainerBlock implement
|
||||
|
||||
if(hitCoord != null)
|
||||
{
|
||||
Block blockHit = hitCoord.getBlock(worldObj);
|
||||
IBlockState blockHit = hitCoord.getBlockState(worldObj);
|
||||
TileEntity tileHit = hitCoord.getTileEntity(worldObj);
|
||||
float hardness = blockHit.getBlockHardness(worldObj, hitCoord.getPos());
|
||||
|
||||
|
||||
@@ -16,11 +16,12 @@ import mekanism.common.network.PacketTileEntity.TileEntityMessage;
|
||||
import mekanism.common.security.ISecurityTile;
|
||||
import mekanism.common.tile.component.TileComponentSecurity;
|
||||
import mekanism.common.util.InventoryUtils;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
|
||||
public class TileEntityLaserTractorBeam extends TileEntityContainerBlock implements ILaserReceptor, ISecurityTile
|
||||
@@ -74,7 +75,7 @@ public class TileEntityLaserTractorBeam extends TileEntityContainerBlock impleme
|
||||
|
||||
if(hitCoord != null)
|
||||
{
|
||||
Block blockHit = hitCoord.getBlock(worldObj);
|
||||
IBlockState blockHit = hitCoord.getBlockState(worldObj);
|
||||
TileEntity tileHit = hitCoord.getTileEntity(worldObj);
|
||||
float hardness = blockHit.getBlockHardness(worldObj, hitCoord.getPos());
|
||||
if(!(hardness < 0 || (tileHit instanceof ILaserReceptor && !((ILaserReceptor)tileHit).canLasersDig())))
|
||||
@@ -113,7 +114,7 @@ public class TileEntityLaserTractorBeam extends TileEntityContainerBlock impleme
|
||||
|
||||
if(hitCoord != null)
|
||||
{
|
||||
Block blockHit = hitCoord.getBlock(worldObj);
|
||||
IBlockState blockHit = hitCoord.getBlockState(worldObj);
|
||||
TileEntity tileHit = hitCoord.getTileEntity(worldObj);
|
||||
float hardness = blockHit.getBlockHardness(worldObj, hitCoord.getPos());
|
||||
if(!(hardness < 0 || (tileHit instanceof ILaserReceptor && !((ILaserReceptor)tileHit).canLasersDig())))
|
||||
|
||||
@@ -10,6 +10,7 @@ import mekanism.common.base.IUpgradeTile;
|
||||
import mekanism.common.base.SoundWrapper;
|
||||
import net.minecraft.client.audio.ISound.AttenuationType;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -81,9 +82,9 @@ public abstract class TileEntityNoisyElectricBlock extends TileEntityElectricBlo
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Vec3 getSoundPosition()
|
||||
public Vec3d getSoundPosition()
|
||||
{
|
||||
return new Vec3(getPos()).addVector(0.5, 0.5, 0.5);
|
||||
return new Vec3d(getPos()).addVector(0.5, 0.5, 0.5);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -14,6 +14,7 @@ import mekanism.api.gas.GasTank;
|
||||
import mekanism.api.gas.IGasHandler;
|
||||
import mekanism.api.gas.ITubeConnection;
|
||||
import mekanism.api.transmitters.TransmissionType;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.SideData;
|
||||
import mekanism.common.Upgrade;
|
||||
import mekanism.common.base.ISustainedData;
|
||||
@@ -216,7 +217,7 @@ public class TileEntityPRC extends TileEntityBasicMachine<PressurizedInput, Pres
|
||||
if(inputFluidTank.getFluid() != null)
|
||||
{
|
||||
data.add(true);
|
||||
data.add(inputFluidTank.getFluid().getFluid().getID());
|
||||
data.add(FluidRegistry.getFluidName(inputFluidTank.getFluid()));
|
||||
data.add(inputFluidTank.getFluidAmount());
|
||||
}
|
||||
else {
|
||||
@@ -255,7 +256,7 @@ public class TileEntityPRC extends TileEntityBasicMachine<PressurizedInput, Pres
|
||||
{
|
||||
if(dataStream.readBoolean())
|
||||
{
|
||||
inputFluidTank.setFluid(new FluidStack(FluidRegistry.getFluid(dataStream.readInt()), dataStream.readInt()));
|
||||
inputFluidTank.setFluid(new FluidStack(FluidRegistry.getFluid(PacketHandler.readString(dataStream)), dataStream.readInt()));
|
||||
}
|
||||
else {
|
||||
inputFluidTank.setFluid(null);
|
||||
|
||||
@@ -5,8 +5,10 @@ import mekanism.common.tile.component.TileComponentSecurity;
|
||||
import mekanism.common.util.InventoryUtils;
|
||||
import mekanism.common.util.SecurityUtils;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.SoundEvents;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
|
||||
public class TileEntityPersonalChest extends TileEntityContainerBlock implements ISecurityTile
|
||||
@@ -35,7 +37,7 @@ public class TileEntityPersonalChest extends TileEntityContainerBlock implements
|
||||
|
||||
if((playersUsing.size() > 0) && (lidAngle == 0.0F))
|
||||
{
|
||||
worldObj.playSoundEffect(getPos().getX() + 0.5F, getPos().getY() + 0.5D, getPos().getZ() + 0.5F, "random.chestopen", 0.5F, (worldObj.rand.nextFloat()*0.1F) + 0.9F);
|
||||
worldObj.playSound(null, getPos().getX() + 0.5F, getPos().getY() + 0.5D, getPos().getZ() + 0.5F, SoundEvents.BLOCK_CHEST_OPEN, SoundCategory.BLOCKS, 0.5F, (worldObj.rand.nextFloat()*0.1F) + 0.9F);
|
||||
}
|
||||
|
||||
if((playersUsing.size() == 0 && lidAngle > 0.0F) || (playersUsing.size() > 0 && lidAngle < 1.0F))
|
||||
@@ -59,7 +61,7 @@ public class TileEntityPersonalChest extends TileEntityContainerBlock implements
|
||||
|
||||
if(lidAngle < split && angle >= split)
|
||||
{
|
||||
worldObj.playSoundEffect(getPos().getX() + 0.5D, getPos().getY() + 0.5D, getPos().getZ() + 0.5D, "random.chestclosed", 0.5F, (worldObj.rand.nextFloat()*0.1F) + 0.9F);
|
||||
worldObj.playSound(null, getPos().getX() + 0.5D, getPos().getY() + 0.5D, getPos().getZ() + 0.5D, SoundEvents.BLOCK_CHEST_CLOSE, SoundCategory.BLOCKS, 0.5F, (worldObj.rand.nextFloat()*0.1F) + 0.9F);
|
||||
}
|
||||
|
||||
if(lidAngle < 0.0F)
|
||||
|
||||
@@ -33,7 +33,7 @@ public class TileEntityPurificationChamber extends TileEntityAdvancedElectricMac
|
||||
@Override
|
||||
public GasStack getItemGas(ItemStack itemstack)
|
||||
{
|
||||
if(itemstack.isItemEqual(new ItemStack(Items.flint))) return new GasStack(GasRegistry.getGas("oxygen"), 10);
|
||||
if(itemstack.isItemEqual(new ItemStack(Items.FLINT))) return new GasStack(GasRegistry.getGas("oxygen"), 10);
|
||||
if(Block.getBlockFromItem(itemstack.getItem()) == MekanismBlocks.GasTank && ((IGasItem)itemstack.getItem()).getGas(itemstack) != null &&
|
||||
((IGasItem)itemstack.getItem()).getGas(itemstack).getGas() == GasRegistry.getGas("oxygen")) return new GasStack(GasRegistry.getGas("oxygen"), 1);
|
||||
|
||||
|
||||
@@ -321,7 +321,7 @@ public class TileEntityRotaryCondensentrator extends TileEntityElectricBlock imp
|
||||
if(fluidTank.getFluid() != null)
|
||||
{
|
||||
data.add(true);
|
||||
data.add(fluidTank.getFluid().getFluid().getName());
|
||||
data.add(FluidRegistry.getFluidName(fluidTank.getFluid()));
|
||||
data.add(fluidTank.getFluid().amount);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -34,6 +34,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.world.biome.BiomeDesert;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
@@ -147,7 +148,7 @@ public class TileEntitySolarNeutronActivator extends TileEntityContainerBlock im
|
||||
|
||||
public boolean isDesert()
|
||||
{
|
||||
return worldObj.provider.getBiomeGenForCoords(getPos()) instanceof BiomeGenDesert;
|
||||
return worldObj.provider.getBiomeForCoords(getPos()) instanceof BiomeDesert;
|
||||
}
|
||||
|
||||
public SolarNeutronRecipe getRecipe()
|
||||
|
||||
@@ -32,8 +32,12 @@ import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityList;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.init.SoundEvents;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.play.server.SPacketEntityEffect;
|
||||
import net.minecraft.network.play.server.SPacketRespawn;
|
||||
import net.minecraft.network.play.server.SPacketSetExperience;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
@@ -50,7 +54,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public class TileEntityTeleporter extends TileEntityElectricBlock implements IComputerIntegration, IChunkLoader, IFrequencyHandler, IRedstoneControl, ISecurityTile
|
||||
{
|
||||
private MinecraftServer server = MinecraftServer.getServer();
|
||||
private MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance();
|
||||
|
||||
public AxisAlignedBB teleportBounds = null;
|
||||
|
||||
@@ -388,7 +392,7 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements ICo
|
||||
|
||||
setEnergy(getEnergy() - calculateEnergyCost(entity, closestCoords));
|
||||
|
||||
worldObj.playSoundAtEntity(entity, "mob.endermen.portal", 1.0F, 1.0F);
|
||||
worldObj.playSound(entity.posX, entity.posY, entity.posZ, SoundEvents.ENTITY_ENDERMEN_TELEPORT, entity.getSoundCategory(), 1.0F, 1.0F, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -401,8 +405,8 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements ICo
|
||||
WorldServer oldWorld = player.mcServer.worldServerForDimension(player.dimension);
|
||||
player.dimension = coord.dimensionId;
|
||||
WorldServer newWorld = player.mcServer.worldServerForDimension(player.dimension);
|
||||
player.playerNetServerHandler.sendPacket(new S07PacketRespawn(player.dimension, player.worldObj.getDifficulty(), newWorld.getWorldInfo().getTerrainType(), player.theItemInWorldManager.getGameType()));
|
||||
oldWorld.removePlayerEntityDangerously(player);
|
||||
player.connection.sendPacket(new SPacketRespawn(player.dimension, player.worldObj.getDifficulty(), newWorld.getWorldInfo().getTerrainType(), player.interactionManager.getGameType()));
|
||||
oldWorld.removeEntityDangerously(player);
|
||||
player.isDead = false;
|
||||
|
||||
if(player.isEntityAlive())
|
||||
@@ -413,23 +417,23 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements ICo
|
||||
player.setWorld(newWorld);
|
||||
}
|
||||
|
||||
player.mcServer.getConfigurationManager().preparePlayer(player, oldWorld);
|
||||
player.playerNetServerHandler.setPlayerLocation(coord.xCoord+0.5, coord.yCoord+1, coord.zCoord+0.5, player.rotationYaw, player.rotationPitch);
|
||||
player.theItemInWorldManager.setWorld(newWorld);
|
||||
player.mcServer.getConfigurationManager().updateTimeAndWeatherForPlayer(player, newWorld);
|
||||
player.mcServer.getConfigurationManager().syncPlayerInventory(player);
|
||||
player.mcServer.getPlayerList().preparePlayer(player, oldWorld);
|
||||
player.connection.setPlayerLocation(coord.xCoord+0.5, coord.yCoord+1, coord.zCoord+0.5, player.rotationYaw, player.rotationPitch);
|
||||
player.interactionManager.setWorld(newWorld);
|
||||
player.mcServer.getPlayerList().updateTimeAndWeatherForPlayer(player, newWorld);
|
||||
player.mcServer.getPlayerList().syncPlayerInventory(player);
|
||||
|
||||
for(PotionEffect potioneffect : player.getActivePotionEffects())
|
||||
{
|
||||
player.playerNetServerHandler.sendPacket(new S1DPacketEntityEffect(player.getEntityId(), potioneffect));
|
||||
player.connection.sendPacket(new SPacketEntityEffect(player.getEntityId(), potioneffect));
|
||||
}
|
||||
|
||||
player.playerNetServerHandler.sendPacket(new S1FPacketSetExperience(player.experience, player.experienceTotal, player.experienceLevel)); // Force XP sync
|
||||
player.connection.sendPacket(new SPacketSetExperience(player.experience, player.experienceTotal, player.experienceLevel)); // Force XP sync
|
||||
|
||||
FMLCommonHandler.instance().firePlayerChangedDimensionEvent(player, id, coord.dimensionId);
|
||||
}
|
||||
else {
|
||||
player.playerNetServerHandler.setPlayerLocation(coord.xCoord+0.5, coord.yCoord+1, coord.zCoord+0.5, player.rotationYaw, player.rotationPitch);
|
||||
player.connection.setPlayerLocation(coord.xCoord+0.5, coord.yCoord+1, coord.zCoord+0.5, player.rotationYaw, player.rotationPitch);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -437,7 +441,7 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements ICo
|
||||
{
|
||||
WorldServer world = server.worldServerForDimension(coord.dimensionId);
|
||||
|
||||
if(entity.worldObj.provider.getDimensionId() != coord.dimensionId)
|
||||
if(entity.worldObj.provider.getDimension() != coord.dimensionId)
|
||||
{
|
||||
entity.worldObj.removeEntity(entity);
|
||||
entity.isDead = false;
|
||||
@@ -499,7 +503,7 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements ICo
|
||||
}
|
||||
}
|
||||
|
||||
player.playerNetServerHandler.setPlayerLocation(player.posX, player.posY, player.posZ, yaw, player.rotationPitch);
|
||||
player.connection.setPlayerLocation(player.posX, player.posY, player.posZ, yaw, player.rotationPitch);
|
||||
}
|
||||
|
||||
public List<Entity> getToTeleport()
|
||||
@@ -522,7 +526,7 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements ICo
|
||||
{
|
||||
int energyCost = 1000;
|
||||
|
||||
if(entity.worldObj.provider.getDimensionId() != coords.dimensionId)
|
||||
if(entity.worldObj.provider.getDimension() != coords.dimensionId)
|
||||
{
|
||||
energyCost+=10000;
|
||||
}
|
||||
|
||||
@@ -271,7 +271,7 @@ public class TileEntityThermalEvaporationController extends TileEntityThermalEva
|
||||
{
|
||||
if(!temperatureSet)
|
||||
{
|
||||
biomeTemp = worldObj.getBiomeGenForCoordsBody(getPos()).getFloatTemperature(getPos());
|
||||
biomeTemp = worldObj.getBiomeForCoordsBody(getPos()).getFloatTemperature(getPos());
|
||||
temperatureSet = true;
|
||||
}
|
||||
|
||||
@@ -625,7 +625,7 @@ public class TileEntityThermalEvaporationController extends TileEntityThermalEva
|
||||
if(inputTank.getFluid() != null)
|
||||
{
|
||||
data.add(true);
|
||||
data.add(inputTank.getFluid().getFluid().getName());
|
||||
data.add(FluidRegistry.getFluidName(inputTank.getFluid()));
|
||||
data.add(inputTank.getFluid().amount);
|
||||
}
|
||||
else {
|
||||
@@ -635,7 +635,7 @@ public class TileEntityThermalEvaporationController extends TileEntityThermalEva
|
||||
if(outputTank.getFluid() != null)
|
||||
{
|
||||
data.add(true);
|
||||
data.add(outputTank.getFluid().getFluid().getName());
|
||||
data.add(FluidRegistry.getFluidName(outputTank.getFluid()));
|
||||
data.add(outputTank.getFluid().amount);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -51,7 +51,7 @@ public final class ChargeUtils
|
||||
|
||||
storer.setEnergy(storer.getEnergy() + (item.extractEnergy(itemStack, toTransfer, false)* general.FROM_TE));
|
||||
}
|
||||
else if(inv.getStackInSlot(slotID).getItem() == Items.redstone && storer.getEnergy()+ general.ENERGY_PER_REDSTONE <= storer.getMaxEnergy())
|
||||
else if(inv.getStackInSlot(slotID).getItem() == Items.REDSTONE && storer.getEnergy()+ general.ENERGY_PER_REDSTONE <= storer.getMaxEnergy())
|
||||
{
|
||||
storer.setEnergy(storer.getEnergy() + general.ENERGY_PER_REDSTONE);
|
||||
inv.getStackInSlot(slotID).stackSize--;
|
||||
@@ -107,7 +107,7 @@ public final class ChargeUtils
|
||||
return (MekanismUtils.useIC2() && itemstack.getItem() instanceof IElectricItem && ((IElectricItem)itemstack.getItem()).canProvideEnergy(itemstack)) ||
|
||||
(itemstack.getItem() instanceof IEnergizedItem && ((IEnergizedItem)itemstack.getItem()).canSend(itemstack)) ||
|
||||
(MekanismUtils.useRF() && itemstack.getItem() instanceof IEnergyContainerItem && ((IEnergyContainerItem)itemstack.getItem()).extractEnergy(itemstack, 1, true) != 0) ||
|
||||
itemstack.getItem() == Items.redstone;
|
||||
itemstack.getItem() == Items.REDSTONE;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -37,7 +37,7 @@ public final class ItemRegistryUtils
|
||||
populateMap();
|
||||
}
|
||||
|
||||
ResourceLocation itemResourceLocation = Item.itemRegistry.getNameForObject(stack.getItem());
|
||||
ResourceLocation itemResourceLocation = Item.REGISTRY.getNameForObject(stack.getItem());
|
||||
String modId = itemResourceLocation.getResourceDomain();
|
||||
String lowercaseModId = modId.toLowerCase(Locale.ENGLISH);
|
||||
String modName = modIDMap.get(lowercaseModId);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package mekanism.common.util;
|
||||
|
||||
import mekanism.api.gas.GasStack;
|
||||
import net.minecraft.util.text.translation.I18n;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
public final class LangUtils
|
||||
@@ -37,6 +38,6 @@ public final class LangUtils
|
||||
*/
|
||||
public static String localize(String s)
|
||||
{
|
||||
return StatCollector.translateToLocal(s);
|
||||
return I18n.translateToLocal(s);
|
||||
}
|
||||
}
|
||||
@@ -77,6 +77,9 @@ import net.minecraft.util.EnumFacing.Axis;
|
||||
import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraft.world.EnumSkyBlock;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
@@ -128,28 +131,28 @@ public final class MekanismUtils
|
||||
|
||||
if(Version.get(Mekanism.latestVersionNumber).comparedState(Mekanism.versionNumber) == 1 || !list.isEmpty())
|
||||
{
|
||||
entityplayer.addChatMessage(new ChatComponentText(EnumColor.GREY + "------------- " + EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " -------------"));
|
||||
entityplayer.addChatMessage(new ChatComponentText(EnumColor.GREY + " " + LangUtils.localize("update.outdated") + "."));
|
||||
entityplayer.addChatMessage(new TextComponentString(EnumColor.GREY + "------------- " + EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " -------------"));
|
||||
entityplayer.addChatMessage(new TextComponentString(EnumColor.GREY + " " + LangUtils.localize("update.outdated") + "."));
|
||||
|
||||
if(Version.get(Mekanism.latestVersionNumber).comparedState(Mekanism.versionNumber) == 1)
|
||||
{
|
||||
entityplayer.addChatMessage(new ChatComponentText(EnumColor.INDIGO + " Mekanism: " + EnumColor.DARK_RED + Mekanism.versionNumber));
|
||||
entityplayer.addChatMessage(new TextComponentString(EnumColor.INDIGO + " Mekanism: " + EnumColor.DARK_RED + Mekanism.versionNumber));
|
||||
}
|
||||
|
||||
for(IModule module : list)
|
||||
{
|
||||
entityplayer.addChatMessage(new ChatComponentText(EnumColor.INDIGO + " Mekanism" + module.getName() + ": " + EnumColor.DARK_RED + module.getVersion()));
|
||||
entityplayer.addChatMessage(new TextComponentString(EnumColor.INDIGO + " Mekanism" + module.getName() + ": " + EnumColor.DARK_RED + module.getVersion()));
|
||||
}
|
||||
|
||||
entityplayer.addChatMessage(new ChatComponentText(EnumColor.GREY + " " + LangUtils.localize("update.consider") + " " + EnumColor.DARK_GREY + Mekanism.latestVersionNumber));
|
||||
entityplayer.addChatMessage(new ChatComponentText(EnumColor.GREY + " " + LangUtils.localize("update.newFeatures") + ": " + EnumColor.INDIGO + Mekanism.recentNews));
|
||||
entityplayer.addChatMessage(new ChatComponentText(EnumColor.GREY + " " + LangUtils.localize("update.visit") + " " + EnumColor.DARK_GREY + "aidancbrady.com/mekanism" + EnumColor.GREY + " " + LangUtils.localize("update.toDownload") + "."));
|
||||
entityplayer.addChatMessage(new ChatComponentText(EnumColor.GREY + "------------- " + EnumColor.DARK_BLUE + "[=======]" + EnumColor.GREY + " -------------"));
|
||||
entityplayer.addChatMessage(new TextComponentString(EnumColor.GREY + " " + LangUtils.localize("update.consider") + " " + EnumColor.DARK_GREY + Mekanism.latestVersionNumber));
|
||||
entityplayer.addChatMessage(new TextComponentString(EnumColor.GREY + " " + LangUtils.localize("update.newFeatures") + ": " + EnumColor.INDIGO + Mekanism.recentNews));
|
||||
entityplayer.addChatMessage(new TextComponentString(EnumColor.GREY + " " + LangUtils.localize("update.visit") + " " + EnumColor.DARK_GREY + "aidancbrady.com/mekanism" + EnumColor.GREY + " " + LangUtils.localize("update.toDownload") + "."));
|
||||
entityplayer.addChatMessage(new TextComponentString(EnumColor.GREY + "------------- " + EnumColor.DARK_BLUE + "[=======]" + EnumColor.GREY + " -------------"));
|
||||
return true;
|
||||
}
|
||||
else if(Version.get(Mekanism.latestVersionNumber).comparedState(Mekanism.versionNumber) == -1)
|
||||
{
|
||||
entityplayer.addChatMessage(new ChatComponentText(EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.GREY + LangUtils.localize("update.devBuild") + " " + EnumColor.DARK_GREY + Mekanism.versionNumber));
|
||||
entityplayer.addChatMessage(new TextComponentString(EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.GREY + LangUtils.localize("update.devBuild") + " " + EnumColor.DARK_GREY + Mekanism.versionNumber));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -721,14 +724,13 @@ public final class MekanismUtils
|
||||
if(sideCoord.exists(world) && sideCoord.offset(side).exists(world))
|
||||
{
|
||||
IBlockState blockState = sideCoord.getBlockState(world);
|
||||
Block block = blockState.getBlock();
|
||||
boolean weakPower = block.shouldCheckWeakPower(world, coord.getPos(), side);
|
||||
boolean weakPower = blockState.getBlock().shouldCheckWeakPower(blockState, world, coord.getPos(), side);
|
||||
|
||||
if(weakPower && isDirectlyGettingPowered(world, sideCoord))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if(!weakPower && block.getWeakPower(world, sideCoord.getPos(), blockState, side) > 0)
|
||||
else if(!weakPower && blockState.getWeakPower(world, sideCoord.getPos(), side) > 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -778,7 +780,7 @@ public final class MekanismUtils
|
||||
Block block1 = offset.getBlock(world);
|
||||
block1.onNeighborChange(world, offset.getPos(), coord.getPos());
|
||||
|
||||
if(block1.isNormalCube(world, offset.getPos()))
|
||||
if(offset.getBlockState(world).isNormalCube())
|
||||
{
|
||||
offset = offset.offset(dir);
|
||||
|
||||
@@ -884,7 +886,7 @@ public final class MekanismUtils
|
||||
return null;
|
||||
}
|
||||
|
||||
if((block == Blocks.water || block == Blocks.flowing_water) && state.getValue(BlockLiquid.LEVEL) == 0)
|
||||
if((block == Blocks.WATER || block == Blocks.FLOWING_WATER) && state.getValue(BlockLiquid.LEVEL) == 0)
|
||||
{
|
||||
if(!filter)
|
||||
{
|
||||
@@ -894,7 +896,7 @@ public final class MekanismUtils
|
||||
return new FluidStack(FluidRegistry.getFluid("heavywater"), 10);
|
||||
}
|
||||
}
|
||||
else if((block == Blocks.lava || block == Blocks.flowing_lava) && state.getValue(BlockLiquid.LEVEL) == 0)
|
||||
else if((block == Blocks.LAVA || block == Blocks.FLOWING_LAVA) && state.getValue(BlockLiquid.LEVEL) == 0)
|
||||
{
|
||||
return new FluidStack(FluidRegistry.LAVA, FluidContainerRegistry.BUCKET_VOLUME);
|
||||
}
|
||||
@@ -948,11 +950,11 @@ public final class MekanismUtils
|
||||
}
|
||||
else if(fluid == FluidRegistry.WATER)
|
||||
{
|
||||
return Blocks.flowing_water;
|
||||
return Blocks.FLOWING_WATER;
|
||||
}
|
||||
else if(fluid == FluidRegistry.LAVA)
|
||||
{
|
||||
return Blocks.flowing_lava;
|
||||
return Blocks.FLOWING_LAVA;
|
||||
}
|
||||
else {
|
||||
return fluid.getBlock();
|
||||
@@ -983,7 +985,7 @@ public final class MekanismUtils
|
||||
|
||||
player.openContainer = new ContainerPersonalChest(player.inventory, tileEntity, inventory, isBlock);
|
||||
player.openContainer.windowId = id;
|
||||
player.openContainer.onCraftGuiOpened(player);
|
||||
player.openContainer.addListener(player);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1091,9 +1093,9 @@ public final class MekanismUtils
|
||||
{
|
||||
double reach = Mekanism.proxy.getReach(player);
|
||||
|
||||
Vec3 headVec = getHeadVec(player);
|
||||
Vec3 lookVec = player.getLook(1);
|
||||
Vec3 endVec = headVec.addVector(lookVec.xCoord*reach, lookVec.yCoord*reach, lookVec.zCoord*reach);
|
||||
Vec3d headVec = getHeadVec(player);
|
||||
Vec3d lookVec = player.getLook(1);
|
||||
Vec3d endVec = headVec.addVector(lookVec.xCoord*reach, lookVec.yCoord*reach, lookVec.zCoord*reach);
|
||||
|
||||
return world.rayTraceBlocks(headVec, endVec, true);
|
||||
}
|
||||
@@ -1103,7 +1105,7 @@ public final class MekanismUtils
|
||||
* @param player - player to check
|
||||
* @return head location
|
||||
*/
|
||||
private static Vec3 getHeadVec(EntityPlayer player)
|
||||
private static Vec3d getHeadVec(EntityPlayer player)
|
||||
{
|
||||
double posX = player.posX;
|
||||
double posY = player.posY;
|
||||
@@ -1119,7 +1121,7 @@ public final class MekanismUtils
|
||||
}
|
||||
}
|
||||
|
||||
return new Vec3(posX, posY, posZ);
|
||||
return new Vec3d(posX, posY, posZ);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1420,7 +1422,7 @@ public final class MekanismUtils
|
||||
*/
|
||||
public static boolean isOp(EntityPlayerMP player)
|
||||
{
|
||||
return general.opsBypassRestrictions && player.mcServer.getConfigurationManager().canSendCommands(player.getGameProfile());
|
||||
return general.opsBypassRestrictions && player.mcServer.getPlayerList().canSendCommands(player.getGameProfile());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,14 +13,14 @@ import net.minecraft.world.World;
|
||||
|
||||
public final class MinerUtils
|
||||
{
|
||||
public static List<Block> specialSilkIDs = ListUtils.asList(Blocks.ice);
|
||||
public static List<Block> specialSilkIDs = ListUtils.asList(Blocks.ICE);
|
||||
|
||||
public static List<ItemStack> getDrops(World world, Coord4D obj, boolean silk)
|
||||
{
|
||||
IBlockState state = obj.getBlockState(world);
|
||||
Block block = state.getBlock();
|
||||
|
||||
if(block == null || block.isAir(world, obj.getPos()))
|
||||
if(block == null || block.isAir(state, world, obj.getPos()))
|
||||
{
|
||||
return new ArrayList<ItemStack>();
|
||||
}
|
||||
|
||||
@@ -278,7 +278,7 @@ public class RecipeUtils
|
||||
}
|
||||
else if(nbtTags.hasKey("itemname"))
|
||||
{
|
||||
Object obj = Item.itemRegistry.getObject(new ResourceLocation(nbtTags.getString("itemname")));
|
||||
Object obj = Item.REGISTRY.getObject(new ResourceLocation(nbtTags.getString("itemname")));
|
||||
|
||||
if(obj != null)
|
||||
{
|
||||
@@ -287,7 +287,7 @@ public class RecipeUtils
|
||||
}
|
||||
else if(nbtTags.hasKey("blockname"))
|
||||
{
|
||||
Object obj = Block.blockRegistry.getObject(new ResourceLocation(nbtTags.getString("blockname")));
|
||||
Object obj = Block.REGISTRY.getObject(new ResourceLocation(nbtTags.getString("blockname")));
|
||||
|
||||
if(obj != null)
|
||||
{
|
||||
|
||||
@@ -13,6 +13,7 @@ import mekanism.common.security.SecurityFrequency;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
|
||||
public final class SecurityUtils
|
||||
@@ -110,7 +111,7 @@ public final class SecurityUtils
|
||||
|
||||
public static void displayNoAccess(EntityPlayer player)
|
||||
{
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.RED + LangUtils.localize("gui.noAccessDesc")));
|
||||
player.addChatMessage(new TextComponentString(EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.RED + LangUtils.localize("gui.noAccessDesc")));
|
||||
}
|
||||
|
||||
public static SecurityMode getSecurity(ISecurityTile security, Side side)
|
||||
|
||||
@@ -109,7 +109,7 @@ public final class TransporterUtils
|
||||
|
||||
public static float[] getStackPosition(ILogisticalTransporter tileEntity, TransporterStack stack, float partial)
|
||||
{
|
||||
Coord4D offset = new Coord4D(0, 0, 0, tileEntity.world().provider.getDimensionId()).offset(stack.getSide(tileEntity));
|
||||
Coord4D offset = new Coord4D(0, 0, 0, tileEntity.world().provider.getDimension()).offset(stack.getSide(tileEntity));
|
||||
float progress = (((float)stack.progress + partial) / 100F) - 0.5F;
|
||||
|
||||
return new float[] {0.5F + offset.xCoord*progress, 0.25F + offset.yCoord*progress, 0.5F + offset.zCoord*progress};
|
||||
|
||||
@@ -48,7 +48,7 @@ public class VoiceConnection extends Thread
|
||||
while(username == null && retryCount <= 100)
|
||||
{
|
||||
try {
|
||||
List l = Collections.synchronizedList((List)((ArrayList)server.getConfigurationManager().playerEntityList).clone());
|
||||
List l = Collections.synchronizedList((List)((ArrayList)server.getPlayerList().getPlayerList()).clone());
|
||||
|
||||
for(Object obj : l)
|
||||
{
|
||||
@@ -198,6 +198,6 @@ public class VoiceConnection extends Thread
|
||||
|
||||
public EntityPlayerMP getPlayer()
|
||||
{
|
||||
return server.getConfigurationManager().getPlayerByUsername(username);
|
||||
return server.getPlayerList().getPlayerByUsername(username);
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import mekanism.common.MekanismBlocks;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.IChunkGenerator;
|
||||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
import net.minecraft.world.gen.ChunkProviderEnd;
|
||||
import net.minecraft.world.gen.ChunkProviderHell;
|
||||
@@ -16,7 +17,7 @@ import net.minecraftforge.fml.common.IWorldGenerator;
|
||||
public class GenHandler implements IWorldGenerator
|
||||
{
|
||||
@Override
|
||||
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider)
|
||||
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider)
|
||||
{
|
||||
if(!(chunkGenerator instanceof ChunkProviderHell) && !(chunkGenerator instanceof ChunkProviderEnd))
|
||||
{
|
||||
|
||||
@@ -25,7 +25,7 @@ public class WorldGenSalt extends WorldGenerator
|
||||
@Override
|
||||
public boolean generate(World world, Random random, BlockPos pos)
|
||||
{
|
||||
if(world.getBlockState(pos).getBlock().getMaterial() != Material.water)
|
||||
if(world.getBlockState(pos).getMaterial() != Material.WATER)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -47,7 +47,7 @@ public class WorldGenSalt extends WorldGenerator
|
||||
BlockPos newPos = new BlockPos(xPos, yPos, zPos);
|
||||
Block block = world.getBlockState(newPos).getBlock();
|
||||
|
||||
if(block == Blocks.dirt || block == Blocks.clay || block == MekanismBlocks.SaltBlock)
|
||||
if(block == Blocks.DIRT || block == Blocks.CLAY || block == MekanismBlocks.SaltBlock)
|
||||
{
|
||||
world.setBlockState(newPos, blockGen.getDefaultState(), 2);
|
||||
}
|
||||
|
||||
@@ -119,11 +119,11 @@ public class GeneratorsClientProxy extends GeneratorsCommonProxy
|
||||
for(String s : CUSTOM_RENDERS)
|
||||
{
|
||||
ModelResourceLocation model = new ModelResourceLocation("mekanismgenerators:" + s, "inventory");
|
||||
Object obj = event.modelRegistry.getObject(model);
|
||||
Object obj = event.getModelRegistry().getObject(model);
|
||||
|
||||
if(obj instanceof IBakedModel)
|
||||
{
|
||||
event.modelRegistry.putObject(model, new GeneratorItemModelFactory((IBakedModel)obj));
|
||||
event.getModelRegistry().putObject(model, new GeneratorItemModelFactory((IBakedModel)obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,12 +2,9 @@ package mekanism.generators.client.jei;
|
||||
|
||||
import mekanism.client.jei.MekanismJEI;
|
||||
import mekanism.generators.common.GeneratorsBlocks;
|
||||
import mezz.jei.api.IItemRegistry;
|
||||
import mezz.jei.api.IJeiHelpers;
|
||||
import mezz.jei.api.IJeiRuntime;
|
||||
import mezz.jei.api.IModPlugin;
|
||||
import mezz.jei.api.IModRegistry;
|
||||
import mezz.jei.api.IRecipeRegistry;
|
||||
import mezz.jei.api.JEIPlugin;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
@@ -20,15 +17,6 @@ public class GeneratorsJEI implements IModPlugin
|
||||
registry.getJeiHelpers().getNbtIgnoreList().ignoreNbtTagNames(Item.getItemFromBlock(GeneratorsBlocks.Generator), MekanismJEI.UNUSED_TAGS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemRegistryAvailable(IItemRegistry registry) {}
|
||||
|
||||
@Override
|
||||
public void onJeiHelpersAvailable(IJeiHelpers helpers) {}
|
||||
|
||||
@Override
|
||||
public void onRecipeRegistryAvailable(IRecipeRegistry registry) {}
|
||||
|
||||
@Override
|
||||
public void onRuntimeAvailable(IJeiRuntime runtime) {}
|
||||
}
|
||||
@@ -36,6 +36,7 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.PropertyEnum;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@@ -50,6 +51,7 @@ import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.property.IExtendedBlockState;
|
||||
@@ -122,7 +124,7 @@ public abstract class BlockGenerator extends BlockContainer implements ICTMBlock
|
||||
@Override
|
||||
public IBlockState getExtendedState(IBlockState stateIn, IBlockAccess w, BlockPos pos)
|
||||
{
|
||||
if(stateIn.getBlock() == null || stateIn.getBlock().getMaterial() == Material.air)
|
||||
if(stateIn.getBlock() == null || stateIn.getMaterial() == Material.AIR)
|
||||
{
|
||||
return stateIn;
|
||||
}
|
||||
@@ -134,7 +136,7 @@ public abstract class BlockGenerator extends BlockContainer implements ICTMBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState createBlockState()
|
||||
public BlockStateContainer createBlockState()
|
||||
{
|
||||
return new BlockStateGenerator(this, getTypeProperty());
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.PropertyEnum;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
@@ -29,6 +30,8 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.EnumBlockRenderType;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
@@ -44,7 +47,7 @@ public abstract class BlockReactor extends BlockContainer implements ICTMBlock
|
||||
|
||||
public BlockReactor()
|
||||
{
|
||||
super(Material.iron);
|
||||
super(Material.IRON);
|
||||
setHardness(3.5F);
|
||||
setResistance(8F);
|
||||
setCreativeTab(Mekanism.tabMekanism);
|
||||
@@ -103,7 +106,7 @@ public abstract class BlockReactor extends BlockContainer implements ICTMBlock
|
||||
@Override
|
||||
public IBlockState getExtendedState(IBlockState stateIn, IBlockAccess w, BlockPos pos)
|
||||
{
|
||||
if(stateIn.getBlock() == null || stateIn.getBlock().getMaterial() == Material.air)
|
||||
if(stateIn.getBlock() == null || stateIn.getMaterial() == Material.AIR)
|
||||
{
|
||||
return stateIn;
|
||||
}
|
||||
@@ -115,7 +118,7 @@ public abstract class BlockReactor extends BlockContainer implements ICTMBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState createBlockState()
|
||||
public BlockStateContainer createBlockState()
|
||||
{
|
||||
return new BlockStateReactor(this, getTypeProperty());
|
||||
}
|
||||
@@ -230,25 +233,25 @@ public abstract class BlockReactor extends BlockContainer implements ICTMBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumWorldBlockLayer getBlockLayer()
|
||||
public BlockRenderLayer getBlockLayer()
|
||||
{
|
||||
return this == GeneratorsBlocks.Reactor ? EnumWorldBlockLayer.CUTOUT : EnumWorldBlockLayer.TRANSLUCENT;
|
||||
return this == GeneratorsBlocks.Reactor ? BlockRenderLayer.CUTOUT : BlockRenderLayer.TRANSLUCENT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType()
|
||||
public EnumBlockRenderType getRenderType(IBlockState state)
|
||||
{
|
||||
return 3;
|
||||
return EnumBlockRenderType.MODEL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube()
|
||||
public boolean isOpaqueCube(IBlockState state)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFullCube()
|
||||
public boolean isFullCube(IBlockState state)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ public class TurbineUpdateProtocol extends UpdateProtocol<SynchronizedTurbineDat
|
||||
}
|
||||
|
||||
turbineHeight++;
|
||||
turbines.remove(new Coord4D(centerX, y, centerZ, pointer.getWorld().provider.getDimensionId()));
|
||||
turbines.remove(new Coord4D(centerX, y, centerZ, pointer.getWorld().provider.getDimension()));
|
||||
}
|
||||
|
||||
//If any turbines were not processed, they're in the wrong place
|
||||
|
||||
@@ -225,7 +225,7 @@ public class TileEntityHeatGenerator extends TileEntityGenerator implements IFlu
|
||||
}
|
||||
}
|
||||
|
||||
if(worldObj.provider.getDimensionId() == -1)
|
||||
if(worldObj.provider.getDimension() == -1)
|
||||
{
|
||||
netherBoost = generators.heatGenerationNether;
|
||||
}
|
||||
@@ -235,12 +235,12 @@ public class TileEntityHeatGenerator extends TileEntityGenerator implements IFlu
|
||||
|
||||
private boolean isLava(BlockPos pos)
|
||||
{
|
||||
return worldObj.getBlockState(pos).getBlock() == Blocks.lava;
|
||||
return worldObj.getBlockState(pos).getBlock() == Blocks.LAVA;
|
||||
}
|
||||
|
||||
public int getFuel(ItemStack itemstack)
|
||||
{
|
||||
if(itemstack.getItem() == Items.lava_bucket)
|
||||
if(itemstack.getItem() == Items.LAVA_BUCKET)
|
||||
{
|
||||
return 1000;
|
||||
}
|
||||
|
||||
+4
-3
@@ -24,6 +24,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraftforge.fluids.FluidContainerRegistry;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
@@ -332,7 +333,7 @@ public class TileEntityReactorController extends TileEntityReactorBlock implemen
|
||||
{
|
||||
if(box == null)
|
||||
{
|
||||
box = AxisAlignedBB.fromBounds(getPos().getX()-1, getPos().getY()-3, getPos().getZ()-1, getPos().getX()+2, getPos().getY(), getPos().getZ()+2);
|
||||
box = new AxisAlignedBB(getPos().getX()-1, getPos().getY()-3, getPos().getZ()-1, getPos().getX()+2, getPos().getY(), getPos().getZ()+2);
|
||||
}
|
||||
|
||||
return box;
|
||||
@@ -375,9 +376,9 @@ public class TileEntityReactorController extends TileEntityReactorBlock implemen
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Vec3 getSoundPosition()
|
||||
public Vec3d getSoundPosition()
|
||||
{
|
||||
return new Vec3(getPos()).addVector(0.5, 0.5, 0.5);
|
||||
return new Vec3d(getPos()).addVector(0.5, 0.5, 0.5);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+4
-4
@@ -203,10 +203,10 @@ public class TileEntityReactorLogicAdapter extends TileEntityReactorBlock implem
|
||||
|
||||
public static enum ReactorLogic
|
||||
{
|
||||
DISABLED("disabled", new ItemStack(Items.gunpowder)),
|
||||
READY("ready", new ItemStack(Items.redstone)),
|
||||
CAPACITY("capacity", new ItemStack(Items.redstone)),
|
||||
DEPLETED("depleted", new ItemStack(Items.redstone));
|
||||
DISABLED("disabled", new ItemStack(Items.GUNPOWDER)),
|
||||
READY("ready", new ItemStack(Items.REDSTONE)),
|
||||
CAPACITY("capacity", new ItemStack(Items.REDSTONE)),
|
||||
DEPLETED("depleted", new ItemStack(Items.REDSTONE));
|
||||
|
||||
private String name;
|
||||
private ItemStack renderStack;
|
||||
|
||||
@@ -180,7 +180,7 @@ public class TileEntityTurbineCasing extends TileEntityMultiblock<SynchronizedTu
|
||||
if(structure.fluidStored != null)
|
||||
{
|
||||
data.add(1);
|
||||
data.add(structure.fluidStored.getFluid().getName());
|
||||
data.add(FluidRegistry.getFluidName(structure.fluidStored));
|
||||
data.add(structure.fluidStored.amount);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -1,18 +1,22 @@
|
||||
package mekanism.tools.item;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
public class ItemMekanismAxe extends ItemMekanismTool
|
||||
{
|
||||
private static Block blocksEffectiveAgainst[];
|
||||
private static final Set<Block> EFFECTIVE_ON = Sets.newHashSet(new Block[] {Blocks.PLANKS, Blocks.BOOKSHELF, Blocks.LOG, Blocks.LOG2, Blocks.CHEST, Blocks.PUMPKIN, Blocks.LIT_PUMPKIN, Blocks.MELON_BLOCK, Blocks.LADDER, Blocks.WOODEN_BUTTON, Blocks.WOODEN_PRESSURE_PLATE});
|
||||
|
||||
public ItemMekanismAxe(ToolMaterial enumtoolmaterial)
|
||||
{
|
||||
super(3, enumtoolmaterial, blocksEffectiveAgainst);
|
||||
super(3, enumtoolmaterial, EFFECTIVE_ON);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -26,12 +30,4 @@ public class ItemMekanismAxe extends ItemMekanismTool
|
||||
return super.getDigSpeed(itemstack, blockState);
|
||||
}
|
||||
}
|
||||
|
||||
static
|
||||
{
|
||||
blocksEffectiveAgainst = (new Block[]
|
||||
{
|
||||
Blocks.planks, Blocks.bookshelf, Blocks.log, Blocks.log2, Blocks.chest, Blocks.wooden_slab, Blocks.double_wooden_slab, Blocks.pumpkin, Blocks.lit_pumpkin
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,7 @@
|
||||
package mekanism.tools.item;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import mekanism.api.util.StackUtils;
|
||||
import mekanism.common.Mekanism;
|
||||
@@ -17,9 +16,9 @@ import net.minecraft.item.ItemTool;
|
||||
|
||||
public class ItemMekanismTool extends ItemTool
|
||||
{
|
||||
public ItemMekanismTool(int mobBoost, ToolMaterial toolMaterial, Block[] effectiveBlocks)
|
||||
public ItemMekanismTool(int mobBoost, ToolMaterial toolMaterial, Set<Block> effectiveBlocksIn)
|
||||
{
|
||||
super(mobBoost, toolMaterial, new HashSet<Block>(Arrays.asList(effectiveBlocks)));
|
||||
super(mobBoost, toolMaterial, effectiveBlocksIn);
|
||||
setCreativeTab(Mekanism.tabMekanism);
|
||||
}
|
||||
|
||||
@@ -48,7 +47,7 @@ public class ItemMekanismTool extends ItemTool
|
||||
}
|
||||
else if(material == MekanismTools.toolLAZULI || material == MekanismTools.toolLAZULI2)
|
||||
{
|
||||
return new ItemStack(Items.dye, 1, 4);
|
||||
return new ItemStack(Items.DYE, 1, 4);
|
||||
}
|
||||
else if(material == MekanismTools.toolOSMIUM || material == MekanismTools.toolOSMIUM2)
|
||||
{
|
||||
@@ -69,12 +68,4 @@ public class ItemMekanismTool extends ItemTool
|
||||
|
||||
return material.getRepairItemStack();
|
||||
}
|
||||
|
||||
/*
|
||||
@Override
|
||||
public void registerIcons(IIconRegister register)
|
||||
{
|
||||
itemIcon = register.registerIcon("mekanism:" + getUnlocalizedName().replace("item.", ""));
|
||||
}
|
||||
*/
|
||||
}
|
||||
Reference in new issue
Block a user