v1.3 bug fixes!

Completely not worth having it all in a bunch however I was in a rush to
get this done so apologies for not separating the commits
This commit is contained in:
Kino 2017-01-19 23:43:34 -05:00
parent 86fbcc5e52
commit fe9e09917f
79 changed files with 307 additions and 352 deletions

View file

@ -16,7 +16,7 @@ import com.legacy.aether.server.tile_entities.TileEntityEnchanter;
public class GuiEnchanter extends GuiContainer
{
private static final ResourceLocation TEXTURE = new ResourceLocation("aether_legacy", "textures/gui/enchanter.png");
private static final ResourceLocation TEXTURE = new ResourceLocation("aether_legacy", "textures/gui/altar.png");
private TileEntityEnchanter enchanter;
@ -29,7 +29,7 @@ public class GuiEnchanter extends GuiContainer
@Override
protected void drawGuiContainerForegroundLayer(int par1, int par2)
{
String enchanterName = "Enchanter";
String enchanterName = "Altar";
this.fontRendererObj.drawString(enchanterName, this.xSize / 2 - this.fontRendererObj.getStringWidth(enchanterName) / 2, 6, 4210752);
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);

View file

@ -9,6 +9,7 @@ import net.minecraft.item.Item;
import net.minecraft.util.ResourceLocation;
import com.legacy.aether.client.renders.AetherEntityRenderingRegistry;
import com.legacy.aether.client.renders.items.util.AetherColor;
import com.legacy.aether.server.Aether;
import com.legacy.aether.server.blocks.BlocksAether;
import com.legacy.aether.server.blocks.util.EnumCloudType;
@ -133,6 +134,8 @@ public class BlockRendering
registerMetadata(BlocksAether.locked_dungeon_block, Aether.locate("carved_stone"), Aether.locate("sentry_stone"), Aether.locate("angelic_stone"), Aether.locate("light_angelic_stone"), Aether.locate("hellfire_stone"), Aether.locate("light_hellfire_stone"));
registerMetadata(BlocksAether.dungeon_trap, Aether.locate("carved_stone"), Aether.locate("sentry_stone"), Aether.locate("angelic_stone"), Aether.locate("light_angelic_stone"), Aether.locate("hellfire_stone"), Aether.locate("light_hellfire_stone"));
registerColor(BlocksAether.aercloud);
AetherEntityRenderingRegistry.registerTileEntities();
}
@ -151,6 +154,12 @@ public class BlockRendering
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(block), meta, new ModelResourceLocation(Aether.modAddress() + model, "inventory"));
}
public static void registerColor(Block item)
{
Minecraft.getMinecraft().getBlockColors().registerBlockColorHandler(new AetherColor(Item.getItemFromBlock(item)), item);
Minecraft.getMinecraft().getItemColors().registerItemColorHandler(new AetherColor(Item.getItemFromBlock(item)), item);
}
public static void registerMetadata(Block block, ResourceLocation... model)
{
ModelBakery.registerItemVariants(Item.getItemFromBlock(block), model);

View file

@ -22,7 +22,7 @@ public class SliderRenderer extends RenderLiving<EntitySlider>
public SliderRenderer(RenderManager renderManager)
{
super(renderManager, new SliderModel(0.0F, 12.0F), 1.5F);
this.addLayer(new SliderLayer());
this.addLayer(new SliderLayer((SliderModel) this.mainModel));
}
@Override

View file

@ -1,13 +1,13 @@
package com.legacy.aether.client.renders.entities.layer;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.entity.layers.LayerRenderer;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import com.legacy.aether.client.models.entities.SliderModel;
import com.legacy.aether.server.entities.bosses.slider.EntitySlider;
public class SliderLayer implements LayerRenderer<EntitySlider>
@ -17,8 +17,17 @@ public class SliderLayer implements LayerRenderer<EntitySlider>
private static final ResourceLocation TEXTURE_GLOW_RED = new ResourceLocation("aether_legacy", "textures/bosses/slider/slider_awake_critical_glow.png");
private final SliderModel model;
public SliderLayer(SliderModel model)
{
super();
this.model = model;
}
@Override
public void doRenderLayer(EntitySlider slider, float x, float y, float z, float p_177141_5_, float p_177141_6_, float p_177141_7_, float yaw)
public void doRenderLayer(EntitySlider slider, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{
RenderManager renderManager = Minecraft.getMinecraft().getRenderManager();
@ -33,16 +42,31 @@ public class SliderLayer implements LayerRenderer<EntitySlider>
renderManager.renderEngine.bindTexture(TEXTURE_GLOW);
}
float f1 = 1.0F;
GlStateManager.enableBlend();
GlStateManager.disableAlpha();
GlStateManager.blendFunc(GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ONE);
GL11.glEnable(GL11.GL_BLEND);
if (slider.isInvisible())
{
GlStateManager.depthMask(false);
}
else
{
GlStateManager.depthMask(true);
}
int j = 61680;
int k = j % 0x10000;
int l = j / 0x10000;
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) k / 1.0F, (float) l / 1.0F);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GL11.glColor4f(1.0F, 1.0F, 1.0F, f1);
int i = 61680;
int j = i % 65536;
int k = i / 65536;
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j, (float)k);
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
this.model.render(slider, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale);
i = slider.getBrightnessForRender(partialTicks);
j = i % 65536;
k = i / 65536;
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j, (float)k);
GlStateManager.disableBlend();
GlStateManager.enableAlpha();
}
}

View file

@ -45,9 +45,6 @@ public class ItemRendering
register(ItemsAether.valkyrie_pickaxe, "valkyrie_pickaxe");
register(ItemsAether.valkyrie_axe, "valkyrie_axe");
register(ItemsAether.valkyrie_shovel, "valkyrie_shovel");
register(ItemsAether.phoenix_pickaxe, "phoenix_pickaxe");
register(ItemsAether.phoenix_axe, "phoenix_axe");
register(ItemsAether.phoenix_shovel, "phoenix_shovel");
register(ItemsAether.zanite_helmet, "zanite_helmet");
registerColor(ItemsAether.zanite_helmet);
@ -222,7 +219,7 @@ public class ItemRendering
register(ItemsAether.victory_medal, "victory_medal");
register(ItemsAether.cloud_staff, "cloud_staff");
register(ItemsAether.zanite_staff, "zanite_staff");
register(ItemsAether.nature_staff, "nature_staff");
register(ItemsAether.lightning_knife, "lightning_knife");
register(ItemsAether.valkyrie_lance, "valkyrie_lance");
@ -237,8 +234,6 @@ public class ItemRendering
register(ItemsAether.cloud_parachute, "cold_parachute");
register(ItemsAether.golden_parachute, "golden_parachute");
register(ItemsAether.aerwhale_egg, "aerwhale_egg");
register(ItemsAether.jeb_hammer, "jeb_hammer");
register(ItemsAether.lore_book, "lore_book");
registerDefinition(ItemsAether.phoenix_bow, new PhoenixBowDefinition());
@ -279,7 +274,7 @@ public class ItemRendering
}
registerMeta(ItemsAether.gummy_swet, Aether.locate("blue_gummy_swet"), Aether.locate("golden_gummy_swet"));
registerMeta(ItemsAether.dungeon_key, Aether.locate("bronze_key"), Aether.locate("silver_key"), Aether.locate("golden_key"), Aether.locate("platinum_key"));
registerMeta(ItemsAether.dungeon_key, Aether.locate("bronze_key"), Aether.locate("silver_key"), Aether.locate("golden_key"));
registerMeta(ItemsAether.skyroot_bucket, Aether.locate("skyroot_bucket"), Aether.locate("skyroot_water_bucket"), Aether.locate("skyroot_poison_bucket"), Aether.locate("skyroot_remedy_bucket"));
registerMeta(ItemsAether.dart_shooter, Aether.locate("golden_dart_shooter"), Aether.locate("poison_dart_shooter"), Aether.locate("enchanted_dart_shooter"));
registerMeta(ItemsAether.dart, Aether.locate("golden_dart"), Aether.locate("poison_dart"), Aether.locate("enchanted_dart"));

