Everything posted by delpi
-
PlayerInteractEvent - Is the player placing or using a block?
I haven't done it this way,but I traced out the code and I think it will work. You will have to test it out. If a block is in the players hand and you want to deny them the ability to place it, set the result of the event to false or: "event.useItem = Result.DENY;" Don't cancel the event. That should block placement of the block only but allow the GUI to open.
-
PlayerInteractEvent - Is the player placing or using a block?
Use the following ItemStack itemstack = player.inventory.getCurrentItem(); you will need to do a null check though. Your statements about client/server appear to be wrong. Probably a Syntax Statement. Why are you using BlockID? I can't tell what you are asking " I also wonder about how you exclude all items and blocks who can be used to place blocks, could you point me to the methods you got in mind to implement this? " Try saying it a different way. There are no items used to place blocks. All Blocks are used to place blocks.
-
Damaging listed Entities?
Your enList is in the item? How is that going to work. You need to store the list in the itemstack.
-
Custom Inventory not working correctly
Just watched your video. The only thing you show is the shift click problem. If you drag the inventory with the cursor and drop it in place, does it work?
-
Custom Inventory not working correctly
With the cat thing, does that mean you didn't get the PM?
-
PlayerInteractEvent - Is the player placing or using a block?
If you were just doing this with a custom block then you could just program it in the block itself. However that does not seem to be the case. You will need to check the event to see what was clicked and what was in hand and decide based upon areas. Its not that hard. Maybe 6 lines of code and you are done. You will need to have your areas defined somehow. That could be a bit more invovled.
-
Custom Armor Render
What you want to do is very doable, including animation. Its not that hard, but finding the right words to search for can be. Look at some of Jabelar's stuff as well. Its for entities mostly, but the concept for rotation and setup will help you enormously. If you want to venture outside of the normal 4 armor slots, now you are getting a bit more exotic. I can help you with that if it comes to it, but for the basic 4 you should be good with the tutorials and Jabelar's stuff.
-
PlayerInteractEvent - Is the player placing or using a block?
Think about it a bit. You know the player involved. Hint - look for what is in his hand. As far as what you are trying to do, its a little unclear. You want to place a block by right clicking it like normal or you want multiple blocks to be placed. No need to do this from events, do it from your custom block. I doubt that is what you are meaning though. Explain more.
-
Custom Inventory not working correctly
OMG, now the buttons work after I sent it the ugly way. Oh the humanity. You should have something in your inbox.
-
Custom Inventory not working correctly
Ok, this is probably a dumb question. How do you get the stupid buttons on a post to work? All of a sudden I can't use the insert picture, spoiler, ect buttons. Makes it really hard to send a PM that won't be annoying as hell.
-
Custom Inventory not working correctly
It could. Do you want me to PM you some of my working stuff?
-
Custom Inventory not working correctly
What I meant by what the graphics does is I'm trying to verify you have the graphics and your code aligned correctly.
-
Custom Inventory not working correctly
That really sounds like the one theory I had. I don't think you have the graphics and the slots lined up. When you made your graphic, which minecraft graphic did you start with? Did you delete the 'extra' space around the sides?
-
[1.7.2][SOLVED(Sort of)]Multiple Achievement Prerequisite?
Not with the standard setup. You could watch on some basis for the first two achievements to be true or whatever pattern you want and then just grant the one you are interested in.
-
[1.7.2][SOLVED]Achievements not showing on custom achievement page
You have a mistake in the following line. achMicrochip = new Achievement("achievement.microchip", "microchip", 0, 0, Microchip, AchievementList.acquireIron).registerStat(); Replce "AcheivementList.acquireIron" with null. Copy/Paste has struck again.
-
[1.7.2] Adding an item slot to the player's inventory?
Create IExtendedEntityProperties for your players and set it to load with a construct event. Create a custom playerInventory implimenting IIventory. Create the saves/loads for this custom inventory in your new properties. Now for the hard part - Create a graphical interface to get to the inventory. If you just want the inventory there to be able to set it with your mod and such no need. If any of the above doe not make sense to you, or you fail to search and find how to do them, Abandon the effort until you can.
-
Custom Inventory not working correctly
Sorry to hear you are still having trouble. I ended up going to sleep last night early. What is your latest code?
-
[1.7.2] Custom Particles - 3rd person
This is really strange I created a custom particle using a custom texture. When you do this, you utilize FXLayer 3 just like TNT. When I change my view to 3rd person looking at my front there are no particles. In 3rd person from behind me or 1st person there are just fine. So, I thought surely I screwed something up, so I looked at the explosion from TNT. It does the exact same thing. Looking at the Tessellator Code and the Effect render code, i'm not seeing where anything looked at point of view. Anybody else had this issue?
-
Custom Inventory not working correctly
I'll post an example of something recent when I get home. I've looked through your stuff and I don't see anything 'wrong'. But its hard to spot.
-
Custom Inventory not working correctly
Some of you are handling where the invenotry is at is going to have issues for saving, but that would cause an issue the next time you open it, not stopping you from clicking on it. Ok, one other thing, are you sure your graphics and your container are lined up right? When you mouse over the item image, doest it color whitish? have you tried clicking aroudn the screen and seeing if you magically pick up the item from somwether the item isn't? I've done that before.
-
Custom Inventory not working correctly
"No...I don't override it in client proxy. I'll change that and the init bit." Hope I didn't mislead, was making sure you were not overriding. As long as you extend your common to client and don't override, that should be fine. I'm going to go back and re-read your stuff in depth and see if I can spot something I missed last time. In the meanwhile, you might add some preint statements to your custom slot to see when it is called and what it thinks it has in it at the time. That should be revealing.
-
Custom Inventory not working correctly
I've never liked that method of doing this using your Common/Client Proxies, but it is a coding style thing. I'm assuming in your client proxy, you are not overriding your get GUI elements. As far as the Pre-Init or Init, I don't think it matters, but move it and see what happens. Lastly, how are you opening the GUI? Exact details. Are you sending a packet to the server and that is what is taking action or... Also, back to your original post. When you say nothing, you can't pick it up with the cursor - which slots can't you pickup? your custom ones, the original player inventory?? If you can pick it up, it isn't saving or it doesn't deposit anywhere?
-
Custom Inventory not working correctly
If you have your Handler setup right, it does it all for you. If you don't, wierd thing happen like you are describing. If you are only registering it on your CommonProxy (depending on your setup), that makes me think you are only registering it on your server side. Anyhow, if you have it registered, you have it opened on your serverside and everything happens on client/server seemlessly. If you try to open it on the client and server manually or with something not quite right, it does wierd stuff. There are tutorials on this if my rambling doesn't help. I don't have access to any of my new stuff from work, but if this doesn't help you, I can post somethign else tonight. This is my handler class. Don't pay attention to the horrible coding, this was from years ago. In your main class for the FMLInitializationEvent, you register it. NetworkRegistry.INSTANCE.registerGuiHandler(this, myguihandler);
-
[1.7.2] Drawing one image but not drawing another
There is a post I had recently about orang color where GreyGhost posted some very helpfull material. Search and read up on it. Before doign anything elaborate, I would boundary your render code inside push/pop calls to make sure that you are not being gifted by some other gl calls.
-
Custom Inventory not working correctly
Where is your registered GUI Handler so that it syncs up the container on the server/client?
IPS spam blocked by CleanTalk.