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

Groxkiller

Members
  • Posts

    51
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Groxkiller's Achievements

Stone Miner

Stone Miner (3/8)

7

Reputation

  1. But that's my point: you altered it to set to your stationary. That's not the default behavior.
  2. Add this into your mod's @init method: VillagerRegistry.instance().registerVillagerType(villagerNumberID, "path/to/villager/texture.png"); villagerNumberID has to be greater than 6 (as all ids below that are already taken), and it can go quite high so it's a good idea to start at 50 or something. Adding trades to this villager is a bit more difficult as Forge's trade adding system is a bit broken at the moment. If I find a quick way to do it i'll let ya know.
  3. My question is blunt: How does one do this? From what I can tell, the traceback for data per-mod has to do with WorldAccessContainer, an interface. Certain ModContainers have implemented it to work with data, but I don't see a way to set the ModContainer of my mod to be a custom one to utilize that. Am I missing something stupid or is there another way to save NBT data per-mod?
  4. By default throughout liquid code it will assume the flowing liquid version is one id above the stationary version, not below.
  5. I like this one too; would let you make custom block helmets or custom armor that doesn't use ItemArmor as a parent class.
  6. If this was an entityliving event I think it would be worth getting it. It could prevent healing if a certain item is in the inventory (perhaps something cursed or drains hp or something), make a potion that prevent healing, and if combined with an attack event could be used to balance out health depending on circumstances.
  7. Not sure what you mean, as I can build a timer into an entity and it works with multiple instances (as in each one has a unique timer). To keep the timer in it's state, however, you would need the NBT tagging. (And ofc to have it for both server and client you need to datawatcher the value, but doing that with timers is a poor idea and should instead be done with what happens when the timer expires)
  8. utilize Proxies for client- and server-specific stuff.
  9. If you know what Reflection is you can do this easily. (In these examples I use a custom class I made called 'ReflectionManager', so you'll need to make your own to get these values) Clientside Proxy: public ChunkCoordinates getPlayerBreakingBlockCoords(EntityPlayer entityplayer) { int blockX = 0; int blockY = 0; int blockZ = 0; if(entityplayer instanceof EntityClientPlayerMP) { PlayerControllerMP controller = Minecraft.getMinecraft().playerController; boolean hasBlock = ReflectionManager.getPrivateBoolean(controller, "isHittingBlock", PlayerControllerMP.class); if(hasBlock) { blockX = ReflectionManager.getPrivateInt(controller, "currentBlockX", PlayerControllerMP.class); blockY = ReflectionManager.getPrivateInt(controller, "currentBlockY", PlayerControllerMP.class); blockZ = ReflectionManager.getPrivateInt(controller, "currentBlockZ", PlayerControllerMP.class); return new ChunkCoordinates(blockX, blockY, blockZ); } }else { return super.getPlayerBreakingBlockCoords(entityplayer); } return null; } Serverside Proxy: public ChunkCoordinates getPlayerBreakingBlockCoords(EntityPlayer entityplayer) { int blockX = 0; int blockY = 0; int blockZ = 0; if(entityplayer instanceof EntityPlayerMP) { ItemInWorldManager manager = ((EntityPlayerMP)(entityplayer)).theItemInWorldManager; boolean hasBlock = ReflectionManager.getPrivateBoolean(manager, "isDestroyingBlock", ItemInWorldManager.class); if(hasBlock) { blockX = ReflectionManager.getPrivateInt(manager, "partiallyDestroyedBlockX", ItemInWorldManager.class); blockY = ReflectionManager.getPrivateInt(manager, "partiallyDestroyedBlockY", ItemInWorldManager.class); blockZ = ReflectionManager.getPrivateInt(manager, "partiallyDestroyedBlockZ", ItemInWorldManager.class); return new ChunkCoordinates(blockX, blockY, blockZ); } } return null; } As with all reflection this comes with a performance cost if you use it constantly. Also note that here I use the actual names; When you go to reobfuscate you need to replace the names with the obfuscated names or this won't work.
  10. It would be possible to render a model for a block via block rendering hooks, if only for one flaw, which is if you try and override the texture there then blocks rendered afterwards take on your texture in that chunk. it's quite weird. One way around this would be to save what texture is binded to openGL and then re-load it after you finish rendering the model, but that doesn't work perfectly all the time. And I never thought to just to use the tile entity as data, and not use a special renderer. Thanks for the tip!
  11. There isn't much need for this if you can make your own entity for it. Is it more work? Yes. But having a hook to change the texture seems pointless to me if you can just make a clone of it. (plus then you can customize it, have it spawn particles or somesuch, or speed it up, give it properties. If you don't want any of that then just clone it.)
  12. I've had this before, but I don't think it's connected to Forge. Minecraft can (very, very, VERY rarely) create a map from a seed where there's no applicable biome nearby that's flagged as spawn-point-able. (ie deserts, mountains, mooshroom islands, swamps and oceans don't allow spawns) This especially happens when you have 'large biomes' turned on because it increases the chances of no spawn being found (but again this is really rare). All you need to do to fix it is use another seed.
  13. hatch() sounds like it changes the entity state/places another entity. If so, it should be serverside-only and the value should be datawatcher'd. (ie the entity should have an 'isHatched' boolean and serverside updates the client one, etc.)
  14. I found the problem: I was using the flowing water blockID instead of the stationary blockID, resulting in thousands of update packets sent for each one as it converted to stationary. Using the stationary ID instead completely wiped the lag out. Thanks for the help!
  15. Normally I don't like to bump, but this problem still exists. Do you need more information?
×
×
  • Create New...

Important Information

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