Everything posted by Mew
-
How to use NBT
Basically you have to let it get passed from a vanilla class, or get it from an existing entity (server side only). Or you can use IExtendedProperties (basically getting data from an existing entity, but more complicated and not depreciated) or extend WordSaveData Its actually IExtendedEntityProperties incase there is a mix up IExtendedEntityProperties isn't that hard to mess around with, its actually quite good.
-
Ghost entity when I spawn entity [FIXED]
Packets are generally a good idea to sync the server and client. Which seems to be the case here. If there is a "ghost entity" that would be (I think) the server thinking there is an entity there, but the actual client is making the entity without letting the server know the entity is made... Just a plain ole me rambling on This may or may not be the case...
-
Gui Closes Right Away
Does your CommonProxy implement IGuiHandler? If it doesn't, make it extend that. When you implement IGuiHandler you will get these methods that are needed: @Override public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { return null; } @Override public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { return guiHandler.getServerGuiElement(ID, player, world, x, y, z); } You will get an error under guiHandler, to fix that BEFORE you have any methods add this: public GuiHandler guiHandler = new GuiHandler(); Thats your CommonProxy done. Now for the ClientProxy I have made an Enum called EnumGui which holds all the ID's for my GUI's. I would suggest you do the same. So in your ClientProxy you need to add this method: @Override public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { return null; } At the time being, there are no GUI's in it. To add a GUI using the EnumGui (for example) make the method look something like this: @Override public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { if (ID == EnumGui.ChooseClass.getIndex()) return new GuiChooseClass(); else if (ID == EnumGui.LoreStartingPage.getIndex()) return new GuiLoreStartingPage(); // for more GUI's do stuff like this: // else if (ID == EnumGui.NameOfGuiInEnum.getIndex()) return new GuiNameOfGui(); return null; } Hope that helps
-
Ghost entity when I spawn entity [FIXED]
Use a packet. Make that packet spawn the entity server side. Though I am questioning if it should be server side. If it needs to be server side, then use a packet.
-
[1.5.2]Configuration Files
Actually, the maximum ID that can be used is 31999. There is support for item ID's up to 31999. Or was 32000? One of those...
-
Generating a world gen structure
World Generation files are cross-compatible. They work on either or
-
Severe Inventory Glitch - Server/Client desync?
Have you tried making a packet to sync the client with the server? That may help Or is it vanilla tile-entities? Then I don't whats wrong...
-
Reading string from PlayerInformation (extends IExtendedEntityProperties)
BUMP And can you give me an example?
-
Giving an item on new world
Use a class that extends IConnectionHandler and use the playerLoggedIn() method. for example: @Override public void playerLoggedIn(Player player, NetHandler netHandler, INetworkManager manager) { (EntityPlayerMP) player.inventory.addItemStackToInventory(new ItemStack(Item.arrow,1)); }
-
How to use NBT
Thats a very, VERY horrible way of doing it. It ends up with your data being editable, no matter what extension. Therefore it does not work. What the NBT does is store the variables pretty much only in code. And yes I know there is the .dat file, but not many people bother with editing it, and if they do, they will have to edit it for mod specific data, otherwise they erase that data.
-
Registering/Using ITickHandler
Right. Ok, I don't then... All I know is that mine works
-
Generating a world gen structure
its in his 1.3.2 tutorials. Try them
-
Registering/Using ITickHandler
hmm.... Maybe try keeping more of there code?
-
Generating a world gen structure
Wuppy29* But yeah, there is that too
-
Registering/Using ITickHandler
Haha.... Oops. I missed that I'm not sure why, could you show what you do have? I know you have to have a picture that needs to be drawn onto the screen. I am just not quite sure, wait. Did you get rid of the if statement in front of all the code in the drawing method? I know you most likely have, but its good to be sure... And if you can post the code, I can compare it to mine.
-
Generating a world gen structure
Hmm.. While I look at the Vanilla code, I would suggest using world.setBlock() and make your own replica of a village! Im looking through the vanilla code now and it is a little confusing...
-
Registering/Using ITickHandler
All I know is that you have to register it... like so: MinecraftForge.EVENT_BUS.register(new HudOverlayHandler()); thats keeping to the questology code. Register this wherever you want it to I guess...
-
energy framework-esque thing won't work and i can't figure out why it won't work
see? I told you
-
Entity wont load textures
you use netbeans? Then unarchive the minecraft.jar and put the mods folder in there (the minecraft.jar is located in /mcpFolder/jars/bin/ incase you didn't know). then rearchive it (or not depending.) try that.
-
Generating a world gen structure
Yeah that one will do. But you only need to worry about the WorldGen file. The rest is not really that relavent to what you are doing. But its good to know anyway
-
Generating a world gen structure
Your welcome for what help i HAVE given you, thank theinstitutions for the rest
-
How to use NBT
WorldSaveData is where the world data is saved yes And there is an interface that adds world data, its like IExtendedEntityProperties except for World data instead
-
Entity wont load textures
Try putting your mods folder in /mcpFolder/eclipse/bin/ but it in that directory (mcpFolder being wherever it happens to be).
-
Registering/Using ITickHandler
I don't quite get what you mean, but try looking through the Questology repo. Mainly the HUDOverlayHandler class (something like that) in the client package and some other ones that I can't remember at the time being... I know its some sort of tick handler.
-
Generating a world gen structure
Go on youtube and search how to make structures. Especially the tutorial by theinstitutions. He shows you how to do structure generation and such. Then all you have to do is find the places where specific parts of the village you want and past it into the generate() method in the world gen file you create
IPS spam blocked by CleanTalk.