Fixed some render issues and imprint name
This commit is contained in:
parent
4054079fb6
commit
a87e21103c
6 changed files with 99 additions and 74 deletions
|
@ -4,7 +4,6 @@ import java.util.HashSet;
|
|||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityList;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
@ -17,8 +16,6 @@ import net.minecraft.nbt.NBTTagList;
|
|||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.core.ResonantInductionTabs;
|
||||
import resonantinduction.core.Settings;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemBlockImprint extends Item
|
||||
{
|
||||
|
@ -30,19 +27,13 @@ public class ItemBlockImprint extends Item
|
|||
public ItemBlockImprint(int id)
|
||||
{
|
||||
super(Settings.CONFIGURATION.getItem("imprint", id).getInt());
|
||||
this.setUnlocalizedName("imprint");
|
||||
this.setUnlocalizedName(Reference.PREFIX + "imprint");
|
||||
this.setTextureName(Reference.PREFIX + "imprint");
|
||||
this.setCreativeTab(ResonantInductionTabs.CORE);
|
||||
this.setHasSubtypes(true);
|
||||
this.maxStackSize = 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
this.itemIcon = par1IconRegister.registerIcon(Reference.PREFIX + "imprint");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemStackLimit()
|
||||
{
|
||||
|
|
|
@ -35,90 +35,93 @@ import cpw.mods.fml.common.network.NetworkMod;
|
|||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
/** The core module of Resonant Induction
|
||||
/**
|
||||
* The core module of Resonant Induction
|
||||
*
|
||||
* @author Calclavia */
|
||||
* @author Calclavia
|
||||
*/
|
||||
@Mod(modid = ResonantInduction.ID, name = ResonantInduction.NAME, version = Reference.VERSION, dependencies = "required-after:CalclaviaCore;before:IC2")
|
||||
@NetworkMod(channels = Reference.CHANNEL, clientSideRequired = true, serverSideRequired = false, packetHandler = PacketHandler.class)
|
||||
@ModstatInfo(prefix = "resonantin")
|
||||
public class ResonantInduction
|
||||
{
|
||||
/** Mod Information */
|
||||
public static final String ID = "ResonantInduction|Core";
|
||||
public static final String NAME = Reference.NAME + " Core";
|
||||
/** Mod Information */
|
||||
public static final String ID = "ResonantInduction|Core";
|
||||
public static final String NAME = Reference.NAME + " Core";
|
||||
|
||||
@Instance(ID)
|
||||
public static ResonantInduction INSTANCE;
|
||||
@Instance(ID)
|
||||
public static ResonantInduction INSTANCE;
|
||||
|
||||
@SidedProxy(clientSide = "resonantinduction.core.ClientProxy", serverSide = "resonantinduction.core.CommonProxy")
|
||||
public static CommonProxy proxy;
|
||||
@SidedProxy(clientSide = "resonantinduction.core.ClientProxy", serverSide = "resonantinduction.core.CommonProxy")
|
||||
public static CommonProxy proxy;
|
||||
|
||||
@Mod.Metadata(ID)
|
||||
public static ModMetadata metadata;
|
||||
@Mod.Metadata(ID)
|
||||
public static ModMetadata metadata;
|
||||
|
||||
public static final Logger LOGGER = Logger.getLogger(Reference.NAME);
|
||||
public static final Logger LOGGER = Logger.getLogger(Reference.NAME);
|
||||
|
||||
/** Packets */
|
||||
public static final PacketTile PACKET_TILE = new PacketTile(Reference.CHANNEL);
|
||||
public static final PacketMultiPart PACKET_MULTIPART = new PacketMultiPart(Reference.CHANNEL);
|
||||
/** Packets */
|
||||
public static final PacketTile PACKET_TILE = new PacketTile(Reference.CHANNEL);
|
||||
public static final PacketMultiPart PACKET_MULTIPART = new PacketMultiPart(Reference.CHANNEL);
|
||||
|
||||
/** Blocks and Items */
|
||||
public static BlockMulti blockMulti;
|
||||
/** Blocks and Items */
|
||||
public static BlockMulti blockMulti;
|
||||
|
||||
public static Block blockOre;
|
||||
public static ItemDust itemDust;
|
||||
public static Block blockFluidMixture;
|
||||
public static Block blockGas;
|
||||
public static Block blockOre;
|
||||
public static ItemDust itemDust;
|
||||
public static Block blockFluidMixture;
|
||||
public static Block blockGas;
|
||||
|
||||
public static Fluid MIXTURE = null;
|
||||
public static Fluid MIXTURE = null;
|
||||
|
||||
@EventHandler
|
||||
public void preInit(FMLPreInitializationEvent evt)
|
||||
{
|
||||
ResonantInduction.LOGGER.setParent(FMLLog.getLogger());
|
||||
NetworkRegistry.instance().registerGuiHandler(this, proxy);
|
||||
Modstats.instance().getReporter().registerMod(this);
|
||||
Settings.load();
|
||||
@EventHandler
|
||||
public void preInit(FMLPreInitializationEvent evt)
|
||||
{
|
||||
ResonantInduction.LOGGER.setParent(FMLLog.getLogger());
|
||||
NetworkRegistry.instance().registerGuiHandler(this, proxy);
|
||||
Modstats.instance().getReporter().registerMod(this);
|
||||
Settings.load();
|
||||
|
||||
// Register Forge Events
|
||||
MinecraftForge.EVENT_BUS.register(ResourceGenerator.INSTANCE);
|
||||
MinecraftForge.EVENT_BUS.register(new LinkEventHandler());
|
||||
MinecraftForge.EVENT_BUS.register(new FluidEventHandler());
|
||||
// Register Forge Events
|
||||
MinecraftForge.EVENT_BUS.register(ResourceGenerator.INSTANCE);
|
||||
MinecraftForge.EVENT_BUS.register(new LinkEventHandler());
|
||||
MinecraftForge.EVENT_BUS.register(new FluidEventHandler());
|
||||
|
||||
blockMulti = new BlockMulti(Settings.CONFIGURATION.getBlock("blockMulti", Settings.getNextBlockID()).getInt()).setPacketType(PACKET_TILE);
|
||||
blockMulti = new BlockMulti(Settings.CONFIGURATION.getBlock("blockMulti", Settings.getNextBlockID()).getInt()).setPacketType(PACKET_TILE);
|
||||
|
||||
MIXTURE = new Fluid("mixture");
|
||||
FluidRegistry.registerFluid(MIXTURE);
|
||||
blockFluidMixture = new BlockFluidMixture(Settings.CONFIGURATION.getBlock("FluidMixture", Settings.getNextBlockID()).getInt(), MIXTURE);
|
||||
MIXTURE = new Fluid("mixture");
|
||||
FluidRegistry.registerFluid(MIXTURE);
|
||||
blockFluidMixture = new BlockFluidMixture(Settings.CONFIGURATION.getBlock("FluidMixture", Settings.getNextBlockID()).getInt(), MIXTURE);
|
||||
|
||||
// Items
|
||||
itemDust = new ItemDust(Settings.getNextItemID());
|
||||
GameRegistry.registerItem(itemDust, itemDust.getUnlocalizedName());
|
||||
// Items
|
||||
itemDust = new ItemDust(Settings.getNextItemID());
|
||||
GameRegistry.registerItem(itemDust, itemDust.getUnlocalizedName());
|
||||
|
||||
GameRegistry.registerTileEntity(TileMultiBlockPart.class, "TileEntityMultiBlockPart");
|
||||
GameRegistry.registerBlock(blockMulti, "blockMulti");
|
||||
GameRegistry.registerTileEntity(TileMultiBlockPart.class, "TileEntityMultiBlockPart");
|
||||
GameRegistry.registerBlock(blockMulti, "blockMulti");
|
||||
|
||||
GameRegistry.registerBlock(blockFluidMixture, blockFluidMixture.getUnlocalizedName());
|
||||
GameRegistry.registerTileEntity(TileFluidMixture.class, blockFluidMixture.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(blockFluidMixture, blockFluidMixture.getUnlocalizedName());
|
||||
GameRegistry.registerTileEntity(TileFluidMixture.class, blockFluidMixture.getUnlocalizedName());
|
||||
|
||||
Settings.save();
|
||||
}
|
||||
Settings.save();
|
||||
proxy.preInit();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void init(FMLInitializationEvent evt)
|
||||
{
|
||||
// Load Languages
|
||||
ResonantInduction.LOGGER.fine("Languages Loaded:" + LanguageUtility.loadLanguages(Reference.LANGUAGE_DIRECTORY, Reference.LANGUAGES));
|
||||
// Set Mod Metadata
|
||||
Settings.setModMetadata(metadata, ID, NAME);
|
||||
}
|
||||
@EventHandler
|
||||
public void init(FMLInitializationEvent evt)
|
||||
{
|
||||
// Load Languages
|
||||
ResonantInduction.LOGGER.fine("Languages Loaded:" + LanguageUtility.loadLanguages(Reference.LANGUAGE_DIRECTORY, Reference.LANGUAGES));
|
||||
// Set Mod Metadata
|
||||
Settings.setModMetadata(metadata, ID, NAME);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void postInit(FMLPostInitializationEvent evt)
|
||||
{
|
||||
// Generate Dusts
|
||||
ResourceGenerator.generateDusts();
|
||||
@EventHandler
|
||||
public void postInit(FMLPostInitializationEvent evt)
|
||||
{
|
||||
// Generate Dusts
|
||||
ResourceGenerator.generateDusts();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -100,10 +100,12 @@ public class RenderArmbot extends TileEntitySpecialRenderer implements ICustomBl
|
|||
@Override
|
||||
public void renderDynamic(TileEntity tile, Block block, int metadata, int modelID, RenderBlocks renderer)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(RenderArmbot.TEXTURE);
|
||||
GL11.glTranslatef(0.0F, 0.7F, 0.0F);
|
||||
GL11.glTranslatef(0.5f, 1.3f, 0.5f);
|
||||
GL11.glRotatef(180f, 0f, 0f, 1f);
|
||||
GL11.glScalef(0.8f, 0.8f, 0.8f);
|
||||
RenderArmbot.MODEL.render(0.0625F, 0, 0);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
|
@ -1,15 +1,20 @@
|
|||
package resonantinduction.electrical.levitator;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.core.ResonantInduction;
|
||||
import calclavia.lib.render.block.ICustomBlockRenderer;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class RenderLevitator extends TileEntitySpecialRenderer
|
||||
public class RenderLevitator extends TileEntitySpecialRenderer implements ICustomBlockRenderer
|
||||
{
|
||||
public static final ModelEMContractor MODEL = new ModelEMContractor(false);
|
||||
public static final ModelEMContractor MODEL_SPIN = new ModelEMContractor(true);
|
||||
|
@ -70,4 +75,27 @@ public class RenderLevitator extends TileEntitySpecialRenderer
|
|||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderInventory(Block block, int metadata, int modelID, RenderBlocks renderer)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderStatic(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderDynamic(TileEntity tile, Block block, int metadata, int modelID, RenderBlocks renderer)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(0.5f, 1.7f, 0.5f);
|
||||
GL11.glRotatef(180f, 0f, 0f, 1f);
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE);
|
||||
MODEL.render(0.0725F);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -149,7 +149,7 @@ public class RenderConveyorBelt extends TileEntitySpecialRenderer implements ICu
|
|||
public void renderDynamic(TileEntity tile, Block block, int metadata, int modelID, RenderBlocks renderer)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(0.0F, 1.3F, 0.0F);
|
||||
GL11.glTranslatef(0.5f, 1.7F, 0.5f);
|
||||
GL11.glRotatef(180f, 0f, 0f, 1f);
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(Reference.DOMAIN, Reference.MODEL_PATH + "belt/frame0.png"));
|
||||
MODEL.render(0.0625F, 0, false, false, false, false);
|
||||
|
|
|
@ -13,6 +13,7 @@ fluid.mixture=Mixture
|
|||
## Items
|
||||
item.resonantinduction\:ingot.name=%v Ingot
|
||||
item.resonantinduction\:oreDust.name=%v Dust
|
||||
item.resonantinduction\:imprint.name=Imprint
|
||||
|
||||
## Machines
|
||||
tile.resonantinduction\:imprinter.name=Imprinter
|
||||
|
|
Loading…
Reference in a new issue