Skip to content
This repository has been archived by the owner on Jan 18, 2022. It is now read-only.

Commit

Permalink
Synchronize 1.7.10 branch for 1.5.3 release
Browse files Browse the repository at this point in the history
  • Loading branch information
DracoScythem committed Jun 22, 2019
1 parent e1a13c2 commit b611e62
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 194 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ buildscript {

apply plugin: 'forge'

version = "1.7.10-1.5.2"
version = "1.7.10-1.5.3"
group= "com.wildmobsmod" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "WildMobs"

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/wildmobsmod/entity/EntityConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ public boolean isEnabled()
* =<>=<>=<>=<>= CONFIG PARSING UTILITY METHODS =<>=<>=<>=<>=
*/

protected static final String PATTERN_WEIGHTEDRANDOMSTACKLIST = "[Pattern: <modid>:<itemid>:<meta>, <amount>, <weight>]";
protected static final String PATTERN_WEIGHTEDRANDOMSTACKSELECTOR = "[Pattern: <modid>:<itemid>:<meta>, <amount>, <weight>]";

protected static WeightedRandomSelector<ItemStack> buildWeightedRandomSelectorFromStackList(String... stackList) {
protected static WeightedRandomSelector<ItemStack> buildWeightedRandomStackSelector(String... stackList) {
final int size = stackList.length;
if(size < 1) {
return new WeightedRandomSelector<>(new ItemStack[]{null}, new double[]{1.0D});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ protected void sync(Configuration config)
bottleDropChance = config.get(getMiredCategory(), "bottleDropChance", defaultBottleDropChance, "Chance (in percent) of a mired dropping a mired bottle.", 0.0D, 1.0D).getDouble();
enableMiredBottle = config.getBoolean("enableMiredBottle", getMiredCategory(), defaultEnableMiredBottle, "Allow MiredSummoners (and consequentially Mireds) to be spawned via Mired Bottles (which are dropped by Dreaths)? [Ignored if \"registerMiredEntities\" is false]");
miredDropCount = config.getInt("miredDropCount", getMiredCategory(), defaultMiredDropCount, 1, 20, "Amount of Loot a Mired Bottle is meant to drop.");
miredLoot = config.getStringList("miredLoot", getMiredCategory(), defaultMiredLoot, "Mired LootTable definition. " + PATTERN_WEIGHTEDRANDOMSTACKLIST);
miredLootTable = buildWeightedRandomSelectorFromStackList(miredLoot);
miredLoot = config.getStringList("miredLoot", getMiredCategory(), defaultMiredLoot, "Mired LootTable definition. " + PATTERN_WEIGHTEDRANDOMSTACKSELECTOR);
miredLootTable = buildWeightedRandomStackSelector(miredLoot);
guaranteeDropCount = config.getBoolean("guaranteeDropCount", getMiredCategory(), defaultGuaranteeDropCount, "If a MiredSummoners loot pool hasn't been exhausted during its lifetime, drop the leftovers on it's own death?");
}

Expand Down
50 changes: 0 additions & 50 deletions src/main/java/com/wildmobsmod/items/ItemWildMobsMonsterPlacer.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,56 +97,6 @@ public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int
return true;
}

// public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
// {
// if(par2World.isRemote)
// {
// return par1ItemStack;
// }
// else
// {
// MovingObjectPosition movingobjectposition = getMovingObjectPositionFromPlayer(par2World, par3EntityPlayer, true);
//
// if(movingobjectposition == null)
// {
// return par1ItemStack;
// }
// else
// {
// if(movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
// {
// int i = movingobjectposition.blockX;
// int j = movingobjectposition.blockY;
// int k = movingobjectposition.blockZ;
//
// if(!par2World.canMineBlock(par3EntityPlayer, i, j, k)) { return par1ItemStack; }
//
// if(!par3EntityPlayer.canPlayerEdit(i, j, k, movingobjectposition.sideHit, par1ItemStack)) { return par1ItemStack; }
//
// if(par2World.getBlock(i, j, k) instanceof BlockLiquid)
// {
// Entity entity = spawnEntity(par2World, i, j, k);
//
// if(entity != null)
// {
// if(entity instanceof EntityLivingBase && par1ItemStack.hasDisplayName())
// {
// ((EntityLiving) entity).setCustomNameTag(par1ItemStack.getDisplayName());
// }
//
// if(!par3EntityPlayer.capabilities.isCreativeMode)
// {
// --par1ItemStack.stackSize;
// }
// }
// }
// }
//
// return par1ItemStack;
// }
// }
// }

/**
* only call this on the server side!
*/
Expand Down
131 changes: 1 addition & 130 deletions src/main/java/com/wildmobsmod/main/WildMobsMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
@Mod(modid = WildMobsMod.MODID, name = WildMobsMod.MODNAME, version = WildMobsMod.VERSION, guiFactory = "com.wildmobsmod.main.GUIFactory")
public class WildMobsMod
{
public static final String MODID = "wildmobsmod", MODNAME = "Wild Mobs", VERSION = "1.5.2";
public static final String MODID = "wildmobsmod", MODNAME = "Wild Mobs", VERSION = "1.5.3";

@SidedProxy(clientSide = "com.wildmobsmod.main.ClientProxy", serverSide = "com.wildmobsmod.main.ServerProxy")
public static IProxy proxy;
Expand Down Expand Up @@ -89,83 +89,7 @@ public class WildMobsMod
public static final EntityConfigWolf WOLF_CONFIG = EntityConfigWolf.construct("Wolf", 4, 4, 4, true, 50);

// public static final EntityConfig WIZARD_CONFIG = EntityConfig.construct("Wizard", 0, false); // Disabled for now;


// public static final EntityConfig SKELETONWOLF_CONFIG = EntityConfig.construct("Skeleton Wolf", 0, 0, 0, true); // individual spawning disabled, use skeletonWolfChance instead

//
// Here's the (unfinished) config settings. The variables are finished, but
// the file doesn't generate properly.
//
// public static int deerSpawnRate = 7;
// public static int foxSpawnRate = 6;
// public static int cougarSpawnRate = 4;
// public static int bisonSpawnRate = 4;
// public static int mouseSpawnRate = 5;
// public static int butterflySpawnRate = 5;
// public static int tarantulaSpawnRate = 50;
// public static int dreathSpawnRate = 5;
// public static int goatSpawnRate = 10;
// public static int zomgusSpawnRateMushroomIsland = 30;
// public static int zomgusSpawnRateRoofedForest = 8;
// public static int direWolfSpawnRate = 1;
// public static int magmaPlantSpawnRate = 20;
// public static int dragonflySpawnRate = 7;
// public static int armadilloSpawnRate = 5;
// public static int jellyfishSpawnRate = 9;
// public static int netherMedusaSpawnRate = 2;
// public static int skeletonWolfSpawnRate = 4;
// public static int gooseSpawnRateWater = 12;
// public static int gooseSpawnRateSwamp = 8;
// public static int seaScorpionSpawnRate = 5;
// public static int fadedSpawnRate = 4;
//
// public static boolean enableDeer = true;
// public static boolean enableFox = true;
// public static boolean enableCougar = true;
// public static boolean enableZomgus = true;
// public static boolean enableBison = true;
// public static boolean enableWizard = true;
// public static boolean enableMouse = true;
// public static boolean enableButterfly = true;
// public static boolean enableTarantula = true;
// public static boolean enableDreath = true;
// public static boolean enableGoat = true;
// public static boolean enableDireWolf = true;
// public static boolean enableFoxUnnaturalVariants = true;
// public static boolean enableDiseasedMice = true;
// public static boolean enableMagmaPlant = true;
// public static boolean enableDragonfly = true;
// public static boolean enableArmadillo = true;
// public static boolean enableImprovedWolves = true;
// public static boolean enableJellyfish = true;
// public static boolean enableSkeletonWolf = true;
// public static boolean enableBabySkeleton = true;
// public static boolean enableGoose = true;
// public static boolean enableImprovedCats = true;
// public static boolean enableSeaScorpion = true;
// public static boolean enableWitherSkeletonWolf = false;
// public static boolean enableBabyDreath = false;
// public static boolean enableFaded = true;
//
// public static boolean enableCalamari = true;
// public static boolean enableAchievementPage = false;
// public static boolean enableLeatherBlock = true;
// public static boolean enableBugNet = true;
// public static boolean enableFur = true;
// public static boolean enableBisonLeather = true;

// public static String[] seaScorpionSuitableFoods = new String[] { "minecraft:fish", "wildmobsmod:calamari" };
// public static String[] miredDropsVeryRare = new String[] { "minecraft:diamond", "minecraft:emerald", "minecraft:golden_apple", "minecraft:diamond_horse_armor", "minecraft:experience_bottle", "minecraft:name_tag" };
// public static String[] miredDropsRare = new String[] { "minecraft:gold_ingot", "minecraft:iron_horse_armor", "minecraft:iron_sword", "minecraft:iron_axe", "minecraft:golden_sword", "minecraft:compass", "minecraft:saddle", "minecraft:map", "minecraft:golden_carrot" };
// public static String[] miredDropsCommon = new String[] { "minecraft:iron_ingot", "minecraft:coal", "minecraft:book", "minecraft:iron_shovel", "minecraft:leather", "minecraft:leather_boots", "minecraft:shears", "minecraft:flint", "minecraft:reeds" };

// public static final String CATEGORY_DEER = "Deer";
// public static final String CATEGORY_FOX = "Fox";
// public static final String CATEGORY_MOUSE = "Mouse";
// public static final String CATEGORY_DREATH = "Dreath";
// public static final String CATEGORY_SEASCORPION = "Sea Scorpion";
// public static final String CATEGORY_FADED = "Faded";

@Metadata
public static ModMetadata meta;
Expand Down Expand Up @@ -221,17 +145,14 @@ public void init(FMLInitializationEvent event)
{
MinecraftForge.EVENT_BUS.register(new WolfOverrideHandler());
}

if(skeletonWolfChance > -1) // Enabled
{
MinecraftForge.EVENT_BUS.register(new SkeletonWolfHandler());
}

if(MOUSE_CONFIG.isEnabled())
{
MinecraftForge.EVENT_BUS.register(new OcelotHuntMiceHandler());
}

if(OCELOT_CONFIG.isEnabled())
{
MinecraftForge.EVENT_BUS.register(new CreeperAvoidWMOcelotHandler());
Expand All @@ -240,7 +161,6 @@ public void init(FMLInitializationEvent event)
MinecraftForge.EVENT_BUS.register(new OcelotOverrideHandler());
}
}

if(SEASCORPION_CONFIG.isEnabled())
{
MinecraftForge.EVENT_BUS.register(new SeaScorpionSpecialSpawnHandler());
Expand All @@ -261,41 +181,6 @@ public void postInit(FMLPostInitializationEvent event)

public static void syncConfig()
{
// // Deer
// enableDeer = config.getBoolean("Enable Deer", CATEGORY_DEER, true, "");
// deerSpawnRate = config.getInt("Deer Spawn Rate", CATEGORY_DEER, 7, 0, 100, "Higher values make the mob spawn more often. If the value is set to zero, the mob won't spawn at all.");
//
// // Fox
// enableFox = config.getBoolean("Enable Fox", CATEGORY_FOX, true, "");
// foxSpawnRate = config.getInt("Fox Spawn Rate", CATEGORY_FOX, 7, 0, 100, "Higher values make the mob spawn more often. If the value is set to zero, the mob won't spawn at all.");
//
// // Mouse
// enableMouse = config.getBoolean("Enable Mouse", CATEGORY_MOUSE, true, "");
// enableDiseasedMice = config.getBoolean("Enable Diseased Mice", CATEGORY_MOUSE, true, "");
// mouseSpawnRate = config.getInt("Mouse Spawn Rate", CATEGORY_MOUSE, 5, 0, 100, "Higher values make the mob spawn more often. If the value is set to zero, the mob won't spawn at all.");
//
// // Dreath and Mired
// enableDreath = config.getBoolean("Enable Dreath and Mired", CATEGORY_DREATH, true, "");
// enableBabyDreath = config.getBoolean("Enable Baby dreath", CATEGORY_DREATH, false, "");
// dreathSpawnRate = config.getInt("Dreath Spawn Rate", CATEGORY_DREATH, 5, 0, 100, "Higher values make the mob spawn more often. If the value is set to zero, the mob won't spawn at all.");
// miredDropsVeryRare = config.getStringList("Very Rare Mired Drops", CATEGORY_DREATH, new String[] { "minecraft:diamond", "minecraft:emerald", "minecraft:golden_apple", "minecraft:diamond_horse_armor", "minecraft:experience_bottle", "minecraft:name_tag" },
// "11% of the items mireds summoned using mired bottles drop.");
// miredDropsRare = config.getStringList("Rare Mired Drops", CATEGORY_DREATH,
// new String[] { "minecraft:gold_ingot", "minecraft:iron_horse_armor", "minecraft:iron_sword", "minecraft:iron_axe", "minecraft:golden_sword", "minecraft:compass", "minecraft:saddle", "minecraft:map", "minecraft:golden_carrot" },
// "23% of the items mireds summoned using mired bottles drop.");
// miredDropsCommon = config.getStringList("Common Mired Drops", CATEGORY_DREATH,
// new String[] { "minecraft:iron_ingot", "minecraft:coal", "minecraft:book", "minecraft:iron_shovel", "minecraft:leather", "minecraft:leather_boots", "minecraft:shears", "minecraft:flint", "minecraft:reeds" },
// "66% of the items mireds summoned using mired bottles drop.");
//
// // Sea Scorpion
// enableSeaScorpion = config.getBoolean("Enable Sea Scorpion", CATEGORY_SEASCORPION, true, "");
// seaScorpionSpawnRate = config.getInt("Sea Scorpion Spawn Rate", CATEGORY_SEASCORPION, 5, 0, 10, "Higher values make the mob spawn more often. If the value is set to zero, the mob won't spawn at all.");
// seaScorpionSuitableFoods = config.getStringList("Suitable Sea Scorpion Foods", CATEGORY_SEASCORPION, new String[] { "minecraft:fish", "wildmobsmod:calamari" }, "Food items that can be used to heal non-wild sea scorpions.");
//
// // Faded
// enableFaded = config.getBoolean("Enable Faded", CATEGORY_FADED, true, "");
// fadedSpawnRate = config.getInt("Faded Spawn Rate", CATEGORY_FADED, 4, 0, 100, "Higher values make the mob spawn more often. If the value is set to zero, the mob won't spawn at all.");

skeletonWolfChance = config.getInt("skeletonWolfChance", CONFIG_CATEGORY_ENTITIES, 3, -1, 100, "Chance (in Percent) for a Skeleton Wolf to spawn alongside a Skeleton (0 to disable; -1 to prevent the Skeleton Wolf Entity from being registered)");
aquaHealingID = config.getInt("aquaHealingId", CONFIG_CATEGORY_GENERAL, 40, 0, 1024, "The Potion ID for Aqua Healing, please do your research before changing this!");
enableCalamari = config.getBoolean("enableCalamari", CONFIG_CATEGORY_GENERAL, true, "Make Squids drop calamari");
Expand Down Expand Up @@ -333,18 +218,4 @@ public static boolean checkIsEntityNew(Entity entity) {
return true;
}
}

// public static Item getItem(String string)
// {
// String modId = string.split(":")[0];
//
// String name = string.split(":")[1];
//
// return GameRegistry.findItem(modId, name);
// }
//
// public static String listToString(String[] stringList, int element)
// {
// return stringList[element];
// }
}
8 changes: 4 additions & 4 deletions src/main/java/com/wildmobsmod/misc/OcelotOverrideHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ public class OcelotOverrideHandler
@SubscribeEvent(priority=EventPriority.HIGHEST)
public void onOcelotSpawn(EntityJoinWorldEvent event)
{
if(event.entity.getClass() == EntityOcelot.class && WildMobsMod.checkIsEntityNew(event.entity) && Math.random() * 100 < WildMobsMod.OCELOT_CONFIG.getOverrideChance())
final Entity entity = event.entity;
if(entity.getClass() == EntityOcelot.class && WildMobsMod.checkIsEntityNew(entity) && Math.random() * 100 < WildMobsMod.OCELOT_CONFIG.getOverrideChance())
{
EntityOcelot ocelot = (EntityOcelot) event.entity;
EntityOcelot ocelot = (EntityOcelot) entity;
EntityWMOcelot newOcelot = new EntityWMOcelot(event.world);
newOcelot.setPosition(ocelot.posX, ocelot.posY, ocelot.posZ);
newOcelot.setAngles(ocelot.rotationPitch, ocelot.rotationYaw);
newOcelot.setLocationAndAngles(ocelot.posX, ocelot.posY, ocelot.posZ, ocelot.rotationYaw, ocelot.rotationPitch);
newOcelot.setGrowingAge(ocelot.getGrowingAge());
ocelot.setDead();
event.setCanceled(true);
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/wildmobsmod/misc/WolfOverrideHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ public class WolfOverrideHandler
@SubscribeEvent(priority=EventPriority.HIGHEST)
public void onWolfSpawn(EntityJoinWorldEvent event)
{
if(event.entity.getClass() == EntityWolf.class && WildMobsMod.checkIsEntityNew(event.entity) && Math.random() * 100 < WildMobsMod.WOLF_CONFIG.getOverrideChance())
final Entity entity = event.entity;
if(entity.getClass() == EntityWolf.class && WildMobsMod.checkIsEntityNew(entity) && Math.random() * 100 < WildMobsMod.WOLF_CONFIG.getOverrideChance())
{
EntityWolf wolf = (EntityWolf) event.entity;
EntityWolf wolf = (EntityWolf) entity;
EntityWMWolf newWolf = new EntityWMWolf(event.world);
newWolf.setPosition(wolf.posX, wolf.posY, wolf.posZ);
newWolf.setAngles(wolf.rotationPitch, wolf.rotationYaw);
newWolf.setLocationAndAngles(wolf.posX, wolf.posY, wolf.posZ, wolf.rotationYaw, wolf.rotationPitch);
newWolf.setGrowingAge(wolf.getGrowingAge());
wolf.setDead();
event.setCanceled(true);
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/mcmod.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"modid": "wildmobsmod",
"name": "Wild Mobs",
"description": "Expands Minecrafts wildlife selection with various animals and monsters in a similar style.",
"version": "1.5.2",
"version": "1.5.3",
"mcversion": "1.7.10",
"url": "",
"updateUrl": "",
Expand Down

0 comments on commit b611e62

Please sign in to comment.