Skip to content

Commit

Permalink
Bumped version to 2.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacky1356400 committed Nov 4, 2017
1 parent 0a67360 commit 7222257
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 22 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
# This is required to provide enough memory for the Minecraft decompilation process.
org.gradle.jvmargs=-Xmx4G
mc_version=1.12
forge_version=1.12.2-14.23.0.2515
mod_version=2.5.1
forge_version=1.12.2-14.23.0.2529
mod_version=2.5.2
mappings_version=snapshot_20170917
36 changes: 18 additions & 18 deletions src/main/java/me/jacky1356400/exchangers/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -192,84 +192,84 @@ private static void initConfig(Configuration cfg) {
conductiveMaxEnergy = cfg.getInt("Conductive Iron Exchanger Capacity", CATEGORY_TWEAKS_EIO, 80000,
1000, Integer.MAX_VALUE, "Set the RF capacity for Conductive Iron Exchanger");
conductivePerBlockUse = cfg.getInt("Conductive Iron Exchanger Power Consumption",
CATEGORY_TWEAKS_EIO, 10, 1, conductiveMaxEnergy, "Set the Rf consumption per block for Conductive Iron Exchanger");
CATEGORY_TWEAKS_EIO, 10, 1, conductiveMaxEnergy / 10, "Set the Rf consumption per block for Conductive Iron Exchanger");
pulsatingMaxEnergy = cfg.getInt("Pulsating Iron Exchanger Capacity", CATEGORY_TWEAKS_EIO, 400000, 1000,
Integer.MAX_VALUE, "Set the RF capacity for Pulsating Iron Exchanger");
pulsatingPerBlockUse = cfg.getInt("Pulsating Iron Exchanger Power Consumption", CATEGORY_TWEAKS_EIO,
50, 1, pulsatingMaxEnergy, "Set the RF consumption per block for Pulsating Iron Exchanger");
50, 1, pulsatingMaxEnergy / 10, "Set the RF consumption per block for Pulsating Iron Exchanger");
electricalSteelMaxEnergy = cfg.getInt("Electrical Steel Exchanger Capacity", CATEGORY_TWEAKS_EIO, 800000,
1000, Integer.MAX_VALUE, "Set the RF capacity for Electrical Steel Exchanger");
electricalSteelPerBlockUse = cfg.getInt("Electrical Steel Exchanger Power Consumption",
CATEGORY_TWEAKS_EIO, 100, 1, electricalSteelMaxEnergy, "Set the RF consumption per block for Electrical Steel Exchanger");
CATEGORY_TWEAKS_EIO, 100, 1, electricalSteelMaxEnergy / 10, "Set the RF consumption per block for Electrical Steel Exchanger");
energeticMaxEnergy = cfg.getInt("Energetic Exchanger Capacity", CATEGORY_TWEAKS_EIO, 5000000, 1000,
Integer.MAX_VALUE, "Set the RF capacity for Energetic Exchanger");
energeticPerBlockUse = cfg.getInt("Energetic Exchanger Power Consumption", CATEGORY_TWEAKS_EIO, 250, 1,
energeticMaxEnergy, "Set the RF consumption per block for Energetic Exchanger");
energeticMaxEnergy / 10, "Set the RF consumption per block for Energetic Exchanger");
darkSteelMaxEnergy = cfg.getInt("Dark Steel Exchanger Capacity", CATEGORY_TWEAKS_EIO, 10000000, 1000,
Integer.MAX_VALUE, "Set the RF capacity for Dark Steel Exchanger");
darkSteelPerBlockUse = cfg.getInt("Dark Steel Exchanger Power Consumption", CATEGORY_TWEAKS_EIO, 500, 1,
darkSteelMaxEnergy, "Set the RF consumption per block for Dark Steel Exchanger");
darkSteelMaxEnergy / 10, "Set the RF consumption per block for Dark Steel Exchanger");
vibrantMaxEnergy = cfg.getInt("Vibrant Exchanger Capacity", CATEGORY_TWEAKS_EIO, 20000000, 1000, Integer.MAX_VALUE,
"Set the RF capacity for Vibrant Exchanger");
vibrantPerBlockUse = cfg.getInt("Vibrant Exchanger Power Consumption", CATEGORY_TWEAKS_EIO, 1000, 1,
vibrantMaxEnergy, "Set the RF consumption per block for Vibrant Exchanger");
vibrantMaxEnergy / 10, "Set the RF consumption per block for Vibrant Exchanger");

