Jump to content

theshadowzz

Members
  • Posts

    15
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

theshadowzz's Achievements

Tree Puncher

Tree Puncher (2/8)

2

Reputation

  1. Cool, added a comment for that, hopefully it gets added, it would be useful.
  2. Sure, let me just write this whole entire mod up for you real quick and then I'll get it right to you for you to claim as your own. If you actually want to learn how to do things yourself, look into tile entities, learn Java, and research those other mod's API.
  3. Hi, I'm working on rotating a player's arm under certain conditions. I can't change any of the rotation values for the arms in RenderPlayerEvent.Pre because they later get set by the doRender method itself, and RenderPlayerEvent.Post is, obviously, too late since the model has already been rendered. I figure my two options are to either replace the render class with my own, or use a class transformer to post my own event after the rotations are set. Am I missing an easier option? And if not, out of the two, which would be more mod friendly compatibility wise?
  4. Hi, I'm attempting to use the passengers system in 1.9, but when the entity riding is dismounted, it reverts back to it's original position before riding my entity. Here's the relevant code: Adding a passenger (in my entity): private void handleImpact(){ if (!this.worldObj.isRemote && this.getLassoer() != null && this.getPassengers().isEmpty()) { ArrayList<EntityLivingBase> entities = (ArrayList<EntityLivingBase>) this.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, this.getEntityBoundingBox()); for(int i = 0; i < entities.size(); i++){ if(!entities.get(i).isRiding() && entities.get(i) != getLassoer()){ if (this.toofaraway()) return; entities.get(i).startRiding(this, true); return; } } } } Dismounting the entity (In an item, on right click): if(player.isSneaking() && !lasso.getPassengers().isEmpty()){ for(int i = 0; i < lasso.getPassengers().size(); i++){ lasso.getPassengers().get(i).dismountRidingEntity(); } lasso.removePassengers(); }
  5. Basically, I'm applying a modifier to the player's armor attribute, but the change isn't rendering in gui bar like I assume it should. In GuiScreen, I see that to get the value of the armor points to render it simply does getTotalArmorValue(), which, when I check that value in my own code, shows that it should be at the value I'm modifying it to. Is there somewhere where the value gets changed that I'm missing? Or is there something extra you need to do to change this specific attribute correctly? The rest of the attribute changes I do work fine, including changing maxHealth, which does render correctly in the gui.
  6. Yes, this topic wasn't even supposed to post though, I figured it out while i was typing. I closed out of it, but it posted it anyway. odd.
  7. Hi guys, I have a really strange thing happening when trying to damage a mob found from a raytrace. This: [embed=425,349] if(hit.entityHit != null && hit.entityHit instanceof EntityLivingBase){ System.out.println(hit.entityHit); //Is returning the correct entity ((EntityLivingBase) hit.entityHit).attackEntityFrom(DamageSource.magic, 5F); //Is doing nothing } [/embed] The odd thing is that it's
  8. AttackEntityEvent is called when the mob attacks, LivingAttackEvent is called when the mob IS attacked. In either case, you probably want to do your code in EntityJoinWorld, otherwise you'll end up with the mob's damaged being multiplied by 10 every time it hits something, which could cause some problems
  9. CoolAlias's EventHandler tutorial: http://www.minecraftforum.net/forums/mapping-and-modding/mapping-and-modding-tutorials/1571567-forge-1-6-4-1-8-eventhandler-and SanAndreasP's entity attribute tutorial(scroll to modifying an attribute) http://www.minecraftforge.net/forum/index.php/topic,30137.0.html
  10. Basically, on your keyInput method, instead of checking if the player should get the effect and giving it to them on the client side, as soon as you determine that the button is pressed, send a packet. You technically don't need to send any information here, unless you want to use the same packet type for multiple key presses, in which case you would send something to define which key is pressed. Then, in the packet handler, define what should happen based on what key is pressed. The reason you don't send the potion effect in the packet, or send really any information in the packet other than that the key was pressed is because it's bad practice to trust the client. For instance, if you want to give jump boost when you hit the key and the player is holding a custom item, you could just send a packet to the server saying to give the player a jump boost, but what if the player isn't actually holding the item, the client just thinks it is due to being out of sync or through an exploit? It's always better to just send that the player wants the effect(as in the key is pressed) and then the server will determine if the player should have it, and then give it to the player.
  11. I know the rendering for 1.8 is different from 1.7, so how do I accomplish something similar to where I could change the armor model to a custom one? I don't want to do anything difficult, just changing the size of the ModelBiped that renders the chest, boots and head to the same size as the legs, where should I start looking?
  12. Wow, I forgot the exclamation point. Didn't even see that, thanks, I knew it was something stupid.
  13. So I'm attempting to get around the new restriction on eyeHeight by using setRenderViewingEntity and a camera entity, but I'm having a problem with my entity not gaining motion. It works absolutely fine if I spawn it in with a spawn egg, so I assume I'm making a stupid mistake with how I'm spawning it. It's inside a class where I keep extended properties for the player, and I'm pretty sure it has to have something to do with where I'm getting the world. Is there anything that spawn eggs do that I'm not doing? I believe it's registered correctly, or it shouldn't work with the spawn egg.... I'm very confused with it. None of the code in the entity is interfering with it because I also can't manually spawn this test entity and have the motion update: Let me know if you can shed any insight on the issue!
×
×
  • Create New...

Important Information

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