Everything posted by CJLetsGame
-
[1.6.4]Fortune Doesn't Affect Custom Ore [*SOLVED*]
No probs.
-
[1.6.4] My mod loads half of the modifications...
Did you really expect good results from modifying base classes? Or mod compatibility for that matter?
-
[1.6.4] Block not Registering.
Is the block just not in the tab, or is the tab not there at all. It would help if you initialized the tab BEFORE assigning the block to it...
-
Wrong name in creative menu [1.7.2]
put the entire assets folder inside the zip for your mod.
-
[1.6.4]Subscript in item name
He already told you where to look. As for if it will actually work or not, test it for yourself and find out.
-
1.6.4 nether ore gen
System.out.println("Ore: " + Xcoord + "," + Ycoord + "," + Zcoord); place it right before the call to WorldGenMineable.
-
1.6.4 nether ore gen
Your for loop is only running twice per chunk. Try going from 0 to 10 or so. Also, do what diesieben suggested and print the locations the ore is spawning to the console to see if it is spawning at all and where to look.
-
[1.6.4] Shift + click doubles my items
public ItemStack decrStackSize(int par1, int par2) { if (this.furnaceItemStacks[par1] != null) { ItemStack itemstack; if (this.furnaceItemStacks[par1].stackSize <= par2) { itemstack = this.furnaceItemStacks[par1]; this.furnaceItemStacks[par1] = null; return itemstack; } else { itemstack = this.furnaceItemStacks[par1].splitStack(par2); if (this.furnaceItemStacks[par1].stackSize == 0) { this.furnaceItemStacks[par1] = null; } return itemstack; } } else { return null; } } Im not sure why you didnt just use the furnace tile entity as reference... The above is from the furnace.
-
Problem with Text and Texured Rectangle
Why did you set the last parameter to draw the text 0? That's supposed to be the color. of the text.
-
[1.6.4] Shift + click doubles my items
He means post YOUR code. Even if you copied the tutorial, we need to see your code.
-
Cure Potion Effects with Item
It'll also let you know when the function your trying to use doesn't match the function that exists. That's what I said.
-
Cure Potion Effects with Item
The @Override annotation doesnt do anything major. It is useful if you update and the names of base methods change because it will be marked with an error, letting you know to change the method name.
-
1.6.4 How Do i add 2 GuiHandler
Like i said... In the getServerGuiElement, it has to return containers like you are doing now. However, the cient one needs to return GUIS. Right now you are returning the containers. Containers are handled server-side only. Guis are client only.
-
1.6.4 How Do i add 2 GuiHandler
Hmm its still casting a container to a gui... Both returns HAVE to be a container in the server. Both have to be a gui in the client.
-
1.6.4 How Do i add 2 GuiHandler
can I see the code for the Macerator gui?
-
1.6.4 How Do i add 2 GuiHandler
for the client element case MainRegistry.guiIdDarkIronFurance: if (entity instanceof TileEntityDarkIronFurnace) { return new DarkIronFurnaceContainer(player.inventory, (TileEntityDarkIronFurnace) entity); } It should be returning a gui not a container
-
1.6.4 How Do i add 2 GuiHandler
post the console output. I need an error to work with.
-
[1.5.2.] Unknown Imports
Ignoring how suspicious that sounds, what code could you have possibly needed so bad that you had to look at someone elses compiled code instead of: A.) Working it out yourself B.) Asking for help C.) Looking at examples already inside the Minecraft code. Trust me, you will get much more satisfaction from doing your own work than copying code from someone else. As for renaming imports though, its a matter of trial and error really. You might get lucky and guess a few. For example if its a block class one of the imports is probably net.minecraft.blocks.block...
-
1.6.4 How Do i add 2 GuiHandler
you need to add a break after each case like this: switch (id) { case MainRegistry.guiIdMacerator: if (entity instanceof TileEntityMacerator) { return new ContainerMacerator(player.inventory, (TileEntityMacerator) entity); break; } case MainRegistry.guiIdDarkIronFurance: { if (entity instanceof TileEntityDarkIronFurnace) { return new DarkIronFurnaceContainer(player.inventory, (TileEntityDarkIronFurnace) entity); } break; } return null; default: return null; } } Otherwise it would just fall through all the cases whether they matched or not. Kind of like an OR in an If/Then statement
-
1.6.4 How Do i add 2 GuiHandler
Add more cases to the switch statement. Dont forget to add breaks at the end of each case though.
-
1.6.4 How Do i add 2 GuiHandler
You can handle both within the same handler Example: public class GuiHandler implements IGuiHandler{ @Override public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { TileEntity tile_entity = world.getBlockTileEntity(x, y, z); int BlockID = world.getBlockId(x, y, z); int Meta = world.getBlockMetadata(x, y, z); if (ID == 1) { return new ContainerWorkbenchClone(player.inventory,player.worldObj); } //Logger.getLogger("CJTECH").log(Level.INFO, "GUI Block Id: " + BlockID); //Logger.getLogger("CJTECH").log(Level.INFO, "GUI Block Meta: " + Meta); if (BlockID == Blocks.blockMachine.blockID) { return new ContainerMachine(player.inventory, (TileEntityMachine) tile_entity); } if (BlockID == Blocks.blockPowerStorage.blockID) { return new ContainerPowerStorage(player.inventory, (TileEntityPowerStorage) tile_entity); } if (BlockID == Blocks.blockColliderController.blockID){ return new ContainerCollider(player.inventory, (TileEntityCollider) tile_entity); } if (BlockID == Blocks.blockMultiFurnace.blockID){ return new ContainerMultiFurnace(player.inventory, (TileEntityMBFurnace) tile_entity); } if (BlockID == Blocks.blockEnderNetTerminal.blockID) { if (Meta == 1) { return new ContainerEnderNetItemTerminal(player, new EnderNetItemPage((TileEntityEnderNetTerminal) tile_entity, 0)); } } if (BlockID == Blocks.blockItemTransport.blockID) { if (Meta == 4) { return new ContainerTransportSorter(player.inventory, (ItemTransportBase) tile_entity); } } if (BlockID == Blocks.blockResearchTable.blockID) { return new ContainerResearchTable(player.inventory, (TileEntityResearchTable) tile_entity); } return null; } @Override public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { TileEntity tile_entity = world.getBlockTileEntity(x, y, z); int BlockID = world.getBlockId(x, y, z); int Meta = world.getBlockMetadata(x, y, z); if (ID == 1) { return new guiCraftingClone(player.inventory, player.worldObj); } if (ID == 2) { return new guiResearchBook(player, player.worldObj); } if (BlockID == Blocks.blockMachine.blockID) { switch (Meta) { case 0: return new guiPoweredFurnace(player.inventory, (TileEntityMachine) tile_entity); case 1: return new guiPoweredFurnace(player.inventory, (TileEntityMachine) tile_entity); case 2: return new guiPoweredGrinder(player.inventory, (TileEntityMachine) tile_entity); case 3: return new guiPoweredGrinder(player.inventory, (TileEntityMachine) tile_entity); case 4: return new guiCompressor(player.inventory, (TileEntityMachine) tile_entity); case 5: return new guiCompressor(player.inventory, (TileEntityMachine) tile_entity); } } if (BlockID == Blocks.blockPowerStorage.blockID) { Logger.getLogger("CJTECH").log(Level.INFO, "Block is Power Storage"); switch (Meta) { case 0: return new guiSmallPowerBox(player.inventory, (TileEntityPowerStorage) tile_entity); case 1: return new guiSmallPowerBox(player.inventory, (TileEntityPowerStorage) tile_entity); case 2: return new guiMediumPowerBox(player.inventory, (TileEntityPowerStorage) tile_entity); case 3: return new guiMediumPowerBox(player.inventory, (TileEntityPowerStorage) tile_entity); case 4: return new guiLargePowerBox(player.inventory, (TileEntityPowerStorage) tile_entity); case 5: return new guiLargePowerBox(player.inventory, (TileEntityPowerStorage) tile_entity); case 6: return new guiHugePowerBox(player.inventory, (TileEntityPowerStorage) tile_entity); case 7: return new guiHugePowerBox(player.inventory, (TileEntityPowerStorage) tile_entity); } } if (BlockID == Blocks.blockColliderController.blockID) { return new guiCollider(player.inventory, (TileEntityCollider) tile_entity); } if (BlockID == Blocks.blockTDTeleporter.blockID) { return new guiTDTeleporter(player, (TileEntityTDTeleporter) tile_entity, tile_entity.worldObj); } if (BlockID == Blocks.blockMultiFurnace.blockID) { return new guiMultiFurnace(player.inventory, (TileEntityMBFurnace) tile_entity); } if (BlockID == Blocks.blockEnderNetTerminal.blockID) { if (Meta == 0) return new guiENetPowerTerminal(player, (TileEntityEnderNetTerminal) tile_entity); if (Meta == 1) return new guiENetItemTerminal(player, (TileEntityEnderNetTerminal) tile_entity, 0); } if (BlockID == Blocks.blockItemTransport.blockID) { if (Meta == 4) return new guiTransportSort(player.inventory, (ItemTransportBase) tile_entity); } if (BlockID == Blocks.blockResearchTable.blockID) { if (Meta == 0) return new guiBasicResearchTable(player.inventory, (TileEntityResearchTable) tile_entity); } return null; } } You can either do it by checking the block id and meta like I did, or by the gui ID you pass into the handler when you open a gui.
-
Cure Potion Effects with Item
In the cure method, it checks the itemstack you pass in with the curing item of each potion effect. In other words, the effects have no clue you want your item to be a cure. Try passing in an itemstack of a bucket of milk instead EDIT: Or copy the code in the cure method and alter it if you want to target specific effects
-
UN-TEXTURED UN-NAMED BLOCK. SIMPLE QUESTION?
Change your registers to: GameRegistry.registerBlock(snowstormBlock, "snowstormBlock"); LanguageRegistry.addName(snowstormBlock, "Blanket"); You should also give the block a unlocalized name public BlockSnowstormBlock(int id, Material mat) { super(id, mat); this.setCreativeTab(CreativeTabs.tabBlock); this.setUnlocalizedName("snowtormBlock"); }
-
UN-TEXTURED UN-NAMED BLOCK. SIMPLE QUESTION?
The following should work public class BlockSnowstormBlock extends Block{ public BlockSnowstormBlock(int id, Material mat) { super(id, mat); this.setCreativeTab(CreativeTabs.tabBlock); } public registerIcon (IconRegister icon){ this.blockIcon = icon.registerIcon("Snowstorm:blanket"); } }
-
UN-TEXTURED UN-NAMED BLOCK. SIMPLE QUESTION?
same error or different?
IPS spam blocked by CleanTalk.