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


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Eria8

  • Rank
    Stone Miner


  • Gender
  • Personal Text
    I am new!
  1. This is the weirdest problem I've ever had when modding. I'm trying to make a gui that renders text over a texture in the corner of the screen. There are four parts of the texture that I'm rendering separately, since if the player doesn't have something I don't want that part to render. It all works perfectly, except the third and fourth parts SOMEHOW are losing my texture and instead it's rendering what looks like the default Minecraft font texture at more than double resolution? Pictures: And this is the code: @SubscribeEvent public void onRenderGu
  2. Nope, if this is what you mean, it still doesn't work. They still all get knocked back in one same direction. for (Entity e : entities) { if (e instanceof EntityLiving && !(e instanceof INPC)) { double x = e.posX - player.posX; // ??? double z = e.posZ - player.posZ; // ??? ((EntityLiving) e).knockBack(e, 4, x, z); } }
  3. The vanilla method just knocks them toward the direction the player is facing.
  4. Distance is simple. And irrelevant to the problem...
  5. No, it's something to do with rotation. Like, as if the player is facing that direction, the entity is knocked backwards in that direction. I assume it's a 360 degree circle converted into a float. No idea if that would make 0.0f the world's North or the direction the player is facing at the time, if that's even correct. But I cannot figure out how to get that rotation in comparison to any entity the player isn't directly facing. Someone do correct me if I'm wrong.
  6. Like the title says, I'm trying to knock back all living entities near the player. But I don't understand how to get the x and z vectors for the knockback. Can someone help with this? // Get all entities within a 5 block [horizontal] radius of the player AxisAlignedBB aoe = player.getEntityBoundingBox().expand(5, 2, 5); List<Entity> entities = world.getEntitiesWithinAABBExcludingEntity(player, aoe); for (Entity e : entities) { // Ignore any entity that isn't living or that is an NPC if (e instanceof EntityLiving && !(e instanceof INPC)) { /
  7. This is what I was looking for. I thought that was something else, didn't see that it extended the EntityAIMeleeAttack which apparently now gives mobs the AI to actually attack. Now just have to fix its glitchy movement... Thanks!
  8. Okay that helped fix what I was doing wrong with attributes, but it still does not fix the problem. It's even more evidence that the problem has nothing to do with attributes...
  9. @Override protected void applyEntityAttributes() { super.applyEntityAttributes(); this.getAttributeMap().registerAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(50); this.getAttributeMap().registerAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).setBaseValue(0.01); this.getAttributeMap().registerAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(4); } If I do it that way, every time I try to spawn the mob it cancels the spawn and spams this error: "Caused by: java.lang.IllegalArgumentException: Attribute is already registered!". So I compl
  10. I'm doing everything in that method that's in all super methods, so that shouldn't matter...
  11. I only see that in EntityZombie. It seems to be pretty useless and it's not in a super class, so why would I use it?
  12. My mob won't attack or even acknowledge the player. It should have everything else it needs from extending EntityMob, and I don't see any classes like EntityZombie, etc, doing anything special... Is setting its AI not enough? public class Hunter extends EntityMob { public Hunter(World world) { super(world); this.experienceValue = 30; this.setSize(0.5F, 1.8F); } @Override protected void applyEntityAttributes() { this.getAttributeMap().registerAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(50); this.getAttributeMap().registerAttribute(SharedMonsterAttri
  13. I don't understand what's causing this. The crash log only references vanilla code, so I can't figure out what on earth is null. And it happens very randomly. Both times it happened was a second or two after killing my custom mob. However, I've tried killing my mob the same exact way (just whacking it with a diamond sword in a superflat world) about a dozen other times without causing a crash or error, and it hasn't happened with any vanilla entities. I don't know how to find the problem when it just happens at random. This is the crash: And this i
  14. Items all show up, but blocks don't. The block is definitely being registered, and so is its model (I know because I finally got it to stop giving block model errors by renaming the file), but it just won't appear in my creative tab. I'm probably just overlooking something stupid again, but I can't figure out what. Registry public static Block quickSilverOre; public static Block[] blocks = new Block[] { quickSilverOre = new BloodBlock("quickSilverOre", Material.ROCK).setTool("pickaxe", 2) }; public static void load() { for (Block block : blocks) { GameRegistry.
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.