Everything posted by larsgerrits
-
[SOLVED][1.6.4] Gui Bar Not Saving
I think your problem is with the MAX value. You either need to save it using NBT, or don't initialize it in the constructor but directly when the field is made.
-
[SOLVED][1.6.4] Gui Bar Not Saving
That's because you never write to NBT and read from NBT. So override the methods public void writeToNBT(NBTTagCompound); and public void readFromNBT(NBTTagCompound); . In those method you want to write and read your values from the NBTTagCompound passed in. Be sure to call the super methods!
-
Second Custom Mob Is White Column!
That needs to go in the main class (i think the init method, not sure)
-
Second Custom Mob Is White Column!
EntityRegistry#addSpawn();
-
Second Custom Mob Is White Column!
- Advanced Model Loader Help
You can get a IModelCustom (or something like that) using AdvancedModelLoader.loadModel(ResourceLocation), on which you can call the renderAll method, which renders the model for you. You need to do all of that in a class that implements IItemRenderer.- Advanced Model Loader Help
http://www.minecraftforge.net/forum/index.php/topic,22405.0.html- Search for players around a tile entity
You can use World#getEntitiesWithinAABB(ENTITY_CLASS,BOUNDING_BOX). You can replace the ENTITY_CLASS with EntityPlayer.class for a player. For the BOUNDING_BOX, you can use TileEntity#getRenderBoundingBox().expand(RADIUS,RADIUS,RADIUS).- Overriding a vanilla menu?
You can use the GuiOpenEvent, in which you get a GuiScreen object. You can use that object to check if it's a instance of the vanilla menu (GuiMultiplayer in your case) and then set the GuiScreen object to your new class extending the vanilla menu, so it still looks like the main menu instead of remaking all of it.- How would I stop sheep from spawning
LivingSpawnEvent- Where is the code showing how the player travels back from the End?
I would probably look in the end portal block, and trace it back to where it actually teleports you.- [1.7.10] A Block that recreates after destoryed
So inefficient. You can 1) store the List<ItemStack> in the method. That way you don't need those repetetive calls to block.getDrops(*), and 2) you can iterate over a list way easier. You don't even need the if (1 == size) statement.- Can't move items in inventory using .displayGUIWorkbench
You can't open up the gui for the workbench that way. In the container class there's a method called canInteractWith that check's if there's a workbench at the location, which you managed to do with a dirty hack, and if the distance between the workbench and the player is less then 4 blocks away, which it isn't in your case, so it returns false so you can't interact with it. A workaround is making your own gui and container extending the vanilla classes, and modify them a bit to your likings, and open that one, istead of the vanilla one.- world.provider.dimensionId error
Can you post a screenshot if the switch statement with the error?- [SOLVED]@ForgeSubscribe not recognized and how to set player walking speed?
instanceof- How to get a nice name for a block?
I looked at the EnderIO github and in the en_US.lang file, instead of the reguler tile.*.name, they have enderio.*.name. That's the reason it doesn't work. Try using the block.getLocalizedName method.- Custom Rendered Block?
campFire.png != FirePitTexture.png- How to get a nice name for a block?
Show how you're using it. Preferably the whole method you use that class in.- [1.7.10] Draggable Gui/Button
You can override the mouseClickMove method, and in that method you can iterate over all the object on your screen, and if the mouse is over a object, update those x and y values to move them.- How to get a nice name for a block?
You can use StatCollector.translateToLocal() to localized the name.- Find Block Anywhere in World (or a workaround)
About the onEntityCollidedWithBlock ith block method: yes, the round-of values are thesame coords, but the posX,posY and posZ are doubles so they can be like 6.333, which means it's about a third on that coordinate, so you can be a bit more specific, In this case it might not be useful, but it could be for others.- [1.7.2] How to make custom Glass panes
You are using the GameRegistry.registerBlock with a null object. That's not a forge bug.- Screen Block
They use a custom renderer for the block rendering.- [1.7.2] Problem with Inventory in custom GUI
There's no max, just set it at the width of the gui.- [1.7.2] Problem with Inventory in custom GUI
You have the set the ySize correctly. - Advanced Model Loader Help
IPS spam blocked by CleanTalk.
Important Information
By using this site, you agree to our Terms of Use.