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

TheUnnamed

Members
  • Content Count

    12
  • Joined

  • Last visited

Community Reputation

2 Neutral

About TheUnnamed

  • Rank
    Tree Puncher

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Regarding your problem, use the posX, posY, posZ double variables instead, from the entity class, this I believe will give you the exact position.
  2. Not 100% sure as I don't have a 1.11.2 workspace set up, but in 1.14.2 the Javadocs tells me that setRotationAndPosition() sets the position and rotation, clamping and wrapping params to valid values. Used by network code. Whereas setLocationAndAngles() simply sets the location and Yaw/Pitch of the entity in the world.
  3. You need to set location and angles of the entity. You can use the setLocationAndAngles method for that, from the Entity class. EntityModMob mob = new EntityModMob(event.getWorld()); mob.setLocationAndAngles(DESIRED POSITION AND ROTATION GOES HERE); event.getWorld().spawnEntity(mob);
  4. I solved it. Here's how I did it: When I set the EntityType variable for my named variable "ENT_PROJECTILE" and build, I use the setCustomClientFactory method, so it would look exactly like this: ENT_PROJECTILE = registerEntity(EntityType.Builder.<EntityModProjectile>create(EntityClassification.MISC).setCustomClientFactory(EntityModProjectile::new).size(0.25F, 0.25F), "ent_projectile"); Inside of my EntityModProjectile class I extended the ProjectileItemEntity class, overrided the createSpawnPacket method and returned getEntitySpawningPacket from NetworkHooks cl
  5. I think you are posting in the wrong forum section, you can either contact the mod authors or post in "Support and Bug Reports", for these kind of matters I believe. I thought you were modding, as in writing code for your own mod.
  6. What's the potion effect, a custom one? Also this is an simple example of how you can use instanceof operator: public void methodName(Entity entity) { if (entity instanceof EntityPlayerMP) { EntityPlayerMP player = (EntityPlayerMP) entity; if (player.isBla()) { // code... } } }
  7. It says right there that EntityPlayerSP cannot be cast to EntityPlayerMP. You most likely need to check if entity is instanceof desired Entity class.
  8. Overriding the getHarvestLevel method and returning an Int value works for me. But then again I'm not dropping the block via a Loot Table, I spawn desired items in spawnAdditionalDrops method, and this is called when the block is harvested.
  9. Thank you for your input PhilipChonacky. I've done exactly as you've suggested, but the issue still persists, the entity I'm summoning with the /summon command is still invisible. It says the entity has been registered in the console, so I'm not quite sure what could be the problem. Keep in mind that this only occurs with entities that are created with SSpawnObjectPacket and not SSpawnMobPacket in the IPacket<?> createSpawnPacket() method it seems, because mob entities register and render just fine in-game, as previously stated.
  10. Is this a valid way to register entities? Be it entities extending classes such as ProjectileItemEntity or MonsterEntity class. The reason I ask is because while the mob entity is registring and showing in game just fine, the throwable entity is not, and is completely invisible in game when spawned (even when I don't register entity rendering with the RenderingRegistry class - this would in turn render it as a white box which is not happening). public static EntityType<?> ENT_MOB = null; public static EntityType<EntityModProjectile> ENT_PROJECTILE = null;
  11. Nvm, I'm retarded. I forgot to change the value of @Mod("examplemod") to match the entry in the META-INF/mods.toml file. Runs fine now.
  12. Running Forge in IntelliJ crashes as soon as main menu screen is "fading in" / loading up. I've picked correct module so I'm not sure what is wrong. Could it be that 1.14.2 just released, and it's bugged?
×
×
  • Create New...

Important Information

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