Jump to content

thatsimplekid

Forge Modder
  • Posts

    15
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • Location
    Some hangar somewhere
  • Personal Text
    Rocket Scientist

thatsimplekid's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Hey everyone, I'm trying to code an openblocks-esque elevator block that shoots the player up or down to another "platform" when they jump or sneak. My code is as follows: my game crashes everytime I attempt to load the world and my crash report is as follows: i get the crash at line 11, which is "EntityPlayer player = this.worldObj.getClosestPlayer(xCoord, yCoord, zCoord, -1);" any help is greatly appreciated!
  2. EDIT: Don't worry, it now seems to work... Not sure what I did to fix it, but it's all good now... Thanks for the help anyway! In Main.java and in OxynetEvent.java: and on a tile entity update method (for testing) i have: FMLCommonHandler.instance().bus().post(new OxynetEvent.loadEvent());
  3. Basically I want to be able to push/handle my own event. The event is a custom event class that I have created (extending Event from cpw.mods.fml.common). However, when I setup a handler and push my custom event on the FML event bus, nothing happens.
  4. Hello all, I am trying to implement a custom event (FML Event) into my mod (event, not handler), and have gathered that I need to use ASM for this. However, when looking at the code of other mods (Namely IC2) I cannot seem to figure out how to do this. It would be greatly appreciated if someone could point me in the direction of an open source mod, or any documentation that would help me. Thanks in advance, ~ ThatSimpleKid. p.s. I do already have an understanding of Java Bytecode
  5. Don't worry people, I just realised what I was doing wrong I'd forgotten to sync my boolen values from/to server<-->client, therefore they were changing serverside, and nothing was happening clientside *facepalm* Thanks for your help anyway
  6. GameRegistry.registerTileEntity(TileEntityWire.class, "SCWireEntity");
  7. Okay, so I now know that updateEntity() is not being ticked by the server, only the client, any ideas why?
  8. Oh, and putting the same code in updateBools() won't work GameRegistry.registerTileEntity(TileEntityWire.class, "SCWireEntity"); ^^ thats all good, right?
  9. I just tried out System.out.println("Hi "); in my updateEntity() method, It just appears that the method is not being called so updateEntity() works, just not updateBools() and in updateEntity() i have if(!this.worldObj.isRemote){updateBools();}
  10. I have a class called TileEntityWire extending TileEntity, it is registered in my main mod class, and it works fine apart from this rather large issue I have overriden the updateEntity class, and have other functions working in it perfectly. The only problem is - I cant get these shared boolean values to be updated by the server, because it isn't running my code and delphi, the server does tick updateEntity() right?
  11. That's what I mean: I want the server to run updateBools() because the methods called inside are server-only, and won't run clientside without crashing. When checking for isRemote() to be false in updateEntity(), the code never runs, so I need a way of making the server run the updateBools() method. My code: Boolean tileup = false; Boolean tiledown = false; Boolean tileleft = false; Boolean tileright = false; Boolean tilefront = false; Boolean tileback = false; public void updateBools(){ tileup = EnergyNet.instance.getTileEntity(this.worldObj, xCoord, yCoord+1, zCoord) != null; tiledown = EnergyNet.instance.getTileEntity(this.worldObj, xCoord, yCoord-1, zCoord) != null; tileleft = EnergyNet.instance.getTileEntity(this.worldObj, xCoord-1, yCoord, zCoord) != null;; tileright = EnergyNet.instance.getTileEntity(this.worldObj, xCoord+1, yCoord, zCoord) != null; tilefront = EnergyNet.instance.getTileEntity(this.worldObj, xCoord, yCoord, zCoord+1) != null; tileback = EnergyNet.instance.getTileEntity(this.worldObj, xCoord, yCoord, zCoord-1) != null; } public void updateEntity(){ if(!FMLCommonHandler.instance().getEffectiveSide().isClient()){ updateBools(); } } (Spoiler wouldn't work ) If that makes sense...
  12. Well, for the past 4 hours I've been trying to get this to work... So, I have a tile entity with a set of Boolean values, and I have a method called "updateBools()" that contains serverside code to update said Boolean values, in that tile entity class (the code can ONLY be run serverside as it accesses the worlds directly [3rd party API]). I will need the server to update the Boolean values every tick (for clientside rendering), however: if(!FMLCommonHandler.instance().getEffectiveSide().isClient()){updateBools();} if(FMLCommonHandler.instance().getEffectiveSide().isServer()){updateBools();} and if(this.worldObj.isRemote()){updateBools();} don't work If anybody could point me in the right direction, or at least let me know what I'm doing wrong, I'd be very grateful EDIT: the 3 mentioned above are put into updateEntity()
  13. Hello, i want to make a book in minecraft. Can i make one like the vanilla signed books, or do i need to create my own GUI? Much Appreciated thatsimplekid
×
×
  • Create New...

Important Information

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