mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-20 04:09:51 +00:00
Updated to latest mappings. Exc is broken, some anonymous classes didn't map to srg names.
This commit is contained in:
1 parent
52e877bdd0
commit
4650ee2789
61 files changed
+400
-311
No files matched your search
@@ -146,7 +146,7 @@ public class BiomeDictionary
|
||||
{
|
||||
types = listSubTags(types);
|
||||
|
||||
if(BiomeGenBase.field_185377_q.getNameForObject(biome) != null)
|
||||
if(BiomeGenBase.biomeRegistry.getNameForObject(biome) != null)
|
||||
{
|
||||
for(Type type : types)
|
||||
{
|
||||
@@ -160,7 +160,7 @@ public class BiomeDictionary
|
||||
|
||||
if(!isBiomeRegistered(biome))
|
||||
{
|
||||
ResourceLocation location = BiomeGenBase.field_185377_q.getNameForObject(biome);
|
||||
ResourceLocation location = BiomeGenBase.biomeRegistry.getNameForObject(biome);
|
||||
biomeInfoMap.put(location, new BiomeInfo(types));
|
||||
}
|
||||
else
|
||||
@@ -248,7 +248,7 @@ public class BiomeDictionary
|
||||
*/
|
||||
public static boolean isBiomeRegistered(BiomeGenBase biome)
|
||||
{
|
||||
return biomeInfoMap.containsKey(BiomeGenBase.field_185377_q.getNameForObject(biome));
|
||||
return biomeInfoMap.containsKey(BiomeGenBase.biomeRegistry.getNameForObject(biome));
|
||||
}
|
||||
|
||||
public static void registerAllBiomes()
|
||||
@@ -264,9 +264,9 @@ public class BiomeDictionary
|
||||
*/
|
||||
public static void registerAllBiomesAndGenerateEvents()
|
||||
{
|
||||
for (ResourceLocation biomeResource : BiomeGenBase.field_185377_q.getKeys())
|
||||
for (ResourceLocation biomeResource : BiomeGenBase.biomeRegistry.getKeys())
|
||||
{
|
||||
BiomeGenBase biome = BiomeGenBase.field_185377_q.getObject(biomeResource);
|
||||
BiomeGenBase biome = BiomeGenBase.biomeRegistry.getObject(biomeResource);
|
||||
|
||||
if (biome.theBiomeDecorator instanceof DeferredBiomeDecorator)
|
||||
{
|
||||
@@ -289,7 +289,7 @@ public class BiomeDictionary
|
||||
{
|
||||
if (biome.theBiomeDecorator.treesPerChunk >= 3)
|
||||
{
|
||||
if (biome.isHighHumidity() && biome.func_185353_n() >= 0.9F)
|
||||
if (biome.isHighHumidity() && biome.getTemperature() >= 0.9F)
|
||||
{
|
||||
BiomeDictionary.registerBiomeType(biome, JUNGLE);
|
||||
}
|
||||
@@ -297,36 +297,36 @@ public class BiomeDictionary
|
||||
{
|
||||
BiomeDictionary.registerBiomeType(biome, FOREST);
|
||||
|
||||
if (biome.func_185353_n() <= 0.2f)
|
||||
if (biome.getTemperature() <= 0.2f)
|
||||
{
|
||||
BiomeDictionary.registerBiomeType(biome, CONIFEROUS);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(biome.func_185360_m() <= 0.3F && biome.func_185360_m() >= 0.0F)
|
||||
else if(biome.getHeightVariation() <= 0.3F && biome.getHeightVariation() >= 0.0F)
|
||||
{
|
||||
if(!biome.isHighHumidity() || biome.func_185355_j() >= 0.0F)
|
||||
if(!biome.isHighHumidity() || biome.getBaseHeight() >= 0.0F)
|
||||
{
|
||||
BiomeDictionary.registerBiomeType(biome, PLAINS);
|
||||
}
|
||||
}
|
||||
|
||||
if (biome.getFloatRainfall() > 0.85f)
|
||||
if (biome.getRainfall() > 0.85f)
|
||||
{
|
||||
BiomeDictionary.registerBiomeType(biome, WET);
|
||||
}
|
||||
|
||||
if (biome.getFloatRainfall() < 0.15f)
|
||||
if (biome.getRainfall() < 0.15f)
|
||||
{
|
||||
BiomeDictionary.registerBiomeType(biome, DRY);
|
||||
}
|
||||
|
||||
if (biome.func_185353_n() > 0.85f)
|
||||
if (biome.getTemperature() > 0.85f)
|
||||
{
|
||||
BiomeDictionary.registerBiomeType(biome, HOT);
|
||||
}
|
||||
|
||||
if (biome.func_185353_n() < 0.15f)
|
||||
if (biome.getTemperature() < 0.15f)
|
||||
{
|
||||
BiomeDictionary.registerBiomeType(biome, COLD);
|
||||
}
|
||||
@@ -340,14 +340,14 @@ public class BiomeDictionary
|
||||
BiomeDictionary.registerBiomeType(biome, DENSE);
|
||||
}
|
||||
|
||||
if (biome.isHighHumidity() && biome.func_185355_j() < 0.0F && (biome.func_185360_m() <= 0.3F && biome.func_185360_m() >= 0.0F))
|
||||
if (biome.isHighHumidity() && biome.getBaseHeight() < 0.0F && (biome.getHeightVariation() <= 0.3F && biome.getHeightVariation() >= 0.0F))
|
||||
{
|
||||
BiomeDictionary.registerBiomeType(biome, SWAMP);
|
||||
}
|
||||
|
||||
if (biome.func_185355_j() <= -0.5F)
|
||||
if (biome.getBaseHeight() <= -0.5F)
|
||||
{
|
||||
if (biome.func_185360_m() == 0.0F)
|
||||
if (biome.getHeightVariation() == 0.0F)
|
||||
{
|
||||
BiomeDictionary.registerBiomeType(biome, RIVER);
|
||||
}
|
||||
@@ -357,12 +357,12 @@ public class BiomeDictionary
|
||||
}
|
||||
}
|
||||
|
||||
if (biome.func_185360_m() >= 0.4F && biome.func_185360_m() < 1.5F)
|
||||
if (biome.getHeightVariation() >= 0.4F && biome.getHeightVariation() < 1.5F)
|
||||
{
|
||||
BiomeDictionary.registerBiomeType(biome, HILLS);
|
||||
}
|
||||
|
||||
if (biome.func_185360_m() >= 1.5F)
|
||||
if (biome.getHeightVariation() >= 1.5F)
|
||||
{
|
||||
BiomeDictionary.registerBiomeType(biome, MOUNTAIN);
|
||||
}
|
||||
@@ -372,7 +372,7 @@ public class BiomeDictionary
|
||||
BiomeDictionary.registerBiomeType(biome, SNOWY);
|
||||
}
|
||||
|
||||
if (biome.topBlock != Blocks.sand && biome.func_185353_n() >= 1.0f && biome.getFloatRainfall() < 0.2f)
|
||||
if (biome.topBlock != Blocks.sand && biome.getTemperature() >= 1.0f && biome.getRainfall() < 0.2f)
|
||||
{
|
||||
BiomeDictionary.registerBiomeType(biome, SAVANNA);
|
||||
}
|
||||
@@ -394,7 +394,7 @@ public class BiomeDictionary
|
||||
//Internal implementation
|
||||
private static BiomeInfo getBiomeInfo(BiomeGenBase biome)
|
||||
{
|
||||
return biomeInfoMap.get(BiomeGenBase.field_185377_q.getNameForObject(biome));
|
||||
return biomeInfoMap.get(BiomeGenBase.biomeRegistry.getNameForObject(biome));
|
||||
}
|
||||
|
||||
private static void checkRegistration(BiomeGenBase biome)
|
||||
|
||||
@@ -244,7 +244,7 @@ public class DimensionManager
|
||||
//WorldSettings worldSettings = new WorldSettings(overworld.getWorldInfo());
|
||||
|
||||
WorldServer world = (dim == 0 ? overworld : (WorldServer)(new WorldServerMulti(mcServer, savehandler, dim, overworld, mcServer.theProfiler).init()));
|
||||
world.addWorldAccess(new WorldManager(mcServer, world));
|
||||
world.addEventListener(new WorldManager(mcServer, world));
|
||||
MinecraftForge.EVENT_BUS.post(new WorldEvent.Load(world));
|
||||
if (!mcServer.isSinglePlayer())
|
||||
{
|
||||
|
||||
@@ -139,7 +139,7 @@ public class ForgeHooks
|
||||
{
|
||||
IBlockState state = world.getBlockState(pos);
|
||||
state = state.getBlock().getActualState(state, world, pos);
|
||||
if (state.func_185904_a().isToolNotRequired())
|
||||
if (state.getMaterial().isToolNotRequired())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -148,13 +148,13 @@ public class ForgeHooks
|
||||
String tool = block.getHarvestTool(state);
|
||||
if (stack == null || tool == null)
|
||||
{
|
||||
return player.func_184823_b(state);
|
||||
return player.canHarvestBlock(state);
|
||||
}
|
||||
|
||||
int toolLevel = stack.getItem().getHarvestLevel(stack, tool);
|
||||
if (toolLevel < 0)
|
||||
{
|
||||
return player.func_184823_b(state);
|
||||
return player.canHarvestBlock(state);
|
||||
}
|
||||
|
||||
return toolLevel >= block.getHarvestLevel(state);
|
||||
@@ -171,7 +171,7 @@ public class ForgeHooks
|
||||
|
||||
public static float blockStrength(IBlockState state, EntityPlayer player, World world, BlockPos pos)
|
||||
{
|
||||
float hardness = state.func_185887_b(world, pos);
|
||||
float hardness = state.getBlockHardness(world, pos);
|
||||
if (hardness < 0.0F)
|
||||
{
|
||||
return 0.0F;
|
||||
@@ -276,7 +276,7 @@ public class ForgeHooks
|
||||
IBlockState iblockstate = this.theWorld.getBlockState(blockpos);
|
||||
Block block = iblockstate.getBlock();
|
||||
|
||||
if (iblockstate.func_185904_a() == Material.air)
|
||||
if (iblockstate.getMaterial() == Material.air)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -428,22 +428,22 @@ public class ForgeHooks
|
||||
|
||||
if (te != null)
|
||||
{
|
||||
Minecraft.getMinecraft().func_184119_a(result, te);
|
||||
Minecraft.getMinecraft().storeTEInStack(result, te);
|
||||
}
|
||||
|
||||
if (isCreative)
|
||||
{
|
||||
player.inventory.func_184434_a(result);
|
||||
Minecraft.getMinecraft().playerController.sendSlotPacket(player.func_184586_b(EnumHand.MAIN_HAND), 36 + player.inventory.currentItem);
|
||||
Minecraft.getMinecraft().playerController.sendSlotPacket(player.getHeldItem(EnumHand.MAIN_HAND), 36 + player.inventory.currentItem);
|
||||
return true;
|
||||
}
|
||||
int slot = player.inventory.func_184429_b(result);
|
||||
int slot = player.inventory.getSlotFor(result);
|
||||
if (slot != -1)
|
||||
{
|
||||
if (InventoryPlayer.func_184435_e(slot))
|
||||
if (InventoryPlayer.isHotbar(slot))
|
||||
player.inventory.currentItem = slot;
|
||||
else
|
||||
Minecraft.getMinecraft().playerController.func_187100_a(slot);
|
||||
Minecraft.getMinecraft().playerController.pickItem(slot);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -656,7 +656,7 @@ public class ForgeHooks
|
||||
{
|
||||
// Logic from tryHarvestBlock for pre-canceling the event
|
||||
boolean preCancelEvent = false;
|
||||
if (gameType.isCreative() && entityPlayer.func_184614_ca() != null && entityPlayer.func_184614_ca().getItem() instanceof ItemSword)
|
||||
if (gameType.isCreative() && entityPlayer.getHeldItemMainhand() != null && entityPlayer.getHeldItemMainhand().getItem() instanceof ItemSword)
|
||||
preCancelEvent = true;
|
||||
|
||||
if (gameType.isAdventure())
|
||||
@@ -666,7 +666,7 @@ public class ForgeHooks
|
||||
|
||||
if (!entityPlayer.isAllowEdit())
|
||||
{
|
||||
ItemStack itemstack = entityPlayer.func_184614_ca();
|
||||
ItemStack itemstack = entityPlayer.getHeldItemMainhand();
|
||||
if (itemstack == null || !itemstack.canDestroy(world.getBlockState(pos).getBlock()))
|
||||
preCancelEvent = true;
|
||||
}
|
||||
@@ -789,7 +789,7 @@ public class ForgeHooks
|
||||
|
||||
world.markAndNotifyBlock(snap.pos, null, oldBlock, newBlock, updateFlag);
|
||||
}
|
||||
player.triggerAchievement(StatList.func_188060_a(itemstack.getItem()));
|
||||
player.addStat(StatList.func_188060_a(itemstack.getItem()));
|
||||
}
|
||||
}
|
||||
world.capturedBlockSnapshots.clear();
|
||||
@@ -904,7 +904,7 @@ public class ForgeHooks
|
||||
public static boolean onPlayerAttackTarget(EntityPlayer player, Entity target)
|
||||
{
|
||||
if (MinecraftForge.EVENT_BUS.post(new AttackEntityEvent(player, target))) return false;
|
||||
ItemStack stack = player.func_184614_ca();
|
||||
ItemStack stack = player.getHeldItemMainhand();
|
||||
if (stack != null && stack.getItem().onLeftClickEntity(stack, player, target)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -69,9 +69,9 @@ public class WorldSpecificSaveHandler implements ISaveHandler
|
||||
}
|
||||
|
||||
@Override
|
||||
public TemplateManager func_186340_h()
|
||||
public TemplateManager getStructureTemplateManager()
|
||||
{
|
||||
return parent.func_186340_h();
|
||||
return parent.getStructureTemplateManager();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -19,7 +19,7 @@ public class VanillaBrewingRecipe implements IBrewingRecipe {
|
||||
public boolean isInput(ItemStack stack)
|
||||
{
|
||||
Item item = stack.getItem();
|
||||
return item == Items.potionitem || item == Items.field_185155_bH || item == Items.field_185156_bI || item == Items.glass_bottle;
|
||||
return item == Items.potionitem || item == Items.splash_potion || item == Items.lingering_potion || item == Items.glass_bottle;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -28,7 +28,7 @@ public class VanillaBrewingRecipe implements IBrewingRecipe {
|
||||
@Override
|
||||
public boolean isIngredient(ItemStack stack)
|
||||
{
|
||||
return PotionHelper.func_185205_a(stack);
|
||||
return PotionHelper.isReagent(stack);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -41,7 +41,7 @@ public class VanillaBrewingRecipe implements IBrewingRecipe {
|
||||
{
|
||||
if (ingredient != null && input != null && isIngredient(ingredient))
|
||||
{
|
||||
ItemStack result = PotionHelper.func_185212_d(ingredient, input);
|
||||
ItemStack result = PotionHelper.doReaction(ingredient, input);
|
||||
if (result != input)
|
||||
{
|
||||
return result;
|
||||
|
||||
@@ -45,11 +45,11 @@ class ChunkIOProvider implements AsynchronousExecutor.CallBackProvider<QueuedChu
|
||||
queuedChunk.provider.loadedChunks.add(chunk);
|
||||
chunk.onChunkLoad();
|
||||
|
||||
if (queuedChunk.provider.field_186029_c != null) {
|
||||
queuedChunk.provider.field_186029_c.recreateStructures(chunk, queuedChunk.x, queuedChunk.z);
|
||||
if (queuedChunk.provider.chunkGenerator != null) {
|
||||
queuedChunk.provider.chunkGenerator.recreateStructures(chunk, queuedChunk.x, queuedChunk.z);
|
||||
}
|
||||
|
||||
chunk.func_186030_a(queuedChunk.provider, queuedChunk.provider.field_186029_c);
|
||||
chunk.populateChunk(queuedChunk.provider, queuedChunk.provider.chunkGenerator);
|
||||
}
|
||||
|
||||
public void callStage3(QueuedChunk queuedChunk, net.minecraft.world.chunk.Chunk chunk, Runnable runnable) throws RuntimeException {
|
||||
|
||||
@@ -139,7 +139,7 @@ public class BlockSnapshot implements Serializable
|
||||
public TileEntity getTileEntity()
|
||||
{
|
||||
if (nbt != null)
|
||||
return TileEntity.func_184246_b(getWorld().getMinecraftServer(), nbt);
|
||||
return TileEntity.createTileEntity(getWorld().getMinecraftServer(), nbt);
|
||||
else return null;
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ public class BlockSnapshot implements Serializable
|
||||
}
|
||||
|
||||
world.setBlockState(pos, replaced, applyPhysics ? 3 : 2);
|
||||
world.func_184138_a(pos, current, replaced, applyPhysics ? 3 : 2);
|
||||
world.notifyBlockUpdate(pos, current, replaced, applyPhysics ? 3 : 2);
|
||||
TileEntity te = null;
|
||||
if (nbt != null)
|
||||
{
|
||||
@@ -205,7 +205,7 @@ public class BlockSnapshot implements Serializable
|
||||
}
|
||||
|
||||
world.setBlockState(pos, replaced, applyPhysics ? 3 : 2);
|
||||
world.func_184138_a(pos, current, replaced, applyPhysics ? 3 : 2);
|
||||
world.notifyBlockUpdate(pos, current, replaced, applyPhysics ? 3 : 2);
|
||||
TileEntity te = null;
|
||||
if (nbt != null)
|
||||
{
|
||||
|
||||
@@ -32,6 +32,6 @@ public class FakePlayer extends EntityPlayerMP
|
||||
@Override public boolean canAttackPlayer(EntityPlayer player){ return false; }
|
||||
@Override public void onDeath(DamageSource source){ return; }
|
||||
@Override public void onUpdate(){ return; }
|
||||
@Override public Entity func_184204_a(int dim){ return this; }
|
||||
@Override public Entity changeDimension(int dim){ return this; }
|
||||
@Override public void handleClientSettings(CPacketClientSettings pkt){ return; }
|
||||
}
|
||||
Reference in new issue
Block a user