-
Recently Browsing
No registered users viewing this page.
-
Posts
-
By DarkShadow44 · Posted
I found a way to handle this, using javapoet as you suggested. For those who are interested in how it works, you can take a look at my sample here: https://github.com/DarkShadow44/compatibilitymod/tree/sourcegen Might not work with eclipse yet, but it builds properly. -
By ChampionAsh5357 · Posted
It's fired on the logical client and logical server. Most likely you'll only need to execute the logic on the server. -
By ChampionAsh5357 · Posted
If you're translating individual files, there's not much you can do about it. You could use the updateMappings gradlew task, but that's better for large batches of code. As for JSON item models, that is a much more complicated issue that involves layers and custom transform types. While still possible, the tradeoff isn't really worth it. -
By Spacecraft · Posted
it keeps saying when i i try to install it, it says These libraries failed to download. Try again -
my first problem is onItemUse seems to fire twice , maybe click, and release click? public ActionResultType onItemUse(ItemUseContext context) { World world = context.getWorld(); Direction facing = context.getFace().getOpposite(); BlockPos newPos = context.getPos(); BlockPos pos = newPos; // first use ItemStack iStack = context.getItem(); CompoundNBT nbtTagCompound = iStack.getTag(); if (nbtTagCompound == null) { nbtTagCompound = new CompoundNBT(); iStack.setTag(nbtTagCompound); nbtTagCompound.putBoolean("first", true); nbtTagCompound.putInt("x", pos.getX()); nbtTagCompound.putInt("y", pos.getY()); nbtTagCompound.putInt("z", pos.getZ()); nbtTagCompound.putInt("face", facing.getHorizontalIndex()); return ActionResultType.SUCCESS; } // second use pos = new BlockPos(nbtTagCompound.getInt("x"), nbtTagCompound.getInt("y"), nbtTagCompound.getInt("z") );
-
-
Topics
-
Who's Online (See full list)
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.