diff --git a/src/api/java/buildcraft/api/APIHelper.java b/src/api/java/buildcraft/api/APIHelper.java index dd47dcc7c..777c9fccf 100644 --- a/src/api/java/buildcraft/api/APIHelper.java +++ b/src/api/java/buildcraft/api/APIHelper.java @@ -2,11 +2,11 @@ package buildcraft.api; import java.util.Arrays; -import org.apache.commons.lang3.StringUtils; - import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.common.LoaderState; +import org.apache.commons.lang3.StringUtils; + import buildcraft.api.core.BCLog; public class APIHelper { diff --git a/src/api/java/buildcraft/api/ITripleRegistry.java b/src/api/java/buildcraft/api/ITripleRegistry.java index ea29b613c..8b7f1ee92 100644 --- a/src/api/java/buildcraft/api/ITripleRegistry.java +++ b/src/api/java/buildcraft/api/ITripleRegistry.java @@ -2,10 +2,10 @@ package buildcraft.api; import java.util.Set; -import org.apache.commons.lang3.tuple.Triple; - import net.minecraft.item.Item; +import org.apache.commons.lang3.tuple.Triple; + public interface ITripleRegistry extends ISimpleRegistry { /** @return An unmodifiable set containing all the current mappings of the registry */ Set> getDefinitions(); diff --git a/src/api/java/buildcraft/api/blocks/package-info.java b/src/api/java/buildcraft/api/blocks/package-info.java index c3bc6eac1..f6dd0ee7c 100644 --- a/src/api/java/buildcraft/api/blocks/package-info.java +++ b/src/api/java/buildcraft/api/blocks/package-info.java @@ -6,3 +6,4 @@ package buildcraft.api.blocks; import net.minecraftforge.fml.common.API; + diff --git a/src/api/java/buildcraft/api/blueprints/IBuilderContext.java b/src/api/java/buildcraft/api/blueprints/IBuilderContext.java index aa93d4bf9..3a57573f6 100644 --- a/src/api/java/buildcraft/api/blueprints/IBuilderContext.java +++ b/src/api/java/buildcraft/api/blueprints/IBuilderContext.java @@ -6,7 +6,6 @@ package buildcraft.api.blueprints; import net.minecraft.util.Vec3; import net.minecraft.world.World; - import buildcraft.api.core.IBox; /** This interface provide contextual information when building or initializing blueprint slots. */ diff --git a/src/api/java/buildcraft/api/blueprints/MappingRegistry.java b/src/api/java/buildcraft/api/blueprints/MappingRegistry.java index 1f6b6d861..04fcf3ee3 100755 --- a/src/api/java/buildcraft/api/blueprints/MappingRegistry.java +++ b/src/api/java/buildcraft/api/blueprints/MappingRegistry.java @@ -10,11 +10,6 @@ import java.util.Comparator; import java.util.HashMap; import java.util.Map.Entry; -import com.google.common.collect.ArrayListMultimap; -import com.google.common.collect.ListMultimap; - -import org.apache.logging.log4j.Level; - import net.minecraft.block.Block; import net.minecraft.crash.CrashReportCategory; import net.minecraft.entity.Entity; @@ -24,7 +19,6 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.nbt.NBTTagShort; import net.minecraft.util.ResourceLocation; - import net.minecraftforge.common.util.Constants; import net.minecraftforge.fml.common.FMLModContainer; import net.minecraftforge.fml.common.Loader; @@ -32,8 +26,13 @@ import net.minecraftforge.fml.common.ModContainer; import net.minecraftforge.fml.common.event.FMLMissingMappingsEvent; import net.minecraftforge.fml.common.registry.GameRegistry; +import org.apache.logging.log4j.Level; + import buildcraft.api.core.BCLog; +import com.google.common.collect.ArrayListMultimap; +import com.google.common.collect.ListMultimap; + public class MappingRegistry { public HashMap blockToId = new HashMap(); diff --git a/src/api/java/buildcraft/api/blueprints/Schematic.java b/src/api/java/buildcraft/api/blueprints/Schematic.java index a43358801..dc3ce350a 100755 --- a/src/api/java/buildcraft/api/blueprints/Schematic.java +++ b/src/api/java/buildcraft/api/blueprints/Schematic.java @@ -10,7 +10,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.BlockPos; import net.minecraft.util.Vec3; - import buildcraft.api.core.IInvSlot; /** A schematic is a piece of a blueprint. It allows to stock blocks or entities to blueprints, and can have a state diff --git a/src/api/java/buildcraft/api/blueprints/SchematicBlock.java b/src/api/java/buildcraft/api/blueprints/SchematicBlock.java index ccb907b52..6f6fdaee1 100755 --- a/src/api/java/buildcraft/api/blueprints/SchematicBlock.java +++ b/src/api/java/buildcraft/api/blueprints/SchematicBlock.java @@ -4,9 +4,12 @@ * should be located as "LICENSE.API" in the BuildCraft source code distribution. */ package buildcraft.api.blueprints; -import java.util.*; - -import com.google.gson.GsonBuilder; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Set; import net.minecraft.block.Block; import net.minecraft.block.BlockFalling; @@ -19,10 +22,8 @@ import net.minecraft.nbt.NBTTagList; import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumFacing.Axis; - import net.minecraftforge.common.util.Constants; import net.minecraftforge.fluids.BlockFluidBase; - import buildcraft.api.core.BCLog; public class SchematicBlock extends SchematicBlockBase { diff --git a/src/api/java/buildcraft/api/blueprints/SchematicEntity.java b/src/api/java/buildcraft/api/blueprints/SchematicEntity.java index 2057bd6d5..68d465923 100755 --- a/src/api/java/buildcraft/api/blueprints/SchematicEntity.java +++ b/src/api/java/buildcraft/api/blueprints/SchematicEntity.java @@ -17,7 +17,6 @@ import net.minecraft.nbt.NBTTagDouble; import net.minecraft.nbt.NBTTagFloat; import net.minecraft.nbt.NBTTagList; import net.minecraft.util.Vec3; - import net.minecraftforge.common.util.Constants; public class SchematicEntity extends Schematic { diff --git a/src/api/java/buildcraft/api/blueprints/SchematicFluid.java b/src/api/java/buildcraft/api/blueprints/SchematicFluid.java index 798f01728..f3912aabb 100644 --- a/src/api/java/buildcraft/api/blueprints/SchematicFluid.java +++ b/src/api/java/buildcraft/api/blueprints/SchematicFluid.java @@ -10,7 +10,6 @@ import java.util.List; import net.minecraft.block.BlockLiquid; import net.minecraft.item.ItemStack; import net.minecraft.util.BlockPos; - import net.minecraftforge.fluids.FluidStack; public class SchematicFluid extends SchematicBlock { diff --git a/src/api/java/buildcraft/api/blueprints/SchematicMask.java b/src/api/java/buildcraft/api/blueprints/SchematicMask.java index c2953e286..fa5f43a7b 100755 --- a/src/api/java/buildcraft/api/blueprints/SchematicMask.java +++ b/src/api/java/buildcraft/api/blueprints/SchematicMask.java @@ -14,7 +14,6 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraft.world.WorldServer; - import buildcraft.api.core.BuildCraftAPI; public class SchematicMask extends SchematicBlockBase { diff --git a/src/api/java/buildcraft/api/blueprints/SchematicTile.java b/src/api/java/buildcraft/api/blueprints/SchematicTile.java index f70fd19ce..5c47547fe 100755 --- a/src/api/java/buildcraft/api/blueprints/SchematicTile.java +++ b/src/api/java/buildcraft/api/blueprints/SchematicTile.java @@ -12,7 +12,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; - import buildcraft.api.core.JavaTools; public class SchematicTile extends SchematicBlock { diff --git a/src/api/java/buildcraft/api/blueprints/package-info.java b/src/api/java/buildcraft/api/blueprints/package-info.java index 3b3632424..07f2f046a 100644 --- a/src/api/java/buildcraft/api/blueprints/package-info.java +++ b/src/api/java/buildcraft/api/blueprints/package-info.java @@ -6,3 +6,4 @@ package buildcraft.api.blueprints; import net.minecraftforge.fml.common.API; + diff --git a/src/api/java/buildcraft/api/boards/RedstoneBoardRobotNBT.java b/src/api/java/buildcraft/api/boards/RedstoneBoardRobotNBT.java index 4a4161b19..72ebd4466 100755 --- a/src/api/java/buildcraft/api/boards/RedstoneBoardRobotNBT.java +++ b/src/api/java/buildcraft/api/boards/RedstoneBoardRobotNBT.java @@ -6,7 +6,6 @@ package buildcraft.api.boards; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.ResourceLocation; - import buildcraft.api.robots.EntityRobotBase; public abstract class RedstoneBoardRobotNBT extends RedstoneBoardNBT { diff --git a/src/api/java/buildcraft/api/boards/package-info.java b/src/api/java/buildcraft/api/boards/package-info.java index 6253f5b79..4b250a286 100644 --- a/src/api/java/buildcraft/api/boards/package-info.java +++ b/src/api/java/buildcraft/api/boards/package-info.java @@ -6,3 +6,4 @@ package buildcraft.api.boards; import net.minecraftforge.fml.common.API; + diff --git a/src/api/java/buildcraft/api/core/BuildCraftAPI.java b/src/api/java/buildcraft/api/core/BuildCraftAPI.java index 6e43e6d8c..b96784aff 100644 --- a/src/api/java/buildcraft/api/core/BuildCraftAPI.java +++ b/src/api/java/buildcraft/api/core/BuildCraftAPI.java @@ -8,13 +8,13 @@ import java.lang.reflect.Method; import java.util.HashMap; import java.util.Set; -import com.google.common.collect.Maps; -import com.google.common.collect.Sets; - import net.minecraft.block.Block; import net.minecraft.util.BlockPos; import net.minecraft.world.World; +import com.google.common.collect.Maps; +import com.google.common.collect.Sets; + public final class BuildCraftAPI { public static ICoreProxy proxy; diff --git a/src/api/java/buildcraft/api/core/ConfigAccessor.java b/src/api/java/buildcraft/api/core/ConfigAccessor.java index a66346ac5..64d95f917 100644 --- a/src/api/java/buildcraft/api/core/ConfigAccessor.java +++ b/src/api/java/buildcraft/api/core/ConfigAccessor.java @@ -2,10 +2,10 @@ package buildcraft.api.core; import java.util.Map; -import com.google.common.collect.Maps; - import net.minecraftforge.common.config.Property; +import com.google.common.collect.Maps; + /** Use this to access the various config options. It is recommended that you use this as opposed to the variables in * the mod, as users may only install the modules that they want, and not the one you may have refereed to. */ @Deprecated diff --git a/src/api/java/buildcraft/api/core/EnumColor.java b/src/api/java/buildcraft/api/core/EnumColor.java index 852eea1ba..155996f45 100644 --- a/src/api/java/buildcraft/api/core/EnumColor.java +++ b/src/api/java/buildcraft/api/core/EnumColor.java @@ -11,7 +11,6 @@ import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.util.IStringSerializable; import net.minecraft.util.ResourceLocation; import net.minecraft.util.StatCollector; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; diff --git a/src/api/java/buildcraft/api/core/EnumPipePart.java b/src/api/java/buildcraft/api/core/EnumPipePart.java index f3ea8d6fb..de48191f5 100644 --- a/src/api/java/buildcraft/api/core/EnumPipePart.java +++ b/src/api/java/buildcraft/api/core/EnumPipePart.java @@ -1,17 +1,17 @@ package buildcraft.api.core; +import io.netty.buffer.ByteBuf; + import java.util.Locale; import java.util.Map; -import com.google.common.collect.Maps; - import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTBase.NBTPrimitive; import net.minecraft.nbt.NBTTagString; import net.minecraft.util.EnumFacing; import net.minecraft.util.IStringSerializable; -import io.netty.buffer.ByteBuf; +import com.google.common.collect.Maps; public enum EnumPipePart implements IStringSerializable,INetworkLoadable_BC8 { DOWN(EnumFacing.DOWN), diff --git a/src/api/java/buildcraft/api/core/Identifier.java b/src/api/java/buildcraft/api/core/Identifier.java index 891b4b724..45dab1ad7 100644 --- a/src/api/java/buildcraft/api/core/Identifier.java +++ b/src/api/java/buildcraft/api/core/Identifier.java @@ -11,7 +11,6 @@ import net.minecraft.server.MinecraftServer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; import net.minecraft.world.World; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; diff --git a/src/api/java/buildcraft/api/core/package-info.java b/src/api/java/buildcraft/api/core/package-info.java index 0d8264ada..57a6ababf 100644 --- a/src/api/java/buildcraft/api/core/package-info.java +++ b/src/api/java/buildcraft/api/core/package-info.java @@ -6,3 +6,4 @@ package buildcraft.api.core; import net.minecraftforge.fml.common.API; + diff --git a/src/api/java/buildcraft/api/crops/package-info.java b/src/api/java/buildcraft/api/crops/package-info.java index 803ce050a..3961a8800 100644 --- a/src/api/java/buildcraft/api/crops/package-info.java +++ b/src/api/java/buildcraft/api/crops/package-info.java @@ -6,3 +6,4 @@ package buildcraft.api.crops; import net.minecraftforge.fml.common.API; + diff --git a/src/api/java/buildcraft/api/enums/EnumBlueprintType.java b/src/api/java/buildcraft/api/enums/EnumBlueprintType.java index 8d6217797..31ee2dba5 100644 --- a/src/api/java/buildcraft/api/enums/EnumBlueprintType.java +++ b/src/api/java/buildcraft/api/enums/EnumBlueprintType.java @@ -1,7 +1,6 @@ package buildcraft.api.enums; import net.minecraft.item.ItemStack; - import buildcraft.api.items.IBlueprintItem; public enum EnumBlueprintType { diff --git a/src/api/java/buildcraft/api/enums/EnumEnergyStage.java b/src/api/java/buildcraft/api/enums/EnumEnergyStage.java index dd809fea8..c25616782 100644 --- a/src/api/java/buildcraft/api/enums/EnumEnergyStage.java +++ b/src/api/java/buildcraft/api/enums/EnumEnergyStage.java @@ -1,9 +1,9 @@ package buildcraft.api.enums; -import org.apache.commons.lang3.StringUtils; - import net.minecraft.util.IStringSerializable; +import org.apache.commons.lang3.StringUtils; + public enum EnumEnergyStage implements IStringSerializable { BLUE, GREEN, diff --git a/src/api/java/buildcraft/api/enums/EnumLaserTableType.java b/src/api/java/buildcraft/api/enums/EnumLaserTableType.java index cc8b41e7d..82569e1e3 100644 --- a/src/api/java/buildcraft/api/enums/EnumLaserTableType.java +++ b/src/api/java/buildcraft/api/enums/EnumLaserTableType.java @@ -2,7 +2,6 @@ package buildcraft.api.enums; import net.minecraft.block.state.IBlockState; import net.minecraft.util.IStringSerializable; - import buildcraft.api.properties.BuildCraftProperties; public enum EnumLaserTableType implements IStringSerializable { diff --git a/src/api/java/buildcraft/api/enums/EnumMachineState.java b/src/api/java/buildcraft/api/enums/EnumMachineState.java index 6a215c235..48bfa4075 100644 --- a/src/api/java/buildcraft/api/enums/EnumMachineState.java +++ b/src/api/java/buildcraft/api/enums/EnumMachineState.java @@ -2,7 +2,6 @@ package buildcraft.api.enums; import net.minecraft.block.state.IBlockState; import net.minecraft.util.IStringSerializable; - import buildcraft.api.properties.BuildCraftProperties; public enum EnumMachineState implements IStringSerializable { diff --git a/src/api/java/buildcraft/api/enums/EnumSpring.java b/src/api/java/buildcraft/api/enums/EnumSpring.java index b4825fb5b..8f2e4d0bc 100644 --- a/src/api/java/buildcraft/api/enums/EnumSpring.java +++ b/src/api/java/buildcraft/api/enums/EnumSpring.java @@ -3,7 +3,6 @@ package buildcraft.api.enums; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.util.IStringSerializable; - import buildcraft.api.properties.BuildCraftProperties; public enum EnumSpring implements IStringSerializable { diff --git a/src/api/java/buildcraft/api/enums/package-info.java b/src/api/java/buildcraft/api/enums/package-info.java index 8c585be95..d42334751 100644 --- a/src/api/java/buildcraft/api/enums/package-info.java +++ b/src/api/java/buildcraft/api/enums/package-info.java @@ -6,3 +6,4 @@ package buildcraft.api.enums; import net.minecraftforge.fml.common.API; + diff --git a/src/api/java/buildcraft/api/events/RobotEvent.java b/src/api/java/buildcraft/api/events/RobotEvent.java index 9b12b64d2..d70137733 100644 --- a/src/api/java/buildcraft/api/events/RobotEvent.java +++ b/src/api/java/buildcraft/api/events/RobotEvent.java @@ -6,10 +6,8 @@ package buildcraft.api.events; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; - import net.minecraftforge.fml.common.eventhandler.Cancelable; import net.minecraftforge.fml.common.eventhandler.Event; - import buildcraft.api.robots.EntityRobotBase; public abstract class RobotEvent extends Event { diff --git a/src/api/java/buildcraft/api/events/package-info.java b/src/api/java/buildcraft/api/events/package-info.java index 06cd25fea..3bdb55140 100644 --- a/src/api/java/buildcraft/api/events/package-info.java +++ b/src/api/java/buildcraft/api/events/package-info.java @@ -6,3 +6,4 @@ package buildcraft.api.events; import net.minecraftforge.fml.common.API; + diff --git a/src/api/java/buildcraft/api/facades/package-info.java b/src/api/java/buildcraft/api/facades/package-info.java index 2c79167b3..5393f3e57 100644 --- a/src/api/java/buildcraft/api/facades/package-info.java +++ b/src/api/java/buildcraft/api/facades/package-info.java @@ -6,3 +6,4 @@ package buildcraft.api.facades; import net.minecraftforge.fml.common.API; + diff --git a/src/api/java/buildcraft/api/filler/package-info.java b/src/api/java/buildcraft/api/filler/package-info.java index 3e9d907de..6449026b6 100644 --- a/src/api/java/buildcraft/api/filler/package-info.java +++ b/src/api/java/buildcraft/api/filler/package-info.java @@ -6,3 +6,4 @@ package buildcraft.api.filler; import net.minecraftforge.fml.common.API; + diff --git a/src/api/java/buildcraft/api/fuels/ICoolantManager.java b/src/api/java/buildcraft/api/fuels/ICoolantManager.java index 849bf1acf..54aff0367 100644 --- a/src/api/java/buildcraft/api/fuels/ICoolantManager.java +++ b/src/api/java/buildcraft/api/fuels/ICoolantManager.java @@ -7,7 +7,6 @@ package buildcraft.api.fuels; import java.util.Collection; import net.minecraftforge.fluids.Fluid; - import buildcraft.api.core.StackKey; public interface ICoolantManager { diff --git a/src/api/java/buildcraft/api/fuels/package-info.java b/src/api/java/buildcraft/api/fuels/package-info.java index 93d524dbf..4089f42c1 100644 --- a/src/api/java/buildcraft/api/fuels/package-info.java +++ b/src/api/java/buildcraft/api/fuels/package-info.java @@ -6,3 +6,4 @@ package buildcraft.api.fuels; import net.minecraftforge.fml.common.API; + diff --git a/src/api/java/buildcraft/api/gates/GateExpansionController.java b/src/api/java/buildcraft/api/gates/GateExpansionController.java index 749de86f7..c443aee0b 100644 --- a/src/api/java/buildcraft/api/gates/GateExpansionController.java +++ b/src/api/java/buildcraft/api/gates/GateExpansionController.java @@ -8,7 +8,6 @@ import java.util.List; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; - import buildcraft.api.statements.IActionInternal; import buildcraft.api.statements.IStatement; import buildcraft.api.statements.IStatementParameter; diff --git a/src/api/java/buildcraft/api/gates/GateExpansions.java b/src/api/java/buildcraft/api/gates/GateExpansions.java index b1e600371..006d1bc9b 100644 --- a/src/api/java/buildcraft/api/gates/GateExpansions.java +++ b/src/api/java/buildcraft/api/gates/GateExpansions.java @@ -10,10 +10,10 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; -import com.google.common.collect.HashBiMap; - import net.minecraft.item.ItemStack; +import com.google.common.collect.HashBiMap; + public final class GateExpansions { private static final Map expansions = new HashMap(); private static final ArrayList expansionIDs = new ArrayList(); diff --git a/src/api/java/buildcraft/api/gates/IGateExpansion.java b/src/api/java/buildcraft/api/gates/IGateExpansion.java index f197c0ca7..d58f0e9ee 100644 --- a/src/api/java/buildcraft/api/gates/IGateExpansion.java +++ b/src/api/java/buildcraft/api/gates/IGateExpansion.java @@ -10,7 +10,6 @@ import net.minecraft.client.renderer.block.model.BakedQuad; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.client.renderer.vertex.VertexFormat; import net.minecraft.tileentity.TileEntity; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; diff --git a/src/api/java/buildcraft/api/gates/package-info.java b/src/api/java/buildcraft/api/gates/package-info.java index b86ad48bd..e58f15f69 100644 --- a/src/api/java/buildcraft/api/gates/package-info.java +++ b/src/api/java/buildcraft/api/gates/package-info.java @@ -6,3 +6,4 @@ package buildcraft.api.gates; import net.minecraftforge.fml.common.API; + diff --git a/src/api/java/buildcraft/api/items/IBlueprintItem.java b/src/api/java/buildcraft/api/items/IBlueprintItem.java index d67bc39fd..fe72af7d0 100644 --- a/src/api/java/buildcraft/api/items/IBlueprintItem.java +++ b/src/api/java/buildcraft/api/items/IBlueprintItem.java @@ -1,7 +1,6 @@ package buildcraft.api.items; import net.minecraft.item.ItemStack; - import buildcraft.api.enums.EnumBlueprintType; public interface IBlueprintItem extends INamedItem { diff --git a/src/api/java/buildcraft/api/items/IMapLocation.java b/src/api/java/buildcraft/api/items/IMapLocation.java index 60b87af6f..545e07dd4 100644 --- a/src/api/java/buildcraft/api/items/IMapLocation.java +++ b/src/api/java/buildcraft/api/items/IMapLocation.java @@ -5,7 +5,6 @@ import java.util.List; import net.minecraft.item.ItemStack; import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; - import buildcraft.api.core.IBox; import buildcraft.api.core.IZone; diff --git a/src/api/java/buildcraft/api/items/package-info.java b/src/api/java/buildcraft/api/items/package-info.java index f6d2835d6..0a8a9b6e0 100644 --- a/src/api/java/buildcraft/api/items/package-info.java +++ b/src/api/java/buildcraft/api/items/package-info.java @@ -6,3 +6,4 @@ package buildcraft.api.items; import net.minecraftforge.fml.common.API; + diff --git a/src/api/java/buildcraft/api/library/package-info.java b/src/api/java/buildcraft/api/library/package-info.java index e41a0dc0f..a12f6d708 100644 --- a/src/api/java/buildcraft/api/library/package-info.java +++ b/src/api/java/buildcraft/api/library/package-info.java @@ -6,3 +6,4 @@ package buildcraft.api.library; import net.minecraftforge.fml.common.API; + diff --git a/src/api/java/buildcraft/api/lists/ListMatchHandler.java b/src/api/java/buildcraft/api/lists/ListMatchHandler.java index adc332891..d18710c04 100644 --- a/src/api/java/buildcraft/api/lists/ListMatchHandler.java +++ b/src/api/java/buildcraft/api/lists/ListMatchHandler.java @@ -1,6 +1,7 @@ package buildcraft.api.lists; import java.util.List; + import net.minecraft.item.ItemStack; public abstract class ListMatchHandler { diff --git a/src/api/java/buildcraft/api/lists/package-info.java b/src/api/java/buildcraft/api/lists/package-info.java index 603c33587..9cca05170 100644 --- a/src/api/java/buildcraft/api/lists/package-info.java +++ b/src/api/java/buildcraft/api/lists/package-info.java @@ -6,3 +6,4 @@ package buildcraft.api.lists; import net.minecraftforge.fml.common.API; + diff --git a/src/api/java/buildcraft/api/package-info.java b/src/api/java/buildcraft/api/package-info.java index 640f52a7d..3e2a2335d 100644 --- a/src/api/java/buildcraft/api/package-info.java +++ b/src/api/java/buildcraft/api/package-info.java @@ -6,3 +6,4 @@ package buildcraft.api; import net.minecraftforge.fml.common.API; + diff --git a/src/api/java/buildcraft/api/power/ILaserTarget.java b/src/api/java/buildcraft/api/power/ILaserTarget.java index 0b3909935..95627970a 100644 --- a/src/api/java/buildcraft/api/power/ILaserTarget.java +++ b/src/api/java/buildcraft/api/power/ILaserTarget.java @@ -4,7 +4,6 @@ * should be located as "LICENSE.API" in the BuildCraft source code distribution. */ package buildcraft.api.power; -import net.minecraft.util.BlockPos; /** This interface should be defined by any Tile which wants to receive energy from BuildCraft lasers. * diff --git a/src/api/java/buildcraft/api/power/IRedstoneEngineReceiver.java b/src/api/java/buildcraft/api/power/IRedstoneEngineReceiver.java index 213d06fe2..ccbb2f7bb 100644 --- a/src/api/java/buildcraft/api/power/IRedstoneEngineReceiver.java +++ b/src/api/java/buildcraft/api/power/IRedstoneEngineReceiver.java @@ -5,7 +5,6 @@ package buildcraft.api.power; import net.minecraft.util.EnumFacing; - import cofh.api.energy.IEnergyReceiver; /** Implement this on tiles that you wish to be able to receive Redstone Engine (low-power) energy. diff --git a/src/api/java/buildcraft/api/power/package-info.java b/src/api/java/buildcraft/api/power/package-info.java index c20c3ee4c..0c4fe99d9 100644 --- a/src/api/java/buildcraft/api/power/package-info.java +++ b/src/api/java/buildcraft/api/power/package-info.java @@ -6,3 +6,4 @@ package buildcraft.api.power; import net.minecraftforge.fml.common.API; + diff --git a/src/api/java/buildcraft/api/properties/BuildCraftExtendedProperty.java b/src/api/java/buildcraft/api/properties/BuildCraftExtendedProperty.java index c1998b193..21a7ec85e 100644 --- a/src/api/java/buildcraft/api/properties/BuildCraftExtendedProperty.java +++ b/src/api/java/buildcraft/api/properties/BuildCraftExtendedProperty.java @@ -2,12 +2,12 @@ package buildcraft.api.properties; import java.util.List; -import com.google.common.base.Predicate; -import com.google.common.base.Predicates; - import net.minecraftforge.common.property.IExtendedBlockState; import net.minecraftforge.common.property.IUnlistedProperty; +import com.google.common.base.Predicate; +import com.google.common.base.Predicates; + public class BuildCraftExtendedProperty> extends BuildCraftProperty implements IUnlistedProperty { private final Predicate function; diff --git a/src/api/java/buildcraft/api/properties/BuildCraftProperties.java b/src/api/java/buildcraft/api/properties/BuildCraftProperties.java index 747dd470a..9851da271 100644 --- a/src/api/java/buildcraft/api/properties/BuildCraftProperties.java +++ b/src/api/java/buildcraft/api/properties/BuildCraftProperties.java @@ -2,12 +2,18 @@ package buildcraft.api.properties; import java.util.Map; -import com.google.common.collect.Maps; - import net.minecraft.util.EnumFacing; - import buildcraft.api.core.EnumColor; -import buildcraft.api.enums.*; +import buildcraft.api.enums.EnumBlueprintType; +import buildcraft.api.enums.EnumDecoratedBlock; +import buildcraft.api.enums.EnumEnergyStage; +import buildcraft.api.enums.EnumEngineType; +import buildcraft.api.enums.EnumFillerPattern; +import buildcraft.api.enums.EnumLaserTableType; +import buildcraft.api.enums.EnumMachineState; +import buildcraft.api.enums.EnumSpring; + +import com.google.common.collect.Maps; public final class BuildCraftProperties { public static final BuildCraftProperty BLOCK_FACING = BuildCraftProperty.create("facing", EnumFacing.Plane.HORIZONTAL.facings()); diff --git a/src/api/java/buildcraft/api/recipes/package-info.java b/src/api/java/buildcraft/api/recipes/package-info.java index f8cc9942a..b15cbf465 100644 --- a/src/api/java/buildcraft/api/recipes/package-info.java +++ b/src/api/java/buildcraft/api/recipes/package-info.java @@ -6,3 +6,4 @@ package buildcraft.api.recipes; import net.minecraftforge.fml.common.API; + diff --git a/src/api/java/buildcraft/api/robots/DockingStation.java b/src/api/java/buildcraft/api/robots/DockingStation.java index 8417a86e5..3e5d2904c 100755 --- a/src/api/java/buildcraft/api/robots/DockingStation.java +++ b/src/api/java/buildcraft/api/robots/DockingStation.java @@ -9,9 +9,7 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraft.world.World; - import net.minecraftforge.fluids.IFluidHandler; - import buildcraft.api.core.BCLog; import buildcraft.api.core.EnumPipePart; import buildcraft.api.statements.StatementSlot; diff --git a/src/api/java/buildcraft/api/robots/EntityRobotBase.java b/src/api/java/buildcraft/api/robots/EntityRobotBase.java index a86842256..8f9b64b74 100755 --- a/src/api/java/buildcraft/api/robots/EntityRobotBase.java +++ b/src/api/java/buildcraft/api/robots/EntityRobotBase.java @@ -11,13 +11,10 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; import net.minecraft.world.World; - import net.minecraftforge.fluids.IFluidHandler; - -import cofh.api.energy.IEnergyStorage; - import buildcraft.api.boards.RedstoneBoardRobot; import buildcraft.api.core.IZone; +import cofh.api.energy.IEnergyStorage; public abstract class EntityRobotBase extends EntityLiving implements IInventory, IFluidHandler { diff --git a/src/api/java/buildcraft/api/robots/ResourceIdBlock.java b/src/api/java/buildcraft/api/robots/ResourceIdBlock.java index 29159a912..3e9363afa 100755 --- a/src/api/java/buildcraft/api/robots/ResourceIdBlock.java +++ b/src/api/java/buildcraft/api/robots/ResourceIdBlock.java @@ -4,12 +4,12 @@ * of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.api.robots; -import org.apache.commons.lang3.builder.HashCodeBuilder; - import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; +import org.apache.commons.lang3.builder.HashCodeBuilder; + import buildcraft.api.core.EnumPipePart; public class ResourceIdBlock extends ResourceId { diff --git a/src/api/java/buildcraft/api/robots/ResourceIdRequest.java b/src/api/java/buildcraft/api/robots/ResourceIdRequest.java index ab37ad2c6..e23e218f1 100755 --- a/src/api/java/buildcraft/api/robots/ResourceIdRequest.java +++ b/src/api/java/buildcraft/api/robots/ResourceIdRequest.java @@ -4,10 +4,10 @@ * of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */ package buildcraft.api.robots; -import org.apache.commons.lang3.builder.HashCodeBuilder; - import net.minecraft.nbt.NBTTagCompound; +import org.apache.commons.lang3.builder.HashCodeBuilder; + import buildcraft.api.core.EnumPipePart; public class ResourceIdRequest extends ResourceIdBlock { diff --git a/src/api/java/buildcraft/api/robots/package-info.java b/src/api/java/buildcraft/api/robots/package-info.java index 4fd622b34..6bb10c952 100644 --- a/src/api/java/buildcraft/api/robots/package-info.java +++ b/src/api/java/buildcraft/api/robots/package-info.java @@ -6,3 +6,4 @@ package buildcraft.api.robots; import net.minecraftforge.fml.common.API; + diff --git a/src/api/java/buildcraft/api/statements/StatementManager.java b/src/api/java/buildcraft/api/statements/StatementManager.java index 04e559c47..34872e5b0 100644 --- a/src/api/java/buildcraft/api/statements/StatementManager.java +++ b/src/api/java/buildcraft/api/statements/StatementManager.java @@ -12,7 +12,6 @@ import java.util.Map; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; - import buildcraft.api.core.BCLog; public final class StatementManager { diff --git a/src/api/java/buildcraft/api/statements/containers/ISidedStatementContainer.java b/src/api/java/buildcraft/api/statements/containers/ISidedStatementContainer.java index b65ace45a..4c3de34f5 100644 --- a/src/api/java/buildcraft/api/statements/containers/ISidedStatementContainer.java +++ b/src/api/java/buildcraft/api/statements/containers/ISidedStatementContainer.java @@ -1,7 +1,6 @@ package buildcraft.api.statements.containers; import net.minecraft.util.EnumFacing; - import buildcraft.api.statements.IStatementContainer; /** Created by asie on 3/14/15. */ diff --git a/src/api/java/buildcraft/api/statements/package-info.java b/src/api/java/buildcraft/api/statements/package-info.java index 7dd2c74e6..4a6139b3d 100644 --- a/src/api/java/buildcraft/api/statements/package-info.java +++ b/src/api/java/buildcraft/api/statements/package-info.java @@ -6,3 +6,4 @@ package buildcraft.api.statements; import net.minecraftforge.fml.common.API; + diff --git a/src/api/java/buildcraft/api/tablet/package-info.java b/src/api/java/buildcraft/api/tablet/package-info.java index cc87d8657..0f16c278b 100644 --- a/src/api/java/buildcraft/api/tablet/package-info.java +++ b/src/api/java/buildcraft/api/tablet/package-info.java @@ -6,3 +6,4 @@ package buildcraft.api.tablet; import net.minecraftforge.fml.common.API; + diff --git a/src/api/java/buildcraft/api/tiles/ITileAreaProvider.java b/src/api/java/buildcraft/api/tiles/ITileAreaProvider.java index 8b5ee48a9..521b4e7ea 100644 --- a/src/api/java/buildcraft/api/tiles/ITileAreaProvider.java +++ b/src/api/java/buildcraft/api/tiles/ITileAreaProvider.java @@ -1,7 +1,6 @@ package buildcraft.api.tiles; import net.minecraft.util.BlockPos; - import buildcraft.api.core.IAreaProvider; /** Used for more fine-grained control of whether or not a machine connects to the provider here. */ diff --git a/src/api/java/buildcraft/api/tiles/package-info.java b/src/api/java/buildcraft/api/tiles/package-info.java index d4c217fc3..54d026b2d 100644 --- a/src/api/java/buildcraft/api/tiles/package-info.java +++ b/src/api/java/buildcraft/api/tiles/package-info.java @@ -6,3 +6,4 @@ package buildcraft.api.tiles; import net.minecraftforge.fml.common.API; + diff --git a/src/api/java/buildcraft/api/tools/package-info.java b/src/api/java/buildcraft/api/tools/package-info.java index 873fba1b0..bb6df1f41 100644 --- a/src/api/java/buildcraft/api/tools/package-info.java +++ b/src/api/java/buildcraft/api/tools/package-info.java @@ -6,3 +6,4 @@ package buildcraft.api.tools; import net.minecraftforge.fml.common.API; + diff --git a/src/api/java/buildcraft/api/transport/IPipe.java b/src/api/java/buildcraft/api/transport/IPipe.java index 96a7a764c..563b53cc5 100755 --- a/src/api/java/buildcraft/api/transport/IPipe.java +++ b/src/api/java/buildcraft/api/transport/IPipe.java @@ -5,7 +5,6 @@ package buildcraft.api.transport; import net.minecraft.util.EnumFacing; - import buildcraft.api.gates.IGate; public interface IPipe { diff --git a/src/api/java/buildcraft/api/transport/IPipeTile.java b/src/api/java/buildcraft/api/transport/IPipeTile.java index 5ed528422..a74e22ef5 100644 --- a/src/api/java/buildcraft/api/transport/IPipeTile.java +++ b/src/api/java/buildcraft/api/transport/IPipeTile.java @@ -8,7 +8,6 @@ import net.minecraft.block.Block; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; import net.minecraft.world.World; - import buildcraft.api.transport.pluggable.PipePluggable; public interface IPipeTile extends IInjectable { diff --git a/src/api/java/buildcraft/api/transport/PipeConnectionAPI.java b/src/api/java/buildcraft/api/transport/PipeConnectionAPI.java index e79da2646..ce44514c1 100644 --- a/src/api/java/buildcraft/api/transport/PipeConnectionAPI.java +++ b/src/api/java/buildcraft/api/transport/PipeConnectionAPI.java @@ -2,14 +2,14 @@ package buildcraft.api.transport; import java.util.Map; -import com.google.common.collect.Maps; - import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraft.world.World; +import com.google.common.collect.Maps; + /** Use this class to register blocks with custom block sizes so that pipes can connect to them properly. Note that you * do not need to register a custom pipe connection if your block implements ICustomPipeConnection. The registered * version does not override your own implementation. */ diff --git a/src/api/java/buildcraft/api/transport/PipeManager.java b/src/api/java/buildcraft/api/transport/PipeManager.java index 0fd0f8aad..8a1e3b5aa 100755 --- a/src/api/java/buildcraft/api/transport/PipeManager.java +++ b/src/api/java/buildcraft/api/transport/PipeManager.java @@ -13,7 +13,6 @@ import java.util.Map; import net.minecraft.util.BlockPos; import net.minecraft.world.World; - import buildcraft.api.transport.pluggable.PipePluggable; public abstract class PipeManager { diff --git a/src/api/java/buildcraft/api/transport/package-info.java b/src/api/java/buildcraft/api/transport/package-info.java index 7ab0064d3..e0c225e57 100644 --- a/src/api/java/buildcraft/api/transport/package-info.java +++ b/src/api/java/buildcraft/api/transport/package-info.java @@ -6,3 +6,4 @@ package buildcraft.api.transport; import net.minecraftforge.fml.common.API; + diff --git a/src/api/java/buildcraft/api/transport/pipe_bc8/IConnection_BC8.java b/src/api/java/buildcraft/api/transport/pipe_bc8/IConnection_BC8.java index a18140f6b..a2e124e2a 100644 --- a/src/api/java/buildcraft/api/transport/pipe_bc8/IConnection_BC8.java +++ b/src/api/java/buildcraft/api/transport/pipe_bc8/IConnection_BC8.java @@ -2,7 +2,6 @@ package buildcraft.api.transport.pipe_bc8; import net.minecraft.entity.Entity; import net.minecraft.tileentity.TileEntity; - import buildcraft.api.transport.pipe_bc8.IExtractionManager.IExtractable_BC8; import buildcraft.api.transport.pipe_bc8.IInsertionManager.IInsertable_BC8; diff --git a/src/api/java/buildcraft/api/transport/pipe_bc8/IExtractionManager.java b/src/api/java/buildcraft/api/transport/pipe_bc8/IExtractionManager.java index 0983d7d16..5b63c8d60 100644 --- a/src/api/java/buildcraft/api/transport/pipe_bc8/IExtractionManager.java +++ b/src/api/java/buildcraft/api/transport/pipe_bc8/IExtractionManager.java @@ -1,7 +1,6 @@ package buildcraft.api.transport.pipe_bc8; import net.minecraft.util.EnumFacing; - import buildcraft.api.core.IFluidFilter; import buildcraft.api.core.IStackFilter; import buildcraft.api.transport.pipe_bc8.IInsertionManager.IInsertableFactory; diff --git a/src/api/java/buildcraft/api/transport/pipe_bc8/IInsertionManager.java b/src/api/java/buildcraft/api/transport/pipe_bc8/IInsertionManager.java index fff014268..4443683a5 100644 --- a/src/api/java/buildcraft/api/transport/pipe_bc8/IInsertionManager.java +++ b/src/api/java/buildcraft/api/transport/pipe_bc8/IInsertionManager.java @@ -1,7 +1,6 @@ package buildcraft.api.transport.pipe_bc8; import net.minecraft.util.EnumFacing; - import buildcraft.api.core.IFluidFilter; import buildcraft.api.core.IStackFilter; import buildcraft.api.transport.pipe_bc8.IPipeContentsEditable.IPipeContentsEditableFluid; diff --git a/src/api/java/buildcraft/api/transport/pipe_bc8/IPipeContents.java b/src/api/java/buildcraft/api/transport/pipe_bc8/IPipeContents.java index 23e16eeb2..9457c9adf 100644 --- a/src/api/java/buildcraft/api/transport/pipe_bc8/IPipeContents.java +++ b/src/api/java/buildcraft/api/transport/pipe_bc8/IPipeContents.java @@ -3,7 +3,6 @@ package buildcraft.api.transport.pipe_bc8; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumFacing; - import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; diff --git a/src/api/java/buildcraft/api/transport/pipe_bc8/IPipeContentsEditable.java b/src/api/java/buildcraft/api/transport/pipe_bc8/IPipeContentsEditable.java index 789772f12..8f9f21b68 100644 --- a/src/api/java/buildcraft/api/transport/pipe_bc8/IPipeContentsEditable.java +++ b/src/api/java/buildcraft/api/transport/pipe_bc8/IPipeContentsEditable.java @@ -1,18 +1,15 @@ package buildcraft.api.transport.pipe_bc8; +import io.netty.buffer.ByteBuf; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumFacing; - import net.minecraftforge.fluids.Fluid; - import buildcraft.api.core.INBTLoadable_BC8; import buildcraft.api.core.INetworkLoadable_BC8; import buildcraft.api.transport.pipe_bc8.IPipePropertyProvider.IPipePropertyProviderEditable; -import io.netty.buffer.ByteBuf; - /** Provides a way to change the contents of a pipe. */ public interface IPipeContentsEditable extends IPipeContents, INetworkLoadable_BC8, INBTLoadable_BC8 { IPipeContents asReadOnly(); diff --git a/src/api/java/buildcraft/api/transport/pipe_bc8/IPipeHelper.java b/src/api/java/buildcraft/api/transport/pipe_bc8/IPipeHelper.java index 1d39da2b1..ef07c485c 100644 --- a/src/api/java/buildcraft/api/transport/pipe_bc8/IPipeHelper.java +++ b/src/api/java/buildcraft/api/transport/pipe_bc8/IPipeHelper.java @@ -1,9 +1,7 @@ package buildcraft.api.transport.pipe_bc8; import net.minecraft.item.ItemStack; - import net.minecraftforge.fluids.FluidStack; - import buildcraft.api.transport.pipe_bc8.IPipeContentsEditable.IPipeContentsEditableFluid; import buildcraft.api.transport.pipe_bc8.IPipeContentsEditable.IPipeContentsEditableItem; diff --git a/src/api/java/buildcraft/api/transport/pipe_bc8/IPipePropertyProvider.java b/src/api/java/buildcraft/api/transport/pipe_bc8/IPipePropertyProvider.java index 5581d82ff..4b4e998a9 100644 --- a/src/api/java/buildcraft/api/transport/pipe_bc8/IPipePropertyProvider.java +++ b/src/api/java/buildcraft/api/transport/pipe_bc8/IPipePropertyProvider.java @@ -3,7 +3,6 @@ package buildcraft.api.transport.pipe_bc8; import java.util.Set; import net.minecraft.nbt.NBTBase; - import buildcraft.api.core.INBTLoadable_BC8; import buildcraft.api.core.INetworkLoadable_BC8; diff --git a/src/api/java/buildcraft/api/transport/pipe_bc8/IPipeRegistry.java b/src/api/java/buildcraft/api/transport/pipe_bc8/IPipeRegistry.java index ca0ec628b..9a401b621 100644 --- a/src/api/java/buildcraft/api/transport/pipe_bc8/IPipeRegistry.java +++ b/src/api/java/buildcraft/api/transport/pipe_bc8/IPipeRegistry.java @@ -1,7 +1,6 @@ package buildcraft.api.transport.pipe_bc8; import net.minecraft.item.Item; - import buildcraft.api.ITripleRegistry; public interface IPipeRegistry extends ITripleRegistry { diff --git a/src/api/java/buildcraft/api/transport/pipe_bc8/IPipe_BC8.java b/src/api/java/buildcraft/api/transport/pipe_bc8/IPipe_BC8.java index b327a1d21..5bc716319 100644 --- a/src/api/java/buildcraft/api/transport/pipe_bc8/IPipe_BC8.java +++ b/src/api/java/buildcraft/api/transport/pipe_bc8/IPipe_BC8.java @@ -4,7 +4,6 @@ import java.util.Map; import net.minecraft.util.EnumFacing; import net.minecraft.world.World; - import buildcraft.api.core.INBTLoadable_BC8; import buildcraft.api.transport.pipe_bc8.event_bc8.IPipeEvent_BC8; diff --git a/src/api/java/buildcraft/api/transport/pipe_bc8/PipeAPI_BC8.java b/src/api/java/buildcraft/api/transport/pipe_bc8/PipeAPI_BC8.java index 80030d459..cd141c4b3 100644 --- a/src/api/java/buildcraft/api/transport/pipe_bc8/PipeAPI_BC8.java +++ b/src/api/java/buildcraft/api/transport/pipe_bc8/PipeAPI_BC8.java @@ -1,7 +1,6 @@ package buildcraft.api.transport.pipe_bc8; import net.minecraft.item.EnumDyeColor; - import buildcraft.api.APIHelper; import buildcraft.api.transport.pipe_bc8.IExtractionManager.IExtractable_BC8; import buildcraft.api.transport.pipe_bc8.IInsertionManager.IInsertable_BC8; diff --git a/src/api/java/buildcraft/api/transport/pipe_bc8/PipeBehaviour_BC8.java b/src/api/java/buildcraft/api/transport/pipe_bc8/PipeBehaviour_BC8.java index 41daf25fb..e17039a14 100644 --- a/src/api/java/buildcraft/api/transport/pipe_bc8/PipeBehaviour_BC8.java +++ b/src/api/java/buildcraft/api/transport/pipe_bc8/PipeBehaviour_BC8.java @@ -1,10 +1,9 @@ package buildcraft.api.transport.pipe_bc8; +import io.netty.buffer.ByteBuf; import net.minecraft.nbt.NBTBase; import net.minecraft.util.EnumFacing; -import io.netty.buffer.ByteBuf; - /** An instance is created by instance of IBehaviourFactory per pipe block in world, and is registered with the pipe * event bus to listen and respond to events. */ public abstract class PipeBehaviour_BC8 implements IPipeListener { diff --git a/src/api/java/buildcraft/api/transport/pipe_bc8/PipeConnectionAPI.java b/src/api/java/buildcraft/api/transport/pipe_bc8/PipeConnectionAPI.java index 370f9cf1f..6605adc83 100644 --- a/src/api/java/buildcraft/api/transport/pipe_bc8/PipeConnectionAPI.java +++ b/src/api/java/buildcraft/api/transport/pipe_bc8/PipeConnectionAPI.java @@ -2,16 +2,15 @@ package buildcraft.api.transport.pipe_bc8; import java.util.Map; -import com.google.common.collect.Maps; - import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraft.world.World; - import buildcraft.api.transport.ICustomPipeConnection; +import com.google.common.collect.Maps; + /** Use this class to register blocks with custom block sizes so that pipes can connect to them properly. Note that you * do not need to register a custom pipe connection if your block implements ICustomPipeConnection. The registered * version also overrides your own implementation. */ diff --git a/src/api/java/buildcraft/api/transport/pipe_bc8/PipeDefinition_BC8.java b/src/api/java/buildcraft/api/transport/pipe_bc8/PipeDefinition_BC8.java index 909cf8c5a..b79a6a3af 100644 --- a/src/api/java/buildcraft/api/transport/pipe_bc8/PipeDefinition_BC8.java +++ b/src/api/java/buildcraft/api/transport/pipe_bc8/PipeDefinition_BC8.java @@ -6,10 +6,8 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.util.ResourceLocation; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; - import buildcraft.api.ObjectDefinition; import buildcraft.api.core.BCLog; diff --git a/src/api/java/buildcraft/api/transport/pipe_bc8/event_bc8/IPipeEventConnection_BC8.java b/src/api/java/buildcraft/api/transport/pipe_bc8/event_bc8/IPipeEventConnection_BC8.java index f03e246a8..ca95bb5c8 100644 --- a/src/api/java/buildcraft/api/transport/pipe_bc8/event_bc8/IPipeEventConnection_BC8.java +++ b/src/api/java/buildcraft/api/transport/pipe_bc8/event_bc8/IPipeEventConnection_BC8.java @@ -3,7 +3,6 @@ package buildcraft.api.transport.pipe_bc8.event_bc8; import net.minecraft.entity.Entity; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; - import buildcraft.api.transport.IPipeConnection; import buildcraft.api.transport.pipe_bc8.IConnection_BC8; import buildcraft.api.transport.pipe_bc8.IPipe_BC8; diff --git a/src/api/java/buildcraft/api/transport/pipe_bc8/event_bc8/IPipeEventContents_BC8.java b/src/api/java/buildcraft/api/transport/pipe_bc8/event_bc8/IPipeEventContents_BC8.java index 5b0c1f894..9e6711637 100644 --- a/src/api/java/buildcraft/api/transport/pipe_bc8/event_bc8/IPipeEventContents_BC8.java +++ b/src/api/java/buildcraft/api/transport/pipe_bc8/event_bc8/IPipeEventContents_BC8.java @@ -3,7 +3,6 @@ package buildcraft.api.transport.pipe_bc8.event_bc8; import net.minecraft.entity.Entity; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; - import buildcraft.api.transport.pipe_bc8.IPipeContents; import buildcraft.api.transport.pipe_bc8.IPipeContentsEditable; import buildcraft.api.transport.pipe_bc8.IPipe_BC8; diff --git a/src/api/java/buildcraft/api/transport/pipe_bc8/event_bc8/IPipeEventInteract_BC8.java b/src/api/java/buildcraft/api/transport/pipe_bc8/event_bc8/IPipeEventInteract_BC8.java index 5f73794dd..a2405ea55 100644 --- a/src/api/java/buildcraft/api/transport/pipe_bc8/event_bc8/IPipeEventInteract_BC8.java +++ b/src/api/java/buildcraft/api/transport/pipe_bc8/event_bc8/IPipeEventInteract_BC8.java @@ -3,7 +3,6 @@ package buildcraft.api.transport.pipe_bc8.event_bc8; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.AxisAlignedBB; - import buildcraft.api.tools.IToolWrench; import buildcraft.api.transport.pipe_bc8.IPipeListener; diff --git a/src/api/java/buildcraft/api/transport/pluggable/IPipePluggableDynamicRenderer.java b/src/api/java/buildcraft/api/transport/pluggable/IPipePluggableDynamicRenderer.java index 2601a356d..5d1332f9b 100644 --- a/src/api/java/buildcraft/api/transport/pluggable/IPipePluggableDynamicRenderer.java +++ b/src/api/java/buildcraft/api/transport/pluggable/IPipePluggableDynamicRenderer.java @@ -1,7 +1,6 @@ package buildcraft.api.transport.pluggable; import net.minecraft.util.EnumFacing; - import buildcraft.api.transport.IPipe; public interface IPipePluggableDynamicRenderer { diff --git a/src/api/java/buildcraft/api/transport/pluggable/IPipePluggableItem.java b/src/api/java/buildcraft/api/transport/pluggable/IPipePluggableItem.java index b9295e5f0..1a2d7bbee 100644 --- a/src/api/java/buildcraft/api/transport/pluggable/IPipePluggableItem.java +++ b/src/api/java/buildcraft/api/transport/pluggable/IPipePluggableItem.java @@ -2,7 +2,6 @@ package buildcraft.api.transport.pluggable; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumFacing; - import buildcraft.api.transport.IPipe; public interface IPipePluggableItem { diff --git a/src/api/java/buildcraft/api/transport/pluggable/IPipePluggableStaticRenderer.java b/src/api/java/buildcraft/api/transport/pluggable/IPipePluggableStaticRenderer.java index e4bfc3f60..fd55e2f1c 100644 --- a/src/api/java/buildcraft/api/transport/pluggable/IPipePluggableStaticRenderer.java +++ b/src/api/java/buildcraft/api/transport/pluggable/IPipePluggableStaticRenderer.java @@ -4,7 +4,6 @@ import java.util.List; import net.minecraft.client.renderer.block.model.BakedQuad; import net.minecraft.util.EnumFacing; - import buildcraft.api.transport.IPipe; public interface IPipePluggableStaticRenderer { diff --git a/src/api/java/buildcraft/api/transport/pluggable/PipePluggable.java b/src/api/java/buildcraft/api/transport/pluggable/PipePluggable.java index 02a0bd3ab..3aaa96f92 100755 --- a/src/api/java/buildcraft/api/transport/pluggable/PipePluggable.java +++ b/src/api/java/buildcraft/api/transport/pluggable/PipePluggable.java @@ -9,7 +9,6 @@ import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.EnumFacing; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; - import buildcraft.api.core.INBTStoreable; import buildcraft.api.core.ISerializable; import buildcraft.api.transport.IPipeTile; diff --git a/src/api/java/dan200/computercraft/api/ComputerCraftAPI.java b/src/api/java/dan200/computercraft/api/ComputerCraftAPI.java index b2612351d..95312efbd 100644 --- a/src/api/java/dan200/computercraft/api/ComputerCraftAPI.java +++ b/src/api/java/dan200/computercraft/api/ComputerCraftAPI.java @@ -6,6 +6,11 @@ package dan200.computercraft.api; +import java.lang.reflect.Method; + +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; +import net.minecraft.world.World; import dan200.computercraft.api.filesystem.IMount; import dan200.computercraft.api.filesystem.IWritableMount; import dan200.computercraft.api.media.IMediaProvider; @@ -13,11 +18,6 @@ import dan200.computercraft.api.peripheral.IPeripheralProvider; import dan200.computercraft.api.permissions.ITurtlePermissionProvider; import dan200.computercraft.api.redstone.IBundledRedstoneProvider; import dan200.computercraft.api.turtle.ITurtleUpgrade; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; - -import java.lang.reflect.Method; /** * The static entry point to the ComputerCraft API. diff --git a/src/api/java/dan200/computercraft/api/filesystem/IMount.java b/src/api/java/dan200/computercraft/api/filesystem/IMount.java index 1538edbed..f0b32300e 100644 --- a/src/api/java/dan200/computercraft/api/filesystem/IMount.java +++ b/src/api/java/dan200/computercraft/api/filesystem/IMount.java @@ -10,6 +10,8 @@ import java.io.IOException; import java.io.InputStream; import java.util.List; +import net.minecraft.world.World; + /** * Represents a read only part of a virtual filesystem that can be mounted onto a computercraft using IComputerAccess.mount(). * Ready made implementations of this interface can be created using ComputerCraftAPI.createSaveDirMount() or ComputerCraftAPI.createResourceMount(), or you're free to implement it yourselves! diff --git a/src/api/java/dan200/computercraft/api/filesystem/IWritableMount.java b/src/api/java/dan200/computercraft/api/filesystem/IWritableMount.java index f8053d070..37b2f6411 100644 --- a/src/api/java/dan200/computercraft/api/filesystem/IWritableMount.java +++ b/src/api/java/dan200/computercraft/api/filesystem/IWritableMount.java @@ -9,6 +9,8 @@ package dan200.computercraft.api.filesystem; import java.io.IOException; import java.io.OutputStream; +import net.minecraft.world.World; + /** * Represents a part of a virtual filesystem that can be mounted onto a computercraft using IComputerAccess.mount() or IComputerAccess.mountWritable(), that can also be written to. * Ready made implementations of this interface can be created using ComputerCraftAPI.createSaveDirMount(), or you're free to implement it yourselves! diff --git a/src/api/java/dan200/computercraft/api/filesystem/package-info.java b/src/api/java/dan200/computercraft/api/filesystem/package-info.java index 0f4e29c05..5848dd642 100644 --- a/src/api/java/dan200/computercraft/api/filesystem/package-info.java +++ b/src/api/java/dan200/computercraft/api/filesystem/package-info.java @@ -7,4 +7,4 @@ @API( owner="ComputerCraft", provides="ComputerCraft|API|FileSystem", apiVersion="1.78" ) package dan200.computercraft.api.filesystem; -import net.minecraftforge.fml.common.API; \ No newline at end of file +import net.minecraftforge.fml.common.API; diff --git a/src/api/java/dan200/computercraft/api/lua/package-info.java b/src/api/java/dan200/computercraft/api/lua/package-info.java index 76494d864..1d11269f8 100644 --- a/src/api/java/dan200/computercraft/api/lua/package-info.java +++ b/src/api/java/dan200/computercraft/api/lua/package-info.java @@ -8,3 +8,4 @@ package dan200.computercraft.api.lua; import net.minecraftforge.fml.common.API; + diff --git a/src/api/java/dan200/computercraft/api/media/IMedia.java b/src/api/java/dan200/computercraft/api/media/IMedia.java index 75c6b6433..eb4e6ef6d 100644 --- a/src/api/java/dan200/computercraft/api/media/IMedia.java +++ b/src/api/java/dan200/computercraft/api/media/IMedia.java @@ -6,9 +6,9 @@ package dan200.computercraft.api.media; -import dan200.computercraft.api.filesystem.IMount; import net.minecraft.item.ItemStack; import net.minecraft.world.World; +import dan200.computercraft.api.filesystem.IMount; /** * Represents an item that can be placed in a disk drive and used by a Computer. diff --git a/src/api/java/dan200/computercraft/api/media/package-info.java b/src/api/java/dan200/computercraft/api/media/package-info.java index 19c8454a2..6ec23997f 100644 --- a/src/api/java/dan200/computercraft/api/media/package-info.java +++ b/src/api/java/dan200/computercraft/api/media/package-info.java @@ -8,3 +8,4 @@ package dan200.computercraft.api.media; import net.minecraftforge.fml.common.API; + diff --git a/src/api/java/dan200/computercraft/api/package-info.java b/src/api/java/dan200/computercraft/api/package-info.java index 1dee80957..c868c7163 100644 --- a/src/api/java/dan200/computercraft/api/package-info.java +++ b/src/api/java/dan200/computercraft/api/package-info.java @@ -7,4 +7,4 @@ @API( owner="ComputerCraft", provides="ComputerCraft|API", apiVersion="1.78" ) package dan200.computercraft.api; -import net.minecraftforge.fml.common.API; \ No newline at end of file +import net.minecraftforge.fml.common.API; diff --git a/src/api/java/dan200/computercraft/api/peripheral/IComputerAccess.java b/src/api/java/dan200/computercraft/api/peripheral/IComputerAccess.java index baca44395..44271076f 100644 --- a/src/api/java/dan200/computercraft/api/peripheral/IComputerAccess.java +++ b/src/api/java/dan200/computercraft/api/peripheral/IComputerAccess.java @@ -6,6 +6,7 @@ package dan200.computercraft.api.peripheral; +import net.minecraft.world.World; import dan200.computercraft.api.filesystem.IMount; import dan200.computercraft.api.filesystem.IWritableMount; diff --git a/src/api/java/dan200/computercraft/api/peripheral/package-info.java b/src/api/java/dan200/computercraft/api/peripheral/package-info.java index 04cd616ee..5180674c3 100644 --- a/src/api/java/dan200/computercraft/api/peripheral/package-info.java +++ b/src/api/java/dan200/computercraft/api/peripheral/package-info.java @@ -8,3 +8,4 @@ package dan200.computercraft.api.peripheral; import net.minecraftforge.fml.common.API; + diff --git a/src/api/java/dan200/computercraft/api/permissions/package-info.java b/src/api/java/dan200/computercraft/api/permissions/package-info.java index 8bd07d828..6e7426430 100644 --- a/src/api/java/dan200/computercraft/api/permissions/package-info.java +++ b/src/api/java/dan200/computercraft/api/permissions/package-info.java @@ -7,4 +7,4 @@ @API( owner="ComputerCraft", provides="ComputerCraft|API|Permissions", apiVersion="1.78" ) package dan200.computercraft.api.permissions; -import net.minecraftforge.fml.common.API; \ No newline at end of file +import net.minecraftforge.fml.common.API; diff --git a/src/api/java/dan200/computercraft/api/redstone/package-info.java b/src/api/java/dan200/computercraft/api/redstone/package-info.java index d864d3db1..92e5f25ce 100644 --- a/src/api/java/dan200/computercraft/api/redstone/package-info.java +++ b/src/api/java/dan200/computercraft/api/redstone/package-info.java @@ -8,3 +8,4 @@ package dan200.computercraft.api.redstone; import net.minecraftforge.fml.common.API; + diff --git a/src/api/java/dan200/computercraft/api/turtle/ITurtleAccess.java b/src/api/java/dan200/computercraft/api/turtle/ITurtleAccess.java index f30032efa..b851d397b 100644 --- a/src/api/java/dan200/computercraft/api/turtle/ITurtleAccess.java +++ b/src/api/java/dan200/computercraft/api/turtle/ITurtleAccess.java @@ -6,15 +6,15 @@ package dan200.computercraft.api.turtle; -import dan200.computercraft.api.lua.ILuaContext; -import dan200.computercraft.api.lua.LuaException; -import dan200.computercraft.api.peripheral.IPeripheral; import net.minecraft.inventory.IInventory; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraft.util.Vec3; import net.minecraft.world.World; +import dan200.computercraft.api.lua.ILuaContext; +import dan200.computercraft.api.lua.LuaException; +import dan200.computercraft.api.peripheral.IPeripheral; /** * The interface passed to turtle by turtles, providing methods that they can call. diff --git a/src/api/java/dan200/computercraft/api/turtle/ITurtleUpgrade.java b/src/api/java/dan200/computercraft/api/turtle/ITurtleUpgrade.java index 5de721541..08e59fb4a 100644 --- a/src/api/java/dan200/computercraft/api/turtle/ITurtleUpgrade.java +++ b/src/api/java/dan200/computercraft/api/turtle/ITurtleUpgrade.java @@ -6,16 +6,18 @@ package dan200.computercraft.api.turtle; -import dan200.computercraft.api.peripheral.IPeripheral; +import javax.vecmath.Matrix4f; + import net.minecraft.client.resources.model.IBakedModel; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumFacing; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; + import org.apache.commons.lang3.tuple.Pair; -import javax.vecmath.Matrix4f; +import dan200.computercraft.api.peripheral.IPeripheral; /** diff --git a/src/api/java/dan200/computercraft/api/turtle/package-info.java b/src/api/java/dan200/computercraft/api/turtle/package-info.java index 590ece68b..741b60882 100644 --- a/src/api/java/dan200/computercraft/api/turtle/package-info.java +++ b/src/api/java/dan200/computercraft/api/turtle/package-info.java @@ -8,3 +8,4 @@ package dan200.computercraft.api.turtle; import net.minecraftforge.fml.common.API; + diff --git a/src/api/java/ic2/api/crops/CropCard.java b/src/api/java/ic2/api/crops/CropCard.java index 952cc4306..6afb26d24 100644 --- a/src/api/java/ic2/api/crops/CropCard.java +++ b/src/api/java/ic2/api/crops/CropCard.java @@ -4,11 +4,8 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; - import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.common.ModContainer; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; /** * Base agriculture crop. diff --git a/src/api/java/ic2/api/crops/Crops.java b/src/api/java/ic2/api/crops/Crops.java index 1fc86e486..27bc26de6 100644 --- a/src/api/java/ic2/api/crops/Crops.java +++ b/src/api/java/ic2/api/crops/Crops.java @@ -4,10 +4,6 @@ import java.util.Collection; import net.minecraft.item.ItemStack; import net.minecraft.world.biome.BiomeGenBase; - -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - import net.minecraftforge.common.BiomeDictionary.Type; /** diff --git a/src/api/java/ic2/api/energy/IEnergyNet.java b/src/api/java/ic2/api/energy/IEnergyNet.java index 6c3bac5a7..321fe566c 100644 --- a/src/api/java/ic2/api/energy/IEnergyNet.java +++ b/src/api/java/ic2/api/energy/IEnergyNet.java @@ -2,9 +2,8 @@ package ic2.api.energy; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; -import net.minecraft.world.World; - import net.minecraft.util.EnumFacing; +import net.minecraft.world.World; /** * Interface representing the methods provided by the global EnergyNet class. diff --git a/src/api/java/ic2/api/energy/event/EnergyTileEvent.java b/src/api/java/ic2/api/energy/event/EnergyTileEvent.java index e4571693b..4de79ceae 100644 --- a/src/api/java/ic2/api/energy/event/EnergyTileEvent.java +++ b/src/api/java/ic2/api/energy/event/EnergyTileEvent.java @@ -1,10 +1,8 @@ package ic2.api.energy.event; -import net.minecraft.tileentity.TileEntity; - -import net.minecraftforge.event.world.WorldEvent; - import ic2.api.energy.tile.IEnergyTile; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.event.world.WorldEvent; /** * Base class for energy net events, don't use it directly. diff --git a/src/api/java/ic2/api/energy/tile/IEnergyEmitter.java b/src/api/java/ic2/api/energy/tile/IEnergyEmitter.java index 17f56678e..d20b73e1c 100644 --- a/src/api/java/ic2/api/energy/tile/IEnergyEmitter.java +++ b/src/api/java/ic2/api/energy/tile/IEnergyEmitter.java @@ -1,7 +1,6 @@ package ic2.api.energy.tile; import net.minecraft.tileentity.TileEntity; - import net.minecraft.util.EnumFacing; /** diff --git a/src/api/java/ic2/api/event/ExplosionEvent.java b/src/api/java/ic2/api/event/ExplosionEvent.java index a2ad98eaf..091c8d9ec 100644 --- a/src/api/java/ic2/api/event/ExplosionEvent.java +++ b/src/api/java/ic2/api/event/ExplosionEvent.java @@ -3,10 +3,8 @@ package ic2.api.event; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.world.World; - -import net.minecraftforge.fml.common.eventhandler.Cancelable; - import net.minecraftforge.event.world.WorldEvent; +import net.minecraftforge.fml.common.eventhandler.Cancelable; @Cancelable public class ExplosionEvent extends WorldEvent { diff --git a/src/api/java/ic2/api/event/LaserEvent.java b/src/api/java/ic2/api/event/LaserEvent.java index 974964123..abbad0ae4 100644 --- a/src/api/java/ic2/api/event/LaserEvent.java +++ b/src/api/java/ic2/api/event/LaserEvent.java @@ -4,10 +4,8 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; import net.minecraft.world.World; - -import net.minecraftforge.fml.common.eventhandler.Cancelable; - import net.minecraftforge.event.world.WorldEvent; +import net.minecraftforge.fml.common.eventhandler.Cancelable; /** * A bunch of Events to handle the power of the Mining Laser. diff --git a/src/api/java/ic2/api/event/PaintEvent.java b/src/api/java/ic2/api/event/PaintEvent.java index caa2aee28..fc01535c8 100644 --- a/src/api/java/ic2/api/event/PaintEvent.java +++ b/src/api/java/ic2/api/event/PaintEvent.java @@ -1,10 +1,8 @@ package ic2.api.event; import net.minecraft.world.World; - -import net.minecraftforge.fml.common.eventhandler.Cancelable; - import net.minecraftforge.event.world.WorldEvent; +import net.minecraftforge.fml.common.eventhandler.Cancelable; @Cancelable public class PaintEvent extends WorldEvent { diff --git a/src/api/java/ic2/api/event/RetextureEvent.java b/src/api/java/ic2/api/event/RetextureEvent.java index cf431496e..9fda0116f 100644 --- a/src/api/java/ic2/api/event/RetextureEvent.java +++ b/src/api/java/ic2/api/event/RetextureEvent.java @@ -2,10 +2,8 @@ package ic2.api.event; import net.minecraft.block.Block; import net.minecraft.world.World; - -import net.minecraftforge.fml.common.eventhandler.Cancelable; - import net.minecraftforge.event.world.WorldEvent; +import net.minecraftforge.fml.common.eventhandler.Cancelable; @Cancelable public class RetextureEvent extends WorldEvent { diff --git a/src/api/java/ic2/api/info/Info.java b/src/api/java/ic2/api/info/Info.java index 7be58fca3..7bc07062e 100644 --- a/src/api/java/ic2/api/info/Info.java +++ b/src/api/java/ic2/api/info/Info.java @@ -1,7 +1,6 @@ package ic2.api.info; import net.minecraft.util.DamageSource; - import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.common.LoaderState; diff --git a/src/api/java/ic2/api/item/ILatheItem.java b/src/api/java/ic2/api/item/ILatheItem.java index 3963c6f7e..c1df3562c 100644 --- a/src/api/java/ic2/api/item/ILatheItem.java +++ b/src/api/java/ic2/api/item/ILatheItem.java @@ -2,7 +2,6 @@ package ic2.api.item; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; diff --git a/src/api/java/ic2/api/recipe/ICannerEnrichRecipeManager.java b/src/api/java/ic2/api/recipe/ICannerEnrichRecipeManager.java index 5eba1b68e..87240e70f 100644 --- a/src/api/java/ic2/api/recipe/ICannerEnrichRecipeManager.java +++ b/src/api/java/ic2/api/recipe/ICannerEnrichRecipeManager.java @@ -3,7 +3,6 @@ package ic2.api.recipe; import java.util.Map; import net.minecraft.item.ItemStack; - import net.minecraftforge.fluids.FluidStack; public interface ICannerEnrichRecipeManager { diff --git a/src/api/java/ic2/api/recipe/RecipeInputFluidContainer.java b/src/api/java/ic2/api/recipe/RecipeInputFluidContainer.java index 103d293e2..ae9d1dccd 100644 --- a/src/api/java/ic2/api/recipe/RecipeInputFluidContainer.java +++ b/src/api/java/ic2/api/recipe/RecipeInputFluidContainer.java @@ -4,7 +4,6 @@ import java.util.ArrayList; import java.util.List; import net.minecraft.item.ItemStack; - import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidContainerRegistry.FluidContainerData; diff --git a/src/api/java/ic2/api/recipe/RecipeInputItemStack.java b/src/api/java/ic2/api/recipe/RecipeInputItemStack.java index 84f86ea12..f00951381 100644 --- a/src/api/java/ic2/api/recipe/RecipeInputItemStack.java +++ b/src/api/java/ic2/api/recipe/RecipeInputItemStack.java @@ -4,7 +4,6 @@ import java.util.Arrays; import java.util.List; import net.minecraft.item.ItemStack; - import net.minecraftforge.oredict.OreDictionary; public class RecipeInputItemStack implements IRecipeInput { diff --git a/src/api/java/ic2/api/recipe/RecipeInputOreDict.java b/src/api/java/ic2/api/recipe/RecipeInputOreDict.java index e6e4695d0..e90676328 100644 --- a/src/api/java/ic2/api/recipe/RecipeInputOreDict.java +++ b/src/api/java/ic2/api/recipe/RecipeInputOreDict.java @@ -6,7 +6,6 @@ import java.util.List; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; - import net.minecraftforge.oredict.OreDictionary; public class RecipeInputOreDict implements IRecipeInput { diff --git a/src/api/java/li/cil/oc/api/API.java b/src/api/java/li/cil/oc/api/API.java index 8a02ae0fb..e23da1570 100644 --- a/src/api/java/li/cil/oc/api/API.java +++ b/src/api/java/li/cil/oc/api/API.java @@ -1,6 +1,5 @@ package li.cil.oc.api; -import com.typesafe.config.Config; import li.cil.oc.api.detail.DriverAPI; import li.cil.oc.api.detail.FileSystemAPI; import li.cil.oc.api.detail.ItemAPI; @@ -9,6 +8,8 @@ import li.cil.oc.api.detail.ManualAPI; import li.cil.oc.api.detail.NanomachinesAPI; import li.cil.oc.api.detail.NetworkAPI; +import com.typesafe.config.Config; + /** * Central reference for the API. *

diff --git a/src/api/java/li/cil/oc/api/Driver.java b/src/api/java/li/cil/oc/api/Driver.java index 9d8d8be21..493cc3e10 100644 --- a/src/api/java/li/cil/oc/api/Driver.java +++ b/src/api/java/li/cil/oc/api/Driver.java @@ -1,5 +1,7 @@ package li.cil.oc.api; +import java.util.Collection; + import li.cil.oc.api.driver.Block; import li.cil.oc.api.driver.Converter; import li.cil.oc.api.driver.EnvironmentHost; @@ -8,8 +10,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.BlockPos; import net.minecraft.world.World; -import java.util.Collection; - /** * This API allows registering new drivers with the mod. *

diff --git a/src/api/java/li/cil/oc/api/IMC.java b/src/api/java/li/cil/oc/api/IMC.java index e1632093b..e4785ed7c 100644 --- a/src/api/java/li/cil/oc/api/IMC.java +++ b/src/api/java/li/cil/oc/api/IMC.java @@ -4,6 +4,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraftforge.fml.common.event.FMLInterModComms; + import org.apache.commons.lang3.tuple.Pair; /** diff --git a/src/api/java/li/cil/oc/api/Items.java b/src/api/java/li/cil/oc/api/Items.java index 81a10bc2f..93e4b2615 100644 --- a/src/api/java/li/cil/oc/api/Items.java +++ b/src/api/java/li/cil/oc/api/Items.java @@ -1,11 +1,11 @@ package li.cil.oc.api; +import java.util.concurrent.Callable; + import li.cil.oc.api.detail.ItemInfo; import net.minecraft.item.EnumDyeColor; import net.minecraft.item.ItemStack; -import java.util.concurrent.Callable; - /** * Access to item definitions for all blocks and items provided by * OpenComputers. diff --git a/src/api/java/li/cil/oc/api/Machine.java b/src/api/java/li/cil/oc/api/Machine.java index 43fb6c572..6af312f43 100644 --- a/src/api/java/li/cil/oc/api/Machine.java +++ b/src/api/java/li/cil/oc/api/Machine.java @@ -1,11 +1,11 @@ package li.cil.oc.api; -import li.cil.oc.api.machine.Architecture; -import li.cil.oc.api.machine.MachineHost; - import java.util.Collection; import java.util.Collections; +import li.cil.oc.api.machine.Architecture; +import li.cil.oc.api.machine.MachineHost; + /** * This API is intended for people who would like to implement custom computer * blocks or anything else hosting a computer. diff --git a/src/api/java/li/cil/oc/api/Nanomachines.java b/src/api/java/li/cil/oc/api/Nanomachines.java index afa239b8d..a0ab61e99 100644 --- a/src/api/java/li/cil/oc/api/Nanomachines.java +++ b/src/api/java/li/cil/oc/api/Nanomachines.java @@ -1,11 +1,11 @@ package li.cil.oc.api; +import java.util.Collections; + import li.cil.oc.api.nanomachines.BehaviorProvider; import li.cil.oc.api.nanomachines.Controller; import net.minecraft.entity.player.EntityPlayer; -import java.util.Collections; - /** * This API allows interfacing with nanomachines. *

diff --git a/src/api/java/li/cil/oc/api/component/package-info.java b/src/api/java/li/cil/oc/api/component/package-info.java index 229794703..831cef78e 100644 --- a/src/api/java/li/cil/oc/api/component/package-info.java +++ b/src/api/java/li/cil/oc/api/component/package-info.java @@ -11,4 +11,4 @@ apiVersion = API.VERSION) package li.cil.oc.api.component; -import li.cil.oc.api.API; \ No newline at end of file +import li.cil.oc.api.API; diff --git a/src/api/java/li/cil/oc/api/detail/DriverAPI.java b/src/api/java/li/cil/oc/api/detail/DriverAPI.java index 44bafd166..b3cc4d530 100644 --- a/src/api/java/li/cil/oc/api/detail/DriverAPI.java +++ b/src/api/java/li/cil/oc/api/detail/DriverAPI.java @@ -1,5 +1,7 @@ package li.cil.oc.api.detail; +import java.util.Collection; + import li.cil.oc.api.driver.Block; import li.cil.oc.api.driver.Converter; import li.cil.oc.api.driver.EnvironmentHost; @@ -8,8 +10,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.BlockPos; import net.minecraft.world.World; -import java.util.Collection; - public interface DriverAPI { /** * Registers a new driver for a block component. diff --git a/src/api/java/li/cil/oc/api/detail/ItemAPI.java b/src/api/java/li/cil/oc/api/detail/ItemAPI.java index 358472c48..089736215 100644 --- a/src/api/java/li/cil/oc/api/detail/ItemAPI.java +++ b/src/api/java/li/cil/oc/api/detail/ItemAPI.java @@ -1,11 +1,11 @@ package li.cil.oc.api.detail; +import java.util.concurrent.Callable; + import li.cil.oc.api.FileSystem; import net.minecraft.item.EnumDyeColor; import net.minecraft.item.ItemStack; -import java.util.concurrent.Callable; - public interface ItemAPI { /** * Get a descriptor object for the block or item with the specified name. diff --git a/src/api/java/li/cil/oc/api/detail/MachineAPI.java b/src/api/java/li/cil/oc/api/detail/MachineAPI.java index 282291c1a..c543662c9 100644 --- a/src/api/java/li/cil/oc/api/detail/MachineAPI.java +++ b/src/api/java/li/cil/oc/api/detail/MachineAPI.java @@ -1,11 +1,11 @@ package li.cil.oc.api.detail; +import java.util.Collection; + import li.cil.oc.api.machine.Architecture; import li.cil.oc.api.machine.Machine; import li.cil.oc.api.machine.MachineHost; -import java.util.Collection; - public interface MachineAPI { /** * Register an architecture that can be used to create new machines. diff --git a/src/api/java/li/cil/oc/api/driver/item/UpgradeRenderer.java b/src/api/java/li/cil/oc/api/driver/item/UpgradeRenderer.java index 87bc9f1ad..b3b1ad08c 100644 --- a/src/api/java/li/cil/oc/api/driver/item/UpgradeRenderer.java +++ b/src/api/java/li/cil/oc/api/driver/item/UpgradeRenderer.java @@ -1,12 +1,10 @@ package li.cil.oc.api.driver.item; +import java.util.Set; + import li.cil.oc.api.event.RobotRenderEvent; import li.cil.oc.api.internal.Robot; import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import java.util.Set; /** * This interface can be implemented by items to allow custom rendering of diff --git a/src/api/java/li/cil/oc/api/driver/item/package-info.java b/src/api/java/li/cil/oc/api/driver/item/package-info.java index 24a730120..d8ba8c6ec 100644 --- a/src/api/java/li/cil/oc/api/driver/item/package-info.java +++ b/src/api/java/li/cil/oc/api/driver/item/package-info.java @@ -10,4 +10,4 @@ apiVersion = API.VERSION) package li.cil.oc.api.driver.item; -import li.cil.oc.api.API; \ No newline at end of file +import li.cil.oc.api.API; diff --git a/src/api/java/li/cil/oc/api/driver/package-info.java b/src/api/java/li/cil/oc/api/driver/package-info.java index 7a3ee423c..7416e5feb 100644 --- a/src/api/java/li/cil/oc/api/driver/package-info.java +++ b/src/api/java/li/cil/oc/api/driver/package-info.java @@ -10,4 +10,4 @@ apiVersion = API.VERSION) package li.cil.oc.api.driver; -import li.cil.oc.api.API; \ No newline at end of file +import li.cil.oc.api.API; diff --git a/src/api/java/li/cil/oc/api/event/GeolyzerEvent.java b/src/api/java/li/cil/oc/api/event/GeolyzerEvent.java index 5d940f7a6..c0571906b 100644 --- a/src/api/java/li/cil/oc/api/event/GeolyzerEvent.java +++ b/src/api/java/li/cil/oc/api/event/GeolyzerEvent.java @@ -1,13 +1,13 @@ package li.cil.oc.api.event; +import java.util.HashMap; +import java.util.Map; + import li.cil.oc.api.driver.EnvironmentHost; import net.minecraft.util.BlockPos; import net.minecraftforge.fml.common.eventhandler.Cancelable; import net.minecraftforge.fml.common.eventhandler.Event; -import java.util.HashMap; -import java.util.Map; - /** * This event is fired by the geolyzer block/upgrade. *

diff --git a/src/api/java/li/cil/oc/api/event/RobotRenderEvent.java b/src/api/java/li/cil/oc/api/event/RobotRenderEvent.java index 4b20d0364..6c2d163b5 100644 --- a/src/api/java/li/cil/oc/api/event/RobotRenderEvent.java +++ b/src/api/java/li/cil/oc/api/event/RobotRenderEvent.java @@ -1,15 +1,16 @@ package li.cil.oc.api.event; +import java.util.Set; + import li.cil.oc.api.driver.item.UpgradeRenderer; import li.cil.oc.api.internal.Agent; import li.cil.oc.api.internal.Robot; import net.minecraft.item.ItemStack; import net.minecraftforge.fml.common.eventhandler.Cancelable; + import org.lwjgl.util.vector.Vector3f; import org.lwjgl.util.vector.Vector4f; -import java.util.Set; - /** * Fired directly before the robot's chassis is rendered. *

diff --git a/src/api/java/li/cil/oc/api/event/package-info.java b/src/api/java/li/cil/oc/api/event/package-info.java index 7fe9fe75e..65e5831d9 100644 --- a/src/api/java/li/cil/oc/api/event/package-info.java +++ b/src/api/java/li/cil/oc/api/event/package-info.java @@ -8,4 +8,4 @@ apiVersion = API.VERSION) package li.cil.oc.api.event; -import li.cil.oc.api.API; \ No newline at end of file +import li.cil.oc.api.API; diff --git a/src/api/java/li/cil/oc/api/fs/FileSystem.java b/src/api/java/li/cil/oc/api/fs/FileSystem.java index a9af47466..13962275d 100644 --- a/src/api/java/li/cil/oc/api/fs/FileSystem.java +++ b/src/api/java/li/cil/oc/api/fs/FileSystem.java @@ -1,9 +1,9 @@ package li.cil.oc.api.fs; -import li.cil.oc.api.Persistable; - import java.io.FileNotFoundException; +import li.cil.oc.api.Persistable; + /** * Interface for file system driver compatible file systems. *

diff --git a/src/api/java/li/cil/oc/api/fs/package-info.java b/src/api/java/li/cil/oc/api/fs/package-info.java index d1e3c5f2f..98eb58849 100644 --- a/src/api/java/li/cil/oc/api/fs/package-info.java +++ b/src/api/java/li/cil/oc/api/fs/package-info.java @@ -19,4 +19,4 @@ apiVersion = API.VERSION) package li.cil.oc.api.fs; -import li.cil.oc.api.API; \ No newline at end of file +import li.cil.oc.api.API; diff --git a/src/api/java/li/cil/oc/api/internal/Agent.java b/src/api/java/li/cil/oc/api/internal/Agent.java index 6f78c196b..ce114627e 100644 --- a/src/api/java/li/cil/oc/api/internal/Agent.java +++ b/src/api/java/li/cil/oc/api/internal/Agent.java @@ -1,11 +1,11 @@ package li.cil.oc.api.internal; +import java.util.UUID; + import li.cil.oc.api.machine.MachineHost; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; -import java.util.UUID; - /** * General marker interface for autonomous agents such as robots and drones. */ diff --git a/src/api/java/li/cil/oc/api/internal/package-info.java b/src/api/java/li/cil/oc/api/internal/package-info.java index ad700a273..d894dcae0 100644 --- a/src/api/java/li/cil/oc/api/internal/package-info.java +++ b/src/api/java/li/cil/oc/api/internal/package-info.java @@ -19,4 +19,4 @@ apiVersion = API.VERSION) package li.cil.oc.api.internal; -import li.cil.oc.api.API; \ No newline at end of file +import li.cil.oc.api.API; diff --git a/src/api/java/li/cil/oc/api/machine/Architecture.java b/src/api/java/li/cil/oc/api/machine/Architecture.java index 5503e447c..cb37a1ecc 100644 --- a/src/api/java/li/cil/oc/api/machine/Architecture.java +++ b/src/api/java/li/cil/oc/api/machine/Architecture.java @@ -1,10 +1,14 @@ package li.cil.oc.api.machine; +import java.lang.annotation.ElementType; +import java.lang.annotation.Inherited; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import java.lang.annotation.*; - /** * This interface abstracts away any language specific details for the Machine. *

diff --git a/src/api/java/li/cil/oc/api/machine/Arguments.java b/src/api/java/li/cil/oc/api/machine/Arguments.java index a5a1c992c..3e6c8671b 100644 --- a/src/api/java/li/cil/oc/api/machine/Arguments.java +++ b/src/api/java/li/cil/oc/api/machine/Arguments.java @@ -1,9 +1,9 @@ package li.cil.oc.api.machine; -import net.minecraft.item.ItemStack; - import java.util.Map; +import net.minecraft.item.ItemStack; + /** * This interface provides access to arguments passed to a {@link Callback}. *

diff --git a/src/api/java/li/cil/oc/api/machine/Machine.java b/src/api/java/li/cil/oc/api/machine/Machine.java index b7270f76c..9c53f93b4 100644 --- a/src/api/java/li/cil/oc/api/machine/Machine.java +++ b/src/api/java/li/cil/oc/api/machine/Machine.java @@ -1,9 +1,9 @@ package li.cil.oc.api.machine; -import li.cil.oc.api.network.ManagedEnvironment; - import java.util.Map; +import li.cil.oc.api.network.ManagedEnvironment; + /** * This interface allows interacting with a Machine obtained via the factory * method {@link li.cil.oc.api.Machine#create(MachineHost)}. diff --git a/src/api/java/li/cil/oc/api/machine/package-info.java b/src/api/java/li/cil/oc/api/machine/package-info.java index 97807dcc8..2922cfd54 100644 --- a/src/api/java/li/cil/oc/api/machine/package-info.java +++ b/src/api/java/li/cil/oc/api/machine/package-info.java @@ -22,4 +22,4 @@ apiVersion = API.VERSION) package li.cil.oc.api.machine; -import li.cil.oc.api.API; \ No newline at end of file +import li.cil.oc.api.API; diff --git a/src/api/java/li/cil/oc/api/manual/package-info.java b/src/api/java/li/cil/oc/api/manual/package-info.java index 1cdeae847..1c821b918 100644 --- a/src/api/java/li/cil/oc/api/manual/package-info.java +++ b/src/api/java/li/cil/oc/api/manual/package-info.java @@ -11,4 +11,4 @@ apiVersion = API.VERSION) package li.cil.oc.api.manual; -import li.cil.oc.api.API; \ No newline at end of file +import li.cil.oc.api.API; diff --git a/src/api/java/li/cil/oc/api/network/Component.java b/src/api/java/li/cil/oc/api/network/Component.java index abf29618f..84df6eaa5 100644 --- a/src/api/java/li/cil/oc/api/network/Component.java +++ b/src/api/java/li/cil/oc/api/network/Component.java @@ -1,10 +1,10 @@ package li.cil.oc.api.network; +import java.util.Collection; + import li.cil.oc.api.machine.Callback; import li.cil.oc.api.machine.Context; -import java.util.Collection; - /** * Components are nodes that can be addressed computers via drivers. *

diff --git a/src/api/java/li/cil/oc/api/network/package-info.java b/src/api/java/li/cil/oc/api/network/package-info.java index 4892d137c..0bda9c964 100644 --- a/src/api/java/li/cil/oc/api/network/package-info.java +++ b/src/api/java/li/cil/oc/api/network/package-info.java @@ -10,4 +10,4 @@ apiVersion = API.VERSION) package li.cil.oc.api.network; -import li.cil.oc.api.API; \ No newline at end of file +import li.cil.oc.api.API; diff --git a/src/api/java/li/cil/oc/api/prefab/ResourceContentProvider.java b/src/api/java/li/cil/oc/api/prefab/ResourceContentProvider.java index 44d5efe68..cbcc90206 100644 --- a/src/api/java/li/cil/oc/api/prefab/ResourceContentProvider.java +++ b/src/api/java/li/cil/oc/api/prefab/ResourceContentProvider.java @@ -1,16 +1,17 @@ package li.cil.oc.api.prefab; -import com.google.common.base.Charsets; -import li.cil.oc.api.manual.ContentProvider; -import net.minecraft.client.Minecraft; -import net.minecraft.util.ResourceLocation; - import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.ArrayList; +import li.cil.oc.api.manual.ContentProvider; +import net.minecraft.client.Minecraft; +import net.minecraft.util.ResourceLocation; + +import com.google.common.base.Charsets; + /** * Basic implementation of a content provider based on Minecraft's resource * loading framework. diff --git a/src/api/java/li/cil/oc/api/prefab/TextureTabIconRenderer.java b/src/api/java/li/cil/oc/api/prefab/TextureTabIconRenderer.java index 415a295ed..f0fcaf2c8 100644 --- a/src/api/java/li/cil/oc/api/prefab/TextureTabIconRenderer.java +++ b/src/api/java/li/cil/oc/api/prefab/TextureTabIconRenderer.java @@ -8,6 +8,7 @@ import net.minecraft.client.renderer.vertex.DefaultVertexFormats; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; + import org.lwjgl.opengl.GL11; /** diff --git a/src/api/java/li/cil/oc/api/prefab/package-info.java b/src/api/java/li/cil/oc/api/prefab/package-info.java index 306982259..8f9e779b5 100644 --- a/src/api/java/li/cil/oc/api/prefab/package-info.java +++ b/src/api/java/li/cil/oc/api/prefab/package-info.java @@ -13,4 +13,4 @@ apiVersion = API.VERSION) package li.cil.oc.api.prefab; -import li.cil.oc.api.API; \ No newline at end of file +import li.cil.oc.api.API; diff --git a/src/api/java/mcp/mobius/waila/api/IWailaCommonAccessor.java b/src/api/java/mcp/mobius/waila/api/IWailaCommonAccessor.java index de56a5406..5226d11ef 100644 --- a/src/api/java/mcp/mobius/waila/api/IWailaCommonAccessor.java +++ b/src/api/java/mcp/mobius/waila/api/IWailaCommonAccessor.java @@ -8,7 +8,6 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; -import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.World; diff --git a/src/api/java/mcp/mobius/waila/api/IWailaSummaryProvider.java b/src/api/java/mcp/mobius/waila/api/IWailaSummaryProvider.java index 03d94ebd6..f79064981 100644 --- a/src/api/java/mcp/mobius/waila/api/IWailaSummaryProvider.java +++ b/src/api/java/mcp/mobius/waila/api/IWailaSummaryProvider.java @@ -1,9 +1,9 @@ package mcp.mobius.waila.api; -import net.minecraft.item.ItemStack; - import java.util.LinkedHashMap; +import net.minecraft.item.ItemStack; + public interface IWailaSummaryProvider { /* This interface is used to control the display data in the description screen */ diff --git a/src/api/java/mcp/mobius/waila/api/IWailaTooltipRenderer.java b/src/api/java/mcp/mobius/waila/api/IWailaTooltipRenderer.java index 746c75e77..efbfd91b7 100644 --- a/src/api/java/mcp/mobius/waila/api/IWailaTooltipRenderer.java +++ b/src/api/java/mcp/mobius/waila/api/IWailaTooltipRenderer.java @@ -1,6 +1,6 @@ package mcp.mobius.waila.api; -import java.awt.*; +import java.awt.Dimension; public interface IWailaTooltipRenderer { diff --git a/src/api/java/mcp/mobius/waila/api/package-info.java b/src/api/java/mcp/mobius/waila/api/package-info.java index 6102327b9..e1f6cdfa2 100644 --- a/src/api/java/mcp/mobius/waila/api/package-info.java +++ b/src/api/java/mcp/mobius/waila/api/package-info.java @@ -1,3 +1,3 @@ @API(apiVersion="1.3",owner="Waila",provides="WailaAPI") package mcp.mobius.waila.api; -import net.minecraftforge.fml.common.API; \ No newline at end of file +import net.minecraftforge.fml.common.API; diff --git a/src/main/java/codechicken/core/launch/DepLoader.java b/src/main/java/codechicken/core/launch/DepLoader.java index 96e9d56b0..b9eab1105 100644 --- a/src/main/java/codechicken/core/launch/DepLoader.java +++ b/src/main/java/codechicken/core/launch/DepLoader.java @@ -1,41 +1,62 @@ package codechicken.core.launch; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParser; -import net.minecraftforge.fml.common.versioning.ComparableVersion; -import net.minecraftforge.fml.relauncher.FMLInjectionData; -import net.minecraftforge.fml.relauncher.FMLLaunchHandler; -import net.minecraftforge.fml.relauncher.IFMLCallHook; -import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin; -import net.minecraft.launchwrapper.LaunchClassLoader; -import sun.misc.URLClassPath; -import sun.net.util.URLUtil; - -import javax.swing.*; -import javax.swing.event.HyperlinkEvent; -import javax.swing.event.HyperlinkListener; -import java.awt.*; +import java.awt.Desktop; import java.awt.Dialog.ModalityType; +import java.awt.Dimension; +import java.awt.GraphicsEnvironment; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; -import java.io.*; +import java.io.Closeable; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.InterruptedIOException; import java.lang.reflect.Field; import java.net.MalformedURLException; import java.net.URL; import java.net.URLClassLoader; import java.net.URLConnection; import java.nio.ByteBuffer; -import java.util.*; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.LinkedList; import java.util.List; +import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.regex.PatternSyntaxException; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; +import javax.swing.Box; +import javax.swing.JDialog; +import javax.swing.JEditorPane; +import javax.swing.JLabel; +import javax.swing.JOptionPane; +import javax.swing.JProgressBar; +import javax.swing.WindowConstants; +import javax.swing.event.HyperlinkEvent; +import javax.swing.event.HyperlinkListener; + +import net.minecraft.launchwrapper.LaunchClassLoader; +import net.minecraftforge.fml.common.versioning.ComparableVersion; +import net.minecraftforge.fml.relauncher.FMLInjectionData; +import net.minecraftforge.fml.relauncher.FMLLaunchHandler; +import net.minecraftforge.fml.relauncher.IFMLCallHook; +import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin; +import sun.misc.URLClassPath; +import sun.net.util.URLUtil; + +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; + /** * For autodownloading stuff. * This is really unoriginal, mostly ripped off FML, credits to cpw. diff --git a/src/main/java/cofh/api/energy/package-info.java b/src/main/java/cofh/api/energy/package-info.java index 9ff1bd299..63b756020 100644 --- a/src/main/java/cofh/api/energy/package-info.java +++ b/src/main/java/cofh/api/energy/package-info.java @@ -3,5 +3,5 @@ package cofh.api.energy; import net.minecraftforge.fml.common.API; - import cofh.api.CoFHAPIProps; + diff --git a/src/main/java/cofh/api/item/package-info.java b/src/main/java/cofh/api/item/package-info.java index c05530025..2bc4b17aa 100644 --- a/src/main/java/cofh/api/item/package-info.java +++ b/src/main/java/cofh/api/item/package-info.java @@ -5,6 +5,6 @@ @API(apiVersion = CoFHAPIProps.VERSION, owner = "CoFHAPI", provides = "CoFHAPI|item") package cofh.api.item; -import cofh.api.CoFHAPIProps; import net.minecraftforge.fml.common.API; +import cofh.api.CoFHAPIProps; diff --git a/src/main/java/cofh/api/package-info.java b/src/main/java/cofh/api/package-info.java index 6a3b1a5a9..e1a357b5b 100644 --- a/src/main/java/cofh/api/package-info.java +++ b/src/main/java/cofh/api/package-info.java @@ -3,3 +3,4 @@ package cofh.api; import net.minecraftforge.fml.common.API; + diff --git a/src/main/java/mekanism/api/Chunk3D.java b/src/main/java/mekanism/api/Chunk3D.java index 7de476a04..f469d5db5 100644 --- a/src/main/java/mekanism/api/Chunk3D.java +++ b/src/main/java/mekanism/api/Chunk3D.java @@ -50,8 +50,8 @@ public class Chunk3D */ public Chunk3D(Coord4D coord) { - xCoord = coord.getX() >> 4; - zCoord = coord.getZ() >> 4; + xCoord = coord.xCoord >> 4; + zCoord = coord.zCoord >> 4; dimensionId = coord.dimensionId; } diff --git a/src/main/java/mekanism/api/Coord4D.java b/src/main/java/mekanism/api/Coord4D.java index e81c3d74d..7b416d28a 100644 --- a/src/main/java/mekanism/api/Coord4D.java +++ b/src/main/java/mekanism/api/Coord4D.java @@ -16,7 +16,6 @@ import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; -import net.minecraft.util.Vec3i; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraft.world.chunk.Chunk; @@ -28,8 +27,11 @@ import net.minecraftforge.fml.common.network.NetworkRegistry.TargetPoint; * @author aidancbrady * */ -public class Coord4D extends BlockPos +public class Coord4D { + public int xCoord; + public int yCoord; + public int zCoord; public int dimensionId; @@ -41,25 +43,22 @@ public class Coord4D extends BlockPos */ public Coord4D(int x, int y, int z) { - super(x, y, z); + xCoord = x; + yCoord = y; + zCoord = z; dimensionId = 0; } - - public Coord4D(double x, double y, double z) - { - super(x, y, z); - - dimensionId = 0; - } - + /** * Creates a Coord4D from an entity's position, rounded down. * @param entity - entity to create the Coord4D from */ public Coord4D(Entity entity) { - super(entity); + xCoord = (int)entity.posX; + yCoord = (int)entity.posY; + zCoord = (int)entity.posZ; dimensionId = entity.worldObj.provider.getDimensionId(); } @@ -71,48 +70,44 @@ public class Coord4D extends BlockPos * @param z - z coordinate * @param dimension - dimension ID */ - public Coord4D(int x, int y, int z, int dimension) - { - super(x, y, z); - - dimensionId = dimension; - } - public Coord4D(double x, double y, double z, int dimension) { - super(x, y, z); + xCoord = MathHelper.floor_double(x); + yCoord = MathHelper.floor_double(y); + zCoord = MathHelper.floor_double(z); dimensionId = dimension; } - - public Coord4D(Vec3i pos) + + public Coord4D(BlockPos pos, World world) { - this(pos, 0); + this(pos.getX(), pos.getY(), pos.getZ(), world.provider.getDimensionId()); } - public Coord4D(Vec3i pos, int dimension) + public Coord4D(MovingObjectPosition mop, World world) { - this(pos.getX(), pos.getY(), pos.getZ()); - - dimensionId = dimension; - } - - - public Coord4D(MovingObjectPosition mop) - { - super(mop.getBlockPos()); - - dimensionId = 0; + this(mop.getBlockPos(), world); } /** - * Gets the metadata of the block representing this Coord4D. + * Gets the state of the block representing this Coord4D. * @param world - world this Coord4D is in - * @return the metadata of this Coord4D's block + * @return the state of this Coord4D's block */ public IBlockState getBlockState(IBlockAccess world) { - return world.getBlockState(this); + return world.getBlockState(getPos()); + } + + public int getBlockMeta(IBlockAccess world) + { + IBlockState state = getBlockState(world); + return state == null ? 0 : state.getBlock().getMetaFromState(state); + } + + public BlockPos getPos() + { + return new BlockPos(xCoord, yCoord, zCoord); } /** @@ -127,7 +122,7 @@ public class Coord4D extends BlockPos return null; } - return world.getTileEntity(this); + return world.getTileEntity(getPos()); } /** @@ -142,13 +137,7 @@ public class Coord4D extends BlockPos return null; } - return world.getBlockState(this).getBlock(); - } - - public int getBlockMeta(IBlockAccess world) - { - IBlockState state = getBlockState(world); - return state == null ? 0 : state.getBlock().getMetaFromState(state); + return getBlockState(world).getBlock(); } /** @@ -158,9 +147,9 @@ public class Coord4D extends BlockPos */ public NBTTagCompound write(NBTTagCompound nbtTags) { - nbtTags.setInteger("x", getX()); - nbtTags.setInteger("y", getY()); - nbtTags.setInteger("z", getZ()); + nbtTags.setInteger("x", xCoord); + nbtTags.setInteger("y", yCoord); + nbtTags.setInteger("z", zCoord); nbtTags.setInteger("dimensionId", dimensionId); return nbtTags; @@ -170,11 +159,11 @@ public class Coord4D extends BlockPos * Writes this Coord4D's data to an ArrayList for packet transfer. * @param data - the ArrayList to add the data to */ - public void write(ArrayList data) + public void write(ArrayList data) { - data.add(getX()); - data.add(getY()); - data.add(getZ()); + data.add(xCoord); + data.add(yCoord); + data.add(zCoord); data.add(dimensionId); } @@ -184,7 +173,9 @@ public class Coord4D extends BlockPos */ public void write(ByteBuf dataStream) { - dataStream.writeLong(toLong()); + dataStream.writeInt(xCoord); + dataStream.writeInt(yCoord); + dataStream.writeInt(zCoord); dataStream.writeInt(dimensionId); } @@ -195,42 +186,47 @@ public class Coord4D extends BlockPos * @param z - z value to translate * @return translated Coord4D */ - public Coord4D add(int x, int y, int z) + public Coord4D translate(int x, int y, int z) { - return x == 0 && y == 0 && z == 0 ? this : new Coord4D(this.getX() + x, this.getY() + y, this.getZ() + z, dimensionId); + return new Coord4D(xCoord+x, yCoord+y, zCoord+z, dimensionId); } - - public Coord4D add(double x, double y, double z) - { - return x == 0.0D && y == 0.0D && z == 0.0D ? this : new Coord4D((double)this.getX() + x, (double)this.getY() + y, (double)this.getZ() + z, dimensionId); - } - + /** * Translates this Coord4D by the defined Coord4D's coordinates, regardless of dimension. * @param coord - coordinates to translate by * @return translated Coord4D */ - public Coord4D add(Vec3i coord) + public Coord4D translate(Coord4D coord) { - return add(coord.getX(), coord.getY(), coord.getZ()); + return translate(coord.xCoord, coord.yCoord, coord.zCoord); } /** - * Offset this BlockPos 1 block in the given direction + * Creates and returns a new Coord4D translated to the defined offsets of the side. + * @param side - side to translate this Coord4D to + * @return translated Coord4D */ - public Coord4D offset(EnumFacing facing) + public Coord4D offset(EnumFacing side) { - return this.offset(facing, 1); + return offset(side, 1); } /** - * Offsets this BlockPos n blocks in the given direction + * Creates and returns a new Coord4D translated to the defined offsets of the side by the defined amount. + * @param side - side to translate this Coord4D to + * @param amount - how far to translate this Coord4D + * @return translated Coord4D */ - public Coord4D offset(EnumFacing facing, int n) + public Coord4D offset(EnumFacing side, int amount) { - return (facing == null || n == 0) ? this : new Coord4D(this.getX() + facing.getFrontOffsetX() * n, this.getY() + facing.getFrontOffsetY() * n, this.getZ() + facing.getFrontOffsetZ() * n); + if(side == null || amount == 0) + { + return this; + } + + return new Coord4D(xCoord+(side.getFrontOffsetX()*amount), yCoord+(side.getFrontOffsetY()*amount), zCoord+(side.getFrontOffsetZ()*amount), dimensionId); } - + public ItemStack getStack(IBlockAccess world) { IBlockState state = getBlockState(world); @@ -239,7 +235,7 @@ public class Coord4D extends BlockPos { return null; } - + return new ItemStack(state.getBlock(), 1, state.getBlock().getMetaFromState(state)); } @@ -250,8 +246,7 @@ public class Coord4D extends BlockPos */ public static Coord4D get(TileEntity tileEntity) { - BlockPos pos = tileEntity.getPos(); - return new Coord4D(pos.getX(), pos.getY(), pos.getZ(), tileEntity.getWorld().provider.getDimensionId()); + return new Coord4D(tileEntity.getPos(), tileEntity.getWorld()); } /** @@ -271,17 +266,18 @@ public class Coord4D extends BlockPos */ public static Coord4D read(ByteBuf dataStream) { - return new Coord4D(BlockPos.fromLong(dataStream.readLong()), dataStream.readInt()); + return new Coord4D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt(), dataStream.readInt()); } /** * Creates and returns a new Coord4D with values representing the difference between the defined Coord4D - * @param vec - the Coord4D to subtract from this + * @param other - the Coord4D to subtract from this * @return a Coord4D representing the distance between the defined Coord4D */ - public Coord4D difference(Vec3i vec) + public Coord4D difference(Coord4D other) { - return vec.getX() == 0 && vec.getY() == 0 && vec.getZ() == 0 ? this : new Coord4D(this.getX() - vec.getX(), this.getY() - vec.getY(), this.getZ() - vec.getZ()); } + return new Coord4D(xCoord-other.xCoord, yCoord-other.yCoord, zCoord-other.zCoord, dimensionId); + } /** * A method used to find the EnumFacing represented by the distance of the defined Coord4D. Most likely won't have many @@ -295,7 +291,7 @@ public class Coord4D extends BlockPos for(EnumFacing side : EnumFacing.VALUES) { - if(side.getDirectionVec().equals(diff)) + if(side.getFrontOffsetX() == diff.xCoord && side.getFrontOffsetY() == diff.yCoord && side.getFrontOffsetZ() == diff.zCoord) { return side; } @@ -309,11 +305,11 @@ public class Coord4D extends BlockPos * @param obj - the Coord4D to find the distance to * @return the distance to the defined Coord4D */ - public int distanceTo(Vec3i obj) + public int distanceTo(Coord4D obj) { - int subX = getX() - obj.getX(); - int subY = getY() - obj.getY(); - int subZ = getZ() - obj.getZ(); + int subX = xCoord - obj.xCoord; + int subY = yCoord - obj.yCoord; + int subZ = zCoord - obj.zCoord; return (int)MathHelper.sqrt_double(subX * subX + subY * subY + subZ * subZ); } @@ -325,7 +321,7 @@ public class Coord4D extends BlockPos */ public boolean sideVisible(EnumFacing side, IBlockAccess world) { - return world.isAirBlock(offset(side)); + return world.isAirBlock(step(side).getPos()); } /** @@ -335,7 +331,17 @@ public class Coord4D extends BlockPos */ public TargetPoint getTargetPoint(double range) { - return new TargetPoint(dimensionId, getX(), getY(), getZ(), range); + return new TargetPoint(dimensionId, xCoord, yCoord, zCoord, range); + } + + /** + * Steps this Coord4D in the defined side's offset without creating a new value. + * @param side - side to step towards + * @return this Coord4D + */ + public Coord4D step(EnumFacing side) + { + return translate(side.getFrontOffsetX(), side.getFrontOffsetY(), side.getFrontOffsetZ()); } /** @@ -345,7 +351,7 @@ public class Coord4D extends BlockPos */ public boolean exists(World world) { - return world.getChunkProvider() == null || world.getChunkProvider().chunkExists(getX() >> 4, getZ() >> 4); + return world.getChunkProvider() == null || world.getChunkProvider().chunkExists(xCoord >> 4, zCoord >> 4); } /** @@ -355,7 +361,7 @@ public class Coord4D extends BlockPos */ public Chunk getChunk(World world) { - return world.getChunkFromBlockCoords(this); + return world.getChunkFromBlockCoords(getPos()); } /** @@ -374,7 +380,7 @@ public class Coord4D extends BlockPos */ public boolean isAirBlock(IBlockAccess world) { - return world.isAirBlock(this); + return world.isAirBlock(getPos()); } /** @@ -384,7 +390,7 @@ public class Coord4D extends BlockPos */ public boolean isReplaceable(World world) { - return getBlock(world).isReplaceable(world, this); + return getBlock(world).isReplaceable(world, getPos()); } /** @@ -393,42 +399,39 @@ public class Coord4D extends BlockPos */ public AxisAlignedBB getBoundingBox() { - return new AxisAlignedBB(this, add(1,1,1)); + return AxisAlignedBB.fromBounds(xCoord, yCoord, zCoord, xCoord+1, yCoord+1, zCoord+1); } @Override public Coord4D clone() { - return new Coord4D(getX(), getY(), getZ(), dimensionId); + return new Coord4D(xCoord, yCoord, zCoord, dimensionId); } @Override public String toString() { - return "[Coord4D: " + getX() + ", " + getY() + ", " + getZ() + ", dim=" + dimensionId + "]"; + return "[Coord4D: " + xCoord + ", " + yCoord + ", " + zCoord + ", dim=" + dimensionId + "]"; } @Override public boolean equals(Object obj) { - return obj instanceof Vec3i && - ( - ((Vec3i)obj).getX() == getX() && - ((Vec3i)obj).getY() == getY() && - ((Vec3i)obj).getZ() == getZ() - ) && !(obj instanceof Coord4D && ((Coord4D)obj).dimensionId != dimensionId); + return obj instanceof Coord4D && + ((Coord4D)obj).xCoord == xCoord && + ((Coord4D)obj).yCoord == yCoord && + ((Coord4D)obj).zCoord == zCoord && + ((Coord4D)obj).dimensionId == dimensionId; } -/* @Override public int hashCode() { int code = 1; - code = 31 * code + getX(); - code = 31 * code + getY(); - code = 31 * code + getZ(); + code = 31 * code + xCoord; + code = 31 * code + yCoord; + code = 31 * code + zCoord; code = 31 * code + dimensionId; return code; } -*/ } \ No newline at end of file diff --git a/src/main/java/mekanism/common/ObfuscatedNames.java b/src/main/java/mekanism/api/ObfuscatedNames.java similarity index 97% rename from src/main/java/mekanism/common/ObfuscatedNames.java rename to src/main/java/mekanism/api/ObfuscatedNames.java index 81e5d8d83..0edb63816 100644 --- a/src/main/java/mekanism/common/ObfuscatedNames.java +++ b/src/main/java/mekanism/api/ObfuscatedNames.java @@ -1,4 +1,4 @@ -package mekanism.common; +package mekanism.api; public final class ObfuscatedNames { diff --git a/src/main/java/mekanism/api/Pos3D.java b/src/main/java/mekanism/api/Pos3D.java index 2baf6cb9a..b480604fb 100644 --- a/src/main/java/mekanism/api/Pos3D.java +++ b/src/main/java/mekanism/api/Pos3D.java @@ -27,6 +27,11 @@ public class Pos3D extends Vec3 { super(vec.xCoord, vec.yCoord, vec.zCoord); } + + public Pos3D(Coord4D coord) + { + super(coord.xCoord, coord.yCoord, coord.zCoord); + } public Pos3D(Vec3i vec) { diff --git a/src/main/java/mekanism/api/Range4D.java b/src/main/java/mekanism/api/Range4D.java index 567692faa..ee55b1da9 100644 --- a/src/main/java/mekanism/api/Range4D.java +++ b/src/main/java/mekanism/api/Range4D.java @@ -40,13 +40,13 @@ public class Range4D public Range4D(Coord4D coord) { - xMin = coord.getX(); - yMin = coord.getY(); - zMin = coord.getZ(); + xMin = coord.xCoord; + yMin = coord.yCoord; + zMin = coord.zCoord; - xMax = coord.getX()+1; - yMax = coord.getY()+1; - zMax = coord.getZ()+1; + xMax = coord.xCoord+1; + yMax = coord.yCoord+1; + zMax = coord.zCoord+1; dimensionId = coord.dimensionId; } diff --git a/src/main/java/mekanism/api/gas/Gas.java b/src/main/java/mekanism/api/gas/Gas.java index 93ddab407..a712432ed 100644 --- a/src/main/java/mekanism/api/gas/Gas.java +++ b/src/main/java/mekanism/api/gas/Gas.java @@ -35,9 +35,10 @@ public class Gas * Creates a new Gas object with a defined name or key value. * @param s - name or key to associate this Gas with */ - public Gas(String s) + public Gas(String s, String icon) { unlocalizedName = name = s; + iconLocation = new ResourceLocation(icon); } /** @@ -144,9 +145,8 @@ public class Gas * @param i - IIcon to associate with this Gas * @return this Gas object */ - public Gas setIcon(TextureMap map, String location) + public Gas updateIcon(TextureMap map) { - iconLocation = new ResourceLocation(location); sprite = map.registerSprite(iconLocation); from_fluid = false; diff --git a/src/main/java/mekanism/api/gas/GasTransmission.java b/src/main/java/mekanism/api/gas/GasTransmission.java index 7843e9cbc..72986766a 100644 --- a/src/main/java/mekanism/api/gas/GasTransmission.java +++ b/src/main/java/mekanism/api/gas/GasTransmission.java @@ -10,7 +10,6 @@ import mekanism.api.Coord4D; import mekanism.api.transmitters.TransmissionType; import mekanism.common.capabilities.Capabilities; import mekanism.common.util.MekanismUtils; - import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; diff --git a/src/main/java/mekanism/api/gas/OreGas.java b/src/main/java/mekanism/api/gas/OreGas.java index 316169c2a..73c1aaeb5 100644 --- a/src/main/java/mekanism/api/gas/OreGas.java +++ b/src/main/java/mekanism/api/gas/OreGas.java @@ -9,7 +9,7 @@ public class OreGas extends Gas public OreGas(String s, String name) { - super(s); + super(s, "mekanism:blocks/liquid/Liquid" + (s.contains("clean") ? "Clean" : "") + "Ore"); oreName = name; } diff --git a/src/main/java/mekanism/api/transmitters/DynamicNetwork.java b/src/main/java/mekanism/api/transmitters/DynamicNetwork.java index b3250cf90..7fe1e4619 100644 --- a/src/main/java/mekanism/api/transmitters/DynamicNetwork.java +++ b/src/main/java/mekanism/api/transmitters/DynamicNetwork.java @@ -248,23 +248,23 @@ public abstract class DynamicNetwork> implemen IGridTransmitter initTransmitter = transmitters.iterator().next(); Coord4D initCoord = initTransmitter.coord(); - int minX = initCoord.getX(); - int minY = initCoord.getY(); - int minZ = initCoord.getZ(); - int maxX = initCoord.getX(); - int maxY = initCoord.getY(); - int maxZ = initCoord.getZ(); + int minX = initCoord.xCoord; + int minY = initCoord.yCoord; + int minZ = initCoord.zCoord; + int maxX = initCoord.xCoord; + int maxY = initCoord.yCoord; + int maxZ = initCoord.zCoord; for(IGridTransmitter transmitter : transmitters) { Coord4D coord = transmitter.coord(); - if(coord.getX() < minX) minX = coord.getX(); - if(coord.getY() < minY) minY = coord.getY(); - if(coord.getZ() < minZ) minZ = coord.getZ(); - if(coord.getX() > maxX) maxX = coord.getX(); - if(coord.getY() > maxY) maxY = coord.getY(); - if(coord.getX() > maxZ) maxZ = coord.getZ(); + if(coord.xCoord < minX) minX = coord.xCoord; + if(coord.yCoord < minY) minY = coord.yCoord; + if(coord.zCoord < minZ) minZ = coord.zCoord; + if(coord.xCoord > maxX) maxX = coord.xCoord; + if(coord.yCoord > maxY) maxY = coord.yCoord; + if(coord.xCoord > maxZ) maxZ = coord.zCoord; } return new Range4D(minX, minY, minZ, maxX, maxY, maxZ, initTransmitter.world().provider.getDimensionId()); diff --git a/src/main/java/mekanism/api/util/ReflectionUtils.java b/src/main/java/mekanism/api/util/ReflectionUtils.java new file mode 100644 index 000000000..459ddf84c --- /dev/null +++ b/src/main/java/mekanism/api/util/ReflectionUtils.java @@ -0,0 +1,74 @@ +package mekanism.api.util; + +import java.lang.reflect.Field; +import java.lang.reflect.Method; + +public final class ReflectionUtils +{ + /** + * Retrieves a private value from a defined class and field. + * @param obj - the Object to retrieve the value from, null if static + * @param c - Class to retrieve field value from + * @param fields - possible names of field to iterate through + * @return value as an Object, cast as necessary + */ + public static Object getPrivateValue(Object obj, Class c, String[] fields) + { + for(String field : fields) + { + try { + Field f = c.getDeclaredField(field); + f.setAccessible(true); + return f.get(obj); + } catch(Exception e) { + continue; + } + } + + return null; + } + + /** + * Sets a private value from a defined class and field to a new value. + * @param obj - the Object to perform the operation on, null if static + * @param value - value to set the field to + * @param c - Class the operation will be performed on + * @param fields - possible names of field to iterate through + */ + public static void setPrivateValue(Object obj, Object value, Class c, String[] fields) + { + for(String field : fields) + { + try { + Field f = c.getDeclaredField(field); + f.setAccessible(true); + f.set(obj, value); + } catch(Exception e) { + continue; + } + } + } + + /** + * Retrieves a private method from a class, sets it as accessible, and returns it. + * @param c - Class the method is located in + * @param methods - possible names of the method to iterate through + * @param params - the Types inserted as parameters into the method + * @return private method + */ + public static Method getPrivateMethod(Class c, String[] methods, Class... params) + { + for(String method : methods) + { + try { + Method m = c.getDeclaredMethod(method, params); + m.setAccessible(true); + return m; + } catch(Exception e) { + continue; + } + } + + return null; + } +} diff --git a/src/main/java/mekanism/client/ClientConnectionHandler.java b/src/main/java/mekanism/client/ClientConnectionHandler.java index 0b94513fc..a4432e7e5 100644 --- a/src/main/java/mekanism/client/ClientConnectionHandler.java +++ b/src/main/java/mekanism/client/ClientConnectionHandler.java @@ -5,7 +5,6 @@ import java.net.InetSocketAddress; import mekanism.api.MekanismConfig.general; import mekanism.client.voice.VoiceClient; import mekanism.common.Mekanism; - import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.network.FMLNetworkEvent.ClientConnectedToServerEvent; import net.minecraftforge.fml.relauncher.Side; diff --git a/src/main/java/mekanism/client/ClientProxy.java b/src/main/java/mekanism/client/ClientProxy.java index 06bd7bd19..73ecf6e59 100644 --- a/src/main/java/mekanism/client/ClientProxy.java +++ b/src/main/java/mekanism/client/ClientProxy.java @@ -1,10 +1,14 @@ package mekanism.client; import java.io.File; +import java.io.IOException; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; import mekanism.api.Coord4D; +import mekanism.api.EnumColor; import mekanism.api.MekanismConfig.client; import mekanism.api.MekanismConfig.general; import mekanism.api.Pos3D; @@ -66,51 +70,55 @@ import mekanism.client.gui.GuiTransporterConfig; import mekanism.client.gui.GuiUpgradeManagement; import mekanism.client.render.MekanismRenderer; import mekanism.client.render.RenderTickHandler; -import mekanism.client.render.ctm.TextureStitcher; +import mekanism.client.render.ctm.CTMRegistry; import mekanism.client.render.entity.RenderBalloon; import mekanism.client.render.entity.RenderFlame; import mekanism.client.render.entity.RenderObsidianTNTPrimed; import mekanism.client.render.entity.RenderRobit; +import mekanism.client.render.item.CustomItemModelFactory; import mekanism.client.render.tileentity.RenderBin; import mekanism.client.render.tileentity.RenderChargepad; import mekanism.client.render.tileentity.RenderChemicalCrystallizer; import mekanism.client.render.tileentity.RenderChemicalDissolutionChamber; -import mekanism.client.render.tileentity.RenderChemicalInfuser; -import mekanism.client.render.tileentity.RenderChemicalOxidizer; -import mekanism.client.render.tileentity.RenderChemicalWasher; import mekanism.client.render.tileentity.RenderConfigurableMachine; import mekanism.client.render.tileentity.RenderDigitalMiner; import mekanism.client.render.tileentity.RenderDynamicTank; import mekanism.client.render.tileentity.RenderElectricPump; -import mekanism.client.render.tileentity.RenderElectrolyticSeparator; import mekanism.client.render.tileentity.RenderEnergyCube; import mekanism.client.render.tileentity.RenderFluidTank; import mekanism.client.render.tileentity.RenderFluidicPlenisher; import mekanism.client.render.tileentity.RenderGasTank; -import mekanism.client.render.tileentity.RenderLaserAmplifier; -import mekanism.client.render.tileentity.RenderLaserTractorBeam; import mekanism.client.render.tileentity.RenderLogisticalSorter; import mekanism.client.render.tileentity.RenderPersonalChest; -import mekanism.client.render.tileentity.RenderPressurizedReactionChamber; import mekanism.client.render.tileentity.RenderQuantumEntangloporter; import mekanism.client.render.tileentity.RenderResistiveHeater; import mekanism.client.render.tileentity.RenderSecurityDesk; import mekanism.client.render.tileentity.RenderSeismicVibrator; +import mekanism.client.render.tileentity.RenderSolarNeutronActivator; import mekanism.client.render.tileentity.RenderTeleporter; import mekanism.client.render.tileentity.RenderThermalEvaporationController; import mekanism.client.render.tileentity.RenderThermoelectricBoiler; import mekanism.common.CommonProxy; import mekanism.common.Mekanism; +import mekanism.common.MekanismBlocks; import mekanism.common.MekanismItems; +import mekanism.common.Tier.BaseTier; +import mekanism.common.Tier.GasTankTier; +import mekanism.common.base.IFactory.RecipeType; import mekanism.common.base.ISideConfiguration; import mekanism.common.base.IUpgradeTile; +import mekanism.common.block.states.BlockStateBasic.BasicBlockType; import mekanism.common.block.states.BlockStateMachine.MachineType; +import mekanism.common.block.states.BlockStateOre.EnumOreType; import mekanism.common.entity.EntityBabySkeleton; import mekanism.common.entity.EntityBalloon; import mekanism.common.entity.EntityFlame; import mekanism.common.entity.EntityObsidianTNT; import mekanism.common.entity.EntityRobit; import mekanism.common.inventory.InventoryPersonalChest; +import mekanism.common.item.ItemBlockBasic; +import mekanism.common.item.ItemBlockGasTank; +import mekanism.common.item.ItemBlockMachine; import mekanism.common.item.ItemCraftingFormula; import mekanism.common.item.ItemPortableTeleporter; import mekanism.common.item.ItemSeismicReader; @@ -149,9 +157,6 @@ import mekanism.common.tile.TileEntityFormulaicAssemblicator; import mekanism.common.tile.TileEntityFuelwoodHeater; import mekanism.common.tile.TileEntityGasTank; import mekanism.common.tile.TileEntityInductionCasing; -import mekanism.common.tile.TileEntityInductionCell; -import mekanism.common.tile.TileEntityInductionPort; -import mekanism.common.tile.TileEntityInductionProvider; import mekanism.common.tile.TileEntityLaserAmplifier; import mekanism.common.tile.TileEntityLaserTractorBeam; import mekanism.common.tile.TileEntityLogisticalSorter; @@ -169,7 +174,6 @@ import mekanism.common.tile.TileEntityRotaryCondensentrator; import mekanism.common.tile.TileEntitySecurityDesk; import mekanism.common.tile.TileEntitySeismicVibrator; import mekanism.common.tile.TileEntitySolarNeutronActivator; -import mekanism.common.tile.TileEntityStructuralGlass; import mekanism.common.tile.TileEntityTeleporter; import mekanism.common.tile.TileEntityThermalEvaporationController; import net.minecraft.client.Minecraft; @@ -179,6 +183,7 @@ import net.minecraft.client.renderer.ItemMeshDefinition; import net.minecraft.client.renderer.entity.Render; import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.client.renderer.entity.RenderSkeleton; +import net.minecraft.client.resources.model.IBakedModel; import net.minecraft.client.resources.model.ModelBakery; import net.minecraft.client.resources.model.ModelResourceLocation; import net.minecraft.entity.monster.EntitySkeleton; @@ -189,7 +194,9 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; +import net.minecraftforge.client.event.ModelBakeEvent; import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.client.model.obj.OBJLoader; import net.minecraftforge.common.MinecraftForge; @@ -198,10 +205,11 @@ import net.minecraftforge.fml.client.registry.ClientRegistry; import net.minecraftforge.fml.client.registry.IRenderFactory; import net.minecraftforge.fml.client.registry.RenderingRegistry; import net.minecraftforge.fml.common.FMLCommonHandler; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; -import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import scala.actors.threadpool.Arrays; /** * Client proxy for the Mekanism mod. @@ -212,6 +220,12 @@ import net.minecraftforge.fml.relauncher.SideOnly; public class ClientProxy extends CommonProxy { public static Map machineResources = new HashMap(); + public static Map basicResources = new HashMap(); + + public static final String[] CUSTOM_RENDERS = new String[] {"fluid_tank", "bin_basic", "bin_advanced", "bin_elite", "bin_ultimate", + "Jetpack", "FreeRunners", "AtomicDisassembler", "ScubaTank", "GasMask", "ArmoredJetpack", "Flamethrower", "personal_chest", + "solar_neutron_activator", "chemical_dissolution_chamber", "chemical_crystallizer", "seismic_vibrator", "security_desk", + "quantum_entangloporter", "resistive_heater", "EnergyCube", "digital_miner"}; @Override public void loadConfiguration() @@ -237,14 +251,6 @@ public class ClientProxy extends CommonProxy } } -/* - @Override - public int getArmorIndex(String string) - { - return RenderingRegistry.addNewArmourRendererPrefix(string); - } -*/ - @Override public void openPersonalChest(EntityPlayer entityplayer, int id, int windowId, boolean isBlock, BlockPos pos) { @@ -282,90 +288,39 @@ public class ClientProxy extends CommonProxy ClientRegistry.registerTileEntity(TileEntityEliteFactory.class, "UltimateSmeltingFactory", new RenderConfigurableMachine()); ClientRegistry.registerTileEntity(TileEntityPurificationChamber.class, "PurificationChamber", new RenderConfigurableMachine()); ClientRegistry.registerTileEntity(TileEntityEnergizedSmelter.class, "EnergizedSmelter", new RenderConfigurableMachine()); - //ClientRegistry.registerTileEntity(TileEntityMetallurgicInfuser.class, "MetallurgicInfuser", new RenderMetallurgicInfuser()); - //ClientRegistry.registerTileEntity(TileEntityObsidianTNT.class, "ObsidianTNT", new RenderObsidianTNT()); + ClientRegistry.registerTileEntity(TileEntityMetallurgicInfuser.class, "MetallurgicInfuser", new RenderConfigurableMachine()); ClientRegistry.registerTileEntity(TileEntityGasTank.class, "GasTank", new RenderGasTank()); ClientRegistry.registerTileEntity(TileEntityEnergyCube.class, "EnergyCube", new RenderEnergyCube()); ClientRegistry.registerTileEntity(TileEntityElectricPump.class, "ElectricPump", new RenderElectricPump()); - ClientRegistry.registerTileEntity(TileEntityPersonalChest.class, "ElectricChest", new RenderPersonalChest()); //TODO rename + ClientRegistry.registerTileEntity(TileEntityPersonalChest.class, "PersonalChest", new RenderPersonalChest()); ClientRegistry.registerTileEntity(TileEntityDynamicTank.class, "DynamicTank", new RenderDynamicTank()); ClientRegistry.registerTileEntity(TileEntityDynamicValve.class, "DynamicValve", new RenderDynamicTank()); ClientRegistry.registerTileEntity(TileEntityChargepad.class, "Chargepad", new RenderChargepad()); ClientRegistry.registerTileEntity(TileEntityLogisticalSorter.class, "LogisticalSorter", new RenderLogisticalSorter()); ClientRegistry.registerTileEntity(TileEntityBin.class, "Bin", new RenderBin()); ClientRegistry.registerTileEntity(TileEntityDigitalMiner.class, "DigitalMiner", new RenderDigitalMiner()); - GameRegistry.registerTileEntity(TileEntityRotaryCondensentrator.class, "RotaryCondensentrator"); ClientRegistry.registerTileEntity(TileEntityTeleporter.class, "MekanismTeleporter", new RenderTeleporter()); - ClientRegistry.registerTileEntity(TileEntityChemicalOxidizer.class, "ChemicalOxidizer", new RenderChemicalOxidizer()); - ClientRegistry.registerTileEntity(TileEntityChemicalInfuser.class, "ChemicalInfuser", new RenderChemicalInfuser()); ClientRegistry.registerTileEntity(TileEntityChemicalInjectionChamber.class, "ChemicalInjectionChamber", new RenderConfigurableMachine()); - ClientRegistry.registerTileEntity(TileEntityElectrolyticSeparator.class, "ElectrolyticSeparator", new RenderElectrolyticSeparator()); - ClientRegistry.registerTileEntity(TileEntityThermalEvaporationController.class, "SalinationController", new RenderThermalEvaporationController()); //TODO rename + ClientRegistry.registerTileEntity(TileEntityThermalEvaporationController.class, "ThermalEvaporationController", new RenderThermalEvaporationController()); ClientRegistry.registerTileEntity(TileEntityPrecisionSawmill.class, "PrecisionSawmill", new RenderConfigurableMachine()); - ClientRegistry.registerTileEntity(TileEntityChemicalDissolutionChamber.class, "ChemicalDissolutionChamber", new RenderChemicalDissolutionChamber()); - ClientRegistry.registerTileEntity(TileEntityChemicalWasher.class, "ChemicalWasher", new RenderChemicalWasher()); ClientRegistry.registerTileEntity(TileEntityChemicalCrystallizer.class, "ChemicalCrystallizer", new RenderChemicalCrystallizer()); ClientRegistry.registerTileEntity(TileEntitySeismicVibrator.class, "SeismicVibrator", new RenderSeismicVibrator()); - ClientRegistry.registerTileEntity(TileEntityPRC.class, "PressurizedReactionChamber", new RenderPressurizedReactionChamber()); - ClientRegistry.registerTileEntity(TileEntityFluidTank.class, "PortableTank", new RenderFluidTank()); //TODO rename + ClientRegistry.registerTileEntity(TileEntityPRC.class, "PressurizedReactionChamber", new RenderConfigurableMachine()); + ClientRegistry.registerTileEntity(TileEntityFluidTank.class, "FluidTank", new RenderFluidTank()); ClientRegistry.registerTileEntity(TileEntityFluidicPlenisher.class, "FluidicPlenisher", new RenderFluidicPlenisher()); - //ClientRegistry.registerTileEntity(TileEntityLaser.class, "Laser", new RenderLaser()); - ClientRegistry.registerTileEntity(TileEntityLaserAmplifier.class, "LaserAmplifier", new RenderLaserAmplifier()); - ClientRegistry.registerTileEntity(TileEntityLaserTractorBeam.class, "LaserTractorBeam", new RenderLaserTractorBeam()); - GameRegistry.registerTileEntity(TileEntitySolarNeutronActivator.class, "SolarNeutronActivator"); - GameRegistry.registerTileEntity(TileEntityAmbientAccumulator.class, "AmbientAccumulator"); - GameRegistry.registerTileEntity(TileEntityInductionCasing.class, "InductionCasing"); - GameRegistry.registerTileEntity(TileEntityInductionPort.class, "InductionPort"); - GameRegistry.registerTileEntity(TileEntityInductionCell.class, "InductionCell"); - GameRegistry.registerTileEntity(TileEntityInductionProvider.class, "InductionProvider"); - GameRegistry.registerTileEntity(TileEntityOredictionificator.class, "Oredictionificator"); - GameRegistry.registerTileEntity(TileEntityStructuralGlass.class, "StructuralGlass"); + ClientRegistry.registerTileEntity(TileEntitySolarNeutronActivator.class, "SolarNeutronActivator", new RenderSolarNeutronActivator()); ClientRegistry.registerTileEntity(TileEntityFormulaicAssemblicator.class, "FormulaicAssemblicator", new RenderConfigurableMachine()); ClientRegistry.registerTileEntity(TileEntityResistiveHeater.class, "ResistiveHeater", new RenderResistiveHeater()); ClientRegistry.registerTileEntity(TileEntityBoilerCasing.class, "BoilerCasing", new RenderThermoelectricBoiler()); ClientRegistry.registerTileEntity(TileEntityBoilerValve.class, "BoilerValve", new RenderThermoelectricBoiler()); ClientRegistry.registerTileEntity(TileEntitySecurityDesk.class, "SecurityDesk", new RenderSecurityDesk()); ClientRegistry.registerTileEntity(TileEntityQuantumEntangloporter.class, "QuantumEntangloporter", new RenderQuantumEntangloporter()); - GameRegistry.registerTileEntity(TileEntityFuelwoodHeater.class, "FuelwoodHeater"); + ClientRegistry.registerTileEntity(TileEntityChemicalDissolutionChamber.class, "ChemicalDissolutionChamber", new RenderChemicalDissolutionChamber()); } @Override - public void registerRenderInformation() + public void registerItemRenders() { -//TODO RenderPartTransmitter.init(); -//TODO RenderGlowPanel.init(); - - //Register item handler -//TODO ItemRenderingHandler handler = new ItemRenderingHandler(); - -/*TODO - MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(MekanismBlocks.EnergyCube), handler); - MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(MekanismBlocks.MachineBlock), handler); - MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(MekanismBlocks.MachineBlock2), handler); - MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(MekanismBlocks.MachineBlock3), handler); - MinecraftForgeClient.registerItemRenderer(MekanismItems.Robit, handler); - MinecraftForgeClient.registerItemRenderer(MekanismItems.WalkieTalkie, handler); - MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(MekanismBlocks.GasTank), handler); - MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(MekanismBlocks.ObsidianTNT), handler); - MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(MekanismBlocks.BasicBlock), handler); - MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(MekanismBlocks.BasicBlock2), handler); - MinecraftForgeClient.registerItemRenderer(MekanismItems.Jetpack, handler); - MinecraftForgeClient.registerItemRenderer(MekanismItems.ArmoredJetpack, handler); - MinecraftForgeClient.registerItemRenderer(MekanismItems.PartTransmitter, handler); - MinecraftForgeClient.registerItemRenderer(MekanismItems.GasMask, handler); - MinecraftForgeClient.registerItemRenderer(MekanismItems.ScubaTank, handler); - MinecraftForgeClient.registerItemRenderer(MekanismItems.Balloon, handler); - MinecraftForgeClient.registerItemRenderer(MekanismItems.FreeRunners, handler); - MinecraftForgeClient.registerItemRenderer(MekanismItems.AtomicDisassembler, handler); - MinecraftForgeClient.registerItemRenderer(MekanismItems.GlowPanel, handler); - MinecraftForgeClient.registerItemRenderer(MekanismItems.Flamethrower, handler); - - //Register block handlers - RenderingRegistry.registerBlockHandler(new MachineRenderingHandler()); - RenderingRegistry.registerBlockHandler(new BasicRenderingHandler()); - RenderingRegistry.registerBlockHandler(new PlasticRenderingHandler()); - RenderingRegistry.registerBlockHandler(new CTMRenderingHandler()); -*/ // registerItemRender(MekanismItems.PartTransmitter); registerItemRender(MekanismItems.ElectricBow); registerItemRender(MekanismItems.Dust); @@ -422,17 +377,249 @@ public class ClientProxy extends CommonProxy ModelBakery.registerItemVariants(MekanismItems.WalkieTalkie, ItemWalkieTalkie.OFF_MODEL); - for(int i = 0; i <= 9; i++) + for(int i = 1; i <= 9; i++) { ModelBakery.registerItemVariants(MekanismItems.WalkieTalkie, ItemWalkieTalkie.getModel(i)); } ModelBakery.registerItemVariants(MekanismItems.CraftingFormula, ItemCraftingFormula.MODEL, ItemCraftingFormula.INVALID_MODEL, ItemCraftingFormula.ENCODED_MODEL); + } + + @Override + public void registerBlockRenders() + { + ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(MekanismBlocks.ObsidianTNT), 0, new ModelResourceLocation("mekanism:ObsidianTNT", "inventory")); + ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(MekanismBlocks.SaltBlock), 0, new ModelResourceLocation("mekanism:SaltBlock", "inventory")); + ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(MekanismBlocks.CardboardBox), 0, new ModelResourceLocation("mekanism:CardboardBox", "storage=false")); + ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(MekanismBlocks.CardboardBox), 1, new ModelResourceLocation("mekanism:CardboardBox", "storage=true")); + ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(MekanismBlocks.EnergyCube), 0, new ModelResourceLocation("mekanism:EnergyCube", "inventory")); + + for(MachineType type : MachineType.values()) + { + if(!type.isValidMachine()) + { + continue; + } + + List modelsToAdd = new ArrayList(); + String resource = "mekanism:" + type.getName(); + RecipeType recipePointer = null; + + if(type == MachineType.BASIC_FACTORY || type == MachineType.ADVANCED_FACTORY || type == MachineType.ELITE_FACTORY) + { + recipePointer = RecipeType.values()[0]; + resource = "mekanism:" + type.getName() + "_" + recipePointer.getName(); + } + + while(true) + { + if(machineResources.get(resource) == null) + { + List entries = new ArrayList(); + + if(type.hasActiveTexture()) + { + entries.add("active=false"); + } + + if(type.hasRotations()) + { + entries.add("facing=north"); + } + + String properties = new String(); + + for(int i = 0; i < entries.size(); i++) + { + properties += entries.get(i); + + if(i < entries.size()-1) + { + properties += ","; + } + } + + if(Arrays.asList(CUSTOM_RENDERS).contains(type.getName())) + { + properties = "inventory"; + } + + ModelResourceLocation model = new ModelResourceLocation(resource, properties); + + machineResources.put(resource, model); + modelsToAdd.add(model); + + if(type == MachineType.BASIC_FACTORY || type == MachineType.ADVANCED_FACTORY || type == MachineType.ELITE_FACTORY) + { + if(recipePointer.ordinal() < RecipeType.values().length-1) + { + recipePointer = RecipeType.values()[recipePointer.ordinal()+1]; + resource = "mekanism:" + type.getName() + "_" + recipePointer.getName(); + + continue; + } + } + } + + break; + } + + ModelLoader.registerItemVariants(Item.getItemFromBlock(type.typeBlock.getBlock()), modelsToAdd.toArray(new ModelResourceLocation[] {})); + } + + for(BasicBlockType type : BasicBlockType.values()) + { + List modelsToAdd = new ArrayList(); + String resource = "mekanism:" + type.getName(); + BaseTier tierPointer = null; + + if(type.tiers) + { + tierPointer = BaseTier.values()[0]; + resource = "mekanism:" + type.getName() + "_" + tierPointer.getName(); + } + + while(true) + { + if(basicResources.get(resource) == null) + { + List entries = new ArrayList(); + + if(type.hasActiveTexture()) + { + entries.add("active=false"); + } + + if(type.hasRotations() || type == BasicBlockType.THERMAL_EVAPORATION_CONTROLLER) + { + entries.add("facing=north"); + } + + String properties = new String(); + + for(int i = 0; i < entries.size(); i++) + { + properties += entries.get(i); + + if(i < entries.size()-1) + { + properties += ","; + } + } + + if(type == BasicBlockType.BIN || Arrays.asList(CUSTOM_RENDERS).contains(type.getName())) + { + properties = "inventory"; + } + + ModelResourceLocation model = new ModelResourceLocation(resource, properties); + + basicResources.put(resource, model); + modelsToAdd.add(model); + + if(type.tiers) + { + if(tierPointer.ordinal() < BaseTier.values().length-1) + { + tierPointer = BaseTier.values()[tierPointer.ordinal()+1]; + + if(tierPointer.isObtainable()) + { + resource = "mekanism:" + type.getName() + "_" + tierPointer.getName(); + + continue; + } + } + } + } + + break; + } + + ModelLoader.registerItemVariants(Item.getItemFromBlock(type.blockType.getBlock()), modelsToAdd.toArray(new ModelResourceLocation[] {})); + } + + for(EnumColor color : EnumColor.DYES) + { + ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(MekanismBlocks.PlasticBlock), color.getMetaValue(), new ModelResourceLocation("mekanism:plastic_block", "type=plastic")); + ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(MekanismBlocks.SlickPlasticBlock), color.getMetaValue(), new ModelResourceLocation("mekanism:plastic_block", "type=slick")); + ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(MekanismBlocks.GlowPlasticBlock), color.getMetaValue(), new ModelResourceLocation("mekanism:plastic_block", "type=glow")); + ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(MekanismBlocks.ReinforcedPlasticBlock), color.getMetaValue(), new ModelResourceLocation("mekanism:plastic_block", "type=reinforced")); + ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(MekanismBlocks.RoadPlasticBlock), color.getMetaValue(), new ModelResourceLocation("mekanism:plastic_block", "type=road")); + ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(MekanismBlocks.PlasticFence), color.getMetaValue(), new ModelResourceLocation("mekanism:PlasticFence", "inventory")); + } + + for(EnumOreType ore : EnumOreType.values()) + { + ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(MekanismBlocks.OreBlock), ore.ordinal(), new ModelResourceLocation("mekanism:OreBlock", "type=" + ore.getName())); + } + + ModelLoader.setCustomMeshDefinition(Item.getItemFromBlock(MekanismBlocks.GasTank), new ItemMeshDefinition() { + @Override + public ModelResourceLocation getModelLocation(ItemStack stack) + { + GasTankTier tier = GasTankTier.values()[((ItemBlockGasTank)stack.getItem()).getBaseTier(stack).ordinal()]; + ResourceLocation baseLocation = new ResourceLocation("mekanism", "GasTank"); + + return new ModelResourceLocation(baseLocation, "facing=north,tier="+tier); + } + }); + + ItemMeshDefinition machineMesher = new ItemMeshDefinition() { + @Override + public ModelResourceLocation getModelLocation(ItemStack stack) + { + MachineType type = MachineType.get(stack); + + if(type != null) + { + String resource = "mekanism:" + type.getName(); + + if(type == MachineType.BASIC_FACTORY || type == MachineType.ADVANCED_FACTORY || type == MachineType.ELITE_FACTORY) + { + RecipeType recipe = RecipeType.values()[((ItemBlockMachine)stack.getItem()).getRecipeType(stack)]; + resource = "mekanism:" + type.getName() + "_" + recipe.getName(); + } + + return machineResources.get(resource); + } + + return null; + } + }; + + ModelLoader.setCustomMeshDefinition(Item.getItemFromBlock(MekanismBlocks.MachineBlock), machineMesher); + ModelLoader.setCustomMeshDefinition(Item.getItemFromBlock(MekanismBlocks.MachineBlock2), machineMesher); + ModelLoader.setCustomMeshDefinition(Item.getItemFromBlock(MekanismBlocks.MachineBlock3), machineMesher); + + ItemMeshDefinition basicMesher = new ItemMeshDefinition() { + @Override + public ModelResourceLocation getModelLocation(ItemStack stack) + { + BasicBlockType type = BasicBlockType.get(stack); + + if(type != null) + { + String resource = "mekanism:" + type.getName(); + + if(type.tiers) + { + BaseTier tier = ((ItemBlockBasic)stack.getItem()).getBaseTier(stack); + resource = "mekanism:" + type.getName() + "_" + tier.getName(); + } + + return basicResources.get(resource); + } + + return null; + } + }; + + ModelLoader.setCustomMeshDefinition(Item.getItemFromBlock(MekanismBlocks.BasicBlock), basicMesher); + ModelLoader.setCustomMeshDefinition(Item.getItemFromBlock(MekanismBlocks.BasicBlock2), basicMesher); OBJLoader.instance.addDomain("mekanism"); - - Mekanism.logger.info("Render registrations complete."); } public void registerItemRender(Item item) @@ -609,7 +796,7 @@ public class ClientProxy extends CommonProxy { if(Minecraft.getMinecraft().theWorld != null) { - Minecraft.getMinecraft().effectRenderer.addBlockHitEffects(coord, mop); + Minecraft.getMinecraft().effectRenderer.addBlockHitEffects(coord.getPos(), mop); } } @@ -645,13 +832,29 @@ public class ClientProxy extends CommonProxy HolidayManager.init(); } + + @SubscribeEvent + public void onModelBake(ModelBakeEvent event) throws IOException + { + for(String s : CUSTOM_RENDERS) + { + ModelResourceLocation model = new ModelResourceLocation("mekanism:" + s, "inventory"); + Object obj = event.modelRegistry.getObject(model); + + if(obj instanceof IBakedModel) + { + event.modelRegistry.putObject(model, new CustomItemModelFactory((IBakedModel)obj)); + } + } + } @Override public void preInit() { MekanismRenderer.init(); - MinecraftForge.EVENT_BUS.register(new TextureStitcher()); + MinecraftForge.EVENT_BUS.register(new CTMRegistry()); + MinecraftForge.EVENT_BUS.register(this); //Register entity rendering handlers RenderingRegistry.registerEntityRenderingHandler(EntityObsidianTNT.class, new IRenderFactory() { diff --git a/src/main/java/mekanism/client/ClientTickHandler.java b/src/main/java/mekanism/client/ClientTickHandler.java index 2d5799eec..8951fe084 100644 --- a/src/main/java/mekanism/client/ClientTickHandler.java +++ b/src/main/java/mekanism/client/ClientTickHandler.java @@ -14,12 +14,13 @@ import java.util.Set; import mekanism.api.IClientTicker; import mekanism.api.MekanismConfig.client; +import mekanism.api.ObfuscatedNames; import mekanism.api.gas.GasStack; +import mekanism.api.util.ReflectionUtils; import mekanism.client.sound.SoundHandler; import mekanism.common.CommonPlayerTickHandler; import mekanism.common.KeySync; import mekanism.common.Mekanism; -import mekanism.common.ObfuscatedNames; import mekanism.common.item.ItemFlamethrower; import mekanism.common.item.ItemFreeRunners; import mekanism.common.item.ItemGasMask; @@ -390,13 +391,13 @@ public class ClientTickHandler public static void setCape(AbstractClientPlayer player, ResourceLocation cape) { try { - Method m = MekanismUtils.getPrivateMethod(AbstractClientPlayer.class, ObfuscatedNames.AbstractClientPlayer_getPlayerInfo); + Method m = ReflectionUtils.getPrivateMethod(AbstractClientPlayer.class, ObfuscatedNames.AbstractClientPlayer_getPlayerInfo); Object obj = m.invoke(player); if(obj instanceof NetworkPlayerInfo) { NetworkPlayerInfo info = (NetworkPlayerInfo)obj; - MekanismUtils.setPrivateValue(info, cape, NetworkPlayerInfo.class, ObfuscatedNames.NetworkPlayerInfo_locationCape); + ReflectionUtils.setPrivateValue(info, cape, NetworkPlayerInfo.class, ObfuscatedNames.NetworkPlayerInfo_locationCape); } } catch(Exception e) {} } diff --git a/src/main/java/mekanism/client/SparkleAnimation.java b/src/main/java/mekanism/client/SparkleAnimation.java index 5230ca4a4..bab827f14 100644 --- a/src/main/java/mekanism/client/SparkleAnimation.java +++ b/src/main/java/mekanism/client/SparkleAnimation.java @@ -52,12 +52,12 @@ public class SparkleAnimation { for(int i = 0; i < 6; i++) { - world.spawnParticle(EnumParticleTypes.REDSTONE, coord.getX() + random.nextDouble(), coord.getY() + -.01, coord.getZ() + random.nextDouble(), 0, 0, 0); - world.spawnParticle(EnumParticleTypes.REDSTONE, coord.getX() + random.nextDouble(), coord.getY() + 1.01, coord.getZ() + random.nextDouble(), 0, 0, 0); - world.spawnParticle(EnumParticleTypes.REDSTONE, coord.getX() + random.nextDouble(), coord.getY() + random.nextDouble(), coord.getZ() + -.01, 0, 0, 0); - world.spawnParticle(EnumParticleTypes.REDSTONE, coord.getX() + random.nextDouble(), coord.getY() + random.nextDouble(), coord.getZ() + 1.01, 0, 0, 0); - world.spawnParticle(EnumParticleTypes.REDSTONE, coord.getX() + -.01, coord.getY() + random.nextDouble(), coord.getZ() + random.nextDouble(), 0, 0, 0); - world.spawnParticle(EnumParticleTypes.REDSTONE, coord.getX() + 1.01, coord.getY() + random.nextDouble(), coord.getZ() + random.nextDouble(), 0, 0, 0); + world.spawnParticle(EnumParticleTypes.REDSTONE, coord.xCoord + random.nextDouble(), coord.yCoord + -.01, coord.zCoord + random.nextDouble(), 0, 0, 0); + world.spawnParticle(EnumParticleTypes.REDSTONE, coord.xCoord + random.nextDouble(), coord.yCoord + 1.01, coord.zCoord + random.nextDouble(), 0, 0, 0); + world.spawnParticle(EnumParticleTypes.REDSTONE, coord.xCoord + random.nextDouble(), coord.yCoord + random.nextDouble(), coord.zCoord + -.01, 0, 0, 0); + world.spawnParticle(EnumParticleTypes.REDSTONE, coord.xCoord + random.nextDouble(), coord.yCoord + random.nextDouble(), coord.zCoord + 1.01, 0, 0, 0); + world.spawnParticle(EnumParticleTypes.REDSTONE, coord.xCoord + -.01, coord.yCoord + random.nextDouble(), coord.zCoord + random.nextDouble(), 0, 0, 0); + world.spawnParticle(EnumParticleTypes.REDSTONE, coord.xCoord + 1.01, coord.yCoord + random.nextDouble(), coord.zCoord + random.nextDouble(), 0, 0, 0); } } } diff --git a/src/main/java/mekanism/client/entity/EntityLaser.java b/src/main/java/mekanism/client/entity/EntityLaser.java index ec4967563..9f96f6656 100644 --- a/src/main/java/mekanism/client/entity/EntityLaser.java +++ b/src/main/java/mekanism/client/entity/EntityLaser.java @@ -4,20 +4,18 @@ import mekanism.api.Pos3D; import mekanism.client.render.MekanismRenderer; import net.minecraft.client.Minecraft; import net.minecraft.client.particle.EntityFX; -import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.WorldRenderer; import net.minecraft.client.renderer.vertex.DefaultVertexFormats; -import net.minecraft.client.renderer.vertex.VertexFormat; import net.minecraft.entity.Entity; +import net.minecraft.util.EnumFacing; import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; -import net.minecraft.util.EnumFacing; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class EntityLaser extends EntityFX { @@ -42,7 +40,7 @@ public class EntityLaser extends EntityFX { worldRendererIn.finishDrawing(); - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glPushAttrib(GL11.GL_POLYGON_BIT + GL11.GL_ENABLE_BIT); GL11.glDisable(GL11.GL_CULL_FACE); MekanismRenderer.glowOn(); @@ -52,7 +50,7 @@ public class EntityLaser extends EntityFX float newY = (float)(this.prevPosY + (this.posY - this.prevPosY) * (double)partialTicks - interpPosY); float newZ = (float)(this.prevPosZ + (this.posZ - this.prevPosZ) * (double)partialTicks - interpPosZ); - GL11.glTranslatef(newX, newY, newZ); + GlStateManager.translate(newX, newY, newZ); switch(direction) { @@ -62,14 +60,15 @@ public class EntityLaser extends EntityFX break; case WEST: case EAST: - GL11.glRotated(90, 0, 0, 1); + GlStateManager.rotate(90, 0, 0, 1); break; case NORTH: case SOUTH: - GL11.glRotated(90, 1, 0, 0); + GlStateManager.rotate(90, 1, 0, 0); break; } - GL11.glRotated(45, 0, 1, 0); + + GlStateManager.rotate(45, 0, 1, 0); worldRendererIn.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR); worldRendererIn.pos(-particleScale, -length/2, 0).tex(0, 0).color(particleRed, particleGreen, particleBlue, particleAlpha).endVertex(); worldRendererIn.pos(-particleScale, length/2, 0).tex(0, 1).color(particleRed, particleGreen, particleBlue, particleAlpha).endVertex(); @@ -77,7 +76,7 @@ public class EntityLaser extends EntityFX worldRendererIn.pos(particleScale, -length/2, 0).tex(1, 0).color(particleRed, particleGreen, particleBlue, particleAlpha).endVertex(); worldRendererIn.finishDrawing(); - GL11.glRotated(90, 0, 1, 0); + GlStateManager.rotate(90, 0, 1, 0); worldRendererIn.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR); worldRendererIn.pos(-particleScale, -length/2, 0).tex(0, 0).color(particleRed, particleGreen, particleBlue, particleAlpha).endVertex(); worldRendererIn.pos(-particleScale, length/2, 0).tex(0, 1).color(particleRed, particleGreen, particleBlue, particleAlpha).endVertex(); @@ -87,7 +86,7 @@ public class EntityLaser extends EntityFX MekanismRenderer.glowOff(); GL11.glPopAttrib(); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); Minecraft.getMinecraft().renderEngine.bindTexture(MekanismRenderer.getBlocksTexture()); worldRendererIn.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR); diff --git a/src/main/java/mekanism/client/gui/GuiAdvancedElectricMachine.java b/src/main/java/mekanism/client/gui/GuiAdvancedElectricMachine.java index 81d3a7eb3..ae8632dd3 100644 --- a/src/main/java/mekanism/client/gui/GuiAdvancedElectricMachine.java +++ b/src/main/java/mekanism/client/gui/GuiAdvancedElectricMachine.java @@ -24,12 +24,11 @@ import mekanism.common.tile.TileEntityAdvancedElectricMachine; import mekanism.common.util.LangUtils; import mekanism.common.util.MekanismUtils; import net.minecraft.entity.player.InventoryPlayer; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiAdvancedElectricMachine extends GuiMekanism { diff --git a/src/main/java/mekanism/client/gui/GuiBoilerStats.java b/src/main/java/mekanism/client/gui/GuiBoilerStats.java index e23e5161a..0c5876093 100644 --- a/src/main/java/mekanism/client/gui/GuiBoilerStats.java +++ b/src/main/java/mekanism/client/gui/GuiBoilerStats.java @@ -19,12 +19,11 @@ import mekanism.common.util.LangUtils; import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.entity.player.InventoryPlayer; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiBoilerStats extends GuiMekanism { diff --git a/src/main/java/mekanism/client/gui/GuiChanceMachine.java b/src/main/java/mekanism/client/gui/GuiChanceMachine.java index 9fdca649c..c334cb19f 100644 --- a/src/main/java/mekanism/client/gui/GuiChanceMachine.java +++ b/src/main/java/mekanism/client/gui/GuiChanceMachine.java @@ -22,12 +22,11 @@ import mekanism.common.tile.TileEntityChanceMachine; import mekanism.common.util.LangUtils; import mekanism.common.util.MekanismUtils; import net.minecraft.entity.player.InventoryPlayer; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiChanceMachine extends GuiMekanism { diff --git a/src/main/java/mekanism/client/gui/GuiChemicalCrystallizer.java b/src/main/java/mekanism/client/gui/GuiChemicalCrystallizer.java index 0de4a869d..ae8916bd0 100644 --- a/src/main/java/mekanism/client/gui/GuiChemicalCrystallizer.java +++ b/src/main/java/mekanism/client/gui/GuiChemicalCrystallizer.java @@ -30,16 +30,16 @@ import mekanism.common.tile.TileEntityChemicalCrystallizer; import mekanism.common.util.LangUtils; import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.oredict.OreDictionary; import org.lwjgl.opengl.GL11; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - @SideOnly(Side.CLIENT) public class GuiChemicalCrystallizer extends GuiMekanism { @@ -127,11 +127,11 @@ public class GuiChemicalCrystallizer extends GuiMekanism if(renderStack != null) { try { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glEnable(GL11.GL_LIGHTING); itemRender.renderItemAndEffectIntoGUI(renderStack, 131, 14); GL11.glDisable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } catch(Exception e) {} } diff --git a/src/main/java/mekanism/client/gui/GuiChemicalDissolutionChamber.java b/src/main/java/mekanism/client/gui/GuiChemicalDissolutionChamber.java index 007e50e8e..a299c0241 100644 --- a/src/main/java/mekanism/client/gui/GuiChemicalDissolutionChamber.java +++ b/src/main/java/mekanism/client/gui/GuiChemicalDissolutionChamber.java @@ -7,13 +7,13 @@ import mekanism.api.util.ListUtils; import mekanism.client.gui.element.GuiElement.IInfoHandler; import mekanism.client.gui.element.GuiEnergyInfo; import mekanism.client.gui.element.GuiGasGauge; -import mekanism.client.gui.element.GuiSecurityTab; import mekanism.client.gui.element.GuiGasGauge.IGasInfoHandler; import mekanism.client.gui.element.GuiGauge; import mekanism.client.gui.element.GuiProgress; import mekanism.client.gui.element.GuiProgress.IProgressInfoHandler; import mekanism.client.gui.element.GuiProgress.ProgressBar; import mekanism.client.gui.element.GuiRedstoneControl; +import mekanism.client.gui.element.GuiSecurityTab; import mekanism.client.gui.element.GuiSlot; import mekanism.client.gui.element.GuiSlot.SlotOverlay; import mekanism.client.gui.element.GuiSlot.SlotType; @@ -24,12 +24,11 @@ import mekanism.common.util.LangUtils; import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.entity.player.InventoryPlayer; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiChemicalDissolutionChamber extends GuiMekanism { diff --git a/src/main/java/mekanism/client/gui/GuiChemicalInfuser.java b/src/main/java/mekanism/client/gui/GuiChemicalInfuser.java index 9e7d5b188..2208988b3 100644 --- a/src/main/java/mekanism/client/gui/GuiChemicalInfuser.java +++ b/src/main/java/mekanism/client/gui/GuiChemicalInfuser.java @@ -24,12 +24,11 @@ import mekanism.common.util.LangUtils; import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.entity.player.InventoryPlayer; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiChemicalInfuser extends GuiMekanism { diff --git a/src/main/java/mekanism/client/gui/GuiChemicalOxidizer.java b/src/main/java/mekanism/client/gui/GuiChemicalOxidizer.java index cfe8c24bb..9cc16820d 100644 --- a/src/main/java/mekanism/client/gui/GuiChemicalOxidizer.java +++ b/src/main/java/mekanism/client/gui/GuiChemicalOxidizer.java @@ -24,12 +24,11 @@ import mekanism.common.util.LangUtils; import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.entity.player.InventoryPlayer; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiChemicalOxidizer extends GuiMekanism { diff --git a/src/main/java/mekanism/client/gui/GuiChemicalWasher.java b/src/main/java/mekanism/client/gui/GuiChemicalWasher.java index 78927cea2..becd2a6a8 100644 --- a/src/main/java/mekanism/client/gui/GuiChemicalWasher.java +++ b/src/main/java/mekanism/client/gui/GuiChemicalWasher.java @@ -29,12 +29,11 @@ import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.entity.player.InventoryPlayer; import net.minecraftforge.fluids.FluidTank; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiChemicalWasher extends GuiMekanism { diff --git a/src/main/java/mekanism/client/gui/GuiDictionary.java b/src/main/java/mekanism/client/gui/GuiDictionary.java index 2198cc7b5..1b633ccb4 100644 --- a/src/main/java/mekanism/client/gui/GuiDictionary.java +++ b/src/main/java/mekanism/client/gui/GuiDictionary.java @@ -8,16 +8,16 @@ import mekanism.common.inventory.container.ContainerDictionary; import mekanism.common.util.LangUtils; import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.input.Keyboard; import org.lwjgl.opengl.GL11; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - @SideOnly(Side.CLIENT) public class GuiDictionary extends GuiMekanism { @@ -43,11 +43,11 @@ public class GuiDictionary extends GuiMekanism if(itemType != null) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glEnable(GL11.GL_LIGHTING); itemRender.renderItemAndEffectIntoGUI(itemType, 6, 6); GL11.glDisable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } super.drawGuiContainerForegroundLayer(mouseX, mouseY); @@ -67,7 +67,7 @@ public class GuiDictionary extends GuiMekanism if(xAxis >= 6 && xAxis <= 22 && yAxis >= 6 && yAxis <= 22) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_DEPTH_TEST); @@ -77,7 +77,7 @@ public class GuiDictionary extends GuiMekanism GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_DEPTH_TEST); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } super.drawGuiContainerBackgroundLayer(partialTick, mouseX, mouseY); diff --git a/src/main/java/mekanism/client/gui/GuiDigitalMiner.java b/src/main/java/mekanism/client/gui/GuiDigitalMiner.java index fb6a49e60..d10e243da 100644 --- a/src/main/java/mekanism/client/gui/GuiDigitalMiner.java +++ b/src/main/java/mekanism/client/gui/GuiDigitalMiner.java @@ -5,7 +5,6 @@ import java.util.ArrayList; import java.util.List; import mekanism.api.Coord4D; -import mekanism.api.EnumColor; import mekanism.api.util.ListUtils; import mekanism.client.gui.element.GuiElement.IInfoHandler; import mekanism.client.gui.element.GuiEnergyInfo; @@ -30,14 +29,14 @@ import mekanism.common.util.LangUtils; import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.InventoryPlayer; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - @SideOnly(Side.CLIENT) public class GuiDigitalMiner extends GuiMekanism { @@ -183,7 +182,7 @@ public class GuiDigitalMiner extends GuiMekanism if(tileEntity.missingStack != null) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glColor4f(1, 1, 1, 1); GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL12.GL_RESCALE_NORMAL); @@ -194,7 +193,7 @@ public class GuiDigitalMiner extends GuiMekanism itemRender.renderItemAndEffectIntoGUI(tileEntity.missingStack, 144, 27); GL11.glDisable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } else { mc.getTextureManager().bindTexture(MekanismUtils.getResource(ResourceType.GUI_ELEMENT, "GuiSlot.png")); diff --git a/src/main/java/mekanism/client/gui/GuiDigitalMinerConfig.java b/src/main/java/mekanism/client/gui/GuiDigitalMinerConfig.java index 470f0134b..8c418be99 100644 --- a/src/main/java/mekanism/client/gui/GuiDigitalMinerConfig.java +++ b/src/main/java/mekanism/client/gui/GuiDigitalMinerConfig.java @@ -29,16 +29,16 @@ import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiTextField; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.input.Keyboard; import org.lwjgl.input.Mouse; import org.lwjgl.opengl.GL11; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - @SideOnly(Side.CLIENT) public class GuiDigitalMinerConfig extends GuiMekanism { @@ -464,11 +464,11 @@ public class GuiDigitalMinerConfig extends GuiMekanism if(itemFilter.itemType != null) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glEnable(GL11.GL_LIGHTING); itemRender.renderItemAndEffectIntoGUI(itemFilter.itemType, 59, yStart + 3); GL11.glDisable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } fontRendererObj.drawString(LangUtils.localize("gui.itemFilter"), 78, yStart + 2, 0x404040); @@ -485,11 +485,11 @@ public class GuiDigitalMinerConfig extends GuiMekanism if(oreDictStacks.get(filter).renderStack != null) { try { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glEnable(GL11.GL_LIGHTING); itemRender.renderItemAndEffectIntoGUI(oreDictStacks.get(filter).renderStack, 59, yStart + 3); GL11.glDisable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } catch(Exception e) {} } @@ -501,11 +501,11 @@ public class GuiDigitalMinerConfig extends GuiMekanism if(itemFilter.materialItem != null) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glEnable(GL11.GL_LIGHTING); itemRender.renderItemAndEffectIntoGUI(itemFilter.materialItem, 59, yStart + 3); GL11.glDisable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } fontRendererObj.drawString(LangUtils.localize("gui.materialFilter"), 78, yStart + 2, 0x404040); @@ -522,11 +522,11 @@ public class GuiDigitalMinerConfig extends GuiMekanism if(modIDStacks.get(filter).renderStack != null) { try { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glEnable(GL11.GL_LIGHTING); itemRender.renderItemAndEffectIntoGUI(modIDStacks.get(filter).renderStack, 59, yStart + 3); GL11.glDisable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } catch(Exception e) {} } diff --git a/src/main/java/mekanism/client/gui/GuiDynamicTank.java b/src/main/java/mekanism/client/gui/GuiDynamicTank.java index c7fa039a2..7f2442c81 100644 --- a/src/main/java/mekanism/client/gui/GuiDynamicTank.java +++ b/src/main/java/mekanism/client/gui/GuiDynamicTank.java @@ -11,12 +11,11 @@ import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.entity.player.InventoryPlayer; import net.minecraftforge.fluids.FluidStack; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiDynamicTank extends GuiMekanism { diff --git a/src/main/java/mekanism/client/gui/GuiElectricMachine.java b/src/main/java/mekanism/client/gui/GuiElectricMachine.java index 3722cdeb1..e62720f83 100644 --- a/src/main/java/mekanism/client/gui/GuiElectricMachine.java +++ b/src/main/java/mekanism/client/gui/GuiElectricMachine.java @@ -22,12 +22,11 @@ import mekanism.common.tile.TileEntityElectricMachine; import mekanism.common.util.LangUtils; import mekanism.common.util.MekanismUtils; import net.minecraft.entity.player.InventoryPlayer; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiElectricMachine extends GuiMekanism { diff --git a/src/main/java/mekanism/client/gui/GuiElectricPump.java b/src/main/java/mekanism/client/gui/GuiElectricPump.java index 1ac6cbdaf..21b328da0 100644 --- a/src/main/java/mekanism/client/gui/GuiElectricPump.java +++ b/src/main/java/mekanism/client/gui/GuiElectricPump.java @@ -23,12 +23,11 @@ import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fluids.FluidTank; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiElectricPump extends GuiMekanism { diff --git a/src/main/java/mekanism/client/gui/GuiElectrolyticSeparator.java b/src/main/java/mekanism/client/gui/GuiElectrolyticSeparator.java index b568b2518..3af5ff8a0 100755 --- a/src/main/java/mekanism/client/gui/GuiElectrolyticSeparator.java +++ b/src/main/java/mekanism/client/gui/GuiElectrolyticSeparator.java @@ -1,5 +1,6 @@ package mekanism.client.gui; +import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -34,13 +35,11 @@ import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.entity.player.InventoryPlayer; import net.minecraftforge.fluids.FluidTank; - -import org.lwjgl.opengl.GL11; - -import java.io.IOException; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiElectrolyticSeparator extends GuiMekanism { diff --git a/src/main/java/mekanism/client/gui/GuiEnergyCube.java b/src/main/java/mekanism/client/gui/GuiEnergyCube.java index 3c7d6fc86..3b7823e82 100644 --- a/src/main/java/mekanism/client/gui/GuiEnergyCube.java +++ b/src/main/java/mekanism/client/gui/GuiEnergyCube.java @@ -21,12 +21,11 @@ import mekanism.common.util.LangUtils; import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.entity.player.InventoryPlayer; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiEnergyCube extends GuiMekanism { diff --git a/src/main/java/mekanism/client/gui/GuiFactory.java b/src/main/java/mekanism/client/gui/GuiFactory.java index d6d1b0af3..9cdb23c9a 100644 --- a/src/main/java/mekanism/client/gui/GuiFactory.java +++ b/src/main/java/mekanism/client/gui/GuiFactory.java @@ -26,17 +26,15 @@ import mekanism.common.network.PacketTileEntity.TileEntityMessage; import mekanism.common.tile.TileEntityFactory; import mekanism.common.util.LangUtils; import mekanism.common.util.MekanismUtils; - import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.input.Keyboard; import org.lwjgl.opengl.GL11; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - @SideOnly(Side.CLIENT) public class GuiFactory extends GuiMekanism { diff --git a/src/main/java/mekanism/client/gui/GuiFluidTank.java b/src/main/java/mekanism/client/gui/GuiFluidTank.java index 86e83b999..161342a15 100644 --- a/src/main/java/mekanism/client/gui/GuiFluidTank.java +++ b/src/main/java/mekanism/client/gui/GuiFluidTank.java @@ -14,12 +14,11 @@ import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.entity.player.InventoryPlayer; import net.minecraftforge.fluids.FluidTank; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiFluidTank extends GuiMekanism { diff --git a/src/main/java/mekanism/client/gui/GuiFluidicPlenisher.java b/src/main/java/mekanism/client/gui/GuiFluidicPlenisher.java index 1e21e00dc..22380fc34 100644 --- a/src/main/java/mekanism/client/gui/GuiFluidicPlenisher.java +++ b/src/main/java/mekanism/client/gui/GuiFluidicPlenisher.java @@ -23,12 +23,11 @@ import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fluids.FluidTank; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiFluidicPlenisher extends GuiMekanism { diff --git a/src/main/java/mekanism/client/gui/GuiFormulaicAssemblicator.java b/src/main/java/mekanism/client/gui/GuiFormulaicAssemblicator.java index f6e08e456..5cc36acb5 100644 --- a/src/main/java/mekanism/client/gui/GuiFormulaicAssemblicator.java +++ b/src/main/java/mekanism/client/gui/GuiFormulaicAssemblicator.java @@ -27,16 +27,16 @@ import mekanism.common.tile.TileEntityFormulaicAssemblicator; import mekanism.common.util.LangUtils; import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiFormulaicAssemblicator extends GuiMekanism { @@ -200,7 +200,7 @@ public class GuiFormulaicAssemblicator extends GuiMekanism if(stack != null) { Slot slot = (Slot)inventorySlots.inventorySlots.get(i+20); - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); if(slot.getStack() == null || !slot.getStack().isItemEqual(stack)) { @@ -213,7 +213,7 @@ public class GuiFormulaicAssemblicator extends GuiMekanism itemRender.renderItemAndEffectIntoGUI(stack, guiWidth + slot.xDisplayPosition, guiHeight + slot.yDisplayPosition); MekanismRenderer.blendOff(); GL11.glDisable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } } } diff --git a/src/main/java/mekanism/client/gui/GuiFuelwoodHeater.java b/src/main/java/mekanism/client/gui/GuiFuelwoodHeater.java index 634ce007c..5e564399c 100644 --- a/src/main/java/mekanism/client/gui/GuiFuelwoodHeater.java +++ b/src/main/java/mekanism/client/gui/GuiFuelwoodHeater.java @@ -17,12 +17,11 @@ import mekanism.common.util.LangUtils; import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.entity.player.InventoryPlayer; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiFuelwoodHeater extends GuiMekanism { diff --git a/src/main/java/mekanism/client/gui/GuiGasTank.java b/src/main/java/mekanism/client/gui/GuiGasTank.java index e2420e394..4cde3fa82 100644 --- a/src/main/java/mekanism/client/gui/GuiGasTank.java +++ b/src/main/java/mekanism/client/gui/GuiGasTank.java @@ -20,12 +20,11 @@ import mekanism.common.util.LangUtils; import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.entity.player.InventoryPlayer; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiGasTank extends GuiMekanism { diff --git a/src/main/java/mekanism/client/gui/GuiInductionMatrix.java b/src/main/java/mekanism/client/gui/GuiInductionMatrix.java index 3056b5ad6..988c8dc86 100644 --- a/src/main/java/mekanism/client/gui/GuiInductionMatrix.java +++ b/src/main/java/mekanism/client/gui/GuiInductionMatrix.java @@ -14,12 +14,11 @@ import mekanism.common.util.LangUtils; import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.entity.player.InventoryPlayer; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiInductionMatrix extends GuiMekanism { diff --git a/src/main/java/mekanism/client/gui/GuiLaserAmplifier.java b/src/main/java/mekanism/client/gui/GuiLaserAmplifier.java index 2e27b0b2b..fe39b4e07 100644 --- a/src/main/java/mekanism/client/gui/GuiLaserAmplifier.java +++ b/src/main/java/mekanism/client/gui/GuiLaserAmplifier.java @@ -19,15 +19,14 @@ import mekanism.common.util.LangUtils; import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.client.gui.GuiTextField; -import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.client.renderer.texture.TextureAtlasSprite; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.input.Keyboard; import org.lwjgl.opengl.GL11; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - @SideOnly(Side.CLIENT) public class GuiLaserAmplifier extends GuiMekanism { diff --git a/src/main/java/mekanism/client/gui/GuiLogisticalSorter.java b/src/main/java/mekanism/client/gui/GuiLogisticalSorter.java index 456eb43dd..ca23b0e40 100644 --- a/src/main/java/mekanism/client/gui/GuiLogisticalSorter.java +++ b/src/main/java/mekanism/client/gui/GuiLogisticalSorter.java @@ -30,17 +30,17 @@ import mekanism.common.util.LangUtils; import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.input.Keyboard; import org.lwjgl.input.Mouse; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - @SideOnly(Side.CLIENT) public class GuiLogisticalSorter extends GuiMekanism { @@ -470,11 +470,11 @@ public class GuiLogisticalSorter extends GuiMekanism if(itemFilter.itemType != null) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glEnable(GL11.GL_LIGHTING); itemRender.renderItemAndEffectIntoGUI(itemFilter.itemType, 59, yStart + 3); GL11.glDisable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } fontRendererObj.drawString(LangUtils.localize("gui.itemFilter"), 78, yStart + 2, 0x404040); @@ -492,11 +492,11 @@ public class GuiLogisticalSorter extends GuiMekanism if(oreDictStacks.get(filter).renderStack != null) { try { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glEnable(GL11.GL_LIGHTING); itemRender.renderItemAndEffectIntoGUI(oreDictStacks.get(filter).renderStack, 59, yStart + 3); GL11.glDisable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } catch(final Exception e) {} } @@ -509,11 +509,11 @@ public class GuiLogisticalSorter extends GuiMekanism if(itemFilter.materialItem != null) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glEnable(GL11.GL_LIGHTING); itemRender.renderItemAndEffectIntoGUI(itemFilter.materialItem, 59, yStart + 3); GL11.glDisable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } fontRendererObj.drawString(LangUtils.localize("gui.materialFilter"), 78, yStart + 2, 0x404040); @@ -531,11 +531,11 @@ public class GuiLogisticalSorter extends GuiMekanism if(modIDStacks.get(filter).renderStack != null) { try { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glEnable(GL11.GL_LIGHTING); itemRender.renderItemAndEffectIntoGUI(modIDStacks.get(filter).renderStack, 59, yStart + 3); GL11.glDisable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } catch(final Exception e) {} } @@ -566,7 +566,7 @@ public class GuiLogisticalSorter extends GuiMekanism if(tileEntity.color != null) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glColor4f(1, 1, 1, 1); GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL12.GL_RESCALE_NORMAL); @@ -575,7 +575,7 @@ public class GuiLogisticalSorter extends GuiMekanism //TODO itemRender.renderIcon(13, 137, MekanismRenderer.getColorIcon(tileEntity.color), 16, 16); GL11.glDisable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } // Draw tooltips for buttons diff --git a/src/main/java/mekanism/client/gui/GuiMFilterSelect.java b/src/main/java/mekanism/client/gui/GuiMFilterSelect.java index a86f1f9c9..2d3485ac0 100644 --- a/src/main/java/mekanism/client/gui/GuiMFilterSelect.java +++ b/src/main/java/mekanism/client/gui/GuiMFilterSelect.java @@ -14,12 +14,11 @@ import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.client.gui.GuiButton; import net.minecraft.entity.player.EntityPlayer; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiMFilterSelect extends GuiMekanism { diff --git a/src/main/java/mekanism/client/gui/GuiMItemStackFilter.java b/src/main/java/mekanism/client/gui/GuiMItemStackFilter.java index bd80dbfa5..c669a773a 100644 --- a/src/main/java/mekanism/client/gui/GuiMItemStackFilter.java +++ b/src/main/java/mekanism/client/gui/GuiMItemStackFilter.java @@ -18,17 +18,17 @@ import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.block.Block; import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.input.Keyboard; import org.lwjgl.opengl.GL11; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - @SideOnly(Side.CLIENT) public class GuiMItemStackFilter extends GuiMekanism { @@ -128,20 +128,20 @@ public class GuiMItemStackFilter extends GuiMekanism if(filter.itemType != null) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glEnable(GL11.GL_LIGHTING); itemRender.renderItemAndEffectIntoGUI(filter.itemType, 12, 19); GL11.glDisable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } if(filter.replaceStack != null) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glEnable(GL11.GL_LIGHTING); itemRender.renderItemAndEffectIntoGUI(filter.replaceStack, 149, 19); GL11.glDisable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } if(xAxis >= 148 && xAxis <= 162 && yAxis >= 45 && yAxis <= 59) @@ -211,7 +211,7 @@ public class GuiMItemStackFilter extends GuiMekanism if(xAxis >= 12 && xAxis <= 28 && yAxis >= 19 && yAxis <= 35) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_DEPTH_TEST); @@ -221,12 +221,12 @@ public class GuiMItemStackFilter extends GuiMekanism GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_DEPTH_TEST); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } if(xAxis >= 149 && xAxis <= 165 && yAxis >= 19 && yAxis <= 35) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glPushAttrib(GL11.GL_LIGHTING_BIT); GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_DEPTH_TEST); @@ -236,7 +236,7 @@ public class GuiMItemStackFilter extends GuiMekanism drawGradientRect(x, y, x + 16, y + 16, -2130706433, -2130706433); GL11.glPopAttrib(); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } } diff --git a/src/main/java/mekanism/client/gui/GuiMMaterialFilter.java b/src/main/java/mekanism/client/gui/GuiMMaterialFilter.java index 829149e90..7b68b84ee 100644 --- a/src/main/java/mekanism/client/gui/GuiMMaterialFilter.java +++ b/src/main/java/mekanism/client/gui/GuiMMaterialFilter.java @@ -18,17 +18,17 @@ import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.block.Block; import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.input.Keyboard; import org.lwjgl.opengl.GL11; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - @SideOnly(Side.CLIENT) public class GuiMMaterialFilter extends GuiMekanism { @@ -128,20 +128,20 @@ public class GuiMMaterialFilter extends GuiMekanism if(filter.materialItem != null) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glEnable(GL11.GL_LIGHTING); itemRender.renderItemAndEffectIntoGUI(filter.materialItem, 12, 19); GL11.glDisable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } if(filter.replaceStack != null) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glEnable(GL11.GL_LIGHTING); itemRender.renderItemAndEffectIntoGUI(filter.replaceStack, 149, 19); GL11.glDisable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } if(xAxis >= 148 && xAxis <= 162 && yAxis >= 45 && yAxis <= 59) @@ -198,7 +198,7 @@ public class GuiMMaterialFilter extends GuiMekanism if(xAxis >= 12 && xAxis <= 28 && yAxis >= 19 && yAxis <= 35) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_DEPTH_TEST); @@ -208,12 +208,12 @@ public class GuiMMaterialFilter extends GuiMekanism GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_DEPTH_TEST); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } if(xAxis >= 149 && xAxis <= 165 && yAxis >= 19 && yAxis <= 35) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glPushAttrib(GL11.GL_LIGHTING_BIT); GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_DEPTH_TEST); @@ -223,7 +223,7 @@ public class GuiMMaterialFilter extends GuiMekanism drawGradientRect(x, y, x + 16, y + 16, -2130706433, -2130706433); GL11.glPopAttrib(); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } } diff --git a/src/main/java/mekanism/client/gui/GuiMModIDFilter.java b/src/main/java/mekanism/client/gui/GuiMModIDFilter.java index 4a1d310fb..0c9140abb 100644 --- a/src/main/java/mekanism/client/gui/GuiMModIDFilter.java +++ b/src/main/java/mekanism/client/gui/GuiMModIDFilter.java @@ -22,17 +22,17 @@ import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.block.Block; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiTextField; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.input.Keyboard; import org.lwjgl.opengl.GL11; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - @SideOnly(Side.CLIENT) public class GuiMModIDFilter extends GuiMekanism { @@ -168,21 +168,21 @@ public class GuiMModIDFilter extends GuiMekanism if(renderStack != null) { try { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glEnable(GL11.GL_LIGHTING); itemRender.renderItemAndEffectIntoGUI(renderStack, 12, 19); GL11.glDisable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } catch(Exception e) {} } if(filter.replaceStack != null) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glEnable(GL11.GL_LIGHTING); itemRender.renderItemAndEffectIntoGUI(filter.replaceStack, 149, 19); GL11.glDisable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } if(xAxis >= 148 && xAxis <= 162 && yAxis >= 45 && yAxis <= 59) @@ -233,7 +233,7 @@ public class GuiMModIDFilter extends GuiMekanism if(xAxis >= 149 && xAxis <= 165 && yAxis >= 19 && yAxis <= 35) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glPushAttrib(GL11.GL_LIGHTING_BIT); GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_DEPTH_TEST); @@ -243,7 +243,7 @@ public class GuiMModIDFilter extends GuiMekanism drawGradientRect(x, y, x + 16, y + 16, -2130706433, -2130706433); GL11.glPopAttrib(); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } modIDText.drawTextBox(); diff --git a/src/main/java/mekanism/client/gui/GuiMOreDictFilter.java b/src/main/java/mekanism/client/gui/GuiMOreDictFilter.java index e9526fc11..9bf25e8b9 100644 --- a/src/main/java/mekanism/client/gui/GuiMOreDictFilter.java +++ b/src/main/java/mekanism/client/gui/GuiMOreDictFilter.java @@ -22,17 +22,17 @@ import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.block.Block; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiTextField; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.input.Keyboard; import org.lwjgl.opengl.GL11; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - @SideOnly(Side.CLIENT) public class GuiMOreDictFilter extends GuiMekanism { @@ -168,21 +168,21 @@ public class GuiMOreDictFilter extends GuiMekanism if(renderStack != null) { try { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glEnable(GL11.GL_LIGHTING); itemRender.renderItemAndEffectIntoGUI(renderStack, 12, 19); GL11.glDisable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } catch(Exception e) {} } if(filter.replaceStack != null) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glEnable(GL11.GL_LIGHTING); itemRender.renderItemAndEffectIntoGUI(filter.replaceStack, 149, 19); GL11.glDisable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } if(xAxis >= 148 && xAxis <= 162 && yAxis >= 45 && yAxis <= 59) @@ -233,7 +233,7 @@ public class GuiMOreDictFilter extends GuiMekanism if(xAxis >= 149 && xAxis <= 165 && yAxis >= 19 && yAxis <= 35) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glPushAttrib(GL11.GL_LIGHTING_BIT); GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_DEPTH_TEST); @@ -243,7 +243,7 @@ public class GuiMOreDictFilter extends GuiMekanism drawGradientRect(x, y, x + 16, y + 16, -2130706433, -2130706433); GL11.glPopAttrib(); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } oreDictText.drawTextBox(); diff --git a/src/main/java/mekanism/client/gui/GuiMatrixStats.java b/src/main/java/mekanism/client/gui/GuiMatrixStats.java index 2fa7a1f4e..125b7905c 100644 --- a/src/main/java/mekanism/client/gui/GuiMatrixStats.java +++ b/src/main/java/mekanism/client/gui/GuiMatrixStats.java @@ -18,12 +18,11 @@ import mekanism.common.util.LangUtils; import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.entity.player.InventoryPlayer; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiMatrixStats extends GuiMekanism { diff --git a/src/main/java/mekanism/client/gui/GuiMekanism.java b/src/main/java/mekanism/client/gui/GuiMekanism.java index 82ca4090b..70df23899 100644 --- a/src/main/java/mekanism/client/gui/GuiMekanism.java +++ b/src/main/java/mekanism/client/gui/GuiMekanism.java @@ -1,7 +1,6 @@ package mekanism.client.gui; import java.io.IOException; -import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; @@ -14,10 +13,12 @@ import mekanism.common.item.ItemConfigurator; import mekanism.common.tile.TileEntityContainerBlock; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.inventory.Container; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; + import org.lwjgl.opengl.GL11; public abstract class GuiMekanism extends GuiContainer implements IGuiWrapper @@ -65,12 +66,12 @@ public abstract class GuiMekanism extends GuiContainer implements IGuiWrapper float reverse = 1/scale; float yAdd = 4-(scale*8)/2F; - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); - GL11.glScalef(scale, scale, scale); + GlStateManager.scale(scale, scale, scale); fontRendererObj.drawString(text, (int)(x*reverse), (int)((y*reverse)+yAdd), color); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } } diff --git a/src/main/java/mekanism/client/gui/GuiMetallurgicInfuser.java b/src/main/java/mekanism/client/gui/GuiMetallurgicInfuser.java index 7d80c4425..53d1ab63a 100644 --- a/src/main/java/mekanism/client/gui/GuiMetallurgicInfuser.java +++ b/src/main/java/mekanism/client/gui/GuiMetallurgicInfuser.java @@ -30,12 +30,11 @@ import mekanism.common.util.LangUtils; import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.entity.player.InventoryPlayer; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiMetallurgicInfuser extends GuiMekanism { diff --git a/src/main/java/mekanism/client/gui/GuiOredictionificator.java b/src/main/java/mekanism/client/gui/GuiOredictionificator.java index 747e54f28..d253009f4 100644 --- a/src/main/java/mekanism/client/gui/GuiOredictionificator.java +++ b/src/main/java/mekanism/client/gui/GuiOredictionificator.java @@ -26,15 +26,15 @@ import mekanism.common.util.LangUtils; import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.oredict.OreDictionary; import org.lwjgl.opengl.GL11; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - @SideOnly(Side.CLIENT) public class GuiOredictionificator extends GuiMekanism { @@ -132,11 +132,11 @@ public class GuiOredictionificator extends GuiMekanism if(stack != null) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glEnable(GL11.GL_LIGHTING); itemRender.renderItemAndEffectIntoGUI(stack, 13, yStart + 3); GL11.glDisable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } fontRendererObj.drawString(LangUtils.localize("gui.filter"), 32, yStart + 2, 0x404040); diff --git a/src/main/java/mekanism/client/gui/GuiOredictionificatorFilter.java b/src/main/java/mekanism/client/gui/GuiOredictionificatorFilter.java index c2dcfc64a..8f2558245 100644 --- a/src/main/java/mekanism/client/gui/GuiOredictionificatorFilter.java +++ b/src/main/java/mekanism/client/gui/GuiOredictionificatorFilter.java @@ -17,16 +17,16 @@ import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiTextField; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.oredict.OreDictionary; import org.lwjgl.input.Keyboard; import org.lwjgl.opengl.GL11; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - @SideOnly(Side.CLIENT) public class GuiOredictionificatorFilter extends GuiMekanism { @@ -149,11 +149,11 @@ public class GuiOredictionificatorFilter extends GuiMekanism if(renderStack != null) { try { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glEnable(GL11.GL_LIGHTING); itemRender.renderItemAndEffectIntoGUI(renderStack, 45, 19); GL11.glDisable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } catch(Exception e) {} } diff --git a/src/main/java/mekanism/client/gui/GuiPRC.java b/src/main/java/mekanism/client/gui/GuiPRC.java index 1434a7294..78d68a59f 100644 --- a/src/main/java/mekanism/client/gui/GuiPRC.java +++ b/src/main/java/mekanism/client/gui/GuiPRC.java @@ -30,12 +30,11 @@ import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.entity.player.InventoryPlayer; import net.minecraftforge.fluids.FluidTank; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiPRC extends GuiMekanism { diff --git a/src/main/java/mekanism/client/gui/GuiPersonalChest.java b/src/main/java/mekanism/client/gui/GuiPersonalChest.java index 8cca3c1b0..5143ca1b1 100644 --- a/src/main/java/mekanism/client/gui/GuiPersonalChest.java +++ b/src/main/java/mekanism/client/gui/GuiPersonalChest.java @@ -8,12 +8,11 @@ import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.IInventory; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiPersonalChest extends GuiMekanism { diff --git a/src/main/java/mekanism/client/gui/GuiQuantumEntangloporter.java b/src/main/java/mekanism/client/gui/GuiQuantumEntangloporter.java index 4c7aaae4b..d856d536f 100644 --- a/src/main/java/mekanism/client/gui/GuiQuantumEntangloporter.java +++ b/src/main/java/mekanism/client/gui/GuiQuantumEntangloporter.java @@ -25,13 +25,12 @@ import net.minecraft.client.gui.GuiTextField; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.input.Keyboard; import org.lwjgl.opengl.GL11; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - @SideOnly(Side.CLIENT) public class GuiQuantumEntangloporter extends GuiMekanism { diff --git a/src/main/java/mekanism/client/gui/GuiResistiveHeater.java b/src/main/java/mekanism/client/gui/GuiResistiveHeater.java index 73e16751d..0d141113f 100644 --- a/src/main/java/mekanism/client/gui/GuiResistiveHeater.java +++ b/src/main/java/mekanism/client/gui/GuiResistiveHeater.java @@ -28,13 +28,12 @@ import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.client.gui.GuiTextField; import net.minecraft.entity.player.InventoryPlayer; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.input.Keyboard; import org.lwjgl.opengl.GL11; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - @SideOnly(Side.CLIENT) public class GuiResistiveHeater extends GuiMekanism { diff --git a/src/main/java/mekanism/client/gui/GuiRobitCrafting.java b/src/main/java/mekanism/client/gui/GuiRobitCrafting.java index 3a9788e68..87a50e929 100644 --- a/src/main/java/mekanism/client/gui/GuiRobitCrafting.java +++ b/src/main/java/mekanism/client/gui/GuiRobitCrafting.java @@ -12,12 +12,11 @@ import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.world.World; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiRobitCrafting extends GuiMekanism { diff --git a/src/main/java/mekanism/client/gui/GuiRobitInventory.java b/src/main/java/mekanism/client/gui/GuiRobitInventory.java index 8c80615e3..99e08d862 100644 --- a/src/main/java/mekanism/client/gui/GuiRobitInventory.java +++ b/src/main/java/mekanism/client/gui/GuiRobitInventory.java @@ -12,12 +12,11 @@ import mekanism.common.util.LangUtils; import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.entity.player.InventoryPlayer; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiRobitInventory extends GuiMekanism { diff --git a/src/main/java/mekanism/client/gui/GuiRobitMain.java b/src/main/java/mekanism/client/gui/GuiRobitMain.java index fee95ce54..46150562d 100644 --- a/src/main/java/mekanism/client/gui/GuiRobitMain.java +++ b/src/main/java/mekanism/client/gui/GuiRobitMain.java @@ -14,13 +14,12 @@ import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiTextField; import net.minecraft.entity.player.InventoryPlayer; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.input.Keyboard; import org.lwjgl.opengl.GL11; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - @SideOnly(Side.CLIENT) public class GuiRobitMain extends GuiMekanism { diff --git a/src/main/java/mekanism/client/gui/GuiRobitRepair.java b/src/main/java/mekanism/client/gui/GuiRobitRepair.java index c2e7e49f5..7d12f7481 100644 --- a/src/main/java/mekanism/client/gui/GuiRobitRepair.java +++ b/src/main/java/mekanism/client/gui/GuiRobitRepair.java @@ -1,5 +1,7 @@ package mekanism.client.gui; +import io.netty.buffer.Unpooled; + import java.io.IOException; import java.util.List; @@ -22,15 +24,12 @@ import net.minecraft.network.PacketBuffer; import net.minecraft.network.play.client.C17PacketCustomPayload; import net.minecraft.util.StatCollector; import net.minecraft.world.World; - -import io.netty.buffer.Unpooled; -import org.apache.commons.io.Charsets; -import org.lwjgl.input.Keyboard; -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.input.Keyboard; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiRobitRepair extends GuiMekanism implements ICrafting { diff --git a/src/main/java/mekanism/client/gui/GuiRotaryCondensentrator.java b/src/main/java/mekanism/client/gui/GuiRotaryCondensentrator.java index 0482d5f5b..824aed384 100644 --- a/src/main/java/mekanism/client/gui/GuiRotaryCondensentrator.java +++ b/src/main/java/mekanism/client/gui/GuiRotaryCondensentrator.java @@ -33,12 +33,11 @@ import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.entity.player.InventoryPlayer; import net.minecraftforge.fluids.FluidTank; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiRotaryCondensentrator extends GuiMekanism { diff --git a/src/main/java/mekanism/client/gui/GuiSecurityDesk.java b/src/main/java/mekanism/client/gui/GuiSecurityDesk.java index c388507bc..f85b88890 100644 --- a/src/main/java/mekanism/client/gui/GuiSecurityDesk.java +++ b/src/main/java/mekanism/client/gui/GuiSecurityDesk.java @@ -22,13 +22,12 @@ import net.minecraft.client.gui.GuiTextField; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.input.Keyboard; import org.lwjgl.opengl.GL11; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - @SideOnly(Side.CLIENT) public class GuiSecurityDesk extends GuiMekanism { diff --git a/src/main/java/mekanism/client/gui/GuiSeismicReader.java b/src/main/java/mekanism/client/gui/GuiSeismicReader.java index 773ae68ef..1eb4229af 100644 --- a/src/main/java/mekanism/client/gui/GuiSeismicReader.java +++ b/src/main/java/mekanism/client/gui/GuiSeismicReader.java @@ -10,18 +10,18 @@ import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.util.BlockPos; import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.apache.commons.lang3.tuple.Pair; import org.lwjgl.opengl.GL11; import org.lwjgl.util.Rectangle; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - @SideOnly(Side.CLIENT) public class GuiSeismicReader extends GuiScreen { @@ -43,7 +43,7 @@ public class GuiSeismicReader extends GuiScreen public GuiSeismicReader(World world, Coord4D coord, ItemStack stack) { - pos = new Coord4D(coord.getX(), Math.min(255, coord.getY()), coord.getZ()); + pos = new Coord4D(coord.xCoord, Math.min(255, coord.yCoord), coord.zCoord); worldObj = world; itemStack = stack; @@ -91,17 +91,17 @@ public class GuiSeismicReader extends GuiScreen GL11.glColor3f(1, 1, 1); // Fix the overlapping if > 100 - GL11.glPushMatrix(); - GL11.glTranslatef(guiWidth + 48, guiHeight + 87, 0); + GlStateManager.pushMatrix(); + GlStateManager.translate(guiWidth + 48, guiHeight + 87, 0); if(currentLayer >= 100) { - GL11.glTranslatef(0, 1, 0); - GL11.glScalef(0.7f, 0.7f, 0.7f); + GlStateManager.translate(0, 1, 0); + GlStateManager.scale(0.7f, 0.7f, 0.7f); } fontRendererObj.drawString(String.format("%s", currentLayer), 0, 0, 0xAFAFAF); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); // Render the item stacks for(int i = 0; i < 9; i++) @@ -118,22 +118,22 @@ public class GuiSeismicReader extends GuiScreen continue; } - GL11.glPushMatrix(); - GL11.glTranslatef(centralX - 2, centralY - i * 16 + (22 * 2), 0); + GlStateManager.pushMatrix(); + GlStateManager.translate(centralX - 2, centralY - i * 16 + (22 * 2), 0); if(i < 4) { - GL11.glTranslatef(0.2f, 2.5f, 0); + GlStateManager.translate(0.2f, 2.5f, 0); } if(i != 4) { - GL11.glTranslatef(1.5f, 0, 0); - GL11.glScalef(0.8f, 0.8f, 0.8f); + GlStateManager.translate(1.5f, 0, 0); + GlStateManager.scale(0.8f, 0.8f, 0.8f); } itemRender.renderItemAndEffectIntoGUI(stack, 0, 0); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } } @@ -158,23 +158,23 @@ public class GuiSeismicReader extends GuiScreen renderScale = lengthX > 53 ? 53f / lengthX : 1.0f; - GL11.glPushMatrix(); - GL11.glTranslatef(guiWidth + 72, guiHeight + 16, 0); - GL11.glScalef(renderScale, renderScale, renderScale); + GlStateManager.pushMatrix(); + GlStateManager.translate(guiWidth + 72, guiHeight + 16, 0); + GlStateManager.scale(renderScale, renderScale, renderScale); fontRendererObj.drawString(capitalised, 0, 0, 0x919191); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); if(tooltip.intersects(new Rectangle(mouseX, mouseY, 1, 1))) { mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.GUI_ELEMENT, "GuiTooltips.png")); int fontLengthX = fontRendererObj.getStringWidth(capitalised) + 5; int renderX = mouseX + 10, renderY = mouseY - 5; - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glColor3f(1, 1, 1); drawTexturedModalRect(renderX, renderY, 0, 0, fontLengthX, 16); drawTexturedModalRect(renderX + fontLengthX, renderY, 0, 16, 2, 16); fontRendererObj.drawString(capitalised, renderX + 4, renderY + 4, 0x919191); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } } @@ -193,11 +193,11 @@ public class GuiSeismicReader extends GuiScreen } } - GL11.glPushMatrix(); - GL11.glTranslatef(guiWidth + 72, guiHeight + 26, 0); - GL11.glScalef(0.70f, 0.70f, 0.70f); + GlStateManager.pushMatrix(); + GlStateManager.translate(guiWidth + 72, guiHeight + 26, 0); + GlStateManager.scale(0.70f, 0.70f, 0.70f); fontRendererObj.drawString(LangUtils.localize("gui.abundancy") + ": " + frequency, 0, 0, 0x919191); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); super.drawScreen(mouseX, mouseY, partialTick); } @@ -226,7 +226,7 @@ public class GuiSeismicReader extends GuiScreen public void calculate() { - for(BlockPos p = new BlockPos(pos.getX(), 0, pos.getZ()); p.getY() < pos.getY(); p = p.up()) + for(BlockPos p = new BlockPos(pos.zCoord, 0, pos.zCoord); p.getY() < pos.yCoord; p = p.up()) { IBlockState state = worldObj.getBlockState(p); Block block = state.getBlock(); diff --git a/src/main/java/mekanism/client/gui/GuiSeismicVibrator.java b/src/main/java/mekanism/client/gui/GuiSeismicVibrator.java index 8eb74f2df..410ab55b4 100644 --- a/src/main/java/mekanism/client/gui/GuiSeismicVibrator.java +++ b/src/main/java/mekanism/client/gui/GuiSeismicVibrator.java @@ -18,12 +18,11 @@ import mekanism.common.util.LangUtils; import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.entity.player.InventoryPlayer; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiSeismicVibrator extends GuiMekanism { diff --git a/src/main/java/mekanism/client/gui/GuiSideConfiguration.java b/src/main/java/mekanism/client/gui/GuiSideConfiguration.java index 80c180430..24b88b280 100644 --- a/src/main/java/mekanism/client/gui/GuiSideConfiguration.java +++ b/src/main/java/mekanism/client/gui/GuiSideConfiguration.java @@ -27,13 +27,12 @@ import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.input.Keyboard; import org.lwjgl.opengl.GL11; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - @SideOnly(Side.CLIENT) public class GuiSideConfiguration extends GuiMekanism { diff --git a/src/main/java/mekanism/client/gui/GuiSolarNeutronActivator.java b/src/main/java/mekanism/client/gui/GuiSolarNeutronActivator.java index 35da165d0..344c76e75 100644 --- a/src/main/java/mekanism/client/gui/GuiSolarNeutronActivator.java +++ b/src/main/java/mekanism/client/gui/GuiSolarNeutronActivator.java @@ -18,12 +18,11 @@ import mekanism.common.util.LangUtils; import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.entity.player.InventoryPlayer; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiSolarNeutronActivator extends GuiMekanism { diff --git a/src/main/java/mekanism/client/gui/GuiTFilterSelect.java b/src/main/java/mekanism/client/gui/GuiTFilterSelect.java index 5094eed59..8cd7af810 100644 --- a/src/main/java/mekanism/client/gui/GuiTFilterSelect.java +++ b/src/main/java/mekanism/client/gui/GuiTFilterSelect.java @@ -14,12 +14,11 @@ import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.client.gui.GuiButton; import net.minecraft.entity.player.EntityPlayer; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiTFilterSelect extends GuiMekanism { diff --git a/src/main/java/mekanism/client/gui/GuiTItemStackFilter.java b/src/main/java/mekanism/client/gui/GuiTItemStackFilter.java index 39edcc2f4..117dca81b 100644 --- a/src/main/java/mekanism/client/gui/GuiTItemStackFilter.java +++ b/src/main/java/mekanism/client/gui/GuiTItemStackFilter.java @@ -20,16 +20,16 @@ import mekanism.common.util.MekanismUtils.ResourceType; import mekanism.common.util.TransporterUtils; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiTextField; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.input.Keyboard; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - @SideOnly(Side.CLIENT) public class GuiTItemStackFilter extends GuiMekanism { @@ -183,16 +183,16 @@ public class GuiTItemStackFilter extends GuiMekanism if(filter.itemType != null) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glEnable(GL11.GL_LIGHTING); itemRender.renderItemAndEffectIntoGUI(filter.itemType, 12, 19); GL11.glDisable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } if(filter.color != null) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glColor4f(1, 1, 1, 1); GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL12.GL_RESCALE_NORMAL); @@ -201,7 +201,7 @@ public class GuiTItemStackFilter extends GuiMekanism //TODO itemRender.renderIcon(12, 44, MekanismRenderer.getColorIcon(filter.color), 16, 16); GL11.glDisable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } if(xAxis >= 12 && xAxis <= 28 && yAxis >= 44 && yAxis <= 60) @@ -270,7 +270,7 @@ public class GuiTItemStackFilter extends GuiMekanism if(xAxis >= 12 && xAxis <= 28 && yAxis >= 19 && yAxis <= 35) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_DEPTH_TEST); @@ -280,7 +280,7 @@ public class GuiTItemStackFilter extends GuiMekanism GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_DEPTH_TEST); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } } diff --git a/src/main/java/mekanism/client/gui/GuiTMaterialFilter.java b/src/main/java/mekanism/client/gui/GuiTMaterialFilter.java index f5c7e199e..6e1fc3431 100644 --- a/src/main/java/mekanism/client/gui/GuiTMaterialFilter.java +++ b/src/main/java/mekanism/client/gui/GuiTMaterialFilter.java @@ -20,18 +20,18 @@ import mekanism.common.util.MekanismUtils.ResourceType; import mekanism.common.util.TransporterUtils; import net.minecraft.block.Block; import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.input.Keyboard; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - @SideOnly(Side.CLIENT) public class GuiTMaterialFilter extends GuiMekanism { @@ -131,16 +131,16 @@ public class GuiTMaterialFilter extends GuiMekanism if(filter.materialItem != null) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glEnable(GL11.GL_LIGHTING); itemRender.renderItemAndEffectIntoGUI(filter.materialItem, 12, 19); GL11.glDisable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } if(filter.color != null) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glColor4f(1, 1, 1, 1); GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL12.GL_RESCALE_NORMAL); @@ -149,7 +149,7 @@ public class GuiTMaterialFilter extends GuiMekanism //TODO itemRender.renderIcon(12, 44, MekanismRenderer.getColorIcon(filter.color), 16, 16); GL11.glDisable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } if(xAxis >= 12 && xAxis <= 28 && yAxis >= 44 && yAxis <= 60) @@ -204,7 +204,7 @@ public class GuiTMaterialFilter extends GuiMekanism if(xAxis >= 12 && xAxis <= 28 && yAxis >= 19 && yAxis <= 35) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_DEPTH_TEST); @@ -214,7 +214,7 @@ public class GuiTMaterialFilter extends GuiMekanism GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_DEPTH_TEST); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } } diff --git a/src/main/java/mekanism/client/gui/GuiTModIDFilter.java b/src/main/java/mekanism/client/gui/GuiTModIDFilter.java index 4fa6af506..8963c1267 100644 --- a/src/main/java/mekanism/client/gui/GuiTModIDFilter.java +++ b/src/main/java/mekanism/client/gui/GuiTModIDFilter.java @@ -23,16 +23,16 @@ import mekanism.common.util.MekanismUtils.ResourceType; import mekanism.common.util.TransporterUtils; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiTextField; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.input.Keyboard; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - @SideOnly(Side.CLIENT) public class GuiTModIDFilter extends GuiMekanism { @@ -168,17 +168,17 @@ public class GuiTModIDFilter extends GuiMekanism if(renderStack != null) { try { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glEnable(GL11.GL_LIGHTING); itemRender.renderItemAndEffectIntoGUI(renderStack, 12, 19); GL11.glDisable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } catch(Exception e) {} } if(filter.color != null) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glColor4f(1, 1, 1, 1); GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL12.GL_RESCALE_NORMAL); @@ -187,7 +187,7 @@ public class GuiTModIDFilter extends GuiMekanism //TODO itemRender.renderIcon(12, 44, MekanismRenderer.getColorIcon(filter.color), 16, 16); GL11.glDisable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } if(xAxis >= 12 && xAxis <= 28 && yAxis >= 44 && yAxis <= 60) diff --git a/src/main/java/mekanism/client/gui/GuiTOreDictFilter.java b/src/main/java/mekanism/client/gui/GuiTOreDictFilter.java index fac53de45..1c0220a5c 100644 --- a/src/main/java/mekanism/client/gui/GuiTOreDictFilter.java +++ b/src/main/java/mekanism/client/gui/GuiTOreDictFilter.java @@ -23,16 +23,16 @@ import mekanism.common.util.MekanismUtils.ResourceType; import mekanism.common.util.TransporterUtils; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiTextField; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.input.Keyboard; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - @SideOnly(Side.CLIENT) public class GuiTOreDictFilter extends GuiMekanism { @@ -168,17 +168,17 @@ public class GuiTOreDictFilter extends GuiMekanism if(renderStack != null) { try { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glEnable(GL11.GL_LIGHTING); itemRender.renderItemAndEffectIntoGUI(renderStack, 12, 19); GL11.glDisable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } catch(Exception e) {} } if(filter.color != null) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glColor4f(1, 1, 1, 1); GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL12.GL_RESCALE_NORMAL); @@ -187,7 +187,7 @@ public class GuiTOreDictFilter extends GuiMekanism //TODO itemRender.renderIcon(12, 44, MekanismRenderer.getColorIcon(filter.color), 16, 16); GL11.glDisable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } if(xAxis >= 12 && xAxis <= 28 && yAxis >= 44 && yAxis <= 60) diff --git a/src/main/java/mekanism/client/gui/GuiTeleporter.java b/src/main/java/mekanism/client/gui/GuiTeleporter.java index 9ccc02d61..59323ede7 100644 --- a/src/main/java/mekanism/client/gui/GuiTeleporter.java +++ b/src/main/java/mekanism/client/gui/GuiTeleporter.java @@ -33,13 +33,12 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.input.Keyboard; import org.lwjgl.opengl.GL11; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - @SideOnly(Side.CLIENT) public class GuiTeleporter extends GuiMekanism { diff --git a/src/main/java/mekanism/client/gui/GuiThermalEvaporationController.java b/src/main/java/mekanism/client/gui/GuiThermalEvaporationController.java index 46cc1204f..959930648 100644 --- a/src/main/java/mekanism/client/gui/GuiThermalEvaporationController.java +++ b/src/main/java/mekanism/client/gui/GuiThermalEvaporationController.java @@ -18,12 +18,11 @@ import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.entity.player.InventoryPlayer; import net.minecraftforge.fluids.FluidTank; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiThermalEvaporationController extends GuiMekanism { diff --git a/src/main/java/mekanism/client/gui/GuiThermoelectricBoiler.java b/src/main/java/mekanism/client/gui/GuiThermoelectricBoiler.java index ee5e70c7d..531910dd0 100644 --- a/src/main/java/mekanism/client/gui/GuiThermoelectricBoiler.java +++ b/src/main/java/mekanism/client/gui/GuiThermoelectricBoiler.java @@ -21,12 +21,11 @@ import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.entity.player.InventoryPlayer; import net.minecraftforge.fluids.FluidStack; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiThermoelectricBoiler extends GuiMekanism { diff --git a/src/main/java/mekanism/client/gui/GuiTransporterConfig.java b/src/main/java/mekanism/client/gui/GuiTransporterConfig.java index 4a5c96408..5f78634b6 100644 --- a/src/main/java/mekanism/client/gui/GuiTransporterConfig.java +++ b/src/main/java/mekanism/client/gui/GuiTransporterConfig.java @@ -21,17 +21,17 @@ import mekanism.common.tile.component.TileComponentConfig; import mekanism.common.util.LangUtils; import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.input.Keyboard; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - @SideOnly(Side.CLIENT) public class GuiTransporterConfig extends GuiMekanism { @@ -135,7 +135,7 @@ public class GuiTransporterConfig extends GuiMekanism if(configurable.getEjector().getOutputColor() != null) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glColor4f(1, 1, 1, 1); GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL12.GL_RESCALE_NORMAL); @@ -144,7 +144,7 @@ public class GuiTransporterConfig extends GuiMekanism //TODO itemRender.renderIcon(122, 49, MekanismRenderer.getColorIcon(configurable.getEjector().getOutputColor()), 16, 16); GL11.glDisable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } for(int i = 0; i < slotPosMap.size(); i++) diff --git a/src/main/java/mekanism/client/gui/GuiUpgradeManagement.java b/src/main/java/mekanism/client/gui/GuiUpgradeManagement.java index e76ade020..14036b9d1 100644 --- a/src/main/java/mekanism/client/gui/GuiUpgradeManagement.java +++ b/src/main/java/mekanism/client/gui/GuiUpgradeManagement.java @@ -16,14 +16,14 @@ import mekanism.common.network.PacketSimpleGui.SimpleGuiMessage; import mekanism.common.util.LangUtils; import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.tileentity.TileEntity; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiUpgradeManagement extends GuiMekanism { @@ -136,20 +136,20 @@ public class GuiUpgradeManagement extends GuiMekanism private void renderText(String text, int x, int y, float size, boolean scale) { - GL11.glPushMatrix(); - GL11.glScalef(size, size, size); + GlStateManager.pushMatrix(); + GlStateManager.scale(size, size, size); fontRendererObj.drawString(text, scale ? (int)((1F/size)*x) : x, scale ? (int)((1F/size)*y) : y, 0x00CD00); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } private void renderUpgrade(Upgrade type, int x, int y, float size, boolean scale) { - GL11.glPushMatrix(); - GL11.glScalef(size, size, size); + GlStateManager.pushMatrix(); + GlStateManager.scale(size, size, size); GL11.glEnable(GL11.GL_LIGHTING); itemRender.renderItemAndEffectIntoGUI(type.getStack(), scale ? (int)((1F/size)*x) : x, scale ? (int)((1F/size)*y) : y); GL11.glDisable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } @Override diff --git a/src/main/java/mekanism/client/gui/element/GuiConfigTypeTab.java b/src/main/java/mekanism/client/gui/element/GuiConfigTypeTab.java index f920b3e96..45a0fa455 100644 --- a/src/main/java/mekanism/client/gui/element/GuiConfigTypeTab.java +++ b/src/main/java/mekanism/client/gui/element/GuiConfigTypeTab.java @@ -8,7 +8,6 @@ import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; diff --git a/src/main/java/mekanism/client/gui/element/GuiContainerEditMode.java b/src/main/java/mekanism/client/gui/element/GuiContainerEditMode.java index ba85dbafa..976984978 100644 --- a/src/main/java/mekanism/client/gui/element/GuiContainerEditMode.java +++ b/src/main/java/mekanism/client/gui/element/GuiContainerEditMode.java @@ -11,7 +11,6 @@ import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; diff --git a/src/main/java/mekanism/client/gui/element/GuiDetectionTab.java b/src/main/java/mekanism/client/gui/element/GuiDetectionTab.java index ec45fda7f..9165e6c3c 100644 --- a/src/main/java/mekanism/client/gui/element/GuiDetectionTab.java +++ b/src/main/java/mekanism/client/gui/element/GuiDetectionTab.java @@ -13,7 +13,6 @@ import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; diff --git a/src/main/java/mekanism/client/gui/element/GuiElement.java b/src/main/java/mekanism/client/gui/element/GuiElement.java index 8cbcfad14..9203cd240 100644 --- a/src/main/java/mekanism/client/gui/element/GuiElement.java +++ b/src/main/java/mekanism/client/gui/element/GuiElement.java @@ -2,19 +2,19 @@ package mekanism.client.gui.element; import java.util.List; +import mekanism.api.ObfuscatedNames; +import mekanism.api.util.ReflectionUtils; import mekanism.client.gui.IGuiWrapper; -import mekanism.common.ObfuscatedNames; -import mekanism.common.util.MekanismUtils; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.util.ResourceLocation; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public abstract class GuiElement { @@ -48,8 +48,8 @@ public abstract class GuiElement if(guiObj instanceof GuiContainer) { try { - int size = (Integer)MekanismUtils.getPrivateValue(guiObj, GuiContainer.class, ObfuscatedNames.GuiContainer_xSize); - MekanismUtils.setPrivateValue(guiObj, size + xSize, GuiContainer.class, ObfuscatedNames.GuiContainer_xSize); + int size = (Integer)ReflectionUtils.getPrivateValue(guiObj, GuiContainer.class, ObfuscatedNames.GuiContainer_xSize); + ReflectionUtils.setPrivateValue(guiObj, size + xSize, GuiContainer.class, ObfuscatedNames.GuiContainer_xSize); } catch(Exception e) { e.printStackTrace(); } @@ -61,8 +61,8 @@ public abstract class GuiElement if(guiObj instanceof GuiContainer) { try { - int size = (Integer)MekanismUtils.getPrivateValue(guiObj, GuiContainer.class, ObfuscatedNames.GuiContainer_ySize); - MekanismUtils.setPrivateValue(guiObj, size + ySize, GuiContainer.class, ObfuscatedNames.GuiContainer_ySize); + int size = (Integer)ReflectionUtils.getPrivateValue(guiObj, GuiContainer.class, ObfuscatedNames.GuiContainer_ySize); + ReflectionUtils.setPrivateValue(guiObj, size + ySize, GuiContainer.class, ObfuscatedNames.GuiContainer_ySize); } catch(Exception e) { e.printStackTrace(); } @@ -74,9 +74,9 @@ public abstract class GuiElement if(guiObj instanceof GuiContainer) { try { - int left = (Integer)MekanismUtils.getPrivateValue(guiObj, GuiContainer.class, ObfuscatedNames.GuiContainer_guiLeft); + int left = (Integer)ReflectionUtils.getPrivateValue(guiObj, GuiContainer.class, ObfuscatedNames.GuiContainer_guiLeft); System.out.println(left + " " + guiLeft); - MekanismUtils.setPrivateValue(guiObj, left + guiLeft, GuiContainer.class, ObfuscatedNames.GuiContainer_guiLeft); + ReflectionUtils.setPrivateValue(guiObj, left + guiLeft, GuiContainer.class, ObfuscatedNames.GuiContainer_guiLeft); } catch(Exception e) { e.printStackTrace(); } @@ -88,8 +88,8 @@ public abstract class GuiElement if(guiObj instanceof GuiContainer) { try { - int top = (Integer)MekanismUtils.getPrivateValue(guiObj, GuiContainer.class, ObfuscatedNames.GuiContainer_guiTop); - MekanismUtils.setPrivateValue(guiObj, top + guiTop, GuiContainer.class, ObfuscatedNames.GuiContainer_guiTop); + int top = (Integer)ReflectionUtils.getPrivateValue(guiObj, GuiContainer.class, ObfuscatedNames.GuiContainer_guiTop); + ReflectionUtils.setPrivateValue(guiObj, top + guiTop, GuiContainer.class, ObfuscatedNames.GuiContainer_guiTop); } catch(Exception e) { e.printStackTrace(); } @@ -109,12 +109,12 @@ public abstract class GuiElement float reverse = 1/scale; float yAdd = 4-(scale*8)/2F; - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); - GL11.glScalef(scale, scale, scale); + GlStateManager.scale(scale, scale, scale); getFontRenderer().drawString(text, (int)(x*reverse), (int)((y*reverse)+yAdd), color); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } } diff --git a/src/main/java/mekanism/client/gui/element/GuiEnergyGauge.java b/src/main/java/mekanism/client/gui/element/GuiEnergyGauge.java index fb4bc730c..0f14e864f 100644 --- a/src/main/java/mekanism/client/gui/element/GuiEnergyGauge.java +++ b/src/main/java/mekanism/client/gui/element/GuiEnergyGauge.java @@ -6,7 +6,6 @@ import mekanism.client.gui.IGuiWrapper; import mekanism.client.render.MekanismRenderer; import mekanism.common.util.LangUtils; import mekanism.common.util.MekanismUtils; - import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.util.ResourceLocation; diff --git a/src/main/java/mekanism/client/gui/element/GuiFluidGauge.java b/src/main/java/mekanism/client/gui/element/GuiFluidGauge.java index a4f74baef..b198b0b61 100644 --- a/src/main/java/mekanism/client/gui/element/GuiFluidGauge.java +++ b/src/main/java/mekanism/client/gui/element/GuiFluidGauge.java @@ -13,7 +13,6 @@ import mekanism.common.base.ITankManager; import mekanism.common.item.ItemGaugeDropper; import mekanism.common.network.PacketDropperUse.DropperUseMessage; import mekanism.common.util.LangUtils; - import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; diff --git a/src/main/java/mekanism/client/gui/element/GuiGasGauge.java b/src/main/java/mekanism/client/gui/element/GuiGasGauge.java index 4a72182a6..c7eed7461 100644 --- a/src/main/java/mekanism/client/gui/element/GuiGasGauge.java +++ b/src/main/java/mekanism/client/gui/element/GuiGasGauge.java @@ -13,7 +13,6 @@ import mekanism.common.base.ITankManager; import mekanism.common.item.ItemGaugeDropper; import mekanism.common.network.PacketDropperUse.DropperUseMessage; import mekanism.common.util.LangUtils; - import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; diff --git a/src/main/java/mekanism/client/gui/element/GuiGauge.java b/src/main/java/mekanism/client/gui/element/GuiGauge.java index 5f24b3b98..146cf95e1 100644 --- a/src/main/java/mekanism/client/gui/element/GuiGauge.java +++ b/src/main/java/mekanism/client/gui/element/GuiGauge.java @@ -10,7 +10,6 @@ import mekanism.common.base.ISideConfiguration; import mekanism.common.item.ItemConfigurator; import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; - import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; diff --git a/src/main/java/mekanism/client/gui/element/GuiGraph.java b/src/main/java/mekanism/client/gui/element/GuiGraph.java index 61ef889a4..9ba0945ba 100644 --- a/src/main/java/mekanism/client/gui/element/GuiGraph.java +++ b/src/main/java/mekanism/client/gui/element/GuiGraph.java @@ -8,12 +8,11 @@ import mekanism.client.render.MekanismRenderer; import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.util.ResourceLocation; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiGraph extends GuiElement { diff --git a/src/main/java/mekanism/client/gui/element/GuiMatrixTab.java b/src/main/java/mekanism/client/gui/element/GuiMatrixTab.java index 507d9d8fb..2d05cef5b 100644 --- a/src/main/java/mekanism/client/gui/element/GuiMatrixTab.java +++ b/src/main/java/mekanism/client/gui/element/GuiMatrixTab.java @@ -10,7 +10,6 @@ import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; diff --git a/src/main/java/mekanism/client/gui/element/GuiNumberGauge.java b/src/main/java/mekanism/client/gui/element/GuiNumberGauge.java index 24b02bbe9..aeebc111d 100644 --- a/src/main/java/mekanism/client/gui/element/GuiNumberGauge.java +++ b/src/main/java/mekanism/client/gui/element/GuiNumberGauge.java @@ -3,7 +3,6 @@ package mekanism.client.gui.element; import static java.lang.Math.min; import mekanism.api.transmitters.TransmissionType; import mekanism.client.gui.IGuiWrapper; - import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.util.ResourceLocation; diff --git a/src/main/java/mekanism/client/gui/element/GuiPowerBar.java b/src/main/java/mekanism/client/gui/element/GuiPowerBar.java index 299f08ea5..8e07de717 100644 --- a/src/main/java/mekanism/client/gui/element/GuiPowerBar.java +++ b/src/main/java/mekanism/client/gui/element/GuiPowerBar.java @@ -5,7 +5,6 @@ import mekanism.client.gui.IGuiWrapper; import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.util.ResourceLocation; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; diff --git a/src/main/java/mekanism/client/gui/element/GuiRateBar.java b/src/main/java/mekanism/client/gui/element/GuiRateBar.java index c42c5f5f3..1dc566ee6 100644 --- a/src/main/java/mekanism/client/gui/element/GuiRateBar.java +++ b/src/main/java/mekanism/client/gui/element/GuiRateBar.java @@ -4,7 +4,6 @@ import mekanism.client.gui.IGuiWrapper; import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.util.ResourceLocation; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; diff --git a/src/main/java/mekanism/client/gui/element/GuiRedstoneControl.java b/src/main/java/mekanism/client/gui/element/GuiRedstoneControl.java index 99cff4bd4..4f139b17a 100644 --- a/src/main/java/mekanism/client/gui/element/GuiRedstoneControl.java +++ b/src/main/java/mekanism/client/gui/element/GuiRedstoneControl.java @@ -11,7 +11,6 @@ import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; diff --git a/src/main/java/mekanism/client/gui/element/GuiScrollList.java b/src/main/java/mekanism/client/gui/element/GuiScrollList.java index 0e8648359..57f666b16 100644 --- a/src/main/java/mekanism/client/gui/element/GuiScrollList.java +++ b/src/main/java/mekanism/client/gui/element/GuiScrollList.java @@ -7,13 +7,11 @@ import mekanism.client.gui.IGuiWrapper; import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.util.ResourceLocation; - -import org.lwjgl.opengl.GL11; - - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiScrollList extends GuiElement { diff --git a/src/main/java/mekanism/client/gui/element/GuiSortingTab.java b/src/main/java/mekanism/client/gui/element/GuiSortingTab.java index cb0bdf0e9..5054e2b2b 100644 --- a/src/main/java/mekanism/client/gui/element/GuiSortingTab.java +++ b/src/main/java/mekanism/client/gui/element/GuiSortingTab.java @@ -12,7 +12,6 @@ import mekanism.common.util.LangUtils; import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.util.ResourceLocation; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; diff --git a/src/main/java/mekanism/client/gui/element/GuiTransporterConfigTab.java b/src/main/java/mekanism/client/gui/element/GuiTransporterConfigTab.java index 4ae2f8fe5..6c9a34a39 100644 --- a/src/main/java/mekanism/client/gui/element/GuiTransporterConfigTab.java +++ b/src/main/java/mekanism/client/gui/element/GuiTransporterConfigTab.java @@ -10,7 +10,6 @@ import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; diff --git a/src/main/java/mekanism/client/model/ModelArmoredJetpack.java b/src/main/java/mekanism/client/model/ModelArmoredJetpack.java index 55083bec4..9ee51e70d 100644 --- a/src/main/java/mekanism/client/model/ModelArmoredJetpack.java +++ b/src/main/java/mekanism/client/model/ModelArmoredJetpack.java @@ -3,6 +3,7 @@ package mekanism.client.model; import mekanism.client.render.MekanismRenderer; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; +import net.minecraft.client.renderer.GlStateManager; import org.lwjgl.opengl.GL11; @@ -240,7 +241,7 @@ public class ModelArmoredJetpack extends ModelBase Packdoodad3.render(size); Bottomthruster.render(size); - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); MekanismRenderer.blendOn(); MekanismRenderer.glowOn(); GL11.glEnable(GL11.GL_CULL_FACE); @@ -249,11 +250,11 @@ public class ModelArmoredJetpack extends ModelBase WingbladeL.render(size); WingbladeR.render(size); - GL11.glColor4f(1, 1, 1, 1); + MekanismRenderer.resetColor(); GL11.glDisable(GL11.GL_CULL_FACE); MekanismRenderer.glowOff(); MekanismRenderer.blendOff(); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); MekanismRenderer.glowOn(); light1.render(size); @@ -261,8 +262,8 @@ public class ModelArmoredJetpack extends ModelBase light3.render(size); Packcore.render(size); - GL11.glPushMatrix(); - GL11.glTranslatef(0.0F, 0.0F, -0.0625F); + GlStateManager.pushMatrix(); + GlStateManager.translate(0.0F, 0.0F, -0.0625F); Rightlight.render(size); Leftlight.render(size); @@ -275,7 +276,7 @@ public class ModelArmoredJetpack extends ModelBase Rightguardbot.render(size); Leftguardbot.render(size); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } private void setRotation(ModelRenderer model, float x, float y, float z) diff --git a/src/main/java/mekanism/client/model/ModelAtomicDisassembler.java b/src/main/java/mekanism/client/model/ModelAtomicDisassembler.java index c312595f5..c64b7808c 100644 --- a/src/main/java/mekanism/client/model/ModelAtomicDisassembler.java +++ b/src/main/java/mekanism/client/model/ModelAtomicDisassembler.java @@ -3,6 +3,7 @@ package mekanism.client.model; import mekanism.client.render.MekanismRenderer; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; +import net.minecraft.client.renderer.GlStateManager; import org.lwjgl.opengl.GL11; @@ -130,7 +131,7 @@ public class ModelAtomicDisassembler extends ModelBase public void render(float size) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); MekanismRenderer.glowOn(); Shape3.render(size); @@ -140,7 +141,7 @@ public class ModelAtomicDisassembler extends ModelBase Shape14.render(size); MekanismRenderer.glowOff(); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); Shape1.render(size); Shape2.render(size); diff --git a/src/main/java/mekanism/client/model/ModelBalloon.java b/src/main/java/mekanism/client/model/ModelBalloon.java index e468fb8b4..4fcfd8baf 100644 --- a/src/main/java/mekanism/client/model/ModelBalloon.java +++ b/src/main/java/mekanism/client/model/ModelBalloon.java @@ -1,14 +1,15 @@ package mekanism.client.model; import mekanism.api.EnumColor; +import mekanism.client.render.MekanismRenderer; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; - -import org.lwjgl.opengl.GL11; - +import net.minecraft.client.renderer.GlStateManager; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class ModelBalloon extends ModelBase { @@ -57,23 +58,23 @@ public class ModelBalloon extends ModelBase public void render(float size, EnumColor color) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glColor3f(color.getColor(0), color.getColor(1), color.getColor(2)); - GL11.glScalef(1.5F, 1.5F, 1.5F); - GL11.glTranslatef(0, -0.07F, 0); + GlStateManager.scale(1.5F, 1.5F, 1.5F); + GlStateManager.translate(0, -0.07F, 0); Balloon2.render(size); Balloon1.render(size); Balloon3.render(size); Balloonnub.render(size); - GL11.glColor3f(1, 1, 1); - GL11.glPopMatrix(); + MekanismRenderer.resetColor(); + GlStateManager.popMatrix(); - GL11.glPushMatrix(); - GL11.glScalef(0.2F, 1, 0.2F); + GlStateManager.pushMatrix(); + GlStateManager.scale(0.2F, 1, 0.2F); String.render(size); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } private void setRotation(ModelRenderer model, float x, float y, float z) diff --git a/src/main/java/mekanism/client/model/ModelChargepad.java b/src/main/java/mekanism/client/model/ModelChargepad.java index 47c6ebaba..50db8e829 100644 --- a/src/main/java/mekanism/client/model/ModelChargepad.java +++ b/src/main/java/mekanism/client/model/ModelChargepad.java @@ -5,14 +5,14 @@ import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.util.ResourceLocation; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class ModelChargepad extends ModelBase { @@ -77,21 +77,21 @@ public class ModelChargepad extends ModelBase public void render(float size, TextureManager manager) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); MekanismRenderer.blendOn(); doRender(size); manager.bindTexture(OVERLAY); - GL11.glScalef(1.001F, 1.001F, 1.001F); - GL11.glTranslatef(0, -0.0011F, 0); + GlStateManager.scale(1.001F, 1.001F, 1.001F); + GlStateManager.translate(0, -0.0011F, 0); MekanismRenderer.glowOn(); doRender(size); MekanismRenderer.glowOff(); MekanismRenderer.blendOff(); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } private void doRender(float size) diff --git a/src/main/java/mekanism/client/model/ModelChemicalInfuser.java b/src/main/java/mekanism/client/model/ModelChemicalInfuser.java deleted file mode 100644 index d5777f82f..000000000 --- a/src/main/java/mekanism/client/model/ModelChemicalInfuser.java +++ /dev/null @@ -1,268 +0,0 @@ -package mekanism.client.model; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -@SideOnly(Side.CLIENT) -public class ModelChemicalInfuser extends ModelBase -{ - ModelRenderer base; - ModelRenderer tank2; - ModelRenderer portRight; - ModelRenderer portBack; - ModelRenderer portLeft; - ModelRenderer tank1; - ModelRenderer portFront; - ModelRenderer tank3; - ModelRenderer pipeAngle2; - ModelRenderer connectorAngle; - ModelRenderer pipe2; - ModelRenderer connector; - ModelRenderer compressor; - ModelRenderer tube10; - ModelRenderer tube8; - ModelRenderer tube9; - ModelRenderer tube7; - ModelRenderer tube6; - ModelRenderer tube5; - ModelRenderer tube4; - ModelRenderer tube3; - ModelRenderer tube2; - ModelRenderer tube1; - ModelRenderer pipe1; - ModelRenderer pipeAngle1; - ModelRenderer exhaust4; - ModelRenderer exhaust3; - ModelRenderer exhaust2; - ModelRenderer exhaust1; - - public ModelChemicalInfuser() - { - textureWidth = 128; - textureHeight = 64; - - base = new ModelRenderer(this, 0, 0); - base.addBox(0F, 0F, 0F, 16, 5, 16); - base.setRotationPoint(-8F, 19F, -8F); - base.setTextureSize(128, 64); - base.mirror = true; - setRotation(base, 0F, 0F, 0F); - tank2 = new ModelRenderer(this, 0, 21); - tank2.mirror = true; - tank2.addBox(0F, 0F, 0F, 6, 11, 6); - tank2.setRotationPoint(1F, 8F, 1F); - tank2.setTextureSize(128, 64); - setRotation(tank2, 0F, 0F, 0F); - portRight = new ModelRenderer(this, 0, 38); - portRight.addBox(0F, 0F, 0F, 1, 8, 8); - portRight.setRotationPoint(7.01F, 12F, -4F); - portRight.setTextureSize(128, 64); - portRight.mirror = true; - setRotation(portRight, 0F, 0F, 0F); - portBack = new ModelRenderer(this, 0, 54); - portBack.addBox(0F, 0F, 0F, 8, 8, 1); - portBack.setRotationPoint(-4F, 12F, 7.01F); - portBack.setTextureSize(128, 64); - portBack.mirror = true; - setRotation(portBack, 0F, 0F, 0F); - portLeft = new ModelRenderer(this, 0, 38); - portLeft.addBox(0F, 0F, 0F, 1, 8, 8); - portLeft.setRotationPoint(-8.01F, 12F, -4F); - portLeft.setTextureSize(128, 64); - portLeft.mirror = true; - setRotation(portLeft, 0F, 0F, 0F); - tank1 = new ModelRenderer(this, 0, 21); - tank1.addBox(0F, 0F, 0F, 6, 11, 6); - tank1.setRotationPoint(-7F, 8F, 1F); - tank1.setTextureSize(128, 64); - tank1.mirror = true; - setRotation(tank1, 0F, 0F, 0F); - portFront = new ModelRenderer(this, 18, 38); - portFront.addBox(0F, 0F, 0F, 8, 8, 1); - portFront.setRotationPoint(-4F, 12F, -8.01F); - portFront.setTextureSize(128, 64); - portFront.mirror = true; - setRotation(portFront, 0F, 0F, 0F); - tank3 = new ModelRenderer(this, 24, 21); - tank3.addBox(0F, 0F, 0F, 12, 7, 7); - tank3.setRotationPoint(-6F, 12F, -7F); - tank3.setTextureSize(128, 64); - tank3.mirror = true; - setRotation(tank3, 0F, 0F, 0F); - pipeAngle2 = new ModelRenderer(this, 18, 55); - pipeAngle2.addBox(-5F, 0F, 0F, 5, 6, 3); - pipeAngle2.setRotationPoint(5F, 13.01F, -2F); - pipeAngle2.setTextureSize(128, 64); - pipeAngle2.mirror = true; - //TODO - setRotation(pipeAngle2, 0F, 0.7853982F, 0F); - connectorAngle = new ModelRenderer(this, 40, 45); - connectorAngle.addBox(0F, 0F, 0F, 2, 8, 2); - connectorAngle.setRotationPoint(-1F, 13F, 5F); - connectorAngle.setTextureSize(128, 64); - connectorAngle.mirror = true; - //TODO - setRotation(connectorAngle, -0.4886922F, 0F, 0F); - pipe2 = new ModelRenderer(this, 40, 35); - pipe2.addBox(0F, 0F, 0F, 1, 6, 4); - pipe2.setRotationPoint(6F, 13F, -3F); - pipe2.setTextureSize(128, 64); - pipe2.mirror = true; - setRotation(pipe2, 0F, 0F, 0F); - connector = new ModelRenderer(this, 50, 35); - connector.addBox(0F, 0F, 0F, 2, 6, 2); - connector.setRotationPoint(-1F, 13F, 5F); - connector.setTextureSize(128, 64); - connector.mirror = true; - setRotation(connector, 0F, 0F, 0F); - compressor = new ModelRenderer(this, 18, 49); - compressor.addBox(0F, 0F, 0F, 6, 3, 3); - compressor.setRotationPoint(-3F, 8.5F, -2.5F); - compressor.setTextureSize(128, 64); - compressor.mirror = true; - setRotation(compressor, 0F, 0F, 0F); - tube10 = new ModelRenderer(this, 0, 14); - tube10.addBox(0F, 0F, 0F, 2, 1, 1); - tube10.setRotationPoint(-1F, 9F, 5F); - tube10.setTextureSize(128, 64); - tube10.mirror = true; - setRotation(tube10, 0F, 0F, 0F); - tube8 = new ModelRenderer(this, 0, 2); - tube8.addBox(0F, 0F, 0F, 1, 1, 2); - tube8.setRotationPoint(4F, 9.5F, -0.5F); - tube8.setTextureSize(128, 64); - tube8.mirror = true; - setRotation(tube8, 0F, 0F, 0F); - tube9 = new ModelRenderer(this, 0, 14); - tube9.addBox(0F, 0F, 0F, 2, 1, 1); - tube9.setRotationPoint(-1F, 9F, 2F); - tube9.setTextureSize(128, 64); - tube9.mirror = true; - setRotation(tube9, 0F, 0F, 0F); - tube7 = new ModelRenderer(this, 0, 0); - tube7.addBox(0F, 0F, 0F, 2, 1, 1); - tube7.setRotationPoint(3F, 9.5F, -1.5F); - tube7.setTextureSize(128, 64); - tube7.mirror = true; - setRotation(tube7, 0F, 0F, 0F); - tube6 = new ModelRenderer(this, 12, 13); - tube6.addBox(0F, 0F, 0F, 1, 2, 1); - tube6.setRotationPoint(1F, 10.5F, -4F); - tube6.setTextureSize(128, 64); - tube6.mirror = true; - setRotation(tube6, 0F, 0F, 0F); - tube5 = new ModelRenderer(this, 0, 2); - tube5.addBox(0F, 0F, 0F, 1, 1, 2); - tube5.setRotationPoint(1F, 9.5F, -4F); - tube5.setTextureSize(128, 64); - tube5.mirror = true; - setRotation(tube5, 0F, 0F, 0F); - tube4 = new ModelRenderer(this, 0, 2); - tube4.addBox(0F, 0F, 0F, 1, 1, 2); - tube4.setRotationPoint(-2F, 9.5F, -4F); - tube4.setTextureSize(128, 64); - tube4.mirror = true; - setRotation(tube4, 0F, 0F, 0F); - tube3 = new ModelRenderer(this, 12, 13); - tube3.addBox(0F, 0F, 0F, 1, 2, 1); - tube3.setRotationPoint(-2F, 10.5F, -4F); - tube3.setTextureSize(128, 64); - tube3.mirror = true; - setRotation(tube3, 0F, 0F, 0F); - tube2 = new ModelRenderer(this, 0, 0); - tube2.addBox(0F, 0F, 0F, 2, 1, 1); - tube2.setRotationPoint(-5F, 9.5F, -1.5F); - tube2.setTextureSize(128, 64); - tube2.mirror = true; - setRotation(tube2, 0F, 0F, 0F); - tube1 = new ModelRenderer(this, 0, 2); - tube1.addBox(0F, 0F, 0F, 1, 1, 2); - tube1.setRotationPoint(-5F, 9.5F, -0.5F); - tube1.setTextureSize(128, 64); - tube1.mirror = true; - setRotation(tube1, 0F, 0F, 0F); - pipe1 = new ModelRenderer(this, 40, 35); - pipe1.addBox(0F, 0F, 0F, 1, 6, 4); - pipe1.setRotationPoint(-7F, 13F, -3F); - pipe1.setTextureSize(128, 64); - pipe1.mirror = true; - setRotation(pipe1, 0F, 0F, 0F); - pipeAngle1 = new ModelRenderer(this, 18, 55); - pipeAngle1.addBox(0F, 0F, 0F, 5, 6, 3); - pipeAngle1.setRotationPoint(-5F, 13.01F, -2F); - pipeAngle1.setTextureSize(128, 64); - pipeAngle1.mirror = true; - //TODO - setRotation(pipeAngle1, 0F, -0.7853982F, 0F); - exhaust4 = new ModelRenderer(this, 0, 9); - exhaust4.addBox(0F, 0F, 0F, 1, 1, 1); - exhaust4.setRotationPoint(-1.33F, 11.5F, -6.2F); - exhaust4.setTextureSize(128, 64); - exhaust4.mirror = true; - //TODO - setRotation(exhaust4, 0.3490659F, 0F, 0F); - exhaust3 = new ModelRenderer(this, 0, 9); - exhaust3.addBox(0F, 0F, 0F, 1, 1, 1); - exhaust3.setRotationPoint(-3F, 11.5F, -6.2F); - exhaust3.setTextureSize(128, 64); - exhaust3.mirror = true; - //TODO - setRotation(exhaust3, 0.3490659F, 0F, 0F); - exhaust2 = new ModelRenderer(this, 0, 9); - exhaust2.addBox(0F, 0F, 0F, 1, 1, 1); - exhaust2.setRotationPoint(2F, 11.5F, -6.2F); - exhaust2.setTextureSize(128, 64); - exhaust2.mirror = true; - //TODO - setRotation(exhaust2, 0.3490659F, 0F, 0F); - exhaust1 = new ModelRenderer(this, 0, 9); - exhaust1.addBox(0F, 0F, 0F, 1, 1, 1); - exhaust1.setRotationPoint(0.33F, 11.5F, -6.2F); - exhaust1.setTextureSize(128, 64); - exhaust1.mirror = true; - //TODO - setRotation(exhaust1, 0.3490659F, 0F, 0F); - } - - public void render(float size) - { - base.render(size); - tank2.render(size); - portRight.render(size); - portBack.render(size); - portLeft.render(size); - tank1.render(size); - portFront.render(size); - tank3.render(size); - pipeAngle2.render(size); - connectorAngle.render(size); - pipe2.render(size); - connector.render(size); - compressor.render(size); - tube10.render(size); - tube8.render(size); - tube9.render(size); - tube7.render(size); - tube6.render(size); - tube5.render(size); - tube4.render(size); - tube3.render(size); - tube2.render(size); - tube1.render(size); - pipe1.render(size); - pipeAngle1.render(size); - exhaust4.render(size); - exhaust3.render(size); - exhaust2.render(size); - exhaust1.render(size); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } -} diff --git a/src/main/java/mekanism/client/model/ModelChemicalOxidizer.java b/src/main/java/mekanism/client/model/ModelChemicalOxidizer.java deleted file mode 100644 index 13c18a3a1..000000000 --- a/src/main/java/mekanism/client/model/ModelChemicalOxidizer.java +++ /dev/null @@ -1,109 +0,0 @@ -package mekanism.client.model; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -@SideOnly(Side.CLIENT) -public class ModelChemicalOxidizer extends ModelBase -{ - ModelRenderer stand; - ModelRenderer tank; - ModelRenderer pipe2; - ModelRenderer bridge; - ModelRenderer pipe1; - ModelRenderer tower2; - ModelRenderer tower1; - ModelRenderer base; - ModelRenderer connector; - ModelRenderer connectorToggle; - - public ModelChemicalOxidizer() - { - textureWidth = 128; - textureHeight = 64; - - stand = new ModelRenderer(this, 0, 20); - stand.addBox(0F, 0F, 0F, 5, 1, 13); - stand.setRotationPoint(-5.5F, 19F, -6.5F); - stand.setTextureSize(128, 64); - stand.mirror = true; - setRotation(stand, 0F, 0F, 0F); - tank = new ModelRenderer(this, 66, 0); - tank.addBox(0F, 0F, 0F, 7, 12, 16); - tank.setRotationPoint(1F, 8F, -8F); - tank.setTextureSize(128, 64); - tank.mirror = true; - setRotation(tank, 0F, 0F, 0F); - pipe2 = new ModelRenderer(this, 82, 28); - pipe2.addBox(0F, 0F, 0F, 2, 6, 6); - pipe2.setRotationPoint(-7F, 13F, -3F); - pipe2.setTextureSize(128, 64); - pipe2.mirror = true; - setRotation(pipe2, 0F, 0F, 0F); - bridge = new ModelRenderer(this, 70, 0); - bridge.addBox(0F, 0F, 0F, 5, 10, 1); - bridge.setRotationPoint(-5.5F, 8.5F, -2F); - bridge.setTextureSize(128, 64); - bridge.mirror = true; - setRotation(bridge, 0F, 0F, 0F); - pipe1 = new ModelRenderer(this, 0, 0); - pipe1.addBox(0F, 0F, 0F, 1, 3, 3); - pipe1.setRotationPoint(0F, 14F, 1F); - pipe1.setTextureSize(128, 64); - pipe1.mirror = true; - setRotation(pipe1, 0F, 0F, 0F); - tower2 = new ModelRenderer(this, 36, 20); - tower2.addBox(0F, 0F, 0F, 6, 11, 8); - tower2.setRotationPoint(-6F, 8F, -1F); - tower2.setTextureSize(128, 64); - tower2.mirror = true; - setRotation(tower2, 0F, 0F, 0F); - tower1 = new ModelRenderer(this, 48, 0); - tower1.addBox(0F, 0F, 0F, 6, 11, 5); - tower1.setRotationPoint(-6F, 8F, -7F); - tower1.setTextureSize(128, 64); - tower1.mirror = true; - setRotation(tower1, 0F, 0F, 0F); - base = new ModelRenderer(this, 0, 0); - base.addBox(0F, 0F, 0F, 16, 4, 16); - base.setRotationPoint(-8F, 20F, -8F); - base.setTextureSize(128, 64); - base.mirror = true; - setRotation(base, 0F, 0F, 0F); - connector = new ModelRenderer(this, 0, 34); - connector.addBox(0F, 0F, 0F, 1, 10, 10); - connector.setRotationPoint(-8F, 11F, -5F); - connector.setTextureSize(128, 64); - connector.mirror = true; - setRotation(connector, 0F, 0F, 0F); - connectorToggle = new ModelRenderer(this, 64, 28); - connectorToggle.addBox(0F, 0F, 0F, 1, 8, 8); - connectorToggle.setRotationPoint(7.01F, 12F, -4F); - connectorToggle.setTextureSize(128, 64); - connectorToggle.mirror = true; - setRotation(connectorToggle, 0F, 0F, 0F); - } - - public void render(float size) - { - stand.render(size); - tank.render(size); - pipe2.render(size); - bridge.render(size); - pipe1.render(size); - tower2.render(size); - tower1.render(size); - base.render(size); - connector.render(size); - connectorToggle.render(size); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } -} \ No newline at end of file diff --git a/src/main/java/mekanism/client/model/ModelChemicalWasher.java b/src/main/java/mekanism/client/model/ModelChemicalWasher.java deleted file mode 100644 index 0e4c10df1..000000000 --- a/src/main/java/mekanism/client/model/ModelChemicalWasher.java +++ /dev/null @@ -1,220 +0,0 @@ -package mekanism.client.model; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -@SideOnly(Side.CLIENT) -public class ModelChemicalWasher extends ModelBase -{ - ModelRenderer tankBack; - ModelRenderer base; - ModelRenderer portTop; - ModelRenderer pipe1; - ModelRenderer pipe2b; - ModelRenderer portRight; - ModelRenderer bridge1; - ModelRenderer bridge2; - ModelRenderer bridge3; - ModelRenderer conduit; - ModelRenderer bridge4; - ModelRenderer pipe2; - ModelRenderer tankLeft; - ModelRenderer connectorRight; - ModelRenderer portLeft; - ModelRenderer connectorLeft; - ModelRenderer tankRight; - ModelRenderer tubeLeft1; - ModelRenderer tubeLeft2; - ModelRenderer tubeRight3; - ModelRenderer tubeRight1; - ModelRenderer tubeRight2; - ModelRenderer tubeLeft3; - - public ModelChemicalWasher() - { - textureWidth = 128; - textureHeight = 64; - - tankBack = new ModelRenderer(this, 0, 20); - tankBack.addBox(0F, 0F, 0F, 16, 10, 6); - tankBack.setRotationPoint(-8F, 10F, 2F); - tankBack.setTextureSize(128, 64); - tankBack.mirror = true; - setRotation(tankBack, 0F, 0F, 0F); - base = new ModelRenderer(this, 0, 0); - base.addBox(0F, 0F, 0F, 16, 4, 16); - base.setRotationPoint(-8F, 20F, -8F); - base.setTextureSize(128, 64); - base.mirror = true; - setRotation(base, 0F, 0F, 0F); - portTop = new ModelRenderer(this, 53, 33); - portTop.addBox(0F, 0F, 0F, 10, 1, 10); - portTop.setRotationPoint(-5F, 8F, -5F); - portTop.setTextureSize(128, 64); - portTop.mirror = true; - setRotation(portTop, 0F, 0F, 0F); - pipe1 = new ModelRenderer(this, 66, 9); - pipe1.addBox(0F, 0F, 0F, 7, 5, 7); - pipe1.setRotationPoint(-3.5F, 9F, -3.5F); - pipe1.setTextureSize(128, 64); - pipe1.mirror = true; - setRotation(pipe1, 0F, 0F, 0F); - pipe2b = new ModelRenderer(this, 44, 21); - pipe2b.addBox(0F, 0F, 0F, 1, 8, 4); - pipe2b.setRotationPoint(-3.49F, 14F, -3.5F); - pipe2b.setTextureSize(128, 64); - pipe2b.mirror = true; - //TODO - setRotation(pipe2b, 0.837758F, 0F, 0F); - portRight = new ModelRenderer(this, 48, 0); - portRight.addBox(0F, 0F, 0F, 1, 8, 8); - portRight.setRotationPoint(7.01F, 12F, -4F); - portRight.setTextureSize(128, 64); - portRight.mirror = true; - setRotation(portRight, 0F, 0F, 0F); - bridge1 = new ModelRenderer(this, 0, 0); - bridge1.addBox(0F, 0F, 0F, 2, 1, 1); - bridge1.setRotationPoint(-1F, 11F, -7F); - bridge1.setTextureSize(128, 64); - bridge1.mirror = true; - setRotation(bridge1, 0F, 0F, 0F); - bridge2 = new ModelRenderer(this, 0, 0); - bridge2.addBox(0F, 0F, 0F, 2, 1, 1); - bridge2.setRotationPoint(-1F, 13F, -7F); - bridge2.setTextureSize(128, 64); - bridge2.mirror = true; - setRotation(bridge2, 0F, 0F, 0F); - bridge3 = new ModelRenderer(this, 0, 0); - bridge3.addBox(0F, 0F, 0F, 2, 1, 1); - bridge3.setRotationPoint(-1F, 15F, -7F); - bridge3.setTextureSize(128, 64); - bridge3.mirror = true; - setRotation(bridge3, 0F, 0F, 0F); - conduit = new ModelRenderer(this, 0, 3); - conduit.addBox(0F, 0F, 0F, 2, 1, 2); - conduit.setRotationPoint(-1F, 19.5F, -5F); - conduit.setTextureSize(128, 64); - conduit.mirror = true; - setRotation(conduit, 0F, 0F, 0F); - bridge4 = new ModelRenderer(this, 0, 0); - bridge4.addBox(0F, 0F, 0F, 2, 1, 1); - bridge4.setRotationPoint(-1F, 17F, -7F); - bridge4.setTextureSize(128, 64); - bridge4.mirror = true; - setRotation(bridge4, 0F, 0F, 0F); - pipe2 = new ModelRenderer(this, 54, 21); - pipe2.addBox(0F, 0F, 0F, 6, 8, 4); - pipe2.setRotationPoint(-2.51F, 14F, -3.5F); - pipe2.setTextureSize(128, 64); - pipe2.mirror = true; - //TODO - setRotation(pipe2, 0.837758F, 0F, 0F); - tankLeft = new ModelRenderer(this, 0, 36); - tankLeft.addBox(0F, 0F, 0F, 7, 10, 8); - tankLeft.setRotationPoint(-8F, 10F, -8F); - tankLeft.setTextureSize(128, 64); - tankLeft.mirror = true; - setRotation(tankLeft, 0F, 0F, 0F); - connectorRight = new ModelRenderer(this, 0, 7); - connectorRight.addBox(0F, 0F, 0F, 2, 6, 2); - connectorRight.setRotationPoint(5F, 13F, 0F); - connectorRight.setTextureSize(128, 64); - connectorRight.mirror = true; - setRotation(connectorRight, 0F, 0F, 0F); - portLeft = new ModelRenderer(this, 48, 0); - portLeft.addBox(0F, 0F, 0F, 1, 8, 8); - portLeft.setRotationPoint(-8.01F, 12F, -4F); - portLeft.setTextureSize(128, 64); - portLeft.mirror = true; - setRotation(portLeft, 0F, 0F, 0F); - connectorLeft = new ModelRenderer(this, 0, 7); - connectorLeft.addBox(0F, 0F, 0F, 2, 6, 2); - connectorLeft.setRotationPoint(-7F, 13F, 0F); - connectorLeft.setTextureSize(128, 64); - connectorLeft.mirror = true; - setRotation(connectorLeft, 0F, 0F, 0F); - tankRight = new ModelRenderer(this, 0, 36); - tankRight.mirror = true; - tankRight.addBox(0F, 0F, 0F, 7, 10, 8); - tankRight.setRotationPoint(1F, 10F, -8F); - tankRight.setTextureSize(128, 64); - setRotation(tankRight, 0F, 0F, 0F); - tubeLeft1 = new ModelRenderer(this, 30, 36); - tubeLeft1.addBox(0F, 0F, -1F, 1, 2, 1); - tubeLeft1.setRotationPoint(-6F, 8.5F, 4F); - tubeLeft1.setTextureSize(128, 64); - tubeLeft1.mirror = true; - //TODO - setRotation(tubeLeft1, 0.6806784F, 0F, 0F); - tubeLeft2 = new ModelRenderer(this, 30, 36); - tubeLeft2.addBox(0F, 0F, 0F, 1, 1, 8); - tubeLeft2.setRotationPoint(-6F, 8.5F, -4F); - tubeLeft2.setTextureSize(128, 64); - tubeLeft2.mirror = true; - setRotation(tubeLeft2, 0F, 0F, 0F); - tubeRight3 = new ModelRenderer(this, 30, 39); - tubeRight3.addBox(0F, -1F, 0F, 1, 2, 1); - tubeRight3.setRotationPoint(6F, 10F, -2.5F); - tubeRight3.setTextureSize(128, 64); - tubeRight3.mirror = true; - //TODO - setRotation(tubeRight3, 0F, 0F, 0.3141593F); - tubeRight1 = new ModelRenderer(this, 30, 39); - tubeRight1.addBox(0F, -1F, 0F, 1, 2, 1); - tubeRight1.setRotationPoint(6F, 10F, -6.5F); - tubeRight1.setTextureSize(128, 64); - tubeRight1.mirror = true; - //TODO - setRotation(tubeRight1, 0F, 0F, 0.3141593F); - tubeRight2 = new ModelRenderer(this, 30, 39); - tubeRight2.addBox(0F, -1F, 0F, 1, 2, 1); - tubeRight2.setRotationPoint(6F, 10F, -4.5F); - tubeRight2.setTextureSize(128, 64); - tubeRight2.mirror = true; - //TODO - setRotation(tubeRight2, 0F, 0F, 0.3141593F); - tubeLeft3 = new ModelRenderer(this, 30, 36); - tubeLeft3.addBox(0F, 0F, 0F, 1, 2, 1); - tubeLeft3.setRotationPoint(-6F, 9.5F, -4F); - tubeLeft3.setTextureSize(128, 64); - tubeLeft3.mirror = true; - //TODO - setRotation(tubeLeft3, 0F, 0F, -0.8203047F); - } - - public void render(float size) - { - tankBack.render(size); - base.render(size); - portTop.render(size); - pipe1.render(size); - pipe2b.render(size); - portRight.render(size); - bridge1.render(size); - bridge2.render(size); - bridge3.render(size); - conduit.render(size); - bridge4.render(size); - pipe2.render(size); - tankLeft.render(size); - connectorRight.render(size); - portLeft.render(size); - connectorLeft.render(size); - tankRight.render(size); - tubeLeft1.render(size); - tubeLeft2.render(size); - tubeRight3.render(size); - tubeRight1.render(size); - tubeRight2.render(size); - tubeLeft3.render(size); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } -} diff --git a/src/main/java/mekanism/client/model/ModelDigitalMiner.java b/src/main/java/mekanism/client/model/ModelDigitalMiner.java index 07dc17d97..56ed296e9 100644 --- a/src/main/java/mekanism/client/model/ModelDigitalMiner.java +++ b/src/main/java/mekanism/client/model/ModelDigitalMiner.java @@ -5,14 +5,14 @@ import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.util.ResourceLocation; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class ModelDigitalMiner extends ModelBase { @@ -422,23 +422,26 @@ public class ModelDigitalMiner extends ModelBase setRotation(monitor3, 0.0872665F, 0.2094395F, 0F); } - public void render(float size, boolean on, TextureManager manager) + public void render(float size, boolean on, TextureManager manager, boolean renderMain) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); MekanismRenderer.blendOn(); - doRender(size); + if(renderMain) + { + doRender(size); + } manager.bindTexture(on ? OVERLAY_ON : OVERLAY_OFF); - GL11.glScalef(1.001F, 1.001F, 1.001F); - GL11.glTranslatef(0, -0.0011F, 0); + GlStateManager.scale(1.001F, 1.001F, 1.001F); + GlStateManager.translate(0, -0.0011F, 0); MekanismRenderer.glowOn(); doRender(size); MekanismRenderer.glowOff(); MekanismRenderer.blendOff(); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } private void doRender(float size) diff --git a/src/main/java/mekanism/client/model/ModelEnergyCube.java b/src/main/java/mekanism/client/model/ModelEnergyCube.java index e42182e97..d810d0e5d 100644 --- a/src/main/java/mekanism/client/model/ModelEnergyCube.java +++ b/src/main/java/mekanism/client/model/ModelEnergyCube.java @@ -8,12 +8,10 @@ import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.util.EnumFacing; import net.minecraft.util.ResourceLocation; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -351,33 +349,36 @@ public class ModelEnergyCube extends ModelBase connectors = new ModelRenderer[] {connectorBottomToggle, connectorTopToggle, connectorFrontToggle, connectorBackToggle, connectorLeftToggle, connectorRightToggle}; } - public void render(float size, EnergyCubeTier tier, TextureManager manager) + public void render(float size, EnergyCubeTier tier, TextureManager manager, boolean renderMain) { - frame12.render(size); - frame11.render(size); - frame10.render(size); - frame9.render(size); - frame8.render(size); - frame7.render(size); - frame6.render(size); - frame5.render(size); - frame4.render(size); - frame3.render(size); - frame2.render(size); - frame1.render(size); + if(renderMain) + { + frame12.render(size); + frame11.render(size); + frame10.render(size); + frame9.render(size); + frame8.render(size); + frame7.render(size); + frame6.render(size); + frame5.render(size); + frame4.render(size); + frame3.render(size); + frame2.render(size); + frame1.render(size); + + corner8.render(size); + corner7.render(size); + corner6.render(size); + corner5.render(size); + corner4.render(size); + corner3.render(size); + corner2.render(size); + corner1.render(size); + } - corner8.render(size); - corner7.render(size); - corner6.render(size); - corner5.render(size); - corner4.render(size); - corner3.render(size); - corner2.render(size); - corner1.render(size); - - GL11.glPushMatrix(); - GL11.glScalef(1.0001F, 1.0001F, 1.0001F); - GL11.glTranslatef(0, -0.00011F, 0); + GlStateManager.pushMatrix(); + GlStateManager.scale(1.001F, 1.005F, 1.001F); + GlStateManager.translate(0, -0.0061F, 0); manager.bindTexture(RenderEnergyCube.resources.get(tier)); MekanismRenderer.glowOn(); @@ -391,7 +392,7 @@ public class ModelEnergyCube extends ModelBase corner1.render(size); MekanismRenderer.glowOff(); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } public void renderSide(float size, EnumFacing side, IOState state, EnergyCubeTier tier, TextureManager renderer) diff --git a/src/main/java/mekanism/client/model/ModelGasMask.java b/src/main/java/mekanism/client/model/ModelGasMask.java index 2854a10f5..1069eb530 100644 --- a/src/main/java/mekanism/client/model/ModelGasMask.java +++ b/src/main/java/mekanism/client/model/ModelGasMask.java @@ -3,12 +3,11 @@ package mekanism.client.model; import mekanism.client.render.MekanismRenderer; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class ModelGasMask extends ModelBase { @@ -251,7 +250,7 @@ public class ModelGasMask extends ModelBase glassbackL.render(size); GL11.glDisable(GL11.GL_CULL_FACE); - GL11.glColor4f(1, 1, 1, 1); + MekanismRenderer.resetColor(); MekanismRenderer.glowOff(); MekanismRenderer.blendOff(); diff --git a/src/main/java/mekanism/client/model/ModelGasTank.java b/src/main/java/mekanism/client/model/ModelGasTank.java deleted file mode 100644 index 9942e6ae1..000000000 --- a/src/main/java/mekanism/client/model/ModelGasTank.java +++ /dev/null @@ -1,110 +0,0 @@ -package mekanism.client.model; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -@SideOnly(Side.CLIENT) -public class ModelGasTank extends ModelBase -{ - ModelRenderer rim4; - ModelRenderer rim5; - ModelRenderer rim2; - ModelRenderer tankBase; - ModelRenderer valve; - ModelRenderer rim3; - ModelRenderer tank; - ModelRenderer rim0; - ModelRenderer valveBase; - ModelRenderer rim1; - - public ModelGasTank() - { - textureWidth = 64; - textureHeight = 32; - - rim4 = new ModelRenderer(this, 30, 0); - rim4.addBox(0F, 0F, 0F, 1, 3, 6); - rim4.setRotationPoint(3F, 8F, -3F); - rim4.setTextureSize(64, 32); - rim4.mirror = true; - setRotation(rim4, 0F, 0F, 0F); - rim4.mirror = false; - rim5 = new ModelRenderer(this, 0, 4); - rim5.addBox(0F, 0F, 0F, 2, 3, 1); - rim5.setRotationPoint(2F, 8F, -4F); - rim5.setTextureSize(64, 32); - rim5.mirror = true; - setRotation(rim5, 0F, 0F, 0F); - rim2 = new ModelRenderer(this, 30, 0); - rim2.addBox(0F, 0F, 0F, 1, 3, 6); - rim2.setRotationPoint(-4F, 8F, -3F); - rim2.setTextureSize(64, 32); - rim2.mirror = true; - setRotation(rim2, 0F, 0F, 0F); - tankBase = new ModelRenderer(this, 0, 22); - tankBase.addBox(0F, 0F, 0F, 9, 1, 9); - tankBase.setRotationPoint(-4.5F, 22.5F, -4.5F); - tankBase.setTextureSize(64, 32); - tankBase.mirror = true; - setRotation(tankBase, 0F, 0F, 0F); - valve = new ModelRenderer(this, 46, 0); - valve.addBox(0F, 0F, 0F, 3, 1, 3); - valve.setRotationPoint(-1.5F, 8.5F, -1.5F); - valve.setTextureSize(64, 32); - valve.mirror = true; - setRotation(valve, 0F, 0F, 0F); - rim3 = new ModelRenderer(this, 44, 5); - rim3.addBox(0F, 0F, 0F, 8, 3, 1); - rim3.setRotationPoint(-4F, 8F, 3F); - rim3.setTextureSize(64, 32); - rim3.mirror = true; - setRotation(rim3, 0F, 0F, 0F); - tank = new ModelRenderer(this, 0, 0); - tank.addBox(0F, 0F, 0F, 10, 12, 10); - tank.setRotationPoint(-5F, 10.5F, -5F); - tank.setTextureSize(64, 32); - tank.mirror = true; - setRotation(tank, 0F, 0F, 0F); - rim0 = new ModelRenderer(this, 0, 8); - rim0.addBox(0F, 0F, 0F, 4, 1, 1); - rim0.setRotationPoint(-2F, 10F, -4F); - rim0.setTextureSize(64, 32); - rim0.mirror = true; - setRotation(rim0, 0F, 0F, 0F); - valveBase = new ModelRenderer(this, 38, 0); - valveBase.addBox(0F, 0F, 0F, 2, 1, 2); - valveBase.setRotationPoint(-1F, 9.5F, -1F); - valveBase.setTextureSize(64, 32); - valveBase.mirror = true; - setRotation(valveBase, 0F, 0F, 0F); - rim1 = new ModelRenderer(this, 0, 0); - rim1.addBox(0F, 0F, 0F, 2, 3, 1); - rim1.setRotationPoint(-4F, 8F, -4F); - rim1.setTextureSize(64, 32); - rim1.mirror = true; - setRotation(rim1, 0F, 0F, 0F); - } - - public void render(float size) - { - rim4.render(size); - rim5.render(size); - rim2.render(size); - tankBase.render(size); - valve.render(size); - rim3.render(size); - tank.render(size); - rim0.render(size); - valveBase.render(size); - rim1.render(size); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } -} diff --git a/src/main/java/mekanism/client/model/ModelJetpack.java b/src/main/java/mekanism/client/model/ModelJetpack.java index 8d6bb589c..7a379b478 100644 --- a/src/main/java/mekanism/client/model/ModelJetpack.java +++ b/src/main/java/mekanism/client/model/ModelJetpack.java @@ -3,12 +3,12 @@ package mekanism.client.model; import mekanism.client.render.MekanismRenderer; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; - -import org.lwjgl.opengl.GL11; - +import net.minecraft.client.renderer.GlStateManager; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class ModelJetpack extends ModelBase { @@ -187,7 +187,7 @@ public class ModelJetpack extends ModelBase ExtendosupportL.render(size); ExtendosupportR.render(size); - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); MekanismRenderer.blendOn(); MekanismRenderer.glowOn(); GL11.glEnable(GL11.GL_CULL_FACE); @@ -196,11 +196,11 @@ public class ModelJetpack extends ModelBase WingbladeL.render(size); WingbladeR.render(size); - GL11.glColor4f(1, 1, 1, 1); + MekanismRenderer.resetColor(); GL11.glDisable(GL11.GL_CULL_FACE); MekanismRenderer.glowOff(); MekanismRenderer.blendOff(); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); Packdoodad2.render(size); Packdoodad3.render(size); diff --git a/src/main/java/mekanism/client/model/ModelLaser.java b/src/main/java/mekanism/client/model/ModelLaser.java deleted file mode 100644 index 8a277f998..000000000 --- a/src/main/java/mekanism/client/model/ModelLaser.java +++ /dev/null @@ -1,187 +0,0 @@ -package mekanism.client.model; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; - -public class ModelLaser extends ModelBase -{ - ModelRenderer connector; - ModelRenderer center; - ModelRenderer shaft; - ModelRenderer ring1; - ModelRenderer port; - ModelRenderer rod1; - ModelRenderer fin1; - ModelRenderer fin2; - ModelRenderer fin3; - ModelRenderer fin4; - ModelRenderer ring2; - ModelRenderer body; - ModelRenderer rod2; - ModelRenderer wire; - ModelRenderer rod3; - ModelRenderer fin5; - ModelRenderer fin6; - ModelRenderer fin7; - ModelRenderer fin8; - ModelRenderer rod4; - - public ModelLaser() - { - textureWidth = 64; - textureHeight = 32; - - connector = new ModelRenderer(this, 32, 15); - connector.addBox(0F, 0F, 0F, 6, 1, 6); - connector.setRotationPoint(-3F, 22F, -3F); - connector.setTextureSize(64, 32); - connector.mirror = true; - setRotation(connector, 0F, 0F, 0F); - center = new ModelRenderer(this, 18, 9); - center.addBox(0F, 0F, 0F, 2, 15, 2); - center.setRotationPoint(-1F, 8F, -1F); - center.setTextureSize(64, 32); - center.mirror = true; - setRotation(center, 0F, 0F, 0F); - shaft = new ModelRenderer(this, 0, 18); - shaft.addBox(0F, 0F, 0F, 3, 2, 3); - shaft.setRotationPoint(-1.5F, 13F, -1.5F); - shaft.setTextureSize(64, 32); - shaft.mirror = true; - setRotation(shaft, 0F, 0F, 0F); - ring1 = new ModelRenderer(this, 0, 23); - ring1.addBox(0F, 0F, 0F, 4, 1, 4); - ring1.setRotationPoint(-2F, 10F, -2F); - ring1.setTextureSize(64, 32); - ring1.mirror = true; - setRotation(ring1, 0F, 0F, 0F); - port = new ModelRenderer(this, 0, 0); - port.addBox(0F, 0F, 0F, 8, 1, 8); - port.setRotationPoint(-4F, 23F, -4F); - port.setTextureSize(64, 32); - port.mirror = true; - setRotation(port, 0F, 0F, 0F); - rod1 = new ModelRenderer(this, 0, 9); - rod1.addBox(0F, 0F, 0F, 1, 5, 1); - rod1.setRotationPoint(2.8F, 16F, 1F); - rod1.setTextureSize(64, 32); - rod1.mirror = true; - setRotation(rod1, 0F, 0F, 0F); - fin1 = new ModelRenderer(this, 0, 9); - fin1.addBox(0F, 0F, 0F, 1, 1, 8); - fin1.setRotationPoint(3F, 21F, -4F); - fin1.setTextureSize(64, 32); - fin1.mirror = true; - setRotation(fin1, 0F, 0F, 0F); - fin2 = new ModelRenderer(this, 0, 9); - fin2.addBox(0F, 0F, 0F, 1, 1, 8); - fin2.setRotationPoint(3F, 19F, -4F); - fin2.setTextureSize(64, 32); - fin2.mirror = true; - setRotation(fin2, 0F, 0F, 0F); - fin3 = new ModelRenderer(this, 0, 9); - fin3.addBox(0F, 0F, 0F, 1, 1, 8); - fin3.setRotationPoint(3F, 17F, -4F); - fin3.setTextureSize(64, 32); - fin3.mirror = true; - setRotation(fin3, 0F, 0F, 0F); - fin4 = new ModelRenderer(this, 0, 9); - fin4.addBox(0F, 0F, 0F, 1, 1, 8); - fin4.setRotationPoint(3F, 15F, -4F); - fin4.setTextureSize(64, 32); - fin4.mirror = true; - setRotation(fin4, 0F, 0F, 0F); - ring2 = new ModelRenderer(this, 0, 23); - ring2.addBox(0F, 0F, 0F, 4, 1, 4); - ring2.setRotationPoint(-2F, 12F, -2F); - ring2.setTextureSize(64, 32); - ring2.mirror = true; - setRotation(ring2, 0F, 0F, 0F); - body = new ModelRenderer(this, 32, 0); - body.addBox(0F, 0F, 0F, 6, 7, 8); - body.setRotationPoint(-3F, 15F, -4F); - body.setTextureSize(64, 32); - body.mirror = true; - setRotation(body, 0F, 0F, 0F); - rod2 = new ModelRenderer(this, 0, 9); - rod2.addBox(0F, 0F, 0F, 1, 5, 1); - rod2.setRotationPoint(2.8F, 16F, -2F); - rod2.setTextureSize(64, 32); - rod2.mirror = true; - setRotation(rod2, 0F, 0F, 0F); - wire = new ModelRenderer(this, 10, 9); - wire.addBox(0F, -1F, 0F, 1, 6, 1); - wire.setRotationPoint(-1.5F, 11F, -0.5F); - wire.setTextureSize(64, 32); - wire.mirror = true; - //TODO - setRotation(wire, 0F, 0F, 0.1919862F); - rod3 = new ModelRenderer(this, 0, 9); - rod3.addBox(0F, 0F, 0F, 1, 5, 1); - rod3.setRotationPoint(-3.8F, 16F, 1F); - rod3.setTextureSize(64, 32); - rod3.mirror = true; - setRotation(rod3, 0F, 0F, 0F); - fin5 = new ModelRenderer(this, 0, 9); - fin5.addBox(0F, 0F, 0F, 1, 1, 8); - fin5.setRotationPoint(-4F, 15F, -4F); - fin5.setTextureSize(64, 32); - fin5.mirror = true; - setRotation(fin5, 0F, 0F, 0F); - fin6 = new ModelRenderer(this, 0, 9); - fin6.addBox(0F, 0F, 0F, 1, 1, 8); - fin6.setRotationPoint(-4F, 17F, -4F); - fin6.setTextureSize(64, 32); - fin6.mirror = true; - setRotation(fin6, 0F, 0F, 0F); - fin7 = new ModelRenderer(this, 0, 9); - fin7.addBox(0F, 0F, 0F, 1, 1, 8); - fin7.setRotationPoint(-4F, 19F, -4F); - fin7.setTextureSize(64, 32); - fin7.mirror = true; - setRotation(fin7, 0F, 0F, 0F); - fin8 = new ModelRenderer(this, 0, 9); - fin8.addBox(0F, 0F, 0F, 1, 1, 8); - fin8.setRotationPoint(-4F, 21F, -4F); - fin8.setTextureSize(64, 32); - fin8.mirror = true; - setRotation(fin8, 0F, 0F, 0F); - rod4 = new ModelRenderer(this, 0, 9); - rod4.addBox(0F, 0F, 0F, 1, 5, 1); - rod4.setRotationPoint(-3.8F, 16F, -2F); - rod4.setTextureSize(64, 32); - rod4.mirror = true; - setRotation(rod4, 0F, 0F, 0F); - } - - public void render(float size) - { - connector.render(size); - center.render(size); - shaft.render(size); - ring1.render(size); - port.render(size); - rod1.render(size); - fin1.render(size); - fin2.render(size); - fin3.render(size); - fin4.render(size); - ring2.render(size); - body.render(size); - rod2.render(size); - wire.render(size); - rod3.render(size); - fin5.render(size); - fin6.render(size); - fin7.render(size); - fin8.render(size); - rod4.render(size); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } -} diff --git a/src/main/java/mekanism/client/model/ModelLaserAmplifier.java b/src/main/java/mekanism/client/model/ModelLaserAmplifier.java deleted file mode 100644 index 559ca73d8..000000000 --- a/src/main/java/mekanism/client/model/ModelLaserAmplifier.java +++ /dev/null @@ -1,85 +0,0 @@ -package mekanism.client.model; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -@SideOnly(Side.CLIENT) -public class ModelLaserAmplifier extends ModelBase -{ - ModelRenderer S1; - ModelRenderer S2; - ModelRenderer S3; - ModelRenderer S4; - ModelRenderer S5; - ModelRenderer Base; - ModelRenderer S6; - - public ModelLaserAmplifier() - { - textureWidth = 64; - textureHeight = 64; - - S1 = new ModelRenderer(this, 0, 39); - S1.addBox(0F, 0F, 0F, 1, 10, 10); - S1.setRotationPoint(7F, 11F, -5F); - S1.setTextureSize(64, 64); - S1.mirror = true; - setRotation(S1, 0F, 0F, 0F); - S2 = new ModelRenderer(this, 22, 39); - S2.addBox(0F, 0F, 0F, 10, 10, 1); - S2.setRotationPoint(-5F, 11F, 7F); - S2.setTextureSize(64, 64); - S2.mirror = true; - setRotation(S2, 0F, 0F, 0F); - S3 = new ModelRenderer(this, 0, 39); - S3.addBox(0F, 0F, 0F, 1, 10, 10); - S3.setRotationPoint(-8F, 11F, -5F); - S3.setTextureSize(64, 64); - S3.mirror = true; - setRotation(S3, 0F, 0F, 0F); - S4 = new ModelRenderer(this, 0, 28); - S4.addBox(0F, 0F, 0F, 10, 1, 10); - S4.setRotationPoint(-5F, 23F, -5F); - S4.setTextureSize(64, 64); - S4.mirror = true; - setRotation(S4, 0F, 0F, 0F); - S5 = new ModelRenderer(this, 22, 39); - S5.addBox(0F, 0F, 0F, 10, 10, 1); - S5.setRotationPoint(-5F, 11F, -8F); - S5.setTextureSize(64, 64); - S5.mirror = true; - setRotation(S5, 0F, 0F, 0F); - Base = new ModelRenderer(this, 0, 0); - Base.addBox(0F, 0F, 0F, 14, 14, 14); - Base.setRotationPoint(-7F, 9F, -7F); - Base.setTextureSize(64, 64); - Base.mirror = true; - setRotation(Base, 0F, 0F, 0F); - S6 = new ModelRenderer(this, 0, 28); - S6.addBox(0F, 0F, 0F, 10, 1, 10); - S6.setRotationPoint(-5F, 8F, -5F); - S6.setTextureSize(64, 64); - S6.mirror = true; - setRotation(S6, 0F, 0F, 0F); - } - - public void render(float size) - { - S1.render(size); - S2.render(size); - S3.render(size); - S4.render(size); - S5.render(size); - Base.render(size); - S6.render(size); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } -} diff --git a/src/main/java/mekanism/client/model/ModelMetallurgicInfuser.java b/src/main/java/mekanism/client/model/ModelMetallurgicInfuser.java deleted file mode 100644 index a7c1b4365..000000000 --- a/src/main/java/mekanism/client/model/ModelMetallurgicInfuser.java +++ /dev/null @@ -1,165 +0,0 @@ -package mekanism.client.model; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -@SideOnly(Side.CLIENT) -public class ModelMetallurgicInfuser extends ModelBase -{ - ModelRenderer base; - ModelRenderer back; - ModelRenderer connector1; - ModelRenderer connector2; - ModelRenderer sideRight; - ModelRenderer top; - ModelRenderer sideLeft; - ModelRenderer tap1; - ModelRenderer tap2; - ModelRenderer tapBase1; - ModelRenderer tapBase2; - ModelRenderer divider; - ModelRenderer plate1; - ModelRenderer plate2; - ModelRenderer plate3; - ModelRenderer bar1; - ModelRenderer bar2; - - public ModelMetallurgicInfuser() - { - textureWidth = 128; - textureHeight = 64; - - base = new ModelRenderer(this, 0, 0); - base.addBox(0F, 0F, 0F, 16, 4, 16); - base.setRotationPoint(-8F, 20F, -8F); - base.setTextureSize(128, 64); - base.mirror = true; - setRotation(base, 0F, 0F, 0F); - back = new ModelRenderer(this, 42, 20); - back.addBox(0F, 0F, 0F, 16, 12, 1); - back.setRotationPoint(-8F, 8F, 7F); - back.setTextureSize(128, 64); - back.mirror = true; - setRotation(back, 0F, 0F, 0F); - connector1 = new ModelRenderer(this, 0, 8); - connector1.addBox(0F, 0F, 0F, 1, 5, 3); - connector1.setRotationPoint(-4F, 8.5F, -3F); - connector1.setTextureSize(128, 64); - connector1.mirror = true; - setRotation(connector1, 0F, 0F, 0F); - connector2 = new ModelRenderer(this, 0, 8); - connector2.addBox(0F, 0F, 0F, 1, 5, 3); - connector2.setRotationPoint(3F, 8.5F, -3F); - connector2.setTextureSize(128, 64); - connector2.mirror = true; - setRotation(connector2, 0F, 0F, 0F); - sideRight = new ModelRenderer(this, 64, 0); - sideRight.mirror = true; - sideRight.addBox(0F, 0F, 0F, 1, 11, 7); - sideRight.setRotationPoint(7F, 9F, 0F); - sideRight.setTextureSize(128, 64); - setRotation(sideRight, 0F, 0F, 0F); - top = new ModelRenderer(this, 80, 0); - top.addBox(0F, 0F, 0F, 16, 1, 7); - top.setRotationPoint(-8F, 8F, 0F); - top.setTextureSize(128, 64); - top.mirror = true; - setRotation(top, 0F, 0F, 0F); - sideLeft = new ModelRenderer(this, 64, 0); - sideLeft.addBox(0F, 0F, 0F, 1, 11, 7); - sideLeft.setRotationPoint(-8F, 9F, 0F); - sideLeft.setTextureSize(128, 64); - sideLeft.mirror = true; - setRotation(sideLeft, 0F, 0F, 0F); - tap1 = new ModelRenderer(this, 80, 8); - tap1.addBox(0F, 0F, 0F, 2, 1, 11); - tap1.setRotationPoint(-4.5F, 11.5F, -4F); - tap1.setTextureSize(128, 64); - tap1.mirror = true; - setRotation(tap1, 0F, 0F, 0F); - tap2 = new ModelRenderer(this, 80, 8); - tap2.addBox(0F, 0F, 0F, 2, 1, 11); - tap2.setRotationPoint(2.5F, 11.5F, -4F); - tap2.setTextureSize(128, 64); - tap2.mirror = true; - setRotation(tap2, 0F, 0F, 0F); - tapBase1 = new ModelRenderer(this, 4, 0); - tapBase1.addBox(0F, 0F, 0F, 2, 1, 2); - tapBase1.setRotationPoint(-4.5F, 12.5F, 5F); - tapBase1.setTextureSize(128, 64); - tapBase1.mirror = true; - setRotation(tapBase1, 0F, 0F, 0F); - tapBase2 = new ModelRenderer(this, 4, 0); - tapBase2.addBox(0F, 0F, 0F, 2, 1, 2); - tapBase2.setRotationPoint(2.5F, 12.5F, 5F); - tapBase2.setTextureSize(128, 64); - tapBase2.mirror = true; - setRotation(tapBase2, 0F, 0F, 0F); - divider = new ModelRenderer(this, 66, 20); - divider.addBox(0F, 0F, 0F, 13, 1, 14); - divider.setRotationPoint(-6.5F, 16F, -6.5F); - divider.setTextureSize(128, 64); - divider.mirror = true; - setRotation(divider, 0F, 0F, 0F); - plate1 = new ModelRenderer(this, 0, 20); - plate1.addBox(0F, 0F, 0F, 14, 3, 14); - plate1.setRotationPoint(-7F, 9F, -7F); - plate1.setTextureSize(128, 64); - plate1.mirror = true; - setRotation(plate1, 0F, 0F, 0F); - plate2 = new ModelRenderer(this, 0, 37); - plate2.addBox(0F, 0F, 0F, 14, 3, 14); - plate2.setRotationPoint(-7F, 13F, -7F); - plate2.setTextureSize(128, 64); - plate2.mirror = true; - setRotation(plate2, 0F, 0F, 0F); - plate3 = new ModelRenderer(this, 0, 37); - plate3.addBox(0F, 0F, 0F, 14, 3, 14); - plate3.setRotationPoint(-7F, 17F, -7F); - plate3.setTextureSize(128, 64); - plate3.mirror = true; - setRotation(plate3, 0F, 0F, 0F); - bar1 = new ModelRenderer(this, 0, 0); - bar1.addBox(0F, 0F, 0F, 1, 1, 1); - bar1.setRotationPoint(-6.5F, 12F, -6.5F); - bar1.setTextureSize(128, 64); - bar1.mirror = true; - setRotation(bar1, 0F, 0F, 0F); - bar2 = new ModelRenderer(this, 0, 0); - bar2.addBox(0F, 0F, 0F, 1, 1, 1); - bar2.setRotationPoint(5.5F, 12F, -6.5F); - bar2.setTextureSize(128, 64); - bar2.mirror = true; - setRotation(bar2, 0F, 0F, 0F); - } - - public void render(float size) - { - base.render(size); - back.render(size); - connector1.render(size); - connector2.render(size); - sideRight.render(size); - top.render(size); - sideLeft.render(size); - tap1.render(size); - tap2.render(size); - tapBase1.render(size); - tapBase2.render(size); - divider.render(size); - plate1.render(size); - plate2.render(size); - plate3.render(size); - bar1.render(size); - bar2.render(size); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } -} diff --git a/src/main/java/mekanism/client/model/ModelObsidianTNT.java b/src/main/java/mekanism/client/model/ModelObsidianTNT.java deleted file mode 100644 index 261a5139f..000000000 --- a/src/main/java/mekanism/client/model/ModelObsidianTNT.java +++ /dev/null @@ -1,189 +0,0 @@ -package mekanism.client.model; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -@SideOnly(Side.CLIENT) -public class ModelObsidianTNT extends ModelBase -{ - ModelRenderer Wick9; - ModelRenderer Wick8; - ModelRenderer Wick7; - ModelRenderer Wick6; - ModelRenderer Wick5; - ModelRenderer Wick4; - ModelRenderer Wick3; - ModelRenderer Wick2; - ModelRenderer Wick1; - ModelRenderer Wooden2; - ModelRenderer Wooden1; - ModelRenderer Rod1; - ModelRenderer Rod2; - ModelRenderer Rod3; - ModelRenderer Rod4; - ModelRenderer Rod5; - ModelRenderer Rod6; - ModelRenderer Rod7; - ModelRenderer Rod8; - ModelRenderer Rod9; - - public ModelObsidianTNT() - { - textureWidth = 64; - textureHeight = 64; - - Wick9 = new ModelRenderer(this, 0, 0); - Wick9.addBox(0F, 0F, 0F, 1, 2, 1); - Wick9.setRotationPoint(-0.5F, 9.2F, -0.5F); - Wick9.setTextureSize(64, 64); - Wick9.mirror = true; - setRotation(Wick9, 0F, 0F, 0.2268928F); - Wick8 = new ModelRenderer(this, 0, 0); - Wick8.addBox(0F, 0F, 0F, 1, 2, 1); - Wick8.setRotationPoint(-0.5F, 9.5F, -5.5F); - Wick8.setTextureSize(64, 64); - Wick8.mirror = true; - setRotation(Wick8, 0F, 0F, -0.2379431F); - Wick7 = new ModelRenderer(this, 0, 0); - Wick7.addBox(0F, 0F, 0F, 1, 2, 1); - Wick7.setRotationPoint(-0.5F, 9.5F, 4.5F); - Wick7.setTextureSize(64, 64); - Wick7.mirror = true; - setRotation(Wick7, 0F, 0F, -0.2379431F); - Wick6 = new ModelRenderer(this, 0, 0); - Wick6.addBox(0F, 0F, 0F, 1, 2, 1); - Wick6.setRotationPoint(-5.5F, 9.2F, -5.5F); - Wick6.setTextureSize(64, 64); - Wick6.mirror = true; - setRotation(Wick6, 0F, 0F, 0.2268928F); - Wick5 = new ModelRenderer(this, 0, 0); - Wick5.addBox(0F, 0F, 0F, 1, 2, 1); - Wick5.setRotationPoint(-5.5F, 9.5F, -0.5F); - Wick5.setTextureSize(64, 64); - Wick5.mirror = true; - setRotation(Wick5, 0F, 0F, -0.2379431F); - Wick4 = new ModelRenderer(this, 0, 0); - Wick4.addBox(0F, 0F, 0F, 1, 2, 1); - Wick4.setRotationPoint(-5.5F, 9.2F, 4.5F); - Wick4.setTextureSize(64, 64); - Wick4.mirror = true; - setRotation(Wick4, 0F, 0F, 0.2268928F); - Wick3 = new ModelRenderer(this, 0, 0); - Wick3.addBox(0F, 0F, 0F, 1, 2, 1); - Wick3.setRotationPoint(4.5F, 9.2F, -5.5F); - Wick3.setTextureSize(64, 64); - Wick3.mirror = true; - setRotation(Wick3, 0F, 0F, 0.2268928F); - Wick2 = new ModelRenderer(this, 0, 0); - Wick2.addBox(0F, 0F, 0F, 1, 2, 1); - Wick2.setRotationPoint(4.5F, 9.5F, -0.5F); - Wick2.setTextureSize(64, 64); - Wick2.mirror = true; - setRotation(Wick2, 0F, 0F, -0.2379431F); - Wick1 = new ModelRenderer(this, 0, 0); - Wick1.addBox(0F, 0F, 0F, 1, 2, 1); - Wick1.setRotationPoint(4.5F, 9.2F, 4.5F); - Wick1.setTextureSize(64, 64); - Wick1.mirror = true; - setRotation(Wick1, 0F, 0F, 0.2268928F); - Wooden2 = new ModelRenderer(this, 0, 0); - Wooden2.addBox(0F, 0F, 0F, 16, 3, 16); - Wooden2.setRotationPoint(-8F, 12F, -8F); - Wooden2.setTextureSize(64, 64); - Wooden2.mirror = true; - setRotation(Wooden2, 0F, 0F, 0F); - Wooden1 = new ModelRenderer(this, 0, 0); - Wooden1.addBox(0F, 0F, 0F, 16, 3, 16); - Wooden1.setRotationPoint(-8F, 20F, -8F); - Wooden1.setTextureSize(64, 64); - Wooden1.mirror = true; - setRotation(Wooden1, 0F, 0F, 0F); - Rod1 = new ModelRenderer(this, 0, 20); - Rod1.addBox(0F, 0F, 0F, 4, 13, 4); - Rod1.setRotationPoint(3F, 11F, 3F); - Rod1.setTextureSize(64, 64); - Rod1.mirror = true; - setRotation(Rod1, 0F, 0F, 0F); - Rod2 = new ModelRenderer(this, 0, 20); - Rod2.addBox(0F, 0F, 0F, 4, 13, 4); - Rod2.setRotationPoint(3F, 11F, -2F); - Rod2.setTextureSize(64, 64); - Rod2.mirror = true; - setRotation(Rod2, 0F, 0F, 0F); - Rod3 = new ModelRenderer(this, 0, 20); - Rod3.addBox(0F, 0F, 0F, 4, 13, 4); - Rod3.setRotationPoint(3F, 11F, -7F); - Rod3.setTextureSize(64, 64); - Rod3.mirror = true; - setRotation(Rod3, 0F, 0F, 0F); - Rod4 = new ModelRenderer(this, 0, 20); - Rod4.addBox(0F, 0F, 0F, 4, 13, 4); - Rod4.setRotationPoint(-2F, 11F, -7F); - Rod4.setTextureSize(64, 64); - Rod4.mirror = true; - setRotation(Rod4, 0F, 0F, 0F); - Rod5 = new ModelRenderer(this, 0, 20); - Rod5.addBox(0F, 0F, 0F, 4, 13, 4); - Rod5.setRotationPoint(-2F, 11F, -2F); - Rod5.setTextureSize(64, 64); - Rod5.mirror = true; - setRotation(Rod5, 0F, 0F, 0F); - Rod6 = new ModelRenderer(this, 0, 20); - Rod6.addBox(0F, 0F, 0F, 4, 13, 4); - Rod6.setRotationPoint(-2F, 11F, 3F); - Rod6.setTextureSize(64, 64); - Rod6.mirror = true; - setRotation(Rod6, 0F, 0F, 0F); - Rod7 = new ModelRenderer(this, 0, 20); - Rod7.addBox(0F, 0F, 0F, 4, 13, 4); - Rod7.setRotationPoint(-7F, 11F, -2F); - Rod7.setTextureSize(64, 64); - Rod7.mirror = true; - setRotation(Rod7, 0F, 0F, 0F); - Rod8 = new ModelRenderer(this, 0, 20); - Rod8.addBox(0F, 0F, 0F, 4, 13, 4); - Rod8.setRotationPoint(-7F, 11F, 3F); - Rod8.setTextureSize(64, 64); - Rod8.mirror = true; - setRotation(Rod8, 0F, 0F, 0F); - Rod9 = new ModelRenderer(this, 0, 20); - Rod9.addBox(0F, 0F, 0F, 4, 13, 4); - Rod9.setRotationPoint(-7F, 11F, -7F); - Rod9.setTextureSize(64, 64); - Rod9.mirror = true; - setRotation(Rod9, 0F, 0F, 0F); - } - - public void render(float size) - { - Wick9.render(size); - Wick8.render(size); - Wick7.render(size); - Wick6.render(size); - Wick5.render(size); - Wick4.render(size); - Wick3.render(size); - Wick2.render(size); - Wick1.render(size); - Wooden2.render(size); - Wooden1.render(size); - Rod1.render(size); - Rod2.render(size); - Rod3.render(size); - Rod4.render(size); - Rod5.render(size); - Rod6.render(size); - Rod7.render(size); - Rod8.render(size); - Rod9.render(size); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } -} diff --git a/src/main/java/mekanism/client/model/ModelPressurizedReactionChamber.java b/src/main/java/mekanism/client/model/ModelPressurizedReactionChamber.java deleted file mode 100644 index 10f9cfd1e..000000000 --- a/src/main/java/mekanism/client/model/ModelPressurizedReactionChamber.java +++ /dev/null @@ -1,109 +0,0 @@ -package mekanism.client.model; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -@SideOnly(Side.CLIENT) -public class ModelPressurizedReactionChamber extends ModelBase -{ - ModelRenderer frontDivider1; - ModelRenderer base; - ModelRenderer front; - ModelRenderer bar1; - ModelRenderer body; - ModelRenderer bar5; - ModelRenderer bar4; - ModelRenderer bar3; - ModelRenderer bar2; - ModelRenderer frontDivider2; - - public ModelPressurizedReactionChamber() - { - textureWidth = 128; - textureHeight = 64; - - frontDivider1 = new ModelRenderer(this, 52, 20); - frontDivider1.addBox(0F, 0F, 0F, 2, 12, 6); - frontDivider1.setRotationPoint(-7F, 8.5F, -7.5F); - frontDivider1.setTextureSize(128, 64); - frontDivider1.mirror = true; - setRotation(frontDivider1, 0F, 0F, 0F); - base = new ModelRenderer(this, 0, 0); - base.addBox(0F, 0F, 0F, 16, 4, 16); - base.setRotationPoint(-8F, 20F, -8F); - base.setTextureSize(128, 64); - base.mirror = true; - setRotation(base, 0F, 0F, 0F); - front = new ModelRenderer(this, 48, 0); - front.addBox(0F, 0F, 0F, 9, 11, 5); - front.setRotationPoint(-2F, 9F, -7F); - front.setTextureSize(128, 64); - front.mirror = true; - setRotation(front, 0F, 0F, 0F); - bar1 = new ModelRenderer(this, 0, 0); - bar1.addBox(0F, 0F, 0F, 1, 1, 5); - bar1.setRotationPoint(-5F, 18F, -7F); - bar1.setTextureSize(128, 64); - bar1.mirror = true; - setRotation(bar1, 0F, 0F, 0F); - body = new ModelRenderer(this, 0, 20); - body.addBox(0F, 0F, 0F, 16, 12, 10); - body.setRotationPoint(-8F, 8F, -2F); - body.setTextureSize(128, 64); - body.mirror = true; - setRotation(body, 0F, 0F, 0F); - bar5 = new ModelRenderer(this, 0, 0); - bar5.addBox(0F, 0F, 0F, 1, 1, 5); - bar5.setRotationPoint(-5F, 10F, -7F); - bar5.setTextureSize(128, 64); - bar5.mirror = true; - setRotation(bar5, 0F, 0F, 0F); - bar4 = new ModelRenderer(this, 0, 0); - bar4.addBox(0F, 0F, 0F, 1, 1, 5); - bar4.setRotationPoint(-5F, 12F, -7F); - bar4.setTextureSize(128, 64); - bar4.mirror = true; - setRotation(bar4, 0F, 0F, 0F); - bar3 = new ModelRenderer(this, 0, 0); - bar3.addBox(0F, 0F, 0F, 1, 1, 5); - bar3.setRotationPoint(-5F, 14F, -7F); - bar3.setTextureSize(128, 64); - bar3.mirror = true; - setRotation(bar3, 0F, 0F, 0F); - bar2 = new ModelRenderer(this, 0, 0); - bar2.addBox(0F, 0F, 0F, 1, 1, 5); - bar2.setRotationPoint(-5F, 16F, -7F); - bar2.setTextureSize(128, 64); - bar2.mirror = true; - setRotation(bar2, 0F, 0F, 0F); - frontDivider2 = new ModelRenderer(this, 52, 20); - frontDivider2.mirror = true; - frontDivider2.addBox(0F, 0F, 0F, 2, 12, 6); - frontDivider2.setRotationPoint(-4F, 8.5F, -7.5F); - frontDivider2.setTextureSize(128, 64); - setRotation(frontDivider2, 0F, 0F, 0F); - } - - public void render(float size) - { - frontDivider1.render(size); - base.render(size); - front.render(size); - bar1.render(size); - body.render(size); - bar5.render(size); - bar4.render(size); - bar3.render(size); - bar2.render(size); - frontDivider2.render(size); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } -} diff --git a/src/main/java/mekanism/client/model/ModelQuantumEntangloporter.java b/src/main/java/mekanism/client/model/ModelQuantumEntangloporter.java index f53ca5251..5f56d3f46 100644 --- a/src/main/java/mekanism/client/model/ModelQuantumEntangloporter.java +++ b/src/main/java/mekanism/client/model/ModelQuantumEntangloporter.java @@ -5,11 +5,9 @@ import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.util.ResourceLocation; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -314,23 +312,26 @@ public class ModelQuantumEntangloporter extends ModelBase setRotation(portLeftLarge, 0F, 0F, 0F); } - public void render(float size, TextureManager manager) + public void render(float size, TextureManager manager, boolean renderMain) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); MekanismRenderer.blendOn(); - doRender(size); + if(renderMain) + { + doRender(size); + } manager.bindTexture(OVERLAY); - GL11.glScalef(1.001F, 1.001F, 1.001F); - GL11.glTranslatef(0, -0.0011F, 0); + GlStateManager.scale(1.001F, 1.001F, 1.001F); + GlStateManager.translate(0, -0.0011F, 0); MekanismRenderer.glowOn(); doRender(size); MekanismRenderer.glowOff(); MekanismRenderer.blendOff(); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } public void doRender(float size) diff --git a/src/main/java/mekanism/client/model/ModelResistiveHeater.java b/src/main/java/mekanism/client/model/ModelResistiveHeater.java index 85b896d90..11dd13fca 100644 --- a/src/main/java/mekanism/client/model/ModelResistiveHeater.java +++ b/src/main/java/mekanism/client/model/ModelResistiveHeater.java @@ -5,11 +5,9 @@ import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.util.ResourceLocation; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -167,23 +165,26 @@ public class ModelResistiveHeater extends ModelBase setRotation(portLeft, 0F, 0F, 0F); } - public void render(float size, boolean on, TextureManager manager) + public void render(float size, boolean on, TextureManager manager, boolean renderMain) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); MekanismRenderer.blendOn(); - doRender(size); + if(renderMain) + { + doRender(size); + } manager.bindTexture(on ? OVERLAY_ON : OVERLAY_OFF); - GL11.glScalef(1.001F, 1.001F, 1.001F); - GL11.glTranslatef(0, -0.0011F, 0); + GlStateManager.scale(1.001F, 1.001F, 1.001F); + GlStateManager.translate(0, -0.0011F, 0); MekanismRenderer.glowOn(); doRender(size); MekanismRenderer.glowOff(); MekanismRenderer.blendOff(); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } private void doRender(float size) diff --git a/src/main/java/mekanism/client/model/ModelRobit.java b/src/main/java/mekanism/client/model/ModelRobit.java index a73c480e8..275863559 100644 --- a/src/main/java/mekanism/client/model/ModelRobit.java +++ b/src/main/java/mekanism/client/model/ModelRobit.java @@ -3,13 +3,13 @@ package mekanism.client.model; import mekanism.client.render.MekanismRenderer; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.Entity; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class ModelRobit extends ModelBase { @@ -132,8 +132,8 @@ public class ModelRobit extends ModelBase super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); - GL11.glPushMatrix(); - GL11.glRotatef(180, 0.0F, 1.0F, 0.0F); + GlStateManager.pushMatrix(); + GlStateManager.rotate(180, 0.0F, 1.0F, 0.0F); Body.render(f5); Bottom.render(f5); @@ -154,7 +154,7 @@ public class ModelRobit extends ModelBase eyeLeft.render(f5); MekanismRenderer.glowOff(); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } public void render(float size) diff --git a/src/main/java/mekanism/client/model/ModelSecurityDesk.java b/src/main/java/mekanism/client/model/ModelSecurityDesk.java index d58d343ce..6b51e1620 100644 --- a/src/main/java/mekanism/client/model/ModelSecurityDesk.java +++ b/src/main/java/mekanism/client/model/ModelSecurityDesk.java @@ -5,11 +5,9 @@ import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.util.ResourceLocation; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -51,42 +49,36 @@ public class ModelSecurityDesk extends ModelBase led.setRotationPoint(-7F, 5F, 4F); led.setTextureSize(128, 64); led.mirror = true; - //TODO setRotation(led, -0.4712389F, 0F, 0F); monitorBack = new ModelRenderer(this, 82, 0); monitorBack.addBox(1F, -3F, 0F, 12, 6, 1); monitorBack.setRotationPoint(-7F, 5F, 4F); monitorBack.setTextureSize(128, 64); monitorBack.mirror = true; - //TODO setRotation(monitorBack, -0.4712389F, 0F, 0F); keyboard = new ModelRenderer(this, 64, 27); keyboard.addBox(0F, 0F, 0F, 10, 1, 5); keyboard.setRotationPoint(-5F, 10.5F, -6F); keyboard.setTextureSize(128, 64); keyboard.mirror = true; - //TODO setRotation(keyboard, 0.0872665F, 0F, 0F); monitor = new ModelRenderer(this, 64, 10); monitor.addBox(0F, -5F, -2F, 14, 10, 2); monitor.setRotationPoint(-7F, 5F, 4F); monitor.setTextureSize(128, 64); monitor.mirror = true; - //TODO setRotation(monitor, -0.4712389F, 0F, 0F); standNeck = new ModelRenderer(this, 96, 7); standNeck.addBox(0F, -7F, -1F, 2, 7, 1); standNeck.setRotationPoint(-1F, 10F, 6F); standNeck.setTextureSize(128, 64); standNeck.mirror = true; - //TODO setRotation(standNeck, 0.0698132F, 0F, 0F); standBase = new ModelRenderer(this, 64, 22); standBase.addBox(0F, 0F, -4F, 8, 1, 4); standBase.setRotationPoint(-4F, 10F, 6F); standBase.setTextureSize(128, 64); standBase.mirror = true; - //TODO setRotation(standBase, 0.1047198F, 0F, 0F); deskMiddle = new ModelRenderer(this, 0, 23); deskMiddle.addBox(0F, 0F, 0F, 14, 1, 14); @@ -99,27 +91,26 @@ public class ModelSecurityDesk extends ModelBase monitorScreen.setRotationPoint(-7F, 5F, 4F); monitorScreen.setTextureSize(128, 64); monitorScreen.mirror = true; - //TODO setRotation(monitorScreen, -0.4712389F, 0F, 0F); } public void render(float size, TextureManager manager) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); MekanismRenderer.blendOn(); doRender(size); manager.bindTexture(OVERLAY); - GL11.glScalef(1.001F, 1.001F, 1.001F); - GL11.glTranslatef(0, -0.0011F, 0); + GlStateManager.scale(1.001F, 1.001F, 1.001F); + GlStateManager.translate(0, -0.0011F, 0); MekanismRenderer.glowOn(); doRender(size); MekanismRenderer.glowOff(); MekanismRenderer.blendOff(); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } private void doRender(float size) diff --git a/src/main/java/mekanism/client/model/ModelSeismicVibrator.java b/src/main/java/mekanism/client/model/ModelSeismicVibrator.java index f09a7f23b..b6441c650 100644 --- a/src/main/java/mekanism/client/model/ModelSeismicVibrator.java +++ b/src/main/java/mekanism/client/model/ModelSeismicVibrator.java @@ -106,7 +106,6 @@ public class ModelSeismicVibrator extends ModelBase arm3.setRotationPoint(-1F, 7F, 3F); arm3.setTextureSize(128, 64); arm3.mirror = true; - //TODO setRotation(arm3, -0.3665191F, 0F, 0F); plate2 = new ModelRenderer(this, 48, 0); plate2.addBox(0F, 0F, 0F, 4, 2, 4); @@ -137,7 +136,6 @@ public class ModelSeismicVibrator extends ModelBase frameBack5.setRotationPoint(7.5F, 7F, 6.49F); frameBack5.setTextureSize(128, 64); frameBack5.mirror = true; - //TODO setRotation(frameBack5, 0F, 0F, 0.837758F); pole3 = new ModelRenderer(this, 0, 34); pole3.addBox(0F, 0F, 0F, 1, 25, 1); @@ -150,7 +148,6 @@ public class ModelSeismicVibrator extends ModelBase frameRight5.setRotationPoint(6.485F, 7F, -7.5F); frameRight5.setTextureSize(128, 64); frameRight5.mirror = true; - //TODO setRotation(frameRight5, 0.837758F, 0F, 0F); baseRight = new ModelRenderer(this, 38, 18); baseRight.mirror = true; @@ -187,35 +184,30 @@ public class ModelSeismicVibrator extends ModelBase frameRight4.setRotationPoint(6.49F, 7F, 7.5F); frameRight4.setTextureSize(128, 64); frameRight4.mirror = true; - //TODO setRotation(frameRight4, -0.837758F, 0F, 0F); frameRight1 = new ModelRenderer(this, 4, 34); frameRight1.addBox(0F, 0F, 0F, 1, 19, 1); frameRight1.setRotationPoint(6.485F, -6F, -7.5F); frameRight1.setTextureSize(128, 64); frameRight1.mirror = true; - //TODO setRotation(frameRight1, 0.837758F, 0F, 0F); frameRight2 = new ModelRenderer(this, 4, 34); frameRight2.addBox(0F, 0F, -1F, 1, 19, 1); frameRight2.setRotationPoint(6.49F, -6F, 7.5F); frameRight2.setTextureSize(128, 64); frameRight2.mirror = true; - //TODO setRotation(frameRight2, -0.837758F, 0F, 0F); frameLeft5 = new ModelRenderer(this, 4, 34); frameLeft5.addBox(0F, 0F, 0F, 1, 19, 1); frameLeft5.setRotationPoint(-7.485F, 7F, -7.5F); frameLeft5.setTextureSize(128, 64); frameLeft5.mirror = true; - //TODO setRotation(frameLeft5, 0.837758F, 0F, 0F); frameLeft4 = new ModelRenderer(this, 4, 34); frameLeft4.addBox(0F, 0F, -1F, 1, 19, 1); frameLeft4.setRotationPoint(-7.49F, 7F, 7.5F); frameLeft4.setTextureSize(128, 64); frameLeft4.mirror = true; - //TODO setRotation(frameLeft4, -0.837758F, 0F, 0F); frameBack3 = new ModelRenderer(this, 36, 52); frameBack3.addBox(0F, 0F, 0F, 13, 1, 1); @@ -228,14 +220,12 @@ public class ModelSeismicVibrator extends ModelBase frameLeft2.setRotationPoint(-7.485F, -6F, -7.5F); frameLeft2.setTextureSize(128, 64); frameLeft2.mirror = true; - //TODO setRotation(frameLeft2, 0.837758F, 0F, 0F); frameLeft1 = new ModelRenderer(this, 4, 34); frameLeft1.addBox(0F, 0F, -1F, 1, 19, 1); frameLeft1.setRotationPoint(-7.49F, -6F, 7.5F); frameLeft1.setTextureSize(128, 64); frameLeft1.mirror = true; - //TODO setRotation(frameLeft1, -0.837758F, 0F, 0F); pole2 = new ModelRenderer(this, 0, 34); pole2.addBox(0F, 0F, 0F, 1, 25, 1); @@ -248,21 +238,18 @@ public class ModelSeismicVibrator extends ModelBase frameBack1.setRotationPoint(7.5F, -6F, 6.49F); frameBack1.setTextureSize(128, 64); frameBack1.mirror = true; - //TODO setRotation(frameBack1, 0F, 0F, 0.837758F); frameBack2 = new ModelRenderer(this, 4, 34); frameBack2.addBox(0F, 0F, 0F, 1, 19, 1); frameBack2.setRotationPoint(-7.5F, -6F, 6.49F); frameBack2.setTextureSize(128, 64); frameBack2.mirror = true; - //TODO setRotation(frameBack2, 0F, 0F, -0.837758F); frameBack4 = new ModelRenderer(this, 4, 34); frameBack4.addBox(0F, 0F, 0F, 1, 19, 1); frameBack4.setRotationPoint(-7.5F, 7F, 6.49F); frameBack4.setTextureSize(128, 64); frameBack4.mirror = true; - //TODO setRotation(frameBack4, 0F, 0F, -0.837758F); frameLeft3 = new ModelRenderer(this, 64, 27); frameLeft3.addBox(0F, 0F, 0F, 1, 1, 13); diff --git a/src/main/java/mekanism/client/render/CTM.java b/src/main/java/mekanism/client/render/CTM.java deleted file mode 100644 index 2143c763b..000000000 --- a/src/main/java/mekanism/client/render/CTM.java +++ /dev/null @@ -1,383 +0,0 @@ -package mekanism.client.render; - -import java.util.HashMap; -import java.util.List; -import java.util.Map.Entry; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.util.BlockPos; -import net.minecraft.world.IBlockAccess; - -/** - * CTM Logic adapted from Chisel. Code licensed under GPLv2 - * - * @author AUTOMATIC_MAIDEN, asie, pokefenn, unpairedbracket - */ -public class CTM -{ - static int submaps[][] = { {16, 17, 18, 19}, {16, 9, 18, 13}, {8, 9, 12, 13}, {8, 17, 12, 19}, {16, 9, 6, 15}, {8, 17, 14, 7}, {2, 11, 6, 15}, - {8, 9, 14, 15}, {10, 1, 14, 15}, {10, 11, 14, 5}, {0, 11, 4, 15}, {0, 1, 14, 15}, {}, {}, {}, {}, {16, 17, 6, 7}, {16, 9, 6, 5}, {8, 9, 4, 5}, - {8, 17, 4, 7}, {2, 11, 18, 13}, {10, 3, 12, 19}, {10, 11, 12, 13}, {10, 3, 14, 7}, {0, 11, 14, 15}, {10, 11, 4, 15}, {10, 11, 4, 5}, - {10, 1, 14, 5}, {}, {}, {}, {}, {2, 3, 6, 7}, {2, 1, 6, 5}, {0, 1, 4, 5}, {0, 3, 4, 7}, {2, 11, 6, 5}, {8, 9, 4, 15}, {2, 1, 6, 15}, {8, 9, 14, 5}, - {0, 1, 4, 15}, {0, 1, 14, 5}, {10, 1, 4, 15}, {0, 11, 14, 5}, {}, {}, {}, {}, {2, 3, 18, 19}, {2, 1, 18, 13}, {0, 1, 12, 13}, {0, 3, 12, 19}, - {10, 1, 12, 13}, {0, 3, 14, 7}, {0, 11, 12, 13}, {10, 3, 4, 7}, {0, 11, 4, 5}, {10, 1, 4, 5}, {10, 11, 14, 15}, {0, 1, 4, 5}, {}, {}, {}, {},}; - - public static int[] getSubmapIndices(IBlockAccess world, int x, int y, int z, int side, HashMap> blockMetas, boolean convexConnections) - { - int index = getTexture(world, x, y, z, side, blockMetas, convexConnections); - - return submaps[index]; - } - - public static int getTexture(IBlockAccess world, int x, int y, int z, int side, HashMap> blockMetas, boolean convexConnections) - { - if(world == null) - { - return 0; - } - - int texture = 0; - - boolean b[] = new boolean[6]; - - if(side <= 1) - { - b[0] = isConnected(world, x - 1, y, z, side, blockMetas, convexConnections); - b[1] = isConnected(world, x + 1, y, z, side, blockMetas, convexConnections); - b[2] = isConnected(world, x, y, z + 1, side, blockMetas, convexConnections); - b[3] = isConnected(world, x, y, z - 1, side, blockMetas, convexConnections); - } - else if(side == 2) - { - b[0] = isConnected(world, x + 1, y, z, side, blockMetas, convexConnections); - b[1] = isConnected(world, x - 1, y, z, side, blockMetas, convexConnections); - b[2] = isConnected(world, x, y - 1, z, side, blockMetas, convexConnections); - b[3] = isConnected(world, x, y + 1, z, side, blockMetas, convexConnections); - } - else if(side == 3) - { - b[0] = isConnected(world, x - 1, y, z, side, blockMetas, convexConnections); - b[1] = isConnected(world, x + 1, y, z, side, blockMetas, convexConnections); - b[2] = isConnected(world, x, y - 1, z, side, blockMetas, convexConnections); - b[3] = isConnected(world, x, y + 1, z, side, blockMetas, convexConnections); - } - else if(side == 4) - { - b[0] = isConnected(world, x, y, z - 1, side, blockMetas, convexConnections); - b[1] = isConnected(world, x, y, z + 1, side, blockMetas, convexConnections); - b[2] = isConnected(world, x, y - 1, z, side, blockMetas, convexConnections); - b[3] = isConnected(world, x, y + 1, z, side, blockMetas, convexConnections); - } - else if(side == 5) - { - b[0] = isConnected(world, x, y, z + 1, side, blockMetas, convexConnections); - b[1] = isConnected(world, x, y, z - 1, side, blockMetas, convexConnections); - b[2] = isConnected(world, x, y - 1, z, side, blockMetas, convexConnections); - b[3] = isConnected(world, x, y + 1, z, side, blockMetas, convexConnections); - } - - if(b[0] & !b[1] & !b[2] & !b[3]) - { - texture = 3; - } - else if(!b[0] & b[1] & !b[2] & !b[3]) - { - texture = 1; - } - else if(!b[0] & !b[1] & b[2] & !b[3]) - { - texture = 16; - } - else if(!b[0] & !b[1] & !b[2] & b[3]) - { - texture = 48; - } - else if(b[0] & b[1] & !b[2] & !b[3]) - { - texture = 2; - } - else if(!b[0] & !b[1] & b[2] & b[3]) - { - texture = 32; - } - else if(b[0] & !b[1] & b[2] & !b[3]) - { - texture = 19; - } - else if(b[0] & !b[1] & !b[2] & b[3]) - { - texture = 51; - } - else if(!b[0] & b[1] & b[2] & !b[3]) - { - texture = 17; - } - else if(!b[0] & b[1] & !b[2] & b[3]) - { - texture = 49; - } - else if(!b[0] & b[1] & b[2] & b[3]) - { - texture = 33; - } - else if(b[0] & !b[1] & b[2] & b[3]) - { - texture = 35; - } - else if(b[0] & b[1] & !b[2] & b[3]) - { - texture = 50; - } - else if(b[0] & b[1] & b[2] & !b[3]) - { - texture = 18; - } - else if(b[0] & b[1] & b[2] & b[3]) - { - texture = 34; - } - - boolean b2[] = new boolean[6]; - - if(side <= 1) - { - b2[0] = !isConnected(world, x + 1, y, z + 1, side, blockMetas, convexConnections); - b2[1] = !isConnected(world, x - 1, y, z + 1, side, blockMetas, convexConnections); - b2[2] = !isConnected(world, x + 1, y, z - 1, side, blockMetas, convexConnections); - b2[3] = !isConnected(world, x - 1, y, z - 1, side, blockMetas, convexConnections); - } - else if(side == 2) - { - b2[0] = !isConnected(world, x - 1, y - 1, z, side, blockMetas, convexConnections); - b2[1] = !isConnected(world, x + 1, y - 1, z, side, blockMetas, convexConnections); - b2[2] = !isConnected(world, x - 1, y + 1, z, side, blockMetas, convexConnections); - b2[3] = !isConnected(world, x + 1, y + 1, z, side, blockMetas, convexConnections); - } - else if(side == 3) - { - b2[0] = !isConnected(world, x + 1, y - 1, z, side, blockMetas, convexConnections); - b2[1] = !isConnected(world, x - 1, y - 1, z, side, blockMetas, convexConnections); - b2[2] = !isConnected(world, x + 1, y + 1, z, side, blockMetas, convexConnections); - b2[3] = !isConnected(world, x - 1, y + 1, z, side, blockMetas, convexConnections); - } - else if(side == 4) - { - b2[0] = !isConnected(world, x, y - 1, z + 1, side, blockMetas, convexConnections); - b2[1] = !isConnected(world, x, y - 1, z - 1, side, blockMetas, convexConnections); - b2[2] = !isConnected(world, x, y + 1, z + 1, side, blockMetas, convexConnections); - b2[3] = !isConnected(world, x, y + 1, z - 1, side, blockMetas, convexConnections); - } - else if(side == 5) - { - b2[0] = !isConnected(world, x, y - 1, z - 1, side, blockMetas, convexConnections); - b2[1] = !isConnected(world, x, y - 1, z + 1, side, blockMetas, convexConnections); - b2[2] = !isConnected(world, x, y + 1, z - 1, side, blockMetas, convexConnections); - b2[3] = !isConnected(world, x, y + 1, z + 1, side, blockMetas, convexConnections); - } - - if(texture == 17 && b2[0]) - { - texture = 4; - } - - if(texture == 19 && b2[1]) - { - texture = 5; - } - - if(texture == 49 && b2[2]) - { - texture = 20; - } - - if(texture == 51 && b2[3]) - { - texture = 21; - } - - if(texture == 18 && b2[0] && b2[1]) - { - texture = 7; - } - - if(texture == 33 && b2[0] && b2[2]) - { - texture = 6; - } - - if(texture == 35 && b2[3] && b2[1]) - { - texture = 23; - } - - if(texture == 50 && b2[3] && b2[2]) - { - texture = 22; - } - - if(texture == 18 && !b2[0] && b2[1]) - { - texture = 39; - } - - if(texture == 33 && b2[0] && !b2[2]) - { - texture = 38; - } - - if(texture == 35 && !b2[3] && b2[1]) - { - texture = 53; - } - - if(texture == 50 && b2[3] && !b2[2]) - { - texture = 52; - } - - if(texture == 18 && b2[0] && !b2[1]) - { - texture = 37; - } - - if(texture == 33 && !b2[0] && b2[2]) - { - texture = 36; - } - - if(texture == 35 && b2[3] && !b2[1]) - { - texture = 55; - } - - if(texture == 50 && !b2[3] && b2[2]) - { - texture = 54; - } - - if(texture == 34 && b2[0] && b2[1] && b2[2] && b2[3]) - { - texture = 58; - } - - if(texture == 34 && !b2[0] && b2[1] && b2[2] && b2[3]) - { - texture = 9; - } - - if(texture == 34 && b2[0] && !b2[1] && b2[2] && b2[3]) - { - texture = 25; - } - - if(texture == 34 && b2[0] && b2[1] && !b2[2] && b2[3]) - { - texture = 8; - } - - if(texture == 34 && b2[0] && b2[1] && b2[2] && !b2[3]) - { - texture = 24; - } - - if(texture == 34 && b2[0] && b2[1] && !b2[2] && !b2[3]) - { - texture = 11; - } - - if(texture == 34 && !b2[0] && !b2[1] && b2[2] && b2[3]) - { - texture = 26; - } - - if(texture == 34 && !b2[0] && b2[1] && !b2[2] && b2[3]) - { - texture = 27; - } - - if(texture == 34 && b2[0] && !b2[1] && b2[2] && !b2[3]) - { - texture = 10; - } - - if(texture == 34 && b2[0] && !b2[1] && !b2[2] && b2[3]) - { - texture = 42; - } - if(texture == 34 && !b2[0] && b2[1] && b2[2] && !b2[3]) - { - texture = 43; - } - - if(texture == 34 && b2[0] && !b2[1] && !b2[2] && !b2[3]) - { - texture = 40; - } - - if(texture == 34 && !b2[0] && b2[1] && !b2[2] && !b2[3]) - { - texture = 41; - } - - if(texture == 34 && !b2[0] && !b2[1] && b2[2] && !b2[3]) - { - texture = 56; - } - - if(texture == 34 && !b2[0] && !b2[1] && !b2[2] && b2[3]) - { - texture = 57; - } - - return texture; - } - - public static boolean isConnected(IBlockAccess world, int x, int y, int z, int side, HashMap> blockMetas, boolean convexConnections) - { - int x2 = x, y2 = y, z2 = z; - - switch(side) - { - case 0: - y2--; - break; - case 1: - y2++; - break; - case 2: - z2--; - break; - case 3: - z2++; - break; - case 4: - x2--; - break; - case 5: - x2++; - break; - } - - IBlockState s1 = world.getBlockState(new BlockPos(x, y, z)); - IBlockState s2 = world.getBlockState(new BlockPos(x2, y2, z2)); - - Block block1 = s1.getBlock(); - Block block2 = s2.getBlock(); - - int meta1 = block1.getMetaFromState(s1); - int meta2 = block2.getMetaFromState(s2); - - boolean validBlockMeta1 = false; - boolean invalidBlockMeta2 = true; - - for(Entry> entry : blockMetas.entrySet()) - { - validBlockMeta1 |= block1.equals(entry.getKey()) && entry.getValue().contains(meta1); - - invalidBlockMeta2 &= convexConnections || !(block2.equals(entry.getKey()) && entry.getValue().contains(meta2)); - } - - return validBlockMeta1 && invalidBlockMeta2; - } -} \ No newline at end of file diff --git a/src/main/java/mekanism/client/render/MekanismRenderer.java b/src/main/java/mekanism/client/render/MekanismRenderer.java index 5a0ca1722..7cc50da27 100644 --- a/src/main/java/mekanism/client/render/MekanismRenderer.java +++ b/src/main/java/mekanism/client/render/MekanismRenderer.java @@ -7,30 +7,25 @@ import java.util.List; import java.util.Map; import mekanism.api.EnumColor; +import mekanism.api.ObfuscatedNames; import mekanism.api.gas.Gas; import mekanism.api.gas.GasRegistry; -import mekanism.api.gas.OreGas; import mekanism.api.infuse.InfuseRegistry; import mekanism.api.infuse.InfuseType; import mekanism.api.transmitters.TransmissionType; +import mekanism.api.util.ReflectionUtils; import mekanism.client.render.tileentity.RenderConfigurableMachine; import mekanism.client.render.tileentity.RenderDynamicTank; import mekanism.client.render.tileentity.RenderFluidTank; import mekanism.client.render.tileentity.RenderThermalEvaporationController; -import mekanism.common.ObfuscatedNames; import mekanism.common.base.IMetaItem; -import mekanism.common.util.MekanismUtils; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.GLAllocation; -import net.minecraft.client.renderer.ItemModelMesher; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.OpenGlHelper; -import net.minecraft.client.renderer.RenderHelper; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.WorldRenderer; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.renderer.texture.TextureMap; -import net.minecraft.client.renderer.vertex.DefaultVertexFormats; import net.minecraft.client.resources.model.ModelBakery; import net.minecraft.client.resources.model.ModelResourceLocation; import net.minecraft.init.Blocks; @@ -40,6 +35,7 @@ import net.minecraft.util.EnumFacing; import net.minecraft.util.ResourceLocation; import net.minecraft.util.Timer; import net.minecraftforge.client.event.TextureStitchEvent; +import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidRegistry; @@ -52,8 +48,6 @@ import org.lwjgl.opengl.GL11; @SideOnly(Side.CLIENT) public class MekanismRenderer { - //private static RenderBlocks renderBlocks = new RenderBlocks(); - public enum FluidType { STILL, @@ -92,8 +86,6 @@ public class MekanismRenderer @SubscribeEvent public void onStitch(TextureStitchEvent.Pre event) { - initFluidTextures(event.map); - for(EnumColor color : EnumColor.values()) { colors[color.ordinal()] = event.map.registerSprite(new ResourceLocation("mekanism:blocks/overlay/overlay_" + color.unlocalizedName)); @@ -107,36 +99,9 @@ public class MekanismRenderer energyIcon = event.map.registerSprite(new ResourceLocation("mekanism:blocks/liquid/LiquidEnergy")); heatIcon = event.map.registerSprite(new ResourceLocation("mekanism:blocks/liquid/LiquidHeat")); - GasRegistry.getGas("hydrogen").setIcon(event.map, "mekanism:blocks/liquid/LiquidHydrogen"); - GasRegistry.getGas("oxygen").setIcon(event.map,"mekanism:blocks/liquid/LiquidOxygen"); - GasRegistry.getGas("water").setIcon(event.map,"mekanism:blocks/liquid/LiquidSteam"); - GasRegistry.getGas("chlorine").setIcon(event.map,"mekanism:blocks/liquid/LiquidChlorine"); - GasRegistry.getGas("sulfurDioxideGas").setIcon(event.map,"mekanism:blocks/liquid/LiquidSulfurDioxide"); - GasRegistry.getGas("sulfurTrioxideGas").setIcon(event.map,"mekanism:blocks/liquid/LiquidSulfurTrioxide"); - GasRegistry.getGas("sulfuricAcid").setIcon(event.map,"mekanism:blocks/liquid/LiquidSulfuricAcid"); - GasRegistry.getGas("hydrogenChloride").setIcon(event.map,"mekanism:blocks/liquid/LiquidHydrogenChloride"); - GasRegistry.getGas("liquidOsmium").setIcon(event.map,"mekanism:blocks/liquid/LiquidOsmium"); - GasRegistry.getGas("liquidStone").setIcon(event.map,"mekanism:blocks/liquid/LiquidStone"); - GasRegistry.getGas("ethene").setIcon(event.map,"mekanism:blocks/liquid/LiquidEthene"); - GasRegistry.getGas("brine").setIcon(event.map,"mekanism:blocks/liquid/LiquidBrine"); - GasRegistry.getGas("sodium").setIcon(event.map,"mekanism:blocks/liquid/LiquidSodium"); - GasRegistry.getGas("deuterium").setIcon(event.map,"mekanism:blocks/liquid/LiquidDeuterium"); - GasRegistry.getGas("tritium").setIcon(event.map,"mekanism:blocks/liquid/LiquidTritium"); - GasRegistry.getGas("fusionFuelDT").setIcon(event.map,"mekanism:blocks/liquid/LiquidDT"); - GasRegistry.getGas("lithium").setIcon(event.map,"mekanism:blocks/liquid/LiquidLithium"); - for(Gas gas : GasRegistry.getRegisteredGasses()) { - if(gas instanceof OreGas) - { - if(gas.getUnlocalizedName().contains("clean")) - { - gas.setIcon(event.map,"mekanism:blocks/liquid/LiquidCleanOre"); - } - else { - gas.setIcon(event.map,"mekanism:blocks/liquid/LiquidOre"); - } - } + gas.updateIcon(event.map); } for(InfuseType type : InfuseRegistry.getInfuseMap().values()) @@ -156,10 +121,14 @@ public class MekanismRenderer RenderFluidTank.resetDisplayInts(); } + @SubscribeEvent + public void onStitch(TextureStitchEvent.Post event) + { + initFluidTextures(event.map); + } + public static void registerItemRender(String domain, Item item) { - ItemModelMesher mesher = Minecraft.getMinecraft().getRenderItem().getItemModelMesher(); - if(item instanceof IMetaItem) { IMetaItem metaItem = (IMetaItem)item; @@ -173,7 +142,7 @@ public class MekanismRenderer } ModelResourceLocation loc = new ModelResourceLocation(domain + ":" + metaItem.getTexture(i), "inventory"); - mesher.register(item, i, loc); + ModelLoader.setCustomModelResourceLocation(item, i, loc); variants.add(loc); ModelBakery.addVariantName(item, domain + ":" + metaItem.getTexture(i)); } @@ -181,7 +150,7 @@ public class MekanismRenderer return; } - mesher.register(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory")); + ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory")); } @@ -198,8 +167,6 @@ public class MekanismRenderer for(Fluid fluid : FluidRegistry.getRegisteredFluids().values()) { - // TextureAtlasSprite toUse = null; - if(fluid.getFlowing() != null) { String flow = fluid.getFlowing().toString(); @@ -213,7 +180,6 @@ public class MekanismRenderer sprite = map.registerSprite(fluid.getStill()); } - // toUse = sprite; textureMap.get(FluidType.FLOWING).put(fluid, sprite); } @@ -230,12 +196,8 @@ public class MekanismRenderer sprite = map.registerSprite(fluid.getStill()); } - // toUse = sprite; textureMap.get(FluidType.STILL).put(fluid, sprite); } - // if (toUse != null) { - // textureMap.get(FluidType.FROZEN).put(fluid, toUse); - // } } } @@ -251,124 +213,20 @@ public class MekanismRenderer return map.containsKey(fluid) ? map.get(fluid) : missingIcon; } - public static boolean blockIconExists(String texture) //Credit to CoFHCore - { - String[] split = texture.split(":"); - texture = split[0] + ":textures/blocks/" + split[1] + ".png"; - - try { - Minecraft.getMinecraft().getResourceManager().getAllResources(new ResourceLocation(texture)); - return true; - } catch(Throwable t) { - return false; - } - } - - public static void loadDynamicTextures(TextureMap register, String name, TextureAtlasSprite[] textures, DefIcon... defaults) - { - for(EnumFacing side : EnumFacing.VALUES) - { - ResourceLocation tex = new ResourceLocation("mekanism:" + name + simpleSides[side.ordinal()]); - ResourceLocation texOn = new ResourceLocation(tex.toString() + "On"); - - if(blockIconExists(tex.toString())) - { - textures[side.ordinal()] = register.registerSprite(tex); - - if(blockIconExists(texOn.toString())) - { - textures[side.ordinal()+6] = register.registerSprite(texOn); - } - else { - boolean found = false; - - for(DefIcon def : defaults) - { - if(def.icons.contains(side.ordinal()+6) && def.overridesInactive) - { - textures[side.ordinal()+6] = def.defIcon; - found = true; - } - } - - if(!found) - { - textures[side.ordinal()+6] = register.registerSprite(tex); - } - } - } - else { - for(DefIcon def : defaults) - { - if(def.icons.contains(side.ordinal())) - { - textures[side.ordinal()] = def.defIcon; - } - - if(def.icons.contains(side.ordinal()+6)) - { - textures[side.ordinal()+6] = def.defIcon; - } - } - } - } - } - - public static class DefIcon - { - public TextureAtlasSprite defIcon; - - public List icons = new ArrayList(); - - /** If this DefIcon should be prioritized over a machine's side-specific off texture - * if no on texture is present. */ - public boolean overridesInactive = true; - - public DefIcon(TextureAtlasSprite icon, int... is) - { - defIcon = icon; - - for(int i : is) - { - icons.add(i); - } - } - - public DefIcon setOverrides(boolean b) - { - overridesInactive = b; - - return this; - } - - public static DefIcon getAll(TextureAtlasSprite icon) - { - return new DefIcon(icon, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11); - } - - public static DefIcon getActivePair(TextureAtlasSprite icon, int... is) - { - DefIcon ret = new DefIcon(icon, is); - - for(int i : is) - { - ret.icons.add(i+6); - } - - return ret; - } - } - public static class Model3D { - public double minX; - public double minY; - public double minZ; - public double maxX; - public double maxY; - public double maxZ; + public double posX, posY, posZ; - public ResourceLocation[] textures = new ResourceLocation[6]; + public double minX, minY, minZ; + public double maxX, maxY, maxZ; + + public double textureStartX = 0, textureStartY = 0, textureStartZ = 0; + public double textureSizeX = 16, textureSizeY = 16, textureSizeZ = 16; + public double textureOffsetX = 0, textureOffsetY = 0, textureOffsetZ = 0; + + public int[] textureFlips = new int[] {2, 2, 2, 2, 2, 2}; + + public TextureAtlasSprite[] textures = new TextureAtlasSprite[6]; public boolean[] renderSides = new boolean[] {true, true, true, true, true, true, false}; @@ -383,6 +241,21 @@ public class MekanismRenderer maxY = yPos; maxZ = zPos; } + + public double sizeX() + { + return maxX-minX; + } + + public double sizeY() + { + return maxY-minY; + } + + public double sizeZ() + { + return maxZ-minZ; + } public void setSideRender(EnumFacing side, boolean value) { @@ -394,17 +267,17 @@ public class MekanismRenderer return renderSides[side.ordinal()]; } - public ResourceLocation getBlockTextureFromSide(int i) + public TextureAtlasSprite getBlockTextureFromSide(int i) { return textures[i]; } - public void setTexture(ResourceLocation tex) + public void setTexture(TextureAtlasSprite tex) { Arrays.fill(textures, tex); } - public void setTextures(ResourceLocation down, ResourceLocation up, ResourceLocation north, ResourceLocation south, ResourceLocation west, ResourceLocation east) + public void setTextures(TextureAtlasSprite down, TextureAtlasSprite up, TextureAtlasSprite north, TextureAtlasSprite south, TextureAtlasSprite west, TextureAtlasSprite east) { textures[0] = down; textures[1] = up; @@ -415,6 +288,14 @@ public class MekanismRenderer } } + public static void prepFlowing(Model3D model, Fluid fluid) + { + TextureAtlasSprite still = getFluidTexture(fluid, FluidType.STILL); + TextureAtlasSprite flowing = getFluidTexture(fluid, FluidType.FLOWING); + + model.setTextures(still, still, flowing, flowing, flowing, flowing); + } + public static void renderObject(Model3D object) { if(object == null) @@ -422,50 +303,10 @@ public class MekanismRenderer return; } -/* - renderBlocks.renderMaxX = object.maxX; - renderBlocks.renderMinX = object.minX; - renderBlocks.renderMaxY = object.maxY; - renderBlocks.renderMinY = object.minY; - renderBlocks.renderMaxZ = object.maxZ; - renderBlocks.renderMinZ = object.minZ; - - renderBlocks.enableAO = false; - - Tessellator.instance.startDrawingQuads(); - - if(object.shouldSideRender(EnumFacing.DOWN)) - { - renderBlocks.renderFaceYNeg(null, 0, 0, 0, object.getBlockTextureFromSide(0)); - } - - if(object.shouldSideRender(EnumFacing.UP)) - { - renderBlocks.renderFaceYPos(null, 0, 0, 0, object.getBlockTextureFromSide(1)); - } - - if(object.shouldSideRender(EnumFacing.NORTH)) - { - renderBlocks.renderFaceZNeg(null, 0, 0, 0, object.getBlockTextureFromSide(2)); - } - - if(object.shouldSideRender(EnumFacing.SOUTH)) - { - renderBlocks.renderFaceZPos(null, 0, 0, 0, object.getBlockTextureFromSide(3)); - } - - if(object.shouldSideRender(EnumFacing.WEST)) - { - renderBlocks.renderFaceXNeg(null, 0, 0, 0, object.getBlockTextureFromSide(4)); - } - - if(object.shouldSideRender(EnumFacing.EAST)) - { - renderBlocks.renderFaceXPos(null, 0, 0, 0, object.getBlockTextureFromSide(5)); - } - - Tessellator.instance.draw(); -*/ + GlStateManager.pushMatrix(); + GL11.glTranslated(object.minX, object.minY, object.minZ); + RenderResizableCuboid.INSTANCE.renderCube(object); + GlStateManager.popMatrix(); } public static void color(EnumColor color) @@ -509,8 +350,6 @@ public class MekanismRenderer optifineBreak = true; } - RenderHelper.disableStandardItemLighting(); - float glowRatioX = Math.min((glow/15F)*240F + lightmapLastX, 240); float glowRatioY = Math.min((glow/15F)*240F + lightmapLastY, 240); @@ -558,164 +397,6 @@ public class MekanismRenderer GL11.glCullFace(GL11.GL_BACK); GL11.glDisable(GL11.GL_CULL_FACE); } - - /** - * Cleaned-up snip of ItemRenderer.renderItem() -- meant to render 2D items as equipped. - * @param item - ItemStack to render - */ - public static void renderItem(ItemStack item) - { -/* - ResourceLocation icon = item.getItem().getIconIndex(item); - TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager(); - - if(icon == null) - { - GL11.glPopMatrix(); - return; - } - - texturemanager.bindTexture(texturemanager.getResourceLocation(item.getItemSpriteNumber())); - Tessellator tessellator = Tessellator.instance; - - float minU = icon.getMinU(); - float maxU = icon.getMaxU(); - float minV = icon.getMinV(); - float maxV = icon.getMaxV(); - - GL11.glEnable(GL12.GL_RESCALE_NORMAL); - GL11.glTranslatef(0.0F, -0.3F, 0.0F); - - GL11.glScalef(1.5F, 1.5F, 1.5F); - GL11.glRotatef(50.0F, 0.0F, 1.0F, 0.0F); - GL11.glRotatef(335.0F, 0.0F, 0.0F, 1.0F); - GL11.glTranslatef(-0.9375F, -0.0625F, 0.0F); - - RenderManager.instance.itemRenderer.renderItemIn2D(tessellator, maxU, minV, minU, maxV, icon.getIconWidth(), icon.getIconHeight(), 0.0625F); - - GL11.glDisable(GL12.GL_RESCALE_NORMAL); -*/ - } - -/* - public static void prepareItemRender(RenderBlocks renderer, int metadata, Block block) - { - if(!(block instanceof ISpecialBounds) || ((ISpecialBounds)block).doDefaultBoundSetting(metadata)) - { - block.setBlockBoundsForItemRender(); - } - - if(block instanceof ISpecialBounds) - { - ((ISpecialBounds)block).setRenderBounds(block, metadata); - } - - if(!(block instanceof ISpecialBounds) || ((ISpecialBounds)block).doDefaultBoundSetting(metadata)) - { - renderer.setRenderBoundsFromBlock(block); - } - else { - renderer.setRenderBounds(0, 0, 0, 1, 1, 1); - } - - if(renderer.useInventoryTint) - { - int renderColor = block.getRenderColor(metadata); - float red = (renderColor >> 16 & 255) / 255.0F; - float green = (renderColor >> 8 & 255) / 255.0F; - float blue = (renderColor & 255) / 255.0F; - GL11.glColor4f(red, green, blue, 1.0F); - } - - GL11.glRotatef(180F, 0.0F, 1.0F, 0.0F); - GL11.glTranslatef(-0.5F, -0.5F, -0.5F); - } - - public static void renderCustomItem(RenderBlocks renderer, ItemStack stack) - { - Block block = Block.getBlockFromItem(stack.getItem()); - - if(block instanceof ICustomBlockIcon) - { - ICustomBlockIcon custom = (ICustomBlockIcon)block; - prepareItemRender(renderer, stack.getItemDamage(), Block.getBlockFromItem(stack.getItem())); - - try { - Tessellator tessellator = Tessellator.instance; - tessellator.startDrawingQuads(); - tessellator.setNormal(0.0F, -1.0F, 0.0F); - renderer.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, custom.getIcon(stack, 0)); - tessellator.draw(); - tessellator.startDrawingQuads(); - tessellator.setNormal(0.0F, 1.0F, 0.0F); - renderer.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, custom.getIcon(stack, 1)); - tessellator.draw(); - tessellator.startDrawingQuads(); - tessellator.setNormal(0.0F, 0.0F, -1.0F); - renderer.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, custom.getIcon(stack, 3)); - tessellator.draw(); - tessellator.startDrawingQuads(); - tessellator.setNormal(0.0F, 0.0F, 1.0F); - renderer.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, custom.getIcon(stack, 2)); - tessellator.draw(); - tessellator.startDrawingQuads(); - tessellator.setNormal(-1.0F, 0.0F, 0.0F); - renderer.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, custom.getIcon(stack, 4)); - tessellator.draw(); - tessellator.startDrawingQuads(); - tessellator.setNormal(1.0F, 0.0F, 0.0F); - renderer.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, custom.getIcon(stack, 5)); - tessellator.draw(); - } catch(Exception e) {} - - GL11.glTranslatef(0.5F, 0.5F, 0.5F); - } - } - - */ -/* - * Cleaned-up snip of RenderBlocks.renderBlockAsItem() -- used for rendering an item as an entity, - * in a player's inventory, and in a player's hand. - * @param renderer - RenderBlocks renderer to render the item with - * @param metadata - block/item metadata - * @param block - block to render - *//* - - public static void renderItem(RenderBlocks renderer, int metadata, Block block) - { - prepareItemRender(renderer, metadata, block); - - try { - Tessellator tessellator = Tessellator.instance; - tessellator.startDrawingQuads(); - tessellator.setNormal(0.0F, -1.0F, 0.0F); - renderer.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(0, metadata)); - tessellator.draw(); - tessellator.startDrawingQuads(); - tessellator.setNormal(0.0F, 1.0F, 0.0F); - renderer.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(1, metadata)); - tessellator.draw(); - tessellator.startDrawingQuads(); - tessellator.setNormal(0.0F, 0.0F, -1.0F); - renderer.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(3, metadata)); - tessellator.draw(); - tessellator.startDrawingQuads(); - tessellator.setNormal(0.0F, 0.0F, 1.0F); - renderer.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(2, metadata)); - tessellator.draw(); - tessellator.startDrawingQuads(); - tessellator.setNormal(-1.0F, 0.0F, 0.0F); - renderer.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(4, metadata)); - tessellator.draw(); - tessellator.startDrawingQuads(); - tessellator.setNormal(1.0F, 0.0F, 0.0F); - renderer.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(5, metadata)); - tessellator.draw(); - } catch(Exception e) {} - - GL11.glTranslatef(0.5F, 0.5F, 0.5F); - } -*/ public static void colorFluid(Fluid fluid) { @@ -765,52 +446,16 @@ public class MekanismRenderer } } -/* - public static TextureMap getTextureMap(int type) - { - try { - List l = (List)MekanismUtils.getPrivateValue(Minecraft.getMinecraft().renderEngine, TextureManager.class, ObfuscatedNames.TextureManager_listTickables); - - for(ITickable t : l) - { - if(t instanceof TextureMap) - { - if(((TextureMap)t).getTextureType() == type) - { - return (TextureMap)t; - } - } - } - } catch(Exception e) {} - - return null; - } -*/ - public static float getPartialTick() { try { - Timer t = (Timer)MekanismUtils.getPrivateValue(Minecraft.getMinecraft(), Minecraft.class, ObfuscatedNames.Minecraft_timer); + Timer t = (Timer)ReflectionUtils.getPrivateValue(Minecraft.getMinecraft(), Minecraft.class, ObfuscatedNames.Minecraft_timer); return t.renderPartialTicks; } catch(Exception e) {} return 0; } - public void drawTexturedModalRect(int par1, int par2, int par3, int par4, int par5, int par6) - { - int zLevel = 0; - float f = 0.00390625F; - float f1 = 0.00390625F; - WorldRenderer worldRenderer = Tessellator.getInstance().getWorldRenderer(); - worldRenderer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX); - worldRenderer.pos((par1 + 0), (par2 + par6), zLevel).tex(((par3 + 0) * f), ((par4 + par6) * f1)).endVertex(); - worldRenderer.pos((par1 + par5), (par2 + par6), zLevel).tex(((par3 + par5) * f), ((par4 + par6) * f1)).endVertex(); - worldRenderer.pos((par1 + par5), (par2 + 0), zLevel).tex(((par3 + par5) * f), ((par4 + 0) * f1)).endVertex(); - worldRenderer.pos((par1 + 0), (par2 + 0), zLevel).tex(((par3 + 0) * f), ((par4 + 0) * f1)).endVertex(); - worldRenderer.finishDrawing(); - } - public static ResourceLocation getBlocksTexture() { return TextureMap.locationBlocksTexture; diff --git a/src/main/java/mekanism/client/render/MinerVisualRenderer.java b/src/main/java/mekanism/client/render/MinerVisualRenderer.java index 006ee6c0d..f600be1bb 100644 --- a/src/main/java/mekanism/client/render/MinerVisualRenderer.java +++ b/src/main/java/mekanism/client/render/MinerVisualRenderer.java @@ -11,6 +11,7 @@ import mekanism.client.render.MekanismRenderer.DisplayInteger; import mekanism.client.render.MekanismRenderer.Model3D; import mekanism.common.tile.TileEntityDigitalMiner; import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; import net.minecraft.init.Blocks; @@ -26,7 +27,7 @@ public final class MinerVisualRenderer public static void render(TileEntityDigitalMiner miner) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glTranslated(getX(miner.getPos().getX()), getY(miner.getPos().getY()), getZ(miner.getPos().getZ())); MekanismRenderer.blendOn(); MekanismRenderer.glowOn(); @@ -34,9 +35,10 @@ public final class MinerVisualRenderer GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.8F); mc.getTextureManager().bindTexture(MekanismRenderer.getBlocksTexture()); getList(new MinerRenderData(miner)).render(); + MekanismRenderer.resetColor(); MekanismRenderer.glowOff(); MekanismRenderer.blendOff(); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } private static DisplayInteger getList(MinerRenderData data) @@ -79,9 +81,9 @@ public final class MinerVisualRenderer { Model3D toReturn = new Model3D(); - toReturn.setBlockBounds(rel.getX() + 0.4, rel.getY() + 0.4, rel.getZ() + 0.4, rel.getX() + 0.6, rel.getY() + 0.6, rel.getZ() + 0.6); + toReturn.setBlockBounds(rel.xCoord + 0.4, rel.yCoord + 0.4, rel.zCoord + 0.4, rel.xCoord + 0.6, rel.yCoord + 0.6, rel.zCoord + 0.6); toReturn.baseBlock = Blocks.water; - //toReturn.setTexture(MekanismRenderer.getColorIcon(EnumColor.WHITE)); + toReturn.setTexture(MekanismRenderer.getColorIcon(EnumColor.WHITE)); return toReturn; } diff --git a/src/main/java/mekanism/client/render/ModelCustomArmor.java b/src/main/java/mekanism/client/render/ModelCustomArmor.java index bc1cd44b5..d676373de 100644 --- a/src/main/java/mekanism/client/render/ModelCustomArmor.java +++ b/src/main/java/mekanism/client/render/ModelCustomArmor.java @@ -10,15 +10,15 @@ import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.client.Minecraft; import net.minecraft.client.model.ModelBiped; import net.minecraft.client.model.ModelRenderer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.util.ResourceLocation; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class ModelCustomArmor extends ModelBiped { @@ -125,8 +125,8 @@ public class ModelCustomArmor extends ModelBiped { if(ModelCustomArmor.this.modelType != null) { - GL11.glPushMatrix(); - GL11.glTranslatef(0, 0, 0.06F); + GlStateManager.pushMatrix(); + GlStateManager.translate(0, 0, 0.06F); mc.renderEngine.bindTexture(modelType.resource); @@ -146,27 +146,27 @@ public class ModelCustomArmor extends ModelBiped } else if(biped.modelType == ArmorModel.GASMASK) { - GL11.glTranslatef(0, 0, -0.05F); + GlStateManager.translate(0, 0, -0.05F); ArmorModel.gasMaskModel.render(0.0625F); } else if(biped.modelType == ArmorModel.FREERUNNERS) { - GL11.glScalef(1.02F, 1.02F, 1.02F); + GlStateManager.scale(1.02F, 1.02F, 1.02F); if(partRender == biped.bipedLeftLeg) { - GL11.glTranslatef(-0.1375F, -0.75F, -0.0625F); + GlStateManager.translate(-0.1375F, -0.75F, -0.0625F); ArmorModel.freeRunnersModel.renderLeft(0.0625F); } else if(partRender == biped.bipedRightLeg) { - GL11.glTranslatef(0.1375F, -0.75F, -0.0625F); + GlStateManager.translate(0.1375F, -0.75F, -0.0625F); ArmorModel.freeRunnersModel.renderRight(0.0625F); } } } - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } } } diff --git a/src/main/java/mekanism/client/render/RenderPartTransmitter.java b/src/main/java/mekanism/client/render/RenderPartTransmitter.java index 23b44a306..95b301408 100644 --- a/src/main/java/mekanism/client/render/RenderPartTransmitter.java +++ b/src/main/java/mekanism/client/render/RenderPartTransmitter.java @@ -125,7 +125,7 @@ public class RenderPartTransmitter //TODO implements IIconSelfRegister private void push() { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glPushAttrib(GL11.GL_ENABLE_BIT); GL11.glEnable(GL11.GL_CULL_FACE); GL11.glEnable(GL11.GL_BLEND); @@ -136,7 +136,7 @@ public class RenderPartTransmitter //TODO implements IIconSelfRegister private void pop() { GL11.glPopAttrib(); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } public void renderItem(TransmitterType type) @@ -164,7 +164,7 @@ public class RenderPartTransmitter //TODO implements IIconSelfRegister public void renderContents(PartLogisticalTransporter transporter, float partialTick, Vector3 vec) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); entityItem.age = 0; entityItem.hoverStart = 0; @@ -176,28 +176,28 @@ public class RenderPartTransmitter //TODO implements IIconSelfRegister { if(stack != null) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); entityItem.setEntityItemStack(stack.itemStack); float[] pos = TransporterUtils.getStackPosition(transporter.getTransmitter(), stack, partialTick*transporter.tier.speed); GL11.glTranslated(vec.x + pos[0], vec.y + pos[1] - entityItem.yOffset, vec.z + pos[2]); - GL11.glScalef(0.75F, 0.75F, 0.75F); + GlStateManager.scale(0.75F, 0.75F, 0.75F); renderer.doRender(entityItem, 0, 0, 0, 0, 0); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); if(stack.color != null) { CCRenderState.changeTexture(MekanismUtils.getResource(ResourceType.RENDER, "TransporterBox.png")); - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); MekanismRenderer.glowOn(); GL11.glDisable(GL11.GL_CULL_FACE); GL11.glColor4f(stack.color.getColor(0), stack.color.getColor(1), stack.color.getColor(2), 1.0F); - GL11.glTranslatef((float)(vec.x + pos[0]), (float)(vec.y + pos[1] - entityItem.yOffset - ((stack.itemStack.getItem() instanceof ItemBlock) ? 0.1 : 0)), (float)(vec.z + pos[2])); + GlStateManager.translate((float)(vec.x + pos[0]), (float)(vec.y + pos[1] - entityItem.yOffset - ((stack.itemStack.getItem() instanceof ItemBlock) ? 0.1 : 0)), (float)(vec.z + pos[2])); modelBox.render(0.0625F); MekanismRenderer.glowOff(); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } } } @@ -227,9 +227,9 @@ public class RenderPartTransmitter //TODO implements IIconSelfRegister GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.8F); CCRenderState.changeTexture(mode == 0 ? MekanismRenderer.getItemsTexture() : MekanismRenderer.getBlocksTexture()); - GL11.glTranslatef((float)vec.x, (float)vec.y, (float)vec.z); - GL11.glScalef(0.5F, 0.5F, 0.5F); - GL11.glTranslatef(0.5F, 0.5F, 0.5F); + GlStateManager.translate((float)vec.x, (float)vec.y, (float)vec.z); + GlStateManager.scale(0.5F, 0.5F, 0.5F); + GlStateManager.translate(0.5F, 0.5F, 0.5F); int display = getOverlayDisplay(world, side, mode).display; GL11.glCallList(display); @@ -239,7 +239,7 @@ public class RenderPartTransmitter //TODO implements IIconSelfRegister } } - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } public void renderContents(PartUniversalCable cable, Vector3 pos) @@ -678,12 +678,12 @@ public class RenderPartTransmitter //TODO implements IIconSelfRegister GL11.glPopAttrib(); MekanismRenderer.glowOff(); MekanismRenderer.blendOff(); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } private void pushTransporter() { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glPushAttrib(GL11.GL_ENABLE_BIT); GL11.glEnable(GL11.GL_CULL_FACE); GL11.glDisable(GL11.GL_LIGHTING); diff --git a/src/main/java/mekanism/client/render/RenderResizableCuboid.java b/src/main/java/mekanism/client/render/RenderResizableCuboid.java new file mode 100644 index 000000000..307b8f763 --- /dev/null +++ b/src/main/java/mekanism/client/render/RenderResizableCuboid.java @@ -0,0 +1,663 @@ +package mekanism.client.render; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +import mekanism.client.render.MekanismRenderer.Model3D; +import net.minecraft.block.Block; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.GlStateManager; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.WorldRenderer; +import net.minecraft.client.renderer.block.model.BakedQuad; +import net.minecraft.client.renderer.entity.RenderManager; +import net.minecraft.client.renderer.texture.TextureAtlasSprite; +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.client.renderer.vertex.DefaultVertexFormats; +import net.minecraft.client.renderer.vertex.VertexFormat; +import net.minecraft.client.renderer.vertex.VertexFormatElement; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.EnumFacing.Axis; +import net.minecraft.util.EnumFacing.AxisDirection; +import net.minecraft.util.Vec3; +import net.minecraft.util.Vec3i; +import net.minecraft.world.IBlockAccess; + +import org.lwjgl.opengl.GL11; + +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.common.collect.Maps; + +/* + * Adapted from BuildCraft + */ +public class RenderResizableCuboid { + protected RenderManager manager = Minecraft.getMinecraft().getRenderManager(); + + public static final Vec3 VEC_ONE = vec3(1); + public static final Vec3 VEC_ZERO = vec3(0); + public static final Vec3 VEC_HALF = vec3(0.5); + + public interface IBlockLocation { + Vec3 transformToWorld(Vec3 vec); + } + + public interface IFacingLocation { + EnumFacing transformToWorld(EnumFacing face); + } + + public enum DefaultFacingLocation implements IFacingLocation { + INSTANCE; + + @Override + public EnumFacing transformToWorld(EnumFacing face) { + return face; + } + } + + public enum EnumShadeType { + FACE(DefaultVertexFormats.COLOR_4UB), + LIGHT(DefaultVertexFormats.TEX_2S), + AMBIENT_OCCLUSION(DefaultVertexFormats.COLOR_4UB); + + private final VertexFormatElement element; + + private EnumShadeType(VertexFormatElement element) { + this.element = element; + } + } + + public enum EnumShadeArgument { + NONE, + FACE(EnumShadeType.FACE), + FACE_LIGHT(EnumShadeType.FACE, EnumShadeType.LIGHT), + FACE_OCCLUDE(EnumShadeType.FACE, EnumShadeType.AMBIENT_OCCLUSION), + FACE_LIGHT_OCCLUDE(EnumShadeType.FACE, EnumShadeType.LIGHT, EnumShadeType.AMBIENT_OCCLUSION), + LIGHT(EnumShadeType.LIGHT), + LIGHT_OCCLUDE(EnumShadeType.LIGHT, EnumShadeType.AMBIENT_OCCLUSION), + OCCLUDE(EnumShadeType.AMBIENT_OCCLUSION); + + public final ImmutableSet types; + final VertexFormat vertexFormat; + + EnumShadeArgument(EnumShadeType... types) { + this.vertexFormat = new VertexFormat(); + vertexFormat.addElement(DefaultVertexFormats.POSITION_3F); + vertexFormat.addElement(DefaultVertexFormats.TEX_2F); + for (EnumShadeType type : types) { + if (!vertexFormat.getElements().contains(type.element)) vertexFormat.addElement(type.element); + } + this.types = ImmutableSet.copyOf(types); + } + + public boolean isEnabled(EnumShadeType type) { + return types.contains(type); + } + } + + public static final RenderResizableCuboid INSTANCE = new RenderResizableCuboid(); + + /** The AO map assumes that each direction in the world has a different amount of light going towards it. */ + private static final Map aoMap = Maps.newEnumMap(EnumFacing.class); + + private static final int U_MIN = 0; + private static final int U_MAX = 1; + private static final int V_MIN = 2; + private static final int V_MAX = 3; + + static { + // Static constants taken directly from minecraft's block renderer + // ( net.minecraft.client.renderer.BlockModelRenderer.EnumNeighborInfo ) + aoMap.put(EnumFacing.UP, vec3(1)); + aoMap.put(EnumFacing.DOWN, vec3(0.5)); + aoMap.put(EnumFacing.NORTH, vec3(0.8)); + aoMap.put(EnumFacing.SOUTH, vec3(0.8)); + aoMap.put(EnumFacing.EAST, vec3(0.6)); + aoMap.put(EnumFacing.WEST, vec3(0.6)); + } + + /** This will render a cuboid from its middle. */ + public void renderCubeFromCentre(Model3D cuboid) { + GlStateManager.pushMatrix(); + GL11.glTranslated(-cuboid.sizeX() / 2d, -cuboid.sizeY() / 2d, -cuboid.sizeZ() / 2d); + renderCube(cuboid, EnumShadeArgument.NONE, null, null, null); + GlStateManager.popMatrix(); + } + + public void renderCube(Model3D cuboid) { + renderCube(cuboid, EnumShadeArgument.NONE, null, null, null); + } + + public void renderCube(Model3D cube, EnumShadeArgument shadeTypes, IBlockLocation formula, IFacingLocation faceFormula, IBlockAccess world) { + if (faceFormula == null) { + faceFormula = DefaultFacingLocation.INSTANCE; + } + + TextureAtlasSprite[] sprites = cube.textures; + + int[] flips = cube.textureFlips; + if (flips == null) { + flips = new int[6]; + } + + Vec3 textureStart = new Vec3(cube.textureStartX / 16D, cube.textureStartY / 16D, cube.textureStartZ / 16D); + Vec3 textureSize = new Vec3(cube.textureSizeX / 16D, cube.textureSizeY / 16D, cube.textureSizeZ / 16D); + Vec3 textureOffset = new Vec3(cube.textureOffsetX / 16D, cube.textureOffsetY / 16D, cube.textureOffsetZ / 16D); + Vec3 size = new Vec3(cube.sizeX(), cube.sizeY(), cube.sizeZ()); + + manager.renderEngine.bindTexture(TextureMap.locationBlocksTexture); + + Tessellator tess = Tessellator.getInstance(); + WorldRenderer wr = tess.getWorldRenderer(); + + GlStateManager.enableAlpha(); + GlStateManager.alphaFunc(GL11.GL_GREATER, 0.1F); + GlStateManager.disableLighting(); + + wr.begin(GL11.GL_QUADS, shadeTypes.vertexFormat); + + for (EnumFacing face : EnumFacing.values()) { + renderCuboidFace(wr, face, sprites, flips, textureStart, textureSize, size, textureOffset, shadeTypes, formula, faceFormula, world); + } + + tess.draw(); + + GlStateManager.disableAlpha(); + GlStateManager.enableLighting(); + GlStateManager.enableFog(); + } + + private void renderCuboidFace(WorldRenderer wr, EnumFacing face, TextureAtlasSprite[] sprites, int[] flips, Vec3 textureStart, Vec3 textureSize, + Vec3 size, Vec3 textureOffset, EnumShadeArgument shadeTypes, IBlockLocation locationFormula, IFacingLocation faceFormula, + IBlockAccess access) { + int ordinal = face.ordinal(); + if (sprites[ordinal] == null) { + return; + } + + Vec3 textureEnd = textureStart.add(textureSize); + float[] uv = getUVArray(sprites[ordinal], flips[ordinal], face, textureStart, textureEnd); + List renderInfoList = getRenderInfos(uv, face, size, textureSize, textureOffset); + + Axis u = face.getAxis() == Axis.X ? Axis.Z : Axis.X; + Axis v = face.getAxis() == Axis.Y ? Axis.Z : Axis.Y; + double other = face.getAxisDirection() == AxisDirection.POSITIVE ? getValue(size, face.getAxis()) : 0; + + /* Swap the face if this is positive: the renderer returns indexes that ALWAYS are for the negative face, so + * light it properly this way */ + face = face.getAxisDirection() == AxisDirection.NEGATIVE ? face : face.getOpposite(); + + EnumFacing opposite = face.getOpposite(); + + for (RenderInfo ri : renderInfoList) { + renderPoint(wr, face, u, v, other, ri, true, false, locationFormula, faceFormula, access, shadeTypes); + renderPoint(wr, face, u, v, other, ri, true, true, locationFormula, faceFormula, access, shadeTypes); + renderPoint(wr, face, u, v, other, ri, false, true, locationFormula, faceFormula, access, shadeTypes); + renderPoint(wr, face, u, v, other, ri, false, false, locationFormula, faceFormula, access, shadeTypes); + + renderPoint(wr, opposite, u, v, other, ri, false, false, locationFormula, faceFormula, access, shadeTypes); + renderPoint(wr, opposite, u, v, other, ri, false, true, locationFormula, faceFormula, access, shadeTypes); + renderPoint(wr, opposite, u, v, other, ri, true, true, locationFormula, faceFormula, access, shadeTypes); + renderPoint(wr, opposite, u, v, other, ri, true, false, locationFormula, faceFormula, access, shadeTypes); + } + } + + public static Vec3 withValue(Vec3 vector, Axis axis, double value) { + if (axis == Axis.X) return new Vec3(value, vector.yCoord, vector.zCoord); + else if (axis == Axis.Y) return new Vec3(vector.xCoord, value, vector.zCoord); + else if (axis == Axis.Z) return new Vec3(vector.xCoord, vector.yCoord, value); + else throw new RuntimeException("Was given a null axis! That was probably not intentional, consider this a bug! (Vector = " + vector + ")"); + } + + private void renderPoint(WorldRenderer wr, EnumFacing face, Axis u, Axis v, double other, RenderInfo ri, boolean minU, boolean minV, + IBlockLocation locationFormula, IFacingLocation faceFormula, IBlockAccess access, EnumShadeArgument shadeTypes) { + int U_ARRAY = minU ? U_MIN : U_MAX; + int V_ARRAY = minV ? V_MIN : V_MAX; + + Vec3 vertex = withValue(VEC_ZERO, u, ri.xyz[U_ARRAY]); + vertex = withValue(vertex, v, ri.xyz[V_ARRAY]); + vertex = withValue(vertex, face.getAxis(), other); + + wr.pos(vertex.xCoord, vertex.yCoord, vertex.zCoord); + wr.tex(ri.uv[U_ARRAY], ri.uv[V_ARRAY]); + + if (shadeTypes.isEnabled(EnumShadeType.FACE)) { + setWorldRendererRGB(wr, aoMap.get(faceFormula.transformToWorld(face))); + } + + if (shadeTypes.isEnabled(EnumShadeType.AMBIENT_OCCLUSION)) { + applyLocalAO(wr, faceFormula.transformToWorld(face), locationFormula, access, shadeTypes, vertex); + } else if (shadeTypes.isEnabled(EnumShadeType.LIGHT)) { + Vec3 transVertex = locationFormula.transformToWorld(vertex); + BlockPos pos = convertFloor(transVertex); + Block block = access.getBlockState(pos).getBlock(); + int combindedLight = block.getMixedBrightnessForBlock(access, pos); + wr.lightmap(combindedLight >> 16 & 65535, combindedLight & 65535); + } + + wr.endVertex(); + } + + public static BlockPos convertFloor(Vec3 vec) { + return new BlockPos(vec.xCoord, vec.yCoord, vec.zCoord); + } + + public static Vec3 convert(Vec3i vec3i) { + return new Vec3(vec3i.getX(), vec3i.getY(), vec3i.getZ()); + } + + public static Vec3 convert(EnumFacing face) { + if (face == null) { + return VEC_ZERO; + } + return new Vec3(face.getFrontOffsetX(), face.getFrontOffsetY(), face.getFrontOffsetZ()); + + } + + public static EnumFacing[] getNeighbours(EnumFacing face) { + EnumFacing[] faces = new EnumFacing[4]; + int ordinal = 0; + for (EnumFacing next : EnumFacing.values()) { + if (next.getAxis() != face.getAxis()) { + faces[ordinal] = next; + ordinal++; + } + } + return faces; + } + + private void applyLocalAO(WorldRenderer wr, EnumFacing face, IBlockLocation locationFormula, IBlockAccess access, EnumShadeArgument shadeTypes, + Vec3 vertex) { + // This doesn't work. At all. + boolean allAround = false; + + int numPositions = allAround ? 7 : 5; + int[] skyLight = new int[numPositions]; + int[] blockLight = new int[numPositions]; + float[] colorMultiplier = new float[numPositions]; + double[] distances = new double[numPositions]; + double totalDist = 0; + Vec3 transVertex = locationFormula.transformToWorld(vertex); + BlockPos pos = convertFloor(transVertex); + Block block = access.getBlockState(pos).getBlock(); + int combindedLight = block.getMixedBrightnessForBlock(access, pos); + + skyLight[0] = combindedLight / 0x10000; + blockLight[0] = combindedLight % 0x10000; + colorMultiplier[0] = block.getAmbientOcclusionLightValue(); + distances[0] = transVertex.distanceTo(convertMiddle(pos)); + + int index = 0; + EnumFacing[] testArray = allAround ? EnumFacing.values() : getNeighbours(face); + for (EnumFacing otherFace : testArray) { + Vec3 nearestOther = vertex.add(convert(otherFace)); + pos = convertFloor(locationFormula.transformToWorld(nearestOther)); + block = access.getBlockState(pos).getBlock(); + combindedLight = block.getMixedBrightnessForBlock(access, pos); + + index++; + + skyLight[index] = (int) (combindedLight / 0x10000); + blockLight[index] = (int) (combindedLight % 0x10000); + colorMultiplier[index] = block.getAmbientOcclusionLightValue(); + // The extra 0.1 is to stop any 1 divided by 0 errors + distances[index] = 1 / (transVertex.distanceTo(convertMiddle(pos)) + 0.1); + totalDist += distances[index]; + } + + double avgBlockLight = 0; + double avgSkyLight = 0; + float avgColorMultiplier = 0; + for (int i = 0; i < numPositions; i++) { + double part = distances[i] / totalDist; + avgBlockLight += blockLight[i] * part; + avgSkyLight += skyLight[i] * part; + avgColorMultiplier += colorMultiplier[i] * part; + } + + if (shadeTypes.isEnabled(EnumShadeType.LIGHT)) { + int capBlockLight = (int) avgBlockLight; + int capSkyLight = (int) avgSkyLight; + wr.lightmap(capBlockLight, capSkyLight); + } + + Vec3 color; + if (shadeTypes.isEnabled(EnumShadeType.FACE)) { + color = aoMap.get(face); + } else { + color = VEC_ONE; + } + color = multiply(color, avgColorMultiplier); + setWorldRendererRGB(wr, color); + } + + public static void setWorldRendererRGB(WorldRenderer wr, Vec3 color) { + wr.color((float) color.xCoord, (float) color.yCoord, (float) color.zCoord, 1f); + } + + public static Vec3 vec3(double value) { + return new Vec3(value, value, value); + } + + public static Vec3 multiply(Vec3 vec, double multiple) { + return new Vec3(vec.xCoord * multiple, vec.yCoord * multiple, vec.zCoord * multiple); + } + + public static Vec3 convertMiddle(Vec3i vec3i) { + return convert(vec3i).add(VEC_HALF); + } + + /** Note that this method DOES take into account its position. But not its rotation. (Open an issue on github if you + * need rotation, and a second method will be made that does all the trig required) */ + public void renderCubeStatic(List quads, Model3D cuboid) { + TextureAtlasSprite[] sprites = cuboid.textures; + + int[] flips = cuboid.textureFlips; + if (flips == null) { + flips = new int[6]; + } + + double textureStartX = cuboid.textureStartX / 16D; + double textureStartY = cuboid.textureStartY / 16D; + double textureStartZ = cuboid.textureStartZ / 16D; + + double textureSizeX = cuboid.textureSizeX / 16D; + double textureSizeY = cuboid.textureSizeY / 16D; + double textureSizeZ = cuboid.textureSizeZ / 16D; + + double textureEndX = textureSizeX + textureStartX; + double textureEndY = textureSizeY + textureStartY; + double textureEndZ = textureSizeZ + textureStartZ; + + double textureOffsetX = cuboid.textureOffsetX / 16D; + double textureOffsetY = cuboid.textureOffsetY / 16D; + double textureOffsetZ = cuboid.textureOffsetZ / 16D; + + double sizeX = cuboid.sizeX(); + double sizeY = cuboid.sizeY(); + double sizeZ = cuboid.sizeZ(); + + if (sprites[0] != null) { + // Down + float[] uv = getUVArray(sprites[0], flips[0], textureStartX, textureEndX, textureStartZ, textureEndZ); + for (RenderInfo ri : getRenderInfos(uv, sizeX, sizeZ, textureSizeX, textureSizeZ, textureOffsetX, textureOffsetZ)) { + ri = ri.offset(cuboid, Axis.Y); + double[][] arr = new double[4][]; + arr[0] = new double[] { ri.xyz[U_MAX], cuboid.posY, ri.xyz[V_MIN], -1, ri.uv[U_MAX], ri.uv[V_MIN], 0 }; + arr[1] = new double[] { ri.xyz[U_MAX], cuboid.posY, ri.xyz[V_MAX], -1, ri.uv[U_MAX], ri.uv[V_MAX], 0 }; + arr[2] = new double[] { ri.xyz[U_MIN], cuboid.posY, ri.xyz[V_MAX], -1, ri.uv[U_MIN], ri.uv[V_MAX], 0 }; + arr[3] = new double[] { ri.xyz[U_MIN], cuboid.posY, ri.xyz[V_MIN], -1, ri.uv[U_MIN], ri.uv[V_MIN], 0 }; + convertToDoubleQuads(quads, arr, EnumFacing.DOWN); + } + } + + if (sprites[1] != null) { + // Up + float[] uv = getUVArray(sprites[1], flips[1], textureStartX, textureEndX, textureStartZ, textureEndZ); + + for (RenderInfo ri : getRenderInfos(uv, sizeX, sizeZ, textureSizeX, textureSizeZ, textureOffsetX, textureOffsetZ)) { + ri = ri.offset(cuboid, Axis.Y); + double[][] arr = new double[4][]; + arr[0] = new double[] { ri.xyz[U_MAX], sizeY + cuboid.posY, ri.xyz[V_MIN], -1, ri.uv[U_MAX], ri.uv[V_MIN], 0 }; + arr[1] = new double[] { ri.xyz[U_MAX], sizeY + cuboid.posY, ri.xyz[V_MAX], -1, ri.uv[U_MAX], ri.uv[V_MAX], 0 }; + arr[2] = new double[] { ri.xyz[U_MIN], sizeY + cuboid.posY, ri.xyz[V_MAX], -1, ri.uv[U_MIN], ri.uv[V_MAX], 0 }; + arr[3] = new double[] { ri.xyz[U_MIN], sizeY + cuboid.posY, ri.xyz[V_MIN], -1, ri.uv[U_MIN], ri.uv[V_MIN], 0 }; + convertToDoubleQuads(quads, arr, EnumFacing.UP); + } + } + + if (sprites[2] != null) { + // North (-Z) + float[] uv = getUVArray(sprites[2], flips[2], textureStartX, textureEndX, textureStartY, textureEndY); + + for (RenderInfo ri : getRenderInfos(uv, sizeX, sizeY, textureSizeX, textureSizeY, textureOffsetX, textureOffsetY)) { + ri = ri.offset(cuboid, Axis.Z); + double[][] arr = new double[4][]; + arr[0] = new double[] { ri.xyz[U_MAX], ri.xyz[V_MIN], cuboid.posZ, -1, ri.uv[U_MAX], ri.uv[V_MIN], 0 }; + arr[1] = new double[] { ri.xyz[U_MAX], ri.xyz[V_MAX], cuboid.posZ, -1, ri.uv[U_MAX], ri.uv[V_MAX], 0 }; + arr[2] = new double[] { ri.xyz[U_MIN], ri.xyz[V_MAX], cuboid.posZ, -1, ri.uv[U_MIN], ri.uv[V_MAX], 0 }; + arr[3] = new double[] { ri.xyz[U_MIN], ri.xyz[V_MIN], cuboid.posZ, -1, ri.uv[U_MIN], ri.uv[V_MIN], 0 }; + convertToDoubleQuads(quads, arr, EnumFacing.NORTH); + } + } + + if (sprites[3] != null) { + // South (+Z) + float[] uv = getUVArray(sprites[3], flips[3], textureStartX, textureEndX, textureStartY, textureEndY); + + for (RenderInfo ri : getRenderInfos(uv, sizeX, sizeY, textureSizeX, textureSizeY, textureOffsetX, textureOffsetY)) { + ri = ri.offset(cuboid, Axis.Z); + double[][] arr = new double[4][]; + arr[0] = new double[] { ri.xyz[U_MAX], ri.xyz[V_MIN], cuboid.posZ + sizeZ, -1, ri.uv[U_MAX], ri.uv[V_MIN], 0 }; + arr[1] = new double[] { ri.xyz[U_MAX], ri.xyz[V_MAX], cuboid.posZ + sizeZ, -1, ri.uv[U_MAX], ri.uv[V_MAX], 0 }; + arr[2] = new double[] { ri.xyz[U_MIN], ri.xyz[V_MAX], cuboid.posZ + sizeZ, -1, ri.uv[U_MIN], ri.uv[V_MAX], 0 }; + arr[3] = new double[] { ri.xyz[U_MIN], ri.xyz[V_MIN], cuboid.posZ + sizeZ, -1, ri.uv[U_MIN], ri.uv[V_MIN], 0 }; + convertToDoubleQuads(quads, arr, EnumFacing.SOUTH); + } + } + + if (sprites[4] != null) { + // West (-X) + float[] uv = getUVArray(sprites[4], flips[4], textureStartZ, textureEndZ, textureStartY, textureEndY); + + for (RenderInfo ri : getRenderInfos(uv, sizeZ, sizeY, textureSizeZ, textureSizeY, textureOffsetZ, textureOffsetY)) { + ri = ri.offset(cuboid, Axis.X); + double[][] arr = new double[4][]; + arr[0] = new double[] { cuboid.posX, ri.xyz[V_MIN], ri.xyz[U_MAX], -1, ri.uv[U_MAX], ri.uv[V_MIN], 0 }; + arr[1] = new double[] { cuboid.posX, ri.xyz[V_MAX], ri.xyz[U_MAX], -1, ri.uv[U_MAX], ri.uv[V_MAX], 0 }; + arr[2] = new double[] { cuboid.posX, ri.xyz[V_MAX], ri.xyz[U_MIN], -1, ri.uv[U_MIN], ri.uv[V_MAX], 0 }; + arr[3] = new double[] { cuboid.posX, ri.xyz[V_MIN], ri.xyz[U_MIN], -1, ri.uv[U_MIN], ri.uv[V_MIN], 0 }; + convertToDoubleQuads(quads, arr, EnumFacing.WEST); + } + } + + if (sprites[5] != null) { + // East (+X) + float[] uv = getUVArray(sprites[5], flips[5], textureStartZ, textureEndZ, textureStartY, textureEndY); + + for (RenderInfo ri : getRenderInfos(uv, sizeZ, sizeY, textureSizeZ, textureSizeY, textureOffsetZ, textureOffsetY)) { + ri = ri.offset(cuboid, Axis.X); + double[][] arr = new double[4][]; + arr[0] = new double[] { cuboid.posX + sizeX, ri.xyz[V_MIN], ri.xyz[U_MAX], -1, ri.uv[U_MAX], ri.uv[V_MIN], 0 }; + arr[1] = new double[] { cuboid.posX + sizeX, ri.xyz[V_MAX], ri.xyz[U_MAX], -1, ri.uv[U_MAX], ri.uv[V_MAX], 0 }; + arr[2] = new double[] { cuboid.posX + sizeX, ri.xyz[V_MAX], ri.xyz[U_MIN], -1, ri.uv[U_MIN], ri.uv[V_MAX], 0 }; + arr[3] = new double[] { cuboid.posX + sizeX, ri.xyz[V_MIN], ri.xyz[U_MIN], -1, ri.uv[U_MIN], ri.uv[V_MIN], 0 }; + convertToDoubleQuads(quads, arr, EnumFacing.EAST); + } + } + } + + private void convertToDoubleQuads(List quads, double[][] points, EnumFacing face) { + BakedQuad quad = convertToQuad(points, face); + quads.add(quad); + + double[][] otherPoints = new double[][] { points[3], points[2], points[1], points[0] }; + quad = convertToQuad(otherPoints, face); + quads.add(quad); + } + + private BakedQuad convertToQuad(double[][] points, EnumFacing face) { + int[] list = new int[points.length * points[0].length]; + for (int i = 0; i < points.length; i++) { + double[] arr = points[i]; + for (int j = 0; j < arr.length; j++) { + double d = arr[j]; + int used = 0; + if (j == 3 || j == 6) {// Shade or unused + used = (int) d; + } else { + used = Float.floatToRawIntBits((float) d); + } + list[i * arr.length + j] = used; + } + } + return new BakedQuad(list, -1, face); + } + + /** Returns an array containing [uMin, uMax, vMin, vMax]. start* and end* must be doubles between 0 and 1 */ + private float[] getUVArray(TextureAtlasSprite sprite, int flips, double startU, double endU, double startV, double endV) { + float minU = sprite.getInterpolatedU(startU * 16); + float maxU = sprite.getInterpolatedU(endU * 16); + float minV = sprite.getInterpolatedV(startV * 16); + float maxV = sprite.getInterpolatedV(endV * 16); + float[] uvarray = new float[] { minU, maxU, minV, maxV }; + if (flips % 2 == 1) { + float holder = uvarray[0]; + uvarray[0] = uvarray[1]; + uvarray[1] = holder; + } + if (flips >> 1 % 2 == 1) { + float holder = uvarray[2]; + uvarray[2] = uvarray[3]; + uvarray[3] = holder; + } + return uvarray; + } + + private float[] getUVArray(TextureAtlasSprite sprite, int flips, EnumFacing face, Vec3 start, Vec3 end) { + Axis u = face.getAxis() == Axis.X ? Axis.Z : Axis.X; + Axis v = face.getAxis() == Axis.Y ? Axis.Z : Axis.Y; + + float minU = sprite.getInterpolatedU(getValue(start, u) * 16); + float maxU = sprite.getInterpolatedU(getValue(end, u) * 16); + float minV = sprite.getInterpolatedV(getValue(start, v) * 16); + float maxV = sprite.getInterpolatedV(getValue(end, v) * 16); + + float[] uvarray = new float[] { minU, maxU, minV, maxV }; + if (flips % 2 == 1) { + float holder = uvarray[0]; + uvarray[0] = uvarray[1]; + uvarray[1] = holder; + } + if (flips >> 1 % 2 == 1) { + float holder = uvarray[2]; + uvarray[2] = uvarray[3]; + uvarray[3] = holder; + } + return uvarray; + } + + private List getRenderInfos(float[] uv, EnumFacing face, Vec3 size, Vec3 texSize, Vec3 texOffset) { + Axis u = face.getAxis() == Axis.X ? Axis.Z : Axis.X; + Axis v = face.getAxis() == Axis.Y ? Axis.Z : Axis.Y; + + double sizeU = getValue(size, u); + double sizeV = getValue(size, v); + double textureSizeU = getValue(texSize, u); + double textureSizeV = getValue(texSize, v); + double textureOffsetU = getValue(texOffset, u); + double textureOffsetV = getValue(texOffset, v); + + return getRenderInfos(uv, sizeU, sizeV, textureSizeU, textureSizeV, textureOffsetU, textureOffsetV); + } + + public static double getValue(Vec3 vector, Axis axis) { + if (axis == Axis.X) return vector.xCoord; + else if (axis == Axis.Y) return vector.yCoord; + else if (axis == Axis.Z) return vector.zCoord; + else throw new RuntimeException("Was given a null axis! That was probably not intentional, consider this a bug! (Vector = " + vector + ")"); + } + + /** A way to automatically generate the different positions given the same arguments. + * + * @param rotation TODO */ + private List getRenderInfos(float[] uv, double sizeU, double sizeV, double textureSizeU, double textureSizeV, double textureOffsetU, + double textureOffsetV) { + + List infos = Lists.newArrayList(); + boolean firstU = true; + for (double u = 0; u < sizeU; u += textureSizeU) { + float[] uvCu = Arrays.copyOf(uv, 4); + double addU = textureSizeU; + boolean lowerU = false; + + // If there is an offset then make sure the texture positions are changed properly + if (firstU && textureOffsetU != 0) { + uvCu[U_MIN] = uvCu[U_MIN] + (uvCu[U_MAX] - uvCu[U_MIN]) * (float) textureOffsetU; + addU -= textureOffsetU; + // addU = 1 - textureOffsetU; + lowerU = true; + } + + // If the size of the texture is greater than the cuboid goes on for then make sure the texture + // positions are lowered + if (u + addU > sizeU) { + addU = sizeU - u; + if (firstU && textureOffsetU != 0) { + uvCu[U_MAX] = uvCu[U_MIN] + (uvCu[U_MAX] - uvCu[U_MIN]) * (float) (addU / (textureSizeU - textureOffsetU)); + } else { + uvCu[U_MAX] = uvCu[U_MIN] + (uvCu[U_MAX] - uvCu[U_MIN]) * (float) (addU / textureSizeU); + } + } + firstU = false; + boolean firstV = true; + for (double v = 0; v < sizeV; v += textureSizeV) { + float[] uvCv = Arrays.copyOf(uvCu, 4); + + double addV = textureSizeV; + + boolean lowerV = false; + + if (firstV && textureOffsetV != 0) { + uvCv[V_MIN] = uvCv[V_MIN] + (uvCv[V_MAX] - uvCv[V_MIN]) * (float) textureOffsetV; + addV -= textureOffsetV; + lowerV = true; + } + if (v + addV > sizeV) { + addV = sizeV - v; + if (firstV && textureOffsetV != 0) { + uvCv[V_MAX] = uvCv[V_MIN] + (uvCv[V_MAX] - uvCv[V_MIN]) * (float) (addV / (textureSizeV - textureOffsetV)); + } else { + uvCv[V_MAX] = uvCv[V_MIN] + (uvCv[V_MAX] - uvCv[V_MIN]) * (float) (addV / textureSizeV); + } + } + + double[] xyz = new double[4]; + xyz[U_MIN] = u; + xyz[U_MAX] = u + addU; + xyz[V_MIN] = v; + xyz[V_MAX] = v + addV; + infos.add(new RenderInfo(uvCv, xyz)); + + if (lowerV) { + v -= textureOffsetV; + } + firstV = false; + } + // If we lowered the U because the cuboid started on an offset, reset it back to what was actually + // rendered, not what the for loop assumes + if (lowerU) { + u -= textureOffsetU; + } + } + return infos; + } + + private static final class RenderInfo { + private final float[] uv; + private final double[] xyz; + + public RenderInfo(float[] uv, double[] xyz) { + this.uv = uv; + this.xyz = xyz; + } + + public RenderInfo offset(Model3D ent, Axis axis) { + switch (axis) { + case X: { + return new RenderInfo(uv, new double[] { xyz[0] + ent.posZ, xyz[1] + ent.posZ, xyz[2] + ent.posY, xyz[3] + ent.posY }); + } + case Y: { + return new RenderInfo(uv, new double[] { xyz[0] + ent.posX, xyz[1] + ent.posX, xyz[2] + ent.posZ, xyz[3] + ent.posZ }); + } + case Z: { + return new RenderInfo(uv, new double[] { xyz[0] + ent.posX, xyz[1] + ent.posX, xyz[2] + ent.posY, xyz[3] + ent.posY }); + } + } + return new RenderInfo(uv, xyz); + } + } +} \ No newline at end of file diff --git a/src/main/java/mekanism/client/render/RenderTickHandler.java b/src/main/java/mekanism/client/render/RenderTickHandler.java index e22cce1dd..2afb176aa 100644 --- a/src/main/java/mekanism/client/render/RenderTickHandler.java +++ b/src/main/java/mekanism/client/render/RenderTickHandler.java @@ -51,7 +51,7 @@ public class RenderTickHandler if(pos != null) { - Coord4D obj = new Coord4D(pos.getBlockPos(), world.provider.getDimensionId()); + Coord4D obj = new Coord4D(pos.getBlockPos(), world); if(MekanismAPI.debug && mc.currentScreen == null && !mc.gameSettings.showDebugInfo) { diff --git a/src/main/java/mekanism/client/render/ctm/CTM.java b/src/main/java/mekanism/client/render/ctm/CTM.java index 688df9230..c40ebd968 100644 --- a/src/main/java/mekanism/client/render/ctm/CTM.java +++ b/src/main/java/mekanism/client/render/ctm/CTM.java @@ -1,5 +1,13 @@ package mekanism.client.render.ctm; +import static mekanism.client.render.ctm.Dir.BOTTOM; +import static mekanism.client.render.ctm.Dir.BOTTOM_LEFT; +import static mekanism.client.render.ctm.Dir.BOTTOM_RIGHT; +import static mekanism.client.render.ctm.Dir.LEFT; +import static mekanism.client.render.ctm.Dir.RIGHT; +import static mekanism.client.render.ctm.Dir.TOP; +import static mekanism.client.render.ctm.Dir.TOP_LEFT; +import static mekanism.client.render.ctm.Dir.TOP_RIGHT; import gnu.trove.map.TIntObjectMap; import gnu.trove.map.hash.TIntObjectHashMap; @@ -8,13 +16,12 @@ import java.util.EnumMap; import net.minecraft.block.state.IBlockState; import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; +import net.minecraft.util.IStringSerializable; import net.minecraft.world.IBlockAccess; import com.google.common.base.Optional; import com.google.common.collect.Maps; -import static mekanism.client.render.ctm.Dir.*; - // @formatter:off /** * The CTM renderer will draw the block's FACE using by assembling 4 quadrants from the 5 available block @@ -254,26 +261,31 @@ public class CTM { * The state to check against for connection. * @return True if the given block can connect to the given location on the given side. */ - public boolean isConnected(IBlockAccess world, BlockPos current, BlockPos connection, EnumFacing dir, IBlockState state) { - -// if (CTMLib.chiselLoaded() && connectionBlocked(world, x, y, z, dir.ordinal())) { -// return false; -// } - + public boolean isConnected(IBlockAccess world, BlockPos current, BlockPos connection, EnumFacing dir, IBlockState state) + { BlockPos pos2 = connection.add(dir.getDirectionVec()); boolean disableObscured = disableObscuredFaceCheck.or(disableObscuredFaceCheckConfig); IBlockState con = getBlockOrFacade(world, connection, dir); IBlockState obscuring = disableObscured ? null : getBlockOrFacade(world, pos2, dir); + + CTMData data = ((ICTMBlock)state.getBlock()).getCTMData(state); // no block or a bad API user - if (con == null) { + if (con == null || data == null) + { return false; } - // TODO VERY TEMPORARY - boolean ret = con.getBlock() == state.getBlock(); + boolean ret = false; + + if(con.getBlock() instanceof ICTMBlock && ((ICTMBlock)con.getBlock()).getCTMData(con) != null) + { + String state2 = ((IStringSerializable)con.getValue(((ICTMBlock)con.getBlock()).getTypeProperty())).getName(); + + ret = data.acceptableBlockStates.contains(state2); + } // no block obscuring this face if (obscuring == null) { @@ -286,14 +298,6 @@ public class CTM { return ret; } -// private boolean connectionBlocked(IBlockAccess world, int x, int y, int z, int side) { -// Block block = world.getBlock(x, y, z); -// if (block instanceof IConnectable) { -// return !((IConnectable) block).canConnectCTM(world, x, y, z, side); -// } -// return false; -// } - public IBlockState getBlockOrFacade(IBlockAccess world, BlockPos pos, EnumFacing side) { IBlockState state = world.getBlockState(pos); return state; diff --git a/src/main/java/mekanism/client/render/ctm/CTMBlockRenderContext.java b/src/main/java/mekanism/client/render/ctm/CTMBlockRenderContext.java index 20c351bbc..ceed95c0e 100644 --- a/src/main/java/mekanism/client/render/ctm/CTMBlockRenderContext.java +++ b/src/main/java/mekanism/client/render/ctm/CTMBlockRenderContext.java @@ -6,23 +6,27 @@ import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraft.world.IBlockAccess; -public class CTMBlockRenderContext { - +public class CTMBlockRenderContext +{ private EnumMap ctmData = new EnumMap<>(EnumFacing.class); - public CTMBlockRenderContext(IBlockAccess world, BlockPos pos) { - for (EnumFacing face : EnumFacing.VALUES) { + public CTMBlockRenderContext(IBlockAccess world, BlockPos pos) + { + for(EnumFacing face : EnumFacing.VALUES) + { CTM ctm = createCTM(); ctm.createSubmapIndices(world, pos, face); ctmData.put(face, ctm); } } - protected CTM createCTM() { + protected CTM createCTM() + { return CTM.getInstance(); } - public CTM getCTM(EnumFacing face) { + public CTM getCTM(EnumFacing face) + { return ctmData.get(face); } } diff --git a/src/main/java/mekanism/client/render/ctm/CTMData.java b/src/main/java/mekanism/client/render/ctm/CTMData.java new file mode 100644 index 000000000..f6cfd7e77 --- /dev/null +++ b/src/main/java/mekanism/client/render/ctm/CTMData.java @@ -0,0 +1,47 @@ +package mekanism.client.render.ctm; + +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.block.state.IBlockState; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.IStringSerializable; +import net.minecraft.world.IBlockAccess; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +public class CTMData +{ + public List acceptableBlockStates = new ArrayList(); + + public boolean renderConvexConnections = false; + + public CTMData(IStringSerializable... states) + { + for(IStringSerializable state : states) + { + acceptableBlockStates.add(state.getName()); + } + } + + public CTMData setRenderConvexConnections() + { + renderConvexConnections = true; + return this; + } + + @SideOnly(Side.CLIENT) + public boolean shouldRenderSide(IBlockAccess world, BlockPos pos, EnumFacing side) + { + IBlockState state = world.getBlockState(pos); + + if(state.getBlock() instanceof ICTMBlock) + { + IStringSerializable serializable = (IStringSerializable)state.getValue(((ICTMBlock)state.getBlock()).getTypeProperty()); + return !acceptableBlockStates.contains(serializable.getName()); + } + + return true; + } +} diff --git a/src/main/java/mekanism/client/render/ctm/TextureStitcher.java b/src/main/java/mekanism/client/render/ctm/CTMRegistry.java similarity index 69% rename from src/main/java/mekanism/client/render/ctm/TextureStitcher.java rename to src/main/java/mekanism/client/render/ctm/CTMRegistry.java index 12a9fd84b..d264b9d8d 100644 --- a/src/main/java/mekanism/client/render/ctm/TextureStitcher.java +++ b/src/main/java/mekanism/client/render/ctm/CTMRegistry.java @@ -19,18 +19,22 @@ import net.minecraftforge.client.model.IModel; import net.minecraftforge.client.model.TRSRTransformation; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -public class TextureStitcher { - +public class CTMRegistry +{ private static List textures = new ArrayList(); private IBakedModel baseModel; public static ResourceLocation baseResource = new ResourceLocation("mekanism:block/ctm_block"); - public static String[] ctmTypes = new String[] {"dynamic_tank"}; + public static String[] ctmTypes = new String[] {"dynamic_tank", "structural_glass", "dynamic_valve", "teleporter", "teleporter_frame", "induction_casing", "induction_port", "induction_port_output", + "induction_cell_basic", "induction_cell_advanced", "induction_cell_elite", "induction_cell_ultimate", "induction_provider_basic", "induction_provider_advanced", "induction_provider_elite", + "induction_provider_ultimate", "thermal_evaporation_controller", "thermal_evaporation_controller_on", "thermal_evaporation_valve", "superheating_element", "superheating_element_on", "reactor_port", + "reactor_neutron_capture", "reactor_logic_adapter", "reactor_laser_focus", "reactor_glass", "reactor_frame", "reactor_controller_on", "reactor_controller_off", "boiler_casing", "boiler_valve", + "electromagnetic_coil", "thermal_evaporation_valve", "thermal_evaporation_block", "turbine_casing", "turbine_vent", "turbine_valve"}; public static Map textureCache = new HashMap(); - public TextureStitcher() + public CTMRegistry() { if(textureCache.isEmpty()) { @@ -42,8 +46,10 @@ public class TextureStitcher { } @SubscribeEvent - public void onTextureStitch(TextureStitchEvent.Pre event) { - for (TextureSpriteCallback callback : textures) { + public void onTextureStitch(TextureStitchEvent.Pre event) + { + for(TextureSpriteCallback callback : textures) + { callback.stitch(event.map); } } @@ -54,7 +60,7 @@ public class TextureStitcher { IModel model = event.modelLoader.getModel(baseResource); baseModel = model.bake(new TRSRTransformation(ModelRotation.X0_Y0), Attributes.DEFAULT_BAKED_FORMAT, r -> Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite(r.toString())); - for (String ctm : ctmTypes) + for(String ctm : ctmTypes) { ModelChisel chiselModel = new ModelChisel(baseModel, ctm); chiselModel.load(); @@ -79,14 +85,4 @@ public class TextureStitcher { return new ChiselTextureCTM(EnumWorldBlockLayer.SOLID, callbacks); } - - public static ChiselFace createFace(String name) - { - ChiselFace face = new ChiselFace(); - - face.addTexture(textureCache.get(name)); - face.setLayer(EnumWorldBlockLayer.SOLID); - - return face; - } } diff --git a/src/main/java/mekanism/client/render/ctm/ChiselTextureCTM.java b/src/main/java/mekanism/client/render/ctm/ChiselTextureCTM.java index 6a2bf6c64..e86ac1cf3 100644 --- a/src/main/java/mekanism/client/render/ctm/ChiselTextureCTM.java +++ b/src/main/java/mekanism/client/render/ctm/ChiselTextureCTM.java @@ -7,28 +7,30 @@ import java.util.List; import java.util.Objects; import java.util.stream.Collectors; -import lombok.Getter; 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.ResourceLocation; -public class ChiselTextureCTM { - - @Getter +public class ChiselTextureCTM +{ protected EnumWorldBlockLayer layer; - protected TextureSpriteCallback[] sprites; + public TextureSpriteCallback[] sprites; - public ChiselTextureCTM(EnumWorldBlockLayer layer, TextureSpriteCallback[] sprites) { + public ChiselTextureCTM(EnumWorldBlockLayer layer, TextureSpriteCallback[] sprites) + { this.layer = layer; this.sprites = sprites; } - public List transformQuad(BakedQuad bq, CTMBlockRenderContext context, int quadGoal) { + public List transformQuad(BakedQuad bq, CTMBlockRenderContext context, int quadGoal) + { Quad quad = Quad.from(bq, DefaultVertexFormats.ITEM); - if (context == null) { + + if(context == null) + { return Collections.singletonList(quad.transformUVs(sprites[0].getSprite()).rebake()); } @@ -36,21 +38,27 @@ public class ChiselTextureCTM { int[] ctm = ((CTMBlockRenderContext)context).getCTM(bq.getFace()).getSubmapIndices(); - for (int i = 0; i < quads.length; i++) { + for(int i = 0; i < quads.length; i++) + { Quad q = quads[i]; - if (q != null) { - int ctmid = q.getUvs().normalize().getQuadrant(); + + if(q != null) + { + int ctmid = q.getUVs().normalize().getQuadrant(); quads[i] = q.grow().transformUVs(sprites[ctm[ctmid] > 15 ? 0 : 1].getSprite(), CTM.uvs[ctm[ctmid]].normalize()); } } + return Arrays.stream(quads).filter(Objects::nonNull).map(q -> q.rebake()).collect(Collectors.toList()); } - public TextureAtlasSprite getParticle(){ + public TextureAtlasSprite getParticle() + { return sprites[0].getSprite(); } - public Collection getTextures() { + public Collection getTextures() + { return Arrays.stream(sprites).map(TextureSpriteCallback::getLocation).collect(Collectors.toList()); } } diff --git a/src/main/java/mekanism/client/render/ctm/Dir.java b/src/main/java/mekanism/client/render/ctm/Dir.java index fa28018ba..db3fc3b05 100644 --- a/src/main/java/mekanism/client/render/ctm/Dir.java +++ b/src/main/java/mekanism/client/render/ctm/Dir.java @@ -12,7 +12,6 @@ import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumFacing.Axis; import net.minecraft.util.EnumFacing.AxisDirection; import net.minecraft.world.IBlockAccess; -import mekanism.client.render.ctm.CTM; /** * Think of this class as a "Two dimensional ForgeDirection, with diagonals". diff --git a/src/main/java/mekanism/client/render/ctm/ICTMBlock.java b/src/main/java/mekanism/client/render/ctm/ICTMBlock.java index 9c5d23fc0..e7c9a7303 100644 --- a/src/main/java/mekanism/client/render/ctm/ICTMBlock.java +++ b/src/main/java/mekanism/client/render/ctm/ICTMBlock.java @@ -1,5 +1,15 @@ package mekanism.client.render.ctm; -public interface ICTMBlock { +import net.minecraft.block.properties.PropertyEnum; +import net.minecraft.block.state.IBlockState; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.IStringSerializable; +public interface ICTMBlock +{ + public CTMData getCTMData(IBlockState state); + + public PropertyEnum getTypeProperty(); + + public String getOverrideTexture(IBlockState state, EnumFacing side); } diff --git a/src/main/java/mekanism/client/render/ctm/ModelChisel.java b/src/main/java/mekanism/client/render/ctm/ModelChisel.java index adb3e6630..ac0492585 100644 --- a/src/main/java/mekanism/client/render/ctm/ModelChisel.java +++ b/src/main/java/mekanism/client/render/ctm/ModelChisel.java @@ -7,8 +7,6 @@ import java.util.List; import java.util.Map; import net.minecraft.block.state.IBlockState; -import net.minecraft.client.renderer.block.statemap.DefaultStateMapper; -import net.minecraft.client.renderer.block.statemap.StateMapperBase; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.renderer.vertex.VertexFormat; import net.minecraft.client.resources.model.IBakedModel; @@ -24,20 +22,15 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import com.google.common.collect.Maps; - -public class ModelChisel implements IModel { - - private static StateMapperBase mapper = new DefaultStateMapper(); - +public class ModelChisel implements IModel +{ private Map overrides = Maps.newHashMap(); - private transient ChiselFace faceObj; - private transient Map overridesObj = new EnumMap<>(EnumFacing.class); + private transient ChiselTextureCTM faceObj; + private transient Map overridesObj = new EnumMap<>(EnumFacing.class); private transient IBakedModel modelObj; - private transient Map stateMap = Maps.newHashMap(); - private transient List textures = Lists.newArrayList(); public String modelName; @@ -49,44 +42,53 @@ public class ModelChisel implements IModel { } @Override - public Collection getDependencies() { + public Collection getDependencies() + { return new ArrayList(); } @Override - public Collection getTextures() { + public Collection getTextures() + { return ImmutableList.copyOf(textures); } @Override - public IFlexibleBakedModel bake(IModelState state, VertexFormat format, Function bakedTextureGetter) { + public IFlexibleBakedModel bake(IModelState state, VertexFormat format, Function bakedTextureGetter) + { return null; } @Override - public IModelState getDefaultState() { + public IModelState getDefaultState() + { return TRSRTransformation.identity(); } - void load() { - if (faceObj != null) { + void load() + { + if(faceObj != null) + { return; } - System.out.println("LOADING MODEL"); - faceObj = TextureStitcher.createFace(modelName); - faceObj.getTextureList().forEach(t -> textures.addAll(t.getTextures())); - overridesObj.values().forEach(f -> f.getTextureList().forEach(t -> textures.addAll(t.getTextures()))); + + faceObj = CTMRegistry.textureCache.get(modelName); + textures.addAll(faceObj.getTextures()); + overridesObj.values().forEach(t -> textures.addAll(t.getTextures())); } - public ChiselFace getDefaultFace() { + public ChiselTextureCTM getDefaultFace() + { return faceObj; } - public ChiselFace getFace(EnumFacing facing) { + public ChiselTextureCTM getFace(EnumFacing facing) + { return overridesObj.getOrDefault(facing, faceObj); } - public IBakedModel getModel(IBlockState state) { + public IBakedModel getModel(IBlockState state) + { return modelObj; } } diff --git a/src/main/java/mekanism/client/render/ctm/ModelChiselBlock.java b/src/main/java/mekanism/client/render/ctm/ModelChiselBlock.java index 2d09eb758..8ee65da96 100644 --- a/src/main/java/mekanism/client/render/ctm/ModelChiselBlock.java +++ b/src/main/java/mekanism/client/render/ctm/ModelChiselBlock.java @@ -7,7 +7,7 @@ import javax.annotation.Nullable; import javax.vecmath.Matrix4f; import javax.vecmath.Vector3f; -import mekanism.common.block.BlockBasic; +import mekanism.common.block.states.BlockStateBasic; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.client.renderer.block.model.BakedQuad; @@ -32,14 +32,13 @@ import org.apache.commons.lang3.tuple.Pair; import com.google.common.collect.FluentIterable; import com.google.common.collect.Lists; -import com.google.common.collect.Ordering; /** * Model for all chisel blocks */ @SuppressWarnings("deprecation") -public class ModelChiselBlock implements ISmartBlockModel, ISmartItemModel, IPerspectiveAwareModel { - +public class ModelChiselBlock implements ISmartBlockModel, ISmartItemModel, IPerspectiveAwareModel +{ public static final TRSRTransformation DEFAULT_BLOCK_THIRD_PERSON_TRANSOFRM = new TRSRTransformation(new Vector3f(0, 1.5f / 16f, -2.75f / 16f), TRSRTransformation.quatFromYXZDegrees(new Vector3f(10, -45, 170)), new Vector3f(0.375f, 0.375f, 0.375f), null); public static final Matrix4f DEFAULT_BLOCK_THIRD_PERSON_MATRIX = DEFAULT_BLOCK_THIRD_PERSON_TRANSOFRM.getMatrix(); @@ -48,109 +47,139 @@ public class ModelChiselBlock implements ISmartBlockModel, ISmartItemModel, IPer private ModelChisel model; - public ModelChiselBlock(List face, List general, ModelChisel model){ + public ModelChiselBlock(List face, List general, ModelChisel model) + { this.face = face; this.general = general; this.model = model; } - public ModelChiselBlock(ModelChisel model){ + public ModelChiselBlock(ModelChisel model) + { this(Collections.emptyList(), Collections.emptyList(), model); } @Override - public List getFaceQuads(EnumFacing facing){ + public List getFaceQuads(EnumFacing facing) + { return FluentIterable.from(face).filter(quad -> quad.getFace() == facing).toList(); } @Override - public List getGeneralQuads() { + public List getGeneralQuads() + { return general; } @Override - public boolean isAmbientOcclusion(){ + public boolean isAmbientOcclusion() + { return true; } @Override - public boolean isGui3d(){ + public boolean isGui3d() + { return true; } @Override - public boolean isBuiltInRenderer(){ + public boolean isBuiltInRenderer() + { return false; } @Override - public TextureAtlasSprite getParticleTexture() { - return this.model.getDefaultFace().getParticle(); + public TextureAtlasSprite getParticleTexture() + { + return model.getDefaultFace().getParticle(); } @Override - public ItemCameraTransforms getItemCameraTransforms(){ + public ItemCameraTransforms getItemCameraTransforms() + { return ItemCameraTransforms.DEFAULT; } // TODO implement model caching, returning a new model every time is a HUGE waste of memory and CPU @Override - public IBakedModel handleBlockState(IBlockState stateIn) { - if (stateIn.getBlock() instanceof ICTMBlock && stateIn instanceof IExtendedBlockState) { + public IBakedModel handleBlockState(IBlockState stateIn) + { + if(stateIn.getBlock() instanceof ICTMBlock && stateIn instanceof IExtendedBlockState) + { IExtendedBlockState state = (IExtendedBlockState) stateIn; - CTMBlockRenderContext ctxList = state.getValue(BlockBasic.ctmProperty); + CTMBlockRenderContext ctxList = state.getValue(BlockStateBasic.ctmProperty); return createModel(stateIn, model, ctxList); - } else { + } + else { return this; } } @Override - public IBakedModel handleItemState(ItemStack stack) { - Block block = ((ItemBlock) stack.getItem()).getBlock(); + public IBakedModel handleItemState(ItemStack stack) + { + Block block = ((ItemBlock)stack.getItem()).getBlock(); return createModel(block.getDefaultState(), model, null); } - private ModelChiselBlock createModel(IBlockState state, ModelChisel model, CTMBlockRenderContext ctx) { + private ModelChiselBlock createModel(IBlockState state, ModelChisel model, CTMBlockRenderContext ctx) + { List faceQuads = Lists.newArrayList(); List generalQuads = Lists.newArrayList(); - for (EnumFacing facing : EnumFacing.VALUES){ - ChiselFace face = model.getFace(facing); + + for(EnumFacing facing : EnumFacing.VALUES) + { + ChiselTextureCTM face = model.getFace(facing); + ICTMBlock block = (ICTMBlock)state.getBlock(); + CTMData data = block.getCTMData(state); + + if(block.getOverrideTexture(state, facing) != null) + { + face = CTMRegistry.textureCache.get(block.getOverrideTexture(state, facing)); + } - int quadGoal = ctx == null ? 1 : Ordering.natural().max(FluentIterable.from(face.getTextureList()).transform(tex -> CTM.QUADS_PER_SIDE)); + int quadGoal = ctx == null ? 1 : CTM.QUADS_PER_SIDE; IBakedModel baked = model.getModel(state); List origFaceQuads = baked.getFaceQuads(facing); List origGeneralQuads = FluentIterable.from(baked.getGeneralQuads()).filter(q -> q.getFace() == facing).toList(); - addAllQuads(origFaceQuads, face, ctx, quadGoal, faceQuads); - addAllQuads(origGeneralQuads, face, ctx, quadGoal, generalQuads); + addAllQuads(origFaceQuads, face, ctx, state, quadGoal, faceQuads); + addAllQuads(origGeneralQuads, face, ctx, state, quadGoal, generalQuads); } + return new ModelChiselBlock(faceQuads, generalQuads, model); } - private void addAllQuads(List from, ChiselFace face, @Nullable CTMBlockRenderContext ctx, int quadGoal, List to) { - for (BakedQuad q : from) { - for (ChiselTextureCTM tex : face.getTextureList()) { - to.addAll(tex.transformQuad(q, ctx == null ? null : ctx, quadGoal)); - } + private void addAllQuads(List from, ChiselTextureCTM tex, @Nullable CTMBlockRenderContext ctx, IBlockState state, int quadGoal, List to) + { + for(BakedQuad q : from) + { + to.addAll(tex.transformQuad(q, ctx == null ? null : ctx, quadGoal)); } } @Override - public VertexFormat getFormat() { + public VertexFormat getFormat() + { return Attributes.DEFAULT_BAKED_FORMAT; } private Pair thirdPersonTransform; @Override - public Pair handlePerspective(ItemCameraTransforms.TransformType cameraTransformType) { - if (cameraTransformType == TransformType.THIRD_PERSON) { - if (thirdPersonTransform == null) { + public Pair handlePerspective(ItemCameraTransforms.TransformType cameraTransformType) + { + if(cameraTransformType == TransformType.THIRD_PERSON) + { + if(thirdPersonTransform == null) + { thirdPersonTransform = ImmutablePair.of(this, DEFAULT_BLOCK_THIRD_PERSON_MATRIX); } + return thirdPersonTransform; } + return Pair.of(this, null); } } diff --git a/src/main/java/mekanism/client/render/ctm/PropertyCTMRenderContext.java b/src/main/java/mekanism/client/render/ctm/PropertyCTMRenderContext.java index 8759cb566..452a67813 100644 --- a/src/main/java/mekanism/client/render/ctm/PropertyCTMRenderContext.java +++ b/src/main/java/mekanism/client/render/ctm/PropertyCTMRenderContext.java @@ -5,25 +5,29 @@ import net.minecraftforge.common.property.IUnlistedProperty; /** * Block Property for the render context list */ -public class PropertyCTMRenderContext implements IUnlistedProperty { - +public class PropertyCTMRenderContext implements IUnlistedProperty +{ @Override - public String getName(){ + public String getName() + { return "connections"; } @Override - public boolean isValid(CTMBlockRenderContext value){ + public boolean isValid(CTMBlockRenderContext value) + { return true; } @Override - public Class getType(){ + public Class getType() + { return CTMBlockRenderContext.class; } @Override - public String valueToString(CTMBlockRenderContext value){ + public String valueToString(CTMBlockRenderContext value) + { return value.toString(); } } diff --git a/src/main/java/mekanism/client/render/ctm/Quad.java b/src/main/java/mekanism/client/render/ctm/Quad.java index 379d479c7..b674c180b 100644 --- a/src/main/java/mekanism/client/render/ctm/Quad.java +++ b/src/main/java/mekanism/client/render/ctm/Quad.java @@ -4,11 +4,6 @@ import java.util.List; import javax.annotation.Nullable; -import lombok.Getter; -import lombok.RequiredArgsConstructor; -import lombok.Setter; -import lombok.ToString; -import lombok.Value; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.block.model.BakedQuad; import net.minecraft.client.renderer.texture.TextureAtlasSprite; @@ -29,34 +24,31 @@ import com.google.common.collect.ListMultimap; import com.google.common.collect.Lists; import com.google.common.collect.MultimapBuilder; -@ToString(of = { "vertPos", "vertUv" }) -public class Quad { - +public class Quad +{ public static final ISubmap TOP_LEFT = new Submap(8, 8, 0, 0); public static final ISubmap TOP_RIGHT = new Submap(8, 8, 8, 0); public static final ISubmap BOTTOM_LEFT = new Submap(8, 8, 0, 8); public static final ISubmap BOTTOM_RIGHT = new Submap(8, 8, 8, 8); - @Value - public static class Vertex { + public static class Vertex + { Vector3f pos; Vector2f uvs; } private static final TextureAtlasSprite BASE = Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite(TextureMap.LOCATION_MISSING_TEXTURE.toString()); - @ToString - public class UVs { - - @Getter + public class UVs + { private float minU, minV, maxU, maxV; - @Getter private final TextureAtlasSprite sprite; private final Vector2f[] data; - private UVs(Vector2f... data) { + private UVs(Vector2f... data) + { this(BASE, data); } @@ -134,6 +126,11 @@ public class Quad { public UVs relativize() { return relativize(sprite); } + + public TextureAtlasSprite getSprite() + { + return sprite; + } public UVs relativize(TextureAtlasSprite sprite) { Vector2f min = new Vector2f(sprite.getMinU(), sprite.getMinV()); @@ -190,8 +187,7 @@ public class Quad { private final Vector2f[] vertUv; // Technically nonfinal, but treated as such except in constructor - @Getter - private UVs uvs; + private UVs uvsObj; private final Builder builder; @@ -199,16 +195,17 @@ public class Quad { this.vertPos = verts; this.vertUv = uvs; this.builder = builder; - this.uvs = new UVs(uvs); + this.uvsObj = new UVs(uvs); } private Quad(Vector3f[] verts, UVs uvs, Builder builder) { this(verts, uvs.vectorize(), builder); - this.uvs = new UVs(uvs.getSprite(), vertUv); + this.uvsObj = new UVs(uvs.getSprite(), vertUv); } - - public void compute() { - + + public UVs getUVs() + { + return uvsObj; } public Quad[] subdivide(int count) { @@ -235,7 +232,7 @@ public class Quad { @Nullable private Pair divide(boolean vertical) { float min, max; - UVs uvs = getUvs().normalize(); + UVs uvs = uvsObj.normalize(); if (vertical) { min = uvs.minV; max = uvs.maxV; @@ -249,7 +246,7 @@ public class Quad { int firstIndex = 0; for (int i = 0; i < vertUv.length; i++) { - if (vertUv[i].y == getUvs().minV && vertUv[i].x == getUvs().minU) { + if (vertUv[i].y == uvsObj.minV && vertUv[i].x == uvsObj.minU) { firstIndex = i; break; } @@ -305,7 +302,7 @@ public class Quad { public Quad rotate(int amount) { Vector2f[] uvs = new Vector2f[4]; - TextureAtlasSprite s = getUvs().getSprite(); + TextureAtlasSprite s = uvsObj.getSprite(); for (int i = 0; i < 4; i++) { Vector2f normalized = new Vector2f(normalize(s.getMinU(), s.getMaxU(), vertUv[i].x), normalize(s.getMinV(), s.getMaxV(), vertUv[i].y)); @@ -332,14 +329,14 @@ public class Quad { } Quad ret = new Quad(vertPos, uvs, builder); - ret.uvs = new UVs(getUvs().getSprite(), ret.vertUv); + ret.uvsObj = new UVs(uvsObj.getSprite(), ret.vertUv); return ret; } public Quad derotate() { int start = 0; for (int i = 0; i < 4; i++) { - if (vertUv[i].x <= getUvs().minU && vertUv[i].y <= getUvs().minV) { + if (vertUv[i].x <= uvsObj.minU && vertUv[i].y <= uvsObj.minV) { start = i; break; } @@ -383,11 +380,11 @@ public class Quad { } public Quad transformUVs(TextureAtlasSprite sprite, ISubmap submap) { - return new Quad(vertPos, getUvs().transform(sprite, submap), builder); + return new Quad(vertPos, uvsObj.transform(sprite, submap), builder); } public Quad grow() { - return new Quad(vertPos, getUvs().normalizeQuadrant(), builder); + return new Quad(vertPos, uvsObj.normalizeQuadrant(), builder); } public static Quad from(BakedQuad baked, VertexFormat fmt) { @@ -396,17 +393,36 @@ public class Quad { return b.build().derotate(); // for now we will ignore rotated UVs } - @RequiredArgsConstructor - public static class Builder implements IVertexConsumer { - - @Getter + public static class Builder implements IVertexConsumer + { + public Builder(VertexFormat fmt) + { + vertexFormat = fmt; + } + private final VertexFormat vertexFormat; - @Setter private int quadTint; - @Setter private EnumFacing quadOrientation; + + @Override + public void setQuadTint(int tint) + { + quadTint = tint; + } + + @Override + public void setQuadOrientation(EnumFacing orientation) + { + quadOrientation = orientation; + } + + @Override + public VertexFormat getVertexFormat() + { + return vertexFormat; + } @Override public void setQuadColored() {} diff --git a/src/main/java/mekanism/client/render/ctm/Submap.java b/src/main/java/mekanism/client/render/ctm/Submap.java index e313001f1..57fca7bf4 100644 --- a/src/main/java/mekanism/client/render/ctm/Submap.java +++ b/src/main/java/mekanism/client/render/ctm/Submap.java @@ -1,18 +1,45 @@ package mekanism.client.render.ctm; -import lombok.AllArgsConstructor; -import lombok.Getter; -import lombok.RequiredArgsConstructor; import net.minecraft.client.renderer.texture.TextureAtlasSprite; -@Getter -@AllArgsConstructor -public class Submap implements ISubmap { - +public class Submap implements ISubmap +{ private final float width, height; private final float xOffset, yOffset; private final SubmapNormalized normalized = new SubmapNormalized(this); + + public Submap(float w, float h, float x, float y) + { + width = w; + height = h; + xOffset = x; + yOffset = y; + } + + @Override + public float getXOffset() + { + return xOffset; + } + + @Override + public float getYOffset() + { + return yOffset; + } + + @Override + public float getWidth() + { + return width; + } + + @Override + public float getHeight() + { + return height; + } @Override public float getInterpolatedU(TextureAtlasSprite sprite, float u) { @@ -41,10 +68,14 @@ public class Submap implements ISubmap { private static final float FACTOR = 16f; - @RequiredArgsConstructor - private static class SubmapNormalized implements ISubmap { - + private static class SubmapNormalized implements ISubmap + { private final ISubmap parent; + + public SubmapNormalized(ISubmap submap) + { + parent = submap; + } @Override public float getXOffset() { diff --git a/src/main/java/mekanism/client/render/ctm/TextureSpriteCallback.java b/src/main/java/mekanism/client/render/ctm/TextureSpriteCallback.java index 05860b3bf..fa6a228ec 100644 --- a/src/main/java/mekanism/client/render/ctm/TextureSpriteCallback.java +++ b/src/main/java/mekanism/client/render/ctm/TextureSpriteCallback.java @@ -9,16 +9,18 @@ import net.minecraft.util.ResourceLocation; * Callback when textures are stitched */ @Getter -public class TextureSpriteCallback { - +public class TextureSpriteCallback +{ private ResourceLocation location; private TextureAtlasSprite sprite; - public TextureSpriteCallback(ResourceLocation loc) { - this.location = loc; + public TextureSpriteCallback(ResourceLocation loc) + { + location = loc; } - public void stitch(TextureMap map) { - this.sprite = map.registerSprite(location); + public void stitch(TextureMap map) + { + sprite = map.registerSprite(location); } } diff --git a/src/main/java/mekanism/client/render/entity/RenderBalloon.java b/src/main/java/mekanism/client/render/entity/RenderBalloon.java index 8faf5fe79..7140824b5 100644 --- a/src/main/java/mekanism/client/render/entity/RenderBalloon.java +++ b/src/main/java/mekanism/client/render/entity/RenderBalloon.java @@ -6,6 +6,7 @@ import mekanism.common.entity.EntityBalloon; import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.entity.Render; import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.util.ResourceLocation; @@ -57,14 +58,14 @@ public class RenderBalloon extends Render public void render(EnumColor color, double x, double y, double z) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glTranslated(x, y, z); - GL11.glRotatef(180, 1, 0, 0); + GlStateManager.rotate(180, 1, 0, 0); mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "Balloon.png")); model.render(0.0625F, color); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } } diff --git a/src/main/java/mekanism/client/render/entity/RenderFlame.java b/src/main/java/mekanism/client/render/entity/RenderFlame.java index 5040280ef..c3e080daf 100644 --- a/src/main/java/mekanism/client/render/entity/RenderFlame.java +++ b/src/main/java/mekanism/client/render/entity/RenderFlame.java @@ -26,19 +26,24 @@ public class RenderFlame extends Render @Override public void doRender(EntityFlame entity, double x, double y, double z, float f, float partialTick) { + if(entity.ticksExisted < 1) + { + return; + } + float alpha = (entity.ticksExisted+partialTick)/(float)EntityFlame.LIFESPAN; float size = (float)Math.pow(2*alpha, 2); - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); MekanismRenderer.glowOn(); MekanismRenderer.blendOn(); GL11.glColor4f(1, 1, 1, 1-alpha); bindTexture(getEntityTexture(entity)); - GL11.glTranslatef((float)x, (float)y, (float)z); - GL11.glRotatef((entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * partialTick) - 90F, 0.0F, 1.0F, 0.0F); - GL11.glRotatef(entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * partialTick, 0.0F, 0.0F, 1.0F); + GlStateManager.translate((float)x, (float)y, (float)z); + GlStateManager.rotate((entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * partialTick) - 90F, 0.0F, 1.0F, 0.0F); + GlStateManager.rotate(entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * partialTick, 0.0F, 0.0F, 1.0F); Tessellator tessellator = Tessellator.getInstance(); WorldRenderer worldrenderer = tessellator.getWorldRenderer(); @@ -51,9 +56,9 @@ public class RenderFlame extends Render float scale = 0.05625F*(0.8F+size); GL11.glEnable(GL12.GL_RESCALE_NORMAL); - GL11.glRotatef(45F, 1.0F, 0.0F, 0.0F); - GL11.glScalef(scale, scale, scale); - GL11.glTranslatef(-4F, 0.0F, 0.0F); + GlStateManager.rotate(45F, 1.0F, 0.0F, 0.0F); + GlStateManager.scale(scale, scale, scale); + GlStateManager.translate(-4F, 0.0F, 0.0F); for(int j = 0; j < 4; j++) { @@ -69,9 +74,10 @@ public class RenderFlame extends Render } GL11.glDisable(GL12.GL_RESCALE_NORMAL); + MekanismRenderer.resetColor(); MekanismRenderer.glowOff(); MekanismRenderer.blendOff(); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } @Override diff --git a/src/main/java/mekanism/client/render/entity/RenderObsidianTNTPrimed.java b/src/main/java/mekanism/client/render/entity/RenderObsidianTNTPrimed.java index 9c514f7a4..9ecec3915 100644 --- a/src/main/java/mekanism/client/render/entity/RenderObsidianTNTPrimed.java +++ b/src/main/java/mekanism/client/render/entity/RenderObsidianTNTPrimed.java @@ -1,25 +1,24 @@ package mekanism.client.render.entity; -import mekanism.client.model.ModelObsidianTNT; +import mekanism.client.render.MekanismRenderer; +import mekanism.common.MekanismBlocks; import mekanism.common.entity.EntityObsidianTNT; -import mekanism.common.util.MekanismUtils; -import mekanism.common.util.MekanismUtils.ResourceType; - +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.BlockRendererDispatcher; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.entity.Render; import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.util.MathHelper; import net.minecraft.util.ResourceLocation; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class RenderObsidianTNTPrimed extends Render { - private ModelObsidianTNT model = new ModelObsidianTNT(); - public RenderObsidianTNTPrimed(RenderManager renderManager) { super(renderManager); @@ -27,36 +26,27 @@ public class RenderObsidianTNTPrimed extends Render } @Override - public void doRender(EntityObsidianTNT entityobsidiantnt, double x, double y, double z, float f, float f1) + public void doRender(EntityObsidianTNT entityobsidiantnt, double x, double y, double z, float entityYaw, float partialTicks) { - GL11.glPushMatrix(); - GL11.glTranslatef((float)x, (float)y+1.2F, (float)z); - GL11.glScalef(0.8F, 0.8F, 0.8F); - GL11.glRotatef(180, 1, 0, 0); + BlockRendererDispatcher renderer = Minecraft.getMinecraft().getBlockRendererDispatcher(); + GlStateManager.pushMatrix(); + GlStateManager.translate((float)x, (float)y+0.5F, (float)z); - if((entityobsidiantnt.fuse - f1) + 1.0F < 10F) - { - float scale = 1.0F - ((entityobsidiantnt.fuse - f1) + 1.0F) / 10F; + if(entityobsidiantnt.fuse - partialTicks + 1.0F < 10.0F) + { + float f = 1.0F - (entityobsidiantnt.fuse - partialTicks + 1.0F) / 10.0F; + f = MathHelper.clamp_float(f, 0.0F, 1.0F); + f = f * f; + f = f * f; + float f1 = 1.0F + f * 0.3F; + GlStateManager.scale(f1, f1, f1); + } - if(scale < 0.0F) - { - scale = 0.0F; - } - - if(scale > 1.0F) - { - scale = 1.0F; - } - - scale *= scale; - scale *= scale; - float renderScale = 1.0F + scale * 0.3F; - GL11.glScalef(renderScale, renderScale, renderScale); - } - - float f3 = (1.0F - ((entityobsidiantnt.fuse - f1) + 1.0F) / 100F) * 0.8F; - bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "ObsidianTNT.png")); - model.render(0.0625F); + float f3 = (1.0F - ((entityobsidiantnt.fuse - partialTicks) + 1.0F) / 100F) * 0.8F; + bindEntityTexture(entityobsidiantnt); + GlStateManager.translate(-0.5F, -0.5F, 0.5F); + renderer.renderBlockBrightness(MekanismBlocks.ObsidianTNT.getDefaultState(), entityobsidiantnt.getBrightness(partialTicks)); + GlStateManager.translate(0.0F, 0.0F, 1.0F); if(entityobsidiantnt.fuse / 5 % 2 == 0) { @@ -65,14 +55,18 @@ public class RenderObsidianTNTPrimed extends Render GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_DST_ALPHA); GL11.glColor4f(1.0F, 1.0F, 1.0F, f3); - model.render(0.0625F); - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.doPolygonOffset(-3.0F, -3.0F); + GlStateManager.enablePolygonOffset(); + renderer.renderBlockBrightness(MekanismBlocks.ObsidianTNT.getDefaultState(), 1.0F); + GlStateManager.doPolygonOffset(0.0F, 0.0F); + GlStateManager.disablePolygonOffset(); + MekanismRenderer.resetColor(); GL11.glDisable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_TEXTURE_2D); } - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } @Override diff --git a/src/main/java/mekanism/client/render/entity/RenderRobit.java b/src/main/java/mekanism/client/render/entity/RenderRobit.java index 7dbd67e47..d251826dd 100644 --- a/src/main/java/mekanism/client/render/entity/RenderRobit.java +++ b/src/main/java/mekanism/client/render/entity/RenderRobit.java @@ -6,7 +6,6 @@ import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; diff --git a/src/main/java/mekanism/client/render/item/BakedCustomItemModel.java b/src/main/java/mekanism/client/render/item/BakedCustomItemModel.java new file mode 100644 index 000000000..acddeab2b --- /dev/null +++ b/src/main/java/mekanism/client/render/item/BakedCustomItemModel.java @@ -0,0 +1,463 @@ +package mekanism.client.render.item; + +import java.util.LinkedList; +import java.util.List; + +import javax.vecmath.Matrix4f; + +import mekanism.api.energy.IEnergizedItem; +import mekanism.client.model.ModelArmoredJetpack; +import mekanism.client.model.ModelAtomicDisassembler; +import mekanism.client.model.ModelChemicalCrystallizer; +import mekanism.client.model.ModelChemicalDissolutionChamber; +import mekanism.client.model.ModelDigitalMiner; +import mekanism.client.model.ModelEnergyCube; +import mekanism.client.model.ModelFlamethrower; +import mekanism.client.model.ModelFreeRunners; +import mekanism.client.model.ModelGasMask; +import mekanism.client.model.ModelJetpack; +import mekanism.client.model.ModelQuantumEntangloporter; +import mekanism.client.model.ModelResistiveHeater; +import mekanism.client.model.ModelScubaTank; +import mekanism.client.model.ModelSecurityDesk; +import mekanism.client.model.ModelSeismicVibrator; +import mekanism.client.model.ModelSolarNeutronActivator; +import mekanism.client.render.MekanismRenderer; +import mekanism.client.render.ctm.ModelChiselBlock; +import mekanism.client.render.tileentity.RenderBin; +import mekanism.client.render.tileentity.RenderEnergyCube; +import mekanism.client.render.tileentity.RenderFluidTank; +import mekanism.common.MekanismItems; +import mekanism.common.SideData.IOState; +import mekanism.common.Tier.EnergyCubeTier; +import mekanism.common.Tier.FluidTankTier; +import mekanism.common.base.ITierItem; +import mekanism.common.block.states.BlockStateBasic.BasicBlockType; +import mekanism.common.block.states.BlockStateMachine.MachineType; +import mekanism.common.inventory.InventoryBin; +import mekanism.common.item.ItemAtomicDisassembler; +import mekanism.common.item.ItemBlockBasic; +import mekanism.common.item.ItemBlockEnergyCube; +import mekanism.common.item.ItemBlockMachine; +import mekanism.common.item.ItemFlamethrower; +import mekanism.common.item.ItemFreeRunners; +import mekanism.common.item.ItemGasMask; +import mekanism.common.item.ItemScubaTank; +import mekanism.common.tile.TileEntityBin; +import mekanism.common.tile.TileEntityFluidTank; +import mekanism.common.util.MekanismUtils; +import mekanism.common.util.MekanismUtils.ResourceType; +import net.minecraft.block.Block; +import net.minecraft.client.Minecraft; +import net.minecraft.client.model.ModelChest; +import net.minecraft.client.renderer.GlStateManager; +import net.minecraft.client.renderer.block.model.BakedQuad; +import net.minecraft.client.renderer.block.model.ItemCameraTransforms; +import net.minecraft.client.renderer.block.model.ItemCameraTransforms.TransformType; +import net.minecraft.client.renderer.texture.TextureAtlasSprite; +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; +import net.minecraft.client.renderer.vertex.VertexFormat; +import net.minecraft.client.resources.model.IBakedModel; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumFacing; +import net.minecraftforge.client.ForgeHooksClient; +import net.minecraftforge.client.model.Attributes; +import net.minecraftforge.client.model.IFlexibleBakedModel; +import net.minecraftforge.client.model.IPerspectiveAwareModel; +import net.minecraftforge.fluids.Fluid; + +import org.apache.commons.lang3.tuple.Pair; +import org.lwjgl.opengl.GL11; + +public class BakedCustomItemModel implements IBakedModel, IPerspectiveAwareModel +{ + private IBakedModel baseModel; + private ItemStack stack; + + private Minecraft mc = Minecraft.getMinecraft(); + + private static final RenderFluidTank fluidTankRenderer = (RenderFluidTank)TileEntityRendererDispatcher.instance.mapSpecialRenderers.get(TileEntityFluidTank.class); + private final RenderBin binRenderer = (RenderBin)TileEntityRendererDispatcher.instance.mapSpecialRenderers.get(TileEntityBin.class); + + public static ModelJetpack jetpack = new ModelJetpack(); + public static ModelArmoredJetpack armoredJetpack = new ModelArmoredJetpack(); + public static ModelGasMask gasMask = new ModelGasMask(); + public static ModelScubaTank scubaTank = new ModelScubaTank(); + public static ModelFreeRunners freeRunners = new ModelFreeRunners(); + public static ModelAtomicDisassembler atomicDisassembler = new ModelAtomicDisassembler(); + public static ModelFlamethrower flamethrower = new ModelFlamethrower(); + public static ModelChest personalChest = new ModelChest(); + public static ModelSolarNeutronActivator solarNeutronActivator = new ModelSolarNeutronActivator(); + public static ModelSeismicVibrator seismicVibrator = new ModelSeismicVibrator(); + public static ModelChemicalDissolutionChamber chemicalDissolutionChamber = new ModelChemicalDissolutionChamber(); + public static ModelChemicalCrystallizer chemicalCrystallizer = new ModelChemicalCrystallizer(); + public static ModelSecurityDesk securityDesk = new ModelSecurityDesk(); + public static ModelResistiveHeater resistiveHeater = new ModelResistiveHeater(); + public static ModelQuantumEntangloporter quantumEntangloporter = new ModelQuantumEntangloporter(); + public static ModelEnergyCube energyCube = new ModelEnergyCube(); + public static ModelDigitalMiner digitalMiner = new ModelDigitalMiner(); + + public BakedCustomItemModel(IBakedModel model, ItemStack s) + { + baseModel = model; + stack = s; + } + + private void doRender(TransformType type) + { + BasicBlockType basicType = BasicBlockType.get(stack); + + if(basicType != null) + { + if(basicType == BasicBlockType.BIN) + { + GlStateManager.pushMatrix(); + ItemBlockBasic itemBasic = (ItemBlockBasic)stack.getItem(); + InventoryBin inv = new InventoryBin(stack); + binRenderer.render(EnumFacing.NORTH, inv.getItemType(), inv.getItemCount(), false, -0.5, -0.5, -0.5); + Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture); + GlStateManager.enableRescaleNormal(); + GlStateManager.enableAlpha(); + GlStateManager.alphaFunc(516, 0.1F); + GlStateManager.enableBlend(); + GlStateManager.blendFunc(770, 771); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.popMatrix(); + } + else if(basicType == BasicBlockType.SECURITY_DESK) + { + GlStateManager.rotate(180, 1.0F, 0.0F, 0.0F); + GlStateManager.rotate(180, 0.0F, 1.0F, 0.0F); + GlStateManager.scale(0.8F, 0.8F, 0.8F); + GlStateManager.translate(0.0F, -0.8F, 0.0F); + mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "SecurityDesk.png")); + securityDesk.render(0.0625F, mc.renderEngine); + } + + return; + } + + MachineType machineType = MachineType.get(stack); + + if(machineType != null) + { + if(machineType == MachineType.FLUID_TANK) + { + GlStateManager.pushMatrix(); + ItemBlockMachine itemMachine = (ItemBlockMachine)stack.getItem(); + float targetScale = (float)(itemMachine.getFluidStack(stack) != null ? itemMachine.getFluidStack(stack).amount : 0)/itemMachine.getCapacity(stack); + FluidTankTier tier = FluidTankTier.values()[itemMachine.getBaseTier(stack).ordinal()]; + Fluid fluid = itemMachine.getFluidStack(stack) != null ? itemMachine.getFluidStack(stack).getFluid() : null; + fluidTankRenderer.render(tier, fluid, targetScale, false, null, -0.5, -0.5, -0.5); + GlStateManager.popMatrix(); + } + else if(machineType == MachineType.PERSONAL_CHEST) + { + GlStateManager.pushMatrix(); + + GlStateManager.rotate(180F, 0.0F, 1.0F, 0.0F); + GlStateManager.translate(-0.5F, -0.5F, -0.5F); + GlStateManager.translate(0, 1.0F, 1.0F); + GlStateManager.scale(1.0F, -1F, -1F); + + mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "PersonalChest.png")); + + personalChest.renderAll(); + GlStateManager.popMatrix(); + } + else if(machineType == MachineType.SOLAR_NEUTRON_ACTIVATOR) + { + GlStateManager.rotate(180F, 0.0F, 0.0F, 1.0F); + GlStateManager.scale(0.6F, 0.6F, 0.6F); + GlStateManager.translate(0.0F, -0.55F, 0.0F); + mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "SolarNeutronActivator.png")); + solarNeutronActivator.render(0.0625F); + } + else if(machineType == MachineType.SEISMIC_VIBRATOR) + { + GlStateManager.rotate(180F, 0.0F, 0.0F, 1.0F); + GlStateManager.scale(0.6F, 0.6F, 0.6F); + GlStateManager.translate(0.0F, -0.55F, 0.0F); + mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "SeismicVibrator.png")); + seismicVibrator.render(0.0625F); + } + else if(machineType == MachineType.CHEMICAL_CRYSTALLIZER) + { + GlStateManager.rotate(180F, 0.0F, 0.0F, 1.0F); + GlStateManager.translate(0.05F, -1.001F, 0.05F); + mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "ChemicalCrystallizer.png")); + chemicalCrystallizer.render(0.0625F); + } + else if(machineType == MachineType.CHEMICAL_DISSOLUTION_CHAMBER) + { + GlStateManager.rotate(180F, 0.0F, 0.0F, 1.0F); + GlStateManager.translate(0.05F, -1.001F, 0.05F); + mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "ChemicalDissolutionChamber.png")); + chemicalDissolutionChamber.render(0.0625F); + } + else if(machineType == MachineType.QUANTUM_ENTANGLOPORTER) + { + GlStateManager.rotate(180F, 0.0F, 0.0F, 1.0F); + GlStateManager.translate(0.0F, -1.0F, 0.0F); + mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "QuantumEntangloporter.png")); + quantumEntangloporter.render(0.0625F, mc.renderEngine, true); + } + else if(machineType == MachineType.RESISTIVE_HEATER) + { + GlStateManager.rotate(180F, 0.0F, 0.0F, 1.0F); + GlStateManager.translate(0.05F, -0.96F, 0.05F); + mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "ResistiveHeater.png")); + resistiveHeater.render(0.0625F, false, mc.renderEngine, true); + } + else if(machineType == MachineType.DIGITAL_MINER) + { + GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); + GL11.glTranslatef(0.35F, 0.1F, 0.0F); + mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "DigitalMiner.png")); + digitalMiner.render(0.022F, false, mc.renderEngine, true); + } + + return; + } + + if(stack.getItem() instanceof ItemBlockEnergyCube) + { + GlStateManager.pushMatrix(); + EnergyCubeTier tier = EnergyCubeTier.values()[((ITierItem)stack.getItem()).getBaseTier(stack).ordinal()]; + IEnergizedItem energized = (IEnergizedItem)stack.getItem(); + mc.renderEngine.bindTexture(RenderEnergyCube.baseTexture); + + GlStateManager.rotate(180F, 0.0F, 0.0F, 1.0F); + GlStateManager.rotate(180F, 0.0F, 1.0F, 0.0F); + GlStateManager.translate(0.0F, -1.0F, 0.0F); + + MekanismRenderer.blendOn(); + + energyCube.render(0.0625F, tier, mc.renderEngine, true); + + for(EnumFacing side : EnumFacing.VALUES) + { + mc.renderEngine.bindTexture(RenderEnergyCube.baseTexture); + energyCube.renderSide(0.0625F, side, side == EnumFacing.NORTH ? IOState.OUTPUT : IOState.INPUT, tier, mc.renderEngine); + } + + MekanismRenderer.blendOff(); + GlStateManager.popMatrix(); + } + + if(type == TransformType.GUI) + { + GlStateManager.scale(0.625, 0.625, 0.625); + GlStateManager.rotate(30.0F, 1.0F, 0.0F, 0.0F); + GlStateManager.rotate(-45.0F, 0.0F, 1.0F, 0.0F); + } + + if(stack.getItem() == MekanismItems.Jetpack) + { + GlStateManager.pushMatrix(); + GlStateManager.rotate(180, 0.0F, 0.0F, 1.0F); + GlStateManager.rotate(90, 0.0F, -1.0F, 0.0F); + GlStateManager.translate(0.2F, -0.35F, 0.0F); + mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "Jetpack.png")); + jetpack.render(0.0625F); + GlStateManager.popMatrix(); + } + else if(stack.getItem() == MekanismItems.ArmoredJetpack) + { + GlStateManager.pushMatrix(); + GlStateManager.rotate(180, 0.0F, 0.0F, 1.0F); + GlStateManager.rotate(90, 0.0F, -1.0F, 0.0F); + GlStateManager.translate(0.2F, -0.35F, 0.0F); + mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "Jetpack.png")); + armoredJetpack.render(0.0625F); + GlStateManager.popMatrix(); + } + else if(stack.getItem() instanceof ItemGasMask) + { + GlStateManager.pushMatrix(); + GlStateManager.rotate(180, 0.0F, 0.0F, 1.0F); + GlStateManager.rotate(90, 0.0F, -1.0F, 0.0F); + GlStateManager.translate(0.1F, 0.2F, 0.0F); + mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "ScubaSet.png")); + gasMask.render(0.0625F); + GlStateManager.popMatrix(); + } + else if(stack.getItem() instanceof ItemScubaTank) + { + GlStateManager.pushMatrix(); + GlStateManager.rotate(180, 0.0F, 0.0F, 1.0F); + GlStateManager.rotate(90, 0.0F, -1.0F, 0.0F); + GlStateManager.scale(1.6F, 1.6F, 1.6F); + GlStateManager.translate(0.2F, -0.5F, 0.0F); + mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "ScubaSet.png")); + scubaTank.render(0.0625F); + GlStateManager.popMatrix(); + } + else if(stack.getItem() instanceof ItemFreeRunners) + { + GlStateManager.pushMatrix(); + GlStateManager.rotate(180, 0.0F, 0.0F, 1.0F); + GlStateManager.rotate(90, 0.0F, -1.0F, 0.0F); + GlStateManager.scale(2.0F, 2.0F, 2.0F); + GlStateManager.translate(0.2F, -1.43F, 0.12F); + mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "FreeRunners.png")); + freeRunners.render(0.0625F); + GlStateManager.popMatrix(); + } + else if(stack.getItem() instanceof ItemAtomicDisassembler) + { + GlStateManager.pushMatrix(); + GlStateManager.scale(1.4F, 1.4F, 1.4F); + GlStateManager.rotate(180, 0.0F, 0.0F, 1.0F); + + if(type == TransformType.THIRD_PERSON) + { + GlStateManager.rotate(45, 0.0F, 1.0F, 0.0F); + GlStateManager.rotate(50, 1.0F, 0.0F, 0.0F); + GlStateManager.scale(2.0F, 2.0F, 2.0F); + GlStateManager.translate(0.0F, -0.4F, 0.4F); + } + else if(type == TransformType.GUI) + { + GlStateManager.rotate(225, 0.0F, 1.0F, 0.0F); + GlStateManager.rotate(45, -1.0F, 0.0F, -1.0F); + GlStateManager.scale(0.6F, 0.6F, 0.6F); + GlStateManager.translate(0.0F, -0.2F, 0.0F); + } + else { + GlStateManager.rotate(45, 0.0F, 1.0F, 0.0F); + GlStateManager.translate(0.0F, -0.7F, 0.0F); + } + + mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "AtomicDisassembler.png")); + atomicDisassembler.render(0.0625F); + GlStateManager.popMatrix(); + } + else if(stack.getItem() instanceof ItemFlamethrower) + { + GlStateManager.pushMatrix(); + GlStateManager.rotate(160, 0.0F, 0.0F, 1.0F); + mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "Flamethrower.png")); + + GlStateManager.translate(0.0F, -1.0F, 0.0F); + 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) + { + GlStateManager.rotate(55, 0.0F, 1.0F, 0.0F); + } + else { + GlStateManager.translate(0.0F, 0.7F, 0.0F); + GlStateManager.rotate(75, 0.0F, 1.0F, 0.0F); + } + + GlStateManager.scale(2.5F, 2.5F, 2.5F); + GlStateManager.translate(0.0F, -1.0F, -0.5F); + } + else if(type == TransformType.GUI) + { + GlStateManager.translate(-0.6F, 0.0F, 0.0F); + GlStateManager.rotate(45, 0.0F, 1.0F, 0.0F); + } + + flamethrower.render(0.0625F); + GlStateManager.popMatrix(); + } + } + + @Override + public List getFaceQuads(EnumFacing facing) + { + List faceQuads = new LinkedList(); + + if(Block.getBlockFromItem(stack.getItem()) != null) + { + MachineType machineType = MachineType.get(stack); + + if(machineType != MachineType.QUANTUM_ENTANGLOPORTER && machineType != MachineType.RESISTIVE_HEATER) + { + if(!(stack.getItem() instanceof ItemBlockEnergyCube)) + { + faceQuads.addAll(baseModel.getFaceQuads(facing)); + } + } + } + + return faceQuads; + } + + @Override + public List getGeneralQuads() + { + List generalQuads = new LinkedList(); + + if(Block.getBlockFromItem(stack.getItem()) != null) + { + generalQuads.addAll(baseModel.getGeneralQuads()); + } + + return generalQuads; + } + + @Override + public boolean isAmbientOcclusion() + { + return baseModel.isAmbientOcclusion(); + } + + @Override + public boolean isGui3d() + { + return baseModel.isGui3d(); + } + + @Override + public boolean isBuiltInRenderer() + { + return baseModel.isBuiltInRenderer(); + } + + @Override + public TextureAtlasSprite getParticleTexture() + { + return baseModel.getParticleTexture(); + } + + @Override + public ItemCameraTransforms getItemCameraTransforms() + { + return baseModel.getItemCameraTransforms(); + } + + @Override + public VertexFormat getFormat() + { + return Attributes.DEFAULT_BAKED_FORMAT; + } + + @Override + public Pair handlePerspective(ItemCameraTransforms.TransformType cameraTransformType) + { + if(cameraTransformType == TransformType.THIRD_PERSON) + { + ForgeHooksClient.multiplyCurrentGlMatrix(ModelChiselBlock.DEFAULT_BLOCK_THIRD_PERSON_MATRIX); + } + + GlStateManager.pushMatrix(); + GlStateManager.scale(0.5F, 0.5F, 0.5F); + doRender(cameraTransformType); + GlStateManager.scale(2.0F, 2.0F, 2.0F); + GlStateManager.enableLighting(); + GlStateManager.enableLight(0); + GlStateManager.enableLight(1); + GlStateManager.enableColorMaterial(); + GlStateManager.colorMaterial(1032, 5634); + GlStateManager.popMatrix(); + + return Pair.of(this, null); + } +} diff --git a/src/main/java/mekanism/client/render/item/CustomItemModelFactory.java b/src/main/java/mekanism/client/render/item/CustomItemModelFactory.java new file mode 100644 index 000000000..9536dc0ae --- /dev/null +++ b/src/main/java/mekanism/client/render/item/CustomItemModelFactory.java @@ -0,0 +1,69 @@ +package mekanism.client.render.item; + +import java.util.List; + +import net.minecraft.client.renderer.block.model.BakedQuad; +import net.minecraft.client.renderer.block.model.ItemCameraTransforms; +import net.minecraft.client.renderer.texture.TextureAtlasSprite; +import net.minecraft.client.resources.model.IBakedModel; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumFacing; +import net.minecraftforge.client.model.ISmartItemModel; + +public class CustomItemModelFactory implements ISmartItemModel +{ + private IBakedModel baseModel; + + public CustomItemModelFactory(IBakedModel base) + { + baseModel = base; + } + + @Override + public IBakedModel handleItemState(ItemStack stack) + { + return new BakedCustomItemModel(baseModel, stack); + } + + @Override + public List getFaceQuads(EnumFacing p_177551_1_) + { + throw new UnsupportedOperationException(); + } + + @Override + public List getGeneralQuads() + { + throw new UnsupportedOperationException(); + } + + @Override + public boolean isAmbientOcclusion() + { + throw new UnsupportedOperationException(); + } + + @Override + public boolean isGui3d() + { + throw new UnsupportedOperationException(); + } + + @Override + public boolean isBuiltInRenderer() + { + throw new UnsupportedOperationException(); + } + + @Override + public TextureAtlasSprite getParticleTexture() + { + throw new UnsupportedOperationException(); + } + + @Override + public ItemCameraTransforms getItemCameraTransforms() + { + throw new UnsupportedOperationException(); + } +} diff --git a/src/main/java/mekanism/client/render/item/ItemRenderingHandler.java b/src/main/java/mekanism/client/render/item/ItemRenderingHandler.java deleted file mode 100644 index 9e0687122..000000000 --- a/src/main/java/mekanism/client/render/item/ItemRenderingHandler.java +++ /dev/null @@ -1,489 +0,0 @@ -package mekanism.client.render.item; - -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -@SideOnly(Side.CLIENT) -public class ItemRenderingHandler// implements IItemRenderer -{ - /* - private Minecraft mc = Minecraft.getMinecraft(); - - public ModelRobit robit = new ModelRobit(); - public ModelChest personalChest = new ModelChest(); - public ModelEnergyCube energyCube = new ModelEnergyCube(); - public ModelEnergyCore energyCore = new ModelEnergyCore(); - public ModelGasTank gasTank = new ModelGasTank(); - public ModelObsidianTNT obsidianTNT = new ModelObsidianTNT(); - public ModelJetpack jetpack = new ModelJetpack(); - public ModelArmoredJetpack armoredJetpack = new ModelArmoredJetpack(); - public ModelGasMask gasMask = new ModelGasMask(); - public ModelScubaTank scubaTank = new ModelScubaTank(); - public ModelFreeRunners freeRunners = new ModelFreeRunners(); - public ModelAtomicDisassembler atomicDisassembler = new ModelAtomicDisassembler(); - public ModelFlamethrower flamethrower = new ModelFlamethrower(); - - private final RenderBalloon balloonRenderer = new RenderBalloon(); - private final RenderBin binRenderer = (RenderBin)TileEntityRendererDispatcher.instance.mapSpecialRenderers.get(TileEntityBin.class); - private final RenderFluidTank portableTankRenderer = (RenderFluidTank)TileEntityRendererDispatcher.instance.mapSpecialRenderers.get(TileEntityFluidTank.class); - private final RenderItem renderItem = (RenderItem)RenderManager.instance.getEntityClassRenderObject(EntityItem.class); - - @Override - public boolean handleRenderType(ItemStack item, ItemRenderType type) - { - if(item.getItem() == MekanismItems.WalkieTalkie) - { - return type != ItemRenderType.INVENTORY; - } - - return true; - } - - @Override - public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) - { - return true; - } - - @Override - public void renderItem(ItemRenderType type, ItemStack item, Object... data) - { - RenderBlocks renderBlocks = (RenderBlocks)data[0]; - - if(type == ItemRenderType.EQUIPPED || type == ItemRenderType.EQUIPPED_FIRST_PERSON) - { - GL11.glTranslatef(0.5F, 0.5F, 0.5F); - } - - if(item.getItem() instanceof IEnergyCube) - { - EnergyCubeTier tier = ((IEnergyCube)item.getItem()).getEnergyCubeTier(item); - IEnergizedItem energized = (IEnergizedItem)item.getItem(); - mc.renderEngine.bindTexture(RenderEnergyCube.baseTexture); - - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - GL11.glRotatef(270F, 0.0F, -1.0F, 0.0F); - GL11.glTranslatef(0.0F, -1.0F, 0.0F); - - MekanismRenderer.blendOn(); - - energyCube.render(0.0625F, tier, mc.renderEngine); - - for(ForgeDirection side : ForgeDirection.VALID_DIRECTIONS) - { - mc.renderEngine.bindTexture(RenderEnergyCube.baseTexture); - energyCube.renderSide(0.0625F, side, side == ForgeDirection.NORTH ? IOState.OUTPUT : IOState.INPUT, tier, mc.renderEngine); - } - - MekanismRenderer.blendOff(); - - GL11.glPushMatrix(); - GL11.glTranslated(0.0, 1.0, 0.0); - mc.renderEngine.bindTexture(RenderEnergyCube.coreTexture); - - GL11.glShadeModel(GL11.GL_SMOOTH); - GL11.glEnable(GL11.GL_BLEND); - GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - - MekanismRenderer.glowOn(); - - EnumColor c = tier.getBaseTier().getColor(); - - GL11.glPushMatrix(); - GL11.glScalef(0.4F, 0.4F, 0.4F); - GL11.glColor4f(c.getColor(0), c.getColor(1), c.getColor(2), (float)(energized.getEnergy(item)/energized.getMaxEnergy(item))); - GL11.glTranslatef(0, (float)Math.sin(Math.toRadians((MekanismClient.ticksPassed + MekanismRenderer.getPartialTick()) * 3)) / 7, 0); - GL11.glRotatef((MekanismClient.ticksPassed + MekanismRenderer.getPartialTick()) * 4, 0, 1, 0); - GL11.glRotatef(36F + (MekanismClient.ticksPassed + MekanismRenderer.getPartialTick()) * 4, 0, 1, 1); - energyCore.render(0.0625F); - GL11.glPopMatrix(); - - MekanismRenderer.glowOff(); - - GL11.glShadeModel(GL11.GL_FLAT); - GL11.glDisable(GL11.GL_LINE_SMOOTH); - GL11.glDisable(GL11.GL_POLYGON_SMOOTH); - GL11.glDisable(GL11.GL_BLEND); - - GL11.glPopMatrix(); - } - else if(BasicType.get(item) == BasicType.INDUCTION_CELL || BasicType.get(item) == BasicType.INDUCTION_PROVIDER) - { - MekanismRenderer.renderCustomItem((RenderBlocks)data[0], item); - } - else if(BasicType.get(item) == BasicType.BIN) - { - GL11.glRotatef(270, 0.0F, 1.0F, 0.0F); - MekanismRenderer.renderCustomItem((RenderBlocks)data[0], item); - GL11.glRotatef(-270, 0.0F, 1.0F, 0.0F); - - if(binRenderer == null || binRenderer.func_147498_b()/*getFontRenderer()* / == null) - { - return; - } - - InventoryBin inv = new InventoryBin(item); - ForgeDirection side = ForgeDirection.getOrientation(2); - - String amount = ""; - ItemStack itemStack = inv.getStack(); - - if(itemStack != null) - { - amount = Integer.toString(inv.getItemCount()); - } - - MekanismRenderer.glowOn(); - - if(itemStack != null) - { - GL11.glPushMatrix(); - - if(!(itemStack.getItem() instanceof ItemBlock) || Block.getBlockFromItem(itemStack.getItem()).getRenderType() != 0) - { - GL11.glRotatef(180, 0, 0, 1); - GL11.glTranslatef(-1.02F, -0.2F, 0); - - if(type == ItemRenderType.INVENTORY) - { - GL11.glTranslatef(-0.45F, -0.4F, 0.0F); - } - } - - if(type == ItemRenderType.EQUIPPED || type == ItemRenderType.EQUIPPED_FIRST_PERSON || type == ItemRenderType.ENTITY) - { - GL11.glTranslatef(-0.22F, -0.2F, -0.22F); - } - - GL11.glTranslated(0.73, 0.08, 0.44); - GL11.glRotatef(90, 0, 1, 0); - - float scale = 0.03125F; - float scaler = 0.9F; - - GL11.glScalef(scale*scaler, scale*scaler, 0); - - TextureManager renderEngine = mc.renderEngine; - - GL11.glDisable(GL11.GL_LIGHTING); - - renderItem.renderItemAndEffectIntoGUI(binRenderer.func_147498_b()/*getFontRenderer()* /, renderEngine, itemStack, 0, 0); - - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); - } - - MekanismRenderer.glowOff(); - - if(amount != "") - { - float maxScale = 0.02F; - - GL11.glPushMatrix(); - - GL11.glPolygonOffset(-10, -10); - GL11.glEnable(GL11.GL_POLYGON_OFFSET_FILL); - - float displayWidth = 1 - (2 / 16); - float displayHeight = 1 - (2 / 16); - GL11.glTranslatef(0, -0.31F, 0); - - if(type == ItemRenderType.EQUIPPED || type == ItemRenderType.EQUIPPED_FIRST_PERSON || type == ItemRenderType.ENTITY) - { - GL11.glTranslated(-0.5, -0.4, -0.5); - } - - GL11.glTranslatef(0, 0.9F, 1); - GL11.glRotatef(90, 0, 1, 0); - GL11.glRotatef(90, 1, 0, 0); - - GL11.glTranslatef(displayWidth / 2, 1F, displayHeight / 2); - GL11.glRotatef(-90, 1, 0, 0); - - FontRenderer fontRenderer = binRenderer.func_147498_b();//getFontRenderer(); - - int requiredWidth = Math.max(fontRenderer.getStringWidth(amount), 1); - int lineHeight = fontRenderer.FONT_HEIGHT + 2; - int requiredHeight = lineHeight * 1; - float scaler = 0.4F; - float scaleX = (displayWidth / requiredWidth); - float scale = scaleX * scaler; - - if(maxScale > 0) - { - scale = Math.min(scale, maxScale); - } - - GL11.glScalef(scale, -scale, scale); - GL11.glDepthMask(false); - - int offsetX; - int offsetY; - int realHeight = (int)Math.floor(displayHeight / scale); - int realWidth = (int)Math.floor(displayWidth / scale); - - offsetX = (realWidth - requiredWidth) / 2; - offsetY = (realHeight - requiredHeight) / 2; - - GL11.glDisable(GL11.GL_LIGHTING); - fontRenderer.drawString("\u00a7f" + amount, offsetX - (realWidth / 2), 1 + offsetY - (realHeight / 2), 1); - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glDepthMask(true); - GL11.glDisable(GL11.GL_POLYGON_OFFSET_FILL); - - GL11.glPopMatrix(); - } - } - else if(Block.getBlockFromItem(item.getItem()) == MekanismBlocks.GasTank) - { - GL11.glPushMatrix(); - - BaseTier tier = ((ItemBlockGasTank)item.getItem()).getBaseTier(item); - mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "GasTank" + tier.getName() + ".png")); - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F); - GL11.glTranslatef(0.0F, -1.0F, 0.0F); - gasTank.render(0.0625F); - - GL11.glPopMatrix(); - } - else if(Block.getBlockFromItem(item.getItem()) == MekanismBlocks.ObsidianTNT) - { - GL11.glPushMatrix(); - mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "ObsidianTNT.png")); - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - GL11.glRotatef(180F, 0.0F, -1.0F, 0.0F); - GL11.glTranslatef(0.0F, -1.0F, 0.0F); - obsidianTNT.render(0.0625F); - GL11.glPopMatrix(); - } - else if(item.getItem() instanceof ItemWalkieTalkie) - { - if(((ItemWalkieTalkie)item.getItem()).getOn(item)) - { - MekanismRenderer.glowOn(); - } - - MekanismRenderer.renderItem(item); - - if(((ItemWalkieTalkie)item.getItem()).getOn(item)) - { - MekanismRenderer.glowOff(); - } - } - else if(MachineType.get(item) == MachineType.PERSONAL_CHEST) - { - GL11.glPushMatrix(); - ItemBlockMachine chest = (ItemBlockMachine)item.getItem(); - - GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F); - GL11.glTranslatef(-0.5F, -0.5F, -0.5F); - GL11.glTranslatef(0, 1.0F, 1.0F); - GL11.glScalef(1.0F, -1F, -1F); - - mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "PersonalChest.png")); - - personalChest.renderAll(); - GL11.glPopMatrix(); - } - else if(item.getItem() instanceof ItemRobit) - { - GL11.glPushMatrix(); - GL11.glRotatef(180, 0.0F, 0.0F, 1.0F); - GL11.glRotatef(90, 0.0F, -1.0F, 0.0F); - GL11.glTranslatef(0.0F, -1.5F, 0.0F); - mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "Robit.png")); - robit.render(0.08F); - GL11.glPopMatrix(); - } - else if(item.getItem() == MekanismItems.Jetpack) - { - GL11.glPushMatrix(); - GL11.glRotatef(180, 0.0F, 0.0F, 1.0F); - GL11.glRotatef(90, 0.0F, -1.0F, 0.0F); - GL11.glTranslatef(0.2F, -0.35F, 0.0F); - mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "Jetpack.png")); - jetpack.render(0.0625F); - GL11.glPopMatrix(); - } - else if(item.getItem() == MekanismItems.ArmoredJetpack) - { - GL11.glPushMatrix(); - GL11.glRotatef(180, 0.0F, 0.0F, 1.0F); - GL11.glRotatef(90, 0.0F, -1.0F, 0.0F); - GL11.glTranslatef(0.2F, -0.35F, 0.0F); - mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "Jetpack.png")); - armoredJetpack.render(0.0625F); - GL11.glPopMatrix(); - } - else if(item.getItem() instanceof ItemGasMask) - { - GL11.glPushMatrix(); - GL11.glRotatef(180, 0.0F, 0.0F, 1.0F); - GL11.glRotatef(90, 0.0F, -1.0F, 0.0F); - GL11.glTranslatef(0.1F, 0.2F, 0.0F); - mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "ScubaSet.png")); - gasMask.render(0.0625F); - GL11.glPopMatrix(); - } - else if(item.getItem() instanceof ItemScubaTank) - { - GL11.glPushMatrix(); - GL11.glRotatef(180, 0.0F, 0.0F, 1.0F); - GL11.glRotatef(90, 0.0F, -1.0F, 0.0F); - GL11.glScalef(1.6F, 1.6F, 1.6F); - GL11.glTranslatef(0.2F, -0.5F, 0.0F); - mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "ScubaSet.png")); - scubaTank.render(0.0625F); - GL11.glPopMatrix(); - } - else if(item.getItem() instanceof ItemFreeRunners) - { - GL11.glPushMatrix(); - GL11.glRotatef(180, 0.0F, 0.0F, 1.0F); - GL11.glRotatef(90, 0.0F, -1.0F, 0.0F); - GL11.glScalef(2.0F, 2.0F, 2.0F); - GL11.glTranslatef(0.2F, -1.43F, 0.12F); - mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "FreeRunners.png")); - freeRunners.render(0.0625F); - GL11.glPopMatrix(); - } - else if(item.getItem() instanceof ItemBalloon) - { - GL11.glPushMatrix(); - - if(type == ItemRenderType.EQUIPPED || type == ItemRenderType.EQUIPPED_FIRST_PERSON) - { - GL11.glScalef(2.5F, 2.5F, 2.5F); - GL11.glTranslatef(0.2F, 0, 0.1F); - GL11.glRotatef(15, -1, 0, 1); - balloonRenderer.render(((ItemBalloon)item.getItem()).getColor(item), 0, 1.9F, 0); - } - else { - balloonRenderer.render(((ItemBalloon)item.getItem()).getColor(item), 0, 1, 0); - } - - GL11.glPopMatrix(); - } - else if(item.getItem() instanceof ItemAtomicDisassembler) - { - GL11.glPushMatrix(); - GL11.glScalef(1.4F, 1.4F, 1.4F); - GL11.glRotatef(180, 0.0F, 0.0F, 1.0F); - - if(type == ItemRenderType.EQUIPPED) - { - GL11.glRotatef(-45, 0.0F, 1.0F, 0.0F); - GL11.glRotatef(50, 1.0F, 0.0F, 0.0F); - GL11.glScalef(2.0F, 2.0F, 2.0F); - GL11.glTranslatef(0.0F, -0.4F, 0.4F); - } - else if(type == ItemRenderType.INVENTORY) - { - GL11.glRotatef(225, 0.0F, 1.0F, 0.0F); - GL11.glRotatef(45, -1.0F, 0.0F, -1.0F); - GL11.glScalef(0.6F, 0.6F, 0.6F); - GL11.glTranslatef(0.0F, -0.2F, 0.0F); - } - else { - GL11.glRotatef(45, 0.0F, 1.0F, 0.0F); - GL11.glTranslatef(0.0F, -0.7F, 0.0F); - } - - mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "AtomicDisassembler.png")); - atomicDisassembler.render(0.0625F); - GL11.glPopMatrix(); - } - else if(item.getItem() instanceof ItemPartTransmitter) - { - GL11.glPushMatrix(); - GL11.glTranslated(-0.5, -0.5, -0.5); - MekanismRenderer.blendOn(); - GL11.glDisable(GL11.GL_CULL_FACE); - RenderPartTransmitter.getInstance().renderItem(TransmitterType.values()[item.getItemDamage()]); - GL11.glEnable(GL11.GL_CULL_FACE); - MekanismRenderer.blendOff(); - GL11.glPopMatrix(); - } - else if(item.getItem() instanceof ItemGlowPanel) - { - GL11.glPushMatrix(); - GL11.glPushAttrib(GL11.GL_LIGHTING_BIT); - GL11.glTranslated(-0.5, -0.5, -0.5); - double d = 0.15; - GL11.glTranslated(d, d, d); - GL11.glScaled(2, 2, 2); - GL11.glTranslated(0.4-2*d, -2*d, -2*d); - GL11.glDisable(GL11.GL_CULL_FACE); - RenderHelper.disableStandardItemLighting(); - RenderGlowPanel.getInstance().renderItem(item.getItemDamage()); - GL11.glEnable(GL11.GL_CULL_FACE); - GL11.glPopAttrib(); - GL11.glPopMatrix(); - } - else if(item.getItem() instanceof ItemFlamethrower) - { - GL11.glPushMatrix(); - GL11.glRotatef(160, 0.0F, 0.0F, 1.0F); - mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "Flamethrower.png")); - - GL11.glTranslatef(0.0F, -1.0F, 0.0F); - GL11.glRotatef(135, 0.0F, 1.0F, 0.0F); - GL11.glRotatef(-20, 0.0F, 0.0F, 1.0F); - - if(type == ItemRenderType.EQUIPPED || type == ItemRenderType.EQUIPPED_FIRST_PERSON) - { - if(type == ItemRenderType.EQUIPPED_FIRST_PERSON) - { - GL11.glRotatef(55, 0.0F, 1.0F, 0.0F); - } - else { - GL11.glTranslatef(0.0F, 0.5F, 0.0F); - } - - GL11.glScalef(2.5F, 2.5F, 2.5F); - GL11.glTranslatef(0.0F, -1.0F, -0.5F); - } - else if(type == ItemRenderType.INVENTORY) - { - GL11.glTranslatef(-0.6F, 0.0F, 0.0F); - GL11.glRotatef(45, 0.0F, 1.0F, 0.0F); - } - - flamethrower.render(0.0625F); - GL11.glPopMatrix(); - } - else if(MachineType.get(item) == MachineType.FLUID_TANK) - { - GL11.glPushMatrix(); - GL11.glRotatef(270F, 0.0F, -1.0F, 0.0F); - mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "FluidTank.png")); - ItemBlockMachine itemMachine = (ItemBlockMachine)item.getItem(); - float targetScale = (float)(itemMachine.getFluidStack(item) != null ? itemMachine.getFluidStack(item).amount : 0)/itemMachine.getCapacity(item); - FluidTankTier tier = FluidTankTier.values()[itemMachine.getBaseTier(item).ordinal()]; - Fluid fluid = itemMachine.getFluidStack(item) != null ? itemMachine.getFluidStack(item).getFluid() : null; - portableTankRenderer.render(tier, fluid, targetScale, false, null, -0.5, -0.5, -0.5); - GL11.glPopMatrix(); - } - else { - if(item.getItem() instanceof ItemBlockMachine) - { - MachineType machine = MachineType.get(item); - - if(machine == MachineType.BASIC_FACTORY || machine == MachineType.ADVANCED_FACTORY || machine == MachineType.ELITE_FACTORY) - { - GL11.glRotatef(-90F, 0.0F, 1.0F, 0.0F); - MekanismRenderer.renderCustomItem(((RenderBlocks)data[0]), item); - } - else { - RenderingRegistry.instance().renderInventoryBlock((RenderBlocks)data[0], Block.getBlockFromItem(item.getItem()), item.getItemDamage(), ClientProxy.MACHINE_RENDER_ID); - } - } - else if(item.getItem() instanceof ItemBlockBasic) - { - RenderingRegistry.instance().renderInventoryBlock((RenderBlocks)data[0], Block.getBlockFromItem(item.getItem()), item.getItemDamage(), ClientProxy.BASIC_RENDER_ID); - } - } - } - */ -} diff --git a/src/main/java/mekanism/client/render/particle/EntityJetpackFlameFX.java b/src/main/java/mekanism/client/render/particle/EntityJetpackFlameFX.java index 6690b9da2..5b8540313 100644 --- a/src/main/java/mekanism/client/render/particle/EntityJetpackFlameFX.java +++ b/src/main/java/mekanism/client/render/particle/EntityJetpackFlameFX.java @@ -2,7 +2,6 @@ package mekanism.client.render.particle; import net.minecraft.client.Minecraft; import net.minecraft.client.particle.EntityFlameFX; -import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.WorldRenderer; import net.minecraft.entity.Entity; import net.minecraft.world.World; diff --git a/src/main/java/mekanism/client/render/particle/EntityJetpackSmokeFX.java b/src/main/java/mekanism/client/render/particle/EntityJetpackSmokeFX.java index dfb8e63f3..8d219b70e 100644 --- a/src/main/java/mekanism/client/render/particle/EntityJetpackSmokeFX.java +++ b/src/main/java/mekanism/client/render/particle/EntityJetpackSmokeFX.java @@ -2,7 +2,6 @@ package mekanism.client.render.particle; import net.minecraft.client.Minecraft; import net.minecraft.client.particle.EntitySmokeFX; -import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.WorldRenderer; import net.minecraft.entity.Entity; import net.minecraft.world.World; diff --git a/src/main/java/mekanism/client/render/particle/EntityScubaBubbleFX.java b/src/main/java/mekanism/client/render/particle/EntityScubaBubbleFX.java index c7935560e..caa6d488c 100644 --- a/src/main/java/mekanism/client/render/particle/EntityScubaBubbleFX.java +++ b/src/main/java/mekanism/client/render/particle/EntityScubaBubbleFX.java @@ -2,7 +2,6 @@ package mekanism.client.render.particle; import net.minecraft.client.Minecraft; import net.minecraft.client.particle.EntityBubbleFX; -import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.WorldRenderer; import net.minecraft.entity.Entity; import net.minecraft.world.World; diff --git a/src/main/java/mekanism/client/render/tileentity/RenderBin.java b/src/main/java/mekanism/client/render/tileentity/RenderBin.java index 7b4762898..fa7ead15f 100644 --- a/src/main/java/mekanism/client/render/tileentity/RenderBin.java +++ b/src/main/java/mekanism/client/render/tileentity/RenderBin.java @@ -1,23 +1,19 @@ package mekanism.client.render.tileentity; import mekanism.api.Coord4D; -import mekanism.client.render.MekanismRenderer; import mekanism.common.tile.TileEntityBin; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; -import net.minecraft.client.renderer.OpenGlHelper; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumFacing; -import net.minecraft.world.EnumSkyBlock; -import net.minecraft.world.World; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class RenderBin extends TileEntitySpecialRenderer { @@ -26,122 +22,103 @@ public class RenderBin extends TileEntitySpecialRenderer @Override public void renderTileEntityAt(TileEntityBin tileEntity, double x, double y, double z, float partialTick, int destroyStage) { - String amount = ""; - ItemStack itemStack = tileEntity.itemType; - - if(itemStack != null) - { - amount = Integer.toString(tileEntity.clientAmount); - } - Coord4D obj = Coord4D.get(tileEntity).offset(tileEntity.facing); - if(tileEntity.getWorld().getBlockState(obj).getBlock().isSideSolid(tileEntity.getWorld(), obj, tileEntity.facing.getOpposite())) + if(obj.getBlockState(tileEntity.getWorld()).getBlock().isSideSolid(tileEntity.getWorld(), obj.getPos(), tileEntity.facing.getOpposite())) { return; } + + render(tileEntity.facing, tileEntity.itemType, tileEntity.clientAmount, true, x, y, z); + } + + public void render(EnumFacing facing, ItemStack itemType, int clientAmount, boolean text, double x, double y, double z) + { + String amount = ""; - doLight(tileEntity.getWorld(), obj); - OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240, 240); - - if(itemStack != null) + if(itemType != null) { - GL11.glPushMatrix(); + amount = Integer.toString(clientAmount); + } - switch(tileEntity.facing) + if(itemType != null) + { + GlStateManager.pushMatrix(); + + switch(facing) { case NORTH: - GL11.glTranslated(x + 0.73, y + 0.83, z - 0.01); + GL11.glTranslated(x + 0.73, y + 0.83, z - 0.0001); break; case SOUTH: - GL11.glTranslated(x + 0.27, y + 0.83, z + 1.01); - GL11.glRotatef(180, 0, 1, 0); + GL11.glTranslated(x + 0.27, y + 0.83, z + 1.0001); + GlStateManager.rotate(180, 0, 1, 0); break; case WEST: - GL11.glTranslated(x - 0.01, y + 0.83, z + 0.27); - GL11.glRotatef(90, 0, 1, 0); + GL11.glTranslated(x - 0.0001, y + 0.83, z + 0.27); + GlStateManager.rotate(90, 0, 1, 0); break; case EAST: - GL11.glTranslated(x + 1.01, y + 0.83, z + 0.73); - GL11.glRotatef(-90, 0, 1, 0); + GL11.glTranslated(x + 1.0001, y + 0.83, z + 0.73); + GlStateManager.rotate(-90, 0, 1, 0); break; } float scale = 0.03125F; float scaler = 0.9F; - GL11.glScalef(scale*scaler, scale*scaler, 0); - GL11.glRotatef(180, 0, 0, 1); + GlStateManager.scale(scale*scaler, scale*scaler, -0.0001F); + GlStateManager.rotate(180, 0, 0, 1); - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glEnable(GL11.GL_DEPTH_TEST); - - renderItem.renderItemAndEffectIntoGUI(itemStack, 0, 0); - - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); + renderItem.renderItemAndEffectIntoGUI(itemType, 0, 0); + + GlStateManager.popMatrix(); } - if(!amount.equals("")) + if(text && !amount.equals("")) { - renderText(amount, tileEntity.facing, 0.02F, x, y - 0.31F, z); + renderText(amount, facing, 0.02F, x, y - 0.3725F, z); } - - } - - private void doLight(World world, Coord4D obj) - { - if(world.getBlockState(obj).getBlock().isOpaqueCube()) - { - return; - } - - int brightness = world.getLightFromNeighborsFor(EnumSkyBlock.SKY, obj); - int lightX = brightness % 65536; - int lightY = brightness / 65536; - float scale = 0.6F; - - OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lightX * scale, lightY * scale); } @SuppressWarnings("incomplete-switch") private void renderText(String text, EnumFacing side, float maxScale, double x, double y, double z) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); - GL11.glPolygonOffset(-10, -10); - GL11.glEnable(GL11.GL_POLYGON_OFFSET_FILL); + GlStateManager.doPolygonOffset(-10, -10); + GlStateManager.enablePolygonOffset(); float displayWidth = 1 - (2 / 16); float displayHeight = 1 - (2 / 16); - GL11.glTranslated(x, y, z); + GlStateManager.translate(x, y, z); switch(side) { case SOUTH: - GL11.glTranslatef(0, 1, 0); - GL11.glRotatef(0, 0, 1, 0); - GL11.glRotatef(90, 1, 0, 0); + GlStateManager.translate(0, 1, 0); + GlStateManager.rotate(0, 0, 1, 0); + GlStateManager.rotate(90, 1, 0, 0); break; case NORTH: - GL11.glTranslatef(1, 1, 1); - GL11.glRotatef(180, 0, 1, 0); - GL11.glRotatef(90, 1, 0, 0); + GlStateManager.translate(1, 1, 1); + GlStateManager.rotate(180, 0, 1, 0); + GlStateManager.rotate(90, 1, 0, 0); break; case EAST: - GL11.glTranslatef(0, 1, 1); - GL11.glRotatef(90, 0, 1, 0); - GL11.glRotatef(90, 1, 0, 0); + GlStateManager.translate(0, 1, 1); + GlStateManager.rotate(90, 0, 1, 0); + GlStateManager.rotate(90, 1, 0, 0); break; case WEST: - GL11.glTranslatef(1, 1, 0); - GL11.glRotatef(-90, 0, 1, 0); - GL11.glRotatef(90, 1, 0, 0); + GlStateManager.translate(1, 1, 0); + GlStateManager.rotate(-90, 0, 1, 0); + GlStateManager.rotate(90, 1, 0, 0); break; } - GL11.glTranslatef(displayWidth / 2, 1F, displayHeight / 2); - GL11.glRotatef(-90, 1, 0, 0); + GlStateManager.translate(displayWidth / 2, 1F, displayHeight / 2); + GlStateManager.rotate(-90, 1, 0, 0); FontRenderer fontRenderer = getFontRenderer(); @@ -157,8 +134,8 @@ public class RenderBin extends TileEntitySpecialRenderer scale = Math.min(scale, maxScale); } - GL11.glScalef(scale, -scale, scale); - GL11.glDepthMask(false); + GlStateManager.scale(scale, -scale, scale); + GlStateManager.depthMask(false); int realHeight = (int)Math.floor(displayHeight / scale); int realWidth = (int)Math.floor(displayWidth / scale); @@ -166,12 +143,12 @@ public class RenderBin extends TileEntitySpecialRenderer int offsetX = (realWidth - requiredWidth) / 2; int offsetY = (realHeight - requiredHeight) / 2; - GL11.glDisable(GL11.GL_LIGHTING); + GlStateManager.disableLighting(); fontRenderer.drawString("\u00a7f" + text, offsetX - (realWidth / 2), 1 + offsetY - (realHeight / 2), 1); - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glDepthMask(true); - GL11.glDisable(GL11.GL_POLYGON_OFFSET_FILL); + GlStateManager.enableLighting(); + GlStateManager.depthMask(true); + GlStateManager.disablePolygonOffset(); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } } diff --git a/src/main/java/mekanism/client/render/tileentity/RenderChargepad.java b/src/main/java/mekanism/client/render/tileentity/RenderChargepad.java index f6fdca09c..331c73ef4 100644 --- a/src/main/java/mekanism/client/render/tileentity/RenderChargepad.java +++ b/src/main/java/mekanism/client/render/tileentity/RenderChargepad.java @@ -4,14 +4,13 @@ import mekanism.client.model.ModelChargepad; import mekanism.common.tile.TileEntityChargepad; import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class RenderChargepad extends TileEntitySpecialRenderer { @@ -20,20 +19,20 @@ public class RenderChargepad extends TileEntitySpecialRenderer { @@ -20,20 +19,20 @@ public class RenderChemicalDissolutionChamber extends TileEntitySpecialRenderer< @Override public void renderTileEntityAt(TileEntityChemicalDissolutionChamber tileEntity, double x, double y, double z, float partialTick, int destroyStage) { - GL11.glPushMatrix(); - GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 1.5F); + GlStateManager.pushMatrix(); + GlStateManager.translate((float)x + 0.5F, (float)y + 1.5F, (float)z + 0.5F); bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "ChemicalDissolutionChamber.png")); switch(tileEntity.facing.ordinal()) /*TODO: switch the enum*/ { - case 2: GL11.glRotatef(0, 0.0F, 1.0F, 0.0F); break; - case 3: GL11.glRotatef(180, 0.0F, 1.0F, 0.0F); break; - case 4: GL11.glRotatef(90, 0.0F, 1.0F, 0.0F); break; - case 5: GL11.glRotatef(270, 0.0F, 1.0F, 0.0F); break; + case 2: GlStateManager.rotate(0, 0.0F, 1.0F, 0.0F); break; + case 3: GlStateManager.rotate(180, 0.0F, 1.0F, 0.0F); break; + case 4: GlStateManager.rotate(90, 0.0F, 1.0F, 0.0F); break; + case 5: GlStateManager.rotate(270, 0.0F, 1.0F, 0.0F); break; } - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); + GlStateManager.rotate(180F, 0.0F, 0.0F, 1.0F); model.render(0.0625F); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } } diff --git a/src/main/java/mekanism/client/render/tileentity/RenderChemicalInfuser.java b/src/main/java/mekanism/client/render/tileentity/RenderChemicalInfuser.java deleted file mode 100644 index 527370f33..000000000 --- a/src/main/java/mekanism/client/render/tileentity/RenderChemicalInfuser.java +++ /dev/null @@ -1,39 +0,0 @@ -package mekanism.client.render.tileentity; - -import mekanism.client.model.ModelChemicalInfuser; -import mekanism.common.tile.TileEntityChemicalInfuser; -import mekanism.common.util.MekanismUtils; -import mekanism.common.util.MekanismUtils.ResourceType; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.init.Blocks; -import net.minecraft.util.EnumFacing; - -import org.lwjgl.opengl.GL11; - -public class RenderChemicalInfuser extends TileEntitySpecialRenderer -{ - private ModelChemicalInfuser model = new ModelChemicalInfuser(); - - @Override - public void renderTileEntityAt(TileEntityChemicalInfuser tileEntity, double x, double y, double z, float partialTick, int destroyStage) - { - GL11.glPushMatrix(); - GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 1.5F); - - bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "ChemicalInfuser.png")); - - switch(tileEntity.facing.ordinal()) /*TODO: switch the enum*/ - { - case 2: GL11.glRotatef(0, 0.0F, 1.0F, 0.0F); break; - case 3: GL11.glRotatef(180, 0.0F, 1.0F, 0.0F); break; - case 4: GL11.glRotatef(90, 0.0F, 1.0F, 0.0F); break; - case 5: GL11.glRotatef(270, 0.0F, 1.0F, 0.0F); break; - } - - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - model.render(0.0625F); - - GL11.glPopMatrix(); - } -} diff --git a/src/main/java/mekanism/client/render/tileentity/RenderChemicalOxidizer.java b/src/main/java/mekanism/client/render/tileentity/RenderChemicalOxidizer.java deleted file mode 100644 index 5f8445487..000000000 --- a/src/main/java/mekanism/client/render/tileentity/RenderChemicalOxidizer.java +++ /dev/null @@ -1,47 +0,0 @@ -package mekanism.client.render.tileentity; - -import java.util.HashMap; -import java.util.Map; - -import mekanism.api.gas.Gas; -import mekanism.client.model.ModelChemicalOxidizer; -import mekanism.client.render.MekanismRenderer.DisplayInteger; -import mekanism.common.tile.TileEntityChemicalOxidizer; -import mekanism.common.util.MekanismUtils; -import mekanism.common.util.MekanismUtils.ResourceType; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.util.EnumFacing; - -import org.lwjgl.opengl.GL11; - -public class RenderChemicalOxidizer extends TileEntitySpecialRenderer -{ - private ModelChemicalOxidizer model = new ModelChemicalOxidizer(); - - private static final double offset = 0.001; - - private Map> cachedGasses = new HashMap>(); - - @Override - public void renderTileEntityAt(TileEntityChemicalOxidizer tileEntity, double x, double y, double z, float partialTick, int destroyStage) - { - GL11.glPushMatrix(); - GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 1.5F); - - bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "ChemicalOxidizer.png")); - - switch(tileEntity.facing.ordinal()) /*TODO: switch the enum*/ - { - case 2: GL11.glRotatef(0, 0.0F, 1.0F, 0.0F); break; - case 3: GL11.glRotatef(180, 0.0F, 1.0F, 0.0F); break; - case 4: GL11.glRotatef(90, 0.0F, 1.0F, 0.0F); break; - case 5: GL11.glRotatef(270, 0.0F, 1.0F, 0.0F); break; - } - - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - - model.render(0.0625F); - - GL11.glPopMatrix(); - } -} diff --git a/src/main/java/mekanism/client/render/tileentity/RenderChemicalWasher.java b/src/main/java/mekanism/client/render/tileentity/RenderChemicalWasher.java deleted file mode 100644 index a1c5cb10b..000000000 --- a/src/main/java/mekanism/client/render/tileentity/RenderChemicalWasher.java +++ /dev/null @@ -1,35 +0,0 @@ -package mekanism.client.render.tileentity; - -import mekanism.client.model.ModelChemicalWasher; -import mekanism.common.tile.TileEntityChemicalWasher; -import mekanism.common.util.MekanismUtils; -import mekanism.common.util.MekanismUtils.ResourceType; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; - -import org.lwjgl.opengl.GL11; - -public class RenderChemicalWasher extends TileEntitySpecialRenderer -{ - private ModelChemicalWasher model = new ModelChemicalWasher(); - - @Override - public void renderTileEntityAt(TileEntityChemicalWasher tileEntity, double x, double y, double z, float partialTick, int destroyStage) - { - GL11.glPushMatrix(); - GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 1.5F); - bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "ChemicalWasher.png")); - - switch(tileEntity.facing.ordinal()) /*TODO: switch the enum*/ - { - case 2: GL11.glRotatef(0, 0.0F, 1.0F, 0.0F); break; - case 3: GL11.glRotatef(180, 0.0F, 1.0F, 0.0F); break; - case 4: GL11.glRotatef(90, 0.0F, 1.0F, 0.0F); break; - case 5: GL11.glRotatef(270, 0.0F, 1.0F, 0.0F); break; - } - - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - model.render(0.0625F); - GL11.glPopMatrix(); - } -} diff --git a/src/main/java/mekanism/client/render/tileentity/RenderConfigurableMachine.java b/src/main/java/mekanism/client/render/tileentity/RenderConfigurableMachine.java index 9f84442d1..8430d88a9 100644 --- a/src/main/java/mekanism/client/render/tileentity/RenderConfigurableMachine.java +++ b/src/main/java/mekanism/client/render/tileentity/RenderConfigurableMachine.java @@ -2,8 +2,6 @@ package mekanism.client.render.tileentity; import java.util.HashMap; -import mekanism.api.Coord4D; -import mekanism.api.EnumColor; import mekanism.api.transmitters.TransmissionType; import mekanism.client.render.MekanismRenderer; import mekanism.client.render.MekanismRenderer.DisplayInteger; @@ -13,6 +11,7 @@ import mekanism.common.base.ISideConfiguration; import mekanism.common.item.ItemConfigurator; import mekanism.common.tile.component.TileComponentConfig; import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.entity.player.EntityPlayer; @@ -22,13 +21,12 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraft.util.MovingObjectPosition; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.client.FMLClientHandler; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class RenderConfigurableMachine extends TileEntitySpecialRenderer { @@ -44,7 +42,7 @@ public class RenderConfigurableMachine { + private ModelDigitalMiner model = new ModelDigitalMiner(); + @Override public void renderTileEntityAt(TileEntityDigitalMiner tileEntity, double x, double y, double z, float partialTick, int destroyStage) { + GlStateManager.pushMatrix(); + GlStateManager.translate((float)x + 0.5F, (float)y + 1.5F, (float)z + 0.5F); + + bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "DigitalMiner" + (tileEntity.isActive ? "On" : "") + ".png")); + + switch(tileEntity.facing.ordinal()) + { + case 2: + GL11.glRotatef(0, 0.0F, 1.0F, 0.0F); + GL11.glTranslatef(0.0F, 0.0F, -1.0F); + break; + case 3: + GL11.glRotatef(180, 0.0F, 1.0F, 0.0F); + GL11.glTranslatef(0.0F, 0.0F, -1.0F); + break; + case 4: + GL11.glRotatef(90, 0.0F, 1.0F, 0.0F); + GL11.glTranslatef(0.0F, 0.0F, -1.0F); + break; + case 5: + GL11.glRotatef(270, 0.0F, 1.0F, 0.0F); + GL11.glTranslatef(0.0F, 0.0F, -1.0F); + break; + } + + GlStateManager.rotate(180F, 0.0F, 0.0F, 1.0F); + model.render(0.0625F, tileEntity.isActive, rendererDispatcher.renderEngine, false); + GlStateManager.popMatrix(); + if(tileEntity.clientRendering) { MinerVisualRenderer.render(tileEntity); diff --git a/src/main/java/mekanism/client/render/tileentity/RenderDynamicTank.java b/src/main/java/mekanism/client/render/tileentity/RenderDynamicTank.java index 5bd58efb8..af035aa02 100644 --- a/src/main/java/mekanism/client/render/tileentity/RenderDynamicTank.java +++ b/src/main/java/mekanism/client/render/tileentity/RenderDynamicTank.java @@ -6,22 +6,23 @@ import java.util.Map; import mekanism.api.Coord4D; import mekanism.client.render.MekanismRenderer; import mekanism.client.render.MekanismRenderer.DisplayInteger; +import mekanism.client.render.MekanismRenderer.FluidType; import mekanism.client.render.MekanismRenderer.Model3D; import mekanism.common.content.tank.SynchronizedTankData.ValveData; import mekanism.common.content.tank.TankUpdateProtocol; import mekanism.common.tile.TileEntityDynamicTank; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.init.Blocks; import net.minecraft.util.EnumFacing; import net.minecraft.world.World; import net.minecraftforge.fluids.Fluid; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class RenderDynamicTank extends TileEntitySpecialRenderer { @@ -46,7 +47,7 @@ public class RenderDynamicTank extends TileEntitySpecialRenderer { @@ -20,21 +19,21 @@ public class RenderElectricPump extends TileEntitySpecialRenderer -{ - private ModelElectrolyticSeparator model = new ModelElectrolyticSeparator(); - - @Override - public void renderTileEntityAt(TileEntityElectrolyticSeparator tileEntity, double x, double y, double z, float partialTick, int destroyStage) - { - GL11.glPushMatrix(); - GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 2.5F); - bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "ElectrolyticSeparator.png")); - - switch(tileEntity.facing.ordinal()) /*TODO: switch the enum*/ - { - case 2: GL11.glRotatef(0, 0.0F, 1.0F, 0.0F); break; - case 3: GL11.glRotatef(180, 0.0F, 1.0F, 0.0F); break; - case 4: GL11.glRotatef(90, 0.0F, 1.0F, 0.0F); break; - case 5: GL11.glRotatef(270, 0.0F, 1.0F, 0.0F); break; - } - - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F); - model.render(0.0625F); - GL11.glPopMatrix(); - } -} diff --git a/src/main/java/mekanism/client/render/tileentity/RenderEnergyCube.java b/src/main/java/mekanism/client/render/tileentity/RenderEnergyCube.java index 8fa4ccbf8..be78e70d9 100644 --- a/src/main/java/mekanism/client/render/tileentity/RenderEnergyCube.java +++ b/src/main/java/mekanism/client/render/tileentity/RenderEnergyCube.java @@ -12,6 +12,7 @@ import mekanism.common.Tier.EnergyCubeTier; import mekanism.common.tile.TileEntityEnergyCube; import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.util.EnumFacing; import net.minecraft.util.ResourceLocation; @@ -46,35 +47,33 @@ public class RenderEnergyCube extends TileEntitySpecialRenderer 0.1) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5); bindTexture(coreTexture); @@ -96,19 +95,20 @@ public class RenderEnergyCube extends TileEntitySpecialRenderer { @@ -27,8 +25,6 @@ public class RenderFluidTank extends TileEntitySpecialRenderer cachedValveFluids = new HashMap(); private static int stages = 1400; - - private ModelFluidTank model = new ModelFluidTank(); @Override public void renderTileEntityAt(TileEntityFluidTank tileEntity, double x, double y, double z, float partialTick, int destroyStage) @@ -60,8 +56,8 @@ public class RenderFluidTank extends TileEntitySpecialRenderer { @@ -20,21 +19,21 @@ public class RenderFluidicPlenisher extends TileEntitySpecialRenderer { - private ModelGasTank model = new ModelGasTank(); - @Override public void renderTileEntityAt(TileEntityGasTank tileEntity, double x, double y, double z, float partialTick, int destroyStage) { - GL11.glPushMatrix(); - GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 1.5F); - bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "GasTank" + tileEntity.tier.getBaseTier().getSimpleName() + ".png")); - - switch(tileEntity.facing.ordinal()) /*TODO: switch the enum*/ - { - case 2: GL11.glRotatef(0, 0.0F, 1.0F, 0.0F); break; - case 3: GL11.glRotatef(180, 0.0F, 1.0F, 0.0F); break; - case 4: GL11.glRotatef(90, 0.0F, 1.0F, 0.0F); break; - case 5: GL11.glRotatef(270, 0.0F, 1.0F, 0.0F); break; - } - - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - model.render(0.0625F); - GL11.glPopMatrix(); - - //TODO MekanismRenderer.machineRenderer.renderAModelAt(tileEntity, x, y, z, partialTick); + MekanismRenderer.machineRenderer.renderTileEntityAt(tileEntity, x, y, z, partialTick, destroyStage); } } diff --git a/src/main/java/mekanism/client/render/tileentity/RenderLaserAmplifier.java b/src/main/java/mekanism/client/render/tileentity/RenderLaserAmplifier.java deleted file mode 100644 index 2b43080fc..000000000 --- a/src/main/java/mekanism/client/render/tileentity/RenderLaserAmplifier.java +++ /dev/null @@ -1,63 +0,0 @@ -package mekanism.client.render.tileentity; - -import mekanism.client.model.ModelLaserAmplifier; -import mekanism.client.render.MekanismRenderer; -import mekanism.common.tile.TileEntityLaserAmplifier; -import mekanism.common.util.MekanismUtils; -import mekanism.common.util.MekanismUtils.ResourceType; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; - -import org.lwjgl.opengl.GL11; - -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -@SideOnly(Side.CLIENT) -public class RenderLaserAmplifier extends TileEntitySpecialRenderer -{ - private ModelLaserAmplifier model = new ModelLaserAmplifier(); - - @Override - public void renderTileEntityAt(TileEntityLaserAmplifier tileEntity, double x, double y, double z, float partialTick, int destroyStage) - { - GL11.glPushMatrix(); - GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 1.5F); - - bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "LaserAmplifier.png")); - - switch(tileEntity.facing.ordinal()) /*TODO: switch the enum*/ - { - case 0: - GL11.glTranslatef(0.0F, -2.0F, 0.0F); - GL11.glRotatef(180F, 1.0F, 0.0F, 0.0F); - break; - case 5: - GL11.glTranslatef(0.0F, -1.0F, 0.0F); - GL11.glTranslatef(1.0F, 0.0F, 0.0F); - GL11.glRotatef(90, 0.0F, 0.0F, -1.0F); - break; - case 4: - GL11.glTranslatef(0.0F, -1.0F, 0.0F); - GL11.glTranslatef(-1.0F, 0.0F, 0.0F); - GL11.glRotatef(90, 0.0F, 0.0F, 1.0F); - break; - case 2: - GL11.glTranslatef(0.0F, -1.0F, 0.0F); - GL11.glTranslatef(0.0F, 0.0F, -1.0F); - GL11.glRotatef(90, -1.0F, 0.0F, 0.0F); - break; - case 3: - GL11.glTranslatef(0.0F, -1.0F, 0.0F); - GL11.glTranslatef(0.0F, 0.0F, 1.0F); - GL11.glRotatef(90, 1.0F, 0.0F, 0.0F); - break; - } - - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - MekanismRenderer.blendOn(); - model.render(0.0625F); - MekanismRenderer.blendOff(); - GL11.glPopMatrix(); - } -} diff --git a/src/main/java/mekanism/client/render/tileentity/RenderLaserTractorBeam.java b/src/main/java/mekanism/client/render/tileentity/RenderLaserTractorBeam.java deleted file mode 100644 index 12625eba3..000000000 --- a/src/main/java/mekanism/client/render/tileentity/RenderLaserTractorBeam.java +++ /dev/null @@ -1,59 +0,0 @@ -package mekanism.client.render.tileentity; - -import mekanism.client.model.ModelLaserAmplifier; -import mekanism.client.render.MekanismRenderer; -import mekanism.common.tile.TileEntityLaserTractorBeam; -import mekanism.common.util.MekanismUtils; -import mekanism.common.util.MekanismUtils.ResourceType; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; - -import org.lwjgl.opengl.GL11; - -public class RenderLaserTractorBeam extends TileEntitySpecialRenderer -{ - private ModelLaserAmplifier model = new ModelLaserAmplifier(); - - @Override - public void renderTileEntityAt(TileEntityLaserTractorBeam tileEntity, double x, double y, double z, float partialTick, int destroyStage) - { - GL11.glPushMatrix(); - GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 1.5F); - - bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "LaserTractorBeam.png")); - - switch(tileEntity.facing.ordinal()) /*TODO: switch the enum*/ - { - case 0: - GL11.glTranslatef(0.0F, -2.0F, 0.0F); - GL11.glRotatef(180F, 1.0F, 0.0F, 0.0F); - break; - case 5: - GL11.glTranslatef(0.0F, -1.0F, 0.0F); - GL11.glTranslatef(1.0F, 0.0F, 0.0F); - GL11.glRotatef(90, 0.0F, 0.0F, -1.0F); - break; - case 4: - GL11.glTranslatef(0.0F, -1.0F, 0.0F); - GL11.glTranslatef(-1.0F, 0.0F, 0.0F); - GL11.glRotatef(90, 0.0F, 0.0F, 1.0F); - break; - case 2: - GL11.glTranslatef(0.0F, -1.0F, 0.0F); - GL11.glTranslatef(0.0F, 0.0F, -1.0F); - GL11.glRotatef(90, -1.0F, 0.0F, 0.0F); - break; - case 3: - GL11.glTranslatef(0.0F, -1.0F, 0.0F); - GL11.glTranslatef(0.0F, 0.0F, 1.0F); - GL11.glRotatef(90, 1.0F, 0.0F, 0.0F); - break; - } - - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - MekanismRenderer.blendOn(); - model.render(0.0625F); - MekanismRenderer.blendOff(); - GL11.glPopMatrix(); - } -} diff --git a/src/main/java/mekanism/client/render/tileentity/RenderLogisticalSorter.java b/src/main/java/mekanism/client/render/tileentity/RenderLogisticalSorter.java index 5525d10e4..33867c5a5 100644 --- a/src/main/java/mekanism/client/render/tileentity/RenderLogisticalSorter.java +++ b/src/main/java/mekanism/client/render/tileentity/RenderLogisticalSorter.java @@ -4,14 +4,13 @@ import mekanism.client.model.ModelLogisticalSorter; import mekanism.common.tile.TileEntityLogisticalSorter; import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class RenderLogisticalSorter extends TileEntitySpecialRenderer { @@ -20,8 +19,8 @@ public class RenderLogisticalSorter extends TileEntitySpecialRenderer { @@ -20,27 +19,27 @@ public class RenderPersonalChest extends TileEntitySpecialRenderer -{ - private ModelPressurizedReactionChamber model = new ModelPressurizedReactionChamber(); - - @Override - public void renderTileEntityAt(TileEntityPRC tileEntity, double x, double y, double z, float partialTick, int destroyStage) - { - GL11.glPushMatrix(); - GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 1.5F); - - bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "PressurizedReactionChamber.png")); - - switch(tileEntity.facing.ordinal()) /*TODO: switch the enum*/ - { - case 2: GL11.glRotatef(0, 0.0F, 1.0F, 0.0F); break; - case 3: GL11.glRotatef(180, 0.0F, 1.0F, 0.0F); break; - case 4: GL11.glRotatef(90, 0.0F, 1.0F, 0.0F); break; - case 5: GL11.glRotatef(270, 0.0F, 1.0F, 0.0F); break; - } - - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - model.render(0.0625F); - GL11.glPopMatrix(); - - MekanismRenderer.machineRenderer.renderTileEntityAt(tileEntity, x, y, z, partialTick, destroyStage); - } -} \ No newline at end of file diff --git a/src/main/java/mekanism/client/render/tileentity/RenderQuantumEntangloporter.java b/src/main/java/mekanism/client/render/tileentity/RenderQuantumEntangloporter.java index 01b52e195..bff471ded 100644 --- a/src/main/java/mekanism/client/render/tileentity/RenderQuantumEntangloporter.java +++ b/src/main/java/mekanism/client/render/tileentity/RenderQuantumEntangloporter.java @@ -2,18 +2,16 @@ package mekanism.client.render.tileentity; import mekanism.client.model.ModelQuantumEntangloporter; import mekanism.client.render.MekanismRenderer; -import mekanism.common.base.ISideConfiguration; import mekanism.common.tile.TileEntityQuantumEntangloporter; import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class RenderQuantumEntangloporter extends TileEntitySpecialRenderer { @@ -22,22 +20,22 @@ public class RenderQuantumEntangloporter extends TileEntitySpecialRenderer { @@ -20,20 +19,20 @@ public class RenderResistiveHeater extends TileEntitySpecialRenderer { @@ -20,21 +19,21 @@ public class RenderRotaryCondensentrator extends TileEntitySpecialRenderer { @@ -20,21 +19,21 @@ public class RenderSecurityDesk extends TileEntitySpecialRenderer { @@ -20,23 +19,23 @@ public class RenderSeismicVibrator extends TileEntitySpecialRenderer { @@ -20,22 +19,22 @@ public class RenderSolarNeutronActivator extends TileEntitySpecialRenderer { @@ -43,7 +44,7 @@ public class RenderThermalEvaporationController extends TileEntitySpecialRendere push(); - GL11.glTranslated(getX(renderLoc.getX()), getY(renderLoc.getY()), getZ(renderLoc.getZ())); + GL11.glTranslated(getX(renderLoc.xCoord), getY(renderLoc.yCoord), getZ(renderLoc.zCoord)); MekanismRenderer.glowOn(tileEntity.inputTank.getFluid().getFluid().getLuminosity()); @@ -60,12 +61,12 @@ public class RenderThermalEvaporationController extends TileEntitySpecialRendere private void pop() { GL11.glPopAttrib(); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } private void push() { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glPushAttrib(GL11.GL_ENABLE_BIT); GL11.glEnable(GL11.GL_CULL_FACE); GL11.glEnable(GL11.GL_BLEND); @@ -83,7 +84,7 @@ public class RenderThermalEvaporationController extends TileEntitySpecialRendere Model3D toReturn = new Model3D(); toReturn.baseBlock = Blocks.water; - toReturn.setTexture(fluid.getStill()); + toReturn.setTexture(MekanismRenderer.getFluidTexture(fluid, FluidType.STILL)); final int stages = getStages(data.height); DisplayInteger[] displays = new DisplayInteger[stages]; @@ -152,7 +153,7 @@ public class RenderThermalEvaporationController extends TileEntitySpecialRendere displays[i].endList(); } - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + MekanismRenderer.resetColor(); return displays; } diff --git a/src/main/java/mekanism/client/render/tileentity/RenderThermoelectricBoiler.java b/src/main/java/mekanism/client/render/tileentity/RenderThermoelectricBoiler.java index cf73cecc0..23b8c4ce2 100644 --- a/src/main/java/mekanism/client/render/tileentity/RenderThermoelectricBoiler.java +++ b/src/main/java/mekanism/client/render/tileentity/RenderThermoelectricBoiler.java @@ -5,25 +5,25 @@ import java.util.Map; import mekanism.client.render.MekanismRenderer; import mekanism.client.render.MekanismRenderer.DisplayInteger; +import mekanism.client.render.MekanismRenderer.FluidType; import mekanism.client.render.MekanismRenderer.Model3D; import mekanism.client.render.tileentity.RenderDynamicTank.RenderData; import mekanism.client.render.tileentity.RenderDynamicTank.ValveRenderData; import mekanism.common.content.tank.SynchronizedTankData.ValveData; import mekanism.common.content.tank.TankUpdateProtocol; import mekanism.common.tile.TileEntityBoilerCasing; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.init.Blocks; -import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidRegistry; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class RenderThermoelectricBoiler extends TileEntitySpecialRenderer { @@ -44,7 +44,7 @@ public class RenderThermoelectricBoiler extends TileEntitySpecialRenderer)MekanismUtils.getPrivateValue(getSoundManager(), net.minecraft.client.audio.SoundManager.class, ObfuscatedNames.SoundManager_invPlayingSounds); + invPlayingSounds = (Map)ReflectionUtils.getPrivateValue(getSoundManager(), net.minecraft.client.audio.SoundManager.class, ObfuscatedNames.SoundManager_invPlayingSounds); } catch(Exception e) { invPlayingSounds = null; } diff --git a/src/main/java/mekanism/common/CTMData.java b/src/main/java/mekanism/common/CTMData.java deleted file mode 100644 index 12145e20e..000000000 --- a/src/main/java/mekanism/common/CTMData.java +++ /dev/null @@ -1,138 +0,0 @@ -package mekanism.common; - -//import java.util.HashMap; -//import java.util.List; -//import java.util.Map.Entry; -// -//import mekanism.api.Coord4D; -//import mekanism.client.render.block.TextureSubmap; -//import net.minecraft.block.Block; -//import net.minecraft.client.renderer.texture.IIconRegister; -//import net.minecraft.util.IIcon; -//import net.minecraft.world.IBlockAccess; -//import net.minecraft.util.EnumFacing; -//import net.minecraftforge.fml.relauncher.Side; -//import net.minecraftforge.fml.relauncher.SideOnly; - -public class CTMData -{/* - public CTMTextureData mainTextureData; - - public HashMap> acceptableBlockMetas = new HashMap>(); - - public CTMTextureData[] sideOverrides = new CTMTextureData[6]; - - public CTMTextureData facingOverride; - - public int facing; - - public boolean renderConvexConnections = false; - - public CTMData(String textureName, Block block, List connectableMeta) - { - mainTextureData = new CTMTextureData(textureName); - acceptableBlockMetas.put(block, connectableMeta); - } - - public CTMData addSideOverride(EnumFacing side, String sideTexture) - { - sideOverrides[side.ordinal()] = new CTMTextureData(sideTexture); - - return this; - } - - public CTMData addFacingOverride(String facingTexture) - { - facingOverride = new CTMTextureData(facingTexture); - - return this; - } - - public boolean hasFacingOverride() - { - return facingOverride != null; - } - - public void setFacing(int newFacing) - { - facing = newFacing; - } - - public CTMData registerIcons(IIconRegister register) - { - mainTextureData.registerIcons(register); - - if(facingOverride != null) - { - facingOverride.registerIcons(register); - } - - for(CTMTextureData data : sideOverrides) - { - if(data != null) - { - data.registerIcons(register); - } - } - - return this; - } - - public CTMTextureData getTextureData(int side) - { - if(hasFacingOverride() && side == facing) - { - return facingOverride; - } - - if(sideOverrides[side] != null) - { - return sideOverrides[side]; - } - - return mainTextureData; - } - - public IIcon getIcon(int side) - { - return getTextureData(side).icon; - } - - public TextureSubmap getSubmap(int side) - { - return getTextureData(side).submap; - } - - public TextureSubmap getSmallSubmap(int side) - { - return getTextureData(side).submapSmall; - } - - public CTMData addOtherBlockConnectivities(Block block, List connectableMeta) - { - acceptableBlockMetas.put(block, connectableMeta); - return this; - } - - public CTMData setRenderConvexConnections() - { - renderConvexConnections = true; - return this; - } - - @SideOnly(Side.CLIENT) - public boolean shouldRenderSide(IBlockAccess world, int x, int y, int z, int side) - { - Coord4D obj = new Coord4D(x, y, z); - Block coordBlock = obj.getBlock(world); - int coordMeta = obj.getBlockState(world); - boolean valid = false; - - for(Entry> entry : acceptableBlockMetas.entrySet()) - { - valid |= entry.getKey().equals(coordBlock) && entry.getValue().contains(coordMeta); - } - - return !valid; - } -*/} diff --git a/src/main/java/mekanism/common/CommonPlayerTickHandler.java b/src/main/java/mekanism/common/CommonPlayerTickHandler.java index a7a703b0b..749c72ee0 100644 --- a/src/main/java/mekanism/common/CommonPlayerTickHandler.java +++ b/src/main/java/mekanism/common/CommonPlayerTickHandler.java @@ -1,6 +1,8 @@ package mekanism.common; +import mekanism.api.ObfuscatedNames; import mekanism.api.gas.GasStack; +import mekanism.api.util.ReflectionUtils; import mekanism.common.entity.EntityFlame; import mekanism.common.item.ItemFlamethrower; import mekanism.common.item.ItemFreeRunners; @@ -8,8 +10,6 @@ import mekanism.common.item.ItemGasMask; import mekanism.common.item.ItemJetpack; import mekanism.common.item.ItemJetpack.JetpackMode; import mekanism.common.item.ItemScubaTank; -import mekanism.common.util.MekanismUtils; -import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; @@ -101,7 +101,7 @@ public class CommonPlayerTickHandler if(player instanceof EntityPlayerMP) { - MekanismUtils.setPrivateValue(((EntityPlayerMP)player).playerNetServerHandler, 0, NetHandlerPlayServer.class, ObfuscatedNames.NetHandlerPlayServer_floatingTickCount); + ReflectionUtils.setPrivateValue(((EntityPlayerMP)player).playerNetServerHandler, 0, NetHandlerPlayServer.class, ObfuscatedNames.NetHandlerPlayServer_floatingTickCount); } jetpack.useGas(player.getEquipmentInSlot(3)); diff --git a/src/main/java/mekanism/common/CommonProxy.java b/src/main/java/mekanism/common/CommonProxy.java index bb600f912..69f95c0f0 100644 --- a/src/main/java/mekanism/common/CommonProxy.java +++ b/src/main/java/mekanism/common/CommonProxy.java @@ -145,13 +145,6 @@ import net.minecraftforge.fml.relauncher.FMLInjectionData; */ public class CommonProxy implements IGuiProvider { -/* - public static int MACHINE_RENDER_ID = RenderingRegistry.getNextAvailableRenderId(); - public static int BASIC_RENDER_ID = RenderingRegistry.getNextAvailableRenderId(); - public static int PLASTIC_RENDER_ID = RenderingRegistry.getNextAvailableRenderId(); - public static int CTM_RENDER_ID = RenderingRegistry.getNextAvailableRenderId(); -*/ - protected static WeakReference dummyPlayer = new WeakReference(null); /** @@ -168,51 +161,36 @@ public class CommonProxy implements IGuiProvider GameRegistry.registerTileEntity(TileEntityEliteFactory.class, "UltimateSmeltingFactory"); GameRegistry.registerTileEntity(TileEntityPurificationChamber.class, "PurificationChamber"); GameRegistry.registerTileEntity(TileEntityEnergizedSmelter.class, "EnergizedSmelter"); - //GameRegistry.registerTileEntity(TileEntityMetallurgicInfuser.class, "MetallurgicInfuser"); + GameRegistry.registerTileEntity(TileEntityMetallurgicInfuser.class, "MetallurgicInfuser"); GameRegistry.registerTileEntity(TileEntityGasTank.class, "GasTank"); GameRegistry.registerTileEntity(TileEntityEnergyCube.class, "EnergyCube"); GameRegistry.registerTileEntity(TileEntityElectricPump.class, "ElectricPump"); - GameRegistry.registerTileEntity(TileEntityPersonalChest.class, "ElectricChest"); //TODO rename + GameRegistry.registerTileEntity(TileEntityPersonalChest.class, "PersonalChest"); GameRegistry.registerTileEntity(TileEntityDynamicTank.class, "DynamicTank"); GameRegistry.registerTileEntity(TileEntityDynamicValve.class, "DynamicValve"); GameRegistry.registerTileEntity(TileEntityChargepad.class, "Chargepad"); GameRegistry.registerTileEntity(TileEntityLogisticalSorter.class, "LogisticalSorter"); GameRegistry.registerTileEntity(TileEntityBin.class, "Bin"); GameRegistry.registerTileEntity(TileEntityDigitalMiner.class, "DigitalMiner"); - //GameRegistry.registerTileEntity(TileEntityObsidianTNT.class, "ObsidianTNT"); - GameRegistry.registerTileEntity(TileEntityRotaryCondensentrator.class, "RotaryCondensentrator"); GameRegistry.registerTileEntity(TileEntityTeleporter.class, "MekanismTeleporter"); GameRegistry.registerTileEntity(TileEntityChemicalOxidizer.class, "ChemicalOxidizer"); GameRegistry.registerTileEntity(TileEntityChemicalInfuser.class, "ChemicalInfuser"); GameRegistry.registerTileEntity(TileEntityChemicalInjectionChamber.class, "ChemicalInjectionChamber"); - GameRegistry.registerTileEntity(TileEntityElectrolyticSeparator.class, "ElectrolyticSeparator"); - GameRegistry.registerTileEntity(TileEntityThermalEvaporationController.class, "SalinationController"); //TODO rename + GameRegistry.registerTileEntity(TileEntityThermalEvaporationController.class, "ThermalEvaporationController"); GameRegistry.registerTileEntity(TileEntityPrecisionSawmill.class, "PrecisionSawmill"); - GameRegistry.registerTileEntity(TileEntityChemicalDissolutionChamber.class, "ChemicalDissolutionChamber"); - GameRegistry.registerTileEntity(TileEntityChemicalWasher.class, "ChemicalWasher"); GameRegistry.registerTileEntity(TileEntityChemicalCrystallizer.class, "ChemicalCrystallizer"); GameRegistry.registerTileEntity(TileEntitySeismicVibrator.class, "SeismicVibrator"); GameRegistry.registerTileEntity(TileEntityPRC.class, "PressurizedReactionChamber"); - GameRegistry.registerTileEntity(TileEntityFluidTank.class, "PortableTank"); //TODO rename + GameRegistry.registerTileEntity(TileEntityFluidTank.class, "FluidTank"); GameRegistry.registerTileEntity(TileEntityFluidicPlenisher.class, "FluidicPlenisher"); - //GameRegistry.registerTileEntity(TileEntityLaser.class, "Laser"); - GameRegistry.registerTileEntity(TileEntityLaserAmplifier.class, "LaserAmplifier"); - GameRegistry.registerTileEntity(TileEntityLaserTractorBeam.class, "LaserTractorBeam"); GameRegistry.registerTileEntity(TileEntitySolarNeutronActivator.class, "SolarNeutronActivator"); - GameRegistry.registerTileEntity(TileEntityAmbientAccumulator.class, "AmbientAccumulator"); - GameRegistry.registerTileEntity(TileEntityInductionCasing.class, "InductionCasing"); - GameRegistry.registerTileEntity(TileEntityInductionPort.class, "InductionPort"); - GameRegistry.registerTileEntity(TileEntityInductionCell.class, "InductionCell"); - GameRegistry.registerTileEntity(TileEntityInductionProvider.class, "InductionProvider"); - GameRegistry.registerTileEntity(TileEntityOredictionificator.class, "Oredictionificator"); - GameRegistry.registerTileEntity(TileEntityStructuralGlass.class, "StructuralGlass"); GameRegistry.registerTileEntity(TileEntityFormulaicAssemblicator.class, "FormulaicAssemblicator"); GameRegistry.registerTileEntity(TileEntityResistiveHeater.class, "ResistiveHeater"); GameRegistry.registerTileEntity(TileEntityBoilerCasing.class, "BoilerCasing"); GameRegistry.registerTileEntity(TileEntityBoilerValve.class, "BoilerValve"); GameRegistry.registerTileEntity(TileEntitySecurityDesk.class, "SecurityDesk"); GameRegistry.registerTileEntity(TileEntityQuantumEntangloporter.class, "QuantumEntangloporter"); - GameRegistry.registerTileEntity(TileEntityFuelwoodHeater.class, "FuelwoodHeater"); + GameRegistry.registerTileEntity(TileEntityChemicalDissolutionChamber.class, "ChemicalDissolutionChamber"); } public void handleTeleporterUpdate(PortableTeleporterMessage message) {} @@ -228,19 +206,14 @@ public class CommonProxy implements IGuiProvider public void openPersonalChest(EntityPlayer entityplayer, int id, int windowId, boolean isBlock, BlockPos pos) {} /** - * Register and load client-only render information. + * Register and load client-only item render information. */ - public void registerRenderInformation() {} - + public void registerItemRenders() {} + /** - * Gets the armor index number from ClientProxy. - * @param string - armor indicator - * @return armor index number + * Register and load client-only block render information. */ - public int getArmorIndex(String string) - { - return 0; - } + public void registerBlockRenders() {} /** * Set and load the mod's common configuration properties. @@ -384,7 +357,7 @@ public class CommonProxy implements IGuiProvider usage.heavyWaterElectrolysisUsage = Mekanism.configuration.get("usage", "HeavyWaterElectrolysisUsage", 800D).getDouble(); usage.formulaicAssemblicatorUsage = Mekanism.configuration.get("usage", "FormulaicAssemblicatorUsage", 100D).getDouble(); -//TODO: Tier.loadConfig(); + Tier.loadConfig(); if(Mekanism.configuration.hasChanged()) { diff --git a/src/main/java/mekanism/common/FluidNetwork.java b/src/main/java/mekanism/common/FluidNetwork.java index 455afce16..09562794d 100644 --- a/src/main/java/mekanism/common/FluidNetwork.java +++ b/src/main/java/mekanism/common/FluidNetwork.java @@ -13,8 +13,8 @@ import mekanism.api.transmitters.DynamicNetwork; import mekanism.api.transmitters.IGridTransmitter; import mekanism.common.util.LangUtils; import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.MinecraftForge; import net.minecraft.util.EnumFacing; +import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidHandler; diff --git a/src/main/java/mekanism/common/FuelHandler.java b/src/main/java/mekanism/common/FuelHandler.java index 455156ece..1587723eb 100644 --- a/src/main/java/mekanism/common/FuelHandler.java +++ b/src/main/java/mekanism/common/FuelHandler.java @@ -6,9 +6,9 @@ import mekanism.api.MekanismConfig.general; import mekanism.api.gas.Gas; import mekanism.common.util.MekanismUtils; import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fml.common.ModAPIManager; import buildcraft.api.fuels.BuildcraftFuelRegistry; import buildcraft.api.fuels.IFuel; -import net.minecraftforge.fml.common.ModAPIManager; public class FuelHandler { diff --git a/src/main/java/mekanism/common/LaserManager.java b/src/main/java/mekanism/common/LaserManager.java index 8c40dc3f1..1d4a29988 100644 --- a/src/main/java/mekanism/common/LaserManager.java +++ b/src/main/java/mekanism/common/LaserManager.java @@ -13,12 +13,11 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.DamageSource; +import net.minecraft.util.EnumFacing; import net.minecraft.util.MovingObjectPosition; -import net.minecraft.util.Vec3; import net.minecraft.world.World; import net.minecraft.world.WorldServer; import net.minecraftforge.common.MinecraftForge; -import net.minecraft.util.EnumFacing; import net.minecraftforge.event.world.BlockEvent; public class LaserManager @@ -37,7 +36,7 @@ public class LaserManager if(mop != null) { to = new Pos3D(mop.hitVec); - Coord4D toCoord = new Coord4D(mop.getBlockPos()); + Coord4D toCoord = new Coord4D(mop.getBlockPos(), world); TileEntity tile = toCoord.getTileEntity(world); if(tile instanceof ILaserReceptor) @@ -83,8 +82,8 @@ public class LaserManager IBlockState state = blockCoord.getBlockState(world); Block blockHit = state.getBlock(); - EntityPlayer dummy = Mekanism.proxy.getDummyPlayer((WorldServer)world, blockCoord.getX(), blockCoord.getY(), blockCoord.getZ()).get(); - BlockEvent.BreakEvent event = new BlockEvent.BreakEvent(world, blockCoord, state, dummy); + EntityPlayer dummy = Mekanism.proxy.getDummyPlayer((WorldServer)world, blockCoord.xCoord, blockCoord.yCoord, blockCoord.zCoord).get(); + BlockEvent.BreakEvent event = new BlockEvent.BreakEvent(world, blockCoord.getPos(), state, dummy); MinecraftForge.EVENT_BUS.post(event); if(event.isCanceled()) @@ -94,15 +93,15 @@ public class LaserManager if(dropAtBlock) { - blockHit.dropBlockAsItem(world, blockCoord, state, 0); + blockHit.dropBlockAsItem(world, blockCoord.getPos(), state, 0); } else { - ret = blockHit.getDrops(world, blockCoord, state, 0); + ret = blockHit.getDrops(world, blockCoord.getPos(), state, 0); } - blockHit.breakBlock(world, blockCoord, state); - world.setBlockToAir(blockCoord); - world.playAuxSFX(2001, blockCoord, Block.getIdFromBlock(blockHit)); + blockHit.breakBlock(world, blockCoord.getPos(), state); + world.setBlockToAir(blockCoord.getPos()); + world.playAuxSFX(2001, blockCoord.getPos(), Block.getIdFromBlock(blockHit)); return ret; } diff --git a/src/main/java/mekanism/common/Mekanism.java b/src/main/java/mekanism/common/Mekanism.java index a6352fa8e..fb5fd5314 100644 --- a/src/main/java/mekanism/common/Mekanism.java +++ b/src/main/java/mekanism/common/Mekanism.java @@ -77,12 +77,27 @@ import mekanism.common.recipe.machines.SmeltingRecipe; import mekanism.common.recipe.outputs.ItemStackOutput; import mekanism.common.security.SecurityFrequency; import mekanism.common.tile.TileEntityAdvancedBoundingBlock; +import mekanism.common.tile.TileEntityAmbientAccumulator; import mekanism.common.tile.TileEntityBoundingBlock; import mekanism.common.tile.TileEntityCardboardBox; +import mekanism.common.tile.TileEntityChemicalDissolutionChamber; +import mekanism.common.tile.TileEntityChemicalInfuser; +import mekanism.common.tile.TileEntityChemicalOxidizer; +import mekanism.common.tile.TileEntityChemicalWasher; import mekanism.common.tile.TileEntityElectricBlock; +import mekanism.common.tile.TileEntityElectrolyticSeparator; +import mekanism.common.tile.TileEntityFuelwoodHeater; +import mekanism.common.tile.TileEntityInductionCasing; +import mekanism.common.tile.TileEntityInductionCell; +import mekanism.common.tile.TileEntityInductionPort; +import mekanism.common.tile.TileEntityInductionProvider; import mekanism.common.tile.TileEntityLaser; -import mekanism.common.tile.TileEntityMetallurgicInfuser; +import mekanism.common.tile.TileEntityLaserAmplifier; +import mekanism.common.tile.TileEntityLaserTractorBeam; +import mekanism.common.tile.TileEntityOredictionificator; import mekanism.common.tile.TileEntityPressureDisperser; +import mekanism.common.tile.TileEntityRotaryCondensentrator; +import mekanism.common.tile.TileEntityStructuralGlass; import mekanism.common.tile.TileEntitySuperheatingElement; import mekanism.common.tile.TileEntityThermalEvaporationBlock; import mekanism.common.tile.TileEntityThermalEvaporationValve; @@ -110,7 +125,6 @@ import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fml.client.event.ConfigChangedEvent; -import net.minecraftforge.fml.common.FMLCommonHandler; import net.minecraftforge.fml.common.IFuelHandler; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.common.Mod; @@ -1169,12 +1183,26 @@ public class Mekanism GameRegistry.registerTileEntity(TileEntityBoundingBlock.class, "BoundingBlock"); GameRegistry.registerTileEntity(TileEntityAdvancedBoundingBlock.class, "AdvancedBoundingBlock"); GameRegistry.registerTileEntity(TileEntityCardboardBox.class, "CardboardBox"); - GameRegistry.registerTileEntity(TileEntityThermalEvaporationValve.class, "SalinationValve"); //TODO rename - GameRegistry.registerTileEntity(TileEntityThermalEvaporationBlock.class, "SalinationTank"); //TODO rename + GameRegistry.registerTileEntity(TileEntityThermalEvaporationValve.class, "ThermalEvaporationValve"); + GameRegistry.registerTileEntity(TileEntityThermalEvaporationBlock.class, "ThermalEvaporationBlock"); GameRegistry.registerTileEntity(TileEntityPressureDisperser.class, "PressureDisperser"); GameRegistry.registerTileEntity(TileEntitySuperheatingElement.class, "SuperheatingElement"); - GameRegistry.registerTileEntity(TileEntityMetallurgicInfuser.class, "MetallurgicInfuser"); GameRegistry.registerTileEntity(TileEntityLaser.class, "Laser"); + GameRegistry.registerTileEntity(TileEntityAmbientAccumulator.class, "AmbientAccumulator"); + GameRegistry.registerTileEntity(TileEntityInductionCasing.class, "InductionCasing"); + GameRegistry.registerTileEntity(TileEntityInductionPort.class, "InductionPort"); + GameRegistry.registerTileEntity(TileEntityInductionCell.class, "InductionCell"); + GameRegistry.registerTileEntity(TileEntityInductionProvider.class, "InductionProvider"); + GameRegistry.registerTileEntity(TileEntityOredictionificator.class, "Oredictionificator"); + GameRegistry.registerTileEntity(TileEntityStructuralGlass.class, "StructuralGlass"); + GameRegistry.registerTileEntity(TileEntityFuelwoodHeater.class, "FuelwoodHeater"); + GameRegistry.registerTileEntity(TileEntityLaserAmplifier.class, "LaserAmplifier"); + GameRegistry.registerTileEntity(TileEntityLaserTractorBeam.class, "LaserTractorBeam"); + GameRegistry.registerTileEntity(TileEntityChemicalWasher.class, "ChemicalWasher"); + GameRegistry.registerTileEntity(TileEntityElectrolyticSeparator.class, "ElectrolyticSeparator"); + GameRegistry.registerTileEntity(TileEntityChemicalOxidizer.class, "ChemicalOxidizer"); + GameRegistry.registerTileEntity(TileEntityChemicalInfuser.class, "ChemicalInfuser"); + GameRegistry.registerTileEntity(TileEntityRotaryCondensentrator.class, "RotaryCondensentrator"); //Load tile entities that have special renderers. proxy.registerSpecialTileEntities(); @@ -1251,26 +1279,26 @@ public class Mekanism logger.info("Detected Tekkit in root directory - hello, fellow user!"); } - GasRegistry.register(new Gas("hydrogen")).registerFluid(); - GasRegistry.register(new Gas("oxygen")).registerFluid(); - GasRegistry.register(new Gas("water")).registerFluid(); - GasRegistry.register(new Gas("chlorine")).registerFluid(); - GasRegistry.register(new Gas("sulfurDioxideGas")).registerFluid(); - GasRegistry.register(new Gas("sulfurTrioxideGas")).registerFluid(); - GasRegistry.register(new Gas("sulfuricAcid")).registerFluid(); - GasRegistry.register(new Gas("hydrogenChloride")).registerFluid(); - GasRegistry.register(new Gas("liquidOsmium").setVisible(false)); - GasRegistry.register(new Gas("liquidStone").setVisible(false)); - GasRegistry.register(new Gas("ethene").registerFluid()); - GasRegistry.register(new Gas("sodium").registerFluid()); - GasRegistry.register(new Gas("brine").registerFluid()); - GasRegistry.register(new Gas("deuterium")).registerFluid(); - GasRegistry.register(new Gas("tritium")).registerFluid(); - GasRegistry.register(new Gas("fusionFuelDT")).registerFluid(); - GasRegistry.register(new Gas("lithium")).registerFluid(); + GasRegistry.register(new Gas("hydrogen", "mekanism:blocks/liquid/LiquidHydrogen")).registerFluid(); + GasRegistry.register(new Gas("oxygen", "mekanism:blocks/liquid/LiquidOxygen")).registerFluid(); + GasRegistry.register(new Gas("water", "mekanism:blocks/liquid/LiquidSteam")).registerFluid(); + GasRegistry.register(new Gas("chlorine", "mekanism:blocks/liquid/LiquidChlorine")).registerFluid(); + GasRegistry.register(new Gas("sulfurDioxideGas", "mekanism:blocks/liquid/LiquidSulfurDioxide")).registerFluid(); + GasRegistry.register(new Gas("sulfurTrioxideGas", "mekanism:blocks/liquid/LiquidSulfurTrioxide")).registerFluid(); + GasRegistry.register(new Gas("sulfuricAcid", "mekanism:blocks/liquid/LiquidSulfuricAcid")).registerFluid(); + GasRegistry.register(new Gas("hydrogenChloride", "mekanism:blocks/liquid/LiquidHydrogenChloride")).registerFluid(); + GasRegistry.register(new Gas("liquidOsmium", "mekanism:blocks/liquid/LiquidOsmium").setVisible(false)); + GasRegistry.register(new Gas("liquidStone", "mekanism:blocks/liquid/LiquidStone").setVisible(false)); + GasRegistry.register(new Gas("ethene", "mekanism:blocks/liquid/LiquidEthene").registerFluid()); + GasRegistry.register(new Gas("sodium", "mekanism:blocks/liquid/LiquidSodium").registerFluid()); + GasRegistry.register(new Gas("brine", "mekanism:blocks/liquid/LiquidBrine").registerFluid()); + GasRegistry.register(new Gas("deuterium", "mekanism:blocks/liquid/LiquidDeuterium")).registerFluid(); + GasRegistry.register(new Gas("tritium", "mekanism:blocks/liquid/LiquidTritium")).registerFluid(); + GasRegistry.register(new Gas("fusionFuelDT", "mekanism:blocks/liquid/LiquidDT")).registerFluid(); + GasRegistry.register(new Gas("lithium", "mekanism:blocks/liquid/LiquidLithium")).registerFluid(); FluidRegistry.registerFluid(new Fluid("heavyWater", new ResourceLocation("mekanism:blocks/liquid/LiquidHeavyWater"), new ResourceLocation("mekanism:blocks/liquid/LiquidHeavyWater"))); - FluidRegistry.registerFluid(new Fluid("steam", new ResourceLocation("mekanism:blocks/liquid/LiquidSteam"), new ResourceLocation("mekanism:blocks/liquid/LiquidSteam")).setGaseous(true)); + FluidRegistry.registerFluid(new Fluid("steam", new ResourceLocation("mekanism:blocks/liquid/LiquidSteam"), new ResourceLocation("mekanism:blocks/liquid/LiquidSteam")));//.setGaseous(true)); for(Resource resource : Resource.values()) { @@ -1379,7 +1407,6 @@ public class Mekanism packetHandler.initialize(); //Load proxy - proxy.registerRenderInformation(); proxy.loadUtilities(); //Completion notification diff --git a/src/main/java/mekanism/common/MekanismBlocks.java b/src/main/java/mekanism/common/MekanismBlocks.java index 175db6556..d2bff9924 100644 --- a/src/main/java/mekanism/common/MekanismBlocks.java +++ b/src/main/java/mekanism/common/MekanismBlocks.java @@ -5,16 +5,6 @@ import static mekanism.common.block.states.BlockStateBasic.BasicBlock.BASIC_BLOC import static mekanism.common.block.states.BlockStateMachine.MachineBlock.MACHINE_BLOCK_1; import static mekanism.common.block.states.BlockStateMachine.MachineBlock.MACHINE_BLOCK_2; import static mekanism.common.block.states.BlockStateMachine.MachineBlock.MACHINE_BLOCK_3; - -import java.util.ArrayList; -import java.util.List; - -import mekanism.api.EnumColor; -import mekanism.client.ClientProxy; -import mekanism.common.Tier.EnergyCubeTier; -import mekanism.common.Tier.GasTankTier; -import mekanism.common.base.IEnergyCube; -import mekanism.common.base.IFactory.RecipeType; import mekanism.common.block.BlockBasic; import mekanism.common.block.BlockBounding; import mekanism.common.block.BlockCardboardBox; @@ -28,11 +18,8 @@ import mekanism.common.block.BlockPlasticFence; import mekanism.common.block.BlockPlasticFence.PlasticFenceStateMapper; import mekanism.common.block.BlockSalt; import mekanism.common.block.states.BlockStateBasic.BasicBlockStateMapper; -import mekanism.common.block.states.BlockStateBasic.BasicBlockType; import mekanism.common.block.states.BlockStateCardboardBox.CardboardBoxStateMapper; import mekanism.common.block.states.BlockStateMachine.MachineBlockStateMapper; -import mekanism.common.block.states.BlockStateMachine.MachineType; -import mekanism.common.block.states.BlockStateOre.EnumOreType; import mekanism.common.block.states.BlockStatePlastic.PlasticBlockStateMapper; import mekanism.common.block.states.BlockStatePlastic.PlasticBlockType; import mekanism.common.item.ItemBlockBasic; @@ -43,12 +30,7 @@ import mekanism.common.item.ItemBlockMachine; import mekanism.common.item.ItemBlockOre; import mekanism.common.item.ItemBlockPlastic; import net.minecraft.block.Block; -import net.minecraft.client.renderer.ItemMeshDefinition; import net.minecraft.client.renderer.block.statemap.IStateMapper; -import net.minecraft.client.resources.model.ModelResourceLocation; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.fml.common.registry.GameRegistry.ObjectHolder; @@ -118,141 +100,6 @@ public class MekanismBlocks ModelLoader.setCustomStateMapper(PlasticFence, fenceMapper); ModelLoader.setCustomStateMapper(CardboardBox, boxMapper); - ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(MekanismBlocks.ObsidianTNT), 0, new ModelResourceLocation("mekanism:ObsidianTNT", "inventory")); - ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(MekanismBlocks.SaltBlock), 0, new ModelResourceLocation("mekanism:SaltBlock", "inventory")); - ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(MekanismBlocks.CardboardBox), 0, new ModelResourceLocation("mekanism:CardboardBox", "storage=false")); - ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(MekanismBlocks.CardboardBox), 1, new ModelResourceLocation("mekanism:CardboardBox", "storage=true")); - - for(MachineType type : MachineType.values()) - { - List modelsToAdd = new ArrayList(); - String resource = "mekanism:" + type.getName(); - RecipeType recipePointer = null; - - if(type == MachineType.BASIC_FACTORY || type == MachineType.ADVANCED_FACTORY || type == MachineType.ELITE_FACTORY) - { - recipePointer = RecipeType.values()[0]; - resource = "mekanism:" + type.getName() + "_" + recipePointer.getName(); - } - - while(true) - { - if(ClientProxy.machineResources.get(resource) == null) - { - List entries = new ArrayList(); - - if(type.hasActiveTexture()) - { - entries.add("active=false"); - } - - if(type.hasRotations()) - { - entries.add("facing=north"); - } - - String properties = new String(); - - for(int i = 0; i < entries.size(); i++) - { - properties += entries.get(i); - - if(i < entries.size()-1) - { - properties += ","; - } - } - - ModelResourceLocation model = new ModelResourceLocation(resource, properties); - - ClientProxy.machineResources.put(resource, model); - modelsToAdd.add(model); - - if(type == MachineType.BASIC_FACTORY || type == MachineType.ADVANCED_FACTORY || type == MachineType.ELITE_FACTORY) - { - if(recipePointer.ordinal() < RecipeType.values().length-1) - { - recipePointer = RecipeType.values()[recipePointer.ordinal()+1]; - resource = "mekanism:" + type.getName() + "_" + recipePointer.getName(); - - continue; - } - } - } - - break; - } - - ModelLoader.registerItemVariants(Item.getItemFromBlock(type.typeBlock.getBlock()), modelsToAdd.toArray(new ModelResourceLocation[] {})); - } - - for(BasicBlockType type : BasicBlockType.values()) - { - ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(type.blockType.getBlock()), type.meta, new ModelResourceLocation("mekanism:" + type.getName(), "inventory")); - } - - for(EnumColor color : EnumColor.DYES) - { - ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(MekanismBlocks.PlasticBlock), color.getMetaValue(), new ModelResourceLocation("mekanism:plastic_block", "type=plastic")); - ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(MekanismBlocks.SlickPlasticBlock), color.getMetaValue(), new ModelResourceLocation("mekanism:plastic_block", "type=slick")); - ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(MekanismBlocks.GlowPlasticBlock), color.getMetaValue(), new ModelResourceLocation("mekanism:plastic_block", "type=glow")); - ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(MekanismBlocks.ReinforcedPlasticBlock), color.getMetaValue(), new ModelResourceLocation("mekanism:plastic_block", "type=reinforced")); - ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(MekanismBlocks.RoadPlasticBlock), color.getMetaValue(), new ModelResourceLocation("mekanism:plastic_block", "type=road")); - ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(MekanismBlocks.PlasticFence), color.getMetaValue(), new ModelResourceLocation("mekanism:PlasticFence", "inventory")); - } - - for(EnumOreType ore : EnumOreType.values()) - { - ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(MekanismBlocks.OreBlock), ore.ordinal(), new ModelResourceLocation("mekanism:OreBlock", "type=" + ore.getName())); - } - - ModelLoader.setCustomMeshDefinition(Item.getItemFromBlock(MekanismBlocks.EnergyCube), new ItemMeshDefinition() { - @Override - public ModelResourceLocation getModelLocation(ItemStack stack) - { - EnergyCubeTier tier = ((IEnergyCube)stack.getItem()).getEnergyCubeTier(stack); - ResourceLocation baseLocation = new ResourceLocation("mekanism", "EnergyCube"); - - return new ModelResourceLocation(baseLocation, "facing=north,tier="+tier); - } - }); - - ModelLoader.setCustomMeshDefinition(Item.getItemFromBlock(MekanismBlocks.GasTank), new ItemMeshDefinition() { - @Override - public ModelResourceLocation getModelLocation(ItemStack stack) - { - GasTankTier tier = GasTankTier.values()[((ItemBlockGasTank)stack.getItem()).getBaseTier(stack).ordinal()]; - ResourceLocation baseLocation = new ResourceLocation("mekanism", "GasTank"); - - return new ModelResourceLocation(baseLocation, "facing=north,tier="+tier); - } - }); - - ItemMeshDefinition mesher = new ItemMeshDefinition() { - @Override - public ModelResourceLocation getModelLocation(ItemStack stack) - { - MachineType type = MachineType.get(stack); - - if(type != null) - { - String resource = "mekanism:" + type.getName(); - - if(type == MachineType.BASIC_FACTORY || type == MachineType.ADVANCED_FACTORY || type == MachineType.ELITE_FACTORY) - { - RecipeType recipe = RecipeType.values()[((ItemBlockMachine)stack.getItem()).getRecipeType(stack)]; - resource = "mekanism:" + type.getName() + "_" + recipe.getName(); - } - - return ClientProxy.machineResources.get(resource); - } - - return null; - } - }; - - ModelLoader.setCustomMeshDefinition(Item.getItemFromBlock(MekanismBlocks.MachineBlock), mesher); - ModelLoader.setCustomMeshDefinition(Item.getItemFromBlock(MekanismBlocks.MachineBlock2), mesher); - ModelLoader.setCustomMeshDefinition(Item.getItemFromBlock(MekanismBlocks.MachineBlock3), mesher); + Mekanism.proxy.registerBlockRenders(); } } diff --git a/src/main/java/mekanism/common/MekanismItems.java b/src/main/java/mekanism/common/MekanismItems.java index ff47cac9c..59bab4ae3 100644 --- a/src/main/java/mekanism/common/MekanismItems.java +++ b/src/main/java/mekanism/common/MekanismItems.java @@ -35,7 +35,6 @@ import mekanism.common.item.ItemUpgrade; import mekanism.common.item.ItemWalkieTalkie; import mekanism.common.multipart.ItemGlowPanel; import mekanism.common.multipart.ItemPartTransmitter; - import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -173,5 +172,7 @@ public class MekanismItems MinecraftForge.EVENT_BUS.register(GasMask); MinecraftForge.EVENT_BUS.register(FreeRunners); + + Mekanism.proxy.registerItemRenders(); } } diff --git a/src/main/java/mekanism/common/PacketHandler.java b/src/main/java/mekanism/common/PacketHandler.java index 99edda28d..360193619 100644 --- a/src/main/java/mekanism/common/PacketHandler.java +++ b/src/main/java/mekanism/common/PacketHandler.java @@ -71,10 +71,7 @@ import mekanism.common.network.PacketWalkieTalkieState; import mekanism.common.network.PacketWalkieTalkieState.WalkieTalkieStateMessage; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompressedStreamTools; -import net.minecraft.nbt.NBTSizeTracker; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.server.MinecraftServer; import net.minecraft.util.AxisAlignedBB; @@ -87,8 +84,6 @@ import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper; import net.minecraftforge.fml.relauncher.Side; -import scala.tools.nsc.Global.Run; - /** * Mekanism packet handler. As always, use packets sparingly! * @author AidanBrady @@ -161,6 +156,10 @@ public class PacketHandler { output.writeShort((Short)data); } + else if(data instanceof Long) + { + output.writeLong((Long)data); + } else if(data instanceof Boolean) { output.writeBoolean((Boolean)data); @@ -211,8 +210,7 @@ public class PacketHandler { encode(((ArrayList)data).toArray(), output); } - else - { + else { throw new RuntimeException("Un-encodable data passed to encode(): " + data); } } diff --git a/src/main/java/mekanism/common/Tier.java b/src/main/java/mekanism/common/Tier.java index d57ee2a48..bb8ac7506 100644 --- a/src/main/java/mekanism/common/Tier.java +++ b/src/main/java/mekanism/common/Tier.java @@ -88,19 +88,6 @@ public final class Tier baseMaxEnergy = maxEnergy = max; baseOutput = output = out; } - - public static EnergyCubeTier getFromName(String tierName) - { - for(EnergyCubeTier tier : values()) - { - if(tierName.contains(tier.getBaseTier().getSimpleName())) - { - return tier; - } - } - - return BASIC; - } @Override public void loadConfig() @@ -726,12 +713,10 @@ public final class Tier public static void init() { -/* if(initiated) { return; } -*/ for(Class c : Tier.class.getDeclaredClasses()) { diff --git a/src/main/java/mekanism/common/asm/LoadingHook.java b/src/main/java/mekanism/common/asm/LoadingHook.java index 2bcba9285..50c46d447 100644 --- a/src/main/java/mekanism/common/asm/LoadingHook.java +++ b/src/main/java/mekanism/common/asm/LoadingHook.java @@ -2,8 +2,8 @@ package mekanism.common.asm; import java.util.Map; -import codechicken.core.launch.DepLoader; import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin; +import codechicken.core.launch.DepLoader; public class LoadingHook implements IFMLLoadingPlugin { diff --git a/src/main/java/mekanism/common/base/EnergyAcceptorWrapper.java b/src/main/java/mekanism/common/base/EnergyAcceptorWrapper.java index 52f9b0bd4..7be79b128 100644 --- a/src/main/java/mekanism/common/base/EnergyAcceptorWrapper.java +++ b/src/main/java/mekanism/common/base/EnergyAcceptorWrapper.java @@ -1,11 +1,10 @@ package mekanism.common.base; import ic2.api.energy.tile.IEnergySink; - -import mekanism.common.capabilities.Capabilities; import mekanism.api.Coord4D; import mekanism.api.MekanismConfig.general; import mekanism.api.energy.IStrictEnergyAcceptor; +import mekanism.common.capabilities.Capabilities; import mekanism.common.util.MekanismUtils; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; diff --git a/src/main/java/mekanism/common/base/IAdvancedBoundingBlock.java b/src/main/java/mekanism/common/base/IAdvancedBoundingBlock.java index c9793fab0..e3dab6ac2 100644 --- a/src/main/java/mekanism/common/base/IAdvancedBoundingBlock.java +++ b/src/main/java/mekanism/common/base/IAdvancedBoundingBlock.java @@ -10,9 +10,9 @@ import mekanism.common.security.ISecurityTile; import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumFacing; -import cofh.api.energy.IEnergyHandler; import net.minecraftforge.fml.common.Optional.Interface; import net.minecraftforge.fml.common.Optional.InterfaceList; +import cofh.api.energy.IEnergyHandler; @InterfaceList({ @Interface(iface = "ic2.api.energy.tile.IEnergySink", modid = "IC2"), diff --git a/src/main/java/mekanism/common/base/IEnergyCube.java b/src/main/java/mekanism/common/base/IEnergyCube.java deleted file mode 100644 index 3858a86db..000000000 --- a/src/main/java/mekanism/common/base/IEnergyCube.java +++ /dev/null @@ -1,26 +0,0 @@ -package mekanism.common.base; - -import mekanism.common.Tier.EnergyCubeTier; -import net.minecraft.item.ItemStack; - -/** - * Internal interface used when dealing with Energy Cubes and their tiers. - * @author AidanBrady - * - */ -public interface IEnergyCube -{ - /** - * Gets the tier of this energy cube. - * @param itemstack - ItemStack to check - * @return tier - */ - public EnergyCubeTier getEnergyCubeTier(ItemStack itemstack); - - /** - * Sets the tier of this energy cube - * @param itemstack - ItemStack to set - * @param tier - tier to set - */ - public void setEnergyCubeTier(ItemStack itemstack, EnergyCubeTier tier); -} diff --git a/src/main/java/mekanism/common/base/IEnergyWrapper.java b/src/main/java/mekanism/common/base/IEnergyWrapper.java index bfe8737d2..a915eb982 100644 --- a/src/main/java/mekanism/common/base/IEnergyWrapper.java +++ b/src/main/java/mekanism/common/base/IEnergyWrapper.java @@ -11,9 +11,9 @@ import mekanism.api.energy.IStrictEnergyAcceptor; import mekanism.api.energy.IStrictEnergyStorage; import net.minecraft.inventory.IInventory; import net.minecraft.util.EnumFacing; -import cofh.api.energy.IEnergyHandler; import net.minecraftforge.fml.common.Optional.Interface; import net.minecraftforge.fml.common.Optional.InterfaceList; +import cofh.api.energy.IEnergyHandler; @InterfaceList({ @Interface(iface = "ic2.api.energy.tile.IEnergySink", modid = "IC2"), diff --git a/src/main/java/mekanism/common/base/IFactory.java b/src/main/java/mekanism/common/base/IFactory.java index 2e87ce46d..f27be3045 100644 --- a/src/main/java/mekanism/common/base/IFactory.java +++ b/src/main/java/mekanism/common/base/IFactory.java @@ -18,7 +18,6 @@ import mekanism.common.recipe.machines.MachineRecipe; import mekanism.common.recipe.machines.MetallurgicInfuserRecipe; import mekanism.common.tile.TileEntityAdvancedElectricMachine; import mekanism.common.util.LangUtils; -import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumFacing; import net.minecraft.util.IStringSerializable; diff --git a/src/main/java/mekanism/common/base/ISideConfiguration.java b/src/main/java/mekanism/common/base/ISideConfiguration.java index 578a8bcbe..1f989c157 100644 --- a/src/main/java/mekanism/common/base/ISideConfiguration.java +++ b/src/main/java/mekanism/common/base/ISideConfiguration.java @@ -2,7 +2,6 @@ package mekanism.common.base; import mekanism.common.tile.component.TileComponentConfig; import mekanism.common.tile.component.TileComponentEjector; - import net.minecraft.util.EnumFacing; /** diff --git a/src/main/java/mekanism/common/block/BlockBasic.java b/src/main/java/mekanism/common/block/BlockBasic.java index bc4a3210b..a62ef6fbd 100644 --- a/src/main/java/mekanism/common/block/BlockBasic.java +++ b/src/main/java/mekanism/common/block/BlockBasic.java @@ -3,11 +3,12 @@ package mekanism.common.block; import java.util.List; import java.util.Random; +import mekanism.api.Coord4D; import mekanism.api.energy.IEnergizedItem; import mekanism.api.energy.IStrictEnergyStorage; import mekanism.client.render.ctm.CTMBlockRenderContext; +import mekanism.client.render.ctm.CTMData; import mekanism.client.render.ctm.ICTMBlock; -import mekanism.client.render.ctm.PropertyCTMRenderContext; import mekanism.common.Mekanism; import mekanism.common.Tier.BaseTier; import mekanism.common.base.IActiveState; @@ -17,6 +18,7 @@ import mekanism.common.block.states.BlockStateBasic; import mekanism.common.block.states.BlockStateBasic.BasicBlock; import mekanism.common.block.states.BlockStateBasic.BasicBlockType; import mekanism.common.block.states.BlockStateFacing; +import mekanism.common.block.states.BlockStateMachine.MachineType; import mekanism.common.content.boiler.SynchronizedBoilerData; import mekanism.common.content.tank.TankUpdateProtocol; import mekanism.common.inventory.InventoryBin; @@ -27,6 +29,7 @@ import mekanism.common.tile.TileEntityBasicBlock; import mekanism.common.tile.TileEntityBin; import mekanism.common.tile.TileEntityDynamicTank; import mekanism.common.tile.TileEntityInductionCell; +import mekanism.common.tile.TileEntityInductionPort; import mekanism.common.tile.TileEntityInductionProvider; import mekanism.common.tile.TileEntityMultiblock; import mekanism.common.tile.TileEntitySecurityDesk; @@ -40,6 +43,7 @@ import net.minecraft.block.properties.PropertyEnum; import net.minecraft.block.state.BlockState; import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving.SpawnPlacementType; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.item.EntityItem; @@ -54,6 +58,7 @@ import net.minecraft.util.EnumWorldBlockLayer; import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.EnumSkyBlock; +import net.minecraft.world.Explosion; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.property.IExtendedBlockState; @@ -97,14 +102,16 @@ import buildcraft.api.tools.IToolWrench; */ public abstract class BlockBasic extends Block implements ICTMBlock//TODO? implements ICustomBlockIcon { - public static final PropertyCTMRenderContext ctmProperty = new PropertyCTMRenderContext(); + public CTMData[][] ctmData = new CTMData[16][4]; public BlockBasic() { super(Material.iron); setHardness(5F); - setResistance(10F); + setResistance(20F); setCreativeTab(Mekanism.tabMekanism); + + initCTMs(); } public static BlockBasic getBlockBasic(BasicBlock block) @@ -120,6 +127,7 @@ public abstract class BlockBasic extends Block implements ICTMBlock//TODO? imple public abstract BasicBlock getBasicBlock(); + @Override public BlockState createBlockState() { return new BlockStateBasic(this, getProperty()); @@ -135,7 +143,7 @@ public abstract class BlockBasic extends Block implements ICTMBlock//TODO? imple { BlockStateBasic.BasicBlockType type = BlockStateBasic.BasicBlockType.get(getBasicBlock(), meta&0xF); - return this.getDefaultState().withProperty(getProperty(), type); + return getDefaultState().withProperty(getProperty(), type); } @Override @@ -160,6 +168,39 @@ public abstract class BlockBasic extends Block implements ICTMBlock//TODO? imple state = state.withProperty(BlockStateBasic.activeProperty, ((IActiveState)tile).getActive()); } + if(tile instanceof TileEntityInductionCell) + { + state = state.withProperty(BlockStateBasic.tierProperty, ((TileEntityInductionCell)tile).tier.getBaseTier()); + } + + if(tile instanceof TileEntityInductionProvider) + { + state = state.withProperty(BlockStateBasic.tierProperty, ((TileEntityInductionProvider)tile).tier.getBaseTier()); + } + + if(tile instanceof TileEntityBin) + { + state = state.withProperty(BlockStateBasic.tierProperty, ((TileEntityBin)tile).tier.getBaseTier()); + } + + if(tile instanceof TileEntityInductionPort) + { + state = state.withProperty(BlockStateBasic.activeProperty, ((TileEntityInductionPort)tile).mode); + } + + if(tile instanceof TileEntitySuperheatingElement) + { + TileEntitySuperheatingElement element = (TileEntitySuperheatingElement)tile; + boolean active = false; + + if(element.multiblockUUID != null && SynchronizedBoilerData.clientHotMap.get(element.multiblockUUID) != null) + { + active = SynchronizedBoilerData.clientHotMap.get(element.multiblockUUID); + } + + state = state.withProperty(BlockStateBasic.activeProperty, active); + } + return state; } @@ -172,43 +213,22 @@ public abstract class BlockBasic extends Block implements ICTMBlock//TODO? imple return stateIn; } - IExtendedBlockState state = (IExtendedBlockState) stateIn; + IExtendedBlockState state = (IExtendedBlockState)stateIn; CTMBlockRenderContext ctx = new CTMBlockRenderContext(w, pos); - return state.withProperty(ctmProperty, ctx); + return state.withProperty(BlockStateBasic.ctmProperty, ctx); } -/* - @Override - public IIcon getIcon(ItemStack stack, int side) - { - if(BasicType.get(stack) == BasicType.BIN) - { - return binIcons[((ItemBlockBasic)stack.getItem()).getBaseTier(stack).ordinal()][side]; - } - else if(BasicType.get(stack) == BasicType.INDUCTION_CELL) - { - return icons[3][((ItemBlockBasic)stack.getItem()).getBaseTier(stack).ordinal()]; - } - else if(BasicType.get(stack) == BasicType.INDUCTION_PROVIDER) - { - return icons[4][((ItemBlockBasic)stack.getItem()).getBaseTier(stack).ordinal()]; - } - - return getIcon(side, stack.getItemDamage()); - } -*/ - @Override public void onNeighborBlockChange(World world, BlockPos pos, IBlockState state, Block neighborBlock) { if(!world.isRemote) { - TileEntity tileEntity = world.getTileEntity(pos); + TileEntity tileEntity = new Coord4D(pos, world).getTileEntity(world); - if(neighborBlock == this && tileEntity instanceof IMultiblock) + if(tileEntity instanceof IMultiblock) { - ((IMultiblock)tileEntity).update(); + ((IMultiblock)tileEntity).doUpdate(); } if(tileEntity instanceof TileEntityBasicBlock) @@ -218,182 +238,61 @@ public abstract class BlockBasic extends Block implements ICTMBlock//TODO? imple if(tileEntity instanceof IStructuralMultiblock) { - ((IStructuralMultiblock)tileEntity).update(); + ((IStructuralMultiblock)tileEntity).doUpdate(); } } } - -/* + @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister register) + public float getExplosionResistance(World world, BlockPos pos, Entity exploder, Explosion explosion) + { + BasicBlockType type = BasicBlockType.get(getBasicBlock(), getMetaFromState(world.getBlockState(pos))); + + if(type == BasicBlockType.REFINED_OBSIDIAN) + { + return 4000F; + } + + return blockResistance; + } + + public void initCTMs() { - switch(blockType) + switch(getBasicBlock()) { case BASIC_BLOCK_1: - ctms[7][0] = new CTMData("ctm/TeleporterFrame", this, Arrays.asList(7)).addOtherBlockConnectivities(MekanismBlocks.MachineBlock, Arrays.asList(11)).registerIcons(register); - ctms[9][0] = new CTMData("ctm/DynamicTank", this, Arrays.asList(9, 11)).registerIcons(register); - ctms[10][0] = new CTMData("ctm/StructuralGlass", this, Arrays.asList(10)).registerIcons(register); - ctms[11][0] = new CTMData("ctm/DynamicValve", this, Arrays.asList(11, 9)).registerIcons(register); + ctmData[7][0] = new CTMData(BasicBlockType.TELEPORTER_FRAME, MachineType.TELEPORTER); + ctmData[9][0] = new CTMData(BasicBlockType.DYNAMIC_TANK, BasicBlockType.DYNAMIC_VALVE); + ctmData[10][0] = new CTMData(BasicBlockType.STRUCTURAL_GLASS); + ctmData[11][0] = new CTMData(BasicBlockType.DYNAMIC_TANK, BasicBlockType.DYNAMIC_VALVE); - ctms[14][0] = new CTMData("ctm/ThermalEvaporationBlock", this, Arrays.asList(14, 15)).addOtherBlockConnectivities(MekanismBlocks.BasicBlock2, Arrays.asList(0)).addFacingOverride("ctm/ThermalEvaporationController").registerIcons(register); - ctms[14][1] = new CTMData("ctm/ThermalEvaporationBlock", this, Arrays.asList(14, 15)).addOtherBlockConnectivities(MekanismBlocks.BasicBlock2, Arrays.asList(0)).addFacingOverride("ctm/ThermalEvaporationControllerOn").registerIcons(register); - ctms[15][0] = new CTMData("ctm/ThermalEvaporationValve", this, Arrays.asList(15, 14)).addOtherBlockConnectivities(MekanismBlocks.BasicBlock2, Arrays.asList(0)).registerIcons(register); + ctmData[14][0] = new CTMData(BasicBlockType.THERMAL_EVAPORATION_BLOCK, BasicBlockType.THERMAL_EVAPORATION_VALVE, BasicBlockType.THERMAL_EVAPORATION_CONTROLLER); + ctmData[14][1] = new CTMData(BasicBlockType.THERMAL_EVAPORATION_BLOCK, BasicBlockType.THERMAL_EVAPORATION_VALVE, BasicBlockType.THERMAL_EVAPORATION_CONTROLLER); + ctmData[15][0] = new CTMData(BasicBlockType.THERMAL_EVAPORATION_BLOCK, BasicBlockType.THERMAL_EVAPORATION_VALVE, BasicBlockType.THERMAL_EVAPORATION_CONTROLLER); - icons[0][0] = register.registerIcon("mekanism:OsmiumBlock"); - icons[1][0] = register.registerIcon("mekanism:BronzeBlock"); - icons[2][0] = register.registerIcon("mekanism:RefinedObsidian"); - icons[3][0] = register.registerIcon("mekanism:CoalBlock"); - icons[4][0] = register.registerIcon("mekanism:RefinedGlowstone"); - icons[5][0] = register.registerIcon("mekanism:SteelBlock"); - icons[6][0] = register.registerIcon(ICON_BASE); - - MekanismRenderer.loadDynamicTextures(register, "bin/BinBasic", binIcons[0], new DefIcon(register.registerIcon("mekanism:bin/BinBasicTop"), 0), new DefIcon(register.registerIcon("mekanism:bin/BinBasicTopOn"), 6)); - MekanismRenderer.loadDynamicTextures(register, "bin/BinAdvanced", binIcons[1], new DefIcon(register.registerIcon("mekanism:bin/BinAdvancedTop"), 0), new DefIcon(register.registerIcon("mekanism:bin/BinAdvancedTopOn"), 6)); - MekanismRenderer.loadDynamicTextures(register, "bin/BinElite", binIcons[2], new DefIcon(register.registerIcon("mekanism:bin/BinEliteTop"), 0), new DefIcon(register.registerIcon("mekanism:bin/BinEliteTopOn"), 6)); - MekanismRenderer.loadDynamicTextures(register, "bin/BinUltimate", binIcons[3], new DefIcon(register.registerIcon("mekanism:bin/BinUltimateTop"), 0), new DefIcon(register.registerIcon("mekanism:bin/BinUltimateTopOn"), 6)); - - icons[7][0] = ctms[7][0].mainTextureData.icon; - icons[8][0] = register.registerIcon("mekanism:SteelCasing"); - icons[9][0] = ctms[9][0].mainTextureData.icon; - icons[10][0] = ctms[10][0].mainTextureData.icon; - icons[11][0] = ctms[11][0].mainTextureData.icon; - icons[12][0] = register.registerIcon("mekanism:CopperBlock"); - icons[13][0] = register.registerIcon("mekanism:TinBlock"); - icons[14][0] = ctms[14][0].facingOverride.icon; - icons[14][1] = ctms[14][1].facingOverride.icon; - icons[14][2] = ctms[14][0].mainTextureData.icon; - icons[15][0] = ctms[15][0].mainTextureData.icon; break; case BASIC_BLOCK_2: - ctms[0][0] = new CTMData("ctm/ThermalEvaporationBlock", this, Arrays.asList(0)).addOtherBlockConnectivities(MekanismBlocks.BasicBlock, Arrays.asList(14, 15)).registerIcons(register); - ctms[1][0] = new CTMData("ctm/InductionCasing", this, Arrays.asList(1, 2)).registerIcons(register); - ctms[2][0] = new CTMData("ctm/InductionPortInput", this, Arrays.asList(1, 2)).registerIcons(register); - ctms[2][1] = new CTMData("ctm/InductionPortOutput", this, Arrays.asList(1, 2)).registerIcons(register); - ctms[3][0] = new CTMData("ctm/InductionCellBasic", this, Arrays.asList(3, 4)).registerIcons(register).setRenderConvexConnections(); - ctms[3][1] = new CTMData("ctm/InductionCellAdvanced", this, Arrays.asList(3, 4)).registerIcons(register).setRenderConvexConnections(); - ctms[3][2] = new CTMData("ctm/InductionCellElite", this, Arrays.asList(3, 4)).registerIcons(register).setRenderConvexConnections(); - ctms[3][3] = new CTMData("ctm/InductionCellUltimate", this, Arrays.asList(3, 4)).registerIcons(register).setRenderConvexConnections(); - ctms[4][0] = new CTMData("ctm/InductionProviderBasic", this, Arrays.asList(3, 4)).registerIcons(register).setRenderConvexConnections(); - ctms[4][1] = new CTMData("ctm/InductionProviderAdvanced", this, Arrays.asList(3, 4)).registerIcons(register).setRenderConvexConnections(); - ctms[4][2] = new CTMData("ctm/InductionProviderElite", this, Arrays.asList(3, 4)).registerIcons(register).setRenderConvexConnections(); - ctms[4][3] = new CTMData("ctm/InductionProviderUltimate", this, Arrays.asList(3, 4)).registerIcons(register).setRenderConvexConnections(); - ctms[5][0] = new CTMData("ctm/SuperheatingElement", this, Arrays.asList(5)).registerIcons(register).setRenderConvexConnections(); - ctms[5][1] = new CTMData("ctm/SuperheatingElementOn", this, Arrays.asList(5)).registerIcons(register).setRenderConvexConnections(); - ctms[7][0] = new CTMData("ctm/BoilerCasing", this, Arrays.asList(7, 8)).registerIcons(register); - ctms[8][0] = new CTMData("ctm/BoilerValve", this, Arrays.asList(7, 8)).registerIcons(register); - - icons[6][0] = register.registerIcon("mekanism:PressureDisperser"); - - icons[0][0] = ctms[0][0].mainTextureData.icon; - icons[1][0] = ctms[1][0].mainTextureData.icon; - icons[2][0] = ctms[2][0].mainTextureData.icon; - icons[2][1] = ctms[2][1].mainTextureData.icon; - icons[3][0] = ctms[3][0].mainTextureData.icon; - icons[3][1] = ctms[3][1].mainTextureData.icon; - icons[3][2] = ctms[3][2].mainTextureData.icon; - icons[3][3] = ctms[3][3].mainTextureData.icon; - icons[4][0] = ctms[4][0].mainTextureData.icon; - icons[4][1] = ctms[4][1].mainTextureData.icon; - icons[4][2] = ctms[4][2].mainTextureData.icon; - icons[4][3] = ctms[4][3].mainTextureData.icon; - icons[5][0] = ctms[5][0].mainTextureData.icon; - icons[5][1] = ctms[5][1].mainTextureData.icon; - icons[7][0] = ctms[7][0].mainTextureData.icon; - icons[8][0] = ctms[8][0].mainTextureData.icon; - - icons[9][0] = register.registerIcon(ICON_BASE); - + ctmData[0][0] = new CTMData(BasicBlockType.THERMAL_EVAPORATION_BLOCK, BasicBlockType.THERMAL_EVAPORATION_VALVE, BasicBlockType.THERMAL_EVAPORATION_CONTROLLER); + ctmData[1][0] = new CTMData(BasicBlockType.INDUCTION_CASING, BasicBlockType.INDUCTION_PORT); + ctmData[2][0] = new CTMData(BasicBlockType.INDUCTION_CASING, BasicBlockType.INDUCTION_PORT); + ctmData[2][1] = new CTMData(BasicBlockType.INDUCTION_CASING, BasicBlockType.INDUCTION_PORT); + ctmData[3][0] = new CTMData(BasicBlockType.INDUCTION_CELL, BasicBlockType.INDUCTION_PROVIDER).setRenderConvexConnections(); + ctmData[3][1] = new CTMData(BasicBlockType.INDUCTION_CELL, BasicBlockType.INDUCTION_PROVIDER).setRenderConvexConnections(); + ctmData[3][2] = new CTMData(BasicBlockType.INDUCTION_CELL, BasicBlockType.INDUCTION_PROVIDER).setRenderConvexConnections(); + ctmData[3][3] = new CTMData(BasicBlockType.INDUCTION_CELL, BasicBlockType.INDUCTION_PROVIDER).setRenderConvexConnections(); + ctmData[4][0] = new CTMData(BasicBlockType.INDUCTION_CELL, BasicBlockType.INDUCTION_PROVIDER).setRenderConvexConnections(); + ctmData[4][1] = new CTMData(BasicBlockType.INDUCTION_CELL, BasicBlockType.INDUCTION_PROVIDER).setRenderConvexConnections(); + ctmData[4][2] = new CTMData(BasicBlockType.INDUCTION_CELL, BasicBlockType.INDUCTION_PROVIDER).setRenderConvexConnections(); + ctmData[4][3] = new CTMData(BasicBlockType.INDUCTION_CELL, BasicBlockType.INDUCTION_PROVIDER).setRenderConvexConnections(); + ctmData[5][0] = new CTMData(BasicBlockType.SUPERHEATING_ELEMENT).setRenderConvexConnections(); + ctmData[5][1] = new CTMData(BasicBlockType.SUPERHEATING_ELEMENT).setRenderConvexConnections(); + ctmData[7][0] = new CTMData(BasicBlockType.BOILER_CASING, BasicBlockType.BOILER_VALVE); + ctmData[8][0] = new CTMData(BasicBlockType.BOILER_CASING, BasicBlockType.BOILER_VALVE); + break; } } - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(IBlockAccess world, BlockPos pos, int side) - { - int meta = world.getBlockMetadata(pos); - - switch(blockType) - { - case BASIC_BLOCK_1: - switch(meta) - { - case 6: - TileEntityBin tileEntity = (TileEntityBin)world.getTileEntity(pos); - - boolean active = MekanismUtils.isActive(world, pos); - return binIcons[tileEntity.tier.ordinal()][MekanismUtils.getBaseOrientation(side, tileEntity.facing)+(active ? 6 : 0)]; - case 14: - TileEntityThermalEvaporationController tileEntity1 = (TileEntityThermalEvaporationController)world.getTileEntity(pos); - - if(side == tileEntity1.facing) - { - return MekanismUtils.isActive(world, pos) ? icons[meta][1] : icons[meta][0]; - } - else { - return icons[meta][2]; - } - default: - return getIcon(side, meta); - } - case BASIC_BLOCK_2: - switch(meta) - { - case 2: - TileEntityInductionPort tileEntity = (TileEntityInductionPort)world.getTileEntity(pos); - return icons[meta][tileEntity.mode ? 1 : 0]; - case 3: - TileEntityInductionCell tileEntity1 = (TileEntityInductionCell)world.getTileEntity(pos); - return icons[meta][tileEntity1.tier.ordinal()]; - case 4: - TileEntityInductionProvider tileEntity2 = (TileEntityInductionProvider)world.getTileEntity(pos); - return icons[meta][tileEntity2.tier.ordinal()]; - case 5: - TileEntitySuperheatingElement element = (TileEntitySuperheatingElement)world.getTileEntity(x, y, z); - - if(element.multiblockUUID != null && SynchronizedBoilerData.clientHotMap.get(element.multiblockUUID) != null) - { - return icons[meta][SynchronizedBoilerData.clientHotMap.get(element.multiblockUUID) ? 1 : 0]; - } - - return icons[meta][0]; - default: - return getIcon(side, meta); - } - } - - return null; - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta) - { - switch(blockType) - { - case BASIC_BLOCK_1: - switch(meta) - { - case 14: - if(side == 2) - { - return icons[meta][0]; - } - else { - return icons[meta][2]; - } - default: - return icons[meta][0]; - } - case BASIC_BLOCK_2: - return icons[meta][0]; - default: - return icons[meta][0]; - } - } -*/ - @Override public int damageDropped(IBlockState state) { @@ -803,6 +702,12 @@ public abstract class BlockBasic extends Block implements ICTMBlock//TODO? imple { return false; } + + @Override + public boolean isFullCube() + { + return false; + } @Override public int getRenderType() @@ -862,20 +767,6 @@ public abstract class BlockBasic extends Block implements ICTMBlock//TODO? imple return type != null && type.tileEntityClass != null; } - - @Override - public void onBlockAdded(World world, BlockPos pos, IBlockState state) - { - TileEntity tileEntity = world.getTileEntity(pos); - - if(!world.isRemote) - { - if(tileEntity instanceof TileEntityBasicBlock) - { - ((TileEntityBasicBlock)tileEntity).onAdded(); - } - } - } @Override public TileEntity createTileEntity(World world, IBlockState state) @@ -884,7 +775,7 @@ public abstract class BlockBasic extends Block implements ICTMBlock//TODO? imple { return null; } - + return BasicBlockType.get(state).create(); } @@ -897,7 +788,7 @@ public abstract class BlockBasic extends Block implements ICTMBlock//TODO? imple int side = MathHelper.floor_double((placer.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; int height = Math.round(placer.rotationPitch); int change = 3; - + if(tileEntity.canSetFacing(0) && tileEntity.canSetFacing(1)) { if(height >= 65) @@ -945,12 +836,12 @@ public abstract class BlockBasic extends Block implements ICTMBlock//TODO? imple if(tileEntity instanceof IMultiblock) { - ((IMultiblock)tileEntity).update(); + ((IMultiblock)tileEntity).doUpdate(); } if(tileEntity instanceof IStructuralMultiblock) { - ((IStructuralMultiblock)tileEntity).update(); + ((IStructuralMultiblock)tileEntity).doUpdate(); } } } @@ -1058,22 +949,20 @@ public abstract class BlockBasic extends Block implements ICTMBlock//TODO? imple return itemStack; } -/* @Override @SideOnly(Side.CLIENT) - public boolean shouldSideBeRendered(IBlockAccess world, BlockPos pos, int side) + public boolean shouldSideBeRendered(IBlockAccess world, BlockPos pos, EnumFacing side) { - Coord4D obj = new Coord4D(pos).offset(EnumFacing.getFront(side).getOpposite()); + BlockPos offsetPos = pos.offset(side.getOpposite()); - if(BasicBlockType.get(this, world.getBlockMetadata(x, y, z)) == BasicBlockType.STRUCTURAL_GLASS) + if(BasicBlockType.get(world.getBlockState(offsetPos)) == BasicBlockType.STRUCTURAL_GLASS) { - return ctms[10][0].shouldRenderSide(world, pos, side); + return ctmData[10][0].shouldRenderSide(world, pos, side); } else { return super.shouldSideBeRendered(world, pos, side); } } -*/ @Override public EnumFacing[] getValidRotations(World world, BlockPos pos) @@ -1115,41 +1004,45 @@ public abstract class BlockBasic extends Block implements ICTMBlock//TODO? imple return false; } - -/* + @Override - public CTMData getCTMData(IBlockAccess world, BlockPos pos, int meta) + public CTMData getCTMData(IBlockState state) { - if(ctms[meta][1] != null && MekanismUtils.isActive(world, pos)) + return ctmData[getMetaFromState(state)][0]; + } + + @Override + public String getOverrideTexture(IBlockState state, EnumFacing side) + { + BasicBlockType type = state.getValue(getBasicBlock().getProperty()); + + if(type == BasicBlockType.INDUCTION_CELL || type == BasicBlockType.INDUCTION_PROVIDER) { - return ctms[meta][1]; + return type.getName() + "_" + state.getValue(BlockStateBasic.tierProperty).getName(); } - BasicBlockType type = BasicBlockType.get(this, world.getBlockMetadata(x, y, z)); - - if(type == BasicBlockType.INDUCTION_CELL) + if(type == BasicBlockType.THERMAL_EVAPORATION_CONTROLLER) { - TileEntityInductionCell tileEntity = (TileEntityInductionCell)world.getTileEntity(pos); - return ctms[meta][tileEntity.tier.ordinal()]; - } - else if(type == BasicBlockType.INDUCTION_PROVIDER) - { - TileEntityInductionProvider tileEntity = (TileEntityInductionProvider)world.getTileEntity(pos); - return ctms[meta][tileEntity.tier.ordinal()]; - } - else if(type == BasicType.SUPERHEATING_ELEMENT) - { - TileEntitySuperheatingElement element = (TileEntitySuperheatingElement)world.getTileEntity(x, y, z); - - if(element.multiblockUUID != null && SynchronizedBoilerData.clientHotMap.get(element.multiblockUUID) != null) + if(side == state.getValue(BlockStateFacing.facingProperty)) { - return ctms[meta][SynchronizedBoilerData.clientHotMap.get(element.multiblockUUID) ? 1 : 0]; + return type.getName() + (state.getValue(BlockStateBasic.activeProperty) ? "_on" : ""); + } + else { + return "thermal_evaporation_block"; } - - return ctms[meta][0]; } - - return ctms[meta][0]; + + if(type == BasicBlockType.INDUCTION_PORT) + { + return type.getName() + (state.getValue(BlockStateBasic.activeProperty) ? "_output" : ""); + } + + return null; + } + + @Override + public PropertyEnum getTypeProperty() + { + return getBasicBlock().getProperty(); } -*/ } \ No newline at end of file diff --git a/src/main/java/mekanism/common/block/BlockBounding.java b/src/main/java/mekanism/common/block/BlockBounding.java index 8e6593275..18e91d223 100644 --- a/src/main/java/mekanism/common/block/BlockBounding.java +++ b/src/main/java/mekanism/common/block/BlockBounding.java @@ -7,7 +7,6 @@ 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.BlockState; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; @@ -48,15 +47,6 @@ public class BlockBounding extends Block return isAdvanced ? 1 : 0; } -/* - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister register) - { - blockIcon = register.registerIcon(BlockBasic.ICON_BASE); - } -*/ - @Override public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer entityplayer, EnumFacing side, float hitX, float hitY, float hitZ) { @@ -146,7 +136,7 @@ public class BlockBounding extends Block { return false; } - + @Override public boolean isFullCube() { @@ -166,8 +156,7 @@ public class BlockBounding extends Block { return new TileEntityAdvancedBoundingBlock(); } - else - { + else { return new TileEntityBoundingBlock(); } } diff --git a/src/main/java/mekanism/common/block/BlockEnergyCube.java b/src/main/java/mekanism/common/block/BlockEnergyCube.java index 10cae981f..3cb529f1a 100644 --- a/src/main/java/mekanism/common/block/BlockEnergyCube.java +++ b/src/main/java/mekanism/common/block/BlockEnergyCube.java @@ -7,8 +7,8 @@ import mekanism.api.energy.IEnergizedItem; import mekanism.common.Mekanism; import mekanism.common.MekanismBlocks; import mekanism.common.Tier.EnergyCubeTier; -import mekanism.common.base.IEnergyCube; import mekanism.common.base.ISustainedInventory; +import mekanism.common.base.ITierItem; import mekanism.common.block.states.BlockStateEnergyCube; import mekanism.common.block.states.BlockStateFacing; import mekanism.common.item.ItemBlockEnergyCube; @@ -165,10 +165,10 @@ public class BlockEnergyCube extends BlockContainer for(EnergyCubeTier tier : EnergyCubeTier.values()) { ItemStack discharged = new ItemStack(this); - ((ItemBlockEnergyCube)discharged.getItem()).setEnergyCubeTier(discharged, tier); + ((ItemBlockEnergyCube)discharged.getItem()).setBaseTier(discharged, tier.getBaseTier()); list.add(discharged); ItemStack charged = new ItemStack(this); - ((ItemBlockEnergyCube)charged.getItem()).setEnergyCubeTier(charged, tier); + ((ItemBlockEnergyCube)charged.getItem()).setBaseTier(charged, tier.getBaseTier()); ((ItemBlockEnergyCube)charged.getItem()).setEnergy(charged, tier.maxEnergy); list.add(charged); } @@ -301,8 +301,8 @@ public class BlockEnergyCube extends BlockContainer } } - IEnergyCube energyCube = (IEnergyCube)itemStack.getItem(); - energyCube.setEnergyCubeTier(itemStack, tileEntity.tier); + ITierItem tierItem = (ITierItem)itemStack.getItem(); + tierItem.setBaseTier(itemStack, tileEntity.tier.getBaseTier()); IEnergizedItem energizedItem = (IEnergizedItem)itemStack.getItem(); energizedItem.setEnergy(itemStack, tileEntity.electricityStored); diff --git a/src/main/java/mekanism/common/block/BlockMachine.java b/src/main/java/mekanism/common/block/BlockMachine.java index c0b22aa78..24e8dad45 100644 --- a/src/main/java/mekanism/common/block/BlockMachine.java +++ b/src/main/java/mekanism/common/block/BlockMachine.java @@ -9,6 +9,9 @@ import mekanism.api.MekanismConfig.client; import mekanism.api.MekanismConfig.general; import mekanism.api.energy.IEnergizedItem; import mekanism.api.energy.IStrictEnergyStorage; +import mekanism.client.render.ctm.CTMBlockRenderContext; +import mekanism.client.render.ctm.CTMData; +import mekanism.client.render.ctm.ICTMBlock; import mekanism.common.Mekanism; import mekanism.common.Tier.BaseTier; import mekanism.common.Tier.FluidTankTier; @@ -24,6 +27,8 @@ import mekanism.common.base.ISustainedInventory; import mekanism.common.base.ISustainedTank; import mekanism.common.base.ITierItem; import mekanism.common.base.IUpgradeTile; +import mekanism.common.block.states.BlockStateBasic; +import mekanism.common.block.states.BlockStateBasic.BasicBlockType; import mekanism.common.block.states.BlockStateFacing; import mekanism.common.block.states.BlockStateMachine; import mekanism.common.block.states.BlockStateMachine.MachineBlock; @@ -71,6 +76,7 @@ import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.Explosion; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import net.minecraftforge.common.property.IExtendedBlockState; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidRegistry; @@ -124,9 +130,9 @@ import buildcraft.api.tools.IToolWrench; * @author AidanBrady * */ -public abstract class BlockMachine extends BlockContainer implements ISpecialBounds//, IBlockCTM, ICustomBlockIcon +public abstract class BlockMachine extends BlockContainer implements ISpecialBounds, ICTMBlock//, ICustomBlockIcon { - //public CTMData[][] ctms = new CTMData[16][4]; + public CTMData[][] ctmData = new CTMData[16][4]; public BlockMachine() { @@ -134,6 +140,8 @@ public abstract class BlockMachine extends BlockContainer implements ISpecialBou setHardness(3.5F); setResistance(16F); setCreativeTab(Mekanism.tabMekanism); + + initCTMs(); } public static BlockMachine getBlockMachine(MachineBlock block) @@ -149,6 +157,21 @@ public abstract class BlockMachine extends BlockContainer implements ISpecialBou } public abstract MachineBlock getMachineBlock(); + + @SideOnly(Side.CLIENT) + @Override + public IBlockState getExtendedState(IBlockState stateIn, IBlockAccess w, BlockPos pos) + { + if(stateIn.getBlock() == null || stateIn.getBlock().getMaterial() == Material.air) + { + return stateIn; + } + + IExtendedBlockState state = (IExtendedBlockState)stateIn; + CTMBlockRenderContext ctx = new CTMBlockRenderContext(w, pos); + + return state.withProperty(BlockStateBasic.ctmProperty, ctx); + } public BlockState createBlockState() { @@ -202,88 +225,18 @@ public abstract class BlockMachine extends BlockContainer implements ISpecialBou return state; } - -/* - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister register) + + public void initCTMs() { - BASE_ICON = register.registerIcon("mekanism:SteelCasing"); - DefIcon def = DefIcon.getAll(BASE_ICON).setOverrides(false); - - switch(blockType) + switch(getMachineBlock()) { case MACHINE_BLOCK_1: - ctms[11][0] = new CTMData("ctm/Teleporter", this, Arrays.asList(11)).addOtherBlockConnectivities(MekanismBlocks.BasicBlock, Arrays.asList(7)).registerIcons(register); - - MekanismRenderer.loadDynamicTextures(register, "enrichment_chamber/" + MachineType.ENRICHMENT_CHAMBER.name, icons[0], def); - MekanismRenderer.loadDynamicTextures(register, "osmium_compressor/" + MachineType.OSMIUM_COMPRESSOR.name, icons[1], def); - MekanismRenderer.loadDynamicTextures(register, "combiner/" + MachineType.COMBINER.name, icons[2], def); - MekanismRenderer.loadDynamicTextures(register, "crusher/" + MachineType.CRUSHER.name, icons[3], def); - - for(RecipeType type : RecipeType.values()) - { - MekanismRenderer.loadDynamicTextures(register, "factory/basic/" + type.getUnlocalizedName().toLowerCase() + "/" + BaseTier.BASIC.getName() + type.getUnlocalizedName() + MachineType.BASIC_FACTORY.name, factoryIcons[0][type.ordinal()], - DefIcon.getActivePair(register.registerIcon("mekanism:factory/basic/BasicFactoryFront"), 2).setOverrides(false), - DefIcon.getActivePair(register.registerIcon("mekanism:factory/basic/BasicFactoryTop"), 1).setOverrides(false), - DefIcon.getActivePair(register.registerIcon("mekanism:factory/basic/BasicFactoryBottom"), 0).setOverrides(false), - DefIcon.getActivePair(register.registerIcon("mekanism:factory/basic/BasicFactorySide"), 3, 4, 5).setOverrides(false)); - MekanismRenderer.loadDynamicTextures(register, "factory/advanced/" + type.getUnlocalizedName().toLowerCase() + "/" + BaseTier.ADVANCED.getName() + type.getUnlocalizedName() + MachineType.ADVANCED_FACTORY.name, factoryIcons[1][type.ordinal()], - DefIcon.getActivePair(register.registerIcon("mekanism:factory/advanced/AdvancedFactoryFront"), 2).setOverrides(false), - DefIcon.getActivePair(register.registerIcon("mekanism:factory/advanced/AdvancedFactoryTop"), 1).setOverrides(false), - DefIcon.getActivePair(register.registerIcon("mekanism:factory/advanced/AdvancedFactoryBottom"), 0).setOverrides(false), - DefIcon.getActivePair(register.registerIcon("mekanism:factory/advanced/AdvancedFactorySide"), 3, 4, 5).setOverrides(false)); - MekanismRenderer.loadDynamicTextures(register, "factory/elite/" + type.getUnlocalizedName().toLowerCase() + "/" + BaseTier.ELITE.getName() + type.getUnlocalizedName() + MachineType.ELITE_FACTORY.name, factoryIcons[2][type.ordinal()], - DefIcon.getActivePair(register.registerIcon("mekanism:factory/elite/EliteFactoryFront"), 2).setOverrides(false), - DefIcon.getActivePair(register.registerIcon("mekanism:factory/elite/EliteFactoryTop"), 1).setOverrides(false), - DefIcon.getActivePair(register.registerIcon("mekanism:factory/elite/EliteFactoryBottom"), 0).setOverrides(false), - DefIcon.getActivePair(register.registerIcon("mekanism:factory/elite/EliteFactorySide"), 3, 4, 5).setOverrides(false)); - } - - MekanismRenderer.loadDynamicTextures(register, "purification_chamber/" + MachineType.PURIFICATION_CHAMBER.name, icons[9], def); - MekanismRenderer.loadDynamicTextures(register, "energized_smelter/" + MachineType.ENERGIZED_SMELTER.name, icons[10], def); - icons[11][0] = ctms[11][0].mainTextureData.icon; - - break; - case MACHINE_BLOCK_2: - MekanismRenderer.loadDynamicTextures(register, "chemical_injection_chamber/" + MachineType.CHEMICAL_INJECTION_CHAMBER.name, icons[3], def); - MekanismRenderer.loadDynamicTextures(register, "precision_sawmill/" + MachineType.PRECISION_SAWMILL.name, icons[5], def); - - break; - case MACHINE_BLOCK_3: - icons[0][0] = BASE_ICON; - icons[2][0] = BASE_ICON; - MekanismRenderer.loadDynamicTextures(register, "oredictionificator/" + MachineType.OREDICTIONIFICATOR.name, icons[3]); - icons[4][0] = BASE_ICON; - MekanismRenderer.loadDynamicTextures(register, "formulaic_assemblicator/" + MachineType.FORMULAIC_ASSEMBLICATOR.name, icons[5]); - MekanismRenderer.loadDynamicTextures(register, "fuelwood_heater/" + MachineType.FUELWOOD_HEATER.name, icons[6]); + ctmData[11][0] = new CTMData(BasicBlockType.TELEPORTER_FRAME, MachineType.TELEPORTER); break; + default: } } - - @Override - public IIcon getIcon(ItemStack stack, int side) - { - MachineType type = MachineType.get(stack); - ItemBlockMachine item = (ItemBlockMachine)stack.getItem(); - - if(type == MachineType.BASIC_FACTORY) - { - return factoryIcons[0][item.getRecipeType(stack)][side]; - } - else if(type == MachineType.ADVANCED_FACTORY) - { - return factoryIcons[1][item.getRecipeType(stack)][side]; - } - else if(type == MachineType.ELITE_FACTORY) - { - return factoryIcons[2][item.getRecipeType(stack)][side]; - } - - return getIcon(side, stack.getItemDamage()); - } -*/ @Override public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) @@ -374,6 +327,11 @@ public abstract class BlockMachine extends BlockContainer implements ISpecialBou public void randomDisplayTick(World world, BlockPos pos, IBlockState state, Random random) { TileEntityBasicBlock tileEntity = (TileEntityBasicBlock)world.getTileEntity(pos); + + if(tileEntity instanceof TileEntityFluidTank) + { + return; + } if(MekanismUtils.isActive(world, pos) && ((IActiveState)tileEntity).renderUpdate() && client.machineEffects) { @@ -431,107 +389,6 @@ public abstract class BlockMachine extends BlockContainer implements ISpecialBou return 0; } -/* - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta) - { - switch(blockType) - { - case MACHINE_BLOCK_1: - switch(meta) - { - case 0: - case 1: - case 2: - case 3: - case 9: - case 10: - return icons[meta][side]; - default: - return icons[meta][0] != null ? icons[meta][0] : BASE_ICON; - } - case MACHINE_BLOCK_2: - switch(meta) - { - case 3: - case 5: - return icons[meta][side]; - default: - return icons[meta][0] != null ? icons[meta][0] : BASE_ICON; - } - case MACHINE_BLOCK_3: - switch(meta) - { - case 3: - case 5: - case 6: - return icons[meta][side]; - default: - return icons[meta][0] != null ? icons[meta][0] : BASE_ICON; - } - default: - return BASE_ICON; - } - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(IBlockAccess world, BlockPos pos, int side) - { - int meta = world.getBlockMetadata(pos); - TileEntityBasicBlock tileEntity = (TileEntityBasicBlock)world.getTileEntity(pos); - - switch(blockType) - { - case MACHINE_BLOCK_1: - switch(meta) - { - case 0: - case 1: - case 2: - case 3: - case 9: - case 10: - boolean active = MekanismUtils.isActive(world, pos); - return icons[meta][MekanismUtils.getBaseOrientation(side, tileEntity.facing)+(active ? 6 : 0)]; - case 5: - case 6: - case 7: - TileEntityFactory factory = (TileEntityFactory)tileEntity; - active = MekanismUtils.isActive(world, pos); - - return factoryIcons[factory.tier.ordinal()][factory.recipeType.ordinal()][MekanismUtils.getBaseOrientation(side, tileEntity.facing)+(active ? 6 : 0)]; - default: - return icons[meta][0]; - } - case MACHINE_BLOCK_2: - switch(meta) - { - case 3: - case 5: - boolean active = MekanismUtils.isActive(world, pos); - return icons[meta][MekanismUtils.getBaseOrientation(side, tileEntity.facing)+(active ? 6 : 0)]; - default: - return icons[meta][0]; - } - case MACHINE_BLOCK_3: - switch(meta) - { - case 3: - case 5: - case 6: - boolean active = MekanismUtils.isActive(world, pos); - return icons[meta][MekanismUtils.getBaseOrientation(side, tileEntity.facing)+(active ? 6 : 0)]; - default: - return icons[meta][0]; - } - } - - return null; - } -*/ - @Override public int damageDropped(IBlockState state) { @@ -573,15 +430,12 @@ public abstract class BlockMachine extends BlockContainer implements ISpecialBou { for(Fluid f : FluidRegistry.getRegisteredFluids().values()) { - try - { //Prevent bad IDs + try { //Prevent bad IDs ItemStack filled = new ItemStack(item, 1, type.meta); itemMachine.setBaseTier(filled, BaseTier.ULTIMATE); itemMachine.setFluidStack(new FluidStack(f, itemMachine.getCapacity(filled)), filled); list.add(filled); - } catch(Exception e) - { - } + } catch(Exception e) {} } } @@ -645,8 +499,8 @@ public abstract class BlockMachine extends BlockContainer implements ISpecialBou tileEntity.setFacing((short)change); world.notifyNeighborsOfStateChange(pos, this); - } else - { + } + else { SecurityUtils.displayNoAccess(entityplayer); } @@ -668,8 +522,8 @@ public abstract class BlockMachine extends BlockContainer implements ISpecialBou if(SecurityUtils.canAccess(entityplayer, tileEntity)) { MekanismUtils.openPersonalChestGui((EntityPlayerMP)entityplayer, chest, null, true); - } else - { + } + else { SecurityUtils.displayNoAccess(entityplayer); } @@ -689,12 +543,12 @@ public abstract class BlockMachine extends BlockContainer implements ISpecialBou entityplayer.inventory.markDirty(); return true; } - } else - { + } + else { entityplayer.openGui(Mekanism.instance, type.guiId, world, pos.getX(), pos.getY(), pos.getZ()); } - } else - { + } + else { SecurityUtils.displayNoAccess(entityplayer); } @@ -708,8 +562,8 @@ public abstract class BlockMachine extends BlockContainer implements ISpecialBou if(SecurityUtils.canAccess(entityplayer, tileEntity)) { LogisticalSorterGuiMessage.openServerGui(SorterGuiPacket.SERVER, 0, world, (EntityPlayerMP)entityplayer, Coord4D.get(tileEntity), -1); - } else - { + } + else { SecurityUtils.displayNoAccess(entityplayer); } @@ -726,8 +580,8 @@ public abstract class BlockMachine extends BlockContainer implements ISpecialBou if(owner == null || entityplayer.getName().equals(owner)) { entityplayer.openGui(Mekanism.instance, type.guiId, world, pos.getX(), pos.getY(), pos.getZ()); - } else - { + } + else { SecurityUtils.displayNoAccess(entityplayer); } @@ -760,6 +614,7 @@ public abstract class BlockMachine extends BlockContainer implements ISpecialBou public TileEntity createTileEntity(World world, IBlockState state) { int metadata = getMetaFromState(state); + if(BlockStateMachine.MachineType.get(getMachineBlock(), metadata) == null) { return null; @@ -1085,20 +940,6 @@ public abstract class BlockMachine extends BlockContainer implements ISpecialBou return super.getRenderColor(state); } - - @Override - public void onBlockAdded(World world, BlockPos pos, IBlockState state) - { - TileEntity tileEntity = world.getTileEntity(pos); - - if(!world.isRemote) - { - if(tileEntity instanceof TileEntityBasicBlock) - { - ((TileEntityBasicBlock)tileEntity).onAdded(); - } - } - } @Override public boolean canConnectRedstone(IBlockAccess world, BlockPos pos, EnumFacing side) @@ -1192,6 +1033,24 @@ public abstract class BlockMachine extends BlockContainer implements ISpecialBou return true; } } + + @Override + public CTMData getCTMData(IBlockState state) + { + return ctmData[getMetaFromState(state)][0]; + } + + @Override + public String getOverrideTexture(IBlockState state, EnumFacing side) + { + return null; + } + + @Override + public PropertyEnum getTypeProperty() + { + return getMachineBlock().getProperty(); + } @Override public void setRenderBounds(Block block, int metadata) {} @@ -1255,22 +1114,4 @@ public abstract class BlockMachine extends BlockContainer implements ISpecialBou return 0; } -/* - @Override - public CTMData getCTMData(IBlockAccess world, BlockPos pos, int meta) - { - if(ctms[meta][1] != null && MekanismUtils.isActive(world, pos)) - { - return ctms[meta][1]; - } - - return ctms[meta][0]; - } - - @Override - public boolean shouldRenderBlock(IBlockAccess world, BlockPos pos, int meta) - { - return !MachineType.get(this, meta).hasModel; - }*/ - } diff --git a/src/main/java/mekanism/common/block/BlockObsidianTNT.java b/src/main/java/mekanism/common/block/BlockObsidianTNT.java index 8a8845e4c..353cf2cfc 100644 --- a/src/main/java/mekanism/common/block/BlockObsidianTNT.java +++ b/src/main/java/mekanism/common/block/BlockObsidianTNT.java @@ -2,22 +2,17 @@ package mekanism.common.block; import mekanism.common.Mekanism; import mekanism.common.entity.EntityObsidianTNT; -import mekanism.common.tile.TileEntityObsidianTNT; import net.minecraft.block.Block; import net.minecraft.block.material.Material; - import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.projectile.EntityArrow; import net.minecraft.init.Items; -import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraft.world.Explosion; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class BlockObsidianTNT extends Block { diff --git a/src/main/java/mekanism/common/block/BlockOre.java b/src/main/java/mekanism/common/block/BlockOre.java index 7aee3d3df..40c4b62f5 100644 --- a/src/main/java/mekanism/common/block/BlockOre.java +++ b/src/main/java/mekanism/common/block/BlockOre.java @@ -5,14 +5,11 @@ import java.util.List; import mekanism.common.Mekanism; import mekanism.common.block.states.BlockStateOre; import mekanism.common.block.states.BlockStateOre.EnumOreType; -import mekanism.common.block.states.BlockStatePlastic; import net.minecraft.block.Block; import net.minecraft.block.material.Material; - import net.minecraft.block.state.BlockState; import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.EnumDyeColor; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.fml.relauncher.Side; diff --git a/src/main/java/mekanism/common/block/states/BlockStateBasic.java b/src/main/java/mekanism/common/block/states/BlockStateBasic.java index cecb506fb..f356dff36 100644 --- a/src/main/java/mekanism/common/block/states/BlockStateBasic.java +++ b/src/main/java/mekanism/common/block/states/BlockStateBasic.java @@ -1,7 +1,9 @@ package mekanism.common.block.states; +import mekanism.client.render.ctm.PropertyCTMRenderContext; import mekanism.common.Mekanism; import mekanism.common.MekanismBlocks; +import mekanism.common.Tier.BaseTier; import mekanism.common.block.BlockBasic; import mekanism.common.tile.TileEntityBin; import mekanism.common.tile.TileEntityBoilerCasing; @@ -42,10 +44,12 @@ import com.google.common.base.Predicates; public class BlockStateBasic extends ExtendedBlockState { public static final PropertyBool activeProperty = PropertyBool.create("active"); + public static final PropertyEnum tierProperty = PropertyEnum.create("tier", BaseTier.class, BaseTier.BASIC, BaseTier.ADVANCED, BaseTier.ELITE, BaseTier.ULTIMATE); + public static final PropertyCTMRenderContext ctmProperty = new PropertyCTMRenderContext(); public BlockStateBasic(BlockBasic block, PropertyEnum typeProperty) { - super(block, new IProperty[] {BlockStateFacing.facingProperty, typeProperty, activeProperty}, new IUnlistedProperty[] {BlockBasic.ctmProperty}); + super(block, new IProperty[] {BlockStateFacing.facingProperty, typeProperty, activeProperty, tierProperty}, new IUnlistedProperty[] {BlockStateBasic.ctmProperty}); } public static enum BasicBlock @@ -87,25 +91,25 @@ public class BlockStateBasic extends ExtendedBlockState COAL_BLOCK(BasicBlock.BASIC_BLOCK_1, 3, "CharcoalBlock", null, false, Predicates.alwaysFalse(), false, false), REFINED_GLOWSTONE(BasicBlock.BASIC_BLOCK_1, 4, "RefinedGlowstone", null, false, Predicates.alwaysFalse(), false, false), STEEL_BLOCK(BasicBlock.BASIC_BLOCK_1, 5, "SteelBlock", null, false, Predicates.alwaysFalse(), false, false), - BIN(BasicBlock.BASIC_BLOCK_1, 6, "Bin", TileEntityBin.class, false, Plane.HORIZONTAL, true, false), - TELEPORTER_FRAME(BasicBlock.BASIC_BLOCK_1, 7, "TeleporterFrame", null, false, Predicates.alwaysFalse(), false, true), - STEEL_CASING(BasicBlock.BASIC_BLOCK_1, 8, "SteelCasing", null, false, Predicates.alwaysFalse(), false, false), - DYNAMIC_TANK(BasicBlock.BASIC_BLOCK_1, 9, "DynamicTank", TileEntityDynamicTank.class, false, Predicates.alwaysFalse(), false, true), - STRUCTURAL_GLASS(BasicBlock.BASIC_BLOCK_1, 10, "StructuralGlass", TileEntityStructuralGlass.class, false, Predicates.alwaysFalse(), false, true), - DYNAMIC_VALVE(BasicBlock.BASIC_BLOCK_1, 11, "DynamicValve", TileEntityDynamicValve.class, false, Predicates.alwaysFalse(), false, true), + BIN(BasicBlock.BASIC_BLOCK_1, 6, "Bin", TileEntityBin.class, true, Plane.HORIZONTAL, true, true), + TELEPORTER_FRAME(BasicBlock.BASIC_BLOCK_1, 7, "TeleporterFrame", null, true, Predicates.alwaysFalse(), false, false), + STEEL_CASING(BasicBlock.BASIC_BLOCK_1, 8, "SteelCasing", null, true, Predicates.alwaysFalse(), false, false), + DYNAMIC_TANK(BasicBlock.BASIC_BLOCK_1, 9, "DynamicTank", TileEntityDynamicTank.class, true, Predicates.alwaysFalse(), false, false), + STRUCTURAL_GLASS(BasicBlock.BASIC_BLOCK_1, 10, "StructuralGlass", TileEntityStructuralGlass.class, true, Predicates.alwaysFalse(), false, false), + DYNAMIC_VALVE(BasicBlock.BASIC_BLOCK_1, 11, "DynamicValve", TileEntityDynamicValve.class, true, Predicates.alwaysFalse(), false, false), COPPER_BLOCK(BasicBlock.BASIC_BLOCK_1, 12, "CopperBlock", null, false, Predicates.alwaysFalse(), false, false), TIN_BLOCK(BasicBlock.BASIC_BLOCK_1, 13, "TinBlock", null, false, Predicates.alwaysFalse(), false, false), - THERMAL_EVAPORATION_CONTROLLER(BasicBlock.BASIC_BLOCK_1, 14, "ThermalEvaporationController", TileEntityThermalEvaporationController.class, false, Plane.HORIZONTAL, true, true), - THERMAL_EVAPORATION_VALVE(BasicBlock.BASIC_BLOCK_1, 15, "ThermalEvaporationValve", TileEntityThermalEvaporationValve.class, false, Predicates.alwaysFalse(), false, true), - THERMAL_EVAPORATION_BLOCK(BasicBlock.BASIC_BLOCK_2, 0, "ThermalEvaporationBlock", TileEntityThermalEvaporationBlock.class, false, Predicates.alwaysFalse(), false, true), - INDUCTION_CASING(BasicBlock.BASIC_BLOCK_2, 1, "InductionCasing", TileEntityInductionCasing.class, false, Predicates.alwaysFalse(), false, true), - INDUCTION_PORT(BasicBlock.BASIC_BLOCK_2, 2, "InductionPort", TileEntityInductionPort.class, false, Predicates.alwaysFalse(), false, true), - INDUCTION_CELL(BasicBlock.BASIC_BLOCK_2, 3, "InductionCell", TileEntityInductionCell.class, false, Predicates.alwaysFalse(), false, true), - INDUCTION_PROVIDER(BasicBlock.BASIC_BLOCK_2, 4, "InductionProvider", TileEntityInductionProvider.class, false, Predicates.alwaysFalse(), false, true), - SUPERHEATING_ELEMENT(BasicBlock.BASIC_BLOCK_2, 5, "SuperheatingElement", TileEntitySuperheatingElement.class, true, Predicates.alwaysFalse(), false, true), + THERMAL_EVAPORATION_CONTROLLER(BasicBlock.BASIC_BLOCK_1, 14, "ThermalEvaporationController", TileEntityThermalEvaporationController.class, true, Predicates.alwaysFalse(), false, false), + THERMAL_EVAPORATION_VALVE(BasicBlock.BASIC_BLOCK_1, 15, "ThermalEvaporationValve", TileEntityThermalEvaporationValve.class, true, Predicates.alwaysFalse(), false, false), + THERMAL_EVAPORATION_BLOCK(BasicBlock.BASIC_BLOCK_2, 0, "ThermalEvaporationBlock", TileEntityThermalEvaporationBlock.class, true, Predicates.alwaysFalse(), false, false), + INDUCTION_CASING(BasicBlock.BASIC_BLOCK_2, 1, "InductionCasing", TileEntityInductionCasing.class, true, Predicates.alwaysFalse(), false, false), + INDUCTION_PORT(BasicBlock.BASIC_BLOCK_2, 2, "InductionPort", TileEntityInductionPort.class, true, Predicates.alwaysFalse(), false, false), + INDUCTION_CELL(BasicBlock.BASIC_BLOCK_2, 3, "InductionCell", TileEntityInductionCell.class, true, Predicates.alwaysFalse(), false, true), + INDUCTION_PROVIDER(BasicBlock.BASIC_BLOCK_2, 4, "InductionProvider", TileEntityInductionProvider.class, true, Predicates.alwaysFalse(), false, true), + SUPERHEATING_ELEMENT(BasicBlock.BASIC_BLOCK_2, 5, "SuperheatingElement", TileEntitySuperheatingElement.class, true, Predicates.alwaysFalse(), false, false), PRESSURE_DISPERSER(BasicBlock.BASIC_BLOCK_2, 6, "PressureDisperser",TileEntityPressureDisperser.class, true, Predicates.alwaysFalse(), false, false), - BOILER_CASING(BasicBlock.BASIC_BLOCK_2, 7, "BoilerCasing", TileEntityBoilerCasing.class, true, Predicates.alwaysFalse(), false, true), - BOILER_VALVE(BasicBlock.BASIC_BLOCK_2, 8, "BoilerValve", TileEntityBoilerValve.class, true, Predicates.alwaysFalse(), false, true), + BOILER_CASING(BasicBlock.BASIC_BLOCK_2, 7, "BoilerCasing", TileEntityBoilerCasing.class, true, Predicates.alwaysFalse(), false, false), + BOILER_VALVE(BasicBlock.BASIC_BLOCK_2, 8, "BoilerValve", TileEntityBoilerValve.class, true, Predicates.alwaysFalse(), false, false), SECURITY_DESK(BasicBlock.BASIC_BLOCK_2, 9, "SecurityDesk", TileEntitySecurityDesk.class, true, Plane.HORIZONTAL, false, false); public BasicBlock blockType; @@ -116,9 +120,9 @@ public class BlockStateBasic extends ExtendedBlockState public boolean hasDescription; public Predicate facingPredicate; public boolean activable; - public boolean ctm; + public boolean tiers; - private BasicBlockType(BasicBlock block, int metadata, String s, Class tileClass, boolean hasDesc, Predicate facingAllowed, boolean activeState, boolean ctmTex) + private BasicBlockType(BasicBlock block, int metadata, String s, Class tileClass, boolean hasDesc, Predicate facingAllowed, boolean activeState, boolean t) { blockType = block; meta = metadata; @@ -127,7 +131,7 @@ public class BlockStateBasic extends ExtendedBlockState hasDescription = hasDesc; facingPredicate = facingAllowed; activable = activeState; - ctm = ctmTex; + tiers = t; } public static BasicBlockType get(IBlockState state) @@ -136,6 +140,7 @@ public class BlockStateBasic extends ExtendedBlockState { return state.getValue(((BlockBasic)state.getBlock()).getProperty()); } + return null; } @@ -154,16 +159,23 @@ public class BlockStateBasic extends ExtendedBlockState return null; } - public static BasicBlockType get(BasicBlock blockType, int metadata) + public static BasicBlockType get(BasicBlock blockType, int metadata) { BasicBlockType firstTry = values()[blockType.ordinal() << 4 | metadata]; + if(firstTry.blockType == blockType && firstTry.meta == metadata) + { return firstTry; + } + for(BasicBlockType type : values()) { if(type.blockType == blockType && type.meta == metadata) + { return type; + } } + return null; } @@ -234,6 +246,7 @@ public class BlockStateBasic extends ExtendedBlockState BlockBasic block = (BlockBasic)state.getBlock(); BasicBlockType type = state.getValue(block.getProperty()); StringBuilder builder = new StringBuilder(); + String nameOverride = null; if(type.hasActiveTexture()) { @@ -261,13 +274,20 @@ public class BlockStateBasic extends ExtendedBlockState return new ModelResourceLocation("builtin/missing", "missing"); } } + + if(type.tiers) + { + BaseTier tier = state.getValue(tierProperty); + + nameOverride = type.getName() + "_" + tier.getName(); + } if(builder.length() == 0) { builder.append("normal"); } - ResourceLocation baseLocation = new ResourceLocation("mekanism", type.getName()); + ResourceLocation baseLocation = new ResourceLocation("mekanism", nameOverride != null ? nameOverride : type.getName()); return new ModelResourceLocation(baseLocation, builder.toString()); } } diff --git a/src/main/java/mekanism/common/block/states/BlockStateBounding.java b/src/main/java/mekanism/common/block/states/BlockStateBounding.java index cc9aa31d6..f97a1d67d 100644 --- a/src/main/java/mekanism/common/block/states/BlockStateBounding.java +++ b/src/main/java/mekanism/common/block/states/BlockStateBounding.java @@ -1,8 +1,6 @@ package mekanism.common.block.states; -import mekanism.common.MekanismBlocks; import mekanism.common.block.BlockBounding; - import net.minecraft.block.properties.PropertyBool; import net.minecraft.block.state.BlockState; diff --git a/src/main/java/mekanism/common/block/states/BlockStateEnergyCube.java b/src/main/java/mekanism/common/block/states/BlockStateEnergyCube.java index bdc4e0809..504e30622 100644 --- a/src/main/java/mekanism/common/block/states/BlockStateEnergyCube.java +++ b/src/main/java/mekanism/common/block/states/BlockStateEnergyCube.java @@ -1,10 +1,7 @@ package mekanism.common.block.states; -import mekanism.common.MekanismBlocks; import mekanism.common.Tier; import mekanism.common.block.BlockEnergyCube; - -import net.minecraft.block.Block; import net.minecraft.block.properties.PropertyEnum; /** diff --git a/src/main/java/mekanism/common/block/states/BlockStateMachine.java b/src/main/java/mekanism/common/block/states/BlockStateMachine.java index 825caa203..55247b14f 100644 --- a/src/main/java/mekanism/common/block/states/BlockStateMachine.java +++ b/src/main/java/mekanism/common/block/states/BlockStateMachine.java @@ -55,6 +55,7 @@ import mekanism.common.tile.TileEntitySolarNeutronActivator; import mekanism.common.tile.TileEntityTeleporter; import mekanism.common.util.LangUtils; import net.minecraft.block.Block; +import net.minecraft.block.properties.IProperty; import net.minecraft.block.properties.PropertyBool; import net.minecraft.block.properties.PropertyEnum; import net.minecraft.block.state.IBlockState; @@ -66,11 +67,13 @@ import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumFacing.Plane; import net.minecraft.util.IStringSerializable; import net.minecraft.util.ResourceLocation; +import net.minecraftforge.common.property.ExtendedBlockState; +import net.minecraftforge.common.property.IUnlistedProperty; import com.google.common.base.Predicate; import com.google.common.base.Predicates; -public class BlockStateMachine extends BlockStateFacing +public class BlockStateMachine extends ExtendedBlockState { public static final PropertyBool activeProperty = PropertyBool.create("active"); public static final PropertyEnum tierProperty = PropertyEnum.create("tier", BaseTier.class); @@ -78,7 +81,7 @@ public class BlockStateMachine extends BlockStateFacing public BlockStateMachine(BlockMachine block, PropertyEnum typeProperty) { - super(block, typeProperty, activeProperty, tierProperty, recipeProperty); + super(block, new IProperty[] {BlockStateFacing.facingProperty, typeProperty, activeProperty, tierProperty, recipeProperty}, new IUnlistedProperty[] {BlockStateBasic.ctmProperty}); } public static enum MachineBlock @@ -149,13 +152,13 @@ public class BlockStateMachine extends BlockStateFacing LASER(MachineBlock.MACHINE_BLOCK_2, 13, "Laser", -1, TileEntityLaser.class, true, true, false, Predicates.alwaysTrue(), false), LASER_AMPLIFIER(MachineBlock.MACHINE_BLOCK_2, 14, "LaserAmplifier", 44, TileEntityLaserAmplifier.class, false, true, false, Predicates.alwaysTrue(), true), LASER_TRACTOR_BEAM(MachineBlock.MACHINE_BLOCK_2, 15, "LaserTractorBeam", 45, TileEntityLaserTractorBeam.class, false, true, false, Predicates.alwaysTrue(), true), - QUANTUM_ENTANGLOPORTER(MachineBlock.MACHINE_BLOCK_3, 0, "QuantumEntangloporter", 46, TileEntityQuantumEntangloporter.class, true, false, false, Plane.HORIZONTAL, true), + QUANTUM_ENTANGLOPORTER(MachineBlock.MACHINE_BLOCK_3, 0, "QuantumEntangloporter", 46, TileEntityQuantumEntangloporter.class, true, false, false, Predicates.alwaysTrue(), false), SOLAR_NEUTRON_ACTIVATOR(MachineBlock.MACHINE_BLOCK_3, 1, "SolarNeutronActivator", 47, TileEntitySolarNeutronActivator.class, false, true, false, Plane.HORIZONTAL, true), AMBIENT_ACCUMULATOR(MachineBlock.MACHINE_BLOCK_3, 2, "AmbientAccumulator", 48, TileEntityAmbientAccumulator.class, true, false, false, Predicates.alwaysFalse(), true), OREDICTIONIFICATOR(MachineBlock.MACHINE_BLOCK_3, 3, "Oredictionificator", 52, TileEntityOredictionificator.class, false, false, false, Plane.HORIZONTAL, true), - RESISTIVE_HEATER(MachineBlock.MACHINE_BLOCK_3, 4, "ResistiveHeater", 53, TileEntityResistiveHeater.class, true, false, false, Predicates.alwaysTrue(), true), - FORMULAIC_ASSEMBLICATOR(MachineBlock.MACHINE_BLOCK_3, 5, "FormulaicAssemblicator", 56, TileEntityFormulaicAssemblicator.class, true, false, true, Predicates.alwaysTrue(), true), - FUELWOOD_HEATER(MachineBlock.MACHINE_BLOCK_3, 6, "FuelwoodHeater", 58, TileEntityFuelwoodHeater.class, false, false, false, Predicates.alwaysTrue(), true); + RESISTIVE_HEATER(MachineBlock.MACHINE_BLOCK_3, 4, "ResistiveHeater", 53, TileEntityResistiveHeater.class, true, false, false, Plane.HORIZONTAL, true), + FORMULAIC_ASSEMBLICATOR(MachineBlock.MACHINE_BLOCK_3, 5, "FormulaicAssemblicator", 56, TileEntityFormulaicAssemblicator.class, true, false, true, Plane.HORIZONTAL, true), + FUELWOOD_HEATER(MachineBlock.MACHINE_BLOCK_3, 6, "FuelwoodHeater", 58, TileEntityFuelwoodHeater.class, false, false, false, Plane.HORIZONTAL, true); public MachineBlock typeBlock; public int meta; @@ -210,7 +213,7 @@ public class BlockStateMachine extends BlockStateFacing for(MachineType type : MachineType.values()) { - if(type != QUANTUM_ENTANGLOPORTER && type != AMBIENT_ACCUMULATOR) + if(type.isValidMachine()) { ret.add(type); } @@ -218,6 +221,11 @@ public class BlockStateMachine extends BlockStateFacing return ret; } + + public boolean isValidMachine() + { + return this != AMBIENT_ACCUMULATOR; + } public static MachineType get(Block block, int meta) { @@ -400,7 +408,7 @@ public class BlockStateMachine extends BlockStateFacing @Override public boolean apply(MachineType input) { - return input.typeBlock == machineBlock; + return input.typeBlock == machineBlock && input.isValidMachine(); } } @@ -423,7 +431,7 @@ public class BlockStateMachine extends BlockStateFacing if(type.hasRotations()) { - EnumFacing facing = state.getValue(facingProperty); + EnumFacing facing = state.getValue(BlockStateFacing.facingProperty); if(type.canRotateTo(facing)) { @@ -432,7 +440,7 @@ public class BlockStateMachine extends BlockStateFacing builder.append(","); } - builder.append(facingProperty.getName()); + builder.append(BlockStateFacing.facingProperty.getName()); builder.append("="); builder.append(facing.getName()); } diff --git a/src/main/java/mekanism/common/block/states/BlockStateOre.java b/src/main/java/mekanism/common/block/states/BlockStateOre.java index e632fcc22..c413b5294 100644 --- a/src/main/java/mekanism/common/block/states/BlockStateOre.java +++ b/src/main/java/mekanism/common/block/states/BlockStateOre.java @@ -1,8 +1,6 @@ package mekanism.common.block.states; -import mekanism.common.MekanismBlocks; import mekanism.common.block.BlockOre; - import net.minecraft.block.properties.PropertyEnum; import net.minecraft.block.state.BlockState; import net.minecraft.util.IStringSerializable; diff --git a/src/main/java/mekanism/common/block/states/BlockStatePlastic.java b/src/main/java/mekanism/common/block/states/BlockStatePlastic.java index b375f9bb8..0f19d8ccc 100644 --- a/src/main/java/mekanism/common/block/states/BlockStatePlastic.java +++ b/src/main/java/mekanism/common/block/states/BlockStatePlastic.java @@ -1,11 +1,6 @@ package mekanism.common.block.states; -import mekanism.api.EnumColor; -import mekanism.common.MekanismBlocks; import mekanism.common.block.BlockPlastic; - -import net.minecraft.block.Block; -import net.minecraft.block.properties.PropertyDirection; import net.minecraft.block.properties.PropertyEnum; import net.minecraft.block.state.BlockState; import net.minecraft.block.state.IBlockState; diff --git a/src/main/java/mekanism/common/capabilities/CableOutputter.java b/src/main/java/mekanism/common/capabilities/CableOutputter.java index c732b3712..e295e1d74 100644 --- a/src/main/java/mekanism/common/capabilities/CableOutputter.java +++ b/src/main/java/mekanism/common/capabilities/CableOutputter.java @@ -2,11 +2,8 @@ package mekanism.common.capabilities; import mekanism.api.energy.ICableOutputter; import mekanism.common.capabilities.StorageHelper.NullStorage; - -import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumFacing; import net.minecraftforge.common.capabilities.CapabilityManager; -import net.minecraftforge.common.util.INBTSerializable; /** * Created by ben on 30/04/16. diff --git a/src/main/java/mekanism/common/capabilities/Capabilities.java b/src/main/java/mekanism/common/capabilities/Capabilities.java index ac6c6ca47..ef096d49b 100644 --- a/src/main/java/mekanism/common/capabilities/Capabilities.java +++ b/src/main/java/mekanism/common/capabilities/Capabilities.java @@ -11,7 +11,6 @@ import mekanism.api.transmitters.IBlockableConnection; import mekanism.api.transmitters.IGridTransmitter; import mekanism.common.base.ILogisticalTransporter; import mekanism.common.base.ITileNetwork; - import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.capabilities.CapabilityInject; diff --git a/src/main/java/mekanism/common/capabilities/GridTransmitterTile.java b/src/main/java/mekanism/common/capabilities/GridTransmitterTile.java index 18bb51e5d..e7e648d6f 100644 --- a/src/main/java/mekanism/common/capabilities/GridTransmitterTile.java +++ b/src/main/java/mekanism/common/capabilities/GridTransmitterTile.java @@ -7,7 +7,6 @@ import mekanism.api.transmitters.DynamicNetwork; import mekanism.api.transmitters.IGridTransmitter; import mekanism.api.transmitters.TransmissionType; import mekanism.common.capabilities.StorageHelper.NullStorage; - import net.minecraft.util.EnumFacing; import net.minecraft.world.World; import net.minecraftforge.common.capabilities.CapabilityManager; diff --git a/src/main/java/mekanism/common/capabilities/LogisticalTransporter.java b/src/main/java/mekanism/common/capabilities/LogisticalTransporter.java index 53141a660..79320a011 100644 --- a/src/main/java/mekanism/common/capabilities/LogisticalTransporter.java +++ b/src/main/java/mekanism/common/capabilities/LogisticalTransporter.java @@ -10,7 +10,6 @@ import mekanism.common.base.ILogisticalTransporter; import mekanism.common.capabilities.StorageHelper.NullStorage; import mekanism.common.content.transporter.TransporterStack; import mekanism.common.tile.TileEntityLogisticalSorter; - import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; diff --git a/src/main/java/mekanism/common/capabilities/StrictEnergyAcceptor.java b/src/main/java/mekanism/common/capabilities/StrictEnergyAcceptor.java index 9514b324a..2b15462bd 100644 --- a/src/main/java/mekanism/common/capabilities/StrictEnergyAcceptor.java +++ b/src/main/java/mekanism/common/capabilities/StrictEnergyAcceptor.java @@ -2,7 +2,6 @@ package mekanism.common.capabilities; import mekanism.api.energy.IStrictEnergyAcceptor; import mekanism.common.capabilities.StorageHelper.DefaultStorage; - import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumFacing; import net.minecraftforge.common.capabilities.CapabilityManager; diff --git a/src/main/java/mekanism/common/capabilities/StrictEnergyStorage.java b/src/main/java/mekanism/common/capabilities/StrictEnergyStorage.java index 2263f5664..44dd379ab 100644 --- a/src/main/java/mekanism/common/capabilities/StrictEnergyStorage.java +++ b/src/main/java/mekanism/common/capabilities/StrictEnergyStorage.java @@ -2,7 +2,6 @@ package mekanism.common.capabilities; import mekanism.api.energy.IStrictEnergyStorage; import mekanism.common.capabilities.StorageHelper.DefaultStorage; - import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.capabilities.CapabilityManager; import net.minecraftforge.common.util.INBTSerializable; diff --git a/src/main/java/mekanism/common/content/boiler/BoilerUpdateProtocol.java b/src/main/java/mekanism/common/content/boiler/BoilerUpdateProtocol.java index 174aef92b..ead5f76d1 100644 --- a/src/main/java/mekanism/common/content/boiler/BoilerUpdateProtocol.java +++ b/src/main/java/mekanism/common/content/boiler/BoilerUpdateProtocol.java @@ -16,8 +16,8 @@ import mekanism.common.tile.TileEntityBoilerValve; import mekanism.common.tile.TileEntityPressureDisperser; import mekanism.common.tile.TileEntitySuperheatingElement; import net.minecraft.item.ItemStack; -import net.minecraft.util.BlockPos; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; public class BoilerUpdateProtocol extends UpdateProtocol { @@ -43,7 +43,7 @@ public class BoilerUpdateProtocol extends UpdateProtocol return true; } - TileEntity tile = pointer.getWorld().getTileEntity(new BlockPos(x, y, z)); + TileEntity tile = new Coord4D(x, y, z, pointer.getWorld().provider.getDimensionId()).getTileEntity(pointer.getWorld()); return tile instanceof TileEntityPressureDisperser || tile instanceof TileEntitySuperheatingElement; } @@ -83,13 +83,13 @@ public class BoilerUpdateProtocol extends UpdateProtocol final Coord4D initDisperser = dispersers.iterator().next(); //Ensure that a full horizontal plane of dispersers exist, surrounding the found disperser - Coord4D pos = new Coord4D(structure.renderLocation.getX(), initDisperser.getY(), structure.renderLocation.getZ(), pointer.getWorld().provider.getDimensionId()); + Coord4D pos = new Coord4D(structure.renderLocation.xCoord, initDisperser.yCoord, structure.renderLocation.zCoord, pointer.getWorld().provider.getDimensionId()); for(int x = 1; x < structure.volLength-1; x++) { for(int z = 1; z < structure.volWidth-1; z++) { - Coord4D coord4D = pos.add(x, 0, z); - TileEntity tile = pointer.getWorld().getTileEntity(coord4D); + Coord4D coord4D = pos.translate(x, 0, z); + TileEntity tile = coord4D.getTileEntity(pointer.getWorld()); if(!(tile instanceof TileEntityPressureDisperser)) { @@ -125,15 +125,14 @@ public class BoilerUpdateProtocol extends UpdateProtocol Coord4D initAir = null; int totalAir = 0; - pos = new Coord4D(structure.renderLocation, pointer.getWorld().provider.getDimensionId()); //Find the first available block in the structure for water storage (including casings) - for(int x = 0; x < structure.volLength; x++) + for(int x = structure.renderLocation.xCoord; x < structure.renderLocation.xCoord+structure.volLength; x++) { - for(int y = 0; y < initDisperser.getY() - structure.renderLocation.getY(); y++) + for(int y = structure.renderLocation.yCoord; y < initDisperser.yCoord; y++) { - for(int z = 0; z < structure.volWidth; z++) + for(int z = structure.renderLocation.zCoord; z < structure.renderLocation.zCoord+structure.volWidth; z++) { - if(pointer.getWorld().isAirBlock(pos.add(x, y, z)) || isViableNode(pos.add(x, y, z))) + if(pointer.getWorld().isAirBlock(new BlockPos(x, y, z)) || isViableNode(x, y, z)) { initAir = new Coord4D(x, y, z, pointer.getWorld().provider.getDimensionId()); totalAir++; @@ -149,7 +148,7 @@ public class BoilerUpdateProtocol extends UpdateProtocol } //Gradle build requires these fields to be final - final Coord4D renderLocation = structure.renderLocation.clone(); + final Coord4D renderLocation = structure.renderLocation; final int volLength = structure.volLength; final int volWidth = structure.volWidth; @@ -157,10 +156,10 @@ public class BoilerUpdateProtocol extends UpdateProtocol @Override public final boolean isValid(Coord4D coord) { - return coord.getY() >= renderLocation.getY()-1 && coord.getY() < initDisperser.getY() && - coord.getX() >= renderLocation.getX() && coord.getX() < renderLocation.getX()+volLength && - coord.getZ() >= renderLocation.getZ() && coord.getZ() < renderLocation.getZ()+volWidth && - (coord.isAirBlock(pointer.getWorld()) || isViableNode(coord)); + return coord.yCoord >= renderLocation.yCoord-1 && coord.yCoord < initDisperser.yCoord && + coord.xCoord >= renderLocation.xCoord && coord.xCoord < renderLocation.xCoord+volLength && + coord.zCoord >= renderLocation.zCoord && coord.zCoord < renderLocation.zCoord+volWidth && + (coord.isAirBlock(pointer.getWorld()) || isViableNode(coord.getPos())); } }).calculate(initAir); @@ -170,10 +169,10 @@ public class BoilerUpdateProtocol extends UpdateProtocol return false; } - int steamHeight = (structure.renderLocation.getY()+structure.volHeight-2)-initDisperser.getY(); + int steamHeight = (structure.renderLocation.yCoord+structure.volHeight-2)-initDisperser.yCoord; structure.steamVolume = structure.volWidth*structure.volLength*steamHeight; - structure.upperRenderLocation = new Coord4D(structure.renderLocation.getX(), initDisperser.getY()+1, structure.renderLocation.getZ()); + structure.upperRenderLocation = new Coord4D(structure.renderLocation.xCoord, initDisperser.yCoord+1, structure.renderLocation.zCoord); return true; } diff --git a/src/main/java/mekanism/common/content/boiler/SynchronizedBoilerData.java b/src/main/java/mekanism/common/content/boiler/SynchronizedBoilerData.java index 0516dd5f6..4c85c3080 100644 --- a/src/main/java/mekanism/common/content/boiler/SynchronizedBoilerData.java +++ b/src/main/java/mekanism/common/content/boiler/SynchronizedBoilerData.java @@ -48,8 +48,6 @@ public class SynchronizedBoilerData extends SynchronizedData @Override public boolean isValidInnerNode(int x, int y, int z) { - TileEntity tile = pointer.getWorld().getTileEntity(new BlockPos(x, y, z)); + TileEntity tile = new Coord4D(x, y, z, pointer.getWorld().provider.getDimensionId()).getTileEntity(pointer.getWorld()); if(tile != null && (tile instanceof TileEntityInductionCell || tile instanceof TileEntityInductionProvider)) { diff --git a/src/main/java/mekanism/common/content/miner/ThreadMinerSearch.java b/src/main/java/mekanism/common/content/miner/ThreadMinerSearch.java index e3843b14c..89d40da86 100644 --- a/src/main/java/mekanism/common/content/miner/ThreadMinerSearch.java +++ b/src/main/java/mekanism/common/content/miner/ThreadMinerSearch.java @@ -53,9 +53,9 @@ public class ThreadMinerSearch extends Thread for(int i = 0; i < size; i++) { - int x = coord.getX()+i%diameter; - int z = coord.getY()+(i/diameter)%diameter; - int y = coord.getZ()+(i/diameter/diameter); + int x = coord.xCoord+i%diameter; + int z = coord.yCoord+(i/diameter)%diameter; + int y = coord.zCoord+(i/diameter/diameter); if(tileEntity.isInvalid()) { diff --git a/src/main/java/mekanism/common/content/tank/TankUpdateProtocol.java b/src/main/java/mekanism/common/content/tank/TankUpdateProtocol.java index c952729ef..719899cec 100644 --- a/src/main/java/mekanism/common/content/tank/TankUpdateProtocol.java +++ b/src/main/java/mekanism/common/content/tank/TankUpdateProtocol.java @@ -64,6 +64,8 @@ public class TankUpdateProtocol extends UpdateProtocol ((TankCache)cache).fluid.amount += ((TankCache)merge).fluid.amount; } + ((TankCache)cache).editMode = ((TankCache)merge).editMode; + List rejects = StackUtils.getMergeRejects(((TankCache)cache).inventory, ((TankCache)merge).inventory); if(!rejects.isEmpty()) diff --git a/src/main/java/mekanism/common/content/transporter/PathfinderCache.java b/src/main/java/mekanism/common/content/transporter/PathfinderCache.java index 9c56b7751..6d897158c 100644 --- a/src/main/java/mekanism/common/content/transporter/PathfinderCache.java +++ b/src/main/java/mekanism/common/content/transporter/PathfinderCache.java @@ -6,15 +6,13 @@ import java.util.List; import java.util.Map; import mekanism.api.Coord4D; - -import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; public class PathfinderCache { public static Map> cachedPaths = new HashMap>(); - public static void onChanged(BlockPos location) + public static void onChanged(Coord4D location) { reset(); } diff --git a/src/main/java/mekanism/common/content/transporter/TItemStackFilter.java b/src/main/java/mekanism/common/content/transporter/TItemStackFilter.java index 4c262820f..d3ea5564d 100644 --- a/src/main/java/mekanism/common/content/transporter/TItemStackFilter.java +++ b/src/main/java/mekanism/common/content/transporter/TItemStackFilter.java @@ -9,9 +9,6 @@ import mekanism.common.util.MekanismUtils; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumFacing; - -import io.netty.buffer.ByteBuf; public class TItemStackFilter extends TransporterFilter { diff --git a/src/main/java/mekanism/common/content/transporter/TMaterialFilter.java b/src/main/java/mekanism/common/content/transporter/TMaterialFilter.java index 26a3064da..752407da1 100644 --- a/src/main/java/mekanism/common/content/transporter/TMaterialFilter.java +++ b/src/main/java/mekanism/common/content/transporter/TMaterialFilter.java @@ -12,9 +12,6 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumFacing; - -import io.netty.buffer.ByteBuf; public class TMaterialFilter extends TransporterFilter { diff --git a/src/main/java/mekanism/common/content/transporter/TModIDFilter.java b/src/main/java/mekanism/common/content/transporter/TModIDFilter.java index 3574c4873..5d62a3b3c 100644 --- a/src/main/java/mekanism/common/content/transporter/TModIDFilter.java +++ b/src/main/java/mekanism/common/content/transporter/TModIDFilter.java @@ -8,9 +8,6 @@ import mekanism.common.PacketHandler; import mekanism.common.content.transporter.Finder.ModIDFinder; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumFacing; - -import io.netty.buffer.ByteBuf; public class TModIDFilter extends TransporterFilter { diff --git a/src/main/java/mekanism/common/content/transporter/TOreDictFilter.java b/src/main/java/mekanism/common/content/transporter/TOreDictFilter.java index de9a922d6..874256d86 100644 --- a/src/main/java/mekanism/common/content/transporter/TOreDictFilter.java +++ b/src/main/java/mekanism/common/content/transporter/TOreDictFilter.java @@ -8,9 +8,6 @@ import mekanism.common.PacketHandler; import mekanism.common.content.transporter.Finder.OreDictFinder; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumFacing; - -import io.netty.buffer.ByteBuf; public class TOreDictFilter extends TransporterFilter { diff --git a/src/main/java/mekanism/common/content/transporter/TransporterManager.java b/src/main/java/mekanism/common/content/transporter/TransporterManager.java index 82a0a8a4e..0d81f4cc1 100644 --- a/src/main/java/mekanism/common/content/transporter/TransporterManager.java +++ b/src/main/java/mekanism/common/content/transporter/TransporterManager.java @@ -20,8 +20,8 @@ import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; -import powercrystals.minefactoryreloaded.api.IDeepStorageUnit; import net.minecraftforge.fml.common.Loader; +import powercrystals.minefactoryreloaded.api.IDeepStorageUnit; public class TransporterManager { diff --git a/src/main/java/mekanism/common/content/transporter/TransporterPathfinder.java b/src/main/java/mekanism/common/content/transporter/TransporterPathfinder.java index 00eb13448..46841a7cf 100644 --- a/src/main/java/mekanism/common/content/transporter/TransporterPathfinder.java +++ b/src/main/java/mekanism/common/content/transporter/TransporterPathfinder.java @@ -23,8 +23,8 @@ import mekanism.common.util.MekanismUtils; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; import net.minecraft.util.EnumFacing; +import net.minecraft.world.World; import org.apache.commons.lang3.tuple.Pair; diff --git a/src/main/java/mekanism/common/entity/EntityBalloon.java b/src/main/java/mekanism/common/entity/EntityBalloon.java index 9297c1196..2ed03473d 100644 --- a/src/main/java/mekanism/common/entity/EntityBalloon.java +++ b/src/main/java/mekanism/common/entity/EntityBalloon.java @@ -88,7 +88,7 @@ public class EntityBalloon extends Entity implements IEntityAdditionalSpawnData this(world); latched = obj; - setPosition(latched.getX() + 0.5F, latched.getY() + 1.9F, latched.getZ() + 0.5F); + setPosition(latched.xCoord + 0.5F, latched.yCoord + 1.9F, latched.zCoord + 0.5F); prevPosX = posX; prevPosY = posY; @@ -97,9 +97,9 @@ public class EntityBalloon extends Entity implements IEntityAdditionalSpawnData color = c; dataWatcher.updateObject(5, (byte)1); /* Is latched */ - dataWatcher.updateObject(6, latched != null ? latched.getX() : 0); /* Latched X */ - dataWatcher.updateObject(7, latched != null ? latched.getY() : 0); /* Latched Y */ - dataWatcher.updateObject(8, latched != null ? latched.getZ() : 0); /* Latched Z */ + dataWatcher.updateObject(6, latched != null ? latched.xCoord : 0); /* Latched X */ + dataWatcher.updateObject(7, latched != null ? latched.yCoord : 0); /* Latched Y */ + dataWatcher.updateObject(8, latched != null ? latched.zCoord : 0); /* Latched Z */ dataWatcher.updateObject(9, -1); /* Latched entity ID */ } @@ -145,9 +145,9 @@ public class EntityBalloon extends Entity implements IEntityAdditionalSpawnData if(ticksExisted == 1) { dataWatcher.updateObject(5, new Byte(latched != null ? (byte)1 : (latchedEntity != null ? (byte)2 : (byte)0))); /* Is latched */ - dataWatcher.updateObject(6, new Integer(latched != null ? latched.getX() : 0)); /* Latched X */ - dataWatcher.updateObject(7, new Integer(latched != null ? latched.getY() : 0)); /* Latched Y */ - dataWatcher.updateObject(8, new Integer(latched != null ? latched.getZ() : 0)); /* Latched Z */ + dataWatcher.updateObject(6, new Integer(latched != null ? latched.xCoord : 0)); /* Latched X */ + dataWatcher.updateObject(7, new Integer(latched != null ? latched.yCoord : 0)); /* Latched Y */ + dataWatcher.updateObject(8, new Integer(latched != null ? latched.zCoord : 0)); /* Latched Z */ dataWatcher.updateObject(9, new Integer(latchedEntity != null ? latchedEntity.getEntityId() : -1)); /* Latched entity ID */ } } diff --git a/src/main/java/mekanism/common/entity/EntityFlame.java b/src/main/java/mekanism/common/entity/EntityFlame.java index 877724af3..79257fd76 100644 --- a/src/main/java/mekanism/common/entity/EntityFlame.java +++ b/src/main/java/mekanism/common/entity/EntityFlame.java @@ -184,17 +184,17 @@ public class EntityFlame extends Entity implements IEntityAdditionalSpawnData { IBlockState state = worldObj.getBlockState(mop.getBlockPos()); Block block = state.getBlock(); - boolean fluid = MekanismUtils.isFluid(worldObj, new Coord4D(mop)) || MekanismUtils.isDeadFluid(worldObj, new Coord4D(mop)); + boolean fluid = MekanismUtils.isFluid(worldObj, new Coord4D(mop, worldObj)) || MekanismUtils.isDeadFluid(worldObj, new Coord4D(mop, worldObj)); - Coord4D sideCoord = new Coord4D(mop.getBlockPos().offset(mop.sideHit), worldObj.provider.getDimensionId()); + Coord4D sideCoord = new Coord4D(mop.getBlockPos().offset(mop.sideHit), worldObj); if(general.aestheticWorldDamage && !fluid && (sideCoord.isAirBlock(worldObj) || sideCoord.isReplaceable(worldObj))) { - if(mode != ItemFlamethrower.FlamethrowerMode.COMBAT && !smeltBlock(new Coord4D(mop.getBlockPos()))) + if(mode != ItemFlamethrower.FlamethrowerMode.COMBAT && !smeltBlock(new Coord4D(mop, worldObj))) { if(mode == ItemFlamethrower.FlamethrowerMode.INFERNO && !worldObj.isRemote) { - worldObj.setBlockState(sideCoord, Blocks.fire.getDefaultState()); + worldObj.setBlockState(sideCoord.getPos(), Blocks.fire.getDefaultState()); } } } @@ -249,19 +249,19 @@ public class EntityFlame extends Entity implements IEntityAdditionalSpawnData if(newBlock != null && newBlock != Blocks.air) { - worldObj.setBlockState(block, Block.getBlockFromItem(result.getItem()).getStateFromMeta(result.getItemDamage()), 3); + worldObj.setBlockState(block.getPos(), Block.getBlockFromItem(result.getItem()).getStateFromMeta(result.getItemDamage()), 3); } else { - worldObj.setBlockToAir(block); + worldObj.setBlockToAir(block.getPos()); - EntityItem item = new EntityItem(worldObj, block.getX() + 0.5, block.getY() + 0.5, block.getZ() + 0.5, result.copy()); + EntityItem item = new EntityItem(worldObj, block.xCoord + 0.5, block.yCoord + 0.5, block.zCoord + 0.5, result.copy()); item.motionX = 0; item.motionY = 0; item.motionZ = 0; worldObj.spawnEntityInWorld(item); } - worldObj.playAuxSFXAtEntity(null, 2001, block, Block.getIdFromBlock(b) + (b.getMetaFromState(state) << 12)); + worldObj.playAuxSFXAtEntity(null, 2001, block.getPos(), Block.getIdFromBlock(b) + (b.getMetaFromState(state) << 12)); } spawnParticlesAt(new Pos3D(block).translate(0.5, 0.5, 0.5)); diff --git a/src/main/java/mekanism/common/entity/EntityRobit.java b/src/main/java/mekanism/common/entity/EntityRobit.java index cb3122dd9..86dc56835 100644 --- a/src/main/java/mekanism/common/entity/EntityRobit.java +++ b/src/main/java/mekanism/common/entity/EntityRobit.java @@ -309,7 +309,7 @@ public class EntityRobit extends EntityCreature implements IInventory, ISustaine travelToDimension(homeLocation.dimensionId); } - setPositionAndUpdate(homeLocation.getX()+0.5, homeLocation.getY()+0.3, homeLocation.getZ()+0.5); + setPositionAndUpdate(homeLocation.xCoord+0.5, homeLocation.yCoord+0.3, homeLocation.zCoord+0.5); motionX = 0; motionY = 0; diff --git a/src/main/java/mekanism/common/integration/CCPeripheral.java b/src/main/java/mekanism/common/integration/CCPeripheral.java index 3d69d3085..73a606a8a 100644 --- a/src/main/java/mekanism/common/integration/CCPeripheral.java +++ b/src/main/java/mekanism/common/integration/CCPeripheral.java @@ -1,6 +1,8 @@ package mekanism.common.integration; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; import net.minecraftforge.fml.common.Optional; import dan200.computercraft.api.lua.ILuaContext; @@ -8,8 +10,6 @@ import dan200.computercraft.api.lua.LuaException; import dan200.computercraft.api.peripheral.IComputerAccess; import dan200.computercraft.api.peripheral.IPeripheral; import dan200.computercraft.api.peripheral.IPeripheralProvider; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; /** * Created by aidancbrady on 7/20/15. diff --git a/src/main/java/mekanism/common/integration/MekanismHooks.java b/src/main/java/mekanism/common/integration/MekanismHooks.java index 0079f2405..d706bafd3 100644 --- a/src/main/java/mekanism/common/integration/MekanismHooks.java +++ b/src/main/java/mekanism/common/integration/MekanismHooks.java @@ -10,7 +10,6 @@ import java.util.List; import java.util.Map; import li.cil.oc.api.Driver; -import mekanism.api.transmitters.TransmissionType; import mekanism.common.Mekanism; import mekanism.common.MekanismItems; import mekanism.common.Resource; diff --git a/src/main/java/mekanism/common/integration/OreDictManager.java b/src/main/java/mekanism/common/integration/OreDictManager.java index 1787c2a7a..0b559f245 100644 --- a/src/main/java/mekanism/common/integration/OreDictManager.java +++ b/src/main/java/mekanism/common/integration/OreDictManager.java @@ -26,8 +26,8 @@ import net.minecraft.inventory.InventoryCrafting; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.CraftingManager; import net.minecraft.item.crafting.FurnaceRecipes; -import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.fml.common.Optional.Method; +import net.minecraftforge.oredict.OreDictionary; public final class OreDictManager { diff --git a/src/main/java/mekanism/common/integration/WailaDataProvider.java b/src/main/java/mekanism/common/integration/WailaDataProvider.java index 50d36ac92..ed4785831 100644 --- a/src/main/java/mekanism/common/integration/WailaDataProvider.java +++ b/src/main/java/mekanism/common/integration/WailaDataProvider.java @@ -90,7 +90,7 @@ public class WailaDataProvider implements IWailaDataProvider else if(tile instanceof TileEntityBoundingBlock) { TileEntityBoundingBlock bound = (TileEntityBoundingBlock)tile; - Coord4D coord = new Coord4D(bound.getPos(), tile.getWorld().provider.getDimensionId()); + Coord4D coord = new Coord4D(bound.getPos(), tile.getWorld()); if(bound.receivedCoords && coord.getTileEntity(tile.getWorld()) instanceof IInventory) { diff --git a/src/main/java/mekanism/common/inventory/container/ContainerPersonalChest.java b/src/main/java/mekanism/common/inventory/container/ContainerPersonalChest.java index 44180ac5d..3114ac6ef 100644 --- a/src/main/java/mekanism/common/inventory/container/ContainerPersonalChest.java +++ b/src/main/java/mekanism/common/inventory/container/ContainerPersonalChest.java @@ -1,7 +1,6 @@ package mekanism.common.inventory.container; import invtweaks.api.container.ChestContainer; -import mekanism.common.block.states.BlockStateMachine; import mekanism.common.block.states.BlockStateMachine.MachineType; import mekanism.common.inventory.slot.SlotPersonalChest; import mekanism.common.tile.TileEntityPersonalChest; diff --git a/src/main/java/mekanism/common/item/ItemAtomicDisassembler.java b/src/main/java/mekanism/common/item/ItemAtomicDisassembler.java index d844ce31a..08b00ed79 100644 --- a/src/main/java/mekanism/common/item/ItemAtomicDisassembler.java +++ b/src/main/java/mekanism/common/item/ItemAtomicDisassembler.java @@ -22,9 +22,9 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; import net.minecraft.util.DamageSource; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; -import net.minecraft.util.EnumFacing; import net.minecraftforge.event.entity.player.UseHoeEvent; import net.minecraftforge.fml.common.eventhandler.Event.Result; @@ -104,7 +104,7 @@ public class ItemAtomicDisassembler extends ItemEnergized } ItemStack stack = new ItemStack(block, 1, meta); - Coord4D orig = new Coord4D(pos, player.worldObj.provider.getDimensionId()); + Coord4D orig = new Coord4D(pos, player.worldObj); List names = MekanismUtils.getOreDictName(stack); @@ -120,7 +120,7 @@ public class ItemAtomicDisassembler extends ItemEnergized if(getMode(itemstack) == 3 && isOre && !player.capabilities.isCreativeMode) { - Set found = new Finder(player.worldObj, stack, new Coord4D(pos, player.worldObj.provider.getDimensionId())).calc(); + Set found = new Finder(player.worldObj, stack, new Coord4D(pos, player.worldObj)).calc(); for(Coord4D coord : found) { @@ -131,11 +131,11 @@ public class ItemAtomicDisassembler extends ItemEnergized Block block2 = coord.getBlock(player.worldObj); - block2.onBlockDestroyedByPlayer(player.worldObj, coord, state); - player.worldObj.playAuxSFXAtEntity(null, 2001, coord, meta << 12); - player.worldObj.setBlockToAir(coord); - block2.breakBlock(player.worldObj, coord, state); - block2.dropBlockAsItem(player.worldObj, coord, state, 0); + block2.onBlockDestroyedByPlayer(player.worldObj, coord.getPos(), state); + player.worldObj.playAuxSFXAtEntity(null, 2001, coord.getPos(), meta << 12); + player.worldObj.setBlockToAir(coord.getPos()); + block2.breakBlock(player.worldObj, coord.getPos(), state); + block2.dropBlockAsItem(player.worldObj, coord.getPos(), state, 0); setEnergy(itemstack, getEnergy(itemstack) - (general.DISASSEMBLER_USAGE*getEfficiency(itemstack))); } diff --git a/src/main/java/mekanism/common/item/ItemBalloon.java b/src/main/java/mekanism/common/item/ItemBalloon.java index 8f197b7f8..a64f2a67c 100644 --- a/src/main/java/mekanism/common/item/ItemBalloon.java +++ b/src/main/java/mekanism/common/item/ItemBalloon.java @@ -21,6 +21,8 @@ import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class ItemBalloon extends ItemMekanism implements IMetaItem { @@ -34,7 +36,7 @@ public class ItemBalloon extends ItemMekanism implements IMetaItem @Override public String getTexture(int meta) { - return EnumColor.DYES[meta].getOreDictName() + "Balloon"; + return "Balloon"; } @Override @@ -42,6 +44,14 @@ public class ItemBalloon extends ItemMekanism implements IMetaItem { return EnumColor.DYES.length; } + + @SideOnly(Side.CLIENT) + public int getColorFromItemStack(ItemStack stack, int renderPass) + { + EnumColor dye = getColor(stack); + + return (int)(dye.getColor(0)*255) << 16 | (int)(dye.getColor(1)*255) << 8 | (int)(dye.getColor(2)*255); + } public EnumColor getColor(ItemStack stack) { @@ -74,7 +84,10 @@ public class ItemBalloon extends ItemMekanism implements IMetaItem world.spawnEntityInWorld(new EntityBalloon(world, pos.xCoord-0.5, pos.yCoord-0.25, pos.zCoord-0.5, getColor(itemstack))); } - itemstack.stackSize--; + if(!entityplayer.capabilities.isCreativeMode) + { + itemstack.stackSize--; + } return itemstack; } @@ -129,7 +142,7 @@ public class ItemBalloon extends ItemMekanism implements IMetaItem if(!world.isRemote) { - world.spawnEntityInWorld(new EntityBalloon(world, new Coord4D(pos, world.provider.getDimensionId()), getColor(stack))); + world.spawnEntityInWorld(new EntityBalloon(world, new Coord4D(pos, world), getColor(stack))); stack.stackSize--; } } @@ -237,11 +250,12 @@ public class ItemBalloon extends ItemMekanism implements IMetaItem if(!source.getWorld().isRemote) { - source.getWorld().spawnEntityInWorld(new EntityBalloon(source.getWorld(), new Coord4D(new BlockPos(pos)), getColor(stack))); + source.getWorld().spawnEntityInWorld(new EntityBalloon(source.getWorld(), new Coord4D(new BlockPos(pos), source.getWorld()), getColor(stack))); } } stack.stackSize--; + return stack; } } diff --git a/src/main/java/mekanism/common/item/ItemBlockBasic.java b/src/main/java/mekanism/common/item/ItemBlockBasic.java index d03d89ebd..10897e018 100644 --- a/src/main/java/mekanism/common/item/ItemBlockBasic.java +++ b/src/main/java/mekanism/common/item/ItemBlockBasic.java @@ -28,7 +28,6 @@ import mekanism.common.util.LangUtils; import mekanism.common.util.MekanismUtils; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; -import net.minecraft.client.resources.model.ModelResourceLocation; import net.minecraft.client.settings.GameSettings; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBlock; @@ -138,12 +137,6 @@ public class ItemBlockBasic extends ItemBlock implements IEnergizedItem, ITierIt return i; } - @Override - public ModelResourceLocation getModel(ItemStack stack, EntityPlayer player, int useRemaining) - { - return null; //TODO: IDONTKNOWHOWTODOTHIS - } - @Override @SideOnly(Side.CLIENT) public void addInformation(ItemStack itemstack, EntityPlayer entityplayer, List list, boolean flag) @@ -199,19 +192,6 @@ public class ItemBlockBasic extends ItemBlock implements IEnergizedItem, ITierIt return BasicBlockType.get(stack) == BasicBlockType.BIN && stack.getTagCompound() != null && stack.getTagCompound().hasKey("newCount"); } -/* - @Override - public boolean doesContainerItemLeaveCraftingGrid(ItemStack stack) - { - if(BasicBlockType.get(stack) != BasicBlockType.BIN) - { - return true; - } - - return false; - } -*/ - @Override public ItemStack getContainerItem(ItemStack stack) { @@ -317,19 +297,6 @@ public class ItemBlockBasic extends ItemBlock implements IEnergizedItem, ITierIt return "null"; } - @Override - public String getItemStackDisplayName(ItemStack itemstack) - { - BasicBlockType type = BasicBlockType.get(itemstack); - - if(type == BasicBlockType.INDUCTION_CELL || type == BasicBlockType.INDUCTION_PROVIDER) - { - return getBaseTier(itemstack).getLocalizedName() + " " + super.getItemStackDisplayName(itemstack); - } - - return super.getItemStackDisplayName(itemstack); - } - @Override public double getEnergy(ItemStack itemStack) { diff --git a/src/main/java/mekanism/common/item/ItemBlockEnergyCube.java b/src/main/java/mekanism/common/item/ItemBlockEnergyCube.java index 3dd6891a4..baa06eb9d 100644 --- a/src/main/java/mekanism/common/item/ItemBlockEnergyCube.java +++ b/src/main/java/mekanism/common/item/ItemBlockEnergyCube.java @@ -14,9 +14,10 @@ import mekanism.api.energy.IEnergizedItem; import mekanism.client.MekKeyHandler; import mekanism.client.MekanismKeyHandler; import mekanism.common.Mekanism; +import mekanism.common.Tier.BaseTier; import mekanism.common.Tier.EnergyCubeTier; -import mekanism.common.base.IEnergyCube; import mekanism.common.base.ISustainedInventory; +import mekanism.common.base.ITierItem; import mekanism.common.integration.IC2ItemManager; import mekanism.common.network.PacketTileEntity.TileEntityMessage; import mekanism.common.security.ISecurityItem; @@ -39,17 +40,17 @@ import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraft.world.World; import net.minecraftforge.common.util.Constants.NBT; -import cofh.api.energy.IEnergyContainerItem; import net.minecraftforge.fml.common.Optional.Interface; import net.minecraftforge.fml.common.Optional.InterfaceList; import net.minecraftforge.fml.common.Optional.Method; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import cofh.api.energy.IEnergyContainerItem; @InterfaceList({ @Interface(iface = "ic2.api.item.ISpecialElectricItem", modid = "IC2") }) -public class ItemBlockEnergyCube extends ItemBlock implements IEnergizedItem, IEnergyCube, ISpecialElectricItem, ISustainedInventory, IEnergyContainerItem, ISecurityItem +public class ItemBlockEnergyCube extends ItemBlock implements IEnergizedItem, ISpecialElectricItem, ISustainedInventory, IEnergyContainerItem, ISecurityItem, ITierItem { public Block metaBlock; @@ -91,7 +92,7 @@ public class ItemBlockEnergyCube extends ItemBlock implements IEnergizedItem, IE public ItemStack getUnchargedItem(EnergyCubeTier tier) { ItemStack stack = new ItemStack(this); - setEnergyCubeTier(stack, tier); + setBaseTier(stack, tier.getBaseTier()); return stack; } @@ -99,7 +100,7 @@ public class ItemBlockEnergyCube extends ItemBlock implements IEnergizedItem, IE @Override public String getItemStackDisplayName(ItemStack itemstack) { - return LangUtils.localize("tile.EnergyCube" + getEnergyCubeTier(itemstack).getBaseTier().getSimpleName() + ".name"); + return LangUtils.localize("tile.EnergyCube" + getBaseTier(itemstack).getSimpleName() + ".name"); } @Override @@ -110,7 +111,7 @@ public class ItemBlockEnergyCube extends ItemBlock implements IEnergizedItem, IE if(place) { TileEntityEnergyCube tileEntity = (TileEntityEnergyCube)world.getTileEntity(pos); - tileEntity.tier = ((IEnergyCube)stack.getItem()).getEnergyCubeTier(stack); + tileEntity.tier = EnergyCubeTier.values()[getBaseTier(stack).ordinal()]; tileEntity.electricityStored = getEnergy(stack); if(tileEntity instanceof ISecurityTile) @@ -141,30 +142,25 @@ public class ItemBlockEnergyCube extends ItemBlock implements IEnergizedItem, IE } @Override - public EnergyCubeTier getEnergyCubeTier(ItemStack itemstack) + public BaseTier getBaseTier(ItemStack itemstack) { if(!itemstack.hasTagCompound()) { - return EnergyCubeTier.BASIC; + return BaseTier.BASIC; } - if(itemstack.getTagCompound().getString("tier") == null) - { - return EnergyCubeTier.BASIC; - } - - return EnergyCubeTier.getFromName(itemstack.getTagCompound().getString("tier")); + return BaseTier.values()[itemstack.getTagCompound().getInteger("tier")]; } @Override - public void setEnergyCubeTier(ItemStack itemstack, EnergyCubeTier tier) + public void setBaseTier(ItemStack itemstack, BaseTier tier) { if(!itemstack.hasTagCompound()) { itemstack.setTagCompound(new NBTTagCompound()); } - itemstack.getTagCompound().setString("tier", tier.getBaseTier().getSimpleName()); + itemstack.getTagCompound().setInteger("tier", tier.ordinal()); } @Override @@ -243,7 +239,7 @@ public class ItemBlockEnergyCube extends ItemBlock implements IEnergizedItem, IE @Override public void setEnergy(ItemStack itemStack, double amount) { - if(getEnergyCubeTier(itemStack) == EnergyCubeTier.CREATIVE && amount != Double.MAX_VALUE) + if(getBaseTier(itemStack) == BaseTier.CREATIVE && amount != Double.MAX_VALUE) { return; } @@ -260,7 +256,7 @@ public class ItemBlockEnergyCube extends ItemBlock implements IEnergizedItem, IE @Override public double getMaxEnergy(ItemStack itemStack) { - return getEnergyCubeTier(itemStack).maxEnergy; + return EnergyCubeTier.values()[getBaseTier(itemStack).ordinal()].maxEnergy; } @Override diff --git a/src/main/java/mekanism/common/item/ItemBlockGasTank.java b/src/main/java/mekanism/common/item/ItemBlockGasTank.java index fa7721650..6cba41af2 100644 --- a/src/main/java/mekanism/common/item/ItemBlockGasTank.java +++ b/src/main/java/mekanism/common/item/ItemBlockGasTank.java @@ -67,7 +67,7 @@ public class ItemBlockGasTank extends ItemBlock implements IGasItem, ISustainedI } @Override - public String getUnlocalizedName(ItemStack itemstack) + public String getItemStackDisplayName(ItemStack itemstack) { return LangUtils.localize("tile.GasTank" + getBaseTier(itemstack).getSimpleName() + ".name"); } diff --git a/src/main/java/mekanism/common/item/ItemBlockMachine.java b/src/main/java/mekanism/common/item/ItemBlockMachine.java index 84867b777..06f0f7e3f 100644 --- a/src/main/java/mekanism/common/item/ItemBlockMachine.java +++ b/src/main/java/mekanism/common/item/ItemBlockMachine.java @@ -9,14 +9,14 @@ import java.util.Map; import mekanism.api.Coord4D; import mekanism.api.EnumColor; -import mekanism.api.Range4D; import mekanism.api.MekanismConfig.general; +import mekanism.api.Range4D; import mekanism.api.energy.IEnergizedItem; import mekanism.client.MekKeyHandler; import mekanism.client.MekanismKeyHandler; +import mekanism.common.Mekanism; import mekanism.common.Tier.BaseTier; import mekanism.common.Tier.FluidTankTier; -import mekanism.common.Mekanism; import mekanism.common.Upgrade; import mekanism.common.base.IFactory; import mekanism.common.base.IRedstoneControl; @@ -511,16 +511,16 @@ public class ItemBlockMachine extends ItemBlock implements IEnergizedItem, ISpec else { if(pos.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { - Coord4D coord = new Coord4D(pos.getBlockPos(), world.provider.getDimensionId()); + Coord4D coord = new Coord4D(pos.getBlockPos(), world); - if(!world.provider.canMineBlock(entityplayer, coord)) + if(!world.provider.canMineBlock(entityplayer, coord.getPos())) { return itemstack; } if(!entityplayer.isSneaking()) { - if(!entityplayer.canPlayerEdit(coord, pos.sideHit, itemstack)) + if(!entityplayer.canPlayerEdit(coord.getPos(), pos.sideHit, itemstack)) { return itemstack; } @@ -546,7 +546,7 @@ public class ItemBlockMachine extends ItemBlock implements IEnergizedItem, ISpec setFluidStack(newStack, itemstack); } - world.setBlockToAir(coord); + world.setBlockToAir(coord.getPos()); } } else { @@ -559,12 +559,12 @@ public class ItemBlockMachine extends ItemBlock implements IEnergizedItem, ISpec Coord4D trans = coord.offset(pos.sideHit); - if(!entityplayer.canPlayerEdit(trans, pos.sideHit, itemstack)) + if(!entityplayer.canPlayerEdit(trans.getPos(), pos.sideHit, itemstack)) { return itemstack; } - if(tryPlaceContainedLiquid(world, itemstack, trans) && !entityplayer.capabilities.isCreativeMode) + if(tryPlaceContainedLiquid(world, itemstack, trans.getPos()) && !entityplayer.capabilities.isCreativeMode) { FluidStack newStack = stored.copy(); newStack.amount -= FluidContainerRegistry.BUCKET_VOLUME; diff --git a/src/main/java/mekanism/common/item/ItemConfigurator.java b/src/main/java/mekanism/common/item/ItemConfigurator.java index 5f7eedd77..a04576257 100644 --- a/src/main/java/mekanism/common/item/ItemConfigurator.java +++ b/src/main/java/mekanism/common/item/ItemConfigurator.java @@ -32,13 +32,13 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; -import net.minecraft.world.World; import net.minecraft.util.EnumFacing; -import buildcraft.api.tools.IToolWrench; -import cofh.api.item.IToolHammer; +import net.minecraft.world.World; import net.minecraftforge.fml.common.Optional.Interface; import net.minecraftforge.fml.common.Optional.InterfaceList; import net.minecraftforge.fml.common.Optional.Method; +import buildcraft.api.tools.IToolWrench; +import cofh.api.item.IToolHammer; @InterfaceList({ @Interface(iface = "buildcraft.api.tools.IToolWrench", modid = "BuildCraft") @@ -69,7 +69,7 @@ public class ItemConfigurator extends ItemEnergized implements IMekWrench, ITool { Block block = world.getBlockState(pos).getBlock(); TileEntity tile = world.getTileEntity(pos); - + if(getState(stack).isConfigurating()) //Configurate { if(tile instanceof ISideConfiguration && ((ISideConfiguration)tile).getConfig().supports(getState(stack).getTransmission())) diff --git a/src/main/java/mekanism/common/item/ItemEnergized.java b/src/main/java/mekanism/common/item/ItemEnergized.java index a870d43ad..7464c2dd9 100644 --- a/src/main/java/mekanism/common/item/ItemEnergized.java +++ b/src/main/java/mekanism/common/item/ItemEnergized.java @@ -17,10 +17,10 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import cofh.api.energy.IEnergyContainerItem; import net.minecraftforge.fml.common.Optional.Interface; import net.minecraftforge.fml.common.Optional.InterfaceList; import net.minecraftforge.fml.common.Optional.Method; +import cofh.api.energy.IEnergyContainerItem; @InterfaceList({ @Interface(iface = "ic2.api.item.ISpecialElectricItem", modid = "IC2") diff --git a/src/main/java/mekanism/common/item/ItemFreeRunners.java b/src/main/java/mekanism/common/item/ItemFreeRunners.java index e1545c460..61961d305 100644 --- a/src/main/java/mekanism/common/item/ItemFreeRunners.java +++ b/src/main/java/mekanism/common/item/ItemFreeRunners.java @@ -26,13 +26,13 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.DamageSource; import net.minecraftforge.common.util.EnumHelper; import net.minecraftforge.event.entity.living.LivingAttackEvent; -import cofh.api.energy.IEnergyContainerItem; import net.minecraftforge.fml.common.Optional.Interface; import net.minecraftforge.fml.common.Optional.InterfaceList; import net.minecraftforge.fml.common.Optional.Method; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import cofh.api.energy.IEnergyContainerItem; @InterfaceList({ @Interface(iface = "ic2.api.item.ISpecialElectricItem", modid = "IC2") diff --git a/src/main/java/mekanism/common/item/ItemGaugeDropper.java b/src/main/java/mekanism/common/item/ItemGaugeDropper.java index be3fe256d..0409e1f51 100644 --- a/src/main/java/mekanism/common/item/ItemGaugeDropper.java +++ b/src/main/java/mekanism/common/item/ItemGaugeDropper.java @@ -13,8 +13,6 @@ import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; import net.minecraft.world.World; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidStack; diff --git a/src/main/java/mekanism/common/item/ItemJetpack.java b/src/main/java/mekanism/common/item/ItemJetpack.java index 1efd23468..4f75d366b 100644 --- a/src/main/java/mekanism/common/item/ItemJetpack.java +++ b/src/main/java/mekanism/common/item/ItemJetpack.java @@ -37,12 +37,6 @@ public class ItemJetpack extends ItemArmor implements IGasItem, ISpecialArmor super(EnumHelper.addArmorMaterial("JETPACK", "jetpack", 0, new int[] {0, 0, 0, 0}, 0), 0, 1); setCreativeTab(Mekanism.tabMekanism); } - -/* - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister register) {} -*/ @Override public boolean showDurabilityBar(ItemStack stack) @@ -221,7 +215,6 @@ public class ItemJetpack extends ItemArmor implements IGasItem, ISpecialArmor { ItemStack empty = new ItemStack(this); setGas(empty, null); - empty.setItemDamage(100); return empty; } @@ -230,7 +223,6 @@ public class ItemJetpack extends ItemArmor implements IGasItem, ISpecialArmor { ItemStack empty = new ItemStack(this); setGas(empty, null); - empty.setItemDamage(100); list.add(empty); ItemStack filled = new ItemStack(this); diff --git a/src/main/java/mekanism/common/item/ItemNetworkReader.java b/src/main/java/mekanism/common/item/ItemNetworkReader.java index 2969edf5e..0390be50d 100644 --- a/src/main/java/mekanism/common/item/ItemNetworkReader.java +++ b/src/main/java/mekanism/common/item/ItemNetworkReader.java @@ -12,14 +12,13 @@ import mekanism.api.transmitters.IGridTransmitter; import mekanism.api.transmitters.TransmitterNetworkRegistry; import mekanism.common.capabilities.Capabilities; import mekanism.common.util.MekanismUtils; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; -import net.minecraft.world.World; import net.minecraft.util.EnumFacing; +import net.minecraft.world.World; public class ItemNetworkReader extends ItemEnergized { diff --git a/src/main/java/mekanism/common/item/ItemPortableTeleporter.java b/src/main/java/mekanism/common/item/ItemPortableTeleporter.java index e3fd4db9a..aa6eb8c23 100644 --- a/src/main/java/mekanism/common/item/ItemPortableTeleporter.java +++ b/src/main/java/mekanism/common/item/ItemPortableTeleporter.java @@ -83,7 +83,7 @@ public class ItemPortableTeleporter extends ItemEnergized implements IOwnerItem neededEnergy+=10000; } - int distance = (int)entity.getDistance(coords.getX(), coords.getY(), coords.getZ()); + int distance = (int)entity.getDistance(coords.xCoord, coords.yCoord, coords.zCoord); neededEnergy+=(distance*10); diff --git a/src/main/java/mekanism/common/item/ItemUpgrade.java b/src/main/java/mekanism/common/item/ItemUpgrade.java index 03930846b..d9ff36717 100644 --- a/src/main/java/mekanism/common/item/ItemUpgrade.java +++ b/src/main/java/mekanism/common/item/ItemUpgrade.java @@ -9,12 +9,11 @@ import mekanism.common.util.LangUtils; import mekanism.common.util.MekanismUtils; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; - -import org.lwjgl.input.Keyboard; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.input.Keyboard; + public class ItemUpgrade extends ItemMekanism implements IUpgradeItem { private Upgrade upgrade; diff --git a/src/main/java/mekanism/common/multiblock/IMultiblock.java b/src/main/java/mekanism/common/multiblock/IMultiblock.java index 97ec03128..aecde9861 100644 --- a/src/main/java/mekanism/common/multiblock/IMultiblock.java +++ b/src/main/java/mekanism/common/multiblock/IMultiblock.java @@ -8,5 +8,5 @@ public interface IMultiblock> public boolean onActivate(EntityPlayer player); - public void update(); + public void doUpdate(); } diff --git a/src/main/java/mekanism/common/multiblock/IStructuralMultiblock.java b/src/main/java/mekanism/common/multiblock/IStructuralMultiblock.java index 279a6daf6..67394fdef 100644 --- a/src/main/java/mekanism/common/multiblock/IStructuralMultiblock.java +++ b/src/main/java/mekanism/common/multiblock/IStructuralMultiblock.java @@ -12,5 +12,5 @@ public interface IStructuralMultiblock public void setController(Coord4D coord); - public void update(); + public void doUpdate(); } diff --git a/src/main/java/mekanism/common/multiblock/UpdateProtocol.java b/src/main/java/mekanism/common/multiblock/UpdateProtocol.java index ffd71d9fa..ce4729f8b 100644 --- a/src/main/java/mekanism/common/multiblock/UpdateProtocol.java +++ b/src/main/java/mekanism/common/multiblock/UpdateProtocol.java @@ -6,18 +6,17 @@ import java.util.List; import java.util.Set; import mekanism.api.Coord4D; -import mekanism.common.Mekanism; import mekanism.common.tile.TileEntityMultiblock; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; -import net.minecraft.world.World; import net.minecraft.util.EnumFacing; +import net.minecraft.world.World; public abstract class UpdateProtocol> { /** The multiblock nodes that have already been iterated over. */ - public Set iteratedNodes = new HashSet(); + public Set iteratedNodes = new HashSet(); public Set innerNodes = new HashSet(); @@ -36,11 +35,11 @@ public abstract class UpdateProtocol> * Recursively loops through each node connected to the given TileEntity. * @param tile - the TileEntity to loop over */ - public void loopThrough(TileEntity tile) + public void loopThrough(Coord4D coord) { - World worldObj = tile.getWorld(); + World worldObj = pointer.getWorld(); - int origX = tile.getPos().getX(), origY = tile.getPos().getY(), origZ = tile.getPos().getZ(); + int origX = coord.xCoord, origY = coord.yCoord, origZ = coord.zCoord; boolean isCorner = true; boolean isHollow = true; @@ -143,13 +142,13 @@ public abstract class UpdateProtocol> rightBlocks = false; break; } - else if(isFrame(Coord4D.get(tile).add(x, y, z), origX+xmin, origX+xmax, origY+ymin, origY+ymax, origZ+zmin, origZ+zmax) && !isValidFrame(origX+x, origY+y, origZ+z)) + else if(isFrame(coord.translate(x, y, z), origX+xmin, origX+xmax, origY+ymin, origY+ymax, origZ+zmin, origZ+zmax) && !isValidFrame(origX+x, origY+y, origZ+z)) { rightFrame = false; break; } else { - locations.add(Coord4D.get(tile).add(x, y, z)); + locations.add(coord.translate(x, y, z)); } } else { @@ -194,15 +193,15 @@ public abstract class UpdateProtocol> structure.volHeight = Math.abs(ymax-ymin)+1; structure.volWidth = Math.abs(zmax-zmin)+1; structure.volume = structure.volLength*structure.volHeight*structure.volWidth; - structure.renderLocation = Coord4D.get(tile).add(0, 1, 0); - structure.minLocation = Coord4D.get(tile).add(xmin, ymin, zmin); - structure.maxLocation = Coord4D.get(tile).add(xmax, ymax, zmax); + structure.renderLocation = coord.translate(0, 1, 0); + structure.minLocation = coord.translate(xmin, ymin, zmin); + structure.maxLocation = coord.translate(xmax, ymax, zmax); if(structure.volLength >= 3 && structure.volHeight >= 3 && structure.volWidth >= 3) { onStructureCreated(structure, origX, origY, origZ, xmin, xmax, ymin, ymax, zmin, zmax); - if(structure.locations.contains(Coord4D.get(pointer)) && isCorrectCorner(Coord4D.get(tile), origX+xmin, origY+ymin, origZ+zmin)) + if(structure.locations.contains(Coord4D.get(pointer)) && isCorrectCorner(coord, origX+xmin, origY+ymin, origZ+zmin)) { if(canForm(structure)) { @@ -215,18 +214,17 @@ public abstract class UpdateProtocol> } innerNodes.clear(); - iteratedNodes.add(tile); + iteratedNodes.add(coord); for(EnumFacing side : EnumFacing.VALUES) { - Coord4D coord = Coord4D.get(tile).offset(side); - TileEntity tileEntity = coord.getTileEntity(tile.getWorld()); - - if(isViableNode(coord)) + Coord4D sideCoord = coord.offset(side); + + if(isViableNode(sideCoord.getPos())) { - if(!iteratedNodes.contains(tileEntity)) + if(!iteratedNodes.contains(sideCoord)) { - loopThrough(tileEntity); + loopThrough(sideCoord); } } } @@ -239,27 +237,27 @@ public abstract class UpdateProtocol> public EnumFacing getSide(Coord4D obj, int xmin, int xmax, int ymin, int ymax, int zmin, int zmax) { - if(obj.getX() == xmin) + if(obj.xCoord == xmin) { return EnumFacing.WEST; } - else if(obj.getX() == xmax) + else if(obj.xCoord == xmax) { return EnumFacing.EAST; } - else if(obj.getY() == ymin) + else if(obj.yCoord == ymin) { return EnumFacing.DOWN; } - else if(obj.getY() == ymax) + else if(obj.yCoord == ymax) { return EnumFacing.UP; } - else if(obj.getZ() == zmin) + else if(obj.zCoord == zmin) { return EnumFacing.NORTH; } - else if(obj.getZ() == zmax) + else if(obj.zCoord == zmax) { return EnumFacing.SOUTH; } @@ -293,7 +291,7 @@ public abstract class UpdateProtocol> */ public boolean isViableNode(int x, int y, int z) { - TileEntity tile = pointer.getWorld().getTileEntity(new BlockPos(x, y, z)); + TileEntity tile = new Coord4D(x, y, z, pointer.getWorld().provider.getDimensionId()).getTileEntity(pointer.getWorld()); if(tile instanceof IStructuralMultiblock) { @@ -318,7 +316,12 @@ public abstract class UpdateProtocol> */ public boolean isViableNode(BlockPos pos) { - TileEntity tile = pointer.getWorld().getTileEntity(pos); + TileEntity tile = new Coord4D(pos, pointer.getWorld()).getTileEntity(pointer.getWorld()); + + if(tile == null || !tile.hasWorldObj() || tile.isInvalid()) + { + return false; + } if(tile instanceof IStructuralMultiblock) { @@ -347,7 +350,7 @@ public abstract class UpdateProtocol> */ private boolean isCorrectCorner(Coord4D obj, int xmin, int ymin, int zmin) { - if(obj.getX() == xmin && obj.getY() == ymin && obj.getZ() == zmin) + if(obj.xCoord == xmin && obj.yCoord == ymin && obj.zCoord == zmin) { return true; } @@ -368,31 +371,31 @@ public abstract class UpdateProtocol> */ private boolean isFrame(Coord4D obj, int xmin, int xmax, int ymin, int ymax, int zmin, int zmax) { - if(obj.getX() == xmin && obj.getY() == ymin) + if(obj.xCoord == xmin && obj.yCoord == ymin) return true; - if(obj.getX() == xmax && obj.getY() == ymin) + if(obj.xCoord == xmax && obj.yCoord == ymin) return true; - if(obj.getX() == xmin && obj.getY() == ymax) + if(obj.xCoord == xmin && obj.yCoord == ymax) return true; - if(obj.getX() == xmax && obj.getY() == ymax) + if(obj.xCoord == xmax && obj.yCoord == ymax) return true; - if(obj.getX() == xmin && obj.getZ() == zmin) + if(obj.xCoord == xmin && obj.zCoord == zmin) return true; - if(obj.getX() == xmax && obj.getZ() == zmin) + if(obj.xCoord == xmax && obj.zCoord == zmin) return true; - if(obj.getX() == xmin && obj.getZ() == zmax) + if(obj.xCoord == xmin && obj.zCoord == zmax) return true; - if(obj.getX() == xmax && obj.getZ() == zmax) + if(obj.xCoord == xmax && obj.zCoord == zmax) return true; - if(obj.getY() == ymin && obj.getZ() == zmin) + if(obj.yCoord == ymin && obj.zCoord == zmin) return true; - if(obj.getY() == ymax && obj.getZ() == zmin) + if(obj.yCoord == ymax && obj.zCoord == zmin) return true; - if(obj.getY() == ymin && obj.getZ() == zmax) + if(obj.yCoord == ymin && obj.zCoord == zmax) return true; - if(obj.getY() == ymax && obj.getZ() == zmax) + if(obj.yCoord == ymax && obj.zCoord == zmax) return true; return false; @@ -458,16 +461,18 @@ public abstract class UpdateProtocol> */ public void doUpdate() { - loopThrough(pointer); - + loopThrough(Coord4D.get(pointer)); + if(structureFound != null) { - for(TileEntity tileEntity : iteratedNodes) + for(Coord4D coord : iteratedNodes) { - if(!structureFound.locations.contains(Coord4D.get(tileEntity))) + if(!structureFound.locations.contains(coord)) { - for(TileEntity tile : iteratedNodes) + for(Coord4D newCoord : iteratedNodes) { + TileEntity tile = newCoord.getTileEntity(pointer.getWorld()); + if(tile instanceof TileEntityMultiblock) { ((TileEntityMultiblock)tile).structure = null; @@ -478,9 +483,9 @@ public abstract class UpdateProtocol> } } - for(Coord4D coord : innerNodes) + for(Coord4D newCoord : innerNodes) { - killInnerNode(coord); + killInnerNode(newCoord); } return; @@ -530,7 +535,6 @@ public abstract class UpdateProtocol> //TODO perhaps drop from pointer? cache.apply((T)structureFound); - structureFound.inventoryID = idToUse; onFormed(); @@ -548,7 +552,7 @@ public abstract class UpdateProtocol> if(toUse == null) { - toUse = obj.clone(); + toUse = obj; } } else if(tileEntity instanceof IStructuralMultiblock) @@ -565,8 +569,10 @@ public abstract class UpdateProtocol> } } else { - for(TileEntity tile : iteratedNodes) + for(Coord4D coord : iteratedNodes) { + TileEntity tile = coord.getTileEntity(pointer.getWorld()); + if(tile instanceof TileEntityMultiblock) { TileEntityMultiblock tileEntity = (TileEntityMultiblock)tile; diff --git a/src/main/java/mekanism/common/multipart/ItemGlowPanel.java b/src/main/java/mekanism/common/multipart/ItemGlowPanel.java index cd76ea190..986f7ff37 100644 --- a/src/main/java/mekanism/common/multipart/ItemGlowPanel.java +++ b/src/main/java/mekanism/common/multipart/ItemGlowPanel.java @@ -2,19 +2,6 @@ package mekanism.common.multipart; import java.util.List; -import mekanism.api.EnumColor; -import mekanism.common.Mekanism; -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.BlockPos; -import net.minecraft.util.StatCollector; -import net.minecraft.util.Vec3; -import net.minecraft.world.World; -import net.minecraft.util.EnumFacing; /* import codechicken.lib.vec.BlockCoord; import codechicken.lib.vec.Vector3; @@ -25,10 +12,19 @@ import codechicken.multipart.TileMultipart; */ import mcmultipart.item.ItemMultiPart; import mcmultipart.multipart.IMultipart; -import mcmultipart.multipart.IMultipartContainer; - -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; +import mekanism.api.EnumColor; +import mekanism.common.Mekanism; +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.BlockPos; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.StatCollector; +import net.minecraft.util.Vec3; +import net.minecraft.world.World; public class ItemGlowPanel extends ItemMultiPart { diff --git a/src/main/java/mekanism/common/multipart/ItemPartTransmitter.java b/src/main/java/mekanism/common/multipart/ItemPartTransmitter.java index f07a4ea76..740e50a58 100644 --- a/src/main/java/mekanism/common/multipart/ItemPartTransmitter.java +++ b/src/main/java/mekanism/common/multipart/ItemPartTransmitter.java @@ -2,6 +2,8 @@ package mekanism.common.multipart; import java.util.List; +import mcmultipart.item.ItemMultiPart; +import mcmultipart.multipart.IMultipart; import mekanism.api.EnumColor; import mekanism.api.transmitters.TransmissionType; import mekanism.client.MekKeyHandler; @@ -18,9 +20,9 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.util.Vec3; import net.minecraft.world.World; -import net.minecraft.util.EnumFacing; /* import codechicken.lib.vec.BlockCoord; import codechicken.lib.vec.Vector3; @@ -30,9 +32,6 @@ import codechicken.multipart.TMultiPart; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import mcmultipart.item.ItemMultiPart; -import mcmultipart.multipart.IMultipart; - public class ItemPartTransmitter extends ItemMultiPart { public ItemPartTransmitter() diff --git a/src/main/java/mekanism/common/multipart/MultipartMekanism.java b/src/main/java/mekanism/common/multipart/MultipartMekanism.java index 52c043517..5eb7b12ee 100644 --- a/src/main/java/mekanism/common/multipart/MultipartMekanism.java +++ b/src/main/java/mekanism/common/multipart/MultipartMekanism.java @@ -2,10 +2,14 @@ package mekanism.common.multipart; import static mekanism.common.block.states.BlockStateMachine.MachineBlock.MACHINE_BLOCK_1; import static mekanism.common.block.states.BlockStateMachine.MachineBlock.MACHINE_BLOCK_2; +import mcmultipart.multipart.IMultipart; +import mcmultipart.multipart.IPartFactory; +import mcmultipart.multipart.MultipartRegistry; import mekanism.common.MekanismBlocks; import mekanism.common.Tier; import mekanism.common.block.states.BlockStateMachine.MachineType; import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.common.event.FMLInterModComms; /* import codechicken.microblock.BlockMicroMaterial; import codechicken.microblock.MicroMaterialRegistry; @@ -14,13 +18,6 @@ import codechicken.multipart.MultiPartRegistry.IPartFactory; import codechicken.multipart.MultipartGenerator; import codechicken.multipart.TMultiPart; */ -import mcmultipart.microblock.BlockMicroMaterial; -import mcmultipart.microblock.MicroblockRegistry; -import mcmultipart.multipart.IMultipart; -import mcmultipart.multipart.IPartFactory; -import mcmultipart.multipart.MultipartRegistry; - -import net.minecraftforge.fml.common.event.FMLInterModComms; public class MultipartMekanism implements IPartFactory { diff --git a/src/main/java/mekanism/common/multipart/MultipartTransmitter.java b/src/main/java/mekanism/common/multipart/MultipartTransmitter.java index 347c8035b..67fd9f828 100644 --- a/src/main/java/mekanism/common/multipart/MultipartTransmitter.java +++ b/src/main/java/mekanism/common/multipart/MultipartTransmitter.java @@ -2,6 +2,7 @@ package mekanism.common.multipart; import java.util.Collection; +import mcmultipart.multipart.IMultipartContainer; import mekanism.api.Coord4D; import mekanism.api.transmitters.DynamicNetwork; import mekanism.api.transmitters.IGridTransmitter; @@ -11,10 +12,8 @@ import mekanism.common.transmitters.Transmitter; import mekanism.common.util.MekanismUtils; import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; import net.minecraft.util.EnumFacing; - -import mcmultipart.multipart.IMultipartContainer; +import net.minecraft.world.World; public class MultipartTransmitter> extends Transmitter { @@ -40,7 +39,7 @@ public class MultipartTransmitter> extends Tran @Override public Coord4D coord() { - return new Coord4D(getPart().getPos(), getPart().getWorld().provider.getDimensionId()); + return new Coord4D(getPart().getPos(), getPart().getWorld()); } @Override diff --git a/src/main/java/mekanism/common/multipart/PartDiversionTransporter.java b/src/main/java/mekanism/common/multipart/PartDiversionTransporter.java index 6e468645c..dc69975f6 100644 --- a/src/main/java/mekanism/common/multipart/PartDiversionTransporter.java +++ b/src/main/java/mekanism/common/multipart/PartDiversionTransporter.java @@ -11,7 +11,6 @@ import mekanism.common.Mekanism; import mekanism.common.content.transporter.TransporterStack; import mekanism.common.network.PacketTileEntity.TileEntityMessage; import mekanism.common.util.LangUtils; - import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; @@ -143,7 +142,7 @@ public class PartDiversionTransporter extends PartLogisticalTransporter notifyPartUpdate(); notifyTileChange(); player.addChatMessage(new ChatComponentText(EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " " + LangUtils.localize("tooltip.configurator.toggleDiverter") + ": " + EnumColor.RED + description)); - Coord4D coord = new Coord4D(getPos(), getWorld().provider.getDimensionId()); + Coord4D coord = new Coord4D(getPos(), getWorld()); Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(coord, getNetworkedData(new ArrayList())), new Range4D(coord)); return true; diff --git a/src/main/java/mekanism/common/multipart/PartGlowPanel.java b/src/main/java/mekanism/common/multipart/PartGlowPanel.java index 7e653786a..12355154b 100644 --- a/src/main/java/mekanism/common/multipart/PartGlowPanel.java +++ b/src/main/java/mekanism/common/multipart/PartGlowPanel.java @@ -3,23 +3,25 @@ package mekanism.common.multipart; import java.util.Collections; import java.util.List; +import mcmultipart.microblock.IMicroblock.IFaceMicroblock; +import mcmultipart.multipart.IMultipart; +import mcmultipart.multipart.IOccludingPart; +import mcmultipart.multipart.Multipart; +import mcmultipart.multipart.PartSlot; +import mcmultipart.raytrace.PartMOP; import mekanism.api.Coord4D; import mekanism.api.EnumColor; -import mekanism.client.render.RenderGlowPanel; import mekanism.common.MekanismItems; import mekanism.common.block.states.BlockStateFacing; import net.minecraft.block.state.BlockState; import net.minecraft.block.state.IBlockState; -import net.minecraft.client.particle.EffectRenderer; -import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; //import net.minecraft.util.IIcon; import net.minecraft.network.PacketBuffer; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.EnumFacing; import net.minecraft.util.Vec3; /* @@ -221,8 +223,8 @@ public class PartGlowPanel extends Multipart implements IOccludingPart//, JIconH public boolean canStay() { - Coord4D adj = new Coord4D(getPos().offset(side), getWorld().provider.getDimensionId()); - return getWorld().isSideSolid(adj, side.getOpposite()) || (getContainer().getPartInSlot(PartSlot.getFaceSlot(side)) instanceof IFaceMicroblock && ((IFaceMicroblock)getContainer().getPartInSlot(PartSlot.getFaceSlot(side))).isFaceHollow()); + Coord4D adj = new Coord4D(getPos().offset(side), getWorld()); + return getWorld().isSideSolid(adj.getPos(), side.getOpposite()) || (getContainer().getPartInSlot(PartSlot.getFaceSlot(side)) instanceof IFaceMicroblock && ((IFaceMicroblock)getContainer().getPartInSlot(PartSlot.getFaceSlot(side))).isFaceHollow()); } @Override diff --git a/src/main/java/mekanism/common/multipart/PartLogisticalTransporter.java b/src/main/java/mekanism/common/multipart/PartLogisticalTransporter.java index 84efc8cf1..6b256a3eb 100644 --- a/src/main/java/mekanism/common/multipart/PartLogisticalTransporter.java +++ b/src/main/java/mekanism/common/multipart/PartLogisticalTransporter.java @@ -36,10 +36,10 @@ import net.minecraft.nbt.NBTTagList; import net.minecraft.network.PacketBuffer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumFacing; //import net.minecraft.util.IIcon; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.util.Constants.NBT; -import net.minecraft.util.EnumFacing; /* import codechicken.lib.data.MCDataInput; import codechicken.lib.data.MCDataOutput; @@ -389,8 +389,8 @@ public class PartLogisticalTransporter extends PartTransmitter implements IFluidHandler { diff --git a/src/main/java/mekanism/common/multipart/PartPressurizedTube.java b/src/main/java/mekanism/common/multipart/PartPressurizedTube.java index b17a9fbc4..5f9825b18 100644 --- a/src/main/java/mekanism/common/multipart/PartPressurizedTube.java +++ b/src/main/java/mekanism/common/multipart/PartPressurizedTube.java @@ -9,11 +9,9 @@ import mekanism.api.gas.GasTank; import mekanism.api.gas.GasTransmission; import mekanism.api.gas.IGasHandler; import mekanism.api.transmitters.TransmissionType; -import mekanism.client.render.RenderPartTransmitter; import mekanism.common.Tier; import mekanism.common.Tier.BaseTier; import mekanism.common.Tier.TubeTier; -import mekanism.common.util.MekanismUtils; //import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.renderer.texture.TextureMap; @@ -27,8 +25,6 @@ import codechicken.lib.data.MCDataInput; import codechicken.lib.data.MCDataOutput; import codechicken.lib.vec.Vector3; */ -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class PartPressurizedTube extends PartTransmitter implements IGasHandler { diff --git a/src/main/java/mekanism/common/multipart/PartSidedPipe.java b/src/main/java/mekanism/common/multipart/PartSidedPipe.java index 6ac752205..394167ec0 100644 --- a/src/main/java/mekanism/common/multipart/PartSidedPipe.java +++ b/src/main/java/mekanism/common/multipart/PartSidedPipe.java @@ -6,36 +6,6 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; -import mekanism.api.Coord4D; -import mekanism.api.EnumColor; -import mekanism.api.IConfigurable; -import mekanism.api.MekanismConfig.client; -import mekanism.api.transmitters.IBlockableConnection; -import mekanism.api.transmitters.ITransmitter; -import mekanism.api.transmitters.TransmissionType; -import mekanism.common.MekanismItems; -import mekanism.common.Tier; -import mekanism.common.base.ITileNetwork; -import mekanism.common.capabilities.Capabilities; -import mekanism.common.multipart.TransmitterType.Size; -import mekanism.common.util.MekanismUtils; - -import net.minecraft.block.Block; -import net.minecraft.client.renderer.texture.TextureAtlasSprite; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.network.PacketBuffer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; -import net.minecraft.util.ChatComponentText; -import net.minecraft.util.EnumFacing; -//import net.minecraft.util.IIcon; -import net.minecraft.util.ITickable; -import net.minecraft.util.Vec3; -import net.minecraft.world.World; /*import codechicken.lib.data.MCDataInput; import codechicken.lib.data.MCDataOutput; import codechicken.lib.raytracer.ExtendedMOP; @@ -60,6 +30,35 @@ import mcmultipart.multipart.Multipart; import mcmultipart.raytrace.PartMOP; import mcmultipart.raytrace.RayTraceUtils; import mcmultipart.raytrace.RayTraceUtils.RayTraceResultPart; +import mekanism.api.Coord4D; +import mekanism.api.EnumColor; +import mekanism.api.IConfigurable; +import mekanism.api.MekanismConfig.client; +import mekanism.api.transmitters.IBlockableConnection; +import mekanism.api.transmitters.ITransmitter; +import mekanism.api.transmitters.TransmissionType; +import mekanism.common.MekanismItems; +import mekanism.common.Tier; +import mekanism.common.base.ITileNetwork; +import mekanism.common.capabilities.Capabilities; +import mekanism.common.multipart.TransmitterType.Size; +import mekanism.common.util.MekanismUtils; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.texture.TextureAtlasSprite; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.PacketBuffer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.BlockPos; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumFacing; +//import net.minecraft.util.IIcon; +import net.minecraft.util.ITickable; +import net.minecraft.util.Vec3; +import net.minecraft.world.World; public abstract class PartSidedPipe extends Multipart implements IOccludingPart, /*ISlotOccludingPart, ISidedHollowConnect, JIconHitEffects, INeighborTileChange,*/ ITileNetwork, IBlockableConnection, IConfigurable, ITransmitter, ITickable { @@ -313,7 +312,7 @@ public abstract class PartSidedPipe extends Multipart implements IOccludingPart, public boolean getPossibleTransmitterConnection(EnumFacing side) { - if(handlesRedstone() && redstoneReactive && MekanismUtils.isGettingPowered(getWorld(), new Coord4D(getPos()))) + if(handlesRedstone() && redstoneReactive && MekanismUtils.isGettingPowered(getWorld(), new Coord4D(getPos(), getWorld()))) { return false; } @@ -346,7 +345,7 @@ public abstract class PartSidedPipe extends Multipart implements IOccludingPart, { if(canConnectMutual(side)) { - Coord4D coord = new Coord4D(getPos()).offset(side); + Coord4D coord = new Coord4D(getPos(), getWorld()).offset(side); if(!getWorld().isRemote && !coord.exists(getWorld())) { @@ -625,7 +624,7 @@ public abstract class PartSidedPipe extends Multipart implements IOccludingPart, { if(redstoneReactive) { - redstonePowered = MekanismUtils.isGettingPowered(getWorld(), new Coord4D(getPos())); + redstonePowered = MekanismUtils.isGettingPowered(getWorld(), new Coord4D(getPos(), getWorld())); } else { redstonePowered = false; @@ -650,7 +649,7 @@ public abstract class PartSidedPipe extends Multipart implements IOccludingPart, { if(redstoneReactive) { - redstonePowered = MekanismUtils.isGettingPowered(getWorld(), new Coord4D(getPos())); + redstonePowered = MekanismUtils.isGettingPowered(getWorld(), new Coord4D(getPos(), getWorld())); } else { redstonePowered = false; @@ -883,6 +882,6 @@ public abstract class PartSidedPipe extends Multipart implements IOccludingPart, public void notifyTileChange() { - MekanismUtils.notifyLoadedNeighborsOfTileChange(getWorld(), new Coord4D(getPos())); + MekanismUtils.notifyLoadedNeighborsOfTileChange(getWorld(), new Coord4D(getPos(), getWorld())); } } diff --git a/src/main/java/mekanism/common/multipart/PartTransmitter.java b/src/main/java/mekanism/common/multipart/PartTransmitter.java index ef715cc1e..bf9274498 100644 --- a/src/main/java/mekanism/common/multipart/PartTransmitter.java +++ b/src/main/java/mekanism/common/multipart/PartTransmitter.java @@ -12,11 +12,10 @@ import mekanism.api.transmitters.DynamicNetwork.NetworkClientRequest; import mekanism.api.transmitters.IGridTransmitter; import mekanism.api.transmitters.TransmitterNetworkRegistry; import mekanism.common.capabilities.Capabilities; - import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.EnumFacing; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.capabilities.Capability; -import net.minecraft.util.EnumFacing; public abstract class PartTransmitter> extends PartSidedPipe implements IAlloyInteraction { @@ -131,7 +130,7 @@ public abstract class PartTransmitter> extends { if(o1 instanceof IGridTransmitter && o2 instanceof IGridTransmitter) { - Coord4D thisCoord = new Coord4D(getPos(), getWorld().provider.getDimensionId()); + Coord4D thisCoord = new Coord4D(getPos(), getWorld()); Coord4D o1Coord = ((IGridTransmitter)o1).coord(); Coord4D o2Coord = ((IGridTransmitter)o2).coord(); diff --git a/src/main/java/mekanism/common/multipart/PartUniversalCable.java b/src/main/java/mekanism/common/multipart/PartUniversalCable.java index 533e24c9c..84d0d189f 100644 --- a/src/main/java/mekanism/common/multipart/PartUniversalCable.java +++ b/src/main/java/mekanism/common/multipart/PartUniversalCable.java @@ -5,7 +5,6 @@ import ic2.api.energy.tile.IEnergySource; import java.util.Collection; import java.util.List; -import mekanism.common.capabilities.Capabilities; import mekanism.api.MekanismConfig.general; import mekanism.api.energy.EnergyStack; import mekanism.api.energy.IStrictEnergyAcceptor; @@ -16,6 +15,7 @@ import mekanism.common.Tier; import mekanism.common.Tier.BaseTier; import mekanism.common.Tier.CableTier; import mekanism.common.base.EnergyAcceptorWrapper; +import mekanism.common.capabilities.Capabilities; import mekanism.common.util.CableUtils; import mekanism.common.util.MekanismUtils; //import net.minecraft.client.renderer.texture.IIconRegister; @@ -26,6 +26,7 @@ import net.minecraft.network.PacketBuffer; import net.minecraft.tileentity.TileEntity; //import net.minecraft.util.IIcon; import net.minecraft.util.EnumFacing; +import net.minecraftforge.common.capabilities.Capability; /* import codechicken.lib.data.MCDataInput; import codechicken.lib.data.MCDataOutput; @@ -34,8 +35,6 @@ import codechicken.lib.vec.Vector3; import cofh.api.energy.IEnergyHandler; import cofh.api.energy.IEnergyProvider; -import net.minecraftforge.common.capabilities.Capability; - public class PartUniversalCable extends PartTransmitter implements IStrictEnergyAcceptor, IEnergyHandler { public Tier.CableTier tier; diff --git a/src/main/java/mekanism/common/multipart/PlasticMicroMaterial.java b/src/main/java/mekanism/common/multipart/PlasticMicroMaterial.java index 84d8ab5ed..4dbf6287e 100644 --- a/src/main/java/mekanism/common/multipart/PlasticMicroMaterial.java +++ b/src/main/java/mekanism/common/multipart/PlasticMicroMaterial.java @@ -1,9 +1,7 @@ package mekanism.common.multipart; -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; - import mcmultipart.microblock.BlockMicroMaterial; +import net.minecraft.block.state.IBlockState; public class PlasticMicroMaterial extends BlockMicroMaterial { diff --git a/src/main/java/mekanism/common/multipart/TransmitterType.java b/src/main/java/mekanism/common/multipart/TransmitterType.java index bc9d010b3..4751e9e50 100644 --- a/src/main/java/mekanism/common/multipart/TransmitterType.java +++ b/src/main/java/mekanism/common/multipart/TransmitterType.java @@ -2,7 +2,6 @@ package mekanism.common.multipart; import mekanism.api.transmitters.TransmissionType; import mekanism.common.Tier.BaseTier; - import net.minecraft.client.renderer.texture.TextureAtlasSprite; public enum TransmitterType diff --git a/src/main/java/mekanism/common/network/PacketConfigSync.java b/src/main/java/mekanism/common/network/PacketConfigSync.java index 4618f08ff..53be4f315 100644 --- a/src/main/java/mekanism/common/network/PacketConfigSync.java +++ b/src/main/java/mekanism/common/network/PacketConfigSync.java @@ -8,8 +8,8 @@ import mekanism.api.util.UnitDisplayUtils.EnergyType; import mekanism.common.Mekanism; import mekanism.common.Tier; import mekanism.common.base.IModule; -import mekanism.common.block.states.BlockStateMachine.MachineType; import mekanism.common.block.states.BlockStateMachine; +import mekanism.common.block.states.BlockStateMachine.MachineType; import mekanism.common.network.PacketConfigSync.ConfigSyncMessage; import net.minecraftforge.fml.common.network.simpleimpl.IMessage; import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; diff --git a/src/main/java/mekanism/common/network/PacketDataRequest.java b/src/main/java/mekanism/common/network/PacketDataRequest.java index 7ad57a56c..08614d809 100644 --- a/src/main/java/mekanism/common/network/PacketDataRequest.java +++ b/src/main/java/mekanism/common/network/PacketDataRequest.java @@ -31,11 +31,10 @@ public class PacketDataRequest implements IMessageHandler implements IFluidContainerManager, IHeatTransfer +public class TileEntityBoilerCasing extends TileEntityMultiblock implements IHeatTransfer { /** A client-sided set of valves on this tank's structure that are currently active, used on the client for rendering fluids. */ public Set valveViewing = new HashSet(); @@ -220,7 +216,6 @@ public class TileEntityBoilerCasing extends TileEntityMultiblock= structure.upperRenderLocation.getY()) + if(structure != null && structure.upperRenderLocation != null && getPos().getY() >= structure.upperRenderLocation.yCoord) { if(structure.steamStored != null && structure.steamStored.amount > 0) { @@ -63,7 +63,7 @@ public class TileEntityBoilerValve extends TileEntityBoilerCasing implements IFl { if((!worldObj.isRemote && structure != null) || (worldObj.isRemote && clientHasStructure)) { - if(structure.upperRenderLocation != null && getPos().getY() >= structure.upperRenderLocation.getY()) + if(structure.upperRenderLocation != null && getPos().getY() >= structure.upperRenderLocation.yCoord) { return new FluidTankInfo[] {steamTank.getInfo()}; } @@ -78,7 +78,7 @@ public class TileEntityBoilerValve extends TileEntityBoilerCasing implements IFl @Override public int fill(EnumFacing from, FluidStack resource, boolean doFill) { - if(structure != null && structure.upperRenderLocation != null && getPos().getY() < structure.upperRenderLocation.getY()) + if(structure != null && structure.upperRenderLocation != null && getPos().getY() < structure.upperRenderLocation.yCoord) { return waterTank.fill(resource, doFill); } @@ -89,7 +89,7 @@ public class TileEntityBoilerValve extends TileEntityBoilerCasing implements IFl @Override public FluidStack drain(EnumFacing from, FluidStack resource, boolean doDrain) { - if(structure != null && structure.upperRenderLocation != null && getPos().getY() >= structure.upperRenderLocation.getY()) + if(structure != null && structure.upperRenderLocation != null && getPos().getY() >= structure.upperRenderLocation.yCoord) { if(structure.steamStored != null) { @@ -106,7 +106,7 @@ public class TileEntityBoilerValve extends TileEntityBoilerCasing implements IFl @Override public FluidStack drain(EnumFacing from, int maxDrain, boolean doDrain) { - if(structure != null && structure.upperRenderLocation != null && getPos().getY() >= structure.upperRenderLocation.getY()) + if(structure != null && structure.upperRenderLocation != null && getPos().getY() >= structure.upperRenderLocation.yCoord) { return steamTank.drain(maxDrain, doDrain); } @@ -119,7 +119,7 @@ public class TileEntityBoilerValve extends TileEntityBoilerCasing implements IFl { if((!worldObj.isRemote && structure != null) || (worldObj.isRemote && clientHasStructure)) { - return structure.upperRenderLocation != null && getPos().getY() < structure.upperRenderLocation.getY(); + return structure.upperRenderLocation != null && getPos().getY() < structure.upperRenderLocation.yCoord; } return false; @@ -130,7 +130,7 @@ public class TileEntityBoilerValve extends TileEntityBoilerCasing implements IFl { if((!worldObj.isRemote && structure != null) || (worldObj.isRemote && clientHasStructure)) { - return structure.upperRenderLocation != null && getPos().getY() >= structure.upperRenderLocation.getY(); + return structure.upperRenderLocation != null && getPos().getY() >= structure.upperRenderLocation.yCoord; } return false; diff --git a/src/main/java/mekanism/common/tile/TileEntityChargepad.java b/src/main/java/mekanism/common/tile/TileEntityChargepad.java index fda840607..ae63a78f9 100644 --- a/src/main/java/mekanism/common/tile/TileEntityChargepad.java +++ b/src/main/java/mekanism/common/tile/TileEntityChargepad.java @@ -26,10 +26,9 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumParticleTypes; - -import cofh.api.energy.IEnergyContainerItem; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import cofh.api.energy.IEnergyContainerItem; public class TileEntityChargepad extends TileEntityNoisyElectricBlock { diff --git a/src/main/java/mekanism/common/tile/TileEntityChemicalCrystallizer.java b/src/main/java/mekanism/common/tile/TileEntityChemicalCrystallizer.java index dd9bc93d6..97667339d 100644 --- a/src/main/java/mekanism/common/tile/TileEntityChemicalCrystallizer.java +++ b/src/main/java/mekanism/common/tile/TileEntityChemicalCrystallizer.java @@ -63,10 +63,6 @@ public class TileEntityChemicalCrystallizer extends TileEntityNoisyElectricBlock public double prevEnergy; - public float spinSpeed; - - public float spin; - public final double BASE_ENERGY_USAGE = usage.chemicalCrystallizerUsage; public double energyUsage = usage.chemicalCrystallizerUsage; diff --git a/src/main/java/mekanism/common/tile/TileEntityContainerBlock.java b/src/main/java/mekanism/common/tile/TileEntityContainerBlock.java index 8e2c2ed64..4815b7348 100644 --- a/src/main/java/mekanism/common/tile/TileEntityContainerBlock.java +++ b/src/main/java/mekanism/common/tile/TileEntityContainerBlock.java @@ -4,15 +4,18 @@ import mekanism.common.Upgrade; import mekanism.common.base.ISustainedInventory; import mekanism.common.util.InventoryUtils; import mekanism.common.util.LangUtils; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; +import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumFacing; import net.minecraft.util.IChatComponent; import net.minecraft.util.ITickable; +import net.minecraft.world.World; import net.minecraftforge.common.util.Constants.NBT; public abstract class TileEntityContainerBlock extends TileEntityBasicBlock implements ISidedInventory, ISustainedInventory, ITickable @@ -31,6 +34,12 @@ public abstract class TileEntityContainerBlock extends TileEntityBasicBlock impl { fullName = name; } + + @Override + public boolean shouldRefresh(World world, BlockPos pos, IBlockState oldState, IBlockState newState) + { + return oldState.getBlock() != newState.getBlock(); + } @Override public void update() diff --git a/src/main/java/mekanism/common/tile/TileEntityDigitalMiner.java b/src/main/java/mekanism/common/tile/TileEntityDigitalMiner.java index c785307ac..196e8450c 100644 --- a/src/main/java/mekanism/common/tile/TileEntityDigitalMiner.java +++ b/src/main/java/mekanism/common/tile/TileEntityDigitalMiner.java @@ -56,10 +56,10 @@ import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.WorldServer; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.util.Constants.NBT; -import net.minecraft.util.EnumFacing; import net.minecraftforge.event.world.BlockEvent; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -264,7 +264,7 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I toRemove.add(chunk); } - worldObj.playAuxSFXAtEntity(null, 2001, coord, Block.getIdFromBlock(block) + (meta << 12)); + worldObj.playAuxSFXAtEntity(null, 2001, coord.getPos(), Block.getIdFromBlock(block) + (meta << 12)); missingStack = null; } @@ -361,8 +361,8 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I IBlockState state = obj.getBlockState(worldObj); Block block = state.getBlock(); - EntityPlayer dummy = Mekanism.proxy.getDummyPlayer((WorldServer)worldObj, obj.getX(), obj.getY(), obj.getZ()).get(); - BlockEvent.BreakEvent event = new BlockEvent.BreakEvent(worldObj, obj, state, dummy); + EntityPlayer dummy = Mekanism.proxy.getDummyPlayer((WorldServer)worldObj, obj.xCoord, obj.yCoord, obj.zCoord).get(); + BlockEvent.BreakEvent event = new BlockEvent.BreakEvent(worldObj, obj.getPos(), state, dummy); MinecraftForge.EVENT_BUS.post(event); if(!event.isCanceled()) @@ -371,13 +371,13 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I if(stack != null) { - worldObj.setBlockState(obj, Block.getBlockFromItem(stack.getItem()).getStateFromMeta(stack.getItemDamage()), 3); + worldObj.setBlockState(obj.getPos(), Block.getBlockFromItem(stack.getItem()).getStateFromMeta(stack.getItemDamage()), 3); IBlockState s = obj.getBlockState(worldObj); - if(s.getBlock() instanceof BlockBush && !((BlockBush)s.getBlock()).canBlockStay(worldObj, obj, s)) + if(s.getBlock() instanceof BlockBush && !((BlockBush)s.getBlock()).canBlockStay(worldObj, obj.getPos(), s)) { - s.getBlock().dropBlockAsItem(worldObj, obj, s, 1); - worldObj.setBlockToAir(obj); + s.getBlock().dropBlockAsItem(worldObj, obj.getPos(), s, 1); + worldObj.setBlockToAir(obj.getPos()); } return true; @@ -387,7 +387,7 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I if(filter == null || (filter.replaceStack == null || !filter.requireStack)) { - worldObj.setBlockToAir(obj); + worldObj.setBlockToAir(obj.getPos()); return true; } @@ -529,7 +529,7 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I public TileEntity getPullInv() { - return Coord4D.get(this).add(0, 2, 0).getTileEntity(worldObj); + return Coord4D.get(this).translate(0, 2, 0).getTileEntity(worldObj); } public TileEntity getEjectInv() @@ -1030,9 +1030,9 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I int diameter = getDiameter(); Coord4D start = getStartingCoord(); - int x = start.getX()+index%diameter; - int y = start.getY()+(index/diameter/diameter); - int z = start.getZ()+(index/diameter)%diameter; + int x = start.xCoord+index%diameter; + int y = start.yCoord+(index/diameter/diameter); + int z = start.zCoord+(index/diameter)%diameter; return new Coord4D(x, y, z, worldObj.provider.getDimensionId()); } diff --git a/src/main/java/mekanism/common/tile/TileEntityDynamicTank.java b/src/main/java/mekanism/common/tile/TileEntityDynamicTank.java index 6d29ef7f6..ec15efc5e 100644 --- a/src/main/java/mekanism/common/tile/TileEntityDynamicTank.java +++ b/src/main/java/mekanism/common/tile/TileEntityDynamicTank.java @@ -9,6 +9,7 @@ import java.util.Set; import mekanism.api.Coord4D; import mekanism.api.Range4D; import mekanism.common.Mekanism; +import mekanism.common.PacketHandler; import mekanism.common.base.IFluidContainerManager; import mekanism.common.block.BlockBasic; import mekanism.common.content.tank.SynchronizedTankData; @@ -208,7 +209,7 @@ public class TileEntityDynamicTank extends TileEntityMultiblock 0) { - valveFluid = FluidRegistry.getFluid(ByteBufUtils.readUTF8String(dataStream)); + valveFluid = FluidRegistry.getFluid(PacketHandler.readString(dataStream)); } else { valveFluid = null; @@ -338,7 +336,7 @@ public class TileEntityFluidTank extends TileEntityContainerBlock implements IAc if(dataStream.readInt() == 1) { - fluidTank.setFluid(new FluidStack(FluidRegistry.getFluid(ByteBufUtils.readUTF8String(dataStream)), dataStream.readInt())); + fluidTank.setFluid(new FluidStack(FluidRegistry.getFluid(PacketHandler.readString(dataStream)), dataStream.readInt())); } else { fluidTank.setFluid(null); diff --git a/src/main/java/mekanism/common/tile/TileEntityFluidicPlenisher.java b/src/main/java/mekanism/common/tile/TileEntityFluidicPlenisher.java index 08cdb31f9..410e2a8da 100644 --- a/src/main/java/mekanism/common/tile/TileEntityFluidicPlenisher.java +++ b/src/main/java/mekanism/common/tile/TileEntityFluidicPlenisher.java @@ -16,7 +16,6 @@ import mekanism.common.Upgrade; import mekanism.common.base.IRedstoneControl; import mekanism.common.base.ISustainedTank; import mekanism.common.base.IUpgradeTile; -import mekanism.common.block.states.BlockStateMachine; import mekanism.common.block.states.BlockStateMachine.MachineType; import mekanism.common.integration.IComputerIntegration; import mekanism.common.security.ISecurityTile; @@ -33,8 +32,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.util.ChatComponentText; -import net.minecraftforge.common.util.Constants.NBT; import net.minecraft.util.EnumFacing; +import net.minecraftforge.common.util.Constants.NBT; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidRegistry; @@ -134,7 +133,7 @@ public class TileEntityFluidicPlenisher extends TileEntityElectricBlock implemen { if(fluidTank.getFluid().getFluid().canBePlacedInWorld()) { - worldObj.setBlockState(below, MekanismUtils.getFlowingBlock(fluidTank.getFluid().getFluid()).getDefaultState(), 3); + worldObj.setBlockState(below.getPos(), MekanismUtils.getFlowingBlock(fluidTank.getFluid().getFluid()).getDefaultState(), 3); setEnergy(getEnergy() - energyPerTick); fluidTank.drain(FluidContainerRegistry.BUCKET_VOLUME, true); @@ -184,7 +183,7 @@ public class TileEntityFluidicPlenisher extends TileEntityElectricBlock implemen { if(canReplace(coord, true, false)) { - worldObj.setBlockState(coord, MekanismUtils.getFlowingBlock(fluidTank.getFluid().getFluid()).getDefaultState(), 3); + worldObj.setBlockState(coord.getPos(), MekanismUtils.getFlowingBlock(fluidTank.getFluid().getFluid()).getDefaultState(), 3); fluidTank.drain(FluidContainerRegistry.BUCKET_VOLUME, true); } @@ -231,7 +230,7 @@ public class TileEntityFluidicPlenisher extends TileEntityElectricBlock implemen return isPathfinding; } - return coord.getBlock(worldObj).isReplaceable(worldObj, coord); + return coord.getBlock(worldObj).isReplaceable(worldObj, coord.getPos()); } @Override diff --git a/src/main/java/mekanism/common/tile/TileEntityGasTank.java b/src/main/java/mekanism/common/tile/TileEntityGasTank.java index 2f403ea93..9cfcbf9ed 100644 --- a/src/main/java/mekanism/common/tile/TileEntityGasTank.java +++ b/src/main/java/mekanism/common/tile/TileEntityGasTank.java @@ -32,8 +32,8 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.MathHelper; import net.minecraft.util.EnumFacing; +import net.minecraft.util.MathHelper; public class TileEntityGasTank extends TileEntityContainerBlock implements IGasHandler, ITubeConnection, IRedstoneControl, ISideConfiguration, ISecurityTile { diff --git a/src/main/java/mekanism/common/tile/TileEntityInductionCasing.java b/src/main/java/mekanism/common/tile/TileEntityInductionCasing.java index 003c10f41..5cef11e50 100644 --- a/src/main/java/mekanism/common/tile/TileEntityInductionCasing.java +++ b/src/main/java/mekanism/common/tile/TileEntityInductionCasing.java @@ -4,11 +4,11 @@ import io.netty.buffer.ByteBuf; import java.util.ArrayList; -import mekanism.common.capabilities.Capabilities; import mekanism.api.Coord4D; import mekanism.api.Range4D; import mekanism.api.energy.IStrictEnergyStorage; import mekanism.common.Mekanism; +import mekanism.common.capabilities.Capabilities; import mekanism.common.content.matrix.MatrixCache; import mekanism.common.content.matrix.MatrixUpdateProtocol; import mekanism.common.content.matrix.SynchronizedMatrixData; diff --git a/src/main/java/mekanism/common/tile/TileEntityInductionCell.java b/src/main/java/mekanism/common/tile/TileEntityInductionCell.java index 1775b51e9..486f1d3e2 100644 --- a/src/main/java/mekanism/common/tile/TileEntityInductionCell.java +++ b/src/main/java/mekanism/common/tile/TileEntityInductionCell.java @@ -4,9 +4,9 @@ import io.netty.buffer.ByteBuf; import java.util.ArrayList; -import mekanism.common.capabilities.Capabilities; import mekanism.api.energy.IStrictEnergyStorage; import mekanism.common.Tier.InductionCellTier; +import mekanism.common.capabilities.Capabilities; import mekanism.common.util.LangUtils; import mekanism.common.util.MekanismUtils; import net.minecraft.nbt.NBTTagCompound; diff --git a/src/main/java/mekanism/common/tile/TileEntityInductionPort.java b/src/main/java/mekanism/common/tile/TileEntityInductionPort.java index 825fe660c..d1968ed0d 100644 --- a/src/main/java/mekanism/common/tile/TileEntityInductionPort.java +++ b/src/main/java/mekanism/common/tile/TileEntityInductionPort.java @@ -10,7 +10,6 @@ import io.netty.buffer.ByteBuf; import java.util.ArrayList; import java.util.EnumSet; -import mekanism.common.capabilities.Capabilities; import mekanism.api.Coord4D; import mekanism.api.EnumColor; import mekanism.api.IConfigurable; @@ -19,6 +18,7 @@ import mekanism.api.Range4D; import mekanism.common.Mekanism; import mekanism.common.base.IActiveState; import mekanism.common.base.IEnergyWrapper; +import mekanism.common.capabilities.Capabilities; import mekanism.common.network.PacketTileEntity.TileEntityMessage; import mekanism.common.util.CableUtils; import mekanism.common.util.LangUtils; @@ -27,8 +27,8 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ChatComponentText; -import net.minecraftforge.common.MinecraftForge; import net.minecraft.util.EnumFacing; +import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.fml.common.Optional.Interface; import net.minecraftforge.fml.common.Optional.InterfaceList; diff --git a/src/main/java/mekanism/common/tile/TileEntityLaser.java b/src/main/java/mekanism/common/tile/TileEntityLaser.java index e8cd09553..b03f1db23 100644 --- a/src/main/java/mekanism/common/tile/TileEntityLaser.java +++ b/src/main/java/mekanism/common/tile/TileEntityLaser.java @@ -20,8 +20,8 @@ import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.EnumFacing; +import net.minecraft.util.MovingObjectPosition; public class TileEntityLaser extends TileEntityNoisyElectricBlock implements IActiveState { @@ -48,7 +48,7 @@ public class TileEntityLaser extends TileEntityNoisyElectricBlock implements IAc if(isActive) { MovingObjectPosition mop = LaserManager.fireLaserClient(this, facing, usage.laserUsage, worldObj); - Coord4D hitCoord = mop == null ? null : new Coord4D(mop); + Coord4D hitCoord = mop == null ? null : new Coord4D(mop, worldObj); if(hitCoord == null || !hitCoord.equals(digging)) { @@ -60,7 +60,7 @@ public class TileEntityLaser extends TileEntityNoisyElectricBlock implements IAc { Block blockHit = hitCoord.getBlock(worldObj); TileEntity tileHit = hitCoord.getTileEntity(worldObj); - float hardness = blockHit.getBlockHardness(worldObj, hitCoord); + float hardness = blockHit.getBlockHardness(worldObj, hitCoord.getPos()); if(!(hardness < 0 || (tileHit instanceof ILaserReceptor && !((ILaserReceptor)tileHit).canLasersDig()))) { @@ -80,7 +80,7 @@ public class TileEntityLaser extends TileEntityNoisyElectricBlock implements IAc setActive(true); LaserInfo info = LaserManager.fireLaser(this, facing, usage.laserUsage, worldObj); - Coord4D hitCoord = info.movingPos == null ? null : new Coord4D(info.movingPos); + Coord4D hitCoord = info.movingPos == null ? null : new Coord4D(info.movingPos, worldObj); if(hitCoord == null || !hitCoord.equals(digging)) { @@ -92,7 +92,7 @@ public class TileEntityLaser extends TileEntityNoisyElectricBlock implements IAc { Block blockHit = hitCoord.getBlock(worldObj); TileEntity tileHit = hitCoord.getTileEntity(worldObj); - float hardness = blockHit.getBlockHardness(worldObj, hitCoord); + float hardness = blockHit.getBlockHardness(worldObj, hitCoord.getPos()); if(!(hardness < 0 || (tileHit instanceof ILaserReceptor && !((ILaserReceptor)tileHit).canLasersDig()))) { diff --git a/src/main/java/mekanism/common/tile/TileEntityLaserAmplifier.java b/src/main/java/mekanism/common/tile/TileEntityLaserAmplifier.java index e3b5baf63..8de86340e 100644 --- a/src/main/java/mekanism/common/tile/TileEntityLaserAmplifier.java +++ b/src/main/java/mekanism/common/tile/TileEntityLaserAmplifier.java @@ -4,7 +4,6 @@ import io.netty.buffer.ByteBuf; import java.util.ArrayList; -import mekanism.common.capabilities.Capabilities; import mekanism.api.Coord4D; import mekanism.api.MekanismConfig.general; import mekanism.api.energy.ICableOutputter; @@ -14,6 +13,7 @@ import mekanism.common.LaserManager; import mekanism.common.LaserManager.LaserInfo; import mekanism.common.Mekanism; import mekanism.common.base.IRedstoneControl; +import mekanism.common.capabilities.Capabilities; import mekanism.common.integration.IComputerIntegration; import mekanism.common.network.PacketTileEntity.TileEntityMessage; import mekanism.common.security.ISecurityTile; @@ -23,8 +23,8 @@ import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.EnumFacing; +import net.minecraft.util.MovingObjectPosition; import net.minecraftforge.common.capabilities.Capability; public class TileEntityLaserAmplifier extends TileEntityContainerBlock implements ILaserReceptor, IRedstoneControl, ICableOutputter, IStrictEnergyStorage, IComputerIntegration, ISecurityTile @@ -76,7 +76,7 @@ public class TileEntityLaserAmplifier extends TileEntityContainerBlock implement if(on) { MovingObjectPosition mop = LaserManager.fireLaserClient(this, facing, lastFired, worldObj); - Coord4D hitCoord = mop == null ? null : new Coord4D(mop); + Coord4D hitCoord = mop == null ? null : new Coord4D(mop, worldObj); if(hitCoord == null || !hitCoord.equals(digging)) { @@ -88,7 +88,7 @@ public class TileEntityLaserAmplifier extends TileEntityContainerBlock implement { Block blockHit = hitCoord.getBlock(worldObj); TileEntity tileHit = hitCoord.getTileEntity(worldObj); - float hardness = blockHit.getBlockHardness(worldObj, hitCoord); + float hardness = blockHit.getBlockHardness(worldObj, hitCoord.getPos()); if(!(hardness < 0 || (tileHit instanceof ILaserReceptor && !((ILaserReceptor)tileHit).canLasersDig()))) { @@ -128,7 +128,7 @@ public class TileEntityLaserAmplifier extends TileEntityContainerBlock implement } LaserInfo info = LaserManager.fireLaser(this, facing, firing, worldObj); - Coord4D hitCoord = info.movingPos == null ? null : new Coord4D(info.movingPos); + Coord4D hitCoord = info.movingPos == null ? null : new Coord4D(info.movingPos, worldObj); if(hitCoord == null || !hitCoord.equals(digging)) { @@ -140,7 +140,7 @@ public class TileEntityLaserAmplifier extends TileEntityContainerBlock implement { Block blockHit = hitCoord.getBlock(worldObj); TileEntity tileHit = hitCoord.getTileEntity(worldObj); - float hardness = blockHit.getBlockHardness(worldObj, hitCoord); + float hardness = blockHit.getBlockHardness(worldObj, hitCoord.getPos()); if(!(hardness < 0 || (tileHit instanceof ILaserReceptor && !((ILaserReceptor)tileHit).canLasersDig()))) { diff --git a/src/main/java/mekanism/common/tile/TileEntityLaserTractorBeam.java b/src/main/java/mekanism/common/tile/TileEntityLaserTractorBeam.java index 04be12ed4..f11b97dab 100644 --- a/src/main/java/mekanism/common/tile/TileEntityLaserTractorBeam.java +++ b/src/main/java/mekanism/common/tile/TileEntityLaserTractorBeam.java @@ -20,8 +20,8 @@ import net.minecraft.block.Block; import net.minecraft.entity.item.EntityItem; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.EnumFacing; +import net.minecraft.util.MovingObjectPosition; public class TileEntityLaserTractorBeam extends TileEntityContainerBlock implements ILaserReceptor, ISecurityTile { @@ -64,7 +64,7 @@ public class TileEntityLaserTractorBeam extends TileEntityContainerBlock impleme if(on) { MovingObjectPosition mop = LaserManager.fireLaserClient(this, facing, lastFired, worldObj); - Coord4D hitCoord = mop == null ? null : new Coord4D(mop); + Coord4D hitCoord = mop == null ? null : new Coord4D(mop, worldObj); if(hitCoord == null || !hitCoord.equals(digging)) { @@ -76,7 +76,7 @@ public class TileEntityLaserTractorBeam extends TileEntityContainerBlock impleme { Block blockHit = hitCoord.getBlock(worldObj); TileEntity tileHit = hitCoord.getTileEntity(worldObj); - float hardness = blockHit.getBlockHardness(worldObj, hitCoord); + float hardness = blockHit.getBlockHardness(worldObj, hitCoord.getPos()); if(!(hardness < 0 || (tileHit instanceof ILaserReceptor && !((ILaserReceptor)tileHit).canLasersDig()))) { diggingProgress += lastFired; @@ -103,7 +103,7 @@ public class TileEntityLaserTractorBeam extends TileEntityContainerBlock impleme } LaserInfo info = LaserManager.fireLaser(this, facing, firing, worldObj); - Coord4D hitCoord = info.movingPos == null ? null : new Coord4D(info.movingPos); + Coord4D hitCoord = info.movingPos == null ? null : new Coord4D(info.movingPos, worldObj); if(hitCoord == null || !hitCoord.equals(digging)) { @@ -115,7 +115,7 @@ public class TileEntityLaserTractorBeam extends TileEntityContainerBlock impleme { Block blockHit = hitCoord.getBlock(worldObj); TileEntity tileHit = hitCoord.getTileEntity(worldObj); - float hardness = blockHit.getBlockHardness(worldObj, hitCoord); + float hardness = blockHit.getBlockHardness(worldObj, hitCoord.getPos()); if(!(hardness < 0 || (tileHit instanceof ILaserReceptor && !((ILaserReceptor)tileHit).canLasersDig()))) { diggingProgress += firing; diff --git a/src/main/java/mekanism/common/tile/TileEntityLogisticalSorter.java b/src/main/java/mekanism/common/tile/TileEntityLogisticalSorter.java index 469571a23..e1e177815 100644 --- a/src/main/java/mekanism/common/tile/TileEntityLogisticalSorter.java +++ b/src/main/java/mekanism/common/tile/TileEntityLogisticalSorter.java @@ -36,8 +36,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.util.Constants.NBT; import net.minecraft.util.EnumFacing; +import net.minecraftforge.common.util.Constants.NBT; public class TileEntityLogisticalSorter extends TileEntityElectricBlock implements IRedstoneControl, IActiveState, ISpecialConfigData, ISustainedData, ISecurityTile { diff --git a/src/main/java/mekanism/common/tile/TileEntityMultiblock.java b/src/main/java/mekanism/common/tile/TileEntityMultiblock.java index 23ee49412..f15b0e97f 100644 --- a/src/main/java/mekanism/common/tile/TileEntityMultiblock.java +++ b/src/main/java/mekanism/common/tile/TileEntityMultiblock.java @@ -14,11 +14,15 @@ import mekanism.common.multiblock.MultiblockManager; import mekanism.common.multiblock.SynchronizedData; import mekanism.common.multiblock.UpdateProtocol; import mekanism.common.network.PacketTileEntity.TileEntityMessage; +import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; +import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -75,12 +79,14 @@ public abstract class TileEntityMultiblock> extend { for(EntityPlayer player : playersUsing) { - player.closeScreen(); + System.out.println(worldObj.isRemote + " " + clientHasStructure + " " + structure); + //player.closeScreen(); } } if(!worldObj.isRemote) { + //System.out.println(pos + " " + structure); if(structure == null) { isRendering = false; @@ -90,10 +96,10 @@ public abstract class TileEntityMultiblock> extend getManager().updateCache(this); } } - + if(structure == null && ticker == 5) { - update(); + doUpdate(); } if(prevStructure == (structure == null)) @@ -108,10 +114,11 @@ public abstract class TileEntityMultiblock> extend for(EnumFacing side : EnumFacing.VALUES) { Coord4D obj = Coord4D.get(this).offset(side); + TileEntity tile = obj.getTileEntity(worldObj); - if(!obj.isAirBlock(worldObj) && (obj.getTileEntity(worldObj) == null || obj.getTileEntity(worldObj).getClass() != getClass())) + if(!obj.isAirBlock(worldObj) && (tile == null || tile.getClass() != getClass())) { - obj.getBlock(worldObj).onNeighborChange(worldObj, obj, getPos()); + obj.getBlock(worldObj).onNeighborChange(worldObj, obj.getPos(), getPos()); } } @@ -122,6 +129,7 @@ public abstract class TileEntityMultiblock> extend if(structure != null) { + //System.out.println("Whee " + structure + " " + isInvalid()); getSynchronizedData().didTick = false; if(getSynchronizedData().inventoryID != null) @@ -135,7 +143,20 @@ public abstract class TileEntityMultiblock> extend } @Override - public void update() + public boolean shouldRefresh(World world, BlockPos pos, IBlockState oldState, IBlockState newSate) + { + boolean b = super.shouldRefresh(world, pos, oldState, newSate); + + if(!world.isRemote) + { + System.out.println(b); + } + + return b; + } + + @Override + public void doUpdate() { if(!worldObj.isRemote && (structure == null || !getSynchronizedData().didTick)) { @@ -179,7 +200,7 @@ public abstract class TileEntityMultiblock> extend data.add(isRendering); data.add(structure != null); - + if(structure != null && isRendering) { if(sendStructure) @@ -215,7 +236,7 @@ public abstract class TileEntityMultiblock> extend isRendering = dataStream.readBoolean(); clientHasStructure = dataStream.readBoolean(); - + if(clientHasStructure && isRendering) { if(dataStream.readBoolean()) diff --git a/src/main/java/mekanism/common/tile/TileEntityNoisyElectricBlock.java b/src/main/java/mekanism/common/tile/TileEntityNoisyElectricBlock.java index a7dba3064..6d21a9630 100644 --- a/src/main/java/mekanism/common/tile/TileEntityNoisyElectricBlock.java +++ b/src/main/java/mekanism/common/tile/TileEntityNoisyElectricBlock.java @@ -1,7 +1,6 @@ package mekanism.common.tile; import mekanism.api.MekanismConfig.client; -import mekanism.api.Pos3D; import mekanism.client.HolidayManager; import mekanism.client.sound.ISoundSource; import mekanism.common.Upgrade; diff --git a/src/main/java/mekanism/common/tile/TileEntityPRC.java b/src/main/java/mekanism/common/tile/TileEntityPRC.java index 7eede878f..0f97363a3 100644 --- a/src/main/java/mekanism/common/tile/TileEntityPRC.java +++ b/src/main/java/mekanism/common/tile/TileEntityPRC.java @@ -33,8 +33,8 @@ import mekanism.common.util.LangUtils; import mekanism.common.util.MekanismUtils; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.ResourceLocation; import net.minecraft.util.EnumFacing; +import net.minecraft.util.ResourceLocation; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; diff --git a/src/main/java/mekanism/common/tile/TileEntitySolarNeutronActivator.java b/src/main/java/mekanism/common/tile/TileEntitySolarNeutronActivator.java index 1d3682658..0c5442d6a 100644 --- a/src/main/java/mekanism/common/tile/TileEntitySolarNeutronActivator.java +++ b/src/main/java/mekanism/common/tile/TileEntitySolarNeutronActivator.java @@ -30,8 +30,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.world.biome.BiomeGenDesert; import net.minecraft.util.EnumFacing; +import net.minecraft.world.biome.BiomeGenDesert; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -268,7 +268,7 @@ public class TileEntitySolarNeutronActivator extends TileEntityContainerBlock im @Override public void onPlace() { - MekanismUtils.makeBoundingBlock(worldObj, Coord4D.get(this).offset(EnumFacing.UP), Coord4D.get(this)); + MekanismUtils.makeBoundingBlock(worldObj, Coord4D.get(this).offset(EnumFacing.UP).getPos(), Coord4D.get(this)); } @Override diff --git a/src/main/java/mekanism/common/tile/TileEntityStructuralGlass.java b/src/main/java/mekanism/common/tile/TileEntityStructuralGlass.java index 942b700cf..5d41f980d 100644 --- a/src/main/java/mekanism/common/tile/TileEntityStructuralGlass.java +++ b/src/main/java/mekanism/common/tile/TileEntityStructuralGlass.java @@ -19,9 +19,11 @@ public class TileEntityStructuralGlass extends TileEntity implements IStructural { if(master != null) { - if(master.getTileEntity(worldObj) instanceof IMultiblock) + TileEntity masterTile = master.getTileEntity(worldObj); + + if(masterTile instanceof IMultiblock) { - return ((IMultiblock)master.getTileEntity(worldObj)).onActivate(player); + return ((IMultiblock)masterTile).onActivate(player); } else { master = null; @@ -32,13 +34,15 @@ public class TileEntityStructuralGlass extends TileEntity implements IStructural } @Override - public void update() + public void doUpdate() { if(master != null) { - if(master.getTileEntity(worldObj) instanceof IMultiblock) + TileEntity masterTile = master.getTileEntity(worldObj); + + if(masterTile instanceof IMultiblock) { - ((IMultiblock)master.getTileEntity(worldObj)).update(); + ((IMultiblock)masterTile).doUpdate(); } else { master = null; @@ -49,7 +53,7 @@ public class TileEntityStructuralGlass extends TileEntity implements IStructural if(multiblock != null) { - multiblock.update(); + multiblock.doUpdate(); } } } @@ -90,7 +94,7 @@ public class TileEntityStructuralGlass extends TileEntity implements IStructural { if(tile instanceof IMultiblock) { - found = (IMultiblock)coord.getTileEntity(worldObj); + found = (IMultiblock)tile; return; } else if(tile instanceof IStructuralMultiblock) diff --git a/src/main/java/mekanism/common/tile/TileEntitySuperheatingElement.java b/src/main/java/mekanism/common/tile/TileEntitySuperheatingElement.java index a5b8f087f..867f0ad29 100644 --- a/src/main/java/mekanism/common/tile/TileEntitySuperheatingElement.java +++ b/src/main/java/mekanism/common/tile/TileEntitySuperheatingElement.java @@ -9,7 +9,6 @@ import mekanism.common.content.boiler.SynchronizedBoilerData; import mekanism.common.multiblock.TileEntityInternalMultiblock; import mekanism.common.network.PacketTileEntity.TileEntityMessage; import mekanism.common.util.MekanismUtils; - import net.minecraft.util.ITickable; public class TileEntitySuperheatingElement extends TileEntityInternalMultiblock implements ITickable diff --git a/src/main/java/mekanism/common/tile/TileEntityTeleporter.java b/src/main/java/mekanism/common/tile/TileEntityTeleporter.java index 74278019c..82e62ee45 100644 --- a/src/main/java/mekanism/common/tile/TileEntityTeleporter.java +++ b/src/main/java/mekanism/common/tile/TileEntityTeleporter.java @@ -4,7 +4,6 @@ import io.netty.buffer.ByteBuf; import java.util.ArrayList; import java.util.HashSet; -import java.util.Iterator; import java.util.List; import java.util.Set; import java.util.UUID; @@ -17,7 +16,6 @@ import mekanism.common.MekanismBlocks; import mekanism.common.PacketHandler; import mekanism.common.base.IRedstoneControl; import mekanism.common.block.states.BlockStateMachine; -import mekanism.common.block.states.BlockStateMachine.MachineType; import mekanism.common.chunkloading.IChunkLoader; import mekanism.common.frequency.Frequency; import mekanism.common.frequency.FrequencyManager; @@ -30,7 +28,6 @@ import mekanism.common.security.ISecurityTile; import mekanism.common.tile.component.TileComponentSecurity; import mekanism.common.util.ChargeUtils; import mekanism.common.util.MekanismUtils; - import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityList; @@ -44,12 +41,12 @@ import net.minecraft.potion.PotionEffect; import net.minecraft.server.MinecraftServer; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; import net.minecraft.world.WorldServer; import net.minecraftforge.common.ForgeChunkManager; import net.minecraftforge.common.ForgeChunkManager.Ticket; import net.minecraftforge.common.ForgeChunkManager.Type; -import net.minecraft.util.EnumFacing; import net.minecraftforge.fml.common.FMLCommonHandler; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -414,13 +411,13 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements ICo if(player.isEntityAlive()) { newWorld.spawnEntityInWorld(player); - player.setLocationAndAngles(coord.getX()+0.5, coord.getY()+1, coord.getZ()+0.5, player.rotationYaw, player.rotationPitch); + player.setLocationAndAngles(coord.xCoord+0.5, coord.yCoord+1, coord.zCoord+0.5, player.rotationYaw, player.rotationPitch); newWorld.updateEntityWithOptionalForce(player, false); player.setWorld(newWorld); } player.mcServer.getConfigurationManager().preparePlayer(player, oldWorld); - player.playerNetServerHandler.setPlayerLocation(coord.getX()+0.5, coord.getY()+1, coord.getZ()+0.5, player.rotationYaw, player.rotationPitch); + 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); @@ -435,7 +432,7 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements ICo FMLCommonHandler.instance().firePlayerChangedDimensionEvent(player, id, coord.dimensionId); } else { - player.playerNetServerHandler.setPlayerLocation(coord.getX()+0.5, coord.getY()+1, coord.getZ()+0.5, player.rotationYaw, player.rotationPitch); + player.playerNetServerHandler.setPlayerLocation(coord.xCoord+0.5, coord.yCoord+1, coord.zCoord+0.5, player.rotationYaw, player.rotationPitch); } } @@ -449,7 +446,7 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements ICo entity.isDead = false; world.spawnEntityInWorld(entity); - entity.setLocationAndAngles(coord.getX()+0.5, coord.getY()+1, coord.getZ()+0.5, entity.rotationYaw, entity.rotationPitch); + entity.setLocationAndAngles(coord.xCoord+0.5, coord.yCoord+1, coord.zCoord+0.5, entity.rotationYaw, entity.rotationPitch); world.updateEntityWithOptionalForce(entity, false); entity.setWorld(world); world.resetUpdateEntityTick(); @@ -466,7 +463,7 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements ICo entity.isDead = true; } else { - entity.setLocationAndAngles(coord.getX()+0.5, coord.getY()+1, coord.getZ()+0.5, entity.rotationYaw, entity.rotationPitch); + entity.setLocationAndAngles(coord.xCoord+0.5, coord.yCoord+1, coord.zCoord+0.5, entity.rotationYaw, entity.rotationPitch); Mekanism.packetHandler.sendToReceivers(new EntityMoveMessage(entity), new Range4D(new Coord4D(entity))); } } @@ -533,7 +530,7 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements ICo energyCost+=10000; } - int distance = (int)entity.getDistance(coords.getX(), coords.getY(), coords.getZ()); + int distance = (int)entity.getDistance(coords.xCoord, coords.yCoord, coords.zCoord); energyCost+=(distance*10); return energyCost; diff --git a/src/main/java/mekanism/common/tile/TileEntityThermalEvaporationController.java b/src/main/java/mekanism/common/tile/TileEntityThermalEvaporationController.java index 51447e6c4..e2f127cc8 100644 --- a/src/main/java/mekanism/common/tile/TileEntityThermalEvaporationController.java +++ b/src/main/java/mekanism/common/tile/TileEntityThermalEvaporationController.java @@ -71,6 +71,7 @@ public class TileEntityThermalEvaporationController extends TileEntityThermalEva public boolean updatedThisTick = false; public int clientSolarAmount; + public boolean clientStructured; public boolean cacheStructure = false; @@ -187,14 +188,13 @@ public class TileEntityThermalEvaporationController extends TileEntityThermalEva { if(!updatedThisTick) { - boolean prev = structured; - clearStructure(); structured = buildStructure(); - if(structured != prev) + if(structured != clientStructured) { Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this))); + clientStructured = structured; } if(structured) @@ -557,7 +557,7 @@ public class TileEntityThermalEvaporationController extends TileEntityThermalEva Coord4D startPoint = Coord4D.get(this).offset(right); startPoint = isLeftOnFace ? startPoint.offset(right) : startPoint; - startPoint = startPoint.offset(right.getOpposite()).offset(MekanismUtils.getBack(facing)).add(0, -(height-2), 0); + startPoint = startPoint.offset(right.getOpposite()).offset(MekanismUtils.getBack(facing)).translate(0, -(height-2), 0); return startPoint; } @@ -583,8 +583,6 @@ public class TileEntityThermalEvaporationController extends TileEntityThermalEva outputTank.setFluid(null); } - boolean prev = structured; - structured = dataStream.readBoolean(); controllerConflict = dataStream.readBoolean(); clientSolarAmount = dataStream.readInt(); @@ -595,10 +593,10 @@ public class TileEntityThermalEvaporationController extends TileEntityThermalEva lastGain = dataStream.readFloat(); totalLoss = dataStream.readFloat(); - if(structured != prev) + if(structured != clientStructured) { inputTank.setCapacity(getMaxFluid()); - worldObj.markBlockRangeForRenderUpdate(getPos(), getPos().add(1,1,1)); + MekanismUtils.updateBlock(worldObj, getPos()); if(structured) { @@ -610,9 +608,9 @@ public class TileEntityThermalEvaporationController extends TileEntityThermalEva } }); } + + clientStructured = structured; } - - MekanismUtils.updateBlock(worldObj, getPos()); } @Override diff --git a/src/main/java/mekanism/common/tile/TileEntityThermalEvaporationValve.java b/src/main/java/mekanism/common/tile/TileEntityThermalEvaporationValve.java index cd504518a..0c7344f80 100644 --- a/src/main/java/mekanism/common/tile/TileEntityThermalEvaporationValve.java +++ b/src/main/java/mekanism/common/tile/TileEntityThermalEvaporationValve.java @@ -28,7 +28,7 @@ public class TileEntityThermalEvaporationValve extends TileEntityThermalEvaporat if(!obj.isAirBlock(worldObj) && !(obj.getTileEntity(worldObj) instanceof TileEntityThermalEvaporationBlock)) { - obj.getBlock(worldObj).onNeighborChange(worldObj, obj, getPos()); + obj.getBlock(worldObj).onNeighborChange(worldObj, obj.getPos(), getPos()); } } } diff --git a/src/main/java/mekanism/common/util/CableUtils.java b/src/main/java/mekanism/common/util/CableUtils.java index c5a45495f..d9d2b0fc4 100644 --- a/src/main/java/mekanism/common/util/CableUtils.java +++ b/src/main/java/mekanism/common/util/CableUtils.java @@ -9,17 +9,16 @@ import java.util.ArrayList; import java.util.List; import java.util.Set; -import mekanism.common.capabilities.Capabilities; import mekanism.api.Coord4D; import mekanism.api.MekanismConfig.general; import mekanism.api.energy.IStrictEnergyAcceptor; import mekanism.api.transmitters.TransmissionType; import mekanism.common.base.IEnergyWrapper; +import mekanism.common.capabilities.Capabilities; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraft.world.World; - import cofh.api.energy.IEnergyConnection; import cofh.api.energy.IEnergyProvider; import cofh.api.energy.IEnergyReceiver; diff --git a/src/main/java/mekanism/common/util/HeatUtils.java b/src/main/java/mekanism/common/util/HeatUtils.java index 57c0dc4f7..2a4df3fcc 100644 --- a/src/main/java/mekanism/common/util/HeatUtils.java +++ b/src/main/java/mekanism/common/util/HeatUtils.java @@ -2,7 +2,6 @@ package mekanism.common.util; import mekanism.api.IHeatTransfer; import mekanism.common.capabilities.Capabilities; - import net.minecraft.util.EnumFacing; import net.minecraftforge.common.capabilities.ICapabilityProvider; diff --git a/src/main/java/mekanism/common/util/MekanismUtils.java b/src/main/java/mekanism/common/util/MekanismUtils.java index 054c67543..154e364c2 100644 --- a/src/main/java/mekanism/common/util/MekanismUtils.java +++ b/src/main/java/mekanism/common/util/MekanismUtils.java @@ -5,8 +5,6 @@ import ic2.api.energy.EnergyNet; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; -import java.lang.reflect.Field; -import java.lang.reflect.Method; import java.net.HttpURLConnection; import java.net.URL; import java.util.ArrayList; @@ -75,6 +73,7 @@ import net.minecraft.item.crafting.IRecipe; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumFacing.Axis; import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.MovingObjectPosition; @@ -83,7 +82,6 @@ import net.minecraft.util.Vec3; import net.minecraft.world.EnumSkyBlock; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import net.minecraft.util.EnumFacing; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.capabilities.CapabilityManager; import net.minecraftforge.common.capabilities.ICapabilityProvider; @@ -93,14 +91,13 @@ import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidBlock; +import net.minecraftforge.fml.common.ModContainer; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.ShapedOreRecipe; import buildcraft.api.tools.IToolWrench; import cofh.api.item.IToolHammer; -import net.minecraftforge.fml.common.ModContainer; -import net.minecraftforge.fml.common.registry.GameData; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; /** * Utilities used by Mekanism. All miscellaneous methods are located here. @@ -729,13 +726,13 @@ public final class MekanismUtils { IBlockState blockState = sideCoord.getBlockState(world); Block block = blockState.getBlock(); - boolean weakPower = block.shouldCheckWeakPower(world, coord, side); + boolean weakPower = block.shouldCheckWeakPower(world, coord.getPos(), side); if(weakPower && isDirectlyGettingPowered(world, sideCoord)) { return true; } - else if(!weakPower && block.getWeakPower(world, sideCoord, blockState, side) > 0) + else if(!weakPower && block.getWeakPower(world, sideCoord.getPos(), blockState, side) > 0) { return true; } @@ -759,7 +756,7 @@ public final class MekanismUtils if(sideCoord.exists(world)) { - if(world.getRedstonePower(coord, side) > 0) + if(world.getRedstonePower(coord.getPos(), side) > 0) { return true; } @@ -783,9 +780,9 @@ public final class MekanismUtils if(offset.exists(world)) { Block block1 = offset.getBlock(world); - block1.onNeighborChange(world, offset, coord); + block1.onNeighborChange(world, offset.getPos(), coord.getPos()); - if(block1.isNormalCube(world, offset)) + if(block1.isNormalCube(world, offset.getPos())) { offset = offset.offset(dir); @@ -793,9 +790,9 @@ public final class MekanismUtils { block1 = offset.getBlock(world); - if(block1.getWeakChanges(world, offset)) + if(block1.getWeakChanges(world, offset.getPos())) { - block1.onNeighborChange(world, offset, coord); + block1.onNeighborChange(world, offset.getPos(), coord.getPos()); } } } @@ -815,7 +812,7 @@ public final class MekanismUtils if(!world.isRemote) { - ((TileEntityBoundingBlock)world.getTileEntity(boundingLocation)).setMainLocation(orig); + ((TileEntityBoundingBlock)world.getTileEntity(boundingLocation)).setMainLocation(orig.getPos()); } } @@ -831,7 +828,7 @@ public final class MekanismUtils if(!world.isRemote) { - ((TileEntityAdvancedBoundingBlock)world.getTileEntity(boundingLocation)).setMainLocation(orig); + ((TileEntityAdvancedBoundingBlock)world.getTileEntity(boundingLocation)).setMainLocation(orig.getPos()); } } @@ -844,7 +841,7 @@ public final class MekanismUtils { if(!(world.getTileEntity(pos) instanceof IActiveState) || ((IActiveState)world.getTileEntity(pos)).renderUpdate()) { - world.markBlockRangeForRenderUpdate(pos, pos); + world.markBlockRangeForRenderUpdate(pos, pos.add(1, 1, 1)); } if(!(world.getTileEntity(pos) instanceof IActiveState) || ((IActiveState)world.getTileEntity(pos)).lightUpdate() && client.machineEffects) @@ -911,7 +908,7 @@ public final class MekanismUtils if(state.getProperties().containsKey(BlockFluidBase.LEVEL) && state.getValue(BlockFluidBase.LEVEL) == 0) { - return fluid.drain(world, pos, false); + return fluid.drain(world, pos.getPos(), false); } } @@ -993,73 +990,6 @@ public final class MekanismUtils player.openContainer.onCraftGuiOpened(player); } - /** - * Retrieves a private value from a defined class and field. - * @param obj - the Object to retrieve the value from, null if static - * @param c - Class to retrieve field value from - * @param fields - possible names of field to iterate through - * @return value as an Object, cast as necessary - */ - public static Object getPrivateValue(Object obj, Class c, String[] fields) - { - for(String field : fields) - { - try { - Field f = c.getDeclaredField(field); - f.setAccessible(true); - return f.get(obj); - } catch(Exception e) { - continue; - } - } - - return null; - } - - /** - * Sets a private value from a defined class and field to a new value. - * @param obj - the Object to perform the operation on, null if static - * @param value - value to set the field to - * @param c - Class the operation will be performed on - * @param fields - possible names of field to iterate through - */ - public static void setPrivateValue(Object obj, Object value, Class c, String[] fields) - { - for(String field : fields) - { - try { - Field f = c.getDeclaredField(field); - f.setAccessible(true); - f.set(obj, value); - } catch(Exception e) { - continue; - } - } - } - - /** - * Retrieves a private method from a class, sets it as accessible, and returns it. - * @param c - Class the method is located in - * @param methods - possible names of the method to iterate through - * @param params - the Types inserted as parameters into the method - * @return private method - */ - public static Method getPrivateMethod(Class c, String[] methods, Class... params) - { - for(String method : methods) - { - try { - Method m = c.getDeclaredMethod(method, params); - m.setAccessible(true); - return m; - } catch(Exception e) { - continue; - } - } - - return null; - } - /** * Gets a ResourceLocation with a defined resource type and name. * @param type - type of resource to retrieve @@ -1306,7 +1236,7 @@ public final class MekanismUtils */ public static String getCoordDisplay(Coord4D obj) { - return "[" + obj.getX() + ", " + obj.getY() + ", " + obj.getZ() + "]"; + return "[" + obj.xCoord + ", " + obj.yCoord + ", " + obj.zCoord + "]"; } @SideOnly(Side.CLIENT) diff --git a/src/main/java/mekanism/common/util/MinerUtils.java b/src/main/java/mekanism/common/util/MinerUtils.java index 7c9bbd020..9fdc1b2a5 100644 --- a/src/main/java/mekanism/common/util/MinerUtils.java +++ b/src/main/java/mekanism/common/util/MinerUtils.java @@ -6,7 +6,6 @@ import java.util.List; import mekanism.api.Coord4D; import mekanism.api.util.ListUtils; import net.minecraft.block.Block; -import net.minecraft.block.BlockSand; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; @@ -21,20 +20,20 @@ public final class MinerUtils IBlockState state = obj.getBlockState(world); Block block = state.getBlock(); - if(block == null || block.isAir(world, obj)) + if(block == null || block.isAir(world, obj.getPos())) { return new ArrayList(); } if(!silk) { - return block.getDrops(world, obj, state, 0); + return block.getDrops(world, obj.getPos(), state, 0); } else { List ret = new ArrayList(); ret.add(new ItemStack(block, 1, block.getMetaFromState(state))); - if(specialSilkIDs.contains(block) || (block.getDrops(world, obj, state, 0) != null && block.getDrops(world, obj, state, 0).size() > 0)) + if(specialSilkIDs.contains(block) || (block.getDrops(world, obj.getPos(), state, 0) != null && block.getDrops(world, obj.getPos(), state, 0).size() > 0)) { return ret; } diff --git a/src/main/java/mekanism/common/util/PipeUtils.java b/src/main/java/mekanism/common/util/PipeUtils.java index 71be406c8..9f8921e62 100644 --- a/src/main/java/mekanism/common/util/PipeUtils.java +++ b/src/main/java/mekanism/common/util/PipeUtils.java @@ -6,7 +6,6 @@ import java.util.Collections; import java.util.List; import mekanism.common.capabilities.Capabilities; - import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; diff --git a/src/main/java/mekanism/common/util/RecipeUtils.java b/src/main/java/mekanism/common/util/RecipeUtils.java index 64f001b06..da8ebe0e9 100644 --- a/src/main/java/mekanism/common/util/RecipeUtils.java +++ b/src/main/java/mekanism/common/util/RecipeUtils.java @@ -11,7 +11,6 @@ import mekanism.api.gas.GasStack; import mekanism.api.gas.IGasItem; import mekanism.api.util.StackUtils; import mekanism.common.Upgrade; -import mekanism.common.base.IEnergyCube; import mekanism.common.base.IFactory; import mekanism.common.base.ITierItem; import mekanism.common.block.states.BlockStateBasic.BasicBlockType; @@ -55,14 +54,6 @@ public class RecipeUtils { return false; } - - if(target.getItem() instanceof IEnergyCube && input.getItem() instanceof IEnergyCube) - { - if(((IEnergyCube)target.getItem()).getEnergyCubeTier(target) != ((IEnergyCube)input.getItem()).getEnergyCubeTier(input)) - { - return false; - } - } if(target.getItem() instanceof ITierItem && input.getItem() instanceof ITierItem) { diff --git a/src/main/java/mekanism/common/util/TransporterUtils.java b/src/main/java/mekanism/common/util/TransporterUtils.java index e1e73ebe1..b8cca9746 100644 --- a/src/main/java/mekanism/common/util/TransporterUtils.java +++ b/src/main/java/mekanism/common/util/TransporterUtils.java @@ -211,7 +211,7 @@ public final class TransporterUtils TransporterManager.remove(stack); - EntityItem entityItem = new EntityItem(tileEntity.world(), tileEntity.coord().getX() + pos[0], tileEntity.coord().getY() + pos[1], tileEntity.coord().getZ() + pos[2], stack.itemStack); + EntityItem entityItem = new EntityItem(tileEntity.world(), tileEntity.coord().xCoord + pos[0], tileEntity.coord().yCoord + pos[1], tileEntity.coord().zCoord + pos[2], stack.itemStack); entityItem.motionX = 0; entityItem.motionY = 0; @@ -232,7 +232,7 @@ public final class TransporterUtils itemFix = 0.1F; } - return new float[] {0.5F + offset.getX()*progress, 0.5F + offset.getY()*progress - itemFix, 0.5F + offset.getZ()*progress}; + return new float[] {0.5F + offset.xCoord*progress, 0.5F + offset.yCoord*progress - itemFix, 0.5F + offset.zCoord*progress}; } public static void incrementColor(ILogisticalTransporter tileEntity) diff --git a/src/main/java/mekanism/generators/client/BlockRenderingHandler.java b/src/main/java/mekanism/generators/client/BlockRenderingHandler.java index e601af243..0c13e8965 100644 --- a/src/main/java/mekanism/generators/client/BlockRenderingHandler.java +++ b/src/main/java/mekanism/generators/client/BlockRenderingHandler.java @@ -13,15 +13,13 @@ import mekanism.generators.common.GeneratorsBlocks; import mekanism.generators.common.block.BlockGenerator.GeneratorType; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.world.IBlockAccess; - -import org.lwjgl.opengl.GL11; - -import net.minecraftforge.fml.client.registry.ISimpleBlockRenderingHandler; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class BlockRenderingHandler implements ISimpleBlockRenderingHandler { @@ -37,55 +35,55 @@ public class BlockRenderingHandler implements ISimpleBlockRenderingHandler @Override public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) { - GL11.glPushMatrix(); - GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F); + GlStateManager.pushMatrix(); + GlStateManager.rotate(90F, 0.0F, 1.0F, 0.0F); if(block == GeneratorsBlocks.Generator) { if(metadata == GeneratorType.BIO_GENERATOR.meta) { - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); + GlStateManager.rotate(180F, 0.0F, 0.0F, 1.0F); GL11.glTranslated(0.0F, -1.0F, 0.0F); mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "BioGenerator.png")); bioGenerator.render(0.0625F); } else if(metadata == GeneratorType.ADVANCED_SOLAR_GENERATOR.meta) { - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F); - GL11.glTranslatef(0.0F, 0.2F, 0.0F); + GlStateManager.rotate(180F, 0.0F, 0.0F, 1.0F); + GlStateManager.rotate(90F, 0.0F, 1.0F, 0.0F); + GlStateManager.translate(0.0F, 0.2F, 0.0F); mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "AdvancedSolarGenerator.png")); advancedSolarGenerator.render(0.022F); } else if(metadata == GeneratorType.SOLAR_GENERATOR.meta) { - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - GL11.glRotatef(90F, 0.0F, -1.0F, 0.0F); + GlStateManager.rotate(180F, 0.0F, 0.0F, 1.0F); + GlStateManager.rotate(90F, 0.0F, -1.0F, 0.0F); GL11.glTranslated(0.0F, -1.0F, 0.0F); mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "SolarGenerator.png")); solarGenerator.render(0.0625F); } else if(metadata == GeneratorType.HEAT_GENERATOR.meta) { - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); + GlStateManager.rotate(180F, 0.0F, 0.0F, 1.0F); GL11.glTranslated(0.0F, -1.0F, 0.0F); mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "HeatGenerator.png")); heatGenerator.render(0.0625F, false, mc.renderEngine); } else if(metadata == GeneratorType.GAS_GENERATOR.meta) { - GL11.glRotatef(180F, 0.0F, 1.0F, 1.0F); - GL11.glRotatef(90F, -1.0F, 0.0F, 0.0F); + GlStateManager.rotate(180F, 0.0F, 1.0F, 1.0F); + GlStateManager.rotate(90F, -1.0F, 0.0F, 0.0F); GL11.glTranslated(0.0F, -1.0F, 0.0F); - GL11.glRotatef(180F, 0.0F, 1.0F, 0.0F); + GlStateManager.rotate(180F, 0.0F, 1.0F, 0.0F); mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "GasGenerator.png")); gasGenerator.render(0.0625F); } else if(metadata == GeneratorType.WIND_GENERATOR.meta) { - GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); - GL11.glRotatef(180F, 0.0F, 1.0F, 0.0F); - GL11.glTranslatef(0.0F, 0.4F, 0.0F); + GlStateManager.rotate(180F, 0.0F, 0.0F, 1.0F); + GlStateManager.rotate(180F, 0.0F, 1.0F, 0.0F); + GlStateManager.translate(0.0F, 0.4F, 0.0F); mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "WindGenerator.png")); windGenerator.render(0.016F, 0); } @@ -95,7 +93,7 @@ public class BlockRenderingHandler implements ISimpleBlockRenderingHandler } } - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } @Override diff --git a/src/main/java/mekanism/generators/client/gui/GuiBioGenerator.java b/src/main/java/mekanism/generators/client/gui/GuiBioGenerator.java index 27482a0da..e8e8fbc07 100644 --- a/src/main/java/mekanism/generators/client/gui/GuiBioGenerator.java +++ b/src/main/java/mekanism/generators/client/gui/GuiBioGenerator.java @@ -19,12 +19,11 @@ import mekanism.common.util.MekanismUtils.ResourceType; import mekanism.generators.common.inventory.container.ContainerBioGenerator; import mekanism.generators.common.tile.TileEntityBioGenerator; import net.minecraft.entity.player.InventoryPlayer; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiBioGenerator extends GuiMekanism { diff --git a/src/main/java/mekanism/generators/client/gui/GuiGasGenerator.java b/src/main/java/mekanism/generators/client/gui/GuiGasGenerator.java index 2eac5eef7..443527edf 100644 --- a/src/main/java/mekanism/generators/client/gui/GuiGasGenerator.java +++ b/src/main/java/mekanism/generators/client/gui/GuiGasGenerator.java @@ -22,12 +22,11 @@ import mekanism.common.util.MekanismUtils.ResourceType; import mekanism.generators.common.inventory.container.ContainerGasGenerator; import mekanism.generators.common.tile.TileEntityGasGenerator; import net.minecraft.entity.player.InventoryPlayer; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiGasGenerator extends GuiMekanism { diff --git a/src/main/java/mekanism/generators/client/gui/GuiHeatGenerator.java b/src/main/java/mekanism/generators/client/gui/GuiHeatGenerator.java index 7ce3e58a6..719bc684c 100644 --- a/src/main/java/mekanism/generators/client/gui/GuiHeatGenerator.java +++ b/src/main/java/mekanism/generators/client/gui/GuiHeatGenerator.java @@ -25,12 +25,11 @@ import mekanism.generators.common.inventory.container.ContainerHeatGenerator; import mekanism.generators.common.tile.TileEntityHeatGenerator; import net.minecraft.entity.player.InventoryPlayer; import net.minecraftforge.fluids.FluidTank; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiHeatGenerator extends GuiMekanism { diff --git a/src/main/java/mekanism/generators/client/gui/GuiIndustrialTurbine.java b/src/main/java/mekanism/generators/client/gui/GuiIndustrialTurbine.java index 7fcef55fb..471e665a9 100644 --- a/src/main/java/mekanism/generators/client/gui/GuiIndustrialTurbine.java +++ b/src/main/java/mekanism/generators/client/gui/GuiIndustrialTurbine.java @@ -22,12 +22,11 @@ import mekanism.generators.common.content.turbine.TurbineUpdateProtocol; import mekanism.generators.common.tile.turbine.TileEntityTurbineCasing; import net.minecraft.entity.player.InventoryPlayer; import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.opengl.GL11; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - @SideOnly(Side.CLIENT) public class GuiIndustrialTurbine extends GuiMekanism { @@ -77,7 +76,7 @@ public class GuiIndustrialTurbine extends GuiMekanism int yAxis = (mouseY - (height - ySize) / 2); fontRendererObj.drawString(LangUtils.localize("container.inventory"), 8, (ySize - 96) + 4, 0x404040); - fontRendererObj.drawString(tileEntity.getInventoryName(), (xSize/2)-(fontRendererObj.getStringWidth(tileEntity.getInventoryName())/2), 5, 0x404040); + fontRendererObj.drawString(tileEntity.getName(), (xSize/2)-(fontRendererObj.getStringWidth(tileEntity.getName())/2), 5, 0x404040); double energyMultiplier = (general.maxEnergyPerSteam/TurbineUpdateProtocol.MAX_BLADES)*Math.min(tileEntity.structure.blades, tileEntity.structure.coils*generators.turbineBladesPerCoil); diff --git a/src/main/java/mekanism/generators/client/gui/GuiNeutronCapture.java b/src/main/java/mekanism/generators/client/gui/GuiNeutronCapture.java index 431cf6a0c..17f1b79a2 100644 --- a/src/main/java/mekanism/generators/client/gui/GuiNeutronCapture.java +++ b/src/main/java/mekanism/generators/client/gui/GuiNeutronCapture.java @@ -17,12 +17,11 @@ import mekanism.common.util.MekanismUtils.ResourceType; import mekanism.generators.common.inventory.container.ContainerNeutronCapture; import mekanism.generators.common.tile.reactor.TileEntityReactorNeutronCapture; import net.minecraft.entity.player.InventoryPlayer; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiNeutronCapture extends GuiMekanism { diff --git a/src/main/java/mekanism/generators/client/gui/GuiReactorController.java b/src/main/java/mekanism/generators/client/gui/GuiReactorController.java index 82e2e2dd9..1a47e2d74 100644 --- a/src/main/java/mekanism/generators/client/gui/GuiReactorController.java +++ b/src/main/java/mekanism/generators/client/gui/GuiReactorController.java @@ -18,12 +18,11 @@ import mekanism.generators.client.gui.element.GuiStatTab; import mekanism.generators.common.inventory.container.ContainerReactorController; import mekanism.generators.common.tile.reactor.TileEntityReactorController; import net.minecraft.entity.player.InventoryPlayer; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiReactorController extends GuiMekanism { diff --git a/src/main/java/mekanism/generators/client/gui/GuiReactorFuel.java b/src/main/java/mekanism/generators/client/gui/GuiReactorFuel.java index 2bef4d537..ee0479c20 100644 --- a/src/main/java/mekanism/generators/client/gui/GuiReactorFuel.java +++ b/src/main/java/mekanism/generators/client/gui/GuiReactorFuel.java @@ -28,13 +28,12 @@ import mekanism.generators.client.gui.element.GuiStatTab; import mekanism.generators.common.tile.reactor.TileEntityReactorController; import net.minecraft.client.gui.GuiTextField; import net.minecraft.entity.player.InventoryPlayer; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.input.Keyboard; import org.lwjgl.opengl.GL11; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - @SideOnly(Side.CLIENT) public class GuiReactorFuel extends GuiMekanism { diff --git a/src/main/java/mekanism/generators/client/gui/GuiReactorHeat.java b/src/main/java/mekanism/generators/client/gui/GuiReactorHeat.java index 4fb97a72b..ae6270dcf 100644 --- a/src/main/java/mekanism/generators/client/gui/GuiReactorHeat.java +++ b/src/main/java/mekanism/generators/client/gui/GuiReactorHeat.java @@ -1,5 +1,6 @@ package mekanism.generators.client.gui; +import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -32,14 +33,12 @@ import mekanism.generators.client.gui.element.GuiStatTab; import mekanism.generators.common.tile.reactor.TileEntityReactorController; import net.minecraft.block.BlockStaticLiquid; import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.util.IIcon; import net.minecraftforge.fluids.FluidTank; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiReactorHeat extends GuiMekanism { @@ -195,7 +194,7 @@ public class GuiReactorHeat extends GuiMekanism } @Override - public void mouseClicked(int mouseX, int mouseY, int button) + public void mouseClicked(int mouseX, int mouseY, int button) throws IOException { super.mouseClicked(mouseX, mouseY, button); diff --git a/src/main/java/mekanism/generators/client/gui/GuiReactorLogicAdapter.java b/src/main/java/mekanism/generators/client/gui/GuiReactorLogicAdapter.java index 13420e752..d105c7e9c 100644 --- a/src/main/java/mekanism/generators/client/gui/GuiReactorLogicAdapter.java +++ b/src/main/java/mekanism/generators/client/gui/GuiReactorLogicAdapter.java @@ -1,5 +1,6 @@ package mekanism.generators.client.gui; +import java.io.IOException; import java.util.ArrayList; import mekanism.api.Coord4D; @@ -15,13 +16,13 @@ import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import mekanism.generators.common.tile.reactor.TileEntityReactorLogicAdapter; import mekanism.generators.common.tile.reactor.TileEntityReactorLogicAdapter.ReactorLogic; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.InventoryPlayer; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiReactorLogicAdapter extends GuiMekanism { @@ -49,11 +50,11 @@ public class GuiReactorLogicAdapter extends GuiMekanism for(ReactorLogic type : ReactorLogic.values()) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glEnable(GL11.GL_LIGHTING); - itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), type.getRenderStack(), 27, 35 + (22*type.ordinal())); + itemRender.renderItemAndEffectIntoGUI(type.getRenderStack(), 27, 35 + (22*type.ordinal())); GL11.glDisable(GL11.GL_LIGHTING); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); fontRendererObj.drawString(EnumColor.WHITE + type.getLocalizedName(), 46, 34+(22*type.ordinal()), 0x404040); } @@ -107,7 +108,7 @@ public class GuiReactorLogicAdapter extends GuiMekanism } @Override - protected void mouseClicked(int mouseX, int mouseY, int button) + protected void mouseClicked(int mouseX, int mouseY, int button) throws IOException { super.mouseClicked(mouseX, mouseY, button); diff --git a/src/main/java/mekanism/generators/client/gui/GuiReactorStats.java b/src/main/java/mekanism/generators/client/gui/GuiReactorStats.java index 55c3815ed..576400892 100644 --- a/src/main/java/mekanism/generators/client/gui/GuiReactorStats.java +++ b/src/main/java/mekanism/generators/client/gui/GuiReactorStats.java @@ -1,5 +1,6 @@ package mekanism.generators.client.gui; +import java.io.IOException; import java.text.NumberFormat; import java.util.ArrayList; import java.util.List; @@ -22,12 +23,11 @@ import mekanism.generators.client.gui.element.GuiFuelTab; import mekanism.generators.client.gui.element.GuiHeatTab; import mekanism.generators.common.tile.reactor.TileEntityReactorController; import net.minecraft.entity.player.InventoryPlayer; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiReactorStats extends GuiMekanism { @@ -102,7 +102,7 @@ public class GuiReactorStats extends GuiMekanism } @Override - public void mouseClicked(int mouseX, int mouseY, int button) + public void mouseClicked(int mouseX, int mouseY, int button) throws IOException { super.mouseClicked(mouseX, mouseY, button); diff --git a/src/main/java/mekanism/generators/client/gui/GuiSolarGenerator.java b/src/main/java/mekanism/generators/client/gui/GuiSolarGenerator.java index 0d5c8e7e8..cb28a3cac 100644 --- a/src/main/java/mekanism/generators/client/gui/GuiSolarGenerator.java +++ b/src/main/java/mekanism/generators/client/gui/GuiSolarGenerator.java @@ -18,12 +18,11 @@ import mekanism.common.util.MekanismUtils.ResourceType; import mekanism.generators.common.inventory.container.ContainerSolarGenerator; import mekanism.generators.common.tile.TileEntitySolarGenerator; import net.minecraft.entity.player.InventoryPlayer; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiSolarGenerator extends GuiMekanism { diff --git a/src/main/java/mekanism/generators/client/gui/GuiTurbineStats.java b/src/main/java/mekanism/generators/client/gui/GuiTurbineStats.java index a389fde46..000a37b36 100644 --- a/src/main/java/mekanism/generators/client/gui/GuiTurbineStats.java +++ b/src/main/java/mekanism/generators/client/gui/GuiTurbineStats.java @@ -18,12 +18,11 @@ import mekanism.generators.client.gui.element.GuiTurbineTab.TurbineTab; import mekanism.generators.common.content.turbine.TurbineUpdateProtocol; import mekanism.generators.common.tile.turbine.TileEntityTurbineCasing; import net.minecraft.entity.player.InventoryPlayer; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.opengl.GL11; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - @SideOnly(Side.CLIENT) public class GuiTurbineStats extends GuiMekanism { diff --git a/src/main/java/mekanism/generators/client/gui/GuiWindGenerator.java b/src/main/java/mekanism/generators/client/gui/GuiWindGenerator.java index 08a354a64..7a145d1de 100644 --- a/src/main/java/mekanism/generators/client/gui/GuiWindGenerator.java +++ b/src/main/java/mekanism/generators/client/gui/GuiWindGenerator.java @@ -21,12 +21,11 @@ import mekanism.common.util.MekanismUtils.ResourceType; import mekanism.generators.common.inventory.container.ContainerWindGenerator; import mekanism.generators.common.tile.TileEntityWindGenerator; import net.minecraft.entity.player.InventoryPlayer; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; + @SideOnly(Side.CLIENT) public class GuiWindGenerator extends GuiMekanism { @@ -67,7 +66,7 @@ public class GuiWindGenerator extends GuiMekanism int size = 44; - if(!tileEntity.getWorld().canBlockSeeTheSky(tileEntity.getPos().getX(), tileEntity.getPos().getY()+4, tileEntity.getPos().getZ())) + if(!tileEntity.getWorld().canSeeSky(tileEntity.getPos().add(0, 4, 0))) { size += 9; fontRendererObj.drawString(EnumColor.DARK_RED + LangUtils.localize("gui.skyBlocked"), 51, size, 0x00CD00); diff --git a/src/main/java/mekanism/generators/client/gui/element/GuiFuelTab.java b/src/main/java/mekanism/generators/client/gui/element/GuiFuelTab.java index 933586472..896090223 100644 --- a/src/main/java/mekanism/generators/client/gui/element/GuiFuelTab.java +++ b/src/main/java/mekanism/generators/client/gui/element/GuiFuelTab.java @@ -11,7 +11,6 @@ import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; -import codechicken.lib.vec.Rectangle4i; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; diff --git a/src/main/java/mekanism/generators/client/gui/element/GuiHeatTab.java b/src/main/java/mekanism/generators/client/gui/element/GuiHeatTab.java index 39406ded8..60fc88f16 100644 --- a/src/main/java/mekanism/generators/client/gui/element/GuiHeatTab.java +++ b/src/main/java/mekanism/generators/client/gui/element/GuiHeatTab.java @@ -11,7 +11,6 @@ import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; -import codechicken.lib.vec.Rectangle4i; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; diff --git a/src/main/java/mekanism/generators/client/gui/element/GuiStatTab.java b/src/main/java/mekanism/generators/client/gui/element/GuiStatTab.java index 768874dea..0e7645062 100644 --- a/src/main/java/mekanism/generators/client/gui/element/GuiStatTab.java +++ b/src/main/java/mekanism/generators/client/gui/element/GuiStatTab.java @@ -11,7 +11,6 @@ import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; -import codechicken.lib.vec.Rectangle4i; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; diff --git a/src/main/java/mekanism/generators/client/gui/element/GuiTurbineTab.java b/src/main/java/mekanism/generators/client/gui/element/GuiTurbineTab.java index 22584b8aa..33c0522b8 100644 --- a/src/main/java/mekanism/generators/client/gui/element/GuiTurbineTab.java +++ b/src/main/java/mekanism/generators/client/gui/element/GuiTurbineTab.java @@ -2,7 +2,6 @@ package mekanism.generators.client.gui.element; import mekanism.api.Coord4D; import mekanism.client.gui.IGuiWrapper; -import mekanism.client.gui.element.GuiBoilerTab.BoilerTab; import mekanism.client.gui.element.GuiElement; import mekanism.client.sound.SoundHandler; import mekanism.common.Mekanism; @@ -12,9 +11,8 @@ import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; -import codechicken.lib.vec.Rectangle4i; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class GuiTurbineTab extends GuiElement diff --git a/src/main/java/mekanism/generators/client/model/ModelAdvancedSolarGenerator.java b/src/main/java/mekanism/generators/client/model/ModelAdvancedSolarGenerator.java index f6c4d7496..a3fa3b34d 100644 --- a/src/main/java/mekanism/generators/client/model/ModelAdvancedSolarGenerator.java +++ b/src/main/java/mekanism/generators/client/model/ModelAdvancedSolarGenerator.java @@ -2,8 +2,8 @@ package mekanism.generators.client.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class ModelAdvancedSolarGenerator extends ModelBase diff --git a/src/main/java/mekanism/generators/client/model/ModelHeatGenerator.java b/src/main/java/mekanism/generators/client/model/ModelHeatGenerator.java index 7796b0de9..7fdc24962 100644 --- a/src/main/java/mekanism/generators/client/model/ModelHeatGenerator.java +++ b/src/main/java/mekanism/generators/client/model/ModelHeatGenerator.java @@ -5,11 +5,9 @@ import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.util.ResourceLocation; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -144,21 +142,21 @@ public class ModelHeatGenerator extends ModelBase public void render(float size, boolean on, TextureManager manager) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); MekanismRenderer.blendOn(); doRender(size); manager.bindTexture(on ? OVERLAY_ON : OVERLAY_OFF); - GL11.glScalef(1.001F, 1.001F, 1.001F); - GL11.glTranslatef(0, -0.0011F, 0); + GlStateManager.scale(1.001F, 1.001F, 1.001F); + GlStateManager.translate(0, -0.0011F, 0); MekanismRenderer.glowOn(); doRender(size); MekanismRenderer.glowOff(); MekanismRenderer.blendOff(); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } private void doRender(float size) diff --git a/src/main/java/mekanism/generators/client/model/ModelTurbine.java b/src/main/java/mekanism/generators/client/model/ModelTurbine.java index b5acb3ebb..bdfed958e 100644 --- a/src/main/java/mekanism/generators/client/model/ModelTurbine.java +++ b/src/main/java/mekanism/generators/client/model/ModelTurbine.java @@ -2,8 +2,7 @@ package mekanism.generators.client.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; - -import org.lwjgl.opengl.GL11; +import net.minecraft.client.renderer.GlStateManager; public class ModelTurbine extends ModelBase { @@ -62,9 +61,9 @@ public class ModelTurbine extends ModelBase public void render(float size, int index) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); - GL11.glRotatef(index*5, 0.0F, 1.0F, 0.0F); + GlStateManager.rotate(index*5, 0.0F, 1.0F, 0.0F); float scale = index*0.5F; float widthDiv = 16; @@ -74,35 +73,35 @@ public class ModelTurbine extends ModelBase extension_east.render(size); extension_north.render(size); - GL11.glPushMatrix(); - GL11.glTranslatef(-0.25F, 0.0F, 0.0F); - GL11.glScalef(1.0F + scale, 1.0F, 1.0F + scale/widthDiv); - GL11.glTranslatef(0.25F, 0.0F, 0.0F); + GlStateManager.pushMatrix(); + GlStateManager.translate(-0.25F, 0.0F, 0.0F); + GlStateManager.scale(1.0F + scale, 1.0F, 1.0F + scale/widthDiv); + GlStateManager.translate(0.25F, 0.0F, 0.0F); blade_west.render(size); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); - GL11.glPushMatrix(); - GL11.glTranslatef(0.25F, 0.0F, 0.0F); - GL11.glScalef(1.0F + scale, 1.0F, 1.0F + scale/widthDiv); - GL11.glTranslatef(-0.25F, 0.0F, 0.0F); + GlStateManager.pushMatrix(); + GlStateManager.translate(0.25F, 0.0F, 0.0F); + GlStateManager.scale(1.0F + scale, 1.0F, 1.0F + scale/widthDiv); + GlStateManager.translate(-0.25F, 0.0F, 0.0F); blade_east.render(size); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); - GL11.glPushMatrix(); - GL11.glTranslatef(0.0F, 0.0F, -0.25F); - GL11.glScalef(1.0F + scale/widthDiv, 1.0F, 1.0F + scale); - GL11.glTranslatef(0.0F, 0.0F, 0.25F); + GlStateManager.pushMatrix(); + GlStateManager.translate(0.0F, 0.0F, -0.25F); + GlStateManager.scale(1.0F + scale/widthDiv, 1.0F, 1.0F + scale); + GlStateManager.translate(0.0F, 0.0F, 0.25F); blade_north.render(size); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); - GL11.glPushMatrix(); - GL11.glTranslatef(0.0F, 0.0F, 0.25F); - GL11.glScalef(1.0F + scale/widthDiv, 1.0F, 1.0F + scale); - GL11.glTranslatef(0.0F, 0.0F, -0.25F); + GlStateManager.pushMatrix(); + GlStateManager.translate(0.0F, 0.0F, 0.25F); + GlStateManager.scale(1.0F + scale/widthDiv, 1.0F, 1.0F + scale); + GlStateManager.translate(0.0F, 0.0F, -0.25F); blade_south.render(size); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) diff --git a/src/main/java/mekanism/generators/client/render/RenderAdvancedSolarGenerator.java b/src/main/java/mekanism/generators/client/render/RenderAdvancedSolarGenerator.java index b1d3fb18b..128ba444c 100644 --- a/src/main/java/mekanism/generators/client/render/RenderAdvancedSolarGenerator.java +++ b/src/main/java/mekanism/generators/client/render/RenderAdvancedSolarGenerator.java @@ -4,11 +4,8 @@ import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import mekanism.generators.client.model.ModelAdvancedSolarGenerator; import mekanism.generators.common.tile.TileEntityAdvancedSolarGenerator; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; - -import org.lwjgl.opengl.GL11; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -20,21 +17,21 @@ public class RenderAdvancedSolarGenerator extends TileEntitySpecialRenderer { @@ -37,29 +36,29 @@ public class RenderBioGenerator extends TileEntitySpecialRenderer { @@ -25,7 +24,7 @@ public class RenderReactor extends TileEntitySpecialRenderer { @@ -16,13 +14,13 @@ public class RenderSolarGenerator extends TileEntitySpecialRenderer 0) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glTranslated(x + 0.5, y - 1, z + 0.5); - GL11.glRotatef(tileEntity.rotationLower, 0.0F, 1.0F, 0.0F); + GlStateManager.rotate(tileEntity.rotationLower, 0.0F, 1.0F, 0.0F); model.render(0.0625F, baseIndex); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } if(tileEntity.getHousedBlades() == 2) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GL11.glTranslated(x + 0.5, y - 0.5, z + 0.5); - GL11.glRotatef(tileEntity.rotationUpper, 0.0F, 1.0F, 0.0F); + GlStateManager.rotate(tileEntity.rotationUpper, 0.0F, 1.0F, 0.0F); model.render(0.0625F, baseIndex+1); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } } diff --git a/src/main/java/mekanism/generators/client/render/RenderWindGenerator.java b/src/main/java/mekanism/generators/client/render/RenderWindGenerator.java index 7865250a1..cf711ac1e 100644 --- a/src/main/java/mekanism/generators/client/render/RenderWindGenerator.java +++ b/src/main/java/mekanism/generators/client/render/RenderWindGenerator.java @@ -5,10 +5,8 @@ import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import mekanism.generators.client.model.ModelWindGenerator; import mekanism.generators.common.tile.TileEntityWindGenerator; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; - -import org.lwjgl.opengl.GL11; public class RenderWindGenerator extends TileEntitySpecialRenderer { @@ -17,27 +15,27 @@ public class RenderWindGenerator extends TileEntitySpecialRenderer entitiesToDie = controller.getWorldObj().getEntitiesWithinAABB(Entity.class, death_zone); + AxisAlignedBB death_zone = AxisAlignedBB.fromBounds(controller.getPos().getX() - 1, controller.getPos().getY() - 3, controller.getPos().getZ() - 1 ,controller.getPos().getX() + 2, controller.getPos().getY(), controller.getPos().getZ() + 2); + List entitiesToDie = controller.getWorld().getEntitiesWithinAABB(Entity.class, death_zone); for(Entity entity : entitiesToDie) { @@ -347,9 +347,9 @@ public class FusionReactor implements IFusionReactor formed = false; burning = burning && keepBurning; - if(!controller.getWorldObj().isRemote) + if(!controller.getWorld().isRemote) { - Mekanism.packetHandler.sendToDimension(new TileEntityMessage(Coord4D.get(controller), controller.getNetworkedData(new ArrayList())), controller.getWorldObj().provider.getDimensionId()); + Mekanism.packetHandler.sendToDimension(new TileEntityMessage(Coord4D.get(controller), controller.getNetworkedData(new ArrayList())), controller.getWorld().provider.getDimensionId()); } } @@ -385,9 +385,9 @@ public class FusionReactor implements IFusionReactor formed = true; - if(!controller.getWorldObj().isRemote) + if(!controller.getWorld().isRemote) { - Mekanism.packetHandler.sendToDimension(new TileEntityMessage(Coord4D.get(controller), controller.getNetworkedData(new ArrayList())), controller.getWorldObj().provider.getDimensionId()); + Mekanism.packetHandler.sendToDimension(new TileEntityMessage(Coord4D.get(controller), controller.getNetworkedData(new ArrayList())), controller.getWorld().provider.getDimensionId()); } } @@ -403,7 +403,7 @@ public class FusionReactor implements IFusionReactor for(int[] coords : positions) { - TileEntity tile = centre.clone().translate(coords[0], coords[1], coords[2]).getTileEntity(controller.getWorldObj()); + TileEntity tile = centre.clone().translate(coords[0], coords[1], coords[2]).getTileEntity(controller.getWorld()); if(tile instanceof IReactorBlock && ((IReactorBlock)tile).isFrame()) { @@ -431,7 +431,7 @@ public class FusionReactor implements IFusionReactor for(int[] coords : positions) { - TileEntity tile = centre.clone().translate(coords[0], coords[1], coords[2]).getTileEntity(controller.getWorldObj()); + TileEntity tile = centre.clone().translate(coords[0], coords[1], coords[2]).getTileEntity(controller.getWorld()); if(tile instanceof ILaserReceptor && !(coords[1] == 0 && (coords[0] == 0 || coords[2] == 0))) { @@ -469,9 +469,10 @@ public class FusionReactor implements IFusionReactor { for(int z = -1; x <= 1; x++) { - Block tile = centre.clone().translate(x, y, z).getBlock(controller.getWorldObj()); + Coord4D trans = centre.translate(x, y, z); + Block tile = trans.getBlock(controller.getWorld()); - if(!tile.isAir(controller.getWorldObj(), x, y, z)) + if(!tile.isAir(controller.getWorld(), trans.getPos())) { return false; } diff --git a/src/main/java/mekanism/generators/common/GeneratorsBlocks.java b/src/main/java/mekanism/generators/common/GeneratorsBlocks.java index 47a6948b3..d1806b3df 100644 --- a/src/main/java/mekanism/generators/common/GeneratorsBlocks.java +++ b/src/main/java/mekanism/generators/common/GeneratorsBlocks.java @@ -11,9 +11,9 @@ import net.minecraftforge.fml.common.registry.GameRegistry.ObjectHolder; @ObjectHolder("MekanismGenerators") public class GeneratorsBlocks { - public static final Block Generator = new BlockGenerator().setBlockName("Generator"); - public static final Block Reactor = new BlockReactor().setBlockName("Reactor"); - public static final Block ReactorGlass = new BlockReactor().setBlockName("ReactorGlass"); + public static final Block Generator = new BlockGenerator().setUnlocalizedName("Generator"); + public static final Block Reactor = new BlockReactor().setUnlocalizedName("Reactor"); + public static final Block ReactorGlass = new BlockReactor().setUnlocalizedName("ReactorGlass"); public static void register() { diff --git a/src/main/java/mekanism/generators/common/GeneratorsItems.java b/src/main/java/mekanism/generators/common/GeneratorsItems.java index 7b08407fd..785458974 100644 --- a/src/main/java/mekanism/generators/common/GeneratorsItems.java +++ b/src/main/java/mekanism/generators/common/GeneratorsItems.java @@ -5,6 +5,7 @@ import mekanism.generators.common.item.ItemHohlraum; import mekanism.generators.common.tile.turbine.TileEntityTurbineRotor; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; +import net.minecraft.util.BlockPos; import net.minecraft.world.World; import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.fml.common.registry.GameRegistry.ObjectHolder; @@ -16,9 +17,9 @@ public class GeneratorsItems public static final ItemHohlraum Hohlraum = (ItemHohlraum)new ItemHohlraum().setUnlocalizedName("Hohlraum"); public static final Item TurbineBlade = new ItemMekanism() { @Override - public boolean doesSneakBypassUse(World world, int x, int y, int z, EntityPlayer player) + public boolean doesSneakBypassUse(World world, BlockPos pos, EntityPlayer player) { - return world.getTileEntity(x, y, z) instanceof TileEntityTurbineRotor; + return world.getTileEntity(pos) instanceof TileEntityTurbineRotor; } }.setUnlocalizedName("TurbineBlade"); diff --git a/src/main/java/mekanism/generators/common/MekanismGenerators.java b/src/main/java/mekanism/generators/common/MekanismGenerators.java index 309aac8d8..20e6e9752 100644 --- a/src/main/java/mekanism/generators/common/MekanismGenerators.java +++ b/src/main/java/mekanism/generators/common/MekanismGenerators.java @@ -26,13 +26,10 @@ import mekanism.generators.common.content.turbine.SynchronizedTurbineData; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.CraftingManager; +import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.oredict.OreDictionary; -import buildcraft.api.fuels.BuildcraftFuelRegistry; -import buildcraft.api.fuels.IFuel; import net.minecraftforge.fml.client.event.ConfigChangedEvent.OnConfigChangedEvent; -import net.minecraftforge.fml.common.FMLCommonHandler; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.Mod.Instance; @@ -42,6 +39,9 @@ import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.network.NetworkRegistry; +import net.minecraftforge.oredict.OreDictionary; +import buildcraft.api.fuels.BuildcraftFuelRegistry; +import buildcraft.api.fuels.IFuel; @Mod(modid = "MekanismGenerators", name = "MekanismGenerators", version = "9.0.0", dependencies = "required-after:Mekanism", guiFactory = "mekanism.generators.client.gui.GeneratorsGuiFactory") public class MekanismGenerators implements IModule diff --git a/src/main/java/mekanism/generators/common/block/BlockGenerator.java b/src/main/java/mekanism/generators/common/block/BlockGenerator.java index 86b8e5950..1138cba24 100644 --- a/src/main/java/mekanism/generators/common/block/BlockGenerator.java +++ b/src/main/java/mekanism/generators/common/block/BlockGenerator.java @@ -7,7 +7,7 @@ import java.util.Random; import mekanism.api.MekanismConfig.client; import mekanism.api.MekanismConfig.general; import mekanism.api.energy.IEnergizedItem; -import mekanism.common.CTMData; +import mekanism.client.render.ctm.CTMData; import mekanism.common.Mekanism; import mekanism.common.base.IActiveState; import mekanism.common.base.IBlockCTM; @@ -43,7 +43,7 @@ import mekanism.generators.common.tile.turbine.TileEntityTurbineVent; import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.item.EntityItem; @@ -53,15 +53,17 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import net.minecraft.util.EnumFacing; -import buildcraft.api.tools.IToolWrench; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import buildcraft.api.tools.IToolWrench; +import codechicken.lib.render.TextureUtils.IIconRegister; /** * Block class for handling multiple generator block IDs. @@ -132,11 +134,11 @@ public class BlockGenerator extends BlockContainer implements ISpecialBounds, IB } @Override - public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) + public AxisAlignedBB getCollisionBoundingBox(World world, BlockPos pos, IBlockState state) { - setBlockBoundsBasedOnState(world, x, y, z); + setBlockBoundsBasedOnState(world, pos); - return super.getCollisionBoundingBoxFromPool(world, x, y, z); + return super.getCollisionBoundingBox(world, pos); } @Override @@ -163,15 +165,6 @@ public class BlockGenerator extends BlockContainer implements ISpecialBounds, IB return BASE_ICON; } } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) - { - int meta = world.getBlockMetadata(x, y, z); - - return getIcon(side, meta); - } @Override public void onNeighborBlockChange(World world, int x, int y, int z, Block block) @@ -182,7 +175,7 @@ public class BlockGenerator extends BlockContainer implements ISpecialBounds, IB if(tileEntity instanceof IMultiblock) { - ((IMultiblock)tileEntity).update(); + ((IMultiblock)tileEntity).doUpdate(); } if(tileEntity instanceof TileEntityBasicBlock) @@ -193,9 +186,9 @@ public class BlockGenerator extends BlockContainer implements ISpecialBounds, IB } @Override - public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entityliving, ItemStack itemstack) + public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase entityliving, ItemStack itemstack) { - TileEntityBasicBlock tileEntity = (TileEntityBasicBlock)world.getTileEntity(x, y, z); + TileEntityBasicBlock tileEntity = (TileEntityBasicBlock)world.getTileEntity(pos); int side = MathHelper.floor_double((double)(entityliving.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; int height = Math.round(entityliving.rotationPitch); @@ -234,16 +227,16 @@ public class BlockGenerator extends BlockContainer implements ISpecialBounds, IB if(!world.isRemote && tileEntity instanceof IMultiblock) { - ((IMultiblock)tileEntity).update(); + ((IMultiblock)tileEntity).doUpdate(); } } @Override - public int getLightValue(IBlockAccess world, int x, int y, int z) + public int getLightValue(IBlockAccess world, BlockPos pos) { if(client.enableAmbientLighting) { - TileEntity tileEntity = world.getTileEntity(x, y, z); + TileEntity tileEntity = world.getTileEntity(pos); if(tileEntity instanceof IActiveState && !(tileEntity instanceof TileEntitySolarGenerator)) { @@ -265,11 +258,11 @@ public class BlockGenerator extends BlockContainer implements ISpecialBounds, IB } @Override - public float getPlayerRelativeBlockHardness(EntityPlayer player, World world, int x, int y, int z) + public float getPlayerRelativeBlockHardness(EntityPlayer player, World world, BlockPos pos) { - TileEntity tile = world.getTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(pos); - return SecurityUtils.canAccess(player, tile) ? super.getPlayerRelativeBlockHardness(player, world, x, y, z) : 0.0F; + return SecurityUtils.canAccess(player, tile) ? super.getPlayerRelativeBlockHardness(player, world, pos) : 0.0F; } @Override @@ -284,26 +277,26 @@ public class BlockGenerator extends BlockContainer implements ISpecialBounds, IB @Override @SideOnly(Side.CLIENT) - public void randomDisplayTick(World world, int x, int y, int z, Random random) + public void randomDisplayTick(World world, BlockPos pos, IBlockState state, Random random) { int metadata = world.getBlockMetadata(x, y, z); - TileEntityBasicBlock tileEntity = (TileEntityBasicBlock)world.getTileEntity(x, y, z); + TileEntityBasicBlock tileEntity = (TileEntityBasicBlock)world.getTileEntity(pos); - if(MekanismUtils.isActive(world, x, y, z)) + if(MekanismUtils.isActive(world, pos)) { - float xRandom = (float)x + 0.5F; - float yRandom = (float)y + 0.0F + random.nextFloat() * 6.0F / 16.0F; - float zRandom = (float)z + 0.5F; + float xRandom = (float)pos.getX() + 0.5F; + float yRandom = (float)pos.getY() + 0.0F + random.nextFloat() * 6.0F / 16.0F; + float zRandom = (float)pos.getZ() + 0.5F; float iRandom = 0.52F; float jRandom = random.nextFloat() * 0.6F - 0.3F; - if(tileEntity.facing == 4) + if(tileEntity.facing == EnumFacing.WEST) { switch(GeneratorType.getFromMetadata(metadata)) { case HEAT_GENERATOR: -(??) world.spawnParticle("smoke", (double)(xRandom + iRandom), (double)yRandom, (double)(zRandom - jRandom), 0.0D, 0.0D, 0.0D); -(??) world.spawnParticle("flame", (double)(xRandom + iRandom), (double)yRandom, (double)(zRandom - jRandom), 0.0D, 0.0D, 0.0D); + world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, (double)(xRandom + iRandom), (double)yRandom, (double)(zRandom - jRandom), 0.0D, 0.0D, 0.0D); + world.spawnParticle(EnumParticleTypes.FLAME, (double)(xRandom + iRandom), (double)yRandom, (double)(zRandom - jRandom), 0.0D, 0.0D, 0.0D); break; case BIO_GENERATOR: world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, x+.25, y+.2, z+.5, 0.0D, 0.0D, 0.0D); @@ -312,7 +305,7 @@ public class BlockGenerator extends BlockContainer implements ISpecialBounds, IB break; } } - else if(tileEntity.facing == 5) + else if(tileEntity.facing == EnumFacing.EAST) { switch(GeneratorType.getFromMetadata(metadata)) { @@ -327,7 +320,7 @@ public class BlockGenerator extends BlockContainer implements ISpecialBounds, IB break; } } - else if(tileEntity.facing == 2) + else if(tileEntity.facing == EnumFacing.NORTH) { switch(GeneratorType.getFromMetadata(metadata)) { @@ -342,7 +335,7 @@ public class BlockGenerator extends BlockContainer implements ISpecialBounds, IB break; } } - else if(tileEntity.facing == 3) + else if(tileEntity.facing == EnumFacing.SOUTH) { switch(GeneratorType.getFromMetadata(metadata)) { @@ -361,16 +354,16 @@ public class BlockGenerator extends BlockContainer implements ISpecialBounds, IB } @Override - public boolean canPlaceBlockAt(World world, int x, int y, int z) + public boolean canPlaceBlockAt(World world, BlockPos pos) { //This method doesn't actually seem to be used in MC code... if(world.getBlockMetadata(x, y, z) == GeneratorType.ADVANCED_SOLAR_GENERATOR.meta) { - boolean canPlace = super.canPlaceBlockAt(world, x, y, z); + boolean canPlace = super.canPlaceBlockAt(world, pos); boolean nonAir = false; - nonAir |= world.isAirBlock(x, y, z); - nonAir |= world.isAirBlock(x, y+1, x); + nonAir |= world.isAirBlock(pos); + nonAir |= world.isAirBlock(pos.add(0, 1, 0)); for(int xPos=-1;xPos<=1;xPos++) { @@ -384,11 +377,11 @@ public class BlockGenerator extends BlockContainer implements ISpecialBounds, IB } else if(world.getBlockMetadata(x, y, z) == GeneratorType.WIND_GENERATOR.meta) { - boolean canPlace = super.canPlaceBlockAt(world, x, y, z); + boolean canPlace = super.canPlaceBlockAt(world, pos); boolean nonAir = false; - for(int yPos = y+1; yPos <= y+4; yPos++) + for(int yPos = pos.getY()+1; yPos <= pos.getY()+4; yPos++) { nonAir |= world.isAirBlock(x, yPos, z); } @@ -396,13 +389,13 @@ public class BlockGenerator extends BlockContainer implements ISpecialBounds, IB return (!nonAir) && canPlace; } - return super.canPlaceBlockAt(world, x, y, z); + return super.canPlaceBlockAt(world, pos); } @Override - public void breakBlock(World world, int x, int y, int z, Block block, int meta) + public void breakBlock(World world, BlockPos pos, IBlockState state) { - TileEntityBasicBlock tileEntity = (TileEntityBasicBlock)world.getTileEntity(x, y, z); + TileEntityBasicBlock tileEntity = (TileEntityBasicBlock)world.getTileEntity(pos); if(!world.isRemote && tileEntity instanceof TileEntityTurbineRotor) { @@ -415,7 +408,7 @@ public class BlockGenerator extends BlockContainer implements ISpecialBounds, IB double motionY = (world.rand.nextFloat() * motion) + (1.0F - motion) * 0.5D; double motionZ = (world.rand.nextFloat() * motion) + (1.0F - motion) * 0.5D; - EntityItem entityItem = new EntityItem(world, x + motionX, y + motionY, z + motionZ, new ItemStack(GeneratorsItems.TurbineBlade, amount)); + EntityItem entityItem = new EntityItem(world, pos.getX() + motionX, pos.getY() + motionY, pos.getZ() + motionZ, new ItemStack(GeneratorsItems.TurbineBlade, amount)); world.spawnEntityInWorld(entityItem); } @@ -426,18 +419,18 @@ public class BlockGenerator extends BlockContainer implements ISpecialBounds, IB ((IBoundingBlock)tileEntity).onBreak(); } - super.breakBlock(world, x, y, z, block, meta); + super.breakBlock(world, pos, state); } @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer entityplayer, int side, float playerX, float playerY, float playerZ) + public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer entityplayer, EnumFacing side, float playerX, float playerY, float playerZ) { if(world.isRemote) { return true; } - TileEntityBasicBlock tileEntity = (TileEntityBasicBlock)world.getTileEntity(x, y, z); + TileEntityBasicBlock tileEntity = (TileEntityBasicBlock)world.getTileEntity(pos); int metadata = world.getBlockMetadata(x, y, z); if(entityplayer.getCurrentEquippedItem() != null) @@ -585,7 +578,7 @@ public class BlockGenerator extends BlockContainer implements ISpecialBounds, IB } @Override - public boolean renderAsNormalBlock() + public boolean rendersAsNormalBlock() { return false; } @@ -642,7 +635,7 @@ public class BlockGenerator extends BlockContainer implements ISpecialBounds, IB } @Override - public boolean removedByPlayer(World world, EntityPlayer player, int x, int y, int z, boolean willHarvest) + public boolean removedByPlayer(World world, BlockPos pos, EntityPlayer player, boolean willHarvest) { if(!player.capabilities.isCreativeMode && !world.isRemote && willHarvest) { @@ -651,19 +644,19 @@ public class BlockGenerator extends BlockContainer implements ISpecialBounds, IB double motionY = (world.rand.nextFloat() * motion) + (1.0F - motion) * 0.5D; double motionZ = (world.rand.nextFloat() * motion) + (1.0F - motion) * 0.5D; - EntityItem entityItem = new EntityItem(world, x + motionX, y + motionY, z + motionZ, getPickBlock(null, world, x, y, z, player)); + EntityItem entityItem = new EntityItem(world, pos.getX() + motionX, pos.getY() + motionY, pos.getZ() + motionZ, getPickBlock(null, world, pos, player)); world.spawnEntityInWorld(entityItem); } - return world.setBlockToAir(x, y, z); + return world.setBlockToAir(pos); } @Override - public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z, EntityPlayer player) + public ItemStack getPickBlock(MovingObjectPosition target, World world, BlockPos pos, EntityPlayer player) { - TileEntityBasicBlock tileEntity = (TileEntityBasicBlock)world.getTileEntity(x, y, z); - ItemStack itemStack = new ItemStack(GeneratorsBlocks.Generator, 1, world.getBlockMetadata(x, y, z)); + TileEntityBasicBlock tileEntity = (TileEntityBasicBlock)world.getTileEntity(pos); + ItemStack itemStack = new ItemStack(GeneratorsBlocks.Generator, 1, world.getBlockMetadata(pos)); if(itemStack.stackTagCompound == null) { @@ -717,11 +710,11 @@ public class BlockGenerator extends BlockContainer implements ISpecialBounds, IB return itemStack; } - public ItemStack dismantleBlock(World world, int x, int y, int z, boolean returnBlock) + public ItemStack dismantleBlock(World world, BlockPos pos, boolean returnBlock) { - ItemStack itemStack = getPickBlock(null, world, x, y, z, null); + ItemStack itemStack = getPickBlock(null, world, pos, null); - world.setBlockToAir(x, y, z); + world.setBlockToAir(pos); if(!returnBlock) { @@ -730,7 +723,7 @@ public class BlockGenerator extends BlockContainer implements ISpecialBounds, IB double motionY = (world.rand.nextFloat() * motion) + (1.0F - motion) * 0.5D; double motionZ = (world.rand.nextFloat() * motion) + (1.0F - motion) * 0.5D; - EntityItem entityItem = new EntityItem(world, x + motionX, y + motionY, z + motionZ, itemStack); + EntityItem entityItem = new EntityItem(world, pos.getX() + motionX, pos.getY() + motionY, pos.getZ() + motionZ, itemStack); world.spawnEntityInWorld(entityItem); } @@ -739,9 +732,9 @@ public class BlockGenerator extends BlockContainer implements ISpecialBounds, IB } @Override - public boolean isSideSolid(IBlockAccess world, int x, int y, int z, EnumFacing side) + public boolean isSideSolid(IBlockAccess world, BlockPos pos, EnumFacing side) { - int metadata = world.getBlockMetadata(x, y, z); + int metadata = world.getBlockMetadata(pos); if(metadata != GeneratorType.SOLAR_GENERATOR.meta && metadata != GeneratorType.ADVANCED_SOLAR_GENERATOR.meta && @@ -850,9 +843,9 @@ public class BlockGenerator extends BlockContainer implements ISpecialBounds, IB } @Override - public EnumFacing[] getValidRotations(World world, int x, int y, int z) + public EnumFacing[] getValidRotations(World world, BlockPos pos) { - TileEntity tile = world.getTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(pos); EnumFacing[] valid = new EnumFacing[6]; if(tile instanceof TileEntityBasicBlock) @@ -872,9 +865,9 @@ public class BlockGenerator extends BlockContainer implements ISpecialBounds, IB } @Override - public boolean rotateBlock(World world, int x, int y, int z, EnumFacing axis) + public boolean rotateBlock(World world, BlockPos pos, EnumFacing axis) { - TileEntity tile = world.getTileEntity(x, y, z); + TileEntity tile = world.getTileEntity(pos); if(tile instanceof TileEntityBasicBlock) { diff --git a/src/main/java/mekanism/generators/common/block/BlockReactor.java b/src/main/java/mekanism/generators/common/block/BlockReactor.java index 6586bd97c..d0db075be 100644 --- a/src/main/java/mekanism/generators/common/block/BlockReactor.java +++ b/src/main/java/mekanism/generators/common/block/BlockReactor.java @@ -4,7 +4,7 @@ import java.util.Arrays; import java.util.List; import mekanism.api.Coord4D; -import mekanism.common.CTMData; +import mekanism.client.render.ctm.CTMData; import mekanism.common.Mekanism; import mekanism.common.base.IBlockCTM; import mekanism.common.tile.TileEntityBasicBlock; @@ -23,20 +23,19 @@ import mekanism.generators.common.tile.reactor.TileEntityReactorPort; import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.item.EntityItem; 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.IIcon; +import net.minecraft.util.EnumFacing; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import net.minecraft.util.EnumFacing; -import buildcraft.api.tools.IToolWrench; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import buildcraft.api.tools.IToolWrench; +import codechicken.lib.render.TextureUtils.IIconRegister; public class BlockReactor extends BlockContainer implements IBlockCTM { diff --git a/src/main/java/mekanism/generators/common/content/turbine/TurbineFluidTank.java b/src/main/java/mekanism/generators/common/content/turbine/TurbineFluidTank.java index c66b5b5d7..795268bc7 100644 --- a/src/main/java/mekanism/generators/common/content/turbine/TurbineFluidTank.java +++ b/src/main/java/mekanism/generators/common/content/turbine/TurbineFluidTank.java @@ -30,9 +30,9 @@ public class TurbineFluidTank implements IFluidTank @Override public int fill(FluidStack resource, boolean doFill) { - if(turbine.structure != null && !turbine.getWorldObj().isRemote) + if(turbine.structure != null && !turbine.getWorld().isRemote) { - if(resource == null || resource.getFluidID() <= 0) + if(resource == null || resource.getFluid() == null) { return 0; } @@ -42,7 +42,7 @@ public class TurbineFluidTank implements IFluidTank return 0; } - if(turbine.structure.fluidStored == null || turbine.structure.fluidStored.getFluidID() <= 0) + if(turbine.structure.fluidStored == null || turbine.structure.fluidStored.getFluid() == null) { if(resource.amount <= getCapacity()) { @@ -110,9 +110,9 @@ public class TurbineFluidTank implements IFluidTank @Override public FluidStack drain(int maxDrain, boolean doDrain) { - if(turbine.structure != null && !turbine.getWorldObj().isRemote) + if(turbine.structure != null && !turbine.getWorld().isRemote) { - if(turbine.structure.fluidStored == null || turbine.structure.fluidStored.getFluidID() <= 0) + if(turbine.structure.fluidStored == null || turbine.structure.fluidStored.getFluid() == null) { return null; } diff --git a/src/main/java/mekanism/generators/common/content/turbine/TurbineUpdateProtocol.java b/src/main/java/mekanism/generators/common/content/turbine/TurbineUpdateProtocol.java index e2707ac7e..ecb593808 100644 --- a/src/main/java/mekanism/generators/common/content/turbine/TurbineUpdateProtocol.java +++ b/src/main/java/mekanism/generators/common/content/turbine/TurbineUpdateProtocol.java @@ -20,7 +20,8 @@ import mekanism.generators.common.tile.turbine.TileEntityTurbineRotor; import mekanism.generators.common.tile.turbine.TileEntityTurbineVent; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; public class TurbineUpdateProtocol extends UpdateProtocol { @@ -35,8 +36,8 @@ public class TurbineUpdateProtocol extends UpdateProtocol structure.minLocation.yCoord; y--) { - TileEntity tile = pointer.getWorldObj().getTileEntity(centerX, y, centerZ); + TileEntity tile = pointer.getWorld().getTileEntity(new BlockPos(centerX, y, centerZ)); if(!(tile instanceof TileEntityTurbineRotor)) { @@ -153,7 +154,7 @@ public class TurbineUpdateProtocol extends UpdateProtocol= complex.yCoord) { diff --git a/src/main/java/mekanism/generators/common/inventory/container/ContainerBioGenerator.java b/src/main/java/mekanism/generators/common/inventory/container/ContainerBioGenerator.java index c9b772b3e..159e3799b 100644 --- a/src/main/java/mekanism/generators/common/inventory/container/ContainerBioGenerator.java +++ b/src/main/java/mekanism/generators/common/inventory/container/ContainerBioGenerator.java @@ -44,7 +44,7 @@ public class ContainerBioGenerator extends Container { super.onContainerClosed(entityplayer); - tileEntity.closeInventory(); + tileEntity.closeInventory(entityplayer); tileEntity.close(entityplayer); } diff --git a/src/main/java/mekanism/generators/common/inventory/container/ContainerGasGenerator.java b/src/main/java/mekanism/generators/common/inventory/container/ContainerGasGenerator.java index 94356d5eb..307b238f2 100644 --- a/src/main/java/mekanism/generators/common/inventory/container/ContainerGasGenerator.java +++ b/src/main/java/mekanism/generators/common/inventory/container/ContainerGasGenerator.java @@ -43,7 +43,7 @@ public class ContainerGasGenerator extends Container public void onContainerClosed(EntityPlayer entityplayer) { super.onContainerClosed(entityplayer); - tileEntity.closeInventory(); + tileEntity.closeInventory(entityplayer); tileEntity.close(entityplayer); } diff --git a/src/main/java/mekanism/generators/common/inventory/container/ContainerHeatGenerator.java b/src/main/java/mekanism/generators/common/inventory/container/ContainerHeatGenerator.java index 019b4067d..6ddf1d154 100644 --- a/src/main/java/mekanism/generators/common/inventory/container/ContainerHeatGenerator.java +++ b/src/main/java/mekanism/generators/common/inventory/container/ContainerHeatGenerator.java @@ -42,7 +42,7 @@ public class ContainerHeatGenerator extends Container { super.onContainerClosed(entityplayer); - tileEntity.closeInventory(); + tileEntity.closeInventory(entityplayer); tileEntity.close(entityplayer); } diff --git a/src/main/java/mekanism/generators/common/inventory/container/ContainerNeutronCapture.java b/src/main/java/mekanism/generators/common/inventory/container/ContainerNeutronCapture.java index 198066124..a1035999a 100644 --- a/src/main/java/mekanism/generators/common/inventory/container/ContainerNeutronCapture.java +++ b/src/main/java/mekanism/generators/common/inventory/container/ContainerNeutronCapture.java @@ -41,7 +41,7 @@ public class ContainerNeutronCapture extends Container { super.onContainerClosed(entityplayer); - tileEntity.closeInventory(); + tileEntity.closeInventory(entityplayer); tileEntity.close(entityplayer); } diff --git a/src/main/java/mekanism/generators/common/inventory/container/ContainerReactorController.java b/src/main/java/mekanism/generators/common/inventory/container/ContainerReactorController.java index 17e3b6fff..c82654dfb 100644 --- a/src/main/java/mekanism/generators/common/inventory/container/ContainerReactorController.java +++ b/src/main/java/mekanism/generators/common/inventory/container/ContainerReactorController.java @@ -44,7 +44,7 @@ public class ContainerReactorController extends Container { super.onContainerClosed(entityplayer); - tileEntity.closeInventory(); + tileEntity.closeInventory(entityplayer); tileEntity.close(entityplayer); } diff --git a/src/main/java/mekanism/generators/common/inventory/container/ContainerSolarGenerator.java b/src/main/java/mekanism/generators/common/inventory/container/ContainerSolarGenerator.java index b31ac95a9..c4f6e07d7 100644 --- a/src/main/java/mekanism/generators/common/inventory/container/ContainerSolarGenerator.java +++ b/src/main/java/mekanism/generators/common/inventory/container/ContainerSolarGenerator.java @@ -41,7 +41,7 @@ public class ContainerSolarGenerator extends Container { super.onContainerClosed(entityplayer); - tileEntity.closeInventory(); + tileEntity.closeInventory(entityplayer); tileEntity.close(entityplayer); } diff --git a/src/main/java/mekanism/generators/common/inventory/container/ContainerWindGenerator.java b/src/main/java/mekanism/generators/common/inventory/container/ContainerWindGenerator.java index c8fe3b47a..9914a6456 100644 --- a/src/main/java/mekanism/generators/common/inventory/container/ContainerWindGenerator.java +++ b/src/main/java/mekanism/generators/common/inventory/container/ContainerWindGenerator.java @@ -41,7 +41,7 @@ public class ContainerWindGenerator extends Container { super.onContainerClosed(entityplayer); - tileEntity.closeInventory(); + tileEntity.closeInventory(entityplayer); tileEntity.close(entityplayer); } diff --git a/src/main/java/mekanism/generators/common/item/ItemBlockGenerator.java b/src/main/java/mekanism/generators/common/item/ItemBlockGenerator.java index 15fdd0d7c..a7f552217 100644 --- a/src/main/java/mekanism/generators/common/item/ItemBlockGenerator.java +++ b/src/main/java/mekanism/generators/common/item/ItemBlockGenerator.java @@ -1,5 +1,8 @@ package mekanism.generators.common.item; +import ic2.api.item.IElectricItemManager; +import ic2.api.item.ISpecialElectricItem; + import java.util.List; import mekanism.api.EnumColor; @@ -14,13 +17,14 @@ import mekanism.common.integration.IC2ItemManager; import mekanism.common.security.ISecurityItem; import mekanism.common.security.ISecurityTile; import mekanism.common.security.ISecurityTile.SecurityMode; +import mekanism.common.tile.TileEntityBasicBlock; import mekanism.common.tile.TileEntityElectricBlock; import mekanism.common.util.LangUtils; import mekanism.common.util.MekanismUtils; import mekanism.common.util.SecurityUtils; import mekanism.generators.common.block.BlockGenerator.GeneratorType; - import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.client.settings.GameSettings; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; @@ -28,7 +32,8 @@ import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; -import net.minecraft.util.IIcon; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; import net.minecraft.world.World; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; @@ -37,10 +42,7 @@ import net.minecraftforge.fml.common.Optional.InterfaceList; import net.minecraftforge.fml.common.Optional.Method; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; - import cofh.api.energy.IEnergyContainerItem; -import ic2.api.item.IElectricItemManager; -import ic2.api.item.ISpecialElectricItem; /** * Item class for handling multiple generator block IDs. @@ -94,12 +96,6 @@ public class ItemBlockGenerator extends ItemBlock implements IEnergizedItem, ISp return i; } - @Override - public IIcon getIconFromDamage(int i) - { - return metaBlock.getIcon(2, i); - } - @Override public String getUnlocalizedName(ItemStack itemstack) { @@ -128,7 +124,7 @@ public class ItemBlockGenerator extends ItemBlock implements IEnergizedItem, ISp { if(hasSecurity(itemstack)) { - list.add(SecurityUtils.getOwnerDisplay(entityplayer.getCommandSenderName(), getOwner(itemstack))); + list.add(SecurityUtils.getOwnerDisplay(entityplayer.getName(), getOwner(itemstack))); list.add(EnumColor.GREY + LangUtils.localize("gui.security") + ": " + SecurityUtils.getSecurityDisplay(itemstack, Side.CLIENT)); if(SecurityUtils.isOverridden(itemstack, Side.CLIENT)) @@ -165,14 +161,14 @@ public class ItemBlockGenerator extends ItemBlock implements IEnergizedItem, ISp } @Override - public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int metadata) + public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ, IBlockState state) { boolean place = true; - Block block = world.getBlock(x, y, z); + Block block = world.getBlockState(pos).getBlock(); if(stack.getItemDamage() == GeneratorType.ADVANCED_SOLAR_GENERATOR.meta) { - if(!(block.isReplaceable(world, x, y, z) && world.isAirBlock(x, y+1, z))) + if(!(block.isReplaceable(world, pos) && world.isAirBlock(pos.add(0, 1, 0)))) { return false; } @@ -192,7 +188,7 @@ public class ItemBlockGenerator extends ItemBlock implements IEnergizedItem, ISp } else if(stack.getItemDamage() == GeneratorType.WIND_GENERATOR.meta) { - if(!block.isReplaceable(world, x, y, z)) + if(!block.isReplaceable(world, pos)) { return false; } @@ -208,9 +204,9 @@ public class ItemBlockGenerator extends ItemBlock implements IEnergizedItem, ISp } } - if(place && super.placeBlockAt(stack, player, world, x, y, z, side, hitX, hitY, hitZ, metadata)) + if(place && super.placeBlockAt(stack, player, world, pos, side, hitX, hitY, hitZ, state)) { - TileEntityBasicBlock tileEntity = (TileEntityBasicBlock)world.getTileEntity(x, y, z); + TileEntityBasicBlock tileEntity = (TileEntityBasicBlock)world.getTileEntity(pos); if(tileEntity instanceof ISecurityTile) { @@ -224,7 +220,7 @@ public class ItemBlockGenerator extends ItemBlock implements IEnergizedItem, ISp if(getOwner(stack) == null) { - security.getSecurity().setOwner(player.getCommandSenderName()); + security.getSecurity().setOwner(player.getName()); } } @@ -339,7 +335,7 @@ public class ItemBlockGenerator extends ItemBlock implements IEnergizedItem, ISp @Override public void setFluidStack(FluidStack fluidStack, Object... data) { - if(fluidStack == null || fluidStack.amount == 0 || fluidStack.getFluidID() == 0) + if(fluidStack == null || fluidStack.amount == 0 || fluidStack.getFluid() == null) { return; } @@ -491,9 +487,9 @@ public class ItemBlockGenerator extends ItemBlock implements IEnergizedItem, ISp @Override public String getOwner(ItemStack stack) { - if(stack.stackTagCompound != null && stack.stackTagCompound.hasKey("owner")) + if(stack.getTagCompound() != null && stack.getTagCompound().hasKey("owner")) { - return stack.stackTagCompound.getString("owner"); + return stack.getTagCompound().getString("owner"); } return null; @@ -502,40 +498,40 @@ public class ItemBlockGenerator extends ItemBlock implements IEnergizedItem, ISp @Override public void setOwner(ItemStack stack, String owner) { - if(stack.stackTagCompound == null) + if(stack.getTagCompound() == null) { stack.setTagCompound(new NBTTagCompound()); } if(owner == null || owner.isEmpty()) { - stack.stackTagCompound.removeTag("owner"); + stack.getTagCompound().removeTag("owner"); return; } - stack.stackTagCompound.setString("owner", owner); + stack.getTagCompound().setString("owner", owner); } @Override public SecurityMode getSecurity(ItemStack stack) { - if(stack.stackTagCompound == null) + if(stack.getTagCompound() == null) { return SecurityMode.PUBLIC; } - return SecurityMode.values()[stack.stackTagCompound.getInteger("security")]; + return SecurityMode.values()[stack.getTagCompound().getInteger("security")]; } @Override public void setSecurity(ItemStack stack, SecurityMode mode) { - if(stack.stackTagCompound == null) + if(stack.getTagCompound() == null) { stack.setTagCompound(new NBTTagCompound()); } - stack.stackTagCompound.setInteger("security", mode.ordinal()); + stack.getTagCompound().setInteger("security", mode.ordinal()); } @Override diff --git a/src/main/java/mekanism/generators/common/item/ItemBlockReactor.java b/src/main/java/mekanism/generators/common/item/ItemBlockReactor.java index 68db1c049..ab51f864f 100644 --- a/src/main/java/mekanism/generators/common/item/ItemBlockReactor.java +++ b/src/main/java/mekanism/generators/common/item/ItemBlockReactor.java @@ -10,13 +10,11 @@ import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; - -import org.lwjgl.input.Keyboard; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.input.Keyboard; + public class ItemBlockReactor extends ItemBlock { public Block metaBlock; diff --git a/src/main/java/mekanism/generators/common/tile/TileEntityAdvancedSolarGenerator.java b/src/main/java/mekanism/generators/common/tile/TileEntityAdvancedSolarGenerator.java index f0b97ea51..fda84ad89 100644 --- a/src/main/java/mekanism/generators/common/tile/TileEntityAdvancedSolarGenerator.java +++ b/src/main/java/mekanism/generators/common/tile/TileEntityAdvancedSolarGenerator.java @@ -20,19 +20,20 @@ public class TileEntityAdvancedSolarGenerator extends TileEntitySolarGenerator i @Override public EnumSet getOutputtingSides() { - return EnumSet.of(EnumFacing.getFront(facing)); + return EnumSet.of(facing); } @Override public void onPlace() { - MekanismUtils.makeBoundingBlock(worldObj, new Coord4D(xCoord, yCoord+1, zCoord), Coord4D.get(this)); + Coord4D current = Coord4D.get(this); + MekanismUtils.makeBoundingBlock(worldObj, getPos().add(0, 1, 0), current); for(int x = -1; x <= 1; x++) { for(int z = -1; z <= 1; z++) { - MekanismUtils.makeBoundingBlock(worldObj, new Coord4D(xCoord+x, yCoord+2, zCoord+z), Coord4D.get(this)); + MekanismUtils.makeBoundingBlock(worldObj, getPos().add(x, 2, z), current); } } } @@ -40,18 +41,18 @@ public class TileEntityAdvancedSolarGenerator extends TileEntitySolarGenerator i @Override public void onBreak() { - worldObj.setBlockToAir(xCoord, yCoord+1, zCoord); + worldObj.setBlockToAir(getPos().add(0, 1, 0)); for(int x = -1; x <= 1; x++) { for(int z = -1; z <= 1; z++) { - worldObj.setBlockToAir(xCoord+x, yCoord+2, zCoord+z); + worldObj.setBlockToAir(getPos().add(x, 2, z)); } } invalidate(); - worldObj.setBlockToAir(xCoord, yCoord, zCoord); + worldObj.setBlockToAir(getPos()); } @Override diff --git a/src/main/java/mekanism/generators/common/tile/TileEntityBioGenerator.java b/src/main/java/mekanism/generators/common/tile/TileEntityBioGenerator.java index 99d74c5b9..b39376a59 100644 --- a/src/main/java/mekanism/generators/common/tile/TileEntityBioGenerator.java +++ b/src/main/java/mekanism/generators/common/tile/TileEntityBioGenerator.java @@ -184,9 +184,9 @@ public class TileEntityBioGenerator extends TileEntityGenerator implements IFlui } @Override - public int[] getSlotsForFace(int side) + public int[] getSlotsForFace(EnumFacing side) { - return EnumFacing.getFront(side) == MekanismUtils.getRight(facing) ? new int[] {1} : new int[] {0}; + return side == MekanismUtils.getRight(facing) ? new int[] {1} : new int[] {0}; } @Override @@ -243,7 +243,7 @@ public class TileEntityBioGenerator extends TileEntityGenerator implements IFlui @Override public int fill(EnumFacing from, FluidStack resource, boolean doFill) { - if(FluidRegistry.isFluidRegistered("bioethanol") && from != EnumFacing.getFront(facing)) + if(FluidRegistry.isFluidRegistered("bioethanol") && from != facing) { if(resource.getFluid() == FluidRegistry.getFluid("bioethanol")) { diff --git a/src/main/java/mekanism/generators/common/tile/TileEntityGasGenerator.java b/src/main/java/mekanism/generators/common/tile/TileEntityGasGenerator.java index b3f26a6f6..a5643f150 100644 --- a/src/main/java/mekanism/generators/common/tile/TileEntityGasGenerator.java +++ b/src/main/java/mekanism/generators/common/tile/TileEntityGasGenerator.java @@ -149,7 +149,7 @@ public class TileEntityGasGenerator extends TileEntityGenerator implements IGasH } @Override - public boolean canExtractItem(int slotID, ItemStack itemstack, int side) + public boolean canExtractItem(int slotID, ItemStack itemstack, EnumFacing side) { if(slotID == 1) { @@ -180,9 +180,9 @@ public class TileEntityGasGenerator extends TileEntityGenerator implements IGasH } @Override - public int[] getSlotsForFace(int side) + public int[] getSlotsForFace(EnumFacing side) { - return EnumFacing.getFront(side) == MekanismUtils.getRight(facing) ? new int[] {1} : new int[] {0}; + return side == MekanismUtils.getRight(facing) ? new int[] {1} : new int[] {0}; } @Override @@ -324,7 +324,7 @@ public class TileEntityGasGenerator extends TileEntityGenerator implements IGasH @Override public boolean canReceiveGas(EnumFacing side, Gas type) { - return FuelHandler.getFuel(type) != null && side != EnumFacing.getFront(facing); + return FuelHandler.getFuel(type) != null && side != facing; } @Override @@ -348,7 +348,7 @@ public class TileEntityGasGenerator extends TileEntityGenerator implements IGasH @Override public boolean canTubeConnect(EnumFacing side) { - return side != EnumFacing.getFront(facing); + return side != facing; } @Override diff --git a/src/main/java/mekanism/generators/common/tile/TileEntityGenerator.java b/src/main/java/mekanism/generators/common/tile/TileEntityGenerator.java index 93ac5d0d7..1d328561f 100644 --- a/src/main/java/mekanism/generators/common/tile/TileEntityGenerator.java +++ b/src/main/java/mekanism/generators/common/tile/TileEntityGenerator.java @@ -71,7 +71,7 @@ public abstract class TileEntityGenerator extends TileEntityNoisyElectricBlock i if(updateDelay == 0 && clientActive != isActive) { isActive = clientActive; - MekanismUtils.updateBlock(worldObj, xCoord, yCoord, zCoord); + MekanismUtils.updateBlock(worldObj, getPos()); } } @@ -110,7 +110,7 @@ public abstract class TileEntityGenerator extends TileEntityNoisyElectricBlock i @Override public EnumSet getOutputtingSides() { - return EnumSet.of(EnumFacing.getFront(facing)); + return EnumSet.of(facing); } /** @@ -157,7 +157,7 @@ public abstract class TileEntityGenerator extends TileEntityNoisyElectricBlock i { updateDelay = general.UPDATE_DELAY; isActive = clientActive; - MekanismUtils.updateBlock(worldObj, xCoord, yCoord, zCoord); + MekanismUtils.updateBlock(worldObj, getPos()); } } diff --git a/src/main/java/mekanism/generators/common/tile/TileEntityHeatGenerator.java b/src/main/java/mekanism/generators/common/tile/TileEntityHeatGenerator.java index 0dabb9fcf..9cb61306b 100644 --- a/src/main/java/mekanism/generators/common/tile/TileEntityHeatGenerator.java +++ b/src/main/java/mekanism/generators/common/tile/TileEntityHeatGenerator.java @@ -20,6 +20,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityFurnace; +import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidContainerRegistry; @@ -73,7 +74,7 @@ public class TileEntityHeatGenerator extends TileEntityGenerator implements IFlu } else if(fluid != null) { - if(fluid != null && fluid.getFluidID() == FluidRegistry.LAVA.getID()) + if(fluid != null && fluid.getFluid() == FluidRegistry.LAVA) { if(lavaTank.getFluid() == null || lavaTank.getFluid().amount+fluid.amount <= lavaTank.getCapacity()) { @@ -152,7 +153,7 @@ public class TileEntityHeatGenerator extends TileEntityGenerator implements IFlu { if(slotID == 0) { - return getFuel(itemstack) > 0 || (FluidContainerRegistry.getFluidForFilledItem(itemstack) != null && FluidContainerRegistry.getFluidForFilledItem(itemstack).getFluidID() == FluidRegistry.LAVA.getID()); + return getFuel(itemstack) > 0 || (FluidContainerRegistry.getFluidForFilledItem(itemstack) != null && FluidContainerRegistry.getFluidForFilledItem(itemstack).getFluid() == FluidRegistry.LAVA); } else if(slotID == 1) { @@ -191,7 +192,7 @@ public class TileEntityHeatGenerator extends TileEntityGenerator implements IFlu } @Override - public boolean canExtractItem(int slotID, ItemStack itemstack, int side) + public boolean canExtractItem(int slotID, ItemStack itemstack, EnumFacing side) { if(slotID == 1) { @@ -214,7 +215,7 @@ public class TileEntityHeatGenerator extends TileEntityGenerator implements IFlu { Coord4D coord = Coord4D.get(this).offset(side); - if(isLava(coord.xCoord, coord.yCoord, coord.zCoord)) + if(isLava(coord.getPos())) { lavaBoost++; } @@ -228,9 +229,9 @@ public class TileEntityHeatGenerator extends TileEntityGenerator implements IFlu return (generators.heatGenerationLava * lavaBoost) + netherBoost; } - private boolean isLava(int x, int y, int z) + private boolean isLava(BlockPos pos) { - return worldObj.getBlock(x, y, z) == Blocks.lava; + return worldObj.getBlockState(pos).getBlock() == Blocks.lava; } public int getFuel(ItemStack itemstack) @@ -244,9 +245,9 @@ public class TileEntityHeatGenerator extends TileEntityGenerator implements IFlu } @Override - public int[] getSlotsForFace(int side) + public int[] getSlotsForFace(EnumFacing side) { - return EnumFacing.getFront(side) == MekanismUtils.getRight(facing) ? new int[] {1} : new int[] {0}; + return side == MekanismUtils.getRight(facing) ? new int[] {1} : new int[] {0}; } /** @@ -334,7 +335,7 @@ public class TileEntityHeatGenerator extends TileEntityGenerator implements IFlu @Override public int fill(EnumFacing from, FluidStack resource, boolean doFill) { - if(resource.getFluidID() == FluidRegistry.LAVA.getID() && from != EnumFacing.getFront(facing)) + if(resource.getFluid() == FluidRegistry.LAVA && from != facing) { return lavaTank.fill(resource, doFill); } @@ -357,7 +358,7 @@ public class TileEntityHeatGenerator extends TileEntityGenerator implements IFlu @Override public boolean canFill(EnumFacing from, Fluid fluid) { - return fluid == FluidRegistry.LAVA && from != EnumFacing.getFront(facing); + return fluid == FluidRegistry.LAVA && from != facing; } @Override @@ -369,7 +370,7 @@ public class TileEntityHeatGenerator extends TileEntityGenerator implements IFlu @Override public FluidTankInfo[] getTankInfo(EnumFacing from) { - if(from == EnumFacing.getFront(facing)) + if(from == facing) { return PipeUtils.EMPTY; } diff --git a/src/main/java/mekanism/generators/common/tile/TileEntitySolarGenerator.java b/src/main/java/mekanism/generators/common/tile/TileEntitySolarGenerator.java index 73838b2d7..37d14460e 100644 --- a/src/main/java/mekanism/generators/common/tile/TileEntitySolarGenerator.java +++ b/src/main/java/mekanism/generators/common/tile/TileEntitySolarGenerator.java @@ -10,8 +10,8 @@ import mekanism.common.util.ChargeUtils; import mekanism.common.util.MekanismUtils; import micdoodle8.mods.galacticraft.api.world.ISolarLevel; import net.minecraft.item.ItemStack; -import net.minecraft.world.biome.BiomeGenDesert; import net.minecraft.util.EnumFacing; +import net.minecraft.world.biome.BiomeGenDesert; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -36,7 +36,7 @@ public class TileEntitySolarGenerator extends TileEntityGenerator } @Override - public int[] getSlotsForFace(int side) + public int[] getSlotsForFace(EnumFacing side) { return new int[] {0}; } @@ -63,7 +63,7 @@ public class TileEntitySolarGenerator extends TileEntityGenerator { ChargeUtils.charge(0, this); - if(worldObj.isDaytime() && ((!worldObj.isRaining() && !worldObj.isThundering()) || isDesert()) && !worldObj.provider.hasNoSky && worldObj.canBlockSeeTheSky(xCoord, yCoord+1, zCoord)) + if(worldObj.isDaytime() && ((!worldObj.isRaining() && !worldObj.isThundering()) || isDesert()) && !worldObj.provider.getHasNoSky() && worldObj.canSeeSky(getPos().add(0, 4, 0))) { seesSun = true; } @@ -84,11 +84,11 @@ public class TileEntitySolarGenerator extends TileEntityGenerator public boolean isDesert() { - return worldObj.provider.getBiomeGenForCoords(xCoord, zCoord).getBiomeClass() == BiomeGenDesert.class; + return worldObj.provider.getBiomeGenForCoords(getPos()).getBiomeClass() == BiomeGenDesert.class; } @Override - public boolean canExtractItem(int slotID, ItemStack itemstack, int side) + public boolean canExtractItem(int slotID, ItemStack itemstack, EnumFacing side) { if(slotID == 0) { diff --git a/src/main/java/mekanism/generators/common/tile/TileEntityWindGenerator.java b/src/main/java/mekanism/generators/common/tile/TileEntityWindGenerator.java index 1938b2d24..2f6ffd7c1 100644 --- a/src/main/java/mekanism/generators/common/tile/TileEntityWindGenerator.java +++ b/src/main/java/mekanism/generators/common/tile/TileEntityWindGenerator.java @@ -44,7 +44,7 @@ public class TileEntityWindGenerator extends TileEntityGenerator implements IBou /** Determines the current output multiplier, taking sky visibility and height into account. **/ public float getMultiplier() { - if(worldObj.canBlockSeeTheSky(xCoord, yCoord+4, zCoord)) + if(worldObj.canSeeSky(getPos().add(0, 4, 0))) { final float minY = (float)generators.windGenerationMinY; final float maxY = (float)generators.windGenerationMaxY; @@ -54,7 +54,7 @@ public class TileEntityWindGenerator extends TileEntityGenerator implements IBou final float slope = (maxG - minG) / (maxY - minY); final float intercept = minG - slope * minY; - final float clampedY = Math.min(maxY, Math.max(minY, (float)(yCoord+4))); + final float clampedY = Math.min(maxY, Math.max(minY, (float)(getPos().getY()+4))); final float toGen = slope * clampedY + intercept; return toGen / minG; @@ -108,22 +108,22 @@ public class TileEntityWindGenerator extends TileEntityGenerator implements IBou @Override public void onPlace() { - Coord4D pos = Coord4D.get(this); - MekanismUtils.makeBoundingBlock(worldObj, pos.offset(EnumFacing.UP, 1), pos); - MekanismUtils.makeBoundingBlock(worldObj, pos.offset(EnumFacing.UP, 2), pos); - MekanismUtils.makeBoundingBlock(worldObj, pos.offset(EnumFacing.UP, 3), pos); - MekanismUtils.makeBoundingBlock(worldObj, pos.offset(EnumFacing.UP, 4), pos); + Coord4D current = Coord4D.get(this); + MekanismUtils.makeBoundingBlock(worldObj, getPos().offset(EnumFacing.UP, 1), current); + MekanismUtils.makeBoundingBlock(worldObj, getPos().offset(EnumFacing.UP, 2), current); + MekanismUtils.makeBoundingBlock(worldObj, getPos().offset(EnumFacing.UP, 3), current); + MekanismUtils.makeBoundingBlock(worldObj, getPos().offset(EnumFacing.UP, 4), current); } @Override public void onBreak() { - worldObj.setBlockToAir(xCoord, yCoord+1, zCoord); - worldObj.setBlockToAir(xCoord, yCoord+2, zCoord); - worldObj.setBlockToAir(xCoord, yCoord+3, zCoord); - worldObj.setBlockToAir(xCoord, yCoord+4, zCoord); + worldObj.setBlockToAir(getPos().add(0, 1, 0)); + worldObj.setBlockToAir(getPos().add(0, 2, 0)); + worldObj.setBlockToAir(getPos().add(0, 3, 0)); + worldObj.setBlockToAir(getPos().add(0, 4, 0)); - worldObj.setBlockToAir(xCoord, yCoord, zCoord); + worldObj.setBlockToAir(getPos()); } @Override diff --git a/src/main/java/mekanism/generators/common/tile/reactor/TileEntityReactorController.java b/src/main/java/mekanism/generators/common/tile/reactor/TileEntityReactorController.java index 2d51badcb..60065d93e 100644 --- a/src/main/java/mekanism/generators/common/tile/reactor/TileEntityReactorController.java +++ b/src/main/java/mekanism/generators/common/tile/reactor/TileEntityReactorController.java @@ -6,7 +6,6 @@ import java.util.ArrayList; import mekanism.api.Coord4D; import mekanism.api.MekanismConfig.client; -import mekanism.api.Pos3D; import mekanism.api.gas.GasRegistry; import mekanism.api.gas.GasStack; import mekanism.api.gas.GasTank; @@ -25,6 +24,7 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.ResourceLocation; +import net.minecraft.util.Vec3; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; @@ -263,7 +263,7 @@ public class TileEntityReactorController extends TileEntityReactorBlock implemen if(getReactor() == null) { setReactor(new FusionReactor(this)); - MekanismUtils.updateBlock(worldObj, xCoord, yCoord, zCoord); + MekanismUtils.updateBlock(worldObj, getPos()); } ((FusionReactor)getReactor()).formed = true; @@ -282,7 +282,7 @@ public class TileEntityReactorController extends TileEntityReactorBlock implemen else if(getReactor() != null) { setReactor(null); - MekanismUtils.updateBlock(worldObj, xCoord, yCoord, zCoord); + MekanismUtils.updateBlock(worldObj, getPos()); } } @@ -329,7 +329,7 @@ public class TileEntityReactorController extends TileEntityReactorBlock implemen { if(box == null) { - box = AxisAlignedBB.getBoundingBox(xCoord-1, yCoord-3, zCoord-1, xCoord+2, yCoord, zCoord+2); + box = AxisAlignedBB.fromBounds(getPos().getX()-1, getPos().getY()-3, getPos().getZ()-1, getPos().getX()+2, getPos().getY(), getPos().getZ()+2); } return box; @@ -372,9 +372,9 @@ public class TileEntityReactorController extends TileEntityReactorBlock implemen @Override @SideOnly(Side.CLIENT) - public Pos3D getSoundPosition() + public Vec3 getSoundPosition() { - return new Pos3D(xCoord+0.5, yCoord+0.5, zCoord+0.5); + return new Vec3(getPos()).addVector(0.5, 0.5, 0.5); } @Override diff --git a/src/main/java/mekanism/generators/common/tile/reactor/TileEntityReactorLogicAdapter.java b/src/main/java/mekanism/generators/common/tile/reactor/TileEntityReactorLogicAdapter.java index ec97de5fd..8d7696989 100644 --- a/src/main/java/mekanism/generators/common/tile/reactor/TileEntityReactorLogicAdapter.java +++ b/src/main/java/mekanism/generators/common/tile/reactor/TileEntityReactorLogicAdapter.java @@ -36,7 +36,7 @@ public class TileEntityReactorLogicAdapter extends TileEntityReactorBlock implem if(outputting != prevOutputting) { - worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, getBlockType()); + worldObj.notifyBlocksOfNeighborChange(getPos(), getBlockType()); } prevOutputting = outputting; diff --git a/src/main/java/mekanism/generators/common/tile/reactor/TileEntityReactorPort.java b/src/main/java/mekanism/generators/common/tile/reactor/TileEntityReactorPort.java index 1501d9abd..59210a33e 100644 --- a/src/main/java/mekanism/generators/common/tile/reactor/TileEntityReactorPort.java +++ b/src/main/java/mekanism/generators/common/tile/reactor/TileEntityReactorPort.java @@ -215,10 +215,7 @@ public class TileEntityReactorPort extends TileEntityReactorBlock implements IFl @Override public EnumSet getOutputtingSides() { - EnumSet set = EnumSet.allOf(EnumFacing.class); - set.remove(EnumFacing.null); - - return set; + return EnumSet.allOf(EnumFacing.class); } @Override @@ -333,7 +330,7 @@ public class TileEntityReactorPort extends TileEntityReactorBlock implements IFl } @Override - public int[] getSlotsForFace(int side) + public int[] getSlotsForFace(EnumFacing side) { return getReactor() != null && getReactor().isFormed() ? new int[] {0} : InventoryUtils.EMPTY; } @@ -352,7 +349,7 @@ public class TileEntityReactorPort extends TileEntityReactorBlock implements IFl } @Override - public boolean canExtractItem(int slotID, ItemStack itemstack, int side) + public boolean canExtractItem(int slotID, ItemStack itemstack, EnumFacing side) { if(getReactor() != null && getReactor().isFormed() && itemstack.getItem() instanceof ItemHohlraum) { diff --git a/src/main/java/mekanism/generators/common/tile/turbine/TileEntityTurbineCasing.java b/src/main/java/mekanism/generators/common/tile/turbine/TileEntityTurbineCasing.java index 43ae0b29d..981900f81 100644 --- a/src/main/java/mekanism/generators/common/tile/turbine/TileEntityTurbineCasing.java +++ b/src/main/java/mekanism/generators/common/tile/turbine/TileEntityTurbineCasing.java @@ -10,6 +10,7 @@ import mekanism.api.MekanismConfig.generators; import mekanism.api.Range4D; import mekanism.api.energy.IStrictEnergyStorage; import mekanism.common.Mekanism; +import mekanism.common.PacketHandler; import mekanism.common.multiblock.MultiblockCache; import mekanism.common.multiblock.MultiblockManager; import mekanism.common.multiblock.UpdateProtocol; @@ -107,7 +108,7 @@ public class TileEntityTurbineCasing extends TileEntityMultiblock getOutputtingSides() + public EnumSet getOutputtingSides() { if(structure != null) { - EnumSet set = EnumSet.allOf(ForgeDirection.class); - set.remove(ForgeDirection.UNKNOWN); + EnumSet set = EnumSet.allOf(EnumFacing.class); - for(ForgeDirection side : ForgeDirection.VALID_DIRECTIONS) + for(EnumFacing side : EnumFacing.VALUES) { - if(structure.locations.contains(Coord4D.get(this).getFromSide(side))) + if(structure.locations.contains(Coord4D.get(this).offset(side))) { set.remove(side); } @@ -84,19 +83,13 @@ public class TileEntityTurbineValve extends TileEntityTurbineCasing implements I return set; } - return EnumSet.noneOf(ForgeDirection.class); + return EnumSet.noneOf(EnumFacing.class); } @Override - public EnumSet getConsumingSides() + public EnumSet getConsumingSides() { - return EnumSet.noneOf(ForgeDirection.class); - } - - @Override - public boolean canUpdate() - { - return true; + return EnumSet.noneOf(EnumFacing.class); } @Method(modid = "IC2") @@ -104,7 +97,7 @@ public class TileEntityTurbineValve extends TileEntityTurbineCasing implements I { if(!worldObj.isRemote) { - TileEntity registered = EnergyNet.instance.getTileEntity(worldObj, xCoord, yCoord, zCoord); + TileEntity registered = EnergyNet.instance.getTileEntity(worldObj, getPos()); if(registered != this) { @@ -126,7 +119,7 @@ public class TileEntityTurbineValve extends TileEntityTurbineCasing implements I { if(!worldObj.isRemote) { - TileEntity registered = EnergyNet.instance.getTileEntity(worldObj, xCoord, yCoord, zCoord); + TileEntity registered = EnergyNet.instance.getTileEntity(worldObj, getPos()); if(registered instanceof IEnergyTile) { @@ -175,13 +168,13 @@ public class TileEntityTurbineValve extends TileEntityTurbineCasing implements I } @Override - public int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate) + public int receiveEnergy(EnumFacing from, int maxReceive, boolean simulate) { return 0; } @Override - public int extractEnergy(ForgeDirection from, int maxExtract, boolean simulate) + public int extractEnergy(EnumFacing from, int maxExtract, boolean simulate) { if(getOutputtingSides().contains(from)) { @@ -199,19 +192,19 @@ public class TileEntityTurbineValve extends TileEntityTurbineCasing implements I } @Override - public boolean canConnectEnergy(ForgeDirection from) + public boolean canConnectEnergy(EnumFacing from) { return structure != null; } @Override - public int getEnergyStored(ForgeDirection from) + public int getEnergyStored(EnumFacing from) { return (int)Math.round(getEnergy()*general.TO_TE); } @Override - public int getMaxEnergyStored(ForgeDirection from) + public int getMaxEnergyStored(EnumFacing from) { return (int)Math.round(getMaxEnergy()*general.TO_TE); } @@ -246,27 +239,27 @@ public class TileEntityTurbineValve extends TileEntityTurbineCasing implements I @Override @Method(modid = "IC2") - public boolean isTeleporterCompatible(ForgeDirection side) + public boolean isTeleporterCompatible(EnumFacing side) { return canOutputTo(side); } @Override - public boolean canOutputTo(ForgeDirection side) + public boolean canOutputTo(EnumFacing side) { return getOutputtingSides().contains(side); } @Override @Method(modid = "IC2") - public boolean acceptsEnergyFrom(TileEntity emitter, ForgeDirection direction) + public boolean acceptsEnergyFrom(TileEntity emitter, EnumFacing direction) { return false; } @Override @Method(modid = "IC2") - public boolean emitsEnergyTo(TileEntity receiver, ForgeDirection direction) + public boolean emitsEnergyTo(TileEntity receiver, EnumFacing direction) { return getOutputtingSides().contains(direction) && receiver instanceof IEnergyConductor; } @@ -307,7 +300,7 @@ public class TileEntityTurbineValve extends TileEntityTurbineCasing implements I } @Override - public boolean canReceiveEnergy(ForgeDirection side) + public boolean canReceiveEnergy(EnumFacing side) { return false; } @@ -321,7 +314,7 @@ public class TileEntityTurbineValve extends TileEntityTurbineCasing implements I @Override @Method(modid = "IC2") - public double injectEnergy(ForgeDirection direction, double amount, double voltage) + public double injectEnergy(EnumFacing direction, double amount, double voltage) { return amount; } @@ -338,19 +331,19 @@ public class TileEntityTurbineValve extends TileEntityTurbineCasing implements I } @Override - public double transferEnergyToAcceptor(ForgeDirection side, double amount) + public double transferEnergyToAcceptor(EnumFacing side, double amount) { return 0; } @Override - public FluidTankInfo[] getTankInfo(ForgeDirection from) + public FluidTankInfo[] getTankInfo(EnumFacing from) { return ((!worldObj.isRemote && structure != null) || (worldObj.isRemote && clientHasStructure)) ? new FluidTankInfo[] {fluidTank.getInfo()} : PipeUtils.EMPTY; } @Override - public int fill(ForgeDirection from, FluidStack resource, boolean doFill) + public int fill(EnumFacing from, FluidStack resource, boolean doFill) { int filled = fluidTank.fill(resource, doFill); @@ -363,7 +356,7 @@ public class TileEntityTurbineValve extends TileEntityTurbineCasing implements I } @Override - public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) + public FluidStack drain(EnumFacing from, FluidStack resource, boolean doDrain) { if(structure != null && structure.fluidStored != null) { @@ -377,7 +370,7 @@ public class TileEntityTurbineValve extends TileEntityTurbineCasing implements I } @Override - public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) + public FluidStack drain(EnumFacing from, int maxDrain, boolean doDrain) { if(structure != null) { @@ -388,7 +381,7 @@ public class TileEntityTurbineValve extends TileEntityTurbineCasing implements I } @Override - public boolean canFill(ForgeDirection from, Fluid fluid) + public boolean canFill(EnumFacing from, Fluid fluid) { if(fluid == FluidRegistry.getFluid("steam")) { @@ -399,7 +392,7 @@ public class TileEntityTurbineValve extends TileEntityTurbineCasing implements I } @Override - public boolean canDrain(ForgeDirection from, Fluid fluid) + public boolean canDrain(EnumFacing from, Fluid fluid) { return ((!worldObj.isRemote && structure != null) || (worldObj.isRemote && clientHasStructure)); } diff --git a/src/main/java/mekanism/tools/client/ToolsClientProxy.java b/src/main/java/mekanism/tools/client/ToolsClientProxy.java index f91444424..7f6b6c1f5 100644 --- a/src/main/java/mekanism/tools/client/ToolsClientProxy.java +++ b/src/main/java/mekanism/tools/client/ToolsClientProxy.java @@ -8,7 +8,7 @@ import net.minecraft.item.Item; public class ToolsClientProxy extends ToolsCommonProxy { @Override - public void registerRenderInformation() + public void registerItemRenders() { //Vanilla Material Paxels registerItemRender(ToolsItems.WoodPaxel); diff --git a/src/main/java/mekanism/tools/common/MekanismTools.java b/src/main/java/mekanism/tools/common/MekanismTools.java index acc848cb4..a676d7046 100644 --- a/src/main/java/mekanism/tools/common/MekanismTools.java +++ b/src/main/java/mekanism/tools/common/MekanismTools.java @@ -79,7 +79,6 @@ public class MekanismTools implements IModule //Load the proxy proxy.loadConfiguration(); - proxy.registerRenderInformation(); //Load this module addRecipes(); diff --git a/src/main/java/mekanism/tools/common/ToolsCommonProxy.java b/src/main/java/mekanism/tools/common/ToolsCommonProxy.java index 2fb3094f4..dfdbd39b9 100644 --- a/src/main/java/mekanism/tools/common/ToolsCommonProxy.java +++ b/src/main/java/mekanism/tools/common/ToolsCommonProxy.java @@ -18,5 +18,5 @@ public class ToolsCommonProxy } } - public void registerRenderInformation() {} + public void registerItemRenders() {} } diff --git a/src/main/java/mekanism/tools/common/ToolsItems.java b/src/main/java/mekanism/tools/common/ToolsItems.java index 3c9e42ad9..ae67ba630 100644 --- a/src/main/java/mekanism/tools/common/ToolsItems.java +++ b/src/main/java/mekanism/tools/common/ToolsItems.java @@ -1,6 +1,5 @@ package mekanism.tools.common; -import mekanism.common.Mekanism; import mekanism.tools.item.ItemMekanismArmor; import mekanism.tools.item.ItemMekanismAxe; import mekanism.tools.item.ItemMekanismHoe; @@ -108,60 +107,60 @@ public class ToolsItems GlowstoneShovel = new ItemMekanismShovel(MekanismTools.toolGLOWSTONE).setUnlocalizedName("GlowstoneShovel"); GlowstoneHoe = new ItemMekanismHoe(MekanismTools.toolGLOWSTONE).setUnlocalizedName("GlowstoneHoe"); GlowstoneSword = new ItemMekanismSword(MekanismTools.toolGLOWSTONE).setUnlocalizedName("GlowstoneSword"); - GlowstoneHelmet = new ItemMekanismArmor(MekanismTools.armorGLOWSTONE, Mekanism.proxy.getArmorIndex("glowstone"), 0).setUnlocalizedName("GlowstoneHelmet"); - GlowstoneChestplate = new ItemMekanismArmor(MekanismTools.armorGLOWSTONE, Mekanism.proxy.getArmorIndex("glowstone"), 1).setUnlocalizedName("GlowstoneChestplate"); - GlowstoneLeggings = new ItemMekanismArmor(MekanismTools.armorGLOWSTONE, Mekanism.proxy.getArmorIndex("glowstone"), 2).setUnlocalizedName("GlowstoneLeggings"); - GlowstoneBoots = new ItemMekanismArmor(MekanismTools.armorGLOWSTONE, Mekanism.proxy.getArmorIndex("glowstone"), 3).setUnlocalizedName("GlowstoneBoots"); + GlowstoneHelmet = new ItemMekanismArmor(MekanismTools.armorGLOWSTONE, 0).setUnlocalizedName("GlowstoneHelmet"); + GlowstoneChestplate = new ItemMekanismArmor(MekanismTools.armorGLOWSTONE, 1).setUnlocalizedName("GlowstoneChestplate"); + GlowstoneLeggings = new ItemMekanismArmor(MekanismTools.armorGLOWSTONE, 2).setUnlocalizedName("GlowstoneLeggings"); + GlowstoneBoots = new ItemMekanismArmor(MekanismTools.armorGLOWSTONE, 3).setUnlocalizedName("GlowstoneBoots"); BronzePaxel = new ItemMekanismPaxel(MekanismTools.toolBRONZE2).setUnlocalizedName("BronzePaxel"); BronzePickaxe = new ItemMekanismPickaxe(MekanismTools.toolBRONZE).setUnlocalizedName("BronzePickaxe"); BronzeAxe = new ItemMekanismAxe(MekanismTools.toolBRONZE).setUnlocalizedName("BronzeAxe"); BronzeShovel = new ItemMekanismShovel(MekanismTools.toolBRONZE).setUnlocalizedName("BronzeShovel"); BronzeHoe = new ItemMekanismHoe(MekanismTools.toolBRONZE).setUnlocalizedName("BronzeHoe"); BronzeSword = new ItemMekanismSword(MekanismTools.toolBRONZE).setUnlocalizedName("BronzeSword"); - BronzeHelmet = (new ItemMekanismArmor(MekanismTools.armorBRONZE, Mekanism.proxy.getArmorIndex("bronze"), 0)).setUnlocalizedName("BronzeHelmet"); - BronzeChestplate = (new ItemMekanismArmor(MekanismTools.armorBRONZE, Mekanism.proxy.getArmorIndex("bronze"), 1)).setUnlocalizedName("BronzeChestplate"); - BronzeLeggings = (new ItemMekanismArmor(MekanismTools.armorBRONZE, Mekanism.proxy.getArmorIndex("bronze"), 2)).setUnlocalizedName("BronzeLeggings"); - BronzeBoots = (new ItemMekanismArmor(MekanismTools.armorBRONZE, Mekanism.proxy.getArmorIndex("bronze"), 3)).setUnlocalizedName("BronzeBoots"); + BronzeHelmet = (new ItemMekanismArmor(MekanismTools.armorBRONZE, 0)).setUnlocalizedName("BronzeHelmet"); + BronzeChestplate = (new ItemMekanismArmor(MekanismTools.armorBRONZE, 1)).setUnlocalizedName("BronzeChestplate"); + BronzeLeggings = (new ItemMekanismArmor(MekanismTools.armorBRONZE, 2)).setUnlocalizedName("BronzeLeggings"); + BronzeBoots = (new ItemMekanismArmor(MekanismTools.armorBRONZE, 3)).setUnlocalizedName("BronzeBoots"); OsmiumPaxel = new ItemMekanismPaxel(MekanismTools.toolOSMIUM2).setUnlocalizedName("OsmiumPaxel"); OsmiumPickaxe = new ItemMekanismPickaxe(MekanismTools.toolOSMIUM).setUnlocalizedName("OsmiumPickaxe"); OsmiumAxe = new ItemMekanismAxe(MekanismTools.toolOSMIUM).setUnlocalizedName("OsmiumAxe"); OsmiumShovel = new ItemMekanismShovel(MekanismTools.toolOSMIUM).setUnlocalizedName("OsmiumShovel"); OsmiumHoe = new ItemMekanismHoe(MekanismTools.toolOSMIUM).setUnlocalizedName("OsmiumHoe"); OsmiumSword = new ItemMekanismSword(MekanismTools.toolOSMIUM).setUnlocalizedName("OsmiumSword"); - OsmiumHelmet = (new ItemMekanismArmor(MekanismTools.armorOSMIUM, Mekanism.proxy.getArmorIndex("osmium"), 0)).setUnlocalizedName("OsmiumHelmet"); - OsmiumChestplate = (new ItemMekanismArmor(MekanismTools.armorOSMIUM, Mekanism.proxy.getArmorIndex("osmium"), 1)).setUnlocalizedName("OsmiumChestplate"); - OsmiumLeggings = (new ItemMekanismArmor(MekanismTools.armorOSMIUM, Mekanism.proxy.getArmorIndex("osmium"), 2)).setUnlocalizedName("OsmiumLeggings"); - OsmiumBoots = (new ItemMekanismArmor(MekanismTools.armorOSMIUM, Mekanism.proxy.getArmorIndex("osmium"), 3)).setUnlocalizedName("OsmiumBoots"); + OsmiumHelmet = (new ItemMekanismArmor(MekanismTools.armorOSMIUM, 0)).setUnlocalizedName("OsmiumHelmet"); + OsmiumChestplate = (new ItemMekanismArmor(MekanismTools.armorOSMIUM, 1)).setUnlocalizedName("OsmiumChestplate"); + OsmiumLeggings = (new ItemMekanismArmor(MekanismTools.armorOSMIUM, 2)).setUnlocalizedName("OsmiumLeggings"); + OsmiumBoots = (new ItemMekanismArmor(MekanismTools.armorOSMIUM, 3)).setUnlocalizedName("OsmiumBoots"); ObsidianPaxel = new ItemMekanismPaxel(MekanismTools.toolOBSIDIAN2).setUnlocalizedName("ObsidianPaxel"); ObsidianPickaxe = new ItemMekanismPickaxe(MekanismTools.toolOBSIDIAN).setUnlocalizedName("ObsidianPickaxe"); ObsidianAxe = new ItemMekanismAxe(MekanismTools.toolOBSIDIAN).setUnlocalizedName("ObsidianAxe"); ObsidianShovel = new ItemMekanismShovel(MekanismTools.toolOBSIDIAN).setUnlocalizedName("ObsidianShovel"); ObsidianHoe = new ItemMekanismHoe(MekanismTools.toolOBSIDIAN).setUnlocalizedName("ObsidianHoe"); ObsidianSword = new ItemMekanismSword(MekanismTools.toolOBSIDIAN).setUnlocalizedName("ObsidianSword"); - ObsidianHelmet = (new ItemMekanismArmor(MekanismTools.armorOBSIDIAN, Mekanism.proxy.getArmorIndex("obsidian"), 0)).setUnlocalizedName("ObsidianHelmet"); - ObsidianChestplate = (new ItemMekanismArmor(MekanismTools.armorOBSIDIAN, Mekanism.proxy.getArmorIndex("obsidian"), 1)).setUnlocalizedName("ObsidianChestplate"); - ObsidianLeggings = (new ItemMekanismArmor(MekanismTools.armorOBSIDIAN, Mekanism.proxy.getArmorIndex("obsidian"), 2)).setUnlocalizedName("ObsidianLeggings"); - ObsidianBoots = (new ItemMekanismArmor(MekanismTools.armorOBSIDIAN, Mekanism.proxy.getArmorIndex("obsidian"), 3)).setUnlocalizedName("ObsidianBoots"); + ObsidianHelmet = (new ItemMekanismArmor(MekanismTools.armorOBSIDIAN, 0)).setUnlocalizedName("ObsidianHelmet"); + ObsidianChestplate = (new ItemMekanismArmor(MekanismTools.armorOBSIDIAN, 1)).setUnlocalizedName("ObsidianChestplate"); + ObsidianLeggings = (new ItemMekanismArmor(MekanismTools.armorOBSIDIAN, 2)).setUnlocalizedName("ObsidianLeggings"); + ObsidianBoots = (new ItemMekanismArmor(MekanismTools.armorOBSIDIAN, 3)).setUnlocalizedName("ObsidianBoots"); LazuliPaxel = new ItemMekanismPaxel(MekanismTools.toolLAZULI2).setUnlocalizedName("LazuliPaxel"); LazuliPickaxe = new ItemMekanismPickaxe(MekanismTools.toolLAZULI).setUnlocalizedName("LazuliPickaxe"); LazuliAxe = new ItemMekanismAxe(MekanismTools.toolLAZULI).setUnlocalizedName("LazuliAxe"); LazuliShovel = new ItemMekanismShovel(MekanismTools.toolLAZULI).setUnlocalizedName("LazuliShovel"); LazuliHoe = new ItemMekanismHoe(MekanismTools.toolLAZULI).setUnlocalizedName("LazuliHoe"); LazuliSword = new ItemMekanismSword(MekanismTools.toolLAZULI).setUnlocalizedName("LazuliSword"); - LazuliHelmet = (new ItemMekanismArmor(MekanismTools.armorLAZULI, Mekanism.proxy.getArmorIndex("lazuli"), 0)).setUnlocalizedName("LazuliHelmet"); - LazuliChestplate = (new ItemMekanismArmor(MekanismTools.armorLAZULI, Mekanism.proxy.getArmorIndex("lazuli"), 1)).setUnlocalizedName("LazuliChestplate"); - LazuliLeggings = (new ItemMekanismArmor(MekanismTools.armorLAZULI, Mekanism.proxy.getArmorIndex("lazuli"), 2)).setUnlocalizedName("LazuliLeggings"); - LazuliBoots = (new ItemMekanismArmor(MekanismTools.armorLAZULI, Mekanism.proxy.getArmorIndex("lazuli"), 3)).setUnlocalizedName("LazuliBoots"); + LazuliHelmet = (new ItemMekanismArmor(MekanismTools.armorLAZULI, 0)).setUnlocalizedName("LazuliHelmet"); + LazuliChestplate = (new ItemMekanismArmor(MekanismTools.armorLAZULI, 1)).setUnlocalizedName("LazuliChestplate"); + LazuliLeggings = (new ItemMekanismArmor(MekanismTools.armorLAZULI, 2)).setUnlocalizedName("LazuliLeggings"); + LazuliBoots = (new ItemMekanismArmor(MekanismTools.armorLAZULI, 3)).setUnlocalizedName("LazuliBoots"); SteelPaxel = new ItemMekanismPaxel(MekanismTools.toolSTEEL2).setUnlocalizedName("SteelPaxel"); SteelPickaxe = new ItemMekanismPickaxe(MekanismTools.toolSTEEL).setUnlocalizedName("SteelPickaxe"); SteelAxe = new ItemMekanismAxe(MekanismTools.toolSTEEL).setUnlocalizedName("SteelAxe"); SteelShovel = new ItemMekanismShovel(MekanismTools.toolSTEEL).setUnlocalizedName("SteelShovel"); SteelHoe = new ItemMekanismHoe(MekanismTools.toolSTEEL).setUnlocalizedName("SteelHoe"); SteelSword = new ItemMekanismSword(MekanismTools.toolSTEEL).setUnlocalizedName("SteelSword"); - SteelHelmet = new ItemMekanismArmor(MekanismTools.armorSTEEL, Mekanism.proxy.getArmorIndex("steel"), 0).setUnlocalizedName("SteelHelmet"); - SteelChestplate = new ItemMekanismArmor(MekanismTools.armorSTEEL, Mekanism.proxy.getArmorIndex("steel"), 1).setUnlocalizedName("SteelChestplate"); - SteelLeggings = new ItemMekanismArmor(MekanismTools.armorSTEEL, Mekanism.proxy.getArmorIndex("steel"), 2).setUnlocalizedName("SteelLeggings"); - SteelBoots = new ItemMekanismArmor(MekanismTools.armorSTEEL, Mekanism.proxy.getArmorIndex("steel"), 3).setUnlocalizedName("SteelBoots"); + SteelHelmet = new ItemMekanismArmor(MekanismTools.armorSTEEL, 0).setUnlocalizedName("SteelHelmet"); + SteelChestplate = new ItemMekanismArmor(MekanismTools.armorSTEEL, 1).setUnlocalizedName("SteelChestplate"); + SteelLeggings = new ItemMekanismArmor(MekanismTools.armorSTEEL, 2).setUnlocalizedName("SteelLeggings"); + SteelBoots = new ItemMekanismArmor(MekanismTools.armorSTEEL, 3).setUnlocalizedName("SteelBoots"); } public static void setHarvestLevels() @@ -290,5 +289,7 @@ public class ToolsItems GameRegistry.registerItem(SteelChestplate, "SteelChestplate"); GameRegistry.registerItem(SteelLeggings, "SteelLeggings"); GameRegistry.registerItem(SteelBoots, "SteelBoots"); + + MekanismTools.proxy.registerItemRenders(); } } diff --git a/src/main/java/mekanism/tools/item/ItemMekanismArmor.java b/src/main/java/mekanism/tools/item/ItemMekanismArmor.java index 4c969acb6..83cf2d13c 100644 --- a/src/main/java/mekanism/tools/item/ItemMekanismArmor.java +++ b/src/main/java/mekanism/tools/item/ItemMekanismArmor.java @@ -21,9 +21,9 @@ import net.minecraftforge.fml.relauncher.SideOnly; public class ItemMekanismArmor extends ItemArmor { - public ItemMekanismArmor(ArmorMaterial enumarmormaterial, int renderIndex, int armorType) + public ItemMekanismArmor(ArmorMaterial enumarmormaterial, int renderIndex) { - super(enumarmormaterial, renderIndex, armorType); + super(enumarmormaterial, renderIndex, 0); setCreativeTab(Mekanism.tabMekanism); } @@ -33,14 +33,6 @@ public class ItemMekanismArmor extends ItemArmor list.add(LangUtils.localize("tooltip.hp") + ": " + (itemstack.getMaxDamage() - itemstack.getItemDamage())); } -/* - @Override - public void registerIcons(IIconRegister register) - { - itemIcon = register.registerIcon("mekanism:" + getUnlocalizedName().replace("item.", "")); - } -*/ - @Override public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { diff --git a/src/main/java/mekanism/tools/item/ItemMekanismHoe.java b/src/main/java/mekanism/tools/item/ItemMekanismHoe.java index 8223f8539..b0075edf6 100644 --- a/src/main/java/mekanism/tools/item/ItemMekanismHoe.java +++ b/src/main/java/mekanism/tools/item/ItemMekanismHoe.java @@ -6,7 +6,6 @@ import mekanism.api.util.StackUtils; import mekanism.common.item.ItemMekanism; import mekanism.common.util.LangUtils; import net.minecraft.block.Block; -import net.minecraft.block.state.BlockState; import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; diff --git a/src/main/java/mekanism/tools/item/ItemMekanismPaxel.java b/src/main/java/mekanism/tools/item/ItemMekanismPaxel.java index 234d7e973..efea0a048 100644 --- a/src/main/java/mekanism/tools/item/ItemMekanismPaxel.java +++ b/src/main/java/mekanism/tools/item/ItemMekanismPaxel.java @@ -2,7 +2,6 @@ package mekanism.tools.item; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.block.state.BlockState; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; diff --git a/src/main/resources/assets/mekanism/blockstates/BoundingBlock.json b/src/main/resources/assets/mekanism/blockstates/BoundingBlock.json new file mode 100644 index 000000000..0882267ad --- /dev/null +++ b/src/main/resources/assets/mekanism/blockstates/BoundingBlock.json @@ -0,0 +1,15 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "mekanism:nothing" + }, + "variants": { + "normal": [{}], + "advanced": { + "true": {}, + "false": {} + }, + "inventory": [{}] + } +} + diff --git a/src/main/resources/assets/mekanism/blockstates/EnergyCube.json b/src/main/resources/assets/mekanism/blockstates/EnergyCube.json index 4731325db..289d27d9a 100644 --- a/src/main/resources/assets/mekanism/blockstates/EnergyCube.json +++ b/src/main/resources/assets/mekanism/blockstates/EnergyCube.json @@ -1,7 +1,10 @@ { "forge_marker": 1, "defaults": { - "model": "mekanism:energy_cube" + "model": "mekanism:energy_cube", + "textures": { + "all": "mekanism:blocks/models/energy_cube" + } }, "variants": { "facing": { @@ -13,11 +16,11 @@ "west": {"y": -90} }, "tier": { - "basic": {"textures": {"all": "mekanism:blocks/models/energy_cube"}}, - "advanced": {"textures": {"all": "mekanism:blocks/models/energy_cube"}}, - "elite": {"textures": {"all": "mekanism:blocks/models/energy_cube"}}, - "ultimate": {"textures": {"all": "mekanism:blocks/models/energy_cube"}}, - "creative": {"textures": {"all": "mekanism:blocks/models/energy_cube"}} + "basic": {}, + "advanced": {}, + "elite": {}, + "ultimate": {}, + "creative": {} }, "inventory": [{}] } diff --git a/src/main/resources/assets/mekanism/blockstates/OreBlock.json b/src/main/resources/assets/mekanism/blockstates/OreBlock.json index 8589863b0..6b0c4343f 100644 --- a/src/main/resources/assets/mekanism/blockstates/OreBlock.json +++ b/src/main/resources/assets/mekanism/blockstates/OreBlock.json @@ -1,7 +1,7 @@ { "forge_marker": 1, "defaults": { - "model": "cube_all" + "model": "mekanism:basic_cube" }, "variants": { "type": { diff --git a/src/main/resources/assets/mekanism/blockstates/PlasticFence.json b/src/main/resources/assets/mekanism/blockstates/PlasticFence.json index 9755c3c56..e4caedf61 100755 --- a/src/main/resources/assets/mekanism/blockstates/PlasticFence.json +++ b/src/main/resources/assets/mekanism/blockstates/PlasticFence.json @@ -15,6 +15,20 @@ "east=true,north=false,south=true,west=true": { "model": "mekanism:plastic_fence_nse", "y": 90, "uvlock": true }, "east=false,north=true,south=true,west=true": { "model": "mekanism:plastic_fence_nse", "y": 180, "uvlock": true }, "east=true,north=true,south=false,west=true": { "model": "mekanism:plastic_fence_nse", "y": 270, "uvlock": true }, - "east=true,north=true,south=true,west=true": { "model": "mekanism:plastic_fence_nsew", "uvlock": true } + "east=true,north=true,south=true,west=true": { "model": "mekanism:plastic_fence_nsew", "uvlock": true }, + "inventory": { + "model": "mekanism:plastic_fence_inventory", + "uvlock": true, + "transform": { + "thirdperson": { + "rotation": [ 0, 0, 180 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + }, + "gui": { + "rotation": [ 0, 90, 0 ] + } + } + } } } diff --git a/src/main/resources/assets/mekanism/blockstates/SaltBlock.json b/src/main/resources/assets/mekanism/blockstates/SaltBlock.json index 689cfb800..ecf7b4db9 100644 --- a/src/main/resources/assets/mekanism/blockstates/SaltBlock.json +++ b/src/main/resources/assets/mekanism/blockstates/SaltBlock.json @@ -1,7 +1,7 @@ { "forge_marker": 1, "defaults": { - "model": "cube_all", + "model": "mekanism:basic_cube", "textures": { "all": "mekanism:blocks/SaltBlock" } diff --git a/src/main/resources/assets/mekanism/blockstates/advanced_factory_combining.json b/src/main/resources/assets/mekanism/blockstates/advanced_factory_combining.json index 2f6e11b6e..f3ea64fd2 100644 --- a/src/main/resources/assets/mekanism/blockstates/advanced_factory_combining.json +++ b/src/main/resources/assets/mekanism/blockstates/advanced_factory_combining.json @@ -3,6 +3,7 @@ "defaults": { "model": "mekanism:machine", "textures": { + "sides": "mekanism:blocks/factory/advanced/combining/AdvancedCombiningFactoryRight", "front": "mekanism:blocks/factory/advanced/combining/AdvancedCombiningFactoryFront", "south": "mekanism:blocks/factory/advanced/combining/AdvancedCombiningFactoryBack", "west": "mekanism:blocks/factory/advanced/combining/AdvancedCombiningFactoryRight", diff --git a/src/main/resources/assets/mekanism/blockstates/advanced_factory_compressing.json b/src/main/resources/assets/mekanism/blockstates/advanced_factory_compressing.json index 6a827787e..837fdc821 100644 --- a/src/main/resources/assets/mekanism/blockstates/advanced_factory_compressing.json +++ b/src/main/resources/assets/mekanism/blockstates/advanced_factory_compressing.json @@ -3,6 +3,7 @@ "defaults": { "model": "mekanism:machine", "textures": { + "sides": "mekanism:blocks/factory/advanced/compressing/AdvancedCompressingFactoryRight", "front": "mekanism:blocks/factory/advanced/compressing/AdvancedCompressingFactoryFront", "south": "mekanism:blocks/factory/advanced/compressing/AdvancedCompressingFactoryBack", "west": "mekanism:blocks/factory/advanced/compressing/AdvancedCompressingFactoryRight", diff --git a/src/main/resources/assets/mekanism/blockstates/advanced_factory_crushing.json b/src/main/resources/assets/mekanism/blockstates/advanced_factory_crushing.json index f0e4cfd6a..99a72d37d 100644 --- a/src/main/resources/assets/mekanism/blockstates/advanced_factory_crushing.json +++ b/src/main/resources/assets/mekanism/blockstates/advanced_factory_crushing.json @@ -3,6 +3,7 @@ "defaults": { "model": "mekanism:machine", "textures": { + "sides": "mekanism:blocks/factory/advanced/crushing/AdvancedCrushingFactoryRight", "front": "mekanism:blocks/factory/advanced/crushing/AdvancedCrushingFactoryFront", "south": "mekanism:blocks/factory/advanced/crushing/AdvancedCrushingFactoryBack", "west": "mekanism:blocks/factory/advanced/crushing/AdvancedCrushingFactoryRight", diff --git a/src/main/resources/assets/mekanism/blockstates/advanced_factory_enriching.json b/src/main/resources/assets/mekanism/blockstates/advanced_factory_enriching.json index 60158ff1c..f8e6ee701 100644 --- a/src/main/resources/assets/mekanism/blockstates/advanced_factory_enriching.json +++ b/src/main/resources/assets/mekanism/blockstates/advanced_factory_enriching.json @@ -3,6 +3,7 @@ "defaults": { "model": "mekanism:machine", "textures": { + "sides": "mekanism:blocks/factory/advanced/enriching/AdvancedEnrichingFactoryRight", "front": "mekanism:blocks/factory/advanced/enriching/AdvancedEnrichingFactoryFront", "south": "mekanism:blocks/factory/advanced/enriching/AdvancedEnrichingFactoryBack", "west": "mekanism:blocks/factory/advanced/enriching/AdvancedEnrichingFactoryRight", diff --git a/src/main/resources/assets/mekanism/blockstates/advanced_factory_infusing.json b/src/main/resources/assets/mekanism/blockstates/advanced_factory_infusing.json index 35c95dfc2..0e002f862 100644 --- a/src/main/resources/assets/mekanism/blockstates/advanced_factory_infusing.json +++ b/src/main/resources/assets/mekanism/blockstates/advanced_factory_infusing.json @@ -3,6 +3,7 @@ "defaults": { "model": "mekanism:machine", "textures": { + "sides": "mekanism:blocks/factory/advanced/infusing/AdvancedInfusingFactoryRight", "front": "mekanism:blocks/factory/advanced/infusing/AdvancedInfusingFactoryFront", "south": "mekanism:blocks/factory/advanced/infusing/AdvancedInfusingFactoryBack", "west": "mekanism:blocks/factory/advanced/infusing/AdvancedInfusingFactoryRight", diff --git a/src/main/resources/assets/mekanism/blockstates/advanced_factory_injecting.json b/src/main/resources/assets/mekanism/blockstates/advanced_factory_injecting.json index 1365c8c22..17d2ddb9b 100644 --- a/src/main/resources/assets/mekanism/blockstates/advanced_factory_injecting.json +++ b/src/main/resources/assets/mekanism/blockstates/advanced_factory_injecting.json @@ -3,6 +3,7 @@ "defaults": { "model": "mekanism:machine", "textures": { + "sides": "mekanism:blocks/factory/advanced/injecting/AdvancedInjectingFactoryRight", "front": "mekanism:blocks/factory/advanced/injecting/AdvancedInjectingFactoryFront", "south": "mekanism:blocks/factory/advanced/injecting/AdvancedInjectingFactoryBack", "west": "mekanism:blocks/factory/advanced/injecting/AdvancedInjectingFactoryRight", diff --git a/src/main/resources/assets/mekanism/blockstates/advanced_factory_purifying.json b/src/main/resources/assets/mekanism/blockstates/advanced_factory_purifying.json index b021f2846..f30b4dd25 100644 --- a/src/main/resources/assets/mekanism/blockstates/advanced_factory_purifying.json +++ b/src/main/resources/assets/mekanism/blockstates/advanced_factory_purifying.json @@ -3,6 +3,7 @@ "defaults": { "model": "mekanism:machine", "textures": { + "sides": "mekanism:blocks/factory/advanced/enriching/AdvancedEnrichingFactoryRight", "front": "mekanism:blocks/factory/advanced/enriching/AdvancedEnrichingFactoryFront", "south": "mekanism:blocks/factory/advanced/enriching/AdvancedEnrichingFactoryBack", "west": "mekanism:blocks/factory/advanced/enriching/AdvancedEnrichingFactoryRight", diff --git a/src/main/resources/assets/mekanism/blockstates/advanced_factory_smelting.json b/src/main/resources/assets/mekanism/blockstates/advanced_factory_smelting.json index 8e099df7d..d95531cba 100644 --- a/src/main/resources/assets/mekanism/blockstates/advanced_factory_smelting.json +++ b/src/main/resources/assets/mekanism/blockstates/advanced_factory_smelting.json @@ -3,6 +3,7 @@ "defaults": { "model": "mekanism:machine", "textures": { + "sides": "mekanism:blocks/factory/advanced/smelting/AdvancedSmeltingFactoryRight", "front": "mekanism:blocks/factory/advanced/smelting/AdvancedSmeltingFactoryFront", "south": "mekanism:blocks/factory/advanced/smelting/AdvancedSmeltingFactoryBack", "west": "mekanism:blocks/factory/advanced/smelting/AdvancedSmeltingFactoryRight", diff --git a/src/main/resources/assets/mekanism/blockstates/basic_factory_combining.json b/src/main/resources/assets/mekanism/blockstates/basic_factory_combining.json index 48b0c4816..d6cad4dc7 100644 --- a/src/main/resources/assets/mekanism/blockstates/basic_factory_combining.json +++ b/src/main/resources/assets/mekanism/blockstates/basic_factory_combining.json @@ -3,6 +3,7 @@ "defaults": { "model": "mekanism:machine", "textures": { + "sides": "mekanism:blocks/factory/basic/combining/BasicCombiningFactoryRight", "front": "mekanism:blocks/factory/basic/combining/BasicCombiningFactoryFront", "south": "mekanism:blocks/factory/basic/combining/BasicCombiningFactoryBack", "west": "mekanism:blocks/factory/basic/combining/BasicCombiningFactoryRight", diff --git a/src/main/resources/assets/mekanism/blockstates/basic_factory_compressing.json b/src/main/resources/assets/mekanism/blockstates/basic_factory_compressing.json index c0f1d624b..96a36bb62 100644 --- a/src/main/resources/assets/mekanism/blockstates/basic_factory_compressing.json +++ b/src/main/resources/assets/mekanism/blockstates/basic_factory_compressing.json @@ -3,6 +3,7 @@ "defaults": { "model": "mekanism:machine", "textures": { + "sides": "mekanism:blocks/factory/basic/compressing/BasicCompressingFactoryRight", "front": "mekanism:blocks/factory/basic/compressing/BasicCompressingFactoryFront", "south": "mekanism:blocks/factory/basic/compressing/BasicCompressingFactoryBack", "west": "mekanism:blocks/factory/basic/compressing/BasicCompressingFactoryRight", diff --git a/src/main/resources/assets/mekanism/blockstates/basic_factory_crushing.json b/src/main/resources/assets/mekanism/blockstates/basic_factory_crushing.json index 7d840023b..44272ddcf 100644 --- a/src/main/resources/assets/mekanism/blockstates/basic_factory_crushing.json +++ b/src/main/resources/assets/mekanism/blockstates/basic_factory_crushing.json @@ -3,6 +3,7 @@ "defaults": { "model": "mekanism:machine", "textures": { + "sides": "mekanism:blocks/factory/basic/crushing/BasicCrushingFactoryRight", "front": "mekanism:blocks/factory/basic/crushing/BasicCrushingFactoryFront", "south": "mekanism:blocks/factory/basic/crushing/BasicCrushingFactoryBack", "west": "mekanism:blocks/factory/basic/crushing/BasicCrushingFactoryRight", diff --git a/src/main/resources/assets/mekanism/blockstates/basic_factory_enriching.json b/src/main/resources/assets/mekanism/blockstates/basic_factory_enriching.json index f07ba429c..ac1947c17 100644 --- a/src/main/resources/assets/mekanism/blockstates/basic_factory_enriching.json +++ b/src/main/resources/assets/mekanism/blockstates/basic_factory_enriching.json @@ -3,6 +3,7 @@ "defaults": { "model": "mekanism:machine", "textures": { + "sides": "mekanism:blocks/factory/basic/enriching/BasicEnrichingFactoryRight", "front": "mekanism:blocks/factory/basic/enriching/BasicEnrichingFactoryFront", "south": "mekanism:blocks/factory/basic/enriching/BasicEnrichingFactoryBack", "west": "mekanism:blocks/factory/basic/enriching/BasicEnrichingFactoryRight", diff --git a/src/main/resources/assets/mekanism/blockstates/basic_factory_infusing.json b/src/main/resources/assets/mekanism/blockstates/basic_factory_infusing.json index d0fd2b903..01c5c886d 100644 --- a/src/main/resources/assets/mekanism/blockstates/basic_factory_infusing.json +++ b/src/main/resources/assets/mekanism/blockstates/basic_factory_infusing.json @@ -3,6 +3,7 @@ "defaults": { "model": "mekanism:machine", "textures": { + "sides": "mekanism:blocks/factory/basic/infusing/BasicInfusingFactoryRight", "front": "mekanism:blocks/factory/basic/infusing/BasicInfusingFactoryFront", "south": "mekanism:blocks/factory/basic/infusing/BasicInfusingFactoryBack", "west": "mekanism:blocks/factory/basic/infusing/BasicInfusingFactoryRight", diff --git a/src/main/resources/assets/mekanism/blockstates/basic_factory_injecting.json b/src/main/resources/assets/mekanism/blockstates/basic_factory_injecting.json index 5d96be893..fef98af7e 100644 --- a/src/main/resources/assets/mekanism/blockstates/basic_factory_injecting.json +++ b/src/main/resources/assets/mekanism/blockstates/basic_factory_injecting.json @@ -3,6 +3,7 @@ "defaults": { "model": "mekanism:machine", "textures": { + "sides": "mekanism:blocks/factory/basic/injecting/BasicInjectingFactoryRight", "front": "mekanism:blocks/factory/basic/injecting/BasicInjectingFactoryFront", "south": "mekanism:blocks/factory/basic/injecting/BasicInjectingFactoryBack", "west": "mekanism:blocks/factory/basic/injecting/BasicInjectingFactoryRight", diff --git a/src/main/resources/assets/mekanism/blockstates/basic_factory_purifying.json b/src/main/resources/assets/mekanism/blockstates/basic_factory_purifying.json index 6329b4a23..412bdd53f 100644 --- a/src/main/resources/assets/mekanism/blockstates/basic_factory_purifying.json +++ b/src/main/resources/assets/mekanism/blockstates/basic_factory_purifying.json @@ -3,6 +3,7 @@ "defaults": { "model": "mekanism:machine", "textures": { + "sides": "mekanism:blocks/factory/basic/purifying/BasicPurifyingFactoryRight", "front": "mekanism:blocks/factory/basic/purifying/BasicPurifyingFactoryFront", "south": "mekanism:blocks/factory/basic/purifying/BasicPurifyingFactoryBack", "west": "mekanism:blocks/factory/basic/purifying/BasicPurifyingFactoryRight", diff --git a/src/main/resources/assets/mekanism/blockstates/basic_factory_smelting.json b/src/main/resources/assets/mekanism/blockstates/basic_factory_smelting.json index 57b435359..0e6e234b4 100644 --- a/src/main/resources/assets/mekanism/blockstates/basic_factory_smelting.json +++ b/src/main/resources/assets/mekanism/blockstates/basic_factory_smelting.json @@ -3,6 +3,7 @@ "defaults": { "model": "mekanism:machine", "textures": { + "sides": "mekanism:blocks/factory/basic/smelting/BasicSmeltingFactoryRight", "front": "mekanism:blocks/factory/basic/smelting/BasicSmeltingFactoryFront", "south": "mekanism:blocks/factory/basic/smelting/BasicSmeltingFactoryBack", "west": "mekanism:blocks/factory/basic/smelting/BasicSmeltingFactoryRight", diff --git a/src/main/resources/assets/mekanism/blockstates/bin_advanced.json b/src/main/resources/assets/mekanism/blockstates/bin_advanced.json new file mode 100644 index 000000000..a7643d99a --- /dev/null +++ b/src/main/resources/assets/mekanism/blockstates/bin_advanced.json @@ -0,0 +1,37 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "mekanism:machine", + "textures": { + "sides": "mekanism:blocks/bin/BinAdvancedRight", + "front": "mekanism:blocks/bin/BinAdvancedFront", + "west": "mekanism:blocks/bin/BinAdvancedRight", + "east": "mekanism:blocks/bin/BinAdvancedLeft", + "south": "mekanism:blocks/bin/BinAdvancedBack", + "up": "mekanism:blocks/bin/BinAdvancedTop", + "down": "mekanism:blocks/bin/BinAdvancedBottom" + } + }, + "variants": { + "facing": { + "north": {}, + "south": {"y": 180}, + "east": {"y": 90}, + "west": {"y": -90} + }, + "active": { + "true": { + "textures": { + "front": "mekanism:blocks/bin/BinAdvancedFrontOn", + "west": "mekanism:blocks/bin/BinAdvancedRightOn", + "east": "mekanism:blocks/bin/BinAdvancedLeftOn", + "south": "mekanism:blocks/bin/BinAdvancedBackOn", + "up": "mekanism:blocks/bin/BinAdvancedTopOn" + } + }, + "false": {} + }, + "inventory": [{}] + } +} + diff --git a/src/main/resources/assets/mekanism/blockstates/bin.json b/src/main/resources/assets/mekanism/blockstates/bin_basic.json similarity index 89% rename from src/main/resources/assets/mekanism/blockstates/bin.json rename to src/main/resources/assets/mekanism/blockstates/bin_basic.json index d7bf345b5..c0c3b6139 100644 --- a/src/main/resources/assets/mekanism/blockstates/bin.json +++ b/src/main/resources/assets/mekanism/blockstates/bin_basic.json @@ -3,6 +3,7 @@ "defaults": { "model": "mekanism:machine", "textures": { + "sides": "mekanism:blocks/bin/BinBasicRight", "front": "mekanism:blocks/bin/BinBasicFront", "west": "mekanism:blocks/bin/BinBasicRight", "east": "mekanism:blocks/bin/BinBasicLeft", @@ -25,8 +26,7 @@ "west": "mekanism:blocks/bin/BinBasicRightOn", "east": "mekanism:blocks/bin/BinBasicLeftOn", "south": "mekanism:blocks/bin/BinBasicBackOn", - "up": "mekanism:blocks/bin/BinBasicTopOn", - "down": "mekanism:blocks/bin/BinBasicBottomOn" + "up": "mekanism:blocks/bin/BinBasicTopOn" } }, "false": {} diff --git a/src/main/resources/assets/mekanism/blockstates/bin_elite.json b/src/main/resources/assets/mekanism/blockstates/bin_elite.json new file mode 100644 index 000000000..d4e73da55 --- /dev/null +++ b/src/main/resources/assets/mekanism/blockstates/bin_elite.json @@ -0,0 +1,37 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "mekanism:machine", + "textures": { + "sides": "mekanism:blocks/bin/BinEliteRight", + "front": "mekanism:blocks/bin/BinEliteFront", + "west": "mekanism:blocks/bin/BinEliteRight", + "east": "mekanism:blocks/bin/BinEliteLeft", + "south": "mekanism:blocks/bin/BinEliteBack", + "up": "mekanism:blocks/bin/BinEliteTop", + "down": "mekanism:blocks/bin/BinEliteBottom" + } + }, + "variants": { + "facing": { + "north": {}, + "south": {"y": 180}, + "east": {"y": 90}, + "west": {"y": -90} + }, + "active": { + "true": { + "textures": { + "front": "mekanism:blocks/bin/BinEliteFrontOn", + "west": "mekanism:blocks/bin/BinEliteRightOn", + "east": "mekanism:blocks/bin/BinEliteLeftOn", + "south": "mekanism:blocks/bin/BinEliteBackOn", + "up": "mekanism:blocks/bin/BinEliteTopOn" + } + }, + "false": {} + }, + "inventory": [{}] + } +} + diff --git a/src/main/resources/assets/mekanism/blockstates/bin_ultimate.json b/src/main/resources/assets/mekanism/blockstates/bin_ultimate.json new file mode 100644 index 000000000..99e09470a --- /dev/null +++ b/src/main/resources/assets/mekanism/blockstates/bin_ultimate.json @@ -0,0 +1,37 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "mekanism:machine", + "textures": { + "sides": "mekanism:blocks/bin/BinUltimateRight", + "front": "mekanism:blocks/bin/BinUltimateFront", + "west": "mekanism:blocks/bin/BinUltimateRight", + "east": "mekanism:blocks/bin/BinUltimateLeft", + "south": "mekanism:blocks/bin/BinUltimateBack", + "up": "mekanism:blocks/bin/BinUltimateTop", + "down": "mekanism:blocks/bin/BinUltimateBottom" + } + }, + "variants": { + "facing": { + "north": {}, + "south": {"y": 180}, + "east": {"y": 90}, + "west": {"y": -90} + }, + "active": { + "true": { + "textures": { + "front": "mekanism:blocks/bin/BinUltimateFrontOn", + "west": "mekanism:blocks/bin/BinUltimateRightOn", + "east": "mekanism:blocks/bin/BinUltimateLeftOn", + "south": "mekanism:blocks/bin/BinUltimateBackOn", + "up": "mekanism:blocks/bin/BinUltimateTopOn" + } + }, + "false": {} + }, + "inventory": [{}] + } +} + diff --git a/src/main/resources/assets/mekanism/blockstates/induction_provider.json b/src/main/resources/assets/mekanism/blockstates/boiler_casing.json similarity index 61% rename from src/main/resources/assets/mekanism/blockstates/induction_provider.json rename to src/main/resources/assets/mekanism/blockstates/boiler_casing.json index 8aee4d7ae..e2cbe4ccd 100644 --- a/src/main/resources/assets/mekanism/blockstates/induction_provider.json +++ b/src/main/resources/assets/mekanism/blockstates/boiler_casing.json @@ -1,9 +1,9 @@ { "forge_marker": 1, "defaults": { - "model": "cube_all", + "model": "mekanism:basic_cube", "textures": { - "all": "mekanism:blocks/InductionProvider" + "all": "mekanism:blocks/ctm/boiler_casing" } }, "variants": { diff --git a/src/main/resources/assets/mekanism/blockstates/induction_cell.json b/src/main/resources/assets/mekanism/blockstates/boiler_valve.json similarity index 61% rename from src/main/resources/assets/mekanism/blockstates/induction_cell.json rename to src/main/resources/assets/mekanism/blockstates/boiler_valve.json index a1e478842..ef299bcc0 100644 --- a/src/main/resources/assets/mekanism/blockstates/induction_cell.json +++ b/src/main/resources/assets/mekanism/blockstates/boiler_valve.json @@ -1,9 +1,9 @@ { "forge_marker": 1, "defaults": { - "model": "cube_all", + "model": "mekanism:basic_cube", "textures": { - "all": "mekanism:blocks/InductionCell" + "all": "mekanism:blocks/ctm/boiler_valve" } }, "variants": { diff --git a/src/main/resources/assets/mekanism/blockstates/bronze_block.json b/src/main/resources/assets/mekanism/blockstates/bronze_block.json index 2fc162842..f05286e88 100644 --- a/src/main/resources/assets/mekanism/blockstates/bronze_block.json +++ b/src/main/resources/assets/mekanism/blockstates/bronze_block.json @@ -1,7 +1,7 @@ { "forge_marker": 1, "defaults": { - "model": "cube_all", + "model": "mekanism:basic_cube", "textures": { "all": "mekanism:blocks/BronzeBlock" } diff --git a/src/main/resources/assets/mekanism/blockstates/chemical_crystallizer.json b/src/main/resources/assets/mekanism/blockstates/chemical_crystallizer.json index 174556a4f..a629ee93e 100644 --- a/src/main/resources/assets/mekanism/blockstates/chemical_crystallizer.json +++ b/src/main/resources/assets/mekanism/blockstates/chemical_crystallizer.json @@ -1,7 +1,7 @@ { "forge_marker": 1, "defaults": { - "model": "mekanism:chemical_crystallizer" + "model": "mekanism:nothing" }, "variants": { "normal": [{}], diff --git a/src/main/resources/assets/mekanism/blockstates/chemical_dissolution_chamber.json b/src/main/resources/assets/mekanism/blockstates/chemical_dissolution_chamber.json index 7a003f8e7..a629ee93e 100644 --- a/src/main/resources/assets/mekanism/blockstates/chemical_dissolution_chamber.json +++ b/src/main/resources/assets/mekanism/blockstates/chemical_dissolution_chamber.json @@ -1,7 +1,7 @@ { "forge_marker": 1, "defaults": { - "model": "mekanism:chemical_dissolution_chamber" + "model": "mekanism:nothing" }, "variants": { "normal": [{}], diff --git a/src/main/resources/assets/mekanism/blockstates/chemical_injection_chamber.json b/src/main/resources/assets/mekanism/blockstates/chemical_injection_chamber.json index 903bce853..d47d319cf 100644 --- a/src/main/resources/assets/mekanism/blockstates/chemical_injection_chamber.json +++ b/src/main/resources/assets/mekanism/blockstates/chemical_injection_chamber.json @@ -3,7 +3,7 @@ "defaults": { "model": "mekanism:machine", "textures": { - "sides": "mekanism:blocks/SteelCasing", + "sides": "mekanism:blocks/chemical_injection_chamber/ChemicalInjectionChamberRight", "front": "mekanism:blocks/chemical_injection_chamber/ChemicalInjectionChamberFront", "west": "mekanism:blocks/chemical_injection_chamber/ChemicalInjectionChamberRight", "east": "mekanism:blocks/chemical_injection_chamber/ChemicalInjectionChamberLeft", diff --git a/src/main/resources/assets/mekanism/blockstates/coal_block.json b/src/main/resources/assets/mekanism/blockstates/coal_block.json index 8876fcc5e..f2c5dde40 100644 --- a/src/main/resources/assets/mekanism/blockstates/coal_block.json +++ b/src/main/resources/assets/mekanism/blockstates/coal_block.json @@ -1,7 +1,7 @@ { "forge_marker": 1, "defaults": { - "model": "cube_all", + "model": "mekanism:basic_cube", "textures": { "all": "mekanism:blocks/CoalBlock" } diff --git a/src/main/resources/assets/mekanism/blockstates/combiner.json b/src/main/resources/assets/mekanism/blockstates/combiner.json index 8b3235ea5..a05bee5d2 100644 --- a/src/main/resources/assets/mekanism/blockstates/combiner.json +++ b/src/main/resources/assets/mekanism/blockstates/combiner.json @@ -3,7 +3,7 @@ "defaults": { "model": "mekanism:machine", "textures": { - "sides": "mekanism:blocks/SteelCasing", + "sides": "mekanism:blocks/combiner/CombinerRight", "front": "mekanism:blocks/combiner/CombinerFront", "west": "mekanism:blocks/combiner/CombinerRight", "east": "mekanism:blocks/combiner/CombinerLeft", diff --git a/src/main/resources/assets/mekanism/blockstates/copper_block.json b/src/main/resources/assets/mekanism/blockstates/copper_block.json index 164b6072e..27d1f7a57 100644 --- a/src/main/resources/assets/mekanism/blockstates/copper_block.json +++ b/src/main/resources/assets/mekanism/blockstates/copper_block.json @@ -1,7 +1,7 @@ { "forge_marker": 1, "defaults": { - "model": "cube_all", + "model": "mekanism:basic_cube", "textures": { "all": "mekanism:blocks/CopperBlock" } diff --git a/src/main/resources/assets/mekanism/blockstates/crusher.json b/src/main/resources/assets/mekanism/blockstates/crusher.json index 097512134..2c3081067 100644 --- a/src/main/resources/assets/mekanism/blockstates/crusher.json +++ b/src/main/resources/assets/mekanism/blockstates/crusher.json @@ -3,7 +3,7 @@ "defaults": { "model": "mekanism:machine", "textures": { - "sides": "mekanism:blocks/SteelCasing", + "sides": "mekanism:blocks/crusher/CrusherRight", "front": "mekanism:blocks/crusher/CrusherFront", "west": "mekanism:blocks/crusher/CrusherRight", "east": "mekanism:blocks/crusher/CrusherLeft", diff --git a/src/main/resources/assets/mekanism/blockstates/digital_miner.json b/src/main/resources/assets/mekanism/blockstates/digital_miner.json index a9387f205..60f122e27 100644 --- a/src/main/resources/assets/mekanism/blockstates/digital_miner.json +++ b/src/main/resources/assets/mekanism/blockstates/digital_miner.json @@ -10,7 +10,7 @@ "south": {"y": 180}, "east": {"y": 90}, "west": {"y": -90} - }, + }, "active": { "true": {}, "false": {} diff --git a/src/main/resources/assets/mekanism/blockstates/dynamic_tank.json b/src/main/resources/assets/mekanism/blockstates/dynamic_tank.json index baa07a60a..0c41fc493 100644 --- a/src/main/resources/assets/mekanism/blockstates/dynamic_tank.json +++ b/src/main/resources/assets/mekanism/blockstates/dynamic_tank.json @@ -1,9 +1,9 @@ { "forge_marker": 1, "defaults": { - "model": "cube_all", + "model": "mekanism:basic_cube", "textures": { - "all": "mekanism:blocks/DynamicTank" + "all": "mekanism:blocks/ctm/dynamic_tank" } }, "variants": { diff --git a/src/main/resources/assets/mekanism/blockstates/dynamic_valve.json b/src/main/resources/assets/mekanism/blockstates/dynamic_valve.json index 46c4ba0b9..667a65d9d 100644 --- a/src/main/resources/assets/mekanism/blockstates/dynamic_valve.json +++ b/src/main/resources/assets/mekanism/blockstates/dynamic_valve.json @@ -1,9 +1,9 @@ { "forge_marker": 1, "defaults": { - "model": "cube_all", + "model": "mekanism:basic_cube", "textures": { - "all": "mekanism:blocks/DynamicValve" + "all": "mekanism:blocks/ctm/dynamic_valve" } }, "variants": { diff --git a/src/main/resources/assets/mekanism/blockstates/electric_pump.json b/src/main/resources/assets/mekanism/blockstates/electric_pump.json index b2bbe5969..b781aa2b1 100644 --- a/src/main/resources/assets/mekanism/blockstates/electric_pump.json +++ b/src/main/resources/assets/mekanism/blockstates/electric_pump.json @@ -6,12 +6,12 @@ "variants": { "normal": [{}], "facing": { - "north": {}, - "south": {"y": 180}, - "east": {"y": 90}, - "west": {"y": -90} + "north": {"y": 180}, + "south": {}, + "east": {"y": -90}, + "west": {"y": 90} }, - "inventory": [{}] + "inventory": [{"y": 180}] } } diff --git a/src/main/resources/assets/mekanism/blockstates/electromagnetic_coil.json b/src/main/resources/assets/mekanism/blockstates/electromagnetic_coil.json new file mode 100644 index 000000000..1b14552ad --- /dev/null +++ b/src/main/resources/assets/mekanism/blockstates/electromagnetic_coil.json @@ -0,0 +1,14 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "mekanism:basic_cube", + "textures": { + "all": "mekanism:blocks/ctm/electromagnetic_coil" + } + }, + "variants": { + "normal": [{}], + "inventory": [{}] + } +} + diff --git a/src/main/resources/assets/mekanism/blockstates/elite_factory_combining.json b/src/main/resources/assets/mekanism/blockstates/elite_factory_combining.json index 2beb0730b..d978a2a88 100644 --- a/src/main/resources/assets/mekanism/blockstates/elite_factory_combining.json +++ b/src/main/resources/assets/mekanism/blockstates/elite_factory_combining.json @@ -3,6 +3,7 @@ "defaults": { "model": "mekanism:machine", "textures": { + "sides": "mekanism:blocks/factory/elite/combining/EliteCombiningFactoryRight", "front": "mekanism:blocks/factory/elite/combining/EliteCombiningFactoryFront", "south": "mekanism:blocks/factory/elite/combining/EliteCombiningFactoryBack", "west": "mekanism:blocks/factory/elite/combining/EliteCombiningFactoryRight", diff --git a/src/main/resources/assets/mekanism/blockstates/elite_factory_compressing.json b/src/main/resources/assets/mekanism/blockstates/elite_factory_compressing.json index 697a54223..d35f413fc 100644 --- a/src/main/resources/assets/mekanism/blockstates/elite_factory_compressing.json +++ b/src/main/resources/assets/mekanism/blockstates/elite_factory_compressing.json @@ -3,6 +3,7 @@ "defaults": { "model": "mekanism:machine", "textures": { + "sides": "mekanism:blocks/factory/elite/compressing/EliteCompressingFactoryRight", "front": "mekanism:blocks/factory/elite/compressing/EliteCompressingFactoryFront", "south": "mekanism:blocks/factory/elite/compressing/EliteCompressingFactoryBack", "west": "mekanism:blocks/factory/elite/compressing/EliteCompressingFactoryRight", diff --git a/src/main/resources/assets/mekanism/blockstates/elite_factory_crushing.json b/src/main/resources/assets/mekanism/blockstates/elite_factory_crushing.json index d2e64ae36..b15f781e8 100644 --- a/src/main/resources/assets/mekanism/blockstates/elite_factory_crushing.json +++ b/src/main/resources/assets/mekanism/blockstates/elite_factory_crushing.json @@ -3,6 +3,7 @@ "defaults": { "model": "mekanism:machine", "textures": { + "sides": "mekanism:blocks/factory/elite/crushing/EliteCrushingFactoryRight", "front": "mekanism:blocks/factory/elite/crushing/EliteCrushingFactoryFront", "south": "mekanism:blocks/factory/elite/crushing/EliteCrushingFactoryBack", "west": "mekanism:blocks/factory/elite/crushing/EliteCrushingFactoryRight", diff --git a/src/main/resources/assets/mekanism/blockstates/elite_factory_enriching.json b/src/main/resources/assets/mekanism/blockstates/elite_factory_enriching.json index 5f62dd7be..acb79e3a2 100644 --- a/src/main/resources/assets/mekanism/blockstates/elite_factory_enriching.json +++ b/src/main/resources/assets/mekanism/blockstates/elite_factory_enriching.json @@ -3,6 +3,7 @@ "defaults": { "model": "mekanism:machine", "textures": { + "sides": "mekanism:blocks/factory/elite/enriching/EliteEnrichingFactoryRight", "front": "mekanism:blocks/factory/elite/enriching/EliteEnrichingFactoryFront", "south": "mekanism:blocks/factory/elite/enriching/EliteEnrichingFactoryBack", "west": "mekanism:blocks/factory/elite/enriching/EliteEnrichingFactoryRight", diff --git a/src/main/resources/assets/mekanism/blockstates/elite_factory_infusing.json b/src/main/resources/assets/mekanism/blockstates/elite_factory_infusing.json index c6564d32b..22fbece34 100644 --- a/src/main/resources/assets/mekanism/blockstates/elite_factory_infusing.json +++ b/src/main/resources/assets/mekanism/blockstates/elite_factory_infusing.json @@ -3,6 +3,7 @@ "defaults": { "model": "mekanism:machine", "textures": { + "sides": "mekanism:blocks/factory/elite/infusing/EliteInfusingFactoryRight", "front": "mekanism:blocks/factory/elite/infusing/EliteInfusingFactoryFront", "south": "mekanism:blocks/factory/elite/infusing/EliteInfusingFactoryBack", "west": "mekanism:blocks/factory/elite/infusing/EliteInfusingFactoryRight", diff --git a/src/main/resources/assets/mekanism/blockstates/elite_factory_injecting.json b/src/main/resources/assets/mekanism/blockstates/elite_factory_injecting.json index 4d0648c93..0d5f1fcb1 100644 --- a/src/main/resources/assets/mekanism/blockstates/elite_factory_injecting.json +++ b/src/main/resources/assets/mekanism/blockstates/elite_factory_injecting.json @@ -3,6 +3,7 @@ "defaults": { "model": "mekanism:machine", "textures": { + "sides": "mekanism:blocks/factory/elite/injecting/EliteInjectingFactoryRight", "front": "mekanism:blocks/factory/elite/injecting/EliteInjectingFactoryFront", "south": "mekanism:blocks/factory/elite/injecting/EliteInjectingFactoryBack", "west": "mekanism:blocks/factory/elite/injecting/EliteInjectingFactoryRight", diff --git a/src/main/resources/assets/mekanism/blockstates/elite_factory_purifying.json b/src/main/resources/assets/mekanism/blockstates/elite_factory_purifying.json index 5a8d804e1..169f7b40f 100644 --- a/src/main/resources/assets/mekanism/blockstates/elite_factory_purifying.json +++ b/src/main/resources/assets/mekanism/blockstates/elite_factory_purifying.json @@ -3,6 +3,7 @@ "defaults": { "model": "mekanism:machine", "textures": { + "sides": "mekanism:blocks/factory/elite/purifying/ElitePurifyingFactoryRight", "front": "mekanism:blocks/factory/elite/purifying/ElitePurifyingFactoryFront", "south": "mekanism:blocks/factory/elite/purifying/ElitePurifyingFactoryBack", "west": "mekanism:blocks/factory/elite/purifying/ElitePurifyingFactoryRight", diff --git a/src/main/resources/assets/mekanism/blockstates/elite_factory_smelting.json b/src/main/resources/assets/mekanism/blockstates/elite_factory_smelting.json index b6117575e..2805f48f9 100644 --- a/src/main/resources/assets/mekanism/blockstates/elite_factory_smelting.json +++ b/src/main/resources/assets/mekanism/blockstates/elite_factory_smelting.json @@ -3,6 +3,7 @@ "defaults": { "model": "mekanism:machine", "textures": { + "sides": "mekanism:blocks/factory/elite/smelting/EliteSmeltingFactoryRight", "front": "mekanism:blocks/factory/elite/smelting/EliteSmeltingFactoryFront", "south": "mekanism:blocks/factory/elite/smelting/EliteSmeltingFactoryBack", "west": "mekanism:blocks/factory/elite/smelting/EliteSmeltingFactoryRight", diff --git a/src/main/resources/assets/mekanism/blockstates/energized_smelter.json b/src/main/resources/assets/mekanism/blockstates/energized_smelter.json index 78e75e261..1e8793d3a 100644 --- a/src/main/resources/assets/mekanism/blockstates/energized_smelter.json +++ b/src/main/resources/assets/mekanism/blockstates/energized_smelter.json @@ -3,7 +3,7 @@ "defaults": { "model": "mekanism:machine", "textures": { - "sides": "mekanism:blocks/SteelCasing", + "sides": "mekanism:blocks/energized_smelter/EnergizedSmelterRight", "front": "mekanism:blocks/energized_smelter/EnergizedSmelterFront", "west": "mekanism:blocks/energized_smelter/EnergizedSmelterRight", "east": "mekanism:blocks/energized_smelter/EnergizedSmelterLeft", diff --git a/src/main/resources/assets/mekanism/blockstates/enrichment_chamber.json b/src/main/resources/assets/mekanism/blockstates/enrichment_chamber.json index be67a38b4..f33d88fdd 100644 --- a/src/main/resources/assets/mekanism/blockstates/enrichment_chamber.json +++ b/src/main/resources/assets/mekanism/blockstates/enrichment_chamber.json @@ -3,7 +3,7 @@ "defaults": { "model": "mekanism:machine", "textures": { - "sides": "mekanism:blocks/SteelCasing", + "sides": "mekanism:blocks/enrichment_chamber/EnrichmentChamberRight", "front": "mekanism:blocks/enrichment_chamber/EnrichmentChamberFront", "west": "mekanism:blocks/enrichment_chamber/EnrichmentChamberRight", "east": "mekanism:blocks/enrichment_chamber/EnrichmentChamberLeft", diff --git a/src/main/resources/assets/mekanism/blockstates/fluid_tank.json b/src/main/resources/assets/mekanism/blockstates/fluid_tank.json index a3725d3ab..d8af24a61 100644 --- a/src/main/resources/assets/mekanism/blockstates/fluid_tank.json +++ b/src/main/resources/assets/mekanism/blockstates/fluid_tank.json @@ -9,7 +9,11 @@ "true": {"textures": {"all": "mekanism:blocks/models/fluid_tank_on"}}, "false": {"textures": {"all": "mekanism:blocks/models/fluid_tank"}} }, - "inventory": [{}] + "inventory": [{ + "textures": { + "all": "mekanism:blocks/models/fluid_tank" + } + }] } } diff --git a/src/main/resources/assets/mekanism/blockstates/formulaic_assemblicator.json b/src/main/resources/assets/mekanism/blockstates/formulaic_assemblicator.json index f13a151a4..f43526a6f 100644 --- a/src/main/resources/assets/mekanism/blockstates/formulaic_assemblicator.json +++ b/src/main/resources/assets/mekanism/blockstates/formulaic_assemblicator.json @@ -3,6 +3,7 @@ "defaults": { "model": "mekanism:machine", "textures": { + "sides": "mekanism:blocks/formulaic_assemblicator/FormulaicAssemblicatorRight", "front": "mekanism:blocks/formulaic_assemblicator/FormulaicAssemblicatorFront", "west": "mekanism:blocks/formulaic_assemblicator/FormulaicAssemblicatorRight", "east": "mekanism:blocks/formulaic_assemblicator/FormulaicAssemblicatorLeft", diff --git a/src/main/resources/assets/mekanism/blockstates/fuelwood_heater.json b/src/main/resources/assets/mekanism/blockstates/fuelwood_heater.json index 2dfa0648a..b6234afd6 100644 --- a/src/main/resources/assets/mekanism/blockstates/fuelwood_heater.json +++ b/src/main/resources/assets/mekanism/blockstates/fuelwood_heater.json @@ -3,6 +3,7 @@ "defaults": { "model": "mekanism:machine", "textures": { + "sides": "mekanism:blocks/fuelwood_heater/FuelwoodHeaterRight", "front": "mekanism:blocks/fuelwood_heater/FuelwoodHeaterFront", "west": "mekanism:blocks/fuelwood_heater/FuelwoodHeaterRight", "east": "mekanism:blocks/fuelwood_heater/FuelwoodHeaterLeft", diff --git a/src/main/resources/assets/mekanism/blockstates/induction_casing.json b/src/main/resources/assets/mekanism/blockstates/induction_casing.json index 934408e0a..3f0e2a490 100644 --- a/src/main/resources/assets/mekanism/blockstates/induction_casing.json +++ b/src/main/resources/assets/mekanism/blockstates/induction_casing.json @@ -1,9 +1,9 @@ { "forge_marker": 1, "defaults": { - "model": "cube_all", + "model": "mekanism:basic_cube", "textures": { - "all": "mekanism:blocks/InductionCasing" + "all": "mekanism:blocks/ctm/induction_casing" } }, "variants": { diff --git a/src/main/resources/assets/mekanism/blockstates/induction_cell_advanced.json b/src/main/resources/assets/mekanism/blockstates/induction_cell_advanced.json new file mode 100644 index 000000000..eafa1f124 --- /dev/null +++ b/src/main/resources/assets/mekanism/blockstates/induction_cell_advanced.json @@ -0,0 +1,14 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "mekanism:basic_cube", + "textures": { + "all": "mekanism:blocks/ctm/induction_cell_advanced" + } + }, + "variants": { + "normal": [{}], + "inventory": [{}] + } +} + diff --git a/src/main/resources/assets/mekanism/blockstates/induction_cell_basic.json b/src/main/resources/assets/mekanism/blockstates/induction_cell_basic.json new file mode 100644 index 000000000..119c43d8d --- /dev/null +++ b/src/main/resources/assets/mekanism/blockstates/induction_cell_basic.json @@ -0,0 +1,14 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "mekanism:basic_cube", + "textures": { + "all": "mekanism:blocks/ctm/induction_cell_basic" + } + }, + "variants": { + "normal": [{}], + "inventory": [{}] + } +} + diff --git a/src/main/resources/assets/mekanism/blockstates/induction_cell_elite.json b/src/main/resources/assets/mekanism/blockstates/induction_cell_elite.json new file mode 100644 index 000000000..cbb647a84 --- /dev/null +++ b/src/main/resources/assets/mekanism/blockstates/induction_cell_elite.json @@ -0,0 +1,14 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "mekanism:basic_cube", + "textures": { + "all": "mekanism:blocks/ctm/induction_cell_elite" + } + }, + "variants": { + "normal": [{}], + "inventory": [{}] + } +} + diff --git a/src/main/resources/assets/mekanism/blockstates/induction_cell_ultimate.json b/src/main/resources/assets/mekanism/blockstates/induction_cell_ultimate.json new file mode 100644 index 000000000..ab064eb36 --- /dev/null +++ b/src/main/resources/assets/mekanism/blockstates/induction_cell_ultimate.json @@ -0,0 +1,14 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "mekanism:basic_cube", + "textures": { + "all": "mekanism:blocks/ctm/induction_cell_ultimate" + } + }, + "variants": { + "normal": [{}], + "inventory": [{}] + } +} + diff --git a/src/main/resources/assets/mekanism/blockstates/induction_port.json b/src/main/resources/assets/mekanism/blockstates/induction_port.json index 891b0dad2..1206a30dd 100644 --- a/src/main/resources/assets/mekanism/blockstates/induction_port.json +++ b/src/main/resources/assets/mekanism/blockstates/induction_port.json @@ -1,9 +1,9 @@ { "forge_marker": 1, "defaults": { - "model": "cube_all", + "model": "mekanism:basic_cube", "textures": { - "all": "mekanism:blocks/InductionPort" + "all": "mekanism:blocks/ctm/induction_port" } }, "variants": { diff --git a/src/main/resources/assets/mekanism/blockstates/induction_provider_advanced.json b/src/main/resources/assets/mekanism/blockstates/induction_provider_advanced.json new file mode 100644 index 000000000..639865b48 --- /dev/null +++ b/src/main/resources/assets/mekanism/blockstates/induction_provider_advanced.json @@ -0,0 +1,14 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "mekanism:basic_cube", + "textures": { + "all": "mekanism:blocks/ctm/induction_provider_advanced" + } + }, + "variants": { + "normal": [{}], + "inventory": [{}] + } +} + diff --git a/src/main/resources/assets/mekanism/blockstates/induction_provider_basic.json b/src/main/resources/assets/mekanism/blockstates/induction_provider_basic.json new file mode 100644 index 000000000..1da31590e --- /dev/null +++ b/src/main/resources/assets/mekanism/blockstates/induction_provider_basic.json @@ -0,0 +1,14 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "mekanism:basic_cube", + "textures": { + "all": "mekanism:blocks/ctm/induction_provider_basic" + } + }, + "variants": { + "normal": [{}], + "inventory": [{}] + } +} + diff --git a/src/main/resources/assets/mekanism/blockstates/induction_provider_elite.json b/src/main/resources/assets/mekanism/blockstates/induction_provider_elite.json new file mode 100644 index 000000000..ed9789302 --- /dev/null +++ b/src/main/resources/assets/mekanism/blockstates/induction_provider_elite.json @@ -0,0 +1,14 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "mekanism:basic_cube", + "textures": { + "all": "mekanism:blocks/ctm/induction_provider_elite" + } + }, + "variants": { + "normal": [{}], + "inventory": [{}] + } +} + diff --git a/src/main/resources/assets/mekanism/blockstates/induction_provider_ultimate.json b/src/main/resources/assets/mekanism/blockstates/induction_provider_ultimate.json new file mode 100644 index 000000000..8b426c869 --- /dev/null +++ b/src/main/resources/assets/mekanism/blockstates/induction_provider_ultimate.json @@ -0,0 +1,14 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "mekanism:basic_cube", + "textures": { + "all": "mekanism:blocks/ctm/induction_provider_ultimate" + } + }, + "variants": { + "normal": [{}], + "inventory": [{}] + } +} + diff --git a/src/main/resources/assets/mekanism/blockstates/oredictionificator.json b/src/main/resources/assets/mekanism/blockstates/oredictionificator.json index e39404ff8..317c5c8c8 100644 --- a/src/main/resources/assets/mekanism/blockstates/oredictionificator.json +++ b/src/main/resources/assets/mekanism/blockstates/oredictionificator.json @@ -3,6 +3,7 @@ "defaults": { "model": "mekanism:machine", "textures": { + "sides": "mekanism:blocks/oredictionificator/OredictionificatorRight", "front": "mekanism:blocks/oredictionificator/OredictionificatorFront", "west": "mekanism:blocks/oredictionificator/OredictionificatorRight", "east": "mekanism:blocks/oredictionificator/OredictionificatorLeft", diff --git a/src/main/resources/assets/mekanism/blockstates/osmium_block.json b/src/main/resources/assets/mekanism/blockstates/osmium_block.json index ef2fa44e0..e378df1e6 100644 --- a/src/main/resources/assets/mekanism/blockstates/osmium_block.json +++ b/src/main/resources/assets/mekanism/blockstates/osmium_block.json @@ -1,7 +1,7 @@ { "forge_marker": 1, "defaults": { - "model": "cube_all", + "model": "mekanism:basic_cube", "textures": { "all": "mekanism:blocks/OsmiumBlock" } diff --git a/src/main/resources/assets/mekanism/blockstates/osmium_compressor.json b/src/main/resources/assets/mekanism/blockstates/osmium_compressor.json index d392e4859..9a73e345a 100644 --- a/src/main/resources/assets/mekanism/blockstates/osmium_compressor.json +++ b/src/main/resources/assets/mekanism/blockstates/osmium_compressor.json @@ -3,10 +3,10 @@ "defaults": { "model": "mekanism:machine", "textures": { - "sides": "mekanism:blocks/SteelCasing", + "sides": "mekanism:blocks/osmium_compressor/OsmiumCompressorRight", "front": "mekanism:blocks/osmium_compressor/OsmiumCompressorFront", - "west": "mekanism:blocks/osmium_compressor/OsmiumCompressorLeft", - "east": "mekanism:blocks/osmium_compressor/OsmiumCompressorRight", + "west": "mekanism:blocks/osmium_compressor/OsmiumCompressorRight", + "east": "mekanism:blocks/osmium_compressor/OsmiumCompressorLeft", "south": "mekanism:blocks/osmium_compressor/OsmiumCompressorBack", "up": "mekanism:blocks/osmium_compressor/OsmiumCompressorTop", "down": "mekanism:blocks/osmium_compressor/OsmiumCompressorBottom" @@ -23,8 +23,8 @@ "true": { "textures": { "front": "mekanism:blocks/osmium_compressor/OsmiumCompressorFrontOn", - "west": "mekanism:blocks/osmium_compressor/OsmiumCompressorLeftOn", - "east": "mekanism:blocks/osmium_compressor/OsmiumCompressorRightOn", + "west": "mekanism:blocks/osmium_compressor/OsmiumCompressorRightOn", + "east": "mekanism:blocks/osmium_compressor/OsmiumCompressorLeftOn", "south": "mekanism:blocks/osmium_compressor/OsmiumCompressorBackOn", "up": "mekanism:blocks/osmium_compressor/OsmiumCompressorTopOn" } diff --git a/src/main/resources/assets/mekanism/blockstates/personal_chest.json b/src/main/resources/assets/mekanism/blockstates/personal_chest.json index 60646b0da..b27ef28bf 100644 --- a/src/main/resources/assets/mekanism/blockstates/personal_chest.json +++ b/src/main/resources/assets/mekanism/blockstates/personal_chest.json @@ -1,15 +1,7 @@ { "forge_marker": 1, "defaults": { - "model": "mekanism:nothing", - "textures": { - "front": "mekanism:blocks/fuelwood_heater/FuelwoodHeaterFront", - "west": "mekanism:blocks/fuelwood_heater/FuelwoodHeaterRight", - "east": "mekanism:blocks/fuelwood_heater/FuelwoodHeaterLeft", - "south": "mekanism:blocks/fuelwood_heater/FuelwoodHeaterBack", - "up": "mekanism:blocks/fuelwood_heater/FuelwoodHeaterTop", - "down": "mekanism:blocks/fuelwood_heater/FuelwoodHeaterBottom" - } + "model": "mekanism:nothing" }, "variants": { "facing": { diff --git a/src/main/resources/assets/mekanism/blockstates/precision_sawmill.json b/src/main/resources/assets/mekanism/blockstates/precision_sawmill.json index 0f722299a..6f5c3b3c6 100644 --- a/src/main/resources/assets/mekanism/blockstates/precision_sawmill.json +++ b/src/main/resources/assets/mekanism/blockstates/precision_sawmill.json @@ -3,7 +3,7 @@ "defaults": { "model": "mekanism:machine", "textures": { - "sides": "mekanism:blocks/SteelCasing", + "sides": "mekanism:blocks/precision_sawmill/PrecisionSawmillRight", "front": "mekanism:blocks/precision_sawmill/PrecisionSawmillFront", "west": "mekanism:blocks/precision_sawmill/PrecisionSawmillRight", "east": "mekanism:blocks/precision_sawmill/PrecisionSawmillLeft", diff --git a/src/main/resources/assets/mekanism/blockstates/pressure_disperser.json b/src/main/resources/assets/mekanism/blockstates/pressure_disperser.json new file mode 100644 index 000000000..bffcc1165 --- /dev/null +++ b/src/main/resources/assets/mekanism/blockstates/pressure_disperser.json @@ -0,0 +1,14 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "mekanism:basic_cube", + "textures": { + "all": "mekanism:blocks/PressureDisperser" + } + }, + "variants": { + "normal": [{}], + "inventory": [{}] + } +} + diff --git a/src/main/resources/assets/mekanism/blockstates/purification_chamber.json b/src/main/resources/assets/mekanism/blockstates/purification_chamber.json index 6650c300e..cefcd5ab4 100644 --- a/src/main/resources/assets/mekanism/blockstates/purification_chamber.json +++ b/src/main/resources/assets/mekanism/blockstates/purification_chamber.json @@ -3,7 +3,7 @@ "defaults": { "model": "mekanism:machine", "textures": { - "sides": "mekanism:blocks/SteelCasing", + "sides": "mekanism:blocks/purification_chamber/PurificationChamberRight", "front": "mekanism:blocks/purification_chamber/PurificationChamberFront", "west": "mekanism:blocks/purification_chamber/PurificationChamberRight", "east": "mekanism:blocks/purification_chamber/PurificationChamberLeft", diff --git a/src/main/resources/assets/mekanism/blockstates/refined_glowstone.json b/src/main/resources/assets/mekanism/blockstates/refined_glowstone.json index bca485626..bb7dd23cc 100644 --- a/src/main/resources/assets/mekanism/blockstates/refined_glowstone.json +++ b/src/main/resources/assets/mekanism/blockstates/refined_glowstone.json @@ -1,7 +1,7 @@ { "forge_marker": 1, "defaults": { - "model": "cube_all", + "model": "mekanism:basic_cube", "textures": { "all": "mekanism:blocks/RefinedGlowstone" } diff --git a/src/main/resources/assets/mekanism/blockstates/refined_obsidian.json b/src/main/resources/assets/mekanism/blockstates/refined_obsidian.json index a3e14baf2..209d559c4 100644 --- a/src/main/resources/assets/mekanism/blockstates/refined_obsidian.json +++ b/src/main/resources/assets/mekanism/blockstates/refined_obsidian.json @@ -1,7 +1,7 @@ { "forge_marker": 1, "defaults": { - "model": "cube_all", + "model": "mekanism:basic_cube", "textures": { "all": "mekanism:blocks/RefinedObsidian" } diff --git a/src/main/resources/assets/mekanism/blockstates/resistive_heater.json b/src/main/resources/assets/mekanism/blockstates/resistive_heater.json index e9c3b22fa..9ba821f92 100644 --- a/src/main/resources/assets/mekanism/blockstates/resistive_heater.json +++ b/src/main/resources/assets/mekanism/blockstates/resistive_heater.json @@ -11,7 +11,7 @@ "west": {"y": -90} }, "active": { - "true": {"textures": {"front": "mekanism:blocks/oredictionificator/OredictionificatorFrontOn"}}, + "true": {}, "false": {} }, "inventory": [{}] diff --git a/src/main/resources/assets/mekanism/blockstates/security_desk.json b/src/main/resources/assets/mekanism/blockstates/security_desk.json index d4be63785..f54fccede 100644 --- a/src/main/resources/assets/mekanism/blockstates/security_desk.json +++ b/src/main/resources/assets/mekanism/blockstates/security_desk.json @@ -1,7 +1,7 @@ { "forge_marker": 1, "defaults": { - "model": "mekanism:security_desk" + "model": "mekanism:nothing" }, "variants": { "normal": [{}], @@ -11,10 +11,6 @@ "east": {"y": 90}, "west": {"y": -90} }, - "active": { - "true": {}, - "false": {} - }, "inventory": [{}] } } diff --git a/src/main/resources/assets/mekanism/blockstates/seismic_vibrator.json b/src/main/resources/assets/mekanism/blockstates/seismic_vibrator.json index 1e227193b..a629ee93e 100644 --- a/src/main/resources/assets/mekanism/blockstates/seismic_vibrator.json +++ b/src/main/resources/assets/mekanism/blockstates/seismic_vibrator.json @@ -1,7 +1,7 @@ { "forge_marker": 1, "defaults": { - "model": "mekanism:seismic_vibrator" + "model": "mekanism:nothing" }, "variants": { "normal": [{}], diff --git a/src/main/resources/assets/mekanism/blockstates/solar_neutron_activator.json b/src/main/resources/assets/mekanism/blockstates/solar_neutron_activator.json index 136868436..591d119c5 100644 --- a/src/main/resources/assets/mekanism/blockstates/solar_neutron_activator.json +++ b/src/main/resources/assets/mekanism/blockstates/solar_neutron_activator.json @@ -1,7 +1,7 @@ { "forge_marker": 1, "defaults": { - "model": "mekanism:solar_neutron_activator" + "model": "mekanism:nothing" }, "variants": { "facing": { diff --git a/src/main/resources/assets/mekanism/blockstates/steel_block.json b/src/main/resources/assets/mekanism/blockstates/steel_block.json index bf0d9dbfe..68e9d2930 100644 --- a/src/main/resources/assets/mekanism/blockstates/steel_block.json +++ b/src/main/resources/assets/mekanism/blockstates/steel_block.json @@ -1,7 +1,7 @@ { "forge_marker": 1, "defaults": { - "model": "cube_all", + "model": "mekanism:basic_cube", "textures": { "all": "mekanism:blocks/SteelBlock" } diff --git a/src/main/resources/assets/mekanism/blockstates/steel_casing.json b/src/main/resources/assets/mekanism/blockstates/steel_casing.json index 2c6e1c144..68e8d932c 100644 --- a/src/main/resources/assets/mekanism/blockstates/steel_casing.json +++ b/src/main/resources/assets/mekanism/blockstates/steel_casing.json @@ -1,7 +1,7 @@ { "forge_marker": 1, "defaults": { - "model": "cube_all", + "model": "mekanism:basic_cube", "textures": { "all": "mekanism:blocks/SteelCasing" } diff --git a/src/main/resources/assets/mekanism/blockstates/structural_glass.json b/src/main/resources/assets/mekanism/blockstates/structural_glass.json index 4083a5b20..f32198076 100644 --- a/src/main/resources/assets/mekanism/blockstates/structural_glass.json +++ b/src/main/resources/assets/mekanism/blockstates/structural_glass.json @@ -1,9 +1,9 @@ { "forge_marker": 1, "defaults": { - "model": "cube_all", + "model": "mekanism:basic_cube", "textures": { - "all": "mekanism:blocks/DynamicGlass" + "all": "mekanism:blocks/ctm/dynamic_glass" } }, "variants": { diff --git a/src/main/resources/assets/mekanism/blockstates/superheating_element.json b/src/main/resources/assets/mekanism/blockstates/superheating_element.json new file mode 100644 index 000000000..6943c41a7 --- /dev/null +++ b/src/main/resources/assets/mekanism/blockstates/superheating_element.json @@ -0,0 +1,14 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "mekanism:basic_cube", + "textures": { + "all": "mekanism:blocks/ctm/superheating_element" + } + }, + "variants": { + "normal": [{}], + "inventory": [{}] + } +} + diff --git a/src/main/resources/assets/mekanism/blockstates/teleporter.json b/src/main/resources/assets/mekanism/blockstates/teleporter.json index ef65e97a5..6f2dd8a61 100644 --- a/src/main/resources/assets/mekanism/blockstates/teleporter.json +++ b/src/main/resources/assets/mekanism/blockstates/teleporter.json @@ -1,9 +1,9 @@ { "forge_marker": 1, "defaults": { - "model": "cube_all", + "model": "mekanism:basic_cube", "textures": { - "all": "mekanism:blocks/ctm/Teleporter" + "all": "mekanism:blocks/ctm/teleporter" } }, "variants": { diff --git a/src/main/resources/assets/mekanism/blockstates/teleporter_frame.json b/src/main/resources/assets/mekanism/blockstates/teleporter_frame.json index 738c7e6d4..b09eeb541 100644 --- a/src/main/resources/assets/mekanism/blockstates/teleporter_frame.json +++ b/src/main/resources/assets/mekanism/blockstates/teleporter_frame.json @@ -1,9 +1,9 @@ { "forge_marker": 1, "defaults": { - "model": "cube_all", + "model": "mekanism:basic_cube", "textures": { - "all": "mekanism:blocks/TeleporterFrame" + "all": "mekanism:blocks/ctm/teleporter_frame" } }, "variants": { diff --git a/src/main/resources/assets/mekanism/blockstates/thermal_evaporation_block.json b/src/main/resources/assets/mekanism/blockstates/thermal_evaporation_block.json index 4c7d9dccc..1c74369d2 100644 --- a/src/main/resources/assets/mekanism/blockstates/thermal_evaporation_block.json +++ b/src/main/resources/assets/mekanism/blockstates/thermal_evaporation_block.json @@ -1,9 +1,9 @@ { "forge_marker": 1, "defaults": { - "model": "cube_all", + "model": "mekanism:basic_cube", "textures": { - "all": "mekanism:blocks/SalinationBlock" + "all": "mekanism:blocks/ctm/thermal_evaporation_block" } }, "variants": { diff --git a/src/main/resources/assets/mekanism/blockstates/thermal_evaporation_controller.json b/src/main/resources/assets/mekanism/blockstates/thermal_evaporation_controller.json index 313dda6a1..61ab2f43f 100644 --- a/src/main/resources/assets/mekanism/blockstates/thermal_evaporation_controller.json +++ b/src/main/resources/assets/mekanism/blockstates/thermal_evaporation_controller.json @@ -3,21 +3,18 @@ "defaults": { "model": "mekanism:machine", "textures": { - "sides": "mekanism:blocks/SalinationBlock", - "front": "mekanism:blocks/SalinationController" + "sides": "mekanism:blocks/ctm/thermal_evaporation_block", + "front": "mekanism:blocks/ctm/thermal_evaporation_controller" } }, "variants": { + "normal": [{}], "facing": { "north": {}, "south": {"y": 180}, "east": {"y": 90}, "west": {"y": -90} }, - "active": { - "true": {"textures": {"front": "mekanism:blocks/SalinationControllerOn"}}, - "false": {} - }, "inventory": [{}] } } diff --git a/src/main/resources/assets/mekanism/blockstates/thermal_evaporation_valve.json b/src/main/resources/assets/mekanism/blockstates/thermal_evaporation_valve.json index 20a2da7d0..2b1da32df 100644 --- a/src/main/resources/assets/mekanism/blockstates/thermal_evaporation_valve.json +++ b/src/main/resources/assets/mekanism/blockstates/thermal_evaporation_valve.json @@ -1,9 +1,9 @@ { "forge_marker": 1, "defaults": { - "model": "cube_all", + "model": "mekanism:basic_cube", "textures": { - "all": "mekanism:blocks/SalinationValve" + "all": "mekanism:blocks/ctm/thermal_evaporation_valve" } }, "variants": { diff --git a/src/main/resources/assets/mekanism/blockstates/tin_block.json b/src/main/resources/assets/mekanism/blockstates/tin_block.json index ece52fdea..378f3e194 100644 --- a/src/main/resources/assets/mekanism/blockstates/tin_block.json +++ b/src/main/resources/assets/mekanism/blockstates/tin_block.json @@ -1,7 +1,7 @@ { "forge_marker": 1, "defaults": { - "model": "cube_all", + "model": "mekanism:basic_cube", "textures": { "all": "mekanism:blocks/TinBlock" } diff --git a/src/main/resources/assets/mekanism/gui/GuiChemicalCrystallizer.png b/src/main/resources/assets/mekanism/gui/GuiChemicalCrystallizer.png index 4d735ec80..e86fd7e00 100644 Binary files a/src/main/resources/assets/mekanism/gui/GuiChemicalCrystallizer.png and b/src/main/resources/assets/mekanism/gui/GuiChemicalCrystallizer.png differ diff --git a/src/main/resources/assets/mekanism/lang/en_US.lang b/src/main/resources/assets/mekanism/lang/en_US.lang index af35071d3..0f0bfd485 100644 --- a/src/main/resources/assets/mekanism/lang/en_US.lang +++ b/src/main/resources/assets/mekanism/lang/en_US.lang @@ -232,7 +232,7 @@ item.steelDust.name=Steel Dust item.copperDust.name=Copper Dust item.tinDust.name=Tin Dust item.silverDust.name=Silver Dust -//empty +item.leadDust.name=Lead Dust item.sulfurDust.name=Sulfur Dust item.lithiumDust.name=Lithium Dust diff --git a/src/main/resources/assets/mekanism/models/item/EnergyCube.json b/src/main/resources/assets/mekanism/models/block/basic_cube.json similarity index 68% rename from src/main/resources/assets/mekanism/models/item/EnergyCube.json rename to src/main/resources/assets/mekanism/models/block/basic_cube.json index 16ad0ee6f..6c88582bc 100644 --- a/src/main/resources/assets/mekanism/models/item/EnergyCube.json +++ b/src/main/resources/assets/mekanism/models/block/basic_cube.json @@ -1,11 +1,10 @@ { - "parent": "mekanism:block/energy_cube", + "parent": "block/cube_all", "display": { - "thirdperson": { + "thirdperson": { "rotation": [ 10, -45, 170 ], "translation": [ 0, 1.5, -2.75 ], "scale": [ 0.375, 0.375, 0.375 ] } } -} - +} \ No newline at end of file diff --git a/src/main/resources/assets/mekanism/models/block/chargepad.json b/src/main/resources/assets/mekanism/models/block/chargepad.json index 7fb083efe..cd721527c 100644 --- a/src/main/resources/assets/mekanism/models/block/chargepad.json +++ b/src/main/resources/assets/mekanism/models/block/chargepad.json @@ -94,6 +94,13 @@ ], "textures": { "all": "mekanism:blocks/models/chargepad", - "particle": "..." + "particle": "mekanism:blocks/SteelCasing" + }, + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } } } diff --git a/src/main/resources/assets/mekanism/models/block/chemical_crystallizer.json b/src/main/resources/assets/mekanism/models/block/chemical_crystallizer.json deleted file mode 100644 index e9242143b..000000000 --- a/src/main/resources/assets/mekanism/models/block/chemical_crystallizer.json +++ /dev/null @@ -1,229 +0,0 @@ -{ - "elements": [ - { - "__comment": "rimBack", - "from": [0, 5, 14], - "to": [16, 7, 16], - "faces": { - "down": {"uv": [4.25, 5.75, 2.25, 6], "texture": "#all"}, - "up": {"uv": [2.25, 6, 0.25, 5.75], "texture": "#all"}, - "north": {"uv": [0.25, 6, 2.25, 6.25], "texture": "#all"}, - "south": {"uv": [2.5, 6, 4.5, 6.25], "texture": "#all"}, - "west": {"uv": [2.25, 6, 2.5, 6.25], "texture": "#all"}, - "east": {"uv": [0, 6, 0.25, 6.25], "texture": "#all"} - } - }, - { - "__comment": "support2", - "from": [0.5, 6, 0.5], - "to": [1.5, 11, 1.5], - "faces": { - "down": {"uv": [0.375, 0, 0.25, 0.125], "texture": "#all"}, - "up": {"uv": [0.25, 0.125, 0.125, 0], "texture": "#all"}, - "north": {"uv": [0.125, 0.125, 0.25, 0.75], "texture": "#all"}, - "south": {"uv": [0.375, 0.125, 0.5, 0.75], "texture": "#all"}, - "west": {"uv": [0.25, 0.125, 0.375, 0.75], "texture": "#all"}, - "east": {"uv": [0, 0.125, 0.125, 0.75], "texture": "#all"} - } - }, - { - "__comment": "portRight", - "from": [-0.00999999999999979, 3, 3], - "to": [0.99, 13, 13], - "faces": { - "down": {"uv": [8.25, 5.25, 8.125, 6.5], "texture": "#all"}, - "up": {"uv": [8.125, 6.5, 8, 5.25], "texture": "#all"}, - "north": {"uv": [8, 6.5, 8.125, 7.75], "texture": "#all"}, - "south": {"uv": [9.375, 6.5, 9.5, 7.75], "texture": "#all"}, - "west": {"uv": [8.125, 6.5, 9.375, 7.75], "texture": "#all"}, - "east": {"uv": [6.75, 6.5, 8, 7.75], "texture": "#all"} - } - }, - { - "__comment": "tank", - "from": [0, 11, 0], - "to": [16, 16, 16], - "faces": { - "down": {"uv": [6, 0, 4, 2], "texture": "#all"}, - "up": {"uv": [4, 2, 2, 0], "texture": "#all"}, - "north": {"uv": [2, 2, 4, 2.625], "texture": "#all"}, - "south": {"uv": [6, 2, 8, 2.625], "texture": "#all"}, - "west": {"uv": [4, 2, 6, 2.625], "texture": "#all"}, - "east": {"uv": [0, 2, 2, 2.625], "texture": "#all"} - } - }, - { - "__comment": "tray", - "from": [3, 4.5, 3], - "to": [13, 5.5, 13], - "faces": { - "down": {"uv": [9.75, 0, 8.5, 1.25], "texture": "#all"}, - "up": {"uv": [8.5, 1.25, 7.25, 0], "texture": "#all"}, - "north": {"uv": [7.25, 1.25, 8.5, 1.375], "texture": "#all"}, - "south": {"uv": [9.75, 1.25, 11, 1.375], "texture": "#all"}, - "west": {"uv": [8.5, 1.25, 9.75, 1.375], "texture": "#all"}, - "east": {"uv": [6, 1.25, 7.25, 1.375], "texture": "#all"} - } - }, - { - "__comment": "portLeft", - "from": [15.01, 4, 4], - "to": [16.01, 12, 12], - "faces": { - "down": {"uv": [5.75, 5.25, 5.625, 6.25], "texture": "#all"}, - "up": {"uv": [5.625, 6.25, 5.5, 5.25], "texture": "#all"}, - "north": {"uv": [5.5, 6.25, 5.625, 7.25], "texture": "#all"}, - "south": {"uv": [6.625, 6.25, 6.75, 7.25], "texture": "#all"}, - "west": {"uv": [5.625, 6.25, 6.625, 7.25], "texture": "#all"}, - "east": {"uv": [4.5, 6.25, 5.5, 7.25], "texture": "#all"} - } - }, - { - "__comment": "rimRight", - "from": [0, 5, 2], - "to": [2, 7, 14], - "faces": { - "down": {"uv": [2, 6.25, 1.75, 7.75], "texture": "#all"}, - "up": {"uv": [1.75, 7.75, 1.5, 6.25], "texture": "#all"}, - "north": {"uv": [1.5, 7.75, 1.75, 8], "texture": "#all"}, - "south": {"uv": [3.25, 7.75, 3.5, 8], "texture": "#all"}, - "west": {"uv": [1.75, 7.75, 3.25, 8], "texture": "#all"}, - "east": {"uv": [0, 7.75, 1.5, 8], "texture": "#all"} - } - }, - { - "__comment": "Shape1", - "from": [1, 7, 1], - "to": [15, 11, 15], - "faces": { - "down": {"uv": [13.25, 1.375, 11.5, 3.125], "texture": "#all"}, - "up": {"uv": [11.5, 3.125, 9.75, 1.375], "texture": "#all"}, - "north": {"uv": [9.75, 3.125, 11.5, 3.625], "texture": "#all"}, - "south": {"uv": [13.25, 3.125, 15, 3.625], "texture": "#all"}, - "west": {"uv": [11.5, 3.125, 13.25, 3.625], "texture": "#all"}, - "east": {"uv": [8, 3.125, 9.75, 3.625], "texture": "#all"} - } - }, - { - "__comment": "rod3", - "from": [7.5, 7, 6], - "to": [8.5, 11, 7], - "faces": { - "down": {"uv": [0.875, 0, 0.75, 0.125], "texture": "#all"}, - "up": {"uv": [0.75, 0.125, 0.625, 0], "texture": "#all"}, - "north": {"uv": [0.625, 0.125, 0.75, 0.625], "texture": "#all"}, - "south": {"uv": [0.875, 0.125, 1, 0.625], "texture": "#all"}, - "west": {"uv": [0.75, 0.125, 0.875, 0.625], "texture": "#all"}, - "east": {"uv": [0.5, 0.125, 0.625, 0.625], "texture": "#all"} - } - }, - { - "__comment": "rod1", - "from": [9, 9, 8], - "to": [10, 11, 9], - "faces": { - "down": {"uv": [1.375, 0, 1.25, 0.125], "texture": "#all"}, - "up": {"uv": [1.25, 0.125, 1.125, 0], "texture": "#all"}, - "north": {"uv": [1.125, 0.125, 1.25, 0.375], "texture": "#all"}, - "south": {"uv": [1.375, 0.125, 1.5, 0.375], "texture": "#all"}, - "west": {"uv": [1.25, 0.125, 1.375, 0.375], "texture": "#all"}, - "east": {"uv": [1, 0.125, 1.125, 0.375], "texture": "#all"} - } - }, - { - "__comment": "base", - "from": [0, 0, 0], - "to": [16, 5, 16], - "faces": { - "down": {"uv": [6, 2.625, 4, 4.625], "texture": "#all"}, - "up": {"uv": [4, 4.625, 2, 2.625], "texture": "#all"}, - "north": {"uv": [2, 4.625, 4, 5.25], "texture": "#all"}, - "south": {"uv": [6, 4.625, 8, 5.25], "texture": "#all"}, - "west": {"uv": [4, 4.625, 6, 5.25], "texture": "#all"}, - "east": {"uv": [0, 4.625, 2, 5.25], "texture": "#all"} - } - }, - { - "__comment": "rod2", - "from": [6, 8, 9], - "to": [7, 11, 10], - "faces": { - "down": {"uv": [1.375, 0.375, 1.25, 0.5], "texture": "#all"}, - "up": {"uv": [1.25, 0.5, 1.125, 0.375], "texture": "#all"}, - "north": {"uv": [1.125, 0.5, 1.25, 0.875], "texture": "#all"}, - "south": {"uv": [1.375, 0.5, 1.5, 0.875], "texture": "#all"}, - "west": {"uv": [1.25, 0.5, 1.375, 0.875], "texture": "#all"}, - "east": {"uv": [1, 0.5, 1.125, 0.875], "texture": "#all"} - } - }, - { - "__comment": "support3", - "from": [14.5, 6, 14.5], - "to": [15.5, 11, 15.5], - "faces": { - "down": {"uv": [0.375, 0, 0.25, 0.125], "texture": "#all"}, - "up": {"uv": [0.25, 0.125, 0.125, 0], "texture": "#all"}, - "north": {"uv": [0.125, 0.125, 0.25, 0.75], "texture": "#all"}, - "south": {"uv": [0.375, 0.125, 0.5, 0.75], "texture": "#all"}, - "west": {"uv": [0.25, 0.125, 0.375, 0.75], "texture": "#all"}, - "east": {"uv": [0, 0.125, 0.125, 0.75], "texture": "#all"} - } - }, - { - "__comment": "rimLeft", - "from": [14, 5, 2], - "to": [16, 7, 14], - "faces": { - "down": {"uv": [2, 6.25, 1.75, 7.75], "texture": "#all"}, - "up": {"uv": [1.75, 7.75, 1.5, 6.25], "texture": "#all"}, - "north": {"uv": [1.5, 7.75, 1.75, 8], "texture": "#all"}, - "south": {"uv": [3.25, 7.75, 3.5, 8], "texture": "#all"}, - "west": {"uv": [1.75, 7.75, 3.25, 8], "texture": "#all"}, - "east": {"uv": [0, 7.75, 1.5, 8], "texture": "#all"} - } - }, - { - "__comment": "rimFront", - "from": [0, 5, 0], - "to": [16, 7, 2], - "faces": { - "down": {"uv": [4.25, 5.25, 2.25, 5.5], "texture": "#all"}, - "up": {"uv": [2.25, 5.5, 0.25, 5.25], "texture": "#all"}, - "north": {"uv": [0.25, 5.5, 2.25, 5.75], "texture": "#all"}, - "south": {"uv": [2.5, 5.5, 4.5, 5.75], "texture": "#all"}, - "west": {"uv": [2.25, 5.5, 2.5, 5.75], "texture": "#all"}, - "east": {"uv": [0, 5.5, 0.25, 5.75], "texture": "#all"} - } - }, - { - "__comment": "support1", - "from": [14.5, 6, 0.5], - "to": [15.5, 11, 1.5], - "faces": { - "down": {"uv": [0.375, 0, 0.25, 0.125], "texture": "#all"}, - "up": {"uv": [0.25, 0.125, 0.125, 0], "texture": "#all"}, - "north": {"uv": [0.125, 0.125, 0.25, 0.75], "texture": "#all"}, - "south": {"uv": [0.375, 0.125, 0.5, 0.75], "texture": "#all"}, - "west": {"uv": [0.25, 0.125, 0.375, 0.75], "texture": "#all"}, - "east": {"uv": [0, 0.125, 0.125, 0.75], "texture": "#all"} - } - }, - { - "__comment": "support4", - "from": [0.5, 6, 14.5], - "to": [1.5, 11, 15.5], - "faces": { - "down": {"uv": [0.375, 0, 0.25, 0.125], "texture": "#all"}, - "up": {"uv": [0.25, 0.125, 0.125, 0], "texture": "#all"}, - "north": {"uv": [0.125, 0.125, 0.25, 0.75], "texture": "#all"}, - "south": {"uv": [0.375, 0.125, 0.5, 0.75], "texture": "#all"}, - "west": {"uv": [0.25, 0.125, 0.375, 0.75], "texture": "#all"}, - "east": {"uv": [0, 0.125, 0.125, 0.75], "texture": "#all"} - } - } - ], - "textures": { - "all": "mekanism:blocks/models/chemical_crystallizer", - "particle": "..." - } -} diff --git a/src/main/resources/assets/mekanism/models/block/chemical_dissolution_chamber.json b/src/main/resources/assets/mekanism/models/block/chemical_dissolution_chamber.json deleted file mode 100644 index 1ecff1153..000000000 --- a/src/main/resources/assets/mekanism/models/block/chemical_dissolution_chamber.json +++ /dev/null @@ -1,398 +0,0 @@ -{ - "elements": [ - { - "__comment": "glass", - "from": [1, 7, 1], - "to": [15, 12, 14], - "faces": { - "down": {"uv": [13.125, 1.75, 11.375, 3.375], "texture": "#all"}, - "up": {"uv": [11.375, 3.375, 9.625, 1.75], "texture": "#all"}, - "north": {"uv": [9.625, 3.375, 11.375, 4], "texture": "#all"}, - "south": {"uv": [13, 3.375, 14.75, 4], "texture": "#all"}, - "west": {"uv": [11.375, 3.375, 13, 4], "texture": "#all"}, - "east": {"uv": [8, 3.375, 9.625, 4], "texture": "#all"} - } - }, - { - "__comment": "vat2", - "from": [10, 7, 6.5], - "to": [13, 11, 9.5], - "faces": { - "down": {"uv": [1.125, 2.875, 0.75, 3.25], "texture": "#all"}, - "up": {"uv": [0.75, 3.25, 0.375, 2.875], "texture": "#all"}, - "north": {"uv": [0.375, 3.25, 0.75, 3.75], "texture": "#all"}, - "south": {"uv": [1.125, 3.25, 1.5, 3.75], "texture": "#all"}, - "west": {"uv": [0.75, 3.25, 1.125, 3.75], "texture": "#all"}, - "east": {"uv": [0, 3.25, 0.375, 3.75], "texture": "#all"} - } - }, - { - "__comment": "portToggle1", - "from": [15.01, 3.01, 3], - "to": [16.01, 13.01, 13], - "faces": { - "down": {"uv": [14.75, 0, 14.625, 1.25], "texture": "#all"}, - "up": {"uv": [14.625, 1.25, 14.5, 0], "texture": "#all"}, - "north": {"uv": [14.5, 1.25, 14.625, 2.5], "texture": "#all"}, - "south": {"uv": [15.875, 1.25, 16, 2.5], "texture": "#all"}, - "west": {"uv": [14.625, 1.25, 15.875, 2.5], "texture": "#all"}, - "east": {"uv": [13.25, 1.25, 14.5, 2.5], "texture": "#all"} - } - }, - { - "__comment": "vat9", - "from": [3, 7, 10], - "to": [6, 11, 13], - "faces": { - "down": {"uv": [1.125, 2.875, 0.75, 3.25], "texture": "#all"}, - "up": {"uv": [0.75, 3.25, 0.375, 2.875], "texture": "#all"}, - "north": {"uv": [0.375, 3.25, 0.75, 3.75], "texture": "#all"}, - "south": {"uv": [1.125, 3.25, 1.5, 3.75], "texture": "#all"}, - "west": {"uv": [0.75, 3.25, 1.125, 3.75], "texture": "#all"}, - "east": {"uv": [0, 3.25, 0.375, 3.75], "texture": "#all"} - } - }, - { - "__comment": "backEdge1", - "from": [15, 7, 15], - "to": [16, 15, 16], - "faces": { - "down": {"uv": [1.375, 0, 1.25, 0.125], "texture": "#all"}, - "up": {"uv": [1.25, 0.125, 1.125, 0], "texture": "#all"}, - "north": {"uv": [1.125, 0.125, 1.25, 1.125], "texture": "#all"}, - "south": {"uv": [1.375, 0.125, 1.5, 1.125], "texture": "#all"}, - "west": {"uv": [1.25, 0.125, 1.375, 1.125], "texture": "#all"}, - "east": {"uv": [1, 0.125, 1.125, 1.125], "texture": "#all"} - } - }, - { - "__comment": "support2", - "from": [1, 13, 1], - "to": [2, 15, 2], - "faces": { - "down": {"uv": [0.875, 0, 0.75, 0.125], "texture": "#all"}, - "up": {"uv": [0.75, 0.125, 0.625, 0], "texture": "#all"}, - "north": {"uv": [0.625, 0.125, 0.75, 0.375], "texture": "#all"}, - "south": {"uv": [0.875, 0.125, 1, 0.375], "texture": "#all"}, - "west": {"uv": [0.75, 0.125, 0.875, 0.375], "texture": "#all"}, - "east": {"uv": [0.5, 0.125, 0.625, 0.375], "texture": "#all"} - } - }, - { - "__comment": "nozzle4", - "from": [7.5, 11.5, 4], - "to": [8.5, 12.5, 5], - "faces": { - "down": {"uv": [0.375, 0, 0.25, 0.125], "texture": "#all"}, - "up": {"uv": [0.25, 0.125, 0.125, 0], "texture": "#all"}, - "north": {"uv": [0.125, 0.125, 0.25, 0.25], "texture": "#all"}, - "south": {"uv": [0.375, 0.125, 0.5, 0.25], "texture": "#all"}, - "west": {"uv": [0.25, 0.125, 0.375, 0.25], "texture": "#all"}, - "east": {"uv": [0, 0.125, 0.125, 0.25], "texture": "#all"} - } - }, - { - "__comment": "vat4", - "from": [6.5, 7, 3], - "to": [9.5, 11, 6], - "faces": { - "down": {"uv": [1.125, 2.875, 0.75, 3.25], "texture": "#all"}, - "up": {"uv": [0.75, 3.25, 0.375, 2.875], "texture": "#all"}, - "north": {"uv": [0.375, 3.25, 0.75, 3.75], "texture": "#all"}, - "south": {"uv": [1.125, 3.25, 1.5, 3.75], "texture": "#all"}, - "west": {"uv": [0.75, 3.25, 1.125, 3.75], "texture": "#all"}, - "east": {"uv": [0, 3.25, 0.375, 3.75], "texture": "#all"} - } - }, - { - "__comment": "vat3", - "from": [10, 7, 10], - "to": [13, 11, 13], - "faces": { - "down": {"uv": [1.125, 2.875, 0.75, 3.25], "texture": "#all"}, - "up": {"uv": [0.75, 3.25, 0.375, 2.875], "texture": "#all"}, - "north": {"uv": [0.375, 3.25, 0.75, 3.75], "texture": "#all"}, - "south": {"uv": [1.125, 3.25, 1.5, 3.75], "texture": "#all"}, - "west": {"uv": [0.75, 3.25, 1.125, 3.75], "texture": "#all"}, - "east": {"uv": [0, 3.25, 0.375, 3.75], "texture": "#all"} - } - }, - { - "__comment": "vents", - "from": [4, 13, 4], - "to": [12, 15, 14], - "faces": { - "down": {"uv": [12, 0, 11, 1.25], "texture": "#all"}, - "up": {"uv": [11, 1.25, 10, 0], "texture": "#all"}, - "north": {"uv": [10, 1.25, 11, 1.5], "texture": "#all"}, - "south": {"uv": [12.25, 1.25, 13.25, 1.5], "texture": "#all"}, - "west": {"uv": [11, 1.25, 12.25, 1.5], "texture": "#all"}, - "east": {"uv": [8.75, 1.25, 10, 1.5], "texture": "#all"} - } - }, - { - "__comment": "portToggle2", - "from": [-0.00999999999999979, 4, 4], - "to": [0.99, 12, 12], - "faces": { - "down": {"uv": [9.25, 4, 9.125, 5], "texture": "#all"}, - "up": {"uv": [9.125, 5, 9, 4], "texture": "#all"}, - "north": {"uv": [9, 5, 9.125, 6], "texture": "#all"}, - "south": {"uv": [10.125, 5, 10.25, 6], "texture": "#all"}, - "west": {"uv": [9.125, 5, 10.125, 6], "texture": "#all"}, - "east": {"uv": [8, 5, 9, 6], "texture": "#all"} - } - }, - { - "__comment": "backEdge2", - "from": [0, 7, 15], - "to": [1, 15, 16], - "faces": { - "down": {"uv": [1.375, 0, 1.25, 0.125], "texture": "#all"}, - "up": {"uv": [1.25, 0.125, 1.125, 0], "texture": "#all"}, - "north": {"uv": [1.125, 0.125, 1.25, 1.125], "texture": "#all"}, - "south": {"uv": [1.375, 0.125, 1.5, 1.125], "texture": "#all"}, - "west": {"uv": [1.25, 0.125, 1.375, 1.125], "texture": "#all"}, - "east": {"uv": [1, 0.125, 1.125, 1.125], "texture": "#all"} - } - }, - { - "__comment": "vat7", - "from": [3, 7, 3], - "to": [6, 11, 6], - "faces": { - "down": {"uv": [1.125, 2.875, 0.75, 3.25], "texture": "#all"}, - "up": {"uv": [0.75, 3.25, 0.375, 2.875], "texture": "#all"}, - "north": {"uv": [0.375, 3.25, 0.75, 3.75], "texture": "#all"}, - "south": {"uv": [1.125, 3.25, 1.5, 3.75], "texture": "#all"}, - "west": {"uv": [0.75, 3.25, 1.125, 3.75], "texture": "#all"}, - "east": {"uv": [0, 3.25, 0.375, 3.75], "texture": "#all"} - } - }, - { - "__comment": "vat5", - "from": [6.5, 7, 6.5], - "to": [9.5, 11, 9.5], - "faces": { - "down": {"uv": [1.125, 2.875, 0.75, 3.25], "texture": "#all"}, - "up": {"uv": [0.75, 3.25, 0.375, 2.875], "texture": "#all"}, - "north": {"uv": [0.375, 3.25, 0.75, 3.75], "texture": "#all"}, - "south": {"uv": [1.125, 3.25, 1.5, 3.75], "texture": "#all"}, - "west": {"uv": [0.75, 3.25, 1.125, 3.75], "texture": "#all"}, - "east": {"uv": [0, 3.25, 0.375, 3.75], "texture": "#all"} - } - }, - { - "__comment": "vat6", - "from": [6.5, 7, 10], - "to": [9.5, 11, 13], - "faces": { - "down": {"uv": [1.125, 2.875, 0.75, 3.25], "texture": "#all"}, - "up": {"uv": [0.75, 3.25, 0.375, 2.875], "texture": "#all"}, - "north": {"uv": [0.375, 3.25, 0.75, 3.75], "texture": "#all"}, - "south": {"uv": [1.125, 3.25, 1.5, 3.75], "texture": "#all"}, - "west": {"uv": [0.75, 3.25, 1.125, 3.75], "texture": "#all"}, - "east": {"uv": [0, 3.25, 0.375, 3.75], "texture": "#all"} - } - }, - { - "__comment": "nozzle9", - "from": [4, 11.5, 11], - "to": [5, 12.5, 12], - "faces": { - "down": {"uv": [0.375, 0, 0.25, 0.125], "texture": "#all"}, - "up": {"uv": [0.25, 0.125, 0.125, 0], "texture": "#all"}, - "north": {"uv": [0.125, 0.125, 0.25, 0.25], "texture": "#all"}, - "south": {"uv": [0.375, 0.125, 0.5, 0.25], "texture": "#all"}, - "west": {"uv": [0.25, 0.125, 0.375, 0.25], "texture": "#all"}, - "east": {"uv": [0, 0.125, 0.125, 0.25], "texture": "#all"} - } - }, - { - "__comment": "nozzle5", - "from": [7.5, 11.5, 7.5], - "to": [8.5, 12.5, 8.5], - "faces": { - "down": {"uv": [0.375, 0, 0.25, 0.125], "texture": "#all"}, - "up": {"uv": [0.25, 0.125, 0.125, 0], "texture": "#all"}, - "north": {"uv": [0.125, 0.125, 0.25, 0.25], "texture": "#all"}, - "south": {"uv": [0.375, 0.125, 0.5, 0.25], "texture": "#all"}, - "west": {"uv": [0.25, 0.125, 0.375, 0.25], "texture": "#all"}, - "east": {"uv": [0, 0.125, 0.125, 0.25], "texture": "#all"} - } - }, - { - "__comment": "nozzle8", - "from": [4, 11.5, 7.5], - "to": [5, 12.5, 8.5], - "faces": { - "down": {"uv": [0.375, 0, 0.25, 0.125], "texture": "#all"}, - "up": {"uv": [0.25, 0.125, 0.125, 0], "texture": "#all"}, - "north": {"uv": [0.125, 0.125, 0.25, 0.25], "texture": "#all"}, - "south": {"uv": [0.375, 0.125, 0.5, 0.25], "texture": "#all"}, - "west": {"uv": [0.25, 0.125, 0.375, 0.25], "texture": "#all"}, - "east": {"uv": [0, 0.125, 0.125, 0.25], "texture": "#all"} - } - }, - { - "__comment": "support1", - "from": [14, 13, 1], - "to": [15, 15, 2], - "faces": { - "down": {"uv": [0.875, 0, 0.75, 0.125], "texture": "#all"}, - "up": {"uv": [0.75, 0.125, 0.625, 0], "texture": "#all"}, - "north": {"uv": [0.625, 0.125, 0.75, 0.375], "texture": "#all"}, - "south": {"uv": [0.875, 0.125, 1, 0.375], "texture": "#all"}, - "west": {"uv": [0.75, 0.125, 0.875, 0.375], "texture": "#all"}, - "east": {"uv": [0.5, 0.125, 0.625, 0.375], "texture": "#all"} - } - }, - { - "__comment": "nozzle6", - "from": [7.5, 11.5, 11], - "to": [8.5, 12.5, 12], - "faces": { - "down": {"uv": [0.375, 0, 0.25, 0.125], "texture": "#all"}, - "up": {"uv": [0.25, 0.125, 0.125, 0], "texture": "#all"}, - "north": {"uv": [0.125, 0.125, 0.25, 0.25], "texture": "#all"}, - "south": {"uv": [0.375, 0.125, 0.5, 0.25], "texture": "#all"}, - "west": {"uv": [0.25, 0.125, 0.375, 0.25], "texture": "#all"}, - "east": {"uv": [0, 0.125, 0.125, 0.25], "texture": "#all"} - } - }, - { - "__comment": "base", - "from": [0, 0, 0], - "to": [16, 7, 16], - "faces": { - "down": {"uv": [6, 0, 4, 2], "texture": "#all"}, - "up": {"uv": [4, 2, 2, 0], "texture": "#all"}, - "north": {"uv": [2, 2, 4, 2.875], "texture": "#all"}, - "south": {"uv": [6, 2, 8, 2.875], "texture": "#all"}, - "west": {"uv": [4, 2, 6, 2.875], "texture": "#all"}, - "east": {"uv": [0, 2, 2, 2.875], "texture": "#all"} - } - }, - { - "__comment": "vat1", - "from": [10, 7, 3], - "to": [13, 11, 6], - "faces": { - "down": {"uv": [1.125, 2.875, 0.75, 3.25], "texture": "#all"}, - "up": {"uv": [0.75, 3.25, 0.375, 2.875], "texture": "#all"}, - "north": {"uv": [0.375, 3.25, 0.75, 3.75], "texture": "#all"}, - "south": {"uv": [1.125, 3.25, 1.5, 3.75], "texture": "#all"}, - "west": {"uv": [0.75, 3.25, 1.125, 3.75], "texture": "#all"}, - "east": {"uv": [0, 3.25, 0.375, 3.75], "texture": "#all"} - } - }, - { - "__comment": "nozzle1", - "from": [11, 11.5, 4], - "to": [12, 12.5, 5], - "faces": { - "down": {"uv": [0.375, 0, 0.25, 0.125], "texture": "#all"}, - "up": {"uv": [0.25, 0.125, 0.125, 0], "texture": "#all"}, - "north": {"uv": [0.125, 0.125, 0.25, 0.25], "texture": "#all"}, - "south": {"uv": [0.375, 0.125, 0.5, 0.25], "texture": "#all"}, - "west": {"uv": [0.25, 0.125, 0.375, 0.25], "texture": "#all"}, - "east": {"uv": [0, 0.125, 0.125, 0.25], "texture": "#all"} - } - }, - { - "__comment": "vat8", - "from": [3, 7, 6.5], - "to": [6, 11, 9.5], - "faces": { - "down": {"uv": [1.125, 2.875, 0.75, 3.25], "texture": "#all"}, - "up": {"uv": [0.75, 3.25, 0.375, 2.875], "texture": "#all"}, - "north": {"uv": [0.375, 3.25, 0.75, 3.75], "texture": "#all"}, - "south": {"uv": [1.125, 3.25, 1.5, 3.75], "texture": "#all"}, - "west": {"uv": [0.75, 3.25, 1.125, 3.75], "texture": "#all"}, - "east": {"uv": [0, 3.25, 0.375, 3.75], "texture": "#all"} - } - }, - { - "__comment": "top2", - "from": [0, 12, 0], - "to": [16, 13, 15], - "faces": { - "down": {"uv": [5.875, 5, 3.875, 6.875], "texture": "#all"}, - "up": {"uv": [3.875, 6.875, 1.875, 5], "texture": "#all"}, - "north": {"uv": [1.875, 6.875, 3.875, 7], "texture": "#all"}, - "south": {"uv": [5.75, 6.875, 7.75, 7], "texture": "#all"}, - "west": {"uv": [3.875, 6.875, 5.75, 7], "texture": "#all"}, - "east": {"uv": [0, 6.875, 1.875, 7], "texture": "#all"} - } - }, - { - "__comment": "back", - "from": [1, 7, 14], - "to": [15, 15, 16], - "faces": { - "down": {"uv": [9.75, 0, 8, 0.25], "texture": "#all"}, - "up": {"uv": [8, 0.25, 6.25, 0], "texture": "#all"}, - "north": {"uv": [6.25, 0.25, 8, 1.25], "texture": "#all"}, - "south": {"uv": [8.25, 0.25, 10, 1.25], "texture": "#all"}, - "west": {"uv": [8, 0.25, 8.25, 1.25], "texture": "#all"}, - "east": {"uv": [6, 0.25, 6.25, 1.25], "texture": "#all"} - } - }, - { - "__comment": "nozzle7", - "from": [4, 11.5, 4], - "to": [5, 12.5, 5], - "faces": { - "down": {"uv": [0.375, 0, 0.25, 0.125], "texture": "#all"}, - "up": {"uv": [0.25, 0.125, 0.125, 0], "texture": "#all"}, - "north": {"uv": [0.125, 0.125, 0.25, 0.25], "texture": "#all"}, - "south": {"uv": [0.375, 0.125, 0.5, 0.25], "texture": "#all"}, - "west": {"uv": [0.25, 0.125, 0.375, 0.25], "texture": "#all"}, - "east": {"uv": [0, 0.125, 0.125, 0.25], "texture": "#all"} - } - }, - { - "__comment": "top", - "from": [0, 15, 0], - "to": [16, 16, 16], - "faces": { - "down": {"uv": [6, 2.875, 4, 4.875], "texture": "#all"}, - "up": {"uv": [4, 4.875, 2, 2.875], "texture": "#all"}, - "north": {"uv": [2, 4.875, 4, 5], "texture": "#all"}, - "south": {"uv": [6, 4.875, 8, 5], "texture": "#all"}, - "west": {"uv": [4, 4.875, 6, 5], "texture": "#all"}, - "east": {"uv": [0, 4.875, 2, 5], "texture": "#all"} - } - }, - { - "__comment": "nozzle2", - "from": [11, 11.5, 7.5], - "to": [12, 12.5, 8.5], - "faces": { - "down": {"uv": [0.375, 0, 0.25, 0.125], "texture": "#all"}, - "up": {"uv": [0.25, 0.125, 0.125, 0], "texture": "#all"}, - "north": {"uv": [0.125, 0.125, 0.25, 0.25], "texture": "#all"}, - "south": {"uv": [0.375, 0.125, 0.5, 0.25], "texture": "#all"}, - "west": {"uv": [0.25, 0.125, 0.375, 0.25], "texture": "#all"}, - "east": {"uv": [0, 0.125, 0.125, 0.25], "texture": "#all"} - } - }, - { - "__comment": "nozzle3", - "from": [11, 11.5, 11], - "to": [12, 12.5, 12], - "faces": { - "down": {"uv": [0.375, 0, 0.25, 0.125], "texture": "#all"}, - "up": {"uv": [0.25, 0.125, 0.125, 0], "texture": "#all"}, - "north": {"uv": [0.125, 0.125, 0.25, 0.25], "texture": "#all"}, - "south": {"uv": [0.375, 0.125, 0.5, 0.25], "texture": "#all"}, - "west": {"uv": [0.25, 0.125, 0.375, 0.25], "texture": "#all"}, - "east": {"uv": [0, 0.125, 0.125, 0.25], "texture": "#all"} - } - } - ], - "textures": { - "all": "mekanism:blocks/models/chemical_dissolution_chamber", - "particle": "..." - } -} diff --git a/src/main/resources/assets/mekanism/models/block/chemical_infuser.json b/src/main/resources/assets/mekanism/models/block/chemical_infuser.json index 5cb11a64b..ed05a9820 100644 --- a/src/main/resources/assets/mekanism/models/block/chemical_infuser.json +++ b/src/main/resources/assets/mekanism/models/block/chemical_infuser.json @@ -380,6 +380,13 @@ ], "textures": { "all": "mekanism:blocks/models/chemical_infuser", - "particle": "..." + "particle": "mekanism:blocks/SteelCasing" + }, + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } } } diff --git a/src/main/resources/assets/mekanism/models/block/chemical_oxidizer.json b/src/main/resources/assets/mekanism/models/block/chemical_oxidizer.json index 36f5c821a..895350843 100644 --- a/src/main/resources/assets/mekanism/models/block/chemical_oxidizer.json +++ b/src/main/resources/assets/mekanism/models/block/chemical_oxidizer.json @@ -133,6 +133,13 @@ ], "textures": { "all": "mekanism:blocks/models/chemical_oxidizer", - "particle": "..." + "particle": "mekanism:blocks/SteelCasing" + }, + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } } } diff --git a/src/main/resources/assets/mekanism/models/block/chemical_washer.json b/src/main/resources/assets/mekanism/models/block/chemical_washer.json index 17b65abf1..2faa853f5 100644 --- a/src/main/resources/assets/mekanism/models/block/chemical_washer.json +++ b/src/main/resources/assets/mekanism/models/block/chemical_washer.json @@ -302,6 +302,13 @@ ], "textures": { "all": "mekanism:blocks/models/chemical_washer", - "particle": "..." + "particle": "mekanism:blocks/SteelCasing" + }, + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } } } diff --git a/src/main/resources/assets/mekanism/models/block/ctm_block.json b/src/main/resources/assets/mekanism/models/block/ctm_block.json index fb77712c9..fb67ec9f5 100644 --- a/src/main/resources/assets/mekanism/models/block/ctm_block.json +++ b/src/main/resources/assets/mekanism/models/block/ctm_block.json @@ -3,23 +3,30 @@ { "from": [ 0, 0, 0 ], "to": [ 16, 16, 16 ], "faces": { - "down": { "texture": "#down", "cullface": "down" }, - "up": { "texture": "#up", "cullface": "up", "rotation": 180 }, - "north": { "texture": "#north", "cullface": "north" }, - "south": { "texture": "#south", "cullface": "south" }, - "west": { "texture": "#west", "cullface": "west" }, - "east": { "texture": "#east", "cullface": "east" } + "down": { "texture": "mekanism:blocks/SteelCasing", "cullface": "down" }, + "up": { "texture": "mekanism:blocks/SteelCasing", "cullface": "up", "rotation": 180 }, + "north": { "texture": "mekanism:blocks/SteelCasing", "cullface": "north" }, + "south": { "texture": "mekanism:blocks/SteelCasing", "cullface": "south" }, + "west": { "texture": "mekanism:blocks/SteelCasing", "cullface": "west" }, + "east": { "texture": "mekanism:blocks/SteelCasing", "cullface": "east" } } } ], "textures": { - "particle": "#sides", - "down": "#sides", - "up": "#sides", - "north": "#front", - "east": "#sides", - "south": "#sides", - "west": "#sides" + "particle": "mekanism:blocks/SteelCasing", + "down": "mekanism:blocks/SteelCasing", + "up": "mekanism:blocks/SteelCasing", + "north": "mekanism:blocks/SteelCasing", + "east": "mekanism:blocks/SteelCasing", + "south": "mekanism:blocks/SteelCasing", + "west": "mekanism:blocks/SteelCasing" + }, + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } } } diff --git a/src/main/resources/assets/mekanism/models/block/cube_colour.json b/src/main/resources/assets/mekanism/models/block/cube_colour.json index a70133b66..5a162a39f 100644 --- a/src/main/resources/assets/mekanism/models/block/cube_colour.json +++ b/src/main/resources/assets/mekanism/models/block/cube_colour.json @@ -11,6 +11,13 @@ "east": { "texture": "#all", "tintindex": 0, "cullface": "east" } } } - ] + ], + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } } diff --git a/src/main/resources/assets/mekanism/models/block/electric_pump.json b/src/main/resources/assets/mekanism/models/block/electric_pump.json index b72815ce5..450962db7 100644 --- a/src/main/resources/assets/mekanism/models/block/electric_pump.json +++ b/src/main/resources/assets/mekanism/models/block/electric_pump.json @@ -13,19 +13,6 @@ "east": {"uv": [0, 0.875, 0.875, 2.375], "texture": "#all"} } }, - { - "__comment": "pipeToggleRingBack", - "from": [4.5, 4.5, 13], - "to": [11.5, 11.5, 14], - "faces": { - "down": {"uv": [4.125, 3.75, 3.25, 3.875], "texture": "#all"}, - "up": {"uv": [3.25, 3.875, 2.375, 3.75], "texture": "#all"}, - "north": {"uv": [2.375, 3.875, 3.25, 4.75], "texture": "#all"}, - "south": {"uv": [3.375, 3.875, 4.25, 4.75], "texture": "#all"}, - "west": {"uv": [3.25, 3.875, 3.375, 4.75], "texture": "#all"}, - "east": {"uv": [2.25, 3.875, 2.375, 4.75], "texture": "#all"} - } - }, { "__comment": "powerConnectorFrame1", "from": [10, 10, 1], @@ -39,19 +26,6 @@ "east": {"uv": [4.75, 3.125, 5.25, 3.25], "texture": "#all"} } }, - { - "__comment": "pipeToggleBack", - "from": [5, 5, 11], - "to": [11, 11, 15], - "faces": { - "down": {"uv": [2, 2.375, 1.25, 2.875], "texture": "#all"}, - "up": {"uv": [1.25, 2.875, 0.5, 2.375], "texture": "#all"}, - "north": {"uv": [0.5, 2.875, 1.25, 3.625], "texture": "#all"}, - "south": {"uv": [1.75, 2.875, 2.5, 3.625], "texture": "#all"}, - "west": {"uv": [1.25, 2.875, 1.75, 3.625], "texture": "#all"}, - "east": {"uv": [0, 2.875, 0.5, 3.625], "texture": "#all"} - } - }, { "__comment": "pumpBase", "from": [5, 0, 5], @@ -78,32 +52,6 @@ "east": {"uv": [8.5, 1, 9.5, 1.125], "texture": "#all"} } }, - { - "__comment": "pipeTogglePortLeft", - "from": [0, 4, 4], - "to": [1, 12, 12], - "faces": { - "down": {"uv": [1.25, 4.75, 1.125, 5.75], "texture": "#all"}, - "up": {"uv": [1.125, 5.75, 1, 4.75], "texture": "#all"}, - "north": {"uv": [1, 5.75, 1.125, 6.75], "texture": "#all"}, - "south": {"uv": [2.125, 5.75, 2.25, 6.75], "texture": "#all"}, - "west": {"uv": [1.125, 5.75, 2.125, 6.75], "texture": "#all"}, - "east": {"uv": [0, 5.75, 1, 6.75], "texture": "#all"} - } - }, - { - "__comment": "pipeToggleRingRight", - "from": [13, 4.5, 4.5], - "to": [14, 11.5, 11.5], - "faces": { - "down": {"uv": [3.375, 4.75, 3.25, 5.625], "texture": "#all"}, - "up": {"uv": [3.25, 5.625, 3.125, 4.75], "texture": "#all"}, - "north": {"uv": [3.125, 5.625, 3.25, 6.5], "texture": "#all"}, - "south": {"uv": [4.125, 5.625, 4.25, 6.5], "texture": "#all"}, - "west": {"uv": [3.25, 5.625, 4.125, 6.5], "texture": "#all"}, - "east": {"uv": [2.25, 5.625, 3.125, 6.5], "texture": "#all"} - } - }, { "__comment": "powerConnectorFrame4", "from": [5, 5, 1], @@ -117,32 +65,6 @@ "east": {"uv": [4.75, 3.125, 5.25, 3.25], "texture": "#all"} } }, - { - "__comment": "pipeToggleRingLeft", - "from": [2, 4.5, 4.5], - "to": [3, 11.5, 11.5], - "faces": { - "down": {"uv": [3.375, 4.75, 3.25, 5.625], "texture": "#all"}, - "up": {"uv": [3.25, 5.625, 3.125, 4.75], "texture": "#all"}, - "north": {"uv": [3.125, 5.625, 3.25, 6.5], "texture": "#all"}, - "south": {"uv": [4.125, 5.625, 4.25, 6.5], "texture": "#all"}, - "west": {"uv": [3.25, 5.625, 4.125, 6.5], "texture": "#all"}, - "east": {"uv": [2.25, 5.625, 3.125, 6.5], "texture": "#all"} - } - }, - { - "__comment": "pipeTogglePortRight", - "from": [15, 4, 4], - "to": [16, 12, 12], - "faces": { - "down": {"uv": [1.25, 4.75, 1.125, 5.75], "texture": "#all"}, - "up": {"uv": [1.125, 5.75, 1, 4.75], "texture": "#all"}, - "north": {"uv": [1, 5.75, 1.125, 6.75], "texture": "#all"}, - "south": {"uv": [2.125, 5.75, 2.25, 6.75], "texture": "#all"}, - "west": {"uv": [1.125, 5.75, 2.125, 6.75], "texture": "#all"}, - "east": {"uv": [0, 5.75, 1, 6.75], "texture": "#all"} - } - }, { "__comment": "pumpRingTop", "from": [4, 13, 4], @@ -195,45 +117,6 @@ "east": {"uv": [4.75, 3.75, 4.875, 4.75], "texture": "#all"} } }, - { - "__comment": "pumpPipe", - "from": [6, -8, 6], - "to": [10, 0, 10], - "faces": { - "down": {"uv": [8, 0, 7.5, 0.5], "texture": "#all"}, - "up": {"uv": [7.5, 0.5, 7, 0], "texture": "#all"}, - "north": {"uv": [7, 0.5, 7.5, 1.5], "texture": "#all"}, - "south": {"uv": [8, 0.5, 8.5, 1.5], "texture": "#all"}, - "west": {"uv": [7.5, 0.5, 8, 1.5], "texture": "#all"}, - "east": {"uv": [6.5, 0.5, 7, 1.5], "texture": "#all"} - } - }, - { - "__comment": "pipeTogglePortBack", - "from": [4, 4, 15], - "to": [12, 12, 16], - "faces": { - "down": {"uv": [4.625, 2.625, 3.625, 2.75], "texture": "#all"}, - "up": {"uv": [3.625, 2.75, 2.625, 2.625], "texture": "#all"}, - "north": {"uv": [2.625, 2.75, 3.625, 3.75], "texture": "#all"}, - "south": {"uv": [3.75, 2.75, 4.75, 3.75], "texture": "#all"}, - "west": {"uv": [3.625, 2.75, 3.75, 3.75], "texture": "#all"}, - "east": {"uv": [2.5, 2.75, 2.625, 3.75], "texture": "#all"} - } - }, - { - "__comment": "pipeToggleRight", - "from": [11, 5, 5], - "to": [15, 11, 11], - "faces": { - "down": {"uv": [6, 4.75, 5.5, 5.5], "texture": "#all"}, - "up": {"uv": [5.5, 5.5, 5, 4.75], "texture": "#all"}, - "north": {"uv": [5, 5.5, 5.5, 6.25], "texture": "#all"}, - "south": {"uv": [6.25, 5.5, 6.75, 6.25], "texture": "#all"}, - "west": {"uv": [5.5, 5.5, 6.25, 6.25], "texture": "#all"}, - "east": {"uv": [4.25, 5.5, 5, 6.25], "texture": "#all"} - } - }, { "__comment": "powerConnectorFrame2", "from": [5, 10, 1], @@ -246,23 +129,17 @@ "west": {"uv": [5.375, 3.125, 5.875, 3.25], "texture": "#all"}, "east": {"uv": [4.75, 3.125, 5.25, 3.25], "texture": "#all"} } - }, - { - "__comment": "pipeToggleLeft", - "from": [1, 5, 5], - "to": [5, 11, 11], - "faces": { - "down": {"uv": [6, 4.75, 5.5, 5.5], "texture": "#all"}, - "up": {"uv": [5.5, 5.5, 5, 4.75], "texture": "#all"}, - "north": {"uv": [5, 5.5, 5.5, 6.25], "texture": "#all"}, - "south": {"uv": [6.25, 5.5, 6.75, 6.25], "texture": "#all"}, - "west": {"uv": [5.5, 5.5, 6.25, 6.25], "texture": "#all"}, - "east": {"uv": [4.25, 5.5, 5, 6.25], "texture": "#all"} - } } ], "textures": { "all": "mekanism:blocks/models/electric_pump", - "particle": "..." + "particle": "mekanism:blocks/SteelCasing" + }, + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } } } diff --git a/src/main/resources/assets/mekanism/models/block/electrolytic_separator.json b/src/main/resources/assets/mekanism/models/block/electrolytic_separator.json index 96460813c..6bd8d04d7 100644 --- a/src/main/resources/assets/mekanism/models/block/electrolytic_separator.json +++ b/src/main/resources/assets/mekanism/models/block/electrolytic_separator.json @@ -224,6 +224,13 @@ ], "textures": { "all": "mekanism:blocks/models/electrolytic_separator", - "particle": "..." + "particle": "mekanism:blocks/SteelCasing" + }, + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } } } diff --git a/src/main/resources/assets/mekanism/models/block/energy_cube.json b/src/main/resources/assets/mekanism/models/block/energy_cube.json index 44c398b09..751b5caa8 100644 --- a/src/main/resources/assets/mekanism/models/block/energy_cube.json +++ b/src/main/resources/assets/mekanism/models/block/energy_cube.json @@ -1,31 +1,5 @@ { "elements": [ - { - "__comment": "connectorTopToggle", - "from": [3, 14, 5], - "to": [13, 15, 11], - "faces": { - "down": {"uv": [6.5, 4.75, 4, 6.25], "texture": "#all"}, - "up": {"uv": [4, 6.25, 1.5, 4.75], "texture": "#all"}, - "north": {"uv": [1.5, 6.25, 4, 6.5], "texture": "#all"}, - "south": {"uv": [5.5, 6.25, 8, 6.5], "texture": "#all"}, - "west": {"uv": [4, 6.25, 5.5, 6.5], "texture": "#all"}, - "east": {"uv": [0, 6.25, 1.5, 6.5], "texture": "#all"} - } - }, - { - "__comment": "ledBottom1", - "from": [12.5, 0.100000000000001, 7.5], - "to": [13.5, 1.1, 8.5], - "faces": { - "down": {"uv": [0.75, 12.75, 0.5, 13], "texture": "#all"}, - "up": {"uv": [0.5, 13, 0.25, 12.75], "texture": "#all"}, - "north": {"uv": [0.25, 13, 0.5, 13.25], "texture": "#all"}, - "south": {"uv": [0.75, 13, 1, 13.25], "texture": "#all"}, - "west": {"uv": [0.5, 13, 0.75, 13.25], "texture": "#all"}, - "east": {"uv": [0, 13, 0.25, 13.25], "texture": "#all"} - } - }, { "__comment": "corner5", "from": [13, 0, 0], @@ -78,32 +52,6 @@ "east": {"uv": [0, 4, 0.75, 4.75], "texture": "#all"} } }, - { - "__comment": "portLeftToggle", - "from": [15, 4, 4], - "to": [16, 12, 12], - "faces": { - "down": {"uv": [2.5, 8.75, 2.25, 10.75], "texture": "#all"}, - "up": {"uv": [2.25, 10.75, 2, 8.75], "texture": "#all"}, - "north": {"uv": [2, 10.75, 2.25, 12.75], "texture": "#all"}, - "south": {"uv": [4.25, 10.75, 4.5, 12.75], "texture": "#all"}, - "west": {"uv": [2.25, 10.75, 4.25, 12.75], "texture": "#all"}, - "east": {"uv": [0, 10.75, 2, 12.75], "texture": "#all"} - } - }, - { - "__comment": "portRightToggle", - "from": [0, 4, 4], - "to": [1, 12, 12], - "faces": { - "down": {"uv": [2.5, 8.75, 2.25, 10.75], "texture": "#all"}, - "up": {"uv": [2.25, 10.75, 2, 8.75], "texture": "#all"}, - "north": {"uv": [2, 10.75, 2.25, 12.75], "texture": "#all"}, - "south": {"uv": [4.25, 10.75, 4.5, 12.75], "texture": "#all"}, - "west": {"uv": [2.25, 10.75, 4.25, 12.75], "texture": "#all"}, - "east": {"uv": [0, 10.75, 2, 12.75], "texture": "#all"} - } - }, { "__comment": "corner2", "from": [13, 13, 13], @@ -143,45 +91,6 @@ "east": {"uv": [3, 2.5, 5.5, 3.25], "texture": "#all"} } }, - { - "__comment": "portBottomToggle", - "from": [4, 0, 4], - "to": [12, 1, 12], - "faces": { - "down": {"uv": [6, 6.5, 4, 8.5], "texture": "#all"}, - "up": {"uv": [4, 8.5, 2, 6.5], "texture": "#all"}, - "north": {"uv": [2, 8.5, 4, 8.75], "texture": "#all"}, - "south": {"uv": [6, 8.5, 8, 8.75], "texture": "#all"}, - "west": {"uv": [4, 8.5, 6, 8.75], "texture": "#all"}, - "east": {"uv": [0, 8.5, 2, 8.75], "texture": "#all"} - } - }, - { - "__comment": "ledFront1", - "from": [12.5, 7.5, 0.0999999999999996], - "to": [13.5, 8.5, 1.1], - "faces": { - "down": {"uv": [0.75, 12.75, 0.5, 13], "texture": "#all"}, - "up": {"uv": [0.5, 13, 0.25, 12.75], "texture": "#all"}, - "north": {"uv": [0.25, 13, 0.5, 13.25], "texture": "#all"}, - "south": {"uv": [0.75, 13, 1, 13.25], "texture": "#all"}, - "west": {"uv": [0.5, 13, 0.75, 13.25], "texture": "#all"}, - "east": {"uv": [0, 13, 0.25, 13.25], "texture": "#all"} - } - }, - { - "__comment": "connectorFrontToggle", - "from": [3, 5, 1], - "to": [13, 11, 2], - "faces": { - "down": {"uv": [14.75, 4, 12.25, 4.25], "texture": "#all"}, - "up": {"uv": [12.25, 4.25, 9.75, 4], "texture": "#all"}, - "north": {"uv": [9.75, 4.25, 12.25, 5.75], "texture": "#all"}, - "south": {"uv": [12.5, 4.25, 15, 5.75], "texture": "#all"}, - "west": {"uv": [12.25, 4.25, 12.5, 5.75], "texture": "#all"}, - "east": {"uv": [9.5, 4.25, 9.75, 5.75], "texture": "#all"} - } - }, { "__comment": "corner8", "from": [0, 0, 13], @@ -195,19 +104,6 @@ "east": {"uv": [6.5, 4, 7.25, 4.75], "texture": "#all"} } }, - { - "__comment": "ledFront2", - "from": [2.5, 7.5, 0.0999999999999996], - "to": [3.5, 8.5, 1.1], - "faces": { - "down": {"uv": [0.75, 12.75, 0.5, 13], "texture": "#all"}, - "up": {"uv": [0.5, 13, 0.25, 12.75], "texture": "#all"}, - "north": {"uv": [0.25, 13, 0.5, 13.25], "texture": "#all"}, - "south": {"uv": [0.75, 13, 1, 13.25], "texture": "#all"}, - "west": {"uv": [0.5, 13, 0.75, 13.25], "texture": "#all"}, - "east": {"uv": [0, 13, 0.25, 13.25], "texture": "#all"} - } - }, { "__comment": "frame2", "from": [13, 13, 3], @@ -234,32 +130,6 @@ "east": {"uv": [6.5, 4, 7.25, 4.75], "texture": "#all"} } }, - { - "__comment": "ledLeft2", - "from": [14.9, 7.5, 2.5], - "to": [15.9, 8.5, 3.5], - "faces": { - "down": {"uv": [0.75, 12.75, 0.5, 13], "texture": "#all"}, - "up": {"uv": [0.5, 13, 0.25, 12.75], "texture": "#all"}, - "north": {"uv": [0.25, 13, 0.5, 13.25], "texture": "#all"}, - "south": {"uv": [0.75, 13, 1, 13.25], "texture": "#all"}, - "west": {"uv": [0.5, 13, 0.75, 13.25], "texture": "#all"}, - "east": {"uv": [0, 13, 0.25, 13.25], "texture": "#all"} - } - }, - { - "__comment": "connectorBottomToggle", - "from": [3, 1, 5], - "to": [13, 2, 11], - "faces": { - "down": {"uv": [6.5, 4.75, 4, 6.25], "texture": "#all"}, - "up": {"uv": [4, 6.25, 1.5, 4.75], "texture": "#all"}, - "north": {"uv": [1.5, 6.25, 4, 6.5], "texture": "#all"}, - "south": {"uv": [5.5, 6.25, 8, 6.5], "texture": "#all"}, - "west": {"uv": [4, 6.25, 5.5, 6.5], "texture": "#all"}, - "east": {"uv": [0, 6.25, 1.5, 6.5], "texture": "#all"} - } - }, { "__comment": "frame12", "from": [13, 3, 13], @@ -273,71 +143,6 @@ "east": {"uv": [0, 0.75, 0.75, 3.25], "texture": "#all"} } }, - { - "__comment": "ledLeft1", - "from": [14.9, 7.5, 12.5], - "to": [15.9, 8.5, 13.5], - "faces": { - "down": {"uv": [0.75, 12.75, 0.5, 13], "texture": "#all"}, - "up": {"uv": [0.5, 13, 0.25, 12.75], "texture": "#all"}, - "north": {"uv": [0.25, 13, 0.5, 13.25], "texture": "#all"}, - "south": {"uv": [0.75, 13, 1, 13.25], "texture": "#all"}, - "west": {"uv": [0.5, 13, 0.75, 13.25], "texture": "#all"}, - "east": {"uv": [0, 13, 0.25, 13.25], "texture": "#all"} - } - }, - { - "__comment": "cube", - "from": [4.8, 4.8, 4.8], - "to": [11.2, 11.2, 11.2], - "faces": { - "down": {"uv": [24, 0, 16, 8], "texture": "#all"}, - "up": {"uv": [16, 8, 8, 0], "texture": "#all"}, - "north": {"uv": [8, 8, 16, 16], "texture": "#all"}, - "south": {"uv": [24, 8, 32, 16], "texture": "#all"}, - "west": {"uv": [16, 8, 24, 16], "texture": "#all"}, - "east": {"uv": [0, 8, 8, 16], "texture": "#all"} - } - }, - { - "__comment": "ledRight1", - "from": [0.0999999999999996, 7.5, 2.5], - "to": [1.1, 8.5, 3.5], - "faces": { - "down": {"uv": [0.75, 12.75, 0.5, 13], "texture": "#all"}, - "up": {"uv": [0.5, 13, 0.25, 12.75], "texture": "#all"}, - "north": {"uv": [0.25, 13, 0.5, 13.25], "texture": "#all"}, - "south": {"uv": [0.75, 13, 1, 13.25], "texture": "#all"}, - "west": {"uv": [0.5, 13, 0.75, 13.25], "texture": "#all"}, - "east": {"uv": [0, 13, 0.25, 13.25], "texture": "#all"} - } - }, - { - "__comment": "ledBack1", - "from": [12.5, 7.5, 14.9], - "to": [13.5, 8.5, 15.9], - "faces": { - "down": {"uv": [0.75, 12.75, 0.5, 13], "texture": "#all"}, - "up": {"uv": [0.5, 13, 0.25, 12.75], "texture": "#all"}, - "north": {"uv": [0.25, 13, 0.5, 13.25], "texture": "#all"}, - "south": {"uv": [0.75, 13, 1, 13.25], "texture": "#all"}, - "west": {"uv": [0.5, 13, 0.75, 13.25], "texture": "#all"}, - "east": {"uv": [0, 13, 0.25, 13.25], "texture": "#all"} - } - }, - { - "__comment": "ledBottom2", - "from": [2.5, 0.100000000000001, 7.5], - "to": [3.5, 1.1, 8.5], - "faces": { - "down": {"uv": [0.75, 12.75, 0.5, 13], "texture": "#all"}, - "up": {"uv": [0.5, 13, 0.25, 12.75], "texture": "#all"}, - "north": {"uv": [0.25, 13, 0.5, 13.25], "texture": "#all"}, - "south": {"uv": [0.75, 13, 1, 13.25], "texture": "#all"}, - "west": {"uv": [0.5, 13, 0.75, 13.25], "texture": "#all"}, - "east": {"uv": [0, 13, 0.25, 13.25], "texture": "#all"} - } - }, { "__comment": "corner4", "from": [0, 13, 13], @@ -351,19 +156,6 @@ "east": {"uv": [6.5, 4, 7.25, 4.75], "texture": "#all"} } }, - { - "__comment": "connectorBackToggle", - "from": [3, 5, 14], - "to": [13, 11, 15], - "faces": { - "down": {"uv": [14.75, 4, 12.25, 4.25], "texture": "#all"}, - "up": {"uv": [12.25, 4.25, 9.75, 4], "texture": "#all"}, - "north": {"uv": [9.75, 4.25, 12.25, 5.75], "texture": "#all"}, - "south": {"uv": [12.5, 4.25, 15, 5.75], "texture": "#all"}, - "west": {"uv": [12.25, 4.25, 12.5, 5.75], "texture": "#all"}, - "east": {"uv": [9.5, 4.25, 9.75, 5.75], "texture": "#all"} - } - }, { "__comment": "corner1", "from": [13, 13, 0], @@ -377,45 +169,6 @@ "east": {"uv": [6.5, 4, 7.25, 4.75], "texture": "#all"} } }, - { - "__comment": "portBackToggle", - "from": [4, 4, 15], - "to": [12, 12, 16], - "faces": { - "down": {"uv": [8.75, 8.75, 6.75, 9], "texture": "#all"}, - "up": {"uv": [6.75, 9, 4.75, 8.75], "texture": "#all"}, - "north": {"uv": [4.75, 9, 6.75, 11], "texture": "#all"}, - "south": {"uv": [7, 9, 9, 11], "texture": "#all"}, - "west": {"uv": [6.75, 9, 7, 11], "texture": "#all"}, - "east": {"uv": [4.5, 9, 4.75, 11], "texture": "#all"} - } - }, - { - "__comment": "ledTop1", - "from": [12.5, 14.9, 7.5], - "to": [13.5, 15.9, 8.5], - "faces": { - "down": {"uv": [0.75, 12.75, 0.5, 13], "texture": "#all"}, - "up": {"uv": [0.5, 13, 0.25, 12.75], "texture": "#all"}, - "north": {"uv": [0.25, 13, 0.5, 13.25], "texture": "#all"}, - "south": {"uv": [0.75, 13, 1, 13.25], "texture": "#all"}, - "west": {"uv": [0.5, 13, 0.75, 13.25], "texture": "#all"}, - "east": {"uv": [0, 13, 0.25, 13.25], "texture": "#all"} - } - }, - { - "__comment": "portFrontToggle", - "from": [4, 4, 0], - "to": [12, 12, 1], - "faces": { - "down": {"uv": [8.75, 8.75, 6.75, 9], "texture": "#all"}, - "up": {"uv": [6.75, 9, 4.75, 8.75], "texture": "#all"}, - "north": {"uv": [4.75, 9, 6.75, 11], "texture": "#all"}, - "south": {"uv": [7, 9, 9, 11], "texture": "#all"}, - "west": {"uv": [6.75, 9, 7, 11], "texture": "#all"}, - "east": {"uv": [4.5, 9, 4.75, 11], "texture": "#all"} - } - }, { "__comment": "frame8", "from": [3, 13, 13], @@ -429,19 +182,6 @@ "east": {"uv": [0, 4, 0.75, 4.75], "texture": "#all"} } }, - { - "__comment": "ledBack2", - "from": [2.5, 7.5, 14.9], - "to": [3.5, 8.5, 15.9], - "faces": { - "down": {"uv": [0.75, 12.75, 0.5, 13], "texture": "#all"}, - "up": {"uv": [0.5, 13, 0.25, 12.75], "texture": "#all"}, - "north": {"uv": [0.25, 13, 0.5, 13.25], "texture": "#all"}, - "south": {"uv": [0.75, 13, 1, 13.25], "texture": "#all"}, - "west": {"uv": [0.5, 13, 0.75, 13.25], "texture": "#all"}, - "east": {"uv": [0, 13, 0.25, 13.25], "texture": "#all"} - } - }, { "__comment": "corner3", "from": [0, 13, 0], @@ -494,32 +234,6 @@ "east": {"uv": [0, 4, 0.75, 4.75], "texture": "#all"} } }, - { - "__comment": "connectorLeftToggle", - "from": [14, 5, 3], - "to": [15, 11, 13], - "faces": { - "down": {"uv": [12.5, 0, 12.25, 2.5], "texture": "#all"}, - "up": {"uv": [12.25, 2.5, 12, 0], "texture": "#all"}, - "north": {"uv": [12, 2.5, 12.25, 4], "texture": "#all"}, - "south": {"uv": [14.75, 2.5, 15, 4], "texture": "#all"}, - "west": {"uv": [12.25, 2.5, 14.75, 4], "texture": "#all"}, - "east": {"uv": [9.5, 2.5, 12, 4], "texture": "#all"} - } - }, - { - "__comment": "ledRight2", - "from": [0.0999999999999996, 7.5, 12.5], - "to": [1.1, 8.5, 13.5], - "faces": { - "down": {"uv": [0.75, 12.75, 0.5, 13], "texture": "#all"}, - "up": {"uv": [0.5, 13, 0.25, 12.75], "texture": "#all"}, - "north": {"uv": [0.25, 13, 0.5, 13.25], "texture": "#all"}, - "south": {"uv": [0.75, 13, 1, 13.25], "texture": "#all"}, - "west": {"uv": [0.5, 13, 0.75, 13.25], "texture": "#all"}, - "east": {"uv": [0, 13, 0.25, 13.25], "texture": "#all"} - } - }, { "__comment": "frame11", "from": [0, 3, 0], @@ -545,49 +259,10 @@ "west": {"uv": [8, 4, 8.75, 4.75], "texture": "#all"}, "east": {"uv": [6.5, 4, 7.25, 4.75], "texture": "#all"} } - }, - { - "__comment": "connectorRightToggle", - "from": [1, 5, 3], - "to": [2, 11, 13], - "faces": { - "down": {"uv": [12.5, 0, 12.25, 2.5], "texture": "#all"}, - "up": {"uv": [12.25, 2.5, 12, 0], "texture": "#all"}, - "north": {"uv": [12, 2.5, 12.25, 4], "texture": "#all"}, - "south": {"uv": [14.75, 2.5, 15, 4], "texture": "#all"}, - "west": {"uv": [12.25, 2.5, 14.75, 4], "texture": "#all"}, - "east": {"uv": [9.5, 2.5, 12, 4], "texture": "#all"} - } - }, - { - "__comment": "portTopToggle", - "from": [4, 15, 4], - "to": [12, 16, 12], - "faces": { - "down": {"uv": [6, 6.5, 4, 8.5], "texture": "#all"}, - "up": {"uv": [4, 8.5, 2, 6.5], "texture": "#all"}, - "north": {"uv": [2, 8.5, 4, 8.75], "texture": "#all"}, - "south": {"uv": [6, 8.5, 8, 8.75], "texture": "#all"}, - "west": {"uv": [4, 8.5, 6, 8.75], "texture": "#all"}, - "east": {"uv": [0, 8.5, 2, 8.75], "texture": "#all"} - } - }, - { - "__comment": "ledTop2", - "from": [2.5, 14.9, 7.5], - "to": [3.5, 15.9, 8.5], - "faces": { - "down": {"uv": [0.75, 12.75, 0.5, 13], "texture": "#all"}, - "up": {"uv": [0.5, 13, 0.25, 12.75], "texture": "#all"}, - "north": {"uv": [0.25, 13, 0.5, 13.25], "texture": "#all"}, - "south": {"uv": [0.75, 13, 1, 13.25], "texture": "#all"}, - "west": {"uv": [0.5, 13, 0.75, 13.25], "texture": "#all"}, - "east": {"uv": [0, 13, 0.25, 13.25], "texture": "#all"} - } } ], "textures": { "all": "...", - "particle": "..." + "particle": "mekanism:blocks/SteelCasing" } } diff --git a/src/main/resources/assets/mekanism/models/block/factory.json b/src/main/resources/assets/mekanism/models/block/factory.json deleted file mode 100644 index ab5e07342..000000000 --- a/src/main/resources/assets/mekanism/models/block/factory.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "parent": "block/cube", - "textures": { - "particle": "#sides", - "down": "#bottom", - "up": "#top", - "north": "#front", - "east": "#sides", - "south": "#sides", - "west": "#sides" - } -} - diff --git a/src/main/resources/assets/mekanism/models/block/fence_inventory.json b/src/main/resources/assets/mekanism/models/block/fence_inventory.json index 5bec1f9d0..2ea89d19b 100755 --- a/src/main/resources/assets/mekanism/models/block/fence_inventory.json +++ b/src/main/resources/assets/mekanism/models/block/fence_inventory.json @@ -52,5 +52,12 @@ }, "__comment": "Lower bar" } - ] + ], + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + } } diff --git a/src/main/resources/assets/mekanism/models/block/fluidic_plenisher.json b/src/main/resources/assets/mekanism/models/block/fluidic_plenisher.json index 3f9e2870a..5dfd53402 100644 --- a/src/main/resources/assets/mekanism/models/block/fluidic_plenisher.json +++ b/src/main/resources/assets/mekanism/models/block/fluidic_plenisher.json @@ -104,19 +104,6 @@ "east": {"uv": [0, 0.75, 0.75, 1], "texture": "#all"} } }, - { - "__comment": "pipeToggle", - "from": [5, -8, 5], - "to": [11, 0, 11], - "faces": { - "down": {"uv": [12.5, 11, 11, 12.5], "texture": "#all"}, - "up": {"uv": [11, 12.5, 9.5, 11], "texture": "#all"}, - "north": {"uv": [9.5, 12.5, 11, 14.5], "texture": "#all"}, - "south": {"uv": [12.5, 12.5, 14, 14.5], "texture": "#all"}, - "west": {"uv": [11, 12.5, 12.5, 14.5], "texture": "#all"}, - "east": {"uv": [8, 12.5, 9.5, 14.5], "texture": "#all"} - } - }, { "__comment": "bearingLeft", "from": [12, 6, 6], @@ -198,6 +185,13 @@ ], "textures": { "all": "mekanism:blocks/models/fluidic_plenisher", - "particle": "..." + "particle": "mekanism:blocks/SteelCasing" + }, + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } } } diff --git a/src/main/resources/assets/mekanism/models/block/gas_tank.json b/src/main/resources/assets/mekanism/models/block/gas_tank.json index fac88c3c0..7d0a41396 100644 --- a/src/main/resources/assets/mekanism/models/block/gas_tank.json +++ b/src/main/resources/assets/mekanism/models/block/gas_tank.json @@ -133,6 +133,13 @@ ], "textures": { "all": "mekanism:blocks/models/gas_tank_basic", - "particle": "..." + "particle": "mekanism:blocks/SteelCasing" + }, + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } } } diff --git a/src/main/resources/assets/mekanism/models/block/laser.json b/src/main/resources/assets/mekanism/models/block/laser.json index 69fbcf406..996d0bd10 100644 --- a/src/main/resources/assets/mekanism/models/block/laser.json +++ b/src/main/resources/assets/mekanism/models/block/laser.json @@ -68,7 +68,7 @@ { "__comment": "wire", "from": [8.5, 8, 7.5], - "to": [9.5, 14, 8.5], + "to": [9.49, 13.99, 8.5], "faces": { "down": {"uv": [3.25, 2.25, 3, 2.5], "texture": "#all"}, "up": {"uv": [3, 2.5, 2.75, 2.25], "texture": "#all"}, @@ -263,6 +263,13 @@ ], "textures": { "all": "mekanism:blocks/models/laser", - "particle": "..." + "particle": "mekanism:blocks/SteelCasing" + }, + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } } } diff --git a/src/main/resources/assets/mekanism/models/block/laser_amplifier.json b/src/main/resources/assets/mekanism/models/block/laser_amplifier.json index 61b436e22..ccf312fca 100644 --- a/src/main/resources/assets/mekanism/models/block/laser_amplifier.json +++ b/src/main/resources/assets/mekanism/models/block/laser_amplifier.json @@ -94,6 +94,13 @@ ], "textures": { "all": "mekanism:blocks/models/laser_amplifier", - "particle": "..." + "particle": "mekanism:blocks/SteelCasing" + }, + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } } } diff --git a/src/main/resources/assets/mekanism/models/block/logistical_sorter.json b/src/main/resources/assets/mekanism/models/block/logistical_sorter.json index 119e1f7cb..9851aee02 100644 --- a/src/main/resources/assets/mekanism/models/block/logistical_sorter.json +++ b/src/main/resources/assets/mekanism/models/block/logistical_sorter.json @@ -342,5 +342,12 @@ "textures": { "all": "mekanism:blocks/models/logistical_sorter", "particle": "mekanism:blocks/SteelCasing" + }, + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } } } diff --git a/src/main/resources/assets/mekanism/models/block/machine.json b/src/main/resources/assets/mekanism/models/block/machine.json index fb77712c9..e66f2ac7d 100644 --- a/src/main/resources/assets/mekanism/models/block/machine.json +++ b/src/main/resources/assets/mekanism/models/block/machine.json @@ -20,6 +20,13 @@ "east": "#sides", "south": "#sides", "west": "#sides" + }, + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } } } diff --git a/src/main/resources/assets/mekanism/models/block/metallurgic_infuser.json b/src/main/resources/assets/mekanism/models/block/metallurgic_infuser.json index bd21bfaf8..52fed7225 100644 --- a/src/main/resources/assets/mekanism/models/block/metallurgic_infuser.json +++ b/src/main/resources/assets/mekanism/models/block/metallurgic_infuser.json @@ -224,6 +224,13 @@ ], "textures": { "all": "mekanism:blocks/models/metallurgic_infuser", - "particle": "..." + "particle": "mekanism:blocks/SteelCasing" + }, + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } } } diff --git a/src/main/resources/assets/mekanism/models/block/nothing.json b/src/main/resources/assets/mekanism/models/block/nothing.json index 3d0af08a1..20a1a59be 100644 --- a/src/main/resources/assets/mekanism/models/block/nothing.json +++ b/src/main/resources/assets/mekanism/models/block/nothing.json @@ -3,8 +3,11 @@ { "from": [ 0, 0, 0 ], "to": [ 0, 0, 0 ], "faces": { - "down": { "texture": "#down", "cullface": "down" } + "down": { "texture": "mekanism:blocks/SteelCasing", "cullface": "down" } } } - ] + ], + "textures": { + "particle": "mekanism:blocks/SteelCasing" + } } diff --git a/src/main/resources/assets/mekanism/models/block/obsidian_tnt.json b/src/main/resources/assets/mekanism/models/block/obsidian_tnt.json index 278593942..3a2e025c1 100644 --- a/src/main/resources/assets/mekanism/models/block/obsidian_tnt.json +++ b/src/main/resources/assets/mekanism/models/block/obsidian_tnt.json @@ -263,6 +263,13 @@ ], "textures": { "all": "mekanism:blocks/models/obsidian_tnt", - "particle": "mekanism:blocks/RefinedObsidian" + "particle": "mekanism:blocks/models/obsidian_tnt" + }, + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } } } diff --git a/src/main/resources/assets/mekanism/models/block/pressurized_reaction_chamber.json b/src/main/resources/assets/mekanism/models/block/pressurized_reaction_chamber.json index 6028d5558..1f3bce236 100644 --- a/src/main/resources/assets/mekanism/models/block/pressurized_reaction_chamber.json +++ b/src/main/resources/assets/mekanism/models/block/pressurized_reaction_chamber.json @@ -133,6 +133,6 @@ ], "textures": { "all": "mekanism:blocks/models/pressurized_reaction_chamber", - "particle": "..." + "particle": "mekanism:blocks/SteelCasing" } } diff --git a/src/main/resources/assets/mekanism/models/block/quantum_entangloporter.json b/src/main/resources/assets/mekanism/models/block/quantum_entangloporter.json index 90a7bc1ce..8241dd67b 100644 --- a/src/main/resources/assets/mekanism/models/block/quantum_entangloporter.json +++ b/src/main/resources/assets/mekanism/models/block/quantum_entangloporter.json @@ -13,19 +13,6 @@ "east": {"uv": [1, 3.875, 1.25, 5.125], "texture": "#all"} } }, - { - "__comment": "energyCubeCore", - "from": [6, 6, 6], - "to": [10, 10, 10], - "faces": { - "down": {"uv": [1.5, 5.125, 1, 5.625], "texture": "#all"}, - "up": {"uv": [1, 5.625, 0.5, 5.125], "texture": "#all"}, - "north": {"uv": [0.5, 5.625, 1, 6.125], "texture": "#all"}, - "south": {"uv": [1.5, 5.625, 2, 6.125], "texture": "#all"}, - "west": {"uv": [1, 5.625, 1.5, 6.125], "texture": "#all"}, - "east": {"uv": [0, 5.625, 0.5, 6.125], "texture": "#all"} - } - }, { "__comment": "corner2", "from": [0, 13, 0], @@ -377,32 +364,6 @@ "east": {"uv": [1, 3.875, 1.25, 5.125], "texture": "#all"} } }, - { - "__comment": "portRightLarge", - "from": [0, 3, 3], - "to": [1, 13, 13], - "faces": { - "down": {"uv": [10, 0, 9.875, 1.25], "texture": "#all"}, - "up": {"uv": [9.875, 1.25, 9.75, 0], "texture": "#all"}, - "north": {"uv": [9.75, 1.25, 9.875, 2.5], "texture": "#all"}, - "south": {"uv": [11.125, 1.25, 11.25, 2.5], "texture": "#all"}, - "west": {"uv": [9.875, 1.25, 11.125, 2.5], "texture": "#all"}, - "east": {"uv": [8.5, 1.25, 9.75, 2.5], "texture": "#all"} - } - }, - { - "__comment": "portLeftLarge", - "from": [15, 3, 3], - "to": [16, 13, 13], - "faces": { - "down": {"uv": [10, 0, 9.875, 1.25], "texture": "#all"}, - "up": {"uv": [9.875, 1.25, 9.75, 0], "texture": "#all"}, - "north": {"uv": [9.75, 1.25, 9.875, 2.5], "texture": "#all"}, - "south": {"uv": [11.125, 1.25, 11.25, 2.5], "texture": "#all"}, - "west": {"uv": [9.875, 1.25, 11.125, 2.5], "texture": "#all"}, - "east": {"uv": [8.5, 1.25, 9.75, 2.5], "texture": "#all"} - } - }, { "__comment": "corner6", "from": [0, 0, 0], @@ -535,7 +496,7 @@ } ], "textures": { - "all": "...", - "particle": "..." + "all": "mekanism:blocks/models/quantum_entangloporter", + "particle": "mekanism:blocks/SteelCasing" } } diff --git a/src/main/resources/assets/mekanism/models/block/resistive_heater.json b/src/main/resources/assets/mekanism/models/block/resistive_heater.json index 1dc658063..ce1ef9fd8 100644 --- a/src/main/resources/assets/mekanism/models/block/resistive_heater.json +++ b/src/main/resources/assets/mekanism/models/block/resistive_heater.json @@ -263,6 +263,6 @@ ], "textures": { "all": "mekanism:blocks/models/resistive_heater", - "particle": "..." + "particle": "mekanism:blocks/SteelCasing" } } diff --git a/src/main/resources/assets/mekanism/models/block/rotary_condensentrator.json b/src/main/resources/assets/mekanism/models/block/rotary_condensentrator.json index c8a7b478b..56c8d1ad3 100644 --- a/src/main/resources/assets/mekanism/models/block/rotary_condensentrator.json +++ b/src/main/resources/assets/mekanism/models/block/rotary_condensentrator.json @@ -289,6 +289,13 @@ ], "textures": { "all": "mekanism:blocks/models/rotary_condensentrator", - "particle": "..." + "particle": "mekanism:blocks/SteelCasing" + }, + "display": { + "thirdperson": { + "rotation": [ 10, -45, 170 ], + "translation": [ 0, 1.5, -2.75 ], + "scale": [ 0.375, 0.375, 0.375 ] + } } } diff --git a/src/main/resources/assets/mekanism/models/block/scuba_tank.json b/src/main/resources/assets/mekanism/models/block/scuba_tank.json deleted file mode 100644 index 55490f2a3..000000000 --- a/src/main/resources/assets/mekanism/models/block/scuba_tank.json +++ /dev/null @@ -1,125 +0,0 @@ -{ - "elements": [ - { - "__comment": "tankL", - "from": [7, 14, 12], - "to": [10, 21, 15], - "faces": { - "down": {"uv": [3.625, 6.75, 4, 7.125], "texture": "#all"}, - "up": {"uv": [3.25, 6.75, 3.625, 7.125], "texture": "#all"}, - "north": {"uv": [3.25, 7.125, 3.625, 8], "texture": "#all"}, - "south": {"uv": [4, 7.125, 4.375, 8], "texture": "#all"}, - "west": {"uv": [3.625, 7.125, 4, 8], "texture": "#all"}, - "east": {"uv": [2.875, 7.125, 3.25, 8], "texture": "#all"} - } - }, - { - "__comment": "capR", - "from": [6.5, 21, 12.5], - "to": [8.5, 22, 14.5], - "faces": { - "down": {"uv": [3.375, 6.375, 3.625, 6.625], "texture": "#all"}, - "up": {"uv": [3.125, 6.375, 3.375, 6.625], "texture": "#all"}, - "north": {"uv": [3.125, 6.625, 3.375, 6.75], "texture": "#all"}, - "south": {"uv": [3.625, 6.625, 3.875, 6.75], "texture": "#all"}, - "west": {"uv": [3.375, 6.625, 3.625, 6.75], "texture": "#all"}, - "east": {"uv": [2.875, 6.625, 3.125, 6.75], "texture": "#all"} - } - }, - { - "__comment": "tankR", - "from": [6, 14, 12], - "to": [9, 21, 15], - "faces": { - "down": {"uv": [3.625, 6.75, 4, 7.125], "texture": "#all"}, - "up": {"uv": [3.25, 6.75, 3.625, 7.125], "texture": "#all"}, - "north": {"uv": [3.25, 7.125, 3.625, 8], "texture": "#all"}, - "south": {"uv": [4, 7.125, 4.375, 8], "texture": "#all"}, - "west": {"uv": [3.625, 7.125, 4, 8], "texture": "#all"}, - "east": {"uv": [2.875, 7.125, 3.25, 8], "texture": "#all"} - } - }, - { - "__comment": "tankpipelower", - "from": [7.5, 17, 11], - "to": [8.5, 21, 12], - "faces": { - "down": {"uv": [0.25, 4.625, 0.375, 4.75], "texture": "#all"}, - "up": {"uv": [0.125, 4.625, 0.25, 4.75], "texture": "#all"}, - "north": {"uv": [0.125, 4.75, 0.25, 5.25], "texture": "#all"}, - "south": {"uv": [0.375, 4.75, 0.5, 5.25], "texture": "#all"}, - "west": {"uv": [0.25, 4.75, 0.375, 5.25], "texture": "#all"}, - "east": {"uv": [0, 4.75, 0.125, 5.25], "texture": "#all"} - } - }, - { - "__comment": "capL", - "from": [7.5, 21, 12.5], - "to": [9.5, 22, 14.5], - "faces": { - "down": {"uv": [3.375, 6.375, 3.625, 6.625], "texture": "#all"}, - "up": {"uv": [3.125, 6.375, 3.375, 6.625], "texture": "#all"}, - "north": {"uv": [3.125, 6.625, 3.375, 6.75], "texture": "#all"}, - "south": {"uv": [3.625, 6.625, 3.875, 6.75], "texture": "#all"}, - "west": {"uv": [3.375, 6.625, 3.625, 6.75], "texture": "#all"}, - "east": {"uv": [2.875, 6.625, 3.125, 6.75], "texture": "#all"} - } - }, - { - "__comment": "tankbridge", - "from": [7, 15, 6.5], - "to": [9, 20, 9.5], - "faces": { - "down": {"uv": [0.625, 5.875, 0.875, 6.25], "texture": "#all"}, - "up": {"uv": [0.375, 5.875, 0.625, 6.25], "texture": "#all"}, - "north": {"uv": [0.375, 6.25, 0.625, 6.875], "texture": "#all"}, - "south": {"uv": [1, 6.25, 1.25, 6.875], "texture": "#all"}, - "west": {"uv": [0.625, 6.25, 1, 6.875], "texture": "#all"}, - "east": {"uv": [0, 6.25, 0.375, 6.875], "texture": "#all"} - } - }, - { - "__comment": "tankpipeupper", - "from": [7.5, 21, 9.5], - "to": [8.5, 22, 12.5], - "faces": { - "down": {"uv": [1, 4.75, 1.125, 5.125], "texture": "#all"}, - "up": {"uv": [0.875, 4.75, 1, 5.125], "texture": "#all"}, - "north": {"uv": [0.875, 5.125, 1, 5.25], "texture": "#all"}, - "south": {"uv": [1.375, 5.125, 1.5, 5.25], "texture": "#all"}, - "west": {"uv": [1, 5.125, 1.375, 5.25], "texture": "#all"}, - "east": {"uv": [0.5, 5.125, 0.875, 5.25], "texture": "#all"} - } - }, - { - "__comment": "tankdock", - "from": [6, 14, 9], - "to": [10, 18, 14], - "faces": { - "down": {"uv": [1.125, 6.875, 1.625, 7.5], "texture": "#all"}, - "up": {"uv": [0.625, 6.875, 1.125, 7.5], "texture": "#all"}, - "north": {"uv": [0.625, 7.5, 1.125, 8], "texture": "#all"}, - "south": {"uv": [1.75, 7.5, 2.25, 8], "texture": "#all"}, - "west": {"uv": [1.125, 7.5, 1.75, 8], "texture": "#all"}, - "east": {"uv": [0, 7.5, 0.625, 8], "texture": "#all"} - } - }, - { - "__comment": "tankbackbrace", - "from": [5, 18, 8.5], - "to": [11, 21, 10.5], - "faces": { - "down": {"uv": [1, 5.25, 1.75, 5.5], "texture": "#all"}, - "up": {"uv": [0.25, 5.25, 1, 5.5], "texture": "#all"}, - "north": {"uv": [0.25, 5.5, 1, 5.875], "texture": "#all"}, - "south": {"uv": [1.25, 5.5, 2, 5.875], "texture": "#all"}, - "west": {"uv": [1, 5.5, 1.25, 5.875], "texture": "#all"}, - "east": {"uv": [0, 5.5, 0.25, 5.875], "texture": "#all"} - } - } - ], - "textures": { - "all": "...", - "particle": "..." - } -} diff --git a/src/main/resources/assets/mekanism/models/block/security_desk.json b/src/main/resources/assets/mekanism/models/block/security_desk.json deleted file mode 100644 index 4c616be43..000000000 --- a/src/main/resources/assets/mekanism/models/block/security_desk.json +++ /dev/null @@ -1,138 +0,0 @@ -{ - "elements": [ - { - "__comment": "keyboard", - "from": [3, 12.5, 2], - "to": [13, 13.5, 7], - "faces": { - "down": {"uv": [11.125, 3.375, 9.875, 4], "texture": "#all"}, - "up": {"uv": [9.875, 4, 8.625, 3.375], "texture": "#all"}, - "north": {"uv": [8.625, 4, 9.875, 4.125], "texture": "#all"}, - "south": {"uv": [10.5, 4, 11.75, 4.125], "texture": "#all"}, - "west": {"uv": [9.875, 4, 10.5, 4.125], "texture": "#all"}, - "east": {"uv": [8, 4, 8.625, 4.125], "texture": "#all"} - } - }, - { - "__comment": "standBase", - "from": [4, 13, 10], - "to": [12, 14, 14], - "faces": { - "down": {"uv": [10.5, 2.75, 9.5, 3.25], "texture": "#all"}, - "up": {"uv": [9.5, 3.25, 8.5, 2.75], "texture": "#all"}, - "north": {"uv": [8.5, 3.25, 9.5, 3.375], "texture": "#all"}, - "south": {"uv": [10, 3.25, 11, 3.375], "texture": "#all"}, - "west": {"uv": [9.5, 3.25, 10, 3.375], "texture": "#all"}, - "east": {"uv": [8, 3.25, 8.5, 3.375], "texture": "#all"} - } - }, - { - "__comment": "deskTop", - "from": [0, 6, 0], - "to": [16, 13, 16], - "faces": { - "down": {"uv": [6, 0, 4, 2], "texture": "#all"}, - "up": {"uv": [4, 2, 2, 0], "texture": "#all"}, - "north": {"uv": [2, 2, 4, 2.875], "texture": "#all"}, - "south": {"uv": [6, 2, 8, 2.875], "texture": "#all"}, - "west": {"uv": [4, 2, 6, 2.875], "texture": "#all"}, - "east": {"uv": [0, 2, 2, 2.875], "texture": "#all"} - } - }, - { - "__comment": "monitorBack", - "from": [2, 16, 12], - "to": [14, 22, 13], - "faces": { - "down": {"uv": [13.375, 0, 11.875, 0.125], "texture": "#all"}, - "up": {"uv": [11.875, 0.125, 10.375, 0], "texture": "#all"}, - "north": {"uv": [10.375, 0.125, 11.875, 0.875], "texture": "#all"}, - "south": {"uv": [12, 0.125, 13.5, 0.875], "texture": "#all"}, - "west": {"uv": [11.875, 0.125, 12, 0.875], "texture": "#all"}, - "east": {"uv": [10.25, 0.125, 10.375, 0.875], "texture": "#all"} - } - }, - { - "__comment": "deskBase", - "from": [0, 0, 0], - "to": [16, 5, 16], - "faces": { - "down": {"uv": [6, 4.75, 4, 6.75], "texture": "#all"}, - "up": {"uv": [4, 6.75, 2, 4.75], "texture": "#all"}, - "north": {"uv": [2, 6.75, 4, 7.375], "texture": "#all"}, - "south": {"uv": [6, 6.75, 8, 7.375], "texture": "#all"}, - "west": {"uv": [4, 6.75, 6, 7.375], "texture": "#all"}, - "east": {"uv": [0, 6.75, 2, 7.375], "texture": "#all"} - } - }, - { - "__comment": "monitor", - "from": [1, 14, 10], - "to": [15, 24, 12], - "faces": { - "down": {"uv": [11.75, 1.25, 10, 1.5], "texture": "#all"}, - "up": {"uv": [10, 1.5, 8.25, 1.25], "texture": "#all"}, - "north": {"uv": [8.25, 1.5, 10, 2.75], "texture": "#all"}, - "south": {"uv": [10.25, 1.5, 12, 2.75], "texture": "#all"}, - "west": {"uv": [10, 1.5, 10.25, 2.75], "texture": "#all"}, - "east": {"uv": [8, 1.5, 8.25, 2.75], "texture": "#all"} - } - }, - { - "__comment": "deskMiddle", - "from": [1, 5, 1], - "to": [15, 6, 15], - "faces": { - "down": {"uv": [5.25, 2.875, 3.5, 4.625], "texture": "#all"}, - "up": {"uv": [3.5, 4.625, 1.75, 2.875], "texture": "#all"}, - "north": {"uv": [1.75, 4.625, 3.5, 4.75], "texture": "#all"}, - "south": {"uv": [5.25, 4.625, 7, 4.75], "texture": "#all"}, - "west": {"uv": [3.5, 4.625, 5.25, 4.75], "texture": "#all"}, - "east": {"uv": [0, 4.625, 1.75, 4.75], "texture": "#all"} - } - }, - { - "__comment": "standNeck", - "from": [7, 14, 13], - "to": [9, 21, 14], - "faces": { - "down": {"uv": [12.625, 0.875, 12.375, 1], "texture": "#all"}, - "up": {"uv": [12.375, 1, 12.125, 0.875], "texture": "#all"}, - "north": {"uv": [12.125, 1, 12.375, 1.875], "texture": "#all"}, - "south": {"uv": [12.5, 1, 12.75, 1.875], "texture": "#all"}, - "west": {"uv": [12.375, 1, 12.5, 1.875], "texture": "#all"}, - "east": {"uv": [12, 1, 12.125, 1.875], "texture": "#all"} - } - }, - { - "__comment": "monitorScreen", - "from": [1.5, 14.5, 9.99], - "to": [14.5, 23.5, 11.99], - "faces": { - "down": {"uv": [11.5, 4.125, 9.875, 4.375], "texture": "#all"}, - "up": {"uv": [9.875, 4.375, 8.25, 4.125], "texture": "#all"}, - "north": {"uv": [8.25, 4.375, 9.875, 5.5], "texture": "#all"}, - "south": {"uv": [10.125, 4.375, 11.75, 5.5], "texture": "#all"}, - "west": {"uv": [9.875, 4.375, 10.125, 5.5], "texture": "#all"}, - "east": {"uv": [8, 4.375, 8.25, 5.5], "texture": "#all"} - } - }, - { - "__comment": "led", - "from": [2, 13.5, 10.5], - "to": [3, 14.5, 11.5], - "faces": { - "down": {"uv": [0.375, 0, 0.25, 0.125], "texture": "#all"}, - "up": {"uv": [0.25, 0.125, 0.125, 0], "texture": "#all"}, - "north": {"uv": [0.125, 0.125, 0.25, 0.25], "texture": "#all"}, - "south": {"uv": [0.375, 0.125, 0.5, 0.25], "texture": "#all"}, - "west": {"uv": [0.25, 0.125, 0.375, 0.25], "texture": "#all"}, - "east": {"uv": [0, 0.125, 0.125, 0.25], "texture": "#all"} - } - } - ], - "textures": { - "all": "mekanism:blocks/models/security_desk", - "particle": "..." - } -} diff --git a/src/main/resources/assets/mekanism/models/block/seismic_vibrator.json b/src/main/resources/assets/mekanism/models/block/seismic_vibrator.json deleted file mode 100644 index 50a9ab33c..000000000 --- a/src/main/resources/assets/mekanism/models/block/seismic_vibrator.json +++ /dev/null @@ -1,593 +0,0 @@ -{ - "elements": [ - { - "__comment": "baseBack", - "from": [0, 0, 13], - "to": [16, 5, 16], - "faces": { - "down": {"uv": [4.375, 3.25, 2.375, 3.625], "texture": "#all"}, - "up": {"uv": [2.375, 3.625, 0.375, 3.25], "texture": "#all"}, - "north": {"uv": [0.375, 3.625, 2.375, 4.25], "texture": "#all"}, - "south": {"uv": [2.75, 3.625, 4.75, 4.25], "texture": "#all"}, - "west": {"uv": [2.375, 3.625, 2.75, 4.25], "texture": "#all"}, - "east": {"uv": [0, 3.625, 0.375, 4.25], "texture": "#all"} - } - }, - { - "__comment": "top", - "from": [0, 30, 0], - "to": [16, 32, 16], - "faces": { - "down": {"uv": [6, 0, 4, 2], "texture": "#all"}, - "up": {"uv": [4, 2, 2, 0], "texture": "#all"}, - "north": {"uv": [2, 2, 4, 2.25], "texture": "#all"}, - "south": {"uv": [6, 2, 8, 2.25], "texture": "#all"}, - "west": {"uv": [4, 2, 6, 2.25], "texture": "#all"}, - "east": {"uv": [0, 2, 2, 2.25], "texture": "#all"} - } - }, - { - "__comment": "pole3", - "from": [0.5, 5, 0.5], - "to": [1.5, 30, 1.5], - "faces": { - "down": {"uv": [0.375, 4.25, 0.25, 4.375], "texture": "#all"}, - "up": {"uv": [0.25, 4.375, 0.125, 4.25], "texture": "#all"}, - "north": {"uv": [0.125, 4.375, 0.25, 7.5], "texture": "#all"}, - "south": {"uv": [0.375, 4.375, 0.5, 7.5], "texture": "#all"}, - "west": {"uv": [0.25, 4.375, 0.375, 7.5], "texture": "#all"}, - "east": {"uv": [0, 4.375, 0.125, 7.5], "texture": "#all"} - } - }, - { - "__comment": "rivet3", - "from": [11.5, 28.5, 7.5], - "to": [12.5, 29.5, 8.5], - "faces": { - "down": {"uv": [0.375, 0, 0.25, 0.125], "texture": "#all"}, - "up": {"uv": [0.25, 0.125, 0.125, 0], "texture": "#all"}, - "north": {"uv": [0.125, 0.125, 0.25, 0.25], "texture": "#all"}, - "south": {"uv": [0.375, 0.125, 0.5, 0.25], "texture": "#all"}, - "west": {"uv": [0.25, 0.125, 0.375, 0.25], "texture": "#all"}, - "east": {"uv": [0, 0.125, 0.125, 0.25], "texture": "#all"} - } - }, - { - "__comment": "frameRight5", - "from": [0.515, -2, 0.5], - "to": [1.515, 17, 1.5], - "faces": { - "down": {"uv": [0.875, 4.25, 0.75, 4.375], "texture": "#all"}, - "up": {"uv": [0.75, 4.375, 0.625, 4.25], "texture": "#all"}, - "north": {"uv": [0.625, 4.375, 0.75, 6.75], "texture": "#all"}, - "south": {"uv": [0.875, 4.375, 1, 6.75], "texture": "#all"}, - "west": {"uv": [0.75, 4.375, 0.875, 6.75], "texture": "#all"}, - "east": {"uv": [0.5, 4.375, 0.625, 6.75], "texture": "#all"} - } - }, - { - "__comment": "shaft2", - "from": [6.5, 18, 6.5], - "to": [9.5, 29, 9.5], - "faces": { - "down": {"uv": [3.125, 4.25, 2.75, 4.625], "texture": "#all"}, - "up": {"uv": [2.75, 4.625, 2.375, 4.25], "texture": "#all"}, - "north": {"uv": [2.375, 4.625, 2.75, 6], "texture": "#all"}, - "south": {"uv": [3.125, 4.625, 3.5, 6], "texture": "#all"}, - "west": {"uv": [2.75, 4.625, 3.125, 6], "texture": "#all"}, - "east": {"uv": [2, 4.625, 2.375, 6], "texture": "#all"} - } - }, - { - "__comment": "frameBack4", - "from": [14.5, -2, 14.49], - "to": [15.5, 17, 15.49], - "faces": { - "down": {"uv": [0.875, 4.25, 0.75, 4.375], "texture": "#all"}, - "up": {"uv": [0.75, 4.375, 0.625, 4.25], "texture": "#all"}, - "north": {"uv": [0.625, 4.375, 0.75, 6.75], "texture": "#all"}, - "south": {"uv": [0.875, 4.375, 1, 6.75], "texture": "#all"}, - "west": {"uv": [0.75, 4.375, 0.875, 6.75], "texture": "#all"}, - "east": {"uv": [0.5, 4.375, 0.625, 6.75], "texture": "#all"} - } - }, - { - "__comment": "conduit", - "from": [6, 5, 14], - "to": [10, 30, 16], - "faces": { - "down": {"uv": [9.25, 0, 8.75, 0.25], "texture": "#all"}, - "up": {"uv": [8.75, 0.25, 8.25, 0], "texture": "#all"}, - "north": {"uv": [8.25, 0.25, 8.75, 3.375], "texture": "#all"}, - "south": {"uv": [9, 0.25, 9.5, 3.375], "texture": "#all"}, - "west": {"uv": [8.75, 0.25, 9, 3.375], "texture": "#all"}, - "east": {"uv": [8, 0.25, 8.25, 3.375], "texture": "#all"} - } - }, - { - "__comment": "frameLeft5", - "from": [14.485, -2, 0.5], - "to": [15.485, 17, 1.5], - "faces": { - "down": {"uv": [0.875, 4.25, 0.75, 4.375], "texture": "#all"}, - "up": {"uv": [0.75, 4.375, 0.625, 4.25], "texture": "#all"}, - "north": {"uv": [0.625, 4.375, 0.75, 6.75], "texture": "#all"}, - "south": {"uv": [0.875, 4.375, 1, 6.75], "texture": "#all"}, - "west": {"uv": [0.75, 4.375, 0.875, 6.75], "texture": "#all"}, - "east": {"uv": [0.5, 4.375, 0.625, 6.75], "texture": "#all"} - } - }, - { - "__comment": "rivet6", - "from": [3.5, 28.5, 3.5], - "to": [4.5, 29.5, 4.5], - "faces": { - "down": {"uv": [0.375, 0, 0.25, 0.125], "texture": "#all"}, - "up": {"uv": [0.25, 0.125, 0.125, 0], "texture": "#all"}, - "north": {"uv": [0.125, 0.125, 0.25, 0.25], "texture": "#all"}, - "south": {"uv": [0.375, 0.125, 0.5, 0.25], "texture": "#all"}, - "west": {"uv": [0.25, 0.125, 0.375, 0.25], "texture": "#all"}, - "east": {"uv": [0, 0.125, 0.125, 0.25], "texture": "#all"} - } - }, - { - "__comment": "pole4", - "from": [0.5, 5, 14.5], - "to": [1.5, 30, 15.5], - "faces": { - "down": {"uv": [0.375, 4.25, 0.25, 4.375], "texture": "#all"}, - "up": {"uv": [0.25, 4.375, 0.125, 4.25], "texture": "#all"}, - "north": {"uv": [0.125, 4.375, 0.25, 7.5], "texture": "#all"}, - "south": {"uv": [0.375, 4.375, 0.5, 7.5], "texture": "#all"}, - "west": {"uv": [0.25, 4.375, 0.375, 7.5], "texture": "#all"}, - "east": {"uv": [0, 4.375, 0.125, 7.5], "texture": "#all"} - } - }, - { - "__comment": "arm3", - "from": [7, 15, 11], - "to": [9, 17, 15], - "faces": { - "down": {"uv": [1, 0.75, 0.75, 1.25], "texture": "#all"}, - "up": {"uv": [0.75, 1.25, 0.5, 0.75], "texture": "#all"}, - "north": {"uv": [0.5, 1.25, 0.75, 1.5], "texture": "#all"}, - "south": {"uv": [1.25, 1.25, 1.5, 1.5], "texture": "#all"}, - "west": {"uv": [0.75, 1.25, 1.25, 1.5], "texture": "#all"}, - "east": {"uv": [0, 1.25, 0.5, 1.5], "texture": "#all"} - } - }, - { - "__comment": "frameBack1", - "from": [0.5, 11, 14.49], - "to": [1.5, 30, 15.49], - "faces": { - "down": {"uv": [0.875, 4.25, 0.75, 4.375], "texture": "#all"}, - "up": {"uv": [0.75, 4.375, 0.625, 4.25], "texture": "#all"}, - "north": {"uv": [0.625, 4.375, 0.75, 6.75], "texture": "#all"}, - "south": {"uv": [0.875, 4.375, 1, 6.75], "texture": "#all"}, - "west": {"uv": [0.75, 4.375, 0.875, 6.75], "texture": "#all"}, - "east": {"uv": [0.5, 4.375, 0.625, 6.75], "texture": "#all"} - } - }, - { - "__comment": "frameLeft1", - "from": [14.49, 11, 14.5], - "to": [15.49, 30, 15.5], - "faces": { - "down": {"uv": [0.875, 4.25, 0.75, 4.375], "texture": "#all"}, - "up": {"uv": [0.75, 4.375, 0.625, 4.25], "texture": "#all"}, - "north": {"uv": [0.625, 4.375, 0.75, 6.75], "texture": "#all"}, - "south": {"uv": [0.875, 4.375, 1, 6.75], "texture": "#all"}, - "west": {"uv": [0.75, 4.375, 0.875, 6.75], "texture": "#all"}, - "east": {"uv": [0.5, 4.375, 0.625, 6.75], "texture": "#all"} - } - }, - { - "__comment": "rivet5", - "from": [11.5, 28.5, 11.5], - "to": [12.5, 29.5, 12.5], - "faces": { - "down": {"uv": [0.375, 0, 0.25, 0.125], "texture": "#all"}, - "up": {"uv": [0.25, 0.125, 0.125, 0], "texture": "#all"}, - "north": {"uv": [0.125, 0.125, 0.25, 0.25], "texture": "#all"}, - "south": {"uv": [0.375, 0.125, 0.5, 0.25], "texture": "#all"}, - "west": {"uv": [0.25, 0.125, 0.375, 0.25], "texture": "#all"}, - "east": {"uv": [0, 0.125, 0.125, 0.25], "texture": "#all"} - } - }, - { - "__comment": "rivet9", - "from": [3.5, 28.5, 9.5], - "to": [4.5, 29.5, 10.5], - "faces": { - "down": {"uv": [0.375, 0, 0.25, 0.125], "texture": "#all"}, - "up": {"uv": [0.25, 0.125, 0.125, 0], "texture": "#all"}, - "north": {"uv": [0.125, 0.125, 0.25, 0.25], "texture": "#all"}, - "south": {"uv": [0.375, 0.125, 0.5, 0.25], "texture": "#all"}, - "west": {"uv": [0.25, 0.125, 0.375, 0.25], "texture": "#all"}, - "east": {"uv": [0, 0.125, 0.125, 0.25], "texture": "#all"} - } - }, - { - "__comment": "frameRight1", - "from": [0.515, 11, 0.5], - "to": [1.515, 30, 1.5], - "faces": { - "down": {"uv": [0.875, 4.25, 0.75, 4.375], "texture": "#all"}, - "up": {"uv": [0.75, 4.375, 0.625, 4.25], "texture": "#all"}, - "north": {"uv": [0.625, 4.375, 0.75, 6.75], "texture": "#all"}, - "south": {"uv": [0.875, 4.375, 1, 6.75], "texture": "#all"}, - "west": {"uv": [0.75, 4.375, 0.875, 6.75], "texture": "#all"}, - "east": {"uv": [0.5, 4.375, 0.625, 6.75], "texture": "#all"} - } - }, - { - "__comment": "frameRight3", - "from": [0.5, 17, 1.5], - "to": [1.5, 18, 14.5], - "faces": { - "down": {"uv": [9.875, 3.375, 9.75, 5], "texture": "#all"}, - "up": {"uv": [9.75, 5, 9.625, 3.375], "texture": "#all"}, - "north": {"uv": [9.625, 5, 9.75, 5.125], "texture": "#all"}, - "south": {"uv": [11.375, 5, 11.5, 5.125], "texture": "#all"}, - "west": {"uv": [9.75, 5, 11.375, 5.125], "texture": "#all"}, - "east": {"uv": [8, 5, 9.625, 5.125], "texture": "#all"} - } - }, - { - "__comment": "rivet2", - "from": [11.5, 28.5, 5.5], - "to": [12.5, 29.5, 6.5], - "faces": { - "down": {"uv": [0.375, 0, 0.25, 0.125], "texture": "#all"}, - "up": {"uv": [0.25, 0.125, 0.125, 0], "texture": "#all"}, - "north": {"uv": [0.125, 0.125, 0.25, 0.25], "texture": "#all"}, - "south": {"uv": [0.375, 0.125, 0.5, 0.25], "texture": "#all"}, - "west": {"uv": [0.25, 0.125, 0.375, 0.25], "texture": "#all"}, - "east": {"uv": [0, 0.125, 0.125, 0.25], "texture": "#all"} - } - }, - { - "__comment": "frameBack5", - "from": [0.5, -2, 14.49], - "to": [1.5, 17, 15.49], - "faces": { - "down": {"uv": [0.875, 4.25, 0.75, 4.375], "texture": "#all"}, - "up": {"uv": [0.75, 4.375, 0.625, 4.25], "texture": "#all"}, - "north": {"uv": [0.625, 4.375, 0.75, 6.75], "texture": "#all"}, - "south": {"uv": [0.875, 4.375, 1, 6.75], "texture": "#all"}, - "west": {"uv": [0.75, 4.375, 0.875, 6.75], "texture": "#all"}, - "east": {"uv": [0.5, 4.375, 0.625, 6.75], "texture": "#all"} - } - }, - { - "__comment": "baseRight", - "from": [0, 0, 3], - "to": [3, 5, 13], - "faces": { - "down": {"uv": [6.75, 2.25, 6.375, 3.5], "texture": "#all"}, - "up": {"uv": [6.375, 3.5, 6, 2.25], "texture": "#all"}, - "north": {"uv": [6, 3.5, 6.375, 4.125], "texture": "#all"}, - "south": {"uv": [7.625, 3.5, 8, 4.125], "texture": "#all"}, - "west": {"uv": [6.375, 3.5, 7.625, 4.125], "texture": "#all"}, - "east": {"uv": [4.75, 3.5, 6, 4.125], "texture": "#all"} - } - }, - { - "__comment": "rivet1", - "from": [11.5, 28.5, 3.5], - "to": [12.5, 29.5, 4.5], - "faces": { - "down": {"uv": [0.375, 0, 0.25, 0.125], "texture": "#all"}, - "up": {"uv": [0.25, 0.125, 0.125, 0], "texture": "#all"}, - "north": {"uv": [0.125, 0.125, 0.25, 0.25], "texture": "#all"}, - "south": {"uv": [0.375, 0.125, 0.5, 0.25], "texture": "#all"}, - "west": {"uv": [0.25, 0.125, 0.375, 0.25], "texture": "#all"}, - "east": {"uv": [0, 0.125, 0.125, 0.25], "texture": "#all"} - } - }, - { - "__comment": "plate3", - "from": [4, 0, 4], - "to": [12, 2, 12], - "faces": { - "down": {"uv": [7.5, 5.25, 6.5, 6.25], "texture": "#all"}, - "up": {"uv": [6.5, 6.25, 5.5, 5.25], "texture": "#all"}, - "north": {"uv": [5.5, 6.25, 6.5, 6.5], "texture": "#all"}, - "south": {"uv": [7.5, 6.25, 8.5, 6.5], "texture": "#all"}, - "west": {"uv": [6.5, 6.25, 7.5, 6.5], "texture": "#all"}, - "east": {"uv": [4.5, 6.25, 5.5, 6.5], "texture": "#all"} - } - }, - { - "__comment": "shaft1", - "from": [7, 3, 7], - "to": [9, 18, 9], - "faces": { - "down": {"uv": [1.75, 4.25, 1.5, 4.5], "texture": "#all"}, - "up": {"uv": [1.5, 4.5, 1.25, 4.25], "texture": "#all"}, - "north": {"uv": [1.25, 4.5, 1.5, 6.375], "texture": "#all"}, - "south": {"uv": [1.75, 4.5, 2, 6.375], "texture": "#all"}, - "west": {"uv": [1.5, 4.5, 1.75, 6.375], "texture": "#all"}, - "east": {"uv": [1, 4.5, 1.25, 6.375], "texture": "#all"} - } - }, - { - "__comment": "motor", - "from": [5, 25, 5], - "to": [11, 29, 15], - "faces": { - "down": {"uv": [12.25, 1.625, 11.5, 2.875], "texture": "#all"}, - "up": {"uv": [11.5, 2.875, 10.75, 1.625], "texture": "#all"}, - "north": {"uv": [10.75, 2.875, 11.5, 3.375], "texture": "#all"}, - "south": {"uv": [12.75, 2.875, 13.5, 3.375], "texture": "#all"}, - "west": {"uv": [11.5, 2.875, 12.75, 3.375], "texture": "#all"}, - "east": {"uv": [9.5, 2.875, 10.75, 3.375], "texture": "#all"} - } - }, - { - "__comment": "plate1", - "from": [3, 29, 3], - "to": [13, 30, 15], - "faces": { - "down": {"uv": [13.5, 0, 12.25, 1.5], "texture": "#all"}, - "up": {"uv": [12.25, 1.5, 11, 0], "texture": "#all"}, - "north": {"uv": [11, 1.5, 12.25, 1.625], "texture": "#all"}, - "south": {"uv": [13.75, 1.5, 15, 1.625], "texture": "#all"}, - "west": {"uv": [12.25, 1.5, 13.75, 1.625], "texture": "#all"}, - "east": {"uv": [9.5, 1.5, 11, 1.625], "texture": "#all"} - } - }, - { - "__comment": "arm2", - "from": [6, 15, 6], - "to": [10, 17, 10], - "faces": { - "down": {"uv": [7.5, 0.75, 7, 1.25], "texture": "#all"}, - "up": {"uv": [7, 1.25, 6.5, 0.75], "texture": "#all"}, - "north": {"uv": [6.5, 1.25, 7, 1.5], "texture": "#all"}, - "south": {"uv": [7.5, 1.25, 8, 1.5], "texture": "#all"}, - "west": {"uv": [7, 1.25, 7.5, 1.5], "texture": "#all"}, - "east": {"uv": [6, 1.25, 6.5, 1.5], "texture": "#all"} - } - }, - { - "__comment": "frameBack3", - "from": [1.5, 17, 14.5], - "to": [14.5, 18, 15.5], - "faces": { - "down": {"uv": [7.875, 6.5, 6.25, 6.625], "texture": "#all"}, - "up": {"uv": [6.25, 6.625, 4.625, 6.5], "texture": "#all"}, - "north": {"uv": [4.625, 6.625, 6.25, 6.75], "texture": "#all"}, - "south": {"uv": [6.375, 6.625, 8, 6.75], "texture": "#all"}, - "west": {"uv": [6.25, 6.625, 6.375, 6.75], "texture": "#all"}, - "east": {"uv": [4.5, 6.625, 4.625, 6.75], "texture": "#all"} - } - }, - { - "__comment": "frameRight2", - "from": [0.51, 11, 14.5], - "to": [1.51, 30, 15.5], - "faces": { - "down": {"uv": [0.875, 4.25, 0.75, 4.375], "texture": "#all"}, - "up": {"uv": [0.75, 4.375, 0.625, 4.25], "texture": "#all"}, - "north": {"uv": [0.625, 4.375, 0.75, 6.75], "texture": "#all"}, - "south": {"uv": [0.875, 4.375, 1, 6.75], "texture": "#all"}, - "west": {"uv": [0.75, 4.375, 0.875, 6.75], "texture": "#all"}, - "east": {"uv": [0.5, 4.375, 0.625, 6.75], "texture": "#all"} - } - }, - { - "__comment": "rivet4", - "from": [11.5, 28.5, 9.5], - "to": [12.5, 29.5, 10.5], - "faces": { - "down": {"uv": [0.375, 0, 0.25, 0.125], "texture": "#all"}, - "up": {"uv": [0.25, 0.125, 0.125, 0], "texture": "#all"}, - "north": {"uv": [0.125, 0.125, 0.25, 0.25], "texture": "#all"}, - "south": {"uv": [0.375, 0.125, 0.5, 0.25], "texture": "#all"}, - "west": {"uv": [0.25, 0.125, 0.375, 0.25], "texture": "#all"}, - "east": {"uv": [0, 0.125, 0.125, 0.25], "texture": "#all"} - } - }, - { - "__comment": "pole2", - "from": [14.5, 5, 14.5], - "to": [15.5, 30, 15.5], - "faces": { - "down": {"uv": [0.375, 4.25, 0.25, 4.375], "texture": "#all"}, - "up": {"uv": [0.25, 4.375, 0.125, 4.25], "texture": "#all"}, - "north": {"uv": [0.125, 4.375, 0.25, 7.5], "texture": "#all"}, - "south": {"uv": [0.375, 4.375, 0.5, 7.5], "texture": "#all"}, - "west": {"uv": [0.25, 4.375, 0.375, 7.5], "texture": "#all"}, - "east": {"uv": [0, 4.375, 0.125, 7.5], "texture": "#all"} - } - }, - { - "__comment": "frameLeft2", - "from": [14.485, 11, 0.5], - "to": [15.485, 30, 1.5], - "faces": { - "down": {"uv": [0.875, 4.25, 0.75, 4.375], "texture": "#all"}, - "up": {"uv": [0.75, 4.375, 0.625, 4.25], "texture": "#all"}, - "north": {"uv": [0.625, 4.375, 0.75, 6.75], "texture": "#all"}, - "south": {"uv": [0.875, 4.375, 1, 6.75], "texture": "#all"}, - "west": {"uv": [0.75, 4.375, 0.875, 6.75], "texture": "#all"}, - "east": {"uv": [0.5, 4.375, 0.625, 6.75], "texture": "#all"} - } - }, - { - "__comment": "baseFront", - "from": [0, 0, 0], - "to": [16, 5, 3], - "faces": { - "down": {"uv": [4.375, 2.25, 2.375, 2.625], "texture": "#all"}, - "up": {"uv": [2.375, 2.625, 0.375, 2.25], "texture": "#all"}, - "north": {"uv": [0.375, 2.625, 2.375, 3.25], "texture": "#all"}, - "south": {"uv": [2.75, 2.625, 4.75, 3.25], "texture": "#all"}, - "west": {"uv": [2.375, 2.625, 2.75, 3.25], "texture": "#all"}, - "east": {"uv": [0, 2.625, 0.375, 3.25], "texture": "#all"} - } - }, - { - "__comment": "frameLeft4", - "from": [14.49, -2, 14.5], - "to": [15.49, 17, 15.5], - "faces": { - "down": {"uv": [0.875, 4.25, 0.75, 4.375], "texture": "#all"}, - "up": {"uv": [0.75, 4.375, 0.625, 4.25], "texture": "#all"}, - "north": {"uv": [0.625, 4.375, 0.75, 6.75], "texture": "#all"}, - "south": {"uv": [0.875, 4.375, 1, 6.75], "texture": "#all"}, - "west": {"uv": [0.75, 4.375, 0.875, 6.75], "texture": "#all"}, - "east": {"uv": [0.5, 4.375, 0.625, 6.75], "texture": "#all"} - } - }, - { - "__comment": "arm1", - "from": [6.5, 15, 10], - "to": [9.5, 17, 14], - "faces": { - "down": {"uv": [8.25, 4.125, 7.875, 4.625], "texture": "#all"}, - "up": {"uv": [7.875, 4.625, 7.5, 4.125], "texture": "#all"}, - "north": {"uv": [7.5, 4.625, 7.875, 4.875], "texture": "#all"}, - "south": {"uv": [8.375, 4.625, 8.75, 4.875], "texture": "#all"}, - "west": {"uv": [7.875, 4.625, 8.375, 4.875], "texture": "#all"}, - "east": {"uv": [7, 4.625, 7.5, 4.875], "texture": "#all"} - } - }, - { - "__comment": "rivet10", - "from": [3.5, 28.5, 11.5], - "to": [4.5, 29.5, 12.5], - "faces": { - "down": {"uv": [0.375, 0, 0.25, 0.125], "texture": "#all"}, - "up": {"uv": [0.25, 0.125, 0.125, 0], "texture": "#all"}, - "north": {"uv": [0.125, 0.125, 0.25, 0.25], "texture": "#all"}, - "south": {"uv": [0.375, 0.125, 0.5, 0.25], "texture": "#all"}, - "west": {"uv": [0.25, 0.125, 0.375, 0.25], "texture": "#all"}, - "east": {"uv": [0, 0.125, 0.125, 0.25], "texture": "#all"} - } - }, - { - "__comment": "baseLeft", - "from": [13, 0, 3], - "to": [16, 5, 13], - "faces": { - "down": {"uv": [6.75, 2.25, 6.375, 3.5], "texture": "#all"}, - "up": {"uv": [6.375, 3.5, 6, 2.25], "texture": "#all"}, - "north": {"uv": [6, 3.5, 6.375, 4.125], "texture": "#all"}, - "south": {"uv": [7.625, 3.5, 8, 4.125], "texture": "#all"}, - "west": {"uv": [6.375, 3.5, 7.625, 4.125], "texture": "#all"}, - "east": {"uv": [4.75, 3.5, 6, 4.125], "texture": "#all"} - } - }, - { - "__comment": "plate2", - "from": [6, 1, 6], - "to": [10, 3, 10], - "faces": { - "down": {"uv": [7.5, 0, 7, 0.5], "texture": "#all"}, - "up": {"uv": [7, 0.5, 6.5, 0], "texture": "#all"}, - "north": {"uv": [6.5, 0.5, 7, 0.75], "texture": "#all"}, - "south": {"uv": [7.5, 0.5, 8, 0.75], "texture": "#all"}, - "west": {"uv": [7, 0.5, 7.5, 0.75], "texture": "#all"}, - "east": {"uv": [6, 0.5, 6.5, 0.75], "texture": "#all"} - } - }, - { - "__comment": "frameLeft3", - "from": [14.5, 17, 1.5], - "to": [15.5, 18, 14.5], - "faces": { - "down": {"uv": [9.875, 3.375, 9.75, 5], "texture": "#all"}, - "up": {"uv": [9.75, 5, 9.625, 3.375], "texture": "#all"}, - "north": {"uv": [9.625, 5, 9.75, 5.125], "texture": "#all"}, - "south": {"uv": [11.375, 5, 11.5, 5.125], "texture": "#all"}, - "west": {"uv": [9.75, 5, 11.375, 5.125], "texture": "#all"}, - "east": {"uv": [8, 5, 9.625, 5.125], "texture": "#all"} - } - }, - { - "__comment": "frameRight4", - "from": [0.51, -2, 14.5], - "to": [1.51, 17, 15.5], - "faces": { - "down": {"uv": [0.875, 4.25, 0.75, 4.375], "texture": "#all"}, - "up": {"uv": [0.75, 4.375, 0.625, 4.25], "texture": "#all"}, - "north": {"uv": [0.625, 4.375, 0.75, 6.75], "texture": "#all"}, - "south": {"uv": [0.875, 4.375, 1, 6.75], "texture": "#all"}, - "west": {"uv": [0.75, 4.375, 0.875, 6.75], "texture": "#all"}, - "east": {"uv": [0.5, 4.375, 0.625, 6.75], "texture": "#all"} - } - }, - { - "__comment": "rivet7", - "from": [3.5, 28.5, 5.5], - "to": [4.5, 29.5, 6.5], - "faces": { - "down": {"uv": [0.375, 0, 0.25, 0.125], "texture": "#all"}, - "up": {"uv": [0.25, 0.125, 0.125, 0], "texture": "#all"}, - "north": {"uv": [0.125, 0.125, 0.25, 0.25], "texture": "#all"}, - "south": {"uv": [0.375, 0.125, 0.5, 0.25], "texture": "#all"}, - "west": {"uv": [0.25, 0.125, 0.375, 0.25], "texture": "#all"}, - "east": {"uv": [0, 0.125, 0.125, 0.25], "texture": "#all"} - } - }, - { - "__comment": "port", - "from": [4, 4, 15.01], - "to": [12, 12, 16.01], - "faces": { - "down": {"uv": [6.875, 4.125, 5.875, 4.25], "texture": "#all"}, - "up": {"uv": [5.875, 4.25, 4.875, 4.125], "texture": "#all"}, - "north": {"uv": [4.875, 4.25, 5.875, 5.25], "texture": "#all"}, - "south": {"uv": [6, 4.25, 7, 5.25], "texture": "#all"}, - "west": {"uv": [5.875, 4.25, 6, 5.25], "texture": "#all"}, - "east": {"uv": [4.75, 4.25, 4.875, 5.25], "texture": "#all"} - } - }, - { - "__comment": "pole1", - "from": [14.5, 5, 0.5], - "to": [15.5, 30, 1.5], - "faces": { - "down": {"uv": [0.375, 4.25, 0.25, 4.375], "texture": "#all"}, - "up": {"uv": [0.25, 4.375, 0.125, 4.25], "texture": "#all"}, - "north": {"uv": [0.125, 4.375, 0.25, 7.5], "texture": "#all"}, - "south": {"uv": [0.375, 4.375, 0.5, 7.5], "texture": "#all"}, - "west": {"uv": [0.25, 4.375, 0.375, 7.5], "texture": "#all"}, - "east": {"uv": [0, 4.375, 0.125, 7.5], "texture": "#all"} - } - }, - { - "__comment": "rivet8", - "from": [3.5, 28.5, 7.5], - "to": [4.5, 29.5, 8.5], - "faces": { - "down": {"uv": [0.375, 0, 0.25, 0.125], "texture": "#all"}, - "up": {"uv": [0.25, 0.125, 0.125, 0], "texture": "#all"}, - "north": {"uv": [0.125, 0.125, 0.25, 0.25], "texture": "#all"}, - "south": {"uv": [0.375, 0.125, 0.5, 0.25], "texture": "#all"}, - "west": {"uv": [0.25, 0.125, 0.375, 0.25], "texture": "#all"}, - "east": {"uv": [0, 0.125, 0.125, 0.25], "texture": "#all"} - } - }, - { - "__comment": "frameBack2", - "from": [14.5, 11, 14.49], - "to": [15.5, 30, 15.49], - "faces": { - "down": {"uv": [0.875, 4.25, 0.75, 4.375], "texture": "#all"}, - "up": {"uv": [0.75, 4.375, 0.625, 4.25], "texture": "#all"}, - "north": {"uv": [0.625, 4.375, 0.75, 6.75], "texture": "#all"}, - "south": {"uv": [0.875, 4.375, 1, 6.75], "texture": "#all"}, - "west": {"uv": [0.75, 4.375, 0.875, 6.75], "texture": "#all"}, - "east": {"uv": [0.5, 4.375, 0.625, 6.75], "texture": "#all"} - } - } - ], - "textures": { - "all": "mekanism:blocks/models/seismic_vibrator", - "particle": "..." - } -} diff --git a/src/main/resources/assets/mekanism/models/block/solar_neutron_activator.json b/src/main/resources/assets/mekanism/models/block/solar_neutron_activator.json deleted file mode 100644 index a64483144..000000000 --- a/src/main/resources/assets/mekanism/models/block/solar_neutron_activator.json +++ /dev/null @@ -1,619 +0,0 @@ -{ - "elements": [ - { - "__comment": "support5", - "from": [0.5, 4, 6.5], - "to": [1.5, 5, 7.5], - "faces": { - "down": {"uv": [0.375, 0, 0.25, 0.125], "texture": "#all"}, - "up": {"uv": [0.25, 0.125, 0.125, 0], "texture": "#all"}, - "north": {"uv": [0.125, 0.125, 0.25, 0.25], "texture": "#all"}, - "south": {"uv": [0.375, 0.125, 0.5, 0.25], "texture": "#all"}, - "west": {"uv": [0.25, 0.125, 0.375, 0.25], "texture": "#all"}, - "east": {"uv": [0, 0.125, 0.125, 0.25], "texture": "#all"} - } - }, - { - "__comment": "tube2c", - "from": [5, 14, 12], - "to": [6, 15, 13], - "faces": { - "down": {"uv": [0.375, 1.125, 0.25, 1.25], "texture": "#all"}, - "up": {"uv": [0.25, 1.25, 0.125, 1.125], "texture": "#all"}, - "north": {"uv": [0.125, 1.25, 0.25, 1.375], "texture": "#all"}, - "south": {"uv": [0.375, 1.25, 0.5, 1.375], "texture": "#all"}, - "west": {"uv": [0.25, 1.25, 0.375, 1.375], "texture": "#all"}, - "east": {"uv": [0, 1.25, 0.125, 1.375], "texture": "#all"} - } - }, - { - "__comment": "panelBraceRight2", - "from": [1, 27.5, 12], - "to": [6, 28.5, 14], - "faces": { - "down": {"uv": [9.5, 1.875, 8.875, 2.125], "texture": "#all"}, - "up": {"uv": [8.875, 2.125, 8.25, 1.875], "texture": "#all"}, - "north": {"uv": [8.25, 2.125, 8.875, 2.25], "texture": "#all"}, - "south": {"uv": [9.125, 2.125, 9.75, 2.25], "texture": "#all"}, - "west": {"uv": [8.875, 2.125, 9.125, 2.25], "texture": "#all"}, - "east": {"uv": [8, 2.125, 8.25, 2.25], "texture": "#all"} - } - }, - { - "__comment": "support7", - "from": [0.5, 4, 10.5], - "to": [1.5, 5, 11.5], - "faces": { - "down": {"uv": [0.375, 0, 0.25, 0.125], "texture": "#all"}, - "up": {"uv": [0.25, 0.125, 0.125, 0], "texture": "#all"}, - "north": {"uv": [0.125, 0.125, 0.25, 0.25], "texture": "#all"}, - "south": {"uv": [0.375, 0.125, 0.5, 0.25], "texture": "#all"}, - "west": {"uv": [0.25, 0.125, 0.375, 0.25], "texture": "#all"}, - "east": {"uv": [0, 0.125, 0.125, 0.25], "texture": "#all"} - } - }, - { - "__comment": "support12", - "from": [14.5, 4, 8.5], - "to": [15.5, 5, 9.5], - "faces": { - "down": {"uv": [0.375, 0, 0.25, 0.125], "texture": "#all"}, - "up": {"uv": [0.25, 0.125, 0.125, 0], "texture": "#all"}, - "north": {"uv": [0.125, 0.125, 0.25, 0.25], "texture": "#all"}, - "south": {"uv": [0.375, 0.125, 0.5, 0.25], "texture": "#all"}, - "west": {"uv": [0.25, 0.125, 0.375, 0.25], "texture": "#all"}, - "east": {"uv": [0, 0.125, 0.125, 0.25], "texture": "#all"} - } - }, - { - "__comment": "panelBraceLeft2", - "from": [10, 27.5, 12], - "to": [15, 28.5, 14], - "faces": { - "down": {"uv": [9.5, 1.875, 8.875, 2.125], "texture": "#all"}, - "up": {"uv": [8.875, 2.125, 8.25, 1.875], "texture": "#all"}, - "north": {"uv": [8.25, 2.125, 8.875, 2.25], "texture": "#all"}, - "south": {"uv": [9.125, 2.125, 9.75, 2.25], "texture": "#all"}, - "west": {"uv": [8.875, 2.125, 9.125, 2.25], "texture": "#all"}, - "east": {"uv": [8, 2.125, 8.25, 2.25], "texture": "#all"} - } - }, - { - "__comment": "tube2a", - "from": [10, 14, 12], - "to": [11, 15, 13], - "faces": { - "down": {"uv": [0.375, 1.125, 0.25, 1.25], "texture": "#all"}, - "up": {"uv": [0.25, 1.25, 0.125, 1.125], "texture": "#all"}, - "north": {"uv": [0.125, 1.25, 0.25, 1.375], "texture": "#all"}, - "south": {"uv": [0.375, 1.25, 0.5, 1.375], "texture": "#all"}, - "west": {"uv": [0.25, 1.25, 0.375, 1.375], "texture": "#all"}, - "east": {"uv": [0, 1.25, 0.125, 1.375], "texture": "#all"} - } - }, - { - "__comment": "panel3", - "from": [10.75, 27.95, 0], - "to": [16.75, 28.95, 16], - "faces": { - "down": {"uv": [14, 4, 13.25, 6], "texture": "#all"}, - "up": {"uv": [13.25, 6, 12.5, 4], "texture": "#all"}, - "north": {"uv": [12.5, 6, 13.25, 6.125], "texture": "#all"}, - "south": {"uv": [15.25, 6, 16, 6.125], "texture": "#all"}, - "west": {"uv": [13.25, 6, 15.25, 6.125], "texture": "#all"}, - "east": {"uv": [10.5, 6, 12.5, 6.125], "texture": "#all"} - } - }, - { - "__comment": "support13", - "from": [14.5, 4, 6.5], - "to": [15.5, 5, 7.5], - "faces": { - "down": {"uv": [0.375, 0, 0.25, 0.125], "texture": "#all"}, - "up": {"uv": [0.25, 0.125, 0.125, 0], "texture": "#all"}, - "north": {"uv": [0.125, 0.125, 0.25, 0.25], "texture": "#all"}, - "south": {"uv": [0.375, 0.125, 0.5, 0.25], "texture": "#all"}, - "west": {"uv": [0.25, 0.125, 0.375, 0.25], "texture": "#all"}, - "east": {"uv": [0, 0.125, 0.125, 0.25], "texture": "#all"} - } - }, - { - "__comment": "panelBraceRight1", - "from": [1, 27.5, 2], - "to": [6, 28.5, 4], - "faces": { - "down": {"uv": [9.5, 1.875, 8.875, 2.125], "texture": "#all"}, - "up": {"uv": [8.875, 2.125, 8.25, 1.875], "texture": "#all"}, - "north": {"uv": [8.25, 2.125, 8.875, 2.25], "texture": "#all"}, - "south": {"uv": [9.125, 2.125, 9.75, 2.25], "texture": "#all"}, - "west": {"uv": [8.875, 2.125, 9.125, 2.25], "texture": "#all"}, - "east": {"uv": [8, 2.125, 8.25, 2.25], "texture": "#all"} - } - }, - { - "__comment": "tank", - "from": [0, 5, 0], - "to": [16, 14, 16], - "faces": { - "down": {"uv": [6, 0, 4, 2], "texture": "#all"}, - "up": {"uv": [4, 2, 2, 0], "texture": "#all"}, - "north": {"uv": [2, 2, 4, 3.125], "texture": "#all"}, - "south": {"uv": [6, 2, 8, 3.125], "texture": "#all"}, - "west": {"uv": [4, 2, 6, 3.125], "texture": "#all"}, - "east": {"uv": [0, 2, 2, 3.125], "texture": "#all"} - } - }, - { - "__comment": "panelBrace", - "from": [7, 25.8, 6], - "to": [9, 27.8, 15], - "faces": { - "down": {"uv": [8.625, 2.25, 8.375, 3.375], "texture": "#all"}, - "up": {"uv": [8.375, 3.375, 8.125, 2.25], "texture": "#all"}, - "north": {"uv": [8.125, 3.375, 8.375, 3.625], "texture": "#all"}, - "south": {"uv": [9.5, 3.375, 9.75, 3.625], "texture": "#all"}, - "west": {"uv": [8.375, 3.375, 9.5, 3.625], "texture": "#all"}, - "east": {"uv": [7, 3.375, 8.125, 3.625], "texture": "#all"} - } - }, - { - "__comment": "support4", - "from": [0.5, 4, 4.5], - "to": [1.5, 5, 5.5], - "faces": { - "down": {"uv": [0.375, 0, 0.25, 0.125], "texture": "#all"}, - "up": {"uv": [0.25, 0.125, 0.125, 0], "texture": "#all"}, - "north": {"uv": [0.125, 0.125, 0.25, 0.25], "texture": "#all"}, - "south": {"uv": [0.375, 0.125, 0.5, 0.25], "texture": "#all"}, - "west": {"uv": [0.25, 0.125, 0.375, 0.25], "texture": "#all"}, - "east": {"uv": [0, 0.125, 0.125, 0.25], "texture": "#all"} - } - }, - { - "__comment": "laser", - "from": [7.5, 24.9, 7], - "to": [8.5, 26.9, 8], - "faces": { - "down": {"uv": [0.875, 0, 0.75, 0.125], "texture": "#all"}, - "up": {"uv": [0.75, 0.125, 0.625, 0], "texture": "#all"}, - "north": {"uv": [0.625, 0.125, 0.75, 0.375], "texture": "#all"}, - "south": {"uv": [0.875, 0.125, 1, 0.375], "texture": "#all"}, - "west": {"uv": [0.75, 0.125, 0.875, 0.375], "texture": "#all"}, - "east": {"uv": [0.5, 0.125, 0.625, 0.375], "texture": "#all"} - } - }, - { - "__comment": "panel1", - "from": [-0.75, 27.95, 0], - "to": [5.25, 28.95, 16], - "faces": { - "down": {"uv": [14, 4, 13.25, 6], "texture": "#all"}, - "up": {"uv": [13.25, 6, 12.5, 4], "texture": "#all"}, - "north": {"uv": [12.5, 6, 13.25, 6.125], "texture": "#all"}, - "south": {"uv": [15.25, 6, 16, 6.125], "texture": "#all"}, - "west": {"uv": [13.25, 6, 15.25, 6.125], "texture": "#all"}, - "east": {"uv": [10.5, 6, 12.5, 6.125], "texture": "#all"} - } - }, - { - "__comment": "support15", - "from": [14.5, 4, 2.5], - "to": [15.5, 5, 3.5], - "faces": { - "down": {"uv": [0.375, 0, 0.25, 0.125], "texture": "#all"}, - "up": {"uv": [0.25, 0.125, 0.125, 0], "texture": "#all"}, - "north": {"uv": [0.125, 0.125, 0.25, 0.25], "texture": "#all"}, - "south": {"uv": [0.375, 0.125, 0.5, 0.25], "texture": "#all"}, - "west": {"uv": [0.25, 0.125, 0.375, 0.25], "texture": "#all"}, - "east": {"uv": [0, 0.125, 0.125, 0.25], "texture": "#all"} - } - }, - { - "__comment": "support8", - "from": [0.5, 4, 12.5], - "to": [1.5, 5, 13.5], - "faces": { - "down": {"uv": [0.375, 0, 0.25, 0.125], "texture": "#all"}, - "up": {"uv": [0.25, 0.125, 0.125, 0], "texture": "#all"}, - "north": {"uv": [0.125, 0.125, 0.25, 0.25], "texture": "#all"}, - "south": {"uv": [0.375, 0.125, 0.5, 0.25], "texture": "#all"}, - "west": {"uv": [0.25, 0.125, 0.375, 0.25], "texture": "#all"}, - "east": {"uv": [0, 0.125, 0.125, 0.25], "texture": "#all"} - } - }, - { - "__comment": "laserBeamToggle", - "from": [7.5, 13.9, 7], - "to": [8.5, 24.9, 8], - "faces": { - "down": {"uv": [1.875, 0, 1.75, 0.125], "texture": "#all"}, - "up": {"uv": [1.75, 0.125, 1.625, 0], "texture": "#all"}, - "north": {"uv": [1.625, 0.125, 1.75, 1.5], "texture": "#all"}, - "south": {"uv": [1.875, 0.125, 2, 1.5], "texture": "#all"}, - "west": {"uv": [1.75, 0.125, 1.875, 1.5], "texture": "#all"}, - "east": {"uv": [1.5, 0.125, 1.625, 1.5], "texture": "#all"} - } - }, - { - "__comment": "brace2", - "from": [6, 13.5, 0.9], - "to": [7, 14.5, 2.9], - "faces": { - "down": {"uv": [0.5, 1.375, 0.375, 1.625], "texture": "#all"}, - "up": {"uv": [0.375, 1.625, 0.25, 1.375], "texture": "#all"}, - "north": {"uv": [0.25, 1.625, 0.375, 1.75], "texture": "#all"}, - "south": {"uv": [0.625, 1.625, 0.75, 1.75], "texture": "#all"}, - "west": {"uv": [0.375, 1.625, 0.625, 1.75], "texture": "#all"}, - "east": {"uv": [0, 1.625, 0.25, 1.75], "texture": "#all"} - } - }, - { - "__comment": "support9", - "from": [14.5, 4, 14.5], - "to": [15.5, 5, 15.5], - "faces": { - "down": {"uv": [0.375, 0, 0.25, 0.125], "texture": "#all"}, - "up": {"uv": [0.25, 0.125, 0.125, 0], "texture": "#all"}, - "north": {"uv": [0.125, 0.125, 0.25, 0.25], "texture": "#all"}, - "south": {"uv": [0.375, 0.125, 0.5, 0.25], "texture": "#all"}, - "west": {"uv": [0.25, 0.125, 0.375, 0.25], "texture": "#all"}, - "east": {"uv": [0, 0.125, 0.125, 0.25], "texture": "#all"} - } - }, - { - "__comment": "hole2", - "from": [6.5, 14, 5.5], - "to": [7.5, 16, 6.5], - "faces": { - "down": {"uv": [0.375, 0.75, 0.25, 0.875], "texture": "#all"}, - "up": {"uv": [0.25, 0.875, 0.125, 0.75], "texture": "#all"}, - "north": {"uv": [0.125, 0.875, 0.25, 1.125], "texture": "#all"}, - "south": {"uv": [0.375, 0.875, 0.5, 1.125], "texture": "#all"}, - "west": {"uv": [0.25, 0.875, 0.375, 1.125], "texture": "#all"}, - "east": {"uv": [0, 0.875, 0.125, 1.125], "texture": "#all"} - } - }, - { - "__comment": "panel2", - "from": [5, 28, 0], - "to": [11, 29, 16], - "faces": { - "down": {"uv": [14, 1.875, 13.25, 3.875], "texture": "#all"}, - "up": {"uv": [13.25, 3.875, 12.5, 1.875], "texture": "#all"}, - "north": {"uv": [12.5, 3.875, 13.25, 4], "texture": "#all"}, - "south": {"uv": [15.25, 3.875, 16, 4], "texture": "#all"}, - "west": {"uv": [13.25, 3.875, 15.25, 4], "texture": "#all"}, - "east": {"uv": [10.5, 3.875, 12.5, 4], "texture": "#all"} - } - }, - { - "__comment": "port", - "from": [4, 4, -0.00999999999999979], - "to": [12, 12, 0.99], - "faces": { - "down": {"uv": [2.125, 5.625, 1.125, 5.75], "texture": "#all"}, - "up": {"uv": [1.125, 5.75, 0.125, 5.625], "texture": "#all"}, - "north": {"uv": [0.125, 5.75, 1.125, 6.75], "texture": "#all"}, - "south": {"uv": [1.25, 5.75, 2.25, 6.75], "texture": "#all"}, - "west": {"uv": [1.125, 5.75, 1.25, 6.75], "texture": "#all"}, - "east": {"uv": [0, 5.75, 0.125, 6.75], "texture": "#all"} - } - }, - { - "__comment": "support16", - "from": [14.5, 4, 0.5], - "to": [15.5, 5, 1.5], - "faces": { - "down": {"uv": [0.375, 0, 0.25, 0.125], "texture": "#all"}, - "up": {"uv": [0.25, 0.125, 0.125, 0], "texture": "#all"}, - "north": {"uv": [0.125, 0.125, 0.25, 0.25], "texture": "#all"}, - "south": {"uv": [0.375, 0.125, 0.5, 0.25], "texture": "#all"}, - "west": {"uv": [0.25, 0.125, 0.375, 0.25], "texture": "#all"}, - "east": {"uv": [0, 0.125, 0.125, 0.25], "texture": "#all"} - } - }, - { - "__comment": "portConnector", - "from": [5, 4, 0.99], - "to": [11, 5, 1.99], - "faces": { - "down": {"uv": [1.625, 1.75, 0.875, 1.875], "texture": "#all"}, - "up": {"uv": [0.875, 1.875, 0.125, 1.75], "texture": "#all"}, - "north": {"uv": [0.125, 1.875, 0.875, 2], "texture": "#all"}, - "south": {"uv": [1, 1.875, 1.75, 2], "texture": "#all"}, - "west": {"uv": [0.875, 1.875, 1, 2], "texture": "#all"}, - "east": {"uv": [0, 1.875, 0.125, 2], "texture": "#all"} - } - }, - { - "__comment": "support10", - "from": [14.5, 4, 12.5], - "to": [15.5, 5, 13.5], - "faces": { - "down": {"uv": [0.375, 0, 0.25, 0.125], "texture": "#all"}, - "up": {"uv": [0.25, 0.125, 0.125, 0], "texture": "#all"}, - "north": {"uv": [0.125, 0.125, 0.25, 0.25], "texture": "#all"}, - "south": {"uv": [0.375, 0.125, 0.5, 0.25], "texture": "#all"}, - "west": {"uv": [0.25, 0.125, 0.375, 0.25], "texture": "#all"}, - "east": {"uv": [0, 0.125, 0.125, 0.25], "texture": "#all"} - } - }, - { - "__comment": "support14", - "from": [14.5, 4, 4.5], - "to": [15.5, 5, 5.5], - "faces": { - "down": {"uv": [0.375, 0, 0.25, 0.125], "texture": "#all"}, - "up": {"uv": [0.25, 0.125, 0.125, 0], "texture": "#all"}, - "north": {"uv": [0.125, 0.125, 0.25, 0.25], "texture": "#all"}, - "south": {"uv": [0.375, 0.125, 0.5, 0.25], "texture": "#all"}, - "west": {"uv": [0.25, 0.125, 0.375, 0.25], "texture": "#all"}, - "east": {"uv": [0, 0.125, 0.125, 0.25], "texture": "#all"} - } - }, - { - "__comment": "support1", - "from": [0.5, 4, 0.5], - "to": [1.5, 5, 1.5], - "faces": { - "down": {"uv": [0.375, 0, 0.25, 0.125], "texture": "#all"}, - "up": {"uv": [0.25, 0.125, 0.125, 0], "texture": "#all"}, - "north": {"uv": [0.125, 0.125, 0.25, 0.25], "texture": "#all"}, - "south": {"uv": [0.375, 0.125, 0.5, 0.25], "texture": "#all"}, - "west": {"uv": [0.25, 0.125, 0.375, 0.25], "texture": "#all"}, - "east": {"uv": [0, 0.125, 0.125, 0.25], "texture": "#all"} - } - }, - { - "__comment": "support11", - "from": [14.5, 4, 10.5], - "to": [15.5, 5, 11.5], - "faces": { - "down": {"uv": [0.375, 0, 0.25, 0.125], "texture": "#all"}, - "up": {"uv": [0.25, 0.125, 0.125, 0], "texture": "#all"}, - "north": {"uv": [0.125, 0.125, 0.25, 0.25], "texture": "#all"}, - "south": {"uv": [0.375, 0.125, 0.5, 0.25], "texture": "#all"}, - "west": {"uv": [0.25, 0.125, 0.375, 0.25], "texture": "#all"}, - "east": {"uv": [0, 0.125, 0.125, 0.25], "texture": "#all"} - } - }, - { - "__comment": "support6", - "from": [0.5, 4, 8.5], - "to": [1.5, 5, 9.5], - "faces": { - "down": {"uv": [0.375, 0, 0.25, 0.125], "texture": "#all"}, - "up": {"uv": [0.25, 0.125, 0.125, 0], "texture": "#all"}, - "north": {"uv": [0.125, 0.125, 0.25, 0.25], "texture": "#all"}, - "south": {"uv": [0.375, 0.125, 0.5, 0.25], "texture": "#all"}, - "west": {"uv": [0.25, 0.125, 0.375, 0.25], "texture": "#all"}, - "east": {"uv": [0, 0.125, 0.125, 0.25], "texture": "#all"} - } - }, - { - "__comment": "support2", - "from": [0.5, 4, 14.5], - "to": [1.5, 5, 15.5], - "faces": { - "down": {"uv": [0.375, 0, 0.25, 0.125], "texture": "#all"}, - "up": {"uv": [0.25, 0.125, 0.125, 0], "texture": "#all"}, - "north": {"uv": [0.125, 0.125, 0.25, 0.25], "texture": "#all"}, - "south": {"uv": [0.375, 0.125, 0.5, 0.25], "texture": "#all"}, - "west": {"uv": [0.25, 0.125, 0.375, 0.25], "texture": "#all"}, - "east": {"uv": [0, 0.125, 0.125, 0.25], "texture": "#all"} - } - }, - { - "__comment": "tube1a", - "from": [10, 14, 10], - "to": [11, 15, 11], - "faces": { - "down": {"uv": [0.375, 1.125, 0.25, 1.25], "texture": "#all"}, - "up": {"uv": [0.25, 1.25, 0.125, 1.125], "texture": "#all"}, - "north": {"uv": [0.125, 1.25, 0.25, 1.375], "texture": "#all"}, - "south": {"uv": [0.375, 1.25, 0.5, 1.375], "texture": "#all"}, - "west": {"uv": [0.25, 1.25, 0.375, 1.375], "texture": "#all"}, - "east": {"uv": [0, 1.25, 0.125, 1.375], "texture": "#all"} - } - }, - { - "__comment": "tube2b", - "from": [5, 15, 12], - "to": [11, 16, 13], - "faces": { - "down": {"uv": [1.625, 1.75, 0.875, 1.875], "texture": "#all"}, - "up": {"uv": [0.875, 1.875, 0.125, 1.75], "texture": "#all"}, - "north": {"uv": [0.125, 1.875, 0.875, 2], "texture": "#all"}, - "south": {"uv": [1, 1.875, 1.75, 2], "texture": "#all"}, - "west": {"uv": [0.875, 1.875, 1, 2], "texture": "#all"}, - "east": {"uv": [0, 1.875, 0.125, 2], "texture": "#all"} - } - }, - { - "__comment": "base", - "from": [0, 0, 0], - "to": [16, 4, 16], - "faces": { - "down": {"uv": [6, 3.125, 4, 5.125], "texture": "#all"}, - "up": {"uv": [4, 5.125, 2, 3.125], "texture": "#all"}, - "north": {"uv": [2, 5.125, 4, 5.625], "texture": "#all"}, - "south": {"uv": [6, 5.125, 8, 5.625], "texture": "#all"}, - "west": {"uv": [4, 5.125, 6, 5.625], "texture": "#all"}, - "east": {"uv": [0, 5.125, 2, 5.625], "texture": "#all"} - } - }, - { - "__comment": "tube1b", - "from": [5, 15, 10], - "to": [11, 16, 11], - "faces": { - "down": {"uv": [1.625, 1.75, 0.875, 1.875], "texture": "#all"}, - "up": {"uv": [0.875, 1.875, 0.125, 1.75], "texture": "#all"}, - "north": {"uv": [0.125, 1.875, 0.875, 2], "texture": "#all"}, - "south": {"uv": [1, 1.875, 1.75, 2], "texture": "#all"}, - "west": {"uv": [0.875, 1.875, 1, 2], "texture": "#all"}, - "east": {"uv": [0, 1.875, 0.125, 2], "texture": "#all"} - } - }, - { - "__comment": "support3", - "from": [0.5, 4, 2.5], - "to": [1.5, 5, 3.5], - "faces": { - "down": {"uv": [0.375, 0, 0.25, 0.125], "texture": "#all"}, - "up": {"uv": [0.25, 0.125, 0.125, 0], "texture": "#all"}, - "north": {"uv": [0.125, 0.125, 0.25, 0.25], "texture": "#all"}, - "south": {"uv": [0.375, 0.125, 0.5, 0.25], "texture": "#all"}, - "west": {"uv": [0.25, 0.125, 0.375, 0.25], "texture": "#all"}, - "east": {"uv": [0, 0.125, 0.125, 0.25], "texture": "#all"} - } - }, - { - "__comment": "hole4", - "from": [6.5, 14, 6.5], - "to": [9.5, 16, 7.5], - "faces": { - "down": {"uv": [0.875, 0.375, 0.5, 0.5], "texture": "#all"}, - "up": {"uv": [0.5, 0.5, 0.125, 0.375], "texture": "#all"}, - "north": {"uv": [0.125, 0.5, 0.5, 0.75], "texture": "#all"}, - "south": {"uv": [0.625, 0.5, 1, 0.75], "texture": "#all"}, - "west": {"uv": [0.5, 0.5, 0.625, 0.75], "texture": "#all"}, - "east": {"uv": [0, 0.5, 0.125, 0.75], "texture": "#all"} - } - }, - { - "__comment": "conduit", - "from": [7, 13.5, 7], - "to": [9, 14.5, 14], - "faces": { - "down": {"uv": [7.375, 0, 7.125, 0.875], "texture": "#all"}, - "up": {"uv": [7.125, 0.875, 6.875, 0], "texture": "#all"}, - "north": {"uv": [6.875, 0.875, 7.125, 1], "texture": "#all"}, - "south": {"uv": [8, 0.875, 8.25, 1], "texture": "#all"}, - "west": {"uv": [7.125, 0.875, 8, 1], "texture": "#all"}, - "east": {"uv": [6, 0.875, 6.875, 1], "texture": "#all"} - } - }, - { - "__comment": "hole1", - "from": [6.5, 14, 4.5], - "to": [9.5, 16, 5.5], - "faces": { - "down": {"uv": [0.875, 0.375, 0.5, 0.5], "texture": "#all"}, - "up": {"uv": [0.5, 0.5, 0.125, 0.375], "texture": "#all"}, - "north": {"uv": [0.125, 0.5, 0.5, 0.75], "texture": "#all"}, - "south": {"uv": [0.625, 0.5, 1, 0.75], "texture": "#all"}, - "west": {"uv": [0.5, 0.5, 0.625, 0.75], "texture": "#all"}, - "east": {"uv": [0, 0.5, 0.125, 0.75], "texture": "#all"} - } - }, - { - "__comment": "platform", - "from": [5, 12, 3], - "to": [11, 15, 9], - "faces": { - "down": {"uv": [4.5, 5.625, 3.75, 6.375], "texture": "#all"}, - "up": {"uv": [3.75, 6.375, 3, 5.625], "texture": "#all"}, - "north": {"uv": [3, 6.375, 3.75, 6.75], "texture": "#all"}, - "south": {"uv": [4.5, 6.375, 5.25, 6.75], "texture": "#all"}, - "west": {"uv": [3.75, 6.375, 4.5, 6.75], "texture": "#all"}, - "east": {"uv": [2.25, 6.375, 3, 6.75], "texture": "#all"} - } - }, - { - "__comment": "bridge", - "from": [2, 4, 2], - "to": [14, 5, 15], - "faces": { - "down": {"uv": [12.75, 0.125, 11.25, 1.75], "texture": "#all"}, - "up": {"uv": [11.25, 1.75, 9.75, 0.125], "texture": "#all"}, - "north": {"uv": [9.75, 1.75, 11.25, 1.875], "texture": "#all"}, - "south": {"uv": [12.875, 1.75, 14.375, 1.875], "texture": "#all"}, - "west": {"uv": [11.25, 1.75, 12.875, 1.875], "texture": "#all"}, - "east": {"uv": [8.125, 1.75, 9.75, 1.875], "texture": "#all"} - } - }, - { - "__comment": "pole", - "from": [6, 14, 14], - "to": [10, 29, 16], - "faces": { - "down": {"uv": [15.75, 0, 15.25, 0.25], "texture": "#all"}, - "up": {"uv": [15.25, 0.25, 14.75, 0], "texture": "#all"}, - "north": {"uv": [14.75, 0.25, 15.25, 2.125], "texture": "#all"}, - "south": {"uv": [15.5, 0.25, 16, 2.125], "texture": "#all"}, - "west": {"uv": [15.25, 0.25, 15.5, 2.125], "texture": "#all"}, - "east": {"uv": [14.5, 0.25, 14.75, 2.125], "texture": "#all"} - } - }, - { - "__comment": "panelBraceLeft1", - "from": [10, 27.5, 2], - "to": [15, 28.5, 4], - "faces": { - "down": {"uv": [9.5, 1.875, 8.875, 2.125], "texture": "#all"}, - "up": {"uv": [8.875, 2.125, 8.25, 1.875], "texture": "#all"}, - "north": {"uv": [8.25, 2.125, 8.875, 2.25], "texture": "#all"}, - "south": {"uv": [9.125, 2.125, 9.75, 2.25], "texture": "#all"}, - "west": {"uv": [8.875, 2.125, 9.125, 2.25], "texture": "#all"}, - "east": {"uv": [8, 2.125, 8.25, 2.25], "texture": "#all"} - } - }, - { - "__comment": "brace1", - "from": [9, 13.5, 0.9], - "to": [10, 14.5, 2.9], - "faces": { - "down": {"uv": [0.5, 1.375, 0.375, 1.625], "texture": "#all"}, - "up": {"uv": [0.375, 1.625, 0.25, 1.375], "texture": "#all"}, - "north": {"uv": [0.25, 1.625, 0.375, 1.75], "texture": "#all"}, - "south": {"uv": [0.625, 1.625, 0.75, 1.75], "texture": "#all"}, - "west": {"uv": [0.375, 1.625, 0.625, 1.75], "texture": "#all"}, - "east": {"uv": [0, 1.625, 0.25, 1.75], "texture": "#all"} - } - }, - { - "__comment": "tube1c", - "from": [5, 14, 10], - "to": [6, 15, 11], - "faces": { - "down": {"uv": [0.375, 1.125, 0.25, 1.25], "texture": "#all"}, - "up": {"uv": [0.25, 1.25, 0.125, 1.125], "texture": "#all"}, - "north": {"uv": [0.125, 1.25, 0.25, 1.375], "texture": "#all"}, - "south": {"uv": [0.375, 1.25, 0.5, 1.375], "texture": "#all"}, - "west": {"uv": [0.25, 1.25, 0.375, 1.375], "texture": "#all"}, - "east": {"uv": [0, 1.25, 0.125, 1.375], "texture": "#all"} - } - }, - { - "__comment": "panelBase", - "from": [5, 27, 1], - "to": [11, 28, 15], - "faces": { - "down": {"uv": [6.75, 5.625, 6, 7.375], "texture": "#all"}, - "up": {"uv": [6, 7.375, 5.25, 5.625], "texture": "#all"}, - "north": {"uv": [5.25, 7.375, 6, 7.5], "texture": "#all"}, - "south": {"uv": [7.75, 7.375, 8.5, 7.5], "texture": "#all"}, - "west": {"uv": [6, 7.375, 7.75, 7.5], "texture": "#all"}, - "east": {"uv": [3.5, 7.375, 5.25, 7.5], "texture": "#all"} - } - }, - { - "__comment": "hole3", - "from": [8.5, 14, 5.5], - "to": [9.5, 16, 6.5], - "faces": { - "down": {"uv": [0.375, 0.75, 0.25, 0.875], "texture": "#all"}, - "up": {"uv": [0.25, 0.875, 0.125, 0.75], "texture": "#all"}, - "north": {"uv": [0.125, 0.875, 0.25, 1.125], "texture": "#all"}, - "south": {"uv": [0.375, 0.875, 0.5, 1.125], "texture": "#all"}, - "west": {"uv": [0.25, 0.875, 0.375, 1.125], "texture": "#all"}, - "east": {"uv": [0, 0.875, 0.125, 1.125], "texture": "#all"} - } - } - ], - "textures": { - "all": "mekanism:blocks/models/solar_neutron_activator", - "particle": "..." - } -} diff --git a/src/main/resources/assets/mekanism/models/block/solar_tri.obj b/src/main/resources/assets/mekanism/models/block/solar_tri.obj deleted file mode 100644 index 094ade5c2..000000000 --- a/src/main/resources/assets/mekanism/models/block/solar_tri.obj +++ /dev/null @@ -1,513 +0,0 @@ -# Blender v2.70 (sub 0) OBJ File: 'untitled.blend' -# www.blender.org -o Cube -v 0.775751 0.000000 -0.775751 -v 0.775751 0.000000 0.775751 -v -0.775751 0.000000 0.775751 -v 0.600098 1.245471 -0.600098 -v 0.600098 1.245471 0.600099 -v -0.600098 1.245471 0.600098 -v -0.600098 1.245471 -0.600098 -v -0.775751 0.000000 -0.775751 -v -1.000000 2.000000 -1.000000 -v -0.400000 0.003810 -0.200000 -v -0.597037 0.003810 -1.000000 -v 0.597037 0.003810 -1.000000 -v 0.400000 0.003810 -0.200000 -v -0.210455 1.400000 -0.200000 -v -0.400000 1.400000 -1.000000 -v 0.400000 1.400000 -1.000000 -v 0.210455 1.400000 -0.200000 -v -0.163734 0.001860 0.929790 -v -0.163734 0.001860 0.602323 -v 0.163734 0.001860 0.602323 -v 0.163734 0.001860 0.929790 -v -0.163734 1.681595 0.929790 -v -0.163734 1.681595 0.602323 -v 0.163734 1.681595 0.602323 -v 0.163734 1.681595 0.929790 -v -0.163734 2.317753 0.908083 -v -0.163734 2.154813 0.624031 -v 0.163734 2.154813 0.624031 -v 0.163734 2.317753 0.908083 -v -0.163734 2.494844 0.723671 -v -0.163734 2.332132 0.542139 -v 0.163734 2.332132 0.542139 -v 0.163734 2.494844 0.723671 -v -0.163734 2.557197 0.442637 -v -0.163734 2.438710 0.421698 -v 0.163734 2.438710 0.421698 -v 0.163734 2.557197 0.442637 -v -0.163734 2.705466 -0.790486 -v -0.163734 2.586978 -0.811424 -v 0.163734 2.586978 -0.811424 -v 0.163734 2.705466 -0.790486 -v -0.724969 2.724604 0.442637 -v -0.724969 2.606117 0.421698 -v 0.724969 2.606117 0.421698 -v 0.724969 2.724604 0.442637 -v -0.724969 2.872873 -0.790486 -v -0.724969 2.754385 -0.811424 -v 0.724969 2.754385 -0.811424 -v 0.724969 2.872873 -0.790486 -v -0.208086 1.400000 -0.391914 -v -0.208086 1.400000 -0.808086 -v 0.208086 1.400000 -0.808086 -v 0.208086 1.400000 -0.391914 -v -0.150252 1.687980 -0.469609 -v -0.150252 1.837299 -0.730391 -v 0.150252 1.837299 -0.730391 -v 0.150252 1.687980 -0.469609 -v -0.079605 1.697107 -0.540204 -v -0.079605 1.776218 -0.678369 -v 0.079605 1.776218 -0.678369 -v 0.079605 1.697107 -0.540204 -v 0.444352 2.499090 0.421698 -v 0.444352 2.647359 -0.811424 -v 0.444352 2.765847 -0.790486 -v 0.444352 2.617578 0.442637 -v -0.444352 2.647359 -0.811424 -v -0.444352 2.499090 0.421698 -v -0.444352 2.617578 0.442637 -v -0.444352 2.765847 -0.790486 -v -0.163734 2.599183 -0.359366 -v 0.163734 2.599183 -0.359366 -v 0.163734 2.480696 -0.380305 -v -0.163734 2.480696 -0.380305 -v -0.724969 2.766590 -0.359366 -v 0.724969 2.766590 -0.359366 -v 0.724969 2.648103 -0.380305 -v -0.724969 2.648103 -0.380305 -v 0.444352 2.541076 -0.380305 -v 0.444352 2.659564 -0.359366 -v -0.444352 2.541076 -0.380305 -v -0.444352 2.659564 -0.359366 -vt 0.250000 0.851562 -vt 0.250000 0.656250 -vt 0.437500 0.656250 -vt 0.695312 0.046875 -vt 0.656250 0.250000 -vt 0.460938 0.250000 -vt 0.445312 0.453125 -vt 0.406250 0.656250 -vt 0.218750 0.656250 -vt 0.195312 0.250000 -vt 0.195312 0.000000 -vt 0.445312 0.000000 -vt 0.468750 0.250000 -vt 0.664062 0.250000 -vt 0.695312 0.453125 -vt 0.828125 0.250000 -vt 0.695312 0.250000 -vt 0.695312 0.015625 -vt 0.031250 0.226562 -vt 0.000000 0.000000 -vt 0.187500 0.000000 -vt 0.554688 0.890625 -vt 0.554688 0.664062 -vt 0.687500 0.664062 -vt 0.718750 0.921875 -vt 0.687500 0.703125 -vt 0.820312 0.703125 -vt 0.695312 0.328125 -vt 0.882812 0.328125 -vt 0.851562 0.453125 -vt 0.054688 0.351562 -vt 0.062500 0.312500 -vt 0.132812 0.312500 -vt 0.140625 0.625000 -vt 0.132812 0.359375 -vt 0.179688 0.359375 -vt 0.945312 0.781250 -vt 0.945312 0.507812 -vt 1.000000 0.507812 -vt 0.007812 0.625000 -vt 0.023438 0.359375 -vt 0.078125 0.359375 -vt 0.890625 0.726562 -vt 0.890625 0.453125 -vt 0.945312 0.453125 -vt 1.000000 0.453125 -vt 0.945312 0.726562 -vt 0.945312 0.828125 -vt 0.890625 0.828125 -vt 0.945312 0.867188 -vt 0.890625 0.867188 -vt 0.054688 0.632812 -vt 0.046875 0.703125 -vt 0.000000 0.726562 -vt 1.000000 0.781250 -vt 1.000000 0.851562 -vt 0.945312 0.851562 -vt 0.187500 0.625000 -vt 0.187500 0.726562 -vt 0.945312 0.914062 -vt 0.890625 0.914062 -vt 0.062500 0.734375 -vt 0.031250 0.757812 -vt 1.000000 0.882812 -vt 0.945312 0.882812 -vt 0.140625 0.703125 -vt 0.164062 0.757812 -vt 0.593750 0.585938 -vt 0.593750 0.656250 -vt 0.539062 0.656250 -vt 0.078125 0.750000 -vt 1.000000 0.914062 -vt 0.117188 0.773438 -vt 0.117188 0.750000 -vt 0.585938 0.046875 -vt 0.531250 0.046875 -vt 0.531250 0.031250 -vt 0.820312 0.648438 -vt 0.890625 0.648438 -vt 0.890625 0.695312 -vt 0.820312 0.546875 -vt 0.890625 0.546875 -vt 0.890625 0.601562 -vt 0.687500 0.500000 -vt 0.687500 0.453125 -vt 0.820312 0.453125 -vt 0.132812 0.820312 -vt 0.203125 0.828125 -vt 0.203125 0.851562 -vt 0.125000 0.820312 -vt 0.125000 0.796875 -vt 0.203125 0.796875 -vt 0.640625 0.453125 -vt 0.687500 0.460938 -vt 0.687500 0.585938 -vt 0.492188 0.585938 -vt 0.492188 0.656250 -vt 0.445312 0.656250 -vt 0.632812 0.039062 -vt 0.632812 0.015625 -vt 0.679688 0.000000 -vt 0.484375 0.039062 -vt 0.445312 0.023438 -vt 0.820312 0.296875 -vt 0.867188 0.296875 -vt 0.867188 0.320312 -vt 0.507812 0.828125 -vt 0.500000 0.851562 -vt 0.453125 0.851562 -vt 0.546875 0.710938 -vt 0.492188 0.710938 -vt 0.062500 0.257812 -vt 0.156250 0.226562 -vt 0.132812 0.257812 -vt 0.132812 0.351562 -vt 0.531250 0.718750 -vt 0.507812 0.718750 -vt 0.882812 0.703125 -vt 0.875000 0.773438 -vt 0.554688 0.750000 -vt 0.546875 0.820312 -vt 0.492188 0.820312 -vt 0.742188 0.265625 -vt 0.765625 0.304688 -vt 0.531250 0.742188 -vt 0.507812 0.742188 -vt 0.859375 0.773438 -vt 0.835938 0.765625 -vt 0.531250 0.828125 -vt 0.757812 0.265625 -vt 0.820312 0.601562 -vt 0.593750 0.453125 -vt 0.640625 0.585938 -vt 0.585938 0.031250 -vt 0.773438 0.296875 -vt 0.820312 0.312500 -vt 0.687500 0.546875 -vt 0.820312 0.500000 -vt 0.539062 0.585938 -vt 0.484375 0.015625 -vt 0.554688 0.835938 -vt 0.546875 0.859375 -vt 0.539062 0.453125 -vt 0.687500 0.648438 -vt 0.820312 0.695312 -vt 0.000000 0.835938 -vt 0.000000 0.820312 -vt 0.000000 0.773438 -vt 0.687500 0.656250 -vt 0.492188 0.453125 -vt 0.445312 0.585938 -vt 0.687500 0.601562 -vt 0.640625 0.656250 -vt 0.890625 0.500000 -vt 0.406250 0.250000 -vt 0.195312 0.453125 -vt 0.437500 0.851562 -vt 0.445312 0.046875 -vt 0.445312 0.250000 -vt 0.828125 0.023438 -vt 0.687500 0.890625 -vt 0.789062 0.921875 -vt 0.726562 0.453125 -vt 0.132812 0.734375 -vt 0.070312 0.773438 -vt 0.132812 0.835938 -vt 0.195312 0.820312 -vt 0.679688 0.023438 -vt 0.460938 0.828125 -vt 0.484375 0.664062 -vt 0.828125 0.750000 -vt 0.484375 0.750000 -vt 0.695312 0.320312 -vt 0.765625 0.289062 -vt 0.773438 0.320312 -vt 0.687500 0.695312 -vt 0.000000 0.789062 -vt 0.445312 0.460938 -vt 0.218750 0.250000 -vn 0.000000 1.000000 0.000000 -vn 0.990201 0.139651 0.000001 -vn -0.000001 0.139651 0.990201 -vn 0.000000 -1.000000 0.000000 -vn -0.990201 0.139651 -0.000000 -vn -0.964014 0.136046 0.228405 -vn 0.000000 0.000000 -1.000000 -vn 0.962655 0.130689 0.237099 -vn 0.000000 0.000000 1.000000 -vn 0.000000 1.000000 -0.000001 -vn -1.000000 0.000000 0.000000 -vn 1.000000 0.000000 0.000000 -vn 0.000000 0.034103 0.999418 -vn 0.000000 0.721277 0.692647 -vn 0.000000 0.045825 -0.998949 -vn 0.000000 0.976260 0.216604 -vn 0.000000 -0.419278 -0.907858 -vn 0.000000 0.970931 0.239361 -vn 0.000000 -0.748892 -0.662692 -vn 0.000000 0.174022 -0.984742 -vn 0.347263 -0.910507 -0.224466 -vn 0.000000 -0.970931 -0.239361 -vn -0.355931 -0.933234 -0.048855 -vn -0.355931 0.933234 0.048857 -vn 0.347263 0.910508 0.224464 -vn -0.066225 0.173640 -0.982580 -vn 0.066226 0.173641 -0.982580 -vn 0.066226 -0.173641 0.982580 -vn -0.066225 -0.173640 0.982580 -vn 0.000000 0.260479 0.965479 -vn 0.000000 1.000000 0.000001 -vn 0.000000 0.991746 0.128214 -vn 0.991368 0.131110 0.000000 -vn 0.000000 0.174930 -0.984581 -vn -0.964527 0.229089 0.131172 -vn 0.000000 0.867811 0.496894 -vn -0.358815 0.810023 0.463805 -vn 0.000000 0.648393 0.761306 -vn 0.358814 0.810023 0.463804 -vn 0.204500 -0.950411 -0.234303 -vn -0.210081 0.976347 0.051114 -vn -0.037418 0.173900 -0.984052 -vn 0.037418 -0.173901 0.984052 -vn -0.210081 -0.976347 -0.051112 -vn 0.204501 0.950412 0.234302 -vn 0.037419 0.173901 -0.984052 -vn -0.037418 -0.173900 0.984052 -vn 0.000000 0.998632 0.052280 -vn 0.355931 -0.933234 -0.048857 -vn 0.000000 -0.998632 -0.052280 -vn -0.347263 -0.910508 -0.224464 -vn -0.347263 0.910507 0.224466 -vn 0.355931 0.933234 0.048855 -vn 0.210081 -0.976347 -0.051114 -vn -0.204500 0.950411 0.234303 -vn -0.204501 -0.950412 -0.234302 -vn 0.210081 0.976347 0.051112 -vn 0.000000 0.139652 -0.990201 -vn 0.990201 0.139652 0.000000 -vn 0.000000 0.139651 0.990201 -vn -0.962655 0.130689 0.237099 -vn 0.964014 0.136046 0.228405 -vn 0.000000 0.721278 0.692646 -vn 0.000000 0.045824 -0.998950 -vn 0.000000 0.976260 0.216603 -vn 0.000000 0.970931 0.239362 -vn 0.000000 0.174021 -0.984742 -vn 0.347263 -0.910507 -0.224464 -vn 0.000000 -0.970930 -0.239362 -vn -0.355931 -0.933234 -0.048857 -vn -0.355931 0.933234 0.048855 -vn 0.347263 0.910507 0.224466 -vn -0.066226 0.173641 -0.982580 -vn 0.066225 0.173640 -0.982580 -vn 0.066225 -0.173640 0.982580 -vn -0.066226 -0.173641 0.982580 -vn 0.000000 0.260479 0.965480 -vn 0.000000 0.991746 0.128218 -vn 0.964527 0.229089 0.131172 -vn -0.991368 0.131110 0.000000 -vn 0.000000 0.867812 0.496892 -vn -0.358814 0.810023 0.463804 -vn 0.000000 0.648392 0.761307 -vn 0.358814 0.810023 0.463805 -vn 0.204501 -0.950412 -0.234302 -vn -0.210081 0.976347 0.051112 -vn -0.037418 0.173901 -0.984052 -vn 0.037418 -0.173900 0.984052 -vn -0.210081 -0.976347 -0.051114 -vn 0.204501 0.950411 0.234303 -vn 0.037418 0.173900 -0.984052 -vn -0.037419 -0.173901 0.984052 -vn 0.355931 -0.933234 -0.048855 -vn -0.347263 -0.910507 -0.224466 -vn -0.347263 0.910508 0.224464 -vn 0.355931 0.933234 0.048857 -vn 0.210081 -0.976347 -0.051112 -vn -0.204501 0.950412 0.234302 -vn -0.204500 -0.950411 -0.234304 -vn 0.210081 0.976347 0.051114 -vn 0.000000 0.139651 -0.990201 -s off -f 7/1/1 6/2/1 5/3/1 -f 1/4/2 4/5/2 5/6/2 -f 2/7/3 5/8/3 6/9/3 -f 2/10/4 3/11/4 8/12/4 -f 6/13/5 7/14/5 8/15/5 -f 14/16/6 15/17/6 11/18/6 -f 16/19/7 12/20/7 11/21/7 -f 17/22/8 13/23/8 12/24/8 -f 14/25/9 10/26/9 13/27/9 -f 11/28/4 12/29/4 13/30/4 -f 17/31/10 53/32/10 50/33/10 -f 23/34/11 19/35/11 18/36/11 -f 24/37/7 20/38/7 19/39/7 -f 25/40/12 21/41/12 20/42/12 -f 22/43/9 18/44/9 21/45/9 -f 18/46/4 19/39/4 20/38/4 -f 25/47/13 29/48/13 26/49/13 -f 29/48/14 33/50/14 30/51/14 -f 24/52/12 28/53/12 29/54/12 -f 23/55/15 27/56/15 28/57/15 -f 23/34/11 22/58/11 26/59/11 -f 33/50/16 37/60/16 34/61/16 -f 28/53/12 32/62/12 33/63/12 -f 27/56/17 31/64/17 32/65/17 -f 27/66/11 26/59/11 30/67/11 -f 71/68/18 41/69/18 38/70/18 -f 33/63/12 32/62/12 36/71/12 -f 31/64/19 35/72/19 36/60/19 -f 30/67/11 34/73/11 35/74/11 -f 40/75/20 39/76/20 38/77/20 -f 78/78/21 63/79/21 48/80/21 -f 73/81/22 39/82/22 40/83/22 -f 67/84/23 43/85/23 77/86/23 -f 76/87/12 48/88/12 49/89/12 -f 77/90/11 74/91/11 46/92/11 -f 65/93/24 45/94/24 75/95/24 -f 81/96/25 69/97/25 46/98/25 -f 63/99/26 64/100/26 49/101/26 -f 66/102/27 47/103/27 46/12/27 -f 62/104/28 44/105/28 45/106/28 -f 67/107/29 68/108/29 42/109/29 -f 53/23/30 57/110/30 54/111/30 -f 17/31/1 16/19/1 52/112/1 -f 15/113/31 51/114/31 52/112/31 -f 14/115/1 50/33/1 51/114/1 -f 57/110/32 61/116/32 58/117/32 -f 53/27/33 52/118/33 56/119/33 -f 51/120/34 55/121/34 56/122/34 -f 50/17/35 54/123/35 55/124/35 -f 60/125/36 59/126/36 58/117/36 -f 56/119/37 60/127/37 61/128/37 -f 55/121/38 59/129/38 60/107/38 -f 55/124/39 54/123/39 58/130/39 -f 72/131/40 40/83/40 63/79/40 -f 37/132/41 65/93/41 79/133/41 -f 40/75/42 41/134/42 64/100/42 -f 36/135/43 62/104/43 65/136/43 -f 35/137/44 67/84/44 80/138/44 -f 70/139/45 38/70/45 69/97/45 -f 39/76/46 66/102/46 69/140/46 -f 35/141/47 34/142/47 68/108/47 -f 34/143/48 37/132/48 71/68/48 -f 62/144/49 78/78/49 76/145/49 -f 35/137/50 73/81/50 72/131/50 -f 80/138/51 77/86/51 47/44/51 -f 45/146/12 44/147/12 76/87/12 -f 42/148/11 74/91/11 77/90/11 -f 79/133/52 75/95/52 49/149/52 -f 68/150/53 81/96/53 74/151/53 -f 36/152/54 72/131/54 78/78/54 -f 71/68/55 79/133/55 64/153/55 -f 73/81/56 80/138/56 66/154/56 -f 34/143/57 70/139/57 81/96/57 -f 4/155/58 1/7/58 8/156/58 -f 4/157/1 7/1/1 5/3/1 -f 2/158/59 1/4/59 5/6/59 -f 3/156/60 2/7/60 6/9/60 -f 1/159/4 2/10/4 8/12/4 -f 3/7/5 6/13/5 8/15/5 -f 10/160/61 14/16/61 11/18/61 -f 15/113/7 16/19/7 11/21/7 -f 16/161/62 17/22/62 12/24/62 -f 17/162/9 14/25/9 13/27/9 -f 10/163/4 11/28/4 13/30/4 -f 14/115/1 17/31/1 50/33/1 -f 22/58/11 23/34/11 18/36/11 -f 23/55/7 24/37/7 19/39/7 -f 24/52/12 25/40/12 20/42/12 -f 25/47/9 22/43/9 21/45/9 -f 21/45/4 18/46/4 20/38/4 -f 22/43/13 25/47/13 26/49/13 -f 26/49/63 29/48/63 30/51/63 -f 25/40/12 24/52/12 29/54/12 -f 24/37/64 23/55/64 28/57/64 -f 27/66/11 23/34/11 26/59/11 -f 30/51/65 33/50/65 34/61/65 -f 29/54/12 28/53/12 33/63/12 -f 28/57/17 27/56/17 32/65/17 -f 31/164/11 27/66/11 30/67/11 -f 70/139/66 71/68/66 38/70/66 -f 37/165/12 33/63/12 36/71/12 -f 32/65/19 31/64/19 36/60/19 -f 31/164/11 30/67/11 35/74/11 -f 41/134/67 40/75/67 38/77/67 -f 76/145/68 78/78/68 48/80/68 -f 72/131/69 73/81/69 40/83/69 -f 80/138/70 67/84/70 77/86/70 -f 75/166/12 76/87/12 49/89/12 -f 47/167/11 77/90/11 46/92/11 -f 79/133/71 65/93/71 75/95/71 -f 74/151/72 81/96/72 46/98/72 -f 48/168/73 63/99/73 49/101/73 -f 69/140/74 66/102/74 46/12/74 -f 65/136/75 62/104/75 45/106/75 -f 43/169/76 67/107/76 42/109/76 -f 50/170/77 53/23/77 54/111/77 -f 53/32/1 17/31/1 52/112/1 -f 16/19/1 15/113/1 52/112/1 -f 15/113/1 14/115/1 51/114/1 -f 54/111/78 57/110/78 58/117/78 -f 57/171/79 53/27/79 56/119/79 -f 52/172/34 51/120/34 56/122/34 -f 51/173/80 50/17/80 55/124/80 -f 61/116/81 60/125/81 58/117/81 -f 57/171/82 56/119/82 61/128/82 -f 56/122/83 55/121/83 60/107/83 -f 59/174/84 55/124/84 58/130/84 -f 78/78/85 72/131/85 63/79/85 -f 71/68/86 37/132/86 79/133/86 -f 63/99/87 40/75/87 64/100/87 -f 37/175/88 36/135/88 65/136/88 -f 73/81/89 35/137/89 80/138/89 -f 81/96/90 70/139/90 69/97/90 -f 38/77/91 39/76/91 69/140/91 -f 67/107/92 35/141/92 68/108/92 -f 70/139/48 34/143/48 71/68/48 -f 44/176/93 62/144/93 76/145/93 -f 36/152/50 35/137/50 72/131/50 -f 66/154/94 80/138/94 47/44/94 -f 75/166/12 45/146/12 76/87/12 -f 43/177/11 42/148/11 77/90/11 -f 64/153/95 79/133/95 49/149/95 -f 42/178/96 68/150/96 74/151/96 -f 62/144/97 36/152/97 78/78/97 -f 41/69/98 71/68/98 64/153/98 -f 39/82/99 73/81/99 66/154/99 -f 68/150/100 34/143/100 81/96/100 -f 7/179/101 4/155/101 8/156/101 diff --git a/src/main/resources/assets/mekanism/models/entity/balloon.json b/src/main/resources/assets/mekanism/models/entity/balloon.json index 3ed2673d9..2334f36db 100755 --- a/src/main/resources/assets/mekanism/models/entity/balloon.json +++ b/src/main/resources/assets/mekanism/models/entity/balloon.json @@ -2,8 +2,8 @@ "elements": [ { "__comment": "String", - "from": [7.5, 8.5, 7.5], - "to": [8.5, 19.5, 8.5], + "from": [7.85, 8.5, 7.85], + "to": [8.15, 19.5, 8.15], "faces": { "down": {"uv": [9, 0, 9.25, 0.25], "texture": "#all"}, "up": {"uv": [8.75, 0, 9, 0.25], "texture": "#all"}, @@ -18,12 +18,12 @@ "from": [7.5, 19.5, 7.5], "to": [8.5, 20.5, 8.5], "faces": { - "down": {"uv": [5, 2.25, 5.25, 2.5], "texture": "#all"}, - "up": {"uv": [4.75, 2.25, 5, 2.5], "texture": "#all"}, - "north": {"uv": [4.75, 2.5, 5, 2.75], "texture": "#all"}, - "south": {"uv": [5.25, 2.5, 5.5, 2.75], "texture": "#all"}, - "west": {"uv": [5, 2.5, 5.25, 2.75], "texture": "#all"}, - "east": {"uv": [4.5, 2.5, 4.75, 2.75], "texture": "#all"} + "down": {"uv": [5, 2.25, 5.25, 2.5], "texture": "#all", "tintindex": 0}, + "up": {"uv": [4.75, 2.25, 5, 2.5], "texture": "#all", "tintindex": 0}, + "north": {"uv": [4.75, 2.5, 5, 2.75], "texture": "#all", "tintindex": 0}, + "south": {"uv": [5.25, 2.5, 5.5, 2.75], "texture": "#all", "tintindex": 0}, + "west": {"uv": [5, 2.5, 5.25, 2.75], "texture": "#all", "tintindex": 0}, + "east": {"uv": [4.5, 2.5, 4.75, 2.75], "texture": "#all", "tintindex": 0} } }, { @@ -31,12 +31,12 @@ "from": [6, 20.5, 6], "to": [10, 25.5, 10], "faces": { - "down": {"uv": [6.5, 0, 7.5, 1], "texture": "#all"}, - "up": {"uv": [5.5, 0, 6.5, 1], "texture": "#all"}, - "north": {"uv": [5.5, 1, 6.5, 2.25], "texture": "#all"}, - "south": {"uv": [7.5, 1, 8.5, 2.25], "texture": "#all"}, - "west": {"uv": [6.5, 1, 7.5, 2.25], "texture": "#all"}, - "east": {"uv": [4.5, 1, 5.5, 2.25], "texture": "#all"} + "down": {"uv": [6.5, 0, 7.5, 1], "texture": "#all", "tintindex": 0}, + "up": {"uv": [5.5, 0, 6.5, 1], "texture": "#all", "tintindex": 0}, + "north": {"uv": [5.5, 1, 6.5, 2.25], "texture": "#all", "tintindex": 0}, + "south": {"uv": [7.5, 1, 8.5, 2.25], "texture": "#all", "tintindex": 0}, + "west": {"uv": [6.5, 1, 7.5, 2.25], "texture": "#all", "tintindex": 0}, + "east": {"uv": [4.5, 1, 5.5, 2.25], "texture": "#all", "tintindex": 0} } }, { @@ -44,12 +44,12 @@ "from": [6, 21, 5.5], "to": [10, 25, 10.5], "faces": { - "down": {"uv": [2.25, 2, 3.25, 3.25], "texture": "#all"}, - "up": {"uv": [1.25, 2, 2.25, 3.25], "texture": "#all"}, - "north": {"uv": [1.25, 3.25, 2.25, 4.25], "texture": "#all"}, - "south": {"uv": [3.5, 3.25, 4.5, 4.25], "texture": "#all"}, - "west": {"uv": [2.25, 3.25, 3.5, 4.25], "texture": "#all"}, - "east": {"uv": [0, 3.25, 1.25, 4.25], "texture": "#all"} + "down": {"uv": [2.25, 2, 3.25, 3.25], "texture": "#all", "tintindex": 0}, + "up": {"uv": [1.25, 2, 2.25, 3.25], "texture": "#all", "tintindex": 0}, + "north": {"uv": [1.25, 3.25, 2.25, 4.25], "texture": "#all", "tintindex": 0}, + "south": {"uv": [3.5, 3.25, 4.5, 4.25], "texture": "#all", "tintindex": 0}, + "west": {"uv": [2.25, 3.25, 3.5, 4.25], "texture": "#all", "tintindex": 0}, + "east": {"uv": [0, 3.25, 1.25, 4.25], "texture": "#all", "tintindex": 0} } }, { @@ -57,17 +57,17 @@ "from": [5.5, 21, 6], "to": [10.5, 25, 10], "faces": { - "down": {"uv": [2.25, 0, 3.5, 1], "texture": "#all"}, - "up": {"uv": [1, 0, 2.25, 1], "texture": "#all"}, - "north": {"uv": [1, 1, 2.25, 2], "texture": "#all"}, - "south": {"uv": [3.25, 1, 4.5, 2], "texture": "#all"}, - "west": {"uv": [2.25, 1, 3.25, 2], "texture": "#all"}, - "east": {"uv": [0, 1, 1, 2], "texture": "#all"} + "down": {"uv": [2.25, 0, 3.5, 1], "texture": "#all", "tintindex": 0}, + "up": {"uv": [1, 0, 2.25, 1], "texture": "#all", "tintindex": 0}, + "north": {"uv": [1, 1, 2.25, 2], "texture": "#all", "tintindex": 0}, + "south": {"uv": [3.25, 1, 4.5, 2], "texture": "#all", "tintindex": 0}, + "west": {"uv": [2.25, 1, 3.25, 2], "texture": "#all", "tintindex": 0}, + "east": {"uv": [0, 1, 1, 2], "texture": "#all", "tintindex": 0} } } ], "textures": { - "all": "...", + "all": "mekanism:entities/Balloon", "particle": "..." } } diff --git a/src/main/resources/assets/mekanism/models/item/ArmoredJetpack.json b/src/main/resources/assets/mekanism/models/item/ArmoredJetpack.json index 91a6a7344..9f25a3a2e 100644 --- a/src/main/resources/assets/mekanism/models/item/ArmoredJetpack.json +++ b/src/main/resources/assets/mekanism/models/item/ArmoredJetpack.json @@ -1,7 +1,3 @@ { - "parent": "mekanism:item/standard_item", - "textures": { - "layer0": "mekanism:items/ArmoredJetpack" - } -} - + "parent": "mekanism:item/standard_item" +} \ No newline at end of file diff --git a/src/main/resources/assets/mekanism/models/item/AtomicDisassembler.json b/src/main/resources/assets/mekanism/models/item/AtomicDisassembler.json index 5e9e3a8bd..9f25a3a2e 100644 --- a/src/main/resources/assets/mekanism/models/item/AtomicDisassembler.json +++ b/src/main/resources/assets/mekanism/models/item/AtomicDisassembler.json @@ -1,216 +1,3 @@ { - "elements": [ - { - "__comment": "Shape6", - "from": [3, 25.7, 2.5], - "to": [6, 28.7, 8.5], - "faces": { - "down": {"uv": [8.25, 0, 9, 1.5], "texture": "#all"}, - "up": {"uv": [7.5, 0, 8.25, 1.5], "texture": "#all"}, - "north": {"uv": [7.5, 1.5, 8.25, 2.25], "texture": "#all"}, - "south": {"uv": [9.75, 1.5, 10.5, 2.25], "texture": "#all"}, - "west": {"uv": [8.25, 1.5, 9.75, 2.25], "texture": "#all"}, - "east": {"uv": [6, 1.5, 7.5, 2.25], "texture": "#all"} - } - }, - { - "__comment": "Shape13", - "from": [8, 27.3, 8], - "to": [9, 28.3, 15], - "faces": { - "down": {"uv": [3, 2.5, 3.25, 4.25], "texture": "#all"}, - "up": {"uv": [2.75, 2.5, 3, 4.25], "texture": "#all"}, - "north": {"uv": [2.75, 4.25, 3, 4.5], "texture": "#all"}, - "south": {"uv": [4.75, 4.25, 5, 4.5], "texture": "#all"}, - "west": {"uv": [3, 4.25, 4.75, 4.5], "texture": "#all"}, - "east": {"uv": [1, 4.25, 2.75, 4.5], "texture": "#all"} - } - }, - { - "__comment": "Shape12", - "from": [7.5, 26.5, 9.5], - "to": [9.5, 27.5, 10.5], - "faces": { - "down": {"uv": [11.25, 3, 11.75, 3.25], "texture": "#all"}, - "up": {"uv": [10.75, 3, 11.25, 3.25], "texture": "#all"}, - "north": {"uv": [10.75, 3.25, 11.25, 3.5], "texture": "#all"}, - "south": {"uv": [11.5, 3.25, 12, 3.5], "texture": "#all"}, - "west": {"uv": [11.25, 3.25, 11.5, 3.5], "texture": "#all"}, - "east": {"uv": [10.5, 3.25, 10.75, 3.5], "texture": "#all"} - } - }, - { - "__comment": "Shape2", - "from": [7.5, 21.5, 4.5], - "to": [9.5, 26.5, 6.5], - "faces": { - "down": {"uv": [9.5, 2.25, 10, 2.75], "texture": "#all"}, - "up": {"uv": [9, 2.25, 9.5, 2.75], "texture": "#all"}, - "north": {"uv": [9, 2.75, 9.5, 4], "texture": "#all"}, - "south": {"uv": [10, 2.75, 10.5, 4], "texture": "#all"}, - "west": {"uv": [9.5, 2.75, 10, 4], "texture": "#all"}, - "east": {"uv": [8.5, 2.75, 9, 4], "texture": "#all"} - } - }, - { - "__comment": "Shape11", - "from": [7.5, 26.5, 11.5], - "to": [9.5, 27.5, 12.5], - "faces": { - "down": {"uv": [11.25, 3.5, 11.75, 3.75], "texture": "#all"}, - "up": {"uv": [10.75, 3.5, 11.25, 3.75], "texture": "#all"}, - "north": {"uv": [10.75, 3.75, 11.25, 4], "texture": "#all"}, - "south": {"uv": [11.5, 3.75, 12, 4], "texture": "#all"}, - "west": {"uv": [11.25, 3.75, 11.5, 4], "texture": "#all"}, - "east": {"uv": [10.5, 3.75, 10.75, 4], "texture": "#all"} - } - }, - { - "__comment": "Shape10", - "from": [7.5, 30.2, 5.5], - "to": [9.5, 31.2, 6.5], - "faces": { - "down": {"uv": [3.75, 0, 4.25, 0.25], "texture": "#all"}, - "up": {"uv": [3.25, 0, 3.75, 0.25], "texture": "#all"}, - "north": {"uv": [3.25, 0.25, 3.75, 0.5], "texture": "#all"}, - "south": {"uv": [4, 0.25, 4.5, 0.5], "texture": "#all"}, - "west": {"uv": [3.75, 0.25, 4, 0.5], "texture": "#all"}, - "east": {"uv": [3, 0.25, 3.25, 0.5], "texture": "#all"} - } - }, - { - "__comment": "Shape3", - "from": [8, 23.44, 1.93], - "to": [9, 25.44, 4.93], - "faces": { - "down": {"uv": [15, 0, 15.25, 0.75], "texture": "#all"}, - "up": {"uv": [14.75, 0, 15, 0.75], "texture": "#all"}, - "north": {"uv": [14.75, 0.75, 15, 1.25], "texture": "#all"}, - "south": {"uv": [15.75, 0.75, 16, 1.25], "texture": "#all"}, - "west": {"uv": [15, 0.75, 15.75, 1.25], "texture": "#all"}, - "east": {"uv": [14, 0.75, 14.75, 1.25], "texture": "#all"} - } - }, - { - "__comment": "Shape9", - "from": [8, 20.5333334, -1.6], - "to": [9, 23.5333334, -0.6], - "faces": { - "down": {"uv": [15.5, 0, 15.75, 0.25], "texture": "#all"}, - "up": {"uv": [15.25, 0, 15.5, 0.25], "texture": "#all"}, - "north": {"uv": [15.25, 0.25, 15.5, 1], "texture": "#all"}, - "south": {"uv": [15.75, 0.25, 16, 1], "texture": "#all"}, - "west": {"uv": [15.5, 0.25, 15.75, 1], "texture": "#all"}, - "east": {"uv": [15, 0.25, 15.25, 1], "texture": "#all"} - } - }, - { - "__comment": "Shape15", - "from": [7.5, 4, 4.5], - "to": [9.5, 8, 6.5], - "faces": { - "down": {"uv": [7.5, 2.25, 8, 2.75], "texture": "#all"}, - "up": {"uv": [7, 2.25, 7.5, 2.75], "texture": "#all"}, - "north": {"uv": [7, 2.75, 7.5, 3.75], "texture": "#all"}, - "south": {"uv": [8, 2.75, 8.5, 3.75], "texture": "#all"}, - "west": {"uv": [7.5, 2.75, 8, 3.75], "texture": "#all"}, - "east": {"uv": [6.5, 2.75, 7, 3.75], "texture": "#all"} - } - }, - { - "__comment": "Shape16", - "from": [8, 27.58, 4], - "to": [9, 32.58, 6], - "faces": { - "down": {"uv": [15.25, 0, 15.5, 0.5], "texture": "#all"}, - "up": {"uv": [15, 0, 15.25, 0.5], "texture": "#all"}, - "north": {"uv": [15, 0.5, 15.25, 1.75], "texture": "#all"}, - "south": {"uv": [15.75, 0.5, 16, 1.75], "texture": "#all"}, - "west": {"uv": [15.25, 0.5, 15.75, 1.75], "texture": "#all"}, - "east": {"uv": [14.5, 0.5, 15, 1.75], "texture": "#all"} - } - }, - { - "__comment": "Shape14", - "from": [8, 26, 14], - "to": [9, 27, 15], - "faces": { - "down": {"uv": [15.5, 0, 15.75, 0.25], "texture": "#all"}, - "up": {"uv": [15.25, 0, 15.5, 0.25], "texture": "#all"}, - "north": {"uv": [15.25, 0.25, 15.5, 0.5], "texture": "#all"}, - "south": {"uv": [15.75, 0.25, 16, 0.5], "texture": "#all"}, - "west": {"uv": [15.5, 0.25, 15.75, 0.5], "texture": "#all"}, - "east": {"uv": [15, 0.25, 15.25, 0.5], "texture": "#all"} - } - }, - { - "__comment": "Shape7", - "from": [7.5, 27, 1], - "to": [9.5, 29, 9], - "faces": { - "down": {"uv": [2.5, 0, 3, 2], "texture": "#all"}, - "up": {"uv": [2, 0, 2.5, 2], "texture": "#all"}, - "north": {"uv": [2, 2, 2.5, 2.5], "texture": "#all"}, - "south": {"uv": [4.5, 2, 5, 2.5], "texture": "#all"}, - "west": {"uv": [2.5, 2, 4.5, 2.5], "texture": "#all"}, - "east": {"uv": [0, 2, 2, 2.5], "texture": "#all"} - } - }, - { - "__comment": "Shape1", - "from": [8, 8, 5], - "to": [9, 24, 6], - "faces": { - "down": {"uv": [0.5, 2.5, 0.75, 2.75], "texture": "#all"}, - "up": {"uv": [0.25, 2.5, 0.5, 2.75], "texture": "#all"}, - "north": {"uv": [0.25, 2.75, 0.5, 6.75], "texture": "#all"}, - "south": {"uv": [0.75, 2.75, 1, 6.75], "texture": "#all"}, - "west": {"uv": [0.5, 2.75, 0.75, 6.75], "texture": "#all"}, - "east": {"uv": [0, 2.75, 0.25, 6.75], "texture": "#all"} - } - }, - { - "__comment": "Shape4", - "from": [7.5, 25.5, 6.5], - "to": [9.5, 26.5, 10.5], - "faces": { - "down": {"uv": [9, 4, 9.5, 5], "texture": "#all"}, - "up": {"uv": [8.5, 4, 9, 5], "texture": "#all"}, - "north": {"uv": [8.5, 5, 9, 5.25], "texture": "#all"}, - "south": {"uv": [10, 5, 10.5, 5.25], "texture": "#all"}, - "west": {"uv": [9, 5, 10, 5.25], "texture": "#all"}, - "east": {"uv": [7.5, 5, 8.5, 5.25], "texture": "#all"} - } - }, - { - "__comment": "Shape8", - "from": [8, 21, 6], - "to": [9, 25, 7], - "faces": { - "down": {"uv": [9.75, 0, 10, 0.25], "texture": "#all"}, - "up": {"uv": [9.5, 0, 9.75, 0.25], "texture": "#all"}, - "north": {"uv": [9.5, 0.25, 9.75, 1.25], "texture": "#all"}, - "south": {"uv": [10, 0.25, 10.25, 1.25], "texture": "#all"}, - "west": {"uv": [9.75, 0.25, 10, 1.25], "texture": "#all"}, - "east": {"uv": [9.25, 0.25, 9.5, 1.25], "texture": "#all"} - } - }, - { - "__comment": "Shape5", - "from": [8, 25, 4], - "to": [9, 27, 14], - "faces": { - "down": {"uv": [13.25, 0, 13.5, 2.5], "texture": "#all"}, - "up": {"uv": [13, 0, 13.25, 2.5], "texture": "#all"}, - "north": {"uv": [13, 2.5, 13.25, 3], "texture": "#all"}, - "south": {"uv": [15.75, 2.5, 16, 3], "texture": "#all"}, - "west": {"uv": [13.25, 2.5, 15.75, 3], "texture": "#all"}, - "east": {"uv": [10.5, 2.5, 13, 3], "texture": "#all"} - } - } - ], - "textures": { - "all": "...", - "particle": "..." - } -} + "parent": "mekanism:item/standard_item" +} \ No newline at end of file diff --git a/src/main/resources/assets/mekanism/models/item/Balloon.json b/src/main/resources/assets/mekanism/models/item/Balloon.json index f65c531c4..124a9e243 100644 --- a/src/main/resources/assets/mekanism/models/item/Balloon.json +++ b/src/main/resources/assets/mekanism/models/item/Balloon.json @@ -2,9 +2,17 @@ "parent": "mekanism:entity/balloon", "display": { "thirdperson": { - "rotation": [ 10, -45, 170 ], - "translation": [ 0, 1.5, -2.75 ], - "scale": [ 0.375, 0.375, 0.375 ] + "rotation": [ -150, 0, 10 ], + "translation": [ 0, 1.5, -0.4 ], + "scale": [ 1.8, 1.8, 1.8 ] + }, + "firstperson": { + "translation": [ 0, -2, 0 ], + "scale": [ 1.8, 1.8, 1.8 ] + }, + "gui": { + "translation": [ 0, -7.4, 0 ], + "scale": [ 1.5, 1.5, 1.5 ] } } } diff --git a/src/main/resources/assets/mekanism/models/item/Flamethrower.json b/src/main/resources/assets/mekanism/models/item/Flamethrower.json index ab59ca12b..9f25a3a2e 100755 --- a/src/main/resources/assets/mekanism/models/item/Flamethrower.json +++ b/src/main/resources/assets/mekanism/models/item/Flamethrower.json @@ -1,307 +1,3 @@ { - "elements": [ - { - "__comment": "AxleTRight", - "from": [8.5, 7.5, 1], - "to": [9.5, 8.5, 9], - "faces": { - "down": {"uv": [2.25, 6.25, 2.5, 8.25], "texture": "#all"}, - "up": {"uv": [2, 6.25, 2.25, 8.25], "texture": "#all"}, - "north": {"uv": [2, 8.25, 2.25, 8.5], "texture": "#all"}, - "south": {"uv": [4.25, 8.25, 4.5, 8.5], "texture": "#all"}, - "west": {"uv": [2.25, 8.25, 4.25, 8.5], "texture": "#all"}, - "east": {"uv": [0, 8.25, 2, 8.5], "texture": "#all"} - } - }, - { - "__comment": "AxleTLeft", - "from": [5.5, 7.5, 1], - "to": [6.5, 8.5, 9], - "faces": { - "down": {"uv": [2.25, 6.25, 2.5, 8.25], "texture": "#all"}, - "up": {"uv": [2, 6.25, 2.25, 8.25], "texture": "#all"}, - "north": {"uv": [2, 8.25, 2.25, 8.5], "texture": "#all"}, - "south": {"uv": [4.25, 8.25, 4.5, 8.5], "texture": "#all"}, - "west": {"uv": [2.25, 8.25, 4.25, 8.5], "texture": "#all"}, - "east": {"uv": [0, 8.25, 2, 8.5], "texture": "#all"} - } - }, - { - "__comment": "Axle", - "from": [5.5, 4, 1.5], - "to": [9.5, 8, 8.5], - "faces": { - "down": {"uv": [10.75, 3, 11.75, 4.75], "texture": "#all"}, - "up": {"uv": [9.75, 3, 10.75, 4.75], "texture": "#all"}, - "north": {"uv": [9.75, 4.75, 10.75, 5.75], "texture": "#all"}, - "south": {"uv": [12.5, 4.75, 13.5, 5.75], "texture": "#all"}, - "west": {"uv": [10.75, 4.75, 12.5, 5.75], "texture": "#all"}, - "east": {"uv": [8, 4.75, 9.75, 5.75], "texture": "#all"} - } - }, - { - "__comment": "GraspRod", - "from": [7, 7, 7], - "to": [8, 10, 8], - "faces": { - "down": {"uv": [5.25, 4.75, 5.5, 5], "texture": "#all"}, - "up": {"uv": [5, 4.75, 5.25, 5], "texture": "#all"}, - "north": {"uv": [5, 5, 5.25, 5.75], "texture": "#all"}, - "south": {"uv": [5.5, 5, 5.75, 5.75], "texture": "#all"}, - "west": {"uv": [5.25, 5, 5.5, 5.75], "texture": "#all"}, - "east": {"uv": [4.75, 5, 5, 5.75], "texture": "#all"} - } - }, - { - "__comment": "LargeBarrelDecor", - "from": [6, 5, 12], - "to": [9, 8, 18], - "faces": { - "down": {"uv": [2.25, 12, 3, 13.5], "texture": "#all"}, - "up": {"uv": [1.5, 12, 2.25, 13.5], "texture": "#all"}, - "north": {"uv": [1.5, 13.5, 2.25, 14.25], "texture": "#all"}, - "south": {"uv": [3.75, 13.5, 4.5, 14.25], "texture": "#all"}, - "west": {"uv": [2.25, 13.5, 3.75, 14.25], "texture": "#all"}, - "east": {"uv": [0, 13.5, 1.5, 14.25], "texture": "#all"} - } - }, - { - "__comment": "AxleBRight", - "from": [8.5, 3.5, 1], - "to": [9.5, 4.5, 9], - "faces": { - "down": {"uv": [2.25, 6.25, 2.5, 8.25], "texture": "#all"}, - "up": {"uv": [2, 6.25, 2.25, 8.25], "texture": "#all"}, - "north": {"uv": [2, 8.25, 2.25, 8.5], "texture": "#all"}, - "south": {"uv": [4.25, 8.25, 4.5, 8.5], "texture": "#all"}, - "west": {"uv": [2.25, 8.25, 4.25, 8.5], "texture": "#all"}, - "east": {"uv": [0, 8.25, 2, 8.5], "texture": "#all"} - } - }, - { - "__comment": "Hydrogen", - "from": [9.5, 4, 2.5], - "to": [12.5, 7, 12.5], - "faces": { - "down": {"uv": [3.25, 0, 4, 2.5], "texture": "#all"}, - "up": {"uv": [2.5, 0, 3.25, 2.5], "texture": "#all"}, - "north": {"uv": [2.5, 2.5, 3.25, 3.25], "texture": "#all"}, - "south": {"uv": [5.75, 2.5, 6.5, 3.25], "texture": "#all"}, - "west": {"uv": [3.25, 2.5, 5.75, 3.25], "texture": "#all"}, - "east": {"uv": [0, 2.5, 2.5, 3.25], "texture": "#all"} - } - }, - { - "__comment": "Flame", - "from": [7, 2.5, 27], - "to": [8, 3.5, 29], - "faces": { - "down": {"uv": [10.25, 0, 10.5, 0.5], "texture": "#all"}, - "up": {"uv": [10, 0, 10.25, 0.5], "texture": "#all"}, - "north": {"uv": [10, 0.5, 10.25, 0.75], "texture": "#all"}, - "south": {"uv": [10.75, 0.5, 11, 0.75], "texture": "#all"}, - "west": {"uv": [10.25, 0.5, 10.75, 0.75], "texture": "#all"}, - "east": {"uv": [9.5, 0.5, 10, 0.75], "texture": "#all"} - } - }, - { - "__comment": "Ring", - "from": [5, 3, 9], - "to": [10, 9, 13], - "faces": { - "down": {"uv": [2.25, 3.5, 3.5, 4.5], "texture": "#all"}, - "up": {"uv": [1, 3.5, 2.25, 4.5], "texture": "#all"}, - "north": {"uv": [1, 4.5, 2.25, 6], "texture": "#all"}, - "south": {"uv": [3.25, 4.5, 4.5, 6], "texture": "#all"}, - "west": {"uv": [2.25, 4.5, 3.25, 6], "texture": "#all"}, - "east": {"uv": [0, 4.5, 1, 6], "texture": "#all"} - } - }, - { - "__comment": "RingButtom", - "from": [6, 2.5, 9.5], - "to": [9, 3.5, 12.5], - "faces": { - "down": {"uv": [6.25, 3.5, 7, 4.25], "texture": "#all"}, - "up": {"uv": [5.5, 3.5, 6.25, 4.25], "texture": "#all"}, - "north": {"uv": [5.5, 4.25, 6.25, 4.5], "texture": "#all"}, - "south": {"uv": [7, 4.25, 7.75, 4.5], "texture": "#all"}, - "west": {"uv": [6.25, 4.25, 7, 4.5], "texture": "#all"}, - "east": {"uv": [4.75, 4.25, 5.5, 4.5], "texture": "#all"} - } - }, - { - "__comment": "FlameStrut", - "from": [6.533333, 3.5, 25], - "to": [8.533333, 4.5, 28], - "faces": { - "down": {"uv": [8, 0, 8.5, 0.75], "texture": "#all"}, - "up": {"uv": [7.5, 0, 8, 0.75], "texture": "#all"}, - "north": {"uv": [7.5, 0.75, 8, 1], "texture": "#all"}, - "south": {"uv": [8.75, 0.75, 9.25, 1], "texture": "#all"}, - "west": {"uv": [8, 0.75, 8.75, 1], "texture": "#all"}, - "east": {"uv": [6.75, 0.75, 7.5, 1], "texture": "#all"} - } - }, - { - "__comment": "LargeBarrel", - "from": [6.5, 4, 12], - "to": [8.5, 7, 19], - "faces": { - "down": {"uv": [7, 12, 7.5, 13.75], "texture": "#all"}, - "up": {"uv": [6.5, 12, 7, 13.75], "texture": "#all"}, - "north": {"uv": [6.5, 13.75, 7, 14.5], "texture": "#all"}, - "south": {"uv": [8.75, 13.75, 9.25, 14.5], "texture": "#all"}, - "west": {"uv": [7, 13.75, 8.75, 14.5], "texture": "#all"}, - "east": {"uv": [4.75, 13.75, 6.5, 14.5], "texture": "#all"} - } - }, - { - "__comment": "SupportCentre", - "from": [6.5, 9.6, 14.6], - "to": [8.5, 10.6, 20.6], - "faces": { - "down": {"uv": [2, 10, 2.5, 11.5], "texture": "#all"}, - "up": {"uv": [1.5, 10, 2, 11.5], "texture": "#all"}, - "north": {"uv": [1.5, 11.5, 2, 11.75], "texture": "#all"}, - "south": {"uv": [3.5, 11.5, 4, 11.75], "texture": "#all"}, - "west": {"uv": [2, 11.5, 3.5, 11.75], "texture": "#all"}, - "east": {"uv": [0, 11.5, 1.5, 11.75], "texture": "#all"} - } - }, - { - "__comment": "Barrel", - "from": [6.5, 4.5, 19], - "to": [8.5, 6.5, 27], - "faces": { - "down": {"uv": [7.25, 7.5, 7.75, 9.5], "texture": "#all"}, - "up": {"uv": [6.75, 7.5, 7.25, 9.5], "texture": "#all"}, - "north": {"uv": [6.75, 9.5, 7.25, 10], "texture": "#all"}, - "south": {"uv": [9.25, 9.5, 9.75, 10], "texture": "#all"}, - "west": {"uv": [7.25, 9.5, 9.25, 10], "texture": "#all"}, - "east": {"uv": [4.75, 9.5, 6.75, 10], "texture": "#all"} - } - }, - { - "__comment": "RingTop", - "from": [6, 8.5, 9.466667], - "to": [9, 9.5, 12.466667], - "faces": { - "down": {"uv": [6.25, 3.5, 7, 4.25], "texture": "#all"}, - "up": {"uv": [5.5, 3.5, 6.25, 4.25], "texture": "#all"}, - "north": {"uv": [5.5, 4.25, 6.25, 4.5], "texture": "#all"}, - "south": {"uv": [7, 4.25, 7.75, 4.5], "texture": "#all"}, - "west": {"uv": [6.25, 4.25, 7, 4.5], "texture": "#all"}, - "east": {"uv": [4.75, 4.25, 5.5, 4.5], "texture": "#all"} - } - }, - { - "__comment": "AxleBLeft", - "from": [5.5, 3.5, 1], - "to": [6.5, 4.5, 9], - "faces": { - "down": {"uv": [2.25, 6.25, 2.5, 8.25], "texture": "#all"}, - "up": {"uv": [2, 6.25, 2.25, 8.25], "texture": "#all"}, - "north": {"uv": [2, 8.25, 2.25, 8.5], "texture": "#all"}, - "south": {"uv": [4.25, 8.25, 4.5, 8.5], "texture": "#all"}, - "west": {"uv": [2.25, 8.25, 4.25, 8.5], "texture": "#all"}, - "east": {"uv": [0, 8.25, 2, 8.5], "texture": "#all"} - } - }, - { - "__comment": "LargeBarrelDecor2", - "from": [5.5, 5, 12], - "to": [9.5, 7, 16], - "faces": { - "down": {"uv": [6.25, 10.25, 7.25, 11.25], "texture": "#all"}, - "up": {"uv": [5.25, 10.25, 6.25, 11.25], "texture": "#all"}, - "north": {"uv": [5.25, 11.25, 6.25, 11.75], "texture": "#all"}, - "south": {"uv": [7.25, 11.25, 8.25, 11.75], "texture": "#all"}, - "west": {"uv": [6.25, 11.25, 7.25, 11.75], "texture": "#all"}, - "east": {"uv": [4.25, 11.25, 5.25, 11.75], "texture": "#all"} - } - }, - { - "__comment": "SupportFront", - "from": [7, 8.9, 20.5], - "to": [8, 9.9, 24.5], - "faces": { - "down": {"uv": [6, 6, 6.25, 7], "texture": "#all"}, - "up": {"uv": [5.75, 6, 6, 7], "texture": "#all"}, - "north": {"uv": [5.75, 7, 6, 7.25], "texture": "#all"}, - "south": {"uv": [7, 7, 7.25, 7.25], "texture": "#all"}, - "west": {"uv": [6, 7, 7, 7.25], "texture": "#all"}, - "east": {"uv": [4.75, 7, 5.75, 7.25], "texture": "#all"} - } - }, - { - "__comment": "Grasp", - "from": [6.5, 9, 6.9], - "to": [8.5, 10, 7.9], - "faces": { - "down": {"uv": [6.75, 4.75, 7.25, 5], "texture": "#all"}, - "up": {"uv": [6.25, 4.75, 6.75, 5], "texture": "#all"}, - "north": {"uv": [6.25, 5, 6.75, 5.25], "texture": "#all"}, - "south": {"uv": [7, 5, 7.5, 5.25], "texture": "#all"}, - "west": {"uv": [6.75, 5, 7, 5.25], "texture": "#all"}, - "east": {"uv": [6, 5, 6.25, 5.25], "texture": "#all"} - } - }, - { - "__comment": "HydrogenDecor", - "from": [9.5, 6.33333, 3.066667], - "to": [12.5, 7.33333, 8.066667], - "faces": { - "down": {"uv": [8.75, 1.25, 9.5, 2.5], "texture": "#all"}, - "up": {"uv": [8, 1.25, 8.75, 2.5], "texture": "#all"}, - "north": {"uv": [8, 2.5, 8.75, 2.75], "texture": "#all"}, - "south": {"uv": [10, 2.5, 10.75, 2.75], "texture": "#all"}, - "west": {"uv": [8.75, 2.5, 10, 2.75], "texture": "#all"}, - "east": {"uv": [6.75, 2.5, 8, 2.75], "texture": "#all"} - } - }, - { - "__comment": "BarrelRing2", - "from": [6, 4, 25], - "to": [9, 7, 26], - "faces": { - "down": {"uv": [8.5, 6.25, 9.25, 6.5], "texture": "#all"}, - "up": {"uv": [7.75, 6.25, 8.5, 6.5], "texture": "#all"}, - "north": {"uv": [7.75, 6.5, 8.5, 7.25], "texture": "#all"}, - "south": {"uv": [8.75, 6.5, 9.5, 7.25], "texture": "#all"}, - "west": {"uv": [8.5, 6.5, 8.75, 7.25], "texture": "#all"}, - "east": {"uv": [7.5, 6.5, 7.75, 7.25], "texture": "#all"} - } - }, - { - "__comment": "SupportRear", - "from": [6, 8, 12], - "to": [9, 9, 15], - "faces": { - "down": {"uv": [1.5, 8.75, 2.25, 9.5], "texture": "#all"}, - "up": {"uv": [0.75, 8.75, 1.5, 9.5], "texture": "#all"}, - "north": {"uv": [0.75, 9.5, 1.5, 9.75], "texture": "#all"}, - "south": {"uv": [2.25, 9.5, 3, 9.75], "texture": "#all"}, - "west": {"uv": [1.5, 9.5, 2.25, 9.75], "texture": "#all"}, - "east": {"uv": [0, 9.5, 0.75, 9.75], "texture": "#all"} - } - }, - { - "__comment": "BarrelRing", - "from": [6, 4, 21], - "to": [9, 7, 22], - "faces": { - "down": {"uv": [8.5, 6.25, 9.25, 6.5], "texture": "#all"}, - "up": {"uv": [7.75, 6.25, 8.5, 6.5], "texture": "#all"}, - "north": {"uv": [7.75, 6.5, 8.5, 7.25], "texture": "#all"}, - "south": {"uv": [8.75, 6.5, 9.5, 7.25], "texture": "#all"}, - "west": {"uv": [8.5, 6.5, 8.75, 7.25], "texture": "#all"}, - "east": {"uv": [7.5, 6.5, 7.75, 7.25], "texture": "#all"} - } - } - ], - "textures": { - "all": "...", - "particle": "..." - } -} + "parent": "mekanism:item/standard_item" +} \ No newline at end of file diff --git a/src/main/resources/assets/mekanism/models/item/FreeRunners.json b/src/main/resources/assets/mekanism/models/item/FreeRunners.json index 80430a8a4..9f25a3a2e 100644 --- a/src/main/resources/assets/mekanism/models/item/FreeRunners.json +++ b/src/main/resources/assets/mekanism/models/item/FreeRunners.json @@ -1,7 +1,3 @@ { - "parent": "mekanism:item/standard_item", - "textures": { - "layer0": "mekanism:items/FreeRunners" - } -} - + "parent": "mekanism:item/standard_item" +} \ No newline at end of file diff --git a/src/main/resources/assets/mekanism/models/item/GasMask.json b/src/main/resources/assets/mekanism/models/item/GasMask.json index addf89f31..9f25a3a2e 100644 --- a/src/main/resources/assets/mekanism/models/item/GasMask.json +++ b/src/main/resources/assets/mekanism/models/item/GasMask.json @@ -1,7 +1,3 @@ { - "parent": "mekanism:item/standard_item", - "textures": { - "layer0": "mekanism:items/GasMask" - } -} - + "parent": "mekanism:item/standard_item" +} \ No newline at end of file diff --git a/src/main/resources/assets/mekanism/models/item/ItemProxy.json b/src/main/resources/assets/mekanism/models/item/ItemProxy.json index 8448c1b02..0207405be 100644 --- a/src/main/resources/assets/mekanism/models/item/ItemProxy.json +++ b/src/main/resources/assets/mekanism/models/item/ItemProxy.json @@ -1,7 +1,4 @@ { - "parent": "mekanism:item/standard_item", - "textures": { - "layer0": "mekanism:items/ItemProxy" - } + "parent": "mekanism:item/standard_item" } diff --git a/src/main/resources/assets/mekanism/models/item/Jetpack.json b/src/main/resources/assets/mekanism/models/item/Jetpack.json index af201ff55..9f25a3a2e 100644 --- a/src/main/resources/assets/mekanism/models/item/Jetpack.json +++ b/src/main/resources/assets/mekanism/models/item/Jetpack.json @@ -1,7 +1,3 @@ { - "parent": "mekanism:item/standard_item", - "textures": { - "layer0": "mekanism:items/Jetpack" - } -} - + "parent": "mekanism:item/standard_item" +} \ No newline at end of file diff --git a/src/main/resources/assets/mekanism/models/item/ScubaTank.json b/src/main/resources/assets/mekanism/models/item/ScubaTank.json index 6bd4afd81..9f25a3a2e 100644 --- a/src/main/resources/assets/mekanism/models/item/ScubaTank.json +++ b/src/main/resources/assets/mekanism/models/item/ScubaTank.json @@ -1,7 +1,3 @@ { - "parent": "mekanism:item/standard_item", - "textures": { - "layer0": "mekanism:items/ScubaTank" - } -} - + "parent": "mekanism:item/standard_item" +} \ No newline at end of file diff --git a/src/main/resources/assets/mekanism/render/SeismicVibratorOn.png b/src/main/resources/assets/mekanism/render/SeismicVibratorOn.png deleted file mode 100755 index cb0bfe640..000000000 Binary files a/src/main/resources/assets/mekanism/render/SeismicVibratorOn.png and /dev/null differ diff --git a/src/main/resources/assets/mekanism/textures/blocks/DynamicTank.png b/src/main/resources/assets/mekanism/textures/blocks/DynamicTank.png deleted file mode 100644 index e6b2a90ec..000000000 Binary files a/src/main/resources/assets/mekanism/textures/blocks/DynamicTank.png and /dev/null differ diff --git a/src/main/resources/assets/mekanism/textures/blocks/SalinationBlock.png b/src/main/resources/assets/mekanism/textures/blocks/SalinationBlock.png deleted file mode 100644 index 7023484ed..000000000 Binary files a/src/main/resources/assets/mekanism/textures/blocks/SalinationBlock.png and /dev/null differ diff --git a/src/main/resources/assets/mekanism/textures/blocks/SalinationController.png b/src/main/resources/assets/mekanism/textures/blocks/SalinationController.png deleted file mode 100644 index b0d3b7707..000000000 Binary files a/src/main/resources/assets/mekanism/textures/blocks/SalinationController.png and /dev/null differ diff --git a/src/main/resources/assets/mekanism/textures/blocks/SalinationControllerOn.png b/src/main/resources/assets/mekanism/textures/blocks/SalinationControllerOn.png deleted file mode 100644 index aee804efd..000000000 Binary files a/src/main/resources/assets/mekanism/textures/blocks/SalinationControllerOn.png and /dev/null differ diff --git a/src/main/resources/assets/mekanism/textures/blocks/SalinationValve.png b/src/main/resources/assets/mekanism/textures/blocks/SalinationValve.png deleted file mode 100644 index 3fd06552d..000000000 Binary files a/src/main/resources/assets/mekanism/textures/blocks/SalinationValve.png and /dev/null differ diff --git a/src/main/resources/assets/mekanism/textures/blocks/SteelBlock_Oxidized.png b/src/main/resources/assets/mekanism/textures/blocks/SteelBlock_Oxidized.png deleted file mode 100644 index 06621f301..000000000 Binary files a/src/main/resources/assets/mekanism/textures/blocks/SteelBlock_Oxidized.png and /dev/null differ diff --git a/src/main/resources/assets/mekanism/textures/blocks/Teleporter.png b/src/main/resources/assets/mekanism/textures/blocks/Teleporter.png deleted file mode 100644 index 46b046fff..000000000 Binary files a/src/main/resources/assets/mekanism/textures/blocks/Teleporter.png and /dev/null differ diff --git a/src/main/resources/assets/mekanism/textures/blocks/TeleporterFrame.png b/src/main/resources/assets/mekanism/textures/blocks/TeleporterFrame.png deleted file mode 100644 index 702e2a971..000000000 Binary files a/src/main/resources/assets/mekanism/textures/blocks/TeleporterFrame.png and /dev/null differ diff --git a/src/main/resources/assets/mekanism/textures/blocks/TeleporterFront.png b/src/main/resources/assets/mekanism/textures/blocks/TeleporterFront.png deleted file mode 100644 index 66e5f8391..000000000 Binary files a/src/main/resources/assets/mekanism/textures/blocks/TeleporterFront.png and /dev/null differ diff --git a/src/main/resources/assets/mekanism/textures/blocks/bin/BinAdvancedBottom.png b/src/main/resources/assets/mekanism/textures/blocks/bin/BinAdvancedBottom.png new file mode 100644 index 000000000..68212fedd Binary files /dev/null and b/src/main/resources/assets/mekanism/textures/blocks/bin/BinAdvancedBottom.png differ diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/DynamicValve.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/DynamicValve.png deleted file mode 100644 index 87bb9aec2..000000000 Binary files a/src/main/resources/assets/mekanism/textures/blocks/ctm/DynamicValve.png and /dev/null differ diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/ReactorControllerOff-ctm_Alt.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/ReactorControllerOff-ctm_Alt.png deleted file mode 100644 index 4c7fd5d53..000000000 Binary files a/src/main/resources/assets/mekanism/textures/blocks/ctm/ReactorControllerOff-ctm_Alt.png and /dev/null differ diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/ReactorControllerOn-ctm_Alt.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/ReactorControllerOn-ctm_Alt.png deleted file mode 100644 index 2e3f80eaa..000000000 Binary files a/src/main/resources/assets/mekanism/textures/blocks/ctm/ReactorControllerOn-ctm_Alt.png and /dev/null differ diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/ReactorControllerOn_Alt.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/ReactorControllerOn_Alt.png deleted file mode 100644 index 64591b932..000000000 Binary files a/src/main/resources/assets/mekanism/textures/blocks/ctm/ReactorControllerOn_Alt.png and /dev/null differ diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/StructuralGlass.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/StructuralGlass.png deleted file mode 100644 index ef433d55c..000000000 Binary files a/src/main/resources/assets/mekanism/textures/blocks/ctm/StructuralGlass.png and /dev/null differ diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/ThermalEvaporationControllerOn.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/ctm/ThermalEvaporationControllerOn.png.mcmeta deleted file mode 100644 index efc331201..000000000 --- a/src/main/resources/assets/mekanism/textures/blocks/ctm/ThermalEvaporationControllerOn.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation": { - "frametime": 10 - } -} diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/BoilerCasing-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/boiler_casing-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/BoilerCasing-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/boiler_casing-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/BoilerCasing.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/boiler_casing.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/BoilerCasing.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/boiler_casing.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/BoilerValve-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/boiler_valve-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/BoilerValve-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/boiler_valve-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/BoilerValve.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/boiler_valve.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/BoilerValve.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/boiler_valve.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/DynamicGlass-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/dynamic_glass-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/DynamicGlass-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/dynamic_glass-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/DynamicGlass.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/dynamic_glass.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/DynamicGlass.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/dynamic_glass.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/DynamicValve-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/dynamic_valve-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/DynamicValve-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/dynamic_valve-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/DynamicValve.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/dynamic_valve.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/DynamicValve.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/dynamic_valve.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/ElectromagneticCoil-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/electromagnetic_coil-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/ElectromagneticCoil-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/electromagnetic_coil-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/ElectromagneticCoil.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/electromagnetic_coil.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/ElectromagneticCoil.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/electromagnetic_coil.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/InductionCasing-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_casing-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/InductionCasing-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/induction_casing-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/InductionCasing.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_casing.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/InductionCasing.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/induction_casing.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/InductionCellAdvanced-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_cell_advanced-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/InductionCellAdvanced-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/induction_cell_advanced-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/InductionCellAdvanced.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_cell_advanced.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/InductionCellAdvanced.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/induction_cell_advanced.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/InductionCellBasic-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_cell_basic-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/InductionCellBasic-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/induction_cell_basic-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/InductionCellBasic.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_cell_basic.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/InductionCellBasic.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/induction_cell_basic.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/InductionCellElite-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_cell_elite-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/InductionCellElite-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/induction_cell_elite-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/InductionCellElite.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_cell_elite.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/InductionCellElite.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/induction_cell_elite.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/InductionCellUltimate-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_cell_ultimate-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/InductionCellUltimate-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/induction_cell_ultimate-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/InductionCellUltimate.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_cell_ultimate.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/InductionCellUltimate.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/induction_cell_ultimate.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/InductionPortInput-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_port-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/InductionPortInput-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/induction_port-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/InductionPortInput.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_port.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/InductionPortInput.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/induction_port.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/InductionPortOutput-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_port_output-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/InductionPortOutput-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/induction_port_output-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/InductionPortOutput.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_port_output.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/InductionPortOutput.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/induction_port_output.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/InductionProviderAdvanced-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_provider_advanced-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/InductionProviderAdvanced-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/induction_provider_advanced-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/InductionProviderAdvanced.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_provider_advanced.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/InductionProviderAdvanced.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/induction_provider_advanced.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/InductionProviderBasic-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_provider_basic-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/InductionProviderBasic-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/induction_provider_basic-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/InductionProviderBasic.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_provider_basic.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/InductionProviderBasic.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/induction_provider_basic.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/InductionProviderElite-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_provider_elite-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/InductionProviderElite-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/induction_provider_elite-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/InductionProviderElite.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_provider_elite.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/InductionProviderElite.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/induction_provider_elite.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/InductionProviderUltimate-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_provider_ultimate-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/InductionProviderUltimate-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/induction_provider_ultimate-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/InductionProviderUltimate.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_provider_ultimate.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/InductionProviderUltimate.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/induction_provider_ultimate.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/ReactorControllerOff-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/reactor_controller_off-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/ReactorControllerOff-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/reactor_controller_off-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/ReactorControllerOff.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/reactor_controller_off.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/ReactorControllerOff.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/reactor_controller_off.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/ReactorControllerOn-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/reactor_controller_on-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/ReactorControllerOn-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/reactor_controller_on-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/ReactorControllerOn.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/reactor_controller_on.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/ReactorControllerOn.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/reactor_controller_on.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/ReactorFrame-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/reactor_frame-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/ReactorFrame-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/reactor_frame-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/ReactorFrame.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/reactor_frame.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/ReactorFrame.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/reactor_frame.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/ReactorGlass-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/reactor_glass-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/ReactorGlass-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/reactor_glass-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/ReactorGlass.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/reactor_glass.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/ReactorGlass.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/reactor_glass.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/ReactorLaserFocus-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/reactor_laser_focus-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/ReactorLaserFocus-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/reactor_laser_focus-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/ReactorLaserFocus.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/reactor_laser_focus.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/ReactorLaserFocus.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/reactor_laser_focus.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/ReactorLogicAdapter-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/reactor_logic_adapter-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/ReactorLogicAdapter-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/reactor_logic_adapter-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/ReactorLogicAdapter.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/reactor_logic_adapter.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/ReactorLogicAdapter.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/reactor_logic_adapter.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/ReactorNeutronCapture-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/reactor_neutron_capture-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/ReactorNeutronCapture-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/reactor_neutron_capture-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/ReactorNeutronCapture.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/reactor_neutron_capture.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/ReactorNeutronCapture.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/reactor_neutron_capture.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/ReactorPort-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/reactor_port-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/ReactorPort-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/reactor_port-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/ReactorPort.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/reactor_port.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/ReactorPort.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/reactor_port.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/StructuralGlass-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/structural_glass-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/StructuralGlass-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/structural_glass-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/DynamicGlass.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/structural_glass.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/DynamicGlass.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/structural_glass.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/SuperheatingElement-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/superheating_element-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/SuperheatingElement-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/superheating_element-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/SuperheatingElement.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/superheating_element.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/SuperheatingElement.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/superheating_element.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/SuperheatingElementOn-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/superheating_element_on-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/SuperheatingElementOn-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/superheating_element_on-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/SuperheatingElementOn.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/superheating_element_on.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/SuperheatingElementOn.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/superheating_element_on.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/TeleporterFrame-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/teleporter_frame-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/TeleporterFrame-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/teleporter_frame-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/TeleporterFrame.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/teleporter_frame.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/TeleporterFrame.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/teleporter_frame.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/ThermalEvaporationBlock-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_block-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/ThermalEvaporationBlock-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_block-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/ThermalEvaporationBlock.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_block.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/ThermalEvaporationBlock.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_block.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/ThermalEvaporationController-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_controller-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/ThermalEvaporationController-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_controller-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/ThermalEvaporationController.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_controller.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/ThermalEvaporationController.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_controller.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/ThermalEvaporationControllerOn-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_controller_on-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/ThermalEvaporationControllerOn-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_controller_on-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/SalinationControllerOn.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_controller_on-ctm.png.mcmeta similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/SalinationControllerOn.png.mcmeta rename to src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_controller_on-ctm.png.mcmeta diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/ThermalEvaporationControllerOn.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_controller_on.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/ThermalEvaporationControllerOn.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_controller_on.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/ThermalEvaporationControllerOn-ctm.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_controller_on.png.mcmeta similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/ThermalEvaporationControllerOn-ctm.png.mcmeta rename to src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_controller_on.png.mcmeta diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/ThermalEvaporationValve-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_valve-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/ThermalEvaporationValve-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_valve-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/ThermalEvaporationValve.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_valve.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/ThermalEvaporationValve.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_valve.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/TurbineCasing-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/turbine_casing-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/TurbineCasing-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/turbine_casing-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/TurbineCasing.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/turbine_casing.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/TurbineCasing.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/turbine_casing.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/TurbineValve-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/turbine_valve-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/TurbineValve-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/turbine_valve-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/TurbineValve.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/turbine_valve.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/TurbineValve.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/turbine_valve.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/TurbineVent-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/turbine_vent-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/TurbineVent-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/turbine_vent-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/TurbineVent.png b/src/main/resources/assets/mekanism/textures/blocks/ctm/turbine_vent.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/TurbineVent.png rename to src/main/resources/assets/mekanism/textures/blocks/ctm/turbine_vent.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/models/chemical_crystallizer.png b/src/main/resources/assets/mekanism/textures/blocks/models/chemical_crystallizer.png deleted file mode 100644 index 02805a313..000000000 Binary files a/src/main/resources/assets/mekanism/textures/blocks/models/chemical_crystallizer.png and /dev/null differ diff --git a/src/main/resources/assets/mekanism/textures/blocks/models/chemical_dissolution_chamber.png b/src/main/resources/assets/mekanism/textures/blocks/models/chemical_dissolution_chamber.png deleted file mode 100644 index 2a6e6ee75..000000000 Binary files a/src/main/resources/assets/mekanism/textures/blocks/models/chemical_dissolution_chamber.png and /dev/null differ diff --git a/src/main/resources/assets/mekanism/textures/blocks/models/quantum_entangloporter.png b/src/main/resources/assets/mekanism/textures/blocks/models/quantum_entangloporter.png new file mode 100644 index 000000000..a99747beb Binary files /dev/null and b/src/main/resources/assets/mekanism/textures/blocks/models/quantum_entangloporter.png differ diff --git a/src/main/resources/assets/mekanism/textures/blocks/models/security_desk.png b/src/main/resources/assets/mekanism/textures/blocks/models/security_desk.png index 8dbcd403d..13d06ad61 100644 Binary files a/src/main/resources/assets/mekanism/textures/blocks/models/security_desk.png and b/src/main/resources/assets/mekanism/textures/blocks/models/security_desk.png differ diff --git a/src/main/resources/assets/mekanism/textures/entities/Balloon.png b/src/main/resources/assets/mekanism/textures/entities/Balloon.png new file mode 100644 index 000000000..c482ae1ec Binary files /dev/null and b/src/main/resources/assets/mekanism/textures/entities/Balloon.png differ