Jump to content

DePhoegon

Members
  • Posts

    55
  • Joined

  • Last visited

Everything posted by DePhoegon

  1. 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; } }
  2. Just a quick follow up on that.. if hex is 16 base 0-f, how exactly is a - f represented? or is the range 0-9 where what Do is use the 0xffffff for say.. white. or 999999 ?? -- honestly I am unsure where the hex input came from in my head into an int slot.
  3. Ummmm ... this frankly isn't possible. frankly forge is heavily dependent on modifying a process that .. is java only. Which in short words... you'd have to modify the target to the point it isn't java... aka.... it's not forge requiring java... it's Minecraft. -- also, bedrock for windows.. is windows10 only.
  4. I have walked through the Sandblock, which is part of the Falling block.. though there is one question I can't seem to figure out what it does.. or why exactly it's important. dustColorIn -- IT passes an int into ' getDustColor '... but I can't seem to grasp as to what numbers are imporant or what they mean.
  5. I've dug through some of the code attempting to understand how the redstone dust limits power 15. I've found something in RedstoneWireBlock, but I'm not entirely sure how to create a new dust/item that would allow for a signal bigger then 15. i've also worked & created a new Redstone Block, that does act as a redstoneblock w/ the overrides on public int getWeakPower(BlockState blockState, IBlockReader blockAccess, BlockPos pos, Direction side) { return pw; } with pw being a value past 15. I'm ok with it not being possible, but I'd hope to come across a solution that would help make my ideas on my own mod a bit more ... interesting (allowing a compressed redstone block to reach further out on a dust)
×
×
  • Create New...

Important Information

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