Everything posted by Draco18s
-
[1.11] Making a bush look like a bush.
"parent": "block/cross"
-
[1.11] Print to chat when item is used
Incorrect. Imports are syntactical sugar. They allow you to not need fully qualified names on every reference. Which means, an unused import is not present in compiled code (as all imports are transformed into fully qualified references). However, a single usage of a fully qualified reference (see how imports are compiled) will cause the NoClassDefFoundError to be thrown, unless that usage exists inside a method that is marked @SideOnly(Side.Client) however you can only mark methods as Side-only-client if they themselves are not invoked from common code, as they too are still referenced from the server. (This is why getSubBlocks can be / is marked with side-only-client, because it is only referenced from other side-only-client code).
-
[SOLVED] Trying to count Trees at World Gen : How to iterate through blocks ?
A few things I know: Dirt under a log also detects villager farms. Trees can also sit on top of gravel or in thin air (hooray lakes!)
-
[1.8]Make booleans stay after quitting Minecraft
Because it's only in Local Scope.
-
[1.8]Make booleans stay after quitting Minecraft
It "doesn't work" because it does nothing. Your code literally tells the game to go get the milk out of the fridge, then put it back without doing anything with it. Then you come to the forums and complain that your glass is still empty and that your robot doesn't work. No, your robot is 100% functional, you just gave it a series of instructions that are the equivalent of a NO-OP. "Replace the first word in this sentence with the first word in this sentence." > The first word is "Replace" > Will now replace "Replace" with "Replace" "Replace the first word in this sentence with the first word in this sentence." > Done!
-
[1.8]Make booleans stay after quitting Minecraft
Congradulations, you did nothing with your boolean. You got the current value from the save file, then wrote it back. Good jorb.
-
[1.11] Rendering an Textured Overlay
I don't see anything obvious, but it's been a while since I tried to render any GUI stuff.
-
[1.11] Rendering an Textured Overlay
Why do people keep checking event.isCancelable() ? That's only ever going to return true or false based on the event class and won't ever change. Are you mistaking it for event.isCanceled() ?
-
(Solved)1.11 Item not rendering texture
No, its because Windows is lying to you. Change the name to "asdfasdf.json" and then back to "testitem.json" and resync with Github.
-
[1.11] Spawning Items When Block Is Broken
Assign it to a variable and print it out or use the debugger to figure out what value is coming out of it every time. Odds are you've messed up initializing your random object.
-
[1.11] Spawning Items When Block Is Broken
By "not even the cobble" you mean that you're not getting two cobble stone (the statement outside the if(rand) statement)?
-
[1.11] Spawning Items When Block Is Broken
for(ItemStack stack : event.getDrops()) { //loop over everyting if(stack.getItem() == Item.getItemFromBlock(Blocks.COBBLESTONE)) { //check if each item is cobblestone } }
-
[1.11] Spawning Items When Block Is Broken
You can't use contains in this context. ItemStack does not override equals so it will never find a match.
-
[1.11] Compass with NBT tags to store where it points is getting reset
setCompassSpawn is only called from the client side. You're then saving the NBT client side. When you open the inventory you're requesting the server's copy, which does not contain the NBT. Something something this is why you were using packets before.
-
[1.11] Spawning Items When Block Is Broken
event.getDrops().add(...) Seriously, look at the event object and see what's there.
-
[Unsolved] UnlocalizedName, RegistryName, and ItemArmor
Option 1: pass the string to the class constructor, for example, this. Option 2: call setUnlocalizedName and setRegistryName on the item after it's constructed, for example, this. Both of those are 1.7 (my 1.10 code is set up differently) but give you an idea of what I mean. Btw, the crash reason is obvious: java.lang.IllegalArgumentException: The name tmm:escapemc_ingot has been registered twice
-
[1.10.2][SOLVED]Exception loading model [model] with loader Variant
Because you are trying to register a block that has variants and trying to register those variants for the item model, you can't construct your variant string that way ( "variant="+variant ). You need to get the statemapper property string. Something like this: StateMapperBase b = new DefaultStateMapper(); BlockStateContainer bsc = block.getBlockState(); ImmutableList<IBlockState> values = bsc.getValidStates(); for(IBlockState state : values) { String str = b.getPropertyString(state.getProperties()); registerBlockItemModelForMeta(block, block.getMetaFromState(state), str); } Additionally, your BlockPlainTable has two different properties. You can't just loop over one of those properties and create an item for it: the other property is still required. If you don't want that property to be included, then you need a custom IStateMapper implementation as well.
-
[SOLVED][1.10.2] Rendering Block's Animated Texture
Considering that's where he started....no, no he can't. Block and item textures are animated with vanilla internals (there's no mod-based code involved) and his attempts to latch onto that system hasn't resulted in a clean result.
-
[1.8]Make booleans stay after quitting Minecraft
1) What I gave you is borderline copy-paste-able. 2) Your main mod is still using config1.getBoolean not config1.get 3) If you want to CHANGE THE VALUE DURING THE GAME the code needs to go inside the BUTTON action.
-
[1.10.2][SOLVED]Exception loading model [model] with loader Variant
Do this: Because, as I said, there are multiple possible problems and I made the most informed suggestion that I could. I even explained why you see the error you do. But as I can't see your code, I'm taking shots in the dark.
-
Creating more Minecraft hooks
It should be noted that they are not accepting new features for 1.10 anymore, only 1.11
-
[SOLVED][1.10.2] Gui input handled multiple times
Or not remove the buttons from the screen and readd them all the time, and instead do it once, during initGui... https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/industry/client/gui/GuiContainerFilter.java#L48-L49
-
[1.10.2][SOLVED]Exception loading model [model] with loader Variant
Like I said: Caused by: java.io.FileNotFoundException: arpgf:models/item/BlockPlainTable.json Basically all missing variant problems will come with two (or more) errors. The first one is just "we failed to load a variant" followed by another error, which can be a missing model, a malformed json, or that the blockstate file actually didn't have the variant in it. And its possible for more than one of these to be thrown as well (for example, the item variant of a block will throw both the "missing variant in blockstate" error AND the "file not found" error because the game attempts to locate it in both places, if it finds one, no error is thrown, but if it finds neither, then both errors are thrown).
-
Method for finding client instance of server entity?
Jesus freaking christ, use a [nobbc]
-
json not working 1.10.2
[me=Draco18s]Looks at his own code[/me] No, no it does not.
IPS spam blocked by CleanTalk.