diff --git a/dependencies.gradle b/dependencies.gradle index 1d32b41..baaa581 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -1,47 +1,47 @@ // Add your dependencies here dependencies { - compileOnly("com.github.GTNewHorizons:ForestryMC:4.4.4:api") { + compile("com.github.GTNewHorizons:ForestryMC:4.4.4:api") { transitive = false } - compileOnly("com.github.GTNewHorizons:Botania:1.9.1-GTNH:dev") { + compile("com.github.GTNewHorizons:Botania:1.9.1-GTNH:dev") { transitive = false } - compileOnly("com.github.GTNewHorizons:CodeChickenLib:1.1.5.1:dev") { + compile("com.github.GTNewHorizons:CodeChickenLib:1.1.5.1:dev") { transitive = false } - compileOnly("com.github.GTNewHorizons:CodeChickenCore:1.1.3:dev") { + compile("com.github.GTNewHorizons:CodeChickenCore:1.1.3:dev") { transitive = false } - compileOnly("com.github.GTNewHorizons:Mantle:0.3.4:dev") { + compile("com.github.GTNewHorizons:Mantle:0.3.4:dev") { transitive = false } - compileOnly("com.github.GTNewHorizons:NotEnoughItems:2.1.22-GTNH:dev") { + compile("com.github.GTNewHorizons:NotEnoughItems:2.1.22-GTNH:dev") { transitive = false } - compileOnly("com.github.GTNewHorizons:TinkersConstruct:1.9.0.9-GTNH:dev") { + compile("com.github.GTNewHorizons:TinkersConstruct:1.9.0.9-GTNH:dev") { transitive = false } - compileOnly("com.github.GTNewHorizons:BloodMagic:1.3.5:dev") { + compile("com.github.GTNewHorizons:BloodMagic:1.3.5:dev") { transitive = false } - compileOnly("com.github.GTNewHorizons:CraftTweaker:3.2.6:dev") { + compile("com.github.GTNewHorizons:CraftTweaker:3.2.6:dev") { transitive = false } - compileOnly("com.github.GTNewHorizons:ZenScript:master-SNAPSHOT") { + compile("com.github.GTNewHorizons:ZenScript:master-SNAPSHOT") { transitive = false } - compileOnly("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev") { + compile("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev") { transitive = false } - compileOnly("curse.maven:cofh-lib-220333:2388748") { + compile("curse.maven:cofh-lib-220333:2388748") { transitive = false } - compileOnly("curse.maven:cofh-core-69162:2388751") { + compile("curse.maven:cofh-core-69162:2388751") { transitive = false } - compileOnly("curse.maven:witchery-69673:2234410") { + compile("curse.maven:witchery-69673:2234410") { transitive = false } } diff --git a/src/main/java/fox/spiteful/avaritia/Avaritia.java b/src/main/java/fox/spiteful/avaritia/Avaritia.java index 1792735..bb004f4 100644 --- a/src/main/java/fox/spiteful/avaritia/Avaritia.java +++ b/src/main/java/fox/spiteful/avaritia/Avaritia.java @@ -13,7 +13,6 @@ import cpw.mods.fml.relauncher.SideOnly; import fox.spiteful.avaritia.achievements.Achievements; import fox.spiteful.avaritia.blocks.LudicrousBlocks; import fox.spiteful.avaritia.compat.Compat; -import fox.spiteful.avaritia.compat.botania.alfheim.Alfheim; import fox.spiteful.avaritia.crafting.Gregorizer; import fox.spiteful.avaritia.crafting.Grinder; import fox.spiteful.avaritia.crafting.Mincer; @@ -60,8 +59,6 @@ public class Avaritia { LudicrousEntities.letLooseTheDogsOfWar(); proxy.prepareForPretty(); - if(Compat.botan && Config.alfheim) - Alfheim.packYourBags(); } @EventHandler diff --git a/src/main/java/fox/spiteful/avaritia/Config.java b/src/main/java/fox/spiteful/avaritia/Config.java index 597b107..5fb61d8 100644 --- a/src/main/java/fox/spiteful/avaritia/Config.java +++ b/src/main/java/fox/spiteful/avaritia/Config.java @@ -40,9 +40,6 @@ public class Config { public static boolean extracells = true; public static boolean witch = true; public static boolean rotisserie = true; - - public static boolean alfheim = false; - public static int alfheimID; public static boolean copper = true; public static boolean tin = true; @@ -95,9 +92,6 @@ public class Config { extracells = conf.get("compatibility", "Extra Cells", true).getBoolean(true); witch = conf.get("compatibility", "Witchery", true).getBoolean(true); rotisserie = conf.get("compatibility", "Rotarycraft", true).getBoolean(true); - - alfheim = conf.get("compatibility", "Alfheim", false).getBoolean(false); - alfheimID = conf.get("compatibility", "AlfheimID", 13).getInt(13); conf.addCustomCategoryComment("materials", "Disable to stop using that material in recipes. Useful if a mod adds unobtainable placeholder ores."); copper = conf.get("materials", "Copper", true).getBoolean(true); diff --git a/src/main/java/fox/spiteful/avaritia/blocks/BlockAutoDireCrafting.java b/src/main/java/fox/spiteful/avaritia/blocks/BlockAutoDireCrafting.java deleted file mode 100644 index 31d8cd2..0000000 --- a/src/main/java/fox/spiteful/avaritia/blocks/BlockAutoDireCrafting.java +++ /dev/null @@ -1,118 +0,0 @@ -package fox.spiteful.avaritia.blocks; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import fox.spiteful.avaritia.Avaritia; -import fox.spiteful.avaritia.tile.TileEntityAutoDireCrafting; -import fox.spiteful.avaritia.tile.TileEntityDireCrafting; -import net.minecraft.block.Block; -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; - -import java.util.Random; - -public class BlockAutoDireCrafting extends BlockContainer { - private static IIcon top, sides, bottom; - private Random randy = new Random(); - - public BlockAutoDireCrafting(){ - super(Material.iron); - setStepSound(Block.soundTypeGlass); - setHardness(50.0F); - setResistance(2000.0F); - setBlockName("auto_dire_crafting"); - setHarvestLevel("pickaxe", 3); - setCreativeTab(Avaritia.tab); - } - - @SideOnly(Side.CLIENT) - @Override - public void registerBlockIcons (IIconRegister iconRegister) - { - top = iconRegister.registerIcon("avaritia:dire_autocrafting_top"); - sides = iconRegister.registerIcon("avaritia:dire_autocrafting_side"); - bottom = iconRegister.registerIcon("avaritia:block_crystal_matrix"); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon (int side, int metadata) - { - if (side == 0) - return bottom; - if (side == 1) - return top; - return sides; - } - - @Override - public boolean onBlockActivated (World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) - { - if (world.isRemote) - { - return true; - } - else - { - player.openGui(Avaritia.instance, 4, world, x, y, z); - return true; - } - } - - @Override - public TileEntity createNewTileEntity(World world, int meta) - { - return new TileEntityAutoDireCrafting(); - } - - public void breakBlock(World world, int x, int y, int z, Block block, int wut) - { - TileEntityAutoDireCrafting craft = (TileEntityAutoDireCrafting)world.getTileEntity(x, y, z); - - if (craft != null) - { - for(int i = 1;i < 82;i++) { - ItemStack itemstack = craft.getStackInSlot(i); - - if (itemstack != null) { - float f = this.randy.nextFloat() * 0.8F + 0.1F; - float f1 = this.randy.nextFloat() * 0.8F + 0.1F; - float f2 = this.randy.nextFloat() * 0.8F + 0.1F; - - while (itemstack.stackSize > 0) { - int j1 = this.randy.nextInt(21) + 10; - - if (j1 > itemstack.stackSize) { - j1 = itemstack.stackSize; - } - - itemstack.stackSize -= j1; - EntityItem entityitem = new EntityItem(world, (double) ((float) x + f), (double) ((float) y + f1), (double) ((float) z + f2), new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); - - if (itemstack.hasTagCompound()) { - entityitem.getEntityItem().setTagCompound((NBTTagCompound) itemstack.getTagCompound().copy()); - } - - float f3 = 0.05F; - entityitem.motionX = (double) ((float) this.randy.nextGaussian() * f3); - entityitem.motionY = (double) ((float) this.randy.nextGaussian() * f3 + 0.2F); - entityitem.motionZ = (double) ((float) this.randy.nextGaussian() * f3); - world.spawnEntityInWorld(entityitem); - } - } - - world.func_147453_f(x, y, z, block); - } - } - - super.breakBlock(world, x, y, z, block, wut); - } -} diff --git a/src/main/java/fox/spiteful/avaritia/compat/botania/Tsundere.java b/src/main/java/fox/spiteful/avaritia/compat/botania/Tsundere.java index 816babd..09dae21 100644 --- a/src/main/java/fox/spiteful/avaritia/compat/botania/Tsundere.java +++ b/src/main/java/fox/spiteful/avaritia/compat/botania/Tsundere.java @@ -1,10 +1,8 @@ package fox.spiteful.avaritia.compat.botania; import cpw.mods.fml.common.registry.GameRegistry; -import fox.spiteful.avaritia.Config; import fox.spiteful.avaritia.blocks.LudicrousBlocks; import fox.spiteful.avaritia.compat.Compat; -import fox.spiteful.avaritia.compat.botania.alfheim.Alfheim; import fox.spiteful.avaritia.compat.nei.NotEnough; import fox.spiteful.avaritia.crafting.ExtremeCraftingManager; import fox.spiteful.avaritia.crafting.ExtremeShapedRecipe; @@ -42,9 +40,6 @@ public class Tsundere { SubTileCheaty.lexicon = new LudicrousLexicon("asgardandelion", BotaniaAPI.categoryGenerationFlowers); SubTileCheaty.lexicon.addPage(BotaniaAPI.internalHandler.textPage("avaritia.lexicon.asgardandelion.0")); SubTileCheaty.lexicon.setIcon(cheaty); - - if(Config.alfheim) - Alfheim.vacationTime(); ExtremeCraftingManager.getInstance().addRecipe(cheaty, new Object[]{ " III ", diff --git a/src/main/java/fox/spiteful/avaritia/compat/botania/alfheim/Alfheim.java b/src/main/java/fox/spiteful/avaritia/compat/botania/alfheim/Alfheim.java deleted file mode 100644 index 1866dc2..0000000 --- a/src/main/java/fox/spiteful/avaritia/compat/botania/alfheim/Alfheim.java +++ /dev/null @@ -1,29 +0,0 @@ -package fox.spiteful.avaritia.compat.botania.alfheim; - -import net.minecraft.world.gen.structure.MapGenStructureIO; -import net.minecraftforge.common.DimensionManager; -import net.minecraftforge.common.MinecraftForge; -import cpw.mods.fml.common.FMLCommonHandler; - -public class Alfheim { - public static void vacationTime() { - AlfheimBlocks.alfheimify(); - - if(FMLCommonHandler.instance().getSide().isClient()) { - AlfheimEvents alfevents = new AlfheimEvents(); - FMLCommonHandler.instance().bus().register(alfevents); - MinecraftForge.EVENT_BUS.register(alfevents); - } - } - - // this stuff needs to happen whether or not botania is active it seems D: - // DON'T LIE LIKE THAT, CUTS >:P - public static void packYourBags() { - int dim = WorldProviderAlfheim.dimensionID; - DimensionManager.registerProviderType(dim, WorldProviderAlfheim.class, false); - DimensionManager.registerDimension(dim, dim); - - MapGenStructureIO.registerStructure(MapGenCity.Start.class, "AlfCity"); - ComponentCityParts.registerParts(); - } -} diff --git a/src/main/java/fox/spiteful/avaritia/compat/botania/alfheim/AlfheimBlocks.java b/src/main/java/fox/spiteful/avaritia/compat/botania/alfheim/AlfheimBlocks.java deleted file mode 100644 index 42cb9d8..0000000 --- a/src/main/java/fox/spiteful/avaritia/compat/botania/alfheim/AlfheimBlocks.java +++ /dev/null @@ -1,13 +0,0 @@ -package fox.spiteful.avaritia.compat.botania.alfheim; - -import net.minecraft.block.Block; -import cpw.mods.fml.common.registry.GameRegistry; -import fox.spiteful.avaritia.blocks.ItemBlockWithMetadataUnderp; - -public class AlfheimBlocks { - public static Block deadrock; - - public static void alfheimify() { - deadrock = GameRegistry.registerBlock(new BlockDeadrock(), ItemBlockWithMetadataUnderp.class, "Alf_Deadrock"); - } -} diff --git a/src/main/java/fox/spiteful/avaritia/compat/botania/alfheim/AlfheimEvents.java b/src/main/java/fox/spiteful/avaritia/compat/botania/alfheim/AlfheimEvents.java deleted file mode 100644 index 20172c1..0000000 --- a/src/main/java/fox/spiteful/avaritia/compat/botania/alfheim/AlfheimEvents.java +++ /dev/null @@ -1,182 +0,0 @@ -package fox.spiteful.avaritia.compat.botania.alfheim; - -import java.lang.reflect.Field; -import java.lang.reflect.Method; - -import org.apache.logging.log4j.Level; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.multiplayer.WorldClient; -import net.minecraft.client.renderer.EntityRenderer; -import net.minecraft.client.renderer.texture.DynamicTexture; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.potion.Potion; -import net.minecraft.util.Timer; -import net.minecraft.world.World; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import cpw.mods.fml.common.gameevent.TickEvent; -import cpw.mods.fml.common.gameevent.TickEvent.Phase; -import cpw.mods.fml.relauncher.ReflectionHelper; -import fox.spiteful.avaritia.FieldHelper; -import fox.spiteful.avaritia.Lumberjack; - -public class AlfheimEvents { - public static Field lightmapUpdateNeededField; - public static Field mcTimerField; - public static Field torchFlickerField; - public static Field lightmapColorsField; - public static Field lightmapTextureField; - public static Field bossColorModifierField; - public static Field bossColorModifierPrevField; - public static Method getNightVisionBrightnessMethod = ReflectionHelper.findMethod(EntityRenderer.class, Minecraft.getMinecraft().entityRenderer, new String[]{"getNightVisionBrightness", "func_82830_a"}, EntityPlayer.class, float.class); - - static { - try { - mcTimerField = ReflectionHelper.findField(Minecraft.class, "timer", "field_71428_T"); - lightmapUpdateNeededField = ReflectionHelper.findField(EntityRenderer.class, "lightmapUpdateNeeded", "field_78536_aa"); - torchFlickerField = ReflectionHelper.findField(EntityRenderer.class, "torchFlickerX", "field_78514_e"); - lightmapColorsField = ReflectionHelper.findField(EntityRenderer.class, "lightmapColors", "field_78504_Q"); - lightmapTextureField = ReflectionHelper.findField(EntityRenderer.class, "lightmapTexture", "field_78513_d"); - bossColorModifierField = ReflectionHelper.findField(EntityRenderer.class, "bossColorModifier", "field_82831_U"); - bossColorModifierPrevField = ReflectionHelper.findField(EntityRenderer.class, "bossColorModifierPrev", "field_82832_V"); - //getNightVisionBrightnessMethod = ReflectionHelper.findMethod(EntityRenderer.class, Minecraft.getMinecraft().entityRenderer, new String[]{"getNightVisionBrightness", "func_82830_a"}, Float.class); - } catch(Exception e) { - Lumberjack.log(Level.ERROR, e); - } - } - - @SubscribeEvent - public void onRenderStart(TickEvent.RenderTickEvent event) { - if (event.phase == Phase.START) { - Minecraft mc = Minecraft.getMinecraft(); - - if (mc.theWorld == null) { - return; - } - World world = mc.theWorld; - if (world.provider == null || !(world.provider instanceof WorldProviderAlfheim)) { - return; - } - EntityRenderer er = mc.entityRenderer; - - boolean needsupdate = FieldHelper.get(lightmapUpdateNeededField, er); - - if (needsupdate) { - updateLightmapRedGiant(); - } - } - } - - public void updateLightmapRedGiant() { - //Lumberjack.info("Lightmap update"); - Minecraft mc = Minecraft.getMinecraft(); - EntityRenderer er = mc.entityRenderer; - Timer timer = FieldHelper.get(mcTimerField, mc); - float partialTicks = timer.renderPartialTicks; - float flicker = FieldHelper.get(torchFlickerField, er); - float bossColorModifier = FieldHelper.get(bossColorModifierField, er); - float bossColorModifierPrev = FieldHelper.get(bossColorModifierPrevField, er); - int[] lightmapColors = FieldHelper.get(lightmapColorsField, er); - DynamicTexture lightmapTexture = FieldHelper.get(lightmapTextureField, er); - - WorldClient worldclient = mc.theWorld; - - if (worldclient != null) - { - for (int i = 0; i < 256; ++i) - { - float brightness = worldclient.getSunBrightness(1.0F) * 0.95F + 0.05F; - float sun = worldclient.provider.lightBrightnessTable[i / 16] * brightness; - float torch = worldclient.provider.lightBrightnessTable[i % 16] * (flicker * 0.1F + 1.5F); - - if (worldclient.lastLightningBolt > 0) - { - sun = worldclient.provider.lightBrightnessTable[i / 16]; - } - - float sunr = sun * (worldclient.getSunBrightness(1.0F) * 0.65F + 0.35F); - float sung = sun * (worldclient.getSunBrightness(1.0F) * 0.65F + 0.35F); - float torchg = torch * ((torch * 0.6F + 0.4F) * 0.6F + 0.4F); - float torchb = torch * (torch * torch * 0.6F + 0.4F); - float fr = sunr + torch; - float fg = sung * 0.3f + torchg; - float fb = sun * 0.2f + torchb; - fr = fr * 0.96F + 0.03F; - fg = fg * 0.96F + 0.03F; - fb = fb * 0.96F + 0.03F; - float modifier; - - if (bossColorModifier > 0.0F) - { - modifier = bossColorModifierPrev + (bossColorModifier - bossColorModifierPrev) * partialTicks; - fr = fr * (1.0F - modifier) + fr * 0.7F * modifier; - fg = fg * (1.0F - modifier) + fg * 0.6F * modifier; - fb = fb * (1.0F - modifier) + fb * 0.6F * modifier; - } - - if (worldclient.provider.dimensionId == 1) - { - fr = 0.22F + torch * 0.75F; - fg = 0.28F + torchg * 0.75F; - fb = 0.25F + torchb * 0.75F; - } - - if (mc.thePlayer.isPotionActive(Potion.nightVision)) - { - modifier = FieldHelper.invoke(getNightVisionBrightnessMethod, er, mc.thePlayer, partialTicks); - - float nightvision = 1.0F / fr; - - if (nightvision > 1.0F / fg) - { - nightvision = 1.0F / fg; - } - - if (nightvision > 1.0F / fb) - { - nightvision = 1.0F / fb; - } - - fr = fr * (1.0F - modifier) + fr * nightvision * modifier; - fg = fg * (1.0F - modifier) + fg * nightvision * modifier; - fb = fb * (1.0F - modifier) + fb * nightvision * modifier; - } - - if (fr > 1.0F) { fr = 1.0F; } - if (fg > 1.0F) { fg = 1.0F; } - if (fb > 1.0F) { fb = 1.0F; } - - modifier = mc.gameSettings.gammaSetting; - float gr = 1.0F - fr; - float gg = 1.0F - fg + 0.25f*sun; - float gb = 1.0F - fb + 0.2f*sun; - gr = 1.0F - gr * gr * gr * gr; - gg = 1.0F - gg * gg * gg * gg; - gb = 1.0F - gb * gb * gb * gb; - fr = fr * (1.0F - modifier) + gr * modifier; - fg = fg * (1.0F - modifier) + gg * modifier; - fb = fb * (1.0F - modifier) + gb * modifier; - fr = fr * 0.96F + 0.03F; - fg = fg * 0.96F + 0.03F; - fb = fb * 0.96F + 0.03F; - - if (fr > 1.0F) { fr = 1.0F; } - if (fg > 1.0F) { fg = 1.0F; } - if (fb > 1.0F) { fb = 1.0F; } - - if (fr < 0.0F) { fr = 0.0F; } - if (fg < 0.0F) { fg = 0.0F; } - if (fb < 0.0F) { fb = 0.0F; } - - short alpha = 255; - int r = (int)(fr * 255.0F); - int g = (int)(fg * 255.0F); - int b = (int)(fb * 255.0F); - lightmapColors[i] = alpha << 24 | r << 16 | g << 8 | b; - } - - lightmapTexture.updateDynamicTexture(); - FieldHelper.set(lightmapUpdateNeededField, er, false); - } - } -} diff --git a/src/main/java/fox/spiteful/avaritia/compat/botania/alfheim/AlfheimNoise.java b/src/main/java/fox/spiteful/avaritia/compat/botania/alfheim/AlfheimNoise.java deleted file mode 100644 index 6ed939a..0000000 --- a/src/main/java/fox/spiteful/avaritia/compat/botania/alfheim/AlfheimNoise.java +++ /dev/null @@ -1,190 +0,0 @@ -package fox.spiteful.avaritia.compat.botania.alfheim; - -import java.util.Random; - -import net.minecraft.util.MathHelper; -import net.minecraft.util.Vec3; - - - -public class AlfheimNoise { - - public final long seed; - private final double[] randomSource; - - private static int XSEED = 1619; - private static int ZSEED = 31337; - private static int NSEED = 1013; - private static int NSHIFT = 8; - - public AlfheimNoise(long seed) { - this.seed = seed; - this.randomSource = new double[256*2]; - Random randy = new Random(this.seed); - for (int i=0; i<256; i++) { - double r = randy.nextDouble(); - double a = randy.nextDouble()*2*Math.PI; - - this.randomSource[i*2] = Math.sin(a)*r; - this.randomSource[i*2+1] = Math.cos(a)*r; - } - } - - private double getNoise(double x, double z, double period, long seed) { - double frequency = period == 0 ? 1.0 : 1.0/period; - return this.calcNoise(x * frequency, z * frequency, seed); - } - - private double calcNoise(double x, double z, long seed) { - int x0 = (x > 0 ? MathHelper.floor_double(x) : MathHelper.floor_double(x)-1); - int x1 = x0 + 1; - int z0 = (z > 0 ? MathHelper.floor_double(z) : MathHelper.floor_double(z)-1); - int z1 = z0 + 1; - - double xs = deriv1(x-x0); - double zs = deriv1(z-z0); - - double tl = this.gradientNoise(x,z, x0,z0, seed); - double tr = this.gradientNoise(x,z, x1,z0, seed); - double top = lerp(tl,tr, xs); - - double bl = this.gradientNoise(x,z, x0,z1, seed); - double br = this.gradientNoise(x,z, x1,z1, seed); - double bot = lerp(bl,br, xs); - - return lerp(top, bot, zs); - } - - private double gradientNoise(double fx, double fz, int ix, int iz, long seed) { - Vec3 grad = this.getGradient(ix, iz, seed); - Vec3 point = Vec3.createVectorHelper(fx-ix, fz-iz, 0); - - return grad.dotProduct(point) * 2.12; - } - - private Vec3 getGradient(int x, int z, long seed) { - long vectorindex = ( - XSEED * x - + ZSEED * z - + NSEED * seed - ) & 0xffffffff; - vectorindex ^= (vectorindex >> NSHIFT); - vectorindex &= 0xff; - int vi = (int)vectorindex; - - return Vec3.createVectorHelper(this.randomSource[vi*2], this.randomSource[vi*2+1], 0); - } - - private Vec3 calcDerivative(double x, double z, long seed) { - int ix = MathHelper.floor_double(x); - int iz = MathHelper.floor_double(z); - double fx = x-ix; - double fz = z-iz; - - double wx = deriv1(fx); - double wz = deriv1(fz); - - double dwx = deriv2(fx); - double dwz = deriv2(fz); - - double dwpx = deriv3(fx); - double dwpz = deriv3(fz); - - Vec3 vtl = getGradient(ix, iz, seed); - Vec3 vtr = getGradient(ix+1, iz, seed); - Vec3 vbl = getGradient(ix, iz+1, seed); - Vec3 vbr = getGradient(ix+1, iz+1, seed); - - double tl = vtl.xCoord * (x - ix) + vtl.yCoord * (z - iz); - double tr = vtr.xCoord * (x - (ix+1)) + vtr.yCoord * (z - iz); - double bl = vbl.xCoord * (x - ix) + vbl.yCoord * (z - (iz+1)); - double br = vbr.xCoord * (x - (ix+1)) + vbr.yCoord * (z - (iz+1)); - - double top = lerp(tl,tr,wx); - double bot = lerp(bl,br,wx); - double n = lerp(top,bot,wz); - - double dx = (vtl.xCoord + (vbl.xCoord-vtl.xCoord)*wz) + ((vtr.yCoord-vtl.yCoord)*fz - vtr.xCoord + - ((vtl.yCoord-vtr.yCoord-vbl.yCoord+vbr.yCoord)*fz + vtr.xCoord + vbl.yCoord - vbr.xCoord - vbr.yCoord)*wz)* - dwx + ((vtr.xCoord-vtl.xCoord) + (vtl.xCoord-vtr.xCoord-vbl.xCoord+vbr.xCoord)*wz)*dwpx; - - double dz = (vtl.yCoord + (vtr.yCoord-vtl.yCoord)*wx) + ((vbl.xCoord-vtl.xCoord)*fx - vbl.yCoord + ((vtl.xCoord- - vtr.xCoord-vbl.xCoord+vbr.xCoord)*fx + vtr.xCoord + vbl.yCoord - vbr.xCoord - vbr.yCoord)*wx)*dwz + - ((vbl.yCoord-vtl.yCoord) + (vtl.yCoord-vtr.yCoord-vbl.yCoord+vbr.yCoord)*wx)*dwpz; - - return Vec3.createVectorHelper(n*2, dx*2, dz*2); - } - - private double getNoiseOctaves(double x, double z, int octaves, double period, double lacunarity, double gain, long seed) { - double sum = 0.0; - double freq = period == 0 ? 1.0 : 1.0 / period; - double amp = 1.0; - - for (int i=0; i= 0) - { - return true; - } - else - { - int j = 0; - int k = 0; - - for (int l = this.boundingBox.minZ; l <= this.boundingBox.maxZ; ++l) - { - for (int i1 = this.boundingBox.minX; i1 <= this.boundingBox.maxX; ++i1) - { - if (bounds.isVecInside(i1, 64, l)) - { - j += Math.max(world.getTopSolidOrLiquidBlock(i1, l), world.provider.getAverageGroundLevel()); - ++k; - } - } - } - - if (k == 0) - { - return false; - } - else - { - this.partPosY = j / k; - this.boundingBox.offset(0, this.partPosY - this.boundingBox.minY + offset, 0); - return true; - } - } - } - } -} diff --git a/src/main/java/fox/spiteful/avaritia/compat/botania/alfheim/MapGenAlfheimRavines.java b/src/main/java/fox/spiteful/avaritia/compat/botania/alfheim/MapGenAlfheimRavines.java deleted file mode 100644 index 97ae315..0000000 --- a/src/main/java/fox/spiteful/avaritia/compat/botania/alfheim/MapGenAlfheimRavines.java +++ /dev/null @@ -1,49 +0,0 @@ -package fox.spiteful.avaritia.compat.botania.alfheim; - -import fox.spiteful.avaritia.Lumberjack; -import net.minecraft.block.Block; -import net.minecraft.world.World; -import net.minecraft.world.gen.MapGenRavine; - -public class MapGenAlfheimRavines extends MapGenRavine { - - @Override - protected void func_151538_a(World world, int originChunkX, int originChunkZ, int chunkX, int chunkZ, Block[] blocks) - { - if (this.rand.nextInt(6) == 0) { - Lumberjack.info("crack!"); - double x = (double)(originChunkX * 16 + this.rand.nextInt(16)); - double y = 67;//(double)(this.rand.nextInt(20) + 50); - double z = (double)(originChunkZ * 16 + this.rand.nextInt(16)); - - int angles = this.rand.nextInt(4)+3; - double angleinc = (Math.PI*2.0) / angles; - double baseangle = this.rand.nextDouble() * Math.PI * 2.0; - - for (int i=0; i cells = new ArrayList(); - int[] cellfill = new int[BLOCKS*BLOCKS]; - for (int i=0; i BLOCKS/2-3 && bx < BLOCKS/2+2 && bz > BLOCKS/2-3 && bz < BLOCKS/2+2) { - continue; - } - int x = origin + (BLOCKSIZE + ROADSIZE) * bx; - int z = origin + (BLOCKSIZE + ROADSIZE) * bz; - - double cx = x + BLOCKSIZE * 0.5; - double cz = z + BLOCKSIZE * 0.5; - - double rad = Math.sqrt(cx*cx + cz*cz) / (CITYRADIUS - (BLOCKSIZE*0.75)); - - if (rad < 1.0) { - if (rand.nextDouble() > rad - 0.4) { - cells.add(new ChunkCoordinates(bx,bz,0)); - cellfill[bz*BLOCKS + bx] = 1; - } - } - } - } - - Collections.shuffle(cells); - - while (cells.size() > 0) { - ChunkCoordinates cell = cells.remove(0); - int bx = cell.posX; - int bz = cell.posY; - int index = bz * BLOCKS + bx; - if (cellfill[index] != 1) { - continue; - } - - int dx = BLOCKS/2 - bx; - int dz = BLOCKS/2 - bz; - double dist = Math.sqrt(dx*dx + dz*dz) / (BLOCKS*0.5); - - int width = 1; - int height = 1; - - if (rand.nextDouble() < 1.5 * (1-dist) - 0.05) { - width += 1; - height += 1; - - if (rand.nextDouble() < 0.1) { - width += 1; - } - if (rand.nextDouble() < 0.1) { - height += 1; - } - } - - while(true) { - if (width == 1 && height == 1) { - break; - } - - boolean ok = true; - for (int cx = 0; cx < width; cx++) { - for (int cz = 0; cz < height; cz++) { - if (bx+cx >= BLOCKS || bz+cz >= BLOCKS) { - ok = false; - break; - } - if ((bx < BLOCKS/2 && bx+cx >= BLOCKS/2) || (bz < BLOCKS/2 && bz+cz >= BLOCKS/2)) { - ok = false; - break; - } - int cindex = (bz+cz)*BLOCKS + (bx+cx); - if (cellfill[cindex] != 1) { - ok = false; - break; - } - } - } - - if (ok) { - break; - } else { - if (width > 1 && height > 1) { - if (rand.nextBoolean()) { - width--; - } else { - height--; - } - } else if (width > 1) { - width--; - } else { - height--; - } - } - } - - for (int cx = 0; cx < width; cx++) { - for (int cz = 0; cz < height; cz++) { - int cindex = (bz+cz)*BLOCKS + (bx+cx); - cellfill[cindex] = 2; - } - } - - double size = Math.sqrt(width*height); - int floors = (int)Math.round(0.5 + (size * 1.45 * ((1-dist) + 0.3) * (rand.nextDouble() * rand.nextDouble())) + (rand.nextDouble() * (1-dist) * 0.6) + rand.nextDouble() * 0.2); - - int x = origin + (BLOCKSIZE+ROADSIZE) * bx; - int z = origin + (BLOCKSIZE+ROADSIZE) * bz; - int structurewidth = width * BLOCKSIZE + (width-1) * ROADSIZE; - int structureheight = height * BLOCKSIZE + (height-1) * ROADSIZE; - - /*ComponentScatteredFeaturePieces.SwampHut swamphut = new ComponentScatteredFeaturePieces.SwampHut(rand, x, z); - this.components.add(swamphut);*/ - - ComponentCityParts.CityRuin ruin = new ComponentCityParts.CityRuin(rand, x, z, structurewidth, structureheight, floors); - this.components.add(ruin); - } - - - - //ComponentScatteredFeaturePieces.SwampHut swamphut = new ComponentScatteredFeaturePieces.SwampHut(rand, (chunkX) * 16, (chunkZ) * 16); - //this.components.add(swamphut); - - this.updateBoundingBox(); - } - } -} diff --git a/src/main/java/fox/spiteful/avaritia/compat/botania/alfheim/Ruin.java b/src/main/java/fox/spiteful/avaritia/compat/botania/alfheim/Ruin.java deleted file mode 100644 index a26e7bd..0000000 --- a/src/main/java/fox/spiteful/avaritia/compat/botania/alfheim/Ruin.java +++ /dev/null @@ -1,397 +0,0 @@ -package fox.spiteful.avaritia.compat.botania.alfheim; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Random; - -import fox.spiteful.avaritia.compat.botania.alfheim.Ruin.BlockRuinPalette.BlockPaletteInfo; - -import net.minecraft.block.Block; - -public class Ruin { - public BlockArray blocks; - public double ruinLevel; - public Random rand; - public BlockRuinPalette palette; - - public int xSize; - public int ySize; - public int zSize; - public int xOffset; - public int yOffset; - public int zOffset; - - public Ruin(BlockArray blocks, double ruinLevel, Random rand) { - this(blocks, ruinLevel, rand, new BlockRuinPalette()); - } - public Ruin(BlockArray blocks, double ruinLevel, Random rand, BlockRuinPalette palette) { - this (blocks, ruinLevel, rand, blocks.xSize, blocks.ySize, blocks.zSize, 0,0,0, palette); - } - public Ruin(BlockArray blocks, double ruinLevel, Random rand, int xSize, int ySize, int zSize, int xOffset, int yOffset, int zOffset) { - this (blocks, ruinLevel, rand, xSize, ySize, zSize, xOffset,yOffset,zOffset, new BlockRuinPalette()); - } - public Ruin(BlockArray blocks, double ruinLevel, Random rand, int xSize, int ySize, int zSize, int xOffset, int yOffset, int zOffset, BlockRuinPalette palette) { - this.blocks = blocks; - this.ruinLevel = ruinLevel; - this.rand = rand; - this.palette = palette; - - this.xSize = xSize; - this.ySize = ySize; - this.zSize = zSize; - - this.xOffset = xOffset; - this.yOffset = yOffset; - this.zOffset = zOffset; - - int volume = this.xSize * this.ySize * this.zSize; - int breaks = (int) Math.ceil((volume/16.0) * ruinLevel); - - for (int i=0; i falldirs = new ArrayList(); - if (!blocks.outOfBounds(x-1,y,z) && blocks.getBlock(x-1,y,z) == null && blocks.getBlock(x-1,y-1,z) == null) { - falldirs.add(0); - } - if (!blocks.outOfBounds(x+1,y,z) && blocks.getBlock(x+1,y,z) == null && blocks.getBlock(x+1,y-1,z) == null) { - falldirs.add(1); - } - if (!blocks.outOfBounds(x,y,z-1) && blocks.getBlock(x,y,z-1) == null && blocks.getBlock(x,y-1,z-1) == null) { - falldirs.add(2); - } - if (!blocks.outOfBounds(x,y,z+1) && blocks.getBlock(x,y,z+1) == null && blocks.getBlock(x,y-1,z+1) == null) { - falldirs.add(3); - } - - if (!falldirs.isEmpty()) { - slide = true; - slidedir = falldirs.get(rand.nextInt(falldirs.size())); - } - - if (slide) { - impact(x,y-1,z, falldistance/4, block); - if (slidedir == 0) { - x--; - } else if (slidedir == 1) { - x++; - } else if (slidedir == 2) { - z--; - } else { - z++; - } - } else { - BlockPaletteInfo blockinfo = this.palette.get(block); - double breakchance = fallBreakChance(falldistance) * blockinfo.breakchance; - if (rand.nextDouble() <= breakchance) { - blocks.setBlock(x,y,z,blockinfo.broken); - } else { - if (blockinfo.hardness >= 1) { - blocks.setBlock(x,y,z,block); - } - } - impact(x,y-1,z, falldistance, block); - break; - } - } - } - } - - protected void impact(int x, int y, int z, int falldistance, BlockMeta fallingblock) { - BlockMeta block = blocks.getBlock(x,y,z); - BlockPaletteInfo blockinfo = this.palette.get(block); - double smashchance = fallBreakChance(falldistance) * blockinfo.smashchance; - - if (rand.nextDouble() <= smashchance) { - blocks.setBlock(x,y,z, null); - dropBlock(x,y+1,z, falldistance/3); - } - - double breakchance = fallBreakChance(falldistance) * blockinfo.breakchance; - if (blocks.getBlock(x,y-1,z) != null) { - breakchance *= 0.75; - } - - if (rand.nextDouble() <= breakchance) { - if (blockinfo.broken != null) { - blocks.setBlock(x,y,z, blockinfo.broken); - impact(x,y,z, falldistance/2, fallingblock); - } else { - dropBlock(x,y,z); - dropBlock(x,y+1,z, falldistance/3); - } - } - } - - protected void ruinArea(int ox, int oy, int oz, double radius) { - int range = (int)Math.ceil(radius*2); - int offset = range/2; - - for (int y = 0; y<=range; y++) { - List coords = new ArrayList(); - for (int x = 0; x<=range; x++) { - if (x < 0 || x >= blocks.xSize) { - continue; - } - for (int z = 0; z<=range; z++) { - if (z < 0 || z >= blocks.zSize) { - continue; - } - BlockMeta block = blocks.getBlock(ox+x-offset,oy+y-offset,oz+z-offset); - if (block == null) { - continue; - } - - BlockPaletteInfo blockinfo = this.palette.get(block); - - double rx = (x - range/2); - double ry = (y - range/2); - double rz = (z - range/2); - - double dist = Math.sqrt(rx*rx+ry*ry+rz*rz) / radius; - if(dist <= 1.0) { - if (dist > .75) { - double dchance = (dist - 0.75)*4; - if (rand.nextDouble() > dchance) { - coords.add(new Coord(x,y,z)); - } else if (blockinfo.broken != null || blockinfo.hardness < 1) { - blocks.setBlock(ox+x-offset,oy+y-offset,oz+z-offset,blockinfo.broken); - } - } else { - coords.add(new Coord(x,y,z)); - } - } - } - } - Collections.shuffle(coords, rand); - for (int i=0; i open = new ArrayList(); - open.add(new Coord(ox,0,oz)); - - while(!open.isEmpty()) { - Coord c = open.remove(open.size()-1); - if (!blocks.outOfBounds(c.x, c.y, c.z) && blocks.getBlock(c.x, c.y, c.z) != null) { - connected[blocks.index(c.x,c.y,c.z)] = true; - - if(!blocks.outOfBounds(c.x-1, c.y, c.z) && blocks.getBlock(c.x-1, c.y, c.z) != null && connected[blocks.index(c.x-1,c.y,c.z)] == false) { - open.add(new Coord(c.x-1,c.y,c.z)); - } - if(!blocks.outOfBounds(c.x+1, c.y, c.z) && blocks.getBlock(c.x+1, c.y, c.z) != null && connected[blocks.index(c.x+1,c.y,c.z)] == false) { - open.add(new Coord(c.x+1,c.y,c.z)); - } - if(!blocks.outOfBounds(c.x, c.y, c.z-1) && blocks.getBlock(c.x, c.y, c.z-1) != null && connected[blocks.index(c.x,c.y,c.z-1)] == false) { - open.add(new Coord(c.x,c.y,c.z-1)); - } - if(!blocks.outOfBounds(c.x, c.y, c.z+1) && blocks.getBlock(c.x, c.y, c.z+1) != null && connected[blocks.index(c.x,c.y,c.z+1)] == false) { - open.add(new Coord(c.x,c.y,c.z+1)); - } - if(!blocks.outOfBounds(c.x, c.y-1, c.z) && blocks.getBlock(c.x, c.y-1, c.z) != null && connected[blocks.index(c.x,c.y-1,c.z)] == false) { - open.add(new Coord(c.x,c.y-1,c.z)); - } - if(!blocks.outOfBounds(c.x, c.y+1, c.z) && blocks.getBlock(c.x, c.y+1, c.z) != null && connected[blocks.index(c.x,c.y+1,c.z)] == false) { - open.add(new Coord(c.x,c.y+1,c.z)); - } - } - } - - for (int y = 0; y<=blocks.ySize; y++) { - List coords = new ArrayList(); - for (int x = 0; x<=blocks.xSize; x++) { - for (int z = 0; z<=blocks.zSize; z++) { - if (blocks.getBlock(x,y,z) != null && !connected[blocks.index(x,y,z)]) { - coords.add(new Coord(x,y,z)); - } - } - } - Collections.shuffle(coords, rand); - for (int i=0; i=xSize||y<0||y>=ySize||z<0||z>=zSize); - } - - public void setBlock(int x, int y, int z, BlockMeta block) { - if (outOfBounds(x,y,z)) { - return; - } - - blocks[index(x,y,z)] = block; - } - - public BlockMeta getBlock(int x, int y, int z) { - if (outOfBounds(x,y,z)) { - return null; - } - - return blocks[index(x,y,z)]; - } - - public void fillBlocks(int x, int y, int z, int x2, int y2, int z2, BlockMeta block) { - for (int ix = x; ix<=x2; ix++) { - for (int iy = y; iy<=y2; iy++) { - for (int iz = z; iz<=z2; iz++) { - setBlock(ix,iy,iz, block); - } - } - } - } - - protected int index(int x, int y, int z) { - return y * zSize * xSize + z * xSize + x; - } - } - - public static class BlockMeta { - public Block block; - public byte meta; - - public BlockMeta(Block block, int meta) { - this.block = block; - this.meta = (byte)(meta & 0xFF); - } - - @Override - public String toString() { - return this.block.toString()+"#"+this.meta; - } - - @Override - public int hashCode() { - return this.block.hashCode() + this.meta; - } - } - - public static class BlockRuinPalette { - protected Map infomap = new HashMap(); - - public BlockPaletteInfo get(BlockMeta block) { - if (infomap.containsKey(block)) { - return infomap.get(block); - } - return BlockPaletteInfo.DEFAULT; - } - - public void set(BlockMeta block, double hardness, double breakchance, double smashchance) { - this.set(block, hardness, breakchance, smashchance, null); - } - public void set(BlockMeta block, double hardness, double breakchance, double smashchance, BlockMeta broken) { - infomap.put(block, new BlockPaletteInfo(hardness, breakchance, smashchance, broken)); - } - - public static class BlockPaletteInfo { - public static final BlockPaletteInfo DEFAULT = new BlockPaletteInfo(1.0, 0.2, 0.2, null); - - public final double hardness; - public final double breakchance; - public final double smashchance; - public final BlockMeta broken; - - public BlockPaletteInfo(double hardness, double breakchance, double smashchance, BlockMeta broken) { - this.hardness = hardness; - this.breakchance = breakchance; - this.smashchance = smashchance; - this.broken = broken; - } - } - } - - // ################################################################################# - // Internal Classes - // ################################################################################# - protected static class Coord { - int x; - int y; - int z; - - public Coord(int x, int y, int z) { - this.x = x; - this.y = y; - this.z = z; - } - } -} diff --git a/src/main/java/fox/spiteful/avaritia/compat/botania/alfheim/TeleportHelper.java b/src/main/java/fox/spiteful/avaritia/compat/botania/alfheim/TeleportHelper.java deleted file mode 100644 index b8b97eb..0000000 --- a/src/main/java/fox/spiteful/avaritia/compat/botania/alfheim/TeleportHelper.java +++ /dev/null @@ -1,102 +0,0 @@ -package fox.spiteful.avaritia.compat.botania.alfheim; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityList; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.server.MinecraftServer; -import net.minecraft.util.ChunkCoordinates; -import net.minecraft.world.World; -import net.minecraft.world.WorldServer; -import net.minecraftforge.common.DimensionManager; - -public class TeleportHelper { - public static void travelToDimension(Entity ent, int x, int y, int z, int dim){ - if(ent instanceof EntityPlayerMP){ - MinecraftServer minecraftserver = MinecraftServer.getServer(); - WorldServer newWorldServer = minecraftserver.worldServerForDimension(dim); - minecraftserver.getConfigurationManager().transferPlayerToDimension((EntityPlayerMP)ent, dim, new BasicTeleporter(newWorldServer)); - ((EntityPlayer)ent).setPositionAndUpdate(x+0.5, y+0.5, z+0.5); - return; - } - - - if (!ent.worldObj.isRemote && !ent.isDead) - { - ent.worldObj.theProfiler.startSection("changeDimension"); - MinecraftServer minecraftserver = MinecraftServer.getServer(); - int j = ent.dimension; - WorldServer worldserver = minecraftserver.worldServerForDimension(j); - WorldServer worldserver1 = minecraftserver.worldServerForDimension(dim); - ent.dimension = dim; - - if (j == 1 && dim == 1) - { - worldserver1 = minecraftserver.worldServerForDimension(0); - ent.dimension = 0; - } - - ent.worldObj.removeEntity(ent); - ent.isDead = false; - ent.worldObj.theProfiler.startSection("reposition"); - minecraftserver.getConfigurationManager().transferEntityToWorld(ent, j, worldserver, worldserver1); - ent.worldObj.theProfiler.endStartSection("reloading"); - Entity entity = EntityList.createEntityByName(EntityList.getEntityString(ent), worldserver1); - - if (entity != null) - { - entity.copyDataFrom(ent, true); - - if (j == 1 && dim == 1) - { - entity.setLocationAndAngles(x+0.5, y+0.5, z+0.5, entity.rotationYaw, entity.rotationPitch); - } - - worldserver1.spawnEntityInWorld(entity); - entity.setPosition(x+0.5, y+0.5, z+0.5); - } - - ent.isDead = true; - ent.worldObj.theProfiler.endSection(); - worldserver.resetUpdateEntityTick(); - worldserver1.resetUpdateEntityTick(); - ent.worldObj.theProfiler.endSection(); - } - } - - public static void travelToOrFromAlfheim(EntityPlayer player) { - if (DimensionManager.getWorld(0) == player.worldObj) { - // overworld to alfheim - travelToDimension(player, 0, 85, 0, WorldProviderAlfheim.dimensionID); - } else { - // alfheim to overworld - sendPlayerHome(player); - } - } - - public static void sendPlayerHome(EntityPlayer player) { - World world = DimensionManager.getWorld(0); - ChunkCoordinates coord = player.getBedLocation(0); - - if (coord == null) { - coord = world.getSpawnPoint(); - } - - coord = forceLocation(world, coord); - - if (coord == null) { - coord = world.getSpawnPoint(); - } - - travelToDimension(player, coord.posX, coord.posY, coord.posZ, 0); - - while (!world.getCollidingBoundingBoxes(player, player.boundingBox).isEmpty()) - { - player.setPositionAndUpdate(player.posX, player.posY + 1.0D, player.posZ); - } - } - - public static ChunkCoordinates forceLocation(World world, ChunkCoordinates coord) { - return null; - } -} diff --git a/src/main/java/fox/spiteful/avaritia/compat/botania/alfheim/WorldProviderAlfheim.java b/src/main/java/fox/spiteful/avaritia/compat/botania/alfheim/WorldProviderAlfheim.java deleted file mode 100644 index 65bf242..0000000 --- a/src/main/java/fox/spiteful/avaritia/compat/botania/alfheim/WorldProviderAlfheim.java +++ /dev/null @@ -1,131 +0,0 @@ -package fox.spiteful.avaritia.compat.botania.alfheim; - -import cpw.mods.fml.common.FMLCommonHandler; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import fox.spiteful.avaritia.FieldHelper; -import fox.spiteful.avaritia.Lumberjack; -import net.minecraft.client.Minecraft; -import net.minecraft.util.ChunkCoordinates; -import net.minecraft.util.Timer; -import net.minecraft.util.Vec3; -import net.minecraft.world.WorldProvider; -import net.minecraft.world.biome.BiomeGenBase; -import net.minecraft.world.biome.WorldChunkManagerHell; -import net.minecraft.world.chunk.IChunkProvider; - -public class WorldProviderAlfheim extends WorldProvider { - - public static int dimensionID = 13; - - @Override - public void registerWorldChunkManager() - { - this.worldChunkMgr = new WorldChunkManagerHell(BiomeGenBase.hell, 0.0F); - this.isHellWorld = true; - this.hasNoSky = false; - if(FMLCommonHandler.instance().getSide().isClient()) { - this.setCloudRenderer(new ApocalypseCloudRenderer()); - this.setSkyRenderer(new ApocalypseSkyRenderer()); - } - } - - /** - * Return Vec3D with biome specific fog color - */ - @Override - @SideOnly(Side.CLIENT) - public Vec3 getFogColor(float p_76562_1_, float p_76562_2_) - { - /*double r = 0.1; - double g = 0.04; - double b = 0; - - double nr = 1.0; - double ng = 0.5; - double nb = 0.0; - - Minecraft mc = Minecraft.getMinecraft(); - Timer t = FieldHelper.get(AlfheimEvents.mcTimerField, mc); - float partialTicks = t.renderPartialTicks; - - float n = FieldHelper.invoke(AlfheimEvents.getNightVisionBrightnessMethod, mc.entityRenderer, mc.thePlayer, partialTicks); - double notn = 1.0 - n; - - return Vec3.createVectorHelper(n*nr + notn*r, n*ng + notn*g, n*nb + notn*b);*/ - return Vec3.createVectorHelper(0.1, 0.04, 0.0); - } - - /** - * Returns a new chunk provider which generates chunks for this world - */ - @Override - public IChunkProvider createChunkGenerator() - { - return new ChunkProviderAlfheim(this.worldObj, this.worldObj.getSeed()); - } - - /** - * Returns 'true' if in the "main surface world", but 'false' if in the Nether or End dimensions. - */ - @Override - public boolean isSurfaceWorld() - { - return false; - } - - /** - * Will check if the x, z position specified is alright to be set as the map spawn point - */ - @Override - public boolean canCoordinateBeSpawn(int x, int z) - { - return true; // need to improve - } - - /** - * Calculates the angle of sun and moon in the sky relative to a specified time (usually worldTime) - */ - @Override - public float calculateCelestialAngle(long tick, float partialTick) - { - return 1f;//0.425F; - } - - /** - * True if the player can respawn in this dimension (true = overworld, false = nether). - */ - @Override - public boolean canRespawnHere() - { - return true; - } - - /** - * Returns true if the given X,Z coordinate should show environmental fog. - */ - @Override - @SideOnly(Side.CLIENT) - public boolean doesXZShowFog(int x, int z) - { - return false; - //return true; - } - - @Override - public String getDimensionName() { - return "Alfheim Eternal"; - } - - @Override - public float getSunBrightnessFactor(float par1) - { - return 0.6f; - } - - @Override - public ChunkCoordinates getEntrancePortalLocation() - { - return new ChunkCoordinates(0, 85, 0); - } -} diff --git a/src/main/java/fox/spiteful/avaritia/crafting/Grinder.java b/src/main/java/fox/spiteful/avaritia/crafting/Grinder.java index d66a195..ad43053 100644 --- a/src/main/java/fox/spiteful/avaritia/crafting/Grinder.java +++ b/src/main/java/fox/spiteful/avaritia/crafting/Grinder.java @@ -10,7 +10,6 @@ import net.minecraft.enchantment.Enchantment; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.CraftingManager; import net.minecraft.item.crafting.IRecipe; import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.ShapelessOreRecipe; @@ -50,9 +49,8 @@ public class Grinder { GameRegistry.addShapedRecipe(new ItemStack(LudicrousBlocks.resource_block, 1, 1), "CCC", "CCC", "CCC", 'C', new ItemStack(LudicrousItems.resource, 1, 6)); GameRegistry.addShapedRecipe(new ItemStack(LudicrousItems.resource, 9, 6), "C", 'C', new ItemStack(LudicrousBlocks.resource_block, 1, 1)); - //GameRegistry.addShapedRecipe(new ItemStack(LudicrousItems.resource, 13, 8), "CCC", "CIC", "CCC", 'C', new ItemStack(Blocks.coal_block, 1), 'I', new ItemStack(LudicrousItems.resource, 1, 1)); - //GameRegistry.addShapedRecipe(new ItemStack(LudicrousItems.resource, 1, 9), " I ", "ISI", " I ", 'I', new ItemStack(LudicrousItems.resource, 1, 4), 'S', new ItemStack(Items.stick)); - //GameRegistry.addShapedRecipe(new ItemStack(LudicrousBlocks.auto_dire_crafting), " R ", "NCN", "IFI", 'I', new ItemStack(LudicrousItems.resource, 1, 1), 'F', new ItemStack(Blocks.furnace), 'N', new ItemStack(LudicrousItems.resource, 1, 9), 'C', new ItemStack(LudicrousBlocks.dire_crafting), 'R', new ItemStack(LudicrousItems.singularity, 1, 3)); + GameRegistry.addShapedRecipe(new ItemStack(LudicrousItems.resource, 13, 8), "CCC", "CIC", "CCC", 'C', new ItemStack(Blocks.coal_block, 1), 'I', new ItemStack(LudicrousItems.resource, 1, 1)); + GameRegistry.addShapedRecipe(new ItemStack(LudicrousItems.resource, 1, 9), " I ", "ISI", " I ", 'I', new ItemStack(LudicrousItems.resource, 1, 4), 'S', new ItemStack(Items.stick)); ExtremeCraftingManager.getInstance().addRecipe(new ItemStack(LudicrousBlocks.neutron_collector, 1), "IIQQQQQII", diff --git a/src/main/java/fox/spiteful/avaritia/items/ItemMorvInABox.java b/src/main/java/fox/spiteful/avaritia/items/ItemMorvInABox.java index a6e259a..a6586de 100644 --- a/src/main/java/fox/spiteful/avaritia/items/ItemMorvInABox.java +++ b/src/main/java/fox/spiteful/avaritia/items/ItemMorvInABox.java @@ -6,7 +6,7 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import fox.spiteful.avaritia.Avaritia; -import fox.spiteful.avaritia.compat.botania.alfheim.TeleportHelper; +import fox.spiteful.avaritia.Lumberjack; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; @@ -45,21 +45,20 @@ public class ItemMorvInABox extends Item { @Override public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) { - /*//if (world.isRemote) { + /*if (world.isRemote) { Lumberjack.info("DESTROY SPACE"); WorldProvider p = world.provider;//DimensionManager.getProvider(0); Lumberjack.info(p); p.setSkyRenderer(new ApocalypseSkyRenderer()); p.setCloudRenderer(new ApocalypseCloudRenderer()); Lumberjack.info(p.getCloudRenderer()); - //}*/ - /*if (DimensionManager.getWorld(0) == world) { + } + if (DimensionManager.getWorld(0) == world) { player.travelToDimension(13); } else { player.travelToDimension(0); }*/ - TeleportHelper.travelToOrFromAlfheim(player); return stack; } diff --git a/src/main/java/fox/spiteful/avaritia/items/ItemResource.java b/src/main/java/fox/spiteful/avaritia/items/ItemResource.java index ac89290..552e874 100644 --- a/src/main/java/fox/spiteful/avaritia/items/ItemResource.java +++ b/src/main/java/fox/spiteful/avaritia/items/ItemResource.java @@ -17,7 +17,6 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.util.StatCollector; import net.minecraft.world.World; -import net.minecraftforge.oredict.OreDictionary; import java.util.List; diff --git a/src/main/java/fox/spiteful/avaritia/items/ItemSingularity.java b/src/main/java/fox/spiteful/avaritia/items/ItemSingularity.java index a7e1f06..2b48d51 100644 --- a/src/main/java/fox/spiteful/avaritia/items/ItemSingularity.java +++ b/src/main/java/fox/spiteful/avaritia/items/ItemSingularity.java @@ -83,7 +83,7 @@ public class ItemSingularity extends Item implements IHaloRenderItem { @Override public EnumRarity getRarity(ItemStack stack) { - if(stack.getItemDamage() == 10) + if(stack.getItemDamage() == 11) return LudicrousItems.cosmic; return EnumRarity.uncommon; } @@ -93,7 +93,7 @@ public class ItemSingularity extends Item implements IHaloRenderItem { public void addInformation(ItemStack item, EntityPlayer player, List tooltip, boolean wut) { int meta = item.getItemDamage(); - if (meta == 10) { + if (meta == 11) { //tooltip.add(EnumChatFormatting.DARK_GRAY +""+ EnumChatFormatting.ITALIC + StatCollector.translateToLocal("tooltip.claybalance.desc")); tooltip.add(LudicrousText.makeFabulous(StatCollector.translateToLocal("tooltip.claybalance.desc"))); } diff --git a/src/main/resources/assets/avaritia/textures/blocks/deadrock0.png b/src/main/resources/assets/avaritia/textures/blocks/deadrock0.png deleted file mode 100644 index 9e365fb..0000000 Binary files a/src/main/resources/assets/avaritia/textures/blocks/deadrock0.png and /dev/null differ diff --git a/src/main/resources/assets/avaritia/textures/blocks/deadrock1.png b/src/main/resources/assets/avaritia/textures/blocks/deadrock1.png deleted file mode 100644 index 644c7b9..0000000 Binary files a/src/main/resources/assets/avaritia/textures/blocks/deadrock1.png and /dev/null differ diff --git a/src/main/resources/assets/avaritia/textures/blocks/deadrock2.png b/src/main/resources/assets/avaritia/textures/blocks/deadrock2.png deleted file mode 100644 index ee98107..0000000 Binary files a/src/main/resources/assets/avaritia/textures/blocks/deadrock2.png and /dev/null differ diff --git a/src/main/resources/assets/avaritia/textures/blocks/deadrock3.png b/src/main/resources/assets/avaritia/textures/blocks/deadrock3.png deleted file mode 100644 index 2a30a60..0000000 Binary files a/src/main/resources/assets/avaritia/textures/blocks/deadrock3.png and /dev/null differ diff --git a/src/main/resources/assets/avaritia/textures/blocks/deadrock4.png b/src/main/resources/assets/avaritia/textures/blocks/deadrock4.png deleted file mode 100644 index 5c59eff..0000000 Binary files a/src/main/resources/assets/avaritia/textures/blocks/deadrock4.png and /dev/null differ diff --git a/src/main/resources/assets/avaritia/textures/blocks/dire_autocrafting_side.png b/src/main/resources/assets/avaritia/textures/blocks/dire_autocrafting_side.png deleted file mode 100644 index 0920e9c..0000000 Binary files a/src/main/resources/assets/avaritia/textures/blocks/dire_autocrafting_side.png and /dev/null differ diff --git a/src/main/resources/assets/avaritia/textures/blocks/dire_autocrafting_side.png.mcmeta b/src/main/resources/assets/avaritia/textures/blocks/dire_autocrafting_side.png.mcmeta deleted file mode 100644 index 3c85b20..0000000 --- a/src/main/resources/assets/avaritia/textures/blocks/dire_autocrafting_side.png.mcmeta +++ /dev/null @@ -1,35 +0,0 @@ -{ - "animation": { - "frametime": 1, - "frames": [ - 0, - 0, - 0, - 1, - 1, - 1, - 2, - 2, - 2, - 3, - 3, - 4, - 4, - 5, - 6, - 7, - 6, - 5, - 4, - 4, - 3, - 3, - 2, - 2, - 2, - 1, - 1, - 1 - ] - } - } diff --git a/src/main/resources/assets/avaritia/textures/blocks/dire_autocrafting_top.png b/src/main/resources/assets/avaritia/textures/blocks/dire_autocrafting_top.png deleted file mode 100644 index ded1d03..0000000 Binary files a/src/main/resources/assets/avaritia/textures/blocks/dire_autocrafting_top.png and /dev/null differ diff --git a/src/main/resources/assets/avaritia/textures/blocks/dire_autocrafting_top.png.mcmeta b/src/main/resources/assets/avaritia/textures/blocks/dire_autocrafting_top.png.mcmeta deleted file mode 100644 index 335fc10..0000000 --- a/src/main/resources/assets/avaritia/textures/blocks/dire_autocrafting_top.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation": { - "frametime": 2 - } - } diff --git a/src/main/resources/assets/avaritia/textures/gui/dire_autocrafting_gui.png b/src/main/resources/assets/avaritia/textures/gui/dire_autocrafting_gui.png deleted file mode 100644 index e1bc43b..0000000 Binary files a/src/main/resources/assets/avaritia/textures/gui/dire_autocrafting_gui.png and /dev/null differ