Jump to content
  • Home
  • Files
  • Docs
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.15.2] JigsawManager register new structure in village problem
Currently Supported: 1.16.X (Latest) and 1.15.X (LTS)
Sign in to follow this  
Followers 0
grossik

[1.15.2] JigsawManager register new structure in village problem

By grossik, April 27, 2020 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

grossik    0

grossik

grossik    0

  • Stone Miner
  • grossik
  • Members
  • 0
  • 86 posts
Posted April 27, 2020

Hello. I try to generate desert village structure to plains village, but this code not work

    @SubscribeEvent
	public void setup(FMLCommonSetupEvent event){    	
		JigsawPattern old = JigsawManager.REGISTRY.get(new ResourceLocation("minecraft", "village/plains/houses"));
		List<JigsawPiece> shuffled = old.getShuffledPieces(new Random());
		List<Pair<JigsawPiece, Integer>> newPieces = new ArrayList<>();
		for(JigsawPiece p : shuffled){
			newPieces.add(new Pair<>(p, 1));
		}
		newPieces.add(new Pair<>(new SingleJigsawPiece("minecraft:village/desert/houses/desert_tool_smith_1"), 10));
		ResourceLocation something = old.func_214948_a();
		JigsawManager.REGISTRY.register(new JigsawPattern(new ResourceLocation("minecraft", "village/plains/houses"), something, newPieces, PlacementBehaviour.RIGID));
    }

What is wrong?

  • Quote

Share this post


Link to post
Share on other sites

grossik    0

grossik

grossik    0

  • Stone Miner
  • grossik
  • Members
  • 0
  • 86 posts
Posted April 29, 2020

Any idea how to solve this?

  • Quote

Share this post


Link to post
Share on other sites

lisilew    0

lisilew

lisilew    0

  • Stone Miner
  • lisilew
  • Members
  • 0
  • 56 posts
Posted May 9, 2020

I am also trying to add structures to vanilla villages.

If you succeeded, could you please share how you achieved it?

  • Quote

Share this post


Link to post
Share on other sites

grossik    0

grossik

grossik    0

  • Stone Miner
  • grossik
  • Members
  • 0
  • 86 posts
Posted May 10, 2020
11 hours ago, lisilew said:

I am also trying to add structures to vanilla villages.

If you succeeded, could you please share how you achieved it?

https://github.com/grossik/FarmCraft/blob/master/src/main/java/cz/grossik/farmcraft/test/TestStructures.java

  • Quote

Share this post


Link to post
Share on other sites

lisilew    0

lisilew

lisilew    0

  • Stone Miner
  • lisilew
  • Members
  • 0
  • 56 posts
Posted May 11, 2020

TestStructures is not used anywhere in your project.

I see that you register your JigsawPiece under VillagerInit#init.

It seems like you added PlainsVillagePools.init();.

Did it fix your issue and were you able to add structures to vanilla villages?

  • Quote

Share this post


Link to post
Share on other sites

grossik    0

grossik

grossik    0

  • Stone Miner
  • grossik
  • Members
  • 0
  • 86 posts
Posted May 11, 2020
17 hours ago, lisilew said:

TestStructures se nikde v projektu nepoužívá.

Vidím, že zaregistrujete svůj JigsawPiece pod VillagerInit # init .

Zdá se, že jste přidali PlainsVillagePools.init (); .

Opravil váš problém a podařilo se vám přidat struktury do vanilských vesnic?

Oh... sorry

Yes. If you use VillagerInit#init then it will work for you.

 

  • Quote

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

    • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 0
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • diesieben07
      Minecraft forge not fully loading

      By diesieben07 · Posted 20 minutes ago

      1.8 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
    • BastouP
      [1.16.4] Get Overworld save directory

      By BastouP · Posted 20 minutes ago

      Yeah but I am creating a perpheral for computercraft that uses SQL. So i think using a sqlite file would be the easiest way. (You do not need to maintain a server.) However if there is another way I’d be glad to test it. Testing this this evening btw.
    • diesieben07
      [1.16.4] what difference between custom slots and EquipmentSlotType

      By diesieben07 · Posted 21 minutes ago

      All living entities already have an armor and held item inventory, you don't need to add it manually. Look at LivingEntity#getCapability, it will return you IItemHandler instances for those inventories.
    • diesieben07
      [1.15.2] Render as 2D icon in GUI, 3D model in hand

      By diesieben07 · Posted 24 minutes ago

      Good question. I don't know much about rendering, so nothing comes to mind immediately.
    • diesieben07
      Forge unable to find model

      By diesieben07 · Posted 25 minutes ago

      1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  • Topics

    • Fars3O_
      1
      Minecraft forge not fully loading

      By Fars3O_
      Started 3 hours ago

    • BastouP
      3
      [1.16.4] Get Overworld save directory

      By BastouP
      Started 12 hours ago

    • Klarks
      1
      [1.16.4] what difference between custom slots and EquipmentSlotType

      By Klarks
      Started 2 hours ago

    • Woodside
      15
      [1.15.2] Render as 2D icon in GUI, 3D model in hand

      By Woodside
      Started Sunday at 08:26 PM

    • CatSack
      1
      Forge unable to find model

      By CatSack
      Started 11 hours ago

  • Who's Online (See full list)

    • loordgek
    • diesieben07
    • XenoPyax
    • Choonster
    • Rhayzan
    • DevilishPoint
    • MrDuck20
    • Lucie
    • BastouP
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.15.2] JigsawManager register new structure in village problem
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community