Skip to content

Commit

Permalink
Added rabbit meat, rabbit-killer skin chance
Browse files Browse the repository at this point in the history
  • Loading branch information
dotpixel committed Jul 23, 2019
1 parent 60ea88d commit 0fbe43d
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
4 changes: 3 additions & 1 deletion generateResources.py
Expand Up @@ -378,6 +378,7 @@ def zipfolder(zip_name, target_dir):
'horse_meat',
'pheasant',
'venison',
'rabbit',
'cooked_beef',
'cooked_pork',
'cooked_chicken',
Expand All @@ -387,7 +388,8 @@ def zipfolder(zip_name, target_dir):
'cooked_calamari',
'cooked_horse_meat',
'cooked_pheasant',
'cooked_venison'
'cooked_venison',
'cooked_rabbit'
]

# Special 'hardcoded' cases
Expand Down
Expand Up @@ -8,22 +8,13 @@
import javax.annotation.Nullable;
import javax.annotation.ParametersAreNonnullByDefault;

import net.dries007.tfc.Constants;
import net.dries007.tfc.util.LootTableListTFC;
import net.dries007.tfc.util.calendar.CalendarTFC;
import net.minecraft.block.Block;
import net.minecraft.block.BlockCarrot;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.IEntityLivingData;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.EntityAILookIdle;
import net.minecraft.entity.ai.EntityAIPanic;
import net.minecraft.entity.ai.EntityAISwimming;
import net.minecraft.entity.ai.EntityAIWanderAvoidWater;
import net.minecraft.entity.ai.EntityAIWatchClosest;
import net.minecraft.entity.ai.EntityJumpHelper;
import net.minecraft.entity.ai.EntityMoveHelper;
import net.minecraft.entity.ai.*;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
Expand All @@ -34,11 +25,7 @@
import net.minecraft.network.datasync.DataSerializers;
import net.minecraft.network.datasync.EntityDataManager;
import net.minecraft.pathfinding.Path;
import net.minecraft.util.DamageSource;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.SoundEvent;
import net.minecraft.util.*;
import net.minecraft.util.datafix.DataFixer;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.Vec3d;
Expand All @@ -48,6 +35,10 @@
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

import net.dries007.tfc.Constants;
import net.dries007.tfc.util.LootTableListTFC;
import net.dries007.tfc.util.calendar.CalendarTFC;

@ParametersAreNonnullByDefault
public class EntityRabbitTFC extends EntityAnimalMammal implements IAnimalTFC
{
Expand Down Expand Up @@ -373,8 +364,13 @@ public IEntityLivingData onInitialSpawn(DifficultyInstance difficulty, @Nullable
}

private int getRandomRabbitType() {
// TODO: by TFC biome?
int type = this.rand.nextInt(7);
int type = 0;
if (this.rand.nextInt(100) < 10) { // killer skin chance
type = 7;
}
else {
type = this.rand.nextInt(6);
}
return type;
}

Expand Down
4 changes: 3 additions & 1 deletion src/main/java/net/dries007/tfc/util/agriculture/Food.java
Expand Up @@ -88,6 +88,7 @@ public enum Food
HORSE_MEAT(MEAT, 0.2f, 1f, 0f, 1f, 2.5f, 0f, 0f, 3f, 1f, 200f),
PHEASANT(MEAT, 0.2f, 1f, 0f, 2f, 2.5f, 0f, 0f, 3f, 1f, 200f),
VENISON(MEAT, 0.2f, 1f, 0f, 0.5f, 2f, 0f, 0f, 3f, 1f, 200f),
RABBIT(MEAT, 0.2f, 1f, 0f, 0.5f, 2.5f, 0f, 0f, 3f, 1f, 200f),
COOKED_BEEF(MEAT, 0.8f, 2f, 0f, 2f, 2.5f, 0f, 0f, 3f),
COOKED_PORK(MEAT, 0.8f, 2f, 0f, 2f, 2.5f, 0f, 0f, 3f),
COOKED_CHICKEN(MEAT, 0.6f, 2f, 0f, 0.5f, 2.5f, 0f, 0f, 3f),
Expand All @@ -97,7 +98,8 @@ public enum Food
COOKED_CALAMARI(MEAT, 0.4f, 2f, 0f, 0.5f, 1.5f, 0f, 0f, 3f),
COOKED_HORSE_MEAT(MEAT, 0.8f, 2f, 0f, 1f, 2.5f, 0f, 0f, 3f),
COOKED_PHEASANT(MEAT, 0.8f, 2f, 0f, 2f, 2.5f, 0f, 0f, 3f),
COOKED_VENISON(MEAT, 0.6f, 2f, 0f, 0.5f, 2f, 0f, 0f, 3f);
COOKED_VENISON(MEAT, 0.6f, 2f, 0f, 0.5f, 2f, 0f, 0f, 3f),
COOKED_RABBIT(MEAT, 0.6f, 2f, 0f, 0.5f, 2.5f, 0f, 0f, 3f);

private final Category category;
private final float calories;
Expand Down

0 comments on commit 0fbe43d

Please sign in to comment.