View file

@ -1,14 +1,20 @@
package com.legacy.aether.client.renders.items.util;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.renderer.color.IBlockColor;
import net.minecraft.client.renderer.color.IItemColor;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import com.legacy.aether.server.blocks.BlocksAether;
import com.legacy.aether.server.blocks.natural.BlockAercloud;
import com.legacy.aether.server.items.ItemMoaEgg;
import com.legacy.aether.server.items.accessories.ItemAccessory;
import com.legacy.aether.server.items.armor.ItemAetherArmor;
public class AetherColor implements IItemColor
public class AetherColor implements IItemColor, IBlockColor
{
private Item item;
@ -36,6 +42,22 @@ public class AetherColor implements IItemColor
return ((ItemMoaEgg)stack.getItem()).getColorFromItemStack(stack, 0);
}
if (this.item == Item.getItemFromBlock(BlocksAether.aercloud))
{
return BlockAercloud.getHexColor(stack);
}
return 0;
}
@Override
public int colorMultiplier(IBlockState state, IBlockAccess worldIn, BlockPos pos, int tintIndex)
{
if (this.item == Item.getItemFromBlock(BlocksAether.aercloud))
{
return BlockAercloud.getHexColor(new ItemStack(state.getBlock(), 1, state.getBlock().getMetaFromState(state)));
}
return 0;
}

View file

@ -109,7 +109,7 @@ public class BlocksAether
aether_dirt = register("aether_dirt", new BlockAetherDirt());
holystone = register("holystone", new BlockHolystone());
mossy_holystone = register("mossy_holystone", new BlockHolystone());
holystone_brick = register("holystone_brick", new Block(Material.ROCK).setHardness(2.0F).setResistance(10.0F));
holystone_brick = register("holystone_brick", new Block(Material.ROCK).setHardness(0.5F).setResistance(10.0F));
aercloud = registerMeta("aercloud", new BlockAercloud());
quicksoil = register("quicksoil", new BlockQuicksoil());
icestone = register("icestone", new BlockIcestone());
@ -173,12 +173,12 @@ public class BlocksAether
holystone_brick_double_slab = register("holystone_brick_double_slab", new BlockAetherSlab("holystone_brick_double_slab", true, Material.ROCK).setHardness(2.0F).setResistance(10.0F)).setCreativeTab(null);
skyroot_slab = registerSlab("skyroot_slab", new BlockAetherSlab("skyroot_slab", false, Material.WOOD).setHardness(2.0F).setResistance(5.0F), skyroot_double_slab);
carved_slab = registerSlab("carved_slab", new BlockAetherSlab("carved_slab", false, Material.ROCK).setHardness(2.0F).setResistance(10.0F), carved_double_slab);
angelic_slab = registerSlab("angelic_slab", new BlockAetherSlab("angelic_slab", false, Material.ROCK).setHardness(2.0F).setResistance(10.0F), angelic_double_slab);
hellfire_slab = registerSlab("hellfire_slab", new BlockAetherSlab("hellfire_slab", false, Material.ROCK).setHardness(2.0F).setResistance(10.0F), hellfire_double_slab);
holystone_slab = registerSlab("holystone_slab", new BlockAetherSlab("holystone_slab", false, Material.ROCK).setHardness(2.0F).setResistance(10.0F), holystone_double_slab);
mossy_holystone_slab = registerSlab("mossy_holystone_slab", new BlockAetherSlab("mossy_holystone_slab", false, Material.ROCK).setHardness(2.0F).setResistance(10.0F), mossy_holystone_double_slab);
holystone_brick_slab = registerSlab("holystone_brick_slab", new BlockAetherSlab("holystone_brick_slab", false, Material.ROCK).setHardness(2.0F).setResistance(10.0F), holystone_brick_double_slab);
carved_slab = registerSlab("carved_slab", new BlockAetherSlab("carved_slab", false, Material.ROCK).setHardness(0.5F).setResistance(10.0F), carved_double_slab);
angelic_slab = registerSlab("angelic_slab", new BlockAetherSlab("angelic_slab", false, Material.ROCK).setHardness(0.5F).setResistance(10.0F), angelic_double_slab);
hellfire_slab = registerSlab("hellfire_slab", new BlockAetherSlab("hellfire_slab", false, Material.ROCK).setHardness(0.5F).setResistance(10.0F), hellfire_double_slab);
holystone_slab = registerSlab("holystone_slab", new BlockAetherSlab("holystone_slab", false, Material.ROCK).setHardness(0.5F).setResistance(10.0F), holystone_double_slab);
mossy_holystone_slab = registerSlab("mossy_holystone_slab", new BlockAetherSlab("mossy_holystone_slab", false, Material.ROCK).setHardness(0.5F).setResistance(10.0F), mossy_holystone_double_slab);
holystone_brick_slab = registerSlab("holystone_brick_slab", new BlockAetherSlab("holystone_brick_slab", false, Material.ROCK).setHardness(0.5F).setResistance(10.0F), holystone_brick_double_slab);
}
public static Block registerSlab(String name, Block slab1, Block slab2)

View file

@ -29,6 +29,8 @@ public class BlockFreezer extends BlockContainer
public BlockFreezer()
{
super(Material.ROCK);
this.setHardness(2.5F);
}
@Override

View file

@ -19,8 +19,8 @@ public class BlockQuicksoilGlass extends BlockBreakable
this.slipperiness = 1.1F;
this.setLightLevel(0.7375F);
this.setHardness(0.3F);
this.setLightOpacity(1);
this.setHardness(0.2F);
this.setLightOpacity(0);
this.setSoundType(SoundType.GLASS);
}

View file

@ -10,7 +10,7 @@ public class BlockZanite extends Block
public BlockZanite()
{
super(Material.IRON);
this.setHardness(5F);
this.setHardness(3F);
this.setSoundType(SoundType.METAL);
}

View file

@ -35,7 +35,7 @@ public class BlockDungeonBase extends Block implements IAetherMeta
super(Material.ROCK);
this.setSoundType(SoundType.STONE);
this.setHardness(isLocked ? -1F : 2F);
this.setHardness(isLocked ? -1F : 0.5F);
this.setCreativeTab(isLocked ? null : AetherCreativeTabs.blocks);
this.setDefaultState(this.getDefaultState().withProperty(dungeon_stone, EnumStoneType.Carved));
}

View file

@ -23,6 +23,8 @@ public class BlockMimicChest extends BlockChest
public BlockMimicChest()
{
super(BlockChest.Type.BASIC);
this.setHardness(2.0F);
}
@Override

View file

@ -11,7 +11,7 @@ public class BlockPillar extends Block
{
super(Material.ROCK);
this.setSoundType(SoundType.METAL);
this.setHardness(2.0F);
this.setHardness(0.5F);
}
}

View file

