First cut of attractor done

This commit is contained in:
CrazyPants committed 2014-09-12 01:31:23 +08:00
1 parent 597d5225f3
commit 21654a7285
14 files changed
+64 -18

No files matched your search

@@ -53,7 +53,7 @@ public enum ModObject {
blockEnchanter,
blockSoulBinder,
blockSliceAndSplice,
blockAttrator,
blockAttractor,
blockPoweredSpawner,
itemBrokenSpawner,
@@ -275,6 +275,7 @@ public final class Config {
public static int soulBinderBrokenSpawnerRF = 2500000;
public static int soulBinderReanimationRF = 100000;
public static int soulBinderEnderCystalRF = 100000;
public static int soulBinderAttractorCystalRF = 100000;
public static boolean powerConduitCanDifferentTiersConnect = false;
public static int powerConduitTierOneRF = 640;
@@ -293,7 +294,9 @@ public final class Config {
public static int attractorRangeLevelTwo = 32;
public static int attractorPowerPerTickLevelTwo = 80;
public static int attractorRangeLevelThree = 64;
public static int attractorPowerPerTickLevelThree = 320;
public static int attractorPowerPerTickLevelThree = 160;
public static void load(FMLPreInitializationEvent event) {
@@ -770,6 +773,8 @@ public final class Config {
"The number of RF required to to re-animated a mob head.").getInt(soulBinderReanimationRF);
soulBinderEnderCystalRF = config.get(sectionSoulBinder.name, "soulBinderEnderCystalRF", soulBinderEnderCystalRF,
"The number of RF required to create an ender crystal.").getInt(soulBinderEnderCystalRF);
soulBinderAttractorCystalRF = config.get(sectionSoulBinder.name, "soulBinderAttractorCystalRF", soulBinderAttractorCystalRF,
"The number of RF required to create an attractor crystal.").getInt(soulBinderAttractorCystalRF);
sliceAndSpliceLevelOnePowerPerTickRF = config.get(sectionPower.name, "sliceAndSpliceLevelOnePowerPerTickRF", sliceAndSpliceLevelOnePowerPerTickRF,
"The number of RF/t consumed by an unupgraded Slice'N'Splice").getInt(sliceAndSpliceLevelOnePowerPerTickRF);
@@ -206,6 +206,12 @@ public class MachineRecipes {
ItemStack soulBinder = new ItemStack(EnderIO.blockSoulFuser);
GameRegistry.addShapedRecipe(soulBinder, "ses", "zmc","sks", 's', soularium, 'm', machineChassi, 'e', enderBit, 'z', zombieSkull, 'c', creeperSkull, 'k', skeletonSkull);
ItemStack attractor = new ItemStack(EnderIO.blockAttractor);
ItemStack attractorCrystal = new ItemStack(EnderIO.itemMaterial, 1, Material.ATTRACTOR_CRYSTAL.ordinal());
GameRegistry
.addShapedRecipe(attractor, " c ", "sss", "sms", 's', soularium, 'm', machineChassi, 'c', attractorCrystal);
ClearConfigRecipe inst = new ClearConfigRecipe();
MinecraftForge.EVENT_BUS.register(inst);
GameRegistry.addRecipe(inst);
@@ -52,7 +52,7 @@ public class AttractorRenderer extends TileEntitySpecialRenderer implements ISim
GL11.glPopMatrix();
EntityItem ei = new EntityItem(world, x, y, z, new ItemStack(EnderIO.itemMaterial, 1, Material.ENDER_CRYSTAL.ordinal()));
EntityItem ei = new EntityItem(world, x, y, z, new ItemStack(EnderIO.itemMaterial, 1, Material.ATTRACTOR_CRYSTAL.ordinal()));
ei.age = (int) world.getTotalWorldTime();
//Remove the bob
@@ -96,11 +96,7 @@ public class AttractorRenderer extends TileEntitySpecialRenderer implements ISim
xform2.isX = true;
CubeRenderer.render(bb, icon, xform2);
Tessellator.instance.addTranslation(-x, -y, -z);
//
// CubeRenderer.render(block, 0, xform);
//
Tessellator.instance.addTranslation(-x, -y, -z);
return true;
}
@@ -24,7 +24,7 @@ public class BlockAttractor extends AbstractMachineBlock<TileAttractor> {
}
protected BlockAttractor() {
super(ModObject.blockAttrator, TileAttractor.class);
super(ModObject.blockAttractor, TileAttractor.class);
}
@Override
@@ -27,4 +27,9 @@ public class GuiAttractor extends GuiMachineBase {
super.drawGuiContainerBackgroundLayer(par1, par2, par3);
}
@Override
protected boolean showRecipeButton() {
return false;
}
}
@@ -83,7 +83,7 @@ public class TileAttractor extends AbstractMachineEntity {
@Override
public String getMachineName() {
return ModObject.blockAttrator.unlocalisedName;
return ModObject.blockAttractor.unlocalisedName;
}
@Override
@@ -204,7 +204,7 @@ public class TileAttractor extends AbstractMachineEntity {
public Target() {
super(MinecraftServer.getServer().worldServerForDimension(getWorldObj().provider.dimensionId), new GameProfile(null,
ModObject.blockAttrator.unlocalisedName + ":" + getLocation()));
ModObject.blockAttractor.unlocalisedName + ":" + getLocation()));
posX = xCoord + 0.5;
posY = yCoord + 0.5;
posZ = zCoord + 0.5;
@@ -51,6 +51,7 @@ public class BlockSoulBinder extends AbstractMachineBlock<TileSoulBinder> {
MachineRecipeRegistry.instance.registerRecipe(ModObject.blockSoulBinder.unlocalisedName, SoulBinderSpawnerRecipe.instance);
MachineRecipeRegistry.instance.registerRecipe(ModObject.blockSoulBinder.unlocalisedName, SoulBinderReanimationRecipe.instance);
MachineRecipeRegistry.instance.registerRecipe(ModObject.blockSoulBinder.unlocalisedName, SoulBinderEnderCystalRecipe.instance);
MachineRecipeRegistry.instance.registerRecipe(ModObject.blockSoulBinder.unlocalisedName, SoulBinderAttractorCystalRecipe.instance);
}
@Override
@@ -0,0 +1,29 @@
package crazypants.enderio.machine.soul;
import net.minecraft.entity.monster.EntityEnderman;
import net.minecraft.entity.passive.EntityVillager;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import crazypants.enderio.EnderIO;
import crazypants.enderio.config.Config;
import crazypants.enderio.material.Material;
public class SoulBinderAttractorCystalRecipe extends AbstractSoulBinderRecipe {
public static SoulBinderAttractorCystalRecipe instance = new SoulBinderAttractorCystalRecipe();
private SoulBinderAttractorCystalRecipe() {
super(Config.soulBinderAttractorCystalRF, "SoulBinderAttractorCystalRecipe", EntityVillager.class);
}
@Override
public ItemStack getInputStack() {
return new ItemStack(Items.emerald);
}
@Override
public ItemStack getOutputStack() {
return new ItemStack(EnderIO.itemMaterial, 1, Material.ATTRACTOR_CRYSTAL.ordinal());
}
}
@@ -25,7 +25,5 @@ public class SoulBinderEnderCystalRecipe extends AbstractSoulBinderRecipe {
public ItemStack getOutputStack() {
return new ItemStack(EnderIO.itemMaterial, 1, Material.ENDER_CRYSTAL.ordinal());
}
}
@@ -115,10 +115,7 @@ public class SoulBinderSpawnerRecipe implements IMachineRecipe, ISoulBinderRecip
@Override
public List<String> getSupportedSouls() {
List<String> res = EntityUtil.getAllRegisteredMobNames(!Config.soulVesselCapturesBosses);
for(String str : res) {
System.out.println(" \"" + str + "\" : \"100\"");
}
List<String> res = EntityUtil.getAllRegisteredMobNames(!Config.soulVesselCapturesBosses);
return res;
}
@@ -10,7 +10,8 @@ public enum Material {
PULSATING_CYSTAL("pulsatingCrystal", true),
VIBRANT_CYSTAL("vibrantCrystal", true),
DRAK_GRINDING_BALL("darkGrindingBall"),
ENDER_CRYSTAL("enderCrystal", true);
ENDER_CRYSTAL("enderCrystal", true),
ATTRACTOR_CRYSTAL("attractorCrystal", true);
public final String unlocalisedName;
public final String iconKey;