Browse Source

Updated to Forge 1.8.8, and switched to using submodules

1.8
Collin1971 5 years ago
parent
commit
412cf4dad9
18 changed files with 98 additions and 84 deletions
  1. +3
    -0
      .gitmodules
  2. +3
    -20
      build.gradle
  3. +3
    -6
      build.properties
  4. +1
    -0
      modules/Gilded-Games-Util
  5. +4
    -0
      settings.gradle
  6. +5
    -5
      src/main/java/com/gildedgames/aether/client/models/blocks/AetherBlockModels.java
  7. +1
    -3
      src/main/java/com/gildedgames/aether/client/renderer/entities/RenderFloatingBlock.java
  8. +22
    -22
      src/main/java/com/gildedgames/aether/client/renderer/entities/projectiles/RenderDart.java
  9. +5
    -1
      src/main/java/com/gildedgames/aether/client/renderer/tile_entity/TileEntityAltarRenderer.java
  10. +5
    -2
      src/main/java/com/gildedgames/aether/common/CommonEvents.java
  11. +6
    -2
      src/main/java/com/gildedgames/aether/common/blocks/natural/plants/BlockAetherSapling.java
  12. +1
    -1
      src/main/java/com/gildedgames/aether/common/entities/blocks/EntityFloatingBlock.java
  13. +1
    -1
      src/main/java/com/gildedgames/aether/common/entities/living/EntitySheepuff.java
  14. +2
    -2
      src/main/java/com/gildedgames/aether/common/entities/projectiles/EntityDart.java
  15. +20
    -3
      src/main/java/com/gildedgames/aether/common/tile_entities/TileEntityHolystoneFurnace.java
  16. +2
    -2
      src/main/java/com/gildedgames/aether/common/tile_entities/TileEntitySkyrootChest.java
  17. +7
    -3
      src/main/java/com/gildedgames/aether/common/world/biome/BiomeGenAether.java
  18. +7
    -11
      src/main/java/com/gildedgames/aether/common/world/features/trees/WorldGenSkyrootTree.java

+ 3
- 0
.gitmodules View File

@@ -0,0 +1,3 @@
[submodule "modules/Gilded-Games-Util"]
path = modules/Gilded-Games-Util
url = https://github.com/gildedgames/gilded-games-util.git

+ 3
- 20
build.gradle View File

@@ -7,7 +7,7 @@ buildscript {
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.0-SNAPSHOT'
classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
}
}

@@ -19,29 +19,12 @@ version = config.mod_version
group = 'com.gildedgames.aether'
archivesBaseName = "AetherII"

task defineVersion {
def build = System.getenv().BUILD_NUMBER

if (build != null) {
version = "${config.mc_version}-${config.mod_version}-build${config.mod_version}"
} else {
version = "${config.mc_version}-${config.mod_version}"
}
}

repositories {
maven {
name = "gildedgames"
url = "http://gilded-games.com/maven/"
}
}

dependencies {
compile "com.gildedgames.util:util:${config.ggutil_version}:dev"
compile project(":Gilded-Games-Util")
}

