Jump to content

SuperJedi224

Members
  • Posts

    45
  • Joined

  • Last visited

Everything posted by SuperJedi224

  1. 1.02 changelog: -Treasure room floor now made of wooden planks -Treasure room now torch-lit -Minimum spire distance from origin now configurable -Minimum spire distance from origin now measured by cartesian metric instead of taxicab metric -Fixed a bug with the generation script
  2. This is a mod I made recently that adds a new miniboss enemy, the Death Knight. Some screenshots: The exterior of a Spire. Death Knights are found at the tops of these. These only generate when you are at least 35 chunks from the origin (this number is, as of 1_02, configurable). A Spire's treasure room (as it appears in 1_02), located at the base of the Spire's central section. There is loot in that chest. A Death Knight. These baddies have wither-skeleton like powers, but they look scarier, have more health (the exact amount is configurable), and can dish out a lot more damage. He is standing next to a glowstone lantern. A Golden Death Knight. This version has slightly more health still (again, the exact amount is configurable), and is quite a bit rarer (defaults to 95 per thousand Death Knights; this is configurable), but drops better stuff. There is also a spider in the background. Download version 1.01 Download version 1.02 (changelog)
  3. To set up an event handler, you have to register an instance of the containing class with one of Forge's busses. I'm not sure which bus is required for WorldTickEvent though.
  4. I've been meaning to ask this question, though I really haven't had an immediate reason to yet.
  5. I'm trying to get a server-side copy of the mob (if any) the player is currently looking at, so I can (possibly, if the entity meets some conditions specified later in the method) spawn some particles and inflict magic damage to it.
  6. Here's the portion of the code in question as it currently stands (this is located inside a helmet's onArmorTick method): MovingObjectPosition loc=Minecraft.getMinecraft().objectMouseOver; Entity b=loc==null?null:loc.entityHit; if(b==null||!(b instanceof EntityLivingBase))return; EntityLivingBase c=(EntityLivingBase)b; try{ c=(EntityLivingBase)MinecraftServer.getServer().worldServerForDimension(p.dimension).getEntitiesWithinAABB(b.getClass(),b.getEntityBoundingBox().expand(0.2,0.2,0.2)).get(0); }catch(Exception e){ return; }
  7. Unfortunately, it was the first solution I could come up with that worked.
  8. The solution I wound up using was to grab the client-side entity using the method you mentioned earlier and then use the MinecraftServer class plus some AABB stuff to get the corresponding server-side entity.
  9. Does attackEntityFrom() work on the client-side?
  10. I'm doing this for what basically amounts to a helmet of anti-zombie laser vision, so I need to be able to do it from the armor tick method. Any suggestions?
  11. What is the easiest way to do this? I've tried using rayTrace() but I can't seem to get it to work.
  12. For one thing, you are acting as if java 7 doesn't have generics, and I'm reasonably certain that it does.
  13. Is there any way to do this?
  14. try this.getHealth()<=1000, is that what you meant?
  15. I'm having a hard time getting the event to fire. I've registered it with MinecraftForge.EVENT_BUS and properly annotated its method, what do you think the problem is? Edit: Now it's firing, but how do I get a hold of the server-side world object?
  16. I'll see if I can get that to work.
  17. Is there any way to do this? I already have a framework in place for spawning the mobs, I just want to know if there is an easy way to do this automatically when the player enters a given chunk (that is, the one containing my custom structure.)
  18. Thanks. So it turns out I was trying to override the wrong method
  19. I used to be able to do this by overriding the registerItem for the item's class to add custom ItemStacks to the passed list- but the passed list is no longer present. How do you go about doing this now?
×
×
  • Create New...

Important Information

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