Jump to content

VitezKolya

Members
  • Posts

    16
  • Joined

  • Last visited

Everything posted by VitezKolya

  1. I just saw something I should have noticed before. this.dimensionListDefault = configuration.get(Messages.Configuration.CATEGORY_GENERATION_ORE + "." + this.block.getLocalizedName().toLowerCase().replace(' ', '_'), Messages.Configuration.ORE_DIMENSION_LIST, this.dimensionListDefault, Messages.Configuration.ORE_DIMENSION_LIST_COMMENT).getStringList(); Just loading the default value to the default value. It should be this. this.dimensionList = configuration.get(Messages.Configuration.CATEGORY_GENERATION_ORE + "." + this.block.getLocalizedName().toLowerCase().replace(' ', '_'), Messages.Configuration.ORE_DIMENSION_LIST, this.dimensionListDefault, Messages.Configuration.ORE_DIMENSION_LIST_COMMENT).getStringList(); After I fixed a few other problems. My oreGenerater now works qute nicely.
  2. Thanks for your reply but I don't think what the problem is. I could be wrong though. I've updated the Ore class to make it a bit easier for others to understand what the Ore class is used for. The ore class's variables that don't have default in them are not supposed to be initialized. They hold temp data that only loads from the config files or from the default values. Originally the code from the syncConfig method was in the ConfigurationHandler class. This is where the dimensionList variable is initialized by dimensionListDefault and others. Some how it's not staying initialized when it gets to the OreGenerator class. Even though I call it through the same instance as I used to add the temporary ore with(JATM.OGLinstance). package com.vitezkolya.jatm.utility; import com.vitezkolya.jatm.reference.Messages; import net.minecraft.block.Block; import net.minecraftforge.common.config.Configuration; public class Ore { public Block block; public int veinCount; public int veinCountDefault; public int veinSize; public int veinSizeDefault; public int minHeight; public int minHeightDefault; public int maxHeight; public int maxHeightDefault; public int veinChance; public int veinChanceDefault; public boolean enabled; public boolean enabledDefault; public String[] dimensionList; public String[] dimensionListDefault; public Ore(Block block, int veinCount, int veinSize, int minHeight, int maxHeight, int veinChance, String[] dimensionList) { this.block = block; this.veinCountDefault = veinCount; this.veinSizeDefault = veinSize; this.minHeightDefault = minHeight; this.maxHeightDefault = maxHeight; this.veinChanceDefault = veinChance; this.enabledDefault = true; this.dimensionListDefault = dimensionList; } public Ore(Block block) { this.block = block; this.veinCountDefault = 5; this.veinSizeDefault = 7; this.minHeightDefault = 4; this.maxHeightDefault = 75; this.veinChanceDefault = 50; this.enabledDefault = true; String[] dimensionList = {"-1", "0", "1"}; this.dimensionListDefault = dimensionList; } public void syncConfig(Configuration configuration) { LogHelper.info(("Config add: " + this.block.getLocalizedName())); this.enabled = configuration.get(Messages.Configuration.CATEGORY_GENERATION_ORE + "." + this.block.getLocalizedName().toLowerCase().replace(' ', '_'), Messages.Configuration.GENERATION_ORE_ENABLE, this.enabledDefault, Messages.Configuration.GENERATION_ORE_ENABLE_COMMENT).getBoolean(this.enabledDefault); this.minHeight = configuration.get(Messages.Configuration.CATEGORY_GENERATION_ORE + "." + this.block.getLocalizedName().toLowerCase().replace(' ', '_'), Messages.Configuration.ORE_MIN_HEIGHT, this.minHeightDefault, Messages.Configuration.ORE_MIN_HEIGHT_COMMENT, 0, 255).getInt(this.minHeightDefault); this.maxHeight = configuration.get(Messages.Configuration.CATEGORY_GENERATION_ORE + "." + this.block.getLocalizedName().toLowerCase().replace(' ', '_'), Messages.Configuration.ORE_MAX_HEIGHT, this.maxHeightDefault, Messages.Configuration.ORE_MAX_HEIGHT_COMMENT, 0, 255).getInt(this.maxHeightDefault); this.veinSize = configuration.get(Messages.Configuration.CATEGORY_GENERATION_ORE + "." + this.block.getLocalizedName().toLowerCase().replace(' ', '_'), Messages.Configuration.ORE_VEIN_SIZE, this.veinSizeDefault, Messages.Configuration.ORE_VEIN_SIZE_COMMENT, 0, 255).getInt(this.veinSizeDefault); this.veinChance = configuration.get(Messages.Configuration.CATEGORY_GENERATION_ORE + "." + this.block.getLocalizedName().toLowerCase().replace(' ', '_'), Messages.Configuration.ORE_VEIN_CHANCE, this.veinChanceDefault, Messages.Configuration.ORE_VEIN_CHANCE_COMMENT, 0, 255).getInt(this.veinChanceDefault); this.veinCount = configuration.get(Messages.Configuration.CATEGORY_GENERATION_ORE + "." + this.block.getLocalizedName().toLowerCase().replace(' ', '_'), Messages.Configuration.ORE_VEIN_COUNT, this.veinCountDefault, Messages.Configuration.ORE_VEIN_COUNT_COMMENT, 0, 255).getInt(this.veinCountDefault); this.dimensionListDefault = configuration.get(Messages.Configuration.CATEGORY_GENERATION_ORE + "." + this.block.getLocalizedName().toLowerCase().replace(' ', '_'), Messages.Configuration.ORE_DIMENSION_LIST, this.dimensionListDefault, Messages.Configuration.ORE_DIMENSION_LIST_COMMENT).getStringList(); } }
  3. I'm having a strange problem with my ore generator. In my ConfigurationHandler it sets the dimensionList to the defaults in Ore, but some how OreGenerator loses the list(Well it's a array of strings not a list). I've used this code \/ to check whether or not dimensionList has my array of dimension ids. If I place it right before the dimensionList null check it prints true. LogHelper.info(JATM.OGLinstance.getOreList().get(0).dimensionList == null); Any help would be greatly appreciated. Here is the relevant code and links to my github repository. OreGenerator.java OreGenerationListHandler.java Ore.java ConfigurationHandler.java
  4. Ah so basicly if my gui doesn't have a container don't use world.isRemote around the player.openGui. Thanks for your help!
  5. Strange it's working now. I have another gui that uses the world.isRemote and it doesn't have any problems opening at all. Why wouldn't it work for this gui?
  6. Yep. Right here. package altenergy; import java.io.File; import java.util.logging.Level; import java.util.logging.Logger; import universalelectricity.core.UniversalElectricity; import universalelectricity.prefab.network.PacketManager; import net.minecraft.creativetab.CreativeTabs; import net.minecraftforge.common.DimensionManager; import altenergy.blocks.ModBlocks; import altenergy.configuration.ConfigurationHandler; import altenergy.content.ModContent; import altenergy.core.handlers.AltEnergyHooks; import altenergy.core.handlers.LocalizationHandler; import altenergy.core.proxy.CommonProxy; import altenergy.creativetab.CreativeTabAE; import altenergy.items.ModItems; import altenergy.lib.DimensionIds; import altenergy.lib.Reference; import altenergy.world.WorldProviderTerra; import altenergy.world.gen.WorldGenManager; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.ModMetadata; import cpw.mods.fml.common.Mod.Init; import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.Mod.Metadata; import cpw.mods.fml.common.Mod.PostInit; import cpw.mods.fml.common.Mod.PreInit; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.network.NetworkMod; import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.registry.GameRegistry; /** * AltEnergy * * AltEnergy * * @author VitezKolya * @license GNU Public License v3 (http://www.gnu.org/licenses/gpl.html) * */ @Mod(modid = Reference.MOD_ID, name = Reference.MOD_NAME, version = Reference.VERSION, certificateFingerprint = Reference.FINGERPRINT) @NetworkMod(channels={Reference.CHANNEL_NAME}, clientSideRequired=true, serverSideRequired=false, packetHandler = PacketManager.class) public class AltEnergy { @Instance(Reference.MOD_ID) public static AltEnergy instance; @SidedProxy(clientSide = Reference.CLIENT_PROXY_CLASS, serverSide = Reference.SERVER_PROXY_CLASS) public static CommonProxy proxy; public static CreativeTabs tabsAE = new CreativeTabAE(CreativeTabs.getNextID(), Reference.MOD_ID); public static WorldGenManager genManager = new WorldGenManager(); public static AltEnergyHooks hooks; @Metadata(Reference.MOD_ID) public static ModMetadata meta; public static Logger AELogger = Logger.getLogger(Reference.MOD_ID); public static void log(Level level, String msg, String... replacements) { for(String replace: replacements) { msg = msg.replace("%s", replace); } AELogger.log(level, msg); } /** * This is were you load up blocks/items * * @param event */ @PreInit public void preInit(FMLPreInitializationEvent event) { log(Level.INFO, "PreInitializing " + Reference.MOD_ID + " version: " + meta.version); LocalizationHandler.loadLanguages(); // Initialize the configuration ConfigurationHandler.init(new File(event.getModConfigurationDirectory().getAbsolutePath() + File.separator + Reference.CHANNEL_NAME + File.separator + Reference.MOD_ID + ".cfg")); ModBlocks.init(); ModItems.init(); ModContent.init(); GameRegistry.registerWorldGenerator(genManager); NetworkRegistry.instance().registerGuiHandler(this, proxy); } @Init public void init(FMLInitializationEvent event) { log(Level.INFO, "Initializing " + Reference.MOD_ID + " version: " + meta.version); proxy.registerTileEntities(); proxy.initRenderingAndTextures(); /*if (!useUeVoltageSensitivity) { UniversalElectricity.isVoltageSensitive = true; //EELogger.finest("Successfully toggled Voltage Sensitivity!"); }*/ UniversalElectricity.isNetworkActive = true; DimensionManager.registerProviderType(DimensionIds.TERRA, WorldProviderTerra.class, false); DimensionManager.registerDimension(DimensionIds.TERRA, DimensionIds.TERRA); } @PostInit public void postInit(FMLPostInitializationEvent event) { log(Level.INFO, "PostInitializing " + Reference.MOD_ID + " version: " + meta.version); } }
  7. Ah that what you ment. No they don't print in the eclipse console. In fact the println in the getClientGuiElement at GuiIds.CONTROLLER_PC doesn't print ether. It's like the player.openGui never gets called at all, but when I have println on both sides of player.openGui they both print. I've been pounding my head agenst this problem for a few days. @Override public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { System.out.println("ID: " + ID); if(ID == GuiIds.MINI_POWERCORE) { return new GuiMiniPowerCore(player, world, x, y, z); } else if(ID == GuiIds.CONTROLLER_PC) { System.out.println("Opening Controller Gui"); return new GuiControllerPC(player, world, x, y, z); } else if(ID == GuiIds.MACHINE) { return new GuiMachine(player, world, x, y, z); } return null; }
  8. What do you mean by opening correctly? Do you mean using this code? Or is there something else I'm missing? I have another gui that works and both block files are just about identical. Other then the code for the controller to link to the powercore.
  9. Yeah I can see how that would be a pain to program. Specially what I want to do with some of the entities I have planed. At lest the one entity I'm working on doesn't need any animation other then floating up and down and maybe a little horizontal movement while idling.
  10. I've been try to figure out why this gui won't open when I click/use the block it's attached to. Here is the code for the block, gui and the proxy code. package altenergy.client.gui; import org.lwjgl.opengl.GL11; import altenergy.content.controllers.TileControllerPC; import altenergy.core.misc.PowerCoreState; import altenergy.lib.Textures; import net.minecraft.client.gui.GuiScreen; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; public class GuiControllerPC extends GuiScreen{ private TileControllerPC tileEntity; private int containerWidth; private int contrainerHeight; private EntityPlayer player; private boolean isActive = false; private int xSize; private int ySize; public GuiControllerPC(EntityPlayer player, World world, int x, int y, int z) { System.out.println("Gui open"); this.tileEntity = (TileControllerPC) world.getBlockTileEntity(x, y, z); this.player = player; this.xSize = 146; this.ySize = 67; } @Override public void drawScreen(int x, int y, float f) { drawGuiContainerBackgroundLayer(); drawGuiContainerForegroundLayer(); } protected void drawGuiContainerForegroundLayer() { this.fontRenderer.drawString("Power Core Controller", 44, 8, 4210752); String stateText = ""; String displayText = ""; if(this.tileEntity.getStatus() == PowerCoreState.Idle) { stateText = "Idle"; } else if(this.tileEntity.getStatus() == PowerCoreState.Generate) { stateText = "Generating"; } else if(this.tileEntity.getStatus() == PowerCoreState.Overload) { stateText = "Warning: Overload"; } else if(this.tileEntity.getStatus() == PowerCoreState.Vent) { stateText = "Warning: Venting"; } displayText = "100000.0Watt";//ElectricityDisplay.getDisplay(tileEntity.generateWatts, ElectricUnit.WATT); this.fontRenderer.drawString("Status: " + stateText, (int) (33), 24, 4210752); this.fontRenderer.drawString("Output: " + displayText, (int) (30 - displayText.length() * 1.25), 44, 4210752); } protected void drawGuiContainerBackgroundLayer() { this.mc.renderEngine.bindTexture(Textures.GUI_MINI_POWERCORE); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); containerWidth = (this.width - this.xSize) / 2; contrainerHeight = (this.height - this.ySize) / 2; this.drawTexturedModalRect(containerWidth, contrainerHeight, 0, 0, this.xSize, this.ySize); if(this.isActive) { this.drawTexturedModalRect(containerWidth + 133, contrainerHeight + 18, 171, 25, 9, 7); player.closeScreen(); } else { this.drawTexturedModalRect(containerWidth + 133, contrainerHeight + 18, 171, 16, 9, 7); } } private boolean toggleButton() { return !isActive; } @Override protected void mouseClicked(int x, int y, int buttonID) { super.mouseClicked(x,y,buttonID); int xAxis= (x - (width - xSize) / 2); int yAxis= (y - (height - ySize) / 2); if(xAxis > 133 && xAxis < 141 && yAxis > 18 && yAxis < 24) { toggleButton(); } } } package altenergy.content.controllers; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import universalelectricity.prefab.block.BlockAdvanced; import altenergy.AltEnergy; import altenergy.core.misc.TilePowerCoreBase; //import altenergy.content.controllers.TileControllerPC; import altenergy.lib.GuiIds; import altenergy.lib.RenderIds; import altenergy.lib.Strings; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class BlockControllerPC extends BlockAdvanced { public BlockControllerPC(int id) { super(id, Material.iron); setUnlocalizedName(Strings.BLOCK_CONTROLLER_PC); setCreativeTab(AltEnergy.tabsAE); } @Override public TileEntity createNewTileEntity(World world) { return new TileControllerPC(); } @Override public boolean renderAsNormalBlock() { return false; } @Override public boolean isOpaqueCube() { return false; } @Override public int getRenderType() { return RenderIds.controllerPC; } @Override @SideOnly(Side.CLIENT) public void registerIcons(IconRegister iconRegister) { } @Override public void breakBlock(World world, int x, int y, int z, int id, int data) { TileControllerPC tileEntity = (TileControllerPC) world.getBlockTileEntity(x, y, z); super.breakBlock(world, x, y, z, id, data); if (tileEntity == null) { System.out.printf("BlockControllerPC.breakBlock: No tile entity at (%d,%d,%d)\n", x, y, z); } else if (tileEntity.isLinked) { TilePowerCoreBase core = (TilePowerCoreBase) tileEntity.getLinked(); if (core != null) { core.clearLink(); } } } @Override public void onBlockPlacedBy(World world, int x, int y, int z, EntityLiving player, ItemStack stack) { super.onBlockPlacedBy(world, x, y, z, player, stack); TileEntity tileEntity = world.getBlockTileEntity(x, y, z); if (tileEntity instanceof TileControllerPC) { ((TileControllerPC) tileEntity).linkToControlled(); } } @Override public boolean onMachineActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { if (player.isSneaking()) { return false; } else { if (!world.isRemote) { TileControllerPC tileEntity = (TileControllerPC) world.getBlockTileEntity(x, y, z); tileEntity.findControlled(); if (tileEntity != null) { player.openGui(AltEnergy.instance, GuiIds.CONTROLLER_PC, world, x, y, z); } } return true; } } } package altenergy.core.proxy; import altenergy.client.gui.GuiMachine; import altenergy.client.gui.GuiMiniPowerCore; import altenergy.client.gui.GuiControllerPC; import altenergy.content.minipowercore.ContainerMiniPowerCore; import altenergy.content.minipowercore.TileMiniPowerCore; import altenergy.core.misc.ContrainerMachine; import altenergy.lib.GuiIds; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.common.ForgeDirection; import cpw.mods.fml.common.network.IGuiHandler; public class CommonProxy implements IGuiHandler{ public void registerSoundHandler() { } public void initRenderingAndTextures() { } public void registerTileEntities() { } public void sendRequestEventPacket(byte eventType, int originX, int originY, int originZ, byte sideHit, byte rangeX, byte rangeY, byte rangeZ, String data) { } public void handleTileEntityPacket(int x, int y, int z, ForgeDirection orientation, byte state, String customName) { } public void handleTileWithItemPacket(int x, int y, int z, ForgeDirection orientation, byte state, String customName, int itemID, int metaData, int stackSize, int color) { } public void bindTexture(String texture) { } @Override public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { if(ID == GuiIds.MINI_POWERCORE) { return new ContainerMiniPowerCore(player.inventory, world, x, y, z); } else if(ID == GuiIds.MACHINE) { return new ContrainerMachine(player.inventory, world, z, z, z); } return null; } @Override public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { System.out.println("ID: " + ID); if(ID == GuiIds.MINI_POWERCORE) { return new GuiMiniPowerCore(player, world, x, y, z); } else if(ID == GuiIds.CONTROLLER_PC) { System.out.println("Opening Controller Gui"); return new GuiControllerPC(player, world, x, y, z); } else if(ID == GuiIds.MACHINE) { return new GuiMachine(player, world, x, y, z); } return null; } }
  11. What about animating the .obj parts/object groups from with in the java file? like how the Ghast does it. Would this work? /** * Sets the models various rotation angles then renders the model. */ public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { this.setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); GL11.glPushMatrix(); GL11.glTranslatef(0.0F, 0.6F, 0.0F); this.body.render(par7); ModelRenderer[] amodelrenderer = this.tentacles; int i = amodelrenderer.length; for (int j = 0; j < i; ++j) { ModelRenderer modelrenderer = amodelrenderer[j]; modelrenderer.render(par7); } GL11.glPopMatrix(); }
  12. Is it posable to use obj model for a entity creature? and how would I animate it(if it's different from what would be normal)? I've already looked though the minecraft entity render files to get familiar with the way mojang does it.
  13. I see now. The first variable sets the rotation angle and the other vars are for telling what axis to rotate on. Anway I got the Testing renderer working on the test mod, but the main mod isn't rendering what I want to. Renderer: package altenergy.client.render.tileentity; import java.util.Random; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; import org.lwjgl.opengl.GL11; import altenergy.client.model.ModelEnergyBusway; import altenergy.content.conductors.TileEnergyBusway; import altenergy.lib.Textures; import cpw.mods.fml.client.FMLClientHandler; public class TileEntityEnergyBuswayRenderer extends TileEntitySpecialRenderer { private ModelEnergyBusway model = new ModelEnergyBusway(); private int random(int maxNum) { Random randNum = new Random(); return randNum.nextInt(maxNum); } public void renderModelAt(TileEnergyBusway tileEntity, double x, double y, double z, float tick) { float scale = 1; GL11.glPushMatrix(); GL11.glDisable(GL11.GL_LIGHTING); // Scale, Translate, Rotate GL11.glScalef(scale, scale, scale); GL11.glTranslatef((float) x, (float) y, (float) z); // angle, xaxis, yaxis, zaxis GL11.glRotatef(0F, 0F, 0F, 0F); // Bind Texture // bindTextureByName(Textures.MODEL_BUSWAY); FMLClientHandler.instance().getClient().renderEngine.bindTexture(Textures.MODEL_BUSWAY); boolean[] connectedSides = tileEntity.visuallyConnected; if (connectedSides[0]) { model.renderPart("BuswayConnectionF"); } if (connectedSides[1]) { model.renderPart("BuswayConnectionE"); } if (connectedSides[2]) { model.renderPart("BuswayConnectionA"); } if (connectedSides[3]) { model.renderPart("BuswayConnectionB"); } if (connectedSides[4]) { model.renderPart("BuswayConnectionC"); } if (connectedSides[5]) { model.renderPart("BuswayConnectionD"); } model.renderPart("BuswayNone"); GL11.glEnable(GL11.GL_LIGHTING); GL11.glPopMatrix(); } @Override public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float tick) { renderModelAt((TileEnergyBusway) tileEntity, x, y, z, tick); } } TileEntity: package altenergy.content.conductors; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.ForgeDirection; import universalelectricity.core.block.IConnector; import universalelectricity.core.block.INetworkProvider; import universalelectricity.prefab.tile.TileEntityConductor; import altenergy.lib.Reference; public class TileEnergyBusway extends TileEntityConductor { public TileEnergyBusway() { channel = Reference.CHANNEL_NAME; } @Override public double getResistance() { return 0; } @Override public double getCurrentCapcity() { return 5000000; } public int getNumCon(boolean[] connections) { int count = 0; for(int side = 0; side < connections.length; side++) { if(connections[0]) { count++; } } return count; } public void printConnections() { System.out.println("Bottom: " + this.visuallyConnected[0]); System.out.println("Top: " + this.visuallyConnected[1]); System.out.println("Front: " + this.visuallyConnected[2]); System.out.println("Back: " + this.visuallyConnected[3]); System.out.println("Left: " + this.visuallyConnected[4]); System.out.println("Right: " + this.visuallyConnected[5]); } @Override public void updateConnection(TileEntity tileEntity, ForgeDirection side) { if (!worldObj.isRemote) { if(tileEntity instanceof TileEnergyBusway) { if (tileEntity instanceof IConnector) { if (((IConnector) tileEntity).canConnect(side.getOpposite())) { connectedBlocks[side.ordinal()] = tileEntity; visuallyConnected[side.ordinal()] = true; if (tileEntity.getClass() == this.getClass() && tileEntity instanceof INetworkProvider) { getNetwork().mergeConnection(((INetworkProvider) tileEntity).getNetwork()); } //System.out.println("Connection Complete"); //printConnections(); return; } } if (connectedBlocks[side.ordinal()] != null) { getNetwork().stopProducing(connectedBlocks[side.ordinal()]); getNetwork().stopRequesting(connectedBlocks[side.ordinal()]); } connectedBlocks[side.ordinal()] = null; visuallyConnected[side.ordinal()] = false; } } } } For some reason the connectedSides array when the tileEntity is place down doesn't seem to see or connect to the tile entity's visuallyConnected array. So that when I have placed two blocks next to each other the renderer is suppose to render one of the BuswayConnection's but isn't. I've tested all the parts and they all work just fine. It's just the instance of tileEnergyBusway isn't sending the visuallyConnected boolean array. At lest that's what it seems like. I'm using the Universal Electricity api for the electric network.
  14. I just figured it out. I changed this: GL11.glRotatef(-90F, 0F, 0F, 0F); to this: GL11.glRotatef(0F, 0F, 0F, 0F); This is what was causing the problem. The -90degree rotation made the model invisible or unrenderable. And it also seems that I pre-rotated the model in the export options in blender so it wasn't needed in the first place. Anyway thanks for responding.
  15. Oh I know that the part "test" is there, it's listed in the obj file. Also I'm using renderPart in the item renderer too and it's working. Here is the obj file for reference:
  16. I've been trying to figure out how to render obj files into minecraft. I've gotten it to render as an item but it just won't render as a tileEntity. Here is a github link to my testing mod. Any idea why it's not rendering? https://github.com/VitezKolya/TestMod https://github.com/VitezKolya/TestMod/blob/master/common/testmod/blocks/BlockTileTest.java https://github.com/VitezKolya/TestMod/blob/master/common/testmod/client/render/model/ModelTest.java https://github.com/VitezKolya/TestMod/blob/master/common/testmod/client/render/tileentity/TileTestRenderer.java https://github.com/VitezKolya/TestMod/blob/master/common/testmod/core/proxy/ClientProxy.java https://github.com/VitezKolya/TestMod/blob/master/common/testmod/TestMod.java Also note that I've registered the item renderer and tileEntity renderer in the ClientProxy.java.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.