Jump to content

salvestrom

Members
  • Posts

    116
  • Joined

  • Last visited

Everything posted by salvestrom

  1. Anyone got any thoughts? The fact the husk on a horse won't move is pretty confusing. I tried updating to the latest version of forged today, but that did nothing.Also, just to note having a saddle is key. Without a saddle the horse/custom mount will skip all the passenger code in the travel method…
  2. One small point: the item's position will be relative to the arm which you are already adjusting to match the direction the player is looking, so you shouldn't actually need the item to do any additional rotation itself; just have it set up in the json file. Right?
  3. The position of a held item is handled entirely within the json file for the item.
  4. Okay. Bare with me. I've been updating from 1.12 to 1.14. I created a custom rideable entity in 1.12 that functioned fine. In 1.14 it still functions fine unless it's being ridden. In which case, it refuses to move. If I remove the rider by knocking it off or killing it, the custom mount will behave normally. Until another rider gets on. Eventually I tested the custom mount by having it spawn ridden by a husk. It also wouldn't move. I then tested having my custom rider spawn on a vanilla horse. They also wouldn't move. I then spawned (via my custom mounts spawn egg) a husk riding a horse and they also would not move. At this point, I'm very confused. Help… This is the code from the custom mounts spawn egg that I was using to spawn a husk on My custom mount, I also used this to spawn a husk riding a horse, which I stress again would not move in game.… public ILivingEntityData onInitialSpawn(IWorld worldIn, DifficultyInstance difficulty, SpawnReason reason, @Nullable ILivingEntityData entityLivingData, @Nullable CompoundNBT itemNbt) { entityLivingData = super.onInitialSpawn(worldIn, difficulty, reason, entityLivingData, itemNbt); if (this.rand.nextInt(5) == 0) { this.setGrowingAge(-24000); } int i = this.rand.nextInt(100); this.setRaptorVariant(i > 89 ? 2 : (i > 44 ? 1 : 0)); /* HuskEntity sacskel = EntityType.HUSK.create(this.world); sacskel.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, 0.0F); sacskel.onInitialSpawn(worldIn, difficulty, reason, (ILivingEntityData)null, (CompoundNBT)null); this.setGrowingAge(0); this.raptorChest.setInventorySlotContents(0, new ItemStack(Items.SADDLE)); this.updateRaptorSlots(); this.setRaptorTamed(1); worldIn.addEntity(sacskel); sacskel.startRiding(this);*/ return entityLivingData; }
  5. This is what I currently have. I had to move the passenger.setPosition outside of the isRemote check because the player was immediately warping back to the position they mounted the entity at on dismounting. I have no idea if this will actually cure the original problem on a server, or if there is some other way around this.
  6. Here's the top few lines of the crash log I was supplied with. This never happened while testing in the development environment. This may only be occurring on servers. And here is the method from the entity file. This was an attempt to give a rider a bobbing effect while mounted. It was mostly successful. Am I doing something wrong with the Minecraft.get Minecraft() call?The line specified by the crash log corresponds to the first usage of Minecraft.getMinecraft. Again this never happens while in the development environment.
  7. Drowning in water is determined by the mobs "eye height" which can be set independently of the collision box. Turn on collision boxes in game and you should see a red square either within or above the collision box: this is the mobs eye height. Edit: looking at your source code, it seems you have mob eye height set at as little as a quarter of the mob height.
  8. I see. As for moving to 1.14, I'm about done with 1.13.2 – just a few specialty blocks and all of the structure/world generation rewriting to do. I figured I'd see it out, but it seems largely pointless. No one is going to play 1.13 mods, just as it skipped from 1.7 to 1.9.
  9. I've been poking around and have the impression that you can't add a custom fluid right now, even for 1.14. Is this correct?
  10. You can still create sub-items, and successfully register them and use them in game. But there seems to be no way to distinguish them in a recipe file. But for separate classes does seem to be the only way forward. Seems odd to leave the sub item functionality in place. Edit: and even if I use four separate classes, each prewritten book will have to be registered as a sub item still. It will resolve my issue with recipes, but it won't remove my use of subitems.
  11. Anyone got anything? Creating four separate classes for the book just seems wasteful…
  12. Sorry, I clicked on this post from another part of the forums and thought this was a coding issue. I'm not familiar with the mod you are using and can't help you I'm afraid.
  13. Please show the code you are using to spawn them at night/day. Please clarify what you are meaning when you say "NPC's I added to spawn in biomes spawn at day are fine, but they will never spawn at night": you are stating you set them to spawn during the day and then appear confused that they won't spawn at night…
  14. I have four prewritten books stored as sub-items of a single book item class. The issue is referencing them in recipes and advancements. This is the Advancement Json as it was in 1.12.2: In 1.13.2 "data" causes an error reading "disallowed data tag". The following is an extract from the book scale item class. There are four prewritten books in total: Initially I thought flattening wouldn't work since I would still need a sub item within each flattened book item class, but then I realised that each separate class would be sufficient for distinguishing them. However, if it's possible to resolve this by changing the word "data" to something else, that would be great!
  15. Yeah I'm an idiot. The method forgetting the armour model in my item class was calling the outdated proxy class I have. Problem solved. I can't seem to find a button for deleting my post… This shame will live with me forever…
  16. In 1.13.2 armour textures seem to be fixed at "64, 32". Or some ratio of that. My armour texture is "128, 128" so the game is looking for the chest plate texture, for example, at (32, 64) instead of (16, 16). It completely ignores any numbers that I pass over or try to set in the model file. I can't fit my armour texture into a 64 by 32, but I think think it is possible to have more than two textures associated with an armour. But is it possible to overcome the above problem?
  17. protected void preRenderCallback(EntityJungleSpider nttLizSt, float par2) { GL11.glScalef(0.2F, 0.2F, 0.2F); } I think this is what you're looking for: it goes in the render class. Obviously just change it to your entity and Whatever scale you want. Oh, this is still working 1.13. I have no 1.14 version.
  18. There is a comma missing in the language file, after "tutorial block". Is the file a json, or are you using a .lang still? What are you seeing when you mouse over the item in game?
  19. Your language file does not contain any translations for block names. What are you seeing in game?
  20. It seems to be a cart before the horse issue: items are registered before sounds so the record has no sound attached to it. I can get around this by using a static initialiser, but I'm looking for other options. I also have a similar issue using custom spawn eggs: the entity type is a null. In this case I'm using spawn eggs directly so they can be placed in my mod's creative tab. @ObjectHolder(References.MODID) public class JungleSounds { public static SoundEvent RECORD_SURVIVORS; public static SoundEvent SAUROHN_DEATH; public static SoundEvent SAUROHN_HURT; public static SoundEvent SAUROHN_LAUGH; public static SoundEvent SAUROHN_MOCK; public static SoundEvent SAUROHN_TALK; public static void init() //Not currently called, doesn't work if used from pre-init { /*RECORD_SURVIVORS = registerSound("records.eyetyrant"); SAUROHN_DEATH = registerSound("saurohn.saurohn_death"); SAUROHN_HURT = registerSound("saurohn.saurohn_hurt"); SAUROHN_LAUGH = registerSound("saurohn.saurohn_laugh"); SAUROHN_MOCK = registerSound("saurohn.saurohn_mock"); SAUROHN_TALK = registerSound("saurohn.saurohn_talk");*/ } private static SoundEvent registerSound(String soundName) { //soundID;//SoundEvent soundID = IRegistry.field_212633_v.func_212608_b(new ResourceLocation(soundName)); final ResourceLocation soundID = new ResourceLocation(References.MODID, soundName); return new SoundEvent(soundID).setRegistryName(soundID); } @EventBusSubscriber(modid = References.MODID, bus = EventBusSubscriber.Bus.MOD) public static class RegistrationHandlerSound { @SubscribeEvent public static void registerSoundEvents(final RegistryEvent.Register<SoundEvent> event) { init(); event.getRegistry().registerAll ( RECORD_SURVIVORS = registerSound("records.eyetyrant"), SAUROHN_DEATH = registerSound("saurohn.saurohn_death"), SAUROHN_HURT = registerSound("saurohn.saurohn_hurt"), SAUROHN_LAUGH = registerSound("saurohn.saurohn_laugh"), SAUROHN_MOCK = registerSound("saurohn.saurohn_mock"), SAUROHN_TALK = registerSound("saurohn.saurohn_talk") ); } }
  21. Is there a way to stop these showing up in the console?
  22. I noticed that the openHorseInventory method in EntityPlayerSP makes a call to displayGuiScreen in the Minecraft class, which is public. All that happens in the player class is a few parameters are picked up which are actually available in the horse class itself. I still have a lot of errors before I can launch the game, but as far as I can tell having a GUI handler doesn't matter… Which seems odd, but I no longer make a reference to it.
  23. So I have an entity that can be saddled via an inventory slot. This is an error in the entity file: playerEntity.displayGuiScreen(w2theJungle.JUNGLE_GUI_ID, world, this.getEntityId(), 0, 0); The method has been replaced with displayGui calling an IInteractionObject, but vanilla only uses this for blocks. The other error: NetworkRegistry.registerGui(new RaptorInventoryGuiHandler()); The class has moved and the method no longer exists. Will IInteractionObject actually work from entities?
  24. So this is how I have it in 1.12: Method method; for (int i=0; i < JungleTriggerRegistry.TRIGGER_ARRAY.length; i++) { try { method = ReflectionHelper.findMethod(CriteriaTriggers.class, "register", "func_192118_a", ICriterionTrigger.class); method.setAccessible(true); method.invoke(null, JungleTriggerRegistry.TRIGGER_ARRAY[i]); } catch (SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { System.out.println("Failed to register trigger " + JungleTriggerRegistry.TRIGGER_ARRAY[i].getId() + "!"); e.printStackTrace(); } } Reflection helper doesn't exist in 1.13. The reflection class available doesn't seem to have a similar "find method" method. Is there a substitute for this? Is using reflection to do this necessary any more? The method for registering criteria is public, I noticed.
  25. I think he is implying that many mods won't do any data-fixing and so heavily modded games are going to end up having to start brand new worlds. If your server only runs your own mod, then sure, go ahead and look into data-fixing.
×
×
  • Create New...

Important Information

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