Everything posted by Draco18s
-
[1.14.4] Question about world.destoryBlock
world.setBlockState(Blocks.AIR.getDefaultState(), pos, 3); //the 3 is super important part
-
Updating a mod from 1.12 to 1.14
Download the mdk fresh.
-
[1.14.4] Mining a 3x3/Making a Hammer
By the way, absolutely fire those forge events for each block you break. Other mods might have permission restrictions (think land claims that block modification except by the owner) and suchlike. You may also want to check that the block is either the same as the center block or that its harvest level (and tool) is acceptable for your tool.
-
ItemHandler - Allow player extract/insert
No. There is a specific method that has the name getCapability. It is to which Animefan8888 referrs.
-
[1.14.4] Mining a 3x3/Making a Hammer
Override onBlockDestroyed(ItemStack, World, BlockState, BlockPos, LivingEntity) in your hammer's class. You will need a custom class that extends PickaxeItem to do this. In that method figure out which Direction the player is looking and break all the blocks perpendicular to that vector.
-
ItemHandler - Allow player extract/insert
Tile Entities are not Containers. A Tile Entity is the thing-that-is-sort-of-a-block and exists in the world and stores all of the data associated with that instance of that block. A Container is a class that connects a GUI with that TE's contents.
-
Help creating tool items
Usually not. The only reason to create a new class is if you need custom behavior that is different from the parent class. You want a new pickaxe. You want it to function exactly like the existing pickaxes. The only difference is the tool material (the item tier). Which is a parameter to the constructor. Passing a parameter does not require a class.
-
[1.12.2] How can I use subblock?
Somehow your property is null when it gets passed to the BlockStateContainer constructor. Also, you don't need BlockBase. There's already a "base" block class, its called Block.
-
Help creating tool items
new PickaxeItem(...)? Seriously, you don't need to make a new class for it. Also don't make your ItemTier an anonymous class.
-
[1.12.2] How can I use subblock?
I don't know why you commented this out, because you need it.
-
Help with game crash on custom block placement
https://github.com/majicmaj/majcraft/blob/master/src/main/java/com/majicmaj/majcraft/blocks/ArtisianStationTile.java#L54 Create LazyOptionals once. Is unlikely related to your issue, but it is still worth pointing out. See this as to why:
-
Minecraft 1.14.4 Source Code
Use an IDE and make your life so much easier. There's really no reason not to.
-
[SOLVED] Mana game mechanic in 1.14.4 help
....so create one? Like, how hard is it to do this: https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/harderores/entity/AxelTileEntity.java#L28 and https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/harderores/entity/AxelTileEntity.java#L79
-
[SOLVED] Mana game mechanic in 1.14.4 help
What part of "create it ONCE" did you not understand?
-
[1.14.4] what is the purpose of NBT?
s/NBT/JSON if you want to have an easier time understanding it.
-
[SOLVED] Mana game mechanic in 1.14.4 help
You can but you should not. For a variety of reasons.
-
[SOLVED] Mana game mechanic in 1.14.4 help
LazyOptional is the Type that getCapability() returns. Whatever it is that you want to return, it must be a LazyOptional. Whatever type it is that you get from getCapability, it must be a LazyOptional. In order to handle turning something into a LazyOptional or vice versa, you can't do it with a cast, because that's not what casting does.
-
[1.12.2] Coding in a crop gives me "java.lang.IllegalArgumentException" With Blockstates
I forgot that 1.12's BlockBush had a parameterless constructor.
-
[1.12.2] Coding in a crop gives me "java.lang.IllegalArgumentException" With Blockstates
They didn't. That's what the decompiler did because the decompiler doesn't know better because there's multiple different original Java source that compile to the same bytes. The point here is that you shouldn't blindly copy and paste stuff. You should actually understand what it's doing and evaluate if what its doing is the proper way to do things. By copying and pasting you've demonstrated that you lack sufficient knowledge of Java and we don't help with basic Java here. I am entirely within reason to point out stupid shit as being stupid. Cool. Can you post it? The problems I was pointing out could have entirely been the cause of your issue, one way or another, but if its still a problem, its hard to diagnose it without seeing your current code.
-
[SOLVED] Mana game mechanic in 1.14.4 help
No. Does it return an IMana object?
-
[SOLVED] Mana game mechanic in 1.14.4 help
I've got one from 1.12: https://github.com/Draco18s/ReasonableRealism/tree/1.12.1/src/main/java/com/draco18s/farming/entities/capabilities I haven't migrated that code to 1.14 yet, but it should be 99% functional.
-
[SOLVED] Mana game mechanic in 1.14.4 help
They haven't changed. As in, they don't need to change. The documentation remains accurate despite Minecraft having updated because Capabilities are a Forge feature and simply moved forward. There might be some tiny differences here and there where a function name gets changed, but its all stuff easily resolvable just by looking at the classes involved. The event hook hasn't really changed, you just need to find the new method name for rendering a texture on screen. You can figure this out by looking at other classes that render textures on screen.
-
[1.14.4] Unsewing Workbench - problem with block texturing/recipe
There's also tags for ingots, but I don't think modders really create new iron ingots. Also, I generally make my recipes use letters that are somewhat identifiable to what the item is. So instead of "aba" I'd do "iSi" (ingot, shears, ingot; no special meaning between lower and upper case here). But that's purely cosmetic.
-
[1.14.4] Unsewing Workbench - problem with block texturing/recipe
Its called tags. You want it to be usable with any plank, including mod added planks, use tags. That's why tags exist.
-
[1.14.4][SOLVED] drop block inventory on destroy
Yes
IPS spam blocked by CleanTalk.