minecraft {
version = "${config.mc_version}-${config.forge_version}"
version = config.forge_version
mappings = config.forge_mappings

runDir = "run"


+ 3
- 6
build.properties View File

@@ -1,7 +1,4 @@
mc_version=1.8
mod_version=r1
mod_version=1.8.8-r1

forge_version=11.14.3.1521
forge_mappings=stable_16

ggutil_version=1.8-r1_32
forge_version=1.8.8-11.15.0.1596-1.8.8
forge_mappings=snapshot_20151129

+ 1
- 0
modules/Gilded-Games-Util

@@ -0,0 +1 @@
Subproject commit 5fecaffd64cc21a95870be79861faaec6aa30839

+ 4
- 0
settings.gradle View File

@@ -1 +1,5 @@
include ':Gilded-Games-Util'

project(":Gilded-Games-Util").projectDir = file("modules/Gilded-Games-Util")

rootProject.name = 'AetherII'

+ 5
- 5
src/main/java/com/gildedgames/aether/client/models/blocks/AetherBlockModels.java View File

@@ -31,11 +31,11 @@ public class AetherBlockModels
*/
private static void registerStateMappers()
{
StateMap skyrootDoorMapper = new StateMap.Builder().addPropertiesToIgnore(BlockSkyrootDoor.POWERED).build();
StateMap skyrootChestMapper = new StateMap.Builder().addPropertiesToIgnore(BlockChest.FACING).build();
StateMap aetherSaplingMapper = new StateMap.Builder().addPropertiesToIgnore(BlockAetherSapling.PROPERTY_STAGE).build();
StateMap skyrootMinableMapper = new StateMap.Builder().addPropertiesToIgnore(BlockSkyrootMinable.PROPERTY_WAS_PLACED).build();
StateMap leavesMapper = new StateMap.Builder().addPropertiesToIgnore(BlockAetherLeaves.PROPERTY_CHECK_DECAY, BlockAetherLeaves.PROPERTY_DECAYABLE).build();
StateMap skyrootDoorMapper = new StateMap.Builder().ignore(BlockSkyrootDoor.POWERED).build();
StateMap skyrootChestMapper = new StateMap.Builder().ignore(BlockChest.FACING).build();
StateMap aetherSaplingMapper = new StateMap.Builder().ignore(BlockAetherSapling.PROPERTY_STAGE).build();
StateMap skyrootMinableMapper = new StateMap.Builder().ignore(BlockSkyrootMinable.PROPERTY_WAS_PLACED).build();
StateMap leavesMapper = new StateMap.Builder().ignore(BlockAetherLeaves.PROPERTY_CHECK_DECAY, BlockAetherLeaves.PROPERTY_DECAYABLE).build();

ModelLoader.setCustomStateMapper(BlocksAether.blue_skyroot_leaves, leavesMapper);
ModelLoader.setCustomStateMapper(BlocksAether.green_skyroot_leaves, leavesMapper);


+ 1
- 3
src/main/java/com/gildedgames/aether/client/renderer/entities/RenderFloatingBlock.java View File

@@ -53,9 +53,7 @@ public class RenderFloatingBlock extends Render
Tessellator tessellator = Tessellator.getInstance();

WorldRenderer worldRenderer = tessellator.getWorldRenderer();
worldRenderer.startDrawingQuads();
worldRenderer.setVertexFormat(DefaultVertexFormats.BLOCK);

worldRenderer.begin(7, DefaultVertexFormats.BLOCK);
int i = pos.getX();
int j = pos.getY();
int k = pos.getZ();


+ 22
- 22
src/main/java/com/gildedgames/aether/client/renderer/entities/projectiles/RenderDart.java View File

@@ -8,14 +8,14 @@ import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.entity.Entity;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.util.MathHelper;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;

import java.util.HashMap;

public class RenderDart extends Render
public class RenderDart extends Render<EntityDart>
{
private static final HashMap<ItemDartType, ResourceLocation> dartTextures = new HashMap<ItemDartType, ResourceLocation>();

@@ -33,10 +33,8 @@ public class RenderDart extends Render
}

@Override
public void doRender(Entity entity, double posX, double posY, double posZ, float entityYaw, float partialTicks)
public void doRender(EntityDart dart, double posX, double posY, double posZ, float entityYaw, float partialTicks)
{
EntityDart dart = (EntityDart) entity;

this.bindEntityTexture(dart);

GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
@@ -49,6 +47,8 @@ public class RenderDart extends Render
WorldRenderer worldrenderer = tessellator.getWorldRenderer();

byte b0 = 0;
float f = 0.0F;
float f1 = 0.5F;
float f2 = 0.0F;
float f3 = 0.5F;
float f4 = (float) (b0 * 10) / 32.0F;
@@ -73,20 +73,20 @@ public class RenderDart extends Render
GlStateManager.translate(-4.0F, 0.0F, 0.0F);
GL11.glNormal3f(scale, 0.0F, 0.0F);

worldrenderer.startDrawingQuads();
worldrenderer.addVertexWithUV(-7.0D, -2.0D, -2.0D, (double) f6, (double) f8);
worldrenderer.addVertexWithUV(-7.0D, -2.0D, 2.0D, (double) f7, (double) f8);
worldrenderer.addVertexWithUV(-7.0D, 2.0D, 2.0D, (double) f7, (double) f9);
worldrenderer.addVertexWithUV(-7.0D, 2.0D, -2.0D, (double) f6, (double) f9);
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX);
worldrenderer.pos(-7.0D, -2.0D, -2.0D).tex((double) f4, (double) f6).endVertex();
worldrenderer.pos(-7.0D, -2.0D, 2.0D).tex((double) f5, (double) f6).endVertex();
worldrenderer.pos(-7.0D, 2.0D, 2.0D).tex((double) f5, (double) f7).endVertex();
worldrenderer.pos(-7.0D, 2.0D, -2.0D).tex((double) f4, (double) f7).endVertex();
tessellator.draw();

GL11.glNormal3f(-scale, 0.0F, 0.0F);

worldrenderer.startDrawingQuads();
worldrenderer.addVertexWithUV(-7.0D, 2.0D, -2.0D, (double) f6, (double) f8);
worldrenderer.addVertexWithUV(-7.0D, 2.0D, 2.0D, (double) f7, (double) f8);
worldrenderer.addVertexWithUV(-7.0D, -2.0D, 2.0D, (double) f7, (double) f9);
worldrenderer.addVertexWithUV(-7.0D, -2.0D, -2.0D, (double) f6, (double) f9);
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX);
worldrenderer.pos(-7.0D, 2.0D, -2.0D).tex((double) f4, (double) f6).endVertex();
worldrenderer.pos(-7.0D, 2.0D, 2.0D).tex((double) f5, (double) f6).endVertex();
worldrenderer.pos(-7.0D, -2.0D, 2.0D).tex((double) f5, (double) f7).endVertex();
worldrenderer.pos(-7.0D, -2.0D, -2.0D).tex((double) f4, (double) f7).endVertex();
tessellator.draw();

for (int i = 0; i < 4; ++i)
@@ -94,11 +94,11 @@ public class RenderDart extends Render
GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
GL11.glNormal3f(0.0F, 0.0F, scale);

worldrenderer.startDrawingQuads();
worldrenderer.addVertexWithUV(-8.0D, -2.0D, 0.0D, (double) f2, (double) f4);
worldrenderer.addVertexWithUV(8.0D, -2.0D, 0.0D, (double) f3, (double) f4);
worldrenderer.addVertexWithUV(8.0D, 2.0D, 0.0D, (double) f3, (double) f5);
worldrenderer.addVertexWithUV(-8.0D, 2.0D, 0.0D, (double) f2, (double) f5);
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX);
worldrenderer.pos(-8.0D, -2.0D, 0.0D).tex((double) f, (double) f2).endVertex();
worldrenderer.pos(8.0D, -2.0D, 0.0D).tex((double) f1, (double) f2).endVertex();
worldrenderer.pos(8.0D, 2.0D, 0.0D).tex((double) f1, (double) f3).endVertex();
worldrenderer.pos(-8.0D, 2.0D, 0.0D).tex((double) f, (double) f3).endVertex();
tessellator.draw();
}

