Jump to content

Asanmi

Members
  • Posts

    5
  • Joined

  • Last visited

Asanmi's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Yeah, both of those return true, but you did them separately. Write that entire if() statement into a println and you'll see it also always returns True. Separately, you probably want to change if (neighborBlock == Blocks.WHEAT || neighborBlock == Blocks.CARROTS || neighborBlock == Blocks.BEETROOTS || neighborBlock == Blocks.POTATOES || neighborBlock == Blocks.NETHER_WART) to if(neighbourBlock instanceof BlockCrops) which will work for modded crops that use the base Crop for their own.
  2. I didn't even notice the code in the OP! I just started so my Forge knowledge is baby-ish, but the logic definitely seems wrong? You're doing each check separately, and if either of those checks returns TRUE then the entire thing will run. If you want to only destroy the blocks to relative east-west, then you need &&. if (neighborPos != oppPos || neighborPos != facingPos) if( (neighbourPos IS NOT south) OR (neighbourPos IS NOT north) ) = always true if (neighborPos != oppPos && neighborPos != facingPos) if( (neighbourPos IS NOT south) AND (neighbourPos IS NOT north) ) = true only if neighbourPos is relative-east or relative-west
  3. Oh. Would probably be more helpful to paste the code chunk in that case, probably!
  4. It's hard to tell with so little to see, but it looks like you want && instead of || . OR means it will be TRUE if either of the conditions is met, and a position can't be north and south at the same time.
  5. I'm trying to add a colorMultiplier to a block and its itemblock, pulling the color from a cut-down EnumDyeColor for it, because I don't want to make textures and blockstates for every single color variant. The textures all work, everything works except I can't get the actual color to change for either. The particles are properly colored when breaking the blocks so I know it's registered. A chat output on block activation shows BlockColors itself is returning the correct value, so I know the code for that is correct. So I can't figure out where I've gone wrong, or whether I'm missing an obvious thing. Does anything immediately pop out to anyone? Color registration here. BlockState JSON for the block here. Model JSON for the block here.
×
×
  • Create New...

Important Information

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