mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-26 23:03:01 +00:00
<1500 errors
This commit is contained in:
1 parent
1f33df57fa
commit
c6a09b5658
433 files changed
+2967
-1474
No files matched your search
@@ -1,6 +1,7 @@
|
||||
package mekanism.api;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.math.ChunkPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
|
||||
@@ -62,7 +63,7 @@ public class Chunk3D
|
||||
*/
|
||||
public boolean exists(World world)
|
||||
{
|
||||
return world.getChunkProvider().chunkExists(xCoord, zCoord);
|
||||
return world.getChunkProvider().getLoadedChunk(xCoord, zCoord) != null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -79,9 +80,9 @@ public class Chunk3D
|
||||
* Returns this Chunk3D in the Minecraft-based ChunkCoordIntPair format.
|
||||
* @return this Chunk3D as a ChunkCoordIntPair
|
||||
*/
|
||||
public ChunkCoordIntPair toPair()
|
||||
public ChunkPos getPos()
|
||||
{
|
||||
return new ChunkCoordIntPair(xCoord, zCoord);
|
||||
return new ChunkPos(xCoord, zCoord);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -15,6 +15,7 @@ import net.minecraft.util.EnumFacing;
|
||||
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.minecraft.world.chunk.Chunk;
|
||||
@@ -59,7 +60,7 @@ public class Coord4D
|
||||
yCoord = (int)entity.posY;
|
||||
zCoord = (int)entity.posZ;
|
||||
|
||||
dimensionId = entity.worldObj.provider.getDimensionId();
|
||||
dimensionId = entity.worldObj.provider.getDimension();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -80,10 +81,10 @@ public class Coord4D
|
||||
|
||||
public Coord4D(BlockPos pos, World world)
|
||||
{
|
||||
this(pos.getX(), pos.getY(), pos.getZ(), world.provider.getDimensionId());
|
||||
this(pos.getX(), pos.getY(), pos.getZ(), world.provider.getDimension());
|
||||
}
|
||||
|
||||
public Coord4D(MovingObjectPosition mop, World world)
|
||||
public Coord4D(RayTraceResult mop, World world)
|
||||
{
|
||||
this(mop.getBlockPos(), world);
|
||||
}
|
||||
@@ -230,7 +231,7 @@ public class Coord4D
|
||||
{
|
||||
IBlockState state = getBlockState(world);
|
||||
|
||||
if(state == null || state == Blocks.air)
|
||||
if(state == null || state == Blocks.AIR)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@@ -350,7 +351,7 @@ public class Coord4D
|
||||
*/
|
||||
public boolean exists(World world)
|
||||
{
|
||||
return world.getChunkProvider() == null || world.getChunkProvider().chunkExists(xCoord >> 4, zCoord >> 4);
|
||||
return world.getChunkProvider() == null || world.getChunkProvider().getLoadedChunk(xCoord >> 4, zCoord >> 4) != null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -398,7 +399,7 @@ public class Coord4D
|
||||
*/
|
||||
public AxisAlignedBB getBoundingBox()
|
||||
{
|
||||
return AxisAlignedBB.fromBounds(xCoord, yCoord, zCoord, xCoord+1, yCoord+1, zCoord+1);
|
||||
return new AxisAlignedBB(xCoord, yCoord, zCoord, xCoord+1, yCoord+1, zCoord+1);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,6 +2,8 @@ package mekanism.api;
|
||||
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
|
||||
import com.sun.imageio.plugins.common.I18N;
|
||||
|
||||
/**
|
||||
* Simple color enum for adding colors to in-game GUI strings of text.
|
||||
* @author AidanBrady
|
||||
@@ -58,12 +60,12 @@ public enum EnumColor implements IStringSerializable
|
||||
*/
|
||||
public String getLocalizedName()
|
||||
{
|
||||
return StatCollector.translateToLocal("color." + unlocalizedName);
|
||||
return I18N.getString("color." + unlocalizedName);
|
||||
}
|
||||
|
||||
public String getDyeName()
|
||||
{
|
||||
return StatCollector.translateToLocal("dye." + unlocalizedName);
|
||||
return I18N.getString("dye." + unlocalizedName);
|
||||
}
|
||||
|
||||
public String getOreDictName()
|
||||
|
||||
@@ -53,7 +53,7 @@ public class Range4D
|
||||
|
||||
public static Range4D getChunkRange(EntityPlayer player)
|
||||
{
|
||||
int radius = FMLCommonHandler.instance().getMinecraftServerInstance().getConfigurationManager().getViewDistance();
|
||||
int radius = FMLCommonHandler.instance().getMinecraftServerInstance().getPlayerList().getViewDistance();
|
||||
|
||||
return new Range4D(new Chunk3D(player)).expandChunks(radius);
|
||||
}
|
||||
|
||||
@@ -9,6 +9,8 @@ import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
|
||||
import com.sun.imageio.plugins.common.I18N;
|
||||
|
||||
/**
|
||||
* Gas - a class used to set specific properties of gasses when used or seen in-game.
|
||||
* @author aidancbrady
|
||||
@@ -96,7 +98,7 @@ public class Gas
|
||||
*/
|
||||
public String getLocalizedName()
|
||||
{
|
||||
return StatCollector.translateToLocal(getUnlocalizedName());
|
||||
return I18N.getString(getUnlocalizedName());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package mekanism.api.gas;
|
||||
|
||||
import com.sun.imageio.plugins.common.I18N;
|
||||
|
||||
|
||||
public class OreGas extends Gas
|
||||
{
|
||||
@@ -32,6 +34,6 @@ public class OreGas extends Gas
|
||||
|
||||
public String getOreName()
|
||||
{
|
||||
return StatCollector.translateToLocal(oreName);
|
||||
return I18N.getString(oreName);
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,8 @@ package mekanism.api.infuse;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import com.sun.imageio.plugins.common.I18N;
|
||||
|
||||
/**
|
||||
* The types of infuse currently available in Mekanism.
|
||||
* @author AidanBrady
|
||||
@@ -42,6 +44,6 @@ public final class InfuseType
|
||||
|
||||
public String getLocalizedName()
|
||||
{
|
||||
return StatCollector.translateToLocal(unlocalizedName);
|
||||
return I18N.getString(unlocalizedName);
|
||||
}
|
||||
}
|
||||
@@ -267,7 +267,7 @@ public abstract class DynamicNetwork<A, N extends DynamicNetwork<A, N>> implemen
|
||||
if(coord.xCoord > maxZ) maxZ = coord.zCoord;
|
||||
}
|
||||
|
||||
return new Range4D(minX, minY, minZ, maxX, maxY, maxZ, initTransmitter.world().provider.getDimensionId());
|
||||
return new Range4D(minX, minY, minZ, maxX, maxY, maxZ, initTransmitter.world().provider.getDimension());
|
||||
}
|
||||
|
||||
public void register()
|
||||
|
||||
@@ -3,6 +3,8 @@ package mekanism.api.transmitters;
|
||||
import mekanism.api.gas.IGasTransmitter;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
import com.sun.imageio.plugins.common.I18N;
|
||||
|
||||
public enum TransmissionType
|
||||
{
|
||||
ENERGY("EnergyNetwork", "Energy"),
|
||||
@@ -32,7 +34,7 @@ public enum TransmissionType
|
||||
|
||||
public String localize()
|
||||
{
|
||||
return StatCollector.translateToLocal("transmission." + getTransmission());
|
||||
return I18N.getString("transmission." + getTransmission());
|
||||
}
|
||||
|
||||
public static boolean checkTransmissionType(ITransmitter sideTile, TransmissionType type)
|
||||
|
||||
Reference in new issue
Block a user