aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Java/gtPlusPlus/GTplusplus.java28
-rw-r--r--src/Java/gtPlusPlus/core/common/CommonProxy.java13
-rw-r--r--src/Java/gtPlusPlus/core/entity/InternalEntityRegistry.java12
-rw-r--r--src/Java/gtPlusPlus/core/entity/projectile/EntitySulfuricAcidPotion.java92
-rw-r--r--src/Java/gtPlusPlus/core/item/general/ItemSulfuricAcidPotion.java2
-rw-r--r--src/Java/gtPlusPlus/core/proxy/ClientProxy.java12
-rw-r--r--src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java6
7 files changed, 81 insertions, 84 deletions
diff --git a/src/Java/gtPlusPlus/GTplusplus.java b/src/Java/gtPlusPlus/GTplusplus.java
index f16e86aba5..4cf754e856 100644
--- a/src/Java/gtPlusPlus/GTplusplus.java
+++ b/src/Java/gtPlusPlus/GTplusplus.java
@@ -227,18 +227,10 @@ public class GTplusplus implements ActionListener {
FMLCommonHandler.instance().bus().register(new LoginEventHandler());
Utils.LOG_INFO("Login Handler Initialized");
- //Early load materials
- /*try {
- CustomGTMaterials.run();
- } catch (Throwable t){}*/
-
if (CORE.configSwitches.enableOldGTcircuits && CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){
removeCircuitRecipeMap(); //Bye shitty recipes.
- }
-
- // HANDLER_GT.mMaterialProperties = new GT_Config(new Configuration(new
- // File(new File(event.getModConfigurationDirectory(), "GTplusplus"),
- // "MaterialProperties.cfg")));
+ }
+
proxy.preInit(event);
}
@@ -246,16 +238,7 @@ public class GTplusplus implements ActionListener {
@Mod.EventHandler
public void init(final FMLInitializationEvent event) {
proxy.init(event);
-
- Utils.LOG_INFO("[Proxy] Calling Entity registrator.");
- proxy.registerEntities();
- Utils.LOG_INFO("[Proxy] Calling Tile Entity registrator.");
- proxy.registerTileEntities();
- Utils.LOG_INFO("[Proxy] Calling Render registrator.");
- proxy.registerRenderThings();
-
proxy.registerNetworkStuff();
-
}
// Post-Init
@@ -270,17 +253,10 @@ public class GTplusplus implements ActionListener {
this.dumpGtRecipeMap(Gregtech_Recipe_Map.sAlloyBlastSmelterRecipes);
}
- /*for (Materials s : gtPlusPlus.core.material.gregtech.CustomGTMaterials.Custom_GT_Materials){
- Utils.LOG_INFO("Verification for New Material: "+s.mName);
- }*/
-
- // Utils.LOG_INFO("Activating GT OreDictionary Handler, this can take
- // some time.");
Utils.LOG_INFO("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
Utils.LOG_INFO("| Recipes succesfully Loaded: " + RegistrationHandler.recipesSuccess + " | Failed: "
+ RegistrationHandler.recipesFailed + " |");
Utils.LOG_INFO("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- // Meta_GT_Proxy.activateOreDictHandler();
Utils.LOG_INFO("Finally, we are finished. Have some cripsy bacon as a reward.");
}
diff --git a/src/Java/gtPlusPlus/core/common/CommonProxy.java b/src/Java/gtPlusPlus/core/common/CommonProxy.java
index 6f885fadfe..91077abbed 100644
--- a/src/Java/gtPlusPlus/core/common/CommonProxy.java
+++ b/src/Java/gtPlusPlus/core/common/CommonProxy.java
@@ -64,8 +64,14 @@ public class CommonProxy {
}
AddToCreativeTab.initialiseTabs();
COMPAT_IntermodStaging.preInit();
- //Apparently I should do this here. Might put it in Init for a test.
- //Growthcraft_Handler.run();
+
+ //Registration of entities and renderers
+ Utils.LOG_INFO("[Proxy] Calling Entity registrator.");
+ registerEntities();
+ Utils.LOG_INFO("[Proxy] Calling Tile Entity registrator.");
+ registerTileEntities();
+
+
}
public void init(final FMLInitializationEvent e) {
@@ -81,6 +87,9 @@ public class CommonProxy {
//Block Handler for all events.
MinecraftForge.EVENT_BUS.register(new BlockEventHandler());
+ Utils.LOG_INFO("[Proxy] Calling Render registrator.");
+ registerRenderThings();
+
//Compat Handling
COMPAT_HANDLER.registerMyModsOreDictEntries();
COMPAT_HANDLER.intermodOreDictionarySupport();
diff --git a/src/Java/gtPlusPlus/core/entity/InternalEntityRegistry.java b/src/Java/gtPlusPlus/core/entity/InternalEntityRegistry.java
index b94f2e7205..954b886abe 100644
--- a/src/Java/gtPlusPlus/core/entity/InternalEntityRegistry.java
+++ b/src/Java/gtPlusPlus/core/entity/InternalEntityRegistry.java
@@ -2,14 +2,24 @@ package gtPlusPlus.core.entity;
import cpw.mods.fml.common.registry.EntityRegistry;
import gtPlusPlus.GTplusplus;
+import gtPlusPlus.core.entity.monster.EntitySickBlaze;
+import gtPlusPlus.core.entity.monster.EntityStaballoyConstruct;
+import gtPlusPlus.core.entity.projectile.EntitySulfuricAcidPotion;
+import gtPlusPlus.core.entity.projectile.EntityToxinballSmall;
import gtPlusPlus.core.util.Utils;
public class InternalEntityRegistry {
+ static int mEntityID = 0;
+
public static void registerEntities(){
Utils.LOG_INFO("Registering GT++ Entities.");
//EntityRegistry.registerModEntity(EntityMiningChargePrimed.class, "MiningCharge", 3, Main.modInstance, 64, 20, true);
- EntityRegistry.registerModEntity(EntityPrimedMiningExplosive.class, "MiningCharge", 3, GTplusplus.instance, 64, 20, true);
+ EntityRegistry.registerModEntity(EntityPrimedMiningExplosive.class, "MiningCharge", mEntityID++, GTplusplus.instance, 64, 20, true);
+ EntityRegistry.registerModEntity(EntitySulfuricAcidPotion.class, "throwablePotionSulfuric", mEntityID++, GTplusplus.instance, 64, 20, true);
+ EntityRegistry.registerModEntity(EntityToxinballSmall.class, "toxinBall", mEntityID++, GTplusplus.instance, 64, 20, true);
+ EntityRegistry.registerModEntity(EntityStaballoyConstruct.class, "constructStaballoy", mEntityID++, GTplusplus.instance, 64, 20, true);
+ EntityRegistry.registerModEntity(EntitySickBlaze.class, "sickBlaze", mEntityID++, GTplusplus.instance, 64, 20, true);
}
diff --git a/src/Java/gtPlusPlus/core/entity/projectile/EntitySulfuricAcidPotion.java b/src/Java/gtPlusPlus/core/entity/projectile/EntitySulfuricAcidPotion.java
index b12dc7e0a8..91034e08b4 100644
--- a/src/Java/gtPlusPlus/core/entity/projectile/EntitySulfuricAcidPotion.java
+++ b/src/Java/gtPlusPlus/core/entity/projectile/EntitySulfuricAcidPotion.java
@@ -1,5 +1,6 @@
package gtPlusPlus.core.entity.projectile;
+import gregtech.api.util.GT_Utility;
import gregtech.common.GT_Pollution;
import gtPlusPlus.core.util.PollutionUtils;
import gtPlusPlus.core.util.array.BlockPos;
@@ -37,10 +38,12 @@ public class EntitySulfuricAcidPotion extends EntityThrowable {
int zBlock = object.blockZ;
if (object.entityHit != null) {
byte b0 = 6;
- object.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float) b0);
- EntityUtils.setEntityOnFire(object.entityHit, 10);
- object.entityHit.fireResistance = 0;
- ravage(new BlockPos(xBlock, yBlock, zBlock));
+ if (!GT_Utility.isWearingFullRadioHazmat((EntityLivingBase) object.entityHit)){
+ object.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float) b0);
+ EntityUtils.setEntityOnFire(object.entityHit, 10);
+ object.entityHit.fireResistance = 0;
+ ravage(new BlockPos(xBlock, yBlock, zBlock));
+ }
}
if (object.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK){
ravage(new BlockPos(xBlock, yBlock, zBlock));
@@ -51,59 +54,62 @@ public class EntitySulfuricAcidPotion extends EntityThrowable {
for (int i = 0; i < 24; ++i) {
if ((e = MathUtils.randInt(0, 5)) <= 1){
if (e==0)
- mParticleType = "largesmoke";
+ mParticleType = "largesmoke";
if (e==1)
- mParticleType = "flame";
+ mParticleType = "flame";
}
- this.worldObj.spawnParticle(mParticleType, this.posX+MathUtils.randDouble(0, 2), this.posY+MathUtils.randDouble(0, 2), this.posZ+MathUtils.randDouble(0, 2), 0.0D, 0.0D, 0.0D);
+ this.worldObj.spawnParticle(mParticleType, this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D);
}
if (!this.worldObj.isRemote) {
this.setDead();
}
}
-
+
private boolean ravage(BlockPos blockpos){
-
- for (int i=(blockpos.xPos-1);i<(blockpos.xPos+1);i++){
- for (int j=(blockpos.yPos-1);j<(blockpos.yPos+1);j++){
- for (int h=(blockpos.zPos-1);h<(blockpos.zPos+1);h++){
-
- Block mBlockhit = worldObj.getBlock(i, j, h);
- this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(0, 2), this.posY+MathUtils.randDouble(0, 2), this.posZ+MathUtils.randDouble(0, 2), 0.0D, 0.0D, 0.0D);
- this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(0, 2), this.posY+MathUtils.randDouble(0, 2), this.posZ+MathUtils.randDouble(0, 2), 0.0D, 0.0D, 0.0D);
-
- int mPol = 500000000;
-
- GT_Pollution.addPollution(worldObj.getChunkFromBlockCoords(blockpos.xPos, blockpos.zPos), mPol);
-
- if (mBlockhit == Blocks.grass || mBlockhit == Blocks.mycelium){
- worldObj.setBlock(i, j+1, h, Blocks.fire);
- worldObj.setBlock(i, j, h, Blocks.dirt);
- }
- else if (mBlockhit == Blocks.leaves || mBlockhit == Blocks.leaves2){
- worldObj.setBlock(i, j, h, Blocks.fire);
- }
- else if (mBlockhit == Blocks.tallgrass){
- worldObj.setBlock(i, j, h, Blocks.fire);
- if (worldObj.getBlock(i, j-1, h) == Blocks.grass){
- worldObj.setBlock(i, j-1, h, Blocks.dirt);
+
+ int radius = 1;
+
+ for (int i=(blockpos.xPos-radius);i<(blockpos.xPos+radius);i++){
+ for (int j=(blockpos.yPos-radius);j<(blockpos.yPos+radius);j++){
+ for (int h=(blockpos.zPos-radius);h<(blockpos.zPos+radius);h++){
+
+ int mChance = MathUtils.randInt(1, 10);
+ if (mChance <= 3){
+ Block mBlockhit = worldObj.getBlock(i, j, h);
+ this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D);
+ this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D);
+
+ //GT_Pollution.addPollution(worldObj.getChunkFromBlockCoords(blockpos.xPos, blockpos.zPos), mPol);
+
+ if (mBlockhit == Blocks.grass || mBlockhit == Blocks.mycelium){
+ worldObj.setBlock(i, j+1, h, Blocks.fire);
+ worldObj.setBlock(i, j, h, Blocks.dirt);
}
+ else if (mBlockhit == Blocks.leaves || mBlockhit == Blocks.leaves2){
+ worldObj.setBlock(i, j, h, Blocks.fire);
+ }
+ else if (mBlockhit == Blocks.tallgrass){
+ worldObj.setBlock(i, j, h, Blocks.fire);
+ if (worldObj.getBlock(i, j-1, h) == Blocks.grass){
+ worldObj.setBlock(i, j-1, h, Blocks.dirt);
+ }
+ }
+ else if (mBlockhit == Blocks.carrots || mBlockhit == Blocks.melon_block || mBlockhit == Blocks.pumpkin || mBlockhit == Blocks.potatoes){
+ worldObj.setBlock(i, j+1, h, Blocks.fire);
+ worldObj.setBlock(i, j, h, Blocks.dirt);
+ }
+ else if (mBlockhit == Blocks.air){
+ worldObj.setBlock(i, j, h, Blocks.fire);
+ }
}
- else if (mBlockhit == Blocks.carrots || mBlockhit == Blocks.melon_block || mBlockhit == Blocks.pumpkin || mBlockhit == Blocks.potatoes){
- worldObj.setBlock(i, j+1, h, Blocks.fire);
- worldObj.setBlock(i, j, h, Blocks.dirt);
- }
- else if (mBlockhit == Blocks.air){
- worldObj.setBlock(i, j, h, Blocks.fire);
- }
}
}
}
-
-
+
+
return true;
}
-
-
+
+
} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/core/item/general/ItemSulfuricAcidPotion.java b/src/Java/gtPlusPlus/core/item/general/ItemSulfuricAcidPotion.java
index 90cd0c74ae..bd730448c8 100644
--- a/src/Java/gtPlusPlus/core/item/general/ItemSulfuricAcidPotion.java
+++ b/src/Java/gtPlusPlus/core/item/general/ItemSulfuricAcidPotion.java
@@ -18,8 +18,6 @@ public class ItemSulfuricAcidPotion extends CoreItem {
public ItemSulfuricAcidPotion(String unlocalizedName, String displayName, String description) {
super(unlocalizedName, displayName, AddToCreativeTab.tabMisc, 16, 0, description, EnumRarity.common, EnumChatFormatting.GRAY, false, null);
- GT_Values.RA.addFluidCannerRecipe(ItemUtils.getSimpleStack(Items.glass_bottle), ItemUtils.getSimpleStack(ModItems.itemSulfuricPotion), FluidUtils.getFluidStack("sulfuricacid", 250), null);
- GT_Values.RA.addFluidCannerRecipe(ItemUtils.getSimpleStack(ModItems.itemSulfuricPotion), ItemUtils.getSimpleStack(Items.glass_bottle), null, FluidUtils.getFluidStack("sulfuricacid", 250));
}
public ItemStack onItemRightClick(ItemStack item, World world, EntityPlayer player) {
diff --git a/src/Java/gtPlusPlus/core/proxy/ClientProxy.java b/src/Java/gtPlusPlus/core/proxy/ClientProxy.java
index 9451f65469..7c63be87c1 100644
--- a/src/Java/gtPlusPlus/core/proxy/ClientProxy.java
+++ b/src/Java/gtPlusPlus/core/proxy/ClientProxy.java
@@ -33,8 +33,6 @@ import net.minecraft.client.particle.EntityFX;
import net.minecraft.client.renderer.entity.RenderIronGolem;
import net.minecraft.client.renderer.entity.RenderSnowball;
import net.minecraft.entity.Entity;
-import net.minecraft.entity.projectile.EntitySnowball;
-import net.minecraft.init.Items;
public class ClientProxy extends CommonProxy implements Runnable{
@@ -48,7 +46,7 @@ public class ClientProxy extends CommonProxy implements Runnable{
@SubscribeEvent
public void receiveRenderSpecialsEvent(net.minecraftforge.client.event.RenderPlayerEvent.Specials.Pre aEvent) {
if (CORE.mEnableCape){
- mCapeRenderer.receiveRenderSpecialsEvent(aEvent);
+ mCapeRenderer.receiveRenderSpecialsEvent(aEvent);
}
}
@@ -74,7 +72,6 @@ public class ClientProxy extends CommonProxy implements Runnable{
if (LoadedMods.PlayerAPI){
this.init_PlayerAPI_INIT();
}
-
super.init(e);
}
@@ -95,7 +92,7 @@ public class ClientProxy extends CommonProxy implements Runnable{
RenderingRegistry.registerEntityRenderingHandler(EntityStaballoyConstruct.class, new RenderIronGolem());
RenderingRegistry.registerEntityRenderingHandler(EntityToxinballSmall.class, new RenderToxinball(1F));
Utils.LOG_INFO("Registering Custom Renderer for Sulfuric potion.");
- RenderingRegistry.registerEntityRenderingHandler(EntitySulfuricAcidPotion.class, new RenderPotionthrow(ModItems.itemSulfuricPotion));
+ RenderingRegistry.registerEntityRenderingHandler(EntitySulfuricAcidPotion.class, new RenderSnowball(ModItems.itemSulfuricPotion));
//ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBloodSteelChest.class, new BloodSteelChestRenderer());
@@ -142,11 +139,6 @@ public class ClientProxy extends CommonProxy implements Runnable{
}
- /*@SubscribeEvent
- public void receiveRenderSpecialsEvent(net.minecraftforge.client.event.RenderPlayerEvent.Specials.Pre aEvent) {
- mCapeRenderer.receiveRenderSpecialsEvent(aEvent);
- }*/
-
@Optional.Method(modid = "PlayerAPI")
private void init_PlayerAPI_PRE(){
//Register player instance
diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java
index 603c028bf7..f41d2fd8a3 100644
--- a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java
+++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java
@@ -31,6 +31,7 @@ public class RECIPES_GREGTECH {
cokeOvenRecipes();
matterFabRecipes();
assemblerRecipes();
+ fluidcannerRecipes();
distilleryRecipes();
extractorRecipes();
fluidExtractorRecipes();
@@ -50,6 +51,11 @@ public class RECIPES_GREGTECH {
addFuels();
}
+ private static void fluidcannerRecipes() {
+ GT_Values.RA.addFluidCannerRecipe(ItemUtils.getSimpleStack(Items.glass_bottle), ItemUtils.getSimpleStack(ModItems.itemSulfuricPotion), FluidUtils.getFluidStack("sulfuricacid", 250), null);
+ GT_Values.RA.addFluidCannerRecipe(ItemUtils.getSimpleStack(ModItems.itemSulfuricPotion), ItemUtils.getSimpleStack(Items.glass_bottle), null, FluidUtils.getFluidStack("sulfuricacid", 250));
+ }
+
private static void cokeOvenRecipes(){
Utils.LOG_INFO("Loading Recipes for Industrial Coking Oven.");