Jump to content

KidKoderMod033109

Members
  • Posts

    106
  • Joined

  • Last visited

Converted

  • URL
    kidkoder.net

Recent Profile Visitors

2710 profile views

KidKoderMod033109's Achievements

Creeper Killer

Creeper Killer (4/8)

1

Reputation

  1. Hi! I've used `RenderTypeLookup` to set my block to translucent, but I still appears to be rendered as a full block. I've tried using the 3 translucent type and 2 cutout types. Here is my code: private void doClientStuff(final FMLClientSetupEvent event) { RenderTypeLookup.setRenderLayer( BlockInit.ALTAR_BLOCK, RenderType.translucent()); } And my model: Translucent Moving Block and Translucent No Crumbling don't render the block, so I'm sure that the code works, just it's not making the block transparent. Anyway to fix this?
  2. Hi, I'm working on a battery to store power in my mod and would like to the power to be displayed in a tooltip. I'm using this code to change the tooltip: @OnlyIn(Dist.CLIENT) @Override public void addInformation(ItemStack stack, @Nullable World worldIn, List<ITextComponent> tooltip, ITooltipFlag flagIn) { super.addInformation(stack, worldIn, tooltip, flagIn); tooltip.add(new StringTextComponent("Power" + power)); } How can I make it so that the tooltip is different for every item in the inventory? Eg. in slot 1 the battery has 10 power and in slot 2 the battery has 5 power. Then when a battery is destroyed all power is lot Thank in advance
  3. Hi, I'm working on a mod in IntelliJ IDEA, and I've seen people on Eclipse edit their code and update their game, but they didn't restart the modded instance. I'm wondering how I can do this myself? Thanks in advance
  4. The code is here https://github.com/KidKoder09923/SimplyCopper
  5. Hi, I was working on making a TE. But, when I place it down, the game crashes. Here is the crash log: https://gist.github.com/KidKoder09923/2d0ac3ddfd76360d2b825a315615fe4c EDIT: Here is line 23-25: public TileEntity createTileEntity(BlockState state, IBlockReader world) { final TileEntity tileEntity = ModTileEntityTypes.COPPER_CORE.get().create(); return tileEntity; } Thank in advance
  6. Hi, I working on making my Tile Entity store data, but when I tried to override the read function, there was no such thing. Here is my code: public class CopperCoreTileEntity extends TileEntity implements ITickableTileEntity { public int x, y, z; private int power = 0; private int tick; private boolean inited; public CopperCoreTileEntity(TileEntityType<?> tileEntityTypeIn) { super(tileEntityTypeIn); } public CopperCoreTileEntity() { this(ModTileEntityTypes.COPPER_CORE.get()); } public void tick() { if(!inited) init(); tick++; if(tick==6000 && power > 0) { power--; } } private void init() { inited = true; x = this.pos.getX() - 1; y = this.pos.getY() - 1; z = this.pos.getZ() - 1; tick = 0; } @Override public CompoundNBT write(CompoundNBT compound) { compound.put("initvalue", NBTHelper.toNBT(this)); return super.write(compound); } } How do I override the read function? Thanks in advance, Kid Koder
  7. Got it! this(ModTileEntityTypes.COPPER_CORE.get()); Works like a charm(I think. No error are preview in IntelliJ)
×
×
  • Create New...

Important Information

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