Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

goo days

 

i been doing some structures and i wanna this extructures to have villagers and animals,

well i du not now hot to spawn and looks diferent from spawn a bullet or a item

soo long i been triying this

 

video:

 

    Double ex = dpos.getX() + 0.0D;

    Double ey = dpos.getY() + 1.0D;

    Double ez = dpos.getZ() + 0.0D;

   

    Entity aldeano = new EntityVillager( worldIn, 0);

   

    worldIn.spawnEntityInWorld(aldeano );

   

    aldeano.setPosition(ex, ey, ez);

 

this must spawn a town and a villager in the center of the town in front of the church

it shows not erros but the villager is nowhere .

 

*thaths one, the other is how to spawn an villager golem ? i donut know even how they are called inside the code

 

i suppouse the process is the same for every entity  cown or  sheep 

 

* and last i wanna this villager to have  custom trades the other day a read aguide about, but was for the command line i wanna has thath in the code of the town.class

  • Author

hey i get something

 

            EntityChicken entitychicken = new EntityChicken(worldIn);

                    //entitychicken.setGrowingAge(-24000);

                    entitychicken.setLocationAndAngles(dpos.getX(), dpos.getY() + 2, dpos.getZ(), 0.0F, 0.0F);

                    worldIn.spawnEntityInWorld(entitychicken);

 

this trow a chicken in the world where i want, and the villager s

 

                    EntityVillager aldeano = new EntityVillager(worldIn, 1 );

                  // aldeano.setGrowingAge(-24000);

                    aldeano.setLocationAndAngles(dpos.getX(), dpos.getY() + 2  , dpos.getZ(), 0.0F, 0.0F);

                    worldIn.spawnEntityInWorld(aldeano);

 

recipes custom trades is something a dont get yet

http://www.minecraftforum.net/forums/mapping-and-modding/mapping-and-modding-tutorials/2177307-villagers-summoning-villagers-with-custom-shop

but this guide wont work for me 

 

soo i been doing this

 

                    EntityVillager aldeano = new EntityVillager(worldIn, 1 );

                  // aldeano.setGrowingAge(-24000);

                    aldeano.setLocationAndAngles(dpos.getX(), dpos.getY() + 2  , dpos.getZ(), 0.0F, 0.0F);

                   

                    MerchantRecipe merchantrecipe = new MerchantRecipe(

                  new ItemStack(Items.gold_ingot ,1,0 ),

                  new ItemStack(Items.apple,1,0),

                  new ItemStack(ExtructurasMItems.hierbaRojaSemilla,1,0),

                  0, 10000);

                   

MerchantRecipeList merchantrecipeList = new MerchantRecipeList();

 

                                        merchantrecipeList.clear();

 

merchantrecipeList.add(merchantrecipe);

 

aldeano.setRecipes(merchantrecipeList);

   

worldIn.spawnEntityInWorld(aldeano);

 

i think this must create an villager whith just a recipe a gold Ingot whith an apple for one of mi RedHerbSeed's

 

but no the villager spawn in the world whith the custome set of recipe trades

 

 

//////

Help

how i set a custome trade recipe ???

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.