@ -40,12 +40,27 @@ public class BlockAercloud extends Block implements IAetherMeta
super(Material.ICE);
this.setHardness(0.2F);
this.setLightOpacity(3);
this.setTickRandomly(true);
this.setSoundType(SoundType.CLOTH);
this.setCreativeTab(AetherCreativeTabs.blocks);
this.setDefaultState(this.blockState.getBaseState().withProperty(cloud_type, EnumCloudType.Cold));
}
public static int getHexColor(ItemStack stack)
{
if (stack.getMetadata() == 1)
{
return 0xCCFFFF;
}
else if (stack.getMetadata() == 2)
{
return 0xFFFF80;
}
return 16777215; //Default color
}
@Override
public void onEntityCollidedWithBlock(World world, BlockPos pos, IBlockState state, Entity entity)
{

View file

@ -27,7 +27,7 @@ public class BlockAetherDirt extends Block
{
super(Material.GROUND);
this.setHardness(0.5F);
this.setHardness(0.2F);
this.setSoundType(SoundType.GROUND);
this.setCreativeTab(AetherCreativeTabs.blocks);
this.setDefaultState(this.getDefaultState().withProperty(double_drop, Boolean.TRUE));

View file

@ -35,7 +35,7 @@ public class BlockAetherGrass extends Block
super(Material.GRASS);
this.setTickRandomly(true);
this.setHardness(0.6F);
this.setHardness(0.2F);
this.setCreativeTab(AetherCreativeTabs.blocks);
this.setSoundType(SoundType.PLANT);
this.setDefaultState(this.getDefaultState().withProperty(double_drop, Boolean.TRUE));

View file

@ -39,6 +39,8 @@ public class BlockAetherLeaves extends BlockLeaves implements IAetherMeta
{
super();
this.setHardness(0.2F);
this.setLightOpacity(1);
this.setCreativeTab(AetherCreativeTabs.blocks);
this.setDefaultState(this.getDefaultState().withProperty(leaf_type, EnumLeafType.Green).withProperty(CHECK_DECAY, Boolean.valueOf(true)).withProperty(DECAYABLE, Boolean.valueOf(true)));
}

View file

@ -2,9 +2,8 @@ package com.legacy.aether.server.blocks.natural;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.block.BlockLog;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.properties.PropertyBool;
import net.minecraft.block.properties.PropertyEnum;
@ -20,6 +19,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.stats.StatList;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.Rotation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
@ -30,6 +30,7 @@ import com.legacy.aether.server.Aether;
import com.legacy.aether.server.blocks.BlocksAether;
import com.legacy.aether.server.blocks.util.EnumLogType;
import com.legacy.aether.server.blocks.util.IAetherMeta;
import com.legacy.aether.server.items.ItemsAether;
import com.legacy.aether.server.items.tools.ItemAetherTool;
import com.legacy.aether.server.items.tools.ItemGravititeTool;
import com.legacy.aether.server.items.tools.ItemSkyrootTool;
@ -37,7 +38,7 @@ import com.legacy.aether.server.items.tools.ItemValkyrieTool;
import com.legacy.aether.server.items.util.EnumAetherToolType;
import com.legacy.aether.server.registry.creative_tabs.AetherCreativeTabs;
public class BlockAetherLog extends Block implements IAetherMeta
public class BlockAetherLog extends BlockLog implements IAetherMeta
{
public static final PropertyEnum<EnumLogType> wood_type = PropertyEnum.create("aether_logs", EnumLogType.class);
@ -46,7 +47,7 @@ public class BlockAetherLog extends Block implements IAetherMeta
public BlockAetherLog()
{
super(Material.WOOD);
super();
this.setHardness(2.0F);
this.setSoundType(SoundType.WOOD);
this.setCreativeTab(AetherCreativeTabs.blocks);
@ -56,7 +57,7 @@ public class BlockAetherLog extends Block implements IAetherMeta
@Override
public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer)
{
return super.onBlockPlaced(worldIn, pos, facing, hitX, hitY, hitZ, meta, placer).withProperty(wood_type, EnumLogType.getType(meta)).withProperty(double_drop, Boolean.FALSE);
return this.getStateFromMeta(meta).withProperty(wood_type, EnumLogType.getType(meta)).withProperty(double_drop, Boolean.FALSE);
}
@Override
@ -69,32 +70,35 @@ public class BlockAetherLog extends Block implements IAetherMeta
ItemStack stack = player.inventory.getCurrentItem();
IBlockState defaults = BlocksAether.aether_log.getDefaultState().withProperty(wood_type, EnumLogType.Skyroot);
IBlockState defaults = BlocksAether.aether_log.getDefaultState().withProperty(wood_type, EnumLogType.Skyroot).withProperty(double_drop, Boolean.FALSE);
if (stack != null && stack.getItem() instanceof ItemAetherTool && ((ItemAetherTool)stack.getItem()).toolType == EnumAetherToolType.AXE)
{
if (stack.getItem() instanceof ItemGravititeTool || stack.getItem() instanceof ItemValkyrieTool)
{
state.getBlock().dropBlockAsItem(player.worldObj, pos, state, EnchantmentHelper.getEnchantmentLevel(Enchantments.FORTUNE, player.getHeldItemMainhand()));
spawnAsEntity(worldIn, pos, new ItemStack(ItemsAether.golden_amber, 1 + RANDOM.nextInt(2)));
defaults.getBlock().dropBlockAsItem(worldIn, pos, defaults, EnchantmentHelper.getEnchantmentLevel(Enchantments.FORTUNE, player.getHeldItemMainhand()));
}
else if (stack.getItem() instanceof ItemSkyrootTool)
{
for (int i = 0; i < size; ++i)
{
spawnAsEntity(worldIn, pos, new ItemStack(defaults.getBlock()));
defaults.getBlock().dropBlockAsItem(worldIn, pos, defaults, EnchantmentHelper.getEnchantmentLevel(Enchantments.FORTUNE, player.getHeldItemMainhand()));
}
}
else
{
spawnAsEntity(worldIn, pos, new ItemStack(defaults.getBlock()));
defaults.getBlock().dropBlockAsItem(worldIn, pos, defaults, EnchantmentHelper.getEnchantmentLevel(Enchantments.FORTUNE, player.getHeldItemMainhand()));
}
}
else
{
spawnAsEntity(worldIn, pos, new ItemStack(defaults.getBlock()));
}
}
@Override
public IBlockState withRotation(IBlockState state, Rotation rot)
{
return state;
}
@Override
public String getMetaName(ItemStack stack)
{

View file

@ -76,7 +76,7 @@ public class BlockBerryBush extends BlockAetherFlower
if (randomNum != 0)
{
spawnAsEntity(world, entityplayer.getPosition(), new ItemStack(ItemsAether.blue_berry, randomNum, 0));
spawnAsEntity(world, pos.up(), new ItemStack(ItemsAether.blue_berry, randomNum, 0));
}
world.setBlockState(pos, BlocksAether.berry_bush_stem.getDefaultState());

View file

@ -43,7 +43,7 @@ public class BlockBerryBushStem extends BlockAetherFlower
@Override
public AxisAlignedBB getCollisionBoundingBox(IBlockState state, World world, BlockPos pos)
{
return this.FLOWER_AABB;
return null;
}
@Override

View file

@ -40,6 +40,8 @@ public class BlockCrystalLeaves extends BlockLeaves implements IAetherMeta
{
super();
this.setHardness(0.2F);
this.setLightOpacity(1);
this.setCreativeTab(AetherCreativeTabs.blocks);
this.setDefaultState(this.getDefaultState().withProperty(leaf_type, EnumCrystalType.Crystal).withProperty(CHECK_DECAY, Boolean.valueOf(true)).withProperty(DECAYABLE, Boolean.valueOf(true)));
}

View file

@ -39,6 +39,8 @@ public class BlockHolidayLeaves extends BlockLeaves implements IAetherMeta
{
super();
this.setHardness(0.2F);
this.setLightOpacity(1);
this.setCreativeTab(AetherCreativeTabs.blocks);
this.setDefaultState(this.getDefaultState().withProperty(leaf_type, EnumHolidayType.Holiday_Leaves).withProperty(CHECK_DECAY, Boolean.valueOf(true)).withProperty(DECAYABLE, Boolean.valueOf(true)));
}

View file

@ -27,7 +27,7 @@ public class BlockHolystone extends Block
{
super(Material.ROCK);
this.setHardness(2.0F);
this.setHardness(0.5F);
this.setSoundType(SoundType.STONE);
this.setCreativeTab(AetherCreativeTabs.blocks);
this.setDefaultState(this.getDefaultState().withProperty(double_drop, Boolean.TRUE));

View file

@ -20,7 +20,7 @@ public class BlockEnchantedAetherGrass extends Block
{
super(Material.GRASS);
this.setHardness(0.6F);
this.setHardness(0.2F);
this.setTickRandomly(true);
this.setSoundType(SoundType.PLANT);
}

View file

@ -12,7 +12,7 @@ public class BlockGravititeOre extends BlockFloating
{
super(Material.ROCK, false);
this.setHardness(3F);
this.setHardness(5F);
this.setSoundType(SoundType.STONE);
}

View file

@ -15,10 +15,12 @@ import net.minecraft.util.EnumFacing;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.fml.client.FMLClientHandler;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import com.google.common.cache.LoadingCache;
import com.legacy.aether.server.entities.particles.EntityBlueFX;
public class BlockAetherPortal extends BlockPortal
{
@ -92,11 +94,36 @@ public class BlockAetherPortal extends BlockPortal
@Override
@SideOnly(Side.CLIENT)
public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random random)
public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random rand)
{
if (random.nextInt(100) == 0)
if (rand.nextInt(100) == 0)
{
world.playSound((double)pos.getX() + 0.5D, (double)pos.getY() + 0.5D, (double)pos.getZ() + 0.5D, SoundEvents.BLOCK_PORTAL_AMBIENT, SoundCategory.BLOCKS, 0.5F, random.nextFloat() * 0.4F + 0.8F, false);
world.playSound((double)pos.getX() + 0.5D, (double)pos.getY() + 0.5D, (double)pos.getZ() + 0.5D, SoundEvents.BLOCK_PORTAL_AMBIENT, SoundCategory.BLOCKS, 0.5F, rand.nextFloat() * 0.4F + 0.8F, false);
}
for (int i = 0; i < 4; ++i)
{
double d0 = (double)((float)pos.getX() + rand.nextFloat());
double d1 = (double)((float)pos.getY() + rand.nextFloat());
double d2 = (double)((float)pos.getZ() + rand.nextFloat());
double d3 = ((double)rand.nextFloat() - 0.5D) * 0.5D;
double d4 = ((double)rand.nextFloat() - 0.5D) * 0.5D;
double d5 = ((double)rand.nextFloat() - 0.5D) * 0.5D;
int j = rand.nextInt(2) * 2 - 1;
if (world.getBlockState(pos.west()).getBlock() != this && world.getBlockState(pos.east()).getBlock() != this)
{
d0 = (double)pos.getX() + 0.5D + 0.25D * (double)j;
d3 = (double)(rand.nextFloat() * 2.0F * (float)j);
}
else
{
d2 = (double)pos.getZ() + 0.5D + 0.25D * (double)j;
d5 = (double)(rand.nextFloat() * 2.0F * (float)j);
}
EntityBlueFX particle = new EntityBlueFX(world, d0, d1, d2, d3, d4, d5);
FMLClientHandler.instance().getClient().effectRenderer.addEffect(particle);
}
}

View file

@ -64,11 +64,11 @@ public class ZephyrAIShootTarget extends EntityAIBase
if(this.attackCounter == 10)
{
this.zephyr.playSound(SoundsAether.zephyr_call, this.base, this.base);
this.zephyr.playSound(SoundsAether.zephyr_call, 3F, this.base);
}
else if(this.attackCounter == 20)
{
this.zephyr.playSound(SoundsAether.zephyr_shoot, this.base, this.base);
this.zephyr.playSound(SoundsAether.zephyr_shoot, 3F, this.base);
EntityZephyrSnowball projectile = new EntityZephyrSnowball(this.worldObj, this.zephyr, x, y, z);
Vec3d lookVector = this.zephyr.getLook(1.0F);

View file

@ -40,6 +40,7 @@ import com.legacy.aether.server.items.tools.ItemAetherTool;
import com.legacy.aether.server.items.util.EnumAetherToolType;
import com.legacy.aether.server.player.PlayerAether;
import com.legacy.aether.server.registry.achievements.AchievementsAether;
import com.legacy.aether.server.registry.sounds.SoundsAether;
public class EntitySlider extends EntityFlying
{
@ -238,6 +239,7 @@ public class EntitySlider extends EntityFlying
if(this.crushedBlock)
{
this.worldObj.playSound(null, posX, posY, posZ, SoundEvents.ENTITY_GENERIC_EXPLODE, SoundCategory.HOSTILE, 3F, (0.625F + (this.worldObj.rand.nextFloat() - this.worldObj.rand.nextFloat()) * 0.2F) * 0.7F);
this.worldObj.playSound(null, posX, posY, posZ, SoundsAether.slider_collide, SoundCategory.HOSTILE, 2.5F, 1.0F / (this.rand.nextFloat() * 0.2F + 0.9F));
}
this.stop();
@ -364,6 +366,7 @@ public class EntitySlider extends EntityFlying
}
}
this.worldObj.playSound(null, posX, posY, posZ, SoundsAether.slider_move, SoundCategory.HOSTILE, 2.5F, 1.0F / (this.rand.nextFloat() * 0.2F + 0.9F));
this.isMoving = true;
}
}
@ -415,6 +418,7 @@ public class EntitySlider extends EntityFlying
{
EntityLivingBase collidedEntity = (EntityLivingBase)entity;
collidedEntity.addVelocity(collidedEntity.motionY, 0.35D, collidedEntity.motionZ);
this.worldObj.playSound(null, posX, posY, posZ, SoundsAether.slider_collide, SoundCategory.HOSTILE, 2.5F, 1.0F / (this.rand.nextFloat() * 0.2F + 0.9F));
this.stop();
}
@ -512,11 +516,13 @@ public class EntitySlider extends EntityFlying
this.worldObj.setBlockState(new BlockPos(dungeonX + 8, dungeonY + 1, dungeonZ + 8), state.withProperty(BlockTrapDoor.FACING, EnumFacing.NORTH), 2);
PlayerAether.get(player).setCurrentBoss(null);
player.addStat(AchievementsAether.defeat_bronze);
this.worldObj.playSound(null, posX, posY, posZ, SoundsAether.slider_death, SoundCategory.HOSTILE, 2.5F, 1.0F / (this.rand.nextFloat() * 0.2F + 0.9F));
this.isDead = true;
}
if(!this.isAwake())
{
this.worldObj.playSound(null, posX, posY, posZ, SoundsAether.slider_awaken, SoundCategory.HOSTILE, 2.5F, 1.0F / (this.rand.nextFloat() * 0.2F + 0.9F));
this.setAttackTarget(player);
int x = this.dungeonX + 15;

View file

@ -2,6 +2,7 @@ package com.legacy.aether.server.entities.passive;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.entity.EntityAgeable;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.EntityAILookIdle;
@ -21,7 +22,9 @@ import net.minecraft.network.datasync.DataParameter;
import net.minecraft.network.datasync.DataSerializers;
import net.minecraft.network.datasync.EntityDataManager;
import net.minecraft.util.EnumHand;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.SoundEvent;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
@ -151,6 +154,12 @@ public class EntitySheepuff extends EntityAetherAnimal
++this.amountEaten;
}
@Override
protected void playStepSound(BlockPos pos, Block par4)
{
this.worldObj.playSound((EntityPlayer) null, this.posX, this.posY, this.posZ, SoundEvents.ENTITY_SHEEP_STEP, SoundCategory.NEUTRAL, 0.15F, 1.0F);
}
public boolean processInteract(EntityPlayer player, EnumHand hand, ItemStack stack)
{
ItemStack itemstack = player.inventory.getCurrentItem();

View file

@ -52,6 +52,7 @@ public class EntityFlyingCow extends EntitySaddleMount
this.jumpsRemaining = 0;
this.stepHeight = 1.0F;
this.ignoreFrustumCheck = true;
this.canJumpMidAir = true;
this.setSize(0.9F, 1.3F);
}

