mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 04:52:25 +00:00
Updating to 14.23.5.2808; naming fixes where necessary
This commit is contained in:
1 parent
a79a3e1658
commit
8d3f8df49c
93 files changed
+171
-177
No files matched your search
@@ -73,7 +73,7 @@ public class Chunk3D
|
||||
*/
|
||||
public Chunk getChunk(World world)
|
||||
{
|
||||
return world.getChunkFromChunkCoords(x, z);
|
||||
return world.getChunk(x, z);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -219,7 +219,7 @@ public class Coord4D
|
||||
return this;
|
||||
}
|
||||
|
||||
return new Coord4D(x +(side.getFrontOffsetX()*amount), y +(side.getFrontOffsetY()*amount), z +(side.getFrontOffsetZ()*amount), dimensionId);
|
||||
return new Coord4D(x +(side.getXOffset()*amount), y +(side.getYOffset()*amount), z +(side.getZOffset()*amount), dimensionId);
|
||||
}
|
||||
|
||||
public ItemStack getStack(IBlockAccess world)
|
||||
@@ -286,7 +286,7 @@ public class Coord4D
|
||||
|
||||
for(EnumFacing side : EnumFacing.VALUES)
|
||||
{
|
||||
if(side.getFrontOffsetX() == diff.x && side.getFrontOffsetY() == diff.y && side.getFrontOffsetZ() == diff.z)
|
||||
if(side.getXOffset() == diff.x && side.getYOffset() == diff.y && side.getZOffset() == diff.z)
|
||||
{
|
||||
return side;
|
||||
}
|
||||
@@ -335,7 +335,7 @@ public class Coord4D
|
||||
*/
|
||||
public Coord4D step(EnumFacing side)
|
||||
{
|
||||
return translate(side.getFrontOffsetX(), side.getFrontOffsetY(), side.getFrontOffsetZ());
|
||||
return translate(side.getXOffset(), side.getYOffset(), side.getZOffset());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -355,7 +355,7 @@ public class Coord4D
|
||||
*/
|
||||
public Chunk getChunk(World world)
|
||||
{
|
||||
return world.getChunkFromBlockCoords(getPos());
|
||||
return world.getChunk(getPos());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -70,7 +70,7 @@ public enum EnumColor implements IStringSerializable
|
||||
return I18n.translateToLocal("color." + unlocalizedName);
|
||||
}
|
||||
|
||||
public String getUnlocalizedName(){
|
||||
public String getTranslationKey(){
|
||||
return "color." + unlocalizedName;
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ public enum EnumColor implements IStringSerializable
|
||||
}
|
||||
|
||||
public ITextComponent getTranslatedColouredComponent(){
|
||||
ITextComponent t = new TextComponentTranslation(getUnlocalizedName());
|
||||
ITextComponent t = new TextComponentTranslation(getTranslationKey());
|
||||
t.getStyle().setColor(textFormatting);
|
||||
return t;
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ public class Gas
|
||||
* Gets the unlocalized name of this Gas.
|
||||
* @return this Gas's unlocalized name
|
||||
*/
|
||||
public String getUnlocalizedName()
|
||||
public String getTranslationKey()
|
||||
{
|
||||
return "gas." + unlocalizedName;
|
||||
}
|
||||
@@ -106,7 +106,7 @@ public class Gas
|
||||
*/
|
||||
public String getLocalizedName()
|
||||
{
|
||||
return I18n.translateToLocal(getUnlocalizedName());
|
||||
return I18n.translateToLocal(getTranslationKey());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -114,7 +114,7 @@ public class Gas
|
||||
* @param s - unlocalized name to set
|
||||
* @return this Gas object
|
||||
*/
|
||||
public Gas setUnlocalizedName(String s)
|
||||
public Gas setTranslationKey(String s)
|
||||
{
|
||||
unlocalizedName = s;
|
||||
|
||||
@@ -210,7 +210,7 @@ public class Gas
|
||||
*/
|
||||
public static Gas readFromNBT(NBTTagCompound nbtTags)
|
||||
{
|
||||
if(nbtTags == null || nbtTags.hasNoTags())
|
||||
if(nbtTags == null || nbtTags.isEmpty())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ public class GasStack
|
||||
*/
|
||||
public static GasStack readFromNBT(NBTTagCompound nbtTags)
|
||||
{
|
||||
if(nbtTags == null || nbtTags.hasNoTags())
|
||||
if(nbtTags == null || nbtTags.isEmpty())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -239,7 +239,7 @@ public class GasTank implements GasTankInfo
|
||||
*/
|
||||
public static GasTank readFromNBT(NBTTagCompound nbtTags)
|
||||
{
|
||||
if(nbtTags == null || nbtTags.hasNoTags())
|
||||
if(nbtTags == null || nbtTags.isEmpty())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ public final class InfuseType
|
||||
sprite = tex;
|
||||
}
|
||||
|
||||
public InfuseType setUnlocalizedName(String name)
|
||||
public InfuseType setTranslationKey(String name)
|
||||
{
|
||||
unlocalizedName = "infuse." + name;
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ public class BlockInfo
|
||||
public int hashCode()
|
||||
{
|
||||
int code = 1;
|
||||
code = 31 * code + block.getUnlocalizedName().hashCode();
|
||||
code = 31 * code + block.getTranslationKey().hashCode();
|
||||
code = 31 * code + meta;
|
||||
return code;
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ public class CapeBufferDownload extends Thread
|
||||
public ThreadDownloadImageData downloadCape()
|
||||
{
|
||||
try {
|
||||
File capeFile = new File(resourceLocation.getResourcePath() + ".png");
|
||||
File capeFile = new File(resourceLocation.getPath() + ".png");
|
||||
|
||||
if(capeFile.exists())
|
||||
{
|
||||
|
||||
@@ -1100,7 +1100,7 @@ public class ClientProxy extends CommonProxy
|
||||
@Override
|
||||
public File getMinecraftDir()
|
||||
{
|
||||
return Minecraft.getMinecraft().mcDataDir;
|
||||
return Minecraft.getMinecraft().gameDir;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -135,7 +135,7 @@ public class GuiSideConfiguration extends GuiMekanism
|
||||
int x = slotPosMap.get(i).xPos;
|
||||
int y = slotPosMap.get(i).yPos;
|
||||
|
||||
SideData data = configurable.getConfig().getOutput(currentType, EnumFacing.getFront(i));
|
||||
SideData data = configurable.getConfig().getOutput(currentType, EnumFacing.byIndex(i));
|
||||
|
||||
if(data != TileComponentConfig.EMPTY)
|
||||
{
|
||||
@@ -184,7 +184,7 @@ public class GuiSideConfiguration extends GuiMekanism
|
||||
int x = slotPosMap.get(i).xPos;
|
||||
int y = slotPosMap.get(i).yPos;
|
||||
|
||||
SideData data = configurable.getConfig().getOutput(currentType, EnumFacing.getFront(i));
|
||||
SideData data = configurable.getConfig().getOutput(currentType, EnumFacing.byIndex(i));
|
||||
|
||||
if(data != TileComponentConfig.EMPTY)
|
||||
{
|
||||
|
||||
@@ -95,9 +95,9 @@ public class GuiTransporterConfig extends GuiMekanism
|
||||
int x = slotPosMap.get(i).xPos;
|
||||
int y = slotPosMap.get(i).yPos;
|
||||
|
||||
EnumColor color = configurable.getEjector().getInputColor(EnumFacing.getFront(i));
|
||||
EnumColor color = configurable.getEjector().getInputColor(EnumFacing.byIndex(i));
|
||||
|
||||
if(configurable.getConfig().getOutput(TransmissionType.ITEM, EnumFacing.getFront(i)) != TileComponentConfig.EMPTY)
|
||||
if(configurable.getConfig().getOutput(TransmissionType.ITEM, EnumFacing.byIndex(i)) != TileComponentConfig.EMPTY)
|
||||
{
|
||||
if(color != null)
|
||||
{
|
||||
@@ -153,9 +153,9 @@ public class GuiTransporterConfig extends GuiMekanism
|
||||
int x = slotPosMap.get(i).xPos;
|
||||
int y = slotPosMap.get(i).yPos;
|
||||
|
||||
EnumColor color = configurable.getEjector().getInputColor(EnumFacing.getFront(i));
|
||||
EnumColor color = configurable.getEjector().getInputColor(EnumFacing.byIndex(i));
|
||||
|
||||
if(configurable.getConfig().getOutput(TransmissionType.ITEM, EnumFacing.getFront(i)) != TileComponentConfig.EMPTY)
|
||||
if(configurable.getConfig().getOutput(TransmissionType.ITEM, EnumFacing.byIndex(i)) != TileComponentConfig.EMPTY)
|
||||
{
|
||||
if(xAxis >= x && xAxis <= x+14 && yAxis >= y && yAxis <= y+14)
|
||||
{
|
||||
|
||||
@@ -55,7 +55,7 @@ public class GasStackHelper implements IIngredientHelper<GasStack>
|
||||
@Override
|
||||
public String getModId(GasStack ingredient)
|
||||
{
|
||||
return ingredient.getGas().getIcon().getResourceDomain();
|
||||
return ingredient.getGas().getIcon().getNamespace();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -67,7 +67,7 @@ public class GasStackHelper implements IIngredientHelper<GasStack>
|
||||
@Override
|
||||
public String getResourceId(GasStack ingredient)
|
||||
{
|
||||
return ingredient.getGas().getUnlocalizedName();
|
||||
return ingredient.getGas().getTranslationKey();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -256,7 +256,7 @@ public class RenderResizableCuboid {
|
||||
if (face == null) {
|
||||
return VEC_ZERO;
|
||||
}
|
||||
return new Vec3d(face.getFrontOffsetX(), face.getFrontOffsetY(), face.getFrontOffsetZ());
|
||||
return new Vec3d(face.getXOffset(), face.getYOffset(), face.getZOffset());
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ public class RenderTickHandler
|
||||
}
|
||||
}
|
||||
|
||||
font.drawStringWithShadow("Block: " + block.getUnlocalizedName(), 1, 1, 0x404040);
|
||||
font.drawStringWithShadow("Block: " + block.getTranslationKey(), 1, 1, 0x404040);
|
||||
font.drawStringWithShadow("Metadata: " + obj.getBlockState(world), 1, 10, 0x404040);
|
||||
font.drawStringWithShadow("Location: " + MekanismUtils.getCoordDisplay(obj), 1, 19, 0x404040);
|
||||
font.drawStringWithShadow("TileEntity: " + tileDisplay, 1, 28, 0x404040);
|
||||
|
||||
@@ -69,9 +69,9 @@ public class MekanismOBJLoader implements ICustomModelLoader
|
||||
|
||||
for(String s : objModel.getMatLib().getMaterialNames())
|
||||
{
|
||||
if(objModel.getMatLib().getMaterial(s).getTexture().getTextureLocation().getResourcePath().startsWith("#"))
|
||||
if(objModel.getMatLib().getMaterial(s).getTexture().getTextureLocation().getPath().startsWith("#"))
|
||||
{
|
||||
FMLLog.severe("OBJLoader: Unresolved texture '%s' for obj model '%s'", objModel.getMatLib().getMaterial(s).getTexture().getTextureLocation().getResourcePath(), modelLocation);
|
||||
FMLLog.severe("OBJLoader: Unresolved texture '%s' for obj model '%s'", objModel.getMatLib().getMaterial(s).getTexture().getTextureLocation().getPath(), modelLocation);
|
||||
builder.put(s, missing);
|
||||
}
|
||||
else {
|
||||
@@ -92,13 +92,13 @@ public class MekanismOBJLoader implements ICustomModelLoader
|
||||
@Override
|
||||
public boolean accepts(ResourceLocation modelLocation)
|
||||
{
|
||||
return modelLocation.getResourcePath().endsWith(".obj.mek");
|
||||
return modelLocation.getPath().endsWith(".obj.mek");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IModel loadModel(ResourceLocation loc) throws Exception
|
||||
{
|
||||
ResourceLocation file = new ResourceLocation(loc.getResourceDomain(), loc.getResourcePath());
|
||||
ResourceLocation file = new ResourceLocation(loc.getNamespace(), loc.getPath());
|
||||
|
||||
if(!modelCache.containsKey(file))
|
||||
{
|
||||
@@ -106,12 +106,12 @@ public class MekanismOBJLoader implements ICustomModelLoader
|
||||
|
||||
if(model instanceof OBJModel)
|
||||
{
|
||||
if(file.getResourcePath().contains("glow_panel"))
|
||||
if(file.getPath().contains("glow_panel"))
|
||||
{
|
||||
MekanismOBJModel mekModel = new MekanismOBJModel(OBJModelType.GLOW_PANEL, ((OBJModel)model).getMatLib(), file);
|
||||
modelCache.put(file, mekModel);
|
||||
}
|
||||
else if(file.getResourcePath().contains("transmitter"))
|
||||
else if(file.getPath().contains("transmitter"))
|
||||
{
|
||||
MekanismOBJModel mekModel = new MekanismOBJModel(OBJModelType.TRANSMITTER, ((OBJModel)model).getMatLib(), file);
|
||||
modelCache.put(file, mekModel);
|
||||
|
||||
@@ -11,13 +11,7 @@ public class CreativeTabMekanism extends CreativeTabs
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getIconItemStack()
|
||||
{
|
||||
return new ItemStack(MekanismItems.AtomicAlloy);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getTabIconItem()
|
||||
public ItemStack createIcon()
|
||||
{
|
||||
return new ItemStack(MekanismItems.AtomicAlloy);
|
||||
}
|
||||
|
||||
@@ -731,13 +731,13 @@ public class Mekanism
|
||||
Mekanism.proxy.preInit();
|
||||
|
||||
//Register infuses
|
||||
InfuseRegistry.registerInfuseType(new InfuseType("CARBON", new ResourceLocation("mekanism:blocks/infuse/Carbon")).setUnlocalizedName("carbon"));
|
||||
InfuseRegistry.registerInfuseType(new InfuseType("TIN", new ResourceLocation("mekanism:blocks/infuse/Tin")).setUnlocalizedName("tin"));
|
||||
InfuseRegistry.registerInfuseType(new InfuseType("DIAMOND", new ResourceLocation("mekanism:blocks/infuse/Diamond")).setUnlocalizedName("diamond"));
|
||||
InfuseRegistry.registerInfuseType(new InfuseType("REDSTONE", new ResourceLocation("mekanism:blocks/infuse/Redstone")).setUnlocalizedName("redstone"));
|
||||
InfuseRegistry.registerInfuseType(new InfuseType("FUNGI", new ResourceLocation("mekanism:blocks/infuse/Fungi")).setUnlocalizedName("fungi"));
|
||||
InfuseRegistry.registerInfuseType(new InfuseType("BIO", new ResourceLocation("mekanism:blocks/infuse/Bio")).setUnlocalizedName("bio"));
|
||||
InfuseRegistry.registerInfuseType(new InfuseType("OBSIDIAN", new ResourceLocation("mekanism:blocks/infuse/Obsidian")).setUnlocalizedName("obsidian"));
|
||||
InfuseRegistry.registerInfuseType(new InfuseType("CARBON", new ResourceLocation("mekanism:blocks/infuse/Carbon")).setTranslationKey("carbon"));
|
||||
InfuseRegistry.registerInfuseType(new InfuseType("TIN", new ResourceLocation("mekanism:blocks/infuse/Tin")).setTranslationKey("tin"));
|
||||
InfuseRegistry.registerInfuseType(new InfuseType("DIAMOND", new ResourceLocation("mekanism:blocks/infuse/Diamond")).setTranslationKey("diamond"));
|
||||
InfuseRegistry.registerInfuseType(new InfuseType("REDSTONE", new ResourceLocation("mekanism:blocks/infuse/Redstone")).setTranslationKey("redstone"));
|
||||
InfuseRegistry.registerInfuseType(new InfuseType("FUNGI", new ResourceLocation("mekanism:blocks/infuse/Fungi")).setTranslationKey("fungi"));
|
||||
InfuseRegistry.registerInfuseType(new InfuseType("BIO", new ResourceLocation("mekanism:blocks/infuse/Bio")).setTranslationKey("bio"));
|
||||
InfuseRegistry.registerInfuseType(new InfuseType("OBSIDIAN", new ResourceLocation("mekanism:blocks/infuse/Obsidian")).setTranslationKey("obsidian"));
|
||||
|
||||
Capabilities.registerCapabilities();
|
||||
}
|
||||
|
||||
@@ -116,6 +116,6 @@ public class MekanismBlocks
|
||||
|
||||
public static Block init(Block block, String name)
|
||||
{
|
||||
return block.setUnlocalizedName(name).setRegistryName("mekanism:" + name);
|
||||
return block.setTranslationKey(name).setRegistryName("mekanism:" + name);
|
||||
}
|
||||
}
|
||||
@@ -158,6 +158,6 @@ public class MekanismItems
|
||||
|
||||
public static Item init(Item item, String name)
|
||||
{
|
||||
return item.setUnlocalizedName(name).setRegistryName("mekanism:" + name);
|
||||
return item.setTranslationKey(name).setRegistryName("mekanism:" + name);
|
||||
}
|
||||
}
|
||||
@@ -270,7 +270,7 @@ public interface IFactory
|
||||
return type.getStack();
|
||||
}
|
||||
|
||||
public String getUnlocalizedName()
|
||||
public String getTranslationKey()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
@@ -532,7 +532,7 @@ public abstract class BlockBasic extends Block
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public BlockRenderLayer getBlockLayer()
|
||||
public BlockRenderLayer getRenderLayer()
|
||||
{
|
||||
return BlockRenderLayer.CUTOUT;
|
||||
}
|
||||
@@ -771,7 +771,7 @@ public abstract class BlockBasic extends Block
|
||||
}
|
||||
|
||||
tileEntity.setFacing((short)change);
|
||||
tileEntity.redstone = world.isBlockIndirectlyGettingPowered(pos) > 0;
|
||||
tileEntity.redstone = world.getRedstonePowerFromNeighbors(pos) > 0;
|
||||
|
||||
if(tileEntity instanceof TileEntitySecurityDesk)
|
||||
{
|
||||
|
||||
@@ -148,7 +148,7 @@ public class BlockEnergyCube extends BlockContainer
|
||||
}
|
||||
|
||||
tileEntity.setFacing((short)change);
|
||||
tileEntity.redstone = world.isBlockIndirectlyGettingPowered(pos) > 0;
|
||||
tileEntity.redstone = world.getRedstonePowerFromNeighbors(pos) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -113,7 +113,7 @@ public class BlockGasTank extends BlockContainer
|
||||
}
|
||||
|
||||
tileEntity.setFacing((short)change);
|
||||
tileEntity.redstone = world.isBlockIndirectlyGettingPowered(pos) > 0;
|
||||
tileEntity.redstone = world.getRedstonePowerFromNeighbors(pos) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -255,7 +255,7 @@ public abstract class BlockMachine extends BlockContainer
|
||||
}
|
||||
|
||||
tileEntity.setFacing((short)change);
|
||||
tileEntity.redstone = world.isBlockIndirectlyGettingPowered(pos) > 0;
|
||||
tileEntity.redstone = world.getRedstonePowerFromNeighbors(pos) > 0;
|
||||
|
||||
if(tileEntity instanceof TileEntityLogisticalSorter)
|
||||
{
|
||||
@@ -615,7 +615,7 @@ public abstract class BlockMachine extends BlockContainer
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public BlockRenderLayer getBlockLayer()
|
||||
public BlockRenderLayer getRenderLayer()
|
||||
{
|
||||
return BlockRenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ public class BlockObsidianTNT extends Block
|
||||
{
|
||||
super.onBlockAdded(world, pos, state);
|
||||
|
||||
if(world.isBlockIndirectlyGettingPowered(pos) > 0)
|
||||
if(world.getRedstonePowerFromNeighbors(pos) > 0)
|
||||
{
|
||||
explode(world, pos);
|
||||
world.setBlockToAir(pos);
|
||||
@@ -48,7 +48,7 @@ public class BlockObsidianTNT extends Block
|
||||
@Override
|
||||
public void neighborChanged(IBlockState state, World world, BlockPos pos, Block neighborBlock, BlockPos neighborPos)
|
||||
{
|
||||
if(world.isBlockIndirectlyGettingPowered(pos) > 0)
|
||||
if(world.getRedstonePowerFromNeighbors(pos) > 0)
|
||||
{
|
||||
explode(world, pos);
|
||||
world.setBlockToAir(pos);
|
||||
@@ -56,7 +56,7 @@ public class BlockObsidianTNT extends Block
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockDestroyedByExplosion(World world, BlockPos pos, Explosion explosion)
|
||||
public void onBlockExploded(World world, BlockPos pos, Explosion explosion)
|
||||
{
|
||||
if(!world.isRemote)
|
||||
{
|
||||
@@ -106,7 +106,7 @@ public class BlockObsidianTNT extends Block
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock(World world, BlockPos pos, IBlockState state, Entity entity)
|
||||
public void onEntityCollision(World world, BlockPos pos, IBlockState state, Entity entity)
|
||||
{
|
||||
if(entity instanceof EntityArrow && !world.isRemote)
|
||||
{
|
||||
|
||||
@@ -59,7 +59,7 @@ public class BlockStateTransmitter extends ExtendedBlockState
|
||||
return name().toLowerCase(Locale.ROOT);
|
||||
}
|
||||
|
||||
public String getUnlocalizedName()
|
||||
public String getTranslationKey()
|
||||
{
|
||||
return unlocalizedName;
|
||||
}
|
||||
|
||||
@@ -440,7 +440,7 @@ public class EntityBalloon extends Entity implements IEntityAdditionalSpawnData
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
setBeenAttacked();
|
||||
markVelocityChanged();
|
||||
|
||||
if(dmgSource != DamageSource.MAGIC && dmgSource != DamageSource.DROWN && dmgSource != DamageSource.FALL)
|
||||
{
|
||||
|
||||
@@ -153,7 +153,7 @@ public class EntityRobit extends EntityCreature implements IInventory, ISustaine
|
||||
{
|
||||
if(!world.isRemote)
|
||||
{
|
||||
if(getFollowing() && getOwner() != null && getDistanceSqToEntity(getOwner()) > 4 && !getNavigator().noPath() && getEnergy() > 0)
|
||||
if(getFollowing() && getOwner() != null && getDistanceSq(getOwner()) > 4 && !getNavigator().noPath() && getEnergy() > 0)
|
||||
{
|
||||
setEnergy(getEnergy() - getRoundedTravelEnergy());
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ public class RobitAIFollow extends EntityAIBase
|
||||
theRobit.getLookHelper().setLookPositionWithEntity(player, 6.0F, theRobit.getVerticalFaceSpeed()/10);
|
||||
return false;
|
||||
}
|
||||
else if(theRobit.getDistanceSqToEntity(player) < (minDist * minDist))
|
||||
else if(theRobit.getDistanceSq(player) < (minDist * minDist))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -88,7 +88,7 @@ public class RobitAIFollow extends EntityAIBase
|
||||
@Override
|
||||
public boolean shouldContinueExecuting()
|
||||
{
|
||||
return !thePathfinder.noPath() && theRobit.getDistanceSqToEntity(theOwner) > (maxDist * maxDist) && theRobit.getFollowing() && theRobit.getEnergy() > 0 && theOwner.world.provider.getDimension() == theRobit.world.provider.getDimension();
|
||||
return !thePathfinder.noPath() && theRobit.getDistanceSq(theOwner) > (maxDist * maxDist) && theRobit.getFollowing() && theRobit.getEnergy() > 0 && theOwner.world.provider.getDimension() == theRobit.world.provider.getDimension();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -103,7 +103,7 @@ public class RobitAIFollow extends EntityAIBase
|
||||
public void resetTask()
|
||||
{
|
||||
theOwner = null;
|
||||
thePathfinder.clearPathEntity();
|
||||
thePathfinder.clearPath();
|
||||
theRobit.setPathPriority(PathNodeType.WATER, oldWaterCost);
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ public class RobitAIFollow extends EntityAIBase
|
||||
|
||||
if(!thePathfinder.tryMoveToEntityLiving(theOwner, moveSpeed))
|
||||
{
|
||||
if(theRobit.getDistanceSqToEntity(theOwner) >= 144.0D)
|
||||
if(theRobit.getDistanceSq(theOwner) >= 144.0D)
|
||||
{
|
||||
int x = MathHelper.floor(theOwner.posX) - 2;
|
||||
int y = MathHelper.floor(theOwner.getEntityBoundingBox().minY);
|
||||
@@ -136,7 +136,7 @@ public class RobitAIFollow extends EntityAIBase
|
||||
if((l < 1 || i1 < 1 || l > 3 || i1 > 3) && world.getBlockState(under).isSideSolid(world, under, EnumFacing.UP) && isEmptyBlock(pos) && isEmptyBlock(new BlockPos(x + l, y + 1, z + i1)))
|
||||
{
|
||||
theRobit.setLocationAndAngles((x + l) + 0.5F, y, (z + i1) + 0.5F, theRobit.rotationYaw, theRobit.rotationPitch);
|
||||
thePathfinder.clearPathEntity();
|
||||
thePathfinder.clearPath();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ public class RobitAIPickup extends EntityAIBase
|
||||
return false;
|
||||
}
|
||||
|
||||
if(closest != null && closest.getDistanceSqToEntity(closest) > 100 && thePathfinder.getPathToXYZ(closest.posX, closest.posY, closest.posZ) != null)
|
||||
if(closest != null && closest.getDistanceSq(closest) > 100 && thePathfinder.getPathToXYZ(closest.posX, closest.posY, closest.posZ) != null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -72,7 +72,7 @@ public class RobitAIPickup extends EntityAIBase
|
||||
{
|
||||
EntityItem entity = iter.next();
|
||||
|
||||
double distance = theRobit.getDistanceToEntity(entity);
|
||||
double distance = theRobit.getDistance(entity);
|
||||
|
||||
if(distance <= 10)
|
||||
{
|
||||
@@ -100,7 +100,7 @@ public class RobitAIPickup extends EntityAIBase
|
||||
@Override
|
||||
public boolean shouldContinueExecuting()
|
||||
{
|
||||
return !closest.isDead && !thePathfinder.noPath() && theRobit.getDistanceSqToEntity(closest) > 100 && theRobit.getDropPickup() && theRobit.getEnergy() > 0 && closest.world.provider.getDimension() == theRobit.world.provider.getDimension();
|
||||
return !closest.isDead && !thePathfinder.noPath() && theRobit.getDistanceSq(closest) > 100 && theRobit.getDropPickup() && theRobit.getEnergy() > 0 && closest.world.provider.getDimension() == theRobit.world.provider.getDimension();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -114,7 +114,7 @@ public class RobitAIPickup extends EntityAIBase
|
||||
@Override
|
||||
public void resetTask()
|
||||
{
|
||||
thePathfinder.clearPathEntity();
|
||||
thePathfinder.clearPath();
|
||||
theRobit.setPathPriority(PathNodeType.WATER, oldWaterCost);
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ public class RobitAIPickup extends EntityAIBase
|
||||
|
||||
if(!thePathfinder.tryMoveToEntityLiving(closest, moveSpeed))
|
||||
{
|
||||
if(theRobit.getDistanceSqToEntity(closest) >= 144.0D)
|
||||
if(theRobit.getDistanceSq(closest) >= 144.0D)
|
||||
{
|
||||
int x = MathHelper.floor(closest.posX) - 2;
|
||||
int y = MathHelper.floor(closest.getEntityBoundingBox().minY);
|
||||
@@ -150,7 +150,7 @@ public class RobitAIPickup extends EntityAIBase
|
||||
if((l < 1 || i1 < 1 || l > 3 || i1 > 3) && world.getBlockState(under).isSideSolid(world, under, EnumFacing.UP) && isEmptyBlock(pos) && isEmptyBlock(new BlockPos(x + l, y + 1, z + i1)))
|
||||
{
|
||||
theRobit.setLocationAndAngles((x + l) + 0.5F, y, (z + i1) + 0.5F, theRobit.rotationYaw, theRobit.rotationPitch);
|
||||
thePathfinder.clearPathEntity();
|
||||
thePathfinder.clearPath();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -262,7 +262,7 @@ public final class MekanismHooks
|
||||
NonNullList<ItemStack> seeds = NonNullList.create();
|
||||
crystalSeed.get().getSubItems(CreativeTabs.SEARCH, seeds);//there appears to be no way to get this via api, so fall back to unloc names
|
||||
for (ItemStack stack : seeds) {
|
||||
String unloc = crystalSeed.get().getUnlocalizedName(stack);
|
||||
String unloc = crystalSeed.get().getTranslationKey(stack);
|
||||
if (unloc.endsWith("certus") && pureCertus.isPresent()){
|
||||
RecipeHandler.addEnrichmentChamberRecipe(stack, pureCertus.get().copy());
|
||||
} else if (unloc.endsWith("nether") && pureNether.isPresent()){
|
||||
|
||||
@@ -96,7 +96,7 @@ public class ItemAtomicDisassembler extends ItemEnergized
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getStrVsBlock(ItemStack itemstack, IBlockState state)
|
||||
public float getDestroySpeed(ItemStack itemstack, IBlockState state)
|
||||
{
|
||||
return getEnergy(itemstack) != 0 ? getEfficiency(itemstack) : 1F;
|
||||
}
|
||||
@@ -120,7 +120,7 @@ public class ItemAtomicDisassembler extends ItemEnergized
|
||||
Vec3d positionEyes = player.getPositionEyes(1.0F);
|
||||
Vec3d playerLook = player.getLook(1.0F);
|
||||
double blockReachDistance = player.getAttributeMap().getAttributeInstance(EntityPlayer.REACH_DISTANCE).getAttributeValue();
|
||||
Vec3d maxReach = positionEyes.addVector(playerLook.x * blockReachDistance, playerLook.y * blockReachDistance, playerLook.z * blockReachDistance);
|
||||
Vec3d maxReach = positionEyes.add(playerLook.x * blockReachDistance, playerLook.y * blockReachDistance, playerLook.z * blockReachDistance);
|
||||
RayTraceResult res = state.collisionRayTrace(player.world, pos, playerLook, maxReach);
|
||||
//noinspection ConstantConditions - idea thinks it's nonnull due to package level annotations, but it's not
|
||||
return res != null ? res : new RayTraceResult(RayTraceResult.Type.MISS, Vec3d.ZERO, EnumFacing.UP, pos);
|
||||
@@ -171,7 +171,7 @@ public class ItemAtomicDisassembler extends ItemEnergized
|
||||
|
||||
Block block2 = coord.getBlock(player.world);
|
||||
|
||||
block2.onBlockDestroyedByPlayer(player.world, coord.getPos(), state);
|
||||
block2.onBlockHarvested(player.world, coord.getPos(), state, player);
|
||||
player.world.playEvent(null, 2001, coord.getPos(), Block.getStateId(state));
|
||||
player.world.setBlockToAir(coord.getPos());
|
||||
block2.breakBlock(player.world, coord.getPos(), state);
|
||||
|
||||
@@ -104,9 +104,9 @@ public class ItemBalloon extends ItemMekanism implements IMetaItem
|
||||
EnumColor color = getColor(stack);
|
||||
String dyeName = color.getDyedName();
|
||||
|
||||
if(I18n.canTranslate(getUnlocalizedName(stack) + "." + color.dyeName))
|
||||
if(I18n.canTranslate(getTranslationKey(stack) + "." + color.dyeName))
|
||||
{
|
||||
return LangUtils.localize(getUnlocalizedName(stack) + "." + color.dyeName);
|
||||
return LangUtils.localize(getTranslationKey(stack) + "." + color.dyeName);
|
||||
}
|
||||
|
||||
if(getColor(stack) == EnumColor.BLACK)
|
||||
|
||||
@@ -285,13 +285,13 @@ public class ItemBlockBasic extends ItemBlock implements IEnergizedItem, ITierIt
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemstack)
|
||||
public String getTranslationKey(ItemStack itemstack)
|
||||
{
|
||||
BasicBlockType type = BasicBlockType.get(itemstack);
|
||||
|
||||
if(type != null)
|
||||
{
|
||||
String name = getUnlocalizedName() + "." + type.name;
|
||||
String name = getTranslationKey() + "." + type.name;
|
||||
|
||||
if(type == BasicBlockType.BIN || type == BasicBlockType.INDUCTION_CELL || type == BasicBlockType.INDUCTION_PROVIDER)
|
||||
{
|
||||
|
||||
@@ -96,9 +96,9 @@ public class ItemBlockGlowPanel extends ItemBlockMultipartAble
|
||||
EnumColor colour = EnumColor.DYES[itemDamage];
|
||||
String colourName;
|
||||
|
||||
if(I18n.canTranslate(getUnlocalizedName(stack) + "." + colour.dyeName))
|
||||
if(I18n.canTranslate(getTranslationKey(stack) + "." + colour.dyeName))
|
||||
{
|
||||
return LangUtils.localize(getUnlocalizedName(stack) + "." + colour.dyeName);
|
||||
return LangUtils.localize(getTranslationKey(stack) + "." + colour.dyeName);
|
||||
}
|
||||
|
||||
if(colour == EnumColor.BLACK)
|
||||
|
||||
@@ -161,11 +161,11 @@ public class ItemBlockMachine extends ItemBlock implements IEnergizedItem, ISpec
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemstack)
|
||||
public String getTranslationKey(ItemStack itemstack)
|
||||
{
|
||||
if(MachineType.get(itemstack) != null)
|
||||
{
|
||||
return getUnlocalizedName() + "." + MachineType.get(itemstack).blockName;
|
||||
return getTranslationKey() + "." + MachineType.get(itemstack).blockName;
|
||||
}
|
||||
|
||||
return "null";
|
||||
@@ -180,9 +180,9 @@ public class ItemBlockMachine extends ItemBlock implements IEnergizedItem, ISpec
|
||||
{
|
||||
BaseTier tier = type == MachineType.BASIC_FACTORY ? BaseTier.BASIC : (type == MachineType.ADVANCED_FACTORY ? BaseTier.ADVANCED : BaseTier.ELITE);
|
||||
|
||||
if(I18n.canTranslate("tile." + tier.getSimpleName() + RecipeType.values()[getRecipeType(itemstack)].getUnlocalizedName() + "Factory"))
|
||||
if(I18n.canTranslate("tile." + tier.getSimpleName() + RecipeType.values()[getRecipeType(itemstack)].getTranslationKey() + "Factory"))
|
||||
{
|
||||
return LangUtils.localize("tile." + tier.getSimpleName() + RecipeType.values()[getRecipeType(itemstack)].getUnlocalizedName() + "Factory");
|
||||
return LangUtils.localize("tile." + tier.getSimpleName() + RecipeType.values()[getRecipeType(itemstack)].getTranslationKey() + "Factory");
|
||||
}
|
||||
|
||||
return tier.getLocalizedName() + " " + RecipeType.values()[getRecipeType(itemstack)].getLocalizedName() + " " + super.getItemStackDisplayName(itemstack);
|
||||
|
||||
@@ -44,7 +44,7 @@ public class ItemBlockOre extends ItemBlock
|
||||
list.add("Hold " + EnumColor.AQUA + GameSettings.getKeyDisplayString(MekanismKeyHandler.sneakKey.getKeyCode()) + EnumColor.GREY + " " + LangUtils.localize("tooltip.forDetails") + ".");
|
||||
}
|
||||
else {
|
||||
list.addAll(MekanismUtils.splitTooltip(LangUtils.localize("tooltip." + getUnlocalizedName(itemstack).replace("tile.OreBlock.", "")), itemstack));
|
||||
list.addAll(MekanismUtils.splitTooltip(LangUtils.localize("tooltip." + getTranslationKey(itemstack).replace("tile.OreBlock.", "")), itemstack));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ public class ItemBlockOre extends ItemBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemstack)
|
||||
public String getTranslationKey(ItemStack itemstack)
|
||||
{
|
||||
String name;
|
||||
|
||||
@@ -75,6 +75,6 @@ public class ItemBlockOre extends ItemBlock
|
||||
break;
|
||||
}
|
||||
|
||||
return getUnlocalizedName() + "." + name;
|
||||
return getTranslationKey() + "." + name;
|
||||
}
|
||||
}
|
||||
@@ -32,9 +32,9 @@ public class ItemBlockPlastic extends ItemBlock
|
||||
EnumColor colour = EnumColor.DYES[dyeColour.getDyeDamage()];
|
||||
String colourName;
|
||||
|
||||
if(I18n.canTranslate(getUnlocalizedName(stack) + "." + colour.dyeName))
|
||||
if(I18n.canTranslate(getTranslationKey(stack) + "." + colour.dyeName))
|
||||
{
|
||||
return LangUtils.localize(getUnlocalizedName(stack) + "." + colour.dyeName);
|
||||
return LangUtils.localize(getTranslationKey(stack) + "." + colour.dyeName);
|
||||
}
|
||||
|
||||
if(colour == EnumColor.BLACK)
|
||||
|
||||
@@ -170,10 +170,10 @@ public class ItemBlockTransmitter extends ItemBlockMultipartAble implements ITie
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack)
|
||||
public String getTranslationKey(ItemStack stack)
|
||||
{
|
||||
TransmitterType type = TransmitterType.get(stack.getItemDamage());
|
||||
String name = type.getUnlocalizedName();
|
||||
String name = type.getTranslationKey();
|
||||
|
||||
if(type.hasTiers())
|
||||
{
|
||||
@@ -181,7 +181,7 @@ public class ItemBlockTransmitter extends ItemBlockMultipartAble implements ITie
|
||||
name = tier.getSimpleName() + name;
|
||||
}
|
||||
|
||||
return getUnlocalizedName() + "." + name;
|
||||
return getTranslationKey() + "." + name;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -39,7 +39,7 @@ public class ItemClump extends ItemMekanism implements IMetaItem
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack item)
|
||||
public String getTranslationKey(ItemStack item)
|
||||
{
|
||||
if(item.getItemDamage() <= Resource.values().length-1)
|
||||
{
|
||||
|
||||
@@ -146,7 +146,7 @@ public class ItemConfigurationCard extends ItemMekanism
|
||||
|
||||
if(tile instanceof TileEntityContainerBlock)
|
||||
{
|
||||
ret = tile.getBlockType().getUnlocalizedName() + "." + ((TileEntityContainerBlock)tile).fullName + ".name";
|
||||
ret = tile.getBlockType().getTranslationKey() + "." + ((TileEntityContainerBlock)tile).fullName + ".name";
|
||||
}
|
||||
|
||||
if(CapabilityUtils.hasCapability(tile, Capabilities.SPECIAL_CONFIG_DATA_CAPABILITY, side))
|
||||
@@ -173,7 +173,7 @@ public class ItemConfigurationCard extends ItemMekanism
|
||||
{
|
||||
NBTTagCompound data = ItemDataUtils.getCompound(itemstack, "data");
|
||||
|
||||
if(data.hasNoTags())
|
||||
if(data.isEmpty())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ public class ItemControlCircuit extends ItemMekanism implements IMetaItem
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack item)
|
||||
public String getTranslationKey(ItemStack item)
|
||||
{
|
||||
return "item." + BaseTier.values()[item.getItemDamage()].getSimpleName() + "ControlCircuit";
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ public class ItemCrystal extends ItemMekanism implements IMetaItem
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack item)
|
||||
public String getTranslationKey(ItemStack item)
|
||||
{
|
||||
if(item.getItemDamage() <= Resource.values().length-1)
|
||||
{
|
||||
|
||||
@@ -39,7 +39,7 @@ public class ItemDirtyDust extends ItemMekanism implements IMetaItem
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack item)
|
||||
public String getTranslationKey(ItemStack item)
|
||||
{
|
||||
if(item.getItemDamage() <= Resource.values().length-1)
|
||||
{
|
||||
|
||||
@@ -39,7 +39,7 @@ public class ItemDust extends ItemMekanism implements IMetaItem
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack item)
|
||||
public String getTranslationKey(ItemStack item)
|
||||
{
|
||||
if(item.getItemDamage() <= Resource.values().length-1)
|
||||
{
|
||||
|
||||
@@ -86,7 +86,7 @@ public class ItemElectricBow extends ItemEnergized implements IItemNetwork
|
||||
{
|
||||
ItemArrow itemarrow = (ItemArrow)(ammo.getItem() instanceof ItemArrow ? ammo.getItem() : Items.ARROW);
|
||||
EntityArrow entityarrow = itemarrow.createArrow(world, itemstack, player);
|
||||
entityarrow.setAim(player, player.rotationPitch, player.rotationYaw, 0.0F, f * 3.0F, 1.0F);
|
||||
entityarrow.shoot(player, player.rotationPitch, player.rotationYaw, 0.0F, f * 3.0F, 1.0F);
|
||||
|
||||
if(f == 1.0F)
|
||||
{
|
||||
|
||||
@@ -38,7 +38,7 @@ public class ItemHDPE extends ItemMekanism implements IMetaItem
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack item)
|
||||
public String getTranslationKey(ItemStack item)
|
||||
{
|
||||
return "item." + PlasticItem.values()[item.getItemDamage()].getName();
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ public class ItemIngot extends ItemMekanism implements IMetaItem
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack item)
|
||||
public String getTranslationKey(ItemStack item)
|
||||
{
|
||||
return "item." + en_USNames[item.getItemDamage()].toLowerCase(Locale.ROOT) + "Ingot";
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ public class ItemNugget extends ItemMekanism implements IMetaItem
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack item)
|
||||
public String getTranslationKey(ItemStack item)
|
||||
{
|
||||
return "item." + ItemIngot.en_USNames[item.getItemDamage()].toLowerCase(Locale.ROOT) + "Nugget";
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ public class ItemOtherDust extends ItemMekanism implements IMetaItem
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack item)
|
||||
public String getTranslationKey(ItemStack item)
|
||||
{
|
||||
return "item." + subtypes[item.getItemDamage()].toLowerCase(Locale.ROOT) + "Dust";
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ public class ItemShard extends ItemMekanism implements IMetaItem
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack item)
|
||||
public String getTranslationKey(ItemStack item)
|
||||
{
|
||||
if(item.getItemDamage() <= Resource.values().length-1)
|
||||
{
|
||||
|
||||
@@ -87,7 +87,7 @@ public class ItemTierInstaller extends ItemMekanism implements IMetaItem
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack item)
|
||||
public String getTranslationKey(ItemStack item)
|
||||
{
|
||||
return "item." + BaseTier.values()[item.getItemDamage()].getSimpleName().toLowerCase(Locale.ROOT) + "TierInstaller";
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ public class PacketConfigurationUpdate implements IMessageHandler<ConfigurationU
|
||||
}
|
||||
else if(message.packetType == ConfigurationPacket.INPUT_COLOR)
|
||||
{
|
||||
EnumFacing side = EnumFacing.getFront(message.inputSide);
|
||||
EnumFacing side = EnumFacing.byIndex(message.inputSide);
|
||||
|
||||
if(message.clickType == 0)
|
||||
{
|
||||
@@ -147,7 +147,7 @@ public class PacketConfigurationUpdate implements IMessageHandler<ConfigurationU
|
||||
if(packetType == ConfigurationPacket.SIDE_DATA)
|
||||
{
|
||||
clickType = click;
|
||||
configIndex = EnumFacing.getFront(extra);
|
||||
configIndex = EnumFacing.byIndex(extra);
|
||||
transmission = trans;
|
||||
}
|
||||
|
||||
@@ -201,7 +201,7 @@ public class PacketConfigurationUpdate implements IMessageHandler<ConfigurationU
|
||||
else if(packetType == ConfigurationPacket.SIDE_DATA)
|
||||
{
|
||||
clickType = dataStream.readInt();
|
||||
configIndex = EnumFacing.getFront(dataStream.readInt());
|
||||
configIndex = EnumFacing.byIndex(dataStream.readInt());
|
||||
transmission = TransmissionType.values()[dataStream.readInt()];
|
||||
}
|
||||
else if(packetType == ConfigurationPacket.EJECT_COLOR)
|
||||
|
||||
@@ -111,11 +111,11 @@ public class RecipeGenerator {
|
||||
// repeatedly adds _alt if a file already exists
|
||||
// janky I know but it works
|
||||
String suffix = result.getItem().getHasSubtypes() ? "_" + result.getItemDamage() : "";
|
||||
File f = new File(RECIPE_DIR, result.getItem().getRegistryName().getResourcePath() + suffix + ".json");
|
||||
File f = new File(RECIPE_DIR, result.getItem().getRegistryName().getPath() + suffix + ".json");
|
||||
|
||||
while (f.exists()) {
|
||||
suffix += "_alt";
|
||||
f = new File(RECIPE_DIR, result.getItem().getRegistryName().getResourcePath() + suffix + ".json");
|
||||
f = new File(RECIPE_DIR, result.getItem().getRegistryName().getPath() + suffix + ".json");
|
||||
}
|
||||
|
||||
try (FileWriter w = new FileWriter(f)) {
|
||||
@@ -155,11 +155,11 @@ public class RecipeGenerator {
|
||||
// repeatedly adds _alt if a file already exists
|
||||
// janky I know but it works
|
||||
String suffix = result.getItem().getHasSubtypes() ? "_" + result.getItemDamage() : "";
|
||||
File f = new File(RECIPE_DIR, result.getItem().getRegistryName().getResourcePath() + suffix + ".json");
|
||||
File f = new File(RECIPE_DIR, result.getItem().getRegistryName().getPath() + suffix + ".json");
|
||||
|
||||
while (f.exists()) {
|
||||
suffix += "_alt";
|
||||
f = new File(RECIPE_DIR, result.getItem().getRegistryName().getResourcePath() + suffix + ".json");
|
||||
f = new File(RECIPE_DIR, result.getItem().getRegistryName().getPath() + suffix + ".json");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -505,7 +505,7 @@ public class TileEntityBin extends TileEntityBasicBlock implements ISidedInvento
|
||||
@Override
|
||||
public String getName()
|
||||
{
|
||||
return LangUtils.localize(getBlockType().getUnlocalizedName() + ".Bin" + tier.getBaseTier().getSimpleName() + ".name");
|
||||
return LangUtils.localize(getBlockType().getTranslationKey() + ".Bin" + tier.getBaseTier().getSimpleName() + ".name");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -345,7 +345,7 @@ public class TileEntityBoilerCasing extends TileEntityMultiblock<SynchronizedBoi
|
||||
{
|
||||
ValveData data = new ValveData();
|
||||
data.location = Coord4D.read(dataStream);
|
||||
data.side = EnumFacing.getFront(dataStream.readInt());
|
||||
data.side = EnumFacing.byIndex(dataStream.readInt());
|
||||
|
||||
valveViewing.add(data);
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ public class TileEntityBoundingBlock extends TileEntity implements ITileNetwork
|
||||
{
|
||||
TileEntityBasicBlock tileEntity = (TileEntityBasicBlock)tile;
|
||||
|
||||
int power = world.isBlockIndirectlyGettingPowered(getPos());
|
||||
int power = world.getRedstonePowerFromNeighbors(getPos());
|
||||
|
||||
if(prevPower != power)
|
||||
{
|
||||
|
||||
@@ -1471,7 +1471,7 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I
|
||||
@Override
|
||||
public String getDataType()
|
||||
{
|
||||
return getBlockType().getUnlocalizedName() + "." + fullName + ".name";
|
||||
return getBlockType().getTranslationKey() + "." + fullName + ".name";
|
||||
}
|
||||
|
||||
public void writeSustainedData(ItemStack itemStack)
|
||||
|
||||
@@ -258,7 +258,7 @@ public class TileEntityDynamicTank extends TileEntityMultiblock<SynchronizedTank
|
||||
{
|
||||
ValveData data = new ValveData();
|
||||
data.location = Coord4D.read(dataStream);
|
||||
data.side = EnumFacing.getFront(dataStream.readInt());
|
||||
data.side = EnumFacing.byIndex(dataStream.readInt());
|
||||
|
||||
valveViewing.add(data);
|
||||
|
||||
|
||||
@@ -480,7 +480,7 @@ public class TileEntityElectricPump extends TileEntityElectricBlock implements I
|
||||
@Override
|
||||
public FluidStack drain(EnumFacing from, FluidStack resource, boolean doDrain)
|
||||
{
|
||||
if(fluidTank.getFluid() != null && fluidTank.getFluid().getFluid() == resource.getFluid() && from == EnumFacing.getFront(1))
|
||||
if(fluidTank.getFluid() != null && fluidTank.getFluid().getFluid() == resource.getFluid() && from == EnumFacing.byIndex(1))
|
||||
{
|
||||
return drain(from, resource.amount, doDrain);
|
||||
}
|
||||
@@ -497,7 +497,7 @@ public class TileEntityElectricPump extends TileEntityElectricBlock implements I
|
||||
@Override
|
||||
public FluidStack drain(EnumFacing from, int maxDrain, boolean doDrain)
|
||||
{
|
||||
if(from == EnumFacing.getFront(1))
|
||||
if(from == EnumFacing.byIndex(1))
|
||||
{
|
||||
return fluidTank.drain(maxDrain, doDrain);
|
||||
}
|
||||
@@ -514,7 +514,7 @@ public class TileEntityElectricPump extends TileEntityElectricBlock implements I
|
||||
@Override
|
||||
public boolean canDrain(EnumFacing from, Fluid fluid)
|
||||
{
|
||||
return from == EnumFacing.getFront(1);
|
||||
return from == EnumFacing.byIndex(1);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -917,9 +917,9 @@ public class TileEntityFactory extends TileEntityMachine implements IComputerInt
|
||||
@Override
|
||||
public String getName()
|
||||
{
|
||||
if(I18n.canTranslate("tile." + tier.getBaseTier().getName() + recipeType.getUnlocalizedName() + "Factory"))
|
||||
if(I18n.canTranslate("tile." + tier.getBaseTier().getName() + recipeType.getTranslationKey() + "Factory"))
|
||||
{
|
||||
return LangUtils.localize("tile." + tier.getBaseTier().getName() + recipeType.getUnlocalizedName() + "Factory");
|
||||
return LangUtils.localize("tile." + tier.getBaseTier().getName() + recipeType.getTranslationKey() + "Factory");
|
||||
}
|
||||
|
||||
return tier.getBaseTier().getLocalizedName() + " " + recipeType.getLocalizedName() + " " + super.getName();
|
||||
|
||||
@@ -37,7 +37,7 @@ public class TileEntityGlowPanel extends TileEntity implements ITileNetwork
|
||||
@Override
|
||||
public void handlePacketData(ByteBuf dataStream) throws Exception
|
||||
{
|
||||
side = EnumFacing.getFront(dataStream.readInt());
|
||||
side = EnumFacing.byIndex(dataStream.readInt());
|
||||
colour = EnumColor.DYES[dataStream.readInt()];
|
||||
|
||||
MekanismUtils.updateBlock(world, pos);
|
||||
@@ -90,7 +90,7 @@ public class TileEntityGlowPanel extends TileEntity implements ITileNetwork
|
||||
{
|
||||
super.readFromNBT(nbt);
|
||||
|
||||
side = EnumFacing.getFront(nbt.getInteger("side"));
|
||||
side = EnumFacing.byIndex(nbt.getInteger("side"));
|
||||
colour = EnumColor.DYES[nbt.getInteger("colour")];
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ public class TileEntityInductionCell extends TileEntityBasicBlock implements ISt
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return LangUtils.localize(getBlockType().getUnlocalizedName() + ".InductionCell" + tier.getBaseTier().getSimpleName() + ".name");
|
||||
return LangUtils.localize(getBlockType().getTranslationKey() + ".InductionCell" + tier.getBaseTier().getSimpleName() + ".name");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -19,7 +19,7 @@ public class TileEntityInductionProvider extends TileEntityBasicBlock
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return LangUtils.localize(getBlockType().getUnlocalizedName() + ".InductionProvider" + tier.getBaseTier().getSimpleName() + ".name");
|
||||
return LangUtils.localize(getBlockType().getTranslationKey() + ".InductionProvider" + tier.getBaseTier().getSimpleName() + ".name");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -627,7 +627,7 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen
|
||||
@Override
|
||||
public String getDataType()
|
||||
{
|
||||
return getBlockType().getUnlocalizedName() + "." + fullName + ".name";
|
||||
return getBlockType().getTranslationKey() + "." + fullName + ".name";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -365,7 +365,7 @@ public class TileEntityOredictionificator extends TileEntityContainerBlock imple
|
||||
@Override
|
||||
public String getDataType()
|
||||
{
|
||||
return getBlockType().getUnlocalizedName() + "." + fullName + ".name";
|
||||
return getBlockType().getTranslationKey() + "." + fullName + ".name";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -310,7 +310,7 @@ public class TileEntityPRC extends TileEntityBasicMachine<PressurizedInput, Pres
|
||||
@Override
|
||||
public String getName()
|
||||
{
|
||||
return LangUtils.localize(getBlockType().getUnlocalizedName() + "." + fullName + ".short.name");
|
||||
return LangUtils.localize(getBlockType().getTranslationKey() + "." + fullName + ".short.name");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -382,9 +382,9 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements ICo
|
||||
if(player.dimension != coord.dimensionId)
|
||||
{
|
||||
int id = player.dimension;
|
||||
WorldServer oldWorld = player.mcServer.getWorld(player.dimension);
|
||||
WorldServer oldWorld = player.server.getWorld(player.dimension);
|
||||
player.dimension = coord.dimensionId;
|
||||
WorldServer newWorld = player.mcServer.getWorld(player.dimension);
|
||||
WorldServer newWorld = player.server.getWorld(player.dimension);
|
||||
player.connection.sendPacket(new SPacketRespawn(player.dimension, player.world.getDifficulty(), newWorld.getWorldInfo().getTerrainType(), player.interactionManager.getGameType()));
|
||||
oldWorld.removeEntityDangerously(player);
|
||||
player.isDead = false;
|
||||
@@ -397,11 +397,11 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements ICo
|
||||
player.setWorld(newWorld);
|
||||
}
|
||||
|
||||
player.mcServer.getPlayerList().preparePlayer(player, oldWorld);
|
||||
player.server.getPlayerList().preparePlayer(player, oldWorld);
|
||||
player.connection.setPlayerLocation(coord.x +0.5, coord.y +1, coord.z +0.5, player.rotationYaw, player.rotationPitch);
|
||||
player.interactionManager.setWorld(newWorld);
|
||||
player.mcServer.getPlayerList().updateTimeAndWeatherForPlayer(player, newWorld);
|
||||
player.mcServer.getPlayerList().syncPlayerInventory(player);
|
||||
player.server.getPlayerList().updateTimeAndWeatherForPlayer(player, newWorld);
|
||||
player.server.getPlayerList().syncPlayerInventory(player);
|
||||
|
||||
for(PotionEffect potioneffect : player.getActivePotionEffects())
|
||||
{
|
||||
|
||||
@@ -258,7 +258,7 @@ public class TileEntityThermalEvaporationController extends TileEntityThermalEva
|
||||
{
|
||||
if(!temperatureSet)
|
||||
{
|
||||
biomeTemp = world.getBiomeForCoordsBody(getPos()).getFloatTemperature(getPos());
|
||||
biomeTemp = world.getBiomeForCoordsBody(getPos()).getTemperature(getPos());
|
||||
temperatureSet = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ public class TileComponentEjector implements ITileComponent
|
||||
{
|
||||
for(EnumFacing side : dirs)
|
||||
{
|
||||
if(EnumFacing.getFront(i%6) == side)
|
||||
if(EnumFacing.byIndex(i%6) == side)
|
||||
{
|
||||
sides.add(side);
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ public abstract class TileEntityBasicBlock extends TileEntity implements ITileNe
|
||||
{
|
||||
if(FMLCommonHandler.instance().getEffectiveSide().isClient())
|
||||
{
|
||||
facing = EnumFacing.getFront(dataStream.readInt());
|
||||
facing = EnumFacing.byIndex(dataStream.readInt());
|
||||
redstone = dataStream.readBoolean();
|
||||
|
||||
if(clientFacing != facing)
|
||||
@@ -188,7 +188,7 @@ public abstract class TileEntityBasicBlock extends TileEntity implements ITileNe
|
||||
|
||||
if(nbtTags.hasKey("facing"))
|
||||
{
|
||||
facing = EnumFacing.getFront(nbtTags.getInteger("facing"));
|
||||
facing = EnumFacing.byIndex(nbtTags.getInteger("facing"));
|
||||
}
|
||||
|
||||
redstone = nbtTags.getBoolean("redstone");
|
||||
@@ -237,7 +237,7 @@ public abstract class TileEntityBasicBlock extends TileEntity implements ITileNe
|
||||
{
|
||||
if(canSetFacing(direction))
|
||||
{
|
||||
facing = EnumFacing.getFront(direction);
|
||||
facing = EnumFacing.byIndex(direction);
|
||||
}
|
||||
|
||||
if(!(facing == clientFacing || world.isRemote))
|
||||
@@ -280,7 +280,7 @@ public abstract class TileEntityBasicBlock extends TileEntity implements ITileNe
|
||||
|
||||
private void updatePower()
|
||||
{
|
||||
boolean power = world.isBlockIndirectlyGettingPowered(getPos()) > 0;
|
||||
boolean power = world.getRedstonePowerFromNeighbors(getPos()) > 0;
|
||||
|
||||
if(redstone != power)
|
||||
{
|
||||
|
||||
@@ -167,7 +167,7 @@ public abstract class TileEntityContainerBlock extends TileEntityBasicBlock impl
|
||||
@Override
|
||||
public String getName()
|
||||
{
|
||||
return LangUtils.localize(getBlockType().getUnlocalizedName() + "." + fullName + ".name");
|
||||
return LangUtils.localize(getBlockType().getTranslationKey() + "." + fullName + ".name");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -84,7 +84,7 @@ public abstract class TileEntityNoisyBlock extends TileEntityElectricBlock imple
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Vec3d getSoundPosition()
|
||||
{
|
||||
return new Vec3d(getPos()).addVector(0.5, 0.5, 0.5);
|
||||
return new Vec3d(getPos()).add(0.5, 0.5, 0.5);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -612,7 +612,7 @@ public abstract class TileEntitySidedPipe extends TileEntity implements ITileNet
|
||||
connectionTypes[hitSide.ordinal()] = connectionTypes[hitSide.ordinal()].next();
|
||||
sendDesc = true;
|
||||
|
||||
onModeChange(EnumFacing.getFront(hitSide.ordinal()));
|
||||
onModeChange(EnumFacing.byIndex(hitSide.ordinal()));
|
||||
player.sendMessage(new TextComponentGroup().translation("tooltip.configurator.modeChange").string(" ").translation(connectionTypes[hitSide.ordinal()].translationKey()));
|
||||
|
||||
return EnumActionResult.SUCCESS;
|
||||
|
||||
@@ -145,7 +145,7 @@ public final class GasUtils
|
||||
{
|
||||
IGasHandler handler = possibleAcceptors[i];
|
||||
|
||||
if(handler != null && handler.canReceiveGas(EnumFacing.getFront(i).getOpposite(), stack.getGas()))
|
||||
if(handler != null && handler.canReceiveGas(EnumFacing.byIndex(i).getOpposite(), stack.getGas()))
|
||||
{
|
||||
availableAcceptors.add(handler);
|
||||
}
|
||||
@@ -172,7 +172,7 @@ public final class GasUtils
|
||||
remaining--;
|
||||
}
|
||||
|
||||
EnumFacing dir = EnumFacing.getFront(Arrays.asList(possibleAcceptors).indexOf(acceptor)).getOpposite();
|
||||
EnumFacing dir = EnumFacing.byIndex(Arrays.asList(possibleAcceptors).indexOf(acceptor)).getOpposite();
|
||||
toSend -= acceptor.receiveGas(dir, new GasStack(stack.getGas(), currentSending), true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ public final class ItemRegistryUtils
|
||||
return "null";
|
||||
}
|
||||
|
||||
String modId = itemResourceLocation.getResourceDomain();
|
||||
String modId = itemResourceLocation.getNamespace();
|
||||
String lowercaseModId = modId.toLowerCase(Locale.ENGLISH);
|
||||
String modName = modIDMap.computeIfAbsent(lowercaseModId, k -> WordUtils.capitalize(modId));
|
||||
|
||||
|
||||
@@ -691,7 +691,7 @@ public final class MekanismUtils
|
||||
}
|
||||
|
||||
/**
|
||||
* Better version of the World.isBlockIndirectlyGettingPowered() method that doesn't load chunks.
|
||||
* Better version of the World.getRedstonePowerFromNeighbors() method that doesn't load chunks.
|
||||
* @param world - the world to perform the check in
|
||||
* @param coord - the coordinate of the block performing the check
|
||||
* @return if the block is indirectly getting powered by LOADED chunks
|
||||
@@ -1077,7 +1077,7 @@ public final class MekanismUtils
|
||||
|
||||
Vec3d headVec = getHeadVec(player);
|
||||
Vec3d lookVec = player.getLook(1);
|
||||
Vec3d endVec = headVec.addVector(lookVec.x*reach, lookVec.y*reach, lookVec.z*reach);
|
||||
Vec3d endVec = headVec.add(lookVec.x*reach, lookVec.y*reach, lookVec.z*reach);
|
||||
|
||||
return world.rayTraceBlocks(headVec, endVec, true);
|
||||
}
|
||||
@@ -1430,7 +1430,7 @@ public final class MekanismUtils
|
||||
|
||||
EntityPlayerMP player = (EntityPlayerMP)p;
|
||||
|
||||
return general.opsBypassRestrictions && player.mcServer.getPlayerList().canSendCommands(player.getGameProfile());
|
||||
return general.opsBypassRestrictions && player.server.getPlayerList().canSendCommands(player.getGameProfile());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -63,7 +63,7 @@ public final class MultipartUtils
|
||||
d3 = ((EntityPlayerMP)player).interactionManager.getBlockReachDistance();
|
||||
}
|
||||
|
||||
Vec3d end = start.addVector(f5 * d3, f4 * d3, f6 * d3);
|
||||
Vec3d end = start.add(f5 * d3, f4 * d3, f6 * d3);
|
||||
return Pair.of(start, end);
|
||||
}
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ public final class PipeUtils
|
||||
remaining--;
|
||||
}
|
||||
|
||||
EnumFacing dir = EnumFacing.getFront(Arrays.asList(possibleAcceptors).indexOf(acceptor)).getOpposite();
|
||||
EnumFacing dir = EnumFacing.byIndex(Arrays.asList(possibleAcceptors).indexOf(acceptor)).getOpposite();
|
||||
toSend -= acceptor.fill(copy(stack, currentSending), true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -252,7 +252,7 @@ public final class StackUtils
|
||||
return -1;
|
||||
}
|
||||
|
||||
String name = stack.getItemDamage() == OreDictionary.WILDCARD_VALUE ? stack.getItem().getUnlocalizedName() : stack.getItem().getUnlocalizedName(stack);
|
||||
String name = stack.getItemDamage() == OreDictionary.WILDCARD_VALUE ? stack.getItem().getTranslationKey() : stack.getItem().getTranslationKey(stack);
|
||||
return name.hashCode() << 8 | stack.getItemDamage();
|
||||
}
|
||||
}
|
||||
@@ -35,6 +35,6 @@ public class GeneratorsBlocks
|
||||
|
||||
public static Block init(Block block, String name)
|
||||
{
|
||||
return block.setUnlocalizedName(name).setRegistryName("mekanismgenerators:" + name);
|
||||
return block.setTranslationKey(name).setRegistryName("mekanismgenerators:" + name);
|
||||
}
|
||||
}
|
||||
@@ -34,6 +34,6 @@ public class GeneratorsItems
|
||||
|
||||
public static Item init(Item item, String name)
|
||||
{
|
||||
return item.setUnlocalizedName(name).setRegistryName("mekanismgenerators:" + name);
|
||||
return item.setTranslationKey(name).setRegistryName("mekanismgenerators:" + name);
|
||||
}
|
||||
}
|
||||
@@ -201,7 +201,7 @@ public abstract class BlockGenerator extends BlockContainer
|
||||
}
|
||||
|
||||
tileEntity.setFacing((short)change);
|
||||
tileEntity.redstone = world.isBlockIndirectlyGettingPowered(pos) > 0;
|
||||
tileEntity.redstone = world.getRedstonePowerFromNeighbors(pos) > 0;
|
||||
|
||||
if(tileEntity instanceof IBoundingBlock)
|
||||
{
|
||||
@@ -548,7 +548,7 @@ public abstract class BlockGenerator extends BlockContainer
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public BlockRenderLayer getBlockLayer()
|
||||
public BlockRenderLayer getRenderLayer()
|
||||
{
|
||||
return BlockRenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ public abstract class BlockReactor extends Block implements ITileEntityProvider
|
||||
|
||||
if(!stack.isEmpty())
|
||||
{
|
||||
if(MekanismUtils.isBCWrench(stack.getItem()) && !stack.getUnlocalizedName().contains("omniwrench"))
|
||||
if(MekanismUtils.isBCWrench(stack.getItem()) && !stack.getTranslationKey().contains("omniwrench"))
|
||||
{
|
||||
if(entityplayer.isSneaking())
|
||||
{
|
||||
@@ -197,7 +197,7 @@ public abstract class BlockReactor extends Block implements ITileEntityProvider
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockRenderLayer getBlockLayer()
|
||||
public BlockRenderLayer getRenderLayer()
|
||||
{
|
||||
return this == GeneratorsBlocks.Reactor ? BlockRenderLayer.CUTOUT : BlockRenderLayer.TRANSLUCENT;
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ public class ItemBlockGenerator extends ItemBlock implements IEnergizedItem, ISp
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemstack)
|
||||
public String getTranslationKey(ItemStack itemstack)
|
||||
{
|
||||
GeneratorType generatorType = GeneratorType.get(itemstack);
|
||||
if(generatorType == null)
|
||||
@@ -116,7 +116,7 @@ public class ItemBlockGenerator extends ItemBlock implements IEnergizedItem, ISp
|
||||
return "KillMe!";
|
||||
}
|
||||
|
||||
return getUnlocalizedName() + "." + generatorType.blockName;
|
||||
return getTranslationKey() + "." + generatorType.blockName;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -34,9 +34,9 @@ public class ItemBlockReactor extends ItemBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemstack)
|
||||
public String getTranslationKey(ItemStack itemstack)
|
||||
{
|
||||
return getUnlocalizedName() + "." + ReactorBlockType.get(itemstack).name;
|
||||
return getTranslationKey() + "." + ReactorBlockType.get(itemstack).name;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-1
@@ -373,7 +373,7 @@ public class TileEntityReactorController extends TileEntityReactorBlock implemen
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Vec3d getSoundPosition()
|
||||
{
|
||||
return new Vec3d(getPos()).addVector(0.5, 0.5, 0.5);
|
||||
return new Vec3d(getPos()).add(0.5, 0.5, 0.5);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -294,6 +294,6 @@ public class ToolsItems
|
||||
|
||||
public static Item init(Item item, String name)
|
||||
{
|
||||
return item.setUnlocalizedName(name).setRegistryName("mekanismtools:" + name);
|
||||
return item.setTranslationKey(name).setRegistryName("mekanismtools:" + name);
|
||||
}
|
||||
}
|
||||
@@ -42,7 +42,7 @@ public class ItemMekanismHoe extends ItemMekanism
|
||||
setMaxStackSize(1);
|
||||
setMaxDamage(enumtoolmaterial.getMaxUses());
|
||||
setCreativeTab(CreativeTabs.TOOLS);
|
||||
speed = enumtoolmaterial.getDamageVsEntity() + 1.0F;
|
||||
speed = enumtoolmaterial.getAttackDamage() + 1.0F;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -16,9 +16,9 @@ public class ItemMekanismPaxel extends ItemMekanismTool
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getStrVsBlock(ItemStack stack, IBlockState blockState)
|
||||
public float getDestroySpeed(ItemStack stack, IBlockState blockState)
|
||||
{
|
||||
return blockState.getBlock() != Blocks.BEDROCK ? efficiencyOnProperMaterial : 1.0F;
|
||||
return blockState.getBlock() != Blocks.BEDROCK ? efficiency : 1.0F;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -68,14 +68,14 @@ public class ItemMekanismPickaxe extends ItemMekanismTool
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getStrVsBlock(ItemStack itemstack, IBlockState blockState)
|
||||
public float getDestroySpeed(ItemStack itemstack, IBlockState blockState)
|
||||
{
|
||||
if(blockState != null && blockState.getBlock() != null && (blockState.getMaterial() == Material.IRON || blockState.getMaterial() == Material.ANVIL || blockState.getMaterial() == Material.ROCK))
|
||||
{
|
||||
return efficiencyOnProperMaterial;
|
||||
return efficiency;
|
||||
}
|
||||
else {
|
||||
return super.getStrVsBlock(itemstack, blockState);
|
||||
return super.getDestroySpeed(itemstack, blockState);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user