@@ -109,8 +109,8 @@ public class RenderDart extends Render
}

@Override
protected ResourceLocation getEntityTexture(Entity entity)
protected ResourceLocation getEntityTexture(EntityDart dart)
{
return dartTextures.get(((EntityDart) entity).getDartType());
return dartTextures.get(dart.getDartType());
}
}

+ 5
- 1
src/main/java/com/gildedgames/aether/client/renderer/tile_entity/TileEntityAltarRenderer.java View File

@@ -7,6 +7,7 @@ import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.client.resources.model.IBakedModel;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
@@ -70,7 +71,10 @@ public class TileEntityAltarRenderer extends TileEntitySpecialRenderer
GlStateManager.pushAttrib();

RenderHelper.enableStandardItemLighting();
itemRenderer.renderItemModel(entityItem.getEntityItem());

IBakedModel model = itemRenderer.getItemModelMesher().getItemModel(entityItem.getEntityItem());
itemRenderer.renderItem(entityItem.getEntityItem(), model);

RenderHelper.disableStandardItemLighting();

GlStateManager.popAttrib();


+ 5
- 2
src/main/java/com/gildedgames/aether/common/CommonEvents.java View File

@@ -30,6 +30,7 @@ import net.minecraftforge.event.entity.player.EntityInteractEvent;
import net.minecraftforge.event.entity.player.FillBucketEvent;
import net.minecraftforge.fluids.FluidContainerRegistry;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;

