Jump to content

immortalcatz

Members
  • Posts

    12
  • Joined

  • Last visited

Everything posted by immortalcatz

  1. I still cannot get this one to work for anything, cant find what to put in my accesstransformer to make it visible.
  2. Title says it all. I can't seem to find what .setRegistryName is changed to.
  3. Just wondering if you could put up the fixed code so others could use it... Not sure what part you changed to that.
  4. Found a version of what I was trying to do on github, had to tweak it a bit to make it updated to 1.16.5 tho.... package expanded.blocks; import javax.annotation.Nullable; import expanded.VanillaBuildingBlocks; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.RotatedPillarBlock; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraftforge.common.ToolType; public class CustomLog extends RotatedPillarBlock { public CustomLog(Properties properties) { super(properties); } @Override @Nullable public BlockState getToolModifiedState(BlockState state, World world, BlockPos pos, PlayerEntity player, ItemStack stack, ToolType toolType) { Block block = state.getBlock(); if (block == VanillaBuildingBlocks.acacia_log) { return VanillaBuildingBlocks.stripped_acacia_log.defaultBlockState(); } else if (block == VanillaBuildingBlocks.spruce_log) { return VanillaBuildingBlocks.stripped_spruce_log.defaultBlockState(); } else { return super.getToolModifiedState(state, world, pos, player, stack, toolType); } } } in case anyone else needs it.... This is solved now, thanks for all the help. ^^
  5. I guess it would be then.
  6. Not sure how I would do that, should I just make the stripped block extend Block or use something else like RotatdPillarBlock?
  7. how would I do that with the Strippable Log class?
  8. whenever i add more then one log type and i right click it turns into the acacia log, not it's own stripped version.... I'm using vanilla blocks to test it with so I know it's working. *edit: like if I make a spruce and right click with an axe, the spruce log turns into the acacia log, not the stripped version, but the acacia log turns into stripped acacia.
  9. Okay, I got it working correctly now, but I'm not sure how to make it work with multiple blocks. My Block Code: package expanded.blocks; import javax.annotation.Nullable; import expanded.VanillaBuildingBlocks; import net.minecraft.block.BlockState; import net.minecraft.block.RotatedPillarBlock; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraftforge.common.ToolType; public class CustomLog extends RotatedPillarBlock { public CustomLog(Properties properties) { super(properties); } @Override @Nullable public BlockState getToolModifiedState(BlockState state, World world, BlockPos pos, PlayerEntity player, ItemStack stack, ToolType toolType) { return toolType == ToolType.AXE ? VanillaBuildingBlocks.acacia_log.defaultBlockState() : null; } }
  10. Ya but I'm not sure how I would actually add/implement it into the class correctly, and then registering the block correctly in my register class.
  11. How would I add that into the class file and which one would that be in?
  12. Can't seem to find much about how to make this work and trying to use code from open source mods doesn't help, Tried using AxeItem.Strippables but that doesn't work either. I'm wondering if there's an easy vanilla way to do this. Googling it doesn't seem to help me either.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.