Everything posted by Draco18s
-
[1.12.2] Inserting Loot tables
This might help: https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/hardlib/util/LootUtils.java If you have questions about specific lines, I'd be more than happy to answer them.
-
[1.12.2] Custom ore generate in cave?
for(int i = 0; i < size; i++) { IBlockState stateAt = world.getBlockState(pos); Block block = stateAt.getBlock(); if(block.getBlockHardness(stateAt, world, pos) == -1) break; world.setBlockState(pos, crystal); pos = pos.offset(shift); } What do you think this loop does?
-
[1.12.2] Custom ore generate in cave?
I don't know what your hollow-out and make-crystal are supposed to be doing. Your crystals are clearly one block in size, so why are you placing several of them at once?
-
Isuse with my alloy furnace
Blocks and Items are all singletons: that is, only one instance of them exists. All those things you see in your inventory? Those are ItemStack instances that simply point to the Item instance and say "I am a copy of that." TileEntities are because Blocks can only store 4 bits of information in the world ("metadata") and in order to have any more than that, it needs to create an Entity (Cows and Zombies are entities too!) in order to store that data.
-
[1.12.2] Custom ore generate in cave?
And the code that does that?
-
[1.12.2] Custom ore generate in cave?
Do you know how to check what block exists in the world? Do that. Find some stone with air above it.
-
[1.12.2] Custom ore generate in cave?
1) You haven't located 2) You don't pass pos to your gen.generate method.
-
[1.12.2] Custom ore generate in cave?
I don't know how that was so hard.
-
[1.12.2] Custom ore generate in cave?
Find a block of stone with air above it. pos = pos.up()
-
[1.12.2] Rendering block as inventory Item
Is your model animated?
-
[1.12.2]i need help with ItemStack
You need to use Capabilities. The data must be stored in the ItemStack (and ItemStacks have capabilities). There are some methods in the Item class that allow you to supply a capability for your own items.
-
[1.12.2]i need help with ItemStack
Problematic Code #9
-
Container problems
1) It is the remaining items after attempting to insert (e.g. you got a stack of 64 wood, but only had room for 32, the remaining 32 are returned). The game crashes if you return null because ItemStacks are @NonNull 2) Not usually. I suppose you could, but why? 3) Those methods are there for subclasses to implement. There are no vanilla (well Forge, actually) subclasses. The Block class does this all the time.
-
Mutliblock validation help
Yep, same thing here. It'll just be tricker to find the "master" block
-
Mutliblock validation help
If someone creates the coke furnace and then removes all the blocks except the one they right clicked, that wouldn't be good, would it?
-
Mutliblock validation help
The shape of your furnace is rotation agnostic. First: find the bock behind the one clicked (you get a facing value, offset by that ejection -1) then just check all the locations from there. Additionally, you'll need to make your blocks invalidate the TE (if it exists) when broken. That will be trickier, but each block can figure it out (or just have the TE periodically validate itself)
-
[1.12.1] How to get variants count
Why are you creating a random metadata? What if the only valid values are 0, 1, 3, 7, and 12?
-
Mutliblock validation help
There is no instance of MultiblockCokeFurnace that you ever need to create, you just have to change the blockstate of the block clicked on so that a TileEntity can be created (this is what hasTileEntity and createTileEntity are for, so you can specify which states of the block have a TE and which don't).
-
Registering Items
Better idea: mod.bedrockbreaker "mod" is not a top level domain (and even if it was, this is a reference to it being a mod)
-
Registering Items
package names are intended to mirror the owner's Web presence. Google uses the com.google prefix because they are Google.com You are not this company: http://bedrock.com
-
Mutliblock validation help
When the block is clicked...you know the exact arrangement you want. Check all of those block positions, if all of them match, success.
-
(Closed) 1.12.2 | How to get a tile entity to detect EntityLivingBase in a 5 block radius
- (Closed) 1.12.2 | How to get a tile entity to detect EntityLivingBase in a 5 block radius
Do you want to detect players or EntityLivingBase? Your post and your title disagree. Second, what about your code doesn't work? Have you tried the debugger?- (Closed) 1.12.2 | How to get a tile entity to detect EntityLivingBase in a 5 block radius
Ok, what's the problem?- [1.12.1] How to get variants count
Ok cool. My code is likely holdover from when I did things in 1.11 (that is: I made it work without getSubItems and when I updated to 1.12, it still worked) - (Closed) 1.12.2 | How to get a tile entity to detect EntityLivingBase in a 5 block radius
IPS spam blocked by CleanTalk.
Important Information
By using this site, you agree to our Terms of Use.