Jump to content

Professor_Boxtrot

Members
  • Posts

    9
  • Joined

  • Last visited

Everything posted by Professor_Boxtrot

  1. I did add the feature and structure to a biome, but it was in another file as I thought it was irrelevant, seeing as I did get another non-jigsaw structure to spawn fine. I tried commenting out one of the registries, but the pieces still don't spawn.
  2. I was playing around with structures the other day, and I found that I was able to get one working quite easily. I went on to the next step, and took a look at some other mods/some vanilla structures that use Jigsaw blocks. I put something together, but I'm having trouble getting the structure pieces (even just the starting piece) to spawn in the world. I am able to spawn the individual pieces with a structure block in-game perfectly fine though. The logger shows that it's attempting to spawn the structure, but none of the pieces are ever created. I was wondering if I was doing something wrong with the piece class: public class PathDungeonPieces { public static void start(ChunkGenerator<?> chunkGeneratorIn, TemplateManager templateManagerIn, BlockPos posIn, List<StructurePiece> structurePieces, SharedSeedRandom p_215139_4_) { DungeonMod.LOGGER.info("Adding pieces..."); JigsawManager.addPieces(new ResourceLocation(DungeonMod.MOD_ID, "path_dungeon/center"), 7, PathDungeonPieces.Piece::new, chunkGeneratorIn, templateManagerIn, posIn, structurePieces, p_215139_4_); DungeonMod.LOGGER.info("Pieces added"); } static { JigsawManager.REGISTRY.register(new JigsawPattern(new ResourceLocation(DungeonMod.MOD_ID, "path_dungeon/center"), new ResourceLocation("empty"), ImmutableList.of(Pair.of(new SingleJigsawPiece(DungeonMod.MOD_ID + ":path_dungeon/center"), 1)), JigsawPattern.PlacementBehaviour.RIGID)); JigsawManager.REGISTRY.register(new JigsawPattern(new ResourceLocation(DungeonMod.MOD_ID, "path_dungeon/pieces"), new ResourceLocation("empty"), ImmutableList.of(Pair.of(new ListJigsawPiece(ImmutableList.of(new SingleJigsawPiece(DungeonMod.MOD_ID + ":path_dungeon/path_straight"), new SingleJigsawPiece(DungeonMod.MOD_ID + ":path_dungeon/path_turn_right"), new SingleJigsawPiece(DungeonMod.MOD_ID + ":path_dungeon/path_turn_left"), new SingleJigsawPiece(DungeonMod.MOD_ID + ":path_dungeon/path_end"))), 1)), JigsawPattern.PlacementBehaviour.RIGID)); } public static class Piece extends AbstractVillagePiece { public Piece(TemplateManager templateManagerIn, JigsawPiece jigsawPieceIn, BlockPos posIn, int p_i50560_4_, Rotation rotationIn, MutableBoundingBox boundsIn) { super(FeatureInit.PATH_DUNGEON_PIECE, templateManagerIn, jigsawPieceIn, posIn, p_i50560_4_, rotationIn, boundsIn); } public Piece(TemplateManager templateManagerIn, CompoundNBT nbt) { super(templateManagerIn, nbt, FeatureInit.PATH_DUNGEON_PIECE); } } } And here's my feature init class: @Mod.EventBusSubscriber(bus = Bus.MOD, modid = DungeonMod.MOD_ID) public class FeatureInit { public static final DeferredRegister<Feature<?>> FEATURES = DeferredRegister.create(ForgeRegistries.FEATURES, DungeonMod.MOD_ID); public static IStructurePieceType PATH_DUNGEON_PIECE = PathDungeonPieces.Piece::new; public static final RegistryObject<PathDungeon> PATH_DUNGEON = FEATURES.register("path_dungeon", () -> new PathDungeon(NoFeatureConfig::deserialize)); @SubscribeEvent public static void registerStructurePieces(RegistryEvent.Register<Feature<?>> event) { Registry.register(Registry.STRUCTURE_PIECE, "path_dungeon", PATH_DUNGEON_PIECE); } } And here's my package folder for my dungeon pieces: I have my code and Jigsaw blocks set up exactly how I see other mods/vanilla structures have it. Is there something I'm doing wrong here?
  3. Thanks, there were two things in there that helped me: @OnlyIn(Dist.CLIENT) public int getFoliageColor() { return 10387789; } @OnlyIn(Dist.CLIENT) public int getGrassColor(double posX, double posZ) { return 9470285; }
  4. I've created a biome and played around with some of the properties, but as far as I can tell, there are no up-to-date posts on how to change grass/leaf colour. Does anyone know how to do that?
  5. I took a look at Minecraft's structure files, but they're all just NBT stuff. Couldn't find anything elsewhere, so here I am. I also tried to do "new Structure()" to see what syntax it might use (similar to new Block()) but it just said "Cannot instantiate the type Structure"
  6. I don't really know what I'm doing here, all I have is a bunch of use cases for sounds, and I don't see where I'm supposed to put them or using them for things like replacing default block placing/breaking sounds, music discs etc.
  7. Since there aren't many tutorials out for 1.13 yet, I decided to post here asking for help. I've been wanting to add my own custom sounds to my mod, especially for music discs, how do I go about doing that?
×
×
  • Create New...

Important Information

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