Jump to content

laton95

Members
  • Posts

    19
  • Joined

  • Last visited

Recent Profile Visitors

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

laton95's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Getting the parrot to work properly on the player's shoulder is probably not possible, looks like the parrot is hardcoded in several places.
  2. Ok, turns out that I needed to override handleRotationFloat in my render class like vanilla did to it's parrot.
  3. Hmm, it is a problem with using the parrot model itself. The same entity with a different model will not have the issue.
  4. Well thanks anyway. I'll keep at it, I've made it it's own entity now instead of extending parrot and removed it's ability to fly to check if that was causing the issue. Oddly enough the model still falls slowly like a chicken even though it shouldn't be able to. The actual entity falls like a normal mob.
  5. @Mod.EventBusSubscriber public class ModEntities { private static int entityID = 0; @SubscribeEvent public static void registerEntities(RegistryEvent.Register<EntityEntry> event) { LogHelper.info("Registering entities"); EntityEntry[] entries = { createBuilder("spell_projectile_bouncing").entity(EntityProjectileSpellBouncing.class).tracker(64, 20, true).build(), createBuilder("spell_projectile_damage").entity(EntityProjectileSpellDamage.class).tracker(64, 20, true).build(), createBuilder("spell_projectile_explosive").entity(EntityProjectileSpellExplosive.class).tracker(64, 20, true).build(), createBuilder("spell_projectile_following").entity(EntityProjectileSpellFollowing.class).tracker(64, 1, true).build(), createBuilder("spell_projectile_teleport_basic").entity(EntityProjectileSpellTeleportBasic.class).tracker(64, 20, true).build(), createBuilder("zombie_parrot").entity(EntityZombieParrot.class).tracker(64, 1, true).build() }; event.getRegistry().registerAll(entries); } private static <E extends Entity> EntityEntryBuilder<E> createBuilder(final String name) { final EntityEntryBuilder<E> builder = EntityEntryBuilder.create(); final ResourceLocation registryName = new ResourceLocation(ModReference.MOD_ID, name); return builder.id(registryName, entityID++).name(registryName.toString()); } }
  6. Thanks for the tip, but even with it set to true the behaviour is still the same.
  7. I am having an issue where the model of my entity is drifting away from the actual entity, in the image you can see that the bounding box is where the entity actually is while it's model is falling through the floor. The entity is a simple parrot copy that extends EntityParrot and not much else. The model keeps the same x and z coordinates of the actual entity, but keeps descending. I suspect that this is the result of an issue syncing between client and server but I am not sure exactly where the problem is. My entity class My render class: I am registering my render in my client proxy on preInit, and registering the entity on the RegistryEvent.Register<EntityEntry> event. RenderingRegistry.registerEntityRenderingHandler(EntityZombieParrot.class, renderManager -> new RenderZombieParrot(renderManager, new ModelParrot(), 0.5f)); createBuilder("zombie_parrot").entity(EntityZombieParrot.class).tracker(64, 3, false).build();
  8. Thanks, good to have affirmation that I'm not doing anything wrong with the projectile itself. I'll have a look through my registration code and try to find any problems.
  9. Hello, I have been trying to create "spell" projectiles and am running into a problem. When the projectile is created and shot it is created on the server but not on the client, causing it to not be rendered. The projectile is definitely created on the server. The creation of the projectile is inside a !world.isRemote check, since all of vanilla's projectiles have this. When the check is removed the projectile is properly created and rendered, although it is desynced between client and server as expected. I've been searching through vanilla's projectile code for a while now trying to find why my projectiles are different but the only thing I have found that could be related is the NetHandlerPlayClient and I haven't been able to find examples of other mods using networking when spawning entities. Here is my base projectile class: Here is my explosive projectile example class: Creation of the projectile: I am thankful for any help.
  10. If you put your recipe JSONs in a assets/modid/recipes package/directory, they will be automatically loaded by forge. If you are having trouble with the formatting of the files, look at how Vanilla does it. You can also search your log for JSON parsing errors, they will tell you what line and column any JSON errors appear on. As for having configs for disabling recipes, I'm not sure how it works but I think Choonster's test mod has something like that here: https://github.com/Choonster-Minecraft-Mods/TestMod3/blob/1.12.1/src/main/java/choonster/testmod3/crafting/ingredient/ConditionalIngredientFactory.java Trying to make recipes work without JSON files is a lot of unnecessary hard work, if you learn how to use the new system it will be a lot easier for you.
  11. I am having an issue where the player is desynced from the server when I teleport them from The End to a custom dimension. Method I am calling to teleport player: The changeDimension method I only use for non-player entities and it is based off of the Entity.changeDimension method, modified so that it works without a portal block. It does not work for players. And here is my teleporter class: When the player is teleported from The End they can move around but cannot throw items, spawn entities. They can place blocks however. The code works fine from the Nether or the Overworld, and I can't find what part of my code would be causing it. Is this a problem with the transferPlayerToDimension method? If so, is there another good way to teleport players between dimensions?
  12. Oh, thats odd. I wonder what the reason for that is. Thanks for pointing it out, I guess I'll have to try and work with either the pre and post events.
  13. Hello, I am trying to run a method using the PopulateChunkEvent.populate event but the event does not seem to be firing in the End dimension. Here is a snippet of code I am using to show it is not working. @SubscribeEvent public void populate(PopulateChunkEvent.Populate event){ LogHelper.info("What is this? " + event.getWorld().provider.getDimensionType()); switch (event.getWorld().provider.getDimensionType()) { case OVERWORLD: break; case NETHER: break; case THE_END: LogHelper.info("End populate"); break; default: break; } } The class has been annotated using @Mod.EventBusSubscriber and is also being registered to the event bus using both MinecraftForge.EVENT_BUS.register and MinecraftForge.TERRAIN_GEN_BUS.register. It works in the overworld and the nether just fine, but fails to occur in the end. As you can see in the log below, the event is called many times in the overworld but when I enter the end it ceases. Going out to the outer islands of the end does not fire the event either. [22:19:23] [Server thread/INFO] [Mod]: What is this? OVERWORLD [22:19:23] [Server thread/INFO] [Mod]: What is this? OVERWORLD [22:19:23] [Server thread/INFO] Mod]: What is this? OVERWORLD [22:19:23] [Server thread/INFO] [Mod]: What is this? OVERWORLD [22:19:23] [Server thread/INFO] [Mod]: What is this? OVERWORLD [22:19:23] [Server thread/INFO] [Mod]: What is this? OVERWORLD [22:19:23] [Server thread/INFO] [Mod]: What is this? OVERWORLD [22:19:23] [Server thread/INFO] [Mod]: What is this? OVERWORLD [22:19:23] [Server thread/INFO] [Mod]: What is this? OVERWORLD [22:19:23] [Server thread/INFO] [Mod]: What is this? OVERWORLD [22:19:24] [Server thread/INFO]: Player274 has made the advancement [The End?] [22:19:24] [main/INFO]: [CHAT] Player274 has made the advancement [The End?] [22:19:24] [main/INFO]: Loaded 18 advancements [22:19:26] [Server thread/INFO]: Scanning for legacy world dragon fight... [22:19:26] [Server thread/INFO]: Found that the dragon has not yet been killed in this world. I can't figure out what is going wrong, the event appears to be fired in both ChunkGeneratorOverworld and ChunkGeneratorEnd in amost exactly the same way. Chorus plants and end cities generate normally so it should be being called.
×
×
  • Create New...

Important Information

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