Jump to content

salvestrom

Members
  • Posts

    116
  • Joined

  • Last visited

Everything posted by salvestrom

  1. Not sure which of the titles options is actually my problem, but here the problem is: I have a general blockslab class with two variants: The slabs place and appear correctly in the game world as blocks/slabs. However, as inventory and entity items they are untextured (but correctly named). There's an additional error where the game says it cant find the approprite blockstates for an item baring the name the itemBlock is registered with. (i'm assuming this is where the issue is occuring). This currently removed by using the string "mossy_slab" to register the itemblock. note this has no impact on the ingame issue. My blockstate and model files are copy pastes and so contain no information about inventory or ground states. These seems a potentional solution. The blockSlab class (i'm fairly confident this is in order): The definition and registration: The render: edit: to remove commented out experiments/notes/old code
  2. I can't start my mod up atm, 230+ errors to go still, but it looks like the new entityAiAttackRangedBow class has some conditions that might produce the same effect. we'll see. hopefully.
  3. if anyone has any idea how to do the below in 1.9.4 it would be appreciated. Just to clarify, the below code is part of an entity file. The entity, when aggro'd would display a fully drawn bow. Once fired, the animation would cycle back to fully drawn. When the entity had no target, the bow animation was the default(undrawn). It was largely a reversal of animation order, tied to the entity animation counter. I can see how the bow files getIcon method was update to the addPropertyOverride method, but have no idea how to tap into that from the entity file. I'm not really sure where to go from there.
  4. UPDATE: 1.11.2 version now available. 1.10.2 version now available. 1.9.4 version available now. /UPDATE This is something of an update mod, adding a variety of items, blocks, mobs, structures all with a view to enhancing the jungle experience. Head out to the nearest jungle to get started. link to curse-gaming download: http://mods.curse.com/mc-mods/minecraft/246895-welcome-to-the-jungle#t1:description compatibility: the two new biomes can only be seen using the added world type, but the world type is not required to experience the majority of the mod. dimension id is -42 and clashes with thaumacraft. can be altered in config. the added armour is soulbound, meaning it stays on the player after respawn from death. it is likely going to cause issues with mods like Soulbound. This feature can be disabled in the config. -=- contact me at remusmajora@gmail.com enjoy.
  5. thank you. resetting the hurtResistanceTime to 0 after each attack worked just fine.
  6. this: the game will ignore the second call to attackEntityFrom. Whatever's listed first is it. My objective is to ensure x amount of damage from any of this mobs attacks bypass armour while the rest is physical damage. The above example is an exception where the damage is low and split 50/50. I added similar lines to all the mobs attacks. The mob, a boss, has one exceptionally powerful attack that current armour will not defend well against, forcing the player to use the mod-added armour to stay alive. causing a portion of the damage as magic/generic is intended to ensure the player still does take damage of some amount.
  7. so, yeah. ID-10T issue. the wakeTheDamned() method gives the skeletons a custom bow. the combat tasks method in EntitySkeleton only checks against Items.bow, so the aid has no ranged attack task. eliminating the appropriate line fixed everything, even if i have new stuff to deal with. I will most likely overwrite the combat task method to allow a check for the custom bow. i was staring at it only yesterday and am kicking myself for not managing to put 2 and 2 together. thanks for the troubleshooting.
  8. The problem predates the inclusion of aid.onspawnwithegg. I added that today after seeing it used in similar circumstances for vanilla code. it made no difference. the sac. skel entity has no implimentation of onspawn, anyway. also note that my skeleton, when spawned by other means, behaves correctly. it is only the version summoned by the boss code that is not working correctly. the class: as you can see, theres nothing here but tweaks to code for loot and valid light checks. if it wasn't for an issue with mounted shooting and an abandoned interest in upping their dmg, the ranged attack method wouldn't even be here. is there a chance this is due to an issue with an older forge? my 1.7.10 is a year old, i think.
  9. This code is part of a boss entity. He summons these adds and can pass his attack target to them. But the mobs summoned in this code are largely idle, don't fight back and won't respond to passed threat. In contrast the same skeletons summoned using an egg will happily attack anything that they're told to by the boss. According to the system.out i used, the constructor for the sacrifical skeletons is run, so presumably the super [which calls EntitySkeleton] is too, yet, it's like it isn't.
  10. "Again"?? Anyway, that code in my first post is comprised of three things: 1) the onDeath() method from EntityPlayerMP, which is where the livingDeathEvent hook is and which I am cancelling and overwriting. 2) the dropAllItems() method from InventoryPlayer, which is called in the onDeath() method. I have added it directly into my event overwrite, rather than call it as seperate method. 3) My code which consists of a check if the inventory slot contains my mod armour. It's almost entirely vanilla code, as it appears in the code. I'm using the hook to affect one of only three things it can affect: player inventroy dump. This part was already working before I ever posted. The only hurdle was the fact that the respawn due to death does not copy inventory because in the vanilla game there never is an inventory to copy after death (I didn't get this at the time). You drew my attention to the clone event, which I decided to experiment with ahead of starting from scratch. The clone event provides access to the original inventory, now set by my new version of onDeath() which I can copy using pre-existing methods. That's about all I'm doing. if(I ever get this out there && myCodeBreaksOtherPeoplesMod) { buyDiesieben07Beer == true; }
  11. The only thing my code is not doing from your first reply is pre-storing the items to be spared. It seems redundant given that the clone event is able to transfer over inventory - something that happens naturally on dimension transfer but isn't used on respawn because there's never anything to copy in vanilla. the bus in the main mod file: the event class:
  12. It is functioning. The code in my original post is overriding the inventory dump. The armour is clearly visible still on the hotbar, after death, but before clicking respawn. The clone line is copying whats left once respawn is clicked.
  13. Thanks, the clone event was just what i needed. Edit: just to be clear for anyone reading this later, both spoiler codes are required.
  14. Sooooo... the below code in the spoiler, mostly hijacked from the actual ondeath method and including a modified version of the dropAllItems() method is intended to keep the armours listed on a player when they die. Which it does... at the instant of death, regular items are clearly being ejected while armour in the inventory is kept on the toolbar. Where it all goes wrong is when I hit the Respawn button. At this point everything still on the player is lost. The GuiGameOver class has a line relating to this triggering a method in EntityClientPlayerMP to send a packet labelled "Perform_Respawn" which is where the code descends into a quagmire of functions and lines i do not understand. I've found intriguing lines about clonePlayer and similar stuff to do with recreating inventory, but couldn't find where it's actually called from, let alone if it's what I'm after. Anyway, so close and yet so far.
  15. So I immediately went back to eclipse after posting and tracked where moveentityWithHeading() is called from. Apparently, its in the onLivingUpdate() which is called by onUpdate() which I'm already hooking into. Presumably then, I can cancel, and replace both methods and then rewrite moveE...() to incorporate my custom material...?
  16. creating a custom liquid using material.water is great. except for a few cosmetic issues. one of which is the bubbles and splashes entities make as they run through the custom liquid. this is done by the handleWaterMovement() in the Entity class. I created a LivingUpdateEvent and put in a near duplicate of this method, designed for a custom material. At this point all the watery movement was lost because the moveEntityWithHeading() method is hard coded to check for material.water and lava. I seem to be looking then, at overwriting that method. My attempt to do so failed because the game was adding the movement from my own method to the games moveEntity...() method, while the latter also treated entities as being on the ground. In other words nothing was really solved. So I feel like I'm rebuilding a ferrarri engine for the sake of a new paint job. This is my first mod and I am actually willing to suffer the cosmetic blips if the alternative is something more major, at least, for this go around. I'm too close to being finished, otherwise. Any indication of how to procede would be greatly appreciated.
×
×
  • Create New...

Important Information

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