Jump to content

Noxxous

Members
  • Posts

    38
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Location
    Australia

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Noxxous's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I also have a personal theory that even the names of the variables have to be exact. I don't care anymore because I am done
  2. I just copied and pasted from a tutorial and it worked. It was probably because of the rule test variable, the spawn rate being too high and the height difference. I think that the spawn rate's maximum is 50 but I'm not going to do anything else so that I don't become burnt out
  3. I got the json file location right and I've tested it so it does work
  4. It sounds like the names used to distinguish two world generation code is the same, which confuses the system and causes it to crash because that's not how it's supposed to happen. What you could try doing is experimenting with alternative mods by deleting different ones until you find the culprit
  5. Hello, I am currently trying to get custom ore generation to work and I have tried to imitate every last bit of code from the tutorials, I've edited and I have even tried using an older version of Forge but it still isn't working. I have spent hours working on this for nothing public Lightsaber_Main() { IEventBus bus = FMLJavaModLoadingContext.get().getModEventBus(); itemInit.Items.register(bus); BlockInit.Blocks.register(bus); ModSounds.register(bus); configuredFeatureInit.CONFIGURED_FEATURES.register(bus); PlacedFeaturesInit.Placed_Feature.register(bus); MinecraftForge.EVENT_BUS.register(this); } public class configuredFeatureInit { private static final RuleTest END_STONE = new BlockMatchTest(Blocks.STONE); public static final DeferredRegister<ConfiguredFeature<?, ?>> CONFIGURED_FEATURES = DeferredRegister.create(Registry.CONFIGURED_FEATURE_REGISTRY, Lightsaber_Main.MOD_ID); public static final Supplier<List<OreConfiguration.TargetBlockState>> END_KYBER_CRYSTAL_ORE = Suppliers.memoize(() -> List.of( OreConfiguration.target(OreFeatures.STONE_ORE_REPLACEABLES, BlockInit.kyber_crystal_ore.get().defaultBlockState()), OreConfiguration.target(OreFeatures.DEEPSLATE_ORE_REPLACEABLES, BlockInit.kyber_crystal_ore.get().defaultBlockState()) )); public static final RegistryObject<ConfiguredFeature<?, ?>> END_ORE_GENERATION = CONFIGURED_FEATURES.register("kyber_crystal_ore", () -> new ConfiguredFeature<>(Feature.ORE, new OreConfiguration(END_KYBER_CRYSTAL_ORE.get(), 14))); } public class PlacedFeaturesInit { public static final DeferredRegister<PlacedFeature> Placed_Feature = DeferredRegister.create(Registry.PLACED_FEATURE_REGISTRY, Lightsaber_Main.MOD_ID); public static final RegistryObject<PlacedFeature> END_ORE = Placed_Feature.register("kyber_crystal_ore_placed", () -> new PlacedFeature(configuredFeatureInit.END_ORE_GENERATION.getHolder().get(), commonOrePlacement(50, HeightRangePlacement.uniform( VerticalAnchor.aboveBottom(-64), VerticalAnchor.belowTop(319) ) ) ) ); public static List<PlacementModifier> commonOrePlacement(int countPerChunk, PlacementModifier height) { return orePlacement(CountPlacement.of(countPerChunk), height); } public static List<PlacementModifier> orePlacement(PlacementModifier count, PlacementModifier height) { return List.of(count, InSquarePlacement.spread(), BiomeFilter.biome()); } public static List<PlacementModifier> rareOrePlacement(int count, PlacementModifier height) { return orePlacement(RarityFilter.onAverageOnceEvery(count), height); } } add_kyber_crystal_ore.json: { "type": "forge:add_features", "biomes": "#minecraft:is_overworld", "features": "lightsabermod:kyber_crystal_ore_placed", "step": "underground_ores" }
  6. The thing is I want to hit the ground and some fire spawns there
  7. I figured it out, so I decided to help Minecraft.getInstance().player.sendSystemMessage(Component.literal("Blup, bah-bah, blup, blah; blah"));
  8. Hello, I have set it to Setblock Fire and I have tried copying from Flint and Steel and I have changed it to no. 3 flag, but it still burns forever and unloads when you go somewhere else @SubscribeEvent public static void Mine (LeftClickBlock event) { BlockPos bPos = event.getPos(); BlockPos DebugPos = bPos; if ((event.getEntity().getMainHandItem().getItem() == itemInit.lightsaber_on.get() || event.getEntity().getMainHandItem().getItem() == itemInit.lightsaber_off.get())/* && !event.getLevel().isClientSide*/){ if (event.getFace() == Direction.UP || event.getFace() == Direction.DOWN) { for (int i = 1; i > -2; i--) { for (int j = 1; j > -2; j--) { bPos = new BlockPos(DebugPos.getX() + i, DebugPos.getY(), DebugPos.getZ() + j); Minecraft.getInstance().level.setBlock(bPos, BaseFireBlock.getState(Minecraft.getInstance().level, bPos), 3); event.getLevel().gameEvent(event.getEntity(), GameEvent.BLOCK_PLACE, bPos); Minecraft.getInstance().level.setBlock(DebugPos, BaseFireBlock.getState(Minecraft.getInstance().level, DebugPos), 3); event.getLevel().gameEvent(event.getEntity(), GameEvent.BLOCK_PLACE, DebugPos); } } } if (event.getFace() == Direction.NORTH || event.getFace() == Direction.SOUTH) { for (int i = 1; i > -2; i--) { for (int j = 1; j > -2; j--) { bPos = new BlockPos(DebugPos.getX() + i, DebugPos.getY() + j, DebugPos.getZ()); Minecraft.getInstance().level.setBlock(bPos, BaseFireBlock.getState(Minecraft.getInstance().level, bPos), 3); event.getLevel().gameEvent(event.getEntity(), GameEvent.BLOCK_PLACE, bPos); Minecraft.getInstance().level.setBlock(DebugPos, BaseFireBlock.getState(Minecraft.getInstance().level, DebugPos), 3); event.getLevel().gameEvent(event.getEntity(), GameEvent.BLOCK_PLACE, DebugPos); } } } if (event.getFace() == Direction.EAST || event.getFace() == Direction.WEST) { for (int i = 1; i > -2; i--) { for (int j = 1; j > -2; j--) { bPos = new BlockPos(DebugPos.getX(), DebugPos.getY() + i, DebugPos.getZ() + j); Minecraft.getInstance().level.setBlock(bPos, BaseFireBlock.getState(Minecraft.getInstance().level, bPos), 3); event.getLevel().gameEvent(event.getEntity(), GameEvent.BLOCK_PLACE, bPos); Minecraft.getInstance().level.setBlock(DebugPos, BaseFireBlock.getState(Minecraft.getInstance().level, DebugPos), 3); event.getLevel().gameEvent(event.getEntity(), GameEvent.BLOCK_PLACE, DebugPos); } } } Minecraft.getInstance().player.playSound(SoundEvents.GENERIC_DRINK, 1.0f, 1.0f); event.setCanceled(true); } }
  9. Sorry for my ignorance but I don't get the autocomplete and I'm not entirely sure how to do it
  10. Ok so you run the client and then you look at the console and look at the stack trace report but it would be easier for you to just copy paste the whole console report
  11. Hello, I was just wondering how I could get the block the player is looking at
  12. Ok, but how do you find the ServerWorld of the target dimension? I'm having the same problem with Change Dimension except I can't find any class that is associated with any Dimension, and I want to use a custom dimension (using datapack) so I would probably need to the codec but then that's just a RegistryKey so a completely different instance and probably a method from what I remember and I can't think of any terms to find the Dimension class
  13. Thanks my guy. I can see straight away it's permanent storage I want because I want to charge my item (using Redstone, got that sorted). I am very ADHD and can't take medication currently but I read through it a little bit. Just waiting on to be able to get coffee. Anyway thanks
×
×
  • Create New...

Important Information

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