View file

@ -342,7 +342,7 @@ public class EntityMoa extends EntitySaddleMount
{
if (!player.capabilities.isCreativeMode)
{
--player.getActiveItemStack().stackSize;
--stack.stackSize;
}
this.increaseAmountFed(1);
@ -358,7 +358,7 @@ public class EntityMoa extends EntitySaddleMount
}
}
if (currentItem == ItemsAether.zanite_staff)
if (currentItem == ItemsAether.nature_staff)
{
stack.damageItem(2, player);

View file

@ -108,8 +108,8 @@ public class EntitySwet extends EntityMountable
if (j < list.size())
{
Entity entity = (Entity) list.get(j);
if (!(entity instanceof EntitySwet))
if (entity instanceof EntityLivingBase && !(entity instanceof EntitySwet))
this.capturePrey(entity);
}
}
@ -682,7 +682,7 @@ public class EntitySwet extends EntityMountable
@Override
protected void dropFewItems(boolean var1, int var2)
{
ItemStack droppedItem = new ItemStack(this.getType() == 0 ? BlocksAether.aercloud : Blocks.GLOWSTONE, 1, this.getType() == 0 ? 1 : 0);
ItemStack droppedItem = new ItemStack(this.getType() == 1 ? BlocksAether.aercloud : Blocks.GLOWSTONE, 1, this.getType() == 1 ? 1 : 0);
this.entityDropItem(droppedItem, 0F);
}

View file

@ -64,7 +64,7 @@ public class EntityZephyrSnowball extends Entity implements IThrowableEntity
this.setDead();
}
if (this.ticksInAir > 200 && !this.worldObj.isRemote)
if (this.ticksInAir > 600 && !this.worldObj.isRemote)
{
this.setDead();
}

View file

@ -1,44 +0,0 @@
package com.legacy.aether.server.items;
import com.legacy.aether.server.entities.passive.EntityAerwhale;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumActionResult;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
public class ItemAerwhaleEgg extends Item
{
public ItemAerwhaleEgg()
{
super();
this.setCreativeTab(null);
}
@Override
public EnumActionResult onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ)
{
if (!playerIn.capabilities.isCreativeMode)
{
--stack.stackSize;
}
EntityAerwhale aerwhale = new EntityAerwhale(worldIn);
aerwhale.moveToBlockPosAndAngles(pos.up(10), 1.0F, 1.0F);
if (!worldIn.isRemote)
{
worldIn.spawnEntityInWorld(aerwhale);
}
return EnumActionResult.SUCCESS;
}
}

View file

@ -19,11 +19,10 @@ import com.legacy.aether.server.items.food.ItemGummySwet;
import com.legacy.aether.server.items.food.ItemLifeShard;
import com.legacy.aether.server.items.food.ItemWhiteApple;
import com.legacy.aether.server.items.staffs.ItemCloudStaff;
import com.legacy.aether.server.items.staffs.ItemNeptuneStaff;
import com.legacy.aether.server.items.staffs.ItemNatureStaff;
import com.legacy.aether.server.items.tools.ItemAetherParachute;
import com.legacy.aether.server.items.tools.ItemGravititeTool;
import com.legacy.aether.server.items.tools.ItemHolystoneTool;
import com.legacy.aether.server.items.tools.ItemPhoenixTool;
import com.legacy.aether.server.items.tools.ItemSkyrootBucket;
import com.legacy.aether.server.items.tools.ItemSkyrootTool;
import com.legacy.aether.server.items.tools.ItemValkyrieTool;
@ -34,7 +33,6 @@ import com.legacy.aether.server.items.weapons.ItemCandyCaneSword;
import com.legacy.aether.server.items.weapons.ItemElementalSword;
import com.legacy.aether.server.items.weapons.ItemGravititeSword;
import com.legacy.aether.server.items.weapons.ItemHolystoneSword;
import com.legacy.aether.server.items.weapons.ItemJebHammer;
import com.legacy.aether.server.items.weapons.ItemLightningKnife;
import com.legacy.aether.server.items.weapons.ItemNotchHammer;
import com.legacy.aether.server.items.weapons.ItemPigSlayer;
@ -59,8 +57,6 @@ public class ItemsAether
public static Item zanite_pickaxe, zanite_axe, zanite_shovel, zanite_sword;
public static Item phoenix_pickaxe, phoenix_axe, phoenix_shovel;
public static Item gravitite_pickaxe, gravitite_axe, gravitite_shovel, gravitite_sword;
public static Item valkyrie_pickaxe, valkyrie_axe, valkyrie_shovel, valkyrie_sword;
@ -83,13 +79,13 @@ public class ItemsAether
public static Item dungeon_key, skyroot_bucket, cloud_parachute, golden_parachute;
public static Item zanite_staff, cloud_staff, moa_egg, aerwhale_egg;
public static Item nature_staff, cloud_staff, moa_egg;
public static Item dart_shooter, phoenix_bow, dart;
public static Item flaming_sword, lightning_sword, holy_sword;
public static Item vampire_blade, pig_slayer, candy_cane_sword, jeb_hammer, notch_hammer, valkyrie_lance;
public static Item vampire_blade, pig_slayer, candy_cane_sword, notch_hammer, valkyrie_lance;
public static Item leather_gloves, iron_gloves, golden_gloves, chain_gloves, diamond_gloves;
@ -136,10 +132,6 @@ public class ItemsAether
valkyrie_axe = register("valkyrie_axe", new ItemValkyrieTool(EnumAetherToolType.AXE));
valkyrie_shovel = register("valkyrie_shovel", new ItemValkyrieTool(EnumAetherToolType.SHOVEL));
phoenix_pickaxe = register("phoenix_pickaxe", new ItemPhoenixTool(EnumAetherToolType.PICKAXE));
phoenix_axe = register("phoenix_axe", new ItemPhoenixTool(EnumAetherToolType.AXE));
phoenix_shovel = register("phoenix_shovel", new ItemPhoenixTool(EnumAetherToolType.SHOVEL));
zanite_helmet = register("zanite_helmet", new ItemZaniteArmor(EntityEquipmentSlot.HEAD, ArmorMaterial.IRON, "zanite", zanite_gemstone, 0x711ae8));
zanite_chestplate = register("zanite_chestplate", new ItemZaniteArmor(EntityEquipmentSlot.CHEST, ArmorMaterial.IRON, "zanite", zanite_gemstone, 0x711ae8));
zanite_leggings = register("zanite_leggings", new ItemZaniteArmor(EntityEquipmentSlot.LEGS, ArmorMaterial.IRON, "zanite", zanite_gemstone, 0x711ae8));
@ -187,7 +179,6 @@ public class ItemsAether
golden_parachute = register("golden_parachute", new ItemAetherParachute());
moa_egg = register("moa_egg", new ItemMoaEgg());
aerwhale_egg = register("aerwhale_egg", new ItemAerwhaleEgg());
dart_shooter = register("dart_shooter", new ItemDartShooter());
phoenix_bow = register("phoenix_bow", new ItemPhoenixBow());
@ -206,7 +197,6 @@ public class ItemsAether
pig_slayer = register("pig_slayer", new ItemPigSlayer());
candy_cane_sword = register("candy_cane_sword", new ItemCandyCaneSword());
notch_hammer = register("notch_hammer", new ItemNotchHammer());
jeb_hammer = register("jeb_hammer", new ItemJebHammer());
leather_gloves = register("leather_gloves", new ItemAccessory(AccessoryType.GLOVE).setColor(0xc65c35));
iron_gloves = register("iron_gloves", new ItemAccessory(AccessoryType.GLOVE));
@ -245,7 +235,7 @@ public class ItemsAether
life_shard = register("life_shard", new ItemLifeShard());
cloud_staff = register("cloud_staff", new ItemCloudStaff());
zanite_staff = register("zanite_staff", new ItemNeptuneStaff());
nature_staff = register("nature_staff", new ItemNatureStaff());
lightning_knife = register("lightning_knife", new ItemLightningKnife());
valkyrie_lance = register("valkyrie_lance", new ItemValkyrieLance());

View file

@ -58,7 +58,7 @@ public class ItemAetherSlab extends ItemBlock
if (axisalignedbb != Block.NULL_AABB && worldIn.checkNoEntityCollision(axisalignedbb.offset(pos)) && worldIn.setBlockState(pos, iblockstate1, 11))
{
SoundType soundtype = this.doubleSlab.getSoundType();
SoundType soundtype = this.doubleSlab.getSoundType(this.doubleSlab.getDefaultState(), worldIn, pos, playerIn);
worldIn.playSound(playerIn, pos, soundtype.getPlaceSound(), SoundCategory.BLOCKS, (soundtype.getVolume() + 1.0F) / 2.0F, soundtype.getPitch() * 0.8F);
--stack.stackSize;
}
@ -107,7 +107,7 @@ public class ItemAetherSlab extends ItemBlock
if (axisalignedbb != Block.NULL_AABB && worldIn.checkNoEntityCollision(axisalignedbb.offset(pos)) && worldIn.setBlockState(pos, iblockstate1, 11))
{
SoundType soundtype = this.doubleSlab.getSoundType();
SoundType soundtype = this.doubleSlab.getSoundType(this.doubleSlab.getDefaultState(), worldIn, pos, player);
worldIn.playSound(player, pos, soundtype.getPlaceSound(), SoundCategory.BLOCKS, (soundtype.getVolume() + 1.0F) / 2.0F, soundtype.getPitch() * 0.8F);
--stack.stackSize;
}

View file

@ -28,10 +28,7 @@ public class ItemDungeonKey extends Item
{
for (int meta = 0; meta < EnumDungeonKeyType.values().length; ++meta)
{
if (EnumDungeonKeyType.values()[meta] != EnumDungeonKeyType.Platinum)
{
list.add(new ItemStack(this, 1, meta));
}
list.add(new ItemStack(this, 1, meta));
}
}

View file

@ -4,10 +4,10 @@ import net.minecraft.item.Item;
import com.legacy.aether.server.registry.creative_tabs.AetherCreativeTabs;
public class ItemNeptuneStaff extends Item
public class ItemNatureStaff extends Item
{
public ItemNeptuneStaff()
public ItemNatureStaff()
{
this.setCreativeTab(AetherCreativeTabs.misc);
this.setMaxStackSize(1);

View file

@ -72,6 +72,12 @@ public abstract class ItemAetherTool extends ItemTool
@Override
public float getStrVsBlock(ItemStack stack, IBlockState block)
{
for (String type : getToolClasses(stack))
{
if (block.getBlock().isToolEffective(type, block))
return efficiencyOnProperMaterial;
}
return this.toolType.getStrVsBlock(stack, block) == 4.0F ? this.efficiencyOnProperMaterial : 1.0F;
}
@ -81,4 +87,9 @@ public abstract class ItemAetherTool extends ItemTool
return toolClass != null ? com.google.common.collect.ImmutableSet.of(toolClass) : super.getToolClasses(stack);
}
public float getEffectiveSpeed()
{
return this.efficiencyOnProperMaterial;
}
}

View file

@ -23,7 +23,7 @@ public class ItemGravititeTool extends ItemAetherTool
@Override
public EnumActionResult onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ)
{
if (ForgeHooks.isToolEffective(world, pos, stack) && world.isAirBlock(pos.up()))
if ((this.getStrVsBlock(stack, world.getBlockState(pos)) == this.efficiencyOnProperMaterial || ForgeHooks.isToolEffective(world, pos, stack)) && world.isAirBlock(pos.up()))
{
if (world.getTileEntity(pos) != null)
{

View file

@ -1,14 +0,0 @@
package com.legacy.aether.server.items.tools;
import com.legacy.aether.server.items.util.EnumAetherToolType;
public class ItemPhoenixTool extends ItemAetherTool
{
public ItemPhoenixTool(EnumAetherToolType toolType)
{
super(ToolMaterial.DIAMOND, toolType);
this.setCreativeTab(null);
}
}

View file

@ -1,10 +1,10 @@
package com.legacy.aether.server.items.util;
import net.minecraft.block.Block;
import net.minecraft.block.properties.PropertyBool;
import net.minecraft.block.state.IBlockState;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.init.Enchantments;
import net.minecraft.item.ItemStack;
import net.minecraft.stats.StatList;
@ -17,7 +17,9 @@ public class DoubleDropHelper
public static void dropBlock(EntityPlayer player, IBlockState state, BlockPos pos, PropertyBool property)
{
player.addStat(StatList.getBlockStats(state.getBlock()));
Block block = state.getBlock();
player.addStat(StatList.getBlockStats(block));
player.addExhaustion(0.025F);
int size = state.getValue(property).equals(true) ? 2 : 1;
@ -25,25 +27,23 @@ public class DoubleDropHelper
if (stack == null || !(stack.getItem() instanceof ItemSkyrootTool))
{
state.getBlock().dropBlockAsItem(player.worldObj, pos, state, EnchantmentHelper.getEnchantmentLevel(Enchantments.FORTUNE, player.getHeldItemMainhand()));
block.dropBlockAsItem(player.worldObj, pos, state, EnchantmentHelper.getEnchantmentLevel(Enchantments.FORTUNE, player.getHeldItemMainhand()));
return;
}
if (state.getBlock() != Blocks.AIR && state.getBlock().canHarvestBlock(player.worldObj, pos, player))
ItemSkyrootTool skyrootTool = (ItemSkyrootTool) stack.getItem();
if (skyrootTool.getStrVsBlock(stack, state) == skyrootTool.getEffectiveSpeed())
{
boolean tool = state.getBlock().isToolEffective((String) stack.getItem().getToolClasses(stack).toArray()[0], state);
if (!tool)
{
state.getBlock().dropBlockAsItem(player.worldObj, pos, state, EnchantmentHelper.getEnchantmentLevel(Enchantments.FORTUNE, player.getHeldItemMainhand()));
return;
}
for (int i = 0; i < size; ++i)
{
state.getBlock().dropBlockAsItem(player.worldObj, pos, state, EnchantmentHelper.getEnchantmentLevel(Enchantments.FORTUNE, player.getHeldItemMainhand()));
block.dropBlockAsItem(player.worldObj, pos, state, EnchantmentHelper.getEnchantmentLevel(Enchantments.FORTUNE, player.getHeldItemMainhand()));
}
}
else
{
block.dropBlockAsItem(player.worldObj, pos, state, EnchantmentHelper.getEnchantmentLevel(Enchantments.FORTUNE, player.getHeldItemMainhand()));
}
}
}

View file

@ -2,7 +2,7 @@ package com.legacy.aether.server.items.util;
public enum EnumDungeonKeyType
{
Bronze(0, "bronze"), Silver(1, "silver"), Golden(2, "golden"), Platinum(3, "platinum");
Bronze(0, "bronze"), Silver(1, "silver"), Golden(2, "golden");
private int meta;
@ -16,7 +16,7 @@ public enum EnumDungeonKeyType
public static EnumDungeonKeyType getType(int meta)
{
return meta == 1 ? Silver : meta == 2 ? Golden : meta == 3 ? Platinum : Bronze;
return meta == 1 ? Silver : meta == 2 ? Golden : Bronze;
}
public int getMeta()

View file

@ -1,13 +0,0 @@
package com.legacy.aether.server.items.weapons;
public class ItemJebHammer extends ItemNotchHammer
{
public ItemJebHammer()
{
super();
this.setCreativeTab(null);
}
}

View file

@ -87,7 +87,7 @@ public class ItemZaniteSword extends ItemSword
@Override
public float getStrVsBlock(ItemStack itemstack, IBlockState block)
{
return super.getStrVsBlock(itemstack, block) * (2.0F * (float)itemstack.getItemDamage() / (float)itemstack.getItem().getMaxDamage() + 0.5F);
return super.getStrVsBlock(itemstack, block) * (2.0F * (float)itemstack.getItemDamage() / (float)itemstack.getMaxDamage() + 0.5F);
}
}

View file

@ -8,6 +8,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.stats.Achievement;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.event.AttachCapabilitiesEvent;
import net.minecraftforge.event.CommandEvent;
@ -210,11 +211,18 @@ public class PlayerAetherEvents
@SubscribeEvent
public void onAchievementGet(AchievementEvent event)
{
if (!event.getEntityPlayer().hasAchievement(event.getAchievement()) && event.getAchievement() instanceof AetherAchievement)
{
int achievementType = event.getAchievement() == AchievementsAether.defeat_bronze ? 1 : event.getAchievement() == AchievementsAether.defeat_silver ? 2 : 0;
EntityPlayer player = event.getEntityPlayer();
Achievement achievement = event.getAchievement();
EntityPlayer player = event.getEntityPlayer();
if (!(achievement instanceof AetherAchievement))
{
return;
}
int achievementType = achievement == AchievementsAether.defeat_bronze ? 1 : achievement == AchievementsAether.defeat_silver ? 2 : 0;
if (!player.worldObj.isRemote && ((EntityPlayerMP)player).getStatFile().canUnlockAchievement(achievement) && !player.hasAchievement(achievement))
{
if (event.getAchievement() == AchievementsAether.enter_aether)
{
if (!player.inventory.addItemStackToInventory(new ItemStack(ItemsAether.lore_book)))
@ -228,10 +236,7 @@ public class PlayerAetherEvents
}
}
if (!event.getEntityPlayer().worldObj.isRemote)
{
AetherNetworkingManager.sendTo(new PacketAchievement(achievementType), (EntityPlayerMP) player);
}
AetherNetworkingManager.sendTo(new PacketAchievement(achievementType), (EntityPlayerMP) player);
}
}

View file

@ -170,7 +170,7 @@ public class AetherLoreEntry extends LoreEntry
information.add(new EntryInformation(new ItemStack(ItemsAether.iron_bubble), "Iron Bubble", "A bubble which", "grants its user", "infinite breath", "underwater.", "", ""));
information.add(new EntryInformation(new ItemStack(ItemsAether.life_shard), "Life Shard", "A shard which", "grants the user", "extra life.", "", "", ""));
information.add(new EntryInformation(new ItemStack(ItemsAether.cloud_staff), "Cloud Staff", "A staff that", "grants the user", "two mini clouds", "to protect it.", "", ""));
information.add(new EntryInformation(new ItemStack(ItemsAether.zanite_staff), "Nature Staff", "A staff that", "changes the behavior", "of moas.", "", "", ""));
information.add(new EntryInformation(new ItemStack(ItemsAether.nature_staff), "Nature Staff", "A staff that", "changes the behavior", "of moas.", "", "", ""));
information.add(new EntryInformation(new ItemStack(ItemsAether.lightning_knife), "Lightning Knife", "An unusual knife", "which, when thrown", "summons lightning", "where it lands.", "", ""));
information.add(new EntryInformation(new ItemStack(ItemsAether.valkyrie_lance), "Valkyrie Lance", "A lance with a", "much greater", "mob reach than", "any other weapon.", "", ""));
information.add(new EntryInformation(new ItemStack(ItemsAether.sentry_boots), "Sentry Boots", "Boots which negate", "fall damage to", "whoever is wearing", "these.", "", ""));

View file

@ -45,7 +45,7 @@ public class AetherRecipes
register(new ItemStack(ItemsAether.dart_shooter, 1), "X ", " Y ", " Y", 'X', ItemsAether.golden_amber, 'Y', BlocksAether.skyroot_plank);
register(new ItemStack(ItemsAether.dart, 1), "X", "Y", "Z", 'X', Items.FEATHER, 'Y', ItemsAether.skyroot_stick, 'Z', ItemsAether.golden_amber);
register(new ItemStack(ItemsAether.dart_shooter, 1, 1), "X", "Y", 'X', new ItemStack(ItemsAether.dart_shooter, 1), 'Y', new ItemStack(ItemsAether.skyroot_bucket, 1, 2));
register(new ItemStack(ItemsAether.dart, 8), "XXX", "XYX", "XXX", 'X', new ItemStack(ItemsAether.dart, 1), 'Y', new ItemStack(ItemsAether.skyroot_bucket, 1, 2));
register(new ItemStack(ItemsAether.dart, 8, 1), "XXX", "XYX", "XXX", 'X', new ItemStack(ItemsAether.dart, 1), 'Y', new ItemStack(ItemsAether.skyroot_bucket, 1, 2));
register(new ItemStack(BlocksAether.incubator), "XXX", "XZX", "XXX", 'X', BlocksAether.holystone, 'Z', BlocksAether.ambrosium_torch);
register(new ItemStack(BlocksAether.freezer), "XXX", "XYX", "ZZZ", 'X', BlocksAether.holystone, 'Y', BlocksAether.icestone, 'Z', BlocksAether.skyroot_plank);
register(new ItemStack(BlocksAether.enchanter), "XXX", "XYX", "XXX", 'X', BlocksAether.holystone, 'Y', ItemsAether.zanite_gemstone);

View file

@ -17,6 +17,8 @@ public class SoundsAether
public static SoundEvent zephyr_call, zephyr_shoot;
public static SoundEvent slider_collide, slider_move, slider_awaken, slider_death;
public static SoundEvent aether_tune, ascending_dawn, welcoming_skies;
public static SoundEvent achievement_gen, achievement_bronze, achievement_silver;
@ -39,6 +41,11 @@ public class SoundsAether
zephyr_call = register(Aether.locate("aemob.zephyr.call"));
zephyr_shoot = register(Aether.locate("aemob.zephyr.shoot"));
slider_awaken = register(Aether.locate("aeboss.slider.awaken"));
slider_collide = register(Aether.locate("aeboss.slider.collide"));
slider_move = register(Aether.locate("aeboss.slider.move"));
slider_death = register(Aether.locate("aeboss.slider.death"));
projectile_shoot = register(Aether.locate("projectile.shoot"));
dart_shooter_shoot = register(Aether.locate("projectile.dart_shooter.shoot"));

View file

@ -64,14 +64,6 @@ public class TileEntityTreasureChest extends TileEntityChest
}
}
if (kind == 3)
{
for (p = 0; p < 5 + random.nextInt(1); ++p)
{
this.setInventorySlotContents(random.nextInt(this.getSizeInventory()), PlatinumDungeon.getPlatinumLoot(random));
}
}
this.locked = false;
if (!this.worldObj.isRemote)

View file

@ -138,7 +138,7 @@ public class AetherWorldProvider extends WorldProvider
@Override
public boolean isSkyColored()
{
return true;
return false;
}
@Override

View file

@ -253,7 +253,7 @@ public class ChunkProviderAether implements IChunkGenerator
}
else if (creatureType == EnumCreatureType.MONSTER)
{
if (this.rand.nextInt(13) == 0)
if (this.rand.nextInt(18) == 0)
{
return this.worldObj.getBiome(pos).getSpawnableList(EnumCreatureType.MONSTER);
}
@ -270,7 +270,7 @@ public class ChunkProviderAether implements IChunkGenerator
}
@Override
public boolean generateStructures(Chunk chunkIn, int x, int z)
public boolean generateStructures(Chunk chunkIn, int chunkX, int chunkZ)
{
return false;
}

View file

@ -81,6 +81,12 @@ public class AetherBiome extends Biome
list.add(new SpawnListEntry(EntityZephyr.class, 5, 0, 1));
}
@Override
public int getSkyColorByTemp(float currentTemperature)
{
return 0xC0C0FF; // Lavender Blue
}
public boolean canRain()
{
return false;

View file

@ -11,6 +11,7 @@ import net.minecraft.world.biome.Biome;
import net.minecraft.world.biome.BiomeDecorator;
import net.minecraft.world.gen.feature.WorldGenerator;
import com.legacy.aether.server.AetherConfig;
import com.legacy.aether.server.blocks.BlocksAether;
import com.legacy.aether.server.blocks.util.EnumCloudType;
import com.legacy.aether.server.world.biome.decoration.*;
@ -30,8 +31,6 @@ public class AetherBiomeDecorator extends BiomeDecorator
public AetherGenMinable ores = new AetherGenMinable();
public AetherGenOakTree oak_tree = new AetherGenOakTree();
public AetherGenSkyrootTree skyroot_tree = new AetherGenSkyrootTree();
public AetherGenQuicksoil quicksoil_patches = new AetherGenQuicksoil();
@ -83,6 +82,19 @@ public class AetherBiomeDecorator extends BiomeDecorator
this.getTree().generate(this.world, this.rand, this.world.getHeight(this.chunkPos.add(this.nextInt(16) + 8, 0, this.nextInt(16) + 8)));
}
if (this.shouldSpawn(1))
{
this.skyroot_tree.generate(this.world, this.rand, this.world.getHeight(this.chunkPos.add(this.nextInt(16), 0, this.nextInt(16))));
}
if (AetherConfig.shouldLoadHolidayContent())
{
if (this.shouldSpawn(15))
{
this.holiday_tree.generate(this.world, this.rand, this.world.getHeight(this.chunkPos.add(this.nextInt(16) + 8, 0, this.nextInt(16) + 8)));
}
}
this.generateFoilage(BlocksAether.white_flower.getDefaultState());
this.generateFoilage(BlocksAether.purple_flower.getDefaultState());

View file

@ -426,7 +426,7 @@ public class BronzeDungeon extends AetherDungeon
case 6 :
return new ItemStack(ItemsAether.agility_cape);
case 7 :
return new ItemStack(ItemsAether.zanite_staff);
return new ItemStack(ItemsAether.nature_staff);
case 8 :
return new ItemStack(ItemsAether.sentry_boots);
}

View file

@ -1,46 +0,0 @@
package com.legacy.aether.server.world.dungeon;
import java.util.Random;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenerator;
import com.legacy.aether.server.items.ItemsAether;
public class PlatinumDungeon extends WorldGenerator
{
@Override
public boolean generate(World worldIn, Random rand, BlockPos position)
{
return true;
}
public static ItemStack getPlatinumLoot(Random random)
{
int item = random.nextInt(8);
switch (item)
{
case 1:
return new ItemStack(ItemsAether.cloud_staff);
case 2:
return new ItemStack(ItemsAether.life_shard);
case 3:
return new ItemStack(ItemsAether.jeb_hammer);
case 4:
return new ItemStack(ItemsAether.phoenix_pickaxe);
case 5:
return new ItemStack(ItemsAether.phoenix_axe);
case 6:
return new ItemStack(ItemsAether.phoenix_shovel);
case 7:
return new ItemStack(ItemsAether.aerwhale_egg);
}
return new ItemStack(ItemsAether.chain_gloves);
}
}

View file

@ -110,28 +110,21 @@ item.aether_tune.name=Aether Tune
item.ascending_dawn.name=Ascending Dawn
item.welcoming_skies.name=Welcoming Skies
item.victory_medal.name=Victory Medal
item.swet_ball.name=Swet Ball
item.life_shard.name=Life Shard
item.cloud_staff.name=Cloud Staff
item.zanite_staff.name=Nature Staff
item.nature_staff.name=Nature Staff
item.dungeon_key_bronze.name=Bronze Key
item.dungeon_key_silver.name=Silver Key
item.dungeon_key_golden.name=Golden Key
item.dungeon_key_platinum.name=Platinum Key
item.cold_parachute.name=Cold Parachute
item.golden_parachute.name=Golden Parachute
item.dart_golden.name=Golden Dart
item.dart_poison.name=Poison Dart
item.dart_enchanted.name=Enchanted Dart
item.phoenix_pickaxe.name=Phoenix Pickaxe
item.phoenix_axe.name=Phoenix Axe
item.phoenix_shovel.name=Phoenix Shovel
item.aerwhale_egg.name=Aerwhale Egg
item.jeb_hammer.name=Hammer of Jeb
item.enchanted_blueberry.name=Enchanted Berry
# Block Names
tile.aetherPortal.name=Aether Portal
tile.aether_portal.name=Aether Portal
tile.aether_grass.name=Aether Grass
tile.aether_dirt.name=Aether Dirt
tile.enchanted_aether_grass.name=Enchanted Aether Grass
@ -175,7 +168,7 @@ tile.quicksoil_glass.name=Quicksoil Glass
tile.aerogel.name=Aerogel
tile.icestone.name=Icestone
tile.treasure_chest.name=Treasure Chest
tile.enchanter.name=Enchanter
tile.enchanter.name=Altar
tile.incubator.name=Incubator
tile.chest_mimic.name=Chest Mimic
tile.freezer.name=Freezer

View file

@ -0,0 +1,30 @@
{
"parent": "block/cube_all",
"textures": {
"all": "aether_legacy:blocks/aercloud"
},
"elements": [
{
"from": [ 0, 0, 0 ],
"to": [ 16, 16, 16 ],
"faces": {
"down": { "uv": [ 0, 0, 16, 16 ], "texture": "#all", "cullface": "down", "tintindex": 0 },
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#all", "cullface": "up", "tintindex": 0 },
"north": { "uv": [ 0, 0, 16, 16 ], "texture": "#all", "cullface": "north", "tintindex": 0 },
"south": { "uv": [ 0, 0, 16, 16 ], "texture": "#all", "cullface": "south", "tintindex": 0 },
"west": { "uv": [ 0, 0, 16, 16 ], "texture": "#all", "cullface": "west", "tintindex": 0 },
"east": { "uv": [ 0, 0, 16, 16 ], "texture": "#all", "cullface": "east", "tintindex": 0 }
}
}]
}

View file

@ -1,6 +1,3 @@
{
"parent": "block/cube_all",
"textures": {
"all": "aether_legacy:blocks/blue_aercloud"
}
"parent": "aether_legacy:block/aercloud"
}

View file

@ -1,6 +1,3 @@
{
"parent": "block/cube_all",
"textures": {
"all": "aether_legacy:blocks/cold_aercloud"
}
"parent": "aether_legacy:block/aercloud"
}

View file

@ -1,6 +1,3 @@
{
"parent": "block/cube_all",
"textures": {
"all": "aether_legacy:blocks/golden_aercloud"
}
"parent": "aether_legacy:block/aercloud"
}

View file

@ -1,6 +0,0 @@
{
"parent": "item/generated",
"textures": {
"layer0": "aether_legacy:items/misc/egg/aerwhale_egg"
}
}

View file

@ -1,7 +1,7 @@
{
"parent": "item/handheld",
"textures": {
"layer0": "aether_legacy:items/tools/phoenix_axe"
"layer0": "aether_legacy:items/staff/nature_staff"
},
"display": {
"thirdperson": {

View file

@ -1,18 +0,0 @@
{
"parent": "item/handheld",
"textures": {
"layer0": "aether_legacy:items/tools/phoenix_pickaxe"
},
"display": {
"thirdperson": {
"rotation": [ 0, 90, -35 ],
"translation": [ 0, 1.25, -3.5 ],
"scale": [ 0.85, 0.85, 0.85 ]
},
"firstperson": {
"rotation": [ 0, -135, 25 ],
"translation": [ 0, 4, 2 ],
"scale": [ 1.7, 1.7, 1.7 ]
}
}
}

View file

@ -1,18 +0,0 @@
{
"parent": "item/handheld",
"textures": {
"layer0": "aether_legacy:items/tools/phoenix_shovel"
},
"display": {
"thirdperson": {
"rotation": [ 0, 90, -35 ],
"translation": [ 0, 1.25, -3.5 ],
"scale": [ 0.85, 0.85, 0.85 ]
},
"firstperson": {
"rotation": [ 0, -135, 25 ],
"translation": [ 0, 4, 2 ],
"scale": [ 1.7, 1.7, 1.7 ]
}
}
}

View file

@ -1,18 +0,0 @@
{
"parent": "item/handheld",
"textures": {
"layer0": "aether_legacy:items/weapons/phoenix_sword"
},
"display": {
"thirdperson": {
"rotation": [ 0, 90, -35 ],
"translation": [ 0, 1.25, -3.5 ],
"scale": [ 0.85, 0.85, 0.85 ]
},
"firstperson": {
"rotation": [ 0, -135, 25 ],
"translation": [ 0, 4, 2 ],
"scale": [ 1.7, 1.7, 1.7 ]
}
}
}

View file

@ -1,6 +0,0 @@
{
"parent": "item/generated",
"textures": {
"layer0": "aether_legacy:items/misc/keys/platinum_key"
}
}

View file

@ -1,18 +0,0 @@
{
"parent": "item/handheld",
"textures": {
"layer0": "aether_legacy:items/staff/zanite_staff"
},
"display": {
"thirdperson": {
"rotation": [ 0, 90, -35 ],
"translation": [ 0, 1.25, -3.5 ],
"scale": [ 0.85, 0.85, 0.85 ]
},
"firstperson": {
"rotation": [ 0, -135, 25 ],
"translation": [ 0, 4, 2 ],
"scale": [ 1.7, 1.7, 1.7 ]
}
}
}

View file

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 336 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 721 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 475 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 386 B