• Recently Browsing

    No registered users viewing this page.

  • Posts

    • I tried getting the block under the entity and.... colorInt = targetEntity.world.getBiome(new BlockPos(entityX, entityY, entityZ)).getGrassColor(entityX, entityZ) Expecting, hoping, to get the current shifted color of the grass [also tried this with foliage] but it only seems to return the default colors for grass not shifted for the biome [biome grass color]. What am I missing? Can anyone point me in the right direction? I'm currently working on my own code that uses the temp/humidity to shift the colors but would rather not reinvent the wheel. Thanks
    • I believe this is sending the packet to everyone PacketDistributor.ALL.noArg() You can simply use SimpleChannel#sendToServer()
    • Can't read whatever codeblock you pasted.
    • this is the code where i think weher is the error   package net.luis.cave.world.gen; import net.luis.cave.Cave; import net.luis.cave.init.CaveBlocks; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; import net.minecraft.block.pattern.BlockMatcher; import net.minecraft.world.biome.Biome; import net.minecraft.world.gen.GenerationStage; import net.minecraft.world.gen.feature.Feature; import net.minecraft.world.gen.feature.OreFeatureConfig; import net.minecraft.world.gen.placement.ConfiguredPlacement; import net.minecraft.world.gen.placement.CountRangeConfig; import net.minecraft.world.gen.placement.Placement; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.event.lifecycle.FMLLoadCompleteEvent; import net.minecraftforge.registries.ForgeRegistries; @Mod.EventBusSubscriber(modid = Cave.Mod_Id, bus = Mod.EventBusSubscriber.Bus.MOD) public class OreGen { @SubscribeEvent public static void generateOres(FMLLoadCompleteEvent event) { for (Biome biome : ForgeRegistries.BIOMES) { if (biome.getCategory() == Biome.Category.THEEND) { genOre(biome, 1, 12, 256, 10, OreFeatureConfig.FillerBlockType.create("ENDSTONE", "end_stone", new BlockMatcher(Blocks.END_STONE)), CaveBlocks.ENDERITE_ORE.get().getDefaultState(), 3); } else if (biome.getCategory() == Biome.Category.NETHER) { } else { genOre(biome, 15, 8, 50, 5, OreFeatureConfig.FillerBlockType.NATURAL_STONE, CaveBlocks.JADE_ORE.get().getDefaultState(), 6); genOre(biome, 7, 1, 25, 1, OreFeatureConfig.FillerBlockType.NATURAL_STONE, CaveBlocks.LIMONITE_ORE.get().getDefaultState(), 10); genOre(biome, 2, 1, 65, 1, OreFeatureConfig.FillerBlockType.NATURAL_STONE, CaveBlocks.ROSITE_ORE.get().getDefaultState(), 1); genOre(biome, 5, 4, 9, 1, OreFeatureConfig.FillerBlockType.NATURAL_STONE, CaveBlocks.SAPHIRE_ORE.get().getDefaultState(), 2); } } } private static void genOre(Biome biome, int count, int bottomOffset, int topOffset, int max, OreFeatureConfig.FillerBlockType filler, BlockState defaultBlockstate, int size) { CountRangeConfig range = new CountRangeConfig(count, bottomOffset, topOffset, max); OreFeatureConfig feature = new OreFeatureConfig(filler, defaultBlockstate, size); ConfiguredPlacement config = Placement.COUNT_RANGE.configure(range); biome.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.ORE.withConfiguration(feature).withPlacement(config)); } }  
    • It's called in: private static void commonSetup(FMLCommonSetupEvent event) { DeferredWorkQueue.runLater(() -> { CapCompScreen.register(); PacketHandler.register(); }); } which in turn is called in the Common Proxy class as: final IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus(); modEventBus.addListener(CommonProxy::commonSetup);
  • Topics

  • Who's Online (See full list)