public class CommonEvents
@@ -45,11 +46,13 @@ public class CommonEvents

final BlockPos pos = event.target.getBlockPos().offset(event.target.sideHit);

if (FluidContainerRegistry.getFluidForFilledItem(event.current).getFluidID() == FluidRegistry.WATER.getID())
FluidStack fluidStack = FluidContainerRegistry.getFluidForFilledItem(event.current);

if (fluidStack.getFluid().getID() == FluidRegistry.WATER.getID())
{
this.onWaterPlaced(event, player, pos);
}
else if (FluidContainerRegistry.getFluidForFilledItem(event.current).getFluidID() == FluidRegistry.LAVA.getID())
else if (fluidStack.getFluid().getID() == FluidRegistry.LAVA.getID())
{
this.onLavaPlaced(event, player, pos);
}


+ 6
- 2
src/main/java/com/gildedgames/aether/common/blocks/natural/plants/BlockAetherSapling.java View File

@@ -1,11 +1,13 @@
package com.gildedgames.aether.common.blocks.natural.plants;

import com.gildedgames.aether.common.blocks.BlocksAether;
import com.gildedgames.aether.common.blocks.natural.BlockAetherLog;
import com.gildedgames.aether.common.blocks.util.variants.IAetherBlockWithVariants;
import com.gildedgames.aether.common.blocks.util.variants.blockstates.BlockVariant;
import com.gildedgames.aether.common.blocks.util.variants.blockstates.PropertyVariant;
import com.gildedgames.aether.common.world.features.trees.WorldGenSkyrootTree;
import net.minecraft.block.Block;
import net.minecraft.block.BlockLog;
import net.minecraft.block.IGrowable;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.PropertyInteger;
@@ -87,11 +89,13 @@ public class BlockAetherSapling extends BlockAetherPlant implements IGrowable, I

if (meta == BLUE_SKYROOT_SAPLING.getMeta())
{
treeGenerator = new WorldGenSkyrootTree(BlocksAether.skyroot_log, BlocksAether.blue_skyroot_leaves, 0, 4);
treeGenerator = new WorldGenSkyrootTree(BlocksAether.skyroot_log.getDefaultState().withProperty(BlockAetherLog.PROPERTY_AXIS, BlockLog.EnumAxis.Y),
BlocksAether.green_skyroot_leaves.getDefaultState());
}
else if (meta == GREEN_SKYROOT_SAPLING.getMeta())
{
treeGenerator = new WorldGenSkyrootTree(BlocksAether.skyroot_log, BlocksAether.green_skyroot_leaves, 0, 4);
treeGenerator = new WorldGenSkyrootTree(BlocksAether.skyroot_log.getDefaultState().withProperty(BlockAetherLog.PROPERTY_AXIS, BlockLog.EnumAxis.Y),
BlocksAether.blue_skyroot_leaves.getDefaultState());
}

