Jump to content

delpi

Forge Modder
  • Posts

    840
  • Joined

  • Last visited

Everything posted by delpi

  1. You need to create your own explosion code if you want a perfect circle. If you want to see a really weird fun hole, knock it up to 50.
  2. I tried again tonight to combat this by modifying some of my setup code and strip it down. Still getting the error. It doesn't seem to crash the server or cause anything, but I don't like that much error spam. Anyone got an idea?
  3. I'm having an odd issue. Sometimes when I go through my custom portals, the player immediately take damage like something hit me. The player jumps with knockback and this sometimes lands in lava or a long fall. i've looked at the destination and the player is arriving inside the center of the portal block, not in one of the frame blocks. Anyone had experience with this? Part of code actually moving the player.
  4. Look at the Blaze Code and extend/override as necessary. Plenty of tutorials on how to make an entity.
  5. I sent you a PM with some material in it that may help.
  6. I have create a fair number of custom entities without any errors or oddities popping up, except for this last one. I created a CopyCat mob. Basically it will pretend to be any player that has been on the server before. It has their skin, gear, and displays their name. Everything works fine, but I get an error on minecraft whenever this mob's dimensions is unloaded and then reloaded. The error states the entity is in an unexpected spot 0,0,0. It doesn't crash the game or stop the mob from spawning, but I can't confirm whether it destroys instances of the mob that existed before unload or not. Its a rare spawn and I just haven't witnessed it yet. The differences in the code from my others mobs are that it extends entitymob instead of something line entitycreper and I added a datawatcher. Is there something that needs to be added like telling the mob to despawn or such? I'll be happy to post the code, but I dont' know what to post because I don't think the error is in what I have. I think it is in what I don't have. All that is there is the stuff to make the skin and gear initiate and the datwatcher. The rest of the class is just empty as its using the stuff extended from entitymob.
  7. Out of curiosity, could I ask why? What are you planning on doing with it?
  8. Good information. I use eclipse but didn't know that trick.
  9. Fantastic explanation!! Thanks. I got in the habit with events of having different event handlers for the Client/Common(server) proxies to avoid any confusion over which side it is. Found it easier later on to troubleshoot on changes. Might be a usefull strategies for others. Did you help with the Forge Coding or just reason this out?
  10. I wasn't for sure in his case it would be the same with a custom bucket so I gave him a more general approach, but by all means try that as well.
  11. If you put a block or light source down in the vicinity after restart and remove it, does it fix it? Or is it stuck?
  12. In my case, I was trying to stop from dropping or picking up lava/water in certain areas. I found the first fire of the event was clicking on a block. The 2nd was the bucket. On the first fire, it has the block location, on the 2nd, it was 0,0,0 or null in some fields. If I had to guess the pattern, I bet the 2nd event is the right one on yours. How to detect, you need to look for some fields to be null or empty. Again, from what you reported, I bet that event.entityPlayer (or its inventory) is null on the one you do not want so you can ignore it and just use the other one. Let me know if that works.
  13. Ummm, it put the change into the base Minecraft code? That doesn't sound like a winner.
  14. Looked up DataWatcher and find some examples out there. I used it on one of my entities and it works like a charm.
  15. I played around with this for a flashlight effect one time and had the same issues you were experiencing where i couldn't get it to go away. Never did figure out how to do it with skyblocks. If you do, please share. What I ended up doing was creating a block that decayed and went away in X ticks. My flashlight would place that block. You could do something similar with putting a block where the entities head is assuming it is originally an air block. This has limitations if the mob is near a vine, in water, ect. Not the best of solutions.
  16. I ran into something interesting on interact events recently. Put a log or print method at the top of your mod and see how many times it is running when you right click. I am betting that it is running twice. I had this occur when i was working with anti-greifing code for buckets. If it is that things are runnign twice, some of the variables were null on the 2nd run and I had to play with it to detect this and act only on the pass of interest. This was not a client/server duplicity, it was actually running twice on the server.
  17. One thing that jumps out at me is that I see "BlockPortal" several times. Are you sure you changed all the needed references? I'm not sure about the player logic for portals not being specific. I thought I remembered it looking for the standard blocks, but it has been awhile. At the time, it frustrated me a bunch, so I ended up writing completely custom portal logic. I recently rewrote it for large portals. If you don't give this solved, PM me and i'll help you out with a bit of it.
  18. As mentioned above it works so I don't think we need a new event. Just have to deal with it firing that 2nd time and realizing it the bucket.
  19. This isn't that hard. I created my own backpacks. In the tiles you can set max stack size. You just have to deal with only letting someone picking up 64 rather than you entire stack.
  20. I'll give you an alternative idea that assumes one bloke per player. On the savenbt method in the tile, check for the owner to be online and save its nbt to the player. Then you never need to mess with the rest.
  21. I can understand why you would think it is the client. I did at first. It isn't. I tested it. It is on the Server Tab of the debug and it returns from testing that it is the server.
  22. I figured out the problem. This was very wierd and maybe it will help others. What I am doing when the PlayerInteractEvent fires is to look for where the block that was impacted is at and determine if it is in a certain region. It worked great for placing blocks, setting things on fire, ect. It doesn't work for buckets though. Then I noticed when you right click with a bucket, the PlayerInteractEvent fires twice. The first time, the location is good. The second time x/y/z are all ZERO! The first one cancels correctly but doesn't stop the fluid drop dropping or picking up. The 2nd one is the one that has to be cancelled. To fix this, I looked for the type of click to be right click air and I substitue in the players x/y/z instead of the blocks. This works great. I wouldn't have kept looking at this without SanAndreasP' pointer to spur me back to that being the right event. Thanks.
  23. Might be able to do it with damage value or such. Take a look at how it looks at potions.
  24. Don't think so. as long as you maintain the ratio, it will work.
  25. Take a look at the bounding box and some of the other functions like that. I have this done on some custom blocks that I only want visible in Creative. It sort of works. The problem is I can't seem to force the client to re-render. If I log in and out the change occurs, warp, ect. But if I stand there, it doesn't seem to change.
×
×
  • Create New...

Important Information

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