Update mappoings snapshot to 20160518

This commit is contained in:
LexManos 2016-05-18 05:11:56 -07:00
parent b9ac73b0f1
commit cdc86e9af6
60 changed files with 514 additions and 810 deletions

View File

@ -27,8 +27,7 @@ apply plugin: "net.minecraftforge.gradle.launch4j"
minecraft {
version = "1.9.4"
mappings = 'snapshot_nodoc_20160312'
//mappings = "snapshot_nodoc_20151122"
mappings = 'snapshot_nodoc_20160518'
workspaceDir = "projects"
versionJson = "jsons/1.9.4-dev.json"
buildUserdev = true
@ -377,6 +376,7 @@ task setupForge { dependsOn 'setup' }
task buildPackages { dependsOn 'build' }
//Temporary hack to fix compile errors caused by mappings shading in Bootstrap
/*
task fixParams << {
logger.lifecycle('Fixing param names!')
def params = new File(extractMcpMappings.destinationDir, 'params.csv')
@ -386,3 +386,4 @@ task fixParams << {
}
fixParams.dependsOn('extractMcpMappings')
extractMcpMappings.finalizedBy('fixParams')
*/

View File

@ -9,7 +9,7 @@ buildscript {
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT'
}
}
apply plugin: 'net.minecraftforge.gradle.forge'

View File

@ -162,3 +162,10 @@
this.func_175552_ct();
return p_180482_2_;
}
@@ -1030,4 +1077,6 @@
return ((Integer)this.func_76341_a()).intValue() >= ((Integer)this.func_76340_b()).intValue() ? ((Integer)this.func_76341_a()).intValue() : ((Integer)this.func_76341_a()).intValue() + p_179412_1_.nextInt(((Integer)this.func_76340_b()).intValue() - ((Integer)this.func_76341_a()).intValue() + 1);
}
}
+ //MODDERS DO NOT USE OR EDIT THIS IN ANY WAY IT WILL HAVE NO EFFECT, THIS IS JUST IN HERE TO ALLOW FORGE TO ACCESS IT
+ public static ITradeList[][][][] GET_TRADES_DONT_USE(){ return field_175561_bA; }
}

View File

@ -8,4 +8,4 @@
+ if (p_180614_6_ == EnumFacing.UP && iblockstate.func_177230_c() instanceof BlockFence) //Forge: Fix Vanilla bug comparing state instead of block
{
d0 = 0.5D;
}
}

View File

@ -585,7 +585,7 @@
{
j = 1;
}
@@ -2692,7 +2867,7 @@
@@ -2691,7 +2866,7 @@
int j4 = j2 + enumfacing.func_96559_d();
int k4 = k2 + enumfacing.func_82599_e();
blockpos$pooledmutableblockpos.func_185343_d(i4, j4, k4);

View File

@ -99,7 +99,7 @@ public class ClientCommandHandler extends CommandHandler
private TextComponentTranslation format(TextFormatting color, String str, Object... args)
{
TextComponentTranslation ret = new TextComponentTranslation(str, args);
ret.getChatStyle().setColor(color);
ret.getStyle().setColor(color);
return ret;
}

View File