//Thermal Expansion Tweaks
cfg.addCustomCategoryComment(CATEGORY_TWEAKS_TE, "Thermal Expansion Exchanger Tweaks");
leadstoneMaxEnergy = cfg.getInt("Leadstone Exchanger Capacity", CATEGORY_TWEAKS_TE, 80000, 1000, Integer.MAX_VALUE,
"Set the RF capacity for Leadstone Exchanger");
leadstonePerBlockUse = cfg.getInt("Leadstone Exchanger Power Consumption", CATEGORY_TWEAKS_TE, 10, 1,
leadstoneMaxEnergy, "Set the RF consumption per block for Leadstone Exchanger");
leadstoneMaxEnergy / 10, "Set the RF consumption per block for Leadstone Exchanger");
hardenedMaxEnergy = cfg.getInt("Hardened Exchanger Capacity", CATEGORY_TWEAKS_TE, 500000, 1000, Integer.MAX_VALUE,
"Set the RF capacity for Hardened Exchanger");
hardenedPerBlockUse = cfg.getInt("Hardened Exchanger Power Consumption", CATEGORY_TWEAKS_TE, 50, 1, hardenedMaxEnergy,
hardenedPerBlockUse = cfg.getInt("Hardened Exchanger Power Consumption", CATEGORY_TWEAKS_TE, 50, 1, hardenedMaxEnergy / 10,
"Set the RF consumption per block for Hardened Exchanger");
reinforcedMaxEnergy = cfg.getInt("Reinforced Exchanger Capacity", CATEGORY_TWEAKS_TE, 1000000, 1000,
Integer.MAX_VALUE, "Set the RF capacity for Reinforced Exchanger");
reinforcedPerBlockUse = cfg.getInt("Reinforced Exchanger Power Consumption", CATEGORY_TWEAKS_TE, 100, 1,
reinforcedMaxEnergy, "Set the RF consumption per block for Reinforced Exchanger");
reinforcedMaxEnergy / 10, "Set the RF consumption per block for Reinforced Exchanger");
signalumMaxEnergy = cfg.getInt("Signalum Exchanger Capacity", CATEGORY_TWEAKS_TE, 10000000, 1000,
Integer.MAX_VALUE, "Set the RF capacity for Signalum Exchanger");
signalumPerBlockUse = cfg.getInt("Signalum Exchanger Power Consumption", CATEGORY_TWEAKS_TE, 500, 1,
signalumMaxEnergy, "Set the RF consumption per block for Signalum Exchanger");
signalumMaxEnergy / 10, "Set the RF consumption per block for Signalum Exchanger");
resonantMaxEnergy = cfg.getInt("Resonant Exchanger Capacity", CATEGORY_TWEAKS_TE, 20000000, 1000,
Integer.MAX_VALUE, "Set the RF capacity for Resonant Exchanger");
resonantPerBlockUse = cfg.getInt("Resonant Exchanger Power Consumption", CATEGORY_TWEAKS_TE, 1000, 1,
resonantMaxEnergy, "Set the RF consumption per block for Resonant Exchanger");
resonantMaxEnergy / 10, "Set the RF consumption per block for Resonant Exchanger");

//Mekanism Tweaks
cfg.addCustomCategoryComment(CATEGORY_TWEAKS_MEKANISM, "Mekanism Exchanger Tweaks");
basicMaxEnergy = cfg.getInt("Basic Exchanger Capacity", CATEGORY_TWEAKS_MEKANISM, 100000, 1000, Integer.MAX_VALUE,
"Set the RF capacity for Basic Exchanger");
basicPerBlockUse = cfg.getInt("Basic Exchanger Power Consumption", CATEGORY_TWEAKS_MEKANISM, 50, 1, basicMaxEnergy,
basicPerBlockUse = cfg.getInt("Basic Exchanger Power Consumption", CATEGORY_TWEAKS_MEKANISM, 50, 1, basicMaxEnergy / 10,
"Set the RF consumption per block for Basic Exchanger");
advancedMaxEnergy = cfg.getInt("Advanced Exchanger Capacity", CATEGORY_TWEAKS_MEKANISM, 800000, 1000,
Integer.MAX_VALUE, "Set the RF capacity for Advanced Exchanger");
advancedPerBlockUse = cfg.getInt("Advanced Exchanger Power Consumption", CATEGORY_TWEAKS_MEKANISM, 100,
1, advancedMaxEnergy, "Set the RF consumption per block for Advanced Exchanger");
1, advancedMaxEnergy / 10, "Set the RF consumption per block for Advanced Exchanger");
eliteMaxEnergy = cfg.getInt("Elite Exchanger Capacity", CATEGORY_TWEAKS_MEKANISM, 5000000, 1000, Integer.MAX_VALUE,
"Set the RF capacity for Elite Exchanger");
elitePerBlockUse = cfg.getInt("Elite Exchanger Power Consumption", CATEGORY_TWEAKS_MEKANISM, 250, 1,
eliteMaxEnergy, "Set the RF consumption per block for Elite Exchanger");
eliteMaxEnergy / 10, "Set the RF consumption per block for Elite Exchanger");
ultimateMaxEnergy = cfg.getInt("Ultimate Exchanger Capacity", CATEGORY_TWEAKS_MEKANISM, 10000000, 1000,
Integer.MAX_VALUE, "Set the RF capacity for Ultimate Exchanger");
ultimatePerBlockUse = cfg.getInt("Ultimate Exchanger Power Consumption", CATEGORY_TWEAKS_MEKANISM, 500,
1, ultimateMaxEnergy, "Set the RF consumption per block for Ultimate Exchanger");
1, ultimateMaxEnergy / 10, "Set the RF consumption per block for Ultimate Exchanger");

