Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/14/18 in all areas

  1. Sure, do everything wrong. Just disregard our advice and do it your way. You're probably right afterall. Its not like you came here asking for help.
    2 points
  2. First: http://shouldiblamecaching.com/ Second: Go to the Eclipse marketplace and download the JSON Editor plugin. Edit your JSON files inside Eclipse, then Eclipse will know that they've changed.
    1 point
  3. yea no prob mate , best off luck to you .Let's hope you fix it. (fingers crossed)
    1 point
  4. well that's alot off work for me mate but to keep it simple (this is for the Client) switch(ID){//just switch the "GUI" id's and return the proper GUI class and that's it :p case Constante.guiRadio: if(tileentity instanceof TERadio){ return new GuiRadio(speler.inventory,speler,(TERadio)tileentity,wereld,x,y,z); } break; case Constante.guiJukeBox: if(tileentity instanceof TEjukeBox){ return new GuiJukeBox(speler.inventory,speler,(TEjukeBox)tileentity,wereld,x,y,z); } break; } throw new IllegalArgumentException("["+Constante.MODNAME+"] no Correct GUI ID : "+ID); and the server switch(ID){//the same but here you should return the container case Constante.guiRadio: if(tileentity instanceof TERadio){ return new ContainerRadio(speler.inventory,(TERadio)tileentity,speler); } break; case Constante.guiJukeBox: if(tileentity instanceof TEjukeBox){ return new ContainerRadio(speler.inventory,(TEjukeBox)tileentity,speler); } break; } throw new IllegalArgumentException("["+Constante.MODNAME+"] no Correct GUI ID "+ID);
    1 point
  5. haah normally nope :p, but these just handle you GUI's nothing more
    1 point
  6. good luck, but wait a sec i give you the needed stuff from scratch. public class R2S_GuiHandler implements IGuiHandler { public Object getClientGuiElement(int ID, EntityPlayer speler, World wereld,int x, int y, int z) { } public Object getServerGuiElement(int ID, EntityPlayer speler, World wereld, int x, int y, int z) { } these are the important method's
    1 point
  7. yea sure but i'm pretty sure you will have to change allot And normally no you don't have to change anything there.
    1 point
  8. yes that is correct i do this also
    1 point
  9. well if you have a Gui that has a "container" yea you will need that. wait a sec public class R2S_GuiHandler implements IGuiHandler { private GameSettings sets; /**test public void onKeyInput(InputEvent.KeyInputEvent event, EntityPlayer speler, World wereld,int x, int y, int z) { if(ToetsenBinden.pong.isPressed()) speler.openGui(R2S_UsefulBlocks.instance, 1, wereld, x, y, z); } **/ public enum GUIIDS{ guiRadio; } public Object getClientGuiElement(int ID, EntityPlayer speler, World wereld,int x, int y, int z) { TileEntity tileentity = wereld.getTileEntity(new BlockPos(x, y, z)); // speler.getPersistentID(); /**if(ToetsenBinden.inventaries.isPressed()){ System.out.println("test bctGuihandler guiharnas"); speler.openGui(R2S_UsefulBlocks.instance, Constante.guiHarnas, wereld, x, y, z);} **/ /*switch(GUIIDS.values()[ID]){ case guiRadio: if(tileentity instanceof TERadio){ return new GuiRadio(speler.inventory,(TERadio)tileentity); } }*/ switch(ID){ case Constante.guiRadio: if(tileentity instanceof TERadio){ return new GuiRadio(speler.inventory,speler,(TERadio)tileentity,wereld,x,y,z); } break; case Constante.guiJukeBox: if(tileentity instanceof TEjukeBox){ return new GuiJukeBox(speler.inventory,speler,(TEjukeBox)tileentity,wereld,x,y,z); } break; } throw new IllegalArgumentException("["+Constante.MODNAME+"] no Correct GUI ID : "+ID); } public Object getServerGuiElement(int ID, EntityPlayer speler, World wereld, int x, int y, int z) { TileEntity tileentity = wereld.getTileEntity(new BlockPos(x, y, z)); //speler.getPersistentID(); /**if (ToetsenBinden.inventaries.isPressed()){ System.out.println("test bctGuihandler guiharnas"); speler.openGui(R2S_UsefulBlocks.instance, Constante.guiHarnas, wereld, x, y, z);} **/ /*switch(GUIIDS.values()[ID]){ case guiRadio: if(tileentity instanceof TERadio){ return new ContainerRadio(speler.inventory,(TERadio)tileentity); } }*/ switch(ID){ case Constante.guiRadio: if(tileentity instanceof TERadio){ return new ContainerRadio(speler.inventory,(TERadio)tileentity,speler); } break; case Constante.guiJukeBox: if(tileentity instanceof TEjukeBox){ return new ContainerRadio(speler.inventory,(TEjukeBox)tileentity,speler); } break; } throw new IllegalArgumentException("["+Constante.MODNAME+"] no Correct GUI ID "+ID); } /**public static void InventariesInit(EntityPlayer speler,World wereld,int x,int y, int z){ if (ToetsenBinden.inventaries.isPressed()) System.out.println("toets inventaries werkt"); FMLNetworkHandler.openGui(speler, R2S_UsefulBlocks.instance,Constante.guiRadio, wereld, x, y, z); if(Keyboard.isKeyDown(25)) System.out.println("lol key25"); }**/ } this is a direct copy if my class hope you have enough
    1 point
  10. haha LOL well pretty easy in your "onBlockActivated" you have a World param well use that as follows if (wereld.isRemote){//is client }else{//is server }
    1 point
  11. no in your case in your onBlockActivated(args)
    1 point
  12. in your constructor (or where you want :p), just add this and set it to 0 setHardness(0F); and for the GUI maybe this might help you FMLNetworkHandler.openGui(args); normally that should fix all your issues Greets Sir_titi
    1 point
  13. I actually had the same problem more than once while using eclipse and notepad++ as editor. The problem was, that eclipse apparently holds a cached version of textfiles in its memory or something, putting the cached version to the exceuted mod. The solution I found to always have the freshest, is to select the resources folder in eclipse and press F5 (refresh) once. After that I can start the game and the model is changed properly. The same thing is with textures. Edited outside, they doesn't seem to be taken over except when refreshing the resource folder. Maybe worth a try.
    1 point
  14. As far as I see, you are trying to render your mana with a Packet on packet receive. This would not work, except you would send a packet for each frame. (Which is bad! Only send packets when necessary) What you would have to do is creating a GUI Overlay and pass the mana value to that, rendering your string inside of there in the render method. A good resource for that would be here: https://github.com/TheGreyGhost/MinecraftByExample/tree/master/src/main/java/minecraftbyexample/mbe40_hud_overlay You can then pass your mana value to your mana hud overlay and render it there.
    1 point
  15. Yes, I'd say that definitely aids me in my problem, considering I'm the one who wrote it
    1 point
×
×
  • Create New...

Important Information

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