Everything posted by Draco18s
-
1.12 Override did not have an associated owner object
The method signature likely changed. Check the super class for the new signature.
-
[1.10.2] Crash on inserting items
This method: https://github.com/BeardlessBrady/Currency-Mod/blob/master-1.10.2/src/main/java/gunn/modcurrency/mod/container/itemhandler/ItemHandlerVendor.java#L26 is marked non-null. The stack parameter is marked non-null, but yet you check to see if it's null anyway (and if it is, you return it).
-
How to check if material can be replaced.
Yes, you do. isReplacable() isn't checked during world.setBlockState(), it's checked by ItemBlock's onUse action.
-
[1.12] [RESOLVED] Shulker box doesn't generate
That's because you don't need getChunkFromBlockCoords at all. All you need to do is take the spawn coordinates (in block form) and do >>4 on them to get the chunk coordinates. You don't need the chunk, all you want to know is if the current chunk has the same coordinates as the spawn chunk.
-
[1.12] [RESOLVED] Shulker box doesn't generate
Of course not. world.getChunkFromBlockCoords(new BlockPos(spawnX >> 4, world.getSpawnPoint().getY(), spawnZ >> 4)); You said "get me a chunk from block coords" and then passed in chunk coords. Also, the Y value is irrelevant, you should just pass 0 there rather than spending CPU cycles calculating how high up the spawn is, just to pass it into a method that gives no fucks.
-
1.10.2 How to make your block flammable
getFlamability not setFlamability
-
1.10.2 How to make your entity get a potion effect from damage sources.
I have a feeling that what you actually want is to roll the random once and compare its value in each of the five statements.
-
One client side TileEntity getting replaced with a new instance for some reason
Probably not because no one else uses Krolin...sorry, Kotlin to program mods. The fact that onBlockAdded is never called is a complete mystery to us.
-
[1.12]? Registering items with data ids
Only if you naively try to convert from item meta to block meta. But yes.
-
GameRegistry.register problem(beginner)
Or somewhere, at least.
-
(SOLVED) [1.12] Adding custom superflat presets
Don't use Access Transformers, use Reflection instead. ReflectionHelper will do a lot of the gruntwork for you, you just have to make sure to supply both the MCP name (the one you can see) and the SRG name (which can be done by looking it up via MCPbot).
-
[1.12]? Registering items with data ids
Blocks and ItemBlocks aren't the same thing, still. Blocks in the world can only contain metadata (0-15) and nothing else. If you want additional data, you need a TileEntity (NBT does not apply to blocks).
-
[1.12]? Registering items with data ids
Uh. The 0-15 limit is for blocks. Item stacks have a limit of 0-32,000 (and a bit).
-
Set Item Meta Data From NBT
Classic XY Problem. You had a problem X and you thought you could maybe solve it by doing Y, but you encountered another problem you couldn't solve, so you asked how to solve Y when what you really needed was to solve X.
-
Set Item Meta Data From NBT
Are you trying to display the damage indicator bar? (To answer the question asked: no, because NBTdata is data, not code: you would have to either set the metadata when you change the NBTdata or ask the right question, because this sounds like an XY Problem).
-
One client side TileEntity getting replaced with a new instance for some reason
Post your updated code.
-
[1.11.2] (UNSOLVED) Block and Item will not load! HELP!
This is a forum, not a chat room, I'm not hitting F5 every 15 seconds. You need to post your entire json file, I can't tell what the problem is from that.
-
[1.11.2] (UNSOLVED) Block and Item will not load! HELP!
https://jsonlint.com/
-
[1.11.2] (UNSOLVED) Block and Item will not load! HELP!
Your json file is malformed.
-
GameRegistry.register problem(beginner)
Package is irrelevant and only for your own convenience.
-
[SOLVED... KIND OF]Stencil buffer cuts everything
You would have to reset the stencil buffer.
-
[1.12] Figuring out registries
You have to set the ItemBlock's registry name too.
-
[1.12] Figuring out registries
I dunno, maybe block.setRegistryName(...)
-
[1.12] Figuring out registries
Yes
-
How to check if material can be replaced.
You don't want to check if the block is TALLGRASS, that only helps you against tall grass, not snow or other things. You want to check if the block isReplaceable
IPS spam blocked by CleanTalk.