Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Casual Dutchman

Members
  • Joined

  • Last visited

Everything posted by Casual Dutchman

  1. can anyone help me with this?
  2. I have made a portal, a dimension and a teleporter. It works great, except for one thing. The teleporter When I enter my dimension I spawn at the portal. When I enter the overworld again, I spawn at the exact same coordinates as the portal in my dimension. I think it has to do with this code: int j2 = par1Entity.getTeleportDirection(); Lets start from the beginning from where this code starts. It begin in the BlockPortal class. When it calles for the entity.setInPortal() it create a new integer teleportDirection = Direction.getMovementDirection(d0, d1) the getTeleportDirection() get the 'teleportDirection' from the Entity class. but this is not set when I have my own code for the portal black; public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity) { if ((par5Entity.ridingEntity == null) && (par5Entity.riddenByEntity == null) && ((par5Entity instanceof EntityPlayerMP))) { EntityPlayerMP player = (EntityPlayerMP) par5Entity; MinecraftServer mServer = MinecraftServer.getServer(); if (player.timeUntilPortal > 0) { player.timeUntilPortal = 10; } else if (player.dimension != AgeCraft.dimensionId) { player.timeUntilPortal = 10; player.mcServer.getConfigurationManager().transferPlayerToDimension(player, AgeCraft.dimensionId, new TeleporterSadiraj(mServer.worldServerForDimension(AgeCraft.dimensionId))); } else { player.timeUntilPortal = 10; player.mcServer.getConfigurationManager().transferPlayerToDimension(player, 0, new TeleporterSadiraj(mServer.worldServerForDimension(1))); } } } Can anyone help me with this code?
  3. It is rendering correctly, I don't know why it is rendering above my player. that must not be!
  4. does anyone have a fix for this?
  5. Tried several thing, but all failed. One thing left to do: BUMP
  6. You can just make a if statement too, that worked for me. It is not the exact code I used, but it looks like it. This code is just written in the browser. public static Item getResult(Item item, Item item2, Item item3) { //change Item to Block if you want if(inputstacks.getItem() == item && inputstacks.getItem() == item2 && inputstacks.getItem() == item3) {//inputstacks are the inputs, you can use the getItemBlock (ore something like that) to get the block return something; } return null; }
  7. I have created a custom modelled mob. I wanted it to have a item equipped. (a sword) So I grabbed the renderEquippedItems methode from the renderplayer and modified it. It works all fine, but there is one problem. This: Every time I spawn my mob, a sword will render above the player. This will be a cpu load, because every mob is a extra render, because it renders in first person too (just a little) This is the renderer code: public class RenderGoblin extends RenderLiving { protected ModelGoblin model; public RenderGoblin (ModelGoblin modelTutorial, float f) { super(modelTutorial, f); model = ((ModelGoblin)mainModel); } public void renderGo(EntityGoblin entity, double par2, double par4, double par6, float par8, float par9) { super.doRender(entity, par2, par4, par6, par8, par9); this.renderEquippedItems(entity, 1.0F); this.model.heldItem = entity.getHeldItem() != null ? 1 : 0; } public void doRenderLiving(EntityLiving par1EntityLiving, double par2, double par4, double par6, float par8, float par9) { renderGo((EntityGoblin)par1EntityLiving, par2, par4, par6, par8, par9); } public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9) { renderGo((EntityGoblin)par1Entity, par2, par4, par6, par8, par9); } @Override protected ResourceLocation getEntityTexture(Entity var1) { return new ResourceLocation("agecraft" + ":textures/entities/" + "Goblin" + ".png"); } protected void renderEquippedItems(EntityLiving par1EntityLiving, float par2) { GL11.glColor3f(1.0F, 1.0F, 1.0F); super.renderEquippedItems(par1EntityLiving, par2); ItemStack itemstack = par1EntityLiving.getHeldItem(); Item item; float f1; if (itemstack != null && itemstack.getItem() != null) { item = itemstack.getItem(); GL11.glPushMatrix(); this.model.rightarm.postRender(0.0625F); GL11.glTranslatef(-0.0625F, 0.4375F, 0.0625F); if (item.isFull3D()) { f1 = 0.625F; if (item.shouldRotateAroundWhenRendering()) { GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F); GL11.glTranslatef(0.0F, -0.125F, 0.0F); } this.func_82422_c(); GL11.glScalef(f1, -f1, f1); GL11.glRotatef(-100.0F, 1.0F, 0.0F, 0.0F); GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F); } else { f1 = 0.375F; GL11.glTranslatef(0.25F, 0.1875F, -0.1875F); GL11.glScalef(f1, f1, f1); GL11.glRotatef(60.0F, 0.0F, 0.0F, 1.0F); GL11.glRotatef(-90.0F, 1.0F, 0.0F, 0.0F); GL11.glRotatef(20.0F, 0.0F, 0.0F, 1.0F); } float f2; float f3; int i; if (itemstack.getItem().requiresMultipleRenderPasses()) { for (i = 0; i < itemstack.getItem().getRenderPasses(itemstack.getItemDamage()); ++i) { int j = itemstack.getItem().getColorFromItemStack(itemstack, i); f2 = (float)(j >> 16 & 255) / 255.0F; f3 = (float)(j >> 8 & 255) / 255.0F; float f4 = (float)(j & 255) / 255.0F; GL11.glColor4f(f2, f3, f4, 1.0F); this.renderManager.itemRenderer.renderItem(par1EntityLiving, itemstack, i); } } else { i = itemstack.getItem().getColorFromItemStack(itemstack, 0); float f5 = (float)(i >> 16 & 255) / 255.0F; f2 = (float)(i >> 8 & 255) / 255.0F; f3 = (float)(i & 255) / 255.0F; GL11.glColor4f(f5, f2, f3, 1.0F); this.renderManager.itemRenderer.renderItem(par1EntityLiving, itemstack, 0); } GL11.glPopMatrix(); } } protected void renderEquippedItems(EntityLivingBase par1EntityLivingBase, float par2) { this.renderEquippedItems((EntityLiving)par1EntityLivingBase, par2); } protected void func_82422_c() { GL11.glTranslatef(0.0F, 0.1875F, 0.0F); } }
  8. Just followed the instructions to create a workspace. Needed to do the advanced setup. 'Run Client' is not working good. Client crashes. I followed the instructions like in the initial setup This is the Log: [21:07:32] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker [21:07:32] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker [21:07:32] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker [21:07:32] [main/INFO] [FML]: Forge Mod Loader version 7.2.172.1073 for Minecraft 1.7.2 loading [21:07:32] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.7.0_25, running on Windows 7:amd64:6.1, installed at C:\Program Files\Java\jre7 [21:07:32] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation [21:07:32] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [21:07:32] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker [21:07:32] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [21:07:32] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [21:07:32] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper [21:07:32] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work! [21:07:34] [main/ERROR] [FML]: The minecraft jar file:/C:/Users/pieter/.gradle/caches/minecraft/net/minecraftforge/forge/1.7.2-10.12.1.1073/forgeSrc-1.7.2-10.12.1.1073.jar!/net/minecraft/client/ClientBrandRetriever.class appears to be corrupt! There has been CRITICAL TAMPERING WITH MINECRAFT, it is highly unlikely minecraft will work! STOP NOW, get a clean copy and try again! [21:07:34] [main/ERROR] [FML]: FML has been ordered to ignore the invalid or missing minecraft certificate. This is very likely to cause a problem! [21:07:34] [main/ERROR] [FML]: Technical information: ClientBrandRetriever was at jar:file:/C:/Users/pieter/.gradle/caches/minecraft/net/minecraftforge/forge/1.7.2-10.12.1.1073/forgeSrc-1.7.2-10.12.1.1073.jar!/net/minecraft/client/ClientBrandRetriever.class, there were 0 certificates for it [21:07:34] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing [21:07:34] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper [21:07:34] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker [21:07:35] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main} [21:07:37] [main/ERROR] [LaunchWrapper]: Unable to launch java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_25] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_25] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_25] at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?] Caused by: java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) ~[?:1.7.0_25] at java.lang.Runtime.loadLibrary0(Unknown Source) ~[?:1.7.0_25] at java.lang.System.loadLibrary(Unknown Source) ~[?:1.7.0_25] at org.lwjgl.Sys$1.run(Sys.java:73) ~[lwjgl-2.9.0.jar:?] at java.security.AccessController.doPrivileged(Native Method) ~[?:1.7.0_25] at org.lwjgl.Sys.doLoadLibrary(Sys.java:66) ~[lwjgl-2.9.0.jar:?] at org.lwjgl.Sys.loadLibrary(Sys.java:95) ~[lwjgl-2.9.0.jar:?] at org.lwjgl.Sys.<clinit>(Sys.java:112) ~[lwjgl-2.9.0.jar:?] at net.minecraft.client.Minecraft.getSystemTime(Minecraft.java:2690) ~[Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:40) ~[Main.class:?] ... 6 more
  9. Could you give me an example of some code I could ue to check a url on a website.
  10. I knew that, but the only queation is how. Which class checks this. The player needs to log on to minecraft and then it will check if the string in the file is the same or not the same as your current mod version. HOW?
  11. I want to have a mod update detector in my mod. but I have no clue what to do. I saw some posts on other sites, but they are outdated. It said I needed to implement IConnectionHandler, this does not excist. Can anyone help me. not only me but also others who what this system.
  12. use SetRotationAngles for this. just do something like this in that methode: this.shape.rotateAngleZ = 2.0F You might wanna look into this section of the class. just take a look at the ModelBiped.class and you'll figure it out!
  13. Just used an older one. something went wrong there. Thank you for the help!
  14. You're right. Everything is registered as it was in 1.6. It worked then! This is the ClientProxy public class ClientProxy extends CommonProxy { public static int renderID; public static int renderPass = 0; @Override public void registerRenderers() { renderID = RenderingRegistry.getNextAvailableRenderId(); RenderingRegistry.registerBlockHandler(new RenderBarrel()); RenderingRegistry.registerEntityRenderingHandler(EntityAdvancedMob.class, new RenderAdvancedMob(new ModelBiped(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityGiant.class, new RenderGiant(new ModelBiped(), 0.5F, 1.5F)); //more registers, but not needed for topic. } } This is the BlockBarrel. public class BlockBarrel extends Block { @SideOnly(Side.CLIENT) private static IIcon field_94378_a; @SideOnly(Side.CLIENT) private IIcon cauldronTopIcon; @SideOnly(Side.CLIENT) private static IIcon cauldronBottomIcon; public BlockBarrel() { super(Material.wood); this.setStepSound(Block.soundTypeWood); } @SideOnly(Side.CLIENT) public IIcon getIcon(int p_149691_1_, int p_149691_2_) { return p_149691_1_ == 1 ? this.cauldronBottomIcon : (p_149691_1_ == 0 ? this.cauldronBottomIcon : this.blockIcon); } @SideOnly(Side.CLIENT) public IIcon getIcon(IBlockAccess p_149673_1_, int p_149673_2_, int p_149673_3_, int p_149673_4_, int p_149673_5_) { if (p_149673_5_ == 1) { return this.cauldronBottomIcon; } else if (p_149673_5_ == 0) { return this.cauldronBottomIcon; } else { return this.blockIcon; } } @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister par1IconRegister) { this.field_94378_a = par1IconRegister.registerIcon("agecraft:Barrel Inner"); this.cauldronTopIcon = par1IconRegister.registerIcon("agecraft:Barrel Top"); this.cauldronBottomIcon = par1IconRegister.registerIcon("agecraft:Barrel Bottom"); this.blockIcon = par1IconRegister.registerIcon("agecraft:Barrel Side"); } @SideOnly(Side.CLIENT) public static IIcon getCauldronIcon(String p_150026_0_) { return p_150026_0_.equals("inner") ? field_94378_a : (p_150026_0_.equals("bottom") ? cauldronBottomIcon : null); } public boolean renderAsNormalBlock() { return false; } public boolean isOpaqueCube() { return false; } @Override public int getRenderBlockPass() { return ClientProxy.renderID; } /** * Called upon block activation (right click on the block.) */ public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) { if (par1World.isRemote) { return true; } else { ItemStack itemstack = par5EntityPlayer.inventory.getCurrentItem(); if (itemstack == null) { return true; } else { int i1 = par1World.getBlockMetadata(par2, par3, par4); int j1 = func_111045_h_(i1); if (itemstack.getItem() == AgeCraft.Grape) { if (j1 < 3) { if (!par5EntityPlayer.capabilities.isCreativeMode) { par5EntityPlayer.inventory.setInventorySlotContents(par5EntityPlayer.inventory.currentItem, new ItemStack(Items.bucket)); } this.func_150024_a(par1World, par2, par3, par4, 3); } return true; } /*TODO if (itemstack.itemID == Item.appleRed.itemID) { if (j1 > 3 && j1 <= 6) { par1World.setBlockMetadataWithNotify(par2, par3, par4, 6, 2); par1World.func_96440_m(par2, par3, par4, this.blockID); } return true; }*/ else { if (itemstack.getItem() == AgeCraft.Empty_WineBottle) { if (j1 > 0 && j1 <= 3) { ItemStack itemstack1 = new ItemStack(AgeCraft.Full_WineBottle); if (!par5EntityPlayer.inventory.addItemStackToInventory(itemstack1)) { par1World.spawnEntityInWorld(new EntityItem(par1World, (double)par2 + 0.5D, (double)par3 + 1.5D, (double)par4 + 0.5D, itemstack1)); } else if (par5EntityPlayer instanceof EntityPlayerMP) { ((EntityPlayerMP)par5EntityPlayer).sendContainerToPlayer(par5EntityPlayer.inventoryContainer); } --itemstack.stackSize; if (itemstack.stackSize <= 0) { par5EntityPlayer.inventory.setInventorySlotContents(par5EntityPlayer.inventory.currentItem, (ItemStack)null); } this.func_150024_a(par1World, par2, par3, par4, 0); } } return true; } } } } public void addCollisionBoxesToList(World p_149743_1_, int p_149743_2_, int p_149743_3_, int p_149743_4_, AxisAlignedBB p_149743_5_, List p_149743_6_, Entity p_149743_7_) { this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.3125F, 1.0F); super.addCollisionBoxesToList(p_149743_1_, p_149743_2_, p_149743_3_, p_149743_4_, p_149743_5_, p_149743_6_, p_149743_7_); float f = 0.125F; this.setBlockBounds(0.0F, 0.0F, 0.0F, f, 1.0F, 1.0F); super.addCollisionBoxesToList(p_149743_1_, p_149743_2_, p_149743_3_, p_149743_4_, p_149743_5_, p_149743_6_, p_149743_7_); this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, f); super.addCollisionBoxesToList(p_149743_1_, p_149743_2_, p_149743_3_, p_149743_4_, p_149743_5_, p_149743_6_, p_149743_7_); this.setBlockBounds(1.0F - f, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); super.addCollisionBoxesToList(p_149743_1_, p_149743_2_, p_149743_3_, p_149743_4_, p_149743_5_, p_149743_6_, p_149743_7_); this.setBlockBounds(0.0F, 0.0F, 1.0F - f, 1.0F, 1.0F, 1.0F); super.addCollisionBoxesToList(p_149743_1_, p_149743_2_, p_149743_3_, p_149743_4_, p_149743_5_, p_149743_6_, p_149743_7_); this.setBlockBoundsForItemRender(); } public void onEntityCollidedWithBlock(World p_149670_1_, int p_149670_2_, int p_149670_3_, int p_149670_4_, Entity p_149670_5_) { int l = func_150027_b(p_149670_1_.getBlockMetadata(p_149670_2_, p_149670_3_, p_149670_4_)); float f = (float)p_149670_3_ + (6.0F + (float)(3 * l)) / 16.0F; if (!p_149670_1_.isRemote && p_149670_5_.isBurning() && l > 0 && p_149670_5_.boundingBox.minY <= (double)f) { p_149670_5_.extinguish(); this.func_150024_a(p_149670_1_, p_149670_2_, p_149670_3_, p_149670_4_, l - 1); } } public static int func_150027_b(int p_150027_0_) { return p_150027_0_; } public void setBlockBoundsForItemRender() { this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); } public void func_150024_a(World world, int par1, int par2, int par3, int par4) { world.setBlockMetadataWithNotify(par1, par2, par3, MathHelper.clamp_int(par4, 0, 3), 2); world.func_147453_f(par1, par2, par3, this); } /** * If this returns true, then comparators facing away from this block will use the value from * getComparatorInputOverride instead of the actual redstone signal strength. */ public boolean hasComparatorInputOverride() { return true; } /** * If hasComparatorInputOverride returns true, the return value from this is used instead of the redstone signal * strength when this block inputs to a comparator. */ public int getComparatorInputOverride(World par1World, int par2, int par3, int par4, int par5) { int i1 = par1World.getBlockMetadata(par2, par3, par4); return func_111045_h_(i1); } public static int func_111045_h_(int par0) { return par0; } @SideOnly(Side.CLIENT) public static float getRenderLiquidLevel(int p_150025_0_) { int j = MathHelper.clamp_int(p_150025_0_, 0, 3); return (float)(6 + 3 * j) / 16.0F; } }
  15. Could anyone help me with this, I hae tried mny things, but they all failed. Does anyone has another option of solving this?
  16. I working on a block with the same propreties of the cauldron. It works fine, the rightclicking stuff, but it is not rendering. I just renders the hitbox/collisionboxes of the block, but no caudron. I just using the same code as the cauldron renderer in the renderBlocks file. I'm using an ISimpleBlockRenderingHandler. this is the code I use: public class RenderBarrel implements ISimpleBlockRenderingHandler { @Override public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) { } @Override public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) { return this.renderWorldBlock(world, x, y, z, (BlockBarrel)block, modelId, renderer); } public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, BlockBarrel block, int modelId, RenderBlocks renderer) { if(ClientProxy.renderPass == 0) { renderer.renderStandardBlock(block, x, y, z); Tessellator tessellator = Tessellator.instance; tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z)); float f = 1.0F; int l = block.colorMultiplier(world, x, y, z); float f1 = (float)(l >> 16 & 255) / 255.0F; float f2 = (float)(l >> 8 & 255) / 255.0F; float f3 = (float)(l & 255) / 255.0F; float f4; if (EntityRenderer.anaglyphEnable) { float f5 = (f1 * 30.0F + f2 * 59.0F + f3 * 11.0F) / 100.0F; f4 = (f1 * 30.0F + f2 * 70.0F) / 100.0F; float f6 = (f1 * 30.0F + f3 * 70.0F) / 100.0F; f1 = f5; f2 = f4; f3 = f6; } tessellator.setColorOpaque_F(f * f1, f * f2, f * f3); IIcon icon = block.getBlockTextureFromSide(2); f4 = 0.125F; renderer.renderFaceXPos(block, (double)((float)x - 1.0F + f4), (double)y, (double)z, icon); renderer.renderFaceXNeg(block, (double)((float)x + 1.0F - f4), (double)y, (double)z, icon); renderer.renderFaceZPos(block, (double)x, (double)y, (double)((float)z - 1.0F + f4), icon); renderer.renderFaceZNeg(block, (double)x, (double)y, (double)((float)z + 1.0F - f4), icon); IIcon icon1 = BlockBarrel.getCauldronIcon("inner"); renderer.renderFaceYPos(block, (double)x, (double)((float)y - 1.0F + 0.25F), (double)z, icon1); renderer.renderFaceYNeg(block, (double)x, (double)((float)y + 1.0F - 0.75F), (double)z, icon1); int i1 = world.getBlockMetadata(x, y, z); if (i1 > 0) { IIcon icon2 = BlockLiquid.getLiquidIcon("water_still"); if (i1 > 3) { i1 = 3; } f = 1.0F; l = 0xe50000; f1 = (float)(l >> 16 & 255) / 255.0F; f2 = (float)(l >> 8 & 255) / 255.0F; f3 = (float)(l & 255) / 255.0F; if (EntityRenderer.anaglyphEnable) { float f5 = (f1 * 30.0F + f2 * 59.0F + f3 * 11.0F) / 100.0F; f4 = (f1 * 30.0F + f2 * 70.0F) / 100.0F; float f6 = (f1 * 30.0F + f3 * 70.0F) / 100.0F; f1 = f5; f2 = f4; f3 = f6; } tessellator.setColorOpaque_F(f * f1, f * f2, f * f3); renderer.renderFaceYPos(block, (double)x, (double)((float)y - 1.0F + (6.0F + (float)i1 * 3.0F) / 16.0F), (double)z, icon2); } } else { renderer.renderStandardBlock(Main.BarrelBlock, x, y, z); } return true; } @Override public int getRenderId() { return ClientProxy.renderID; } @Override public boolean shouldRender3DInInventory(int modelId) { return false; } }
  17. This is normal. This happen when the computer need to calculate the position of the texture on the same position. The computer can't. it is constantly trying to get one side to be visible. If you stop rotating the screen, you can see is does not glitch. Simply because the computer does not need to calculate the position. solution: shrink one side (face) to 99.999%, just a bit smaller. and voila, solved. but is that possible in minecraft?
  18. Yes, I did that, but it still does not work. Look, this is the guihandler I use. public class GuiHandler implements IGuiHandler { @Override public Object getServerGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) { switch(id){ case 0: return new ContainerShield(player.inventory, (TileEntityShield) world.getTileEntity(x, y, z)); } return null; } @Override public Object getClientGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) { switch(id){ case 0: return new GuiShield(player.inventory, (TileEntityShield) world.getTileEntity(x, y, z)); } return null; } }
  19. does anybody know what to do with this, cause I have absolutly no clue.
  20. This is just a 1.6 code I used for a mod back in the old days. I have not tested it in 1.7, but you can modify it and make it into what you need. These methodes can make it multi layer (in 1.6) public class PotionSword extends ItemSword{ Random rand = new Random(); private Icon sword; private Icon overlay; public PotionSword(int id, int pot, int length, EnumToolMaterial mat) { super(id, mat); potionID = pot; Length = length; Mat = mat; this.setCreativeTab(Core.tabBlades); this.setUnlocalizedName(getTexture() + "_" + potion[potionID]); } private String getTexture() { if(this.Mat == EnumToolMaterial.WOOD){ return "wood_sword";} if(this.Mat == EnumToolMaterial.STONE){ return "stone_sword";} if(this.Mat == EnumToolMaterial.IRON){ return "iron_sword";} if(this.Mat == EnumToolMaterial.GOLD){ return "gold_sword";} if(this.Mat == EnumToolMaterial.EMERALD){ return "diamond_sword";} else{ return "wood_sword";} } @Override public Icon getIconFromDamageForRenderPass(int damage, int pass) { if(pass == 0) { return this.sword; } else { return this.overlay; } } @SideOnly(Side.CLIENT) public boolean requiresMultipleRenderPasses() { return true; } @Override public void registerIcons(IconRegister i) { this.sword = i.registerIcon(this.getTexture()); this.overlay = i.registerIcon(Core.getModid() + ":" + "overlay_" + potion[potionID]); } } I hoped this helped you out,
  21. just import the BlockFurnace. then look at that code. use that to make your own code. delete the import for BlockFurnace. This is the best methode to mimic Block of vanilla Minecraft.
  22. this is the code needed for the toolMaterial. public static final Item.ToolMaterial gemRed = EnumHelper.addToolMaterial("gemRed", 3, 512, 10.0F, 8.0F, 5); This works fine for me.
  23. Yes I did! First take a look at your code: public crystalrevolution() { // smelting GameRegistry.addSmelting(OreCrystal, new ItemStack(Crystal), 5.0F); // Blocks GameRegistry.registerBlock(OreCrystal, "OreCrystal"); // Items GameRegistry.registerItem(Crystal, "Crystal"); } Take a look at the modified code public crystalrevolution() { // Blocks GameRegistry.registerBlock(OreCrystal, "OreCrystal"); // Items GameRegistry.registerItem(Crystal, "Crystal"); // smelting GameRegistry.addSmelting(OreCrystal, new ItemStack(Crystal), 5.0F); } The Crystal and the OreCrystal are first registered by the GameRegistry and then it can be used by other methodes like the addSmelting(). you can't do a addRecipe() before registerItem / Block either.
  24. Firt you need to register the block and the item, otherwise the game will not reconize them.
  25. I was working on my mod, getting it from 1.6 to 1.7. I solved all the errors, but it still does not work It has an gui on it, but right clicking does nog work. I have a custom renderer on it, but it does not work. This is the code from the Block: Here is the code for tthe renderer. Trust me, it is initialized in the main class, the clientproxy class, the guihandler class. This is bassicly a rendere with only items attached to it. (entityItems) I hope you can give me more info on the problem. If these file are not the one you want, I can post others too. thanks in advance

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.