Jump to content

OrangeVillager61

Members
  • Posts

    339
  • Joined

  • Last visited

Everything posted by OrangeVillager61

  1. Uhhhh, you have to look around and hope you see the classes that implement ITradeList.
  2. My question still isn't answered, what are the functions are involved with the trade recipes?
  3. My question is: how to code the trading recipes into the array?
  4. As stated I know how to make custom villagers, I don't know how to put the trades in the ITradeList file. I have added my custom villager file below. package orangeVillager61.MoDrops.villager; import net.minecraft.entity.passive.EntityVillager; import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraftforge.event.entity.EntityEvent; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.registry.VillagerRegistry; import net.minecraftforge.fml.common.registry.VillagerRegistry.VillagerCareer; import net.minecraftforge.fml.common.registry.VillagerRegistry.VillagerProfession; import orangeVillager61.MoDrops.Config; public class SaltTrader{ public static boolean enableSaltTrader = Config.enableSaltTrader; protected static final VillagerRegistry.VillagerProfession PROFESSION = new VillagerRegistry.VillagerProfession("Salt Trader", "minecraft:textures/entity/villager/villager.png", "minecraft:textures/entity/villager/zombie_villager.png"); protected static final VillagerRegistry.VillagerCareer CAREER = new VillagerRegistry.VillagerCareer(PROFESSION, "Salt Trader").addTrade(1, SaltTrader_trades.trades[1]); public static void onInit(FMLInitializationEvent event){ VillagerRegistry.instance().register(PROFESSION); } }
  5. I have figured out how to make a custom villagers, but I don't understand how trades work? I know how to make an ITradeList class but I don't understand how to continue. What I have so far: package orangeVillager61.MoDrops.villager; import net.minecraft.entity.passive.EntityVillager.EmeraldForItems; import net.minecraft.entity.passive.EntityVillager.ITradeList; import net.minecraft.entity.passive.EntityVillager.ListItemForEmeralds; import net.minecraft.entity.passive.EntityVillager.PriceInfo; import net.minecraft.init.Items; import orangeVillager61.MoDrops.items.MoDropsItems; public class SaltTrader_trades { public static final ITradeList[] trades = { }; }
  6. MrCrayfish has started with 1.9.4 modding tutorials, however this isn't a good website for looking for tutorials. Try the minecraft forums.
  7. Sorry, it's itemfood, currently trying your solution now.
  8. In Minecraft 1.9.4 builtin/generated has changed to item/generated.
  9. setPotionEffect has changed with 1.9.4. It doesn't work with the renames of the potion effects. this.setPotionEffect(MobEffects.POISON, 10, 0, 0.6F);
  10. I want to add stuff from my mod to vanilla generated chests in certain structures.
  11. The odd thing is that the regular "full" blocks my mod adds have no problems. { "parent": "md:block/wooden_brine_filter_2full", "display": { "thirdperson": { "rotation": [ 10, -45, 170 ], "translation": [ 0, 1.5, -2.75 ], "scale": [ 0.375, 0.375, 0.375 ] } } } My item model. My block model: (Yes I used MrCrayFish's model creator) { "__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)", "textures": { "particle": "blocks/planks_oak", "0": "blocks/planks_oak" }, "elements": [ { "name": "Cube", "from": [ 0.0, 0.0, 4.0 ], "to": [ 4.0, 12.0, 8.0 ], "faces": { "north": { "texture": "#0", "uv": [ 4.0, 0.0, 8.0, 12.0 ] }, "east": { "texture": "#0", "uv": [ 1.0, 0.0, 5.0, 12.0 ] }, "south": { "texture": "#0", "uv": [ 1.0, 1.0, 5.0, 13.0 ] }, "west": { "texture": "#0", "uv": [ 1.0, 0.0, 5.0, 12.0 ] }, "up": { "texture": "#0", "uv": [ 0.0, 0.0, 4.0, 4.0 ] }, "down": { "texture": "#0", "uv": [ 0.0, 0.0, 4.0, 4.0 ] } } }, { "name": "Cube", "from": [ 0.0, 0.0, 0.0 ], "to": [ 4.0, 12.0, 4.0 ], "faces": { "north": { "texture": "#0", "uv": [ 12.0, 0.0, 16.0, 12.0 ] }, "east": { "texture": "#0", "uv": [ 1.0, 1.0, 5.0, 13.0 ] }, "south": { "texture": "#0", "uv": [ 0.0, 0.0, 4.0, 12.0 ] }, "west": { "texture": "#0", "uv": [ 0.0, 0.0, 4.0, 12.0 ] }, "up": { "texture": "#0", "uv": [ 0.0, 0.0, 4.0, 4.0 ] }, "down": { "texture": "#0", "uv": [ 0.0, 0.0, 4.0, 4.0 ] } } }, { "name": "Cube", "from": [ 0.0, 0.0, 8.0 ], "to": [ 4.0, 12.0, 12.0 ], "faces": { "north": { "texture": "#0", "uv": [ 4.0, 0.0, 8.0, 12.0 ] }, "east": { "texture": "#0", "uv": [ 1.0, 0.0, 5.0, 12.0 ] }, "south": { "texture": "#0", "uv": [ 1.0, 2.0, 5.0, 14.0 ] }, "west": { "texture": "#0", "uv": [ 1.0, 0.0, 5.0, 12.0 ] }, "up": { "texture": "#0", "uv": [ 0.0, 0.0, 4.0, 4.0 ] }, "down": { "texture": "#0", "uv": [ 0.0, 0.0, 4.0, 4.0 ] } } }, { "name": "Cube", "from": [ 0.0, 0.0, 12.0 ], "to": [ 4.0, 12.0, 16.0 ], "faces": { "north": { "texture": "#0", "uv": [ 4.0, 0.0, 8.0, 12.0 ] }, "east": { "texture": "#0", "uv": [ 1.0, 0.0, 5.0, 12.0 ] }, "south": { "texture": "#0", "uv": [ 0.0, 0.0, 4.0, 12.0 ] }, "west": { "texture": "#0", "uv": [ 6.0, 0.0, 10.0, 12.0 ] }, "up": { "texture": "#0", "uv": [ 0.0, 0.0, 4.0, 4.0 ] }, "down": { "texture": "#0", "uv": [ 0.0, 0.0, 4.0, 4.0 ] } } }, { "name": "Cube", "from": [ 4.0, 0.0, 12.0 ], "to": [ 8.0, 12.0, 16.0 ], "faces": { "north": { "texture": "#0", "uv": [ 4.0, 0.0, 8.0, 12.0 ] }, "east": { "texture": "#0", "uv": [ 2.0, 3.0, 6.0, 15.0 ] }, "south": { "texture": "#0", "uv": [ 2.0, 0.0, 5.0, 12.0 ] }, "west": { "texture": "#0", "uv": [ 12.0, 1.0, 16.0, 13.0 ] }, "up": { "texture": "#0", "uv": [ 0.0, 0.0, 4.0, 4.0 ] }, "down": { "texture": "#0", "uv": [ 0.0, 0.0, 4.0, 4.0 ] } } }, { "name": "Cube", "from": [ 8.0, 0.0, 12.0 ], "to": [ 12.0, 12.0, 16.0 ], "faces": { "north": { "texture": "#0", "uv": [ 4.0, 0.0, 8.0, 12.0 ] }, "east": { "texture": "#0", "uv": [ 1.0, 0.0, 5.0, 12.0 ] }, "south": { "texture": "#0", "uv": [ 1.0, 0.0, 4.0, 12.0 ] }, "west": { "texture": "#0", "uv": [ 12.0, 1.0, 16.0, 13.0 ] }, "up": { "texture": "#0", "uv": [ 0.0, 0.0, 4.0, 4.0 ] }, "down": { "texture": "#0", "uv": [ 0.0, 0.0, 4.0, 4.0 ] } } }, { "name": "Cube", "from": [ 12.0, 0.0, 12.0 ], "to": [ 16.0, 12.0, 16.0 ], "faces": { "north": { "texture": "#0", "uv": [ 4.0, 0.0, 8.0, 12.0 ] }, "east": { "texture": "#0", "uv": [ 0.0, 0.0, 4.0, 12.0 ] }, "south": { "texture": "#0", "uv": [ 13.0, 0.0, 16.0, 12.0 ] }, "west": { "texture": "#0", "uv": [ 10.0, 1.0, 14.0, 13.0 ] }, "up": { "texture": "#0", "uv": [ 0.0, 0.0, 4.0, 4.0 ] }, "down": { "texture": "#0", "uv": [ 0.0, 0.0, 4.0, 4.0 ] } } }, { "name": "Cube", "from": [ 12.0, 0.0, 8.0 ], "to": [ 16.0, 12.0, 12.0 ], "faces": { "north": { "texture": "#0", "uv": [ 4.0, 0.0, 8.0, 12.0 ] }, "east": { "texture": "#0", "uv": [ 1.0, 0.0, 5.0, 12.0 ] }, "south": { "texture": "#0", "uv": [ 12.0, 1.0, 15.0, 13.0 ] }, "west": { "texture": "#0", "uv": [ 10.0, 1.0, 14.0, 13.0 ] }, "up": { "texture": "#0", "uv": [ 0.0, 0.0, 4.0, 4.0 ] }, "down": { "texture": "#0", "uv": [ 0.0, 0.0, 4.0, 4.0 ] } } }, { "name": "Cube", "from": [ 12.0, 0.0, 4.0 ], "to": [ 16.0, 12.0, 8.0 ], "faces": { "north": { "texture": "#0", "uv": [ 4.0, 0.0, 8.0, 12.0 ] }, "east": { "texture": "#0", "uv": [ 1.0, 0.0, 5.0, 12.0 ] }, "south": { "texture": "#0", "uv": [ 12.0, 1.0, 15.0, 13.0 ] }, "west": { "texture": "#0", "uv": [ 10.0, 1.0, 14.0, 13.0 ] }, "up": { "texture": "#0", "uv": [ 0.0, 0.0, 4.0, 4.0 ] }, "down": { "texture": "#0", "uv": [ 0.0, 0.0, 4.0, 4.0 ] } } }, { "name": "Cube", "from": [ 12.0, 0.0, 0.0 ], "to": [ 16.0, 12.0, 4.0 ], "faces": { "north": { "texture": "#0", "uv": [ 0.0, 0.0, 4.0, 12.0 ] }, "east": { "texture": "#0", "uv": [ 12.0, 0.0, 16.0, 12.0 ] }, "south": { "texture": "#0", "uv": [ 1.0, 2.0, 4.0, 14.0 ] }, "west": { "texture": "#0", "uv": [ 10.0, 1.0, 14.0, 13.0 ] }, "up": { "texture": "#0", "uv": [ 0.0, 1.0, 4.0, 5.0 ] }, "down": { "texture": "#0", "uv": [ 0.0, 0.0, 4.0, 4.0 ] } } }, { "name": "Cube", "from": [ 8.0, 0.0, 0.0 ], "to": [ 12.0, 12.0, 4.0 ], "faces": { "north": { "texture": "#0", "uv": [ 1.0, 0.0, 5.0, 12.0 ] }, "east": { "texture": "#0", "uv": [ 12.0, 0.0, 16.0, 12.0 ] }, "south": { "texture": "#0", "uv": [ 1.0, 2.0, 4.0, 14.0 ] }, "west": { "texture": "#0", "uv": [ 10.0, 1.0, 14.0, 13.0 ] }, "up": { "texture": "#0", "uv": [ 0.0, 1.0, 4.0, 5.0 ] }, "down": { "texture": "#0", "uv": [ 0.0, 0.0, 4.0, 4.0 ] } } }, { "name": "Cube", "from": [ 4.0, 0.0, 0.0 ], "to": [ 8.0, 12.0, 4.0 ], "faces": { "north": { "texture": "#0", "uv": [ 1.0, 0.0, 5.0, 12.0 ] }, "east": { "texture": "#0", "uv": [ 12.0, 0.0, 16.0, 12.0 ] }, "south": { "texture": "#0", "uv": [ 1.0, 2.0, 4.0, 14.0 ] }, "west": { "texture": "#0", "uv": [ 10.0, 1.0, 14.0, 13.0 ] }, "up": { "texture": "#0", "uv": [ 0.0, 1.0, 4.0, 5.0 ] }, "down": { "texture": "#0", "uv": [ 0.0, 0.0, 4.0, 4.0 ] } } }, { "name": "Cube", "from": [ 0.0, 0.0, 0.0 ], "to": [ 0.0, 0.0, 0.0 ], "faces": { "north": { "texture": "#0", "uv": [ 0.0, 0.0, 0.0, 0.0 ] }, "east": { "texture": "#0", "uv": [ 0.0, 0.0, 0.0, 0.0 ] }, "south": { "texture": "#0", "uv": [ 0.0, 0.0, 0.0, 0.0 ] }, "west": { "texture": "#0", "uv": [ 0.0, 0.0, 0.0, 0.0 ] }, "up": { "texture": "#0", "uv": [ 0.0, 0.0, 0.0, 0.0 ] }, "down": { "texture": "#0", "uv": [ 0.0, 0.0, 0.0, 0.0 ] } } } ] }
  12. Well how does one use loot tables?
  13. Also, what happened to chestgenhooks? Was it removed, moved or renamed?
  14. As you may know I'm porting my mod to 1.9.4. I have been able to test it and there is an issue. The blocks that aren't "full blocks" show as 2-D in the hot bar and is messed up in 3rd person view. Why is this happening?
  15. I get it now. This looks like it would work. @Override public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos){ return AABB_BLOCK; }
  16. public void addCollisionBoxesToList(World worldIn, BlockPos pos, IBlockState state, AxisAlignedBB mask, List list, Entity collidingEntity) { this.getCollisionBoundingBox(state, (0.0F, 0.0F, 0.0F, 1.0F, 0.75F, 1.0F), pos); } Is this closer to the end result? This is somewhat confusing. I replaced getBoundingBox with getCollisionBoundngBox as it returns getBoundingBox,
  17. So you mean something like this: @Override public AxisAlignedBB getCollisionBoundingBox(IBlockState state, World worldIn, BlockPos pos) { return this.getBoundingBox(state, (0.0F, 0.0F, 0.0F, 1.0F, 0.75F, 1.0F), pos); }
  18. Okay then what did you mean by it?
  19. Lastly, is this what you meant for getBoundingBox? public void addCollisionBoxesToList(World worldIn, BlockPos pos, IBlockState state, AxisAlignedBB mask, List list, Entity collidingEntity) { this.getBlockBounds(state, (0.0F, 0.0F, 0.0F, 1.0F, 0.75F, 1.0F), pos); }
  20. [me=diesieben07]screams in pain and frustration[/me] Sorry, What happened to MovingObjectPosition was it moved?
  21. setHeldItem(MAINHAND, null) does not recognize MAINHAND.
  22. Huh, its says that getBoundingBox is deprecated, do you mean getCollisionBoundingBox? Also what is is the destroy function for getHeldItemMainhand ?
  23. Hello, I am porting my mod from 1.8.9 to 1.9.4 and I have an issue. I have a block with many blockstates that "fills" up when right-clicked by a water bucket and then reverts to its initial blockstate when right-clicked when it is in the "full" blockstate. However I have many errors and corrected many of them however a few baffle me. @Override public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ) { if (state.getValue(TYPE) == EnumType.EMPTY){ ItemStack itemstack = playerIn.getCurrentEquippedItem(); if (itemstack.getItem() == Items.WATER_BUCKET){ worldIn.setBlockState(pos, (this.blockState.getBaseState().withProperty(TYPE, EnumType.FULL))); if (!playerIn.capabilities.isCreativeMode) { playerIn.destroyCurrentEquippedItem(); return true; } } My first problem with the code above is that playerIn.destroyCurrentEquippedItem() and playerIn.getCurrentEquippedItem() appear to have been moved but where? Secondly it says that is no function to override onBlockActivated. @Override public boolean isOpaqueCube(){ return false; } @Override public boolean isFullCube() { return false; } public void setBlockBoundsForItemRender() { this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.75F, 1.0F); } public void addCollisionBoxesToList(World worldIn, BlockPos pos, BlockState state, AxisAlignedBB mask, List list, Entity collidingEntity) { this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.75F, 1.0F); super.addCollisionBoxesToList(worldIn, pos, state, mask, list, collidingEntity); isOpapueCude() , .setBlockBounds, addCollisionBoxesToList and isFullCude() appear not exist have they been moved? Also, what is the 1.9.4 replacement for BLockstate? Thanks in advance.
  24. Thank you, I have made great progress on my port. However GameRegistry.registerItem and GameRegistry.registerBlock are deprecated. Why are they deprecated and what is the alternative?
  25. There is no more ModelResourceLocation, what is the replacement/renamed version? Is render.block.model it?
×
×
  • Create New...

Important Information

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