@ -113,7 +113,7 @@ public class GuiIngameForge extends GuiIngame
if (renderHelmet) renderHelmet(res, partialTicks);
if (renderPortal && !mc.thePlayer.isPotionActive(MobEffects.confusion))
if (renderPortal && !mc.thePlayer.isPotionActive(MobEffects.NAUSEA))
{
renderPortal(res, partialTicks);
}
@ -193,7 +193,7 @@ public class GuiIngameForge extends GuiIngame
protected void renderCrosshairs(float partialTicks)
{
if (pre(CROSSHAIRS)) return;
bind(Gui.icons);
bind(Gui.ICONS);
GlStateManager.enableBlend();
super.renderAttackIndicator(partialTicks, res);
post(CROSSHAIRS);
@ -217,7 +217,7 @@ public class GuiIngameForge extends GuiIngame
protected void renderBossHealth()
{
if (pre(BOSSHEALTH)) return;
bind(Gui.icons);
bind(Gui.ICONS);
GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
mc.mcProfiler.startSection("bossHealth");
GlStateManager.enableBlend();
@ -235,7 +235,7 @@ public class GuiIngameForge extends GuiIngame
if (this.mc.gameSettings.thirdPersonView == 0 && itemstack != null && itemstack.getItem() != null)
{
if (itemstack.getItem() == Item.getItemFromBlock(Blocks.pumpkin))
if (itemstack.getItem() == Item.getItemFromBlock(Blocks.PUMPKIN))
{
renderPumpkinOverlay(res);
}
@ -321,7 +321,7 @@ public class GuiIngameForge extends GuiIngame
int left = width / 2 + 91;
int top = height - right_height;
if (player.isInsideOfMaterial(Material.water))
if (player.isInsideOfMaterial(Material.WATER))
{
int air = player.getAir();
int full = MathHelper.ceiling_double_int((double)(air - 2) * 10.0D / 300.0D);
@ -341,7 +341,7 @@ public class GuiIngameForge extends GuiIngame
public void renderHealth(int width, int height)
{
bind(icons);
bind(ICONS);
if (pre(HEALTH)) return;
mc.mcProfiler.startSection("health");
GlStateManager.enableBlend();
@ -386,7 +386,7 @@ public class GuiIngameForge extends GuiIngame
if (rowHeight != 10) left_height += 10 - rowHeight;
int regen = -1;
if (player.isPotionActive(MobEffects.regeneration))
if (player.isPotionActive(MobEffects.REGENERATION))
{
regen = updateCounter % 25;
}
@ -394,8 +394,8 @@ public class GuiIngameForge extends GuiIngame
final int TOP = 9 * (mc.theWorld.getWorldInfo().isHardcoreModeEnabled() ? 5 : 0);
final int BACKGROUND = (highlight ? 25 : 16);
int MARGIN = 16;
if (player.isPotionActive(MobEffects.poison)) MARGIN += 36;
else if (player.isPotionActive(MobEffects.wither)) MARGIN += 72;
if (player.isPotionActive(MobEffects.POISON)) MARGIN += 36;
else if (player.isPotionActive(MobEffects.WITHER)) MARGIN += 72;
float absorbRemaining = absorb;
for (int i = MathHelper.ceiling_float_int((healthMax + absorb) / 2.0F) - 1; i >= 0; --i)
@ -469,7 +469,7 @@ public class GuiIngameForge extends GuiIngame
int icon = 16;
byte background = 0;
if (mc.thePlayer.isPotionActive(MobEffects.hunger))
if (mc.thePlayer.isPotionActive(MobEffects.HUNGER))
{
icon += 36;
background = 13;
@ -526,7 +526,7 @@ public class GuiIngameForge extends GuiIngame
protected void renderExperience(int width, int height)
{
bind(icons);
bind(ICONS);
if (pre(EXPERIENCE)) return;
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
GlStateManager.disableBlend();
@ -577,7 +577,7 @@ public class GuiIngameForge extends GuiIngame
protected void renderJumpBar(int width, int height)
{
bind(icons);
bind(ICONS);
if (pre(JUMPBAR)) return;
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GlStateManager.disableBlend();
@ -792,7 +792,7 @@ public class GuiIngameForge extends GuiIngame
protected void renderPlayerList(int width, int height)
{
ScoreObjective scoreobjective = this.mc.theWorld.getScoreboard().getObjectiveInDisplaySlot(0);
NetHandlerPlayClient handler = mc.thePlayer.sendQueue;
NetHandlerPlayClient handler = mc.thePlayer.connection;
if (mc.gameSettings.keyBindPlayerList.isKeyDown() && (!mc.isIntegratedServerRunning() || handler.getPlayerInfoMap().size() > 1 || scoreobjective != null))
{
@ -813,7 +813,7 @@ public class GuiIngameForge extends GuiIngame
Entity tmp = player.getRidingEntity();
if (!(tmp instanceof EntityLivingBase)) return;
bind(icons);
bind(ICONS);
if (pre(HEALTHMOUNT)) return;

View File

@ -182,7 +182,7 @@ public final class ModelLoader extends ModelBakery
@Override
protected void loadBlocks()
{
List<Block> blocks = Lists.newArrayList(Iterables.filter(Block.blockRegistry, new Predicate<Block>()
List<Block> blocks = Lists.newArrayList(Iterables.filter(Block.REGISTRY, new Predicate<Block>()
{
public boolean apply(Block block)
{
@ -266,7 +266,7 @@ public final class ModelLoader extends ModelBakery
registerVariantNames();
List<Item> items = Lists.newArrayList(Iterables.filter(Item.itemRegistry, new Predicate<Item>()
List<Item> items = Lists.newArrayList(Iterables.filter(Item.REGISTRY, new Predicate<Item>()
{
public boolean apply(Item item)
{
@ -336,7 +336,7 @@ public final class ModelLoader extends ModelBakery
}
// empty bucket
for(String s : getVariantNames(Items.bucket))
for(String s : getVariantNames(Items.BUCKET))
{
ModelResourceLocation memory = getInventoryVariant(s);
IModel model = ModelLoaderRegistry.getModelOrMissing(new ResourceLocation("forge", "item/bucket"));
@ -347,23 +347,23 @@ public final class ModelLoader extends ModelBakery
}
}
setBucketModel(Items.water_bucket);
setBucketModel(Items.lava_bucket);
setBucketModel(Items.WATER_BUCKET);
setBucketModel(Items.LAVA_BUCKET);
// milk bucket only replaced if some mod adds milk
if(FluidRegistry.isFluidRegistered("milk"))
{
// can the milk be put into a bucket?
Fluid milk = FluidRegistry.getFluid("milk");
FluidStack milkStack = new FluidStack(milk, FluidContainerRegistry.BUCKET_VOLUME);
if(FluidContainerRegistry.getContainerCapacity(milkStack, new ItemStack(Items.bucket)) == FluidContainerRegistry.BUCKET_VOLUME)
if(FluidContainerRegistry.getContainerCapacity(milkStack, new ItemStack(Items.BUCKET)) == FluidContainerRegistry.BUCKET_VOLUME)
{
setBucketModel(Items.milk_bucket);
setBucketModel(Items.MILK_BUCKET);
}
}
else
{
// milk bucket if no milk fluid is present
for(String s : getVariantNames(Items.milk_bucket))
for(String s : getVariantNames(Items.MILK_BUCKET))
{
ModelResourceLocation memory = getInventoryVariant(s);
IModel model = ModelLoaderRegistry.getModelOrMissing(new ResourceLocation("forge", "item/bucket_milk"));

View File

@ -70,7 +70,7 @@ public class AnimationModelBase<T extends Entity> extends ModelBase implements I
lighter.setParent(new VertexBufferConsumer(VertexBuffer));
lighter.setWorld(entity.worldObj);
lighter.setState(Blocks.air.getDefaultState());
lighter.setState(Blocks.AIR.getDefaultState());
lighter.setBlockPos(pos);
boolean empty = true;
List<BakedQuad> quads = bakedModel.getQuads(null, null, 0);

View File

@ -19,7 +19,7 @@ public abstract class FastTESR<T extends TileEntity> extends TileEntitySpecialRe
{
Tessellator tessellator = Tessellator.getInstance();
VertexBuffer VertexBuffer = tessellator.getBuffer();
this.bindTexture(TextureMap.locationBlocksTexture);
this.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
RenderHelper.disableStandardItemLighting();
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GlStateManager.enableBlend();

View File

@ -11,7 +11,7 @@ public enum KeyModifier {
@Override
public boolean matches(int keyCode)
{
if (Minecraft.isRunningOnMac)
if (Minecraft.IS_RUNNING_ON_MAC)
{
return keyCode == Keyboard.KEY_LMETA || keyCode == Keyboard.KEY_RMETA;
}
@ -31,7 +31,7 @@ public enum KeyModifier {
public String getLocalizedComboName(int keyCode)
{
String keyName = GameSettings.getKeyDisplayString(keyCode);
String localizationFormatKey = Minecraft.isRunningOnMac ? "forge.controlsgui.control.mac" : "forge.controlsgui.control";
String localizationFormatKey = Minecraft.IS_RUNNING_ON_MAC ? "forge.controlsgui.control.mac" : "forge.controlsgui.control";
return I18n.format(localizationFormatKey, keyName);
}
},

View File

@ -147,7 +147,7 @@ public class BiomeDictionary
{
types = listSubTags(types);
if(Biome.biomeRegistry.getNameForObject(biome) != null)
if(Biome.REGISTRY.getNameForObject(biome) != null)
{
for(Type type : types)
{
@ -161,7 +161,7 @@ public class BiomeDictionary
if(!isBiomeRegistered(biome))
{
ResourceLocation location = Biome.biomeRegistry.getNameForObject(biome);
ResourceLocation location = Biome.REGISTRY.getNameForObject(biome);
biomeInfoMap.put(location, new BiomeInfo(types));
}
else
@ -249,7 +249,7 @@ public class BiomeDictionary
*/
public static boolean isBiomeRegistered(Biome biome)
{
return biomeInfoMap.containsKey(Biome.biomeRegistry.getNameForObject(biome));
return biomeInfoMap.containsKey(Biome.REGISTRY.getNameForObject(biome));
}
public static void registerAllBiomes()
@ -265,9 +265,9 @@ public class BiomeDictionary
*/
public static void registerAllBiomesAndGenerateEvents()
{
for (ResourceLocation biomeResource : Biome.biomeRegistry.getKeys())
for (ResourceLocation biomeResource : Biome.REGISTRY.getKeys())
{
Biome biome = Biome.biomeRegistry.getObject(biomeResource);
Biome biome = Biome.REGISTRY.getObject(biomeResource);
if (biome.theBiomeDecorator instanceof DeferredBiomeDecorator)
{
@ -373,20 +373,20 @@ public class BiomeDictionary
BiomeDictionary.registerBiomeType(biome, SNOWY);
}
if (biome.topBlock != Blocks.sand && biome.getTemperature() >= 1.0f && biome.getRainfall() < 0.2f)
if (biome.topBlock != Blocks.SAND && biome.getTemperature() >= 1.0f && biome.getRainfall() < 0.2f)
{
BiomeDictionary.registerBiomeType(biome, SAVANNA);
}
if (biome.topBlock == Blocks.sand )
if (biome.topBlock == Blocks.SAND)
{
BiomeDictionary.registerBiomeType(biome, SANDY);
}
else if (biome.topBlock == Blocks.mycelium)
else if (biome.topBlock == Blocks.MYCELIUM)
{
BiomeDictionary.registerBiomeType(biome, MUSHROOM);
}
if (biome.fillerBlock == Blocks.hardened_clay)
if (biome.fillerBlock == Blocks.HARDENED_CLAY)
{
BiomeDictionary.registerBiomeType(biome, MESA);
}
@ -395,7 +395,7 @@ public class BiomeDictionary
//Internal implementation
private static BiomeInfo getBiomeInfo(Biome biome)
{
return biomeInfoMap.get(Biome.biomeRegistry.getNameForObject(biome));
return biomeInfoMap.get(Biome.REGISTRY.getNameForObject(biome));
}
private static void checkRegistration(Biome biome)
@ -436,45 +436,45 @@ public class BiomeDictionary
private static void registerVanillaBiomes()
{
registerBiomeType(Biomes.ocean, OCEAN );
registerBiomeType(Biomes.plains, PLAINS );
registerBiomeType(Biomes.desert, HOT, DRY, SANDY );
registerBiomeType(Biomes.extremeHills, MOUNTAIN, HILLS );
registerBiomeType(Biomes.forest, FOREST );
registerBiomeType(Biomes.taiga, COLD, CONIFEROUS, FOREST );
registerBiomeType(Biomes.taigaHills, COLD, CONIFEROUS, FOREST, HILLS );
registerBiomeType(Biomes.swampland, WET, SWAMP );
registerBiomeType(Biomes.river, RIVER );
registerBiomeType(Biomes.frozenOcean, COLD, OCEAN, SNOWY );
registerBiomeType(Biomes.frozenRiver, COLD, RIVER, SNOWY );
registerBiomeType(Biomes.icePlains, COLD, SNOWY, WASTELAND );
registerBiomeType(Biomes.iceMountains, COLD, SNOWY, MOUNTAIN );
registerBiomeType(Biomes.beach, BEACH );
registerBiomeType(Biomes.desertHills, HOT, DRY, SANDY, HILLS );
registerBiomeType(Biomes.jungle, HOT, WET, DENSE, JUNGLE );
registerBiomeType(Biomes.jungleHills, HOT, WET, DENSE, JUNGLE, HILLS);
registerBiomeType(Biomes.forestHills, FOREST, HILLS );
registerBiomeType(Biomes.sky, COLD, DRY, END );
registerBiomeType(Biomes.hell, HOT, DRY, NETHER );
registerBiomeType(Biomes.mushroomIsland, MUSHROOM );
registerBiomeType(Biomes.extremeHillsEdge, MOUNTAIN );
registerBiomeType(Biomes.mushroomIslandShore, MUSHROOM, BEACH );
registerBiomeType(Biomes.jungleEdge, HOT, WET, JUNGLE, FOREST );
registerBiomeType(Biomes.deepOcean, OCEAN );
registerBiomeType(Biomes.stoneBeach, BEACH );
registerBiomeType(Biomes.coldBeach, COLD, BEACH, SNOWY );
registerBiomeType(Biomes.birchForest, FOREST );
registerBiomeType(Biomes.birchForestHills, FOREST, HILLS );
registerBiomeType(Biomes.roofedForest, SPOOKY, DENSE, FOREST );
registerBiomeType(Biomes.coldTaiga, COLD, CONIFEROUS, FOREST, SNOWY );
registerBiomeType(Biomes.coldTaigaHills, COLD, CONIFEROUS, FOREST, SNOWY, HILLS);
registerBiomeType(Biomes.megaTaiga, COLD, CONIFEROUS, FOREST );
registerBiomeType(Biomes.megaTaigaHills, COLD, CONIFEROUS, FOREST, HILLS );
registerBiomeType(Biomes.extremeHillsPlus, MOUNTAIN, FOREST, SPARSE );
registerBiomeType(Biomes.savanna, HOT, SAVANNA, PLAINS, SPARSE );
registerBiomeType(Biomes.savannaPlateau, HOT, SAVANNA, PLAINS, SPARSE );
registerBiomeType(Biomes.mesa, MESA, SANDY );
registerBiomeType(Biomes.mesaPlateau_F, MESA, SPARSE, SANDY );
registerBiomeType(Biomes.mesaPlateau, MESA, SANDY );
registerBiomeType(Biomes.OCEAN, OCEAN );
registerBiomeType(Biomes.PLAINS, PLAINS );
registerBiomeType(Biomes.DESERT, HOT, DRY, SANDY );
registerBiomeType(Biomes.EXTREME_HILLS, MOUNTAIN, HILLS );
registerBiomeType(Biomes.FOREST, FOREST );
registerBiomeType(Biomes.TAIGA, COLD, CONIFEROUS, FOREST );
registerBiomeType(Biomes.TAIGA_HILLS, COLD, CONIFEROUS, FOREST, HILLS );
registerBiomeType(Biomes.SWAMPLAND, WET, SWAMP );
registerBiomeType(Biomes.RIVER, RIVER );
registerBiomeType(Biomes.FROZEN_OCEAN, COLD, OCEAN, SNOWY );
registerBiomeType(Biomes.FROZEN_RIVER, COLD, RIVER, SNOWY );
registerBiomeType(Biomes.ICE_PLAINS, COLD, SNOWY, WASTELAND );
registerBiomeType(Biomes.ICE_MOUNTAINS, COLD, SNOWY, MOUNTAIN );
registerBiomeType(Biomes.BEACH, BEACH );
registerBiomeType(Biomes.DESERT_HILLS, HOT, DRY, SANDY, HILLS );
registerBiomeType(Biomes.JUNGLE, HOT, WET, DENSE, JUNGLE );
registerBiomeType(Biomes.JUNGLE_HILLS, HOT, WET, DENSE, JUNGLE, HILLS);
registerBiomeType(Biomes.FOREST_HILLS, FOREST, HILLS );
registerBiomeType(Biomes.SKY, COLD, DRY, END );
registerBiomeType(Biomes.HELL, HOT, DRY, NETHER );
registerBiomeType(Biomes.MUSHROOM_ISLAND, MUSHROOM );
registerBiomeType(Biomes.EXTREME_HILLS_EDGE, MOUNTAIN );
registerBiomeType(Biomes.MUSHROOM_ISLAND_SHORE, MUSHROOM, BEACH );
registerBiomeType(Biomes.JUNGLE_EDGE, HOT, WET, JUNGLE, FOREST );
registerBiomeType(Biomes.DEEP_OCEAN, OCEAN );
registerBiomeType(Biomes.STONE_BEACH, BEACH );
registerBiomeType(Biomes.COLD_BEACH, COLD, BEACH, SNOWY );
registerBiomeType(Biomes.BIRCH_FOREST, FOREST );
registerBiomeType(Biomes.BIRCH_FOREST_HILLS, FOREST, HILLS );
registerBiomeType(Biomes.ROOFED_FOREST, SPOOKY, DENSE, FOREST );
registerBiomeType(Biomes.COLD_TAIGA, COLD, CONIFEROUS, FOREST, SNOWY );
registerBiomeType(Biomes.COLD_TAIGA_HILLS, COLD, CONIFEROUS, FOREST, SNOWY, HILLS);
registerBiomeType(Biomes.REDWOOD_TAIGA, COLD, CONIFEROUS, FOREST );
registerBiomeType(Biomes.REDWOOD_TAIGA_HILLS, COLD, CONIFEROUS, FOREST, HILLS );
registerBiomeType(Biomes.EXTREME_HILLS_WITH_TREES, MOUNTAIN, FOREST, SPARSE );
registerBiomeType(Biomes.SAVANNA, HOT, SAVANNA, PLAINS, SPARSE );
registerBiomeType(Biomes.SAVANNA_PLATEAU, HOT, SAVANNA, PLAINS, SPARSE );
registerBiomeType(Biomes.MESA, MESA, SANDY );
registerBiomeType(Biomes.MESA_ROCK, MESA, SPARSE, SANDY );
registerBiomeType(Biomes.MESA_CLEAR_ROCK, MESA, SANDY );
}
}

View File

@ -25,9 +25,9 @@ public class BiomeManager
static
{
oceanBiomes.add(Biomes.ocean);
oceanBiomes.add(Biomes.deepOcean);
oceanBiomes.add(Biomes.frozenOcean);
oceanBiomes.add(Biomes.OCEAN);
oceanBiomes.add(Biomes.DEEP_OCEAN);
oceanBiomes.add(Biomes.FROZEN_OCEAN);
}
private static TrackedList<BiomeEntry>[] setupBiomes()
@ -36,26 +36,26 @@ public class BiomeManager
TrackedList<BiomeEntry>[] currentBiomes = new TrackedList[BiomeType.values().length];
List<BiomeEntry> list = new ArrayList<BiomeEntry>();
list.add(new BiomeEntry(Biomes.forest, 10));
list.add(new BiomeEntry(Biomes.roofedForest, 10));
list.add(new BiomeEntry(Biomes.extremeHills, 10));
list.add(new BiomeEntry(Biomes.plains, 10));
list.add(new BiomeEntry(Biomes.birchForest, 10));
list.add(new BiomeEntry(Biomes.swampland, 10));
list.add(new BiomeEntry(Biomes.FOREST, 10));
list.add(new BiomeEntry(Biomes.ROOFED_FOREST, 10));
list.add(new BiomeEntry(Biomes.EXTREME_HILLS, 10));
list.add(new BiomeEntry(Biomes.PLAINS, 10));
list.add(new BiomeEntry(Biomes.BIRCH_FOREST, 10));
list.add(new BiomeEntry(Biomes.SWAMPLAND, 10));
currentBiomes[BiomeType.WARM.ordinal()] = new TrackedList<BiomeEntry>(list);
list.clear();
list.add(new BiomeEntry(Biomes.forest, 10));
list.add(new BiomeEntry(Biomes.extremeHills, 10));
list.add(new BiomeEntry(Biomes.taiga, 10));
list.add(new BiomeEntry(Biomes.plains, 10));
list.add(new BiomeEntry(Biomes.FOREST, 10));
list.add(new BiomeEntry(Biomes.EXTREME_HILLS, 10));
list.add(new BiomeEntry(Biomes.TAIGA, 10));
list.add(new BiomeEntry(Biomes.PLAINS, 10));
currentBiomes[BiomeType.COOL.ordinal()] = new TrackedList<BiomeEntry>(list);
list.clear();
list.add(new BiomeEntry(Biomes.icePlains, 30));
list.add(new BiomeEntry(Biomes.coldTaiga, 10));
list.add(new BiomeEntry(Biomes.ICE_PLAINS, 30));
list.add(new BiomeEntry(Biomes.COLD_TAIGA, 10));
currentBiomes[BiomeType.ICY.ordinal()] = new TrackedList<BiomeEntry>(list);
list.clear();
@ -67,21 +67,21 @@ public class BiomeManager
public static void addVillageBiome(Biome biome, boolean canSpawn)
{
if (!MapGenVillage.villageSpawnBiomes.contains(biome))
if (!MapGenVillage.VILLAGE_SPAWN_BIOMES.contains(biome))
{
ArrayList<Biome> biomes = new ArrayList<Biome>(MapGenVillage.villageSpawnBiomes);
ArrayList<Biome> biomes = new ArrayList<Biome>(MapGenVillage.VILLAGE_SPAWN_BIOMES);
biomes.add(biome);
MapGenVillage.villageSpawnBiomes = biomes;
MapGenVillage.VILLAGE_SPAWN_BIOMES = biomes;
}
}
public static void removeVillageBiome(Biome biome)
{
if (MapGenVillage.villageSpawnBiomes.contains(biome))
if (MapGenVillage.VILLAGE_SPAWN_BIOMES.contains(biome))
{
ArrayList<Biome> biomes = new ArrayList<Biome>(MapGenVillage.villageSpawnBiomes);
ArrayList<Biome> biomes = new ArrayList<Biome>(MapGenVillage.VILLAGE_SPAWN_BIOMES);
biomes.remove(biome);
MapGenVillage.villageSpawnBiomes = biomes;
MapGenVillage.VILLAGE_SPAWN_BIOMES = biomes;
}
}

View File

@ -222,20 +222,20 @@ public class ForgeHooks
block.setHarvestLevel("axe", 0);
}
Blocks.obsidian.setHarvestLevel("pickaxe", 3);
Blocks.OBSIDIAN.setHarvestLevel("pickaxe", 3);
Block[] oreBlocks = new Block[] {
Blocks.emerald_ore, Blocks.emerald_block, Blocks.diamond_ore, Blocks.diamond_block,
Blocks.gold_ore, Blocks.gold_block, Blocks.redstone_ore, Blocks.lit_redstone_ore
Blocks.EMERALD_ORE, Blocks.EMERALD_BLOCK, Blocks.DIAMOND_ORE, Blocks.DIAMOND_BLOCK,
Blocks.GOLD_ORE, Blocks.GOLD_BLOCK, Blocks.REDSTONE_ORE, Blocks.LIT_REDSTONE_ORE
};
for (Block block : oreBlocks)
{
block.setHarvestLevel("pickaxe", 2);
}
Blocks.iron_ore.setHarvestLevel("pickaxe", 1);
Blocks.iron_block.setHarvestLevel("pickaxe", 1);
Blocks.lapis_ore.setHarvestLevel("pickaxe", 1);
Blocks.lapis_block.setHarvestLevel("pickaxe", 1);
Blocks.quartz_ore.setHarvestLevel("pickaxe", 0);
Blocks.IRON_ORE.setHarvestLevel("pickaxe", 1);
Blocks.IRON_BLOCK.setHarvestLevel("pickaxe", 1);
Blocks.LAPIS_ORE.setHarvestLevel("pickaxe", 1);
Blocks.LAPIS_BLOCK.setHarvestLevel("pickaxe", 1);
Blocks.QUARTZ_ORE.setHarvestLevel("pickaxe", 0);
}
public static int getTotalArmorValue(EntityPlayer player)
@ -258,11 +258,11 @@ public class ForgeHooks
static
{
seedList.add(new SeedEntry(new ItemStack(Items.wheat_seeds), 10)
seedList.add(new SeedEntry(new ItemStack(Items.WHEAT_SEEDS), 10)
{
public ItemStack getStack(Random rand, int fortune)
{
return new ItemStack(Items.wheat_seeds, 1 + rand.nextInt(fortune * 2 + 1));
return new ItemStack(Items.WHEAT_SEEDS, 1 + rand.nextInt(fortune * 2 + 1));
}
});
initTools();
@ -422,7 +422,7 @@ public class ForgeHooks
if (target.typeOfHit == RayTraceResult.Type.BLOCK)
{
s1 = Block.blockRegistry.getNameForObject(world.getBlockState(target.getBlockPos()).getBlock()).toString();
s1 = Block.REGISTRY.getNameForObject(world.getBlockState(target.getBlockPos()).getBlock()).toString();
}
else if (target.typeOfHit == RayTraceResult.Type.ENTITY)
{
@ -440,7 +440,7 @@ public class ForgeHooks
if (isCreative)
{
player.inventory.func_184434_a(result);
player.inventory.setPickedItemStack(result);
Minecraft.getMinecraft().playerController.sendSlotPacket(player.getHeldItem(EnumHand.MAIN_HAND), 36 + player.inventory.currentItem);
return true;
}
@ -636,9 +636,9 @@ public class ForgeHooks
// Set the click event and append the link.
ClickEvent click = new ClickEvent(ClickEvent.Action.OPEN_URL, url);
link.getChatStyle().setChatClickEvent(click);
link.getChatStyle().setUnderlined(true);
link.getChatStyle().setColor(TextFormatting.BLUE);
link.getStyle().setClickEvent(click);
link.getStyle().setUnderlined(true);
link.getStyle().setColor(TextFormatting.BLUE);
if (ichat == null)
ichat = link;
else
@ -685,8 +685,8 @@ public class ForgeHooks
if (world.getTileEntity(pos) == null)
{
SPacketBlockChange packet = new SPacketBlockChange(world, pos);
packet.blockState = Blocks.air.getDefaultState();
entityPlayer.playerNetServerHandler.sendPacket(packet);
packet.blockState = Blocks.AIR.getDefaultState();
entityPlayer.connection.sendPacket(packet);
}
// Post the block break event
@ -699,16 +699,16 @@ public class ForgeHooks
if (event.isCanceled())
{
// Let the client know the block still exists
entityPlayer.playerNetServerHandler.sendPacket(new SPacketBlockChange(world, pos));
entityPlayer.connection.sendPacket(new SPacketBlockChange(world, pos));
// Update any tile entity data for this block
TileEntity tileentity = world.getTileEntity(pos);
if (tileentity != null)
{
Packet<?> pkt = tileentity.func_189518_D_();
Packet<?> pkt = tileentity.getUpdatePacket();
if (pkt != null)
{
entityPlayer.playerNetServerHandler.sendPacket(pkt);
entityPlayer.connection.sendPacket(pkt);
}
}
}
@ -798,7 +798,7 @@ public class ForgeHooks
world.markAndNotifyBlock(snap.getPos(), null, oldBlock, newBlock, updateFlag);
}
player.addStat(StatList.func_188060_a(itemstack.getItem()));
player.addStat(StatList.getCraftStats(itemstack.getItem()));
}
}
world.capturedBlockSnapshots.clear();

View File

@ -19,7 +19,7 @@ public class VanillaBrewingRecipe implements IBrewingRecipe {
public boolean isInput(ItemStack stack)
{
Item item = stack.getItem();
return item == Items.potionitem || item == Items.splash_potion || item == Items.lingering_potion || item == Items.glass_bottle;
return item == Items.POTIONITEM || item == Items.SPLASH_POTION || item == Items.LINGERING_POTION || item == Items.GLASS_BOTTLE;
}
/**

View File

@ -78,7 +78,7 @@ public class ExtendedBlockState extends BlockStateContainer
{
if (!property.getAllowedValues().contains(value))
{
throw new IllegalArgumentException("Cannot set property " + property + " to " + value + " on block " + Block.blockRegistry.getNameForObject(getBlock()) + ", it is not an allowed value");
throw new IllegalArgumentException("Cannot set property " + property + " to " + value + " on block " + Block.REGISTRY.getNameForObject(getBlock()) + ", it is not an allowed value");
} else
{
if (this.getProperties().get(property) == value)
@ -106,7 +106,7 @@ public class ExtendedBlockState extends BlockStateContainer
}
if(!property.isValid(value))
{
throw new IllegalArgumentException("Cannot set unlisted property " + property + " to " + value + " on block " + Block.blockRegistry.getNameForObject(getBlock()) + ", it is not an allowed value");
throw new IllegalArgumentException("Cannot set unlisted property " + property + " to " + value + " on block " + Block.REGISTRY.getNameForObject(getBlock()) + ", it is not an allowed value");
}
Map<IUnlistedProperty<?>, Optional<?>> newMap = new HashMap<IUnlistedProperty<?>, Optional<?>>(unlistedProperties);
newMap.put(property, Optional.fromNullable(value));

View File

@ -45,7 +45,7 @@ public class BlockSnapshot implements Serializable
if (te != null)
{
nbt = new NBTTagCompound();
te.func_189515_b(getNbt());
te.writeToNBT(getNbt());
}
else nbt = null;
if (DEBUG)
@ -139,7 +139,7 @@ public class BlockSnapshot implements Serializable
public TileEntity getTileEntity()
{
if (getNbt() != null)
return TileEntity.func_189514_c(getNbt());
return TileEntity.create(getNbt());
else return null;
}

View File

@ -308,7 +308,7 @@ public class ForgeEventFactory
return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, event.getFilledBucket());
if (!player.inventory.addItemStackToInventory(event.getFilledBucket()))
player.dropPlayerItemWithRandomChoice(event.getFilledBucket(), false);
player.dropItem(event.getFilledBucket(), false);
return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, stack);
}
@ -456,12 +456,12 @@ public class ForgeEventFactory
public static boolean renderFireOverlay(EntityPlayer player, float renderPartialTicks)
{
return renderBlockOverlay(player, renderPartialTicks, OverlayType.FIRE, Blocks.fire.getDefaultState(), new BlockPos(player));
return renderBlockOverlay(player, renderPartialTicks, OverlayType.FIRE, Blocks.FIRE.getDefaultState(), new BlockPos(player));
}
public static boolean renderWaterOverlay(EntityPlayer player, float renderPartialTicks)
{
return renderBlockOverlay(player, renderPartialTicks, OverlayType.WATER, Blocks.water.getDefaultState(), new BlockPos(player));
return renderBlockOverlay(player, renderPartialTicks, OverlayType.WATER, Blocks.WATER.getDefaultState(), new BlockPos(player));
}
public static boolean renderBlockOverlay(EntityPlayer player, float renderPartialTicks, OverlayType type, IBlockState block, BlockPos pos)

View File

@ -101,13 +101,13 @@ public class BlockEvent extends Event
this.player = player;
if (state == null || !ForgeHooks.canHarvestBlock(state.getBlock(), player, world, pos) || // Handle empty block or player unable to break block scenario
(state.getBlock().canSilkHarvest(world, pos, world.getBlockState(pos), player) && EnchantmentHelper.getEnchantmentLevel(Enchantments.silkTouch, player.getHeldItemMainhand()) > 0)) // If the block is being silk harvested, the exp dropped is 0
(state.getBlock().canSilkHarvest(world, pos, world.getBlockState(pos), player) && EnchantmentHelper.getEnchantmentLevel(Enchantments.SILK_TOUCH, player.getHeldItemMainhand()) > 0)) // If the block is being silk harvested, the exp dropped is 0
{
this.exp = 0;
}
else
{
int bonusLevel = EnchantmentHelper.getEnchantmentLevel(Enchantments.fortune, player.getHeldItemMainhand());
int bonusLevel = EnchantmentHelper.getEnchantmentLevel(Enchantments.FORTUNE, player.getHeldItemMainhand());
this.exp = state.getBlock().getExpDrop(state, world, pos, bonusLevel);
}
}

View File

@ -41,47 +41,47 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock
static
{
defaultDisplacements.put(Blocks.oak_door, false);
defaultDisplacements.put(Blocks.spruce_door, false);
defaultDisplacements.put(Blocks.birch_door, false);
defaultDisplacements.put(Blocks.jungle_door, false);
defaultDisplacements.put(Blocks.acacia_door, false);
defaultDisplacements.put(Blocks.dark_oak_door, false);
defaultDisplacements.put(Blocks.trapdoor, false);
defaultDisplacements.put(Blocks.iron_trapdoor, false);
defaultDisplacements.put(Blocks.oak_fence, false);
defaultDisplacements.put(Blocks.spruce_fence, false);
defaultDisplacements.put(Blocks.birch_fence, false);
defaultDisplacements.put(Blocks.jungle_fence, false);
defaultDisplacements.put(Blocks.dark_oak_fence, false);
defaultDisplacements.put(Blocks.acacia_fence, false);
defaultDisplacements.put(Blocks.nether_brick_fence, false);
defaultDisplacements.put(Blocks.oak_fence_gate, false);
defaultDisplacements.put(Blocks.spruce_fence_gate, false);
defaultDisplacements.put(Blocks.birch_fence_gate, false);
defaultDisplacements.put(Blocks.jungle_fence_gate, false);
defaultDisplacements.put(Blocks.dark_oak_fence_gate, false);
defaultDisplacements.put(Blocks.acacia_fence_gate, false);
defaultDisplacements.put(Blocks.wooden_pressure_plate, false);
defaultDisplacements.put(Blocks.stone_pressure_plate, false);
defaultDisplacements.put(Blocks.light_weighted_pressure_plate, false);
defaultDisplacements.put(Blocks.heavy_weighted_pressure_plate, false);
defaultDisplacements.put(Blocks.ladder, false);
defaultDisplacements.put(Blocks.iron_bars, false);
defaultDisplacements.put(Blocks.glass_pane, false);
defaultDisplacements.put(Blocks.stained_glass_pane, false);
defaultDisplacements.put(Blocks.portal, false);
defaultDisplacements.put(Blocks.end_portal, false);
defaultDisplacements.put(Blocks.cobblestone_wall, false);
defaultDisplacements.put(Blocks.barrier, false);
defaultDisplacements.put(Blocks.standing_banner, false);
defaultDisplacements.put(Blocks.wall_banner, false);
defaultDisplacements.put(Blocks.cake, false);
defaultDisplacements.put(Blocks.OAK_DOOR, false);
defaultDisplacements.put(Blocks.SPRUCE_DOOR, false);
defaultDisplacements.put(Blocks.BIRCH_DOOR, false);
defaultDisplacements.put(Blocks.JUNGLE_DOOR, false);
defaultDisplacements.put(Blocks.ACACIA_DOOR, false);
defaultDisplacements.put(Blocks.DARK_OAK_DOOR, false);
defaultDisplacements.put(Blocks.TRAPDOOR, false);
defaultDisplacements.put(Blocks.IRON_TRAPDOOR, false);
defaultDisplacements.put(Blocks.OAK_FENCE, false);
defaultDisplacements.put(Blocks.SPRUCE_FENCE, false);
defaultDisplacements.put(Blocks.BIRCH_FENCE, false);
defaultDisplacements.put(Blocks.JUNGLE_FENCE, false);
defaultDisplacements.put(Blocks.DARK_OAK_FENCE, false);
defaultDisplacements.put(Blocks.ACACIA_FENCE, false);
defaultDisplacements.put(Blocks.NETHER_BRICK_FENCE, false);
defaultDisplacements.put(Blocks.OAK_FENCE_GATE, false);
defaultDisplacements.put(Blocks.SPRUCE_FENCE_GATE, false);
defaultDisplacements.put(Blocks.BIRCH_FENCE_GATE, false);
defaultDisplacements.put(Blocks.JUNGLE_FENCE_GATE, false);
defaultDisplacements.put(Blocks.DARK_OAK_FENCE_GATE, false);
defaultDisplacements.put(Blocks.ACACIA_FENCE_GATE, false);
defaultDisplacements.put(Blocks.WOODEN_PRESSURE_PLATE, false);
defaultDisplacements.put(Blocks.STONE_PRESSURE_PLATE, false);
defaultDisplacements.put(Blocks.LIGHT_WEIGHTED_PRESSURE_PLATE, false);
defaultDisplacements.put(Blocks.HEAVY_WEIGHTED_PRESSURE_PLATE, false);
defaultDisplacements.put(Blocks.LADDER, false);
defaultDisplacements.put(Blocks.IRON_BARS, false);
defaultDisplacements.put(Blocks.GLASS_PANE, false);
defaultDisplacements.put(Blocks.STAINED_GLASS_PANE, false);
defaultDisplacements.put(Blocks.PORTAL, false);
defaultDisplacements.put(Blocks.END_PORTAL, false);
defaultDisplacements.put(Blocks.COBBLESTONE_WALL, false);
defaultDisplacements.put(Blocks.BARRIER, false);
defaultDisplacements.put(Blocks.STANDING_BANNER, false);
defaultDisplacements.put(Blocks.WALL_BANNER, false);
defaultDisplacements.put(Blocks.CAKE, false);
defaultDisplacements.put(Blocks.iron_door, false);
defaultDisplacements.put(Blocks.standing_sign, false);
defaultDisplacements.put(Blocks.wall_sign, false);
defaultDisplacements.put(Blocks.reeds, false);
defaultDisplacements.put(Blocks.IRON_DOOR, false);
defaultDisplacements.put(Blocks.STANDING_SIGN, false);
defaultDisplacements.put(Blocks.WALL_SIGN, false);
defaultDisplacements.put(Blocks.REEDS, false);
}
protected Map<Block, Boolean> displacements = Maps.newHashMap();
@ -212,7 +212,7 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock
}
Material material = state.getMaterial();
if (material.blocksMovement() || material == Material.portal)
if (material.blocksMovement() || material == Material.PORTAL)
{
return false;
}
@ -261,7 +261,7 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock
}
Material material = state.getMaterial();
if (material.blocksMovement() || material == Material.portal)
if (material.blocksMovement() || material == Material.PORTAL)
{
return false;
}
@ -298,7 +298,7 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock
}
@Override
public void func_189540_a(IBlockState state, World world, BlockPos pos, Block neighborBlock)
public void neighborChanged(IBlockState state, World world, BlockPos pos, Block neighborBlock)
{
world.scheduleUpdate(pos, this, tickRate);
}

View File

@ -43,7 +43,7 @@ public class BlockFluidClassic extends BlockFluidBase
public int getQuantaValue(IBlockAccess world, BlockPos pos)
{
IBlockState state = world.getBlockState(pos);
if (state.getBlock() == Blocks.air)
if (state.getBlock() == Blocks.AIR)
{
return 0;
}
@ -291,9 +291,9 @@ public class BlockFluidClassic extends BlockFluidBase
Material material = state.getMaterial();
if (material.blocksMovement() ||
material == Material.water ||
material == Material.lava ||
material == Material.portal)
material == Material.WATER ||
material == Material.LAVA ||
material == Material.PORTAL)
{
return false;
}

View File

@ -266,13 +266,13 @@ public class Fluid
{
if(fillSound == null)
{
if(getBlock() != null && getBlock().getDefaultState().getMaterial() == Material.lava)
if(getBlock() != null && getBlock().getDefaultState().getMaterial() == Material.LAVA)
{
fillSound = SoundEvents.item_bucket_fill_lava;
fillSound = SoundEvents.ITEM_BUCKET_FILL_LAVA;
}
else
{
fillSound = SoundEvents.item_bucket_fill;
fillSound = SoundEvents.ITEM_BUCKET_FILL;
}
}
@ -283,13 +283,13 @@ public class Fluid
{
if(emptySound == null)
{
if(getBlock() != null && getBlock().getDefaultState().getMaterial() == Material.lava)
if(getBlock() != null && getBlock().getDefaultState().getMaterial() == Material.LAVA)
{
emptySound = SoundEvents.item_bucket_empty_lava;
emptySound = SoundEvents.ITEM_BUCKET_EMPTY_LAVA;
}
else
{
emptySound = SoundEvents.item_bucket_empty;
emptySound = SoundEvents.ITEM_BUCKET_EMPTY;
}
}

View File

@ -71,15 +71,15 @@ public abstract class FluidContainerRegistry
private static Set<ContainerKey> emptyContainers = Sets.newHashSet();
public static final int BUCKET_VOLUME = 1000;
public static final ItemStack EMPTY_BUCKET = new ItemStack(Items.bucket);
public static final ItemStack EMPTY_BOTTLE = new ItemStack(Items.glass_bottle);
private static final ItemStack NULL_EMPTYCONTAINER = new ItemStack(Items.bucket);
public static final ItemStack EMPTY_BUCKET = new ItemStack(Items.BUCKET);
public static final ItemStack EMPTY_BOTTLE = new ItemStack(Items.GLASS_BOTTLE);
private static final ItemStack NULL_EMPTYCONTAINER = new ItemStack(Items.BUCKET);
static
{
registerFluidContainer(FluidRegistry.WATER, new ItemStack(Items.water_bucket), EMPTY_BUCKET);
registerFluidContainer(FluidRegistry.LAVA, new ItemStack(Items.lava_bucket), EMPTY_BUCKET);
registerFluidContainer(FluidRegistry.WATER, new ItemStack(Items.potionitem), EMPTY_BOTTLE);
registerFluidContainer(FluidRegistry.WATER, new ItemStack(Items.WATER_BUCKET), EMPTY_BUCKET);
registerFluidContainer(FluidRegistry.LAVA, new ItemStack(Items.LAVA_BUCKET), EMPTY_BUCKET);
registerFluidContainer(FluidRegistry.WATER, new ItemStack(Items.POTIONITEM), EMPTY_BOTTLE);
}
private FluidContainerRegistry(){}

View File

@ -55,14 +55,14 @@ public abstract class FluidRegistry
public String getLocalizedName(FluidStack fs) {
return I18n.translateToLocal("tile.water.name");
}
}.setBlock(Blocks.water).setUnlocalizedName(Blocks.water.getUnlocalizedName());
}.setBlock(Blocks.WATER).setUnlocalizedName(Blocks.WATER.getUnlocalizedName());
public static final Fluid LAVA = new Fluid("lava", new ResourceLocation("blocks/lava_still"), new ResourceLocation("blocks/lava_flow")) {
@Override
public String getLocalizedName(FluidStack fs) {
return I18n.translateToLocal("tile.lava.name");
}
}.setBlock(Blocks.lava).setLuminosity(15).setDensity(3000).setViscosity(6000).setTemperature(1300).setUnlocalizedName(Blocks.lava.getUnlocalizedName());
}.setBlock(Blocks.LAVA).setLuminosity(15).setDensity(3000).setViscosity(6000).setTemperature(1300).setUnlocalizedName(Blocks.LAVA.getUnlocalizedName());
static
{

View File

@ -20,9 +20,9 @@ public class TileFluidHandler extends TileEntity implements IFluidHandler
}
@Override
public NBTTagCompound func_189515_b(NBTTagCompound tag)
public NBTTagCompound writeToNBT(NBTTagCompound tag)
{
tag = super.func_189515_b(tag);
tag = super.writeToNBT(tag);
tank.writeToNBT(tag);
return tag;
}

View File

@ -54,7 +54,7 @@ public class UniversalBucket extends Item implements IFluidContainerItem
this.setMaxStackSize(1);
this.setCreativeTab(CreativeTabs.tabMisc);
this.setCreativeTab(CreativeTabs.MISC);
}
@SideOnly(Side.CLIENT)
@ -107,7 +107,7 @@ public class UniversalBucket extends Item implements IFluidContainerItem
}
// clicked on a block?
RayTraceResult mop = this.getMovingObjectPositionFromPlayer(world, player, false);
RayTraceResult mop = this.rayTrace(world, player, false);
if(mop == null || mop.typeOfHit != RayTraceResult.Type.BLOCK)
{
@ -129,7 +129,7 @@ public class UniversalBucket extends Item implements IFluidContainerItem
&& !player.capabilities.isCreativeMode)
{
// success!
player.addStat(StatList.func_188057_b(this));
player.addStat(StatList.getObjectUseStats(this));
itemstack.stackSize--;
ItemStack emptyStack = getEmpty() != null ? getEmpty().copy() : new ItemStack(this);
@ -181,12 +181,12 @@ public class UniversalBucket extends Item implements IFluidContainerItem
}
// water goes poof?
if (worldIn.provider.doesWaterVaporize() && (block == Blocks.flowing_water || block == Blocks.water))
if (worldIn.provider.doesWaterVaporize() && (block == Blocks.FLOWING_WATER || block == Blocks.WATER))
{
int i = pos.getX();
int j = pos.getY();
int k = pos.getZ();
worldIn.playSound(null, pos, SoundEvents.block_fire_extinguish, SoundCategory.BLOCKS, 0.5F,
worldIn.playSound(null, pos, SoundEvents.BLOCK_FIRE_EXTINGUISH, SoundCategory.BLOCKS, 0.5F,
2.6F + (worldIn.rand.nextFloat() - worldIn.rand.nextFloat()) * 0.8F);
for (int l = 0; l < 8; ++l)

View File

@ -662,7 +662,7 @@ public class FMLClientHandler implements IFMLSidedHandler
@Override
public NetworkManager getClientToServerNetworkManager()
{
return this.client.getNetHandler()!=null ? this.client.getNetHandler().getNetworkManager() : null;
return this.client.getConnection()!=null ? this.client.getConnection().getNetworkManager() : null;
}
public void handleClientWorldClosing(WorldClient world)

View File

@ -584,7 +584,7 @@ public class GuiModList extends GuiScreen
for (ITextComponent part : line) {
if (!(part instanceof TextComponentString))
continue;
k += GuiModList.this.fontRendererObj.getStringWidth(((TextComponentString)part).getChatComponentText_TextValue());
k += GuiModList.this.fontRendererObj.getStringWidth(((TextComponentString)part).getText());
if (k >= x)
{
GuiModList.this.handleComponentClick(part);

View File

@ -287,7 +287,7 @@ public abstract class GuiScrollingList
{
GlStateManager.disableLighting();
GlStateManager.disableFog();
this.client.renderEngine.bindTexture(Gui.optionsBackground);
this.client.renderEngine.bindTexture(Gui.OPTIONS_BACKGROUND);
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
float scale = 32.0F;
worldr.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);

View File

@ -47,7 +47,7 @@ public class GuiButtonExt extends GuiButton
{
this.hovered = mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.width && mouseY < this.yPosition + this.height;
int k = this.getHoverState(this.hovered);
GuiUtils.drawContinuousTexturedBox(buttonTextures, this.xPosition, this.yPosition, 0, 46 + k * 20, this.width, this.height, 200, 20, 2, 3, 2, 2, this.zLevel);
GuiUtils.drawContinuousTexturedBox(BUTTON_TEXTURES, this.xPosition, this.yPosition, 0, 46 + k * 20, this.width, this.height, 200, 20, 2, 3, 2, 2, this.zLevel);
this.mouseDragged(mc, mouseX, mouseY);
int color = 14737632;

View File

@ -40,7 +40,7 @@ public class GuiCheckBox extends GuiButton
if (this.visible)
{
this.hovered = mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.boxWidth && mouseY < this.yPosition + this.height;
GuiUtils.drawContinuousTexturedBox(buttonTextures, this.xPosition, this.yPosition, 0, 46, this.boxWidth, this.height, 200, 20, 2, 3, 2, 2, this.zLevel);
GuiUtils.drawContinuousTexturedBox(BUTTON_TEXTURES, this.xPosition, this.yPosition, 0, 46, this.boxWidth, this.height, 200, 20, 2, 3, 2, 2, this.zLevel);
this.mouseDragged(mc, mouseX, mouseY);
int color = 14737632;

View File

@ -13,6 +13,7 @@
package net.minecraftforge.fml.client.config;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.renderer.GlStateManager;
/**
@ -39,7 +40,7 @@ public class GuiUnicodeGlyphButton extends GuiButtonExt
{
this.hovered = mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.width && mouseY < this.yPosition + this.height;
int k = this.getHoverState(this.hovered);
GuiUtils.drawContinuousTexturedBox(buttonTextures, this.xPosition, this.yPosition, 0, 46 + k * 20, this.width, this.height, 200, 20, 2, 3, 2, 2, this.zLevel);
GuiUtils.drawContinuousTexturedBox(GuiButton.BUTTON_TEXTURES, this.xPosition, this.yPosition, 0, 46 + k * 20, this.width, this.height, 200, 20, 2, 3, 2, 2, this.zLevel);
this.mouseDragged(mc, mouseX, mouseY);
int color = 14737632;

View File

@ -366,7 +366,7 @@ public class FMLCommonHandler
{
for (ICrashCallable call: crashCallables)
{
category.func_189529_a(call.getLabel(), call);
category.setDetail(call.getLabel(), call);
}
}

View File

@ -109,7 +109,7 @@ public class FMLOutboundHandler extends ChannelOutboundHandlerAdapter {
public List<NetworkDispatcher> selectNetworks(Object args, ChannelHandlerContext context, FMLProxyPacket packet)
{
EntityPlayerMP player = (EntityPlayerMP) args;
NetworkDispatcher dispatcher = player == null ? null : player.playerNetServerHandler.netManager.channel().attr(NetworkDispatcher.FML_DISPATCHER).get();
NetworkDispatcher dispatcher = player == null ? null : player.connection.netManager.channel().attr(NetworkDispatcher.FML_DISPATCHER).get();
return dispatcher == null ? ImmutableList.<NetworkDispatcher>of() : ImmutableList.of(dispatcher);
}
},
@ -130,7 +130,7 @@ public class FMLOutboundHandler extends ChannelOutboundHandlerAdapter {
ImmutableList.Builder<NetworkDispatcher> builder = ImmutableList.builder();
for (EntityPlayerMP player : FMLCommonHandler.instance().getMinecraftServerInstance().getPlayerList().getPlayerList())
{
NetworkDispatcher dispatcher = player.playerNetServerHandler.netManager.channel().attr(NetworkDispatcher.FML_DISPATCHER).get();
NetworkDispatcher dispatcher = player.connection.netManager.channel().attr(NetworkDispatcher.FML_DISPATCHER).get();
if (dispatcher != null) builder.add(dispatcher);
}
return builder.build();
@ -160,7 +160,7 @@ public class FMLOutboundHandler extends ChannelOutboundHandlerAdapter {
{
if (dimension == player.dimension)
{
NetworkDispatcher dispatcher = player.playerNetServerHandler.netManager.channel().attr(NetworkDispatcher.FML_DISPATCHER).get();
NetworkDispatcher dispatcher = player.connection.netManager.channel().attr(NetworkDispatcher.FML_DISPATCHER).get();
// Null dispatchers may exist for fake players - skip them
if (dispatcher != null) builder.add(dispatcher);
}
@ -200,7 +200,7 @@ public class FMLOutboundHandler extends ChannelOutboundHandlerAdapter {
if (d4 * d4 + d5 * d5 + d6 * d6 < tp.range * tp.range)
{
NetworkDispatcher dispatcher = player.playerNetServerHandler.netManager.channel().attr(NetworkDispatcher.FML_DISPATCHER).get();
NetworkDispatcher dispatcher = player.connection.netManager.channel().attr(NetworkDispatcher.FML_DISPATCHER).get();
if (dispatcher != null) builder.add(dispatcher);
}
}

View File

@ -189,13 +189,13 @@ public class NetworkDispatcher extends SimpleChannelInboundHandler<Packet<?>> im
completeServerSideConnection(ConnectionType.MODDED);
}
// FORGE: sometimes the netqueue will tick while login is occurring, causing an NPE. We shouldn't tick until the connection is complete
if (this.playerEntity.playerNetServerHandler != this) return;
if (this.playerEntity.connection != this) return;
super.update();
}
};
this.netHandler = serverHandler;
// NULL the play server here - we restore it further on. If not, there are packets sent before the login
player.playerNetServerHandler = null;
player.connection = null;
// manually for the manager into the PLAY state, so we can send packets later
this.manager.setConnectionState(EnumConnectionState.PLAY);

View File

@ -95,7 +95,7 @@ public class EntitySpawnHandler extends SimpleChannelInboundHandler<FMLMessage.E
}
}
EntityTracker.func_187254_a(entity, spawnMsg.rawX, spawnMsg.rawY, spawnMsg.rawZ);
EntityTracker.updateServerPosition(entity, spawnMsg.rawX, spawnMsg.rawY, spawnMsg.rawZ);
EntityPlayerSP clientPlayer = FMLClientHandler.instance().getClientPlayerEntity();
if (entity instanceof IThrowableEntity)

View File

@ -90,7 +90,7 @@ public class FMLNetworkHandler
embeddedChannel.writeOutbound(openGui);
entityPlayerMP.openContainer = remoteGuiContainer;
entityPlayerMP.openContainer.windowId = windowId;
entityPlayerMP.openContainer.onCraftGuiOpened(entityPlayerMP);
entityPlayerMP.openContainer.addListener(entityPlayerMP);
}
}
else if (entityPlayer instanceof FakePlayer)

View File

@ -113,7 +113,6 @@ public class EntityRegistry
private static final EntityRegistry INSTANCE = new EntityRegistry();
private BitSet availableIndices;
private ListMultimap<ModContainer, EntityRegistration> entityRegistrations = ArrayListMultimap.create();
private Map<String,ModContainer> entityNames = Maps.newHashMap();
private BiMap<Class<? extends Entity>, EntityRegistration> entityClassRegistrations = HashBiMap.create();
@ -125,12 +124,6 @@ public class EntityRegistry
private EntityRegistry()
{
availableIndices = new BitSet(256);
availableIndices.set(1,255);
for (Object id : EntityList.idToClassMapping.keySet())
{
availableIndices.clear((Integer)id);
}
}
/**
@ -177,11 +170,11 @@ public class EntityRegistry
{
entityClassRegistrations.put(entityClass, er);
entityNames.put(entityName, mc);
if (!EntityList.classToStringMapping.containsKey(entityClass))
if (!EntityList.CLASS_TO_NAME.containsKey(entityClass))
{
String entityModName = String.format("%s.%s", mc.getModId(), entityName);
EntityList.classToStringMapping.put(entityClass, entityModName);
EntityList.stringToClassMapping.put(entityModName, entityClass);
EntityList.CLASS_TO_NAME.put(entityClass, entityModName);
EntityList.NAME_TO_CLASS.put(entityModName, entityClass);
FMLLog.finer("Automatically registered mod %s entity %s as %s", mc.getModId(), entityName, entityModName);
}
else
@ -214,10 +207,10 @@ public class EntityRegistry
public static void registerEgg(Class<? extends Entity> entityClass, int primary, int secondary)
{
if (EntityList.classToStringMapping.containsKey(entityClass))
if (EntityList.CLASS_TO_NAME.containsKey(entityClass))
{
String name = EntityList.classToStringMapping.get(entityClass);
EntityList.entityEggs.put(name, new EntityList.EntityEggInfo(name, primary, secondary));
String name = EntityList.CLASS_TO_NAME.get(entityClass);
EntityList.ENTITY_EGGS.put(name, new EntityList.EntityEggInfo(name, primary, secondary));
FMLLog.fine("Registering entity egg '%s' for %s", name, entityClass);
}
else
@ -225,97 +218,6 @@ public class EntityRegistry
FMLLog.fine("Failed registering entity egg %s (No entity found)", entityClass.getName());
}
}
/**
* Registers in the minecraft Entity ID list. This is generally not a good idea and shouldn't be used.
* Simply use {@link #registerModEntity(Class, String, int, Object, int, int, boolean, int, int)} instead.
*
* @param entityClass Class of the entity being registered
* @param entityName Name for the entity being registered
* @param id A globally unique ID for the entity
*/
@Deprecated
public static void registerGlobalEntityID(Class <? extends Entity > entityClass, String entityName, int id)
{
if (EntityList.classToStringMapping.containsKey(entityClass))
{
ModContainer activeModContainer = Loader.instance().activeModContainer();
String modId = "unknown";
if (activeModContainer != null)
{
modId = activeModContainer.getModId();
}
else
{
FMLLog.severe("There is a rogue mod failing to register entities from outside the context of mod loading. This is incredibly dangerous and should be stopped.");
}
FMLLog.warning("The mod %s tried to register the entity class %s which was already registered - if you wish to override default naming for FML mod entities, register it here first", modId, entityClass);
return;
}
id = instance().validateAndClaimId(id);
EntityList.addMapping(entityClass, entityName, id);
}
/**
* Registers in the minecraft Entity ID list. This is generally not a good idea, and shouldn't be used.
* Simply use {@link #registerModEntity(Class, String, int, Object, int, int, boolean)} instead.
* @param entityClass The class of the entity being registered
* @param entityName The name of the entity being registered
* @param id The globally unique ID of the entity
* @param backgroundEggColour An RGB colour value for the spawn egg background colour
* @param foregroundEggColour An RGB colour value for the spawn egg foreground colour
*/
@Deprecated
public static void registerGlobalEntityID(Class <? extends Entity > entityClass, String entityName, int id, int backgroundEggColour, int foregroundEggColour)
{
if (EntityList.classToStringMapping.containsKey(entityClass))
{
ModContainer activeModContainer = Loader.instance().activeModContainer();
String modId = "unknown";
if (activeModContainer != null)
{
modId = activeModContainer.getModId();
}
else
{
FMLLog.severe("There is a rogue mod failing to register entities from outside the context of mod loading. This is incredibly dangerous and should be stopped.");
}
FMLLog.warning("The mod %s tried to register the entity class %s which was already registered - if you wish to override default naming for FML mod entities, register it here first", modId, entityClass);
return;
}
instance().validateAndClaimId(id);
EntityList.addMapping(entityClass, entityName, id, backgroundEggColour, foregroundEggColour);
}
private int validateAndClaimId(int id)
{
// workaround for broken ML
int realId = id;
if (id < Byte.MIN_VALUE)
{
FMLLog.warning("Compensating for modloader out of range compensation by mod : entityId %d for mod %s is now %d", id, Loader.instance().activeModContainer().getModId(), realId);
realId += 3000;
}
if (realId < 0)
{
realId += Byte.MAX_VALUE;
}
try
{
UnsignedBytes.checkedCast(realId);
}
catch (IllegalArgumentException e)
{
FMLLog.log(Level.ERROR, "The entity ID %d for mod %s is not an unsigned byte and may not work", id, Loader.instance().activeModContainer().getModId());
}
if (!availableIndices.get(realId))
{
FMLLog.severe("The mod %s has attempted to register an entity ID %d which is already reserved. This could cause severe problems", Loader.instance().activeModContainer().getModId(), id);
}
availableIndices.clear(realId);
return realId;
}
/**
* Add a spawn entry for the supplied entity in the supplied {@link BiomeGenBase} list
@ -360,7 +262,7 @@ public class EntityRegistry
@SuppressWarnings("unchecked")
public static void addSpawn(String entityName, int weightedProb, int min, int max, EnumCreatureType typeOfCreature, Biome... biomes)
{
Class <? extends Entity > entityClazz = EntityList.stringToClassMapping.get(entityName);
Class <? extends Entity > entityClazz = EntityList.NAME_TO_CLASS.get(entityName);
if (EntityLiving.class.isAssignableFrom(entityClazz))
{
@ -400,7 +302,7 @@ public class EntityRegistry
@SuppressWarnings("unchecked")
public static void removeSpawn(String entityName, EnumCreatureType typeOfCreature, Biome... biomes)
{
Class <? extends Entity > entityClazz = EntityList.stringToClassMapping.get(entityName);
Class <? extends Entity > entityClazz = EntityList.NAME_TO_CLASS.get(entityName);
if (EntityLiving.class.isAssignableFrom(entityClazz))
{
@ -408,23 +310,6 @@ public class EntityRegistry
}
}
/**
* Utility function to try and obtain a globally unique entity ID. Not useful as it requires syncing between
* client and server. Use {@link #registerModEntity(Class, String, int, Object, int, int, boolean)} instead,
* for a much better experience.
* @return A theoretically globally unique ID
*/
@Deprecated
public static int findGlobalUniqueEntityId()
{
int res = instance().availableIndices.nextSetBit(0);
if (res < 0)
{
throw new RuntimeException("No more entity indices left");
}
return res;
}
public EntityRegistration lookupModSpawn(Class<? extends Entity> clazz, boolean keepLooking)
{
Class<?> localClazz = clazz;

View File

@ -157,7 +157,7 @@ public class FMLControlledNamespacedRegistry<I extends IForgeRegistryEntry<I>> e
this.dummiedLocations.clear();
this.dummiedLocations.addAll(otherRegistry.dummiedLocations);
underlyingIntegerMap.func_186812_a();
underlyingIntegerMap.clear();
registryObjects.clear();
for (I thing : otherRegistry.typeSafeIterable())

View File

@ -50,8 +50,8 @@ class ObjectHolderRef {
}
else
{
ResourceLocation tmp = isBlock ? GameData.getBlockRegistry().getNameForObject((Block)existing) :
isItem ? GameData.getItemRegistry().getNameForObject((Item)existing) : null;
ResourceLocation tmp = isBlock ? ForgeRegistries.BLOCKS.getKey((Block)existing) :
isItem ? ForgeRegistries.ITEMS.getKey((Item)existing) : null;
this.injectedObject = tmp;
}
} catch (Exception e)
@ -104,15 +104,15 @@ class ObjectHolderRef {
Object thing;
if (isBlock)
{
thing = GameData.getBlockRegistry().getObject(injectedObject);
if (thing == Blocks.air)
thing = ForgeRegistries.BLOCKS.getValue(injectedObject);
if (thing == Blocks.AIR)
{
thing = null;
}
}
else if (isItem)
{
thing = GameData.getItemRegistry().getObject(injectedObject);
thing = ForgeRegistries.ITEMS.getValue(injectedObject);
}
else
{

View File

@ -336,196 +336,6 @@ public class VillagerRegistry
//This field is moved from EntityVillager over to here.
//Moved to inner class to stop static initializer issues.
//It is nasty I know but it's vanilla.
private static final ITradeList[][][][] trades =
{
{
{
{
new EmeraldForItems(Items.wheat, new PriceInfo(18, 22)),
new EmeraldForItems(Items.potato, new PriceInfo(15, 19)),
new EmeraldForItems(Items.carrot, new PriceInfo(15, 19)),
new ListItemForEmeralds(Items.bread, new PriceInfo(-4, -2))
},
{
new EmeraldForItems(Item.getItemFromBlock(Blocks.pumpkin), new PriceInfo(8, 13)),
new ListItemForEmeralds(Items.pumpkin_pie, new PriceInfo(-3, -2))
},
{
new EmeraldForItems(Item.getItemFromBlock(Blocks.melon_block), new PriceInfo(7, 12)),
new ListItemForEmeralds(Items.apple, new PriceInfo(-5, -7))
},
{
new ListItemForEmeralds(Items.cookie, new PriceInfo(-6, -10)),
new ListItemForEmeralds(Items.cake, new PriceInfo(1, 1))
}
},
{
{
new EmeraldForItems(Items.string, new PriceInfo(15, 20)),
new EmeraldForItems(Items.coal, new PriceInfo(16, 24)),
new ItemAndEmeraldToItem(Items.fish, new PriceInfo(6, 6), Items.cooked_fish, new PriceInfo(6, 6))
},
{
new ListEnchantedItemForEmeralds(Items.fishing_rod, new PriceInfo(7, 8))
}
},
{
{
new EmeraldForItems(Item.getItemFromBlock(Blocks.wool), new PriceInfo(16, 22)),
new ListItemForEmeralds(Items.shears, new PriceInfo(3, 4))
},
{
new ListItemForEmeralds(new ItemStack(Blocks.wool, 1, 0), new PriceInfo(1, 2)),
new ListItemForEmeralds(new ItemStack(Blocks.wool, 1, 1), new PriceInfo(1, 2)),
new ListItemForEmeralds(new ItemStack(Blocks.wool, 1, 2), new PriceInfo(1, 2)),
new ListItemForEmeralds(new ItemStack(Blocks.wool, 1, 3), new PriceInfo(1, 2)),
new ListItemForEmeralds(new ItemStack(Blocks.wool, 1, 4), new PriceInfo(1, 2)),
new ListItemForEmeralds(new ItemStack(Blocks.wool, 1, 5), new PriceInfo(1, 2)),
new ListItemForEmeralds(new ItemStack(Blocks.wool, 1, 6), new PriceInfo(1, 2)),
new ListItemForEmeralds(new ItemStack(Blocks.wool, 1, 7), new PriceInfo(1, 2)),
new ListItemForEmeralds(new ItemStack(Blocks.wool, 1, 8), new PriceInfo(1, 2)),
new ListItemForEmeralds(new ItemStack(Blocks.wool, 1, 9), new PriceInfo(1, 2)),
new ListItemForEmeralds(new ItemStack(Blocks.wool, 1, 10), new PriceInfo(1, 2)),
new ListItemForEmeralds(new ItemStack(Blocks.wool, 1, 11), new PriceInfo(1, 2)),
new ListItemForEmeralds(new ItemStack(Blocks.wool, 1, 12), new PriceInfo(1, 2)),
new ListItemForEmeralds(new ItemStack(Blocks.wool, 1, 13), new PriceInfo(1, 2)),
new ListItemForEmeralds(new ItemStack(Blocks.wool, 1, 14), new PriceInfo(1, 2)),
new ListItemForEmeralds(new ItemStack(Blocks.wool, 1, 15), new PriceInfo(1, 2))
}
},
{
{
new EmeraldForItems(Items.string, new PriceInfo(15, 20)),
new ListItemForEmeralds(Items.arrow, new PriceInfo(-12, -8))
},
{
new ListItemForEmeralds(Items.bow, new PriceInfo(2, 3)),
new ItemAndEmeraldToItem(Item.getItemFromBlock(Blocks.gravel), new PriceInfo(10, 10), Items.flint, new PriceInfo(6, 10))
}
}
},
{
{
{
new EmeraldForItems(Items.paper, new PriceInfo(24, 36)),
new ListEnchantedBookForEmeralds()
},
{
new EmeraldForItems(Items.book, new PriceInfo(8, 10)),
new ListItemForEmeralds(Items.compass, new PriceInfo(10, 12)),
new ListItemForEmeralds(Item.getItemFromBlock(Blocks.bookshelf), new PriceInfo(3, 4))
},
{
new EmeraldForItems(Items.written_book, new PriceInfo(2, 2)),
new ListItemForEmeralds(Items.clock, new PriceInfo(10, 12)),
new ListItemForEmeralds(Item.getItemFromBlock(Blocks.glass), new PriceInfo(-5, -3))
},
{
new ListEnchantedBookForEmeralds()
},
{
new ListEnchantedBookForEmeralds()
},
{
new ListItemForEmeralds(Items.name_tag, new PriceInfo(20, 22))
}
}
},
{
{
{
new EmeraldForItems(Items.rotten_flesh, new PriceInfo(36, 40)),
new EmeraldForItems(Items.gold_ingot, new PriceInfo(8, 10))
},
{
new ListItemForEmeralds(Items.redstone, new PriceInfo(-4, -1)),
new ListItemForEmeralds(new ItemStack(Items.dye, 1, EnumDyeColor.BLUE.getDyeDamage()), new PriceInfo(-2, -1))
},
{
new ListItemForEmeralds(Items.ender_pearl, new PriceInfo(4, 7)),
new ListItemForEmeralds(Item.getItemFromBlock(Blocks.glowstone), new PriceInfo(-3, -1))
},
{
new ListItemForEmeralds(Items.experience_bottle, new PriceInfo(3, 11))
}
}
},
{
{
{
new EmeraldForItems(Items.coal, new PriceInfo(16, 24)),
new ListItemForEmeralds(Items.iron_helmet, new PriceInfo(4, 6))
},
{
new EmeraldForItems(Items.iron_ingot, new PriceInfo(7, 9)),
new ListItemForEmeralds(Items.iron_chestplate, new PriceInfo(10, 14))
},
{
new EmeraldForItems(Items.diamond, new PriceInfo(3, 4)),
new ListEnchantedItemForEmeralds(Items.diamond_chestplate, new PriceInfo(16, 19))
},
{
new ListItemForEmeralds(Items.chainmail_boots, new PriceInfo(5, 7)),
new ListItemForEmeralds(Items.chainmail_leggings, new PriceInfo(9, 11)),
new ListItemForEmeralds(Items.chainmail_helmet, new PriceInfo(5, 7)),
new ListItemForEmeralds(Items.chainmail_chestplate, new PriceInfo(11, 15))
}
},
{
{
new EmeraldForItems(Items.coal, new PriceInfo(16, 24)),
new ListItemForEmeralds(Items.iron_axe, new PriceInfo(6, 8))
},
{
new EmeraldForItems(Items.iron_ingot, new PriceInfo(7, 9)),
new ListEnchantedItemForEmeralds(Items.iron_sword, new PriceInfo(9, 10))
},
{
new EmeraldForItems(Items.diamond, new PriceInfo(3, 4)),
new ListEnchantedItemForEmeralds(Items.diamond_sword, new PriceInfo(12, 15)),
new ListEnchantedItemForEmeralds(Items.diamond_axe, new PriceInfo(9, 12))
}
},
{
{
new EmeraldForItems(Items.coal, new PriceInfo(16, 24)),
new ListEnchantedItemForEmeralds(Items.iron_shovel, new PriceInfo(5, 7))
},
{
new EmeraldForItems(Items.iron_ingot, new PriceInfo(7, 9)),
new ListEnchantedItemForEmeralds(Items.iron_pickaxe, new PriceInfo(9, 11))
},
{
new EmeraldForItems(Items.diamond, new PriceInfo(3, 4)),
new ListEnchantedItemForEmeralds(Items.diamond_pickaxe, new PriceInfo(12, 15))
}
}
},
{
{
{
new EmeraldForItems(Items.porkchop, new PriceInfo(14, 18)),
new EmeraldForItems(Items.chicken, new PriceInfo(14, 18))
},
{
new EmeraldForItems(Items.coal, new PriceInfo(16, 24)),
new ListItemForEmeralds(Items.cooked_porkchop, new PriceInfo(-7, -5)),
new ListItemForEmeralds(Items.cooked_chicken, new PriceInfo(-8, -6))
}
},
{
{
new EmeraldForItems(Items.leather, new PriceInfo(9, 12)),
new ListItemForEmeralds(Items.leather_leggings, new PriceInfo(2, 4))
},
{
new ListEnchantedItemForEmeralds(Items.leather_chestplate, new PriceInfo(7, 12))
},
{
new ListItemForEmeralds(Items.saddle, new PriceInfo(8, 10))
}
}
}
};
private static final ITradeList[][][][] trades = EntityVillager.GET_TRADES_DONT_USE();
}
}

View File

@ -158,7 +158,7 @@ public class ItemHandlerHelper
if (remainder == null || remainder.stackSize != stack.stackSize)
{
world.playSound(player, player.posX, player.posY, player.posZ,
SoundEvents.entity_item_pickup, SoundCategory.PLAYERS, 0.2F, ((world.rand.nextFloat() - world.rand.nextFloat()) * 0.7F + 1.0F) * 2.0F);
SoundEvents.ENTITY_ITEM_PICKUP, SoundCategory.PLAYERS, 0.2F, ((world.rand.nextFloat() - world.rand.nextFloat()) * 0.7F + 1.0F) * 2.0F);
}
// drop remaining itemstack into the world

View File

@ -57,196 +57,196 @@ public class OreDictionary
if (!hasInit)
{
// tree- and wood-related things
registerOre("logWood", new ItemStack(Blocks.log, 1, WILDCARD_VALUE));
registerOre("logWood", new ItemStack(Blocks.log2, 1, WILDCARD_VALUE));
registerOre("plankWood", new ItemStack(Blocks.planks, 1, WILDCARD_VALUE));
registerOre("slabWood", new ItemStack(Blocks.wooden_slab, 1, WILDCARD_VALUE));
registerOre("stairWood", Blocks.oak_stairs);
registerOre("stairWood", Blocks.spruce_stairs);
registerOre("stairWood", Blocks.birch_stairs);
registerOre("stairWood", Blocks.jungle_stairs);
registerOre("stairWood", Blocks.acacia_stairs);
registerOre("stairWood", Blocks.dark_oak_stairs);
registerOre("stickWood", Items.stick);
registerOre("treeSapling", new ItemStack(Blocks.sapling, 1, WILDCARD_VALUE));
registerOre("treeLeaves", new ItemStack(Blocks.leaves, 1, WILDCARD_VALUE));
registerOre("treeLeaves", new ItemStack(Blocks.leaves2, 1, WILDCARD_VALUE));
registerOre("vine", Blocks.vine);
registerOre("logWood", new ItemStack(Blocks.LOG, 1, WILDCARD_VALUE));
registerOre("logWood", new ItemStack(Blocks.LOG2, 1, WILDCARD_VALUE));
registerOre("plankWood", new ItemStack(Blocks.PLANKS, 1, WILDCARD_VALUE));
registerOre("slabWood", new ItemStack(Blocks.WOODEN_SLAB, 1, WILDCARD_VALUE));
registerOre("stairWood", Blocks.OAK_STAIRS);
registerOre("stairWood", Blocks.SPRUCE_STAIRS);
registerOre("stairWood", Blocks.BIRCH_STAIRS);
registerOre("stairWood", Blocks.JUNGLE_STAIRS);
registerOre("stairWood", Blocks.ACACIA_STAIRS);
registerOre("stairWood", Blocks.DARK_OAK_STAIRS);
registerOre("stickWood", Items.STICK);
registerOre("treeSapling", new ItemStack(Blocks.SAPLING, 1, WILDCARD_VALUE));
registerOre("treeLeaves", new ItemStack(Blocks.LEAVES, 1, WILDCARD_VALUE));
registerOre("treeLeaves", new ItemStack(Blocks.LEAVES2, 1, WILDCARD_VALUE));
registerOre("vine", Blocks.VINE);
// Ores
registerOre("oreGold", Blocks.gold_ore);
registerOre("oreIron", Blocks.iron_ore);
registerOre("oreLapis", Blocks.lapis_ore);
registerOre("oreDiamond", Blocks.diamond_ore);
registerOre("oreRedstone", Blocks.redstone_ore);
registerOre("oreEmerald", Blocks.emerald_ore);
registerOre("oreQuartz", Blocks.quartz_ore);
registerOre("oreCoal", Blocks.coal_ore);
registerOre("oreGold", Blocks.GOLD_ORE);
registerOre("oreIron", Blocks.IRON_ORE);
registerOre("oreLapis", Blocks.LAPIS_ORE);
registerOre("oreDiamond", Blocks.DIAMOND_ORE);
registerOre("oreRedstone", Blocks.REDSTONE_ORE);
registerOre("oreEmerald", Blocks.EMERALD_ORE);
registerOre("oreQuartz", Blocks.QUARTZ_ORE);
registerOre("oreCoal", Blocks.COAL_ORE);
// ingots/nuggets
registerOre("ingotIron", Items.iron_ingot);
registerOre("ingotGold", Items.gold_ingot);
registerOre("ingotBrick", Items.brick);
registerOre("ingotBrickNether", Items.netherbrick);
registerOre("nuggetGold", Items.gold_nugget);
registerOre("ingotIron", Items.IRON_INGOT);
registerOre("ingotGold", Items.GOLD_INGOT);
registerOre("ingotBrick", Items.BRICK);
registerOre("ingotBrickNether", Items.NETHERBRICK);
registerOre("nuggetGold", Items.GOLD_NUGGET);
// gems and dusts
registerOre("gemDiamond", Items.diamond);
registerOre("gemEmerald", Items.emerald);
registerOre("gemQuartz", Items.quartz);
registerOre("gemPrismarine", Items.prismarine_shard);
registerOre("dustPrismarine", Items.prismarine_crystals);
registerOre("dustRedstone", Items.redstone);
registerOre("dustGlowstone", Items.glowstone_dust);
registerOre("gemLapis", new ItemStack(Items.dye, 1, 4));
registerOre("gemDiamond", Items.DIAMOND);
registerOre("gemEmerald", Items.EMERALD);
registerOre("gemQuartz", Items.QUARTZ);
registerOre("gemPrismarine", Items.PRISMARINE_SHARD);
registerOre("dustPrismarine", Items.PRISMARINE_CRYSTALS);
registerOre("dustRedstone", Items.REDSTONE);
registerOre("dustGlowstone", Items.GLOWSTONE_DUST);
registerOre("gemLapis", new ItemStack(Items.DYE, 1, 4));
// storage blocks
registerOre("blockGold", Blocks.gold_block);
registerOre("blockIron", Blocks.iron_block);
registerOre("blockLapis", Blocks.lapis_block);
registerOre("blockDiamond", Blocks.diamond_block);
registerOre("blockRedstone", Blocks.redstone_block);
registerOre("blockEmerald", Blocks.emerald_block);
registerOre("blockQuartz", Blocks.quartz_block);
registerOre("blockCoal", Blocks.coal_block);
registerOre("blockGold", Blocks.GOLD_BLOCK);
registerOre("blockIron", Blocks.IRON_BLOCK);
registerOre("blockLapis", Blocks.LAPIS_BLOCK);
registerOre("blockDiamond", Blocks.DIAMOND_BLOCK);
registerOre("blockRedstone", Blocks.REDSTONE_BLOCK);
registerOre("blockEmerald", Blocks.EMERALD_BLOCK);
registerOre("blockQuartz", Blocks.QUARTZ_BLOCK);
registerOre("blockCoal", Blocks.COAL_BLOCK);
// crops
registerOre("cropWheat", Items.wheat);
registerOre("cropPotato", Items.potato);
registerOre("cropCarrot", Items.carrot);
registerOre("cropNetherWart", Items.nether_wart);
registerOre("sugarcane", Items.reeds);
registerOre("blockCactus", Blocks.cactus);
registerOre("cropWheat", Items.WHEAT);
registerOre("cropPotato", Items.POTATO);
registerOre("cropCarrot", Items.CARROT);
registerOre("cropNetherWart", Items.NETHER_WART);
registerOre("sugarcane", Items.REEDS);
registerOre("blockCactus", Blocks.CACTUS);
// misc materials
registerOre("dye", new ItemStack(Items.dye, 1, WILDCARD_VALUE));
registerOre("paper", new ItemStack(Items.paper));
registerOre("dye", new ItemStack(Items.DYE, 1, WILDCARD_VALUE));
registerOre("paper", new ItemStack(Items.PAPER));
// mob drops
registerOre("slimeball", Items.slime_ball);
registerOre("enderpearl", Items.ender_pearl);
registerOre("bone", Items.bone);
registerOre("gunpowder", Items.gunpowder);
registerOre("string", Items.string);
registerOre("netherStar", Items.nether_star);
registerOre("leather", Items.leather);
registerOre("feather", Items.feather);
registerOre("egg", Items.egg);
registerOre("slimeball", Items.SLIME_BALL);
registerOre("enderpearl", Items.ENDER_PEARL);
registerOre("bone", Items.BONE);
registerOre("gunpowder", Items.GUNPOWDER);
registerOre("string", Items.STRING);
registerOre("netherStar", Items.NETHER_STAR);
registerOre("leather", Items.LEATHER);
registerOre("feather", Items.FEATHER);
registerOre("egg", Items.EGG);
// records
registerOre("record", Items.record_13);
registerOre("record", Items.record_cat);
registerOre("record", Items.record_blocks);
registerOre("record", Items.record_chirp);
registerOre("record", Items.record_far);
registerOre("record", Items.record_mall);
registerOre("record", Items.record_mellohi);
registerOre("record", Items.record_stal);
registerOre("record", Items.record_strad);
registerOre("record", Items.record_ward);
registerOre("record", Items.record_11);
registerOre("record", Items.record_wait);
registerOre("record", Items.RECORD_13);
registerOre("record", Items.RECORD_CAT);
registerOre("record", Items.RECORD_BLOCKS);
registerOre("record", Items.RECORD_CHIRP);
registerOre("record", Items.RECORD_FAR);
registerOre("record", Items.RECORD_MALL);
registerOre("record", Items.RECORD_MELLOHI);
registerOre("record", Items.RECORD_STAL);
registerOre("record", Items.RECORD_STRAD);
registerOre("record", Items.RECORD_WARD);
registerOre("record", Items.RECORD_11);
registerOre("record", Items.RECORD_WAIT);
// blocks
registerOre("dirt", Blocks.dirt);
registerOre("grass", Blocks.grass);
registerOre("stone", Blocks.stone);
registerOre("cobblestone", Blocks.cobblestone);
registerOre("gravel", Blocks.gravel);
registerOre("sand", new ItemStack(Blocks.sand, 1, WILDCARD_VALUE));
registerOre("sandstone", new ItemStack(Blocks.sandstone, 1, WILDCARD_VALUE));
registerOre("sandstone", new ItemStack(Blocks.red_sandstone, 1, WILDCARD_VALUE));
registerOre("netherrack", Blocks.netherrack);
registerOre("obsidian", Blocks.obsidian);
registerOre("glowstone", Blocks.glowstone);
registerOre("endstone", Blocks.end_stone);
registerOre("torch", Blocks.torch);
registerOre("workbench", Blocks.crafting_table);
registerOre("blockSlime", Blocks.slime_block);
registerOre("blockPrismarine", new ItemStack(Blocks.prismarine, 1, BlockPrismarine.EnumType.ROUGH.getMetadata()));
registerOre("blockPrismarineBrick", new ItemStack(Blocks.prismarine, 1, BlockPrismarine.EnumType.BRICKS.getMetadata()));
registerOre("blockPrismarineDark", new ItemStack(Blocks.prismarine, 1, BlockPrismarine.EnumType.DARK.getMetadata()));
registerOre("stoneGranite", new ItemStack(Blocks.stone, 1, 1));
registerOre("stoneGranitePolished", new ItemStack(Blocks.stone, 1, 2));
registerOre("stoneDiorite", new ItemStack(Blocks.stone, 1, 3));
registerOre("stoneDioritePolished", new ItemStack(Blocks.stone, 1, 4));
registerOre("stoneAndesite", new ItemStack(Blocks.stone, 1, 5));
registerOre("stoneAndesitePolished", new ItemStack(Blocks.stone, 1, 6));
registerOre("blockGlassColorless", Blocks.glass);
registerOre("blockGlass", Blocks.glass);
registerOre("blockGlass", new ItemStack(Blocks.stained_glass, 1, WILDCARD_VALUE));
registerOre("dirt", Blocks.DIRT);
registerOre("grass", Blocks.GRASS);
registerOre("stone", Blocks.STONE);
registerOre("cobblestone", Blocks.COBBLESTONE);
registerOre("gravel", Blocks.GRAVEL);
registerOre("sand", new ItemStack(Blocks.SAND, 1, WILDCARD_VALUE));
registerOre("sandstone", new ItemStack(Blocks.SANDSTONE, 1, WILDCARD_VALUE));
registerOre("sandstone", new ItemStack(Blocks.RED_SANDSTONE, 1, WILDCARD_VALUE));
registerOre("netherrack", Blocks.NETHERRACK);
registerOre("obsidian", Blocks.OBSIDIAN);
registerOre("glowstone", Blocks.GLOWSTONE);
registerOre("endstone", Blocks.END_STONE);
registerOre("torch", Blocks.TORCH);
registerOre("workbench", Blocks.CRAFTING_TABLE);
registerOre("blockSlime", Blocks.SLIME_BLOCK);
registerOre("blockPrismarine", new ItemStack(Blocks.PRISMARINE, 1, BlockPrismarine.EnumType.ROUGH.getMetadata()));
registerOre("blockPrismarineBrick", new ItemStack(Blocks.PRISMARINE, 1, BlockPrismarine.EnumType.BRICKS.getMetadata()));
registerOre("blockPrismarineDark", new ItemStack(Blocks.PRISMARINE, 1, BlockPrismarine.EnumType.DARK.getMetadata()));
registerOre("stoneGranite", new ItemStack(Blocks.STONE, 1, 1));
registerOre("stoneGranitePolished", new ItemStack(Blocks.STONE, 1, 2));
registerOre("stoneDiorite", new ItemStack(Blocks.STONE, 1, 3));
registerOre("stoneDioritePolished", new ItemStack(Blocks.STONE, 1, 4));
registerOre("stoneAndesite", new ItemStack(Blocks.STONE, 1, 5));
registerOre("stoneAndesitePolished", new ItemStack(Blocks.STONE, 1, 6));
registerOre("blockGlassColorless", Blocks.GLASS);
registerOre("blockGlass", Blocks.GLASS);
registerOre("blockGlass", new ItemStack(Blocks.STAINED_GLASS, 1, WILDCARD_VALUE));
//blockGlass{Color} is added below with dyes
registerOre("paneGlassColorless", Blocks.glass_pane);
registerOre("paneGlass", Blocks.glass_pane);
registerOre("paneGlass", new ItemStack(Blocks.stained_glass_pane, 1, WILDCARD_VALUE));
registerOre("paneGlassColorless", Blocks.GLASS_PANE);
registerOre("paneGlass", Blocks.GLASS_PANE);
registerOre("paneGlass", new ItemStack(Blocks.STAINED_GLASS_PANE, 1, WILDCARD_VALUE));
//paneGlass{Color} is added below with dyes
// chests
registerOre("chest", Blocks.chest);
registerOre("chest", Blocks.ender_chest);
registerOre("chest", Blocks.trapped_chest);
registerOre("chestWood", Blocks.chest);
registerOre("chestEnder", Blocks.ender_chest);
registerOre("chestTrapped", Blocks.trapped_chest);
registerOre("chest", Blocks.CHEST);
registerOre("chest", Blocks.ENDER_CHEST);
registerOre("chest", Blocks.TRAPPED_CHEST);
registerOre("chestWood", Blocks.CHEST);
registerOre("chestEnder", Blocks.ENDER_CHEST);
registerOre("chestTrapped", Blocks.TRAPPED_CHEST);
}
// Build our list of items to replace with ore tags
Map<ItemStack, String> replacements = new HashMap<ItemStack, String>();
// wood-related things
replacements.put(new ItemStack(Items.stick), "stickWood");
replacements.put(new ItemStack(Blocks.planks), "plankWood");
replacements.put(new ItemStack(Blocks.planks, 1, WILDCARD_VALUE), "plankWood");
replacements.put(new ItemStack(Blocks.wooden_slab, 1, WILDCARD_VALUE), "slabWood");
replacements.put(new ItemStack(Items.STICK), "stickWood");
replacements.put(new ItemStack(Blocks.PLANKS), "plankWood");
replacements.put(new ItemStack(Blocks.PLANKS, 1, WILDCARD_VALUE), "plankWood");
replacements.put(new ItemStack(Blocks.WOODEN_SLAB, 1, WILDCARD_VALUE), "slabWood");
// ingots/nuggets
replacements.put(new ItemStack(Items.gold_ingot), "ingotGold");
replacements.put(new ItemStack(Items.iron_ingot), "ingotIron");
replacements.put(new ItemStack(Items.GOLD_INGOT), "ingotGold");
replacements.put(new ItemStack(Items.IRON_INGOT), "ingotIron");
// gems and dusts
replacements.put(new ItemStack(Items.diamond), "gemDiamond");
replacements.put(new ItemStack(Items.emerald), "gemEmerald");
replacements.put(new ItemStack(Items.prismarine_shard), "gemPrismarine");
replacements.put(new ItemStack(Items.prismarine_crystals), "dustPrismarine");
replacements.put(new ItemStack(Items.redstone), "dustRedstone");
replacements.put(new ItemStack(Items.glowstone_dust), "dustGlowstone");
replacements.put(new ItemStack(Items.DIAMOND), "gemDiamond");
replacements.put(new ItemStack(Items.EMERALD), "gemEmerald");
replacements.put(new ItemStack(Items.PRISMARINE_SHARD), "gemPrismarine");
replacements.put(new ItemStack(Items.PRISMARINE_CRYSTALS), "dustPrismarine");
replacements.put(new ItemStack(Items.REDSTONE), "dustRedstone");
replacements.put(new ItemStack(Items.GLOWSTONE_DUST), "dustGlowstone");
// crops
replacements.put(new ItemStack(Items.reeds), "sugarcane");
replacements.put(new ItemStack(Blocks.cactus), "blockCactus");
replacements.put(new ItemStack(Items.REEDS), "sugarcane");
replacements.put(new ItemStack(Blocks.CACTUS), "blockCactus");
// misc materials
replacements.put(new ItemStack(Items.paper), "paper");
replacements.put(new ItemStack(Items.PAPER), "paper");
// mob drops
replacements.put(new ItemStack(Items.slime_ball), "slimeball");
replacements.put(new ItemStack(Items.string), "string");
replacements.put(new ItemStack(Items.leather), "leather");
replacements.put(new ItemStack(Items.ender_pearl), "enderpearl");
replacements.put(new ItemStack(Items.gunpowder), "gunpowder");
replacements.put(new ItemStack(Items.nether_star), "netherStar");
replacements.put(new ItemStack(Items.feather), "feather");
replacements.put(new ItemStack(Items.bone), "bone");
replacements.put(new ItemStack(Items.egg), "egg");
replacements.put(new ItemStack(Items.SLIME_BALL), "slimeball");
replacements.put(new ItemStack(Items.STRING), "string");
replacements.put(new ItemStack(Items.LEATHER), "leather");
replacements.put(new ItemStack(Items.ENDER_PEARL), "enderpearl");
replacements.put(new ItemStack(Items.GUNPOWDER), "gunpowder");
replacements.put(new ItemStack(Items.NETHER_STAR), "netherStar");
replacements.put(new ItemStack(Items.FEATHER), "feather");
replacements.put(new ItemStack(Items.BONE), "bone");
replacements.put(new ItemStack(Items.EGG), "egg");
// blocks
replacements.put(new ItemStack(Blocks.stone), "stone");
replacements.put(new ItemStack(Blocks.cobblestone), "cobblestone");
replacements.put(new ItemStack(Blocks.cobblestone, 1, WILDCARD_VALUE), "cobblestone");
replacements.put(new ItemStack(Blocks.glowstone), "glowstone");
replacements.put(new ItemStack(Blocks.glass), "blockGlassColorless");
replacements.put(new ItemStack(Blocks.prismarine), "prismarine");
replacements.put(new ItemStack(Blocks.stone, 1, 1), "stoneGranite");
replacements.put(new ItemStack(Blocks.stone, 1, 2), "stoneGranitePolished");
replacements.put(new ItemStack(Blocks.stone, 1, 3), "stoneDiorite");
replacements.put(new ItemStack(Blocks.stone, 1, 4), "stoneDioritePolished");
replacements.put(new ItemStack(Blocks.stone, 1, 5), "stoneAndesite");
replacements.put(new ItemStack(Blocks.stone, 1, 6), "stoneAndesitePolished");
replacements.put(new ItemStack(Blocks.STONE), "stone");
replacements.put(new ItemStack(Blocks.COBBLESTONE), "cobblestone");
replacements.put(new ItemStack(Blocks.COBBLESTONE, 1, WILDCARD_VALUE), "cobblestone");
replacements.put(new ItemStack(Blocks.GLOWSTONE), "glowstone");
replacements.put(new ItemStack(Blocks.GLASS), "blockGlassColorless");
replacements.put(new ItemStack(Blocks.PRISMARINE), "prismarine");
replacements.put(new ItemStack(Blocks.STONE, 1, 1), "stoneGranite");
replacements.put(new ItemStack(Blocks.STONE, 1, 2), "stoneGranitePolished");
replacements.put(new ItemStack(Blocks.STONE, 1, 3), "stoneDiorite");
replacements.put(new ItemStack(Blocks.STONE, 1, 4), "stoneDioritePolished");
replacements.put(new ItemStack(Blocks.STONE, 1, 5), "stoneAndesite");
replacements.put(new ItemStack(Blocks.STONE, 1, 6), "stoneAndesitePolished");
// chests
replacements.put(new ItemStack(Blocks.chest), "chestWood");
replacements.put(new ItemStack(Blocks.ender_chest), "chestEnder");
replacements.put(new ItemStack(Blocks.trapped_chest), "chestTrapped");
replacements.put(new ItemStack(Blocks.CHEST), "chestWood");
replacements.put(new ItemStack(Blocks.ENDER_CHEST), "chestEnder");
replacements.put(new ItemStack(Blocks.TRAPPED_CHEST), "chestTrapped");
// Register dyes
String[] dyes =
@ -271,9 +271,9 @@ public class OreDictionary
for(int i = 0; i < 16; i++)
{
ItemStack dye = new ItemStack(Items.dye, 1, i);
ItemStack block = new ItemStack(Blocks.stained_glass, 1, 15 - i);
ItemStack pane = new ItemStack(Blocks.stained_glass_pane, 1, 15 - i);
ItemStack dye = new ItemStack(Items.DYE, 1, i);
ItemStack block = new ItemStack(Blocks.STAINED_GLASS, 1, 15 - i);
ItemStack pane = new ItemStack(Blocks.STAINED_GLASS_PANE, 1, 15 - i);
if (!hasInit)
{
registerOre("dye" + dyes[i], dye);
@ -291,32 +291,32 @@ public class OreDictionary
// Ignore recipes for the following items
ItemStack[] exclusions = new ItemStack[]
{
new ItemStack(Blocks.lapis_block),
new ItemStack(Items.cookie),
new ItemStack(Blocks.stonebrick),
new ItemStack(Blocks.stone_slab, 1, WILDCARD_VALUE),
new ItemStack(Blocks.stone_stairs),
new ItemStack(Blocks.cobblestone_wall),
new ItemStack(Blocks.oak_fence),
new ItemStack(Blocks.oak_fence_gate),
new ItemStack(Blocks.oak_stairs),
new ItemStack(Blocks.spruce_fence),
new ItemStack(Blocks.spruce_fence_gate),
new ItemStack(Blocks.spruce_stairs),
new ItemStack(Blocks.birch_fence),
new ItemStack(Blocks.birch_fence_gate),
new ItemStack(Blocks.birch_stairs),
new ItemStack(Blocks.jungle_fence),
new ItemStack(Blocks.jungle_fence_gate),
new ItemStack(Blocks.jungle_stairs),
new ItemStack(Blocks.acacia_fence),
new ItemStack(Blocks.acacia_fence_gate),
new ItemStack(Blocks.acacia_stairs),
new ItemStack(Blocks.dark_oak_fence),
new ItemStack(Blocks.dark_oak_fence_gate),
new ItemStack(Blocks.dark_oak_stairs),
new ItemStack(Blocks.wooden_slab),
new ItemStack(Blocks.glass_pane),
new ItemStack(Blocks.LAPIS_BLOCK),
new ItemStack(Items.COOKIE),
new ItemStack(Blocks.STONEBRICK),
new ItemStack(Blocks.STONE_SLAB, 1, WILDCARD_VALUE),
new ItemStack(Blocks.STONE_STAIRS),
new ItemStack(Blocks.COBBLESTONE_WALL),
new ItemStack(Blocks.OAK_FENCE),
new ItemStack(Blocks.OAK_FENCE_GATE),
new ItemStack(Blocks.OAK_STAIRS),
new ItemStack(Blocks.SPRUCE_FENCE),
new ItemStack(Blocks.SPRUCE_FENCE_GATE),
new ItemStack(Blocks.SPRUCE_STAIRS),
new ItemStack(Blocks.BIRCH_STAIRS),
new ItemStack(Blocks.BIRCH_FENCE_GATE),
new ItemStack(Blocks.BIRCH_STAIRS),
new ItemStack(Blocks.JUNGLE_FENCE),
new ItemStack(Blocks.JUNGLE_FENCE_GATE),
new ItemStack(Blocks.JUNGLE_STAIRS),
new ItemStack(Blocks.ACACIA_FENCE),
new ItemStack(Blocks.ACACIA_FENCE_GATE),
new ItemStack(Blocks.ACACIA_STAIRS),
new ItemStack(Blocks.DARK_OAK_FENCE),
new ItemStack(Blocks.DARK_OAK_FENCE_GATE),
new ItemStack(Blocks.DARK_OAK_STAIRS),
new ItemStack(Blocks.WOODEN_SLAB),
new ItemStack(Blocks.GLASS_PANE),
null //So the above can have a comma and we don't have to keep editing extra lines.
};

View File

@ -42,8 +42,8 @@ net/minecraft/client/renderer/block/model/FaceBakery.rotateVertex(Lorg/lwjgl/uti
net/minecraft/item/ItemBlock.setTileEntityNBT(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/player/EntityPlayer;)Z=|p_179224_0_,p_179224_1_,p_179224_2_,player
net/minecraft/server/management/PlayerList.initializeConnectionToPlayer(Lnet/minecraft/network/NetworkManager;Lnet/minecraft/entity/player/EntityPlayerMP;Lnet/minecraft/network/NetHandlerPlayServer;)V=|p_72355_1_,p_72355_2_,nethandlerplayserver
net/minecraft/item/ItemMonsterPlacer.spawnCreature(Lnet/minecraft/world/World;Ljava/lang/String;DDD)Lnet/minecraft/entity/Entity;=|p_77840_0_,name,p_77840_2_,p_77840_4_,p_77840_6_
net/minecraft/stats/StatList.replaceAllSimilarBlocks([Lnet/minecraft/stats/StatBase;Z)V=|p_75924_0_,useItemIds
net/minecraft/stats/StatList.mergeStatBases([Lnet/minecraft/stats/StatBase;Lnet/minecraft/block/Block;Lnet/minecraft/block/Block;Z)V=|p_151180_0_,p_151180_1_,p_151180_2_,useItemIds
net/minecraft/item/ItemStack.<init>(Lnet/minecraft/item/Item;IILnet/minecraft/nbt/NBTTagCompound;)V=|p_i1881_1_,p_i1881_2_,p_i1881_3_,capNBT

View File

@ -90,8 +90,8 @@ public class DynBucketTest
}
});
ModelBakery.registerItemVariants(dynBottle, bottle);
ModelLoader.setCustomModelResourceLocation(Item.itemRegistry.getObject(simpleTankName), 0, new ModelResourceLocation(simpleTankName, "normal"));
ModelLoader.setCustomModelResourceLocation(Item.itemRegistry.getObject(testItemName), 0, new ModelResourceLocation(new ResourceLocation("minecraft", "stick"), "inventory"));
ModelLoader.setCustomModelResourceLocation(Item.REGISTRY.getObject(simpleTankName), 0, new ModelResourceLocation(simpleTankName, "normal"));
ModelLoader.setCustomModelResourceLocation(Item.REGISTRY.getObject(testItemName), 0, new ModelResourceLocation(new ResourceLocation("minecraft", "stick"), "inventory"));
}
}
@ -125,7 +125,7 @@ public class DynBucketTest
//registerFluidContainer2(FluidRegistry.getFluid(TestGas.name), i++);
// Set TestFluidBlocks blockstate to use milk instead of testfluid for the texture to be loaded
FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluid("milk"), new ItemStack(Items.milk_bucket), FluidContainerRegistry.EMPTY_BUCKET);
FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluid("milk"), new ItemStack(Items.MILK_BUCKET), FluidContainerRegistry.EMPTY_BUCKET);
proxy.setupModels();
//MinecraftForge.EVENT_BUS.register(this);
@ -139,7 +139,7 @@ public class DynBucketTest
FluidStack fs = new FluidStack(fluid, FluidContainerRegistry.BUCKET_VOLUME);
ItemStack stack = new ItemStack(dynBucket, 1, meta);
FluidContainerRegistry.registerFluidContainer(fs, stack, new ItemStack(Items.bucket));
FluidContainerRegistry.registerFluidContainer(fs, stack, new ItemStack(Items.BUCKET));
}
@SuppressWarnings("unused")
@ -150,7 +150,7 @@ public class DynBucketTest
FluidStack fs = new FluidStack(fluid, 250);
ItemStack stack = new ItemStack(dynBottle, 1, meta);
FluidContainerRegistry.registerFluidContainer(fs, stack, new ItemStack(Items.glass_bottle));
FluidContainerRegistry.registerFluidContainer(fs, stack, new ItemStack(Items.GLASS_BOTTLE));
}
@SubscribeEvent
@ -182,17 +182,17 @@ public class DynBucketTest
ItemStackHandler handler2 = new ItemStackHandler(5);
IItemHandler joined = new CombinedInvWrapper(handler, handler2);
handler.setStackInSlot(0, new ItemStack(Blocks.stone));
handler.setStackInSlot(1, new ItemStack(Blocks.grass));
handler.setStackInSlot(2, new ItemStack(Blocks.dirt));
handler.setStackInSlot(3, new ItemStack(Blocks.glass));
handler.setStackInSlot(4, new ItemStack(Blocks.sand));
handler.setStackInSlot(0, new ItemStack(Blocks.STONE));
handler.setStackInSlot(1, new ItemStack(Blocks.GRASS));
handler.setStackInSlot(2, new ItemStack(Blocks.DIRT));
handler.setStackInSlot(3, new ItemStack(Blocks.GLASS));
handler.setStackInSlot(4, new ItemStack(Blocks.SAND));
handler2.setStackInSlot(0, new ItemStack(Blocks.slime_block));
handler2.setStackInSlot(1, new ItemStack(Blocks.tnt));
handler2.setStackInSlot(2, new ItemStack(Blocks.planks));
handler2.setStackInSlot(3, new ItemStack(Blocks.log));
handler2.setStackInSlot(4, new ItemStack(Blocks.diamond_block));
handler2.setStackInSlot(0, new ItemStack(Blocks.SLIME_BLOCK));
handler2.setStackInSlot(1, new ItemStack(Blocks.TNT));
handler2.setStackInSlot(2, new ItemStack(Blocks.PLANKS));
handler2.setStackInSlot(3, new ItemStack(Blocks.LOG));
handler2.setStackInSlot(4, new ItemStack(Blocks.DIAMOND_BLOCK));
for (int i = 0; i < handler.getSlots(); i++) {
System.out.println("Expected 1: " + handler.getStackInSlot(i));
@ -217,7 +217,7 @@ public class DynBucketTest
setUnlocalizedName("dynbucket");
setMaxStackSize(1);
setHasSubtypes(true);
setCreativeTab(CreativeTabs.tabMisc);
setCreativeTab(CreativeTabs.MISC);
}
@Override
@ -236,12 +236,12 @@ public class DynBucketTest
{
public DynBottle()
{
super(250, new ItemStack(Items.glass_bottle), true);
super(250, new ItemStack(Items.GLASS_BOTTLE), true);
setUnlocalizedName("dynbottle");
setRegistryName(new ResourceLocation(MODID, "dynbottle"));
setMaxStackSize(16);
setHasSubtypes(true);
setCreativeTab(CreativeTabs.tabMisc);
setCreativeTab(CreativeTabs.MISC);
}
}
@ -251,8 +251,8 @@ public class DynBucketTest
protected BlockSimpleTank()
{
super(Material.rock);
setCreativeTab(CreativeTabs.tabMisc);
super(Material.ROCK);
setCreativeTab(CreativeTabs.MISC);
}
@Override
@ -369,17 +369,17 @@ public class DynBucketTest
}
@Override
public NBTTagCompound func_189515_b(NBTTagCompound tags)
public NBTTagCompound writeToNBT(NBTTagCompound tags)
{
tags = super.func_189515_b(tags);
tags = super.writeToNBT(tags);
tank.writeToNBT(tags);
return tags;
}
@Override
public SPacketUpdateTileEntity func_189518_D_() {
public SPacketUpdateTileEntity getUpdatePacket() {
NBTTagCompound tag = new NBTTagCompound();
func_189515_b(tag);
tag = writeToNBT(tag);
return new SPacketUpdateTileEntity(this.getPos(), this.getBlockMetadata(), tag);
}

View File

@ -37,7 +37,7 @@ public class ForgeBlockStatesLoaderDebug {
//public static final Block blockCustom = new CustomMappedBlock();
public static final String nameCustomWall = "custom_wall";
public static final BlockWall blockCustomWall = new BlockWall(Blocks.cobblestone);
public static final BlockWall blockCustomWall = new BlockWall(Blocks.COBBLESTONE);
public static final ItemMultiTexture itemCustomWall = (ItemMultiTexture)new ItemMultiTexture(blockCustomWall, blockCustomWall, new Function<ItemStack, String>()
{
@Override

View File

@ -51,7 +51,7 @@ public class ItemLayerModelDebug
private TestItem()
{
setCreativeTab(CreativeTabs.tabBlock);
setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
setUnlocalizedName(MODID + ":" + name);
setRegistryName(new ResourceLocation(MODID, name));
}

View File

@ -123,8 +123,8 @@ public class ItemTileDebug
private TestBlock()
{
super(Material.iron);
setCreativeTab(CreativeTabs.tabBlock);
super(Material.IRON);
setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
setUnlocalizedName(MODID + ":" + name);
setRegistryName(new ResourceLocation(MODID, name));
}

View File

@ -34,7 +34,7 @@ public class LootTablesDebug {
LootPool main = event.getTable().getPool("main"); //Note: This CAN NPE if another mod removes things
main.removeEntry("minecraft:wooden_axe");
main.removeEntry("minecraft:stone_axe");
main.addEntry(new LootEntryItem(Items.diamond_chestplate, 1, 0, new LootFunction[0], new LootCondition[0], MODID + ":diamond_chestplate"));
main.addEntry(new LootEntryItem(Items.DIAMOND_CHESTPLATE, 1, 0, new LootFunction[0], new LootCondition[0], MODID + ":diamond_chestplate"));
// Get rid of all building mats. Which is pool #3, index starts at 0, but 0 is named "main"
event.getTable().removePool("pool3");

View File

@ -77,10 +77,10 @@ public class ModelAnimationDebug
{
public void preInit(FMLPreInitializationEvent event)
{
GameRegistry.register(new Block(Material.wood)
GameRegistry.register(new Block(Material.WOOD)
{
{
setCreativeTab(CreativeTabs.tabBlock);
setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
setUnlocalizedName(MODID + "." + blockName);
setRegistryName(blockId);
}
@ -152,7 +152,7 @@ public class ModelAnimationDebug
return true;
}
});
GameRegistry.register(new ItemBlock(Block.blockRegistry.getObject(blockId))
GameRegistry.register(new ItemBlock(Block.REGISTRY.getObject(blockId))
{
@Override
public ICapabilityProvider initCapabilities(ItemStack stack, NBTTagCompound nbt)
@ -181,7 +181,7 @@ public class ModelAnimationDebug
{
super.preInit(event);
B3DLoader.INSTANCE.addDomain(MODID);
ModelLoader.setCustomModelResourceLocation(Item.itemRegistry.getObject(blockId), 0, new ModelResourceLocation(blockId, "inventory"));
ModelLoader.setCustomModelResourceLocation(Item.REGISTRY.getObject(blockId), 0, new ModelResourceLocation(blockId, "inventory"));
ClientRegistry.bindTileEntitySpecialRenderer(Chest.class, new AnimationTESR<Chest>()
{
@Override
@ -219,7 +219,7 @@ public class ModelAnimationDebug
{
protected ResourceLocation getEntityTexture(EntityChest entity)
{
return TextureMap.locationBlocksTexture;
return TextureMap.LOCATION_BLOCKS_TEXTURE;
}
};
}

View File

@ -132,8 +132,8 @@ public class ModelBakeEventDebug
private CustomModelBlock()
{
super(Material.iron);
setCreativeTab(CreativeTabs.tabBlock);
super(Material.IRON);
setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
setUnlocalizedName(MODID + ":" + name);
setRegistryName(blockName);
}

View File

@ -158,8 +158,8 @@ public class ModelFluidDebug
private TestFluidBlock()
{
super(TestFluid.instance, Material.water);
setCreativeTab(CreativeTabs.tabBlock);
super(TestFluid.instance, Material.WATER);
setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
setUnlocalizedName(MODID + ":" + name);
setRegistryName(new ResourceLocation(MODID, name));
}
@ -172,8 +172,8 @@ public class ModelFluidDebug
private MilkFluidBlock()
{
super(milkFluid, Material.water);
setCreativeTab(CreativeTabs.tabBlock);
super(milkFluid, Material.WATER);
setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
setUnlocalizedName(MODID + ":" + name);
setRegistryName(new ResourceLocation(MODID, name));
}
@ -186,8 +186,8 @@ public class ModelFluidDebug
private TestGasBlock()
{
super(TestGas.instance, Material.lava);
setCreativeTab(CreativeTabs.tabBlock);
super(TestGas.instance, Material.LAVA);
setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
setUnlocalizedName(MODID + ":" + name);
setRegistryName(new ResourceLocation(MODID, name));
}

View File

@ -124,9 +124,9 @@ public class ModelLoaderRegistryDebug
private CustomModelBlock()
{
super(Material.iron);
super(Material.IRON);
this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH));
setCreativeTab(CreativeTabs.tabBlock);
setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
setUnlocalizedName(MODID + ":" + name);
setRegistryName(new ResourceLocation(MODID, name));
}
@ -225,8 +225,8 @@ public class ModelLoaderRegistryDebug
private OBJTesseractBlock()
{
super(Material.iron);
setCreativeTab(CreativeTabs.tabBlock);
super(Material.IRON);
setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
setUnlocalizedName(MODID + ":" + name);
setRegistryName(new ResourceLocation(MODID, name));
}
@ -371,8 +371,8 @@ public class ModelLoaderRegistryDebug
private OBJVertexColoring1()
{
super(Material.iron);
setCreativeTab(CreativeTabs.tabBlock);
super(Material.IRON);
setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
setUnlocalizedName(name);
setRegistryName(new ResourceLocation(MODID, name));
}
@ -403,9 +403,9 @@ public class ModelLoaderRegistryDebug
private OBJDirectionEye()
{
super(Material.iron);
super(Material.IRON);
setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH));
setCreativeTab(CreativeTabs.tabBlock);
setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
setUnlocalizedName(name);
setRegistryName(new ResourceLocation(MODID, name));
}
@ -487,8 +487,8 @@ public class ModelLoaderRegistryDebug
private OBJVertexColoring2()
{
super(Material.iron);
setCreativeTab(CreativeTabs.tabBlock);
super(Material.IRON);
setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
setUnlocalizedName(name);
setRegistryName(new ResourceLocation(MODID, name));
}
@ -590,9 +590,9 @@ public class ModelLoaderRegistryDebug
private OBJDirectionBlock()
{
super(Material.iron);
super(Material.IRON);
this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH));
setCreativeTab(CreativeTabs.tabBlock);
setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
setUnlocalizedName(MODID + ":" + name);
setRegistryName(new ResourceLocation(MODID, name));
}
@ -678,9 +678,9 @@ public class ModelLoaderRegistryDebug
private OBJCustomDataBlock()
{
super(Material.iron);
super(Material.IRON);
this.setDefaultState(this.blockState.getBaseState().withProperty(NORTH, false).withProperty(SOUTH, false).withProperty(WEST, false).withProperty(EAST, false));
setCreativeTab(CreativeTabs.tabBlock);
setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
setUnlocalizedName(MODID + ":" + name);
setRegistryName(new ResourceLocation(MODID, name));
}
@ -735,8 +735,8 @@ public class ModelLoaderRegistryDebug
public ExtendedBlockState state = new ExtendedBlockState(this, new IProperty[0], new IUnlistedProperty[] {OBJModel.OBJProperty.INSTANCE});
private OBJDynamicEye()
{
super(Material.iron);
setCreativeTab(CreativeTabs.tabBlock);
super(Material.IRON);
setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
setUnlocalizedName(MODID + ":" + name);
setRegistryName(new ResourceLocation(MODID, name));
}

View File

@ -32,10 +32,10 @@ public class MultiLayerModelDebug
{
public void preInit(FMLPreInitializationEvent event)
{
GameRegistry.register(new Block(Material.wood)
GameRegistry.register(new Block(Material.WOOD)
{
{
setCreativeTab(CreativeTabs.tabBlock);
setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
setUnlocalizedName(MODID + "." + blockName);
setRegistryName(blockId);
}
@ -52,7 +52,7 @@ public class MultiLayerModelDebug
return layer == BlockRenderLayer.SOLID || layer == BlockRenderLayer.TRANSLUCENT;
}
});
GameRegistry.register(new ItemBlock(Block.blockRegistry.getObject(blockId)).setRegistryName(blockId));
GameRegistry.register(new ItemBlock(Block.REGISTRY.getObject(blockId)).setRegistryName(blockId));
}
}
@ -64,7 +64,7 @@ public class MultiLayerModelDebug
public void preInit(FMLPreInitializationEvent event)
{
super.preInit(event);
ModelLoader.setCustomModelResourceLocation(Item.itemRegistry.getObject(blockId), 0, new ModelResourceLocation(blockId, "inventory"));
ModelLoader.setCustomModelResourceLocation(Item.REGISTRY.getObject(blockId), 0, new ModelResourceLocation(blockId, "inventory"));
}
}

View File

@ -60,7 +60,7 @@ public class PotionRegistryDebug {
public void renderInventoryEffect(int x, int y, PotionEffect effect, Minecraft mc) {
Potion potion = effect.getPotion();
mc.getTextureManager().bindTexture(TextureMap.locationBlocksTexture);
mc.getTextureManager().bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
TextureAtlasSprite sprite = mc.getTextureMapBlocks().getAtlasSprite("minecraft:blocks/fire_layer_0");
x += 6;
@ -89,7 +89,7 @@ public class PotionRegistryDebug {
public void renderHUDEffect(int x, int y, PotionEffect effect, Minecraft mc, float alpha) {
Potion potion = effect.getPotion();
mc.getTextureManager().bindTexture(TextureMap.locationBlocksTexture);
mc.getTextureManager().bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
TextureAtlasSprite sprite = mc.getTextureMapBlocks().getAtlasSprite("minecraft:blocks/tnt_side");
x += 3;

View File

@ -8,33 +8,33 @@ import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
@Mod(modid="BrewingRecipeRegistryTest", name="BrewingRecipeRegistryTest", version="0.0.0")
public class BrewingRecipeRegistryTest
public class BrewingRecipeRegistryTest
{
public static final boolean ENABLE = false;
@EventHandler
public void init(FMLInitializationEvent event)
public void init(FMLInitializationEvent event)
{
if(!ENABLE) return;
// The following adds a recipe that brews a piece of rotten flesh "into" a diamond sword resulting in a diamond hoe
BrewingRecipeRegistry.addRecipe(new ItemStack(Items.diamond_sword), new ItemStack(Items.rotten_flesh), new ItemStack(Items.diamond_hoe));
ItemStack output0 = BrewingRecipeRegistry.getOutput(new ItemStack(Items.diamond_sword), new ItemStack(Items.rotten_flesh));
if(output0.getItem() == Items.diamond_hoe)
// The following adds a recipe that brews a piece of rotten flesh "into" a diamond sword resulting in a diamond hoe
BrewingRecipeRegistry.addRecipe(new ItemStack(Items.DIAMOND_SWORD), new ItemStack(Items.ROTTEN_FLESH), new ItemStack(Items.DIAMOND_HOE));
ItemStack output0 = BrewingRecipeRegistry.getOutput(new ItemStack(Items.DIAMOND_SWORD), new ItemStack(Items.ROTTEN_FLESH));
if(output0.getItem() == Items.DIAMOND_HOE)
System.out.println("Recipe succefully registered and working. Diamond Hoe obtained.");
// Testing if OreDictionary support is working. Register a recipe that brews a gemDiamond into a gold sword resulting in a diamond sword
BrewingRecipeRegistry.addRecipe(new ItemStack(Items.golden_sword), "gemDiamond", new ItemStack(Items.diamond_sword));
ItemStack output1 = BrewingRecipeRegistry.getOutput(new ItemStack(Items.golden_sword), new ItemStack(Items.diamond));
if(output1.getItem() == Items.diamond_sword)
BrewingRecipeRegistry.addRecipe(new ItemStack(Items.GOLDEN_SWORD), "gemDiamond", new ItemStack(Items.DIAMOND_SWORD));
ItemStack output1 = BrewingRecipeRegistry.getOutput(new ItemStack(Items.GOLDEN_SWORD), new ItemStack(Items.DIAMOND));
if(output1.getItem() == Items.DIAMOND_SWORD)
System.out.println("Recipe succefully registered and working. Diamond Sword obtained.");
// In vanilla, brewing netherwart into a water bottle results in an awkward potion (with metadata 16). The following tests if that still happens
ItemStack output2 = BrewingRecipeRegistry.getOutput(new ItemStack(Items.potionitem, 1, 0), new ItemStack(Items.nether_wart));
if(output2 != null && output2.getItem() == Items.potionitem && output2.getItemDamage() == 16)
ItemStack output2 = BrewingRecipeRegistry.getOutput(new ItemStack(Items.POTIONITEM, 1, 0), new ItemStack(Items.NETHER_WART));
if(output2 != null && output2.getItem() == Items.POTIONITEM && output2.getItemDamage() == 16)
System.out.println("Vanilla behaviour still in place. Brewed Water Bottle with Nether Wart and got Awkward Potion");
}
}

View File

@ -15,12 +15,12 @@ public class FOVModifierTest {
@EventHandler
public void init(FMLInitializationEvent event)
{
MinecraftForge.EVENT_BUS.register(this);
MinecraftForge.EVENT_BUS.register(this);
}
@SubscribeEvent
public void getFOVModifier(EntityViewRenderEvent.FOVModifier event) {
if(event.getState().getMaterial() == Material.water)
if(event.getState().getMaterial() == Material.WATER)
event.setFOV(event.getFOV() / 60.0f * 50.0f);
}
}

View File

@ -152,7 +152,7 @@ public class NoBedSleepingTest
private ItemSleepingPill()
{
setCreativeTab(CreativeTabs.tabMisc);
setCreativeTab(CreativeTabs.MISC);
setUnlocalizedName(MODID + ":" + name);
setRegistryName(new ResourceLocation(MODID, name));
}

View File

@ -50,11 +50,11 @@ public class PlayerInteractEventTest
if (evt.getItemStack() != null)
{
if (evt.getItemStack().getItem() == Items.golden_pickaxe)
if (evt.getItemStack().getItem() == Items.GOLDEN_PICKAXE)
evt.setCanceled(true); // Redstone should not activate and pick should not be able to dig anything
if (evt.getItemStack().getItem() == Items.diamond_pickaxe)
if (evt.getItemStack().getItem() == Items.DIAMOND_PICKAXE)
evt.setUseBlock(Event.Result.DENY); // Redstone should not activate, pick should still dig
if (evt.getItemStack().getItem() == Items.iron_pickaxe)
if (evt.getItemStack().getItem() == Items.IRON_PICKAXE)
evt.setUseItem(Event.Result.DENY); // Pick should not dig, Redstone should still activate
}
@ -88,18 +88,18 @@ public class PlayerInteractEventTest
// Case: Flint and steel in main hand on top of a TE will light a fire, not open the TE.
// Note that if you do this on a chest, the f+s will fail, but then your off hand will open the chest
// If you dual wield flints and steels and right click a chest nothing should happen
if (evt.getItemStack() != null && evt.getItemStack().getItem() == Items.flint_and_steel)
if (evt.getItemStack() != null && evt.getItemStack().getItem() == Items.FLINT_AND_STEEL)
evt.setUseBlock(Event.Result.DENY);
// Case: Painting in main hand
// Opening a TE will also place a painting on the TE if possible
if (evt.getHand() == EnumHand.MAIN_HAND && evt.getItemStack() != null && evt.getItemStack().getItem() == Items.painting) {
if (evt.getHand() == EnumHand.MAIN_HAND && evt.getItemStack() != null && evt.getItemStack().getItem() == Items.PAINTING) {
evt.setUseItem(Event.Result.ALLOW);
}
// Spawn egg in main hand, block in offhand -> block should be placed
// Sword in main hand, spawn egg in offhand -> nothing should happen
if (evt.getItemStack() != null && evt.getItemStack().getItem() == Items.spawn_egg) {
if (evt.getItemStack() != null && evt.getItemStack().getItem() == Items.SPAWN_EGG) {
evt.setCanceled(true);
}
@ -115,7 +115,7 @@ public class PlayerInteractEventTest
// Case: Ender pearl in main hand, bow in offhand with arrows in inv -> Bow should trigger
// Case: Sword in main hand, ender pearl in offhand -> Nothing should happen
if (evt.getItemStack() != null && evt.getItemStack().getItem() == Items.ender_pearl)
if (evt.getItemStack() != null && evt.getItemStack().getItem() == Items.ENDER_PEARL)
evt.setCanceled(true);
}
@ -127,7 +127,7 @@ public class PlayerInteractEventTest
if (evt.getItemStack() != null
&& evt.getTarget() instanceof EntityArmorStand
&& evt.getItemStack().getItem() == Items.iron_helmet)
&& evt.getItemStack().getItem() == Items.IRON_HELMET)
evt.setCanceled(true); // Should not be able to place iron helmet onto armor stand (you will put it on instead)
if (evt.getWorld().isRemote

View File

@ -45,7 +45,7 @@ public class TestCapabilityMod
public void onInteract(PlayerInteractEvent.LeftClickBlock event)
{
if (event.getItemStack() == null) return;
if (event.getItemStack().getItem() != Items.stick) return;
if (event.getItemStack().getItem() != Items.STICK) return;
// This is just a example of how to interact with the TE, note the strong type binding that getCapability has
TileEntity te = event.getWorld().getTileEntity(event.getPos());
@ -55,7 +55,7 @@ public class TestCapabilityMod
IExampleCapability inv = te.getCapability(TEST_CAP, event.getFace());
System.out.println("Hi I'm a " + inv.getOwnerType());
}
if (event.getWorld().getBlockState(event.getPos()).getBlock() == Blocks.dirt)
if (event.getWorld().getBlockState(event.getPos()).getBlock() == Blocks.DIRT)
{
event.getEntityPlayer().addChatMessage(new TextComponentString(TextFormatting.RED + "" + TextFormatting.ITALIC + "TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST"));
event.setCanceled(true);