In my quest to update ForageCraft to 1.11.2, I've hit a bit of a bump. It seems that getSelectedBoundingBox() doesn't work as it did before. Now, when a scarecrow is placed, it is completely impossible to remove, as no selections box appears when you hover over it. Did something change or am I just dumb?
The Meaning of Life, the Universe, and Everything.
Join Date:
5/28/2014
Posts:
285
Location:
USA
Minecraft:
TheUnderTaker11
Member Details
You just need to return an AxisAlignedBB in the getSelectedBoundingBox(). If you are looking for something more complex than a rectangle though I'm not sure.
Rollback Post to RevisionRollBack
Want a mod with the best magnets available? The download Better Magnets!
And if you like Avaritia then you will love More Avaritia! Adds recipes for creative items from a huge list of mods, and even adds more custom items that fit the Avaritia theme!
The Meaning of Life, the Universe, and Everything.
Join Date:
5/28/2014
Posts:
285
Location:
USA
Minecraft:
TheUnderTaker11
Member Details
Looking at how I did it, all I had to change was the getBoundingBox(). Link to my code
Rollback Post to RevisionRollBack
Want a mod with the best magnets available? The download Better Magnets!
And if you like Avaritia then you will love More Avaritia! Adds recipes for creative items from a huge list of mods, and even adds more custom items that fit the Avaritia theme!
The Meaning of Life, the Universe, and Everything.
Join Date:
5/28/2014
Posts:
285
Location:
USA
Minecraft:
TheUnderTaker11
Member Details
Oh no no no I just saw your code, and you use the coords of your block, that's a no no. The AxisAlignedBB for just a normal cube would be 0,0,0,1,1,1 as the arguments. You should not be using the huge numbers gotten from the coords of the block itself.
As I said, you can look at my code for how I did it.
Want a mod with the best magnets available? The download Better Magnets!
And if you like Avaritia then you will love More Avaritia! Adds recipes for creative items from a huge list of mods, and even adds more custom items that fit the Avaritia theme!
The Meaning of Life, the Universe, and Everything.
Join Date:
5/28/2014
Posts:
285
Location:
USA
Minecraft:
TheUnderTaker11
Member Details
Try making the hitbox just be one block in size, I'm not sure if it works having one block have a bounding box of 2 blocks, which is why mods always have to have a dummy block for their multi-block structure things. Try that and see if it works, and if not show me all your code again, there might be something I'm missing.
Rollback Post to RevisionRollBack
Want a mod with the best magnets available? The download Better Magnets!
And if you like Avaritia then you will love More Avaritia! Adds recipes for creative items from a huge list of mods, and even adds more custom items that fit the Avaritia theme!
Sorry for the long waits between replies, I don't check back here often.
But what does the BlockRenderLayer CUTOUT do? I've never changed it from it's default before, so maybe try commenting that out.
Other than that I've about exhausted all the options I can think of here that is causing the problem. The code you see in my mod works fine and uses a JSON file for the model. If you can't find help anywhere else and worse comes to worse, you might have to start from scratch with the stuff relating to the model and add your code one thing at a time to see what the problem is.
(Also should be noted the breakBlock() should call it's super. If you don't put a tile on the crow then it is meh but regardless I always make sure to call it.)
Rollback Post to RevisionRollBack
Want a mod with the best magnets available? The download Better Magnets!
And if you like Avaritia then you will love More Avaritia! Adds recipes for creative items from a huge list of mods, and even adds more custom items that fit the Avaritia theme!
In my quest to update ForageCraft to 1.11.2, I've hit a bit of a bump. It seems that getSelectedBoundingBox() doesn't work as it did before. Now, when a scarecrow is placed, it is completely impossible to remove, as no selections box appears when you hover over it. Did something change or am I just dumb?
Code: http://pastebin.com/cYz75qSH
My first mod =D
I guess this got buried under all the other threads.
My first mod =D
You just need to return an AxisAlignedBB in the getSelectedBoundingBox(). If you are looking for something more complex than a rectangle though I'm not sure.
Want a mod with the best magnets available? The download Better Magnets!
And if you like Avaritia then you will love More Avaritia! Adds recipes for creative items from a huge list of mods, and even adds more custom items that fit the Avaritia theme!
I'm already doing that, it doesn't seem to work.
My first mod =D
Looking at how I did it, all I had to change was the getBoundingBox(). Link to my code
Want a mod with the best magnets available? The download Better Magnets!
And if you like Avaritia then you will love More Avaritia! Adds recipes for creative items from a huge list of mods, and even adds more custom items that fit the Avaritia theme!
The scarecrow is now breakable, but there is no visible selection box.
My first mod =D
Oh no no no I just saw your code, and you use the coords of your block, that's a no no. The AxisAlignedBB for just a normal cube would be 0,0,0,1,1,1 as the arguments. You should not be using the huge numbers gotten from the coords of the block itself.
As I said, you can look at my code for how I did it.
Want a mod with the best magnets available? The download Better Magnets!
And if you like Avaritia then you will love More Avaritia! Adds recipes for creative items from a huge list of mods, and even adds more custom items that fit the Avaritia theme!
I just changed it to the way you do it, but it only half works. I can break the block now, but the selection box doesn't show up.
My exact code is this:
private final static AxisAlignedBB hitbox = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 2.0D, 1.0D);
My first mod =D
Try making the hitbox just be one block in size, I'm not sure if it works having one block have a bounding box of 2 blocks, which is why mods always have to have a dummy block for their multi-block structure things. Try that and see if it works, and if not show me all your code again, there might be something I'm missing.
Want a mod with the best magnets available? The download Better Magnets!
And if you like Avaritia then you will love More Avaritia! Adds recipes for creative items from a huge list of mods, and even adds more custom items that fit the Avaritia theme!
Still doesnt work
Here is the code. I tried both 1 and 2 for the second y value in the hitbox.
http://pastebin.com/jiKBH05T
My first mod =D
Sorry for the long waits between replies, I don't check back here often.
But what does the BlockRenderLayer CUTOUT do? I've never changed it from it's default before, so maybe try commenting that out.
Other than that I've about exhausted all the options I can think of here that is causing the problem. The code you see in my mod works fine and uses a JSON file for the model. If you can't find help anywhere else and worse comes to worse, you might have to start from scratch with the stuff relating to the model and add your code one thing at a time to see what the problem is.
(Also should be noted the breakBlock() should call it's super. If you don't put a tile on the crow then it is meh but regardless I always make sure to call it.)
Want a mod with the best magnets available? The download Better Magnets!
And if you like Avaritia then you will love More Avaritia! Adds recipes for creative items from a huge list of mods, and even adds more custom items that fit the Avaritia theme!
It's just for rendering. It's used with glass and blocks which you want to be able to see through (believe that explanation is correct).
You are correct, the scarecrow needs that enabled for its coat.
My first mod =D