-
Notifications
You must be signed in to change notification settings - Fork 308
Add charging textures for Bound Tools #1249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 1.12
Are you sure you want to change the base?
Conversation
Also nuked BlockStack and ItemStackWrapper usage in the tools
| for (ItemStack stacks : itemDrops) | ||
| drops.add(ItemStackWrapper.getHolder(stacks)); | ||
| NonNullList<ItemStack> itemDrops = NonNullList.create(); | ||
| blockState.getBlock().getDrops(itemDrops, world, blockPos, world.getBlockState(blockPos), fortuneLvl); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why query the world again? Use the state you already have.
| for (ItemStack stacks : itemDrops) | ||
| drops.add(ItemStackWrapper.getHolder(stacks)); | ||
| NonNullList<ItemStack> itemDrops = NonNullList.create(); | ||
| blockState.getBlock().getDrops(itemDrops, world, blockPos, world.getBlockState(blockPos), fortuneLvl); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
|
|
||
| public class ItemBoundTool extends ItemTool implements IBindable, IActivatable { | ||
| public final int chargeTime = 30; | ||
| public final int MAX_CHARGE_TIME = 30; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
static
| setCreativeTab(BloodMagic.TAB_BM); | ||
| setHarvestLevel(name, 4); | ||
|
|
||
| addPropertyOverride(new ResourceLocation("bloodmagic", "activated"), new IItemPropertyGetter() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BloodMagic.MODID
| } | ||
| }); | ||
|
|
||
| addPropertyOverride(new ResourceLocation("bloodmagic", "charge"), new IItemPropertyGetter() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BloodMagic.MODID
|
|
||
| while (count >= maxStackSize) { | ||
| world.spawnEntity(new EntityItem(world, posToDrop.getX(), posToDrop.getY(), posToDrop.getZ(), stack.toStack(maxStackSize))); | ||
| ItemStack s = stack.copy(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ItemStack s = ItemHandlerHelper.copyStackWithSize(stack, maxStackSize);| if (count > 0) | ||
| world.spawnEntity(new EntityItem(world, posToDrop.getX(), posToDrop.getY(), posToDrop.getZ(), stack.toStack(count))); | ||
| if (count > 0) { | ||
| ItemStack s = stack.copy(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
|
Going to wait until I or somebody else has time to create the rest of the textures needed. Don't know when we're building a new release, and I'd rather not ship anything without those. |
Also nuked BlockStack and ItemStackWrapper usage in the tools.
New textures are needed for the bound tools. (textures not included except for the pick)
Did I do it right this time? :D