forked from GnomeWorks/dungeon-mobs
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathEntityDungeonMob.java
61 lines (46 loc) · 1.3 KB
/
EntityDungeonMob.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package com.gw.dm;
import net.minecraft.entity.monster.EntityMob;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
public abstract class EntityDungeonMob extends EntityMob {
public boolean ignoreHeight;
public boolean spawnChecked;
public EntityDungeonMob(World worldIn) {
super(worldIn);
//this.spawnChecked = !DungeonMobsHelper.getMSC();
// TODO Auto-generated constructor stub
}
// FIXME: I don't know what this is for, so I don't know if I
// should fix this or delete it...?
/*
@Override
public int getMaxHealth()
{
return 1;
}
*/
public void setIgnoreHeight(boolean in) {
ignoreHeight = in;
}
public void onLivingUpdate() {
// TODO: Implement the use of these variable in config and gametime code.
/*
if(!this.spawnChecked && DungeonMobsHelper.getMSC())
{
if(!this.getCanSpawnHere())
this.setDead();
else
this.spawnChecked = true;
}
*/
super.onLivingUpdate();
}
public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) {
par1NBTTagCompound.setBoolean("spawnCheck", this.spawnChecked);
super.writeEntityToNBT(par1NBTTagCompound);
}
public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) {
super.readEntityFromNBT(par1NBTTagCompound);
spawnChecked = par1NBTTagCompound.getBoolean("spawnCheck");
}
}