Everything posted by Draco18s
-
How to set a custom item name and a custom item name color
Looks fine to me. But I've never used those methods. Does it work?
-
[1.10.2] Adding to an enum not supported by class EnumHelper
You don't need to copy anything at all. The value is meaningless for you.
-
[1.11.2] Armor action when hit
Armor already has a method that's called every tick when the armor is being worn. In that event, apply the potion effect if: a) the potion effect is not currently applied b) the duration is < 20 Then when the armor is taken off, the potion effect will persist for a second or two, and then go away on its own. In so doing, the blinky decay effect from Night Vision still happens when it wears off.
-
How to set a custom item name and a custom item name color
Ah, you're trying to set the item stack NBT data so the item has a custom name, same as if it was renamed in the Anvil? Try looking at the anvil code to see how it applies a name. See also: http://minecraft.gamepedia.com/Player.dat_format#Item_structure
-
[1.8.9] Leaf decay
Something something copy the existing code into your leaf class as an override and change the values?
-
How to set a custom item name and a custom item name color
Where in your repository is this three lines of code located? These supplied lines are no where near enough to figure out what the hell you're even talking about, much less answer your question (and I say "three" because the first one is useless in this context, it creates a local variable that is then unused in the rest of the snippet and could have been omitted).
-
[1.11.2] Armor action when hit
Why do you need it? Just listen for the event all the time, check the damaged entity's current armor, if it's yours, do The Thing.
-
[1.10.2] Adding to an enum not supported by class EnumHelper
I was confused for a bit then realized that this is the ItemBoat class not the EntityBoat class. You have a custom entity. Your entity is different than the EntityBoat class and does not have types. Your Item does not need to extend ItemBoat at all. Just make a new one. What the item class does with that type is pass it to EntityBoat#setBoatType() which your boat isn't going to be paying attention to. So you could either make your own item class that doesn't inherit ItemBoat or pass in literally any type you want your entity is going to ignore it anyway. Edit: Checking my own code when I did a custom minecart... https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/ores/OresBase.java#L161 ...it's null, that field is never assigned a value.
-
[1.11.2] Armor action when hit
The damage source will have the entity that dealt the damage.
-
[1.10.2] [SOLVED] Waila Support with Forge Energy Capabilities
Also you don't need custom packets. At all. TileEntities already have syncronization methods. https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/farming/entities/TileEntityTanner.java#L84 https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/farming/entities/TileEntityTanner.java#L174-L189
-
[1.10.2] [SOLVED] Waila Support with Forge Energy Capabilities
Seriously? Minecraft.getMinecraft().player.getWorld() was too hard?
-
Do you need same forge mod on server AND client?
Blocks need to exist on both sides because the server needs to track it and the client needs to render it!
-
1.10.2 how to make your structure spawn in underground caves.
The thing your thinking of is almost certainly that documentary. That one has been around for a long time. It was made in 2004.
-
[1.10.2] [SOLVED] Waila Support with Forge Energy Capabilities
WAILA doesn't load the container, so the container's synchronization code doesn't work for displaying information to WAILA, ergo, you are not syncing the information except when the player opens the gui by right clicking the block.
-
1.10.2 how to make your structure spawn in underground caves.
Oh that documentary. *Shudder* That thing is just full of wild ridiculous bullshit that they sort of half-rooted in science and half-rooted in a hodge-podge of Eastern and Western mythology. And the result aligns with none of them. The most absurd thing in that film is even presented as hard science: that hydrogen bladders were used for lift. That couldn't be farther from the truth. It would take a balloon ten feet in diameter to lift something a human. Think about that for a minute. I mean, your free to use it as inspiration for a mod, but it's not an authoritative reference on fuckanything. There's a reason the words "mockumentary" and "docufiction" exists.
-
1.10.2 how to make your structure spawn in underground caves.
Curiosity piqued: What wiki?
-
[1.11.2] When creating a new IBlockState does the TileEntity get recreated?
I still don't get why the default behavior is "oh, it's not vanilla, that means it always refreshes!"
-
[1.11.2] Making connected textures
Sorry, the answer is block states. Specifically, the one returned by your block's getActualState() method.
-
1.10.2 how to make your structure spawn in underground caves.
I don't know if worrying about water is a problem. None of the vanilla structures do.
-
Model troubles 1.10.2 :(
oreCopper 1.11.2 requires that all asset file names be lower case. 1.10.2 is less strict, but should be done in any case.
-
Block not properly emitting light
Because it is old and not needed.
-
[SOLVED][1.10.2] Forge's Blockstates question
Get a JSON editor plugin for your IDE, it will catch errors like this. You can also use something like http://jsonlint.com/ to validate your files as well.
-
[1.10.2] getHitVec returning different results in same event firing
Check against the enum directly, presumably you only want to check against the player's Main Hand.
-
[1.8.9] Slabs dropping their item when doubled
And here's the #1 reason why I don't put my construction-y stuff in two separate classes (main class or GTFO). That way I can control the creation order of any given block or item that needs to reference a different block or item. Seeds -> Crops (or Crops -> Seeds), ores -> ore drops, etc. And that's when I'm using a generic class that handles the same sorts of actions but slightly different, if I'm doing a one-off or two-off I'll just hard code the getItemDropped method to reference the item field in my main class.
-
[1.10.2] Placing door from player interact event
Blocks.DOOR.getDefaultState() The method isn't static, therefor you need an instance and where do you find that? The Blocks class. Where all the instances are stored.
IPS spam blocked by CleanTalk.