if (treeGenerator != null)


+ 1
- 1
src/main/java/com/gildedgames/aether/common/entities/blocks/EntityFloatingBlock.java View File

@@ -74,7 +74,7 @@ public class EntityFloatingBlock extends Entity

if (!this.worldObj.isRemote)
{
if (this.worldObj.getGameRules().getGameRuleBooleanValue("doTileDrops"))
if (this.worldObj.getGameRules().getBoolean("doTileDrops"))
{
IBlockState state = this.getBlockState();



+ 1
- 1
src/main/java/com/gildedgames/aether/common/entities/living/EntitySheepuff.java View File

@@ -26,7 +26,7 @@ public class EntitySheepuff extends EntitySheep
}

@Override
public EntityAgeable createChild(EntityAgeable ageable)
public EntitySheepuff createChild(EntityAgeable ageable)
{
return new EntitySheepuff(this.worldObj);
}


+ 2
- 2
src/main/java/com/gildedgames/aether/common/entities/projectiles/EntityDart.java View File

@@ -314,8 +314,8 @@ public class EntityDart extends Entity implements IProjectile

if (this.shootingEntity instanceof EntityLivingBase)
{
EnchantmentHelper.func_151384_a(entity, this.shootingEntity);
EnchantmentHelper.func_151385_b((EntityLivingBase) this.shootingEntity, entity);
EnchantmentHelper.applyThornEnchantments((EntityLivingBase) this.shootingEntity, entity);
EnchantmentHelper.applyArthropodEnchantments(entity, this.shootingEntity);
}

if (this.shootingEntity != null && raytrace.entityHit != this.shootingEntity && raytrace.entityHit instanceof EntityPlayer && this.shootingEntity instanceof EntityPlayerMP)


+ 20
- 3
src/main/java/com/gildedgames/aether/common/tile_entities/TileEntityHolystoneFurnace.java View File

@@ -16,15 +16,15 @@ import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.FurnaceRecipes;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.server.gui.IUpdatePlayerListBox;
import net.minecraft.tileentity.TileEntityFurnace;
import net.minecraft.tileentity.TileEntityLockable;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.ITickable;
import net.minecraft.util.MathHelper;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

public class TileEntityHolystoneFurnace extends TileEntityLockable implements IUpdatePlayerListBox, ISidedInventory
public class TileEntityHolystoneFurnace extends TileEntityLockable implements ITickable, ISidedInventory
{
private static final int[]
slotsTop = new int[] { 0 },
@@ -84,6 +84,21 @@ public class TileEntityHolystoneFurnace extends TileEntityLockable implements IU
}
}

@Override
public ItemStack removeStackFromSlot(int index)
{
if (this.containedItemStacks[index] != null)
{
ItemStack itemstack = this.containedItemStacks[index];
this.containedItemStacks[index] = null;
return itemstack;
}
else
{
return null;
}
}

public ItemStack getStackInSlotOnClosing(int index)
{
if (this.containedItemStacks[index] != null)
@@ -120,11 +135,13 @@ public class TileEntityHolystoneFurnace extends TileEntityLockable implements IU
}
}

public String getCommandSenderName()
@Override
public String getName()
{
return this.hasCustomName() ? this.customName : "container.holystone_furnace";
}

