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.

xchow

Members
  • Joined

  • Last visited

Everything posted by xchow

  1. I was testing if I could reference the item if I had his src files since it was going to be a closed non public mod but heres the full class http://pastebin.com/uNn1aXHX
  2. do you want the whole class? the only lines pertaining to the block are GameRegistry.findItem(FlansMod.MODID, "ak47"); GameRegistry.registerBlock(industrialloot = new IndustrialSpawner("crate", Material.wood), "crate");
  3. Removed the line it might just be how flans works items in content packs this is my current code @Override public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) { ArrayList<ItemStack> drops = new ArrayList<ItemStack>(); drops.add(new ItemStack(Main.ak47, world.rand.nextInt(3) + 1)); drops.add(new ItemStack(Main.morphinebottle, world.rand.nextInt(2) + 1)); drops.add(new ItemStack(Main.ak47)); return drops;
  4. I'm sorry but to explain i've added flans mod to it and i'm trying to get it to drop a ak47 http://pastebin.com/YztMWpmu its only dropping the morphine bottle and not the ak47. I put the GameRegistry.findItem(FlansMod.MODID, "ak47"); in my main class as well if that matters.
  5. what i'm trying to do is
  6. This is hypothetical no code yet but how would I use ore dictionary or a id in a block drop. In my block I'm making it drop percentages of loot and i'm wanting to drop a flans gun. Is there a way to make it drop a ore dictionary item or how would I import the use of his mod id + the name ?
  7. Villager is already registered. I'm asking about spawning the custom villager in the default componets
  8. After looking about does DungeonHooks.addDungeonMob("mob", chance); this work with villages? Like spawning them at a village and chance.
  9. I figured out how to register the villager and getting him to be able to trade but it only works from a spawn egg/spawner without having to make a custom building how to i make it spawn in like the default vanilla doorless hut ?
  10. Ik that I can spawn the villager but how do you spawn it at a preexisting village house in the code?
  11. Well there was no entity class in it. VillagerRegistry.instance().registerVillagerId(; VillagerRegistry.instance().registerVillagerSkin(8, new ResourceLocation("ruffles", "textures/dealer.png")); VillagerRegistry.instance().registerVillageTradeHandler(8, new TradeHandler()); VillagerRegistry.instance().getRegisteredVillagers(); That was all needed to make the villager. Is there a way I could make it just spawn randomly around the world ? or would that require a entity class?
  12. To spawn in the Village, as far as I know, you can only do it with a custom house. If you already have a custom house, override the getVillagerType method in your house's class and make it return the id of your villager. if you don't, I suggest you look at some open source mods that add villager houses to get a feel of how to do it. (TConstruct helped me get mine) Could I make it spawn in a premade village building for example the normal house?
  13. Thanks it worked. do you know how to make it spawn default in the village?
  14. Recently in my mod I started working on a new villager and after doing so I could not figure out to assign new trades to this villager. Registering the villager VillagerRegistry.instance().registerVillageTradeHandler(i, new TradeHandler());} VillagerRegistry.instance().registerVillagerId(; VillagerRegistry.instance().registerVillagerSkin(8, new ResourceLocation("chow", "textures/dealer.png")); VillagerRegistry.instance().getRegisteredVillagers(); In my trade handler for vanilla villagers it goes off case 0 for instance being the farmer. I thought that it being case 8 would represent the id 8 for the custom villager but it still doesn't work. Could anyone help me out with this please?

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.