Everything posted by OrangeVillager61
-
[1.10.2]Custom Villager Trades Information
Uhhhh, you have to look around and hope you see the classes that implement ITradeList.
-
[1.10.2]Custom Villager Trades Information
My question still isn't answered, what are the functions are involved with the trade recipes?
-
[1.10.2]Custom Villager Trades Information
My question is: how to code the trading recipes into the array?
-
[1.10.2]Custom Villager Trades Information
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); } }
-
[1.10.2]Custom Villager Trades Information
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 = { }; }
-
[1.10.2] The import net.minecraft.client.resources.model cannot be resolved.
MrCrayfish has started with 1.9.4 modding tutorials, however this isn't a good website for looking for tutorials. Try the minecraft forums.
-
setPotionEffect has changed 1.8.9 to 1.9.4
Sorry, it's itemfood, currently trying your solution now.
-
.json not working properly
In Minecraft 1.9.4 builtin/generated has changed to item/generated.
-
setPotionEffect has changed 1.8.9 to 1.9.4
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);
-
Porting mod to 1.9.4 from 1.8.9
I want to add stuff from my mod to vanilla generated chests in certain structures.
-
1.9.4 model issues
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 ] } } } ] }
-
Porting mod to 1.9.4 from 1.8.9
Well how does one use loot tables?
-
Porting mod to 1.9.4 from 1.8.9
Also, what happened to chestgenhooks? Was it removed, moved or renamed?
-
1.9.4 model issues
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?
-
Porting mod to 1.9.4 from 1.8.9
I get it now. This looks like it would work. @Override public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos){ return AABB_BLOCK; }
-
Porting mod to 1.9.4 from 1.8.9
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,
-
Porting mod to 1.9.4 from 1.8.9
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); }
-
Porting mod to 1.9.4 from 1.8.9
Okay then what did you mean by it?
-
Porting mod to 1.9.4 from 1.8.9
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); }
-
Porting mod to 1.9.4 from 1.8.9
[me=diesieben07]screams in pain and frustration[/me] Sorry, What happened to MovingObjectPosition was it moved?
-
Porting mod to 1.9.4 from 1.8.9
setHeldItem(MAINHAND, null) does not recognize MAINHAND.
-
Porting mod to 1.9.4 from 1.8.9
Huh, its says that getBoundingBox is deprecated, do you mean getCollisionBoundingBox? Also what is is the destroy function for getHeldItemMainhand ?
-
Porting mod to 1.9.4 from 1.8.9
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.
-
1.9.4 Port
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?
-
1.9.4 Port
There is no more ModelResourceLocation, what is the replacement/renamed version? Is render.block.model it?
IPS spam blocked by CleanTalk.