diff --git a/client/src/main/java/client/Client.java b/client/src/main/java/client/Client.java index a71cfc8c..91a20138 100755 --- a/client/src/main/java/client/Client.java +++ b/client/src/main/java/client/Client.java @@ -65,7 +65,6 @@ import client.renderer.blockmodel.ModelManager; import client.renderer.chunk.RenderChunk; import client.renderer.entity.RenderItem; import client.renderer.entity.RenderManager; -import client.renderer.texture.ColormapLoader; import client.renderer.texture.EntityTexManager; import client.renderer.texture.TextureManager; import client.renderer.texture.TextureMap; @@ -638,7 +637,6 @@ public class Client implements IThreadListener { Font.unload(); Font.load(this.font); this.textureManager.onReload(); - ColormapLoader.reload(); this.modelManager.onReload(); this.renderItem.onReload(); this.blockRenderer.onReload(); @@ -653,7 +651,6 @@ public class Client implements IThreadListener { this.textureManager = new TextureManager(); this.textureManager.onReload(); this.soundManager = new SoundManager(this); - ColormapLoader.reload(); GlState.enableTexture2D(); GlState.shadeModel(GL11.GL_SMOOTH); GL11.glClearDepth(1.0D); diff --git a/client/src/main/java/client/gui/ingame/GuiCreateDimension.java b/client/src/main/java/client/gui/ingame/GuiCreateDimension.java index f4dab7a5..f2734c4d 100644 --- a/client/src/main/java/client/gui/ingame/GuiCreateDimension.java +++ b/client/src/main/java/client/gui/ingame/GuiCreateDimension.java @@ -111,27 +111,27 @@ public class GuiCreateDimension extends Gui { addPreset("Chaotische Höhlen", "UpperLmtScale:2.0,LowerLmtScale:64.0,SeaLevel:6"); addPreset("Viel Glück", "LiquidBlock:lava,SeaLevel:40"); - addFlatPreset("Klassisch", Biome.PLAINS, false, Blocks.dirt.getState(), Blocks.bedrock.getState(), 2, Blocks.dirt.getState(), + addFlatPreset("Klassisch", Biome.PLAIN, false, Blocks.dirt.getState(), Blocks.bedrock.getState(), 2, Blocks.dirt.getState(), Blocks.grass.getState()).enableVillages(); - addFlatPreset("Abbauwelt", Biome.EXTREMEHILLS, true, Blocks.stone.getState(), Blocks.bedrock.getState(), 230, Blocks.stone.getState(), + addFlatPreset("Abbauwelt", Biome.HILLS, true, Blocks.stone.getState(), Blocks.bedrock.getState(), 230, Blocks.stone.getState(), 5, Blocks.dirt.getState(), Blocks.grass.getState()).enableStrongholds().enableMineshafts().setDungeons(8); addFlatPreset("Wasserwelt", Biome.SEA, false, Blocks.stone.getState(), Blocks.bedrock.getState(), 5, Blocks.stone.getState(), 52, Blocks.dirt.getState(), 5, Blocks.sand.getState(), 90, Blocks.water.getState()); - addFlatPreset("Oberfläche", Biome.PLAINS, true, Blocks.stone.getState(), Blocks.bedrock.getState(), 59, Blocks.stone.getState(), + addFlatPreset("Oberfläche", Biome.PLAIN, true, Blocks.stone.getState(), Blocks.bedrock.getState(), 59, Blocks.stone.getState(), 3, Blocks.dirt.getState(), Blocks.grass.getState()).setBiomeReplacer(Blocks.gravel.getState()).enableVillages().enableStrongholds().enableMineshafts().setDungeons(8) .addLake(Blocks.water.getState(), null, Blocks.grass.getState(), 4, 0, 255, false).addLake(Blocks.lava.getState(), Blocks.stone.getState(), null, 8, 8, 255, true); - addFlatPreset("Verschneites Königreich", Biome.ICEPLAINS, false, Blocks.stone.getState(), Blocks.bedrock.getState(), 59, Blocks.stone.getState(), + addFlatPreset("Verschneites Königreich", Biome.ICE, false, Blocks.stone.getState(), Blocks.bedrock.getState(), 59, Blocks.stone.getState(), 3, Blocks.dirt.getState(), Blocks.grass.getState(), Blocks.snow_layer.getState()).enableVillages(); - addFlatPreset("Verschneites Königreich +", Biome.ICEPLAINS, true, Blocks.stone.getState(), Blocks.bedrock.getState(), 59, Blocks.stone.getState(), + addFlatPreset("Verschneites Königreich +", Biome.ICE, true, Blocks.stone.getState(), Blocks.bedrock.getState(), 59, Blocks.stone.getState(), 3, Blocks.dirt.getState(), Blocks.grass.getState(), Blocks.snow_layer.getState()).setBiomeReplacer(Blocks.gravel.getState()).enableVillages() .addLake(Blocks.water.getState(), null, Blocks.grass.getState(), 4, 0, 255, false); - addFlatPreset("Unendliche Grube", Biome.PLAINS, false, Blocks.dirt.getState(), 2, Blocks.cobblestone.getState(), 3, Blocks.dirt.getState(), Blocks.grass.getState()) + addFlatPreset("Unendliche Grube", Biome.PLAIN, false, Blocks.dirt.getState(), 2, Blocks.cobblestone.getState(), 3, Blocks.dirt.getState(), Blocks.grass.getState()) .setBiomeReplacer(Blocks.gravel.getState()).enableVillages(); addFlatPreset("Wüste", Biome.DESERT, false, Blocks.stone.getState(), Blocks.bedrock.getState(), 3, Blocks.stone.getState(), 52, Blocks.sandstone.getState()) diff --git a/client/src/main/java/client/init/RenderRegistry.java b/client/src/main/java/client/init/RenderRegistry.java index b1c085e5..973f05ad 100644 --- a/client/src/main/java/client/init/RenderRegistry.java +++ b/client/src/main/java/client/init/RenderRegistry.java @@ -54,15 +54,12 @@ import client.renderer.model.ModelPig; import client.renderer.model.ModelRabbit; import client.renderer.model.ModelSheep2; import client.renderer.model.ModelWolf; -import client.renderer.texture.TextureTicked; -import client.renderer.ticked.TextureFlamesFX1; -import client.renderer.ticked.TextureFlamesFX2; -import client.renderer.ticked.TextureFlamesFXMono1; -import client.renderer.ticked.TextureFlamesFXMono2; -import client.renderer.ticked.TextureLavaFX; -import client.renderer.ticked.TextureLavaFlowFX; -import client.renderer.ticked.TextureWaterFX; -import client.renderer.ticked.TextureWaterFlowFX; +import client.renderer.texture.TextureTicked.TextureCreator; +import client.renderer.ticked.TextureFlame; +import client.renderer.ticked.TextureMagma; +import client.renderer.ticked.TextureMagmaFlow; +import client.renderer.ticked.TextureWater; +import client.renderer.ticked.TextureWaterFlow; import common.entity.Entity; import common.entity.animal.EntityBat; import common.entity.animal.EntityChicken; @@ -161,14 +158,18 @@ public abstract class RenderRegistry { } } - public static void registerAnimations(Map> anim) { - anim.put(TextureAnimation.FIRE1, TextureFlamesFX1.class); - anim.put(TextureAnimation.FIRE2, TextureFlamesFX2.class); - anim.put(TextureAnimation.FLAME1, TextureFlamesFXMono1.class); - anim.put(TextureAnimation.FLAME2, TextureFlamesFXMono2.class); - anim.put(TextureAnimation.LAVAFLOW, TextureLavaFlowFX.class); - anim.put(TextureAnimation.LAVA, TextureLavaFX.class); - anim.put(TextureAnimation.WATERFLOW, TextureWaterFlowFX.class); - anim.put(TextureAnimation.WATER, TextureWaterFX.class); + public static void registerAnimations(Map anim) { + anim.put(TextureAnimation.FLAME_BASE, () -> new TextureFlame(0xffffffff, 0)); + anim.put(TextureAnimation.FLAME_OFFSET, () -> new TextureFlame(0xffffffff, 160)); + anim.put(TextureAnimation.BLACK_FLAME_BASE, () -> new TextureFlame(0xff202020, 0)); + anim.put(TextureAnimation.BLACK_FLAME_OFFSET, () -> new TextureFlame(0xff202020, 160)); + anim.put(TextureAnimation.BLUE_FLAME_BASE, () -> new TextureFlame(0xff4010ff, 0)); + anim.put(TextureAnimation.BLUE_FLAME_OFFSET, () -> new TextureFlame(0xff4010ff, 160)); + anim.put(TextureAnimation.MAGMA_FLOW, () -> new TextureMagmaFlow()); + anim.put(TextureAnimation.MAGMA_STILL, () -> new TextureMagma()); + anim.put(TextureAnimation.WATER_FLOW, () -> new TextureWaterFlow(0xffffffff)); + anim.put(TextureAnimation.WATER_STILL, () -> new TextureWater(0xffffffff)); + anim.put(TextureAnimation.SWAMP_WATER_FLOW, () -> new TextureWaterFlow(0xffe0ffae)); + anim.put(TextureAnimation.SWAMP_WATER_STILL, () -> new TextureWater(0xffe0ffae)); } } diff --git a/client/src/main/java/client/renderer/BlockRenderer.java b/client/src/main/java/client/renderer/BlockRenderer.java index 04d4c33b..944e220a 100755 --- a/client/src/main/java/client/renderer/BlockRenderer.java +++ b/client/src/main/java/client/renderer/BlockRenderer.java @@ -297,82 +297,42 @@ public class BlockRenderer worldRendererIn.addVertexData(bakedquad.getVertexData()); worldRendererIn.putBrightness4(brightnessIn, brightnessIn, brightnessIn, brightnessIn); - - if (bakedquad.hasTintIndex()) - { - int l = blockIn.colorMultiplier(blockAccessIn, blockPosIn, bakedquad.getTintIndex()); - -// if (EntityRenderer.anaglyphEnable) -// { -// l = TextureUtil.anaglyphColor(l); -// } - - float f = (float)(l >> 16 & 255) / 255.0F; - float f1 = (float)(l >> 8 & 255) / 255.0F; - float f2 = (float)(l & 255) / 255.0F; - worldRendererIn.putColorMultiplier(f, f1, f2, 4); - worldRendererIn.putColorMultiplier(f, f1, f2, 3); - worldRendererIn.putColorMultiplier(f, f1, f2, 2); - worldRendererIn.putColorMultiplier(f, f1, f2, 1); - } - worldRendererIn.putPosition(d0, d1, d2); } } - public void renderModelBrightnessColor(IBakedModel bakedModel, float p_178262_2_, float red, float green, float blue) + private void renderModelBrightnessColor(IBakedModel bakedModel, float brightness) { for (Facing enumfacing : Facing.values()) { - this.renderModelBrightnessColorQuads(p_178262_2_, red, green, blue, bakedModel.getFace(enumfacing)); + this.renderModelBrightnessColorQuads(brightness, bakedModel.getFace(enumfacing)); } - this.renderModelBrightnessColorQuads(p_178262_2_, red, green, blue, bakedModel.getQuads()); + this.renderModelBrightnessColorQuads(brightness, bakedModel.getQuads()); } private void renderModelBrightness(IBakedModel model, State p_178266_2_, float brightness, boolean p_178266_4_) { Block block = p_178266_2_.getBlock(); - block.setItemBounds(); GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F); - int i = block.getRenderColor(block.getEntityState(p_178266_2_)); - -// if (EntityRenderer.anaglyphEnable) -// { -// i = TextureUtil.anaglyphColor(i); -// } - - float f = (float)(i >> 16 & 255) / 255.0F; - float f1 = (float)(i >> 8 & 255) / 255.0F; - float f2 = (float)(i & 255) / 255.0F; if (!p_178266_4_) { GlState.color(brightness, brightness, brightness, 1.0F); } - this.renderModelBrightnessColor(model, brightness, f, f1, f2); + this.renderModelBrightnessColor(model, brightness); } - private void renderModelBrightnessColorQuads(float brightness, float red, float green, float blue, List listQuads) + private void renderModelBrightnessColorQuads(float brightness, List listQuads) { -// Tessellator tessellator = Tessellator.getInstance(); RenderBuffer worldrenderer = Tessellator.getBuffer(); for (BakedQuad bakedquad : listQuads) { worldrenderer.begin(GL11.GL_QUADS, DefaultVertexFormats.ITEM); worldrenderer.addVertexData(bakedquad.getVertexData()); - - if (bakedquad.hasTintIndex()) - { - worldrenderer.putColorRGB_F4(red * brightness, green * brightness, blue * brightness); - } - else - { - worldrenderer.putColorRGB_F4(brightness, brightness, brightness); - } - + worldrenderer.putColorRGB_F4(brightness, brightness, brightness); Vec3i vec3i = bakedquad.getFace().getDirectionVec(); worldrenderer.putNormal((float)vec3i.getX(), (float)vec3i.getY(), (float)vec3i.getZ()); Tessellator.draw(); @@ -395,10 +355,6 @@ public class BlockRenderer BlockLiquid blockliquid = (BlockLiquid)blockStateIn.getBlock(); blockliquid.setBlockBounds(blockAccess, blockPosIn); Sprite[] atextureatlassprite = this.fluids.get(blockliquid); - int i = blockliquid.colorMultiplier(blockAccess, blockPosIn, 0); - float f = (float)(i >> 16 & 255) / 255.0F; - float f1 = (float)(i >> 8 & 255) / 255.0F; - float f2 = (float)(i & 255) / 255.0F; boolean flag = blockliquid.canRender(blockAccess, blockPosIn.up(), Facing.UP); boolean flag1 = blockliquid.canRender(blockAccess, blockPosIn.down(), Facing.DOWN); boolean[] aboolean = new boolean[] {blockliquid.canRender(blockAccess, blockPosIn.north(), Facing.NORTH), blockliquid.canRender(blockAccess, blockPosIn.south(), Facing.SOUTH), blockliquid.canRender(blockAccess, blockPosIn.west(), Facing.WEST), blockliquid.canRender(blockAccess, blockPosIn.east(), Facing.EAST)}; @@ -414,11 +370,10 @@ public class BlockRenderer float f4 = 1.0F; float f5 = 0.8F; float f6 = 0.6F; - Material material = blockliquid.getMaterial(); - float f7 = this.getFluidHeight(blockAccess, blockPosIn, material); - float f8 = this.getFluidHeight(blockAccess, blockPosIn.south(), material); - float f9 = this.getFluidHeight(blockAccess, blockPosIn.east().south(), material); - float f10 = this.getFluidHeight(blockAccess, blockPosIn.east(), material); + float f7 = this.getFluidHeight(blockAccess, blockPosIn); + float f8 = this.getFluidHeight(blockAccess, blockPosIn.south()); + float f9 = this.getFluidHeight(blockAccess, blockPosIn.east().south()); + float f10 = this.getFluidHeight(blockAccess, blockPosIn.east()); double d0 = (double)blockPosIn.getX(); double d1 = (double)blockPosIn.getY(); double d2 = (double)blockPosIn.getZ(); @@ -477,9 +432,9 @@ public class BlockRenderer int k2 = blockliquid.getLightmapValue(blockAccess, blockPosIn); int l2 = k2 >> 16 & 65535; int i3 = k2 & 65535; - float f24 = f4 * f; - float f25 = f4 * f1; - float f26 = f4 * f2; + float f24 = f4; + float f25 = f4; + float f26 = f4; worldRendererIn.pos(d0 + 0.0D, d1 + (double)f7, d2 + 0.0D).color(f24, f25, f26, 1.0F).tex((double)f13, (double)f17).lightmap(l2, i3).endVertex(); worldRendererIn.pos(d0 + 0.0D, d1 + (double)f8, d2 + 1.0D).color(f24, f25, f26, 1.0F).tex((double)f14, (double)f18).lightmap(l2, i3).endVertex(); worldRendererIn.pos(d0 + 1.0D, d1 + (double)f9, d2 + 1.0D).color(f24, f25, f26, 1.0F).tex((double)f15, (double)f19).lightmap(l2, i3).endVertex(); @@ -594,9 +549,9 @@ public class BlockRenderer int k = j >> 16 & 65535; int l = j & 65535; float f31 = i1 < 2 ? f5 : f6; - float f32 = f4 * f31 * f; - float f33 = f4 * f31 * f1; - float f34 = f4 * f31 * f2; + float f32 = f4 * f31; + float f33 = f4 * f31; + float f34 = f4 * f31; worldRendererIn.pos(d3, d1 + (double)f39, d4).color(f32, f33, f34, 1.0F).tex((double)f41, (double)f28).lightmap(k, l).endVertex(); worldRendererIn.pos(d5, d1 + (double)f40, d6).color(f32, f33, f34, 1.0F).tex((double)f27, (double)f29).lightmap(k, l).endVertex(); worldRendererIn.pos(d5, d1 + 0.0D, d6).color(f32, f33, f34, 1.0F).tex((double)f27, (double)f30).lightmap(k, l).endVertex(); @@ -612,7 +567,7 @@ public class BlockRenderer } } - private float getFluidHeight(IBlockAccess blockAccess, BlockPos blockPosIn, Material blockMaterial) + private float getFluidHeight(IBlockAccess blockAccess, BlockPos blockPosIn) { int i = 0; float f = 0.0F; @@ -621,7 +576,7 @@ public class BlockRenderer { BlockPos blockpos = blockPosIn.add(-(j & 1), 0, -(j >> 1 & 1)); - if (blockAccess.getState(blockpos.up()).getBlock().getMaterial() == blockMaterial) + if (blockAccess.getState(blockpos.up()).getBlock().getMaterial().isLiquid()) { return 1.0F; } @@ -629,7 +584,7 @@ public class BlockRenderer State iblockstate = blockAccess.getState(blockpos); Material material = iblockstate.getBlock().getMaterial(); - if (material != blockMaterial) + if (!material.isLiquid()) { if (!material.isSolid()) { diff --git a/client/src/main/java/client/renderer/EffectRenderer.java b/client/src/main/java/client/renderer/EffectRenderer.java index fd1b4464..674e4cd7 100755 --- a/client/src/main/java/client/renderer/EffectRenderer.java +++ b/client/src/main/java/client/renderer/EffectRenderer.java @@ -708,7 +708,7 @@ public class EffectRenderer { this.offsetY = rng.floatv() * 3.0F; } - protected Icon(double x, double y, double z, State state, BlockPos pos, boolean hit) { + protected Icon(double x, double y, double z, State state, boolean hit) { this(x, y, z, hit ? 0.6f : 1.0f, Client.CLIENT.getBlockRendererDispatcher().getModelManager().getTexture(state)); this.gravity = 1.0F; this.red = this.green = this.blue = 0.6F; @@ -717,13 +717,6 @@ public class EffectRenderer { this.motionY = (this.motionY - 0.1) * 0.2 + 0.1; this.motionZ *= 0.2; } - Block block = state.getBlock(); - if(block == Blocks.grass) - return; - int color = pos == null ? block.getRenderColor(state) : block.colorMultiplier(world, pos, 0); - this.red *= (float)(color >> 16 & 255) / 255.0F; - this.green *= (float)(color >> 8 & 255) / 255.0F; - this.blue *= (float)(color & 255) / 255.0F; } protected Icon(double x, double y, double z, Item item) { @@ -971,7 +964,7 @@ public class EffectRenderer { }); this.register(ParticleType.BLOCK_CRACK, (x, y, z, id) -> { State state = BlockRegistry.byId(id); - return state == null ? null : new Icon(x, y, z, state, null, false); + return state == null ? null : new Icon(x, y, z, state, false); }); this.register(ParticleType.EXPLOSION_HUGE, (x, y, z, u) -> new ExplosionSpawner(x, y, z)); this.register(ParticleType.EXPLOSION_LARGE, @@ -1089,7 +1082,7 @@ public class EffectRenderer { double d0 = (double)pos.getX() + ((double)j + 0.5D) / (double)i; double d1 = (double)pos.getY() + ((double)k + 0.5D) / (double)i; double d2 = (double)pos.getZ() + ((double)l + 0.5D) / (double)i; - this.add(new Icon(d0, d1, d2, state, pos, false)); + this.add(new Icon(d0, d1, d2, state, false)); } } } @@ -1136,7 +1129,7 @@ public class EffectRenderer { d0 = (double)i + block.getBlockBoundsMaxX() + (double)f; } - this.add(new Icon(d0, d1, d2, iblockstate, pos, true)); + this.add(new Icon(d0, d1, d2, iblockstate, true)); } } diff --git a/client/src/main/java/client/renderer/ItemRenderer.java b/client/src/main/java/client/renderer/ItemRenderer.java index d4905345..5a3b5db8 100755 --- a/client/src/main/java/client/renderer/ItemRenderer.java +++ b/client/src/main/java/client/renderer/ItemRenderer.java @@ -21,7 +21,7 @@ import common.item.Item; import common.item.ItemAction; import common.item.ItemStack; import common.model.BlockLayer; -import common.model.Transform; +import common.model.GuiPosition; import common.util.BlockPos; import common.util.ExtMath; import common.util.Vec3; diff --git a/client/src/main/java/client/renderer/RenderBuffer.java b/client/src/main/java/client/renderer/RenderBuffer.java index 8b0e57ed..60ac2b84 100755 --- a/client/src/main/java/client/renderer/RenderBuffer.java +++ b/client/src/main/java/client/renderer/RenderBuffer.java @@ -287,36 +287,6 @@ public class RenderBuffer return ((this.vertexCount - p_78909_1_) * this.vertexFormat.getNextOffset() + this.vertexFormat.getColorOffset()) / 4; } - public void putColorMultiplier(float red, float green, float blue, int p_178978_4_) - { - int i = this.getColorIndex(p_178978_4_); - int j = -1; - - if (!this.noColor) - { - j = this.rawIntBuffer.get(i); - - if (ByteOrder.nativeOrder() == ByteOrder.LITTLE_ENDIAN) - { - int k = (int)((float)(j & 255) * red); - int l = (int)((float)(j >> 8 & 255) * green); - int i1 = (int)((float)(j >> 16 & 255) * blue); - j = j & -16777216; - j = j | i1 << 16 | l << 8 | k; - } - else - { - int j1 = (int)((float)(j >> 24 & 255) * red); - int k1 = (int)((float)(j >> 16 & 255) * green); - int l1 = (int)((float)(j >> 8 & 255) * blue); - j = j & 255; - j = j | j1 << 24 | k1 << 16 | l1 << 8; - } - } - - this.rawIntBuffer.put(i, j); - } - private void putColor(int argb, int p_178988_2_) { int i = this.getColorIndex(p_178988_2_); diff --git a/client/src/main/java/client/renderer/blockmodel/BakedModel.java b/client/src/main/java/client/renderer/blockmodel/BakedModel.java index 66a3f299..8bdd93f8 100755 --- a/client/src/main/java/client/renderer/blockmodel/BakedModel.java +++ b/client/src/main/java/client/renderer/blockmodel/BakedModel.java @@ -5,10 +5,10 @@ import java.util.List; import client.renderer.texture.Sprite; import common.collect.Lists; -import common.model.Transform; +import common.model.GuiPosition; import common.util.Facing; -public record BakedModel(List getQuads, List> getFace, boolean isGui3d, Sprite getBaseTexture, Transform getTransforms) implements IBakedModel { +public record BakedModel(List getQuads, List> getFace, boolean isGui3d, Sprite getBaseTexture, GuiPosition getTransforms) implements IBakedModel { public List getFace(Facing face) { return this.getFace.get(face.ordinal()); } @@ -22,7 +22,7 @@ public record BakedModel(List getQuads, List> getFace private final List> faces; private Sprite texture; private boolean gui3d; - private Transform transforms; + private GuiPosition transforms; public Builder(ModelBlock model) { this(model.isGui3d(), model.getTransform()); @@ -51,7 +51,7 @@ public record BakedModel(List getQuads, List> getFace } } - private Builder(boolean gui3d, Transform transforms) { + private Builder(boolean gui3d, GuiPosition transforms) { this.quads = Lists.newArrayList(); this.faces = new ArrayList>(6); diff --git a/client/src/main/java/client/renderer/blockmodel/BuiltInModel.java b/client/src/main/java/client/renderer/blockmodel/BuiltInModel.java index 59e962a6..f5bd43cf 100755 --- a/client/src/main/java/client/renderer/blockmodel/BuiltInModel.java +++ b/client/src/main/java/client/renderer/blockmodel/BuiltInModel.java @@ -3,10 +3,10 @@ package client.renderer.blockmodel; import java.util.List; import client.renderer.texture.Sprite; -import common.model.Transform; +import common.model.GuiPosition; import common.util.Facing; -public record BuiltInModel(Transform getTransforms) implements IBakedModel { +public record BuiltInModel(GuiPosition getTransforms) implements IBakedModel { public List getFace(Facing face) { return null; } diff --git a/client/src/main/java/client/renderer/blockmodel/IBakedModel.java b/client/src/main/java/client/renderer/blockmodel/IBakedModel.java index 15a65980..7310418c 100755 --- a/client/src/main/java/client/renderer/blockmodel/IBakedModel.java +++ b/client/src/main/java/client/renderer/blockmodel/IBakedModel.java @@ -3,7 +3,7 @@ package client.renderer.blockmodel; import java.util.List; import client.renderer.texture.Sprite; -import common.model.Transform; +import common.model.GuiPosition; import common.util.Facing; public interface IBakedModel @@ -18,5 +18,5 @@ public interface IBakedModel Sprite getBaseTexture(); - Transform getTransforms(); + GuiPosition getTransforms(); } diff --git a/client/src/main/java/client/renderer/blockmodel/ModelBakery.java b/client/src/main/java/client/renderer/blockmodel/ModelBakery.java index 13813dc7..2ccb13eb 100755 --- a/client/src/main/java/client/renderer/blockmodel/ModelBakery.java +++ b/client/src/main/java/client/renderer/blockmodel/ModelBakery.java @@ -22,7 +22,7 @@ import common.item.Item; import common.model.Model; import common.model.ModelProvider; import common.model.ModelRotation; -import common.model.Transform; +import common.model.GuiPosition; import common.util.Facing; import common.util.Pair; import common.world.State; @@ -74,7 +74,7 @@ public abstract class ModelBakery if(extra != null) { for(String sprite : extra) { loc = "item/" + sprite; - models.put(loc, new ModelBlock(Transform.IDENTITY, sprite)); + models.put(loc, new ModelBlock(GuiPosition.NORMAL, sprite)); itemLocations.add(loc); } } @@ -211,16 +211,14 @@ public abstract class ModelBakery private static final ModelBlock getModel(Item item, ModelProvider provider, String name) { ModelBlock model = (ModelBlock)item.getCustomModel(provider, name); if(model != null) - return new ModelBlock(model, item.getCustomTransform()); + return new ModelBlock(model, item.getCustomPosition()); if(item.hasBuiltinModel()) - return new ModelBlock(MODEL_ENTITY, Transform.IDENTITY); + return new ModelBlock(MODEL_ENTITY, GuiPosition.NORMAL); Block block = item.getBlock(); - if(block != null && block.getRenderType() != 3) - return new ModelBlock(MODEL_ENTITY, Transform.IDENTITY); State state = block == null ? null : block.getItemState(); if(state != null) - return new ModelBlock((ModelBlock)state.getBlock().getModel(provider, BlockRegistry.getName(state.getBlock()), state), state.getBlock().getTransform()); - return new ModelBlock(Transform.IDENTITY, item.getTextures(name)); + return new ModelBlock((ModelBlock)state.getBlock().getModel(provider, BlockRegistry.getName(state.getBlock()), state), state.getBlock().getItemPosition()); + return new ModelBlock(GuiPosition.NORMAL, item.getTextures(name)); } private static IBakedModel bakeModel(Map sprites, FaceBakery faceBakery, diff --git a/client/src/main/java/client/renderer/blockmodel/ModelBlock.java b/client/src/main/java/client/renderer/blockmodel/ModelBlock.java index 76fb2635..f819e291 100755 --- a/client/src/main/java/client/renderer/blockmodel/ModelBlock.java +++ b/client/src/main/java/client/renderer/blockmodel/ModelBlock.java @@ -8,7 +8,7 @@ import common.collect.Maps; import common.model.Model; import common.model.ModelProvider; import common.model.ModelRotation; -import common.model.Transform; +import common.model.GuiPosition; import common.util.Facing; import common.util.Vector3f; @@ -27,7 +27,7 @@ public class ModelBlock extends Model { private ModelRotation rotation; private boolean uvLock; - private Transform transform; + private GuiPosition transform; private BlockPart lastPart; private BlockPartFace[] last; @@ -79,13 +79,6 @@ public class ModelBlock extends Model { return this; } - public ModelBlock tint() { - for(BlockPartFace last : this.last) { - last.tint = 0; - } - return this; - } - public ModelBlock rot(int rot) { for(BlockPartFace last : this.last) { last.uv = new BlockFaceUV(last.uv.uvs, rot); @@ -106,29 +99,29 @@ public class ModelBlock extends Model { public ModelBlock(String primary) { - this(null, Lists.newArrayList(), primary != null && primary.indexOf('/') == -1 ? "blocks/" + primary : primary, true, true, Transform.IDENTITY, null); + this(null, Lists.newArrayList(), primary != null && primary.indexOf('/') == -1 ? "blocks/" + primary : primary, true, true, GuiPosition.NORMAL, null); } - public ModelBlock(Transform transform, String ... layers) { + public ModelBlock(GuiPosition transform, String ... layers) { this(ModelBakery.MODEL_GENERATED, ModelBakery.MODEL_GENERATED.elements, layers[0].indexOf('/') == -1 ? "items/" + layers[0] : layers[0], false, false, transform, layers); } - public ModelBlock(ModelBlock parent, Transform transform) { + public ModelBlock(ModelBlock parent, GuiPosition transform) { this(parent, Lists.newArrayList(), parent.getPrimary(), false, true, transform, null); } - public ModelBlock(String primary, Transform transform, String ... layers) { + public ModelBlock(String primary, GuiPosition transform, String ... layers) { this(ModelBakery.MODEL_GENERATED, ModelBakery.MODEL_GENERATED.elements, primary.indexOf('/') == -1 ? "items/" + primary : primary, false, false, transform, layers); } - public ModelBlock(String primary, List elements, Transform transform, String ... layers) { + public ModelBlock(String primary, List elements, GuiPosition transform, String ... layers) { this(null, elements, primary, false, false, transform, layers); } private ModelBlock(ModelBlock parent, List elements, String primary, boolean occlude, boolean gui3d, - Transform transform, String[] layers) { + GuiPosition transform, String[] layers) { for(int z = 0; layers != null && z < layers.length; z++) { layers[z] = layers[z].indexOf('/') == -1 ? "items/" + layers[z] : layers[z]; } @@ -166,7 +159,7 @@ public class ModelBlock extends Model { return this.parent; } - public Transform getTransform() { + public GuiPosition getTransform() { return this.transform; } diff --git a/client/src/main/java/client/renderer/blockmodel/ModelManager.java b/client/src/main/java/client/renderer/blockmodel/ModelManager.java index 95e80ac7..0d20ab73 100755 --- a/client/src/main/java/client/renderer/blockmodel/ModelManager.java +++ b/client/src/main/java/client/renderer/blockmodel/ModelManager.java @@ -8,6 +8,8 @@ import java.util.Set; import client.renderer.texture.Sprite; import client.renderer.texture.TextureMap; import common.block.Block; +import common.block.liquid.BlockDynamicLiquid; +import common.block.liquid.BlockLiquid; import common.collect.Maps; import common.init.BlockRegistry; import common.properties.Property; @@ -74,11 +76,9 @@ public class ModelManager Block block = state.getBlock(); IBakedModel model = this.getModelForState(state); - if (model == null || model == this.defaultModel) + if ((model == null || model == this.defaultModel) && block.getMaterial().isLiquid()) { - String tex = block.getFallbackTexture(); - if(tex != null) - return this.texMap.getAtlasSprite("blocks/" + tex); + return this.texMap.getAtlasSprite("blocks/" + BlockRegistry.getName(block instanceof BlockDynamicLiquid liquid ? liquid.getStaticBlock() : block) + "_still"); } if (model == null) diff --git a/client/src/main/java/client/renderer/entity/RenderItem.java b/client/src/main/java/client/renderer/entity/RenderItem.java index d31bd898..2ec89c49 100755 --- a/client/src/main/java/client/renderer/entity/RenderItem.java +++ b/client/src/main/java/client/renderer/entity/RenderItem.java @@ -23,7 +23,7 @@ import common.item.ItemStack; import common.item.WieldType; import common.item.material.ItemArmor; import common.item.material.ItemHorseArmor; -import common.model.Transform; +import common.model.GuiPosition; import common.util.Facing; import common.util.Vec3i; @@ -331,8 +331,8 @@ public class RenderItem GlState.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GlState.color(1.0F, 1.0F, 1.0F, 1.0F); this.setupGuiTransform(x, y, ibakedmodel.isGui3d()); - Transform vec = ibakedmodel.getTransforms(); - if(vec != Transform.IDENTITY) { + GuiPosition vec = ibakedmodel.getTransforms(); + if(vec != GuiPosition.NORMAL) { GL11.glTranslatef(vec.translationX(), vec.translationY(), vec.translationZ()); GL11.glRotatef(vec.rotationY(), 0.0F, 1.0F, 0.0F); GL11.glRotatef(vec.rotationX(), 1.0F, 0.0F, 0.0F); diff --git a/client/src/main/java/client/renderer/entity/RenderItemEntity.java b/client/src/main/java/client/renderer/entity/RenderItemEntity.java index 1606717c..3a6d29e5 100755 --- a/client/src/main/java/client/renderer/entity/RenderItemEntity.java +++ b/client/src/main/java/client/renderer/entity/RenderItemEntity.java @@ -7,7 +7,7 @@ import client.renderer.texture.TextureMap; import common.entity.Entity; import common.item.Item; import common.item.ItemStack; -import common.model.Transform; +import common.model.GuiPosition; public class RenderItemEntity extends Render diff --git a/client/src/main/java/client/renderer/layers/LayerHeldItem.java b/client/src/main/java/client/renderer/layers/LayerHeldItem.java index 18545f22..250f5e69 100755 --- a/client/src/main/java/client/renderer/layers/LayerHeldItem.java +++ b/client/src/main/java/client/renderer/layers/LayerHeldItem.java @@ -10,7 +10,7 @@ import common.entity.types.EntityLiving; import common.init.Items; import common.item.Item; import common.item.ItemStack; -import common.model.Transform; +import common.model.GuiPosition; public class LayerHeldItem implements LayerRenderer { diff --git a/client/src/main/java/client/renderer/texture/ColormapLoader.java b/client/src/main/java/client/renderer/texture/ColormapLoader.java deleted file mode 100644 index 96ff88c2..00000000 --- a/client/src/main/java/client/renderer/texture/ColormapLoader.java +++ /dev/null @@ -1,27 +0,0 @@ -package client.renderer.texture; - -import java.awt.image.BufferedImage; - -import client.util.FileUtils; -import common.color.Colorizer; - -public abstract class ColormapLoader { - private static final String GRASS_TEX = "textures/world/grass.png"; - private static final String FOLIAGE_TEX = "textures/world/foliage.png"; - - public static void reload() { - BufferedImage img; - try { - img = TextureUtil.readImage(FileUtils.getResource(GRASS_TEX)); - img.getRGB(0, 0, 256, 256, Colorizer.getGrassMap(), 0, 256); - } - catch(Exception e) { - } - try { - img = TextureUtil.readImage(FileUtils.getResource(FOLIAGE_TEX)); - img.getRGB(0, 0, 256, 256, Colorizer.getFoliageMap(), 0, 256); - } - catch(Exception e) { - } - } -} diff --git a/client/src/main/java/client/renderer/texture/Sprite.java b/client/src/main/java/client/renderer/texture/Sprite.java index 16118d05..135eafb5 100755 --- a/client/src/main/java/client/renderer/texture/Sprite.java +++ b/client/src/main/java/client/renderer/texture/Sprite.java @@ -4,6 +4,7 @@ import java.awt.image.BufferedImage; import java.io.IOException; import java.util.List; +import client.renderer.texture.TextureTicked.TextureCreator; import common.collect.Lists; public class Sprite @@ -197,15 +198,10 @@ public class Sprite } } - public void loadSprite(Class tex) + public void loadSprite(TextureCreator tex) { this.resetSprite(); - try { - this.tickedTexture = tex.getConstructor().newInstance(); - } - catch(Exception e) { - throw new RuntimeException(e); - } + this.tickedTexture = tex.create(); this.height = this.width = this.tickedTexture.getSize(); int[] aint = new int[this.height * this.width]; this.framesTextureData.add(aint); diff --git a/client/src/main/java/client/renderer/texture/TextureMap.java b/client/src/main/java/client/renderer/texture/TextureMap.java index 77f65bc1..eaf5450b 100755 --- a/client/src/main/java/client/renderer/texture/TextureMap.java +++ b/client/src/main/java/client/renderer/texture/TextureMap.java @@ -10,6 +10,7 @@ import java.util.Map.Entry; import client.init.RenderRegistry; import client.renderer.GlState; +import client.renderer.texture.TextureTicked.TextureCreator; import client.util.FileUtils; import common.block.Block; import common.collect.Lists; @@ -26,7 +27,7 @@ public class TextureMap extends Texture private final List listAnimatedSprites; private final Map mapRegisteredSprites; private final Map mapUploadedSprites; - private final Map> tickedTextures; + private final Map tickedTextures; private final Map animTextures; private final Sprite missingImage; @@ -35,11 +36,11 @@ public class TextureMap extends Texture this.listAnimatedSprites = Lists.newArrayList(); this.mapRegisteredSprites = Maps.newHashMap(); this.mapUploadedSprites = Maps.newHashMap(); - this.tickedTextures = Maps.>newHashMap(); + this.tickedTextures = Maps.newHashMap(); this.animTextures = Maps.newHashMap(); this.missingImage = new Sprite(MISSING); Map map = Maps.newHashMap(); - Map> anim = Maps.newHashMap(); + Map anim = Maps.newHashMap(); RenderRegistry.registerAnimations(anim); for(Block block : BlockRegistry.blocks()) { block.getAnimatedTextures(map); @@ -49,7 +50,7 @@ public class TextureMap extends Texture this.animTextures.put("blocks/" + entry.getKey(), (Integer)entry.getValue()); } else { - Class clazz = anim.get((TextureAnimation)entry.getValue()); + TextureCreator clazz = anim.get((TextureAnimation)entry.getValue()); if(clazz == null) throw new RuntimeException("Animation '" + entry.getValue() + "' existiert nicht"); this.tickedTextures.put("blocks/" + entry.getKey(), clazz); @@ -97,7 +98,7 @@ public class TextureMap extends Texture try { - Class animationmetadatasection = this.tickedTextures.get(textureatlassprite.getIconName()); + TextureCreator animationmetadatasection = this.tickedTextures.get(textureatlassprite.getIconName()); if(animationmetadatasection != null) { textureatlassprite.loadSprite(animationmetadatasection); diff --git a/client/src/main/java/client/renderer/texture/TextureTicked.java b/client/src/main/java/client/renderer/texture/TextureTicked.java index b2f0fa68..aab29f36 100755 --- a/client/src/main/java/client/renderer/texture/TextureTicked.java +++ b/client/src/main/java/client/renderer/texture/TextureTicked.java @@ -1,6 +1,10 @@ package client.renderer.texture; public abstract class TextureTicked { + public static interface TextureCreator { + TextureTicked create(); + } + public abstract void renderStep(int[] data); public int getSize() { diff --git a/client/src/main/java/client/renderer/ticked/TextureFlamesFX1.java b/client/src/main/java/client/renderer/ticked/TextureFlame.java similarity index 68% rename from client/src/main/java/client/renderer/ticked/TextureFlamesFX1.java rename to client/src/main/java/client/renderer/ticked/TextureFlame.java index 470957bc..1f034f1a 100755 --- a/client/src/main/java/client/renderer/ticked/TextureFlamesFX1.java +++ b/client/src/main/java/client/renderer/ticked/TextureFlame.java @@ -3,20 +3,22 @@ package client.renderer.ticked; import client.renderer.texture.TextureTicked; -public class TextureFlamesFX1 extends TextureTicked +public class TextureFlame extends TextureTicked { - private final boolean mono; + private final int color; - public TextureFlamesFX1(boolean mono) + public TextureFlame(int color, int pre) { field_1133_g = new float[320]; field_1132_h = new float[320]; - this.mono = mono; + this.color = color; + if(pre > 0) { + int[] tex = new int[256]; + for(int z = 0; z < pre; z++) { + this.renderStep(tex); + } + } } - - public TextureFlamesFX1() { - this(false); - } public void renderStep(int textureData[]) { @@ -65,13 +67,13 @@ public class TextureFlamesFX1 extends TextureTicked f = 0.0F; } float f2 = f; - int j1 = (int)(f2 * 155F + 100F); - int l1 = (int)(f2 * f2 * 255F); - int j2 = (int)(f2 * f2 * f2 * f2 * f2 * f2 * f2 * f2 * f2 * f2 * 255F); - int c = 255; + int r = (int)(f2 * 155F + 100F); + int g = (int)(f2 * f2 * 255F); + int b = (int)(f2 * f2 * f2 * f2 * f2 * f2 * f2 * f2 * f2 * f2 * 255F); + int a = 255; if(f2 < 0.5F) { - c = 0; + a = 0; } f2 = (f2 - 0.5F) * 2.0F; // if(flag) @@ -83,13 +85,14 @@ public class TextureFlamesFX1 extends TextureTicked // l1 = i3; // j2 = j3; // } - if(this.mono) { - j2 = (j1 + l1 + j2) / 3; - textureData[k] = (c << 24) | (j2 << 16) | (j2 << 8) | j2; + if(this.color != 0xffffffff) { + b = (r + g + b) / 3; + r = (b * ((this.color >> 16) & 0xff)) / 255; + g = (b * ((this.color >> 8) & 0xff)) / 255; + b = (b * (this.color & 0xff)) / 255; + a = (a * ((this.color >> 24) & 0xff)) / 255; } - else { - textureData[k] = (c << 24) | (j1 << 16) | (l1 << 8) | j2; - } + textureData[k] = (a << 24) | (r << 16) | (g << 8) | b; } } diff --git a/client/src/main/java/client/renderer/ticked/TextureFlamesFX2.java b/client/src/main/java/client/renderer/ticked/TextureFlamesFX2.java deleted file mode 100755 index 89ede386..00000000 --- a/client/src/main/java/client/renderer/ticked/TextureFlamesFX2.java +++ /dev/null @@ -1,17 +0,0 @@ -package client.renderer.ticked; - -public class TextureFlamesFX2 extends TextureFlamesFX1 { - public TextureFlamesFX2(boolean mono) - { - super(mono); - int[] tex = new int[256]; - for(int z = 0; z < 160; z++) { - this.renderStep(tex); - } - } - - public TextureFlamesFX2() - { - this(false); - } -} diff --git a/client/src/main/java/client/renderer/ticked/TextureFlamesFXMono1.java b/client/src/main/java/client/renderer/ticked/TextureFlamesFXMono1.java deleted file mode 100644 index df13b2a8..00000000 --- a/client/src/main/java/client/renderer/ticked/TextureFlamesFXMono1.java +++ /dev/null @@ -1,7 +0,0 @@ -package client.renderer.ticked; - -public class TextureFlamesFXMono1 extends TextureFlamesFX1 { - public TextureFlamesFXMono1() { - super(true); - } -} diff --git a/client/src/main/java/client/renderer/ticked/TextureFlamesFXMono2.java b/client/src/main/java/client/renderer/ticked/TextureFlamesFXMono2.java deleted file mode 100644 index 2c4a094f..00000000 --- a/client/src/main/java/client/renderer/ticked/TextureFlamesFXMono2.java +++ /dev/null @@ -1,7 +0,0 @@ -package client.renderer.ticked; - -public class TextureFlamesFXMono2 extends TextureFlamesFX2 { - public TextureFlamesFXMono2() { - super(true); - } -} diff --git a/client/src/main/java/client/renderer/ticked/TextureLavaFX.java b/client/src/main/java/client/renderer/ticked/TextureMagma.java similarity index 94% rename from client/src/main/java/client/renderer/ticked/TextureLavaFX.java rename to client/src/main/java/client/renderer/ticked/TextureMagma.java index af7811d0..780c5fa1 100755 --- a/client/src/main/java/client/renderer/ticked/TextureLavaFX.java +++ b/client/src/main/java/client/renderer/ticked/TextureMagma.java @@ -3,10 +3,9 @@ package client.renderer.ticked; import client.renderer.texture.TextureTicked; import common.util.ExtMath; -public class TextureLavaFX extends TextureTicked +public class TextureMagma extends TextureTicked { - - public TextureLavaFX() + public TextureMagma() { field_1147_g = new float[256]; field_1146_h = new float[256]; diff --git a/client/src/main/java/client/renderer/ticked/TextureLavaFlowFX.java b/client/src/main/java/client/renderer/ticked/TextureMagmaFlow.java similarity index 94% rename from client/src/main/java/client/renderer/ticked/TextureLavaFlowFX.java rename to client/src/main/java/client/renderer/ticked/TextureMagmaFlow.java index 2948f938..9d66a3fd 100755 --- a/client/src/main/java/client/renderer/ticked/TextureLavaFlowFX.java +++ b/client/src/main/java/client/renderer/ticked/TextureMagmaFlow.java @@ -3,10 +3,9 @@ package client.renderer.ticked; import client.renderer.texture.TextureTicked; import common.util.ExtMath; -public class TextureLavaFlowFX extends TextureTicked +public class TextureMagmaFlow extends TextureTicked { - - public TextureLavaFlowFX() + public TextureMagmaFlow() { field_1143_g = new float[256]; field_1142_h = new float[256]; diff --git a/client/src/main/java/client/renderer/ticked/TextureWaterFX.java b/client/src/main/java/client/renderer/ticked/TextureWater.java similarity index 80% rename from client/src/main/java/client/renderer/ticked/TextureWaterFX.java rename to client/src/main/java/client/renderer/ticked/TextureWater.java index 7deb1c2f..85e9a1cf 100755 --- a/client/src/main/java/client/renderer/ticked/TextureWaterFX.java +++ b/client/src/main/java/client/renderer/ticked/TextureWater.java @@ -3,11 +3,13 @@ package client.renderer.ticked; import client.renderer.texture.TextureTicked; -public class TextureWaterFX extends TextureTicked -{ +public class TextureWater extends TextureTicked +{ + private final int color; - public TextureWaterFX() - { + public TextureWater(int color) + { + this.color = color; field_1158_g = new float[256]; field_1157_h = new float[256]; field_1156_i = new float[256]; @@ -72,15 +74,13 @@ public class TextureWaterFX extends TextureTicked int g = (int)(50F + f2 * 64F); int b = 255; int a = (int)(146F + f2 * 50F); -// if(flag) -// { -// int i3 = (l1 * 30 + j2 * 59 + k2 * 11) / 100; -// int j3 = (l1 * 30 + j2 * 70) / 100; -// int k3 = (l1 * 30 + k2 * 70) / 100; -// l1 = i3; -// j2 = j3; -// k2 = k3; -// } + if(this.color != 0xffffffff) + { + r = (r * ((this.color >> 16) & 0xff)) / 255; + g = (g * ((this.color >> 8) & 0xff)) / 255; + b = (b * (this.color & 0xff)) / 255; + a = (a * ((this.color >> 24) & 0xff)) / 255; + } textureData[i1] = (a << 24) | (r << 16) | (g << 8) | b; } diff --git a/client/src/main/java/client/renderer/ticked/TextureWaterFlowFX.java b/client/src/main/java/client/renderer/ticked/TextureWaterFlow.java similarity index 82% rename from client/src/main/java/client/renderer/ticked/TextureWaterFlowFX.java rename to client/src/main/java/client/renderer/ticked/TextureWaterFlow.java index b28f2c18..3bbf1d1a 100755 --- a/client/src/main/java/client/renderer/ticked/TextureWaterFlowFX.java +++ b/client/src/main/java/client/renderer/ticked/TextureWaterFlow.java @@ -3,11 +3,13 @@ package client.renderer.ticked; import client.renderer.texture.TextureTicked; -public class TextureWaterFlowFX extends TextureTicked -{ +public class TextureWaterFlow extends TextureTicked +{ + private final int color; - public TextureWaterFlowFX() - { + public TextureWaterFlow(int color) + { + this.color = color; field_1138_g = new float[256]; field_1137_h = new float[256]; field_1136_i = new float[256]; @@ -71,16 +73,14 @@ public class TextureWaterFlowFX extends TextureTicked int r = (int)(32F + v * 32F); int g = (int)(50F + v * 64F); int b = 255; - int a = (int)(146F + v * 50F); -// if(flag) -// { -// int i3 = (l1 * 30 + j2 * 59 + k2 * 11) / 100; -// int j3 = (l1 * 30 + j2 * 70) / 100; -// int k3 = (l1 * 30 + k2 * 70) / 100; -// l1 = i3; -// j2 = j3; -// k2 = k3; -// } + int a = (int)(146F + v * 50F); + if(this.color != 0xffffffff) + { + r = (r * ((this.color >> 16) & 0xff)) / 255; + g = (g * ((this.color >> 8) & 0xff)) / 255; + b = (b * (this.color & 0xff)) / 255; + a = (a * ((this.color >> 24) & 0xff)) / 255; + } textureData[(i1 & 0x0f) | ((i1 & 0xf0) * 2)] = textureData[((i1 & 0x0f) + 16) | ((i1 & 0xf0) * 2)] = textureData[(i1 & 0x0f) | (((i1 & 0xf0) + 256) * 2)] = textureData[((i1 & 0x0f) + 16) | (((i1 & 0xf0) + 256) * 2)] = (a << 24) | (r << 16) | (g << 8) | b; diff --git a/client/src/main/resources/textures/blocks/acacia_leaves_spring.png b/client/src/main/resources/textures/blocks/acacia_leaves_spring.png index d54eb17d..f4505a15 100755 Binary files a/client/src/main/resources/textures/blocks/acacia_leaves_spring.png and b/client/src/main/resources/textures/blocks/acacia_leaves_spring.png differ diff --git a/client/src/main/resources/textures/blocks/acacia_leaves_summer.png b/client/src/main/resources/textures/blocks/acacia_leaves_summer.png index c66ab48b..a3620e46 100755 Binary files a/client/src/main/resources/textures/blocks/acacia_leaves_summer.png and b/client/src/main/resources/textures/blocks/acacia_leaves_summer.png differ diff --git a/client/src/main/resources/textures/blocks/arcane_portal.png b/client/src/main/resources/textures/blocks/arcane_portal.png new file mode 100755 index 00000000..ba59c15f Binary files /dev/null and b/client/src/main/resources/textures/blocks/arcane_portal.png differ diff --git a/client/src/main/resources/textures/blocks/birch_leaves_spring.png b/client/src/main/resources/textures/blocks/birch_leaves_spring.png index a6773aff..7e7ba33e 100755 Binary files a/client/src/main/resources/textures/blocks/birch_leaves_spring.png and b/client/src/main/resources/textures/blocks/birch_leaves_spring.png differ diff --git a/client/src/main/resources/textures/blocks/birch_leaves_summer.png b/client/src/main/resources/textures/blocks/birch_leaves_summer.png index 2becfb1a..ff8f6671 100755 Binary files a/client/src/main/resources/textures/blocks/birch_leaves_summer.png and b/client/src/main/resources/textures/blocks/birch_leaves_summer.png differ diff --git a/client/src/main/resources/textures/blocks/chaos_portal.png b/client/src/main/resources/textures/blocks/chaos_portal.png new file mode 100755 index 00000000..929dec26 Binary files /dev/null and b/client/src/main/resources/textures/blocks/chaos_portal.png differ diff --git a/client/src/main/resources/textures/blocks/crimson_portal.png b/client/src/main/resources/textures/blocks/crimson_portal.png new file mode 100755 index 00000000..6921f6d1 Binary files /dev/null and b/client/src/main/resources/textures/blocks/crimson_portal.png differ diff --git a/client/src/main/resources/textures/blocks/dark_oak_leaves_spring.png b/client/src/main/resources/textures/blocks/dark_oak_leaves_spring.png index a6773aff..84782f7e 100755 Binary files a/client/src/main/resources/textures/blocks/dark_oak_leaves_spring.png and b/client/src/main/resources/textures/blocks/dark_oak_leaves_spring.png differ diff --git a/client/src/main/resources/textures/blocks/dark_oak_leaves_summer.png b/client/src/main/resources/textures/blocks/dark_oak_leaves_summer.png index 23b96b86..ccdf0972 100755 Binary files a/client/src/main/resources/textures/blocks/dark_oak_leaves_summer.png and b/client/src/main/resources/textures/blocks/dark_oak_leaves_summer.png differ diff --git a/client/src/main/resources/textures/blocks/dark_portal.png b/client/src/main/resources/textures/blocks/dark_portal.png new file mode 100755 index 00000000..21f767ee Binary files /dev/null and b/client/src/main/resources/textures/blocks/dark_portal.png differ diff --git a/client/src/main/resources/textures/blocks/deep_portal.png b/client/src/main/resources/textures/blocks/deep_portal.png new file mode 100755 index 00000000..632f90a5 Binary files /dev/null and b/client/src/main/resources/textures/blocks/deep_portal.png differ diff --git a/client/src/main/resources/textures/blocks/dirt.png b/client/src/main/resources/textures/blocks/dirt.png index d225d919..070c1213 100755 Binary files a/client/src/main/resources/textures/blocks/dirt.png and b/client/src/main/resources/textures/blocks/dirt.png differ diff --git a/client/src/main/resources/textures/blocks/dirt_podzol_side.png b/client/src/main/resources/textures/blocks/dirt_podzol_side.png deleted file mode 100755 index 5921d37f..00000000 Binary files a/client/src/main/resources/textures/blocks/dirt_podzol_side.png and /dev/null differ diff --git a/client/src/main/resources/textures/blocks/fern.png b/client/src/main/resources/textures/blocks/fern.png index fd769501..4cd4bc23 100755 Binary files a/client/src/main/resources/textures/blocks/fern.png and b/client/src/main/resources/textures/blocks/fern.png differ diff --git a/client/src/main/resources/textures/blocks/grass_side.png b/client/src/main/resources/textures/blocks/grass_side.png old mode 100755 new mode 100644 index 35c021ce..c68a4a3c Binary files a/client/src/main/resources/textures/blocks/grass_side.png and b/client/src/main/resources/textures/blocks/grass_side.png differ diff --git a/client/src/main/resources/textures/blocks/grass_side_overlay.png b/client/src/main/resources/textures/blocks/grass_side_overlay.png deleted file mode 100755 index fc3fa9d7..00000000 Binary files a/client/src/main/resources/textures/blocks/grass_side_overlay.png and /dev/null differ diff --git a/client/src/main/resources/textures/blocks/grass_side_snowed.png b/client/src/main/resources/textures/blocks/grass_side_snowed.png deleted file mode 100755 index 41f61977..00000000 Binary files a/client/src/main/resources/textures/blocks/grass_side_snowed.png and /dev/null differ diff --git a/client/src/main/resources/textures/blocks/grass_top.png b/client/src/main/resources/textures/blocks/grass_top.png index db3e364c..b3342633 100755 Binary files a/client/src/main/resources/textures/blocks/grass_top.png and b/client/src/main/resources/textures/blocks/grass_top.png differ diff --git a/client/src/main/resources/textures/blocks/iron_block.png b/client/src/main/resources/textures/blocks/iron_block.png old mode 100755 new mode 100644 index 28c5e346..7816799e Binary files a/client/src/main/resources/textures/blocks/iron_block.png and b/client/src/main/resources/textures/blocks/iron_block.png differ diff --git a/client/src/main/resources/textures/blocks/jungle_leaves_spring.png b/client/src/main/resources/textures/blocks/jungle_leaves_spring.png index e0cb935a..f296a856 100755 Binary files a/client/src/main/resources/textures/blocks/jungle_leaves_spring.png and b/client/src/main/resources/textures/blocks/jungle_leaves_spring.png differ diff --git a/client/src/main/resources/textures/blocks/jungle_leaves_summer.png b/client/src/main/resources/textures/blocks/jungle_leaves_summer.png index b053ee8e..67914c08 100755 Binary files a/client/src/main/resources/textures/blocks/jungle_leaves_summer.png and b/client/src/main/resources/textures/blocks/jungle_leaves_summer.png differ diff --git a/client/src/main/resources/textures/blocks/large_fern_bottom.png b/client/src/main/resources/textures/blocks/large_fern_bottom.png index 6a5fa6a1..ba27b76b 100755 Binary files a/client/src/main/resources/textures/blocks/large_fern_bottom.png and b/client/src/main/resources/textures/blocks/large_fern_bottom.png differ diff --git a/client/src/main/resources/textures/blocks/large_fern_top.png b/client/src/main/resources/textures/blocks/large_fern_top.png index 393144c4..83dd8d80 100755 Binary files a/client/src/main/resources/textures/blocks/large_fern_top.png and b/client/src/main/resources/textures/blocks/large_fern_top.png differ diff --git a/client/src/main/resources/textures/blocks/large_tallgrass_bottom.png b/client/src/main/resources/textures/blocks/large_tallgrass_bottom.png index 5ac15b4f..5dac6bae 100755 Binary files a/client/src/main/resources/textures/blocks/large_tallgrass_bottom.png and b/client/src/main/resources/textures/blocks/large_tallgrass_bottom.png differ diff --git a/client/src/main/resources/textures/blocks/large_tallgrass_top.png b/client/src/main/resources/textures/blocks/large_tallgrass_top.png index 1ceb3de8..02e67916 100755 Binary files a/client/src/main/resources/textures/blocks/large_tallgrass_top.png and b/client/src/main/resources/textures/blocks/large_tallgrass_top.png differ diff --git a/client/src/main/resources/textures/blocks/portal.png b/client/src/main/resources/textures/blocks/light_portal.png similarity index 91% rename from client/src/main/resources/textures/blocks/portal.png rename to client/src/main/resources/textures/blocks/light_portal.png index 805331f3..a40755f0 100755 Binary files a/client/src/main/resources/textures/blocks/portal.png and b/client/src/main/resources/textures/blocks/light_portal.png differ diff --git a/client/src/main/resources/textures/blocks/melon_stem.png b/client/src/main/resources/textures/blocks/melon_stem.png index 38065ef6..7ad445fe 100755 Binary files a/client/src/main/resources/textures/blocks/melon_stem.png and b/client/src/main/resources/textures/blocks/melon_stem.png differ diff --git a/client/src/main/resources/textures/blocks/melon_stem_connected.png b/client/src/main/resources/textures/blocks/melon_stem_connected.png deleted file mode 100755 index 6a5c10e1..00000000 Binary files a/client/src/main/resources/textures/blocks/melon_stem_connected.png and /dev/null differ diff --git a/client/src/main/resources/textures/blocks/mycelium_side.png b/client/src/main/resources/textures/blocks/mycelium_side.png index 55474258..42576193 100755 Binary files a/client/src/main/resources/textures/blocks/mycelium_side.png and b/client/src/main/resources/textures/blocks/mycelium_side.png differ diff --git a/client/src/main/resources/textures/blocks/oak_leaves_spring.png b/client/src/main/resources/textures/blocks/oak_leaves_spring.png index a6773aff..d8356ca4 100755 Binary files a/client/src/main/resources/textures/blocks/oak_leaves_spring.png and b/client/src/main/resources/textures/blocks/oak_leaves_spring.png differ diff --git a/client/src/main/resources/textures/blocks/oak_leaves_summer.png b/client/src/main/resources/textures/blocks/oak_leaves_summer.png index 01fe6e3a..ced94f9a 100755 Binary files a/client/src/main/resources/textures/blocks/oak_leaves_summer.png and b/client/src/main/resources/textures/blocks/oak_leaves_summer.png differ diff --git a/client/src/main/resources/textures/blocks/podzol_side.png b/client/src/main/resources/textures/blocks/podzol_side.png new file mode 100755 index 00000000..70fd6a69 Binary files /dev/null and b/client/src/main/resources/textures/blocks/podzol_side.png differ diff --git a/client/src/main/resources/textures/blocks/dirt_podzol_top.png b/client/src/main/resources/textures/blocks/podzol_top.png similarity index 100% rename from client/src/main/resources/textures/blocks/dirt_podzol_top.png rename to client/src/main/resources/textures/blocks/podzol_top.png diff --git a/client/src/main/resources/textures/blocks/pumpkin_stem.png b/client/src/main/resources/textures/blocks/pumpkin_stem.png index 38065ef6..a37aeed5 100755 Binary files a/client/src/main/resources/textures/blocks/pumpkin_stem.png and b/client/src/main/resources/textures/blocks/pumpkin_stem.png differ diff --git a/client/src/main/resources/textures/blocks/pumpkin_stem_connected.png b/client/src/main/resources/textures/blocks/pumpkin_stem_connected.png deleted file mode 100755 index 6a5c10e1..00000000 Binary files a/client/src/main/resources/textures/blocks/pumpkin_stem_connected.png and /dev/null differ diff --git a/client/src/main/resources/textures/blocks/radiating_portal.png b/client/src/main/resources/textures/blocks/radiating_portal.png new file mode 100755 index 00000000..0d16e803 Binary files /dev/null and b/client/src/main/resources/textures/blocks/radiating_portal.png differ diff --git a/client/src/main/resources/textures/blocks/reeds.png b/client/src/main/resources/textures/blocks/reeds.png index 64bbfe0e..7419a520 100755 Binary files a/client/src/main/resources/textures/blocks/reeds.png and b/client/src/main/resources/textures/blocks/reeds.png differ diff --git a/client/src/main/resources/textures/blocks/shining_portal.png b/client/src/main/resources/textures/blocks/shining_portal.png new file mode 100755 index 00000000..27544d80 Binary files /dev/null and b/client/src/main/resources/textures/blocks/shining_portal.png differ diff --git a/client/src/main/resources/textures/blocks/soil_snowed.png b/client/src/main/resources/textures/blocks/soil_snowed.png new file mode 100755 index 00000000..b5dd9bbe Binary files /dev/null and b/client/src/main/resources/textures/blocks/soil_snowed.png differ diff --git a/client/src/main/resources/textures/blocks/springwater_flow.png b/client/src/main/resources/textures/blocks/spring_water_flow.png similarity index 100% rename from client/src/main/resources/textures/blocks/springwater_flow.png rename to client/src/main/resources/textures/blocks/spring_water_flow.png diff --git a/client/src/main/resources/textures/blocks/springwater_still.png b/client/src/main/resources/textures/blocks/spring_water_still.png similarity index 100% rename from client/src/main/resources/textures/blocks/springwater_still.png rename to client/src/main/resources/textures/blocks/spring_water_still.png diff --git a/client/src/main/resources/textures/blocks/spruce_leaves_spring.png b/client/src/main/resources/textures/blocks/spruce_leaves_spring.png index 602eab8e..bdb501de 100755 Binary files a/client/src/main/resources/textures/blocks/spruce_leaves_spring.png and b/client/src/main/resources/textures/blocks/spruce_leaves_spring.png differ diff --git a/client/src/main/resources/textures/blocks/spruce_leaves_summer.png b/client/src/main/resources/textures/blocks/spruce_leaves_summer.png index 44456fbb..bdea8321 100755 Binary files a/client/src/main/resources/textures/blocks/spruce_leaves_summer.png and b/client/src/main/resources/textures/blocks/spruce_leaves_summer.png differ diff --git a/client/src/main/resources/textures/blocks/swamp_grass.png b/client/src/main/resources/textures/blocks/swamp_grass.png new file mode 100755 index 00000000..01b61345 Binary files /dev/null and b/client/src/main/resources/textures/blocks/swamp_grass.png differ diff --git a/client/src/main/resources/textures/blocks/swamp_oak_door_bottom.png b/client/src/main/resources/textures/blocks/swamp_oak_door_bottom.png new file mode 100755 index 00000000..12df3cbb Binary files /dev/null and b/client/src/main/resources/textures/blocks/swamp_oak_door_bottom.png differ diff --git a/client/src/main/resources/textures/blocks/swamp_oak_door_top.png b/client/src/main/resources/textures/blocks/swamp_oak_door_top.png new file mode 100755 index 00000000..f085d461 Binary files /dev/null and b/client/src/main/resources/textures/blocks/swamp_oak_door_top.png differ diff --git a/client/src/main/resources/textures/blocks/swamp_oak_leaves_autumn.png b/client/src/main/resources/textures/blocks/swamp_oak_leaves_autumn.png new file mode 100755 index 00000000..2960ba3d Binary files /dev/null and b/client/src/main/resources/textures/blocks/swamp_oak_leaves_autumn.png differ diff --git a/client/src/main/resources/textures/blocks/swamp_oak_leaves_snowy.png b/client/src/main/resources/textures/blocks/swamp_oak_leaves_snowy.png new file mode 100755 index 00000000..b902f2b8 Binary files /dev/null and b/client/src/main/resources/textures/blocks/swamp_oak_leaves_snowy.png differ diff --git a/client/src/main/resources/textures/blocks/swamp_oak_leaves_spring.png b/client/src/main/resources/textures/blocks/swamp_oak_leaves_spring.png new file mode 100755 index 00000000..6fcdb22e Binary files /dev/null and b/client/src/main/resources/textures/blocks/swamp_oak_leaves_spring.png differ diff --git a/client/src/main/resources/textures/blocks/swamp_oak_leaves_summer.png b/client/src/main/resources/textures/blocks/swamp_oak_leaves_summer.png new file mode 100755 index 00000000..104aaa2a Binary files /dev/null and b/client/src/main/resources/textures/blocks/swamp_oak_leaves_summer.png differ diff --git a/client/src/main/resources/textures/blocks/swamp_oak_leaves_winter.png b/client/src/main/resources/textures/blocks/swamp_oak_leaves_winter.png new file mode 100755 index 00000000..a732ca7f Binary files /dev/null and b/client/src/main/resources/textures/blocks/swamp_oak_leaves_winter.png differ diff --git a/client/src/main/resources/textures/blocks/swamp_oak_log_bark.png b/client/src/main/resources/textures/blocks/swamp_oak_log_bark.png new file mode 100755 index 00000000..b786a715 Binary files /dev/null and b/client/src/main/resources/textures/blocks/swamp_oak_log_bark.png differ diff --git a/client/src/main/resources/textures/blocks/swamp_oak_log_top.png b/client/src/main/resources/textures/blocks/swamp_oak_log_top.png new file mode 100755 index 00000000..21ed1b0b Binary files /dev/null and b/client/src/main/resources/textures/blocks/swamp_oak_log_top.png differ diff --git a/client/src/main/resources/textures/blocks/swamp_oak_planks.png b/client/src/main/resources/textures/blocks/swamp_oak_planks.png new file mode 100755 index 00000000..424e07d1 Binary files /dev/null and b/client/src/main/resources/textures/blocks/swamp_oak_planks.png differ diff --git a/client/src/main/resources/textures/blocks/swamp_oak_sapling.png b/client/src/main/resources/textures/blocks/swamp_oak_sapling.png new file mode 100755 index 00000000..f98bc85c Binary files /dev/null and b/client/src/main/resources/textures/blocks/swamp_oak_sapling.png differ diff --git a/client/src/main/resources/textures/blocks/swamp_side.png b/client/src/main/resources/textures/blocks/swamp_side.png new file mode 100755 index 00000000..cfc7672d Binary files /dev/null and b/client/src/main/resources/textures/blocks/swamp_side.png differ diff --git a/client/src/main/resources/textures/blocks/swamp_top.png b/client/src/main/resources/textures/blocks/swamp_top.png new file mode 100755 index 00000000..b5c7b213 Binary files /dev/null and b/client/src/main/resources/textures/blocks/swamp_top.png differ diff --git a/client/src/main/resources/textures/blocks/swamp_vine.png b/client/src/main/resources/textures/blocks/swamp_vine.png new file mode 100755 index 00000000..eda7a5e9 Binary files /dev/null and b/client/src/main/resources/textures/blocks/swamp_vine.png differ diff --git a/client/src/main/resources/textures/blocks/tallgrass.png b/client/src/main/resources/textures/blocks/tallgrass.png index 2869848f..24f9f027 100755 Binary files a/client/src/main/resources/textures/blocks/tallgrass.png and b/client/src/main/resources/textures/blocks/tallgrass.png differ diff --git a/client/src/main/resources/textures/blocks/tian_soil_side.png b/client/src/main/resources/textures/blocks/tian_soil_side.png index 5ca51644..24a874ba 100755 Binary files a/client/src/main/resources/textures/blocks/tian_soil_side.png and b/client/src/main/resources/textures/blocks/tian_soil_side.png differ diff --git a/client/src/main/resources/textures/blocks/tian_soil_side_snowed.png b/client/src/main/resources/textures/blocks/tian_soil_side_snowed.png deleted file mode 100755 index 22618b85..00000000 Binary files a/client/src/main/resources/textures/blocks/tian_soil_side_snowed.png and /dev/null differ diff --git a/client/src/main/resources/textures/blocks/tian_soil_snowed.png b/client/src/main/resources/textures/blocks/tian_soil_snowed.png new file mode 100755 index 00000000..83a6b932 Binary files /dev/null and b/client/src/main/resources/textures/blocks/tian_soil_snowed.png differ diff --git a/client/src/main/resources/textures/blocks/vine.png b/client/src/main/resources/textures/blocks/vine.png index df5e435a..d173fe5d 100755 Binary files a/client/src/main/resources/textures/blocks/vine.png and b/client/src/main/resources/textures/blocks/vine.png differ diff --git a/client/src/main/resources/textures/blocks/waterlily.png b/client/src/main/resources/textures/blocks/waterlily.png index f6c84f84..0edb9704 100755 Binary files a/client/src/main/resources/textures/blocks/waterlily.png and b/client/src/main/resources/textures/blocks/waterlily.png differ diff --git a/client/src/main/resources/textures/items/iron_ingot.png b/client/src/main/resources/textures/items/iron_ingot.png old mode 100755 new mode 100644 index 85614a7b..3833fa05 Binary files a/client/src/main/resources/textures/items/iron_ingot.png and b/client/src/main/resources/textures/items/iron_ingot.png differ diff --git a/client/src/main/resources/textures/items/springwater_bucket.png b/client/src/main/resources/textures/items/spring_water_bucket.png similarity index 100% rename from client/src/main/resources/textures/items/springwater_bucket.png rename to client/src/main/resources/textures/items/spring_water_bucket.png diff --git a/client/src/main/resources/textures/items/swamp_water_bucket.png b/client/src/main/resources/textures/items/swamp_water_bucket.png new file mode 100755 index 00000000..a8a81349 Binary files /dev/null and b/client/src/main/resources/textures/items/swamp_water_bucket.png differ diff --git a/client/src/main/resources/textures/world/foliage.png b/client/src/main/resources/textures/world/foliage.png deleted file mode 100755 index 54c24291..00000000 Binary files a/client/src/main/resources/textures/world/foliage.png and /dev/null differ diff --git a/client/src/main/resources/textures/world/grass.png b/client/src/main/resources/textures/world/grass.png deleted file mode 100755 index 118a69a0..00000000 Binary files a/client/src/main/resources/textures/world/grass.png and /dev/null differ diff --git a/common/src/main/java/common/biome/Biome.java b/common/src/main/java/common/biome/Biome.java index b692d29a..d16d9ad5 100644 --- a/common/src/main/java/common/biome/Biome.java +++ b/common/src/main/java/common/biome/Biome.java @@ -5,91 +5,88 @@ import java.util.Map; import common.collect.Lists; import common.collect.Maps; -import common.color.Colorizer; import common.log.Log; import common.rng.PerlinGen; import common.rng.Random; import common.util.BlockPos; import common.util.Displayable; -import common.util.ExtMath; import common.util.Identifyable; public enum Biome implements Identifyable, Displayable { - NONE(0, "none", "", 0x000000), - PLAINS(1, "plains", "Ebene", 0x8db360, 12.0f, 40.0f), - DESERT(2, "desert", "Wüste", 0xfa9418, 60.0f, 0.0f), - EXTREMEHILLS(3, "extremeHills", "Extremes Bergland", 0x606060, -12.0f, 30.0f), - FOREST(4, "forest", "Wald", 0x056621, 8.0f, 80.0f), - TAIGA(5, "taiga", "Taiga", 0x0b6659, -10.0f, 80.0f), - SWAMPLAND(6, "swampland", "Sumpf", 0x07f9b2, 12.0f, 90.0f, 0xe0ffae, 0xffffffff, 6975545), - RIVER(7, "river", "Fluss", 0x0000ff), - EXTERMINATED(8, "exterminated", "Ausgelöscht", 0x000000, 150.0f, 0.0f, 0x202020, 0x303030, 0x303030), - SPACE(9, "space", "Leere des Weltraums", 0x000000, 0.0f, 0.0f), - FROZENSEA(10, "frozenSea", "Vereister See", 0x9090a0, -20.0f), - FROZENRIVER(11, "frozenRiver", "Vereister Fluss", 0xa0a0ff, -20.0f), - ICEPLAINS(12, "icePlains", "Eisebene", 0xffffff, -20.0f), - ICEMOUNTAINS(13, "iceMountains", "Vereistes Bergland", 0xa0a0a0, -20.0f), - MUSHROOMPLAINS(14, "mushroomPlains", "Pilzland", 0xff00ff, 16.0f, 100.0f), - BLACKENED(15, "blackened", "Schwarz", 0x000000, 0.0f, 0.0f, 0x000000, 0x303030, 0x303030), - BEACH(16, "beach", "Strand", 0xfade55, 12.0f, 40.0f), - DESERTHILLS(17, "desertHills", "Wüsten-Bergland", 0xd25f12, 60.0f, 0.0f), - FORESTHILLS(18, "forestHills", "Wald-Bergland", 0x22551c, 8.0f, 80.0f), - TAIGAHILLS(19, "taigaHills", "Taiga-Bergland", 0x163933, -10.0f, 80.0f), - EXTREMEHILLSEDGE(20, "extremeHillsEdge", "Extremes Bergland Gr.", 0x72789a, -12.0f, 30.0f), - JUNGLE(21, "jungle", "Urwald", 0x537b09, 18.0f, 90.0f), - JUNGLEHILLS(22, "jungleHills", "Urwald-Bergland", 0x2c4205, 18.0f, 90.0f), - JUNGLEEDGE(23, "jungleEdge", "Urwald Gr.", 0x628b17, 18.0f, 80.0f), - SEA(24, "sea", "See", 0x000070), - STONEBEACH(25, "stoneBeach", "Steinstrand", 0xa2a284, -12.0f, 30.0f), - COLDBEACH(26, "coldBeach", "Vereister Strand", 0xfaf0c0, -18.0f, 30.0f), - BIRCHFOREST(27, "birchForest", "Birkenwald", 0x307444, 4.0f, 60.0f), - BIRCHFORESTHILLS(28, "birchForestHills", "Birkenwald-Bergland", 0x1f5f32, 4.0f, 60.0f), - ROOFEDFOREST(29, "roofedForest", "Dichter Wald", 0x40511a, 8.0f, 80.0f), - COLDTAIGA(30, "coldTaiga", "Vereiste Taiga", 0x31554a, -40.0f, 40.0f), - COLDTAIGAHILLS(31, "coldTaigaHills", "Vereistes Taiga-Bergland", 0x243f36, -40.0f, 40.0f), - MEGATAIGA(32, "megaTaiga", "Hohe Taiga", 0x596651, -8.0f, 80.0f), - MEGATAIGAHILLS(33, "megaTaigaHills", "Hohes Taiga-Bergland", 0x454f3e, -8.0f, 80.0f), - EXTREMEHILLSPLUS(34, "extremeHillsPlus", "Extremes Bergland +", 0x507050, -12.0f, 30.0f), - SAVANNA(35, "savanna", "Savanne", 0xbdb25f, 28.0f, 0.0f), - SAVANNAPLATEAU(36, "savannaPlateau", "Savannen-Plateau", 0xa79d64, 20.0f, 0.0f), - MESA(37, "mesa", "Mesa", 0xd94515, 0.0f, 0.0f, 0xffffff, 9470285, 10387789), - MESAPLATEAUF(38, "mesaPlateauF", "Mesa-Waldplateau", 0xb09765, 0.0f, 0.0f, 0xffffff, 9470285, 10387789), - MESAPLATEAU(39, "mesaPlateau", "Mesa-Plateau", 0xca8c65, 0.0f, 0.0f, 0xffffff, 9470285, 10387789), - SNOWLAND(40, "snowLand", "Eisland", 0xffffff, 0.0f, 100.0f), - TIAN(41, "tian", "Tian", 0x808080, 0.0f, 80.0f), - ELVENFOREST(42, "elvenForest", "Elbenwald", 0x059821, 8.0f, 90.0f), - UPPERHELL(43, "upperHell", "Übergang in die Hölle", 0xff0000, 0.0f, 0.0f, 0x000000, 0x000000, 0x000000), - LOWERHELL(44, "lowerHell", "Abgrund der Hölle", 0xff0000, 0.0f, 0.0f, 0x000000, 0x000000, 0x000000), - HELLHILLS(45, "hellHills", "Bergland der Hölle", 0xff0000, 0.0f, 0.0f, 0x000000, 0x000000, 0x000000), - SOULPLAINS(46, "soulPlains", "Seelenland", 0xff0000, 0.0f, 0.0f, 0x000000, 0x000000, 0x000000), - ASHLAND(47, "ashLand", "Verbrannt", 0xff0000, 0.0f, 0.0f, 0x000000, 0x000000, 0x000000), - MOON(48, "moon", "Mondoberfläche", 0xa0a0a0, 0.0f, 0.0f), - CHAOS(49, "chaos", "Chaos", 0xff00ff), + NONE("none", "", 0x000000), + PLAIN("plain", "Ebene", 0x8db360, 12.0f, 40.0f), + DESERT("desert", "Wüste", 0xfa9418, 60.0f, 0.0f), + HILLS("hills", "Bergland", 0x606060, -12.0f, 30.0f), + FOREST("forest", "Wald", 0x056621, 8.0f, 80.0f), + TAIGA("taiga", "Taiga", 0x0b6659, -10.0f, 80.0f), + SWAMP("swamp", "Sumpf", 0x07f9b2, 12.0f, 90.0f), + RIVER("river", "Fluss", 0x0000ff), + EXTERMINATED("exterminated", "Ausgelöscht", 0x000000, 150.0f, 0.0f), + SPACE("space", "Leere des Weltraums", 0x000000, 0.0f, 0.0f), + ICE_SEA("ice_sea", "Vereister See", 0x9090a0, -20.0f), + ICE_RIVER("ice_river", "Vereister Fluss", 0xa0a0ff, -20.0f), + ICE("ice", "Eisebene", 0xffffff, -20.0f), + ICE_HILLS("ice_hills", "Vereistes Bergland", 0xa0a0a0, -20.0f), + MUSHROOM("mushroom", "Pilzland", 0xff00ff, 16.0f, 100.0f), + BLACKENED("blackened", "Schwarz", 0x000000, 0.0f, 0.0f), + BEACH("beach", "Strand", 0xfade55, 12.0f, 40.0f), + DESERT_HILLS("desert_hills", "Wüsten-Bergland", 0xd25f12, 60.0f, 0.0f), + FOREST_HILLS("forest_hills", "Wald-Bergland", 0x22551c, 8.0f, 80.0f), + TAIGA_HILLS("taiga_hills", "Taiga-Bergland", 0x163933, -10.0f, 80.0f), + HILLS_EDGE("hills_edge", "Bergland-Grenze", 0x72789a, -12.0f, 30.0f), + TROPIC("tropic", "Urwald", 0x537b09, 18.0f, 90.0f), + TROPIC_HILLS("tropic_hills", "Urwald-Bergland", 0x2c4205, 18.0f, 90.0f), + TROPIC_EDGE("tropic_edge", "Urwald-Grenze", 0x628b17, 18.0f, 80.0f), + SEA("sea", "See", 0x000070), + STONE_BEACH("stone_beach", "Steinstrand", 0xa2a284, -12.0f, 30.0f), + ICE_BEACH("ice_beach", "Vereister Strand", 0xfaf0c0, -18.0f, 30.0f), + BIRCH_FOREST("birch_forest", "Birkenwald", 0x307444, 4.0f, 60.0f), + BIRCH_HILLS("birch_hills", "Birken-Bergland", 0x1f5f32, 4.0f, 60.0f), + DARK_FOREST("dark_forest", "Dichter Wald", 0x40511a, 8.0f, 80.0f), + ICE_TAIGA("ice_taiga", "Vereiste Taiga", 0x31554a, -40.0f, 40.0f), + ICE_TAIGA_HILLS("ice_taiga_hills", "Vereistes Taiga-Bergland", 0x243f36, -40.0f, 40.0f), + LARGE_TAIGA("large_taiga", "Hohe Taiga", 0x596651, -8.0f, 80.0f), + LARGE_TAIGA_HILLS("large_taiga_hills", "Hohes Taiga-Bergland", 0x454f3e, -8.0f, 80.0f), + LARGE_HILLS("large_hills", "Hohes Bergland", 0x507050, -12.0f, 30.0f), + SAVANNA("savanna", "Savanne", 0xbdb25f, 28.0f, 0.0f), + SAVANNA_PLATEAU("savanna_plateau", "Savannen-Plateau", 0xa79d64, 20.0f, 0.0f), + MESA("mesa", "Mesa", 0xd94515, 0.0f, 0.0f), + MESA_FOREST("mesa_forest", "Mesa-Wald", 0xb09765, 0.0f, 0.0f), + MESA_PLATEAU("mesa_plateau", "Mesa-Plateau", 0xca8c65, 0.0f, 0.0f), + SNOW("snow", "Eisland", 0xffffff, 0.0f, 100.0f), + TIAN("tian", "Tian", 0x808080, 0.0f, 80.0f), + ELVEN_FOREST("elven_forest", "Elbenwald", 0x059821, 8.0f, 90.0f), + UPPER_HELL("upper_hell", "Übergang in die Hölle", 0xff0000, 0.0f, 0.0f), + LOWER_HELL("lower_hell", "Abgrund der Hölle", 0xff0000, 0.0f, 0.0f), + HELL_HILLS("hell_hills", "Bergland der Hölle", 0xff0000, 0.0f, 0.0f), + SOUL_PLAINS("soul_plains", "Seelenland", 0xff0000, 0.0f, 0.0f), + ASH("ash", "Verbrannt", 0xff0000, 0.0f, 0.0f), + MOON("moon", "Mondoberfläche", 0xa0a0a0, 0.0f, 0.0f), + CHAOS("chaos", "Chaos", 0xff00ff), - DESERTM(130, "desertM", "Wüste M", 0xfa9418, 60.0f, 0.0f), - EXTREMEHILLSM(131, "extremeHillsM", "Extremes Bergland M", 0x606060, -12.0f, 30.0f), - FLOWERFOREST(132, "flowerForest", "Blumenwald", 0x6a7425, 8.0f, 80.0f), - TAIGAM(133, "taigaM", "Taiga M", 0x0b6659, -10.0f, 80.0f), - SWAMPLANDM(134, "swamplandM", "Sumpf M", 0x07f9b2, 12.0f, 90.0f, 0xe0ffae, 0xffffffff, 6975545), - ICEPLAINSSPIKES(140, "icePlainsSpikes", "Eisebene + Spitzen", 0xd2ffff, -20.0f), - JUNGLEM(149, "jungleM", "Urwald M", 0x537b09, 18.0f, 90.0f), - JUNGLEEDGEM(151, "jungleEdgeM", "Urwald Gr. M", 0x628b17, 18.0f, 80.0f), - BIRCHFORESTM(155, "birchForestM", "Birkenwald M", 0x307444, 4.0f, 60.0f), - BIRCHFORESTHILLSM(156, "birchForestHillsM", "Birkenwald-Bergland M", 0x1f5f32, 4.0f, 60.0f), - ROOFEDFORESTM(157, "roofedForestM", "Dichter Wald M", 0x40511a, 8.0f, 80.0f), - COLDTAIGAM(158, "coldTaigaM", "Vereiste Taiga M", 0x31554a, -40.0f, 40.0f), - MEGASPRUCETAIGA(160, "megaSpruceTaiga", "Hohe Fichtentaiga", 0x596651, -10.0f, 80.0f), - REDWOODTAIGAHILLSM(161, "redwoodTaigaHillsM", "Mammutbaumtaiga", 0x596651, -10.0f, 80.0f), - EXTREMEHILLSPLUSM(162, "extremeHillsPlusM", "Extremes Bergland + M", 0x507050, -12.0f, 30.0f), - SAVANNAM(163, "savannaM", "Savanne M", 0xbdb25f, 24.0f, 0.0f), - SAVANNAPLATEAUM(164, "savannaPlateauM", "Savannen-Plateau M", 0xa79d64, 20.0f, 0.0f), - MESABRYCE(165, "mesaBryce", "Mesa (Bryce)", 0xd94515, 0.0f, 0.0f, 0xffffff, 9470285, 10387789), - MESAPLATEAUFM(166, "mesaPlateauFM", "Mesa-Waldplateau M", 0xb09765, 0.0f, 0.0f, 0xffffff, 9470285, 10387789), - MESAPLATEAUM(167, "mesaPlateauM", "Mesa-Plateau M", 0xca8c65, 0.0f, 0.0f, 0xffffff, 9470285, 10387789); + DESERT_MOD("desert_mod", "Wüste M", 0xfa9418, 60.0f, 0.0f), + HILLS_MOD("hills_mod", "Bergland M", 0x606060, -12.0f, 30.0f), + FLOWER_FOREST("flower_forest", "Blumenwald", 0x6a7425, 8.0f, 80.0f), + TAIGA_MOD("taiga_mod", "Taiga M", 0x0b6659, -10.0f, 80.0f), + SWAMP_MOD("swamp_mod", "Sumpf M", 0x07f9b2, 12.0f, 90.0f), + ICE_SPIKES("ice_spikes", "Eisebene mit Spitzen", 0xd2ffff, -20.0f), + TROPIC_MOD("tropic_mod", "Urwald M", 0x537b09, 18.0f, 90.0f), + TROPIC_EDGE_MOD("propic_edge_mod", "Urwald-Grenze M", 0x628b17, 18.0f, 80.0f), + BIRCH_FOREST_MOD("birch_forest_mod", "Birkenwald M", 0x307444, 4.0f, 60.0f), + BIRCH_HILLS_MOD("birch_hills_mod", "Birken-Bergland M", 0x1f5f32, 4.0f, 60.0f), + DARK_FOREST_MOD("dark_forest_mod", "Dichter Wald M", 0x40511a, 8.0f, 80.0f), + ICE_TAIGA_MOD("ice_taiga_mod", "Vereiste Taiga M", 0x31554a, -40.0f, 40.0f), + SPRUCE_TAIGA("spruce_taiga", "Fichtentaiga", 0x596651, -10.0f, 80.0f), + REDWOOD_TAIGA("redwood_taiga", "Mammutbaumtaiga", 0x596651, -10.0f, 80.0f), + LARGE_HILLS_MOD("large_hills_mod", "Hohes Bergland M", 0x507050, -12.0f, 30.0f), + SAVANNA_MOD("savanna_mod", "Savanne M", 0xbdb25f, 24.0f, 0.0f), + SAVANNA_PLATEAU_MOD("savanna_plateau_mod", "Savannen-Plateau M", 0xa79d64, 20.0f, 0.0f), + MESA_PEAK("mesa_peak", "Mesa-Spitze", 0xd94515, 0.0f, 0.0f), + MESA_FOREST_MOD("mesa_forest_mod", "Mesa-Wald M", 0xb09765, 0.0f, 0.0f), + MESA_PLATEAU_MOD("mesa_plateau_mod", "Mesa-Plateau M", 0xca8c65, 0.0f, 0.0f); public static final Biome DEF_BIOME = FOREST; private static final PerlinGen TEMP_NOISE = new PerlinGen(new Random(836430928262265276L), 1); - private static final PerlinGen COLOR_NOISE = new PerlinGen(new Random(6549321755809421L), 1); private static final Biome[] BIOMES = new Biome[256]; private static final Map LOOKUP = Maps.newTreeMap(); @@ -99,16 +96,13 @@ public enum Biome implements Identifyable, Displayable { public final int color; public final float temperature; public final float humidity; - public final int waterColor; - public final int grassColor; - public final int foliageColor; static { for(Biome biome : values()) { BIOMES[biome.id] = biome; - if(LOOKUP.containsKey(biome.name.toLowerCase())) - throw new IllegalStateException("Biom \"" + biome.name + "\" ist als ID " + LOOKUP.get(biome.name.toLowerCase()).id + " und " + biome.id + " definiert"); - LOOKUP.put(biome.name.toLowerCase(), biome); + if(LOOKUP.containsKey(biome.name)) + throw new IllegalStateException("Biom \"" + biome.name + "\" ist als ID " + LOOKUP.get(biome.name).id + " und " + biome.id + " definiert"); + LOOKUP.put(biome.name, biome); } } @@ -158,28 +152,21 @@ public enum Biome implements Identifyable, Displayable { return biome; } - private Biome(int id, String name, String display, int color, float temperature, float humidity, int waterColor, int grassColor, int foliageColor) { - this.id = id; + private Biome(String name, String display, int color, float temperature, float humidity) { + this.id = this.ordinal(); this.name = name; this.display = display; this.temperature = temperature; this.humidity = humidity; this.color = color; - this.waterColor = waterColor; - this.grassColor = grassColor; - this.foliageColor = foliageColor; } - private Biome(int id, String name, String display, int color, float temperature, float humidity) { - this(id, name, display, color, temperature, humidity, 0xffffff, 0xffffffff, 0xffffffff); + private Biome(String name, String display, int color, float temperature) { + this(name, display, color, temperature, 50.0f); } - private Biome(int id, String name, String display, int color, float temperature) { - this(id, name, display, color, temperature, 50.0f, 0xffffff, 0xffffffff, 0xffffffff); - } - - private Biome(int id, String name, String display, int color) { - this(id, name, display, color, 0.0f, 50.0f, 0xffffff, 0xffffffff, 0xffffffff); + private Biome(String name, String display, int color) { + this(name, display, color, 0.0f, 50.0f); } public final float getTemperature(BlockPos pos) { @@ -195,37 +182,9 @@ public enum Biome implements Identifyable, Displayable { return f > 1.0f ? 1.0f : f; } - public boolean isHighHumidity() { - return this.humidity > 85.0f; - } - // skycolor = ((temp + 14) / 40 + 0.15) / 3 - public int getGrassColorAtPos(BlockPos pos) { - if(this.grassColor != 0xffffffff) - return this.grassColor; - if(this == SWAMPLAND || this == SWAMPLANDM) { - double d0 = COLOR_NOISE.generate((double)pos.getX() * 0.0225D, (double)pos.getZ() * 0.0225D); - return d0 < -0.1D ? 5011004 : 6975545; - } - if(this == ELVENFOREST) - return Colorizer.getGrassColor(1.0f, this.humidity * 0.01f); - double d0 = (double)ExtMath.clampf((this.getTemperature(pos) + 14.0f) / 40.0f + 0.15f, 0.0F, 1.0F); - double d1 = (double)ExtMath.clampf(this.humidity * 0.01f, 0.0F, 1.0F); - return this == ROOFEDFOREST || this == ROOFEDFORESTM ? (Colorizer.getGrassColor(d0, d1) & 16711422) + 2634762 >> 1 : Colorizer.getGrassColor(d0, d1); - } - - public int getFoliageColorAtPos(BlockPos pos) { - if(this.foliageColor != 0xffffffff) - return this.foliageColor; - if(this == ELVENFOREST) - return Colorizer.getFoliageColor(1.0f, this.humidity * 0.01f); - double d0 = (double)ExtMath.clampf((this.getTemperature(pos) + 14.0f) / 40.0f + 0.15f, 0.0F, 1.0F); - double d1 = (double)ExtMath.clampf(this.humidity * 0.01f, 0.0F, 1.0F); - return Colorizer.getFoliageColor(d0, d1); - } - - public String getName() { + public String getName() { return this.name; } diff --git a/common/src/main/java/common/block/Block.java b/common/src/main/java/common/block/Block.java index c59f8200..07159065 100755 --- a/common/src/main/java/common/block/Block.java +++ b/common/src/main/java/common/block/Block.java @@ -15,6 +15,7 @@ import java.util.function.Function; import common.attributes.Attribute; import common.attributes.UsageSlot; +import common.biome.Biome; import common.block.artificial.BlockSlab; import common.block.natural.BlockSnow; import common.collect.ImmutableList; @@ -39,7 +40,7 @@ import common.item.StackSize; import common.model.BlockLayer; import common.model.Model; import common.model.ModelProvider; -import common.model.Transform; +import common.model.GuiPosition; import common.properties.Property; import common.rng.Random; import common.tileentity.TileEntity; @@ -1033,14 +1034,14 @@ public class Block { } return light; } - - public BlockLayer getRenderLayer() { - return BlockLayer.SOLID; - } public int getRenderType() { return 3; } + + public BlockLayer getRenderLayer() { + return BlockLayer.SOLID; + } public boolean isXrayVisible() { return false; @@ -1053,41 +1054,18 @@ public class Block { public void getAnimatedTextures(Map map) { } - public int getRenderColor(State state) { - return 16777215; - } - - public int colorMultiplier(IWorldAccess world, BlockPos pos, int pass) { - return 16777215; - } - - public State getEntityState(State state) { - return state; - } - public Model getModel(ModelProvider provider, String name, State state) { return provider.getModel(name).add().all(); } - - public String getFallbackTexture() { - return null; - } - - public void setItemBounds() { - } - public Transform getTransform() { - return Transform.IDENTITY; + public GuiPosition getItemPosition() { + return GuiPosition.NORMAL; } public State getItemState() { return this.getState(); } - public boolean isItemColored() { - return false; - } - public TextColor getItemColor() { return this.radiation > 0.0f ? TextColor.GREEN : null; } diff --git a/common/src/main/java/common/block/artificial/BlockCake.java b/common/src/main/java/common/block/artificial/BlockCake.java index 1c9b5f22..bceb48ca 100755 --- a/common/src/main/java/common/block/artificial/BlockCake.java +++ b/common/src/main/java/common/block/artificial/BlockCake.java @@ -102,16 +102,6 @@ public class BlockCake extends Block this.setBlockBounds(f1, 0.0F, f, 1.0F - f, f2, 1.0F - f); } - /** - * Sets the block's bounds for rendering it as an item - */ - public void setItemBounds() - { - float f = 0.0625F; - float f1 = 0.5F; - this.setBlockBounds(f, 0.0F, f, 1.0F - f, f1, 1.0F - f); - } - public BoundingBox getCollisionBox(World worldIn, BlockPos pos, State state) { float f = 0.0625F; diff --git a/common/src/main/java/common/block/artificial/BlockCarpet.java b/common/src/main/java/common/block/artificial/BlockCarpet.java index ce19450d..d1b4f308 100755 --- a/common/src/main/java/common/block/artificial/BlockCarpet.java +++ b/common/src/main/java/common/block/artificial/BlockCarpet.java @@ -6,7 +6,7 @@ import common.color.DyeColor; import common.item.CheatTab; import common.model.Model; import common.model.ModelProvider; -import common.model.Transform; +import common.model.GuiPosition; import common.util.BlockPos; import common.util.Facing; import common.world.IWorldAccess; @@ -51,14 +51,6 @@ public class BlockCarpet extends Block return false; } - /** - * Sets the block's bounds for rendering it as an item - */ - public void setItemBounds() - { - this.setBlockBoundsFromMeta(); - } - public void setBlockBounds(IWorldAccess worldIn, BlockPos pos) { this.setBlockBoundsFromMeta(); diff --git a/common/src/main/java/common/block/artificial/BlockDoor.java b/common/src/main/java/common/block/artificial/BlockDoor.java index 5f50661e..717ce025 100755 --- a/common/src/main/java/common/block/artificial/BlockDoor.java +++ b/common/src/main/java/common/block/artificial/BlockDoor.java @@ -17,7 +17,7 @@ import common.model.BlockLayer; import common.model.Model; import common.model.ModelProvider; import common.model.ModelRotation; -import common.model.Transform; +import common.model.GuiPosition; import common.properties.Property; import common.properties.PropertyBool; import common.properties.PropertyEnum; @@ -285,8 +285,8 @@ public class BlockDoor extends Block implements Rotatable { } } - public Transform getTransform() { - return Transform.PANE_SIDE; + public GuiPosition getItemPosition() { + return GuiPosition.PANE_SIDE; } public State getItemState() { diff --git a/common/src/main/java/common/block/artificial/BlockFence.java b/common/src/main/java/common/block/artificial/BlockFence.java index a57d1897..018d3879 100755 --- a/common/src/main/java/common/block/artificial/BlockFence.java +++ b/common/src/main/java/common/block/artificial/BlockFence.java @@ -13,7 +13,7 @@ import common.item.tool.ItemLead; import common.model.Model; import common.model.ModelProvider; import common.model.ModelRotation; -import common.model.Transform; +import common.model.GuiPosition; import common.properties.Property; import common.properties.PropertyBool; import common.util.BlockPos; @@ -194,8 +194,8 @@ public class BlockFence extends Block return new Property[] {NORTH, EAST, WEST, SOUTH}; } - public Transform getTransform() { - return Transform.FENCE; + public GuiPosition getItemPosition() { + return GuiPosition.FENCE; } public String getTexture() { diff --git a/common/src/main/java/common/block/artificial/BlockFenceGate.java b/common/src/main/java/common/block/artificial/BlockFenceGate.java index 2a27857e..111ea13b 100755 --- a/common/src/main/java/common/block/artificial/BlockFenceGate.java +++ b/common/src/main/java/common/block/artificial/BlockFenceGate.java @@ -11,7 +11,7 @@ import common.item.CheatTab; import common.model.Model; import common.model.ModelProvider; import common.model.ModelRotation; -import common.model.Transform; +import common.model.GuiPosition; import common.properties.Property; import common.properties.PropertyBool; import common.util.BlockPos; diff --git a/common/src/main/java/common/block/artificial/BlockFloorPortal.java b/common/src/main/java/common/block/artificial/BlockFloorPortal.java index 0f48d034..b227ad26 100755 --- a/common/src/main/java/common/block/artificial/BlockFloorPortal.java +++ b/common/src/main/java/common/block/artificial/BlockFloorPortal.java @@ -16,6 +16,7 @@ import common.util.BlockPos; import common.util.BoundingBox; import common.util.Facing; import common.util.ParticleType; +import common.util.PortalType; import common.world.IWorldAccess; import common.world.AWorldClient; import common.world.State; @@ -88,7 +89,7 @@ public class BlockFloorPortal extends Block // entityIn.travelToDimension(entityIn.dimension == 1 ? 0 : 1, null, 0.0f, 0.0f); // } if(entityIn.getEntityBoundingBox().intersectsWith(this.getCollisionBox(worldIn, pos, state))) - entityIn.setFlatPortal(); + entityIn.setPortal(PortalType.FLOOR); } public void displayTick(AWorldClient worldIn, BlockPos pos, State state, Random rand) diff --git a/common/src/main/java/common/block/artificial/BlockFlowerPot.java b/common/src/main/java/common/block/artificial/BlockFlowerPot.java index dcf1f452..3bebf6aa 100755 --- a/common/src/main/java/common/block/artificial/BlockFlowerPot.java +++ b/common/src/main/java/common/block/artificial/BlockFlowerPot.java @@ -16,7 +16,7 @@ import common.item.ItemStack; import common.model.BlockLayer; import common.model.Model; import common.model.ModelProvider; -import common.model.Transform; +import common.model.GuiPosition; import common.rng.Random; import common.util.BlockPos; import common.util.Facing; @@ -109,18 +109,10 @@ public class BlockFlowerPot extends Block { super(Material.SMALL); this.content = content; - this.setItemBounds(); - POTS.add(this); - } - - /** - * Sets the block's bounds for rendering it as an item - */ - public void setItemBounds() - { float f = 0.375F; float f1 = f / 2.0F; this.setBlockBounds(0.5F - f1, 0.0F, 0.5F - f1, 0.5F + f1, f, 0.5F + f1); + POTS.add(this); } /** @@ -262,7 +254,7 @@ public class BlockFlowerPot extends Block return this.content == null; } - public Transform getTransform() { - return Transform.SMALL; + public GuiPosition getItemPosition() { + return GuiPosition.SMALL; } } diff --git a/common/src/main/java/common/block/artificial/BlockLadder.java b/common/src/main/java/common/block/artificial/BlockLadder.java index 627936a2..19f818f5 100755 --- a/common/src/main/java/common/block/artificial/BlockLadder.java +++ b/common/src/main/java/common/block/artificial/BlockLadder.java @@ -9,7 +9,7 @@ import common.model.BlockLayer; import common.model.Model; import common.model.ModelProvider; import common.model.ModelRotation; -import common.model.Transform; +import common.model.GuiPosition; import common.properties.Property; import common.util.BlockPos; import common.util.BoundingBox; @@ -149,7 +149,7 @@ public class BlockLadder extends Block implements Rotatable .rotate(ModelRotation.getNorthRot(state.getValue(FACING))); } - public Transform getTransform() { - return Transform.PANE_SIDE; + public GuiPosition getItemPosition() { + return GuiPosition.PANE_SIDE; } } diff --git a/common/src/main/java/common/block/artificial/BlockPane.java b/common/src/main/java/common/block/artificial/BlockPane.java index b2463306..5d890ee3 100755 --- a/common/src/main/java/common/block/artificial/BlockPane.java +++ b/common/src/main/java/common/block/artificial/BlockPane.java @@ -12,7 +12,7 @@ import common.model.BlockLayer; import common.model.Model; import common.model.ModelProvider; import common.model.ModelRotation; -import common.model.Transform; +import common.model.GuiPosition; import common.properties.Property; import common.properties.PropertyBool; import common.rng.Random; @@ -121,14 +121,6 @@ public class BlockPane extends Block } } - /** - * Sets the block's bounds for rendering it as an item - */ - public void setItemBounds() - { - this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); - } - public void setBlockBounds(IWorldAccess worldIn, BlockPos pos) { float f = 0.4375F; @@ -494,8 +486,8 @@ public class BlockPane extends Block return new Property[] {NORTH, SOUTH, WEST, EAST}; } - public Transform getTransform() { - return Transform.PANE; + public GuiPosition getItemPosition() { + return GuiPosition.PANE; } public State getItemState() { diff --git a/common/src/main/java/common/block/artificial/BlockPortal.java b/common/src/main/java/common/block/artificial/BlockPortal.java index 45abcf80..59c2ee16 100755 --- a/common/src/main/java/common/block/artificial/BlockPortal.java +++ b/common/src/main/java/common/block/artificial/BlockPortal.java @@ -1,10 +1,12 @@ package common.block.artificial; +import java.util.List; import java.util.Map; import common.block.Block; import common.block.Material; import common.block.natural.BlockFire; +import common.collect.Lists; import common.entity.Entity; import common.init.Blocks; import common.item.Item; @@ -19,6 +21,7 @@ import common.util.BlockPos; import common.util.BoundingBox; import common.util.Facing; import common.util.ParticleType; +import common.util.PortalType; import common.world.IWorldAccess; import common.world.AWorldClient; import common.world.State; @@ -27,15 +30,25 @@ import common.world.World; public class BlockPortal extends Block { public static final PropertyEnum AXIS = PropertyEnum.create("axis", Facing.Axis.class, Facing.Axis.X, Facing.Axis.Z); - public static final PropertyInteger DIM = PropertyInteger.create("dim", 0, 7); - + public static final BlockPortal[] PORTALS = new BlockPortal[PortalType.values().length - 2]; private static final int[] COLORS = new int[] {0x000000, 0xff0000, 0xffff00, 0x00ff00, 0x00ffff, 0x0000ff, 0xff00ff, 0xffffff}; + + private final PortalType type; + + public static BlockPortal getByType(PortalType type) { + return type.ordinal() >= PORTALS.length ? null : PORTALS[type.ordinal()]; + } - public BlockPortal() + public BlockPortal(PortalType type) { super(Material.PORTAL); - this.setDefaultState(this.getBaseState().withProperty(AXIS, Facing.Axis.X).withProperty(DIM, 0)); -// this.setTickRandomly(); + this.setDefaultState(this.getBaseState().withProperty(AXIS, Facing.Axis.X)); + this.type = type; + PORTALS[type.ordinal()] = this; + } + + public PortalType getType() { + return this.type; } // public void updateTick(IWorldServer worldIn, BlockPos pos, IBlockState state, Random rand) @@ -106,9 +119,9 @@ public class BlockPortal extends Block return BlockLayer.TRANSLUCENT; } - public boolean tryIgnitePortal(World worldIn, BlockPos pos, int dim) + public boolean tryIgnitePortal(World worldIn, BlockPos pos) { - BlockPortal.Size size = new BlockPortal.Size(worldIn, pos, Facing.Axis.X, dim); + BlockPortal.Size size = new BlockPortal.Size(worldIn, pos, Facing.Axis.X, this); if (size.func_150860_b() && size.field_150864_e == 0) { @@ -117,7 +130,7 @@ public class BlockPortal extends Block } else { - BlockPortal.Size size2 = new BlockPortal.Size(worldIn, pos, Facing.Axis.Z, dim); + BlockPortal.Size size2 = new BlockPortal.Size(worldIn, pos, Facing.Axis.Z, this); if (size2.func_150860_b() && size2.field_150864_e == 0) { @@ -137,11 +150,10 @@ public class BlockPortal extends Block public void onUpdate(World worldIn, BlockPos pos, State state, Block neighborBlock) { Facing.Axis enumfacing$axis = (Facing.Axis)state.getValue(AXIS); - int dim = state.getValue(DIM); if (enumfacing$axis == Facing.Axis.X) { - BlockPortal.Size blockportal$size = new BlockPortal.Size(worldIn, pos, Facing.Axis.X, dim); + BlockPortal.Size blockportal$size = new BlockPortal.Size(worldIn, pos, Facing.Axis.X, this); if (!blockportal$size.func_150860_b() || blockportal$size.field_150864_e < blockportal$size.field_150868_h * blockportal$size.height) { @@ -150,7 +162,7 @@ public class BlockPortal extends Block } else if (enumfacing$axis == Facing.Axis.Z) { - BlockPortal.Size blockportal$size1 = new BlockPortal.Size(worldIn, pos, Facing.Axis.Z, dim); + BlockPortal.Size blockportal$size1 = new BlockPortal.Size(worldIn, pos, Facing.Axis.Z, this); if (!blockportal$size1.func_150860_b() || blockportal$size1.field_150864_e < blockportal$size1.field_150868_h * blockportal$size1.height) { @@ -208,7 +220,7 @@ public class BlockPortal extends Block { if (entityIn.vehicle == null && entityIn.passenger == null) { - entityIn.setPortal(state.getValue(DIM)); + entityIn.setPortal(this.type); } } @@ -239,33 +251,23 @@ public class BlockPortal extends Block } } - public int getRenderColor(State state) - { - return COLORS[state.getValue(DIM)]; - } - - public int colorMultiplier(IWorldAccess worldIn, BlockPos pos, int renderPass) - { - return this.getRenderColor(worldIn.getState(pos)); - } - protected Property[] getProperties() { - return new Property[] {AXIS, DIM}; + return new Property[] {AXIS}; } public Model getModel(ModelProvider provider, String name, State state) { return state.getValue(AXIS) == Facing.Axis.X ? provider.getModel(name) .add(0, 0, 6, 16, 16, 10) - .n().uv(0, 0, 16, 16).noCull().tint() - .s().uv(0, 0, 16, 16).noCull().tint() : provider.getModel(name) + .n().uv(0, 0, 16, 16).noCull() + .s().uv(0, 0, 16, 16).noCull() : provider.getModel(name) .add(6, 0, 0, 10, 16, 16) - .w().uv(0, 0, 16, 16).noCull().tint() - .e().uv(0, 0, 16, 16).noCull().tint(); + .w().uv(0, 0, 16, 16).noCull() + .e().uv(0, 0, 16, 16).noCull(); } public void getAnimatedTextures(Map map) { - map.put("portal", 1); + map.put(this.type.getName() + "_portal", 1); } protected boolean hasRegisteredItem() { @@ -332,13 +334,13 @@ public class BlockPortal extends Block private final Facing.Axis axis; private final Facing field_150866_c; private final Facing field_150863_d; - private final int dim; + private final BlockPortal dim; private int field_150864_e = 0; private BlockPos field_150861_f; private int height; private int field_150868_h; - public Size(World worldIn, BlockPos p_i45694_2_, Facing.Axis p_i45694_3_, int dim) + public Size(World worldIn, BlockPos p_i45694_2_, Facing.Axis p_i45694_3_, BlockPortal dim) { this.world = worldIn; this.dim = dim; @@ -424,7 +426,7 @@ public class BlockPortal extends Block break label24; } - if (block == Blocks.portal) + if (block instanceof BlockPortal) { ++this.field_150864_e; } @@ -474,7 +476,7 @@ public class BlockPortal extends Block protected boolean func_150857_a(Block p_150857_1_) { - return p_150857_1_ == Blocks.air || p_150857_1_ instanceof BlockFire || p_150857_1_ == Blocks.portal; + return p_150857_1_ == Blocks.air || p_150857_1_ instanceof BlockFire || p_150857_1_ instanceof BlockPortal; } public boolean func_150860_b() @@ -487,8 +489,7 @@ public class BlockPortal extends Block for (int i = 0; i < this.field_150868_h; ++i) { BlockPos blockpos = this.field_150861_f.offset(this.field_150866_c, i); - State state = Blocks.portal.getState().withProperty(BlockPortal.AXIS, this.axis) - .withProperty(DIM, this.dim); + State state = this.dim.getState().withProperty(BlockPortal.AXIS, this.axis); for (int j = 0; j < this.height; ++j) { diff --git a/common/src/main/java/common/block/artificial/BlockPortalFrame.java b/common/src/main/java/common/block/artificial/BlockPortalFrame.java index 4dc347db..10f1b42b 100755 --- a/common/src/main/java/common/block/artificial/BlockPortalFrame.java +++ b/common/src/main/java/common/block/artificial/BlockPortalFrame.java @@ -43,14 +43,6 @@ public class BlockPortalFrame extends Block implements Rotatable return false; } - /** - * Sets the block's bounds for rendering it as an item - */ - public void setItemBounds() - { - this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.8125F, 1.0F); - } - /** * Add all collision boxes of this Block to the list that intersect with the given mask. */ @@ -65,7 +57,7 @@ public class BlockPortalFrame extends Block implements Rotatable super.getCollisionBoxes(worldIn, pos, state, mask, list, collidingEntity); } - this.setItemBounds(); + this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.8125F, 1.0F); } /** diff --git a/common/src/main/java/common/block/artificial/BlockSkull.java b/common/src/main/java/common/block/artificial/BlockSkull.java index 0937ae83..bd539ad8 100755 --- a/common/src/main/java/common/block/artificial/BlockSkull.java +++ b/common/src/main/java/common/block/artificial/BlockSkull.java @@ -8,7 +8,7 @@ import common.entity.types.EntityLiving; import common.model.Model; import common.model.ModelProvider; import common.model.ModelRotation; -import common.model.Transform; +import common.model.GuiPosition; import common.properties.Property; import common.util.BlockPos; import common.util.Facing; @@ -56,7 +56,7 @@ public class BlockSkull extends Block implements Rotatable { return true; } - public Transform getTransform() { - return Transform.SMALL; + public GuiPosition getItemPosition() { + return GuiPosition.SMALL; } } diff --git a/common/src/main/java/common/block/artificial/BlockSlab.java b/common/src/main/java/common/block/artificial/BlockSlab.java index 5675a738..85bd812e 100755 --- a/common/src/main/java/common/block/artificial/BlockSlab.java +++ b/common/src/main/java/common/block/artificial/BlockSlab.java @@ -90,10 +90,6 @@ public class BlockSlab extends Block implements Directional { } } - public void setItemBounds() { - this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F); - } - public void getCollisionBoxes(World worldIn, BlockPos pos, State state, BoundingBox mask, List list, Entity collidingEntity) { this.setBlockBounds(worldIn, pos); super.getCollisionBoxes(worldIn, pos, state, mask, list, collidingEntity); diff --git a/common/src/main/java/common/block/artificial/BlockStairs.java b/common/src/main/java/common/block/artificial/BlockStairs.java index 11cc288a..6818aead 100755 --- a/common/src/main/java/common/block/artificial/BlockStairs.java +++ b/common/src/main/java/common/block/artificial/BlockStairs.java @@ -15,7 +15,7 @@ import common.item.CheatTab; import common.model.BlockLayer; import common.model.Model; import common.model.ModelProvider; -import common.model.Transform; +import common.model.GuiPosition; import common.properties.Property; import common.properties.PropertyEnum; import common.rng.Random; @@ -775,8 +775,8 @@ public class BlockStairs extends Block implements Rotatable return new Property[] {FACING, HALF, SHAPE}; } - public Transform getTransform() { - return Transform.STAIRS; + public GuiPosition getItemPosition() { + return GuiPosition.STAIRS; } public Model getModel(ModelProvider provider, String name, State state) { diff --git a/common/src/main/java/common/block/artificial/BlockTrapDoor.java b/common/src/main/java/common/block/artificial/BlockTrapDoor.java index 437c87cf..8b87b5b4 100755 --- a/common/src/main/java/common/block/artificial/BlockTrapDoor.java +++ b/common/src/main/java/common/block/artificial/BlockTrapDoor.java @@ -11,7 +11,7 @@ import common.model.BlockLayer; import common.model.Model; import common.model.ModelProvider; import common.model.ModelRotation; -import common.model.Transform; +import common.model.GuiPosition; import common.properties.Property; import common.properties.PropertyBool; import common.properties.PropertyEnum; @@ -86,15 +86,6 @@ public class BlockTrapDoor extends Block implements Rotatable this.setBounds(worldIn.getState(pos)); } - /** - * Sets the block's bounds for rendering it as an item - */ - public void setItemBounds() - { - float f = 0.1875F; - this.setBlockBounds(0.0F, 0.40625F, 0.0F, 1.0F, 0.59375F, 1.0F); - } - public void setBounds(State state) { if (state.getBlock() == this) diff --git a/common/src/main/java/common/block/foliage/BlockBlackenedSoil.java b/common/src/main/java/common/block/foliage/BlockBlackenedSoil.java index 2bfb3175..aded0dd8 100644 --- a/common/src/main/java/common/block/foliage/BlockBlackenedSoil.java +++ b/common/src/main/java/common/block/foliage/BlockBlackenedSoil.java @@ -38,7 +38,7 @@ public class BlockBlackenedSoil extends Block Block block = worldIn.getState(blockpos.up()).getBlock(); State iblockstate = worldIn.getState(blockpos); - if ((iblockstate.getBlock() == Blocks.dirt || iblockstate.getBlock() == Blocks.grass || iblockstate.getBlock() == Blocks.blackened_dirt) && worldIn.getLightFromNeighbors(blockpos.up()) >= 2 && block.getLightOpacity() <= 6) + if ((iblockstate.getBlock() == Blocks.dirt || iblockstate.getBlock() == Blocks.grass || iblockstate.getBlock() == Blocks.swamp || iblockstate.getBlock() == Blocks.blackened_dirt) && worldIn.getLightFromNeighbors(blockpos.up()) >= 2 && block.getLightOpacity() <= 6) { worldIn.setState(blockpos, Blocks.blackened_soil.getState()); worldIn.setBiome(blockpos, Biome.BLACKENED); diff --git a/common/src/main/java/common/block/foliage/BlockBlueShroom.java b/common/src/main/java/common/block/foliage/BlockBlueShroom.java index 7c1a2ed0..bdf46aea 100755 --- a/common/src/main/java/common/block/foliage/BlockBlueShroom.java +++ b/common/src/main/java/common/block/foliage/BlockBlueShroom.java @@ -4,7 +4,7 @@ import common.block.Block; import common.init.Blocks; import common.model.Model; import common.model.ModelProvider; -import common.model.Transform; +import common.model.GuiPosition; import common.rng.Random; import common.util.BlockPos; import common.vars.Vars; @@ -87,7 +87,7 @@ public class BlockBlueShroom extends BlockBush return provider.getModel("blue_mushroom").cross(); } - public Transform getTransform() { - return Transform.CROSS_SMALL; + public GuiPosition getItemPosition() { + return GuiPosition.CROSS_SMALL; } } diff --git a/common/src/main/java/common/block/foliage/BlockDeadBush.java b/common/src/main/java/common/block/foliage/BlockDeadBush.java index fc06e31d..37174a09 100755 --- a/common/src/main/java/common/block/foliage/BlockDeadBush.java +++ b/common/src/main/java/common/block/foliage/BlockDeadBush.java @@ -11,7 +11,7 @@ import common.item.ItemStack; import common.item.tool.ItemShears; import common.model.Model; import common.model.ModelProvider; -import common.model.Transform; +import common.model.GuiPosition; import common.rng.Random; import common.tileentity.TileEntity; import common.util.BlockPos; @@ -77,7 +77,7 @@ public class BlockDeadBush extends BlockBush return provider.getModel("deadbush").cross(); } - public Transform getTransform() { - return Transform.CROSS; + public GuiPosition getItemPosition() { + return GuiPosition.CROSS; } } diff --git a/common/src/main/java/common/block/foliage/BlockDoublePlant.java b/common/src/main/java/common/block/foliage/BlockDoublePlant.java index a29305c4..9e47b265 100755 --- a/common/src/main/java/common/block/foliage/BlockDoublePlant.java +++ b/common/src/main/java/common/block/foliage/BlockDoublePlant.java @@ -1,9 +1,9 @@ package common.block.foliage; +import common.biome.Biome; import common.block.Block; import common.block.Material; import common.block.SoundType; -import common.color.Colorizer; import common.entity.npc.EntityNPC; import common.entity.types.EntityLiving; import common.init.Blocks; @@ -14,7 +14,7 @@ import common.item.StackSize; import common.item.tool.ItemShears; import common.model.Model; import common.model.ModelProvider; -import common.model.Transform; +import common.model.GuiPosition; import common.properties.Property; import common.properties.PropertyEnum; import common.rng.Random; @@ -154,19 +154,6 @@ public class BlockDoublePlant extends BlockBush implements IGrowable } } - public boolean isItemColored() { - return this.type == BlockDoublePlant.EnumPlantType.GRASS || this.type == BlockDoublePlant.EnumPlantType.FERN; - } - - public int getRenderColor(State state) { - return this.type != BlockDoublePlant.EnumPlantType.GRASS && this.type != BlockDoublePlant.EnumPlantType.FERN ? 16777215 : Colorizer.getGrassColor(0.5D, 1.0D); - } - - public int colorMultiplier(IWorldAccess worldIn, BlockPos pos, int renderPass) - { - return this.type != BlockDoublePlant.EnumPlantType.GRASS && this.type != BlockDoublePlant.EnumPlantType.FERN ? 16777215 : Colorizer.getGrassColor(worldIn, pos); - } - public void placeAt(World worldIn, BlockPos lowerPos, int flags) { worldIn.setState(lowerPos, this.getState().withProperty(HALF, BlockDoublePlant.EnumBlockHalf.LOWER), flags); @@ -279,16 +266,13 @@ public class BlockDoublePlant extends BlockBush implements IGrowable .uv(0, 8, 16, 16).noCull() .add(9.6f, -1f, 1f, 9.6f, 15f, 15f).noShade().rotate(8, 8, 8, Axis.Z, 22.5f, true).w("sunflower_back") .uv(0, 0, 16, 16).noCull().e().uv(0, 0, 16, 16).noCull(); - else if(this.type == EnumPlantType.FERN || this.type == EnumPlantType.GRASS) - return provider.getModel(this.type.getName() + "_" + (state.getValue(HALF) == EnumBlockHalf.UPPER - ? "top" : "bottom")).crossTint(); else return provider.getModel(this.type.getName() + "_" + (state.getValue(HALF) == EnumBlockHalf.UPPER ? "top" : "bottom")).cross(); } - public Transform getTransform() { - return Transform.CROSS; + public GuiPosition getItemPosition() { + return GuiPosition.CROSS; } public State getItemState() { diff --git a/common/src/main/java/common/block/foliage/BlockFlower.java b/common/src/main/java/common/block/foliage/BlockFlower.java index bfa4deea..10a12c49 100755 --- a/common/src/main/java/common/block/foliage/BlockFlower.java +++ b/common/src/main/java/common/block/foliage/BlockFlower.java @@ -1,9 +1,10 @@ package common.block.foliage; +import common.block.Block; import common.init.Blocks; import common.model.Model; import common.model.ModelProvider; -import common.model.Transform; +import common.model.GuiPosition; import common.rng.Random; import common.util.BlockPos; import common.util.Identifyable; @@ -31,6 +32,11 @@ public class BlockFlower extends BlockBush public EnumFlowerType getType() { return this.type; } + + protected boolean canPlaceBlockOn(Block ground) + { + return super.canPlaceBlockOn(ground) || ((this.type == EnumFlowerType.BLUE_ORCHID || this.type == EnumFlowerType.BLACK_LOTUS) && ground == Blocks.swamp); + } public void tick(AWorldServer worldIn, BlockPos pos, State state, Random rand) { @@ -47,8 +53,8 @@ public class BlockFlower extends BlockBush return provider.getModel(this.type.getName()).cross(); } - public Transform getTransform() { - return Transform.CROSS_SMALL; + public GuiPosition getItemPosition() { + return GuiPosition.CROSS_SMALL; } public static enum EnumFlowerType implements Identifyable diff --git a/common/src/main/java/common/block/foliage/BlockGrass.java b/common/src/main/java/common/block/foliage/BlockGrass.java index e5ce50a0..c08174b5 100755 --- a/common/src/main/java/common/block/foliage/BlockGrass.java +++ b/common/src/main/java/common/block/foliage/BlockGrass.java @@ -1,9 +1,9 @@ package common.block.foliage; +import common.biome.Biome; import common.biome.IBiome; import common.block.Block; import common.block.Material; -import common.color.Colorizer; import common.init.Blocks; import common.item.CheatTab; import common.item.Item; @@ -32,40 +32,14 @@ public class BlockGrass extends Block implements IGrowable this.setTab(CheatTab.NATURE); } - /** - * Get the actual Block state of this Block at the given position. This applies properties not visible in the - * metadata, such as fence connections. - */ public State getState(State state, IWorldAccess worldIn, BlockPos pos) { Block block = worldIn.getState(pos.up()).getBlock(); return state.withProperty(SNOWY, Boolean.valueOf(block == Blocks.snow || block == Blocks.snow_layer)); } -// public int getBlockColor() -// { -// return ColorizerFoliage.getGrassColor(0.5D, 1.0D); -// } - - public boolean isItemColored() { - return true; - } - - public int getRenderColor(State state) - { - return Colorizer.getGrassColor(0.5D, 1.0D); -// return this.getBlockColor(); - } - - public int colorMultiplier(IWorldAccess worldIn, BlockPos pos, int renderPass) - { - return Colorizer.getGrassColor(worldIn, pos); - } - public void tick(AWorldServer worldIn, BlockPos pos, State state, Random rand) { -// if (!worldIn.client) -// { if (worldIn.getLightFromNeighbors(pos.up()) < 4 && worldIn.getState(pos.up()).getBlock().getLightOpacity() > 2) { if(Vars.grassDecay) @@ -93,20 +67,13 @@ public class BlockGrass extends Block implements IGrowable worldIn.setState(pos, worldIn.rand.chance(20) ? Blocks.coarse_dirt.getState() : Blocks.dirt.getState()); } -// } } - /** - * Get the Item that this Block should drop when harvested. - */ public Item getDrop(State state, Random rand, int fortune) { return Blocks.dirt.getDrop(Blocks.dirt.getState(), rand, fortune); } - /** - * Whether this IGrowable can grow - */ public boolean canGrow(World worldIn, BlockPos pos, State state, boolean isClient) { return true; @@ -122,22 +89,21 @@ public class BlockGrass extends Block implements IGrowable IBiome.getBiome(worldIn.getBiomeGenForCoords(pos)).growGrass(worldIn, pos, state, rand); } - public BlockLayer getRenderLayer() - { - return BlockLayer.CUTOUT_MIPPED; - } - protected Property[] getProperties() { return new Property[] {SNOWY}; } + public BlockLayer getRenderLayer() + { + return BlockLayer.CUTOUT_MIPPED; + } + public Model getModel(ModelProvider provider, String name, State state) { if(state.getValue(SNOWY)) - return provider.getModel("grass_side_snowed").add().nswe().d("dirt").u("grass_top"); + return provider.getModel("dirt").add().d().u("snow").nswe().add().nswe("soil_snowed"); else - return provider.getModel("dirt").add().d().u("grass_top").tint().nswe("grass_side") - .add().nswe("grass_side_overlay").tint(); + return provider.getModel("dirt").add().d().u("grass_top").nswe().add().nswe("grass_side"); } protected Property[] getUnsavedProperties() { diff --git a/common/src/main/java/common/block/foliage/BlockLeaves.java b/common/src/main/java/common/block/foliage/BlockLeaves.java index 511c6d06..54a377b5 100755 --- a/common/src/main/java/common/block/foliage/BlockLeaves.java +++ b/common/src/main/java/common/block/foliage/BlockLeaves.java @@ -2,11 +2,11 @@ package common.block.foliage; import java.util.List; +import common.biome.Biome; import common.block.Block; import common.block.Material; import common.block.SoundType; import common.collect.Lists; -import common.color.Colorizer; import common.entity.npc.EntityNPC; import common.entity.types.EntityLiving; import common.init.Blocks; @@ -277,23 +277,6 @@ public class BlockLeaves extends BlockLeavesBase dropItem(worldIn, pos, new ItemStack(ItemRegistry.byName(this.type.getItem()))); } } - - public boolean isItemColored() { - return true; - } - - public int getRenderColor(State state) - { - return state.getBlock() != this || !this.subType.isTinted() ? 16777215 : - ((this.type.getTintType() == null ? Colorizer.BASIC : this.type.getTintType()).getColor()); - } - - public int colorMultiplier(IWorldAccess worldIn, BlockPos pos, int renderPass) - { - State state = worldIn.getState(pos); - return state.getBlock() != this || !this.subType.isTinted() ? 16777215 : (this.type.getTintType() - == null ? Colorizer.getFoliageColor(worldIn, pos) : this.type.getTintType().getColor()); - } protected Property[] getProperties() { return new Property[] {DECAY, BUSH}; @@ -312,11 +295,6 @@ public class BlockLeaves extends BlockLeavesBase return this.getState().withProperty(DECAY, false).withProperty(BUSH, true); } - public Model getModel(ModelProvider provider, String name, State state) { - return this.subType.isTinted() ? provider.getModel(name).add().all().tint() : - provider.getModel(name).add().all(); - } - public Property[] getIgnoredProperties() { return new Property[] {DECAY, BUSH}; } diff --git a/common/src/main/java/common/block/foliage/BlockLilyPad.java b/common/src/main/java/common/block/foliage/BlockLilyPad.java index 523eb0a9..187efe63 100755 --- a/common/src/main/java/common/block/foliage/BlockLilyPad.java +++ b/common/src/main/java/common/block/foliage/BlockLilyPad.java @@ -17,7 +17,7 @@ import common.item.ItemStack; import common.model.Model; import common.model.ModelProvider; import common.model.ModelRotation; -import common.model.Transform; +import common.model.GuiPosition; import common.properties.Property; import common.util.BlockPos; import common.util.BoundingBox; @@ -50,25 +50,6 @@ public class BlockLilyPad extends BlockBush implements Rotatable { return new BoundingBox((double)pos.getX() + this.minX, (double)pos.getY() + this.minY, (double)pos.getZ() + this.minZ, (double)pos.getX() + this.maxX, (double)pos.getY() + this.maxY, (double)pos.getZ() + this.maxZ); } - -// public int getBlockColor() -// { -// return 7455580; -// } - - public boolean isItemColored() { - return true; - } - - public int getRenderColor(State state) - { - return 7455580; - } - - public int colorMultiplier(IWorldAccess worldIn, BlockPos pos, int renderPass) - { - return 2129968; - } protected boolean canPlaceBlockOn(Block ground) { @@ -102,13 +83,13 @@ public class BlockLilyPad extends BlockBush implements Rotatable public Model getModel(ModelProvider provider, String name, State state) { return provider.getModel("waterlily") .add(0, 0.25f, 0, 16, 0.25f, 16) - .d().uv(16, 16, 0, 0).tint().noCull() - .u().uv(16, 0, 0, 16).tint().noCull() + .d().uv(16, 16, 0, 0).noCull() + .u().uv(16, 0, 0, 16).noCull() .rotate(ModelRotation.getNorthRot(state.getValue(FACING))); } - public Transform getTransform() { - return Transform.SMALL_FLAT; + public GuiPosition getItemPosition() { + return GuiPosition.SMALL_FLAT; } public boolean prePlace(ItemStack itemStackIn, World worldIn, EntityNPC playerIn) diff --git a/common/src/main/java/common/block/foliage/BlockMushroom.java b/common/src/main/java/common/block/foliage/BlockMushroom.java index f1f7a36d..dce8c08c 100755 --- a/common/src/main/java/common/block/foliage/BlockMushroom.java +++ b/common/src/main/java/common/block/foliage/BlockMushroom.java @@ -5,7 +5,7 @@ import common.block.Block; import common.init.Blocks; import common.model.Model; import common.model.ModelProvider; -import common.model.Transform; +import common.model.GuiPosition; import common.rng.Random; import common.util.BlockPos; import common.vars.Vars; @@ -109,7 +109,7 @@ public class BlockMushroom extends BlockBush implements IGrowable return provider.getModel(name).cross(); } - public Transform getTransform() { - return Transform.CROSS_SMALL; + public GuiPosition getItemPosition() { + return GuiPosition.CROSS_SMALL; } } diff --git a/common/src/main/java/common/block/foliage/BlockMycelium.java b/common/src/main/java/common/block/foliage/BlockMycelium.java index 39f2dd1d..f0ccf10a 100755 --- a/common/src/main/java/common/block/foliage/BlockMycelium.java +++ b/common/src/main/java/common/block/foliage/BlockMycelium.java @@ -5,6 +5,7 @@ import common.block.Material; import common.init.Blocks; import common.item.CheatTab; import common.item.Item; +import common.model.BlockLayer; import common.model.Model; import common.model.ModelProvider; import common.properties.Property; @@ -92,11 +93,16 @@ public class BlockMycelium extends Block return new Property[] {SNOWY}; } + public BlockLayer getRenderLayer() + { + return BlockLayer.CUTOUT_MIPPED; + } + public Model getModel(ModelProvider provider, String name, State state) { if(state.getValue(SNOWY)) - return provider.getModel("grass_side_snowed").add().nswe().d("dirt").u("grass_top"); + return provider.getModel("dirt").add().d().u("snow").nswe().add().nswe("soil_snowed"); else - return provider.getModel("mycelium_side").add().nswe().d("dirt").u("mycelium_top"); + return provider.getModel("dirt").add().d().u("mycelium_top").nswe().add().nswe("mycelium_side"); } protected Property[] getUnsavedProperties() { diff --git a/common/src/main/java/common/block/foliage/BlockReed.java b/common/src/main/java/common/block/foliage/BlockReed.java index 49f31d09..91d1c6f1 100755 --- a/common/src/main/java/common/block/foliage/BlockReed.java +++ b/common/src/main/java/common/block/foliage/BlockReed.java @@ -8,7 +8,7 @@ import common.item.StackSize; import common.model.BlockLayer; import common.model.Model; import common.model.ModelProvider; -import common.model.Transform; +import common.model.GuiPosition; import common.properties.Property; import common.properties.PropertyInteger; import common.rng.Random; @@ -78,7 +78,7 @@ public class BlockReed extends Block { return true; } - else if (block != Blocks.grass && block != Blocks.dirt && block != Blocks.sand) + else if (block != Blocks.grass && block != Blocks.swamp && block != Blocks.dirt && block != Blocks.sand) { return false; } @@ -141,11 +141,6 @@ public class BlockReed extends Block return false; } - public int colorMultiplier(IWorldAccess worldIn, BlockPos pos, int renderPass) - { - return worldIn.getBiomeGenForCoords(pos).getGrassColorAtPos(pos); - } - public BlockLayer getRenderLayer() { return BlockLayer.CUTOUT; @@ -157,7 +152,7 @@ public class BlockReed extends Block } public Model getModel(ModelProvider provider, String name, State state) { - return provider.getModel("reeds").crossTint(); + return provider.getModel("reeds").cross(); } public Property[] getIgnoredProperties() { @@ -168,7 +163,7 @@ public class BlockReed extends Block return StackSize.L; } - public Transform getTransform() { - return Transform.CROSS; + public GuiPosition getItemPosition() { + return GuiPosition.CROSS; } } diff --git a/common/src/main/java/common/block/foliage/BlockSapling.java b/common/src/main/java/common/block/foliage/BlockSapling.java index a25552ad..7c1c1407 100755 --- a/common/src/main/java/common/block/foliage/BlockSapling.java +++ b/common/src/main/java/common/block/foliage/BlockSapling.java @@ -3,13 +3,15 @@ package common.block.foliage; import java.util.List; import common.biome.IBiome; +import common.block.Block; +import common.block.foliage.BlockTallGrass.EnumType; import common.collect.Lists; import common.init.Blocks; import common.init.WoodType; import common.item.CheatTab; import common.model.Model; import common.model.ModelProvider; -import common.model.Transform; +import common.model.GuiPosition; import common.properties.Property; import common.properties.PropertyInteger; import common.rng.Random; @@ -37,6 +39,11 @@ public class BlockSapling extends BlockBush implements IGrowable this.setFlammable(15, 100); SAPLINGS.add(this); } + + protected boolean canPlaceBlockOn(Block ground) + { + return super.canPlaceBlockOn(ground) || ground == Blocks.swamp; + } // /** // * Gets the localized name of this block. Used for the statistics page. @@ -124,8 +131,8 @@ public class BlockSapling extends BlockBush implements IGrowable return provider.getModel(name).cross(); } - public Transform getTransform() { - return Transform.CROSS; + public GuiPosition getItemPosition() { + return GuiPosition.CROSS; } public WoodType getWoodType() { diff --git a/common/src/main/java/common/block/foliage/BlockStem.java b/common/src/main/java/common/block/foliage/BlockStem.java index 6f7f7e5f..3c685751 100755 --- a/common/src/main/java/common/block/foliage/BlockStem.java +++ b/common/src/main/java/common/block/foliage/BlockStem.java @@ -87,36 +87,6 @@ public class BlockStem extends BlockBush implements IGrowable worldIn.setState(pos, state.withProperty(AGE, Integer.valueOf(Math.min(7, i))), 2); } - public int getRenderColor(State state) - { - if (state.getBlock() != this) - { - return super.getRenderColor(state); - } - else - { - int i = ((Integer)state.getValue(AGE)).intValue(); - int j = i * 32; - int k = 255 - i * 8; - int l = i * 4; - return j << 16 | k << 8 | l; - } - } - - public int colorMultiplier(IWorldAccess worldIn, BlockPos pos, int renderPass) - { - return this.getRenderColor(worldIn.getState(pos)); - } - - /** - * Sets the block's bounds for rendering it as an item - */ - public void setItemBounds() - { - float f = 0.125F; - this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, 0.25F, 0.5F + f); - } - public void setBlockBounds(IWorldAccess worldIn, BlockPos pos) { this.maxY = (double)((float)(((Integer)worldIn.getState(pos).getValue(AGE)).intValue() * 2 + 2) / 16.0F); @@ -174,68 +144,68 @@ public class BlockStem extends BlockBush implements IGrowable case 0: return provider.getModel(stem) .add(0, -1, 8, 16, 1, 8).rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .n().uv(0, 0, 16, 2).tint().noCull() - .s().uv(16, 0, 0, 2).tint().noCull() + .n().uv(0, 0, 16, 2).noCull() + .s().uv(16, 0, 0, 2).noCull() .add(8, -1, 0, 8, 1, 16).rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .w().uv(0, 0, 16, 2).tint().noCull() - .e().uv(16, 0, 0, 2).tint().noCull(); + .w().uv(0, 0, 16, 2).noCull() + .e().uv(16, 0, 0, 2).noCull(); case 1: return provider.getModel(stem) .add(0, -1, 8, 16, 3, 8).rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .n().uv(0, 0, 16, 4).tint().noCull() - .s().uv(16, 0, 0, 4).tint().noCull() + .n().uv(0, 0, 16, 4).noCull() + .s().uv(16, 0, 0, 4).noCull() .add(8, -1, 0, 8, 3, 16).rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .w().uv(0, 0, 16, 4).tint().noCull() - .e().uv(16, 0, 0, 4).tint().noCull(); + .w().uv(0, 0, 16, 4).noCull() + .e().uv(16, 0, 0, 4).noCull(); case 2: return provider.getModel(stem) .add(0, -1, 8, 16, 5, 8).rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .n().uv(0, 0, 16, 6).tint().noCull() - .s().uv(16, 0, 0, 6).tint().noCull() + .n().uv(0, 0, 16, 6).noCull() + .s().uv(16, 0, 0, 6).noCull() .add(8, -1, 0, 8, 5, 16).rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .w().uv(0, 0, 16, 6).tint().noCull() - .e().uv(16, 0, 0, 6).tint().noCull(); + .w().uv(0, 0, 16, 6).noCull() + .e().uv(16, 0, 0, 6).noCull(); case 3: return provider.getModel(stem) .add(0, -1, 8, 16, 7, 8).rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .n().uv(0, 0, 16, 8).tint().noCull() - .s().uv(16, 0, 0, 8).tint().noCull() + .n().uv(0, 0, 16, 8).noCull() + .s().uv(16, 0, 0, 8).noCull() .add(8, -1, 0, 8, 7, 16).rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .w().uv(0, 0, 16, 8).tint().noCull() - .e().uv(16, 0, 0, 8).tint().noCull(); + .w().uv(0, 0, 16, 8).noCull() + .e().uv(16, 0, 0, 8).noCull(); case 4: return provider.getModel(stem) .add(0, -1, 8, 16, 9, 8).rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .n().uv(0, 0, 16, 10).tint().noCull() - .s().uv(16, 0, 0, 10).tint().noCull() + .n().uv(0, 0, 16, 10).noCull() + .s().uv(16, 0, 0, 10).noCull() .add(8, -1, 0, 8, 9, 16).rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .w().uv(0, 0, 16, 10).tint().noCull() - .e().uv(16, 0, 0, 10).tint().noCull(); + .w().uv(0, 0, 16, 10).noCull() + .e().uv(16, 0, 0, 10).noCull(); case 5: return provider.getModel(stem) .add(0, -1, 8, 16, 11, 8).rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .n().uv(0, 0, 16, 12).tint().noCull() - .s().uv(16, 0, 0, 12).tint().noCull() + .n().uv(0, 0, 16, 12).noCull() + .s().uv(16, 0, 0, 12).noCull() .add(8, -1, 0, 8, 11, 16).rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .w().uv(0, 0, 16, 12).tint().noCull() - .e().uv(16, 0, 0, 12).tint().noCull(); + .w().uv(0, 0, 16, 12).noCull() + .e().uv(16, 0, 0, 12).noCull(); case 6: return provider.getModel(stem) .add(0, -1, 8, 16, 13, 8).rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .n().uv(0, 0, 16, 14).tint().noCull() - .s().uv(16, 0, 0, 14).tint().noCull() + .n().uv(0, 0, 16, 14).noCull() + .s().uv(16, 0, 0, 14).noCull() .add(8, -1, 0, 8, 13, 16).rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .w().uv(0, 0, 16, 14).tint().noCull() - .e().uv(16, 0, 0, 14).tint().noCull(); + .w().uv(0, 0, 16, 14).noCull() + .e().uv(16, 0, 0, 14).noCull(); case 7: default: return provider.getModel(stem) .add(0, -1, 8, 16, 15, 8).rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .n().uv(0, 0, 16, 16).tint().noCull() - .s().uv(16, 0, 0, 16).tint().noCull() + .n().uv(0, 0, 16, 16).noCull() + .s().uv(16, 0, 0, 16).noCull() .add(8, -1, 0, 8, 15, 16).rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .w().uv(0, 0, 16, 16).tint().noCull() - .e().uv(16, 0, 0, 16).tint().noCull(); + .w().uv(0, 0, 16, 16).noCull() + .e().uv(16, 0, 0, 16).noCull(); } } diff --git a/common/src/main/java/common/block/foliage/BlockSwamp.java b/common/src/main/java/common/block/foliage/BlockSwamp.java new file mode 100644 index 00000000..93a626b2 --- /dev/null +++ b/common/src/main/java/common/block/foliage/BlockSwamp.java @@ -0,0 +1,93 @@ +package common.block.foliage; + +import common.block.Block; +import common.block.Material; +import common.entity.Entity; +import common.init.Blocks; +import common.item.CheatTab; +import common.item.Item; +import common.model.BlockLayer; +import common.model.Model; +import common.model.ModelProvider; +import common.properties.Property; +import common.properties.PropertyBool; +import common.rng.Random; +import common.util.BlockPos; +import common.util.BoundingBox; +import common.vars.Vars; +import common.world.AWorldServer; +import common.world.IWorldAccess; +import common.world.State; +import common.world.World; + +public class BlockSwamp extends Block +{ + public static final PropertyBool SNOWY = PropertyBool.create("snowy"); + + public BlockSwamp() + { + super(Material.LOOSE); + this.setDefaultState(this.getBaseState().withProperty(SNOWY, Boolean.valueOf(false))); + this.setTicked(); + this.setTab(CheatTab.NATURE); + } + + public State getState(State state, IWorldAccess worldIn, BlockPos pos) + { + Block block = worldIn.getState(pos.up()).getBlock(); + return state.withProperty(SNOWY, Boolean.valueOf(block == Blocks.snow || block == Blocks.snow_layer)); + } + + public BoundingBox getCollisionBox(World worldIn, BlockPos pos, State state) + { + float f = 0.375F; + return new BoundingBox((double)pos.getX(), (double)pos.getY(), (double)pos.getZ(), (double)(pos.getX() + 1), (double)((float)(pos.getY() + 1) - f), (double)(pos.getZ() + 1)); + } + + public void onCollideUpdate(World worldIn, BlockPos pos, State state, Entity entityIn) + { + entityIn.motionX *= 0.6D; + entityIn.motionZ *= 0.6D; + } + + public BlockLayer getRenderLayer() + { + return BlockLayer.CUTOUT_MIPPED; + } + + public Model getModel(ModelProvider provider, String name, State state) { + if(state.getValue(SNOWY)) + return provider.getModel("dirt").add().d().u("snow").nswe().add().nswe("soil_snowed"); + else + return provider.getModel("dirt").add().d().u("swamp_top").nswe().add().nswe("swamp_side"); + } + + protected Property[] getProperties() + { + return new Property[] {SNOWY}; + } + + protected Property[] getUnsavedProperties() { + return new Property[] {SNOWY}; + } + + public Item getDrop(State state, Random rand, int fortune) + { + return Blocks.dirt.getDrop(Blocks.dirt.getState(), rand, fortune); + } + + public void tick(AWorldServer worldIn, BlockPos pos, State state, Random rand) + { + if (worldIn.getLightFromNeighbors(pos.up()) < 4 && worldIn.getState(pos.up()).getBlock().getLightOpacity() > 2) + { + if(Vars.swampDecay) + worldIn.setState(pos, Blocks.dirt.getState()); + } + else if(Vars.swampDry) { + float temp = worldIn.getTemperatureC(pos); + if(temp >= 38.0f) + worldIn.setState(pos, temp >= 50.0f ? (worldIn.rand.chance(20) ? Blocks.coarse_dirt.getState() : + Blocks.dirt.getState()) : Blocks.grass.getState()); + } + } +} diff --git a/common/src/main/java/common/block/foliage/BlockTallGrass.java b/common/src/main/java/common/block/foliage/BlockTallGrass.java index d7d7844b..e2d1b422 100755 --- a/common/src/main/java/common/block/foliage/BlockTallGrass.java +++ b/common/src/main/java/common/block/foliage/BlockTallGrass.java @@ -1,7 +1,8 @@ package common.block.foliage; +import common.biome.Biome; +import common.block.Block; import common.block.Material; -import common.color.Colorizer; import common.entity.npc.EntityNPC; import common.init.Blocks; import common.init.Items; @@ -10,7 +11,7 @@ import common.item.ItemStack; import common.item.tool.ItemShears; import common.model.Model; import common.model.ModelProvider; -import common.model.Transform; +import common.model.GuiPosition; import common.rng.Random; import common.tileentity.TileEntity; import common.util.BlockPos; @@ -55,6 +56,11 @@ public class BlockTallGrass extends BlockBush implements IGrowable } super.tick(worldIn, pos, state, rand); } + + protected boolean canPlaceBlockOn(Block ground) + { + return super.canPlaceBlockOn(ground) || (this.type == EnumType.SWAMP_GRASS && ground == Blocks.swamp); + } public boolean canBlockStay(World worldIn, BlockPos pos, State state) { @@ -68,27 +74,6 @@ public class BlockTallGrass extends BlockBush implements IGrowable { return true; } - - public boolean isItemColored() { - return true; - } - - public int getRenderColor(State state) - { - if (state.getBlock() != this) - { - return super.getRenderColor(state); - } - else - { - return this.type == EnumType.DEAD_BUSH ? 16777215 : Colorizer.getGrassColor(0.5D, 1.0D); - } - } - - public int colorMultiplier(IWorldAccess worldIn, BlockPos pos, int renderPass) - { - return worldIn.getBiomeGenForCoords(pos).getGrassColorAtPos(pos); - } /** * Get the Item that this Block should drop when harvested. @@ -147,21 +132,19 @@ public class BlockTallGrass extends BlockBush implements IGrowable } public Model getModel(ModelProvider provider, String name, State state) { - if(this.type != EnumType.DEAD_BUSH) - return provider.getModel(this.type.getName()).crossTint(); - else - return provider.getModel(this.type.getName()).cross(); + return provider.getModel(this.type.getName()).cross(); } - public Transform getTransform() { - return Transform.CROSS; + public GuiPosition getItemPosition() { + return GuiPosition.CROSS; } public static enum EnumType implements Identifyable { DEAD_BUSH("dead_bush", "Busch"), GRASS("tallgrass", "Gras"), - FERN("fern", "Farn"); + FERN("fern", "Farn"), + SWAMP_GRASS("swamp_grass", "Sumpfgras"); private final String name; private final String display; diff --git a/common/src/main/java/common/block/foliage/BlockTianSoil.java b/common/src/main/java/common/block/foliage/BlockTianSoil.java index cbbf08bc..b7db746d 100755 --- a/common/src/main/java/common/block/foliage/BlockTianSoil.java +++ b/common/src/main/java/common/block/foliage/BlockTianSoil.java @@ -5,6 +5,7 @@ import common.block.Material; import common.init.Blocks; import common.item.CheatTab; import common.item.Item; +import common.model.BlockLayer; import common.model.Model; import common.model.ModelProvider; import common.properties.Property; @@ -41,11 +42,16 @@ public class BlockTianSoil extends Block return new Property[] {SNOWY}; } + public BlockLayer getRenderLayer() + { + return BlockLayer.CUTOUT_MIPPED; + } + public Model getModel(ModelProvider provider, String name, State state) { if(state.getValue(SNOWY)) - return provider.getModel("tian_soil_side_snowed").add().nswe().d("tian").u("grass_top"); + return provider.getModel("tian").add().d().u("snow").nswe().add().nswe("tian_soil_snowed"); else - return provider.getModel("tian_soil_side").add().nswe().d("tian").u("tian_soil_top"); + return provider.getModel("tian").add().d().u("tian_soil_top").nswe().add().nswe("tian_soil_side"); } protected Property[] getUnsavedProperties() { diff --git a/common/src/main/java/common/block/foliage/BlockVine.java b/common/src/main/java/common/block/foliage/BlockVine.java index d0e5cb89..1d8a6e90 100755 --- a/common/src/main/java/common/block/foliage/BlockVine.java +++ b/common/src/main/java/common/block/foliage/BlockVine.java @@ -1,8 +1,8 @@ package common.block.foliage; +import common.biome.Biome; import common.block.Block; import common.block.Material; -import common.color.Colorizer; import common.entity.npc.EntityNPC; import common.entity.types.EntityLiving; import common.init.Blocks; @@ -15,7 +15,7 @@ import common.model.BlockLayer; import common.model.Model; import common.model.ModelProvider; import common.model.ModelRotation; -import common.model.Transform; +import common.model.GuiPosition; import common.properties.Property; import common.properties.PropertyBool; import common.rng.Random; @@ -37,10 +37,13 @@ public class BlockVine extends Block public static final PropertyBool SOUTH = PropertyBool.create("south"); public static final PropertyBool WEST = PropertyBool.create("west"); public static final PropertyBool[] ALL_FACES = new PropertyBool[] {UP, NORTH, SOUTH, WEST, EAST}; + + private final boolean swamp; - public BlockVine() + public BlockVine(boolean swamp) { super(Material.BUSH); + this.swamp = swamp; this.setDefaultState(this.getBaseState().withProperty(UP, Boolean.valueOf(false)).withProperty(NORTH, Boolean.valueOf(false)).withProperty(EAST, Boolean.valueOf(false)).withProperty(SOUTH, Boolean.valueOf(false)).withProperty(WEST, Boolean.valueOf(false))); this.setTicked(); this.setTab(CheatTab.PLANTS); @@ -56,14 +59,6 @@ public class BlockVine extends Block return state.withProperty(UP, Boolean.valueOf(worldIn.getState(pos.up()).getBlock().isBlockingCube())); } - /** - * Sets the block's bounds for rendering it as an item - */ - public void setItemBounds() - { - this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); - } - /** * Used to determine ambient occlusion and culling when rebuilding chunks for render */ @@ -218,25 +213,6 @@ public class BlockVine extends Block } } -// public int getBlockColor() -// { -// return ColorizerFoliage.getFoliageColorBasic(); -// } - - public boolean isItemColored() { - return true; - } - - public int getRenderColor(State state) - { - return Colorizer.BASIC.getColor(); - } - - public int colorMultiplier(IWorldAccess worldIn, BlockPos pos, int renderPass) - { - return worldIn.getBiomeGenForCoords(pos).getFoliageColorAtPos(pos); - } - /** * Called when a neighboring block changes. */ @@ -432,7 +408,7 @@ public class BlockVine extends Block if (!worldIn.client && player.getCurrentEquippedItem() != null && player.getCurrentEquippedItem().getItem() instanceof ItemShears) { // player.triggerAchievement(StatRegistry.mineBlockStatArray[BlockRegistry.getIdFromBlock(this)]); - dropItem(worldIn, pos, new ItemStack(Items.vine)); + dropItem(worldIn, pos, new ItemStack(this.getItem())); } else { @@ -490,11 +466,11 @@ public class BlockVine extends Block } public Model getModel(ModelProvider provider, String name, State state) { - Model model = provider.getModel("vine"); + Model model = provider.getModel(name); if(state.getValue(UP)) model.add(0, 15.2f, 0, 16, 15.2f, 16).noShade() - .d().uv(0, 0, 16, 16).tint().noCull() - .u().uv(0, 0, 16, 16).tint().noCull(); + .d().uv(0, 0, 16, 16).noCull() + .u().uv(0, 0, 16, 16).noCull(); boolean n = state.getValue(NORTH); boolean s = state.getValue(SOUTH); boolean w = state.getValue(WEST); @@ -506,53 +482,53 @@ public class BlockVine extends Block } if(sides == 4) { return model.add(0.8f, 0, 0, 0.8f, 16, 16).noShade() - .w().uv(0, 0, 16, 16).tint().noCull() - .e().uv(0, 0, 16, 16).tint().noCull() + .w().uv(0, 0, 16, 16).noCull() + .e().uv(0, 0, 16, 16).noCull() .add(15.2f, 0, 0, 15.2f, 16, 16).noShade() - .w().uv(0, 0, 16, 16).tint().noCull() - .e().uv(0, 0, 16, 16).tint().noCull() + .w().uv(0, 0, 16, 16).noCull() + .e().uv(0, 0, 16, 16).noCull() .add(0, 0, 15.2f, 16, 16, 15.2f).noShade() - .n().uv(0, 0, 16, 16).tint().noCull() - .s().uv(0, 0, 16, 16).tint().noCull() + .n().uv(0, 0, 16, 16).noCull() + .s().uv(0, 0, 16, 16).noCull() .add(0, 0, 0.8f, 16, 16, 0.8f).noShade() - .n().uv(0, 0, 16, 16).tint().noCull() - .s().uv(0, 0, 16, 16).tint().noCull(); + .n().uv(0, 0, 16, 16).noCull() + .s().uv(0, 0, 16, 16).noCull(); } else if(sides == 1) { return model.add(0, 0, 15.2f, 16, 16, 15.2f).noShade() - .n().uv(0, 0, 16, 16).tint().noCull() - .s().uv(0, 0, 16, 16).tint().noCull() + .n().uv(0, 0, 16, 16).noCull() + .s().uv(0, 0, 16, 16).noCull() .rotate(s ? ModelRotation.X0_Y0 : (n ? ModelRotation.X0_Y180 : (e ? ModelRotation.X0_Y270 : ModelRotation.X0_Y90))); } else if(sides == 2 && ((e != w) || (n != s))) { return model.add(0, 0, 0.8f, 16, 16, 0.8f).noShade() - .n().uv(0, 0, 16, 16).tint().noCull() - .s().uv(0, 0, 16, 16).tint().noCull() + .n().uv(0, 0, 16, 16).noCull() + .s().uv(0, 0, 16, 16).noCull() .add(15.2f, 0, 0, 15.2f, 16, 16).noShade() - .w().uv(0, 0, 16, 16).tint().noCull() - .e().uv(0, 0, 16, 16).tint().noCull() + .w().uv(0, 0, 16, 16).noCull() + .e().uv(0, 0, 16, 16).noCull() .rotate(n && e ? ModelRotation.X0_Y0 : (s && w ? ModelRotation.X0_Y180 : (n && w ? ModelRotation.X0_Y270 : ModelRotation.X0_Y90))); } else if(sides == 2) { return model.add(15.2f, 0, 0, 15.2f, 16, 16).noShade() - .w().uv(0, 0, 16, 16).tint().noCull() - .e().uv(0, 0, 16, 16).tint().noCull() + .w().uv(0, 0, 16, 16).noCull() + .e().uv(0, 0, 16, 16).noCull() .add(0.8f, 0, 0, 0.8f, 16, 16).noShade() - .w().uv(0, 0, 16, 16).tint().noCull() - .e().uv(0, 0, 16, 16).tint().noCull() + .w().uv(0, 0, 16, 16).noCull() + .e().uv(0, 0, 16, 16).noCull() .rotate(e ? ModelRotation.X0_Y0 : ModelRotation.X0_Y90); } else if(sides == 3) { return model.add(15.2f, 0, 0, 15.2f, 16, 16).noShade() - .w().uv(0, 0, 16, 16).tint().noCull() - .e().uv(0, 0, 16, 16).tint().noCull() + .w().uv(0, 0, 16, 16).noCull() + .e().uv(0, 0, 16, 16).noCull() .add(0, 0, 15.2f, 16, 16, 15.2f).noShade() - .n().uv(0, 0, 16, 16).tint().noCull() - .s().uv(0, 0, 16, 16).tint().noCull() + .n().uv(0, 0, 16, 16).noCull() + .s().uv(0, 0, 16, 16).noCull() .add(0, 0, 0.8f, 16, 16, 0.8f).noShade() - .n().uv(0, 0, 16, 16).tint().noCull() - .s().uv(0, 0, 16, 16).tint().noCull() + .n().uv(0, 0, 16, 16).noCull() + .s().uv(0, 0, 16, 16).noCull() .rotate(!w ? ModelRotation.X0_Y0 : (!e ? ModelRotation.X0_Y180 : (!s ? ModelRotation.X0_Y270 : ModelRotation.X0_Y90))); } else { @@ -560,8 +536,8 @@ public class BlockVine extends Block } } - public Transform getTransform() { - return Transform.PANE_SIDE; + public GuiPosition getItemPosition() { + return GuiPosition.PANE_SIDE; } protected Property[] getUnsavedProperties() { diff --git a/common/src/main/java/common/block/foliage/LeavesType.java b/common/src/main/java/common/block/foliage/LeavesType.java index 225087c9..7e3c4a69 100755 --- a/common/src/main/java/common/block/foliage/LeavesType.java +++ b/common/src/main/java/common/block/foliage/LeavesType.java @@ -3,19 +3,17 @@ package common.block.foliage; import common.util.Identifyable; public enum LeavesType implements Identifyable { - SPRING("spring", true, "Frühling"), - SUMMER("summer", true, "Sommer"), - AUTUMN("autumn", false, "Herbst"), - WINTER("winter", false, "Winter"), - SNOWY("snowy", false, "Beschneit"); + SPRING("spring", "Frühling"), + SUMMER("summer", "Sommer"), + AUTUMN("autumn", "Herbst"), + WINTER("winter", "Winter"), + SNOWY("snowy", "Beschneit"); private final String name; - private final boolean tint; private final String display; - private LeavesType(String name, boolean tint, String display) { + private LeavesType(String name, String display) { this.name = name; - this.tint = tint; this.display = display; } @@ -26,10 +24,6 @@ public enum LeavesType implements Identifyable { public String getDisplayName() { return this.display; } - - public boolean isTinted() { - return this.tint; - } public static LeavesType getByName(String name) { for(LeavesType type : values()) { diff --git a/common/src/main/java/common/block/liquid/BlockDynamicLiquid.java b/common/src/main/java/common/block/liquid/BlockDynamicLiquid.java index 7bf0f756..bd16392e 100755 --- a/common/src/main/java/common/block/liquid/BlockDynamicLiquid.java +++ b/common/src/main/java/common/block/liquid/BlockDynamicLiquid.java @@ -317,10 +317,4 @@ public class BlockDynamicLiquid extends BlockLiquid public void getAnimatedTextures(Map map) { map.put(BlockRegistry.getName(this.staticBlock) + "_flow", this.animation); } - - public String getFallbackTexture() { - if(this.cachedTexture == null) - this.cachedTexture = BlockRegistry.getName(this.staticBlock) + "_still"; - return this.cachedTexture; - } } diff --git a/common/src/main/java/common/block/liquid/BlockLiquid.java b/common/src/main/java/common/block/liquid/BlockLiquid.java index b03a5f83..ec16760f 100755 --- a/common/src/main/java/common/block/liquid/BlockLiquid.java +++ b/common/src/main/java/common/block/liquid/BlockLiquid.java @@ -5,7 +5,6 @@ import java.util.List; import common.block.Block; import common.block.Material; import common.collect.Lists; -import common.color.Colorizer; import common.entity.Entity; import common.init.Blocks; import common.init.SoundEvent; @@ -38,8 +37,6 @@ public abstract class BlockLiquid extends Block protected final int flowRate; protected final Object animation; - protected String cachedTexture; - public BlockLiquid(Material materialIn, boolean tick, boolean opaque, int rate, Object animation) { super(materialIn); @@ -61,11 +58,6 @@ public abstract class BlockLiquid extends Block return !this.material.isHotLiquid(); } - public int colorMultiplier(IWorldAccess worldIn, BlockPos pos, int renderPass) - { - return this.material == Material.WATER ? Colorizer.getWaterColor(worldIn, pos) : 16777215; - } - /** * Returns the percentage of the liquid block that is air, based on the given flow decay of the liquid */ @@ -116,7 +108,8 @@ public abstract class BlockLiquid extends Block public boolean canRender(IWorldAccess worldIn, BlockPos pos, Facing side) { - return worldIn.getState(pos).getBlock().getMaterial() == this.material ? false : (side == Facing.UP ? true : super.canRender(worldIn, pos, side)); + Material material = worldIn.getState(pos).getBlock().getMaterial(); + return material.isLiquid() && (material.isColdLiquid() == this.material.isColdLiquid()) ? false : (side == Facing.UP ? true : super.canRender(worldIn, pos, side)); } public boolean shouldRenderSides(IBlockAccess blockAccess, BlockPos pos) @@ -129,7 +122,7 @@ public abstract class BlockLiquid extends Block Block block = iblockstate.getBlock(); Material material = block.getMaterial(); - if (material != this.material && !block.isFullBlock()) + if ((!material.isLiquid() || (material.isColdLiquid() != this.material.isColdLiquid())) && !block.isFullBlock()) { return true; } diff --git a/common/src/main/java/common/block/liquid/BlockStaticLiquid.java b/common/src/main/java/common/block/liquid/BlockStaticLiquid.java index d59ecc14..35a5c3b7 100755 --- a/common/src/main/java/common/block/liquid/BlockStaticLiquid.java +++ b/common/src/main/java/common/block/liquid/BlockStaticLiquid.java @@ -116,10 +116,4 @@ public class BlockStaticLiquid extends BlockLiquid public void getAnimatedTextures(Map map) { map.put(BlockRegistry.getName(this) + "_still", this.animation); } - - public String getFallbackTexture() { - if(this.cachedTexture == null) - this.cachedTexture = BlockRegistry.getName(this) + "_still"; - return this.cachedTexture; - } } diff --git a/common/src/main/java/common/block/natural/BlockBlackFire.java b/common/src/main/java/common/block/natural/BlockBlackFire.java new file mode 100644 index 00000000..3639ad18 --- /dev/null +++ b/common/src/main/java/common/block/natural/BlockBlackFire.java @@ -0,0 +1,12 @@ +package common.block.natural; + +import java.util.Map; + +import common.model.TextureAnimation; + +public class BlockBlackFire extends BlockFire { + public void getAnimatedTextures(Map map) { + map.put("black_fire_layer_0", TextureAnimation.BLACK_FLAME_BASE); + map.put("black_fire_layer_1", TextureAnimation.BLACK_FLAME_OFFSET); + } +} diff --git a/common/src/main/java/common/block/natural/BlockBlackenedDirt.java b/common/src/main/java/common/block/natural/BlockBlackenedDirt.java index 26f74bf7..4ac6d947 100644 --- a/common/src/main/java/common/block/natural/BlockBlackenedDirt.java +++ b/common/src/main/java/common/block/natural/BlockBlackenedDirt.java @@ -34,7 +34,7 @@ public class BlockBlackenedDirt extends Block { worldIn.setState(blockpos, Blocks.blackened_dirt.getState()); } - else if (iblockstate.getBlock() == Blocks.grass && worldIn.getLightFromNeighbors(blockpos.up()) >= 2 && block.getLightOpacity() <= 6) + else if ((iblockstate.getBlock() == Blocks.grass || iblockstate.getBlock() == Blocks.swamp) && worldIn.getLightFromNeighbors(blockpos.up()) >= 2 && block.getLightOpacity() <= 6) { worldIn.setState(blockpos, Blocks.blackened_soil.getState()); worldIn.setBiome(blockpos, Biome.BLACKENED); diff --git a/common/src/main/java/common/block/natural/BlockFire.java b/common/src/main/java/common/block/natural/BlockFire.java index 974cc08f..ab987d56 100755 --- a/common/src/main/java/common/block/natural/BlockFire.java +++ b/common/src/main/java/common/block/natural/BlockFire.java @@ -4,6 +4,7 @@ import java.util.Map; import common.block.Block; import common.block.Material; +import common.block.artificial.BlockPortal; import common.init.Blocks; import common.init.SoundEvent; import common.item.Item; @@ -20,6 +21,7 @@ import common.util.BlockPos; import common.util.BoundingBox; import common.util.Facing; import common.util.ParticleType; +import common.util.PortalType; import common.vars.Vars; import common.world.IBlockAccess; import common.world.IWorldAccess; @@ -161,10 +163,10 @@ public class BlockFire extends Block // } } - boolean flag1 = worldIn.isBlockinHighHumidity(pos); + boolean cold = worldIn.getTemperatureC(pos) < 10.0f; int j = 0; - if (flag1) + if (cold) { j = -50; } @@ -201,7 +203,7 @@ public class BlockFire extends Block { int l1 = (k1 + 40 + /* worldIn.getDifficulty().getId() */ 3 * 7) / (i + 30); - if (flag1) + if (cold) { l1 /= 2; } @@ -331,7 +333,7 @@ public class BlockFire extends Block public void onAdded(AWorldServer worldIn, BlockPos pos, State state) { if ( // (worldIn.dimension.getDimensionId() < -1 || worldIn.dimension.getDimensionId() > 0) || - !Blocks.portal.tryIgnitePortal(worldIn, pos, worldIn.rand.zrange(8))) + !BlockPortal.getByType(PortalType.values()[worldIn.rand.zrange(PortalType.values().length - 2)]).tryIgnitePortal(worldIn, pos)) { if (!worldIn.isBlockSolid(pos.down()) && !this.canNeighborCatchFire(worldIn, pos)) { @@ -441,482 +443,482 @@ public class BlockFire extends Block private static Model fire_nsu2_flip(String fire) { return ModelProvider.getModelProvider().getModel(fire) .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .s().uv(16, 0, 0, 16).noCull().tint() + .s().uv(16, 0, 0, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .n().uv(16, 0, 0, 16).noCull().tint() + .n().uv(16, 0, 0, 16).noCull() .add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade() - .s().uv(16, 0, 0, 16).noCull().tint() + .s().uv(16, 0, 0, 16).noCull() .add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade() - .n().uv(16, 0, 0, 16).noCull().tint() + .n().uv(16, 0, 0, 16).noCull() .add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 16, Facing.Axis.X, -22.5f, true) - .d().uv(0, 0, 16, 16).rot(180).noCull().tint() + .d().uv(0, 0, 16, 16).rot(180).noCull() .add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 0, Facing.Axis.X, 22.5f, true) - .d().uv(0, 0, 16, 16).noCull().tint(); + .d().uv(0, 0, 16, 16).noCull(); } private static Model fire_nu1(String fire) { return ModelProvider.getModelProvider().getModel(fire) .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .s().uv(0, 0, 16, 16).noCull().tint() + .s().uv(0, 0, 16, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .n().uv(0, 0, 16, 16).noCull().tint() + .n().uv(0, 0, 16, 16).noCull() .add(0, 16, 0, 16, 16, 16).noShade().rotate(16, 16, 8, Facing.Axis.Z, 22.5f, true) - .d().uv(0, 0, 16, 16).rot(270).noCull().tint() + .d().uv(0, 0, 16, 16).rot(270).noCull() .add(0, 16, 0, 16, 16, 16).noShade().rotate(0, 16, 8, Facing.Axis.Z, -22.5f, true) - .d().uv(0, 0, 16, 16).rot(90).noCull().tint(); + .d().uv(0, 0, 16, 16).rot(90).noCull(); } private static Model fire_nseu2_flip(String fire) { return ModelProvider.getModelProvider().getModel(fire) .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .s().uv(16, 0, 0, 16).noCull().tint() + .s().uv(16, 0, 0, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .n().uv(16, 0, 0, 16).noCull().tint() + .n().uv(16, 0, 0, 16).noCull() .add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade() - .s().uv(16, 0, 0, 16).noCull().tint() + .s().uv(16, 0, 0, 16).noCull() .add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade() - .n().uv(16, 0, 0, 16).noCull().tint() + .n().uv(16, 0, 0, 16).noCull() .add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade() - .e().uv(16, 0, 0, 16).noCull().tint() + .e().uv(16, 0, 0, 16).noCull() .add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade() - .w().uv(16, 0, 0, 16).noCull().tint() + .w().uv(16, 0, 0, 16).noCull() .add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 16, Facing.Axis.X, -22.5f, true) - .d().uv(0, 0, 16, 16).rot(180).noCull().tint() + .d().uv(0, 0, 16, 16).rot(180).noCull() .add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 0, Facing.Axis.X, 22.5f, true) - .d().uv(0, 0, 16, 16).noCull().tint(); + .d().uv(0, 0, 16, 16).noCull(); } private static Model fire_neu1_flip(String fire) { return ModelProvider.getModelProvider().getModel(fire) .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .s().uv(16, 0, 0, 16).noCull().tint() + .s().uv(16, 0, 0, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .n().uv(16, 0, 0, 16).noCull().tint() + .n().uv(16, 0, 0, 16).noCull() .add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade() - .e().uv(16, 0, 0, 16).noCull().tint() + .e().uv(16, 0, 0, 16).noCull() .add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade() - .w().uv(16, 0, 0, 16).noCull().tint() + .w().uv(16, 0, 0, 16).noCull() .add(0, 16, 0, 16, 16, 16).noShade().rotate(16, 16, 8, Facing.Axis.Z, 22.5f, true) - .d().uv(0, 0, 16, 16).rot(270).noCull().tint() + .d().uv(0, 0, 16, 16).rot(270).noCull() .add(0, 16, 0, 16, 16, 16).noShade().rotate(0, 16, 8, Facing.Axis.Z, -22.5f, true) - .d().uv(0, 0, 16, 16).rot(90).noCull().tint(); + .d().uv(0, 0, 16, 16).rot(90).noCull(); } private static Model fire_nsu2(String fire) { return ModelProvider.getModelProvider().getModel(fire) .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .s().uv(0, 0, 16, 16).noCull().tint() + .s().uv(0, 0, 16, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .n().uv(0, 0, 16, 16).noCull().tint() + .n().uv(0, 0, 16, 16).noCull() .add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade() - .s().uv(0, 0, 16, 16).noCull().tint() + .s().uv(0, 0, 16, 16).noCull() .add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade() - .n().uv(0, 0, 16, 16).noCull().tint() + .n().uv(0, 0, 16, 16).noCull() .add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 16, Facing.Axis.X, -22.5f, true) - .d().uv(0, 0, 16, 16).rot(180).noCull().tint() + .d().uv(0, 0, 16, 16).rot(180).noCull() .add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 0, Facing.Axis.X, 22.5f, true) - .d().uv(0, 0, 16, 16).noCull().tint(); + .d().uv(0, 0, 16, 16).noCull(); } private static Model fire_nu2_flip(String fire) { return ModelProvider.getModelProvider().getModel(fire) .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .s().uv(16, 0, 0, 16).noCull().tint() + .s().uv(16, 0, 0, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .n().uv(16, 0, 0, 16).noCull().tint() + .n().uv(16, 0, 0, 16).noCull() .add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 16, Facing.Axis.X, -22.5f, true) - .d().uv(0, 0, 16, 16).rot(180).noCull().tint() + .d().uv(0, 0, 16, 16).rot(180).noCull() .add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 0, Facing.Axis.X, 22.5f, true) - .d().uv(0, 0, 16, 16).noCull().tint(); + .d().uv(0, 0, 16, 16).noCull(); } private static Model fire_neu2_flip(String fire) { return ModelProvider.getModelProvider().getModel(fire) .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .s().uv(16, 0, 0, 16).noCull().tint() + .s().uv(16, 0, 0, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .n().uv(16, 0, 0, 16).noCull().tint() + .n().uv(16, 0, 0, 16).noCull() .add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade() - .e().uv(16, 0, 0, 16).noCull().tint() + .e().uv(16, 0, 0, 16).noCull() .add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade() - .w().uv(16, 0, 0, 16).noCull().tint() + .w().uv(16, 0, 0, 16).noCull() .add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 16, Facing.Axis.X, -22.5f, true) - .d().uv(0, 0, 16, 16).rot(180).noCull().tint() + .d().uv(0, 0, 16, 16).rot(180).noCull() .add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 0, Facing.Axis.X, 22.5f, true) - .d().uv(0, 0, 16, 16).noCull().tint(); + .d().uv(0, 0, 16, 16).noCull(); } private static Model fire_nsewu2_flip(String fire) { return ModelProvider.getModelProvider().getModel(fire) .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .s().uv(16, 0, 0, 16).noCull().tint() + .s().uv(16, 0, 0, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .n().uv(16, 0, 0, 16).noCull().tint() + .n().uv(16, 0, 0, 16).noCull() .add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade() - .s().uv(16, 0, 0, 16).noCull().tint() + .s().uv(16, 0, 0, 16).noCull() .add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade() - .n().uv(16, 0, 0, 16).noCull().tint() + .n().uv(16, 0, 0, 16).noCull() .add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade() - .e().uv(16, 0, 0, 16).noCull().tint() + .e().uv(16, 0, 0, 16).noCull() .add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade() - .w().uv(16, 0, 0, 16).noCull().tint() + .w().uv(16, 0, 0, 16).noCull() .add(0.01f, 1, 0, 0.01f, 23.4f, 16).noShade() - .e().uv(16, 0, 0, 16).noCull().tint() + .e().uv(16, 0, 0, 16).noCull() .add(15.99f, 1, 0, 0.01f, 23.4f, 16).noShade() - .w().uv(16, 0, 0, 16).noCull().tint() + .w().uv(16, 0, 0, 16).noCull() .add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 16, Facing.Axis.X, -22.5f, true) - .d().uv(0, 0, 16, 16).rot(180).noCull().tint() + .d().uv(0, 0, 16, 16).rot(180).noCull() .add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 0, Facing.Axis.X, 22.5f, true) - .d().uv(0, 0, 16, 16).noCull().tint(); + .d().uv(0, 0, 16, 16).noCull(); } private static Model fire_nsewu2(String fire) { return ModelProvider.getModelProvider().getModel(fire) .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .s().uv(0, 0, 16, 16).noCull().tint() + .s().uv(0, 0, 16, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .n().uv(0, 0, 16, 16).noCull().tint() + .n().uv(0, 0, 16, 16).noCull() .add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade() - .s().uv(0, 0, 16, 16).noCull().tint() + .s().uv(0, 0, 16, 16).noCull() .add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade() - .n().uv(0, 0, 16, 16).noCull().tint() + .n().uv(0, 0, 16, 16).noCull() .add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade() - .e().uv(0, 0, 16, 16).noCull().tint() + .e().uv(0, 0, 16, 16).noCull() .add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade() - .w().uv(0, 0, 16, 16).noCull().tint() + .w().uv(0, 0, 16, 16).noCull() .add(0.01f, 1, 0, 0.01f, 23.4f, 16).noShade() - .e().uv(0, 0, 16, 16).noCull().tint() + .e().uv(0, 0, 16, 16).noCull() .add(15.99f, 1, 0, 0.01f, 23.4f, 16).noShade() - .w().uv(0, 0, 16, 16).noCull().tint() + .w().uv(0, 0, 16, 16).noCull() .add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 16, Facing.Axis.X, -22.5f, true) - .d().uv(0, 0, 16, 16).rot(180).noCull().tint() + .d().uv(0, 0, 16, 16).rot(180).noCull() .add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 0, Facing.Axis.X, 22.5f, true) - .d().uv(0, 0, 16, 16).noCull().tint(); + .d().uv(0, 0, 16, 16).noCull(); } private static Model fire_nsew(String fire) { return ModelProvider.getModelProvider().getModel(fire) .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .s().uv(0, 0, 16, 16).noCull().tint() + .s().uv(0, 0, 16, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .n().uv(0, 0, 16, 16).noCull().tint() + .n().uv(0, 0, 16, 16).noCull() .add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade() - .s().uv(0, 0, 16, 16).noCull().tint() + .s().uv(0, 0, 16, 16).noCull() .add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade() - .n().uv(0, 0, 16, 16).noCull().tint() + .n().uv(0, 0, 16, 16).noCull() .add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade() - .e().uv(0, 0, 16, 16).noCull().tint() + .e().uv(0, 0, 16, 16).noCull() .add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade() - .w().uv(0, 0, 16, 16).noCull().tint() + .w().uv(0, 0, 16, 16).noCull() .add(0.01f, 1, 0, 0.01f, 23.4f, 16).noShade() - .e().uv(0, 0, 16, 16).noCull().tint() + .e().uv(0, 0, 16, 16).noCull() .add(15.99f, 1, 0, 0.01f, 23.4f, 16).noShade() - .w().uv(0, 0, 16, 16).noCull().tint(); + .w().uv(0, 0, 16, 16).noCull(); } private static Model fire_floor(String fire) { return ModelProvider.getModelProvider().getModel(fire) .add(0, 0, 8.8f, 16, 22.4f, 8.8f).noShade().rotate(8, 8, 8, Facing.Axis.X, -22.5f, true) - .s().uv(0, 0, 16, 16).noCull().tint() + .s().uv(0, 0, 16, 16).noCull() .add(0, 0, 7.2f, 16, 22.4f, 7.2f).noShade().rotate(8, 8, 8, Facing.Axis.X, 22.5f, true) - .n().uv(0, 0, 16, 16).noCull().tint() + .n().uv(0, 0, 16, 16).noCull() .add(8.8f, 0, 0, 8.8f, 22.4f, 16).noShade().rotate(8, 8, 8, Facing.Axis.Z, -22.5f, true) - .w().uv(0, 0, 16, 16).noCull().tint() + .w().uv(0, 0, 16, 16).noCull() .add(7.2f, 0, 0, 7.2f, 22.4f, 16).noShade().rotate(8, 8, 8, Facing.Axis.Z, 22.5f, true) - .e().uv(0, 0, 16, 16).noCull().tint() + .e().uv(0, 0, 16, 16).noCull() .add(0, 0, 15.99f, 16, 22.4f, 15.99f).noShade() - .s().uv(0, 0, 16, 16).noCull().tint() + .s().uv(0, 0, 16, 16).noCull() .add(0, 0, 0.01f, 16, 22.4f, 0.01f).noShade() - .n().uv(0, 0, 16, 16).noCull().tint() + .n().uv(0, 0, 16, 16).noCull() .add(0.01f, 0, 0, 0.01f, 22.4f, 16).noShade() - .w().uv(0, 0, 16, 16).noCull().tint() + .w().uv(0, 0, 16, 16).noCull() .add(15.99f, 0, 0, 15.99f, 22.4f, 16).noShade() - .e().uv(0, 0, 16, 16).noCull().tint(); + .e().uv(0, 0, 16, 16).noCull(); } private static Model fire_u1(String fire) { return ModelProvider.getModelProvider().getModel(fire) .add(0, 16, 0, 16, 16, 16).noShade().rotate(16, 16, 8, Facing.Axis.Z, 22.5f, true) - .d().uv(0, 0, 16, 16).rot(270).noCull().tint() + .d().uv(0, 0, 16, 16).rot(270).noCull() .add(0, 16, 0, 16, 16, 16).noShade().rotate(0, 16, 8, Facing.Axis.Z, -22.5f, true) - .d().uv(0, 0, 16, 16).rot(90).noCull().tint(); + .d().uv(0, 0, 16, 16).rot(90).noCull(); } private static Model fire_n_flip(String fire) { return ModelProvider.getModelProvider().getModel(fire) .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .s().uv(16, 0, 0, 16).noCull().tint() + .s().uv(16, 0, 0, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .n().uv(16, 0, 0, 16).noCull().tint(); + .n().uv(16, 0, 0, 16).noCull(); } private static Model fire_ne(String fire) { return ModelProvider.getModelProvider().getModel(fire) .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .s().uv(0, 0, 16, 16).noCull().tint() + .s().uv(0, 0, 16, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .n().uv(0, 0, 16, 16).noCull().tint() + .n().uv(0, 0, 16, 16).noCull() .add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade() - .e().uv(0, 0, 16, 16).noCull().tint() + .e().uv(0, 0, 16, 16).noCull() .add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade() - .w().uv(0, 0, 16, 16).noCull().tint(); + .w().uv(0, 0, 16, 16).noCull(); } private static Model fire_nsew_flip(String fire) { return ModelProvider.getModelProvider().getModel(fire) .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .s().uv(16, 0, 0, 16).noCull().tint() + .s().uv(16, 0, 0, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .n().uv(16, 0, 0, 16).noCull().tint() + .n().uv(16, 0, 0, 16).noCull() .add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade() - .s().uv(16, 0, 0, 16).noCull().tint() + .s().uv(16, 0, 0, 16).noCull() .add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade() - .n().uv(16, 0, 0, 16).noCull().tint() + .n().uv(16, 0, 0, 16).noCull() .add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade() - .e().uv(16, 0, 0, 16).noCull().tint() + .e().uv(16, 0, 0, 16).noCull() .add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade() - .w().uv(16, 0, 0, 16).noCull().tint() + .w().uv(16, 0, 0, 16).noCull() .add(0.01f, 1, 0, 0.01f, 23.4f, 16).noShade() - .e().uv(16, 0, 0, 16).noCull().tint() + .e().uv(16, 0, 0, 16).noCull() .add(15.99f, 1, 0, 0.01f, 23.4f, 16).noShade() - .w().uv(16, 0, 0, 16).noCull().tint(); + .w().uv(16, 0, 0, 16).noCull(); } private static Model fire_nse(String fire) { return ModelProvider.getModelProvider().getModel(fire) .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .s().uv(0, 0, 16, 16).noCull().tint() + .s().uv(0, 0, 16, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .n().uv(0, 0, 16, 16).noCull().tint() + .n().uv(0, 0, 16, 16).noCull() .add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade() - .s().uv(0, 0, 16, 16).noCull().tint() + .s().uv(0, 0, 16, 16).noCull() .add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade() - .n().uv(0, 0, 16, 16).noCull().tint() + .n().uv(0, 0, 16, 16).noCull() .add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade() - .e().uv(0, 0, 16, 16).noCull().tint() + .e().uv(0, 0, 16, 16).noCull() .add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade() - .w().uv(0, 0, 16, 16).noCull().tint(); + .w().uv(0, 0, 16, 16).noCull(); } private static Model fire_nse_flip(String fire) { return ModelProvider.getModelProvider().getModel(fire) .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .s().uv(16, 0, 0, 16).noCull().tint() + .s().uv(16, 0, 0, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .n().uv(16, 0, 0, 16).noCull().tint() + .n().uv(16, 0, 0, 16).noCull() .add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade() - .s().uv(16, 0, 0, 16).noCull().tint() + .s().uv(16, 0, 0, 16).noCull() .add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade() - .n().uv(16, 0, 0, 16).noCull().tint() + .n().uv(16, 0, 0, 16).noCull() .add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade() - .e().uv(16, 0, 0, 16).noCull().tint() + .e().uv(16, 0, 0, 16).noCull() .add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade() - .w().uv(16, 0, 0, 16).noCull().tint(); + .w().uv(16, 0, 0, 16).noCull(); } private static Model fire_nsu1_flip(String fire) { return ModelProvider.getModelProvider().getModel(fire) .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .s().uv(16, 0, 0, 16).noCull().tint() + .s().uv(16, 0, 0, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .n().uv(16, 0, 0, 16).noCull().tint() + .n().uv(16, 0, 0, 16).noCull() .add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade() - .s().uv(16, 0, 0, 16).noCull().tint() + .s().uv(16, 0, 0, 16).noCull() .add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade() - .n().uv(16, 0, 0, 16).noCull().tint() + .n().uv(16, 0, 0, 16).noCull() .add(0, 16, 0, 16, 16, 16).noShade().rotate(16, 16, 8, Facing.Axis.Z, 22.5f, true) - .d().uv(0, 0, 16, 16).rot(270).noCull().tint() + .d().uv(0, 0, 16, 16).rot(270).noCull() .add(0, 16, 0, 16, 16, 16).noShade().rotate(0, 16, 8, Facing.Axis.Z, -22.5f, true) - .d().uv(0, 0, 16, 16).rot(90).noCull().tint(); + .d().uv(0, 0, 16, 16).rot(90).noCull(); } private static Model fire_n(String fire) { return ModelProvider.getModelProvider().getModel(fire) .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .s().uv(0, 0, 16, 16).noCull().tint() + .s().uv(0, 0, 16, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .n().uv(0, 0, 16, 16).noCull().tint(); + .n().uv(0, 0, 16, 16).noCull(); } private static Model fire_ns(String fire) { return ModelProvider.getModelProvider().getModel(fire) .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .s().uv(0, 0, 16, 16).noCull().tint() + .s().uv(0, 0, 16, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .n().uv(0, 0, 16, 16).noCull().tint() + .n().uv(0, 0, 16, 16).noCull() .add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade() - .s().uv(0, 0, 16, 16).noCull().tint() + .s().uv(0, 0, 16, 16).noCull() .add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade() - .n().uv(0, 0, 16, 16).noCull().tint(); + .n().uv(0, 0, 16, 16).noCull(); } private static Model fire_neu1(String fire) { return ModelProvider.getModelProvider().getModel(fire) .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .s().uv(0, 0, 16, 16).noCull().tint() + .s().uv(0, 0, 16, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .n().uv(0, 0, 16, 16).noCull().tint() + .n().uv(0, 0, 16, 16).noCull() .add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade() - .e().uv(0, 0, 16, 16).noCull().tint() + .e().uv(0, 0, 16, 16).noCull() .add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade() - .w().uv(0, 0, 16, 16).noCull().tint() + .w().uv(0, 0, 16, 16).noCull() .add(0, 16, 0, 16, 16, 16).noShade().rotate(16, 16, 8, Facing.Axis.Z, 22.5f, true) - .d().uv(0, 0, 16, 16).rot(270).noCull().tint() + .d().uv(0, 0, 16, 16).rot(270).noCull() .add(0, 16, 0, 16, 16, 16).noShade().rotate(0, 16, 8, Facing.Axis.Z, -22.5f, true) - .d().uv(0, 0, 16, 16).rot(90).noCull().tint(); + .d().uv(0, 0, 16, 16).rot(90).noCull(); } private static Model fire_u2(String fire) { return ModelProvider.getModelProvider().getModel(fire) .add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 16, Facing.Axis.X, -22.5f, true) - .d().uv(0, 0, 16, 16).rot(180).noCull().tint() + .d().uv(0, 0, 16, 16).rot(180).noCull() .add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 0, Facing.Axis.X, 22.5f, true) - .d().uv(0, 0, 16, 16).noCull().tint(); + .d().uv(0, 0, 16, 16).noCull(); } private static Model fire_nseu2(String fire) { return ModelProvider.getModelProvider().getModel(fire) .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .s().uv(0, 0, 16, 16).noCull().tint() + .s().uv(0, 0, 16, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .n().uv(0, 0, 16, 16).noCull().tint() + .n().uv(0, 0, 16, 16).noCull() .add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade() - .s().uv(0, 0, 16, 16).noCull().tint() + .s().uv(0, 0, 16, 16).noCull() .add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade() - .n().uv(0, 0, 16, 16).noCull().tint() + .n().uv(0, 0, 16, 16).noCull() .add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade() - .e().uv(0, 0, 16, 16).noCull().tint() + .e().uv(0, 0, 16, 16).noCull() .add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade() - .w().uv(0, 0, 16, 16).noCull().tint() + .w().uv(0, 0, 16, 16).noCull() .add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 16, Facing.Axis.X, -22.5f, true) - .d().uv(0, 0, 16, 16).rot(180).noCull().tint() + .d().uv(0, 0, 16, 16).rot(180).noCull() .add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 0, Facing.Axis.X, 22.5f, true) - .d().uv(0, 0, 16, 16).noCull().tint(); + .d().uv(0, 0, 16, 16).noCull(); } private static Model fire_neu2(String fire) { return ModelProvider.getModelProvider().getModel(fire) .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .s().uv(0, 0, 16, 16).noCull().tint() + .s().uv(0, 0, 16, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .n().uv(0, 0, 16, 16).noCull().tint() + .n().uv(0, 0, 16, 16).noCull() .add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade() - .e().uv(0, 0, 16, 16).noCull().tint() + .e().uv(0, 0, 16, 16).noCull() .add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade() - .w().uv(0, 0, 16, 16).noCull().tint() + .w().uv(0, 0, 16, 16).noCull() .add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 16, Facing.Axis.X, -22.5f, true) - .d().uv(0, 0, 16, 16).rot(180).noCull().tint() + .d().uv(0, 0, 16, 16).rot(180).noCull() .add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 0, Facing.Axis.X, 22.5f, true) - .d().uv(0, 0, 16, 16).noCull().tint(); + .d().uv(0, 0, 16, 16).noCull(); } private static Model fire_nu2(String fire) { return ModelProvider.getModelProvider().getModel(fire) .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .s().uv(0, 0, 16, 16).noCull().tint() + .s().uv(0, 0, 16, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .n().uv(0, 0, 16, 16).noCull().tint() + .n().uv(0, 0, 16, 16).noCull() .add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 16, Facing.Axis.X, -22.5f, true) - .d().uv(0, 0, 16, 16).rot(180).noCull().tint() + .d().uv(0, 0, 16, 16).rot(180).noCull() .add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 0, Facing.Axis.X, 22.5f, true) - .d().uv(0, 0, 16, 16).noCull().tint(); + .d().uv(0, 0, 16, 16).noCull(); } private static Model fire_nseu1(String fire) { return ModelProvider.getModelProvider().getModel(fire) .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .s().uv(0, 0, 16, 16).noCull().tint() + .s().uv(0, 0, 16, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .n().uv(0, 0, 16, 16).noCull().tint() + .n().uv(0, 0, 16, 16).noCull() .add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade() - .s().uv(0, 0, 16, 16).noCull().tint() + .s().uv(0, 0, 16, 16).noCull() .add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade() - .n().uv(0, 0, 16, 16).noCull().tint() + .n().uv(0, 0, 16, 16).noCull() .add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade() - .e().uv(0, 0, 16, 16).noCull().tint() + .e().uv(0, 0, 16, 16).noCull() .add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade() - .w().uv(0, 0, 16, 16).noCull().tint() + .w().uv(0, 0, 16, 16).noCull() .add(0, 16, 0, 16, 16, 16).noShade().rotate(16, 16, 8, Facing.Axis.Z, 22.5f, true) - .d().uv(0, 0, 16, 16).rot(270).noCull().tint() + .d().uv(0, 0, 16, 16).rot(270).noCull() .add(0, 16, 0, 16, 16, 16).noShade().rotate(0, 16, 8, Facing.Axis.Z, -22.5f, true) - .d().uv(0, 0, 16, 16).rot(90).noCull().tint(); + .d().uv(0, 0, 16, 16).rot(90).noCull(); } private static Model fire_ns_flip(String fire) { return ModelProvider.getModelProvider().getModel(fire) .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .s().uv(16, 0, 0, 16).noCull().tint() + .s().uv(16, 0, 0, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .n().uv(16, 0, 0, 16).noCull().tint() + .n().uv(16, 0, 0, 16).noCull() .add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade() - .s().uv(16, 0, 0, 16).noCull().tint() + .s().uv(16, 0, 0, 16).noCull() .add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade() - .n().uv(16, 0, 0, 16).noCull().tint(); + .n().uv(16, 0, 0, 16).noCull(); } private static Model fire_nsewu1(String fire) { return ModelProvider.getModelProvider().getModel(fire) .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .s().uv(0, 0, 16, 16).noCull().tint() + .s().uv(0, 0, 16, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .n().uv(0, 0, 16, 16).noCull().tint() + .n().uv(0, 0, 16, 16).noCull() .add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade() - .s().uv(0, 0, 16, 16).noCull().tint() + .s().uv(0, 0, 16, 16).noCull() .add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade() - .n().uv(0, 0, 16, 16).noCull().tint() + .n().uv(0, 0, 16, 16).noCull() .add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade() - .e().uv(0, 0, 16, 16).noCull().tint() + .e().uv(0, 0, 16, 16).noCull() .add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade() - .w().uv(0, 0, 16, 16).noCull().tint() + .w().uv(0, 0, 16, 16).noCull() .add(0.01f, 1, 0, 0.01f, 23.4f, 16).noShade() - .e().uv(0, 0, 16, 16).noCull().tint() + .e().uv(0, 0, 16, 16).noCull() .add(15.99f, 1, 0, 0.01f, 23.4f, 16).noShade() - .w().uv(0, 0, 16, 16).noCull().tint() + .w().uv(0, 0, 16, 16).noCull() .add(0, 16, 0, 16, 16, 16).noShade().rotate(16, 16, 8, Facing.Axis.Z, 22.5f, true) - .d().uv(0, 0, 16, 16).rot(270).noCull().tint() + .d().uv(0, 0, 16, 16).rot(270).noCull() .add(0, 16, 0, 16, 16, 16).noShade().rotate(0, 16, 8, Facing.Axis.Z, -22.5f, true) - .d().uv(0, 0, 16, 16).rot(90).noCull().tint(); + .d().uv(0, 0, 16, 16).rot(90).noCull(); } private static Model fire_nsu1(String fire) { return ModelProvider.getModelProvider().getModel(fire) .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .s().uv(0, 0, 16, 16).noCull().tint() + .s().uv(0, 0, 16, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .n().uv(0, 0, 16, 16).noCull().tint() + .n().uv(0, 0, 16, 16).noCull() .add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade() - .s().uv(0, 0, 16, 16).noCull().tint() + .s().uv(0, 0, 16, 16).noCull() .add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade() - .n().uv(0, 0, 16, 16).noCull().tint() + .n().uv(0, 0, 16, 16).noCull() .add(0, 16, 0, 16, 16, 16).noShade().rotate(16, 16, 8, Facing.Axis.Z, 22.5f, true) - .d().uv(0, 0, 16, 16).rot(270).noCull().tint() + .d().uv(0, 0, 16, 16).rot(270).noCull() .add(0, 16, 0, 16, 16, 16).noShade().rotate(0, 16, 8, Facing.Axis.Z, -22.5f, true) - .d().uv(0, 0, 16, 16).rot(90).noCull().tint(); + .d().uv(0, 0, 16, 16).rot(90).noCull(); } private static Model fire_nsewu1_flip(String fire) { return ModelProvider.getModelProvider().getModel(fire) .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .s().uv(16, 0, 0, 16).noCull().tint() + .s().uv(16, 0, 0, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .n().uv(16, 0, 0, 16).noCull().tint() + .n().uv(16, 0, 0, 16).noCull() .add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade() - .s().uv(16, 0, 0, 16).noCull().tint() + .s().uv(16, 0, 0, 16).noCull() .add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade() - .n().uv(16, 0, 0, 16).noCull().tint() + .n().uv(16, 0, 0, 16).noCull() .add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade() - .e().uv(16, 0, 0, 16).noCull().tint() + .e().uv(16, 0, 0, 16).noCull() .add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade() - .w().uv(16, 0, 0, 16).noCull().tint() + .w().uv(16, 0, 0, 16).noCull() .add(0.01f, 1, 0, 0.01f, 23.4f, 16).noShade() - .e().uv(16, 0, 0, 16).noCull().tint() + .e().uv(16, 0, 0, 16).noCull() .add(15.99f, 1, 0, 0.01f, 23.4f, 16).noShade() - .w().uv(16, 0, 0, 16).noCull().tint() + .w().uv(16, 0, 0, 16).noCull() .add(0, 16, 0, 16, 16, 16).noShade().rotate(16, 16, 8, Facing.Axis.Z, 22.5f, true) - .d().uv(0, 0, 16, 16).rot(270).noCull().tint() + .d().uv(0, 0, 16, 16).rot(270).noCull() .add(0, 16, 0, 16, 16, 16).noShade().rotate(0, 16, 8, Facing.Axis.Z, -22.5f, true) - .d().uv(0, 0, 16, 16).rot(90).noCull().tint(); + .d().uv(0, 0, 16, 16).rot(90).noCull(); } private static Model fire_ne_flip(String fire) { return ModelProvider.getModelProvider().getModel(fire) .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .s().uv(16, 0, 0, 16).noCull().tint() + .s().uv(16, 0, 0, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .n().uv(16, 0, 0, 16).noCull().tint() + .n().uv(16, 0, 0, 16).noCull() .add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade() - .e().uv(16, 0, 0, 16).noCull().tint() + .e().uv(16, 0, 0, 16).noCull() .add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade() - .w().uv(16, 0, 0, 16).noCull().tint(); + .w().uv(16, 0, 0, 16).noCull(); } private static Model fire_nseu1_flip(String fire) { return ModelProvider.getModelProvider().getModel(fire) .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .s().uv(16, 0, 0, 16).noCull().tint() + .s().uv(16, 0, 0, 16).noCull() .add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade() - .n().uv(16, 0, 0, 16).noCull().tint() + .n().uv(16, 0, 0, 16).noCull() .add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade() - .s().uv(16, 0, 0, 16).noCull().tint() + .s().uv(16, 0, 0, 16).noCull() .add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade() - .n().uv(16, 0, 0, 16).noCull().tint() + .n().uv(16, 0, 0, 16).noCull() .add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade() - .e().uv(16, 0, 0, 16).noCull().tint() + .e().uv(16, 0, 0, 16).noCull() .add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade() - .w().uv(16, 0, 0, 16).noCull().tint() + .w().uv(16, 0, 0, 16).noCull() .add(0, 16, 0, 16, 16, 16).noShade().rotate(16, 16, 8, Facing.Axis.Z, 22.5f, true) - .d().uv(0, 0, 16, 16).rot(270).noCull().tint() + .d().uv(0, 0, 16, 16).rot(270).noCull() .add(0, 16, 0, 16, 16, 16).noShade().rotate(0, 16, 8, Facing.Axis.Z, -22.5f, true) - .d().uv(0, 0, 16, 16).rot(90).noCull().tint(); + .d().uv(0, 0, 16, 16).rot(90).noCull(); } protected static Model getFireModel(String tex, boolean flip, int upper, boolean n, boolean s, boolean w, boolean e) { if(!e && !flip && !n && !s && upper == 0 && !w) @@ -1116,7 +1118,7 @@ public class BlockFire extends Block } public Model getModel(ModelProvider provider, String name, State state) { - return getFireModel(state.getValue(ALT) ? "fire_layer_1" : "fire_layer_0", state.getValue(FLIP), state.getValue(UPPER), + return getFireModel(state.getValue(ALT) ? name + "_layer_1" : name + "_layer_0", state.getValue(FLIP), state.getValue(UPPER), state.getValue(NORTH), state.getValue(SOUTH), state.getValue(WEST), state.getValue(EAST)); } @@ -1125,8 +1127,8 @@ public class BlockFire extends Block } public void getAnimatedTextures(Map map) { - map.put("fire_layer_0", TextureAnimation.FIRE1); - map.put("fire_layer_1", TextureAnimation.FIRE2); + map.put("fire_layer_0", TextureAnimation.FLAME_BASE); + map.put("fire_layer_1", TextureAnimation.FLAME_OFFSET); } public boolean canExtinguish() { diff --git a/common/src/main/java/common/block/natural/BlockPodzol.java b/common/src/main/java/common/block/natural/BlockPodzol.java index 48319ab2..dd63c2ea 100644 --- a/common/src/main/java/common/block/natural/BlockPodzol.java +++ b/common/src/main/java/common/block/natural/BlockPodzol.java @@ -6,6 +6,7 @@ import common.init.Blocks; import common.init.Items; import common.item.CheatTab; import common.item.Item; +import common.model.BlockLayer; import common.model.Model; import common.model.ModelProvider; import common.properties.Property; @@ -37,10 +38,17 @@ public class BlockPodzol extends Block { return Items.dirt; } - public Model getModel(ModelProvider provider, String name, State state) { - return state.getValue(SNOWY) ? provider.getModel("grass_side_snowed").add().nswe().d("dirt").u("grass_top") - : provider.getModel("dirt_podzol_side").add().nswe().d("dirt").u("dirt_podzol_top"); - } + public BlockLayer getRenderLayer() + { + return BlockLayer.CUTOUT_MIPPED; + } + + public Model getModel(ModelProvider provider, String name, State state) { + if(state.getValue(SNOWY)) + return provider.getModel("dirt").add().d().u("snow").nswe().add().nswe("soil_snowed"); + else + return provider.getModel("dirt").add().d().u("podzol_top").nswe().add().nswe("podzol_side"); + } protected Property[] getUnsavedProperties() { return new Property[] {SNOWY}; diff --git a/common/src/main/java/common/block/natural/BlockSnow.java b/common/src/main/java/common/block/natural/BlockSnow.java index 995ff950..cd7bbfec 100755 --- a/common/src/main/java/common/block/natural/BlockSnow.java +++ b/common/src/main/java/common/block/natural/BlockSnow.java @@ -10,7 +10,7 @@ import common.item.Item; import common.item.ItemStack; import common.model.Model; import common.model.ModelProvider; -import common.model.Transform; +import common.model.GuiPosition; import common.properties.Property; import common.properties.PropertyInteger; import common.rng.Random; @@ -37,7 +37,7 @@ public class BlockSnow extends Block this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.125F, 1.0F); this.setTicked(); this.setTab(CheatTab.DECORATION); - this.setItemBounds(); + this.getBoundsForLayers(0); } public boolean isPassable(IBlockAccess worldIn, BlockPos pos) @@ -67,14 +67,6 @@ public class BlockSnow extends Block return false; } - /** - * Sets the block's bounds for rendering it as an item - */ - public void setItemBounds() - { - this.getBoundsForLayers(0); - } - public void setBlockBounds(IWorldAccess worldIn, BlockPos pos) { State iblockstate = worldIn.getState(pos); diff --git a/common/src/main/java/common/block/natural/BlockSoulFire.java b/common/src/main/java/common/block/natural/BlockSoulFire.java index 9cacaeb4..d65388f1 100644 --- a/common/src/main/java/common/block/natural/BlockSoulFire.java +++ b/common/src/main/java/common/block/natural/BlockSoulFire.java @@ -1,14 +1,18 @@ package common.block.natural; +import java.util.Map; + +import common.model.TextureAnimation; import common.rng.Random; import common.util.BlockPos; import common.world.World; -public class BlockSoulFire extends BlockTintedFire { - public BlockSoulFire() { - super(0x4010ff); - } - +public class BlockSoulFire extends BlockFire { + public void getAnimatedTextures(Map map) { + map.put("soul_fire_layer_0", TextureAnimation.BLUE_FLAME_BASE); + map.put("soul_fire_layer_1", TextureAnimation.BLUE_FLAME_OFFSET); + } + protected void catchOnFire(World world, BlockPos pos, int chance, Random rand, int age) { } diff --git a/common/src/main/java/common/block/natural/BlockSoulSand.java b/common/src/main/java/common/block/natural/BlockSoulSand.java index b4da5d2a..d1da31d5 100755 --- a/common/src/main/java/common/block/natural/BlockSoulSand.java +++ b/common/src/main/java/common/block/natural/BlockSoulSand.java @@ -23,9 +23,6 @@ public class BlockSoulSand extends Block return new BoundingBox((double)pos.getX(), (double)pos.getY(), (double)pos.getZ(), (double)(pos.getX() + 1), (double)((float)(pos.getY() + 1) - f), (double)(pos.getZ() + 1)); } - /** - * Called When an Entity Collided with the Block - */ public void onCollideUpdate(World worldIn, BlockPos pos, State state, Entity entityIn) { entityIn.motionX *= 0.4D; diff --git a/common/src/main/java/common/block/natural/BlockTintedFire.java b/common/src/main/java/common/block/natural/BlockTintedFire.java deleted file mode 100644 index 3a9a2185..00000000 --- a/common/src/main/java/common/block/natural/BlockTintedFire.java +++ /dev/null @@ -1,36 +0,0 @@ -package common.block.natural; - -import java.util.Map; - -import common.model.Model; -import common.model.ModelProvider; -import common.model.TextureAnimation; -import common.util.BlockPos; -import common.world.IWorldAccess; -import common.world.State; - -public class BlockTintedFire extends BlockFire { - private final int tint; - - public BlockTintedFire(int tint) { - this.tint = tint; - } - - public int getRenderColor(State state) { - return this.tint; - } - - public int colorMultiplier(IWorldAccess worldIn, BlockPos pos, int renderPass) { - return this.tint; - } - - public Model getModel(ModelProvider provider, String name, State state) { - return getFireModel(state.getValue(ALT) ? "flame_layer_1" : "flame_layer_0", state.getValue(FLIP), state.getValue(UPPER), - state.getValue(NORTH), state.getValue(SOUTH), state.getValue(WEST), state.getValue(EAST)); - } - - public void getAnimatedTextures(Map map) { - map.put("flame_layer_0", TextureAnimation.FLAME1); - map.put("flame_layer_1", TextureAnimation.FLAME2); - } -} diff --git a/common/src/main/java/common/block/natural/BlockWeb.java b/common/src/main/java/common/block/natural/BlockWeb.java index d7577406..a41d638a 100755 --- a/common/src/main/java/common/block/natural/BlockWeb.java +++ b/common/src/main/java/common/block/natural/BlockWeb.java @@ -9,7 +9,7 @@ import common.item.Item; import common.model.BlockLayer; import common.model.Model; import common.model.ModelProvider; -import common.model.Transform; +import common.model.GuiPosition; import common.rng.Random; import common.util.BlockPos; import common.util.BoundingBox; @@ -72,7 +72,7 @@ public class BlockWeb extends Block return provider.getModel("web").cross(); } - public Transform getTransform() { - return Transform.CROSS; + public GuiPosition getItemPosition() { + return GuiPosition.CROSS; } } diff --git a/common/src/main/java/common/block/tech/BlockAnvil.java b/common/src/main/java/common/block/tech/BlockAnvil.java index 94638dbb..44e50ff1 100755 --- a/common/src/main/java/common/block/tech/BlockAnvil.java +++ b/common/src/main/java/common/block/tech/BlockAnvil.java @@ -14,7 +14,7 @@ import common.item.CheatTab; import common.model.Model; import common.model.ModelProvider; import common.model.ModelRotation; -import common.model.Transform; +import common.model.GuiPosition; import common.properties.Property; import common.util.BlockPos; import common.util.ExtMath; @@ -113,14 +113,6 @@ public class BlockAnvil extends BlockFalling implements Rotatable return true; } - /** - * Possibly modify the given BlockState before rendering it on an Entity (Minecarts, Endermen, ...) - */ - public State getEntityState(State state) - { - return this.getState().withProperty(FACING, Facing.SOUTH); - } - protected Property[] getProperties() { return new Property[] {FACING}; diff --git a/common/src/main/java/common/block/tech/BlockBasePressurePlate.java b/common/src/main/java/common/block/tech/BlockBasePressurePlate.java index c78eaf82..6635bc1c 100755 --- a/common/src/main/java/common/block/tech/BlockBasePressurePlate.java +++ b/common/src/main/java/common/block/tech/BlockBasePressurePlate.java @@ -9,7 +9,7 @@ import common.item.CheatTab; import common.item.Item; import common.model.Model; import common.model.ModelProvider; -import common.model.Transform; +import common.model.GuiPosition; import common.rng.Random; import common.util.BlockPos; import common.util.BoundingBox; @@ -205,17 +205,6 @@ public abstract class BlockBasePressurePlate extends Block return true; } - /** - * Sets the block's bounds for rendering it as an item - */ - public void setItemBounds() - { - float f = 0.5F; - float f1 = 0.125F; - float f2 = 0.5F; - this.setBlockBounds(0.0F, 0.375F, 0.0F, 1.0F, 0.625F, 1.0F); - } - public int getMobilityFlag() { return 1; @@ -242,8 +231,8 @@ public abstract class BlockBasePressurePlate extends Block .e().uv(1, 15, 15, 16).noCull(); } - public Transform getTransform() { - return Transform.SMALL_FLAT; + public GuiPosition getItemPosition() { + return GuiPosition.SMALL_FLAT; } public abstract String getTexture(); diff --git a/common/src/main/java/common/block/tech/BlockBrewingStand.java b/common/src/main/java/common/block/tech/BlockBrewingStand.java index 986c6db3..09ca3d3d 100755 --- a/common/src/main/java/common/block/tech/BlockBrewingStand.java +++ b/common/src/main/java/common/block/tech/BlockBrewingStand.java @@ -391,16 +391,8 @@ public class BlockBrewingStand extends Block implements ITileEntityProvider { this.setBlockBounds(0.4375F, 0.0F, 0.4375F, 0.5625F, 0.875F, 0.5625F); super.getCollisionBoxes(worldIn, pos, state, mask, list, collidingEntity); - this.setItemBounds(); - super.getCollisionBoxes(worldIn, pos, state, mask, list, collidingEntity); - } - - /** - * Sets the block's bounds for rendering it as an item - */ - public void setItemBounds() - { this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.125F, 1.0F); + super.getCollisionBoxes(worldIn, pos, state, mask, list, collidingEntity); } public boolean onUse(World worldIn, BlockPos pos, State state, EntityNPC playerIn, Facing side, float hitX, float hitY, float hitZ) diff --git a/common/src/main/java/common/block/tech/BlockButton.java b/common/src/main/java/common/block/tech/BlockButton.java index f50d95b6..8536a9c9 100755 --- a/common/src/main/java/common/block/tech/BlockButton.java +++ b/common/src/main/java/common/block/tech/BlockButton.java @@ -16,7 +16,7 @@ import common.item.Item; import common.model.Model; import common.model.ModelProvider; import common.model.ModelRotation; -import common.model.Transform; +import common.model.GuiPosition; import common.properties.Property; import common.properties.PropertyBool; import common.rng.Random; @@ -238,17 +238,6 @@ public class BlockButton extends Block implements Directional // } } - /** - * Sets the block's bounds for rendering it as an item - */ - public void setItemBounds() - { - float f = 0.1875F; - float f1 = 0.125F; - float f2 = 0.125F; - this.setBlockBounds(0.5F - f, 0.5F - f1, 0.5F - f2, 0.5F + f, 0.5F + f1, 0.5F + f2); - } - /** * Called When an Entity Collided with the Block */ @@ -340,7 +329,7 @@ public class BlockButton extends Block implements Directional .rotate(getRotation(state.getValue(FACING))); } - public Transform getTransform() { - return Transform.PANE_SIDE; + public GuiPosition getItemPosition() { + return GuiPosition.PANE_SIDE; } } diff --git a/common/src/main/java/common/block/tech/BlockCauldron.java b/common/src/main/java/common/block/tech/BlockCauldron.java index ae10f31b..b2b05042 100755 --- a/common/src/main/java/common/block/tech/BlockCauldron.java +++ b/common/src/main/java/common/block/tech/BlockCauldron.java @@ -430,14 +430,6 @@ public class BlockCauldron extends Block super.getCollisionBoxes(worldIn, pos, state, mask, list, collidingEntity); this.setBlockBounds(0.0F, 0.0F, 1.0F - f, 1.0F, 1.0F, 1.0F); super.getCollisionBoxes(worldIn, pos, state, mask, list, collidingEntity); - this.setItemBounds(); - } - - /** - * Sets the block's bounds for rendering it as an item - */ - public void setItemBounds() - { this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); } diff --git a/common/src/main/java/common/block/tech/BlockDispenser.java b/common/src/main/java/common/block/tech/BlockDispenser.java index 49e30ccd..eb6c2c45 100755 --- a/common/src/main/java/common/block/tech/BlockDispenser.java +++ b/common/src/main/java/common/block/tech/BlockDispenser.java @@ -159,14 +159,6 @@ public class BlockDispenser extends Block implements ITileEntityProvider, Direct return new Vec3(d0, d1, d2); } - /** - * Possibly modify the given BlockState before rendering it on an Entity (Minecarts, Endermen, ...) - */ - public State getEntityState(State state) - { - return this.getState().withProperty(FACING, Facing.SOUTH); - } - protected Property[] getProperties() { return new Property[] {FACING}; diff --git a/common/src/main/java/common/block/tech/BlockDisplay.java b/common/src/main/java/common/block/tech/BlockDisplay.java index 9d6b4e47..f3548c79 100644 --- a/common/src/main/java/common/block/tech/BlockDisplay.java +++ b/common/src/main/java/common/block/tech/BlockDisplay.java @@ -13,7 +13,7 @@ import common.item.CheatTab; import common.model.Model; import common.model.ModelProvider; import common.model.ModelRotation; -import common.model.Transform; +import common.model.GuiPosition; import common.properties.Property; import common.util.BlockPos; import common.util.BoundingBox; @@ -119,8 +119,8 @@ public abstract class BlockDisplay extends Block implements Rotatable return provider.getModel("iron_block").add(0, 0, 15, 16, 16, 16).n("display_area").noCull().s().du().we().rotate(ModelRotation.getNorthRot(state.getValue(FACING))); } - public Transform getTransform() { - return Transform.PANE_SIDE; + public GuiPosition getItemPosition() { + return GuiPosition.PANE_SIDE; } protected abstract BlockDisplay getOtherBlock(); diff --git a/common/src/main/java/common/block/tech/BlockFurnace.java b/common/src/main/java/common/block/tech/BlockFurnace.java index 84df6236..162e1b3d 100755 --- a/common/src/main/java/common/block/tech/BlockFurnace.java +++ b/common/src/main/java/common/block/tech/BlockFurnace.java @@ -192,14 +192,6 @@ public class BlockFurnace extends Block implements ITileEntityProvider, Rotatabl return Items.furnace; } - /** - * Possibly modify the given BlockState before rendering it on an Entity (Minecarts, Endermen, ...) - */ - public State getEntityState(State state) - { - return this.getState().withProperty(FACING, Facing.SOUTH); - } - protected Property[] getProperties() { return new Property[] {FACING}; diff --git a/common/src/main/java/common/block/tech/BlockLever.java b/common/src/main/java/common/block/tech/BlockLever.java index 43933525..f99e5dc0 100755 --- a/common/src/main/java/common/block/tech/BlockLever.java +++ b/common/src/main/java/common/block/tech/BlockLever.java @@ -10,7 +10,7 @@ import common.item.Item; import common.model.Model; import common.model.ModelProvider; import common.model.ModelRotation; -import common.model.Transform; +import common.model.GuiPosition; import common.properties.Property; import common.properties.PropertyBool; import common.properties.PropertyEnum; @@ -289,8 +289,8 @@ public class BlockLever extends Block .rotate(getRotation(state.getValue(FACING))); } - public Transform getTransform() { - return Transform.PANE_SIDE; + public GuiPosition getItemPosition() { + return GuiPosition.PANE_SIDE; } public static enum EnumOrientation implements Identifyable, DirectionVec diff --git a/common/src/main/java/common/block/tech/BlockPistonBase.java b/common/src/main/java/common/block/tech/BlockPistonBase.java index 530af1ba..86082a7d 100755 --- a/common/src/main/java/common/block/tech/BlockPistonBase.java +++ b/common/src/main/java/common/block/tech/BlockPistonBase.java @@ -423,14 +423,6 @@ public class BlockPistonBase extends Block implements Directional } } - /** - * Sets the block's bounds for rendering it as an item - */ - public void setItemBounds() - { - this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); - } - /** * Add all collision boxes of this Block to the list that intersect with the given mask. */ @@ -646,14 +638,6 @@ public class BlockPistonBase extends Block implements Directional } } - /** - * Possibly modify the given BlockState before rendering it on an Entity (Minecarts, Endermen, ...) - */ - public State getEntityState(State state) - { - return this.getState().withProperty(FACING, Facing.UP); - } - protected Property[] getProperties() { return new Property[] {FACING, EXTENDED}; diff --git a/common/src/main/java/common/block/tech/BlockRail.java b/common/src/main/java/common/block/tech/BlockRail.java index 13de9f1a..07f0bb33 100755 --- a/common/src/main/java/common/block/tech/BlockRail.java +++ b/common/src/main/java/common/block/tech/BlockRail.java @@ -11,7 +11,7 @@ import common.model.BlockLayer; import common.model.Model; import common.model.ModelProvider; import common.model.ModelRotation; -import common.model.Transform; +import common.model.GuiPosition; import common.properties.Property; import common.properties.PropertyEnum; import common.util.BlockPos; @@ -215,8 +215,8 @@ public class BlockRail extends Block } } - public Transform getTransform() { - return Transform.SMALL_FLAT; + public GuiPosition getItemPosition() { + return GuiPosition.SMALL_FLAT; } protected void onNeighborChangedInternal(World worldIn, BlockPos pos, State state, Block neighborBlock) diff --git a/common/src/main/java/common/block/tech/BlockTorch.java b/common/src/main/java/common/block/tech/BlockTorch.java index 9ceb0fc4..6100bc4b 100755 --- a/common/src/main/java/common/block/tech/BlockTorch.java +++ b/common/src/main/java/common/block/tech/BlockTorch.java @@ -13,7 +13,7 @@ import common.model.BlockLayer; import common.model.Model; import common.model.ModelProvider; import common.model.ModelRotation; -import common.model.Transform; +import common.model.GuiPosition; import common.properties.Property; import common.util.BlockPos; import common.util.BoundingBox; @@ -260,7 +260,7 @@ public abstract class BlockTorch extends Block implements Directional .rotate(ModelRotation.getEastRot(state.getValue(FACING), false)); } - public Transform getTransform() { - return Transform.SMALL; + public GuiPosition getItemPosition() { + return GuiPosition.SMALL; } } diff --git a/common/src/main/java/common/block/tech/BlockTripWire.java b/common/src/main/java/common/block/tech/BlockTripWire.java index 1208c52d..beb8af0f 100755 --- a/common/src/main/java/common/block/tech/BlockTripWire.java +++ b/common/src/main/java/common/block/tech/BlockTripWire.java @@ -16,7 +16,7 @@ import common.model.BlockLayer; import common.model.Model; import common.model.ModelProvider; import common.model.ModelRotation; -import common.model.Transform; +import common.model.GuiPosition; import common.properties.Property; import common.properties.PropertyBool; import common.rng.Random; @@ -649,7 +649,7 @@ public class BlockTripWire extends Block return new Property[] {NORTH, SOUTH, WEST, EAST}; } - public Transform getTransform() { - return Transform.THIN_WIRE; + public GuiPosition getItemPosition() { + return GuiPosition.THIN_WIRE; } } diff --git a/common/src/main/java/common/block/tech/BlockTripWireHook.java b/common/src/main/java/common/block/tech/BlockTripWireHook.java index 0d04ec28..6a84bf7c 100755 --- a/common/src/main/java/common/block/tech/BlockTripWireHook.java +++ b/common/src/main/java/common/block/tech/BlockTripWireHook.java @@ -12,7 +12,7 @@ import common.model.BlockLayer; import common.model.Model; import common.model.ModelProvider; import common.model.ModelRotation; -import common.model.Transform; +import common.model.GuiPosition; import common.properties.Property; import common.properties.PropertyBool; import common.rng.Random; @@ -547,8 +547,8 @@ public class BlockTripWireHook extends Block implements Rotatable return model.rotate(ModelRotation.getNorthRot(state.getValue(FACING))); } - public Transform getTransform() { - return Transform.PANE_SIDE; + public GuiPosition getItemPosition() { + return GuiPosition.PANE_SIDE; } protected Property[] getUnsavedProperties() { diff --git a/common/src/main/java/common/block/tech/BlockWire.java b/common/src/main/java/common/block/tech/BlockWire.java index b4380ca8..8161c32c 100755 --- a/common/src/main/java/common/block/tech/BlockWire.java +++ b/common/src/main/java/common/block/tech/BlockWire.java @@ -13,7 +13,7 @@ import common.model.BlockLayer; import common.model.Model; import common.model.ModelProvider; import common.model.ModelRotation; -import common.model.Transform; +import common.model.GuiPosition; import common.properties.Property; import common.properties.PropertyBool; import common.rng.Random; @@ -543,7 +543,7 @@ public class BlockWire extends Block return new Property[] {DOWN, UP, EAST, NORTH, SOUTH, WEST}; } - public Transform getTransform() { - return Transform.WIRE; + public GuiPosition getItemPosition() { + return GuiPosition.WIRE; } } diff --git a/common/src/main/java/common/color/Colorizer.java b/common/src/main/java/common/color/Colorizer.java deleted file mode 100755 index dcae2c95..00000000 --- a/common/src/main/java/common/color/Colorizer.java +++ /dev/null @@ -1,91 +0,0 @@ -package common.color; - -import common.biome.Biome; -import common.util.BlockPos; -import common.world.IWorldAccess; - -public enum Colorizer { - NONE(0xffffff), BASIC(0x37b500), PINE(0x3f993f), BIRCH(0x68a723); - - private interface ColorResolver { - int getColorAtPos(Biome biome, BlockPos pos); - } - - private static final ColorResolver GRASS_COLOR = new ColorResolver() { - public int getColorAtPos(Biome biome, BlockPos pos) { - return biome.getGrassColorAtPos(pos); - } - }; - private static final ColorResolver FOLIAGE_COLOR = new ColorResolver() { - public int getColorAtPos(Biome biome, BlockPos pos) { - return biome.getFoliageColorAtPos(pos); - } - }; - private static final ColorResolver WATER_COLOR_MULTIPLIER = new ColorResolver() { - public int getColorAtPos(Biome biome, BlockPos pos) { - return biome.waterColor; - } - }; - private static final int[] GRASS = new int[65536]; - private static final int[] FOLIAGE = new int[65536]; - - private final int color; - - public static int[] getGrassMap() { - return GRASS; - } - - public static int[] getFoliageMap() { - return FOLIAGE; - } - - public static int getGrassColor(double temp, double rain) { - rain = rain * temp; - int i = (int)((1.0D - temp) * 255.0D); - int j = (int)((1.0D - rain) * 255.0D); - int k = j << 8 | i; - return k > GRASS.length ? 0xFFFF00FF : GRASS[k]; - } - - public static int getFoliageColor(double temp, double rain) { - rain = rain * temp; - int i = (int)((1.0D - temp) * 255.0D); - int j = (int)((1.0D - rain) * 255.0D); - return FOLIAGE[j << 8 | i]; - } - - private static int getColor(IWorldAccess access, BlockPos pos, ColorResolver resolver) { - int r = 0; - int g = 0; - int b = 0; - - for(BlockPos.MutableBlockPos loc : BlockPos.getAllInBoxMutable(pos.add(-1, 0, -1), pos.add(1, 0, 1))) { - int c = resolver.getColorAtPos(access.getBiomeGenForCoords(loc), loc); - r += (c & 16711680) >> 16; - g += (c & 65280) >> 8; - b += c & 255; - } - - return (r / 9 & 255) << 16 | (g / 9 & 255) << 8 | b / 9 & 255; - } - - public static int getGrassColor(IWorldAccess access, BlockPos pos) { - return getColor(access, pos, GRASS_COLOR); - } - - public static int getFoliageColor(IWorldAccess access, BlockPos pos) { - return getColor(access, pos, FOLIAGE_COLOR); - } - - public static int getWaterColor(IWorldAccess access, BlockPos pos) { - return getColor(access, pos, WATER_COLOR_MULTIPLIER); - } - - private Colorizer(int color) { - this.color = color; - } - - public int getColor() { - return this.color; - } -} diff --git a/common/src/main/java/common/entity/Entity.java b/common/src/main/java/common/entity/Entity.java index 0fd725cf..48d6fe84 100755 --- a/common/src/main/java/common/entity/Entity.java +++ b/common/src/main/java/common/entity/Entity.java @@ -1923,50 +1923,11 @@ public abstract class Entity return null; } - /** - * Marks the entity as being inside a portal, activating teleportation logic in onEntityUpdate() in the following - * tick(s). - * - * @param pos The postion of the portal that the entity is in - */ - public void setPortal(int dim) + public void setPortal(PortalType dim) { -// if (this.portalTimer > 0) -// { -// this.portalTimer = this.getPortalCooldown(); -// } -// else -// { -// if (!this.worldObj.client && !pos.equals(this.portalPos)) -// { -// this.portalPos = pos; -// BlockPattern.PatternHelper blockpattern$patternhelper = Blocks.portal.func_181089_f(this.worldObj, pos); -// double d0 = blockpattern$patternhelper.getFinger().getAxis() == EnumFacing.Axis.X ? (double)blockpattern$patternhelper.getPos().getZ() : (double)blockpattern$patternhelper.getPos().getX(); -// double d1 = blockpattern$patternhelper.getFinger().getAxis() == EnumFacing.Axis.X ? this.posZ : this.posX; -// d1 = Math.abs(MathHelper.func_181160_c(d1 - (double)(blockpattern$patternhelper.getFinger().rotateY().getAxisDirection() == EnumFacing.AxisDirection.NEGATIVE ? 1 : 0), d0, d0 - (double)blockpattern$patternhelper.getPalmLength())); -// double d2 = MathHelper.func_181160_c(this.posY - 1.0D, (double)blockpattern$patternhelper.getPos().getY(), (double)(blockpattern$patternhelper.getPos().getY() - blockpattern$patternhelper.getThumbLength())); -// this.portalVec = new Vec3(d1, d2, 0.0D); -// this.portalDir = blockpattern$patternhelper.getFinger(); -// } -// if(!this.worldObj.client) this.unmount(); - this.inPortal = PortalType.values()[dim]; -// } - } - - public void setFlatPortal() - { -// if (this.portalTimer > 0) -// { -// this.portalTimer = this.getPortalCooldown(); -// } -// else -// { - if(!this.worldObj.client) - this.unmount(); - this.inPortal = PortalType.FLOOR; -// } + this.inPortal = dim; } public void unmount() diff --git a/common/src/main/java/common/entity/animal/EntitySheep.java b/common/src/main/java/common/entity/animal/EntitySheep.java index b8fff03e..7aeaaf82 100755 --- a/common/src/main/java/common/entity/animal/EntitySheep.java +++ b/common/src/main/java/common/entity/animal/EntitySheep.java @@ -288,7 +288,7 @@ public class EntitySheep extends EntityAnimal public static DyeColor getRandomSheepColor(Random random, Biome biome) { - if(biome == Biome.SNOWLAND) + if(biome == Biome.SNOW) return DyeColor.WHITE; int i = random.zrange(140); return i < 20 ? DyeColor.BLACK : diff --git a/common/src/main/java/common/entity/npc/EntitySlime.java b/common/src/main/java/common/entity/npc/EntitySlime.java index 9fead9ce..c1dc448d 100755 --- a/common/src/main/java/common/entity/npc/EntitySlime.java +++ b/common/src/main/java/common/entity/npc/EntitySlime.java @@ -385,7 +385,7 @@ public class EntitySlime extends EntityNPC // { Biome biomegenbase = this.worldObj.getBiomeGenForCoords(blockpos); - if (biomegenbase == Biome.SWAMPLAND && this.posY > 50.0D && this.posY < 70.0D && this.rand.floatv() < 0.5F && this.rand.floatv() < this.worldObj.getMoonPhase() && this.worldObj.getLightFromNeighbors(new BlockPos(this)) <= this.rand.zrange(8)) + if (biomegenbase == Biome.SWAMP && this.posY > 50.0D && this.posY < 70.0D && this.rand.floatv() < 0.5F && this.rand.floatv() < this.worldObj.getMoonPhase() && this.worldObj.getLightFromNeighbors(new BlockPos(this)) <= this.rand.zrange(8)) { return super.getCanSpawnHere(); } diff --git a/common/src/main/java/common/entity/types/EntityThrowable.java b/common/src/main/java/common/entity/types/EntityThrowable.java index c910c334..a2ae3133 100755 --- a/common/src/main/java/common/entity/types/EntityThrowable.java +++ b/common/src/main/java/common/entity/types/EntityThrowable.java @@ -14,6 +14,7 @@ import common.util.BoundingBox; import common.util.ExtMath; import common.util.HitPosition; import common.util.ParticleType; +import common.util.PortalType; import common.util.Vec3; import common.world.State; import common.world.World; @@ -224,13 +225,13 @@ public abstract class EntityThrowable extends Entity implements IProjectile if (movingobjectposition != null) { State state; - if (movingobjectposition.type == HitPosition.ObjectType.BLOCK && (state = this.worldObj.getState(movingobjectposition.block)).getBlock() == Blocks.portal) + if (movingobjectposition.type == HitPosition.ObjectType.BLOCK && (state = this.worldObj.getState(movingobjectposition.block)).getBlock() instanceof BlockPortal portal) { - this.setPortal(state.getValue(BlockPortal.DIM)); + this.setPortal(portal.getType()); } else if (movingobjectposition.type == HitPosition.ObjectType.BLOCK && this.worldObj.getState(movingobjectposition.block).getBlock() == Blocks.floor_portal) { - this.setFlatPortal(); + this.setPortal(PortalType.FLOOR); } else { diff --git a/common/src/main/java/common/init/BlockRegistry.java b/common/src/main/java/common/init/BlockRegistry.java index af7ea4b2..553f3dbf 100755 --- a/common/src/main/java/common/init/BlockRegistry.java +++ b/common/src/main/java/common/init/BlockRegistry.java @@ -58,6 +58,7 @@ import common.block.foliage.BlockPumpkin; import common.block.foliage.BlockReed; import common.block.foliage.BlockSapling; import common.block.foliage.BlockStem; +import common.block.foliage.BlockSwamp; import common.block.foliage.BlockTallGrass; import common.block.foliage.BlockTianSoil; import common.block.foliage.BlockVine; @@ -88,7 +89,7 @@ import common.block.natural.BlockSnowBlock; import common.block.natural.BlockSoulFire; import common.block.natural.BlockSoulSand; import common.block.natural.BlockStone; -import common.block.natural.BlockTintedFire; +import common.block.natural.BlockBlackFire; import common.block.natural.BlockWeb; import common.block.tech.BlockActiveDisplay; import common.block.tech.BlockAnvil; @@ -133,6 +134,7 @@ import common.item.CheatTab; import common.log.Log; import common.model.TextureAnimation; import common.properties.Property; +import common.util.PortalType; import common.util.Util; import common.world.State; @@ -287,9 +289,9 @@ public abstract class BlockRegistry { .setDisplay("Schwarzbruchstein").setTab(CheatTab.ROCK)); - registerFluid("water", "Wasser", true, LiquidType.WATER, false, 0, 5, 0.0f, TextureAnimation.WATER, TextureAnimation.WATERFLOW); + registerFluid("water", "Wasser", true, LiquidType.WATER, false, 0, 5, 0.0f, TextureAnimation.WATER_STILL, TextureAnimation.WATER_FLOW); registerFluid("lava", "Lava", false, LiquidType.LAVA, true, 15, -30, 0.0f, 2, 3); - registerFluid("magma", "Magma", false, LiquidType.HOT, true, 15, 40, 0.0f, TextureAnimation.LAVA, TextureAnimation.LAVAFLOW); + registerFluid("magma", "Magma", false, LiquidType.HOT, true, 15, 40, 0.0f, TextureAnimation.MAGMA_STILL, TextureAnimation.MAGMA_FLOW); registerFluid("plasma", "Plasma", false, LiquidType.HOT, false, 15, 15, 0.0f, 2, 2); registerFluid("mercury", "Quecksilber", false, LiquidType.COLD, true, 0, 40, 0.0f, 8, 4); registerFluid("hydrogen", "Wasserstoff", false, LiquidType.COLD, true, 0, 50, 0.0f, 8, 4); @@ -298,7 +300,8 @@ public abstract class BlockRegistry { registerFluid("goo", "Klebrige Masse", false, LiquidType.COLD, true, 0, 60, 0.0f, 10, 5); registerFluid("nukage", "Radioaktive Masse", false, LiquidType.COLD, true, 10, 10, 4.0f, 2, 2); registerFluid("blood", "Blut", false, LiquidType.COLD, false, 0, 10, 0.0f, 2, 1); - registerFluid("springwater", "Klares Wasser", true, LiquidType.COLD, false, 0, 5, 0.0f, 1, 1); + registerFluid("spring_water", "Klares Wasser", true, LiquidType.COLD, false, 0, 5, 0.0f, 1, 1); + registerFluid("swamp_water", "Sumpfwasser", true, LiquidType.COLD, false, 0, 5, 0.0f, TextureAnimation.SWAMP_WATER_STILL, TextureAnimation.SWAMP_WATER_FLOW); register("coal_ore", (new BlockOre()).setHardness(3.0F).setResistance(5.0F).setSound(SoundType.STONE).setDisplay("Steinkohle")); @@ -341,6 +344,7 @@ public abstract class BlockRegistry { register("slime_block", (new BlockSlime()).setDisplay("Schleimblock").setSound(SoundType.SLIME)); register("blackened_dirt", (new BlockBlackenedDirt()).setHardness(0.5F).setSound(SoundType.GRAVEL).setDisplay("Schwarzerde").setShovelHarvestable()); register("blackened_soil", (new BlockBlackenedSoil()).setHardness(0.6F).setSound(SoundType.GRASS).setDisplay("Schwarzgrund").setShovelHarvestable()); + register("swamp", (new BlockSwamp()).setHardness(0.6F).setSound(SoundType.GRASS).setDisplay("Sumpf").setShovelHarvestable()); @@ -358,7 +362,8 @@ public abstract class BlockRegistry { Block cactus = (new BlockCactus()).setHardness(0.4F).setSound(SoundType.CLOTH).setDisplay("Kaktus"); register("cactus", cactus); register("reeds", (new BlockReed()).setHardness(0.0F).setSound(SoundType.GRASS).setDisplay("Zuckerrohr").setTab(CheatTab.PLANTS)); - register("vine", (new BlockVine()).setHardness(0.2F).setSound(SoundType.GRASS).setDisplay("Ranken").setShearsEfficiency(0)); + register("vine", (new BlockVine(false)).setHardness(0.2F).setSound(SoundType.GRASS).setDisplay("Ranken").setShearsEfficiency(0)); + register("swamp_vine", (new BlockVine(true)).setHardness(0.2F).setSound(SoundType.GRASS).setDisplay("Sumpfranken").setShearsEfficiency(0)); register("waterlily", (new BlockLilyPad()).setHardness(0.0F).setSound(SoundType.GRASS).setDisplay("Seerosenblatt")); @@ -394,7 +399,7 @@ public abstract class BlockRegistry { } register("soul_fire", (new BlockSoulFire()).setHardness(0.0F).setLight(1.0F).setSound(SoundType.CLOTH).setDisplay("Feuer der Seelen")); - register("black_fire", (new BlockTintedFire(0x202020)).setHardness(0.0F).setLight(1.0F).setSound(SoundType.CLOTH).setDisplay("Dunkles Feuer")); + register("black_fire", (new BlockBlackFire()).setHardness(0.0F).setLight(1.0F).setSound(SoundType.CLOTH).setDisplay("Dunkles Feuer")); register("web", (new BlockWeb()).setOpacity(1).setHardness(4.0F).setDisplay("Spinnennetz")); register("fire", (new BlockFire()).setHardness(0.0F).setLight(1.0F).setSound(SoundType.CLOTH).setDisplay("Feuer")); @@ -453,8 +458,11 @@ public abstract class BlockRegistry { "x" + (density * 16) + ")")); } - register("portal", (new BlockPortal()).setHardness(0.0F).setSound(SoundType.GLASS).setLight(0.75F).setDisplay("Portal")); - register("floor_portal", (new BlockFloorPortal(Material.PORTAL)).setHardness(0.0F).setDisplay("Portal")); + for(PortalType portal : PortalType.values()) { + if(portal != PortalType.FLOOR && portal != PortalType.VOID) + register(portal.getName() + "_portal", (new BlockPortal(portal)).setHardness(0.0F).setSound(SoundType.GLASS).setLight(0.75F).setDisplay(portal.getDisplay())); + } + register(PortalType.FLOOR.getName() + "_portal", (new BlockFloorPortal(Material.PORTAL)).setHardness(0.0F).setDisplay(PortalType.FLOOR.getDisplay())); register("portal_frame", (new BlockPortalFrame()).setSound(SoundType.GLASS).setLight(0.125F).setHardness(5.0F) .setDisplay("Portalrahmen").setResistance(2000.0F).setTab(CheatTab.TECHNOLOGY)); diff --git a/common/src/main/java/common/init/Blocks.java b/common/src/main/java/common/init/Blocks.java index 53f03b0d..778ae51f 100755 --- a/common/src/main/java/common/init/Blocks.java +++ b/common/src/main/java/common/init/Blocks.java @@ -73,7 +73,7 @@ public abstract class Blocks { public static final BlockStairs black_brick_stairs = get("black_brick_stairs"); public static final BlockCarpet black_carpet = get("black_carpet"); public static final BlockColoredClay black_clay = get("black_clay"); - public static final BlockTintedFire black_fire = get("black_fire"); + public static final BlockBlackFire black_fire = get("black_fire"); public static final BlockStainedGlass black_glass = get("black_glass"); public static final BlockStainedGlassPane black_glass_pane = get("black_glass_pane"); public static final BlockFlower black_lotus = get("black_lotus"); @@ -232,7 +232,7 @@ public abstract class Blocks { public static final BlockDynamicLiquid flowing_mercury = get("flowing_mercury"); public static final BlockDynamicLiquid flowing_nukage = get("flowing_nukage"); public static final BlockDynamicLiquid flowing_slime = get("flowing_slime"); - public static final BlockDynamicLiquid flowing_springwater = get("flowing_springwater"); + public static final BlockDynamicLiquid flowing_spring_water = get("flowing_spring_water"); public static final BlockDynamicLiquid flowing_water = get("flowing_water"); public static final BlockFurnace furnace = get("furnace"); public static final BlockGlass glass = get("glass"); @@ -391,7 +391,6 @@ public abstract class Blocks { public static final BlockMetalOre plutonium_ore = get("plutonium_ore"); public static final BlockPodzol podzol = get("podzol"); public static final BlockFlower poppy = get("poppy"); - public static final BlockPortal portal = get("portal"); public static final BlockPortalFrame portal_frame = get("portal_frame"); public static final BlockMetalBlock potassium_block = get("potassium_block"); public static final BlockMetalOre potassium_ore = get("potassium_ore"); @@ -463,7 +462,7 @@ public abstract class Blocks { public static final BlockSoulSand soul_sand = get("soul_sand"); public static final BlockWart soul_warts = get("soul_warts"); public static final Block sponge = get("sponge"); - public static final BlockStaticLiquid springwater = get("springwater"); + public static final BlockStaticLiquid spring_water = get("spring_water"); public static final BlockDoor spruce_door = get("spruce_door"); public static final BlockFence spruce_fence = get("spruce_fence"); public static final BlockFenceGate spruce_fence_gate = get("spruce_fence_gate"); @@ -591,6 +590,32 @@ public abstract class Blocks { public static final BlockWire wire = get("wire"); public static final BlockStaticLiquid plasma = get("plasma"); public static final BlockDynamicLiquid flowing_plasma = get("flowing_plasma"); + public static final BlockStaticLiquid swamp_water = get("swamp_water"); + public static final BlockDynamicLiquid flowing_swamp_water = get("flowing_swamp_water"); + public static final BlockDoor swamp_oak_door = get("swamp_oak_door"); + public static final BlockFence swamp_oak_fence = get("swamp_oak_fence"); + public static final BlockFenceGate swamp_oak_fence_gate = get("swamp_oak_fence_gate"); + public static final BlockLeaves swamp_oak_leaves_autumn = get("swamp_oak_leaves_autumn"); + public static final BlockLeaves swamp_oak_leaves_snowy = get("swamp_oak_leaves_snowy"); + public static final BlockLeaves swamp_oak_leaves_spring = get("swamp_oak_leaves_spring"); + public static final BlockLeaves swamp_oak_leaves_summer = get("swamp_oak_leaves_summer"); + public static final BlockLeaves swamp_oak_leaves_winter = get("swamp_oak_leaves_winter"); + public static final BlockLog swamp_oak_log = get("swamp_oak_log"); + public static final Block swamp_oak_planks = get("swamp_oak_planks"); + public static final BlockSapling swamp_oak_sapling = get("swamp_oak_sapling"); + public static final BlockSlab swamp_oak_slab = get("swamp_oak_slab"); + public static final BlockStairs swamp_oak_stairs = get("swamp_oak_stairs"); + public static final BlockTallGrass swamp_grass = get("swamp_grass"); + public static final BlockVine swamp_vine = get("swamp_vine"); + public static final BlockSwamp swamp = get("swamp"); + public static final BlockPortal arcane_portal = get("arcane_portal"); + public static final BlockPortal chaos_portal = get("chaos_portal"); + public static final BlockPortal crimson_portal = get("crimson_portal"); + public static final BlockPortal dark_portal = get("dark_portal"); + public static final BlockPortal deep_portal = get("deep_portal"); + public static final BlockPortal light_portal = get("light_portal"); + public static final BlockPortal radiating_portal = get("radiating_portal"); + public static final BlockPortal shining_portal = get("shining_portal"); private static T get(String id) { T block = (T)BlockRegistry.byNameExact(id); diff --git a/common/src/main/java/common/init/CraftingRegistry.java b/common/src/main/java/common/init/CraftingRegistry.java index 284d8475..ed6ce1dd 100755 --- a/common/src/main/java/common/init/CraftingRegistry.java +++ b/common/src/main/java/common/init/CraftingRegistry.java @@ -150,7 +150,9 @@ public abstract class CraftingRegistry add(new ItemStack(Items.quartz_pillar, 2), "#", "#", '#', Items.quartz_block); add(new ItemStack(Items.stonebrick, 4), "##", "##", '#', Items.stone); addShapeless(new ItemStack(Items.mossy_stonebrick), Items.stonebrick, Items.vine); + addShapeless(new ItemStack(Items.mossy_stonebrick), Items.stonebrick, Items.swamp_vine); addShapeless(new ItemStack(Items.mossy_cobblestone), Items.cobblestone, Items.vine); + addShapeless(new ItemStack(Items.mossy_cobblestone), Items.cobblestone, Items.swamp_vine); add(new ItemStack(Items.iron_bars, 16), "###", "###", '#', Items.iron_ingot); add(new ItemStack(Items.glass_pane, 16), "###", "###", '#', Items.glass); add(new ItemStack(Items.lamp, 1), " R ", "RGR", " R ", 'R', Items.charged_powder, 'G', Items.glowstone); diff --git a/common/src/main/java/common/init/Items.java b/common/src/main/java/common/init/Items.java index c0b3be01..8bfdac91 100755 --- a/common/src/main/java/common/init/Items.java +++ b/common/src/main/java/common/init/Items.java @@ -651,7 +651,7 @@ public abstract class Items { public static final ItemBucket recursive_mercury_bucket = get("recursive_mercury_bucket"); public static final ItemBucket recursive_nukage_bucket = get("recursive_nukage_bucket"); public static final ItemBucket recursive_slime_bucket = get("recursive_slime_bucket"); - public static final ItemBucket recursive_springwater_bucket = get("recursive_springwater_bucket"); + public static final ItemBucket recursive_spring_water_bucket = get("recursive_spring_water_bucket"); public static final ItemBucket recursive_water_bucket = get("recursive_water_bucket"); public static final Item red_bed = get("red_bed"); public static final Item red_button = get("red_button"); @@ -711,7 +711,7 @@ public abstract class Items { public static final Item speckled_melon = get("speckled_melon"); public static final ItemFood spider_eye = get("spider_eye"); public static final Item sponge = get("sponge"); - public static final ItemBucket springwater_bucket = get("springwater_bucket"); + public static final ItemBucket spring_water_bucket = get("spring_water_bucket"); public static final Item spruce_door = get("spruce_door"); public static final Item spruce_fence = get("spruce_fence"); public static final Item spruce_fence_gate = get("spruce_fence_gate"); @@ -991,6 +991,24 @@ public abstract class Items { public static final Item tian_torch = get("tian_torch"); public static final ItemBucket plasma_bucket = get("plasma_bucket"); public static final ItemBucket recursive_plasma_bucket = get("recursive_plasma_bucket"); + public static final ItemBucket swamp_water_bucket = get("swamp_water_bucket"); + public static final ItemBucket recursive_swamp_water_bucket = get("recursive_swamp_water_bucket"); + public static final Item swamp_grass = get("swamp_grass"); + public static final Item swamp_oak_door = get("swamp_oak_door"); + public static final Item swamp_oak_fence = get("swamp_oak_fence"); + public static final Item swamp_oak_fence_gate = get("swamp_oak_fence_gate"); + public static final Item swamp_oak_leaves_autumn = get("swamp_oak_leaves_autumn"); + public static final Item swamp_oak_leaves_snowy = get("swamp_oak_leaves_snowy"); + public static final Item swamp_oak_leaves_spring = get("swamp_oak_leaves_spring"); + public static final Item swamp_oak_leaves_summer = get("swamp_oak_leaves_summer"); + public static final Item swamp_oak_leaves_winter = get("swamp_oak_leaves_winter"); + public static final Item swamp_oak_log = get("swamp_oak_log"); + public static final Item swamp_oak_planks = get("swamp_oak_planks"); + public static final Item swamp_oak_sapling = get("swamp_oak_sapling"); + public static final Item swamp_oak_slab = get("swamp_oak_slab"); + public static final Item swamp_oak_stairs = get("swamp_oak_stairs"); + public static final Item swamp_vine = get("swamp_vine"); + public static final Item swamp = get("swamp"); private static T get(String id) { T item = (T)ItemRegistry.byName(id); diff --git a/common/src/main/java/common/init/UniverseRegistry.java b/common/src/main/java/common/init/UniverseRegistry.java index 226474cf..0a5ae0f1 100755 --- a/common/src/main/java/common/init/UniverseRegistry.java +++ b/common/src/main/java/common/init/UniverseRegistry.java @@ -406,12 +406,12 @@ public abstract class UniverseRegistry { registerPlanet("Terra", new Planet(6378136, 8766144L, 24000L, 28.0f, 9.81f, 259.15f) .setPerlinGen(Blocks.stone.getState(), Blocks.water.getState(), 63) .setBiomeReplacer(Blocks.gravel.getState()) - .setBiomeGen(Biome.FOREST, false, 4, 4, 6, 50, 50, Biome.MUSHROOMPLAINS).enableMobs().enableSnow() - .setFrostBiomes(Biome.ICEPLAINS, Biome.ICEPLAINS, Biome.ICEPLAINS, Biome.COLDTAIGA, Biome.MEGATAIGA) - .setColdBiomes(Biome.FOREST, Biome.EXTREMEHILLS, Biome.TAIGA, Biome.PLAINS) - .setMediumBiomes(Biome.FOREST, Biome.ROOFEDFOREST, Biome.EXTREMEHILLS, Biome.PLAINS, Biome.BIRCHFOREST, - Biome.SWAMPLAND, Biome.JUNGLE) - .setHotBiomes(Biome.DESERT, Biome.DESERT, Biome.DESERT, Biome.SAVANNA, Biome.SAVANNA, Biome.PLAINS) + .setBiomeGen(Biome.FOREST, false, 4, 4, 6, 50, 50, Biome.MUSHROOM).enableMobs().enableSnow() + .setFrostBiomes(Biome.ICE, Biome.ICE, Biome.ICE, Biome.ICE_TAIGA, Biome.LARGE_TAIGA) + .setColdBiomes(Biome.FOREST, Biome.HILLS, Biome.TAIGA, Biome.PLAIN) + .setMediumBiomes(Biome.FOREST, Biome.DARK_FOREST, Biome.HILLS, Biome.PLAIN, Biome.BIRCH_FOREST, + Biome.SWAMP, Biome.TROPIC) + .setHotBiomes(Biome.DESERT, Biome.DESERT, Biome.DESERT, Biome.SAVANNA, Biome.SAVANNA, Biome.PLAIN) .enableCavesRavines(Blocks.lava.getState()).setDungeons(8) .addLake(Blocks.water.getState(), null, Blocks.grass.getState(), 4, 0, 255, false) .addLake(Blocks.lava.getState(), Blocks.stone.getState(), null, 8, 8, 255, true) @@ -490,7 +490,7 @@ public abstract class UniverseRegistry { registerStar("Gi'rok", 603421976, 232.0f, 5220.0f, () -> { registerPlanet("gharoth", "Elbenplanet Gharoth", new Planet(2806382, 4837386L, 52960L, 30.0f, 10.0f, 257.3f) .setSimpleGen(Blocks.dirt.getState(), Blocks.water.getState(), 64) - .setSimpleReplacer(Blocks.gravel.getState(), Blocks.sand.getState()).setBiome(Biome.ELVENFOREST) + .setSimpleReplacer(Blocks.gravel.getState(), Blocks.sand.getState()).setBiome(Biome.ELVEN_FOREST) .enableCaves(Blocks.air.getState()).setDungeons(4).enableMobs().enableSnow() .addLake(Blocks.water.getState(), null, Blocks.grass.getState(), 4, 0, 255, false) .addLake(Blocks.lava.getState(), null, null, 8, 8, 255, true) @@ -511,9 +511,9 @@ public abstract class UniverseRegistry { .addOre(Blocks.ardite_ore.getState(), 0, 2, 3, 0, 12, false) .addOre(Blocks.nichun_ore.getState(), 0, 10, 1, 0, 10, false), () -> { registerMoon("yrdinath", "Eismond Yrdinath", new Moon(0xccccff, 2503812, 46743637L, 17460L, 2.5f, 239.15f, Blocks.snow, Blocks.ice) - .setBiome(Biome.SNOWLAND).enableMobs().enableSnow().setDefaultWeather(Weather.SNOW)); + .setBiome(Biome.SNOW).enableMobs().enableSnow().setDefaultWeather(Weather.SNOW)); registerMoon("mythril", "Eismond Mythril", new Moon(0xbbbbff, 2213749, 42659432L, 15330L, 2.25f, 221.65f, Blocks.snow, Blocks.ice) - .setBiome(Biome.SNOWLAND).enableMobs().enableSnow().setDefaultWeather(Weather.SNOW)); + .setBiome(Biome.SNOW).enableMobs().enableSnow().setDefaultWeather(Weather.SNOW)); }); registerPlanet("mesar", "Wüstenplanet Me'sar", new Planet(0xff7f3f, 0xff6022, 0xff6f00, 9823183, 56643366L, 87340L, 11.0f, 333.15f) .setPerlinGen(Blocks.rock.getState(), Blocks.air.getState(), 63) @@ -557,10 +557,10 @@ public abstract class UniverseRegistry { registerDomain("Tian'Xin", () -> { registerArea("Ni'enrath", new Area(0x7f00ff, 532109, 276.15f, 1).setLightColor(0x07000f).setBlockColor(0xcf6fff) - .setPerlinGen(Blocks.tian.getState(), Blocks.springwater.getState(), 63).setBiome(Biome.TIAN) + .setPerlinGen(Blocks.tian.getState(), Blocks.spring_water.getState(), 63).setBiome(Biome.TIAN) .setBiomeReplacer(Blocks.tian.getState()).enableLongCaves().enableMobs().enableSnow() - .addLake(Blocks.springwater.getState(), Blocks.tian.getState(), Blocks.tian.getState(), 4, 0, 255, false) - .addLiquid(Blocks.flowing_springwater.getState(), 50, 8, 255, false)); + .addLake(Blocks.spring_water.getState(), Blocks.tian.getState(), Blocks.tian.getState(), 4, 0, 255, false) + .addLiquid(Blocks.flowing_spring_water.getState(), 50, 8, 255, false)); }); registerDomain("Digital", () -> { registerArea("Cyberspace", new Area(0x000000, 16777216, 293.15f, 15).setLightColor(0x00ff00).setBlockColor(0xff0000).enableBlockLightSubtraction() @@ -572,27 +572,27 @@ public abstract class UniverseRegistry { .enableWorldCeiling().enableDenseFog() .setCavernGen(Blocks.hellrock.getState(), Blocks.lava.getState(), 63) .setSurfaceReplacer(Blocks.gravel.getState(), Blocks.soul_sand.getState()) - .setBiome(Biome.UPPERHELL)); + .setBiome(Biome.UPPER_HELL)); registerArea("kyroth", "Kreis Kyroth", new Area(0x990000, 86742970, 387.15f, 3).enableLongCaves().enableMobs() .setSimpleGen(Blocks.hellrock.getState(), Blocks.lava.getState(), 64) .setSimpleReplacer(Blocks.obsidian.getState(), Blocks.soul_sand.getState()) - .setBiome(Biome.LOWERHELL) + .setBiome(Biome.LOWER_HELL) .addLake(Blocks.lava.getState(), null, null, 4, 8, 255, false) .addLiquid(Blocks.flowing_lava.getState(), 40, 8, 255, true)); registerArea("ahrd", "Kreis Ahrd", new Area(0xcc0000, 67028432, 467.15f, 15).enableLongCaves().enableMobs() .setPerlinGen(Blocks.hellrock.getState(), Blocks.lava.getState(), 63) - .setBiomeReplacer(Blocks.soul_sand.getState()).setBiome(Biome.HELLHILLS) + .setBiomeReplacer(Blocks.soul_sand.getState()).setBiome(Biome.HELL_HILLS) .addLake(Blocks.lava.getState(), Blocks.soul_sand.getState(), Blocks.soul_sand.getState(), 2, 8, 255, false).addLiquid(Blocks.flowing_lava.getState(), 80, 8, 255, true)); registerArea("mizorath", "Kreis Mizorath", new Area(0xff0000, 54029584, 1067.15f, 15).enableMobs() .setPerlinGen(Blocks.hellrock.getState(), Blocks.blood.getState(), 63) - .setBiomeReplacer(Blocks.soul_sand.getState()).setBiome(Biome.SOULPLAINS)); + .setBiomeReplacer(Blocks.soul_sand.getState()).setBiome(Biome.SOUL_PLAINS)); registerArea("dargoth", "Kreis Dargoth", new Area(0xff3f0c, 43293629, 1707.15f, 15).enableMobs() .setPerlinGen(Blocks.hellrock.getState(), Blocks.magma.getState(), 63) - .setBiomeReplacer(Blocks.soul_sand.getState()).setBiome(Biome.SOULPLAINS)); + .setBiomeReplacer(Blocks.soul_sand.getState()).setBiome(Biome.SOUL_PLAINS)); registerArea("aasirith", "Kreis Aasirith", new Area(0x191919, 36291872, 2482.0f, 1).enableLongCaves().enableMobs() .setPerlinGen(Blocks.rock.getState(), Blocks.magma.getState(), 63) - .setBiomeReplacer(Blocks.ash.getState()).setBiome(Biome.ASHLAND) + .setBiomeReplacer(Blocks.ash.getState()).setBiome(Biome.ASH) .addLake(Blocks.lava.getState(), Blocks.rock.getState(), Blocks.rock.getState(), 2, 8, 255, false).addLiquid(Blocks.flowing_lava.getState(), 80, 8, 255, true)); }); diff --git a/common/src/main/java/common/init/WoodType.java b/common/src/main/java/common/init/WoodType.java index a7b97b1f..1965ee79 100755 --- a/common/src/main/java/common/init/WoodType.java +++ b/common/src/main/java/common/init/WoodType.java @@ -1,43 +1,36 @@ package common.init; -import common.color.Colorizer; - public enum WoodType { - OAK("oak", "Eichen", null, 20, "apple", 200), - SPRUCE("spruce", "Fichten", Colorizer.PINE, 20), - BIRCH("birch", "Birken", Colorizer.BIRCH, 20), - JUNGLE("jungle", "Tropen", null, 40, "cocoa_powder", 350), - ACACIA("acacia", "Akazien", null, 20), - DARK_OAK("dark_oak", "Schwarzeichen", null, 20), - CHERRY("cherry", "Kirsch", Colorizer.NONE, 20), - MAPLE("maple", "Ahorn", Colorizer.NONE, 20), - TIAN("tian", "Tian", Colorizer.NONE, 80), - BLACKWOOD("blackwood", "Schwarz", Colorizer.NONE, 60); + OAK("oak", "Eichen", 20, "apple", 200), + SPRUCE("spruce", "Fichten", 20), + BIRCH("birch", "Birken", 20), + JUNGLE("jungle", "Tropen", 40, "cocoa_powder", 350), + ACACIA("acacia", "Akazien", 20), + DARK_OAK("dark_oak", "Schwarzeichen", 20), + CHERRY("cherry", "Kirsch", 20), + MAPLE("maple", "Ahorn", 20), + TIAN("tian", "Tian", 80), + BLACKWOOD("blackwood", "Schwarz", 60), + SWAMP_OAK("swamp_oak", "Sumpfeichen", 20); private final String name; - private final Colorizer tintType; private final int sapChance; private final int dropChance; private final String item; private final String display; - private WoodType(String name, String display, Colorizer tint, int sapChance) { - this(name, display, tint, sapChance, null, 0); + private WoodType(String name, String display, int sapChance) { + this(name, display, sapChance, null, 0); } - private WoodType(String name, String display, Colorizer tint, int sapChance, String item, int dropChance) { + private WoodType(String name, String display, int sapChance, String item, int dropChance) { this.name = name; - this.tintType = tint; this.sapChance = sapChance; this.dropChance = dropChance; this.item = item; this.display = display; } - public Colorizer getTintType() { - return this.tintType; - } - public int getSaplingChance() { return this.sapChance; } diff --git a/common/src/main/java/common/item/Item.java b/common/src/main/java/common/item/Item.java index 785b7395..5e5a0ed3 100755 --- a/common/src/main/java/common/item/Item.java +++ b/common/src/main/java/common/item/Item.java @@ -13,7 +13,7 @@ import common.entity.types.EntityLiving; import common.entity.types.IProjectile; import common.model.Model; import common.model.ModelProvider; -import common.model.Transform; +import common.model.GuiPosition; import common.tileentity.TileEntity; import common.util.BlockPos; import common.util.ExtMath; @@ -287,8 +287,6 @@ public class Item { } public int getRenderColor(ItemStack stack, int pass) { - if(this.block != null && this.block.isItemColored()) - return this.block.getRenderColor(this.block.getState()); if(pass > 0) return 16777215; int i = stack.getDyeColor(); @@ -307,7 +305,7 @@ public class Item { return null; } - public Transform getCustomTransform() { + public GuiPosition getCustomPosition() { return null; } diff --git a/common/src/main/java/common/item/consumable/ItemSoup.java b/common/src/main/java/common/item/consumable/ItemSoup.java index 2705cc88..cc23c6df 100755 --- a/common/src/main/java/common/item/consumable/ItemSoup.java +++ b/common/src/main/java/common/item/consumable/ItemSoup.java @@ -3,7 +3,7 @@ package common.item.consumable; import common.entity.npc.EntityNPC; import common.init.Items; import common.item.ItemStack; -import common.model.Transform; +import common.model.GuiPosition; import common.world.World; public class ItemSoup extends ItemFood diff --git a/common/src/main/java/common/item/material/ItemSeeds.java b/common/src/main/java/common/item/material/ItemSeeds.java index 67e24046..d8858ef2 100755 --- a/common/src/main/java/common/item/material/ItemSeeds.java +++ b/common/src/main/java/common/item/material/ItemSeeds.java @@ -6,7 +6,7 @@ import common.entity.npc.EntityNPC; import common.item.CheatTab; import common.item.Item; import common.item.ItemStack; -import common.model.Transform; +import common.model.GuiPosition; import common.util.BlockPos; import common.util.Facing; import common.world.World; diff --git a/common/src/main/java/common/item/projectile/ItemDie.java b/common/src/main/java/common/item/projectile/ItemDie.java index 9f17b508..fe873459 100755 --- a/common/src/main/java/common/item/projectile/ItemDie.java +++ b/common/src/main/java/common/item/projectile/ItemDie.java @@ -13,7 +13,7 @@ import common.item.Item; import common.item.ItemStack; import common.model.Model; import common.model.ModelProvider; -import common.model.Transform; +import common.model.GuiPosition; import common.tileentity.TileEntity; import common.util.BlockPos; import common.util.Facing; @@ -85,8 +85,8 @@ public class ItemDie extends Item .du("items/die_d" + this.sides + "_top").uv(0, 0, 16, 16); } - public Transform getCustomTransform() { - return Transform.DICE; + public GuiPosition getCustomPosition() { + return GuiPosition.DICE; } public ItemStack dispenseStack(World world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) { diff --git a/common/src/main/java/common/item/tool/ItemCarrotOnAStick.java b/common/src/main/java/common/item/tool/ItemCarrotOnAStick.java index c448fb56..5978d43d 100755 --- a/common/src/main/java/common/item/tool/ItemCarrotOnAStick.java +++ b/common/src/main/java/common/item/tool/ItemCarrotOnAStick.java @@ -7,7 +7,7 @@ import common.item.CheatTab; import common.item.Item; import common.item.ItemStack; import common.item.WieldType; -import common.model.Transform; +import common.model.GuiPosition; import common.world.World; public class ItemCarrotOnAStick extends Item diff --git a/common/src/main/java/common/item/tool/ItemEditor.java b/common/src/main/java/common/item/tool/ItemEditor.java index 8d4682ac..08dedfb0 100755 --- a/common/src/main/java/common/item/tool/ItemEditor.java +++ b/common/src/main/java/common/item/tool/ItemEditor.java @@ -5,7 +5,7 @@ import common.item.CheatTab; import common.item.Item; import common.item.ItemControl; import common.item.ItemStack; -import common.model.Transform; +import common.model.GuiPosition; import common.util.BlockPos; import common.world.World; diff --git a/common/src/main/java/common/item/tool/ItemFishingRod.java b/common/src/main/java/common/item/tool/ItemFishingRod.java index ae53fbff..1d95b3c5 100755 --- a/common/src/main/java/common/item/tool/ItemFishingRod.java +++ b/common/src/main/java/common/item/tool/ItemFishingRod.java @@ -7,7 +7,7 @@ import common.item.CheatTab; import common.item.Item; import common.item.ItemStack; import common.item.WieldType; -import common.model.Transform; +import common.model.GuiPosition; import common.world.World; public class ItemFishingRod extends Item diff --git a/common/src/main/java/common/item/tool/ItemHoe.java b/common/src/main/java/common/item/tool/ItemHoe.java index 0bd395e7..518c6ecd 100755 --- a/common/src/main/java/common/item/tool/ItemHoe.java +++ b/common/src/main/java/common/item/tool/ItemHoe.java @@ -8,7 +8,7 @@ import common.item.CheatTab; import common.item.Item; import common.item.ItemStack; import common.item.WieldType; -import common.model.Transform; +import common.model.GuiPosition; import common.util.BlockPos; import common.util.Facing; import common.world.State; diff --git a/common/src/main/java/common/item/tool/ItemMagnet.java b/common/src/main/java/common/item/tool/ItemMagnet.java index b125f932..146f8b40 100755 --- a/common/src/main/java/common/item/tool/ItemMagnet.java +++ b/common/src/main/java/common/item/tool/ItemMagnet.java @@ -10,7 +10,7 @@ import common.item.CheatTab; import common.item.Item; import common.item.ItemStack; import common.item.WieldType; -import common.model.Transform; +import common.model.GuiPosition; import common.util.BoundingBox; import common.util.Vec3; import common.world.World; diff --git a/common/src/main/java/common/item/tool/ItemTool.java b/common/src/main/java/common/item/tool/ItemTool.java index 578a9f10..ab477c2d 100755 --- a/common/src/main/java/common/item/tool/ItemTool.java +++ b/common/src/main/java/common/item/tool/ItemTool.java @@ -7,7 +7,7 @@ import common.item.CheatTab; import common.item.Item; import common.item.ItemStack; import common.item.WieldType; -import common.model.Transform; +import common.model.GuiPosition; import common.util.BlockPos; import common.world.World; diff --git a/common/src/main/java/common/item/tool/ItemWand.java b/common/src/main/java/common/item/tool/ItemWand.java index 2c75541d..a3647a25 100755 --- a/common/src/main/java/common/item/tool/ItemWand.java +++ b/common/src/main/java/common/item/tool/ItemWand.java @@ -9,7 +9,7 @@ import common.item.Item; import common.item.ItemControl; import common.item.ItemStack; import common.item.WieldType; -import common.model.Transform; +import common.model.GuiPosition; import common.util.BlockPos; import common.util.ExtMath; import common.util.Facing; diff --git a/common/src/main/java/common/item/weapon/ItemBow.java b/common/src/main/java/common/item/weapon/ItemBow.java index a3ef230f..14f1b8fe 100755 --- a/common/src/main/java/common/item/weapon/ItemBow.java +++ b/common/src/main/java/common/item/weapon/ItemBow.java @@ -11,7 +11,7 @@ import common.item.Item; import common.item.ItemAction; import common.item.ItemStack; import common.item.WieldType; -import common.model.Transform; +import common.model.GuiPosition; import common.world.World; public class ItemBow extends Item diff --git a/common/src/main/java/common/item/weapon/ItemGunBase.java b/common/src/main/java/common/item/weapon/ItemGunBase.java index 4003dd14..5e4588e4 100755 --- a/common/src/main/java/common/item/weapon/ItemGunBase.java +++ b/common/src/main/java/common/item/weapon/ItemGunBase.java @@ -11,7 +11,7 @@ import common.item.Item; import common.item.ItemAction; import common.item.ItemStack; import common.item.WieldType; -import common.model.Transform; +import common.model.GuiPosition; import common.rng.Random; import common.world.World; diff --git a/common/src/main/java/common/item/weapon/ItemSword.java b/common/src/main/java/common/item/weapon/ItemSword.java index 7a3b3f43..d59269f8 100755 --- a/common/src/main/java/common/item/weapon/ItemSword.java +++ b/common/src/main/java/common/item/weapon/ItemSword.java @@ -11,7 +11,7 @@ import common.item.Item; import common.item.ItemAction; import common.item.ItemStack; import common.item.WieldType; -import common.model.Transform; +import common.model.GuiPosition; import common.util.BlockPos; import common.world.World; diff --git a/common/src/main/java/common/model/Transform.java b/common/src/main/java/common/model/GuiPosition.java similarity index 89% rename from common/src/main/java/common/model/Transform.java rename to common/src/main/java/common/model/GuiPosition.java index a9d88a13..9a669e9a 100755 --- a/common/src/main/java/common/model/Transform.java +++ b/common/src/main/java/common/model/GuiPosition.java @@ -1,7 +1,7 @@ package common.model; -public enum Transform { - IDENTITY(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f), +public enum GuiPosition { + NORMAL(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f), DICE(135.0f, -55.0f, 180.0f, 0.0f, 0.0f, 0.0f, 2.75f), STAIRS(0.0f, 180.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f), SMALL(0.0f, 0.0f, 0.0f, 0.0f, 0.25f, 0.0f, 1.25f), @@ -22,7 +22,7 @@ public enum Transform { private final float translationZ; private final float scale; - private Transform(float rx, float ry, float rz, float tx, float ty, float tz, float scale) { + private GuiPosition(float rx, float ry, float rz, float tx, float ty, float tz, float scale) { this.rotationX = rx; this.rotationY = ry; this.rotationZ = rz; diff --git a/common/src/main/java/common/model/Model.java b/common/src/main/java/common/model/Model.java index ba446c87..27ca079f 100644 --- a/common/src/main/java/common/model/Model.java +++ b/common/src/main/java/common/model/Model.java @@ -10,7 +10,6 @@ public abstract class Model { public abstract Model rotate(float x, float y, float z, Facing.Axis axisIn, float angleIn, boolean rescaleIn); public abstract Model face(String texture, Facing... faces); public abstract Model cull(Facing cull); - public abstract Model tint(); public abstract Model rot(int rot); public abstract Model uv(float x1, float y1, float x2, float y2); public abstract String getPrimary(); @@ -48,14 +47,6 @@ public abstract class Model { .we().uv(0, 0, 16, 16).noCull(); } - public Model crossTint() { - return this - .add(0.8f, 0f, 8f, 15.2f, 16f, 8f).noShade().rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .ns().uv(0, 0, 16, 16).noCull().tint() - .add(8f, 0f, 0.8f, 8f, 16f, 15.2f).noShade().rotate(8, 8, 8, Facing.Axis.Y, 45, true) - .we().uv(0, 0, 16, 16).noCull().tint(); - } - public Model stairs(boolean upper, boolean inner, boolean outer, boolean left, Facing dir, String down, String up) { this.add(0, 0, 0, 16, 8, 16).d(down).uv(0, 0, 16, 16).u(up).noCull().uv(0, 0, 16, 16).nswe().uv(0, 8, 16, 16); if(outer) diff --git a/common/src/main/java/common/model/ModelProvider.java b/common/src/main/java/common/model/ModelProvider.java index ab32f33e..22f71b88 100644 --- a/common/src/main/java/common/model/ModelProvider.java +++ b/common/src/main/java/common/model/ModelProvider.java @@ -35,10 +35,6 @@ public interface ModelProvider { return this; } - public Model tint() { - return this; - } - public Model rot(int rot) { return this; } diff --git a/common/src/main/java/common/model/TextureAnimation.java b/common/src/main/java/common/model/TextureAnimation.java index e8591430..3daf629e 100644 --- a/common/src/main/java/common/model/TextureAnimation.java +++ b/common/src/main/java/common/model/TextureAnimation.java @@ -1,5 +1,5 @@ package common.model; public enum TextureAnimation { - FIRE1, FIRE2, FLAME1, FLAME2, LAVAFLOW, LAVA, WATERFLOW, WATER; + FLAME_BASE, FLAME_OFFSET, BLACK_FLAME_BASE, BLACK_FLAME_OFFSET, BLUE_FLAME_BASE, BLUE_FLAME_OFFSET, MAGMA_FLOW, MAGMA_STILL, WATER_FLOW, WATER_STILL, SWAMP_WATER_FLOW, SWAMP_WATER_STILL; } diff --git a/common/src/main/java/common/util/PortalType.java b/common/src/main/java/common/util/PortalType.java index 91b7cd46..bf1d236d 100755 --- a/common/src/main/java/common/util/PortalType.java +++ b/common/src/main/java/common/util/PortalType.java @@ -1,5 +1,30 @@ package common.util; -public enum PortalType { - STAND_BLACK, STAND_RED, STAND_YELLOW, STAND_GREEN, STAND_CYAN, STAND_BLUE, STAND_MAGENTA, STAND_WHITE, FLOOR, VOID; +public enum PortalType implements Identifyable, Displayable { + DARK("dark", "Dunkles Portal"), + CRIMSON("crimson", "Crimson-Portal"), + SHINING("shining", "Schillernes Portal"), + ARCANE("arcane", "Geheimnisvolles Portal"), + RADIATING("radiating", "Strahlendes Portal"), + CHAOS("chaos", "Chaos-Portal"), + DEEP("deep", "Tiefes Portal"), + LIGHT("light", "Helles Portal"), + FLOOR("floor", "Flaches Portal"), + VOID("void", "Aus der Welt Fallen"); + + private final String name; + private final String display; + + private PortalType(String name, String display) { + this.name = name; + this.display = display; + } + + public String getName() { + return this.name; + } + + public String getDisplay() { + return this.display; + } } diff --git a/common/src/main/java/common/vars/Vars.java b/common/src/main/java/common/vars/Vars.java index 5dce0a3a..527ce181 100755 --- a/common/src/main/java/common/vars/Vars.java +++ b/common/src/main/java/common/vars/Vars.java @@ -141,10 +141,14 @@ public abstract class Vars { public static boolean darkDirtSpread = true; @Var(name = "grassDecay") public static boolean grassDecay = true; + @Var(name = "swampDecay") + public static boolean swampDecay = true; @Var(name = "blackenedSoilDecay") public static boolean darkSoilDecay = true; @Var(name = "grassDrying") public static boolean grassDry = true; + @Var(name = "swampDrying") + public static boolean swampDry = true; @Var(name = "tallgrassDrying") public static boolean tallgrassDry = true; @Var(name = "flowerDrying") diff --git a/common/src/main/java/common/world/AWorldServer.java b/common/src/main/java/common/world/AWorldServer.java index a4e32de6..b0a1a1ce 100644 --- a/common/src/main/java/common/world/AWorldServer.java +++ b/common/src/main/java/common/world/AWorldServer.java @@ -45,7 +45,6 @@ public abstract class AWorldServer extends World { public abstract void sendToAllTrackingEntity(Entity entityIn, Packet packet); public abstract boolean isDaytime(); public abstract int getSkylightSubtracted(); - public abstract boolean isBlockinHighHumidity(BlockPos pos); public abstract T findNearestEntityWithinAABB(Class entityType, BoundingBox aabb, T closestTo); public abstract void setBiome(BlockPos pos, Biome biome); public abstract void markChunkDirty(BlockPos pos); diff --git a/server/src/main/java/server/Server.java b/server/src/main/java/server/Server.java index 01de8f26..961b9381 100755 --- a/server/src/main/java/server/Server.java +++ b/server/src/main/java/server/Server.java @@ -96,7 +96,6 @@ import common.util.Var; import common.util.WorldPos; import common.vars.Vars; import common.world.World; -import server.biome.GenBiome; import server.clipboard.ReorderRegistry; import server.clipboard.RotationRegistry; import server.command.CommandEnvironment; @@ -109,6 +108,7 @@ import server.vars.SVar; import server.vars.SVars; import server.world.Region; import server.world.WorldServer; +import server.worldgen.biome.GenBiome; public final class Server implements IThreadListener, Executor { private final Thread thread = Thread.currentThread(); diff --git a/server/src/main/java/server/clipboard/ReorderRegistry.java b/server/src/main/java/server/clipboard/ReorderRegistry.java index d4748093..3a124dc4 100755 --- a/server/src/main/java/server/clipboard/ReorderRegistry.java +++ b/server/src/main/java/server/clipboard/ReorderRegistry.java @@ -8,6 +8,7 @@ import common.block.artificial.BlockBed; import common.block.artificial.BlockCarpet; import common.block.artificial.BlockDoor; import common.block.artificial.BlockFlowerPot; +import common.block.artificial.BlockPortal; import common.block.foliage.BlockDoublePlant; import common.block.foliage.BlockFlower; import common.block.tech.BlockAnvil; @@ -74,9 +75,12 @@ public abstract class ReorderRegistry { // PLACE_LAST.add(Blocks.lit_t); PLACE_LAST.add(Blocks.stone_button); PLACE_LAST.add(Blocks.snow_layer); - PLACE_LAST.add(Blocks.portal); + for(BlockPortal portal : BlockPortal.PORTALS) { + PLACE_LAST.add(portal); + } PLACE_LAST.add(Blocks.trapdoor); PLACE_LAST.add(Blocks.vine); + PLACE_LAST.add(Blocks.swamp_vine); PLACE_LAST.add(Blocks.waterlily); PLACE_LAST.add(Blocks.soul_warts); PLACE_LAST.add(Blocks.piston); diff --git a/server/src/main/java/server/world/Spawner.java b/server/src/main/java/server/world/Spawner.java index 32e19bde..6e650221 100755 --- a/server/src/main/java/server/world/Spawner.java +++ b/server/src/main/java/server/world/Spawner.java @@ -14,9 +14,9 @@ import common.util.BlockPos; import common.util.ChunkPos; import common.util.ExtMath; import common.world.World; -import server.biome.GenBiome; -import server.biome.RngSpawn; import server.vars.SVars; +import server.worldgen.biome.GenBiome; +import server.worldgen.biome.RngSpawn; public abstract class Spawner { private static final int MOB_COUNT_DIV = (int)Math.pow(17.0D, 2.0D); diff --git a/server/src/main/java/server/world/WorldServer.java b/server/src/main/java/server/world/WorldServer.java index 8b563bb6..368fc3c0 100755 --- a/server/src/main/java/server/world/WorldServer.java +++ b/server/src/main/java/server/world/WorldServer.java @@ -76,8 +76,6 @@ import common.world.State; import common.world.Weather; import common.world.World; import server.Server; -import server.biome.GenBiome; -import server.biome.RngSpawn; import server.clipboard.ClipboardBlock; import server.init.TeleportRegistry; import server.network.Player; @@ -105,6 +103,8 @@ import server.worldgen.ReplacerAltBiome; import server.worldgen.ReplacerAltSurface; import server.worldgen.ReplacerBiome; import server.worldgen.ReplacerTopLayer; +import server.worldgen.biome.GenBiome; +import server.worldgen.biome.RngSpawn; import server.worldgen.caves.MapGenBigCaves; import server.worldgen.caves.MapGenCaves; import server.worldgen.caves.MapGenRavine; @@ -2111,11 +2111,6 @@ public final class WorldServer extends AWorldServer { this.subtract = newSkylightSubtracted; } - public boolean isBlockinHighHumidity(BlockPos pos) { - Biome biomegenbase = this.getBiomeGenForCoords(pos); - return biomegenbase.isHighHumidity(); - } - public boolean canStrikeAt(BlockPos strikePosition) { if(!this.canSeeSky(strikePosition)) { return false; diff --git a/server/src/main/java/server/worldgen/FeatureLakes.java b/server/src/main/java/server/worldgen/FeatureLakes.java index 2f6fa824..e641cf41 100755 --- a/server/src/main/java/server/worldgen/FeatureLakes.java +++ b/server/src/main/java/server/worldgen/FeatureLakes.java @@ -7,8 +7,8 @@ import common.rng.Random; import common.util.BlockPos; import common.world.LightType; import common.world.State; -import server.biome.GenBiome; import server.world.WorldServer; +import server.worldgen.biome.GenBiome; public class FeatureLakes { diff --git a/server/src/main/java/server/worldgen/GeneratorPerlin.java b/server/src/main/java/server/worldgen/GeneratorPerlin.java index e02d8eea..1a4bd0e8 100755 --- a/server/src/main/java/server/worldgen/GeneratorPerlin.java +++ b/server/src/main/java/server/worldgen/GeneratorPerlin.java @@ -7,8 +7,8 @@ import common.rng.OctaveGen; import common.rng.Random; import common.util.ExtMath; import common.world.State; -import server.biome.GenBiome; import server.world.WorldServer; +import server.worldgen.biome.GenBiome; public class GeneratorPerlin implements ChunkGenerator { diff --git a/server/src/main/java/server/worldgen/MobConstants.java b/server/src/main/java/server/worldgen/MobConstants.java index 2300bf6e..fdf88815 100644 --- a/server/src/main/java/server/worldgen/MobConstants.java +++ b/server/src/main/java/server/worldgen/MobConstants.java @@ -5,7 +5,7 @@ import common.entity.npc.EntityMage; import common.entity.npc.EntityTiefling; import common.entity.npc.EntityUndead; import common.rng.WeightedList; -import server.biome.RngSpawn; +import server.worldgen.biome.RngSpawn; public abstract class MobConstants { public static final WeightedList MAGEHUT_MOBS = new WeightedList(new RngSpawn(EntityMage.class, 1, 1, 1)); diff --git a/server/src/main/java/server/worldgen/ReplacerAltBiome.java b/server/src/main/java/server/worldgen/ReplacerAltBiome.java index 8543e230..66549f0f 100755 --- a/server/src/main/java/server/worldgen/ReplacerAltBiome.java +++ b/server/src/main/java/server/worldgen/ReplacerAltBiome.java @@ -7,8 +7,8 @@ import common.rng.NoiseGen; import common.rng.OctaveGen; import common.rng.Random; import common.world.State; -import server.biome.GenBiome; import server.world.WorldServer; +import server.worldgen.biome.GenBiome; public class ReplacerAltBiome implements BlockReplacer { diff --git a/server/src/main/java/server/worldgen/ReplacerBiome.java b/server/src/main/java/server/worldgen/ReplacerBiome.java index 894b8df6..945755b4 100755 --- a/server/src/main/java/server/worldgen/ReplacerBiome.java +++ b/server/src/main/java/server/worldgen/ReplacerBiome.java @@ -3,8 +3,8 @@ package server.worldgen; import common.biome.Biome; import common.rng.PerlinGen; import common.rng.Random; -import server.biome.GenBiome; import server.world.WorldServer; +import server.worldgen.biome.GenBiome; public class ReplacerBiome implements BlockReplacer { diff --git a/server/src/main/java/server/biome/BiomeBeach.java b/server/src/main/java/server/worldgen/biome/BiomeBeach.java similarity index 85% rename from server/src/main/java/server/biome/BiomeBeach.java rename to server/src/main/java/server/worldgen/biome/BiomeBeach.java index a4dbee58..751fc627 100755 --- a/server/src/main/java/server/biome/BiomeBeach.java +++ b/server/src/main/java/server/worldgen/biome/BiomeBeach.java @@ -1,4 +1,4 @@ -package server.biome; +package server.worldgen.biome; import common.biome.Biome; import common.init.Blocks; @@ -8,7 +8,7 @@ public class BiomeBeach extends GenBiome { public BiomeBeach(boolean cold) { - super(cold ? Biome.COLDBEACH : Biome.BEACH); + super(cold ? Biome.ICE_BEACH : Biome.BEACH); this.topBlock = Blocks.sand.getState(); this.fillerBlock = Blocks.sand.getState(); this.treesPerChunk = -999; diff --git a/server/src/main/java/server/biome/BiomeBlackened.java b/server/src/main/java/server/worldgen/biome/BiomeBlackened.java similarity index 97% rename from server/src/main/java/server/biome/BiomeBlackened.java rename to server/src/main/java/server/worldgen/biome/BiomeBlackened.java index 653d486e..45c4c826 100644 --- a/server/src/main/java/server/biome/BiomeBlackened.java +++ b/server/src/main/java/server/worldgen/biome/BiomeBlackened.java @@ -1,4 +1,4 @@ -package server.biome; +package server.worldgen.biome; import common.biome.Biome; import common.block.foliage.BlockFlower; diff --git a/server/src/main/java/server/biome/BiomeChaos.java b/server/src/main/java/server/worldgen/biome/BiomeChaos.java similarity index 97% rename from server/src/main/java/server/biome/BiomeChaos.java rename to server/src/main/java/server/worldgen/biome/BiomeChaos.java index 0bd3c457..df4cfe53 100755 --- a/server/src/main/java/server/biome/BiomeChaos.java +++ b/server/src/main/java/server/worldgen/biome/BiomeChaos.java @@ -1,4 +1,4 @@ -package server.biome; +package server.worldgen.biome; import common.biome.Biome; import common.entity.Entity; diff --git a/server/src/main/java/server/biome/BiomeDesert.java b/server/src/main/java/server/worldgen/biome/BiomeDesert.java similarity index 92% rename from server/src/main/java/server/biome/BiomeDesert.java rename to server/src/main/java/server/worldgen/biome/BiomeDesert.java index 0171ff5c..1b680803 100755 --- a/server/src/main/java/server/biome/BiomeDesert.java +++ b/server/src/main/java/server/worldgen/biome/BiomeDesert.java @@ -1,4 +1,4 @@ -package server.biome; +package server.worldgen.biome; import common.biome.Biome; import common.init.Blocks; @@ -12,7 +12,7 @@ public class BiomeDesert extends GenBiome { public BiomeDesert(boolean hills) { - super(hills ? Biome.DESERTHILLS : Biome.DESERT); + super(hills ? Biome.DESERT_HILLS : Biome.DESERT); this.topBlock = Blocks.sand.getState(); this.fillerBlock = Blocks.sand.getState(); this.treesPerChunk = -999; diff --git a/server/src/main/java/server/biome/BiomeExterminated.java b/server/src/main/java/server/worldgen/biome/BiomeExterminated.java similarity index 94% rename from server/src/main/java/server/biome/BiomeExterminated.java rename to server/src/main/java/server/worldgen/biome/BiomeExterminated.java index 78b55fde..dec157ed 100755 --- a/server/src/main/java/server/biome/BiomeExterminated.java +++ b/server/src/main/java/server/worldgen/biome/BiomeExterminated.java @@ -1,4 +1,4 @@ -package server.biome; +package server.worldgen.biome; import common.biome.Biome; import common.init.Blocks; diff --git a/server/src/main/java/server/biome/BiomeForest.java b/server/src/main/java/server/worldgen/biome/BiomeForest.java similarity index 98% rename from server/src/main/java/server/biome/BiomeForest.java rename to server/src/main/java/server/worldgen/biome/BiomeForest.java index af373827..ee8f3469 100755 --- a/server/src/main/java/server/biome/BiomeForest.java +++ b/server/src/main/java/server/worldgen/biome/BiomeForest.java @@ -1,4 +1,4 @@ -package server.biome; +package server.worldgen.biome; import common.biome.Biome; import common.block.foliage.BlockDoublePlant; @@ -210,7 +210,7 @@ public class BiomeForest extends GenBiome } else { - return this.base != Biome.BIRCHFOREST && this.base != Biome.BIRCHFORESTHILLS ? new BiomeMutated(base, this) + return this.base != Biome.BIRCH_FOREST && this.base != Biome.BIRCH_HILLS ? new BiomeMutated(base, this) { public void decorate(WorldServer worldIn, Random rand, BlockPos pos) { diff --git a/server/src/main/java/server/biome/BiomeHell.java b/server/src/main/java/server/worldgen/biome/BiomeHell.java similarity index 99% rename from server/src/main/java/server/biome/BiomeHell.java rename to server/src/main/java/server/worldgen/biome/BiomeHell.java index 37388adc..65d3ad8c 100755 --- a/server/src/main/java/server/biome/BiomeHell.java +++ b/server/src/main/java/server/worldgen/biome/BiomeHell.java @@ -1,4 +1,4 @@ -package server.biome; +package server.worldgen.biome; import common.biome.Biome; import common.entity.npc.EntityBloodElf; diff --git a/server/src/main/java/server/biome/BiomeHills.java b/server/src/main/java/server/worldgen/biome/BiomeHills.java similarity index 99% rename from server/src/main/java/server/biome/BiomeHills.java rename to server/src/main/java/server/worldgen/biome/BiomeHills.java index 1ec2ed97..ee65713f 100755 --- a/server/src/main/java/server/biome/BiomeHills.java +++ b/server/src/main/java/server/worldgen/biome/BiomeHills.java @@ -1,4 +1,4 @@ -package server.biome; +package server.worldgen.biome; import common.biome.Biome; import common.init.Blocks; diff --git a/server/src/main/java/server/biome/BiomeJungle.java b/server/src/main/java/server/worldgen/biome/BiomeJungle.java similarity index 98% rename from server/src/main/java/server/biome/BiomeJungle.java rename to server/src/main/java/server/worldgen/biome/BiomeJungle.java index 3b22efa3..4697daa2 100755 --- a/server/src/main/java/server/biome/BiomeJungle.java +++ b/server/src/main/java/server/worldgen/biome/BiomeJungle.java @@ -1,4 +1,4 @@ -package server.biome; +package server.worldgen.biome; import common.biome.Biome; import common.entity.animal.EntityChicken; diff --git a/server/src/main/java/server/biome/BiomeMesa.java b/server/src/main/java/server/worldgen/biome/BiomeMesa.java similarity index 99% rename from server/src/main/java/server/biome/BiomeMesa.java rename to server/src/main/java/server/worldgen/biome/BiomeMesa.java index 9440b4b0..0d1fb243 100755 --- a/server/src/main/java/server/biome/BiomeMesa.java +++ b/server/src/main/java/server/worldgen/biome/BiomeMesa.java @@ -1,4 +1,4 @@ -package server.biome; +package server.worldgen.biome; import java.util.Arrays; diff --git a/server/src/main/java/server/biome/BiomeMoon.java b/server/src/main/java/server/worldgen/biome/BiomeMoon.java similarity index 95% rename from server/src/main/java/server/biome/BiomeMoon.java rename to server/src/main/java/server/worldgen/biome/BiomeMoon.java index cab5cfc7..3a970da0 100755 --- a/server/src/main/java/server/biome/BiomeMoon.java +++ b/server/src/main/java/server/worldgen/biome/BiomeMoon.java @@ -1,4 +1,4 @@ -package server.biome; +package server.worldgen.biome; import common.biome.Biome; import common.init.Blocks; diff --git a/server/src/main/java/server/biome/BiomeMushroom.java b/server/src/main/java/server/worldgen/biome/BiomeMushroom.java similarity index 90% rename from server/src/main/java/server/biome/BiomeMushroom.java rename to server/src/main/java/server/worldgen/biome/BiomeMushroom.java index 5e9633f3..bcae4661 100755 --- a/server/src/main/java/server/biome/BiomeMushroom.java +++ b/server/src/main/java/server/worldgen/biome/BiomeMushroom.java @@ -1,4 +1,4 @@ -package server.biome; +package server.worldgen.biome; import common.biome.Biome; import common.entity.npc.EntityDwarf; @@ -7,7 +7,7 @@ import common.rng.WeightedList; public class BiomeMushroom extends GenBiome { public BiomeMushroom() { - super(Biome.MUSHROOMPLAINS); + super(Biome.MUSHROOM); this.treesPerChunk = -100; this.flowersPerChunk = -100; this.grassPerChunk = -100; diff --git a/server/src/main/java/server/biome/BiomeMutated.java b/server/src/main/java/server/worldgen/biome/BiomeMutated.java similarity index 98% rename from server/src/main/java/server/biome/BiomeMutated.java rename to server/src/main/java/server/worldgen/biome/BiomeMutated.java index 91b3dfb3..5534dda8 100755 --- a/server/src/main/java/server/biome/BiomeMutated.java +++ b/server/src/main/java/server/worldgen/biome/BiomeMutated.java @@ -1,4 +1,4 @@ -package server.biome; +package server.worldgen.biome; import common.biome.Biome; import common.rng.Random; diff --git a/server/src/main/java/server/biome/BiomeNone.java b/server/src/main/java/server/worldgen/biome/BiomeNone.java similarity index 95% rename from server/src/main/java/server/biome/BiomeNone.java rename to server/src/main/java/server/worldgen/biome/BiomeNone.java index f3ef796e..9f1278e4 100755 --- a/server/src/main/java/server/biome/BiomeNone.java +++ b/server/src/main/java/server/worldgen/biome/BiomeNone.java @@ -1,4 +1,4 @@ -package server.biome; +package server.worldgen.biome; import common.biome.Biome; import common.init.Blocks; diff --git a/server/src/main/java/server/biome/BiomePlains.java b/server/src/main/java/server/worldgen/biome/BiomePlains.java similarity index 98% rename from server/src/main/java/server/biome/BiomePlains.java rename to server/src/main/java/server/worldgen/biome/BiomePlains.java index db96fa6c..5c2d60ad 100755 --- a/server/src/main/java/server/biome/BiomePlains.java +++ b/server/src/main/java/server/worldgen/biome/BiomePlains.java @@ -1,4 +1,4 @@ -package server.biome; +package server.worldgen.biome; import common.biome.Biome; import common.block.foliage.BlockFlower; @@ -23,7 +23,7 @@ public class BiomePlains extends GenBiome protected BiomePlains() { - super(Biome.PLAINS); + super(Biome.PLAIN); this.setScaling(Scaling.PLAINS_LOW); this.mobs.add(new RngSpawn(EntityHorse.class, 5, 2, 6)); this.treesPerChunk = -999; diff --git a/server/src/main/java/server/biome/BiomeSavanna.java b/server/src/main/java/server/worldgen/biome/BiomeSavanna.java similarity index 96% rename from server/src/main/java/server/biome/BiomeSavanna.java rename to server/src/main/java/server/worldgen/biome/BiomeSavanna.java index 78b6bd2a..7b2b5583 100755 --- a/server/src/main/java/server/biome/BiomeSavanna.java +++ b/server/src/main/java/server/worldgen/biome/BiomeSavanna.java @@ -1,4 +1,4 @@ -package server.biome; +package server.worldgen.biome; import common.biome.Biome; import common.entity.animal.EntityHorse; @@ -16,7 +16,7 @@ public class BiomeSavanna extends GenBiome protected BiomeSavanna(boolean plateau) { - super(plateau ? Biome.SAVANNAPLATEAU : Biome.SAVANNA); + super(plateau ? Biome.SAVANNA_PLATEAU : Biome.SAVANNA); this.mobs.add(new RngSpawn(EntityHorse.class, 1, 2, 6)); this.treesPerChunk = 1; this.flowersPerChunk = 4; diff --git a/server/src/main/java/server/biome/BiomeSnow.java b/server/src/main/java/server/worldgen/biome/BiomeSnow.java similarity index 98% rename from server/src/main/java/server/biome/BiomeSnow.java rename to server/src/main/java/server/worldgen/biome/BiomeSnow.java index ea236f24..91adb979 100755 --- a/server/src/main/java/server/biome/BiomeSnow.java +++ b/server/src/main/java/server/worldgen/biome/BiomeSnow.java @@ -1,4 +1,4 @@ -package server.biome; +package server.worldgen.biome; import common.biome.Biome; import common.init.Blocks; diff --git a/server/src/main/java/server/biome/BiomeSnowLand.java b/server/src/main/java/server/worldgen/biome/BiomeSnowLand.java similarity index 90% rename from server/src/main/java/server/biome/BiomeSnowLand.java rename to server/src/main/java/server/worldgen/biome/BiomeSnowLand.java index 37295eaa..e9c3903f 100755 --- a/server/src/main/java/server/biome/BiomeSnowLand.java +++ b/server/src/main/java/server/worldgen/biome/BiomeSnowLand.java @@ -1,4 +1,4 @@ -package server.biome; +package server.worldgen.biome; import common.biome.Biome; import common.entity.animal.EntitySheep; @@ -10,7 +10,7 @@ public class BiomeSnowLand extends GenBiome { public BiomeSnowLand() { - super(Biome.SNOWLAND); + super(Biome.SNOW); this.topBlock = Blocks.snow.getState(); this.fillerBlock = Blocks.snow.getState(); this.mushroomsPerChunk = -1; diff --git a/server/src/main/java/server/biome/BiomeSpace.java b/server/src/main/java/server/worldgen/biome/BiomeSpace.java similarity index 97% rename from server/src/main/java/server/biome/BiomeSpace.java rename to server/src/main/java/server/worldgen/biome/BiomeSpace.java index 75c8f3bb..925b1fe5 100755 --- a/server/src/main/java/server/biome/BiomeSpace.java +++ b/server/src/main/java/server/worldgen/biome/BiomeSpace.java @@ -1,4 +1,4 @@ -package server.biome; +package server.worldgen.biome; import common.biome.Biome; import common.init.Blocks; diff --git a/server/src/main/java/server/biome/BiomeStoneBeach.java b/server/src/main/java/server/worldgen/biome/BiomeStoneBeach.java similarity index 88% rename from server/src/main/java/server/biome/BiomeStoneBeach.java rename to server/src/main/java/server/worldgen/biome/BiomeStoneBeach.java index 47a4c5b5..0734b434 100755 --- a/server/src/main/java/server/biome/BiomeStoneBeach.java +++ b/server/src/main/java/server/worldgen/biome/BiomeStoneBeach.java @@ -1,4 +1,4 @@ -package server.biome; +package server.worldgen.biome; import common.biome.Biome; import common.init.Blocks; @@ -8,7 +8,7 @@ public class BiomeStoneBeach extends GenBiome { public BiomeStoneBeach() { - super(Biome.STONEBEACH); + super(Biome.STONE_BEACH); // this.mobs.clear(); this.topBlock = Blocks.stone.getState(); this.fillerBlock = Blocks.stone.getState(); diff --git a/server/src/main/java/server/biome/BiomeSwamp.java b/server/src/main/java/server/worldgen/biome/BiomeSwamp.java similarity index 72% rename from server/src/main/java/server/biome/BiomeSwamp.java rename to server/src/main/java/server/worldgen/biome/BiomeSwamp.java index 157ec583..066615ab 100755 --- a/server/src/main/java/server/biome/BiomeSwamp.java +++ b/server/src/main/java/server/worldgen/biome/BiomeSwamp.java @@ -1,4 +1,4 @@ -package server.biome; +package server.worldgen.biome; import common.biome.Biome; import common.block.foliage.BlockFlower; @@ -10,13 +10,19 @@ import common.util.BlockPos; import common.util.Facing; import server.world.WorldServer; import server.worldgen.ChunkPrimer; +import server.worldgen.FeatureGenerator; +import server.worldgen.foliage.WorldGenTallGrass; +import server.worldgen.tree.WorldGenSwamp; import server.worldgen.tree.WorldGenTree; public class BiomeSwamp extends GenBiome { + protected final WorldGenSwamp worldGeneratorSwamp = new WorldGenSwamp(); + protected BiomeSwamp() { - super(Biome.SWAMPLAND); + super(Biome.SWAMP); + this.topBlock = Blocks.swamp.getState(); this.treesPerChunk = 2; this.flowersPerChunk = 1; this.deadBushPerChunk = 1; @@ -40,9 +46,15 @@ public class BiomeSwamp extends GenBiome { return BlockFlower.EnumFlowerType.BLUE_ORCHID; } + + public FeatureGenerator getRandomWorldGenForGrass(Random rand) + { + return new WorldGenTallGrass(Blocks.swamp_grass); + } public void genTerrainBlocks(WorldServer worldIn, Random rand, ChunkPrimer chunkPrimerIn, int x, int z, double noiseVal) { + int sea = worldIn.getSeaLevel() - 1; double d0 = GRASS_NOISE.generate((double)x * 0.25D, (double)z * 0.25D); if (d0 > 0.0D) @@ -54,9 +66,10 @@ public class BiomeSwamp extends GenBiome { if (chunkPrimerIn.get(j, k, i).getBlock() != Blocks.air) { - if (k == 62 && chunkPrimerIn.get(j, k, i).getBlock() != Blocks.water) + if (k == sea) { - chunkPrimerIn.set(j, k, i, Blocks.water.getState()); + if(!chunkPrimerIn.get(j, k, i).getBlock().getMaterial().isLiquid() || k <= 0 || !chunkPrimerIn.get(j, k - 1, i).getBlock().getMaterial().isLiquid()) + chunkPrimerIn.set(j, k, i, Blocks.swamp_water.getState()); if (d0 < 0.12D) { diff --git a/server/src/main/java/server/biome/BiomeTaiga.java b/server/src/main/java/server/worldgen/biome/BiomeTaiga.java similarity index 95% rename from server/src/main/java/server/biome/BiomeTaiga.java rename to server/src/main/java/server/worldgen/biome/BiomeTaiga.java index e5167526..ca604fe1 100755 --- a/server/src/main/java/server/biome/BiomeTaiga.java +++ b/server/src/main/java/server/worldgen/biome/BiomeTaiga.java @@ -1,4 +1,4 @@ -package server.biome; +package server.worldgen.biome; import common.biome.Biome; import common.entity.animal.EntityWolf; @@ -107,6 +107,6 @@ public class BiomeTaiga extends GenBiome protected GenBiome createMutatedBiome(Biome base) { - return this.base == Biome.MEGATAIGA ? (new BiomeTaiga(base, 2)).setScaling(this.depth, this.scale) : super.createMutatedBiome(base); + return this.base == Biome.LARGE_TAIGA ? (new BiomeTaiga(base, 2)).setScaling(this.depth, this.scale) : super.createMutatedBiome(base); } } diff --git a/server/src/main/java/server/biome/BiomeTian.java b/server/src/main/java/server/worldgen/biome/BiomeTian.java similarity index 99% rename from server/src/main/java/server/biome/BiomeTian.java rename to server/src/main/java/server/worldgen/biome/BiomeTian.java index 3fbd6702..a2ff2485 100755 --- a/server/src/main/java/server/biome/BiomeTian.java +++ b/server/src/main/java/server/worldgen/biome/BiomeTian.java @@ -1,4 +1,4 @@ -package server.biome; +package server.worldgen.biome; import common.biome.Biome; import common.block.foliage.BlockFlower; diff --git a/server/src/main/java/server/biome/BiomeWater.java b/server/src/main/java/server/worldgen/biome/BiomeWater.java similarity index 94% rename from server/src/main/java/server/biome/BiomeWater.java rename to server/src/main/java/server/worldgen/biome/BiomeWater.java index 007ecccb..141bcc3f 100755 --- a/server/src/main/java/server/biome/BiomeWater.java +++ b/server/src/main/java/server/worldgen/biome/BiomeWater.java @@ -1,4 +1,4 @@ -package server.biome; +package server.worldgen.biome; import common.biome.Biome; import common.entity.npc.EntityMerfolk; diff --git a/server/src/main/java/server/biome/GenBiome.java b/server/src/main/java/server/worldgen/biome/GenBiome.java similarity index 91% rename from server/src/main/java/server/biome/GenBiome.java rename to server/src/main/java/server/worldgen/biome/GenBiome.java index a56355c6..31b162e8 100755 --- a/server/src/main/java/server/biome/GenBiome.java +++ b/server/src/main/java/server/worldgen/biome/GenBiome.java @@ -1,4 +1,4 @@ -package server.biome; +package server.worldgen.biome; import common.biome.Biome; import common.biome.IBiome; @@ -63,7 +63,7 @@ public abstract class GenBiome implements IBiome { public static final GenBiome plains = (new BiomePlains()); public static final GenBiome desert = (new BiomeDesert(false)).setScaling(Scaling.PLAINS_LOW); - public static final GenBiome extremeHills = (new BiomeHills(Biome.EXTREMEHILLS, false)).setScaling(Scaling.HILLS_LARGE); + public static final GenBiome extremeHills = (new BiomeHills(Biome.HILLS, false)).setScaling(Scaling.HILLS_LARGE); public static final GenBiome forest = (new BiomeForest(Biome.FOREST, 0)); public static final GenBiome taiga = (new BiomeTaiga(Biome.TAIGA, 0)).setScaling(Scaling.PLAINS_MEDIUM); public static final GenBiome swampland = (new BiomeSwamp()).setScaling(Scaling.SEA_POND); @@ -72,46 +72,46 @@ public abstract class GenBiome implements IBiome { public static final GenBiome exterminated = (new BiomeExterminated()); public static final GenBiome space = (new BiomeSpace()); - public static final GenBiome frozenSea = (new BiomeWater(Biome.FROZENSEA, false)).enableColdBeach().setScaling(Scaling.SEA_MEDIUM); - public static final GenBiome frozenRiver = (new BiomeWater(Biome.FROZENRIVER, true)).enableColdBeach().setScaling(Scaling.SEA_SHALLOW); - public static final GenBiome icePlains = (new BiomeSnow(Biome.ICEPLAINS, false)).enableColdBeach().setScaling(Scaling.PLAINS_LOW); - public static final GenBiome iceMountains = (new BiomeSnow(Biome.ICEMOUNTAINS, false)).enableColdBeach().setScaling(Scaling.HILLS_LOW); + public static final GenBiome frozenSea = (new BiomeWater(Biome.ICE_SEA, false)).enableColdBeach().setScaling(Scaling.SEA_MEDIUM); + public static final GenBiome frozenRiver = (new BiomeWater(Biome.ICE_RIVER, true)).enableColdBeach().setScaling(Scaling.SEA_SHALLOW); + public static final GenBiome icePlains = (new BiomeSnow(Biome.ICE, false)).enableColdBeach().setScaling(Scaling.PLAINS_LOW); + public static final GenBiome iceMountains = (new BiomeSnow(Biome.ICE_HILLS, false)).enableColdBeach().setScaling(Scaling.HILLS_LOW); public static final GenBiome mushroomPlains = (new BiomeMushroom()).setScaling(Scaling.PLAINS_VARYING); public static final GenBiome blackened = (new BiomeBlackened()); public static final GenBiome beach = (new BiomeBeach(false)).setScaling(Scaling.SEA_SHORE); public static final GenBiome desertHills = (new BiomeDesert(true)).setScaling(Scaling.HILLS_LOW); - public static final GenBiome forestHills = (new BiomeForest(Biome.FORESTHILLS, 0)).setScaling(Scaling.HILLS_LOW); - public static final GenBiome taigaHills = (new BiomeTaiga(Biome.TAIGAHILLS, 0)).setScaling(Scaling.HILLS_LOW); - public static final GenBiome extremeHillsEdge = (new BiomeHills(Biome.EXTREMEHILLSEDGE, true)).setScaling(Scaling.HILLS_MEDIUM); - public static final GenBiome jungle = (new BiomeJungle(Biome.JUNGLE, false)); - public static final GenBiome jungleHills = (new BiomeJungle(Biome.JUNGLEHILLS, false)).setScaling(Scaling.HILLS_LOW); - public static final GenBiome jungleEdge = (new BiomeJungle(Biome.JUNGLEEDGE, true)); + public static final GenBiome forestHills = (new BiomeForest(Biome.FOREST_HILLS, 0)).setScaling(Scaling.HILLS_LOW); + public static final GenBiome taigaHills = (new BiomeTaiga(Biome.TAIGA_HILLS, 0)).setScaling(Scaling.HILLS_LOW); + public static final GenBiome extremeHillsEdge = (new BiomeHills(Biome.HILLS_EDGE, true)).setScaling(Scaling.HILLS_MEDIUM); + public static final GenBiome jungle = (new BiomeJungle(Biome.TROPIC, false)); + public static final GenBiome jungleHills = (new BiomeJungle(Biome.TROPIC_HILLS, false)).setScaling(Scaling.HILLS_LOW); + public static final GenBiome jungleEdge = (new BiomeJungle(Biome.TROPIC_EDGE, true)); public static final GenBiome sea = (new BiomeWater(Biome.SEA, false)).setScaling(Scaling.SEA_MEDIUM); public static final GenBiome stoneBeach = (new BiomeStoneBeach()).setScaling(Scaling.SEA_VARYING); public static final GenBiome coldBeach = (new BiomeBeach(true)).setScaling(Scaling.SEA_SHORE).enableColdBeach(); - public static final GenBiome birchForest = (new BiomeForest(Biome.BIRCHFOREST, 2)); - public static final GenBiome birchForestHills = (new BiomeForest(Biome.BIRCHFORESTHILLS, 2)).setScaling(Scaling.HILLS_LOW); - public static final GenBiome roofedForest = (new BiomeForest(Biome.ROOFEDFOREST, 3)); - public static final GenBiome coldTaiga = (new BiomeTaiga(Biome.COLDTAIGA, 0)).enableColdBeach().setScaling(Scaling.PLAINS_MEDIUM); - public static final GenBiome coldTaigaHills = (new BiomeTaiga(Biome.COLDTAIGAHILLS, 0)).enableColdBeach().setScaling(Scaling.HILLS_LOW); - public static final GenBiome megaTaiga = (new BiomeTaiga(Biome.MEGATAIGA, 1)).setScaling(Scaling.PLAINS_MEDIUM); - public static final GenBiome megaTaigaHills = (new BiomeTaiga(Biome.MEGATAIGAHILLS, 1)).setScaling(Scaling.HILLS_LOW); - public static final GenBiome extremeHillsPlus = (new BiomeHills(Biome.EXTREMEHILLSPLUS, true)).setScaling(Scaling.HILLS_LARGE); + public static final GenBiome birchForest = (new BiomeForest(Biome.BIRCH_FOREST, 2)); + public static final GenBiome birchForestHills = (new BiomeForest(Biome.BIRCH_HILLS, 2)).setScaling(Scaling.HILLS_LOW); + public static final GenBiome roofedForest = (new BiomeForest(Biome.DARK_FOREST, 3)); + public static final GenBiome coldTaiga = (new BiomeTaiga(Biome.ICE_TAIGA, 0)).enableColdBeach().setScaling(Scaling.PLAINS_MEDIUM); + public static final GenBiome coldTaigaHills = (new BiomeTaiga(Biome.ICE_TAIGA_HILLS, 0)).enableColdBeach().setScaling(Scaling.HILLS_LOW); + public static final GenBiome megaTaiga = (new BiomeTaiga(Biome.LARGE_TAIGA, 1)).setScaling(Scaling.PLAINS_MEDIUM); + public static final GenBiome megaTaigaHills = (new BiomeTaiga(Biome.LARGE_TAIGA_HILLS, 1)).setScaling(Scaling.HILLS_LOW); + public static final GenBiome extremeHillsPlus = (new BiomeHills(Biome.LARGE_HILLS, true)).setScaling(Scaling.HILLS_LARGE); public static final GenBiome savanna = (new BiomeSavanna(false)).setScaling(Scaling.PLAINS_LOW); public static final GenBiome savannaPlateau = (new BiomeSavanna(true)).setScaling(Scaling.HILLS_PLATEAU); public static final GenBiome mesa = (new BiomeMesa(Biome.MESA, false, false)); - public static final GenBiome mesaPlateau_F = (new BiomeMesa(Biome.MESAPLATEAUF, false, true)).setScaling(Scaling.HILLS_PLATEAU); - public static final GenBiome mesaPlateau = (new BiomeMesa(Biome.MESAPLATEAU, false, false)).setScaling(Scaling.HILLS_PLATEAU); + public static final GenBiome mesaPlateau_F = (new BiomeMesa(Biome.MESA_FOREST, false, true)).setScaling(Scaling.HILLS_PLATEAU); + public static final GenBiome mesaPlateau = (new BiomeMesa(Biome.MESA_PLATEAU, false, false)).setScaling(Scaling.HILLS_PLATEAU); public static final GenBiome snowLand = (new BiomeSnowLand()).enableColdBeach(); public static final GenBiome tian = (new BiomeTian()).setScaling(Scaling.VARYING_MEDIUM); - public static final GenBiome elvenForest = (new BiomeForest(Biome.ELVENFOREST, 4)); - public static final GenBiome upperHell = (new BiomeHell(Biome.UPPERHELL, 0)); - public static final GenBiome lowerHell = (new BiomeHell(Biome.LOWERHELL, 1)); - public static final GenBiome hellHills = (new BiomeHell(Biome.HELLHILLS, 1)).setScaling(Scaling.HILLS_LARGE); - public static final GenBiome soulPlains = (new BiomeHell(Biome.SOULPLAINS, 1)).setScaling(Scaling.SEA_POND); - public static final GenBiome ashLand = (new BiomeHell(Biome.ASHLAND, 2)).setScaling(Scaling.PLAINS_LOW); + public static final GenBiome elvenForest = (new BiomeForest(Biome.ELVEN_FOREST, 4)); + public static final GenBiome upperHell = (new BiomeHell(Biome.UPPER_HELL, 0)); + public static final GenBiome lowerHell = (new BiomeHell(Biome.LOWER_HELL, 1)); + public static final GenBiome hellHills = (new BiomeHell(Biome.HELL_HILLS, 1)).setScaling(Scaling.HILLS_LARGE); + public static final GenBiome soulPlains = (new BiomeHell(Biome.SOUL_PLAINS, 1)).setScaling(Scaling.SEA_POND); + public static final GenBiome ashLand = (new BiomeHell(Biome.ASH, 2)).setScaling(Scaling.PLAINS_LOW); public static final GenBiome moon = (new BiomeMoon()).setScaling(Scaling.PLAINS_LOW); public static final GenBiome chaos = (new BiomeChaos()).setScaling(Scaling.VARYING_CHAOTIC); @@ -124,7 +124,6 @@ public abstract class GenBiome implements IBiome { protected final WeightedList mobs = new WeightedList(); protected final WorldGenBaseTree worldGeneratorTrees = new WorldGenBaseTree(false); protected final WorldGenBigTree worldGeneratorBigTree = new WorldGenBigTree(false); - protected final WorldGenSwamp worldGeneratorSwamp = new WorldGenSwamp(); private final FeatureGenerator clayGen = new WorldGenClay(4); private final FeatureGenerator sandGen = new WorldGenSand(Blocks.sand, 7); private final FeatureGenerator gravelAsSandGen = new WorldGenSand(Blocks.gravel, 6); @@ -137,6 +136,7 @@ public abstract class GenBiome implements IBiome { private final FeatureGenerator waterlilyGen = new WorldGenWaterlily(); private final FeatureGenerator clayGenExt = new WorldGenClayExt(32); + public Biome mutated = null; public State topBlock = Blocks.grass.getState(); public State fillerBlock = Blocks.dirt.getState(); public float depth = Scaling.VARYING_LOW.depth; @@ -182,26 +182,26 @@ public abstract class GenBiome implements IBiome { } static { - desert.createMutatedBiome(Biome.DESERTM); - forest.createMutatedBiome(Biome.FLOWERFOREST); - taiga.createMutatedBiome(Biome.TAIGAM); - swampland.createMutatedBiome(Biome.SWAMPLANDM); - icePlains.createMutatedBiome(Biome.ICEPLAINSSPIKES); - jungle.createMutatedBiome(Biome.JUNGLEM); - jungleEdge.createMutatedBiome(Biome.JUNGLEEDGEM); - coldTaiga.createMutatedBiome(Biome.COLDTAIGAM); - savanna.createMutatedBiome(Biome.SAVANNAM); - savannaPlateau.createMutatedBiome(Biome.SAVANNAPLATEAUM); - mesa.createMutatedBiome(Biome.MESABRYCE); - mesaPlateau_F.createMutatedBiome(Biome.MESAPLATEAUFM); - mesaPlateau.createMutatedBiome(Biome.MESAPLATEAUM); - birchForest.createMutatedBiome(Biome.BIRCHFORESTM); - birchForestHills.createMutatedBiome(Biome.BIRCHFORESTHILLSM); - roofedForest.createMutatedBiome(Biome.ROOFEDFORESTM); - megaTaiga.createMutatedBiome(Biome.MEGASPRUCETAIGA); - extremeHills.createMutatedBiome(Biome.EXTREMEHILLSM); - extremeHillsPlus.createMutatedBiome(Biome.EXTREMEHILLSPLUSM); - megaTaiga.createMutatedBiome(Biome.REDWOODTAIGAHILLSM); + desert.mutate(Biome.DESERT_MOD); + forest.mutate(Biome.FLOWER_FOREST); + taiga.mutate(Biome.TAIGA_MOD); + swampland.mutate(Biome.SWAMP_MOD); + icePlains.mutate(Biome.ICE_SPIKES); + jungle.mutate(Biome.TROPIC_MOD); + jungleEdge.mutate(Biome.TROPIC_EDGE_MOD); + coldTaiga.mutate(Biome.ICE_TAIGA_MOD); + savanna.mutate(Biome.SAVANNA_MOD); + savannaPlateau.mutate(Biome.SAVANNA_PLATEAU_MOD); + mesa.mutate(Biome.MESA_PEAK); + mesaPlateau_F.mutate(Biome.MESA_FOREST_MOD); + mesaPlateau.mutate(Biome.MESA_PLATEAU_MOD); + birchForest.mutate(Biome.BIRCH_FOREST_MOD); + birchForestHills.mutate(Biome.BIRCH_HILLS_MOD); + roofedForest.mutate(Biome.DARK_FOREST_MOD); + megaTaiga.mutate(Biome.SPRUCE_TAIGA); + extremeHills.mutate(Biome.HILLS_MOD); + extremeHillsPlus.mutate(Biome.LARGE_HILLS_MOD); + megaTaiga.mutate(Biome.REDWOOD_TAIGA); } protected GenBiome(Biome base) { @@ -244,10 +244,10 @@ public abstract class GenBiome implements IBiome { return rand.chance(10) ? this.worldGeneratorBigTree : this.worldGeneratorTrees; } - public WorldGenTree genBigTreeLegacy(Random rand, BlockPos pos) + public WorldGenTree genBigTreeLegacy(Random rand, BlockPos pos, boolean humid) { int noise = (int)((TREE_NOISE.generate((double)pos.getX() * 0.5D, (double)pos.getZ() * 0.5D) / 8D + rand.doublev() * 4D + 4D) / 3D); - return (noise > 0 && rand.chance(noise)) || (this.base.isHighHumidity() && rand.chance(3)) ? this.worldGeneratorBigTree : + return (noise > 0 && rand.chance(noise)) || (humid && rand.chance(3)) ? this.worldGeneratorBigTree : this.worldGeneratorTrees; } @@ -850,6 +850,11 @@ public abstract class GenBiome implements IBiome { { return new BiomeMutated(base, this); } + + private void mutate(Biome base) + { + this.createMutatedBiome(this.mutated = base); + } public Class getBiomeClass() { diff --git a/server/src/main/java/server/biome/RngSpawn.java b/server/src/main/java/server/worldgen/biome/RngSpawn.java similarity index 92% rename from server/src/main/java/server/biome/RngSpawn.java rename to server/src/main/java/server/worldgen/biome/RngSpawn.java index 140c20b7..abd00e84 100644 --- a/server/src/main/java/server/biome/RngSpawn.java +++ b/server/src/main/java/server/worldgen/biome/RngSpawn.java @@ -1,4 +1,4 @@ -package server.biome; +package server.worldgen.biome; import common.entity.types.EntityLiving; import common.rng.RngItem; diff --git a/server/src/main/java/server/biome/Scaling.java b/server/src/main/java/server/worldgen/biome/Scaling.java similarity index 95% rename from server/src/main/java/server/biome/Scaling.java rename to server/src/main/java/server/worldgen/biome/Scaling.java index 1dadf62e..eecc2537 100644 --- a/server/src/main/java/server/biome/Scaling.java +++ b/server/src/main/java/server/worldgen/biome/Scaling.java @@ -1,4 +1,4 @@ -package server.biome; +package server.worldgen.biome; public enum Scaling { VARYING_LOW(0.1F, 0.2F), diff --git a/server/src/main/java/server/biome/Temperature.java b/server/src/main/java/server/worldgen/biome/Temperature.java similarity index 63% rename from server/src/main/java/server/biome/Temperature.java rename to server/src/main/java/server/worldgen/biome/Temperature.java index 4eda4355..c61178fa 100644 --- a/server/src/main/java/server/biome/Temperature.java +++ b/server/src/main/java/server/worldgen/biome/Temperature.java @@ -1,4 +1,4 @@ -package server.biome; +package server.worldgen.biome; public enum Temperature { SEA, COLD, MEDIUM, WARM; diff --git a/server/src/main/java/server/worldgen/caves/MapGenCaves.java b/server/src/main/java/server/worldgen/caves/MapGenCaves.java index 44d44e0e..05374485 100755 --- a/server/src/main/java/server/worldgen/caves/MapGenCaves.java +++ b/server/src/main/java/server/worldgen/caves/MapGenCaves.java @@ -7,9 +7,9 @@ import common.rng.Random; import common.util.BlockPos; import common.util.ExtMath; import common.world.State; -import server.biome.GenBiome; import server.world.WorldServer; import server.worldgen.ChunkPrimer; +import server.worldgen.biome.GenBiome; public class MapGenCaves extends MapGenBase { diff --git a/server/src/main/java/server/worldgen/caves/MapGenRavine.java b/server/src/main/java/server/worldgen/caves/MapGenRavine.java index 8ac23366..4050bdaa 100755 --- a/server/src/main/java/server/worldgen/caves/MapGenRavine.java +++ b/server/src/main/java/server/worldgen/caves/MapGenRavine.java @@ -6,9 +6,9 @@ import common.rng.Random; import common.util.BlockPos; import common.util.ExtMath; import common.world.State; -import server.biome.GenBiome; import server.world.WorldServer; import server.worldgen.ChunkPrimer; +import server.worldgen.biome.GenBiome; public class MapGenRavine extends MapGenBase { diff --git a/server/src/main/java/server/worldgen/layer/GenLayer.java b/server/src/main/java/server/worldgen/layer/GenLayer.java index 675f8841..2469dc44 100755 --- a/server/src/main/java/server/worldgen/layer/GenLayer.java +++ b/server/src/main/java/server/worldgen/layer/GenLayer.java @@ -1,7 +1,7 @@ package server.worldgen.layer; import common.biome.Biome; -import server.biome.GenBiome; +import server.worldgen.biome.GenBiome; public abstract class GenLayer { private long worldGenSeed; @@ -24,7 +24,7 @@ public abstract class GenLayer { } protected static boolean isSea(int id) { - return id == Biome.SEA.id || id == Biome.FROZENSEA.id; + return id == Biome.SEA.id || id == Biome.ICE_SEA.id; } public GenLayer(long base) { diff --git a/server/src/main/java/server/worldgen/layer/GenLayerAddSea.java b/server/src/main/java/server/worldgen/layer/GenLayerAddSea.java index f958542f..b0345bff 100755 --- a/server/src/main/java/server/worldgen/layer/GenLayerAddSea.java +++ b/server/src/main/java/server/worldgen/layer/GenLayerAddSea.java @@ -60,7 +60,7 @@ public class GenLayerAddSea extends GenLayer this.initChunkSeed((long)(areaX + j1), (long)(areaY + i1)); if (k2 == 0 && this.nextInt(this.rarity) == 0) { - aint1[j1 + i1 * areaWidth] = l2 > 1 ? Biome.FROZENSEA.id : Biome.SEA.id; + aint1[j1 + i1 * areaWidth] = l2 > 1 ? Biome.ICE_SEA.id : Biome.SEA.id; } else { diff --git a/server/src/main/java/server/worldgen/layer/GenLayerBiomeEdge.java b/server/src/main/java/server/worldgen/layer/GenLayerBiomeEdge.java index b2ae7be6..afc3c293 100755 --- a/server/src/main/java/server/worldgen/layer/GenLayerBiomeEdge.java +++ b/server/src/main/java/server/worldgen/layer/GenLayerBiomeEdge.java @@ -1,8 +1,8 @@ package server.worldgen.layer; import common.biome.Biome; -import server.biome.GenBiome; -import server.biome.Temperature; +import server.worldgen.biome.GenBiome; +import server.worldgen.biome.Temperature; public class GenLayerBiomeEdge extends GenLayer { @@ -28,7 +28,7 @@ public class GenLayerBiomeEdge extends GenLayer this.initChunkSeed((long)(j + areaX), (long)(i + areaY)); int k = aint[j + 1 + (i + 1) * (areaWidth + 2)]; - if (!this.replaceBiomeEdgeIfNecessary(aint, aint1, j, i, areaWidth, k, Biome.EXTREMEHILLS.id, Biome.EXTREMEHILLSEDGE.id) && /* !this.replaceBiomeEdge(aint, aint1, j, i, areaWidth, k, Biome.mesaPlateau_F.id, Biome.mesa.id) && !this.replaceBiomeEdge(aint, aint1, j, i, areaWidth, k, Biome.mesaPlateau.id, Biome.mesa.id) && */ !this.replaceBiomeEdge(aint, aint1, j, i, areaWidth, k, Biome.MEGATAIGA.id, Biome.TAIGA.id)) + if (!this.replaceBiomeEdgeIfNecessary(aint, aint1, j, i, areaWidth, k, Biome.HILLS.id, Biome.HILLS_EDGE.id) && /* !this.replaceBiomeEdge(aint, aint1, j, i, areaWidth, k, Biome.mesaPlateau_F.id, Biome.mesa.id) && !this.replaceBiomeEdge(aint, aint1, j, i, areaWidth, k, Biome.mesaPlateau.id, Biome.mesa.id) && */ !this.replaceBiomeEdge(aint, aint1, j, i, areaWidth, k, Biome.LARGE_TAIGA.id, Biome.TAIGA.id)) { if (k == Biome.DESERT.id) { @@ -37,36 +37,36 @@ public class GenLayerBiomeEdge extends GenLayer int j2 = aint[j + 1 - 1 + (i + 1) * (areaWidth + 2)]; int k2 = aint[j + 1 + (i + 1 + 1) * (areaWidth + 2)]; - if (l1 != Biome.ICEPLAINS.id && i2 != Biome.ICEPLAINS.id && j2 != Biome.ICEPLAINS.id && k2 != Biome.ICEPLAINS.id) + if (l1 != Biome.ICE.id && i2 != Biome.ICE.id && j2 != Biome.ICE.id && k2 != Biome.ICE.id) { aint1[j + i * areaWidth] = k; } else { - aint1[j + i * areaWidth] = Biome.EXTREMEHILLSPLUS.id; + aint1[j + i * areaWidth] = Biome.LARGE_HILLS.id; } } - else if (k == Biome.SWAMPLAND.id) + else if (k == Biome.SWAMP.id) { int l = aint[j + 1 + (i + 1 - 1) * (areaWidth + 2)]; int i1 = aint[j + 1 + 1 + (i + 1) * (areaWidth + 2)]; int j1 = aint[j + 1 - 1 + (i + 1) * (areaWidth + 2)]; int k1 = aint[j + 1 + (i + 1 + 1) * (areaWidth + 2)]; - if (l != Biome.DESERT.id && i1 != Biome.DESERT.id && j1 != Biome.DESERT.id && k1 != Biome.DESERT.id && l != Biome.COLDTAIGA.id && i1 != Biome.COLDTAIGA.id && j1 != Biome.COLDTAIGA.id && k1 != Biome.COLDTAIGA.id && l != Biome.ICEPLAINS.id && i1 != Biome.ICEPLAINS.id && j1 != Biome.ICEPLAINS.id && k1 != Biome.ICEPLAINS.id) + if (l != Biome.DESERT.id && i1 != Biome.DESERT.id && j1 != Biome.DESERT.id && k1 != Biome.DESERT.id && l != Biome.ICE_TAIGA.id && i1 != Biome.ICE_TAIGA.id && j1 != Biome.ICE_TAIGA.id && k1 != Biome.ICE_TAIGA.id && l != Biome.ICE.id && i1 != Biome.ICE.id && j1 != Biome.ICE.id && k1 != Biome.ICE.id) { - if (l != Biome.JUNGLE.id && k1 != Biome.JUNGLE.id && i1 != Biome.JUNGLE.id && j1 != Biome.JUNGLE.id) + if (l != Biome.TROPIC.id && k1 != Biome.TROPIC.id && i1 != Biome.TROPIC.id && j1 != Biome.TROPIC.id) { aint1[j + i * areaWidth] = k; } else { - aint1[j + i * areaWidth] = Biome.JUNGLEEDGE.id; + aint1[j + i * areaWidth] = Biome.TROPIC_EDGE.id; } } else { - aint1[j + i * areaWidth] = Biome.PLAINS.id; + aint1[j + i * areaWidth] = Biome.PLAIN.id; } } else diff --git a/server/src/main/java/server/worldgen/layer/GenLayerHills.java b/server/src/main/java/server/worldgen/layer/GenLayerHills.java index c2865aeb..a855773a 100755 --- a/server/src/main/java/server/worldgen/layer/GenLayerHills.java +++ b/server/src/main/java/server/worldgen/layer/GenLayerHills.java @@ -2,6 +2,7 @@ package server.worldgen.layer; import common.biome.Biome; import common.log.Log; +import server.worldgen.biome.GenBiome; public class GenLayerHills extends GenLayer { @@ -61,62 +62,62 @@ public class GenLayerHills extends GenLayer if (k == Biome.DESERT.id) { - i1 = Biome.DESERTHILLS.id; + i1 = Biome.DESERT_HILLS.id; } else if (k == Biome.FOREST.id) { - i1 = Biome.FORESTHILLS.id; + i1 = Biome.FOREST_HILLS.id; } - else if (k == Biome.BIRCHFOREST.id) + else if (k == Biome.BIRCH_FOREST.id) { - i1 = Biome.BIRCHFORESTHILLS.id; + i1 = Biome.BIRCH_HILLS.id; } - else if (k == Biome.ROOFEDFOREST.id) + else if (k == Biome.DARK_FOREST.id) { - i1 = Biome.PLAINS.id; + i1 = Biome.PLAIN.id; } else if (k == Biome.TAIGA.id) { - i1 = Biome.TAIGAHILLS.id; + i1 = Biome.TAIGA_HILLS.id; } - else if (k == Biome.MEGATAIGA.id) + else if (k == Biome.LARGE_TAIGA.id) { - i1 = Biome.MEGATAIGAHILLS.id; + i1 = Biome.LARGE_TAIGA_HILLS.id; } - else if (k == Biome.COLDTAIGA.id) + else if (k == Biome.ICE_TAIGA.id) { - i1 = Biome.COLDTAIGAHILLS.id; + i1 = Biome.ICE_TAIGA_HILLS.id; } - else if (k == Biome.PLAINS.id) + else if (k == Biome.PLAIN.id) { if (this.nextInt(3) == 0) { - i1 = Biome.FORESTHILLS.id; + i1 = Biome.FOREST_HILLS.id; } else { i1 = Biome.FOREST.id; } } - else if (k == Biome.ICEPLAINS.id) + else if (k == Biome.ICE.id) { - i1 = Biome.ICEMOUNTAINS.id; + i1 = Biome.ICE_HILLS.id; } - else if (k == Biome.JUNGLE.id) + else if (k == Biome.TROPIC.id) { - i1 = Biome.JUNGLEHILLS.id; + i1 = Biome.TROPIC_HILLS.id; } else if (k == Biome.NONE.id) { i1 = this.def; } - else if (k == Biome.EXTREMEHILLS.id) + else if (k == Biome.HILLS.id) { - i1 = Biome.EXTREMEHILLSPLUS.id; + i1 = Biome.LARGE_HILLS.id; } else if (k == Biome.SAVANNA.id) { - i1 = Biome.SAVANNAPLATEAU.id; + i1 = Biome.SAVANNA_PLATEAU.id; } // else if (canBeNearby(k, Biome.mesaPlateau_F.id)) // { @@ -128,7 +129,7 @@ public class GenLayerHills extends GenLayer if (j1 == 0) { - i1 = Biome.PLAINS.id; + i1 = Biome.PLAIN.id; } else { @@ -138,9 +139,10 @@ public class GenLayerHills extends GenLayer if (flag && i1 != k) { - if (Biome.getBiome(i1 + 128) != null) + GenBiome gb = GenBiome.getBiome(i1); + if (gb != null && gb.mutated != null) { - i1 += 128; + i1 = gb.mutated.id; } else { diff --git a/server/src/main/java/server/worldgen/layer/GenLayerRiverMix.java b/server/src/main/java/server/worldgen/layer/GenLayerRiverMix.java index 05d47f88..39663dfc 100755 --- a/server/src/main/java/server/worldgen/layer/GenLayerRiverMix.java +++ b/server/src/main/java/server/worldgen/layer/GenLayerRiverMix.java @@ -43,15 +43,15 @@ public class GenLayerRiverMix extends GenLayer { out[i] = this.def; } - else if(biome[i] == Biome.SEA.id || biome[i] == Biome.FROZENSEA.id) + else if(biome[i] == Biome.SEA.id || biome[i] == Biome.ICE_SEA.id) { out[i] = biome[i]; } else if (river[i] == Biome.RIVER.id) { - if (biome[i] == Biome.ICEPLAINS.id) + if (biome[i] == Biome.ICE.id) { - out[i] = Biome.FROZENRIVER.id; + out[i] = Biome.ICE_RIVER.id; } else // if (biome[i] != Biome.mushroomPlains.id && biome[i] != Biome.mushroomPlainsEdge.id) { diff --git a/server/src/main/java/server/worldgen/layer/GenLayerShore.java b/server/src/main/java/server/worldgen/layer/GenLayerShore.java index 715e37ae..889baa72 100755 --- a/server/src/main/java/server/worldgen/layer/GenLayerShore.java +++ b/server/src/main/java/server/worldgen/layer/GenLayerShore.java @@ -1,8 +1,8 @@ package server.worldgen.layer; import common.biome.Biome; -import server.biome.GenBiome; -import server.biome.BiomeJungle; +import server.worldgen.biome.BiomeJungle; +import server.worldgen.biome.GenBiome; public class GenLayerShore extends GenLayer { @@ -62,14 +62,14 @@ public class GenLayerShore extends GenLayer } else { - data[j + i * width] = Biome.JUNGLEEDGE.id; + data[j + i * width] = Biome.TROPIC_EDGE.id; } } - else if (id != Biome.EXTREMEHILLS.id && id != Biome.EXTREMEHILLSPLUS.id && id != Biome.EXTREMEHILLSEDGE.id) + else if (id != Biome.HILLS.id && id != Biome.LARGE_HILLS.id && id != Biome.HILLS_EDGE.id) { if (biome != null && biome.allowColdBeach) { - this.putBeach(pre, data, j, i, width, id, Biome.COLDBEACH.id); + this.putBeach(pre, data, j, i, width, id, Biome.ICE_BEACH.id); } else // if (id != Biome.mesa.id && id != Biome.mesaPlateau_F.id) // { @@ -120,7 +120,7 @@ public class GenLayerShore extends GenLayer } else { - this.putBeach(pre, data, j, i, width, id, Biome.STONEBEACH.id); + this.putBeach(pre, data, j, i, width, id, Biome.STONE_BEACH.id); } } } @@ -155,7 +155,7 @@ public class GenLayerShore extends GenLayer private boolean canNBJungle(int id) { GenBiome biome = GenBiome.getBiome(id); - return biome != null && biome.getBiomeClass() == BiomeJungle.class ? true : id == Biome.JUNGLEEDGE.id || id == Biome.JUNGLE.id || id == Biome.JUNGLEHILLS.id || id == Biome.FOREST.id || id == Biome.TAIGA.id || isSea(id); + return biome != null && biome.getBiomeClass() == BiomeJungle.class ? true : id == Biome.TROPIC_EDGE.id || id == Biome.TROPIC.id || id == Biome.TROPIC_HILLS.id || id == Biome.FOREST.id || id == Biome.TAIGA.id || isSea(id); } // private boolean canNBMesa(int id) diff --git a/server/src/main/java/server/worldgen/structure/MapGenScatteredFeature.java b/server/src/main/java/server/worldgen/structure/MapGenScatteredFeature.java index c0393ae4..34b1d671 100755 --- a/server/src/main/java/server/worldgen/structure/MapGenScatteredFeature.java +++ b/server/src/main/java/server/worldgen/structure/MapGenScatteredFeature.java @@ -10,7 +10,7 @@ import server.world.WorldServer; public class MapGenScatteredFeature extends MapGenStructure { - private static final List biomelist = Arrays.asList(Biome.DESERT, Biome.DESERTHILLS, Biome.JUNGLE, Biome.JUNGLEHILLS, Biome.SWAMPLAND); + private static final List biomelist = Arrays.asList(Biome.DESERT, Biome.DESERT_HILLS, Biome.TROPIC, Biome.TROPIC_HILLS, Biome.SWAMP); private static final int MAX_DISTANCE = 32; private static final int MIN_DISTANCE = 8; @@ -94,14 +94,14 @@ public class MapGenScatteredFeature extends MapGenStructure super(p_i2060_3_, p_i2060_4_); Biome biomegenbase = worldIn.getBiomeGenForCoords(new BlockPos(p_i2060_3_ * 16 + 8, 0, p_i2060_4_ * 16 + 8)); - if (biomegenbase != Biome.JUNGLE && biomegenbase != Biome.JUNGLEHILLS) + if (biomegenbase != Biome.TROPIC && biomegenbase != Biome.TROPIC_HILLS) { - if (biomegenbase == Biome.SWAMPLAND) + if (biomegenbase == Biome.SWAMP) { StructureScattered.SwampHut componentscatteredfeaturepieces$swamphut = new StructureScattered.SwampHut(p_i2060_2_, p_i2060_3_ * 16, p_i2060_4_ * 16); this.components.add(componentscatteredfeaturepieces$swamphut); } - else if (biomegenbase == Biome.DESERT || biomegenbase == Biome.DESERTHILLS) + else if (biomegenbase == Biome.DESERT || biomegenbase == Biome.DESERT_HILLS) { StructureScattered.DesertPyramid componentscatteredfeaturepieces$desertpyramid = new StructureScattered.DesertPyramid(p_i2060_2_, p_i2060_3_ * 16, p_i2060_4_ * 16); this.components.add(componentscatteredfeaturepieces$desertpyramid); diff --git a/server/src/main/java/server/worldgen/structure/MapGenVillage.java b/server/src/main/java/server/worldgen/structure/MapGenVillage.java index fb4a1a6c..67aadb5f 100755 --- a/server/src/main/java/server/worldgen/structure/MapGenVillage.java +++ b/server/src/main/java/server/worldgen/structure/MapGenVillage.java @@ -11,7 +11,7 @@ import server.world.WorldServer; public class MapGenVillage extends MapGenStructure { - public static final Set villageSpawnBiomes = Sets.newHashSet(Biome.PLAINS, Biome.DESERT, Biome.SAVANNA); + public static final Set villageSpawnBiomes = Sets.newHashSet(Biome.PLAIN, Biome.DESERT, Biome.SAVANNA); /** World terrain type, 0 for normal, 1 for flat map */ private int terrainType; diff --git a/server/src/main/java/server/worldgen/structure/StructureVillage.java b/server/src/main/java/server/worldgen/structure/StructureVillage.java index a3d53c88..b602697f 100755 --- a/server/src/main/java/server/worldgen/structure/StructureVillage.java +++ b/server/src/main/java/server/worldgen/structure/StructureVillage.java @@ -1430,7 +1430,7 @@ public class StructureVillage this.structureVillageWeightedPieceList = p_i2104_6_; this.terrainType = p_i2104_7_; Biome biomegenbase = genIn.getBiomeGenerator(new BlockPos(p_i2104_4_, 0, p_i2104_5_), Biome.DEF_BIOME); - this.inDesert = biomegenbase == Biome.DESERT || biomegenbase == Biome.DESERTHILLS; + this.inDesert = biomegenbase == Biome.DESERT || biomegenbase == Biome.DESERT_HILLS; this.func_175846_a(this.inDesert); } diff --git a/server/src/main/java/server/worldgen/tree/WorldGenSwamp.java b/server/src/main/java/server/worldgen/tree/WorldGenSwamp.java index ceaf681b..9e287cda 100755 --- a/server/src/main/java/server/worldgen/tree/WorldGenSwamp.java +++ b/server/src/main/java/server/worldgen/tree/WorldGenSwamp.java @@ -14,9 +14,9 @@ import server.world.WorldServer; public class WorldGenSwamp extends WorldGenTree { - private static final State field_181648_a = Blocks.oak_log.getState(); + private static final State field_181648_a = Blocks.swamp_oak_log.getState(); // .withProperty(BlockOldLog.VARIANT, BlockPlanks.EnumType.OAK); - private static final WoodType field_181649_b = WoodType.OAK; + private static final WoodType field_181649_b = WoodType.SWAMP_OAK; // .withProperty(BlockOldLeaf.VARIANT, BlockPlanks.EnumType.OAK); public WorldGenSwamp() @@ -89,7 +89,7 @@ public class WorldGenSwamp extends WorldGenTree { Block block1 = worldIn.getState(position.down()).getBlock(); - if ((block1 == Blocks.grass || block1 == Blocks.dirt) && position.getY() < 512 - i - 1) + if ((block1 == Blocks.grass || block1 == Blocks.dirt || block1 == Blocks.swamp) && position.getY() < 512 - i - 1) { this.setBaseBlock(worldIn, position.down()); @@ -188,7 +188,7 @@ public class WorldGenSwamp extends WorldGenTree private void func_181647_a(WorldServer p_181647_1_, BlockPos p_181647_2_, PropertyBool p_181647_3_) { - State iblockstate = Blocks.vine.getState().withProperty(p_181647_3_, Boolean.valueOf(true)); + State iblockstate = Blocks.swamp_vine.getState().withProperty(p_181647_3_, Boolean.valueOf(true)); this.setBlockAndNotifyAdequately(p_181647_1_, p_181647_2_, iblockstate); int i = 4; diff --git a/server/src/main/java/server/worldgen/tree/WorldGenTree.java b/server/src/main/java/server/worldgen/tree/WorldGenTree.java index 412f0e63..a28c3995 100755 --- a/server/src/main/java/server/worldgen/tree/WorldGenTree.java +++ b/server/src/main/java/server/worldgen/tree/WorldGenTree.java @@ -4,6 +4,7 @@ import common.block.Block; import common.block.Material; import common.block.foliage.BlockLog; import common.block.foliage.BlockSapling; +import common.block.foliage.BlockVine; import common.init.Blocks; import common.rng.Random; import common.util.BlockPos; @@ -19,7 +20,7 @@ public abstract class WorldGenTree extends FeatureGenerator protected boolean canBeReplaced(Block block) { - return block == Blocks.air || block.getMaterial() == Material.LEAVES || block == Blocks.grass || block == Blocks.dirt || block instanceof BlockLog || block instanceof BlockSapling || block == Blocks.vine; + return block == Blocks.air || block.getMaterial() == Material.LEAVES || block == Blocks.grass || block == Blocks.swamp || block == Blocks.dirt || block instanceof BlockLog || block instanceof BlockSapling || block instanceof BlockVine; } public void prepare()