Everything posted by Draco18s
-
[1.10.2] EntityItem vanishes after spawning
You need to clone the item stack before dropping it into the world.
-
MC 1.10+ Glass slabs and silk touch [SOLVED]
@Override public boolean isOpaqueCube(IBlockState state) { return false; } @Override public boolean isFullCube(IBlockState state) { return false; } @Override @SideOnly(Side.CLIENT) public BlockRenderLayer getBlockLayer() { return BlockRenderLayer.CUTOUT; }
-
[MC 1.10.2] Extended TNT block does not blow up when fire destroys it.
IBlockAccess is implemented by World.
-
[MC 1.10.2] Extended TNT block does not blow up when fire destroys it.
All three of the methods I mentioned pass a World and BlockPos arguments.
-
[MC 1.10.2] World Generator is not doing any despite being called
By the way, why are you using "chunkx*16" in one place, but "cx" in the others?
-
[MC 1.10.2] World Generator is not doing any despite being called
x >> 4 is division. x << 4 is multiplication.
-
[MC 1.10.2] Extended TNT block does not blow up when fire destroys it.
No. You override those methods on your TNT block so that when one of them is called you make it explode.
-
MC 1.10+ Glass slabs and silk touch [SOLVED]
@Override @SideOnly(Side.CLIENT) public BlockRenderLayer getBlockLayer() { return BlockRenderLayer.CUTOUT; } Use CUTOUT or TRANSLUCENT as appropriate.
-
[1.10.2] Item model - rotate element on x and z axis
Actually, I think it only supports X and Y, no Z no matter what you tell it. Minecraft assumes that rotations on Z are actually rotations on X, plus a 90 degree rotation on Y, and thus ignores it in the json file, as "you really should just simplify that."
-
[1.10.2] Items with metadata dont have textures
This will let you understand the broad strokes, but honestly little about making it work: http://mcforge.readthedocs.io/en/latest/blockstates/forgeBlockstates/ This is very nuts and bolts, but won't explain the broad strokes as to why it's doing what it's doing: https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/hardlib/client/ClientEasyRegistry.java (super methods there call the setRegistryName and GameRegistry.register methods) My code there was put together very much with the help of Choonster, so help yourself. I've been adding to it as I find something new that I want to do that isn't supported by the class yet (e.g. I it won't currently support a block, with variants, and a custom item that only needs to be one variant--say, a bed--as I haven't encountered the need yet).
-
MC 1.10+ Glass slabs and silk touch [SOLVED]
Override protected ItemStack createStackedBlock(IBlockState state)
-
[1.10.2] Changing Item compound tag removes damage?
"Damage not being saved" and "stays 0 on the server" means you're only damaging the item on the client side.
-
[1.10.2] EntityThrowable not causing damage to hit entity
Wrong. http://stackoverflow.com/questions/9748160/why-f-is-placed-after-float-values
-
[1.10.2] Items with metadata dont have textures
I believe so, yes. You can also use Blockstate variants if you want to, rather than multiple separate json files.
-
[MC 1.10.2] Extended TNT block does not blow up when fire destroys it.
You could also override getFlammability, isFlammable, or getFireSpreadSpeed (each called when the fire attempts to spread to that block, at some point) and spawn your lit entity or explosion.
-
[1.10.2] Code Optimization
Uhmm, wrong thread? Don't you mean this one: http://www.minecraftforge.net/forum/index.php?topic=42618.0? ...how'd I manage that? >.<
-
[1.10.2] Code Optimization
[wrong thread] 9.9
-
[MC 1.10.2] World Generator is not doing any despite being called
Posting the crash helps.
-
Pistol Reload Fail
Update to 1.10.2, 1.7 is no longer supported here.
-
[1.8.9] Throwable Item dont work :/
That's because setBlock(x, y, z, block) is now setBlockState(BlockPos, IBlockState)
-
MC 1.10+ How to set different hardness for different block type
Something something, this is why I have to try-catch a chunk of my code, because I specifically want to know what the hardness of a block (and its harvest tool/level) is without having a valid world position to look at (so I pass null for the world and catch the null pointer exception).
-
[1.10.2] Changing Item compound tag removes damage?
How are you damaging the item?
-
[SOLVED] GUI not working
Probably the while loops. Like, their entire existence.
-
[1.10.2] Alter beacon behavior when base is certain material
No that's-- User was banned for coremodding
-
[1.10.2] Assigning data to a chunk?
TL;DR: Chunk data needs to exist in its own native class object during runtime. You only need to save to NBT when the chunk is saved (and then read it when its loaded again). You'll need these events: https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/flowers/FlowerEventHandler.java#L74 (CogOreGenEvent is just a deferred chunk generation event that I must use; you can use the vanilla chunk generation events) And this is what I do with them: https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/flowers/util/OreDataHooks.java There's a lot going on for me (because my data is complex) but the basics is that when the chunk is generated I create some data that gets stored. There's a "get" method for retrieving the stored value as well. Then during ChunkSave the data is added to the chunk's nbt, and on ChunkLoad it's read. At ChunkUnload the data is removed from the runtime storage (so memory isn't leaked by a player flying through the world).
IPS spam blocked by CleanTalk.