Skip to content

Commit

Permalink
Revert "Update mappings + new mindflayer model"
Browse files Browse the repository at this point in the history
This reverts commit f93820f.
  • Loading branch information
Sunconure11 committed Apr 16, 2020
1 parent f93820f commit 2d87eb8
Show file tree
Hide file tree
Showing 126 changed files with 7,379 additions and 5,636 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ compileJava {
}

minecraft {
version = "1.12.2-14.23.5.2847"
version = "1.12.2-14.23.5.2796"
runDir = "run"

// the mappings can be changed at any time, and must be in the following format.
// snapshot_YYYYMMDD snapshot are built nightly.
// stable_# stables are built at the discretion of the MCP team.
// Use non-default mappings at your own risk. they may not always work.
// simply re-run your setup task after changing the mappings to update your workspace.
mappings = "stable_39"
mappings = "snapshot_20171003"
makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
}

Expand Down
42 changes: 26 additions & 16 deletions src/main/java/com/gw/dm/DungeonMobs.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.gw.dm.entity.EntityLizalfos;
import com.gw.dm.proxy.CommonProxy;
import com.gw.dm.util.*;

import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.Mod.Instance;
Expand All @@ -15,40 +16,49 @@

import java.util.Arrays;

@Mod(modid = DungeonMobs.MODID, name = "Dungeon Mobs", version = DungeonMobs.VERSION, dependencies = "after:thaumcraft; after:dldungeonsjbg")
@Mod(modid = DungeonMobs.MODID, name = "Dungeon Mobs", version = DungeonMobs.VERSION,
dependencies = "after:thaumcraft; after:dldungeonsjbg")
public class DungeonMobs {
public static final String MODID = "dungeonmobs";
public static final String VERSION = "5.8.5";

@Instance(MODID)
public static DungeonMobs instance;
@SidedProxy(clientSide = "com.gw.dm.proxy.ClientProxy", serverSide = "com.gw.dm.proxy.CommonProxy")
@SidedProxy(clientSide = "com.gw.dm.proxy.ClientProxy",
serverSide = "com.gw.dm.proxy.CommonProxy")
public static CommonProxy proxy;
private static boolean gotDLD;
DMGenerationHandler worldGen;

private static void initMonsterSpecialData() {
EntityLizalfos.initLocations();
DMGenerationHandler.initTargetBlocks();
ConfigHandler.mobSpecialSetup();
}

@EventHandler
public void preInit(FMLPreInitializationEvent event) {
ModMetadata modmeta = event.getModMetadata();
modmeta.authorList = Arrays.asList(new String[]{"GnomeWorks", "JaredBGreat", "Sunconure"});
modmeta.autogenerated = false;
modmeta.credits = "_303, ZeuX, r4wk, Zorn_Taov, Wreckage, Crudedragos, DraxisWuf, MohawkyMagoo";
modmeta.description = "Adds a variety of new hostile mobs, all of which hate you.\n" + "Inspiration includes: Dungeons & Dragons, Legend of Zelda, Hexen\n" + "\n" + "Rust Monster - Ghoul - Shrieker - Umber Hulk - Hook Horror " + "- Beholder - Troll - Cave Fisher - Destrachan - Illithid " + "- Hell Hound - Rakshasa - Lizalfos - Cockatrice - Manticore " + "- Thoqqua - Vescavor - Revenant - Vampire - Fallen Angel - Outer Thing\n";
modmeta.description =
"Adds a variety of new hostile mobs, all of which hate you.\n" +
"Inspiration includes: Dungeons & Dragons, Legend of Zelda, Hexen\n" +
"\n" +
"Rust Monster - Ghoul - Shrieker - Umber Hulk - Hook Horror "
+ "- Beholder - Troll - Cave Fisher - Destrachan - Illithid "
+ "- Hell Hound - Rakshasa - Lizalfos - Cockatrice - Manticore "
+ "- Thoqqua - Vescavor - Revenant - Vampire - Fallen Angel - Outer Thing\n";
modmeta.url = "https://minecraft.curseforge.com/projects/dungeon-mobs-reborn";


ConfigHandler.configDir = ConfigHandler.findConfigDir(event.getModConfigurationDirectory());
ConfigHandler.init();

MiscRegistrar.initBlocks();


MobRegistrar.registerMobs();
if (ConfigHandler.spawnNaturally) {
MobRegistrar.registerSpawns();
Expand All @@ -58,21 +68,21 @@ public void preInit(FMLPreInitializationEvent event) {
}
proxy.registerRenders();
}

@EventHandler
public void init(FMLInitializationEvent event) {
AudioHandler.registerSounds();
if (ConfigHandler.spawnBladeTrap) {
worldGen = new DMGenerationHandler();
}
if (ConfigHandler.addToDoomlikeDungeons) {
if(ConfigHandler.addToDoomlikeDungeons) {
DLDCompat.addDLD();
}
}

@EventHandler
public void postInit(FMLPostInitializationEvent event) {
public void postInit(FMLPostInitializationEvent event) {
initMonsterSpecialData();
}

}
17 changes: 10 additions & 7 deletions src/main/java/com/gw/dm/DungeonMobsDamageSource.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,19 @@
import net.minecraft.util.DamageSource;

public class DungeonMobsDamageSource extends DamageSource {
public static final DamageSource BLADE_TRAP = (new DamageSource("bladetrap"));
public static final DamageSource PETRIFIED = (new DamageSource("petrified")).setDamageBypassesArmor();
public static final DamageSource ENERGY_DRAIN = (new DamageSource("energydrain")).setDamageBypassesArmor();
public static final DamageSource LIGHT_BALL = new DamageSource("light_ball").setProjectile();//.setDamageBypassesArmor(); // Now partial, works differently

public static final DamageSource BLADE_TRAP = (new DamageSource("bladetrap"));
public static final DamageSource PETRIFIED = (new DamageSource("petrified"))
.setDamageBypassesArmor();
public static final DamageSource ENERGY_DRAIN = (new DamageSource("energydrain"))
.setDamageBypassesArmor();
public static final DamageSource LIGHT_BALL = new DamageSource("light_ball")
.setProjectile();//.setDamageBypassesArmor(); // Now partial, works differently

public DungeonMobsDamageSource(String name) {
super(name);
}


@Override
public boolean isUnblockable() {
return true;
Expand Down
63 changes: 34 additions & 29 deletions src/main/java/com/gw/dm/EntityDungeonFlying.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,51 +10,50 @@
public abstract class EntityDungeonFlying extends EntityFlying {
public boolean ignoreHeight;
public boolean spawnChecked;


public EntityDungeonFlying(World worldIn) {
super(worldIn);
}


public void setIgnoreHeight(boolean foo) {
ignoreHeight = foo;
}


protected boolean isValidLightLevel() {
int var1 = MathHelper.floor(posX);
int var2 = MathHelper.floor(getEntityBoundingBox().minY);
int var3 = MathHelper.floor(posZ);
BlockPos bp = new BlockPos(var1, var2, var3);

if (world.getLightFor(EnumSkyBlock.SKY, bp) > rand.nextInt(32)) {

if (world.getLightFor(EnumSkyBlock.SKY, bp)
> rand.nextInt(32)) {
return false;
}
else {
} else {
int var4 = world.getLightFromNeighbors(bp);

if (this.world.isThundering()) {
int var5 = world.getSkylightSubtracted();
world.setSkylightSubtracted(10);
var4 = world.getLightFromNeighbors(bp);
world.setSkylightSubtracted(var5);
}

return var4 <= this.rand.nextInt(8);
}
}

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");


public boolean getCanSpawnHere() {
if (!this.isValidLightLevel())
return false;

return super.getCanSpawnHere();
}



public void onLivingUpdate() {
// TODO: Implement these config options.
/*
Expand All @@ -66,14 +65,20 @@ public void onLivingUpdate() {
this.spawnChecked = true;
}
*/

super.onLivingUpdate();
}

public boolean getCanSpawnHere() {
if (!this.isValidLightLevel()) return false;

return super.getCanSpawnHere();


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");
}

}
26 changes: 13 additions & 13 deletions src/main/java/com/gw/dm/EntityDungeonMob.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
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...?
/*
Expand All @@ -25,12 +25,12 @@ 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.
/*
Expand All @@ -44,18 +44,18 @@ public void onLivingUpdate() {
*/
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");
}


}
13 changes: 6 additions & 7 deletions src/main/java/com/gw/dm/ai/AIAngelAttack.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,24 +95,23 @@ public void attackMovement() {
double dist = ((dx * dx) + (dy * dy) + (dz * dz));
if (dist > 576) {
movingIn = true;
}
else if (dist < 256) {
} else if (dist < 256) {
movingIn = false;
}
dx *= r.nextDouble();
dy *= r.nextDouble();
dz *= r.nextDouble();
if (movingIn && !(((AngelicMoveHelper) owner.getMoveHelper()).blocked)) {
dist = Math.sqrt((dx * dx) + (dy * dy) + (dz * dz)) / 4;
baseMotion.setTarget((dx / dist), (dy / dist), (dz / dist));
baseMotion.setTarget((dx / dist),
(dy / dist),
(dz / dist));
baseMotion.callMoveHelper();
}
else if ((dist < 64) && !(((AngelicMoveHelper) owner.getMoveHelper()).blocked)) {
} else if ((dist < 64) && !(((AngelicMoveHelper) owner.getMoveHelper()).blocked)) {
dist = -(Math.sqrt((dx * dx) + (dy * dy) + (dz * dz)) / 4);
baseMotion.setTarget(dx / dist, dy / dist, dz / dist);
baseMotion.callMoveHelper();
}
else {
} else {
baseMotion.startExecuting();
}
}
Expand Down
Loading

0 comments on commit 2d87eb8

Please sign in to comment.