Merge main branch changes
|
@ -11,9 +11,9 @@ apply plugin: 'net.minecraftforge.gradle.forge'
|
|||
//Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
|
||||
|
||||
|
||||
version = "1.8-CF"
|
||||
version = "1.12.2-1.9.0-CF"
|
||||
group = "mod.acgaming.spackenmobs" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = "Spackenmobs-1.12.2"
|
||||
archivesBaseName = "Spackenmobs"
|
||||
|
||||
sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
|
||||
compileJava {
|
||||
|
|
|
@ -16,7 +16,7 @@ import mod.acgaming.spackenmobs.misc.ModEntities;
|
|||
public class Spackenmobs
|
||||
{
|
||||
public static final String MODID = "spackenmobs";
|
||||
public static final String VERSION = "1.8-CF";
|
||||
public static final String VERSION = "1.12.2-1.9.0-CF";
|
||||
|
||||
public static final CreativeTabs SPACKENMOBS_TAB = new SpackenmobsTab();
|
||||
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
package mod.acgaming.spackenmobs;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
|
@ -9,6 +12,8 @@ import mod.acgaming.spackenmobs.misc.ModItems;
|
|||
|
||||
public class SpackenmobsTab extends CreativeTabs
|
||||
{
|
||||
public static ArrayList<ItemStack> eggs = new ArrayList<>();
|
||||
|
||||
public SpackenmobsTab()
|
||||
{
|
||||
super(Spackenmobs.MODID);
|
||||
|
@ -20,4 +25,12 @@ public class SpackenmobsTab extends CreativeTabs
|
|||
{
|
||||
return new ItemStack(ModItems.RAM);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void displayAllRelevantItems(NonNullList<ItemStack> list)
|
||||
{
|
||||
super.displayAllRelevantItems(list);
|
||||
list.addAll(eggs);
|
||||
}
|
||||
}
|
|
@ -1,6 +1,5 @@
|
|||
package mod.acgaming.spackenmobs.entities;
|
||||
|
||||
import java.util.Collection;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
|
@ -13,6 +12,7 @@ import net.minecraft.entity.monster.EntitySkeleton;
|
|||
import net.minecraft.entity.passive.EntityOcelot;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.init.MobEffects;
|
||||
import net.minecraft.init.SoundEvents;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -66,6 +66,7 @@ public class EntityBakaMitaiCreeper extends EntityMob
|
|||
|
||||
if (i > 0 && this.timeSinceIgnited == 0)
|
||||
{
|
||||
this.spawnLingeringCloud();
|
||||
this.playSound(ModSoundEvents.ENTITY_BAKAMITAICREEPER_FUSE, 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
|
@ -296,29 +297,19 @@ public class EntityBakaMitaiCreeper extends EntityMob
|
|||
this.world.playSound(null, getPosition(), ModSoundEvents.ENTITY_BAKAMITAICREEPER_BLOW, getSoundCategory(), 2.0F, 1.0F);
|
||||
this.world.createExplosion(this, this.posX, this.posY, this.posZ, (float) this.explosionRadius * f, flag);
|
||||
this.setDead();
|
||||
this.spawnLingeringCloud();
|
||||
}
|
||||
}
|
||||
|
||||
private void spawnLingeringCloud()
|
||||
{
|
||||
Collection<PotionEffect> collection = this.getActivePotionEffects();
|
||||
|
||||
if (!collection.isEmpty())
|
||||
{
|
||||
EntityAreaEffectCloud entityareaeffectcloud = new EntityAreaEffectCloud(this.world, this.posX, this.posY, this.posZ);
|
||||
entityareaeffectcloud.setRadius(2.5F);
|
||||
entityareaeffectcloud.setRadiusOnUse(-0.5F);
|
||||
entityareaeffectcloud.setWaitTime(10);
|
||||
entityareaeffectcloud.setDuration(entityareaeffectcloud.getDuration() / 2);
|
||||
entityareaeffectcloud.setRadiusPerTick(-entityareaeffectcloud.getRadius() / (float) entityareaeffectcloud.getDuration());
|
||||
|
||||
for (PotionEffect potioneffect : collection)
|
||||
{
|
||||
entityareaeffectcloud.addEffect(new PotionEffect(potioneffect));
|
||||
}
|
||||
|
||||
this.world.spawnEntity(entityareaeffectcloud);
|
||||
}
|
||||
EntityAreaEffectCloud cloud = new EntityAreaEffectCloud(this.world, this.posX, this.posY, this.posZ);
|
||||
cloud.setOwner(this);
|
||||
cloud.setRadius(10.0F);
|
||||
cloud.setRadiusOnUse(-0.5F);
|
||||
cloud.setWaitTime(10);
|
||||
cloud.setDuration(cloud.getDuration() / 2);
|
||||
cloud.setRadiusPerTick(-cloud.getRadius() / (float) cloud.getDuration());
|
||||
cloud.addEffect(new PotionEffect(MobEffects.SLOWNESS, 100, 3));
|
||||
this.world.spawnEntity(cloud);
|
||||
}
|
||||
}
|
|
@ -14,10 +14,13 @@ import net.minecraft.item.Item;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.pathfinding.PathNodeType;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.SoundEvent;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import mod.acgaming.spackenmobs.misc.ModLootTableList;
|
||||
|
||||
public class EntityHolzstammhuhn extends EntityChicken
|
||||
{
|
||||
private static final Set<Item> TEMPTATION_ITEMS = Sets.newHashSet(Items.STICK);
|
||||
|
@ -67,6 +70,12 @@ public class EntityHolzstammhuhn extends EntityChicken
|
|||
this.playSound(SoundEvents.BLOCK_WOOD_STEP, 0.15F, 1.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getLootTable()
|
||||
{
|
||||
return ModLootTableList.ENTITIES_HOLZSTAMMHUHN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntityHolzstammhuhn createChild(EntityAgeable ageable)
|
||||
{
|
||||
|
|
|
@ -0,0 +1,722 @@
|
|||
package mod.acgaming.spackenmobs.entities;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.base.Predicates;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.*;
|
||||
import net.minecraft.entity.ai.*;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.monster.EntityMob;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.entity.projectile.EntityArrow;
|
||||
import net.minecraft.entity.projectile.EntityWitherSkull;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.init.SoundEvents;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.datasync.DataParameter;
|
||||
import net.minecraft.network.datasync.DataSerializers;
|
||||
import net.minecraft.network.datasync.EntityDataManager;
|
||||
import net.minecraft.pathfinding.PathNavigateGround;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EntitySelectors;
|
||||
import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraft.util.SoundEvent;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.world.BossInfo;
|
||||
import net.minecraft.world.BossInfoServer;
|
||||
import net.minecraft.world.EnumDifficulty;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public class EntityJensWither extends EntityMob implements IRangedAttackMob
|
||||
{
|
||||
private static final DataParameter<Integer> FIRST_HEAD_TARGET = EntityDataManager.createKey(EntityJensWither.class, DataSerializers.VARINT);
|
||||
private static final DataParameter<Integer> SECOND_HEAD_TARGET = EntityDataManager.createKey(EntityJensWither.class, DataSerializers.VARINT);
|
||||
private static final DataParameter<Integer> THIRD_HEAD_TARGET = EntityDataManager.createKey(EntityJensWither.class, DataSerializers.VARINT);
|
||||
private static final DataParameter<Integer>[] HEAD_TARGETS = new DataParameter[] {FIRST_HEAD_TARGET, SECOND_HEAD_TARGET, THIRD_HEAD_TARGET};
|
||||
private static final DataParameter<Integer> INVULNERABILITY_TIME = EntityDataManager.createKey(EntityJensWither.class, DataSerializers.VARINT);
|
||||
/**
|
||||
* Selector used to determine the entities a wither boss should attack.
|
||||
*/
|
||||
private static final Predicate<Entity> NOT_UNDEAD = p_apply_1_ -> p_apply_1_ instanceof EntityLivingBase && ((EntityLivingBase) p_apply_1_).getCreatureAttribute() != EnumCreatureAttribute.UNDEAD && ((EntityLivingBase) p_apply_1_).attackable();
|
||||
|
||||
public static boolean canDestroyBlock(Block blockIn)
|
||||
{
|
||||
return blockIn != Blocks.BEDROCK && blockIn != Blocks.END_PORTAL && blockIn != Blocks.END_PORTAL_FRAME && blockIn != Blocks.COMMAND_BLOCK && blockIn != Blocks.REPEATING_COMMAND_BLOCK && blockIn != Blocks.CHAIN_COMMAND_BLOCK && blockIn != Blocks.BARRIER && blockIn != Blocks.STRUCTURE_BLOCK && blockIn != Blocks.STRUCTURE_VOID && blockIn != Blocks.PISTON_EXTENSION && blockIn != Blocks.END_GATEWAY;
|
||||
}
|
||||
|
||||
private final float[] xRotationHeads = new float[2];
|
||||
private final float[] yRotationHeads = new float[2];
|
||||
private final float[] xRotOHeads = new float[2];
|
||||
private final float[] yRotOHeads = new float[2];
|
||||
private final int[] nextHeadUpdate = new int[2];
|
||||
private final int[] idleHeadUpdates = new int[2];
|
||||
private final BossInfoServer bossInfo = (BossInfoServer) (new BossInfoServer(this.getDisplayName(), BossInfo.Color.PURPLE, BossInfo.Overlay.PROGRESS)).setDarkenSky(true);
|
||||
/**
|
||||
* Time before the Wither tries to break blocks
|
||||
*/
|
||||
private int blockBreakCounter;
|
||||
|
||||
public EntityJensWither(World worldIn)
|
||||
{
|
||||
super(worldIn);
|
||||
this.setHealth(this.getMaxHealth());
|
||||
this.setSize(0.9F, 3.5F);
|
||||
this.isImmuneToFire = true;
|
||||
((PathNavigateGround) this.getNavigator()).setCanSwim(true);
|
||||
this.experienceValue = 50;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons
|
||||
* use this to react to sunlight and start to burn.
|
||||
*/
|
||||
public void onLivingUpdate()
|
||||
{
|
||||
this.motionY *= 0.6000000238418579D;
|
||||
|
||||
if (!this.world.isRemote && this.getWatchedTargetId(0) > 0)
|
||||
{
|
||||
Entity entity = this.world.getEntityByID(this.getWatchedTargetId(0));
|
||||
|
||||
if (entity != null)
|
||||
{
|
||||
if (this.posY < entity.posY || !this.isArmored() && this.posY < entity.posY + 5.0D)
|
||||
{
|
||||
if (this.motionY < 0.0D)
|
||||
{
|
||||
this.motionY = 0.0D;
|
||||
}
|
||||
|
||||
this.motionY += (0.5D - this.motionY) * 0.6000000238418579D;
|
||||
}
|
||||
|
||||
double d0 = entity.posX - this.posX;
|
||||
double d1 = entity.posZ - this.posZ;
|
||||
double d3 = d0 * d0 + d1 * d1;
|
||||
|
||||
if (d3 > 9.0D)
|
||||
{
|
||||
double d5 = MathHelper.sqrt(d3);
|
||||
this.motionX += (d0 / d5 * 0.5D - this.motionX) * 0.6000000238418579D;
|
||||
this.motionZ += (d1 / d5 * 0.5D - this.motionZ) * 0.6000000238418579D;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.motionX * this.motionX + this.motionZ * this.motionZ > 0.05000000074505806D)
|
||||
{
|
||||
this.rotationYaw = (float) MathHelper.atan2(this.motionZ, this.motionX) * (180F / (float) Math.PI) - 90.0F;
|
||||
}
|
||||
|
||||
super.onLivingUpdate();
|
||||
|
||||
for (int i = 0; i < 2; ++i)
|
||||
{
|
||||
this.yRotOHeads[i] = this.yRotationHeads[i];
|
||||
this.xRotOHeads[i] = this.xRotationHeads[i];
|
||||
}
|
||||
|
||||
for (int j = 0; j < 2; ++j)
|
||||
{
|
||||
int k = this.getWatchedTargetId(j + 1);
|
||||
Entity entity1 = null;
|
||||
|
||||
if (k > 0)
|
||||
{
|
||||
entity1 = this.world.getEntityByID(k);
|
||||
}
|
||||
|
||||
if (entity1 != null)
|
||||
{
|
||||
double d11 = this.getHeadX(j + 1);
|
||||
double d12 = this.getHeadY(j + 1);
|
||||
double d13 = this.getHeadZ(j + 1);
|
||||
double d6 = entity1.posX - d11;
|
||||
double d7 = entity1.posY + (double) entity1.getEyeHeight() - d12;
|
||||
double d8 = entity1.posZ - d13;
|
||||
double d9 = MathHelper.sqrt(d6 * d6 + d8 * d8);
|
||||
float f = (float) (MathHelper.atan2(d8, d6) * (180D / Math.PI)) - 90.0F;
|
||||
float f1 = (float) (-(MathHelper.atan2(d7, d9) * (180D / Math.PI)));
|
||||
this.xRotationHeads[j] = this.rotlerp(this.xRotationHeads[j], f1, 40.0F);
|
||||
this.yRotationHeads[j] = this.rotlerp(this.yRotationHeads[j], f, 10.0F);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.yRotationHeads[j] = this.rotlerp(this.yRotationHeads[j], this.renderYawOffset, 10.0F);
|
||||
}
|
||||
}
|
||||
|
||||
boolean flag = this.isArmored();
|
||||
|
||||
for (int l = 0; l < 3; ++l)
|
||||
{
|
||||
double d10 = this.getHeadX(l);
|
||||
double d2 = this.getHeadY(l);
|
||||
double d4 = this.getHeadZ(l);
|
||||
this.world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d10 + this.rand.nextGaussian() * 0.30000001192092896D, d2 + this.rand.nextGaussian() * 0.30000001192092896D, d4 + this.rand.nextGaussian() * 0.30000001192092896D, 0.0D, 0.0D, 0.0D);
|
||||
|
||||
if (flag && this.world.rand.nextInt(4) == 0)
|
||||
{
|
||||
this.world.spawnParticle(EnumParticleTypes.SPELL_MOB, d10 + this.rand.nextGaussian() * 0.30000001192092896D, d2 + this.rand.nextGaussian() * 0.30000001192092896D, d4 + this.rand.nextGaussian() * 0.30000001192092896D, 0.699999988079071D, 0.699999988079071D, 0.5D);
|
||||
}
|
||||
}
|
||||
|
||||
if (this.getInvulTime() > 0)
|
||||
{
|
||||
for (int i1 = 0; i1 < 3; ++i1)
|
||||
{
|
||||
this.world.spawnParticle(EnumParticleTypes.SPELL_MOB, this.posX + this.rand.nextGaussian(), this.posY + (double) (this.rand.nextFloat() * 3.3F), this.posZ + this.rand.nextGaussian(), 0.699999988079071D, 0.699999988079071D, 0.8999999761581421D);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the entity is attacked.
|
||||
*/
|
||||
public boolean attackEntityFrom(DamageSource source, float amount)
|
||||
{
|
||||
if (this.isEntityInvulnerable(source))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if (source != DamageSource.DROWN && !(source.getTrueSource() instanceof EntityJensWither))
|
||||
{
|
||||
if (this.getInvulTime() > 0 && source != DamageSource.OUT_OF_WORLD)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.isArmored())
|
||||
{
|
||||
Entity entity = source.getImmediateSource();
|
||||
|
||||
if (entity instanceof EntityArrow)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Entity entity1 = source.getTrueSource();
|
||||
|
||||
if (!(entity1 instanceof EntityPlayer) && entity1 instanceof EntityLivingBase && ((EntityLivingBase) entity1).getCreatureAttribute() == this.getCreatureAttribute())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.blockBreakCounter <= 0)
|
||||
{
|
||||
this.blockBreakCounter = 20;
|
||||
}
|
||||
|
||||
for (int i = 0; i < this.idleHeadUpdates.length; ++i)
|
||||
{
|
||||
this.idleHeadUpdates[i] += 3;
|
||||
}
|
||||
|
||||
return super.attackEntityFrom(source, amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
protected SoundEvent getHurtSound(DamageSource damageSourceIn)
|
||||
{
|
||||
return SoundEvents.ENTITY_WITHER_HURT;
|
||||
}
|
||||
|
||||
protected SoundEvent getDeathSound()
|
||||
{
|
||||
return SoundEvents.ENTITY_WITHER_DEATH;
|
||||
}
|
||||
|
||||
protected void applyEntityAttributes()
|
||||
{
|
||||
super.applyEntityAttributes();
|
||||
this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(300.0D);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.6000000238418579D);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.FOLLOW_RANGE).setBaseValue(40.0D);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.ARMOR).setBaseValue(4.0D);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes this Wither's explosion sequence and makes it invulnerable. Called immediately after spawning.
|
||||
*/
|
||||
public void ignite()
|
||||
{
|
||||
this.setInvulTime(220);
|
||||
this.setHealth(this.getMaxHealth() / 3.0F);
|
||||
}
|
||||
|
||||
/**
|
||||
* Attack the specified entity using a ranged attack.
|
||||
*/
|
||||
public void attackEntityWithRangedAttack(EntityLivingBase target, float distanceFactor)
|
||||
{
|
||||
this.launchWitherSkullToEntity(0, target);
|
||||
}
|
||||
|
||||
public void setSwingingArms(boolean swingingArms)
|
||||
{
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getBrightnessForRender()
|
||||
{
|
||||
return 15728880;
|
||||
}
|
||||
|
||||
protected boolean canBeRidden(Entity entityIn)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the Entity inside a web block.
|
||||
*/
|
||||
public void setInWeb()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns false if this Entity is a boss, true otherwise.
|
||||
*/
|
||||
public boolean isNonBoss()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the custom name tag for this entity
|
||||
*/
|
||||
public void setCustomNameTag(String name)
|
||||
{
|
||||
super.setCustomNameTag(name);
|
||||
this.bossInfo.setName(this.getDisplayName());
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the given player to the list of players tracking this entity. For instance, a player may track a boss in
|
||||
* order to view its associated boss bar.
|
||||
*/
|
||||
public void addTrackingPlayer(EntityPlayerMP player)
|
||||
{
|
||||
super.addTrackingPlayer(player);
|
||||
this.bossInfo.addPlayer(player);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the given player from the list of players tracking this entity. See {@link Entity#addTrackingPlayer} for
|
||||
* more information on tracking.
|
||||
*/
|
||||
public void removeTrackingPlayer(EntityPlayerMP player)
|
||||
{
|
||||
super.removeTrackingPlayer(player);
|
||||
this.bossInfo.removePlayer(player);
|
||||
}
|
||||
|
||||
/**
|
||||
* adds a PotionEffect to the entity
|
||||
*/
|
||||
public void addPotionEffect(PotionEffect potioneffectIn)
|
||||
{
|
||||
}
|
||||
|
||||
public void fall(float distance, float damageMultiplier)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Get this Entity's EnumCreatureAttribute
|
||||
*/
|
||||
public EnumCreatureAttribute getCreatureAttribute()
|
||||
{
|
||||
return EnumCreatureAttribute.UNDEAD;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getHeadYRotation(int p_82207_1_)
|
||||
{
|
||||
return this.yRotationHeads[p_82207_1_];
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getHeadXRotation(int p_82210_1_)
|
||||
{
|
||||
return this.xRotationHeads[p_82210_1_];
|
||||
}
|
||||
|
||||
public int getInvulTime()
|
||||
{
|
||||
return this.dataManager.get(INVULNERABILITY_TIME);
|
||||
}
|
||||
|
||||
public void setInvulTime(int time)
|
||||
{
|
||||
this.dataManager.set(INVULNERABILITY_TIME, time);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the target entity ID if present, or -1 if not @param par1 The target offset, should be from 0-2
|
||||
*/
|
||||
public int getWatchedTargetId(int head)
|
||||
{
|
||||
return this.dataManager.get(HEAD_TARGETS[head]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the target entity ID
|
||||
*/
|
||||
public void updateWatchedTargetId(int targetOffset, int newId)
|
||||
{
|
||||
this.dataManager.set(HEAD_TARGETS[targetOffset], newId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the wither is armored with its boss armor or not by checking whether its health is below half of
|
||||
* its maximum.
|
||||
*/
|
||||
public boolean isArmored()
|
||||
{
|
||||
return this.getHealth() <= this.getMaxHealth() / 2.0F;
|
||||
}
|
||||
|
||||
protected void initEntityAI()
|
||||
{
|
||||
this.tasks.addTask(0, new EntityJensWither.AIDoNothing());
|
||||
this.tasks.addTask(1, new EntityAISwimming(this));
|
||||
this.tasks.addTask(2, new EntityAIAttackRanged(this, 1.0D, 40, 20.0F));
|
||||
this.tasks.addTask(5, new EntityAIWanderAvoidWater(this, 1.0D));
|
||||
this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
|
||||
this.tasks.addTask(7, new EntityAILookIdle(this));
|
||||
this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false));
|
||||
this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityLiving.class, 0, false, false, NOT_UNDEAD));
|
||||
}
|
||||
|
||||
protected void entityInit()
|
||||
{
|
||||
super.entityInit();
|
||||
this.dataManager.register(FIRST_HEAD_TARGET, 0);
|
||||
this.dataManager.register(SECOND_HEAD_TARGET, 0);
|
||||
this.dataManager.register(THIRD_HEAD_TARGET, 0);
|
||||
this.dataManager.register(INVULNERABILITY_TIME, 0);
|
||||
}
|
||||
|
||||
protected SoundEvent getAmbientSound()
|
||||
{
|
||||
return SoundEvents.ENTITY_WITHER_AMBIENT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Drop 0-2 items of this living's type
|
||||
*/
|
||||
protected void dropFewItems(boolean wasRecentlyHit, int lootingModifier)
|
||||
{
|
||||
EntityItem entityitem = this.dropItem(Items.NETHER_STAR, 1);
|
||||
|
||||
if (entityitem != null)
|
||||
{
|
||||
entityitem.setNoDespawn();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* (abstract) Protected helper method to write subclass entity data to NBT.
|
||||
*/
|
||||
public void writeEntityToNBT(NBTTagCompound compound)
|
||||
{
|
||||
super.writeEntityToNBT(compound);
|
||||
compound.setInteger("Invul", this.getInvulTime());
|
||||
}
|
||||
|
||||
/**
|
||||
* (abstract) Protected helper method to read subclass entity data from NBT.
|
||||
*/
|
||||
public void readEntityFromNBT(NBTTagCompound compound)
|
||||
{
|
||||
super.readEntityFromNBT(compound);
|
||||
this.setInvulTime(compound.getInteger("Invul"));
|
||||
|
||||
if (this.hasCustomName())
|
||||
{
|
||||
this.bossInfo.setName(this.getDisplayName());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes the entity despawn if requirements are reached
|
||||
*/
|
||||
protected void despawnEntity()
|
||||
{
|
||||
this.idleTime = 0;
|
||||
}
|
||||
|
||||
protected void updateAITasks()
|
||||
{
|
||||
if (this.getInvulTime() > 0)
|
||||
{
|
||||
int j1 = this.getInvulTime() - 1;
|
||||
|
||||
if (j1 <= 0)
|
||||
{
|
||||
this.world.newExplosion(this, this.posX, this.posY + (double) this.getEyeHeight(), this.posZ, 7.0F, false, net.minecraftforge.event.ForgeEventFactory.getMobGriefingEvent(this.world, this));
|
||||
this.world.playBroadcastSound(1023, new BlockPos(this), 0);
|
||||
}
|
||||
|
||||
this.setInvulTime(j1);
|
||||
|
||||
if (this.ticksExisted % 10 == 0)
|
||||
{
|
||||
this.heal(10.0F);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
super.updateAITasks();
|
||||
|
||||
for (int i = 1; i < 3; ++i)
|
||||
{
|
||||
if (this.ticksExisted >= this.nextHeadUpdate[i - 1])
|
||||
{
|
||||
this.nextHeadUpdate[i - 1] = this.ticksExisted + 10 + this.rand.nextInt(10);
|
||||
|
||||
if (this.world.getDifficulty() == EnumDifficulty.NORMAL || this.world.getDifficulty() == EnumDifficulty.HARD)
|
||||
{
|
||||
int j3 = i - 1;
|
||||
int k3 = this.idleHeadUpdates[i - 1];
|
||||
this.idleHeadUpdates[j3] = this.idleHeadUpdates[i - 1] + 1;
|
||||
|
||||
if (k3 > 15)
|
||||
{
|
||||
float f = 10.0F;
|
||||
float f1 = 5.0F;
|
||||
double d0 = MathHelper.nextDouble(this.rand, this.posX - 10.0D, this.posX + 10.0D);
|
||||
double d1 = MathHelper.nextDouble(this.rand, this.posY - 5.0D, this.posY + 5.0D);
|
||||
double d2 = MathHelper.nextDouble(this.rand, this.posZ - 10.0D, this.posZ + 10.0D);
|
||||
this.launchWitherSkullToCoords(i + 1, d0, d1, d2, true);
|
||||
this.idleHeadUpdates[i - 1] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
int k1 = this.getWatchedTargetId(i);
|
||||
|
||||
if (k1 > 0)
|
||||
{
|
||||
Entity entity = this.world.getEntityByID(k1);
|
||||
|
||||
if (entity != null && entity.isEntityAlive() && this.getDistanceSq(entity) <= 900.0D && this.canEntityBeSeen(entity))
|
||||
{
|
||||
if (entity instanceof EntityPlayer && ((EntityPlayer) entity).capabilities.disableDamage)
|
||||
{
|
||||
this.updateWatchedTargetId(i, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.launchWitherSkullToEntity(i + 1, (EntityLivingBase) entity);
|
||||
this.nextHeadUpdate[i - 1] = this.ticksExisted + 40 + this.rand.nextInt(20);
|
||||
this.idleHeadUpdates[i - 1] = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.updateWatchedTargetId(i, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
List<EntityLivingBase> list = this.world.getEntitiesWithinAABB(EntityLivingBase.class, this.getEntityBoundingBox().grow(20.0D, 8.0D, 20.0D), Predicates.and(NOT_UNDEAD, EntitySelectors.NOT_SPECTATING));
|
||||
|
||||
for (int j2 = 0; j2 < 10 && !list.isEmpty(); ++j2)
|
||||
{
|
||||
EntityLivingBase entitylivingbase = list.get(this.rand.nextInt(list.size()));
|
||||
|
||||
if (entitylivingbase != this && entitylivingbase.isEntityAlive() && this.canEntityBeSeen(entitylivingbase))
|
||||
{
|
||||
if (entitylivingbase instanceof EntityPlayer)
|
||||
{
|
||||
if (!((EntityPlayer) entitylivingbase).capabilities.disableDamage)
|
||||
{
|
||||
this.updateWatchedTargetId(i, entitylivingbase.getEntityId());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.updateWatchedTargetId(i, entitylivingbase.getEntityId());
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
list.remove(entitylivingbase);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.getAttackTarget() != null)
|
||||
{
|
||||
this.updateWatchedTargetId(0, this.getAttackTarget().getEntityId());
|
||||
}
|
||||
else
|
||||
{
|
||||
this.updateWatchedTargetId(0, 0);
|
||||
}
|
||||
|
||||
if (this.blockBreakCounter > 0)
|
||||
{
|
||||
--this.blockBreakCounter;
|
||||
|
||||
if (this.blockBreakCounter == 0 && net.minecraftforge.event.ForgeEventFactory.getMobGriefingEvent(this.world, this))
|
||||
{
|
||||
int i1 = MathHelper.floor(this.posY);
|
||||
int l1 = MathHelper.floor(this.posX);
|
||||
int i2 = MathHelper.floor(this.posZ);
|
||||
boolean flag = false;
|
||||
|
||||
for (int k2 = -1; k2 <= 1; ++k2)
|
||||
{
|
||||
for (int l2 = -1; l2 <= 1; ++l2)
|
||||
{
|
||||
for (int j = 0; j <= 3; ++j)
|
||||
{
|
||||
int i3 = l1 + k2;
|
||||
int k = i1 + j;
|
||||
int l = i2 + l2;
|
||||
BlockPos blockpos = new BlockPos(i3, k, l);
|
||||
IBlockState iblockstate = this.world.getBlockState(blockpos);
|
||||
Block block = iblockstate.getBlock();
|
||||
|
||||
if (!block.isAir(iblockstate, this.world, blockpos) && block.canEntityDestroy(iblockstate, world, blockpos, this) && net.minecraftforge.event.ForgeEventFactory.onEntityDestroyBlock(this, blockpos, iblockstate))
|
||||
{
|
||||
flag = this.world.destroyBlock(blockpos, true) || flag;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (flag)
|
||||
{
|
||||
this.world.playEvent(null, 1022, new BlockPos(this), 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.ticksExisted % 20 == 0)
|
||||
{
|
||||
this.heal(1.0F);
|
||||
}
|
||||
|
||||
this.bossInfo.setPercent(this.getHealth() / this.getMaxHealth());
|
||||
}
|
||||
}
|
||||
|
||||
private double getHeadX(int p_82214_1_)
|
||||
{
|
||||
if (p_82214_1_ <= 0)
|
||||
{
|
||||
return this.posX;
|
||||
}
|
||||
else
|
||||
{
|
||||
float f = (this.renderYawOffset + (float) (180 * (p_82214_1_ - 1))) * 0.017453292F;
|
||||
float f1 = MathHelper.cos(f);
|
||||
return this.posX + (double) f1 * 1.3D;
|
||||
}
|
||||
}
|
||||
|
||||
private double getHeadY(int p_82208_1_)
|
||||
{
|
||||
return p_82208_1_ <= 0 ? this.posY + 3.0D : this.posY + 2.2D;
|
||||
}
|
||||
|
||||
private double getHeadZ(int p_82213_1_)
|
||||
{
|
||||
if (p_82213_1_ <= 0)
|
||||
{
|
||||
return this.posZ;
|
||||
}
|
||||
else
|
||||
{
|
||||
float f = (this.renderYawOffset + (float) (180 * (p_82213_1_ - 1))) * 0.017453292F;
|
||||
float f1 = MathHelper.sin(f);
|
||||
return this.posZ + (double) f1 * 1.3D;
|
||||
}
|
||||
}
|
||||
|
||||
private float rotlerp(float p_82204_1_, float p_82204_2_, float p_82204_3_)
|
||||
{
|
||||
float f = MathHelper.wrapDegrees(p_82204_2_ - p_82204_1_);
|
||||
|
||||
if (f > p_82204_3_)
|
||||
{
|
||||
f = p_82204_3_;
|
||||
}
|
||||
|
||||
if (f < -p_82204_3_)
|
||||
{
|
||||
f = -p_82204_3_;
|
||||
}
|
||||
|
||||
return p_82204_1_ + f;
|
||||
}
|
||||
|
||||
private void launchWitherSkullToEntity(int p_82216_1_, EntityLivingBase p_82216_2_)
|
||||
{
|
||||
this.launchWitherSkullToCoords(p_82216_1_, p_82216_2_.posX, p_82216_2_.posY + (double) p_82216_2_.getEyeHeight() * 0.5D, p_82216_2_.posZ, p_82216_1_ == 0 && this.rand.nextFloat() < 0.001F);
|
||||
}
|
||||
|
||||
/**
|
||||
* Launches a Wither skull toward (par2, par4, par6)
|
||||
*/
|
||||
private void launchWitherSkullToCoords(int p_82209_1_, double x, double y, double z, boolean invulnerable)
|
||||
{
|
||||
this.world.playEvent(null, 1024, new BlockPos(this), 0);
|
||||
double d0 = this.getHeadX(p_82209_1_);
|
||||
double d1 = this.getHeadY(p_82209_1_);
|
||||
double d2 = this.getHeadZ(p_82209_1_);
|
||||
double d3 = x - d0;
|
||||
double d4 = y - d1;
|
||||
double d5 = z - d2;
|
||||
EntityWitherSkull EntityWitherskull = new EntityWitherSkull(this.world, this, d3, d4, d5);
|
||||
|
||||
if (invulnerable)
|
||||
{
|
||||
EntityWitherskull.setInvulnerable(true);
|
||||
}
|
||||
|
||||
EntityWitherskull.posY = d1;
|
||||
EntityWitherskull.posX = d0;
|
||||
EntityWitherskull.posZ = d2;
|
||||
this.world.spawnEntity(EntityWitherskull);
|
||||
}
|
||||
|
||||
class AIDoNothing extends EntityAIBase
|
||||
{
|
||||
public AIDoNothing()
|
||||
{
|
||||
this.setMutexBits(7);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the EntityAIBase should begin execution.
|
||||
*/
|
||||
public boolean shouldExecute()
|
||||
{
|
||||
return EntityJensWither.this.getInvulTime() > 0;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -10,8 +10,12 @@ import net.minecraft.entity.passive.AbstractHorse;
|
|||
import net.minecraft.entity.passive.EntityAnimal;
|
||||
import net.minecraft.entity.passive.EntityWolf;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.SoundEvent;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import mod.acgaming.spackenmobs.misc.ModSoundEvents;
|
||||
|
||||
public class EntityMZTEWolf extends EntityWolf
|
||||
{
|
||||
public EntityMZTEWolf(World worldIn)
|
||||
|
@ -21,6 +25,30 @@ public class EntityMZTEWolf extends EntityWolf
|
|||
this.setTamed(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEvent getAmbientSound()
|
||||
{
|
||||
return ModSoundEvents.ENTITY_MZTEWOLF_AMBIENT;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEvent getHurtSound(DamageSource damageSourceIn)
|
||||
{
|
||||
return ModSoundEvents.ENTITY_MZTEWOLF_HURT;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEvent getDeathSound()
|
||||
{
|
||||
return ModSoundEvents.ENTITY_MZTEWOLF_DEATH;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected float getSoundVolume()
|
||||
{
|
||||
return 1.0F;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntityMZTEWolf createChild(EntityAgeable ageable)
|
||||
{
|
||||
|
@ -85,8 +113,7 @@ public class EntityMZTEWolf extends EntityWolf
|
|||
}
|
||||
}
|
||||
|
||||
if (target instanceof EntityPlayer && owner instanceof EntityPlayer
|
||||
&& !((EntityPlayer) owner).canAttackPlayer((EntityPlayer) target))
|
||||
if (target instanceof EntityPlayer && owner instanceof EntityPlayer && !((EntityPlayer) owner).canAttackPlayer((EntityPlayer) target))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -2,9 +2,11 @@ package mod.acgaming.spackenmobs.entities;
|
|||
|
||||
import net.minecraft.entity.monster.EntityZombie;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.SoundEvent;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import mod.acgaming.spackenmobs.misc.ModLootTableList;
|
||||
import mod.acgaming.spackenmobs.misc.ModSoundEvents;
|
||||
|
||||
public class EntityMarcellDAvis extends EntityZombie
|
||||
|
@ -32,4 +34,10 @@ public class EntityMarcellDAvis extends EntityZombie
|
|||
{
|
||||
return ModSoundEvents.ENTITY_MARCELLDAVIS_DEATH;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getLootTable()
|
||||
{
|
||||
return ModLootTableList.ENTITIES_MARCELL_DAVIS;
|
||||
}
|
||||
}
|
|
@ -15,9 +15,10 @@ public class ModItems
|
|||
{
|
||||
public static final List<Item> ITEMS = new ArrayList<>();
|
||||
|
||||
public static final Item AHOJ_BRAUSE = new ModItemFoodEffect("ahoj_brause", 2, 0.15F, false, new PotionEffect(MobEffects.SPEED, 200, 5, false, true));
|
||||
public static final Item AHOJ_BRAUSE_DRINK = new ModItemFoodDrink("ahoj_brause_drink", 4, 0.3F, false, new PotionEffect(MobEffects.SPEED, 400, 10, false, true));
|
||||
public static final Item MODEM = new ModItemBase("modem");
|
||||
public static final Item RAM = new ModItemBase("ram");
|
||||
public static final Item RAM_ON_A_STICK = new ModItemBase("ram_on_a_stick");
|
||||
public static final Item SURSTROEMMING = new ModItemBase("surstroemming");
|
||||
public static final Item AHOJ_BRAUSE = new ModItemFoodEffect("ahoj_brause", 2, 0.15F, false, new PotionEffect(MobEffects.SPEED, 200, 5, false, true));
|
||||
public static final Item AHOJ_BRAUSE_DRINK = new ModItemFoodDrink("ahoj_brause_drink", 4, 0.3F, false, new PotionEffect(MobEffects.SPEED, 400, 10, false, true));
|
||||
}
|
|
@ -12,8 +12,10 @@ public class ModLootTableList
|
|||
{
|
||||
private static final Set<ResourceLocation> LOOT_TABLES = Sets.newHashSet();
|
||||
public static final ResourceLocation EMPTY = register("empty");
|
||||
public static final ResourceLocation ENTITIES_JENS = register("entities/jens");
|
||||
public static final ResourceLocation ENTITIES_FRIEDRICH = register("entities/friedrich");
|
||||
public static final ResourceLocation ENTITIES_HOLZSTAMMHUHN = register("entities/holzstammhuhn");
|
||||
public static final ResourceLocation ENTITIES_JENS = register("entities/jens");
|
||||
public static final ResourceLocation ENTITIES_MARCELL_DAVIS = register("entities/marcell_davis");
|
||||
private static final Set<ResourceLocation> READ_ONLY_LOOT_TABLES = Collections.unmodifiableSet(LOOT_TABLES);
|
||||
|
||||
public static Set<ResourceLocation> getAll()
|
||||
|
|
|
@ -51,4 +51,8 @@ public class ModSoundEvents
|
|||
|
||||
public static final SoundEvent ENTITY_GISELA_AMBIENT = new SoundEvent(new ResourceLocation("spackenmobs:entities.gisela.ambient"));
|
||||
public static final SoundEvent ENTITY_GISELA_HURT = new SoundEvent(new ResourceLocation("spackenmobs:entities.gisela.hurt"));
|
||||
|
||||
public static final SoundEvent ENTITY_MZTEWOLF_AMBIENT = new SoundEvent(new ResourceLocation("spackenmobs:entities.mztewolf.ambient"));
|
||||
public static final SoundEvent ENTITY_MZTEWOLF_HURT = new SoundEvent(new ResourceLocation("spackenmobs:entities.mztewolf.hurt"));
|
||||
public static final SoundEvent ENTITY_MZTEWOLF_DEATH = new SoundEvent(new ResourceLocation("spackenmobs:entities.mztewolf.death"));
|
||||
}
|
|
@ -5,7 +5,10 @@ import java.util.Set;
|
|||
|
||||
import com.google.common.collect.Lists;
|
||||
import net.minecraft.entity.EnumCreatureType;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.SoundEvent;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
|
@ -15,13 +18,17 @@ import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
|
|||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.registry.EntityEntry;
|
||||
import net.minecraftforge.fml.common.registry.EntityRegistry;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import mod.acgaming.spackenmobs.Spackenmobs;
|
||||
import mod.acgaming.spackenmobs.SpackenmobsTab;
|
||||
import mod.acgaming.spackenmobs.entities.*;
|
||||
|
||||
@EventBusSubscriber(modid = Spackenmobs.MODID)
|
||||
public class RegistryHandler
|
||||
{
|
||||
public static int id;
|
||||
|
||||
@SubscribeEvent
|
||||
public static void registerEntities(Register<EntityEntry> event)
|
||||
{
|
||||
|
@ -35,182 +42,62 @@ public class RegistryHandler
|
|||
}
|
||||
}
|
||||
|
||||
int id = 1;
|
||||
// REGISTRATION
|
||||
registerEntityWithSpawnEgg(EntityApoRed.class, "apored", 2039583, 16711680);
|
||||
registerEntityWithSpawnEgg(EntityBakaMitaiCreeper.class, "bakamitai_creeper", 826890, 0);
|
||||
registerEntityWithSpawnEgg(EntityDrachenlord.class, "drachenlord", 15256745, 8738878);
|
||||
registerEntityWithSpawnEgg(EntityFriedrichLiechtenstein.class, "friedrich", 16447728, 15878595);
|
||||
registerEntityWithSpawnEgg(EntityGisela.class, "gisela", 39835, 16448250);
|
||||
registerEntityWithSpawnEgg(EntityHolzstammhuhn.class, "holzstammhuhn", 12096347, 5295899);
|
||||
registerEntityWithSpawnEgg(EntityJens.class, "jens", 6704526, 6767911);
|
||||
registerEntityWithSpawnEgg(EntityMZTEWolf.class, "mztewolf", 16711680, 0);
|
||||
registerEntityWithSpawnEgg(EntityMarcellDAvis.class, "marcell_davis", 15759, 16777215);
|
||||
registerEntityWithSpawnEgg(EntityMrBean.class, "mr_bean", 4802350, 3220238);
|
||||
registerEntityWithSpawnEgg(EntitySchalker.class, "schalker", 24745, 16777215);
|
||||
registerEntityWithSpawnEgg(EntitySmavaCreeper.class, "smava_creeper", 7649828, 11053224);
|
||||
registerEntityWithSpawnEgg(EntityTileraGhast.class, "tilera_ghast", 255, 16711680);
|
||||
|
||||
// Smava Creeper
|
||||
EntityRegistry.registerModEntity(new ResourceLocation("spackenmobs:smava_creeper"), EntitySmavaCreeper.class, "smava_creeper", id++, Spackenmobs.instance, 64, 1, true, 7649828, 11053224);
|
||||
if (ModConfigs.spawn_switches.SmavaCreeper_spawn)
|
||||
{
|
||||
EntityRegistry.addSpawn(
|
||||
EntitySmavaCreeper.class,
|
||||
ModConfigs.spawn_values.SmavaCreeper_weight,
|
||||
ModConfigs.spawn_values.SmavaCreeper_min,
|
||||
ModConfigs.spawn_values.SmavaCreeper_max,
|
||||
EnumCreatureType.MONSTER,
|
||||
regularSpawning.toArray(new Biome[0]));
|
||||
}
|
||||
// SPAWNING
|
||||
if (ModConfigs.spawn_switches.ApoRed_spawn) EntityRegistry.addSpawn(EntityApoRed.class, ModConfigs.spawn_values.ApoRed_weight, ModConfigs.spawn_values.ApoRed_min, ModConfigs.spawn_values.ApoRed_max, EnumCreatureType.MONSTER, regularSpawning.toArray(new Biome[0]));
|
||||
if (ModConfigs.spawn_switches.BakaMitaiCreeper_spawn) EntityRegistry.addSpawn(EntityBakaMitaiCreeper.class, ModConfigs.spawn_values.BakaMitaiCreeper_weight, ModConfigs.spawn_values.BakaMitaiCreeper_min, ModConfigs.spawn_values.BakaMitaiCreeper_max, EnumCreatureType.MONSTER, regularSpawning.toArray(new Biome[0]));
|
||||
if (ModConfigs.spawn_switches.Drachenlord_spawn) EntityRegistry.addSpawn(EntityDrachenlord.class, ModConfigs.spawn_values.Drachenlord_weight, ModConfigs.spawn_values.Drachenlord_min, ModConfigs.spawn_values.Drachenlord_max, EnumCreatureType.MONSTER, BiomeDictionary.getBiomes(BiomeDictionary.Type.NETHER).toArray(new Biome[0]));
|
||||
if (ModConfigs.spawn_switches.Friedrich_spawn) EntityRegistry.addSpawn(EntityFriedrichLiechtenstein.class, ModConfigs.spawn_values.Friedrich_weight, ModConfigs.spawn_values.Friedrich_min, ModConfigs.spawn_values.Friedrich_max, EnumCreatureType.CREATURE, regularSpawning.toArray(new Biome[0]));
|
||||
if (ModConfigs.spawn_switches.Gisela_spawn) EntityRegistry.addSpawn(EntityGisela.class, ModConfigs.spawn_values.Gisela_weight, ModConfigs.spawn_values.Gisela_min, ModConfigs.spawn_values.Gisela_max, EnumCreatureType.CREATURE, regularSpawning.toArray(new Biome[0]));
|
||||
if (ModConfigs.spawn_switches.Holzstammhuhn_spawn) EntityRegistry.addSpawn(EntityHolzstammhuhn.class, ModConfigs.spawn_values.Holzstammhuhn_weight, ModConfigs.spawn_values.Holzstammhuhn_min, ModConfigs.spawn_values.Holzstammhuhn_max, EnumCreatureType.CREATURE, regularSpawning.toArray(new Biome[0]));
|
||||
if (ModConfigs.spawn_switches.Jens_spawn) EntityRegistry.addSpawn(EntityJens.class, ModConfigs.spawn_values.Jens_weight, ModConfigs.spawn_values.Jens_min, ModConfigs.spawn_values.Jens_max, EnumCreatureType.CREATURE, regularSpawning.toArray(new Biome[0]));
|
||||
if (ModConfigs.spawn_switches.MZTEWolf_spawn) EntityRegistry.addSpawn(EntityMZTEWolf.class, ModConfigs.spawn_values.MZTEWolf_weight, ModConfigs.spawn_values.MZTEWolf_min, ModConfigs.spawn_values.MZTEWolf_max, EnumCreatureType.CREATURE, regularSpawning.toArray(new Biome[0]));
|
||||
if (ModConfigs.spawn_switches.MarcellDAvis_spawn) EntityRegistry.addSpawn(EntityMarcellDAvis.class, ModConfigs.spawn_values.MarcellDAvis_weight, ModConfigs.spawn_values.MarcellDAvis_min, ModConfigs.spawn_values.MarcellDAvis_max, EnumCreatureType.MONSTER, regularSpawning.toArray(new Biome[0]));
|
||||
if (ModConfigs.spawn_switches.MrBean_spawn) EntityRegistry.addSpawn(EntityMrBean.class, ModConfigs.spawn_values.MrBean_weight, ModConfigs.spawn_values.MrBean_min, ModConfigs.spawn_values.MrBean_max, EnumCreatureType.MONSTER, regularSpawning.toArray(new Biome[0]));
|
||||
if (ModConfigs.spawn_switches.Schalker_spawn) EntityRegistry.addSpawn(EntitySchalker.class, ModConfigs.spawn_values.Schalker_weight, ModConfigs.spawn_values.Schalker_min, ModConfigs.spawn_values.Schalker_max, EnumCreatureType.MONSTER, BiomeDictionary.getBiomes(BiomeDictionary.Type.END).toArray(new Biome[0]));
|
||||
if (ModConfigs.spawn_switches.SmavaCreeper_spawn) EntityRegistry.addSpawn(EntitySmavaCreeper.class, ModConfigs.spawn_values.SmavaCreeper_weight, ModConfigs.spawn_values.SmavaCreeper_min, ModConfigs.spawn_values.SmavaCreeper_max, EnumCreatureType.MONSTER, regularSpawning.toArray(new Biome[0]));
|
||||
if (ModConfigs.spawn_switches.tileraGhast_spawn) EntityRegistry.addSpawn(EntityTileraGhast.class, ModConfigs.spawn_values.tileraGhast_weight, ModConfigs.spawn_values.tileraGhast_min, ModConfigs.spawn_values.tileraGhast_max, EnumCreatureType.MONSTER, BiomeDictionary.getBiomes(BiomeDictionary.Type.NETHER).toArray(new Biome[0]));
|
||||
}
|
||||
|
||||
// Marcell D'Avis
|
||||
EntityRegistry.registerModEntity(new ResourceLocation("spackenmobs:marcell_davis"), EntityMarcellDAvis.class, "marcell_davis", id++, Spackenmobs.instance, 64, 1, true, 15759, 16777215);
|
||||
if (ModConfigs.spawn_switches.MarcellDAvis_spawn)
|
||||
{
|
||||
EntityRegistry.addSpawn(
|
||||
EntityMarcellDAvis.class,
|
||||
ModConfigs.spawn_values.MarcellDAvis_weight,
|
||||
ModConfigs.spawn_values.MarcellDAvis_min,
|
||||
ModConfigs.spawn_values.MarcellDAvis_max,
|
||||
EnumCreatureType.MONSTER,
|
||||
regularSpawning.toArray(new Biome[0]));
|
||||
}
|
||||
public static void registerEntityWithSpawnEgg(Class clazz, String entityName, int primary, int secondary)
|
||||
{
|
||||
ResourceLocation registryName = new ResourceLocation(Spackenmobs.MODID, entityName);
|
||||
EntityRegistry.registerModEntity(registryName, clazz, entityName, id++, Spackenmobs.instance, 64, 1, true, primary, secondary);
|
||||
SpackenmobsTab.eggs.add(getSpawnEgg(entityName));
|
||||
}
|
||||
|
||||
// ApoRed
|
||||
EntityRegistry.registerModEntity(new ResourceLocation("spackenmobs:apored"), EntityApoRed.class, "apored", id++, Spackenmobs.instance, 64, 1, true, 2039583, 16711680);
|
||||
if (ModConfigs.spawn_switches.ApoRed_spawn)
|
||||
{
|
||||
EntityRegistry.addSpawn(
|
||||
EntityApoRed.class,
|
||||
ModConfigs.spawn_values.ApoRed_weight,
|
||||
ModConfigs.spawn_values.ApoRed_min,
|
||||
ModConfigs.spawn_values.ApoRed_max,
|
||||
EnumCreatureType.MONSTER,
|
||||
regularSpawning.toArray(new Biome[0]));
|
||||
}
|
||||
|
||||
// Mr. Bean
|
||||
EntityRegistry.registerModEntity(new ResourceLocation("spackenmobs:mr_bean"), EntityMrBean.class, "mr_bean", id++, Spackenmobs.instance, 64, 1, true, 4802350, 3220238);
|
||||
if (ModConfigs.spawn_switches.MrBean_spawn)
|
||||
{
|
||||
EntityRegistry.addSpawn(
|
||||
EntityMrBean.class,
|
||||
ModConfigs.spawn_values.MrBean_weight,
|
||||
ModConfigs.spawn_values.MrBean_min,
|
||||
ModConfigs.spawn_values.MrBean_max,
|
||||
EnumCreatureType.MONSTER,
|
||||
regularSpawning.toArray(new Biome[0]));
|
||||
}
|
||||
|
||||
// Drachenlord
|
||||
EntityRegistry.registerModEntity(new ResourceLocation("spackenmobs:drachenlord"), EntityDrachenlord.class, "drachenlord", id++, Spackenmobs.instance, 64, 1, true, 15256745, 8738878);
|
||||
if (ModConfigs.spawn_switches.Drachenlord_spawn)
|
||||
{
|
||||
EntityRegistry.addSpawn(
|
||||
EntityDrachenlord.class,
|
||||
ModConfigs.spawn_values.Drachenlord_weight,
|
||||
ModConfigs.spawn_values.Drachenlord_min,
|
||||
ModConfigs.spawn_values.Drachenlord_max,
|
||||
EnumCreatureType.MONSTER,
|
||||
BiomeDictionary.getBiomes(BiomeDictionary.Type.NETHER).toArray(new Biome[0]));
|
||||
}
|
||||
|
||||
// Schalker
|
||||
EntityRegistry.registerModEntity(new ResourceLocation("spackenmobs:schalker"), EntitySchalker.class, "schalker", id++, Spackenmobs.instance, 64, 1, true, 24745, 16777215);
|
||||
if (ModConfigs.spawn_switches.Schalker_spawn)
|
||||
{
|
||||
EntityRegistry.addSpawn(
|
||||
EntitySchalker.class,
|
||||
ModConfigs.spawn_values.Schalker_weight,
|
||||
ModConfigs.spawn_values.Schalker_min,
|
||||
ModConfigs.spawn_values.Schalker_max,
|
||||
EnumCreatureType.MONSTER,
|
||||
BiomeDictionary.getBiomes(BiomeDictionary.Type.END).toArray(new Biome[0]));
|
||||
}
|
||||
|
||||
// Jens
|
||||
EntityRegistry.registerModEntity(new ResourceLocation("spackenmobs:jens"), EntityJens.class, "jens", id++, Spackenmobs.instance, 64, 1, true, 6704526, 6767911);
|
||||
if (ModConfigs.spawn_switches.Jens_spawn)
|
||||
{
|
||||
EntityRegistry.addSpawn(
|
||||
EntityJens.class,
|
||||
ModConfigs.spawn_values.Jens_weight,
|
||||
ModConfigs.spawn_values.Jens_min,
|
||||
ModConfigs.spawn_values.Jens_max,
|
||||
EnumCreatureType.CREATURE,
|
||||
regularSpawning.toArray(new Biome[0]));
|
||||
}
|
||||
|
||||
// MZTEWolf
|
||||
EntityRegistry.registerModEntity(new ResourceLocation("spackenmobs:mztewolf"), EntityMZTEWolf.class, "mztewolf", id++, Spackenmobs.instance, 64, 1, true, 16711680, 0);
|
||||
if (ModConfigs.spawn_switches.MZTEWolf_spawn)
|
||||
{
|
||||
EntityRegistry.addSpawn(
|
||||
EntityMZTEWolf.class,
|
||||
ModConfigs.spawn_values.MZTEWolf_weight,
|
||||
ModConfigs.spawn_values.MZTEWolf_min,
|
||||
ModConfigs.spawn_values.MZTEWolf_max,
|
||||
EnumCreatureType.CREATURE,
|
||||
regularSpawning.toArray(new Biome[0]));
|
||||
}
|
||||
|
||||
// Holzstammhuhn
|
||||
EntityRegistry.registerModEntity(new ResourceLocation("spackenmobs:holzstammhuhn"), EntityHolzstammhuhn.class, "holzstammhuhn", id++, Spackenmobs.instance, 64, 1, true, 12096347, 5295899);
|
||||
if (ModConfigs.spawn_switches.Holzstammhuhn_spawn)
|
||||
{
|
||||
EntityRegistry.addSpawn(
|
||||
EntityHolzstammhuhn.class,
|
||||
ModConfigs.spawn_values.Holzstammhuhn_weight,
|
||||
ModConfigs.spawn_values.Holzstammhuhn_min,
|
||||
ModConfigs.spawn_values.Holzstammhuhn_max,
|
||||
EnumCreatureType.CREATURE,
|
||||
regularSpawning.toArray(new Biome[0]));
|
||||
}
|
||||
|
||||
// Baka Mitai Creeper
|
||||
EntityRegistry.registerModEntity(new ResourceLocation("spackenmobs:bakamitai_creeper"), EntityBakaMitaiCreeper.class, "bakamitai_creeper", id++, Spackenmobs.instance, 64, 1, true, 826890, 0);
|
||||
if (ModConfigs.spawn_switches.BakaMitaiCreeper_spawn)
|
||||
{
|
||||
EntityRegistry.addSpawn(
|
||||
EntityBakaMitaiCreeper.class,
|
||||
ModConfigs.spawn_values.BakaMitaiCreeper_weight,
|
||||
ModConfigs.spawn_values.BakaMitaiCreeper_min,
|
||||
ModConfigs.spawn_values.BakaMitaiCreeper_max,
|
||||
EnumCreatureType.MONSTER,
|
||||
regularSpawning.toArray(new Biome[0]));
|
||||
}
|
||||
|
||||
// Friedrich Liechtenstein
|
||||
EntityRegistry.registerModEntity(new ResourceLocation("spackenmobs:friedrich"), EntityFriedrichLiechtenstein.class, "friedrich", id++, Spackenmobs.instance, 64, 1, true, 16447728, 15878595);
|
||||
if (ModConfigs.spawn_switches.Friedrich_spawn)
|
||||
{
|
||||
EntityRegistry.addSpawn(
|
||||
EntityFriedrichLiechtenstein.class,
|
||||
ModConfigs.spawn_values.Friedrich_weight,
|
||||
ModConfigs.spawn_values.Friedrich_min,
|
||||
ModConfigs.spawn_values.Friedrich_max,
|
||||
EnumCreatureType.CREATURE,
|
||||
regularSpawning.toArray(new Biome[0]));
|
||||
}
|
||||
|
||||
// Gisela
|
||||
EntityRegistry.registerModEntity(new ResourceLocation("spackenmobs:gisela"), EntityGisela.class, "gisela", id++, Spackenmobs.instance, 64, 1, true, 39835, 16448250);
|
||||
if (ModConfigs.spawn_switches.Gisela_spawn)
|
||||
{
|
||||
EntityRegistry.addSpawn(
|
||||
EntityGisela.class,
|
||||
ModConfigs.spawn_values.Gisela_weight,
|
||||
ModConfigs.spawn_values.Gisela_min,
|
||||
ModConfigs.spawn_values.Gisela_max,
|
||||
EnumCreatureType.CREATURE,
|
||||
regularSpawning.toArray(new Biome[0]));
|
||||
}
|
||||
|
||||
// tilera Ghast
|
||||
EntityRegistry.registerModEntity(new ResourceLocation("spackenmobs:tilera_ghast"), EntityTileraGhast.class, "tilera_ghast", id++, Spackenmobs.instance, 64, 1, true, 16447728, 15878595);
|
||||
if (ModConfigs.spawn_switches.tileraGhast_spawn)
|
||||
{
|
||||
EntityRegistry.addSpawn(
|
||||
EntityTileraGhast.class,
|
||||
ModConfigs.spawn_values.tileraGhast_weight,
|
||||
ModConfigs.spawn_values.tileraGhast_min,
|
||||
ModConfigs.spawn_values.tileraGhast_max,
|
||||
EnumCreatureType.MONSTER,
|
||||
BiomeDictionary.getBiomes(BiomeDictionary.Type.NETHER).toArray(new Biome[0]));
|
||||
}
|
||||
public static ItemStack getSpawnEgg(String entityName)
|
||||
{
|
||||
ItemStack stack = new ItemStack(Items.SPAWN_EGG);
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
nbt.setString("id", Spackenmobs.MODID + ":" + entityName);
|
||||
NBTTagCompound nbt2 = new NBTTagCompound();
|
||||
nbt2.setTag("EntityTag", nbt);
|
||||
stack.setTagCompound(nbt2);
|
||||
return stack;
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public static void registerItems(Register<Item> event)
|
||||
{
|
||||
event.getRegistry().registerAll(ModItems.ITEMS.toArray(new Item[0]));
|
||||
|
||||
OreDictionary.registerOre("dustRedstone", ModItems.MODEM);
|
||||
OreDictionary.registerOre("ingotIron", ModItems.RAM);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
|
@ -301,5 +188,13 @@ public class RegistryHandler
|
|||
event.getRegistry().register(ModSoundEvents.ENTITY_GISELA_AMBIENT);
|
||||
ModSoundEvents.ENTITY_GISELA_HURT.setRegistryName(new ResourceLocation("spackenmobs:entities.gisela.hurt"));
|
||||
event.getRegistry().register(ModSoundEvents.ENTITY_GISELA_HURT);
|
||||
|
||||
//MZTEWolf
|
||||
ModSoundEvents.ENTITY_MZTEWOLF_AMBIENT.setRegistryName(new ResourceLocation("spackenmobs:entities.mztewolf.ambient"));
|
||||
event.getRegistry().register(ModSoundEvents.ENTITY_MZTEWOLF_AMBIENT);
|
||||
ModSoundEvents.ENTITY_MZTEWOLF_HURT.setRegistryName(new ResourceLocation("spackenmobs:entities.mztewolf.hurt"));
|
||||
event.getRegistry().register(ModSoundEvents.ENTITY_MZTEWOLF_HURT);
|
||||
ModSoundEvents.ENTITY_MZTEWOLF_DEATH.setRegistryName(new ResourceLocation("spackenmobs:entities.mztewolf.death"));
|
||||
event.getRegistry().register(ModSoundEvents.ENTITY_MZTEWOLF_DEATH);
|
||||
}
|
||||
}
|
|
@ -16,11 +16,12 @@ public class RegistryHandlerClient
|
|||
@SubscribeEvent
|
||||
public static void registerModels(ModelRegistryEvent event)
|
||||
{
|
||||
registerModel(ModItems.AHOJ_BRAUSE, 0);
|
||||
registerModel(ModItems.AHOJ_BRAUSE_DRINK, 0);
|
||||
registerModel(ModItems.MODEM, 0);
|
||||
registerModel(ModItems.RAM, 0);
|
||||
registerModel(ModItems.RAM_ON_A_STICK, 0);
|
||||
registerModel(ModItems.SURSTROEMMING, 0);
|
||||
registerModel(ModItems.AHOJ_BRAUSE, 0);
|
||||
registerModel(ModItems.AHOJ_BRAUSE_DRINK, 0);
|
||||
}
|
||||
|
||||
private static void registerModel(Item item, int meta)
|
||||
|
|
|
@ -0,0 +1,61 @@
|
|||
package mod.acgaming.spackenmobs.render;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.model.ModelWither;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.entity.layers.LayerRenderer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import mod.acgaming.spackenmobs.entities.EntityJensWither;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class LayerJensWitherAura implements LayerRenderer<EntityJensWither>
|
||||
{
|
||||
private static final ResourceLocation WITHER_ARMOR = new ResourceLocation("textures/entity/wither/wither_armor.png");
|
||||
private final RenderJensWither witherRenderer;
|
||||
private final ModelWither witherModel = new ModelWither(0.5F);
|
||||
|
||||
public LayerJensWitherAura(RenderJensWither witherRendererIn)
|
||||
{
|
||||
this.witherRenderer = witherRendererIn;
|
||||
}
|
||||
|
||||
public void doRenderLayer(EntityJensWither entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale)
|
||||
{
|
||||
if (entitylivingbaseIn.isArmored())
|
||||
{
|
||||
GlStateManager.depthMask(!entitylivingbaseIn.isInvisible());
|
||||
this.witherRenderer.bindTexture(WITHER_ARMOR);
|
||||
GlStateManager.matrixMode(5890);
|
||||
GlStateManager.loadIdentity();
|
||||
float f = (float) entitylivingbaseIn.ticksExisted + partialTicks;
|
||||
float f1 = MathHelper.cos(f * 0.02F) * 3.0F;
|
||||
float f2 = f * 0.01F;
|
||||
GlStateManager.translate(f1, f2, 0.0F);
|
||||
GlStateManager.matrixMode(5888);
|
||||
GlStateManager.enableBlend();
|
||||
float f3 = 0.5F;
|
||||
GlStateManager.color(0.5F, 0.5F, 0.5F, 1.0F);
|
||||
GlStateManager.disableLighting();
|
||||
GlStateManager.blendFunc(GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ONE);
|
||||
this.witherModel.setLivingAnimations(entitylivingbaseIn, limbSwing, limbSwingAmount, partialTicks);
|
||||
this.witherModel.setModelAttributes(this.witherRenderer.getMainModel());
|
||||
Minecraft.getMinecraft().entityRenderer.setupFogColor(true);
|
||||
this.witherModel.render(entitylivingbaseIn, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale);
|
||||
Minecraft.getMinecraft().entityRenderer.setupFogColor(false);
|
||||
GlStateManager.matrixMode(5890);
|
||||
GlStateManager.loadIdentity();
|
||||
GlStateManager.matrixMode(5888);
|
||||
GlStateManager.enableLighting();
|
||||
GlStateManager.disableBlend();
|
||||
}
|
||||
}
|
||||
|
||||
public boolean shouldCombineTextures()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
package mod.acgaming.spackenmobs.render;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.model.ModelWither;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.entity.RenderLiving;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import mod.acgaming.spackenmobs.entities.EntityJensWither;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class RenderJensWither extends RenderLiving<EntityJensWither>
|
||||
{
|
||||
private static final ResourceLocation INVULNERABLE_JENS_WITHER_TEXTURE = new ResourceLocation("spackenmobs:textures/entities/jens_wither_inv.png");
|
||||
private static final ResourceLocation JENS_WITHER_TEXTURE = new ResourceLocation("spackenmobs:textures/entities/jens_wither.png");
|
||||
|
||||
public RenderJensWither(RenderManager renderManagerIn)
|
||||
{
|
||||
super(renderManagerIn, new ModelWither(0.0F), 1.0F);
|
||||
this.addLayer(new LayerJensWitherAura(this));
|
||||
}
|
||||
|
||||
public boolean onBlockDestroyed(ItemStack stack, World worldIn, IBlockState state, BlockPos pos, EntityLivingBase entityLiving)
|
||||
{
|
||||
if (!worldIn.isRemote && (double) state.getBlockHardness(worldIn, pos) != 0.0D)
|
||||
{
|
||||
stack.damageItem(1, entityLiving);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected ResourceLocation getEntityTexture(EntityJensWither entity)
|
||||
{
|
||||
int i = entity.getInvulTime();
|
||||
return i > 0 && (i > 80 || i / 5 % 2 != 1) ? INVULNERABLE_JENS_WITHER_TEXTURE : JENS_WITHER_TEXTURE;
|
||||
}
|
||||
|
||||
protected void preRenderCallback(EntityJensWither entitylivingbaseIn, float partialTickTime)
|
||||
{
|
||||
float f = 2.0F;
|
||||
int i = entitylivingbaseIn.getInvulTime();
|
||||
|
||||
if (i > 0)
|
||||
{
|
||||
f -= ((float) i - partialTickTime) / 220.0F * 0.5F;
|
||||
}
|
||||
|
||||
GlStateManager.scale(f, f, f);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"display": {
|
||||
"icon": {
|
||||
"item": "spackenmobs:modem"
|
||||
},
|
||||
"title": {
|
||||
"translate": "advancements.general.modem.title"
|
||||
},
|
||||
"description": {
|
||||
"translate": "advancements.general.modem.description"
|
||||
}
|
||||
},
|
||||
"parent": "spackenmobs:general/root",
|
||||
"criteria": {
|
||||
"ram": {
|
||||
"trigger": "minecraft:inventory_changed",
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"item": "spackenmobs:modem"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -2,6 +2,8 @@ advancements.general.ahoj_brause.description=Töte oder handle mit einem Friedri
|
|||
advancements.general.ahoj_brause.title=Das pulvert mich richtig 'n bisschen auf
|
||||
advancements.general.ahoj_brause_drink.description=Melke einen Friedrich Liechtenstein und erhalte eine Ahoj-Brause Brause
|
||||
advancements.general.ahoj_brause_drink.title=Diese Brause ist enorm
|
||||
advancements.general.modem.description=Töte einen Marcell D'Avis und erhalte ein Modem
|
||||
advancements.general.modem.title=VOLLER EMPFANG!
|
||||
advancements.general.ram.description=Töte einen Jens und erhalte Corsair RAM
|
||||
advancements.general.ram.title=MemTest
|
||||
advancements.general.ram_on_a_stick.description=Stelle eine RAM-Rute her, um einen Jens zu reiten
|
||||
|
@ -17,6 +19,7 @@ entity.friedrich.name=Friedrich Liechtenstein
|
|||
entity.gisela.name=Gisela
|
||||
entity.holzstammhuhn.name=Holzstammhuhn
|
||||
entity.jens.name=Jens
|
||||
entity.jens_wither.name=Jens-Wither
|
||||
entity.marcell_davis.name=Marcell D'Avis
|
||||
entity.mr_bean.name=Mr. Bean
|
||||
entity.mztewolf.name=MZTEWolf
|
||||
|
@ -25,6 +28,7 @@ entity.smava_creeper.name=Smava-Creeper
|
|||
entity.tilera_ghast.name=tilera-Ghast
|
||||
item.ahoj_brause.name=Ahoj-Brause Brausepulver
|
||||
item.ahoj_brause_drink.name=Ahoj-Brause Brause
|
||||
item.modem.name=Modem
|
||||
item.ram.name=RAM
|
||||
item.ram_on_a_stick.name=RAM-Rute
|
||||
item.surstroemming.name=Surströmming
|
||||
|
|
|
@ -2,6 +2,8 @@ advancements.general.ahoj_brause.description=Kill or trade with a Friedrich Liec
|
|||
advancements.general.ahoj_brause.title=Das pulvert mich richtig 'n bisschen auf
|
||||
advancements.general.ahoj_brause_drink.description=Milk a Friedrich Liechtenstein and get an Ahoj-Brause Soda
|
||||
advancements.general.ahoj_brause_drink.title=Diese Brause ist enorm
|
||||
advancements.general.modem.description=Kill a Marcell D'Avis and get a modem
|
||||
advancements.general.modem.title=VOLLER EMPFANG!
|
||||
advancements.general.ram.description=Kill a Jens and get Corsair RAM
|
||||
advancements.general.ram.title=MemTest
|
||||
advancements.general.ram_on_a_stick.description=Craft a RAM On A Stick to ride Jens
|
||||
|
@ -17,6 +19,7 @@ entity.friedrich.name=Friedrich Liechtenstein
|
|||
entity.gisela.name=Gisela
|
||||
entity.holzstammhuhn.name=Holzstammhuhn
|
||||
entity.jens.name=Jens
|
||||
entity.jens_wither.name=Jens Wither
|
||||
entity.marcell_davis.name=Marcell D'Avis
|
||||
entity.mr_bean.name=Mr. Bean
|
||||
entity.mztewolf.name=MZTEWolf
|
||||
|
@ -25,6 +28,7 @@ entity.smava_creeper.name=Smava Creeper
|
|||
entity.tilera_ghast.name=tilera Ghast
|
||||
item.ahoj_brause.name=Ahoj-Brause Soda Powder
|
||||
item.ahoj_brause_drink.name=Ahoj-Brause Soda
|
||||
item.modem.name=Modem
|
||||
item.ram.name=RAM
|
||||
item.ram_on_a_stick.name=RAM on a Stick
|
||||
item.surstroemming.name=Surströmming
|
||||
|
|
|
@ -0,0 +1,67 @@
|
|||
{
|
||||
"pools": [
|
||||
{
|
||||
"name": "holzstammhuhn",
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "item",
|
||||
"name": "minecraft:stick",
|
||||
"weight": 1,
|
||||
"functions": [
|
||||
{
|
||||
"function": "set_count",
|
||||
"count": {
|
||||
"min": 0,
|
||||
"max": 2
|
||||
}
|
||||
},
|
||||
{
|
||||
"function": "looting_enchant",
|
||||
"count": {
|
||||
"min": 0,
|
||||
"max": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "holzstammhuhn",
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "item",
|
||||
"name": "minecraft:log",
|
||||
"weight": 1,
|
||||
"functions": [
|
||||
{
|
||||
"function": "set_data",
|
||||
"data": 0
|
||||
},
|
||||
{
|
||||
"function": "furnace_smelt",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "entity_properties",
|
||||
"entity": "this",
|
||||
"properties": {
|
||||
"on_fire": true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "looting_enchant",
|
||||
"count": {
|
||||
"min": 0,
|
||||
"max": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"pools": [
|
||||
{
|
||||
"name": "marcell_davis",
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "item",
|
||||
"name": "spackenmobs:modem",
|
||||
"weight": 1,
|
||||
"functions": [
|
||||
{
|
||||
"function": "set_count",
|
||||
"count": {
|
||||
"min": 0,
|
||||
"max": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"function": "looting_enchant",
|
||||
"count": {
|
||||
"min": 0,
|
||||
"max": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "spackenmobs:items/modem"
|
||||
}
|
||||
}
|
|
@ -1005,6 +1005,38 @@
|
|||
},
|
||||
{
|
||||
"name": "spackenmobs:mztewolf/say3"
|
||||
},
|
||||
{
|
||||
"name": "spackenmobs:mztewolf/say4"
|
||||
},
|
||||
{
|
||||
"name": "spackenmobs:mztewolf/say5"
|
||||
},
|
||||
{
|
||||
"name": "spackenmobs:mztewolf/say6"
|
||||
},
|
||||
{
|
||||
"name": "spackenmobs:mztewolf/say7"
|
||||
},
|
||||
{
|
||||
"name": "spackenmobs:mztewolf/say8"
|
||||
}
|
||||
]
|
||||
},
|
||||
"entities.mztewolf.death": {
|
||||
"sounds": [
|
||||
{
|
||||
"name": "spackenmobs:mztewolf/death1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"entities.mztewolf.hurt": {
|
||||
"sounds": [
|
||||
{
|
||||
"name": "spackenmobs:mztewolf/hurt1"
|
||||
},
|
||||
{
|
||||
"name": "spackenmobs:mztewolf/hurt2"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 29 KiB |
|
@ -3,8 +3,8 @@
|
|||
"modid": "spackenmobs",
|
||||
"name": "Spackenmobs",
|
||||
"description": "The most important mobs in the history of Minecraft! [citation needed]",
|
||||
"version": "1.8-CF",
|
||||
"mcversion": "1.12.2",
|
||||
"version": "${version}",
|
||||
"mcversion": "${mcversion}",
|
||||
"url": "https://github.com/ACGaming/Spackenmobs",
|
||||
"updateUrl": "",
|
||||
"authorList": [
|
||||
|
|