@Override
public boolean hasCustomName()
{
return this.customName != null && this.customName.length() > 0;


+ 2
- 2
src/main/java/com/gildedgames/aether/common/tile_entities/TileEntitySkyrootChest.java View File

@@ -5,8 +5,8 @@ import net.minecraft.tileentity.TileEntityChest;
public class TileEntitySkyrootChest extends TileEntityChest
{
@Override
public String getCommandSenderName()
public String getName()
{
return this.hasCustomName() ? super.getCommandSenderName() : "container.skyroot_chest";
return this.hasCustomName() ? super.getName() : "container.skyroot_chest";
}
}

+ 7
- 3
src/main/java/com/gildedgames/aether/common/world/biome/BiomeGenAether.java View File

@@ -3,22 +3,26 @@ package com.gildedgames.aether.common.world.biome;
import java.util.Random;

import com.gildedgames.aether.common.blocks.BlocksAether;
import com.gildedgames.aether.common.blocks.natural.BlockAetherLeaves;
import com.gildedgames.aether.common.blocks.natural.BlockAetherLog;
import com.gildedgames.aether.common.world.features.trees.WorldGenSkyrootTree;

import net.minecraft.block.BlockLog;
import net.minecraft.world.gen.feature.WorldGenAbstractTree;

public class BiomeGenAether extends BiomeGenAetherBase
{
private final WorldGenSkyrootTree genGreenSkyrootTree = new WorldGenSkyrootTree(BlocksAether.skyroot_log, BlocksAether.green_skyroot_leaves, 1, 4);
private final WorldGenSkyrootTree genGreenSkyrootTree = new WorldGenSkyrootTree(BlocksAether.skyroot_log.getDefaultState().withProperty(BlockAetherLog.PROPERTY_AXIS, BlockLog.EnumAxis.Y),
BlocksAether.green_skyroot_leaves.getDefaultState());

private final WorldGenSkyrootTree genBlueSkyrootTree = new WorldGenSkyrootTree(BlocksAether.skyroot_log, BlocksAether.blue_skyroot_leaves, 1, 4);
private final WorldGenSkyrootTree genBlueSkyrootTree = new WorldGenSkyrootTree(BlocksAether.skyroot_log.getDefaultState().withProperty(BlockAetherLog.PROPERTY_AXIS, BlockLog.EnumAxis.Y),
BlocksAether.blue_skyroot_leaves.getDefaultState());

public BiomeGenAether(int id)
{
super(id);

}

@Override
public WorldGenAbstractTree genBigTreeChance(Random random)
{


+ 7
- 11
src/main/java/com/gildedgames/aether/common/world/features/trees/WorldGenSkyrootTree.java View File

@@ -3,6 +3,7 @@ package com.gildedgames.aether.common.world.features.trees;
import com.gildedgames.aether.common.blocks.BlocksAether;
import com.gildedgames.aether.common.blocks.natural.plants.BlockAetherPlant;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
@@ -11,19 +12,14 @@ import java.util.Random;

public class WorldGenSkyrootTree extends WorldGenAbstractTree
{
private final Block logBlock, leavesBlock;
private final IBlockState logState, leavesState;

private final int logMeta, leavesMeta;

public WorldGenSkyrootTree(Block logBlock, Block leavesBlock, int logMeta, int leavesMeta)
public WorldGenSkyrootTree(IBlockState logState, IBlockState leavesState)
{
super(true);

this.logBlock = logBlock;
this.leavesBlock = leavesBlock;

this.logMeta = logMeta;
this.leavesMeta = leavesMeta;
this.logState = logState;
this.leavesState = leavesState;
}

@Override
@@ -111,7 +107,7 @@ public class WorldGenSkyrootTree extends WorldGenAbstractTree

if (block.isAir(worldIn, pos) || block.isLeaves(worldIn, pos))
{
this.func_175905_a(worldIn, pos, this.leavesBlock, this.leavesMeta);
this.setBlockAndNotifyAdequately(worldIn, pos, this.leavesState);
}
}
}
@@ -125,7 +121,7 @@ public class WorldGenSkyrootTree extends WorldGenAbstractTree

if (block2.isAir(worldIn, upN) || block2.isLeaves(worldIn, upN))
{
this.func_175905_a(worldIn, position.up(l), this.logBlock, this.logMeta);
this.setBlockAndNotifyAdequately(worldIn, position.up(l), this.logState);
}
}



Loading…
Cancel
Save