Jump to content

delpi

Forge Modder
  • Posts

    840
  • Joined

  • Last visited

Everything posted by delpi

  1. Is there a way to delete Achievements from a player?
  2. Didn't know about that one. That would be easier than what I've done in the past.
  3. I read another post on this, but it didn't make sense at the time. How do you recommend sync'n any of these values with the client?
  4. To get a custom armor, create a armor item. Usually this is for 4 items, but in this case I just made a hat. Without some of my other classes, this won't work as it is shown, but you should be able to figure out what you need to do it from it. Then you need to make a model. I use Tecne for this, but there are other ways. There are plenty of tutorials out there on it.
  5. There are many ways to do this. Probably the best to start with is Forge's Event Structure. Look up a tutorial on it and then look at the LivingEntityDeath event.
  6. jabelar, I think this 'addCollisionBoxesToList' might change that. I've never looked into it before. Have you? I did a quick call Heirarchy search and it might actually work. It won't work for preventing a mob from walking over a block. It does look like it could prevent a mob from walking through a certain type of block.
  7. Don't have time to read it in depth right now, I'll look later. Two things jumped out at me quick. Why do you have the 'static' designation on your power? There isn't a need. Are you sure 'power' isn't accidentaly used by minecraft already?
  8. Gotta admit I missed 'addCollisionBoxesToList'. That is interesting. I just took a quick look, but I think you are changing the wrong thing in pathfinding. You need to modify the method 'getSafePoint'. It is a private method so you will just have to ovewrite it rather than extend it. But early in the moethod, you just need to check for your block and return null. Under EntityCreature, you will find the method 'updateEntityActionState()'. Several places in it, it calls for 'this.worldObj.getPathEntityToEntity'. This looks at 'getPathEntityToEntity' in the class 'world'. Anyhow, after the brief look, the easiest way to adjust the pathfinding is something they used to call 'coremod', but it isn't something I've played around with. Someone might be able to help you. In the case, you would just insert the line we talked about above in there and it would now work for all entities that use pathfinding. But, since rich was able to introduce us to something simpler, I'd go for that.
  9. Jabelar, The Pre/Post thing depends. The surefire way to know on the event in question is to search through the minecraft code for the hooks. I looked through this for player render. The Pre will prevent the player from rendering. The Post will tell you the render event is over and you can do your own. For example under the doRender method for RenderPlayer Early in the method the following is inserted if (MinecraftForge.EVENT_BUS.post(new RenderPlayerEvent.Pre(par1AbstractClientPlayer, this, par9))) return; Later in the method the following is inserted MinecraftForge.EVENT_BUS.post(new RenderPlayerEvent.Post(par1AbstractClientPlayer, this, par9)); In this case, if you cancel the Pre, the Post will never get called. I've seen in other cases this isn't necessarily true based upon how they set up the hooks. They might have just set a variable false instead of exiting the method.
  10. 1) I like that solution for -999. I have done this in the past by putting a bogus item like a big red X in the slots I didn't want used. If the container saw the player put somethign there, it moved it back to their inventory and replaced the X. If the X was in their inventory it destroyed it, ect. Just another option for you, but as I said, i like the -999 better. 2) I can help you with the render armor. What is it you want to know? 3) can't help at all with that.
  11. You could do the same NBT data look for entity. Probably only interested in ones that are a certain distance from players. Rather than keeping a list, might be easier to search for all most within 50 blocks of the player and applying if their NBT data has the tag.
  12. For the player, just check when you cycle through player list if thye have the tag and then add them to the arraylist if they are not there yet. For Entities, what entities? custom ones or current ones?
  13. Sure, just PM me if you need it. It wasn't that hard to figure out from the vanilla breeding stuff though. The Minecraft programmers should be shot for some of the ridiculously complicated ways they do things, but this one was fairly straight forward.
  14. First off, is there some reason why you are throwing around all the 'final' & 'static' uses? Unless you have to have those, you really shouldn't use them. Did you include what is calling depositItems? I didn't see the code below. Are you absolutely sure you have anything other than what it found in the list you sent it?
  15. Hard to answer when you dont' indicate what it is you are trying to do. In what you listed, no need to look for EntitySkeleton twice.
  16. Given what you are doing, I think you just need to tell the server what the client did. That will make it work. If the client glitches or such, you can add the other, but I don't think you need. I think this is similar to what I use: http://www.minecraftforge.net/wiki/Netty_Packet_Handling
  17. You could try yourself by looking up vanilla blocks you can walk through. Or you can do it the way you won't learn as much and use:
  18. I wrote my own breeding script for a raptor class. It wasn't hard, took about 5 minutes. Look at the vanilla breeding script and adapt it. Your biggest trick will be deciding how to trigger it. On mine i made it to where they tried to breed after chowing down on a live animal instead of the right click event.
  19. I'm not sure if datawatchers work on items or just entities. You could look at that. If not, just write some packets.
  20. Are you talking about the player again? You can write some code to save that list to file and then load again, but why. As you cycle through the players, if they meet the criteria, add a value to their NBT data (player.getEntityData or something like that) for your mod. If they don't meet the criteria remove the tag and take them off your list. If you really want the first, i can give you an example, but the NBT is the way to go.
  21. Look up Wuppy's tutorials on this. It will help a lot. You need to use a tilentity for a really fancy render.
  22. I've never used the getSubItems before. Just looked at it and I didn't immediately spot how it was called (not home so can't use dev environment search). Does this get called everytime the menu comes up? Also it appears to be client side.
  23. Your PlayerTracker is just a class. In it you would have a list of players 'List<Players>' that would be the ones of interest. In your main class set up a reference to the Playertrack and initialize it so you can find it later. Then from your tick method, you can alwasy get to it with instance.PlayerTracker.onTick (where instance is your mod). Inside playertracker have the method 'public void onTick()' In it, check to see if someone should be added or removed from list of players. Also execute your flame code for those in it. If you need to know how to cycle through players logged in
  24. Does this same behavior exists if you grab the item out of creative inventory? I have a setup where I wanted to know how the object was created, so I cycle through the player inventory every so often and apply and NBT tag for normal, creative, creative restricted. Later if they are not in the restricted area, I delete the later. What might be of use, is that i noticed some very odd behavior where i couldn't stack the items depending on where they came from. If I then dropped them or used them in certain crafting stations and then returned them they would stack, but I never really noticed the pattern. I haven't bothered to look into it more because it was a minor annoyance. I think it is probably related though and if we pool our notes, we might figure it out.
  25. I believe you need a custom worldprovder and worldgenerator as you suggested. I have not done this for a village, but I did it for custom ores. I would think it is similar and you might search for that to get started.
×
×
  • Create New...

Important Information

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