Ummm So it accepts an 'alpha' value? X.x I swear some things are obtuse to be obtuse.
--(also it seems to have accepted 0xffffff just fine.. though it took a while to suspend meh block as it's got all the same properties of sand.)
-- I still would have had questions, though the first one would have made 100x more sense.
I had not seen the value, and I had only backtraced from 'SandBlock' to 'FallingBlock' to 'Block', for the proper overrides & inclusions for tooltips, and was unsure of the 'valid' input range as I know that some like light level can accept greater than 15, but creates a weird visual effect past 15.
--- also, thanks for the prodding I found an something I think might be an interesting way to enable/disable falling on blocks of sand. it was always a real shame that sand & gravel have such nice particles & no real way to suspend them.
I apparently did not find the 'blocks' java class for minecraft til just now.
-- followed the extends back... but I apparently didn't think to follow them forward again to see where it was used to view the official uses as an example [Honestly I didn't think it would be in there]
--------------------------------------------------------------------
also, so I'm not unclear this is what my 'sand' constructor looks like. {Use to look like}
package com.dephoegon.reclaim.aid.block;
import com.dephoegon.reclaim.aid.util.kb;
import net.minecraft.block.SandBlock;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.item.ItemStack;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.StringTextComponent;
import net.minecraft.world.IBlockReader;
import javax.annotation.Nullable;
import java.util.List;
public class sand extends SandBlock {
private static String tip0;
private static String tip1;
private static String tip2;
public sand(int dustColorIn, Properties properties, String normtoolTip, String shiftToolTip, String ctrlToolTip) {
super(dustColorIn, properties);
if (normtoolTip != "") { tip0 = normtoolTip; } else { tip0 = null; }
if (shiftToolTip != "") { tip1 = shiftToolTip; } else { tip1 = null; }
if (ctrlToolTip != "") { tip2 = ctrlToolTip; } else { tip2 = null; }
}
@Override
public void addInformation(ItemStack stack, @Nullable IBlockReader worldIn, List<ITextComponent> tooltip, ITooltipFlag flagIn)
{
-- snipped -- LongStory Short, logic to display tooltip & avoidance of null values and problems for blocks that don't get assigned a tooltip
}
}
& this is what 'for now my sand block(s) look like [also the 2,2 was just a holder till I looked it up for sure.. though I found where they are.. and I can do that easier now]
package com.dephoegon.reclaim.block.sand;
import com.dephoegon.reclaim.aid.block.sand;
import com.dephoegon.reclaim.aid.util.registration;
import com.dephoegon.reclaim.reclaim;
import net.minecraft.block.AbstractBlock;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.item.BlockItem;
import net.minecraft.item.Item;
import net.minecraftforge.common.ToolType;
import net.minecraftforge.fml.RegistryObject;
import java.util.function.Supplier;
public class altcolor {
public static final RegistryObject<Block> WHITE_SAND = register("white_sand",
() -> new sand(0xffffff, AbstractBlock.Properties.create(Material.SAND)
.hardnessAndResistance(2,2)
.harvestLevel(1).harvestTool(ToolType.SHOVEL),"","",""));
public static void register() { }
public static <T extends Block> RegistryObject<T> register(String name, Supplier<T> block) {
RegistryObject<T> exit = registration.BLOCKS.register(name, block);
registration.ITEMS.register(name, () -> new BlockItem(exit.get(),
new Item.Properties().group(reclaim.RECLAIM_COMPRESSION)));
return exit;
}
}