Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

  • Joined

  • Last visited


  • Gender
  • Personal Text
    I am new!

Raolan's Achievements

Tree Puncher

Tree Puncher (2/8)



  1. So my block that explodes when broken doesn't deal damage to the player that triggers it (does damage others) and I'm pretty sure it's because of what I declare as the entity. @Override public void onBlockDestroyedByPlayer(World world, int x, int y, int z, int meta) { world.createExplosion(world.getClosestPlayer(x, y, z, meta), (double)x, (double)y, (double)z, 10.0F, false); } What should I actually be putting in there? From what I can tell the entity is supposed to be the one that causes the explosion (i.e. the block). I was trying to find something along the lines of "(EntityTile)this" but failed.
  2. I'm certain that's not the issue because when I changed my custom potion to be applied once per tick rather than once off for 5 seconds it worked as expected. Of course the problem with that is it gives the player fall immunity 24/7 rather than for a limited period of time after losing power, but it'll do for now.
  3. Yes it's registered, I've got a LivingUpdateEvent method in the same class that is working perfectly with all my other custom potions. EDIT: Quick context: this is for a powered armor suit that charges up and gains extremely fast flight for a time after charging, then after that time it has to recharge again for a while. This flight is controlled by another potion. The player wearing said suit gains the SafetyFall potion for 5 seconds when the latter is first removed. It works if I use a constantly re-applied potion in the if statement (the suit applies 1 tick of Potion.moveSpeed every tick)
  4. Same result and AFAIK it's cleanest to cancel at the attack stage when possible. EDIT: It doesn't seem to be passing the isPotionActive test which is confusing because my living update event handler passes the same event. When exactly are the hurt and attack events called for fall damage?
  5. My handler for preventing fall attack sources when a certain potion is active is not cancelling the event. Can confirm potion is active at time of event (impact).
  6. Context: armor materials that use onArmorTick to cause various effects when the whole set is equipped. What performance difference if any would there be between having your normal ItemModArmor class with the one onArmorTick testing every instance of ItemModArmor, versus having your normal ItemModArmor class but then with unique classes to each armor material that have their own onArmorTick. Or another way to put it is: is onArmorTick called ONLY if the corresponding armor material is equipped? Because otherwise it'd be a case of n different calls each with x boolean comparisons versus 1 call containing n*x boolean comparisons x = (test null + test equipped) * each item slot
  7. Can I ask the reasoning behind this? Is it just a coder QOL thing in case you end up needing to change texture file names but don't want to/can't easily change the unlocalized name? EDIT: or another thing I just thought of is so you can change texture names in an update without it breaking everyone's items, assuming I'm understanding how that would work correctly.
  8. Thanks for the explanation. Yeah I've changed my registerBlockIcons somewhat. I've also changed to a naming system of unlocalizedName + metaID for the time being since it's easier to work with. EDIT: Working as below. Excuse the hard coded registerBlockIcons, still working on a proper iterative method.
  9. Removed that, throws a java.io.FileNotFoundException: minecraft:textures/blocks/MISSING_ICON_BLOCK_181_reinforcedFabric.png. Obviously it wasn't throwing that before since it wasn't even trying to register it. How do I setup registerBlockIcons for meta data or is the default still ok? Edit: Solved, sorry, really stupid oversight on my part. Fixed as below. All the textures are the same but they're loading and I can fix that bit. @Override public void registerBlockIcons(IIconRegister register) { this.blockIcon = register.registerIcon("Omega:reinforcedFabric"); }
  10. I've made a metadata block that's just an "upgraded" wool (only with 4 colours at the moment) and can't get them to display properly (placeholder texture). The textures are all named as: reinforcedFabric_<colour>.png Most of the tutorials I've looked at seem to use a multitextured block. Is this a requirement for metadata blocks? ReinforcedFabric.java ItemBlockReinforcedFabric.java Registry
  11. Oh of course. It's all working fine now, fixed the sendToAllAround so that it's being given the ID properly and not statically. In case anyone else comes across this thread for a similar issue:
  12. I got the idea from another thread I'd looked at that I needed to confirm that only players in the correct dimension were receiving the packet, otherwise depending on what is done (e.g. spawnParticle) it could cause a crash.
  13. Thank you so much! Is there some method in there I can use to get the dimension value for comparison? Can't find anything in World or WorldInfo
  14. I've setup a packet that contains 3 doubles (coordinates) that are sent to all clients within a 100 block radius of the same coordinates. Console output shows the coordinates are being sent to the client successfully (though I don't know if I should be using getters). What I'm having trouble with is having the world and more importantly the correct world to create the client event in. I've seen something along these lines for armor update events and then using entity.worldObj.(clientevent) but I'm not working with entity's rather coordinates generated by getMovingObjectPositionFromPlayer. public void SimpleMIn(SimplePacket.SimpleMessage message) { Entity entity = FMLClientHandler.instance().getWorldClient().getEntityById(message.entityID); // message sends the entityID } I'm thinking my best option is to send the world ID (-1, 0 or 1) the event occurs in from the server end and check that against the players receiving the packet. i.e. public void SimpleMIn(SimplePacket.SimpleMessage message) { //if (message.worldID == EntityPlayer.worldObj.) // EntityPlayer.worldObj.(do stuff) } How do I refer to "this client's world" (i.e. EntityPlayer) in ClientProxy and use it to specify and verify whether or not to do something for that player?
  • Create New...

Important Information

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