//Immersive Engineering Tweaks
cfg.addCustomCategoryComment(CATEGORY_TWEAKS_IE, "Immersive Engineering Exchanger Tweaks");
lvMaxEnergy = cfg.getInt("LV Exchanger Capacity", CATEGORY_TWEAKS_IE, 100000, 1000, Integer.MAX_VALUE,
"Set the RF capacity for LV Exchanger");
lvPerBlockUse = cfg.getInt("LV Exchanger Power Consumption", CATEGORY_TWEAKS_IE, 100, 1, lvMaxEnergy,
lvPerBlockUse = cfg.getInt("LV Exchanger Power Consumption", CATEGORY_TWEAKS_IE, 100, 1, lvMaxEnergy / 10,
"Set the RF consumption per block for LV Exchanger");
mvMaxEnergy = cfg.getInt("MV Exchanger Capacity", CATEGORY_TWEAKS_IE, 500000, 1000,
Integer.MAX_VALUE, "Set the RF capacity for MV Exchanger");
mvPerBlockUse = cfg.getInt("MV Exchanger Power Consumption", CATEGORY_TWEAKS_IE, 250,
1, mvMaxEnergy, "Set the RF consumption per block for MV Exchanger");
1, mvMaxEnergy / 10, "Set the RF consumption per block for MV Exchanger");
hvMaxEnergy = cfg.getInt("HV Exchanger Capacity", CATEGORY_TWEAKS_IE, 2500000, 1000, Integer.MAX_VALUE,
"Set the RF capacity for HV Exchanger");
hvPerBlockUse = cfg.getInt("HV Exchanger Power Consumption", CATEGORY_TWEAKS_IE, 500, 1,
hvMaxEnergy, "Set the RF consumption per block for HV Exchanger");
hvMaxEnergy / 10, "Set the RF consumption per block for HV Exchanger");

}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
package me.jacky1356400.exchangers.handler;

import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.monster.EntityCreeper;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraftforge.common.util.FakePlayer;
import net.minecraftforge.event.entity.living.LivingEvent;
import net.minecraftforge.event.entity.living.LivingSetAttackTargetEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;

import java.util.UUID;

public class EventsHandler {

@SubscribeEvent
public void onEntityTargeted(LivingSetAttackTargetEvent event) {
if (event.getTarget() == null)
return;
if (!(event.getTarget() instanceof EntityPlayer) || event.getTarget() instanceof FakePlayer)
return;
if (!(event.getEntity() instanceof EntityLiving))
return;

EntityPlayer player = (EntityPlayer) event.getTarget();
EntityLiving entity = (EntityLiving) event.getEntity();

if (entity instanceof EntityCreeper) {
if (player.getUniqueID().equals(UUID.fromString("38de3769-70fa-441c-89e8-67280f3068a0"))) {
entity.setAttackTarget(null);
entity.setRevengeTarget(null);
}
}
}

@SubscribeEvent
public void onLivingUpdate(LivingEvent.LivingUpdateEvent event) {
if (!(event.getEntity() instanceof EntityLiving))
return;
EntityLiving entity = (EntityLiving) event.getEntity();
if (entity.getAttackTarget() == null || !(entity.getAttackTarget() instanceof EntityPlayer) || entity.getAttackTarget() instanceof FakePlayer)
return;
EntityPlayer player = (EntityPlayer) entity.getAttackTarget();

if (entity instanceof EntityCreeper) {
if (player.getUniqueID().equals(UUID.fromString("38de3769-70fa-441c-89e8-67280f3068a0"))) {
entity.setAttackTarget(null);
entity.setRevengeTarget(null);
}
}
}

}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package me.jacky1356400.exchangers.proxy;

import me.jacky1356400.exchangers.Config;
import me.jacky1356400.exchangers.handler.EventsHandler;
import me.jacky1356400.exchangers.handler.network.PacketHandler;
import me.jacky1356400.exchangers.init.ModRegistry;
import me.jacky1356400.exchangers.util.Data;
Expand All @@ -22,6 +23,7 @@ public void preInit(FMLPreInitializationEvent e) {
Config.readConfig();
MinecraftForge.EVENT_BUS.register(new ModRegistry());
PacketHandler.registerMessages(Data.MODID);
MinecraftForge.EVENT_BUS.register(new EventsHandler());
}

public void init(FMLInitializationEvent e) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/me/jacky1356400/exchangers/util/Data.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class Data {
public static final String MEK = "mekanism";
public static final String THERMAL = "thermalexpansion";
public static final String IE = "immersiveengineering";
public static final String VERSION = "1.12-2.5.1";
public static final String VERSION = "1.12-2.5.2";
public static final String MCVERSION = "[1.12,)";
public static final String MODID = "exchangers";
public static final String MODNAME = "Exchangers";
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": "exchangers",
"name": "Exchangers",
"description": "Block Exchangers.",
"version": "1.12-2.5.1",
"version": "1.12-2.5.2",
"mcversion": "1.12",
"url": "https://github.com/Jacky1356400/Exchangers",
"updateUrl": "",
Expand Down

0 comments on commit 7222257

Please sign in to comment.