Everything posted by Draco18s
-
[1.14.3] How to add harvest level to blocks?
Your main class does not extend Block
-
[1.14.3] How to add harvest level to blocks?
What block do you want to have this feature? What class is it represented by? Congrats. Also
-
crashing upon death help please
This is why I am a strong advocate of "read your fucking logs" and "learning to read your fucking logs."
-
[1.13.2] Store value in Block + Advanced Texturing & Colouring
https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/ores/block/ore/BlockHardOreBase.java#L74-L77
-
[1.14.3] Block error
Yeah, Block.Properties. Take a look at existing usage.
-
[1.14.3] Block error
https://stackoverflow.com/questions/4660142/what-is-a-nullreferenceexception-and-how-do-i-fix-it
-
[1.14.3] Confused about custom glass
Check also what properties are being passed to the vanilla block's constructor. Oh and if you're going to do fuckall custom code, you don't need your own class. Just call new on GlassBlock directly.
-
[1.14.3] Block error
Find and post the log file too.
-
[1.12.2] Making my stamina class hack-resistant
If you have specific questions I can answer them, but general "how it works" is outside my ability. I just know that Forge does some magic to attach capabilities to ICapabilityProviders in some fashion.
-
[1.14.3] Looking for what replaced tick in Block.class
Corus fruit uses it. I believe it is an acceptable general use feature, yes.
-
[1.12.2] Exception on createBlockState() method
Would've been nice if you included more than that, but sure, that's sufficient. Problematic code #14
-
[1.12.2] Exception on createBlockState() method
This is the real error: Originating at:
-
[1.12.2] Making my stamina class hack-resistant
Take a look at the classes I use to track cows being milked: https://github.com/Draco18s/ReasonableRealism/tree/1.12.1/src/main/java/com/draco18s/farming/entities/capabilities
-
[1.14.3] Need Ore override a Not-Stone-Block
You can write your own WorldgenMinable class.
-
[1.14.3] Looking for what replaced tick in Block.class
Surely the wheat block has code that runs in some tick-like manner that is the code you want to call. Have you tried looking at the wheat block?
-
[1.14.3] Looking for what replaced tick in Block.class
- [1.12.2] Specify which Container Slot a hopper can take
That is a block without a facing parameter. If you mean one that has a facing property: https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/farming/entities/TileEntityTanner.java#L136- Can't name blocks in minecraft 1.13.2
Post your code- [1.14.2] Step height change not removed when removing armor piece
ItemStacks can't be null.- [1.12.2]Remove all vanilla recipes
What have you tried?- [1.12.2] How would I create a custom furnace?
Capabilities are easy. There's only three or four things you need to do. The first is to remove any existing IInventory code. Then add (in place of ItemStack[]) an ItemStackHandler. You can use one or multiple, depending on how you want to expose these as slots, or collection of slots, in the places that they're used. Next, override getCapability. if (capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY), you return one of your the ItemStackHandler fields. If you want more than one to be exposed, you can merge them with CombinedInvWrapper. Return super for any case you don't handle. Third, override hasCapability and make it return true for any case where you return an ItemStackHandler (and call super for other cases). A lot of modders override this to return this.getCapability(capability, facing) != null; The only "tricky" part is that if you want to expose different slots for different sides or do things like having output-only slots, but that's largely logic. Fourth, you need to update your Gui/Container to use SlotItemHandler (or a subclass thereof) instead of Slot. And a couple of examples: https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/ores/entities/TileEntitySifter.java#L141 https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/ores/inventory/ContainerSifter.java#L27 https://github.com/Draco18s/ReasonableRealism/tree/1.12.1/src/main/java/com/draco18s/hardlib/api/internal/inventory- [1.12.2] Specify which Container Slot a hopper can take
You do it by exposing the TileEntity's item stack handler capability by side. If the hopper can only take the output slot, then you only let it access the output slot when the side being accessed is DOWN. https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/ores/entities/TileEntitySifter.java#L153-L155 Vice versa for the input slot. https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/ores/entities/TileEntitySifter.java#L150-L152- [1.12.2] Blockstate texture change
Because your color property is stored in the TE, the block is not automatically re-rendered when you change that value. You need to inform the client that the value has changed, and re-render the block. https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/farming/entities/TileEntityTanner.java#L95-L98- Get Block from String?
Well, there are two logs: "minecraft:log" and "minecraft:log2" One of them is oak, spruce, jungle, and birch, the other is acacia and dark oak. You're trying to set log2 to oak, which is not an allowed variant.- How best to describe Forge to an audience of programmers
Do be careful though, this is a dark abyss that looks back at you. - [1.12.2] Specify which Container Slot a hopper can take
IPS spam blocked by CleanTalk.
Important Information
By using this site, you agree to our Terms of Use.