
raziel23x
Members-
Posts
48 -
Joined
-
Last visited
Converted
-
Gender
Undisclosed
-
Personal Text
I am new!
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
raziel23x's Achievements

Tree Puncher (2/8)
0
Reputation
-
Well now i have the placed item working i am still having issues with the held item package raziel23x.projectskyblock.events; import net.minecraft.block.BlockState; import net.minecraft.client.renderer.color.BlockColors; import net.minecraft.client.renderer.color.ItemColors; import net.minecraft.item.BlockItem; import net.minecraft.world.biome.BiomeColors; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.client.event.ColorHandlerEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; import raziel23x.projectskyblock.ProjectSkyblock; import raziel23x.projectskyblock.utils.RegistryHandler; @Mod.EventBusSubscriber(modid = ProjectSkyblock.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD, value = Dist.CLIENT) public class ClientEvents { @SubscribeEvent public static void registerBlockColors(ColorHandlerEvent.Block event) { BlockColors blockcolors = event.getBlockColors(); blockcolors.register((state, reader, pos, color) -> reader != null && pos != null ? BiomeColors.getWaterColor(reader, pos) : -1, RegistryHandler.WATER_GENERATOR_BLOCK.get()); } @SubscribeEvent public static void registerItemColors(ColorHandlerEvent.Item event) { ItemColors itemcolors = event.getItemColors(); BlockColors blockcolors = event.getBlockColors(); itemcolors.register((stack, i) -> { BlockState state = ((BlockItem)stack.getItem()).getBlock().getDefaultState(); return blockcolors.getColor(state, null, null, i); }, RegistryHandler.WATER_GENERATOR_BLOCK_ITEM.get()); } }
-
Well i tried it this way and when i run the code it crashes so i am scratching my head on this one package raziel23x.projectskyblock.events; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.color.BlockColors; import net.minecraft.world.biome.BiomeColors; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.client.event.ColorHandlerEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; import raziel23x.projectskyblock.ProjectSkyblock; import raziel23x.projectskyblock.utils.RegistryHandler; @Mod.EventBusSubscriber(modid = ProjectSkyblock.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD, value = Dist.CLIENT) public class ClientEvents { @SubscribeEvent public static void registerBlockColors(ColorHandlerEvent.Block event) { BlockColors blockcolors = Minecraft.getInstance().getBlockColors(); blockcolors.register((state, reader, pos, color) -> reader != null && pos != null ? BiomeColors.getWaterColor(reader, pos) : -1, RegistryHandler.WATER_GENERATOR_BLOCK.get()); } }
-
I am currently trying to make the fake watersource block in the center of this model https://gist.github.com/raziel23x/af84f9d7b10f8e8e7974b5d8ac14d4ce to visually look like a minture water still source block but i am unable to figure out in code how to have the color of the texture to change to the correct color of the current biome its placed in and share the same color proteries of the actual water source block i am unsure how to make the calls to biome color in my block https://gist.github.com/raziel23x/63a79110599abcedadb9eab0fbddcbe8 to do so
-
thanks for the help as i gotten this issue resolved again thanks for everything
-
i cant use a bucket on it to get a bucket of lava I have yet to test it with a mod that uses fluid transportation and pulling it to a tank yet
-
Here are some more changes to the code yet i am still not getting it to work even though in theory it should I updated the OP with the updated code
-
I was trying to find some information and documentation about making a lava or water generator like i would do with ItemStack but with Fluids but unable to find much i been following tutorials in making basic items/tools/armor and excited i was able to figure but i started the process but got stuck after getting this far RegistryHandler.java package raziel23x.projectskyblock.utils; import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.tileentity.TileEntityType; import net.minecraftforge.fml.RegistryObject; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.ForgeRegistries; import raziel23x.projectskyblock.ProjectSkyblock; import raziel23x.projectskyblock.blocks.*; public class RegistryHandler { public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, ProjectSkyblock.MOD_ID); public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, ProjectSkyblock.MOD_ID); private static final DeferredRegister<TileEntityType<?>> TILES = DeferredRegister.create(ForgeRegistries.TILE_ENTITIES, ProjectSkyblock.MOD_ID); public static final RegistryObject<Block> LAVA_GENERATOR_BLOCK = BLOCKS.register("lava_generator_block", LavaGeneratorBlock::new); public static final RegistryObject<Item> LAVA_GENERATOR_BLOCK_ITEM = ITEMS.register("lava_generator_block", () -> new BlockItemBaseLavaGenerator(LAVA_GENERATOR_BLOCK.get())); public static final RegistryObject<TileEntityType<LavaGeneratorTile>> LAVAGENERATOR_TILE = TILES.register("lava_generator_block", () -> TileEntityType.Builder.create(LavaGeneratorTile::new, LAVA_GENERATOR_BLOCK.get()).build(null)); public static void init() { ITEMS.register(FMLJavaModLoadingContext.get().getModEventBus()); BLOCKS.register(FMLJavaModLoadingContext.get().getModEventBus()); TILES.register(FMLJavaModLoadingContext.get().getModEventBus()); } } LavaGeneratorBlock.java package raziel23x.projectskyblock.blocks; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.IBlockReader; import javax.annotation.Nullable; public class LavaGeneratorBlock extends Block { public LavaGeneratorBlock(){ super(Properties.create(Material.ROCK) .sound(SoundType.STONE) .hardnessAndResistance(2.0f) ); } @Override public boolean hasTileEntity(BlockState state) { return true; } @Nullable @Override public TileEntity createTileEntity(BlockState state, IBlockReader world) { return new LavaGeneratorTile(); } } LavaGeneratorTile.java package raziel23x.projectskyblock.blocks; import net.minecraft.fluid.Fluids; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.ITickableTileEntity; import net.minecraft.util.Direction; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.fluids.FluidAttributes; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.capability.CapabilityFluidHandler; import net.minecraftforge.fluids.capability.templates.FluidTank; import javax.annotation.Nonnull; import javax.annotation.Nullable; import static raziel23x.projectskyblock.utils.RegistryHandler.LAVAGENERATOR_TILE; public class LavaGeneratorTile extends TileEntity implements ITickableTileEntity { private int tick; public LavaGeneratorTile() { super(LAVAGENERATOR_TILE.get()); } @Override public void tick() { tick++; if (tick == 10) { tick = 0; FluidStack stack = new FluidStack(Fluids.LAVA, Integer.MAX_VALUE); // CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY } } public LazyOptional<FluidTank> fluidHandler = LazyOptional.of(this::createFluidHandler); public FluidTank getFluidHandler() { return fluidHandler.orElseThrow(RuntimeException::new); } @Nonnull @Override public <T> LazyOptional<T> getCapability(@Nonnull Capability<T> cap, @Nullable Direction side) { if (!this.removed) { if (cap == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) { return this.fluidHandler.cast(); } } return super.getCapability(cap, side); } private FluidTank createFluidHandler() { return new FluidTank(FluidAttributes.BUCKET_VOLUME * 8) { @Override protected void onContentsChanged() { markDirty(); } }; } } BlockItemBaseLavaGenerator.java package raziel23x.projectskyblock.blocks; import net.minecraft.block.Block; import net.minecraft.client.util.ITooltipFlag; import net.minecraft.item.BlockItem; import net.minecraft.item.ItemStack; import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.TextFormatting; import net.minecraft.util.text.TranslationTextComponent; import net.minecraft.world.World; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import raziel23x.projectskyblock.ProjectSkyblock; import java.util.List; public class BlockItemBaseLavaGenerator extends BlockItem { public BlockItemBaseLavaGenerator(Block block) { super(block, new Properties().group(ProjectSkyblock.TAB).maxStackSize(1)); } @OnlyIn(Dist.CLIENT) @Override public void addInformation(ItemStack stack, World worldIn, List<ITextComponent> tooltip, ITooltipFlag flagIn) { tooltip.add((new TranslationTextComponent("tip."+ProjectSkyblock.MOD_ID+".LavaGeneratorline1").mergeStyle(TextFormatting.GREEN))); tooltip.add((new TranslationTextComponent("tip."+ProjectSkyblock.MOD_ID+".LavaGeneratorline2").mergeStyle(TextFormatting.YELLOW))); super.addInformation(stack, worldIn, tooltip, flagIn); } } out on my own about a simple cobblegen and though i would try my hand at doing one for water and lava just to see if i can pull it off but cant seem to find much information i am just lost and maybe someone could point me in the right direction
-
https://github.com/MinecraftForge/MinecraftForge/issues/5907 debug is generated but no matter what its always just https://paste.dimdev.org/zaraholobo.sql never any info just the same line over and over again with crashed ones as well as fully functional games with no crashes the debug always reads these lines even if i delete the debug log and rerun forge you can even compare this debug log to the original one that i sent to you after telling you the debug log was useless and not needed and you can see that even this newly generated debug log i just posted as a example which was deleted and freshly created today is a exact copy of the debug log from oct 27th
-
I fixed the issue by changing forge versions and it has both fixed the crash and debug working yet debug just does this C:\fakepath(49,8-56): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them C:\fakepath(55,8-26): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them over and over again with just C:\fakepath(49,8-56): C:\fakepath(55,8-26): the (xx,xx) has differnt numbers
-
the debug file has stopped working like 5 forge versions ago and the last known version of forge where the debug forge file was working is not compatible with most mods anymore so if you want one i will have to downgrade about 40 different mods and then the issue will not be present anymore so again that file will again be not valid and this is a known issue with the debug file and being worked on if you are following the issue tracker on github,,,,,,