-
[1.12.2] MultiBlock Structure Pattern Recognition Best Practices
Ok! ? So if I store the correct blocks in a matrix (static and final) for every configuration, would it be ok? Or is it too much? This structure in particular is a 3x3x3 ?
-
[1.12.2] MultiBlock Structure Pattern Recognition Best Practices
After some trials, I found out a possible solution that I would like to share and get some feedback from both As you said, I have to recognize the unique pieces of the multiblock first. If any of them is missing, I just say "nope, no correct structure". Then, through BlockPos.getAllInBox() or something like that, I get the positions in the N x N x N, and I iterate through them (ignoring the positions of the special ones, that I asserted to be there at this stage) and check if the blocks at the corresponding locations are, for example, casings. Again, if anything is not at its place, then it's not a valid structure. Else, everything is in its place, and the structure is ready let me know
-
[1.12.2] MultiBlock Structure Pattern Recognition Best Practices
Thanks for the answers @Cadiboo @jabelar So, since I wanted to use an energy containment / transfer block (I am working on a Technical Mod) in conjuction with the controller, I could start by checking if and where it is located relative to the controller itself. So, I have to do 4 conditional checks for the x and z axis, both negative and positive, and if I am planning on adding a transfer and a battery with different costs in crafting terms, i need to check separately for both. Is it correct? (I am using Structure classes, Singletons, to hold off 3D Matrixes that contain the correct order of blocks). Just another thing, would it be better to have the structure made of TEs so wherever I click I can open the future GUI of the controller following the Master-Slave principle, or should I make players click just on the controller (which will have a different texture of course) keeping the other blocks of the structure without TEs? (except the transferer / battery, which will have their own GUIs). Thanks again for both your answers!
-
[1.12.2] MultiBlock Structure Pattern Recognition Best Practices
Hi all. I have some TEs ready, with blocks and everything set, and I would like to figure out how to efficiently recognize a multiblock structure with those TEs. As regards mechanics, Master-Slave is just right. But are there any best practices about finding out if a multiblock structure is valid or not? I am currently trying with the for loops for each axis, since I don't think recursion would be much better (It's not a Fluid Tank, so the TEs composing the structure could be different. I could implement recursion, but at the moment I am focusing on solving the structure recognition first). The problem is, the structure controller is not at the perfect center of the Multiblock, and as a result I have to check where the TE block is facing. I don't think this is an efficient solution, and I was hoping someone could lead me in the right direction to figure out a good way to solve this. Thanks in advance!
-
Question about Collision Boxes
Hi Everyone I recently got back to minecraft modding.. and last week I asked something about Techne. I am clearly making a mob, but here s a new dilemma: I would like to make it completely uncollidable. Entities and player should pass through it. I have seen that noppes, in his CustomNPCs, has done something to make it possible. But i really can't get how he does it. Is there someone who knows how to do it? Am I missing something really simple? Thanks in advance.
-
Question about Collision Boxes
Hi Everyone I recently got back to minecraft modding.. and last week I asked something about Techne. I am clearly making a mob, but here s a new dilemma: I would like to make it completely uncollidable. Entities and player should pass through it. I have seen that noppes, in his CustomNPCs, has done something to make it possible. But i really can't get how he does it. Is there someone who knows how to do it? Am I missing something really simple? Thanks in advance.
-
Question about Techne
That's why i said having no animations was normal btw, here are is code: and here are the pics: , . What I am saying is clear if you look at its left shoulder. Thanks again
-
Question about Techne
Hi all I am recently using Techne to create some new mobs.. I have created it, textured it, but when i try to render it in minecraft.. Well, the model appears correctly, there are no animations at the moment, everything normal, but there are some boxes of the model that in techne appear to be correctly rotated, but in game they are wrongly rotated. I was trying to remember if there was some kind of correction i had to do about angles from techne to minecraft.. And I am asking your help to remind me what the problem is Thanks in advance
-
Question about slots and containers
Hello everyone. I'm not used to create containers, and i was wondering if there's a way to set which items can be put in a slot. As an example, I was trying to create a slot which only accepts water buckets. Thanks in advance.
-
[1.7.10] Patching vanilla class
Why am I trying to do that? Because I need a new level of authentication and I need to modify the allowUserToConnect adding a call to my method
-
[1.7.10] Patching vanilla class
Hello everyone, I'm trying to get ServerConfigurationManager properly patched (using a ClassTransformer), but even if the class is correctly recognized by this method http://i.imgur.com/HsVBrh4.png and the patch method is called, the server does not seem to show any change. I'm also patching another method of another class (that can be found both on client and server side) and it's perfectly working so I don't understand why this isn't Emoticon unsure No matter what I change of the target method of ServerConfigurationManager, I can't see any change when recompiled. Moreover, the problem comes only when the source is recompiled, on a dev environment all gets patched. Do you have any ideas about the solution/problem source?
-
[1.7.10] Open GuiScreen on PlayerInteractEvent
God, I feel stupid lol . I focused on the last lines and I forgot to check the first part.. Thanks for helping, man Next time I hope I'll be more careful
-
[1.7.10] Open GuiScreen on PlayerInteractEvent
So, can you please have a look on these lines? I can't upload it on github for personal reasons, sorry I have put System.out.println as a sort of debug, and it prints false. I know that code isn't so good, but I'll clean it after first i need to sort the problem out If you can help me, it would be great
-
[1.7.10] Open GuiScreen on PlayerInteractEvent
As the title says, i'm trying to open a GuiScreen from PlayerInteractEvent. I think the problem is that event.world is WorldServer, and that it doesn't open GuiScreen beacuse this type of Gui is only client side. I perfectly know that through onBlockActivated it works, but I'm curious to know if what I'm asking is possible Thanks in advance, bros.
-
NBT Crafting & Smelting
Not asking about changin' it I fully understand, this was my last try.. You'll find it very strange, but i hate metadata. I don't know why, but I hate it. However, I have to use it.. Thanks for such a fast answer, man
IPS spam blocked by CleanTalk.