mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-26 06:52:58 +00:00
moar fixes
This commit is contained in:
1 parent
db6677248a
commit
7d462321b5
21 files changed
+47
-39
No files matched your search
@@ -20,7 +20,7 @@ import tconstruct.client.event.EventCloakRender;
|
||||
import tconstruct.common.*;
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
import tconstruct.library.crafting.*;
|
||||
import tconstruct.library.util.TabTools;
|
||||
import mantle.lib.TabTools;
|
||||
import tconstruct.plugins.PluginController;
|
||||
import tconstruct.util.*;
|
||||
import tconstruct.util.config.*;
|
||||
|
||||
@@ -669,7 +669,7 @@ public class GlassPaneConnected extends GlassBlockConnected
|
||||
|
||||
public final boolean canThisPaneConnectToThisBlock (Block b)
|
||||
{
|
||||
return Block.opaqueCubeLookup[b] || b == (Block) this || b == Blocks.glass;
|
||||
return b.func_149662_c() || b == (Block) this || b == Blocks.glass;
|
||||
}
|
||||
|
||||
public void func_149651_a (IIconRegister par1IconRegister)
|
||||
|
||||
@@ -20,9 +20,10 @@ public class GravelOre extends BlockSand
|
||||
|
||||
public GravelOre()
|
||||
{
|
||||
super(Material.craftedSnow);
|
||||
super();
|
||||
this.func_149647_a(TConstructRegistry.blockTab);
|
||||
this.setStepSound(soundGravelFootstep);
|
||||
this.field_149764_J = Material.field_151596_z;
|
||||
}
|
||||
|
||||
public void registerIcons (IIconRegister iconRegister)
|
||||
|
||||
@@ -107,7 +107,9 @@ public class LavaTankLogic extends MultiServantLogic implements IFluidHandler
|
||||
int id = tank.getFluid().fluidID;
|
||||
if (id < 4096)
|
||||
{
|
||||
return Block.lightValue[id];
|
||||
//TODO check this!!
|
||||
Block block = Block.func_149729_e(id);
|
||||
return block.func_149750_m();
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
@@ -32,7 +32,7 @@ public class RenderLiquid
|
||||
var8 = var11;
|
||||
}
|
||||
|
||||
return (Minecraft.isAmbientOcclusionEnabled()) && (block.lightValue == 0) ? renderMetadataBlockWithAmbientOcclusion(block, metadata, x, y, z, var6, var7, var8, renderer, world)
|
||||
return (Minecraft.isAmbientOcclusionEnabled()) && (block.func_149750_m() == 0) ? renderMetadataBlockWithAmbientOcclusion(block, metadata, x, y, z, var6, var7, var8, renderer, world)
|
||||
: renderMetadataBlockWithColorMultiplier(block, metadata, x, y, z, var6, var7, var8, renderer, world);
|
||||
}
|
||||
|
||||
|
||||
@@ -634,7 +634,7 @@ public class TContent implements IFuelHandler
|
||||
Items.minecartEmpty.setMaxStackSize(3);
|
||||
Items.minecartCrate.setMaxStackSize(3);
|
||||
Items.minecartPowered.setMaxStackSize(3);
|
||||
Items.itemsList[Block.cake.blockID].setMaxStackSize(16);
|
||||
Items.cake.setMaxStackSize(16);
|
||||
//Block.torchWood.setTickRandomly(false);
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ public class Battleaxe extends HarvestTool
|
||||
return AbilityHelper.onBlockChanged(itemstack, world, b, x, y, z, player, random);
|
||||
}
|
||||
|
||||
static Material[] materials = { Material.field_151575_d, Material.field_151582_l, Material.field_151594_q, Material.cactus, Material.pumpkin };
|
||||
static Material[] materials = { Material.field_151575_d, Material.field_151582_l, Material.field_151594_q, Material.field_151570_A, Material.pumpkin };
|
||||
|
||||
@Override
|
||||
public Item getHeadItem ()
|
||||
|
||||
@@ -38,7 +38,7 @@ public class Excavator extends HarvestTool
|
||||
return "shovel";
|
||||
}
|
||||
|
||||
static Material[] materials = { Material.field_151577_b, Material.field_151578_c, Material.field_151595_p, Material.snow, Material.crafedSnow, Material.clay };
|
||||
static Material[] materials = { Material.field_151577_b, Material.field_151578_c, Material.field_151595_p, Material.field_151597_y, Material.field_151596_z, Material.field_151571_B };
|
||||
|
||||
@Override
|
||||
public Item getHeadItem ()
|
||||
|
||||
@@ -42,7 +42,7 @@ public class Hatchet extends HarvestTool
|
||||
return AbilityHelper.onBlockChanged(itemstack, world, block, x, y, z, player, random);
|
||||
}
|
||||
|
||||
static Material[] materials = { Material.field_151575_d, Material.field_151584_j, Material.field_151582_l, Material.field_151594_q, Material.cactus, Material.pumpkin };
|
||||
static Material[] materials = { Material.field_151575_d, Material.field_151584_j, Material.field_151582_l, Material.field_151594_q, Material.field_151570_A, Material.pumpkin };
|
||||
|
||||
@Override
|
||||
public Item getHeadItem ()
|
||||
|
||||
@@ -63,7 +63,7 @@ public class LumberAxe extends HarvestTool
|
||||
return AbilityHelper.onBlockChanged(itemstack, world, block, x, y, z, player, random);
|
||||
}
|
||||
|
||||
static Material[] materials = { Material.field_151575_d, Material.field_151582_l, Material.field_151594_q, Material.cactus, Material.pumpkin };
|
||||
static Material[] materials = { Material.field_151575_d, Material.field_151582_l, Material.field_151594_q, Material.field_151570_A, Material.pumpkin };
|
||||
|
||||
/* Lumber axe specific */
|
||||
|
||||
|
||||
@@ -47,8 +47,8 @@ public class Mattock extends DualHarvestTool
|
||||
return "shovel";
|
||||
}
|
||||
|
||||
static Material[] axeMaterials = { Material.field_151575_d, Material.cactus, Material.pumpkin, Material.plants, Material.field_151582_l };
|
||||
static Material[] shovelMaterials = { Material.field_151577_b, Material.field_151578_c, Material.clay };
|
||||
static Material[] axeMaterials = { Material.field_151575_d, Material.field_151570_A, Material.pumpkin, Material.plants, Material.field_151582_l };
|
||||
static Material[] shovelMaterials = { Material.field_151577_b, Material.field_151578_c, Material.field_151571_B };
|
||||
|
||||
@Override
|
||||
public Item getHeadItem ()
|
||||
|
||||
@@ -40,7 +40,7 @@ public class Scythe extends Weapon
|
||||
return materials;
|
||||
}
|
||||
|
||||
static Material[] materials = new Material[] { Material.web, Material.cactus, Material.pumpkin, Material.plants, Material.field_151582_l, Material.field_151584_j };
|
||||
static Material[] materials = new Material[] { Material.web, Material.field_151570_A, Material.pumpkin, Material.plants, Material.field_151582_l, Material.field_151584_j };
|
||||
|
||||
@Override
|
||||
public Item getHeadItem ()
|
||||
|
||||
@@ -27,7 +27,7 @@ public class Shovel extends HarvestTool
|
||||
return "shovel";
|
||||
}
|
||||
|
||||
static Material[] materials = { Material.field_151577_b, Material.field_151578_c, Material.field_151595_p, Material.snow, Material.craftedSnow, Material.clay };
|
||||
static Material[] materials = { Material.field_151577_b, Material.field_151578_c, Material.field_151595_p, Material.field_151597_y, Material.field_151596_z, Material.field_151571_B };
|
||||
|
||||
@Override
|
||||
public Item getHeadItem ()
|
||||
|
||||
@@ -222,7 +222,7 @@ public class MiningExplosion extends Explosion
|
||||
l = this.world.func_147439_a(i, j, k);
|
||||
Block i1 = this.world.func_147439_a(i, j - 1, k);
|
||||
|
||||
if (l == Blocks.air && Block.opaqueCubeLookup[i1] && this.random.nextInt(3) == 0)
|
||||
if (l == Blocks.air && i1.func_149662_c() && this.random.nextInt(3) == 0)
|
||||
{
|
||||
this.world.func_147449_b(i, j, k, Blocks.fire);
|
||||
}
|
||||
|
||||
@@ -12,15 +12,15 @@ public class OreberryBushGen extends WorldGenerator
|
||||
private Block blockB;
|
||||
private int metadata;
|
||||
int chance;
|
||||
private int[] replaceBlocks;
|
||||
private Block[] replaceBlocks;
|
||||
|
||||
public OreberryBushGen(Block block, int meta, int chance)
|
||||
{
|
||||
this(meta, chance, Blocks.stone, Blocks.grass, Blocks.dirt, Blocks.water, Blocks.sand, Blocks.gravel, Blocks.snow);
|
||||
this(block, meta, chance, Blocks.stone, (Block) Blocks.grass, Blocks.dirt, Blocks.water, Blocks.sand, Blocks.gravel, Blocks.snow);
|
||||
blockB = block;
|
||||
}
|
||||
|
||||
public OreberryBushGen(Block block, int meta, int chance, int... target)
|
||||
public OreberryBushGen(Block block, int meta, int chance, Block... target)
|
||||
{
|
||||
blockB = block;
|
||||
metadata = meta;
|
||||
@@ -88,13 +88,13 @@ public class OreberryBushGen extends WorldGenerator
|
||||
|
||||
void generateBerryBlock (World world, int x, int y, int z, Random random)
|
||||
{
|
||||
/*if (!Block.opaqueCubeLookup[world.getBlockId(x, y, z)])
|
||||
/*if (!Block.opaqueCubeLookup[world.func_147439_aId(x, y, z)])
|
||||
{
|
||||
setBlockAndMetadata(world, x, y, z, blockID, metadata);
|
||||
}*/
|
||||
|
||||
Block block = world.getBlock(x, y, z);
|
||||
if (block == null || (block != Blocks.end_portal_frame && !Block.opaqueCubeLookup[world.getBlock(x, y, z)]))
|
||||
Block block = world.func_147439_a(x, y, z);
|
||||
if (block == null || (block != Blocks.end_portal_frame && !world.func_147439_a(x, y, z).isGenMineableReplaceable))
|
||||
world.func_147465_d(x, y, z, this.blockB, metadata, 2);
|
||||
else
|
||||
{
|
||||
|
||||
@@ -90,7 +90,7 @@ public class SlimeTreeGen extends WorldGenerator
|
||||
do
|
||||
{
|
||||
Block heightBL = world.func_147439_a(x, height, z);
|
||||
if ((heightBL == TRepo.craftedSoil || heightBL == TRepo.slimeGrass) && !Block.opaqueCubeLookup[world.func_147439_a(x, height + 1, z)])
|
||||
if ((heightBL == TRepo.craftedSoil || heightBL == TRepo.slimeGrass) && !world.func_147439_a(x, height + 1, z).func_149662_c())
|
||||
{
|
||||
ret = height + 1;
|
||||
break;
|
||||
|
||||
@@ -38,7 +38,7 @@ public class SurfaceOreGen extends WorldGenerator
|
||||
{
|
||||
int returnHeight = -1;
|
||||
Block block = world.func_147439_a(x, y - 1, z);
|
||||
if (!Block.opaqueCubeLookup[world.func_147439_a(x, y, z)] && (block == Blocks.dirt || block == Blocks.grass))
|
||||
if (!world.func_147439_a(x, y, z).func_149662_c() && (block == Blocks.dirt || block == Blocks.grass))
|
||||
{
|
||||
return y;
|
||||
}
|
||||
@@ -52,7 +52,7 @@ public class SurfaceOreGen extends WorldGenerator
|
||||
Block b = world.func_147439_a(x, height, z);
|
||||
if (b == Blocks.dirt || b == Blocks.grass)
|
||||
{
|
||||
if (!Block.opaqueCubeLookup[world.func_147439_a(x, height + 1, z)])
|
||||
if (!world.func_147439_a(x, height + 1, z).func_149662_c())
|
||||
{
|
||||
returnHeight = height + 1;
|
||||
}
|
||||
@@ -117,7 +117,7 @@ public class SurfaceOreGen extends WorldGenerator
|
||||
Block block = world.func_147439_a(k2, l2, i3);
|
||||
if (d12 * d12 + d13 * d13 + d14 * d14 < 1.0D)
|
||||
{
|
||||
if (block == null || !Block.opaqueCubeLookup[world.func_147439_a(k2, l2, i3)])
|
||||
if (block == null || !world.func_147439_a(k2, l2, i3).func_149662_c())
|
||||
world.func_147465_d(k2, l2, i3, this.minableBlock, minableBlockMeta, 2);
|
||||
else
|
||||
{
|
||||
|
||||
@@ -29,7 +29,7 @@ public class ComponentSmeltery extends MapGenVillage
|
||||
this.boundingBox = par4StructureBoundingBox;
|
||||
}
|
||||
|
||||
public static ComponentSmeltery buildComponent (ComponentVillageStartPiece villagePiece, List pieces, Random random, int p1, int p2, int p3, int p4, int p5)
|
||||
public static ComponentSmeltery buildComponent (Start villagePiece, List pieces, Random random, int p1, int p2, int p3, int p4, int p5)
|
||||
{
|
||||
StructureBoundingBox structureboundingbox = StructureBoundingBox.getComponentToAddBoundingBox(p1, p2, p3, 0, 0, 0, 9, 3, 7, p4);
|
||||
return canVillageGoDeeper(structureboundingbox) && StructureComponent.findIntersecting(pieces, structureboundingbox) == null ? new ComponentSmeltery(villagePiece, p5, random,
|
||||
|
||||
@@ -10,11 +10,13 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.WeightedRandomChestContent;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.gen.structure.MapGenStructureIO;
|
||||
import net.minecraft.world.gen.structure.MapGenVillage;
|
||||
import net.minecraft.world.gen.structure.StructureBoundingBox;
|
||||
import net.minecraft.world.gen.structure.StructureComponent;
|
||||
import net.minecraft.world.gen.structure.StructureVillagePieces;
|
||||
import net.minecraft.world.gen.structure.StructureVillagePieces.Start;
|
||||
import net.minecraft.world.gen.structure.MapGenStructureIO;
|
||||
|
||||
|
||||
public class ComponentToolWorkshop extends MapGenVillage
|
||||
{
|
||||
@@ -31,7 +33,7 @@ public class ComponentToolWorkshop extends MapGenVillage
|
||||
this.boundingBox = par4StructureBoundingBox;
|
||||
}
|
||||
|
||||
public static ComponentToolWorkshop buildComponent (ComponentVillageStartPiece villagePiece, List pieces, Random random, int p1, int p2, int p3, int p4, int p5)
|
||||
public static ComponentToolWorkshop buildComponent (Start villagePiece, List pieces, Random random, int p1, int p2, int p3, int p4, int p5)
|
||||
{
|
||||
StructureBoundingBox structureboundingbox = StructureBoundingBox.getComponentToAddBoundingBox(p1, p2, p3, 0, 0, 0, 7, 6, 7, p4);
|
||||
return canVillageGoDeeper(structureboundingbox) && StructureComponent.findIntersecting(pieces, structureboundingbox) == null ? new ComponentToolWorkshop(villagePiece, p5, random,
|
||||
|
||||
@@ -3,17 +3,17 @@ package tconstruct.worldgen.village;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.world.gen.structure.ComponentVillageStartPiece;
|
||||
import net.minecraft.world.gen.structure.MapGenStructureIO;
|
||||
import net.minecraft.world.gen.structure.StructureVillagePieceWeight;
|
||||
import net.minecraft.world.gen.structure.StructureVillagePieces.PieceWeight;
|
||||
import net.minecraft.world.gen.structure.StructureVillagePieces.Start;
|
||||
import cpw.mods.fml.common.registry.VillagerRegistry.IVillageCreationHandler;
|
||||
|
||||
public class VillageSmelteryHandler implements IVillageCreationHandler
|
||||
{
|
||||
@Override
|
||||
public StructureVillagePieceWeight getVillagePieceWeight (Random random, int i)
|
||||
public PieceWeight getVillagePieceWeight (Random random, int i)
|
||||
{
|
||||
return new StructureVillagePieceWeight(ComponentSmeltery.class, 9, i + random.nextInt(10) == 0 ? 1 : 0);
|
||||
return new PieceWeight(ComponentSmeltery.class, 9, i + random.nextInt(10) == 0 ? 1 : 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -22,8 +22,9 @@ public class VillageSmelteryHandler implements IVillageCreationHandler
|
||||
return ComponentSmeltery.class;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Object buildComponent (StructureVillagePieceWeight villagePiece, ComponentVillageStartPiece startPiece, List pieces, Random random, int p1, int p2, int p3, int p4, int p5)
|
||||
public Object buildComponent (PieceWeight villagePiece, Start startPiece, List pieces, Random random, int p1, int p2, int p3, int p4, int p5)
|
||||
{
|
||||
return ComponentSmeltery.buildComponent(startPiece, pieces, random, p1, p2, p3, p4, p5);
|
||||
}
|
||||
|
||||
@@ -3,18 +3,19 @@ package tconstruct.worldgen.village;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.world.gen.structure.ComponentVillageHouse1;
|
||||
import net.minecraft.world.gen.structure.ComponentVillageStartPiece;
|
||||
import net.minecraft.world.gen.structure.StructureVillagePieces.House1;
|
||||
import net.minecraft.world.gen.structure.StructureStart;
|
||||
import net.minecraft.world.gen.structure.MapGenStructureIO;
|
||||
import net.minecraft.world.gen.structure.StructureVillagePieceWeight;
|
||||
import net.minecraft.world.gen.structure.StructureVillagePieces.PieceWeight;
|
||||
import net.minecraft.world.gen.structure.StructureVillagePieces.Start;
|
||||
import cpw.mods.fml.common.registry.VillagerRegistry.IVillageCreationHandler;
|
||||
|
||||
public class VillageToolStationHandler implements IVillageCreationHandler
|
||||
{
|
||||
@Override
|
||||
public StructureVillagePieceWeight getVillagePieceWeight (Random random, int i)
|
||||
public PieceWeight getVillagePieceWeight (Random random, int i)
|
||||
{
|
||||
return new StructureVillagePieceWeight(ComponentToolWorkshop.class, 30, i + random.nextInt(4));
|
||||
return new PieceWeight(ComponentToolWorkshop.class, 30, i + random.nextInt(4));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -23,8 +24,9 @@ public class VillageToolStationHandler implements IVillageCreationHandler
|
||||
return ComponentToolWorkshop.class;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Object buildComponent (StructureVillagePieceWeight villagePiece, ComponentVillageStartPiece startPiece, List pieces, Random random, int p1, int p2, int p3, int p4, int p5)
|
||||
public Object buildComponent (PieceWeight villagePiece, Start startPiece, List pieces, Random random, int p1, int p2, int p3, int p4, int p5)
|
||||
{
|
||||
return ComponentToolWorkshop.buildComponent(startPiece, pieces, random, p1, p2, p3, p4, p5);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user