Jump to content

Mew

Members
  • Posts

    567
  • Joined

  • Last visited

Everything posted by Mew

  1. 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.
  2. 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...
  3. 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
  4. 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.
  5. 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...
  6. World Generation files are cross-compatible. They work on either or
  7. 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...
  8. BUMP And can you give me an example?
  9. 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)); }
  10. 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.
  11. Right. Ok, I don't then... All I know is that mine works
  12. its in his 1.3.2 tutorials. Try them
  13. hmm.... Maybe try keeping more of there code?
  14. Wuppy29* But yeah, there is that too
  15. 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.
  16. 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...
  17. 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...
  18. 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.
  19. 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
  20. Your welcome for what help i HAVE given you, thank theinstitutions for the rest
  21. 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
  22. Try putting your mods folder in /mcpFolder/eclipse/bin/ but it in that directory (mcpFolder being wherever it happens to be).
  23. 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.
  24. 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
×
×
  • Create New...

Important Information

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