Advertisement
cjcj55

Wandering Cow Entity

Feb 23rd, 2020
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. package com.cjcj55.chrispymod.entity;
  2.  
  3. import com.cjcj55.chrispymod.ChrispyMod;
  4. import com.cjcj55.chrispymod.init.EntitiesInit;
  5.  
  6. import net.minecraft.item.MerchantOffers;
  7. import net.minecraft.util.ResourceLocation;
  8. import net.minecraft.world.World;
  9.  
  10. public class WanderingCowEntity extends AbstractWanderingCowEntity
  11. {
  12. public WanderingCowEntity(World worldIn)
  13. {
  14. super(EntitiesInit.WANDERING_COW, worldIn);
  15. }
  16.  
  17. @Override
  18. public ResourceLocation getTexture()
  19. {
  20. return new ResourceLocation(ChrispyMod.MOD_ID, "textures/entity/wandering_cow.png");
  21. }
  22.  
  23. @Override
  24. protected void populateTradeData()
  25. {
  26. MerchantOffers offers = this.getOffers();
  27. this.addTrades(offers, WanderingCowTrades.WANDERING_COW.get(BASE_TRADES), Math.max(4, this.rand.nextInt(6) + 1));
  28. this.addTrades(offers, WanderingCowTrades.WANDERING_COW.get(RARE_TRADES), Math.max(2, this.rand.nextInt(3) + 1));
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement