@@ -12,7 +12,7 @@ buildscript { | |||
apply plugin: 'net.minecraftforge.gradle.forge' | |||
apply plugin: 'com.wynprice.cursemaven' | |||
version = "1.12.2-v1.5.2" | |||
version = "1.12.2-v1.6.2" | |||
group = "com.gildedgames.the_aether" | |||
archivesBaseName = "aether" | |||
@@ -36,7 +36,7 @@ public class Aether | |||
public static final String modid = "aether_legacy"; | |||
public static final String version = "1.5.2"; | |||
public static final String version = "1.6.2"; | |||
@Instance(Aether.modid) | |||
public static Aether instance; | |||
@@ -86,6 +86,10 @@ public class AetherConfig | |||
@Config.Comment("Enables the Valkyrie Cape in dungeon loot") | |||
public boolean valkyrie_cape = true; | |||
@Config.Comment("Enables the Golden Feather in dungeon loot") | |||
public boolean golden_feather = false; | |||
@Config.Comment("Disables spawn of the Aether portal for use with portal being provided by another mod.") | |||
public boolean disable_portal = false; | |||
@Config.Comment("Disables startup loot when entering the Aether") | |||
@@ -1,50 +1,26 @@ | |||
package com.gildedgames.the_aether.blocks; | |||
import com.gildedgames.the_aether.AetherLogger; | |||
import com.gildedgames.the_aether.blocks.container.BlockEnchanter; | |||
import com.gildedgames.the_aether.blocks.container.BlockFreezer; | |||
import com.gildedgames.the_aether.blocks.container.BlockIncubator; | |||
import com.gildedgames.the_aether.blocks.decorative.*; | |||
import com.gildedgames.the_aether.blocks.natural.*; | |||
import com.gildedgames.the_aether.blocks.natural.enchanted.BlockEnchantedAetherGrass; | |||
import com.gildedgames.the_aether.blocks.natural.enchanted.BlockEnchantedGravitite; | |||
import com.gildedgames.the_aether.blocks.natural.ore.BlockAmbrosiumOre; | |||
import com.gildedgames.the_aether.blocks.natural.ore.BlockGravititeOre; | |||
import com.gildedgames.the_aether.blocks.natural.ore.BlockZaniteOre; | |||
import com.gildedgames.the_aether.blocks.portal.BlockAetherPortal; | |||
import com.gildedgames.the_aether.blocks.util.EnumLeafType; | |||
import com.gildedgames.the_aether.items.block.ItemEnchanter; | |||
import com.gildedgames.the_aether.registry.creative_tabs.AetherCreativeTabs; | |||
import com.gildedgames.the_aether.Aether; | |||
import com.gildedgames.the_aether.blocks.decorative.BlockAerogel; | |||
import com.gildedgames.the_aether.blocks.decorative.BlockAerogelSlab; | |||
import com.gildedgames.the_aether.blocks.decorative.BlockAerogelStairs; | |||
import com.gildedgames.the_aether.blocks.decorative.BlockAerogelWall; | |||
import com.gildedgames.the_aether.blocks.decorative.BlockAetherFence; | |||
import com.gildedgames.the_aether.blocks.decorative.BlockAetherFenceGate; | |||
import com.gildedgames.the_aether.blocks.decorative.BlockAetherSlab; | |||
import com.gildedgames.the_aether.blocks.decorative.BlockAetherStairs; | |||
import com.gildedgames.the_aether.blocks.decorative.BlockAetherWall; | |||
import com.gildedgames.the_aether.blocks.decorative.BlockAmbrosiumTorch; | |||
import com.gildedgames.the_aether.blocks.decorative.BlockPresent; | |||
import com.gildedgames.the_aether.blocks.decorative.BlockQuicksoilGlass; | |||
import com.gildedgames.the_aether.blocks.decorative.BlockSkyrootBookshelf; | |||
import com.gildedgames.the_aether.blocks.decorative.BlockSkyrootPlank; | |||
import com.gildedgames.the_aether.blocks.decorative.BlockZanite; | |||
import com.gildedgames.the_aether.blocks.dungeon.BlockDungeonBase; | |||
import com.gildedgames.the_aether.blocks.dungeon.BlockDungeonTrap; | |||
import com.gildedgames.the_aether.blocks.dungeon.BlockMimicChest; | |||
import com.gildedgames.the_aether.blocks.dungeon.BlockPillar; | |||
import com.gildedgames.the_aether.blocks.dungeon.BlockTreasureChest; | |||
import com.gildedgames.the_aether.blocks.natural.BlockAercloud; | |||
import com.gildedgames.the_aether.blocks.natural.BlockAetherDirt; | |||
import com.gildedgames.the_aether.blocks.natural.BlockAetherFlower; | |||
import com.gildedgames.the_aether.blocks.natural.BlockAetherGrass; | |||
import com.gildedgames.the_aether.blocks.natural.BlockAetherLeaves; | |||
import com.gildedgames.the_aether.blocks.natural.BlockAetherLog; | |||
import com.gildedgames.the_aether.blocks.natural.BlockBerryBush; | |||
import com.gildedgames.the_aether.blocks.natural.BlockBerryBushStem; | |||
import com.gildedgames.the_aether.blocks.natural.BlockCrystalLeaves; | |||
import com.gildedgames.the_aether.blocks.natural.BlockHolidayLeaves; | |||
import com.gildedgames.the_aether.blocks.natural.BlockHolystone; | |||
import com.gildedgames.the_aether.blocks.natural.BlockIcestone; | |||
import com.gildedgames.the_aether.blocks.natural.BlockQuicksoil; | |||
import com.gildedgames.the_aether.items.ItemsAether; | |||
import com.gildedgames.the_aether.items.block.ItemAetherSlab; | |||
import com.gildedgames.the_aether.items.block.ItemRarity; | |||
@@ -61,6 +37,7 @@ import net.minecraft.init.Blocks; | |||
import net.minecraft.item.EnumRarity; | |||
import net.minecraft.item.Item; | |||
import net.minecraft.item.ItemBlock; | |||
import net.minecraft.item.ItemStack; | |||
import net.minecraftforge.registries.IForgeRegistry; | |||
public class BlocksAether | |||
@@ -119,7 +96,7 @@ public class BlocksAether | |||
public static Block skyroot_bed; | |||
public static Block ambrosium_lamp; | |||
public static BlockChest dungeon_chest = Blocks.CHEST; | |||
private static int availableId; | |||
@@ -135,6 +112,9 @@ public class BlocksAether | |||
public static void registerItems(IForgeRegistry<Item> blockRegistry) | |||
{ | |||
for (int i = 0; i < itemList.length; i++) { | |||
System.out.println(i + ": " + (itemList[i] == null)); | |||
} | |||
blockRegistry.registerAll(itemList); | |||
} | |||
@@ -227,8 +207,8 @@ public class BlocksAether | |||
aerogel_slab = registerSlab("aerogel_slab", new BlockAerogelSlab("aerogel_slab", false, Material.IRON).setHardness(0.5F).setResistance(999F), aerogel_double_slab); | |||
sun_altar = register("sun_altar", new BlockSunAltar()); | |||
skyroot_bookshelf = register("skyroot_bookshelf", new BlockSkyrootBookshelf()); | |||
skyroot_bed = registerBed("skyroot_bed", new BlockSkyrootBed()); | |||
ambrosium_lamp = register("ambrosium_lamp", new BlockAmbrosiumLamp()); | |||
skyroot_bed = registerBed("skyroot_bed", new BlockSkyrootBed()); | |||
} | |||
public static void initializeHarvestLevels() | |||
@@ -44,6 +44,7 @@ public class BlockAetherGrass extends Block implements IGrowable, IAetherMeta | |||
public static final PropertyBool double_drop = PropertyBool.create(Aether.doubleDropNotifier()); | |||
public static final PropertyBool snowy = PropertyBool.create("snowy"); | |||
public static final PropertyBool dungeon_block = PropertyBool.create("dungeon_block"); | |||
public static final PropertyEnum<EnumGrassType> variant = PropertyEnum.create("variant", EnumGrassType.class); | |||
public BlockAetherGrass() | |||
@@ -54,7 +55,7 @@ public class BlockAetherGrass extends Block implements IGrowable, IAetherMeta | |||
this.setHardness(0.6F); | |||
this.setCreativeTab(AetherCreativeTabs.blocks); | |||
this.setSoundType(SoundType.PLANT); | |||
this.setDefaultState(this.getDefaultState().withProperty(double_drop, Boolean.TRUE).withProperty(snowy, Boolean.FALSE).withProperty(variant, EnumGrassType.Aether)); | |||
this.setDefaultState(this.getDefaultState().withProperty(double_drop, Boolean.TRUE).withProperty(snowy, Boolean.FALSE).withProperty(dungeon_block, Boolean.FALSE).withProperty(variant, EnumGrassType.Aether)); | |||
} | |||
@Override | |||
@@ -78,10 +79,18 @@ public class BlockAetherGrass extends Block implements IGrowable, IAetherMeta | |||
return super.canSustainPlant(state, world, pos, direction, plantable); | |||
} | |||
@Override | |||
public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, BlockPos pos) | |||
{ | |||
Block block = worldIn.getBlockState(pos.up()).getBlock(); | |||
return state.withProperty(snowy, block == Blocks.SNOW || block == Blocks.SNOW_LAYER); | |||
} | |||
@Override | |||
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) | |||
{ | |||
world.setBlockState(pos, state.withProperty(double_drop, Boolean.FALSE).withProperty(snowy, Boolean.FALSE)); | |||
world.setBlockState(pos, state.withProperty(double_drop, Boolean.FALSE).withProperty(dungeon_block, Boolean.FALSE)); | |||
} | |||
@Override | |||
@@ -94,7 +103,12 @@ public class BlockAetherGrass extends Block implements IGrowable, IAetherMeta | |||
meta |= 1; | |||
} | |||
meta |= state.getValue(variant).getMeta() << 1; | |||
if (!state.getValue(dungeon_block)) | |||
{ | |||
meta |= 2; | |||
} | |||
meta |= state.getValue(variant).getMeta() << 2; | |||
return meta; | |||
} | |||
@@ -103,7 +117,8 @@ public class BlockAetherGrass extends Block implements IGrowable, IAetherMeta | |||
public IBlockState getStateFromMeta(int meta) | |||
{ | |||
return this.getDefaultState().withProperty(double_drop, (meta & 1) == 0) | |||
.withProperty(variant, EnumGrassType.getType(meta >> 1)); | |||
.withProperty(variant, EnumGrassType.getType(meta >> 2)) | |||
.withProperty(dungeon_block, (meta & (2)) == 0); | |||
} | |||
@Override | |||
@@ -124,7 +139,7 @@ public class BlockAetherGrass extends Block implements IGrowable, IAetherMeta | |||
@Override | |||
protected BlockStateContainer createBlockState() | |||
{ | |||
return new BlockStateContainer(this, double_drop, snowy, variant); | |||
return new BlockStateContainer(this, double_drop, snowy, variant, dungeon_block); | |||
} | |||
@Override | |||
@@ -46,7 +46,6 @@ public class BlockRendering | |||
@SubscribeEvent | |||
public void onModelRegisterEvent(ModelRegistryEvent event) | |||
{ | |||
registerBlockWithStateMapper(BlocksAether.aether_grass, (new AetherStateMap.Builder()).ignore(BlockAetherGrass.double_drop).ignore(BlockAetherGrass.dungeon_block).build()); | |||
registerBlockWithStateMapper(BlocksAether.aether_dirt, (new AetherStateMap.Builder()).ignore(BlockAetherDirt.double_drop).build()); | |||
registerBlockWithStateMapper(BlocksAether.aether_grass_path, (new AetherStateMap.Builder()).ignore(BlockAetherDirt.double_drop).build()); | |||
registerBlockWithStateMapper(BlocksAether.holystone, (new AetherStateMap.Builder()).ignore(BlockHolystone.double_drop).ignore(BlockHolystone.dungeon_block).build()); | |||
@@ -90,6 +89,7 @@ public class BlockRendering | |||
final LinkedHashMap<IProperty<?>, Comparable<?>> mappings = Maps.newLinkedHashMap(state.getProperties()); | |||
mappings.remove(BlockAetherGrass.double_drop); | |||
mappings.remove(BlockAetherGrass.dungeon_block); | |||
if (state.getValue(BlockAetherGrass.snowy)) | |||
{ | |||
@@ -31,9 +31,9 @@ import net.minecraftforge.fml.common.Loader; | |||
import net.minecraftforge.event.terraingen.TerrainGen; | |||
import com.gildedgames.the_aether.AetherConfig; | |||
import com.gildedgames.AetherConfig; | |||
import com.gildedgames.blocks.BlocksAether; | |||
import com.gildedgames.blocks.util.EnumCloudType; | |||
import com.gildedgames.the_aether.AetherConfig; | |||
import com.gildedgames.the_aether.blocks.BlocksAether; | |||
import com.gildedgames.the_aether.blocks.util.EnumCloudType; | |||
public class AetherBiomeDecorator extends BiomeDecorator | |||
{ | |||
@@ -34,7 +34,7 @@ public class ComponentGoldenIsland extends AetherStructure | |||
} | |||
@Override | |||
public boolean generate() | |||
public boolean generate() | |||
{ | |||
this.replaceAir = true; | |||
this.replaceSolid = true; | |||
@@ -77,7 +77,7 @@ public class ComponentGoldenIsland extends AetherStructure | |||
{ | |||
i4 = MathHelper.floor((double)i4 * 1.375D); | |||
i4 -= 6; | |||
} | |||
} | |||
else if(l2 < -15) | |||
{ | |||
i4 = MathHelper.floor((double)i4 * 1.3500000238418579D); | |||
@@ -36,7 +36,7 @@ public class ComponentGoldenIslandStub extends AetherStructure | |||
} | |||
@Override | |||
public boolean generate() | |||
public boolean generate() | |||
{ | |||
this.replaceAir = true; | |||
this.replaceSolid = true; | |||
@@ -89,7 +89,7 @@ public class ComponentGoldenIslandStub extends AetherStructure | |||
} | |||
} | |||
} | |||
} | |||
} | |||
else if(BlocksAether.isGood(this.getBlockStateWithOffset(i1 + x, k1 + y, i2 + z))) | |||
{ | |||
this.setBlockWithOffset(i1 + x, k1 + y, i2 + z, BlocksAether.holystone.getDefaultState()); | |||