Updated to latest mappings. Exc is broken, some anonymous classes didn't map to srg names.

This commit is contained in:
RainWarrior committed 2016-03-13 04:40:03 +03:00
1 parent 52e877bdd0
commit 4650ee2789
61 files changed
+400 -311

No files matched your search

@@ -58,7 +58,7 @@ public class ClientCommandHandler extends CommandHandler
return 0;
}
if (icommand.func_184882_a(this.func_184879_a(), sender))
if (icommand.checkPermission(this.getServer(), sender))
{
CommandEvent event = new CommandEvent(icommand, sender, args);
if (MinecraftForge.EVENT_BUS.post(event))
@@ -139,7 +139,7 @@ public class ClientCommandHandler extends CommandHandler
}
@Override
protected MinecraftServer func_184879_a() {
protected MinecraftServer getServer() {
return Minecraft.getMinecraft().getIntegratedServer();
}
}
@@ -31,7 +31,6 @@ import net.minecraft.client.renderer.block.model.BakedQuad;
import net.minecraft.client.renderer.block.model.IBakedModel;
import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
import net.minecraft.client.renderer.block.model.ItemTransformVec3f;
import net.minecraft.client.renderer.block.model.ModelBakery;
import net.minecraft.client.renderer.block.model.ModelManager;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.client.renderer.block.model.ModelRotation;
@@ -408,7 +407,7 @@ public class ForgeHooksClient
else
{
//if(leftHandHackery) GlStateManager.scale(-1, 1, 1);
ItemCameraTransforms.func_188034_a(model.getItemCameraTransforms().getTransform(cameraTransformType), leftHandHackery);
ItemCameraTransforms.applyTransformSide(model.getItemCameraTransforms().getTransform(cameraTransformType), leftHandHackery);
//if(leftHandHackery) GlStateManager.scale(-1, 1, 1);
}
return model;
@@ -436,7 +435,7 @@ public class ForgeHooksClient
VertexFormatElement attr = format.getElement(element);
int count = attr.getElementCount();
int constant = attr.getType().getGlConstant();
buffer.position(format.func_181720_d(element));
buffer.position(format.getOffset(element));
switch(attrType)
{
case POSITION:
@@ -88,8 +88,8 @@ public class GuiIngameForge extends GuiIngame
eventParent = new RenderGameOverlayEvent(partialTicks, res);
int width = res.getScaledWidth();
int height = res.getScaledHeight();
renderHealthMount = mc.thePlayer.func_184187_bx() instanceof EntityLivingBase;
renderFood = mc.thePlayer.func_184187_bx() == null;
renderHealthMount = mc.thePlayer.getRidingEntity() instanceof EntityLivingBase;
renderFood = mc.thePlayer.getRidingEntity() == null;
renderJumpBar = mc.thePlayer.isRidingHorse();
right_height = 39;
@@ -108,7 +108,7 @@ public class GuiIngameForge extends GuiIngame
else
{
GlStateManager.enableDepth();
GlStateManager.func_187428_a(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
}
if (renderHelmet) renderHelmet(res, partialTicks);
@@ -118,7 +118,7 @@ public class GuiIngameForge extends GuiIngame
renderPortal(res, partialTicks);
}
if (renderHotbar) renderTooltip(res, partialTicks);
if (renderHotbar) renderHotbar(res, partialTicks);
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
zLevel = -90.0F;
@@ -194,21 +194,21 @@ public class GuiIngameForge extends GuiIngame
{
if (pre(CROSSHAIRS)) return;
bind(Gui.icons);
super.func_184045_a(partialTicks, res);
super.renderAttackIndicator(partialTicks, res);
post(CROSSHAIRS);
}
protected void renderPotionIcons(ScaledResolution resolution)
{
if (pre(POTION_ICONS)) return;
super.func_184048_a(resolution);
super.renderPotionEffects(resolution);
post(POTION_ICONS);
}
protected void renderSubtitles(ScaledResolution resolution)
{
if (pre(SUBTITLES)) return;
this.field_184049_t.func_184068_a(res);
this.overlaySubtitle.renderSubtitles(res);
post(SUBTITLES);
}
@@ -217,10 +217,10 @@ public class GuiIngameForge extends GuiIngame
{
if (pre(BOSSHEALTH)) return;
bind(Gui.icons);
GlStateManager.func_187428_a(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
mc.mcProfiler.startSection("bossHealth");
GlStateManager.enableBlend();
this.field_184050_w.func_184051_a();
this.overlayBoss.renderBossHealth();
GlStateManager.disableBlend();
mc.mcProfiler.endSection();
post(BOSSHEALTH);
@@ -295,7 +295,7 @@ public class GuiIngameForge extends GuiIngame
}
@Override
protected void renderTooltip(ScaledResolution res, float partialTicks)
protected void renderHotbar(ScaledResolution res, float partialTicks)
{
if (pre(HOTBAR)) return;
@@ -305,7 +305,7 @@ public class GuiIngameForge extends GuiIngame
}
else
{
super.renderTooltip(res, partialTicks);
super.renderHotbar(res, partialTicks);
}
post(HOTBAR);
@@ -370,7 +370,7 @@ public class GuiIngameForge extends GuiIngame
this.playerHealth = health;
int healthLast = this.lastPlayerHealth;
IAttributeInstance attrMaxHealth = player.getEntityAttribute(SharedMonsterAttributes.maxHealth);
IAttributeInstance attrMaxHealth = player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH);
float healthMax = (float)attrMaxHealth.getAttributeValue();
float absorb = MathHelper.ceiling_float_int(player.getAbsorptionAmount());
@@ -626,7 +626,7 @@ public class GuiIngameForge extends GuiIngame
GlStateManager.pushMatrix();
GlStateManager.enableBlend();
GlStateManager.func_187428_a(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
FontRenderer font = highlightingItemStack.getItem().getFontRenderer(highlightingItemStack);
if (font != null)
{
@@ -647,7 +647,7 @@ public class GuiIngameForge extends GuiIngame
}
else if (this.mc.thePlayer.isSpectator())
{
this.spectatorGui.func_175263_a(res);
this.spectatorGui.renderSelectedItem(res);
}
}
@@ -720,7 +720,7 @@ public class GuiIngameForge extends GuiIngame
GlStateManager.pushMatrix();
GlStateManager.translate((float)(width / 2), (float)(height - 68), 0.0F);
GlStateManager.enableBlend();
GlStateManager.func_187428_a(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
int color = (recordIsPlaying ? Color.HSBtoRGB(hue / 50.0F, 0.7F, 0.6F) & WHITE : WHITE);
fontrenderer.drawString(recordPlaying, -fontrenderer.getStringWidth(recordPlaying) / 2, -4, color | (opacity << 24));
GlStateManager.disableBlend();
@@ -733,18 +733,18 @@ public class GuiIngameForge extends GuiIngame
protected void renderTitle(int width, int height, float partialTicks)
{
if (field_175195_w > 0)
if (titlesTimer > 0)
{
mc.mcProfiler.startSection("titleAndSubtitle");
float age = (float)this.field_175195_w - partialTicks;
float age = (float)this.titlesTimer - partialTicks;
int opacity = 255;
if (field_175195_w > field_175193_B + field_175192_A)
if (titlesTimer > titleFadeOut + titleDisplayTime)
{
float f3 = (float)(field_175199_z + field_175192_A + field_175193_B) - age;
opacity = (int)(f3 * 255.0F / (float)field_175199_z);
float f3 = (float)(titleFadeIn + titleDisplayTime + titleFadeOut) - age;
opacity = (int)(f3 * 255.0F / (float)titleFadeIn);
}
if (field_175195_w <= field_175193_B) opacity = (int)(age * 255.0F / (float)this.field_175193_B);
if (titlesTimer <= titleFadeOut) opacity = (int)(age * 255.0F / (float)this.titleFadeOut);
opacity = MathHelper.clamp_int(opacity, 0, 255);
@@ -753,15 +753,15 @@ public class GuiIngameForge extends GuiIngame
GlStateManager.pushMatrix();
GlStateManager.translate((float)(width / 2), (float)(height / 2), 0.0F);
GlStateManager.enableBlend();
GlStateManager.func_187428_a(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
GlStateManager.pushMatrix();
GlStateManager.scale(4.0F, 4.0F, 4.0F);
int l = opacity << 24 & -16777216;
this.getFontRenderer().drawString(this.field_175201_x, (float)(-this.getFontRenderer().getStringWidth(this.field_175201_x) / 2), -10.0F, 16777215 | l, true);
this.getFontRenderer().drawString(this.displayedTitle, (float)(-this.getFontRenderer().getStringWidth(this.displayedTitle) / 2), -10.0F, 16777215 | l, true);
GlStateManager.popMatrix();
GlStateManager.pushMatrix();
GlStateManager.scale(2.0F, 2.0F, 2.0F);
this.getFontRenderer().drawString(this.field_175200_y, (float)(-this.getFontRenderer().getStringWidth(this.field_175200_y) / 2), 5.0F, 16777215 | l, true);
this.getFontRenderer().drawString(this.displayedSubTitle, (float)(-this.getFontRenderer().getStringWidth(this.displayedSubTitle) / 2), 5.0F, 16777215 | l, true);
GlStateManager.popMatrix();
GlStateManager.disableBlend();
GlStateManager.popMatrix();
@@ -809,7 +809,7 @@ public class GuiIngameForge extends GuiIngame
protected void renderHealthMount(int width, int height)
{
EntityPlayer player = (EntityPlayer)mc.getRenderViewEntity();
Entity tmp = player.func_184187_bx();
Entity tmp = player.getRidingEntity();
if (!(tmp instanceof EntityLivingBase)) return;
bind(icons);
@@ -167,7 +167,7 @@ public class BlockStateLoader
if (hasBase)
{
base = runModelHooks(base, smooth, gui3d, this.func_188049_c(), textures, customData);
base = runModelHooks(base, smooth, gui3d, this.isUvLock(), textures, customData);
if (size <= 0)
return base;
@@ -198,7 +198,7 @@ public class BlockStateLoader
models.put(entry.getKey(), Pair.<IModel, IModelState>of(runModelHooks(model, part.smooth, part.gui3d, part.uvLock, part.getTextures(), part.getCustomData()), partState));
}
return new MultiModel(func_188046_a(), hasBase ? base : null, baseTr, models.build());
return new MultiModel(getModelLocation(), hasBase ? base : null, baseTr, models.build());
}
@Override
@@ -91,12 +91,12 @@ public interface IPerspectiveAwareModel extends IBakedModel
public boolean isAmbientOcclusion() { return parent.isAmbientOcclusion(); }
public boolean isGui3d() { return parent.isGui3d(); }
public boolean func_188618_c() { return parent.func_188618_c(); }
public boolean isBuiltInRenderer() { return parent.isBuiltInRenderer(); }
public TextureAtlasSprite getParticleTexture() { return parent.getParticleTexture(); }
@SuppressWarnings("deprecation")
public ItemCameraTransforms getItemCameraTransforms() { return parent.getItemCameraTransforms(); }
public List<BakedQuad> func_188616_a(IBlockState state, EnumFacing side, long rand) { return parent.func_188616_a(state, side, rand); }
public ItemOverrideList func_188617_f() { return parent.func_188617_f(); }
public List<BakedQuad> getQuads(IBlockState state, EnumFacing side, long rand) { return parent.getQuads(state, side, rand); }
public ItemOverrideList getOverrides() { return parent.getOverrides(); }
@Override
public Pair<? extends IBakedModel, Matrix4f> handlePerspective(TransformType cameraTransformType)
@@ -136,11 +136,11 @@ public class ItemLayerModel implements IRetexturableModel
public boolean isAmbientOcclusion() { return true; }
public boolean isGui3d() { return false; }
public boolean func_188618_c() { return false; }
public boolean isBuiltInRenderer() { return false; }
public TextureAtlasSprite getParticleTexture() { return particle; }
public ItemCameraTransforms getItemCameraTransforms() { return ItemCameraTransforms.DEFAULT; }
public ItemOverrideList func_188617_f() { return ItemOverrideList.field_188022_a; }
public List<BakedQuad> func_188616_a(IBlockState state, EnumFacing side, long rand)
public ItemOverrideList getOverrides() { return ItemOverrideList.NONE; }
public List<BakedQuad> getQuads(IBlockState state, EnumFacing side, long rand)
{
if(side == null) return quads;
return ImmutableList.of();
@@ -118,7 +118,7 @@ public class ModelDynBucket implements IModel, IModelCustomData, IRetexturableMo
{
// build base (insidest)
IBakedModel model = (new ItemLayerModel(ImmutableList.of(baseLocation))).bake(state, format, bakedTextureGetter);
builder.addAll(model.func_188616_a(null, null, 0));
builder.addAll(model.getQuads(null, null, 0));
}
if (liquidLocation != null && fluidSprite != null)
{
@@ -302,7 +302,7 @@ public class ModelDynBucket implements IModel, IModelCustomData, IRetexturableMo
}
@Override
public ItemOverrideList func_188617_f()
public ItemOverrideList getOverrides()
{
return BakedDynBucketOverrideHandler.INSTANCE;
}
@@ -314,7 +314,7 @@ public class ModelDynBucket implements IModel, IModelCustomData, IRetexturableMo
}
@Override
public List<BakedQuad> func_188616_a(IBlockState state, EnumFacing side, long rand)
public List<BakedQuad> getQuads(IBlockState state, EnumFacing side, long rand)
{
if(side == null) return quads;
return ImmutableList.of();
@@ -322,7 +322,7 @@ public class ModelDynBucket implements IModel, IModelCustomData, IRetexturableMo
public boolean isAmbientOcclusion() { return true; }
public boolean isGui3d() { return false; }
public boolean func_188618_c() { return false; }
public boolean isBuiltInRenderer() { return false; }
public TextureAtlasSprite getParticleTexture() { return particle; }
public ItemCameraTransforms getItemCameraTransforms() { return ItemCameraTransforms.DEFAULT; }
}
@@ -341,7 +341,7 @@ public class ModelFluid implements IModelCustomData
return false;
}
public boolean func_188618_c()
public boolean isBuiltInRenderer()
{
return false;
}
@@ -356,7 +356,7 @@ public class ModelFluid implements IModelCustomData
return ItemCameraTransforms.DEFAULT;
}
public List<BakedQuad> func_188616_a(IBlockState state, EnumFacing side, long rand)
public List<BakedQuad> getQuads(IBlockState state, EnumFacing side, long rand)
{
BakedFluid model = this;
if(state instanceof IExtendedBlockState)
@@ -378,9 +378,9 @@ public class ModelFluid implements IModelCustomData
return model.faceQuads.get(side);
}
public ItemOverrideList func_188617_f()
public ItemOverrideList getOverrides()
{
return ItemOverrideList.field_188022_a;
return ItemOverrideList.NONE;
}
@Override
@@ -546,7 +546,7 @@ public class ModelLoader extends ModelBakery
newTransforms.add(animation.getPartTransform(state, part, i));
}
ItemCameraTransforms transforms = model.func_181682_g();
ItemCameraTransforms transforms = model.getAllTransforms();
Map<TransformType, TRSRTransformation> tMap = Maps.newHashMap();
tMap.putAll(IPerspectiveAwareModel.MapWrapper.getTransforms(transforms));
tMap.putAll(IPerspectiveAwareModel.MapWrapper.getTransforms(state));
@@ -556,14 +556,14 @@ public class ModelLoader extends ModelBakery
{
return new ItemLayerModel(model).bake(perState, format, bakedTextureGetter);
}
if(isCustomRenderer(model)) return new BuiltInModel(transforms, model.func_187967_g());
if(isCustomRenderer(model)) return new BuiltInModel(transforms, model.createOverrides());
return bakeNormal(model, perState, state.apply(Optional.<IModelPart>absent()).or(TRSRTransformation.identity()), newTransforms, format, bakedTextureGetter, uvlock);
}
private IBakedModel bakeNormal(ModelBlock model, IModelState perState, final TRSRTransformation modelState, List<TRSRTransformation> newTransforms, final VertexFormat format, final Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter, boolean uvLocked)
{
TextureAtlasSprite particle = bakedTextureGetter.apply(new ResourceLocation(model.resolveTextureName("particle")));
SimpleBakedModel.Builder builder = (new SimpleBakedModel.Builder(model, model.func_187967_g())).setTexture(particle);
SimpleBakedModel.Builder builder = (new SimpleBakedModel.Builder(model, model.createOverrides())).setTexture(particle);
for(int i = 0; i < model.getElements().size(); i++)
{
BlockPart part = model.getElements().get(i);
@@ -593,7 +593,7 @@ public class ModelLoader extends ModelBakery
return new IPerspectiveAwareModel.MapWrapper(builder.makeBakedModel(), perState)
{
@Override
public List<BakedQuad> func_188616_a(IBlockState state, EnumFacing side, long rand)
public List<BakedQuad> getQuads(IBlockState state, EnumFacing side, long rand)
{
if(state instanceof IExtendedBlockState)
{
@@ -604,11 +604,11 @@ public class ModelLoader extends ModelBakery
IExtendedBlockState newExState = exState.withProperty(Properties.AnimationProperty, null);
if(newState != null)
{
return VanillaModelWrapper.this.bake(new ModelStateComposition(modelState, newState), format, bakedTextureGetter).func_188616_a(newExState, side, rand);
return VanillaModelWrapper.this.bake(new ModelStateComposition(modelState, newState), format, bakedTextureGetter).getQuads(newExState, side, rand);
}
}
}
return super.func_188616_a(state, side, rand);
return super.getQuads(state, side, rand);
};
};
}
@@ -627,7 +627,7 @@ public class ModelLoader extends ModelBakery
ModelBlock newModel = new ModelBlock(this.model.getParentLocation(), elements,
Maps.newHashMap(this.model.textures), this.model.isAmbientOcclusion(), this.model.isGui3d(), //New Textures man VERY IMPORTANT
model.func_181682_g(), Lists.newArrayList(model.func_187966_f()));
model.getAllTransforms(), Lists.newArrayList(model.getOverrides()));
newModel.name = this.model.name;
newModel.parent = this.model.parent;
@@ -696,7 +696,7 @@ public class ModelLoader extends ModelBakery
{
return this;
}
ModelBlock newModel = new ModelBlock(model.getParentLocation(), model.getElements(), model.textures, value, model.isGui3d(), model.func_181682_g(), Lists.newArrayList(model.func_187966_f()));
ModelBlock newModel = new ModelBlock(model.getParentLocation(), model.getElements(), model.textures, value, model.isGui3d(), model.getAllTransforms(), Lists.newArrayList(model.getOverrides()));
newModel.parent = model.parent;
newModel.name = model.name;
return new VanillaModelWrapper(location, newModel, uvlock, animation);
@@ -709,7 +709,7 @@ public class ModelLoader extends ModelBakery
{
return this;
}
ModelBlock newModel = new ModelBlock(model.getParentLocation(), model.getElements(), model.textures, model.ambientOcclusion, value, model.func_181682_g(), Lists.newArrayList(model.func_187966_f()));
ModelBlock newModel = new ModelBlock(model.getParentLocation(), model.getElements(), model.textures, model.ambientOcclusion, value, model.getAllTransforms(), Lists.newArrayList(model.getOverrides()));
newModel.parent = model.parent;
newModel.name = model.name;
return new VanillaModelWrapper(location, newModel, uvlock, animation);
@@ -735,11 +735,11 @@ public class ModelLoader extends ModelBakery
public WeightedRandomModel(ModelResourceLocation parent, VariantList variants)
{
this.variants = variants.func_188114_a();
this.variants = variants.getVariantList();
ImmutableList.Builder<Pair<IModel, IModelState>> builder = ImmutableList.builder();
for (Variant v : this.variants)
{
ResourceLocation loc = v.func_188046_a();
ResourceLocation loc = v.getModelLocation();
locations.add(loc);
IModel model = null;
@@ -813,7 +813,7 @@ public class ModelLoader extends ModelBakery
{
IModel model = models.get(i);
Variant v = variants.get(i);
builder.add(model.bake(MultiModelState.getPartState(state, model, i), format, bakedTextureGetter), variants.get(i).func_188047_d());
builder.add(model.bake(MultiModelState.getPartState(state, model, i), format, bakedTextureGetter), variants.get(i).getWeight());
}
return builder.build();
}
@@ -161,13 +161,13 @@ public class MultiLayerModel implements IModelCustomData
ImmutableList.Builder<BakedQuad> builder = ImmutableList.builder();
for(IBakedModel model : models.values())
{
builder.addAll(model.func_188616_a(null, side.orNull(), 0));
builder.addAll(model.getQuads(null, side.orNull(), 0));
}
return builder.build();
}
@Override
public List<BakedQuad> func_188616_a(IBlockState state, EnumFacing side, long rand)
public List<BakedQuad> getQuads(IBlockState state, EnumFacing side, long rand)
{
IBakedModel model;
BlockRenderLayer layer = MinecraftForgeClient.getRenderLayer();
@@ -183,7 +183,7 @@ public class MultiLayerModel implements IModelCustomData
{
model = models.get(Optional.of(layer));
}
return model.func_188616_a(state, side, rand);
return model.getQuads(state, side, rand);
}
@Override
@@ -199,9 +199,9 @@ public class MultiLayerModel implements IModelCustomData
}
@Override
public boolean func_188618_c()
public boolean isBuiltInRenderer()
{
return base.func_188618_c();
return base.isBuiltInRenderer();
}
@Override
@@ -223,9 +223,9 @@ public class MultiLayerModel implements IModelCustomData
}
@Override
public ItemOverrideList func_188617_f()
public ItemOverrideList getOverrides()
{
return ItemOverrideList.field_188022_a;
return ItemOverrideList.NONE;
}
}
@@ -96,9 +96,9 @@ public class MultiModel implements IModel
}
@Override
public boolean func_188618_c()
public boolean isBuiltInRenderer()
{
return internalBase.func_188618_c();
return internalBase.isBuiltInRenderer();
}
@Override
@@ -114,7 +114,7 @@ public class MultiModel implements IModel
}
@Override
public List<BakedQuad> func_188616_a(IBlockState state, EnumFacing side, long rand)
public List<BakedQuad> getQuads(IBlockState state, EnumFacing side, long rand)
{
if(quads == null)
{
@@ -125,22 +125,22 @@ public class MultiModel implements IModel
ImmutableList.Builder<BakedQuad> quads = ImmutableList.builder();
if (base != null)
{
quads.addAll(base.func_188616_a(null, face, 0));
quads.addAll(base.getQuads(null, face, 0));
}
for (IBakedModel bakedPart : parts.values())
{
quads.addAll(bakedPart.func_188616_a(null, face, 0));
quads.addAll(bakedPart.getQuads(null, face, 0));
}
builder.put(Optional.of(face), quads.build());
}
ImmutableList.Builder<BakedQuad> quads = ImmutableList.builder();
if (base != null)
{
quads.addAll(base.func_188616_a(null, null, 0));
quads.addAll(base.getQuads(null, null, 0));
}
for (IBakedModel bakedPart : parts.values())
{
quads.addAll(bakedPart.func_188616_a(null, null, 0));
quads.addAll(bakedPart.getQuads(null, null, 0));
}
builder.put(Optional.<EnumFacing>absent(), quads.build());
this.quads = builder.build();
@@ -167,7 +167,7 @@ public class MultiModel implements IModel
}
@Override
public ItemOverrideList func_188617_f()
public ItemOverrideList getOverrides()
{
// TODO Auto-generated method stub
return null;
@@ -58,7 +58,7 @@ public class AnimationModelBase<T extends Entity & IAnimationProvider> extends M
GlStateManager.pushMatrix();
GlStateManager.rotate(180, 0, 0, 1);
Tessellator tessellator = Tessellator.getInstance();
VertexBuffer VertexBuffer = tessellator.getWorldRenderer();
VertexBuffer VertexBuffer = tessellator.getBuffer();
VertexBuffer.begin(GL11.GL_QUADS, DefaultVertexFormats.BLOCK);
VertexBuffer.setTranslation(-0.5, -1.5, -0.5);
@@ -67,7 +67,7 @@ public class AnimationModelBase<T extends Entity & IAnimationProvider> extends M
lighter.setState(Blocks.air.getDefaultState());
lighter.setBlockPos(pos);
boolean empty = true;
List<BakedQuad> quads = bakedModel.func_188616_a(null, null, 0);
List<BakedQuad> quads = bakedModel.getQuads(null, null, 0);
if(!quads.isEmpty())
{
lighter.updateBlockInfo();
@@ -79,7 +79,7 @@ public class AnimationModelBase<T extends Entity & IAnimationProvider> extends M
}
for(EnumFacing side : EnumFacing.values())
{
quads = bakedModel.func_188616_a(null, side, 0);
quads = bakedModel.getQuads(null, side, 0);
if(!quads.isEmpty())
{
if(empty) lighter.updateBlockInfo();
@@ -18,7 +18,7 @@ public abstract class FastTESR<T extends TileEntity> extends TileEntitySpecialRe
public final void renderTileEntityAt(T te, double x, double y, double z, float partialTicks, int destroyStage)
{
Tessellator tessellator = Tessellator.getInstance();
VertexBuffer VertexBuffer = tessellator.getWorldRenderer();
VertexBuffer VertexBuffer = tessellator.getBuffer();
this.bindTexture(TextureMap.locationBlocksTexture);
RenderHelper.disableStandardItemLighting();
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
@@ -638,7 +638,7 @@ public class B3DLoader implements ICustomModelLoader
}
@Override
public List<BakedQuad> func_188616_a(IBlockState state, EnumFacing side, long rand)
public List<BakedQuad> getQuads(IBlockState state, EnumFacing side, long rand)
{
if(side != null) return ImmutableList.of();
IModelState modelState = this.state;
@@ -807,7 +807,7 @@ public class B3DLoader implements ICustomModelLoader
return gui3d;
}
public boolean func_188618_c()
public boolean isBuiltInRenderer()
{
return false;
}
@@ -829,10 +829,10 @@ public class B3DLoader implements ICustomModelLoader
}
@Override
public ItemOverrideList func_188617_f()
public ItemOverrideList getOverrides()
{
// TODO handle items
return ItemOverrideList.field_188022_a;
return ItemOverrideList.NONE;
}
}
}
@@ -1325,7 +1325,7 @@ public class OBJModel implements IRetexturableModel, IModelCustomData
// FIXME: merge with getQuads
@Override
public List<BakedQuad> func_188616_a(IBlockState blockState, EnumFacing side, long rand)
public List<BakedQuad> getQuads(IBlockState blockState, EnumFacing side, long rand)
{
if(side != null) return ImmutableList.of();
if (quads == null)
@@ -1475,7 +1475,7 @@ public class OBJModel implements IRetexturableModel, IModelCustomData
}
@Override
public boolean func_188618_c()
public boolean isBuiltInRenderer()
{
return false;
}
@@ -1588,9 +1588,9 @@ public class OBJModel implements IRetexturableModel, IModelCustomData
}
@Override
public ItemOverrideList func_188617_f()
public ItemOverrideList getOverrides()
{
return ItemOverrideList.field_188022_a;
return ItemOverrideList.NONE;
}
}
@@ -36,7 +36,7 @@ public class BlockInfo
{
if(cachedTint == tint) return cachedMultiplier;
cachedTint = tint;
cachedMultiplier = colors.func_186724_a(state, world, blockPos, tint);
cachedMultiplier = colors.colorMultiplier(state, world, blockPos, tint);
return cachedMultiplier;
}
@@ -102,15 +102,15 @@ public class BlockInfo
{
BlockPos pos = blockPos.add(x - 1, y - 1, z - 1);
IBlockState state = world.getBlockState(pos);
translucent[x][y][z] = state.func_185895_e();
translucent[x][y][z] = state.isTranslucent();
//translucent[x][y][z] = world.getBlockState(pos).getBlock().getLightOpacity(world, pos) == 0;
int brightness = state.func_185889_a(world, pos);
int brightness = state.getPackedLightmapCoords(world, pos);
s[x][y][z] = (brightness >> 0x14) & 0xF;
b[x][y][z] = (brightness >> 0x04) & 0xF;
ao[x][y][z] = state.func_185892_j();
ao[x][y][z] = state.getAmbientOcclusionLightValue();
if(x == 1 && y == 1 && z == 1)
{
full = state.func_185917_h();
full = state.isFullCube();
}
}
}
@@ -48,7 +48,7 @@ public class ForgeBlockModelRenderer extends BlockModelRenderer
}
@Override
public boolean func_187497_c(IBlockAccess world, IBakedModel model, IBlockState state, BlockPos pos, VertexBuffer buffer, boolean checkSides, long rand)
public boolean renderModelFlat(IBlockAccess world, IBakedModel model, IBlockState state, BlockPos pos, VertexBuffer buffer, boolean checkSides, long rand)
{
if(ForgeModContainer.forgeLightPipelineEnabled)
{
@@ -64,12 +64,12 @@ public class ForgeBlockModelRenderer extends BlockModelRenderer
}
else
{
return super.func_187497_c(world, model, state, pos, buffer, checkSides, rand);
return super.renderModelFlat(world, model, state, pos, buffer, checkSides, rand);
}
}
@Override
public boolean func_187498_b(IBlockAccess world, IBakedModel model, IBlockState state, BlockPos pos, VertexBuffer buffer, boolean checkSides, long rand)
public boolean renderModelSmooth(IBlockAccess world, IBakedModel model, IBlockState state, BlockPos pos, VertexBuffer buffer, boolean checkSides, long rand)
{
if(ForgeModContainer.forgeLightPipelineEnabled)
{
@@ -85,7 +85,7 @@ public class ForgeBlockModelRenderer extends BlockModelRenderer
}
else
{
return super.func_187498_b(world, model, state, pos, buffer, checkSides, rand);
return super.renderModelSmooth(world, model, state, pos, buffer, checkSides, rand);
}
}
@@ -95,7 +95,7 @@ public class ForgeBlockModelRenderer extends BlockModelRenderer
lighter.setState(state);
lighter.setBlockPos(pos);
boolean empty = true;
List<BakedQuad> quads = model.func_188616_a(state, null, rand);
List<BakedQuad> quads = model.getQuads(state, null, rand);
if(!quads.isEmpty())
{
lighter.updateBlockInfo();
@@ -107,10 +107,10 @@ public class ForgeBlockModelRenderer extends BlockModelRenderer
}
for(EnumFacing side : EnumFacing.values())
{
quads = model.func_188616_a(state, side, rand);
quads = model.getQuads(state, side, rand);
if(!quads.isEmpty())
{
if(!checkSides || state.func_185894_c(world, pos, side))
if(!checkSides || state.shouldSideBeRendered(world, pos, side))
{
if(empty) lighter.updateBlockInfo();
empty = false;
@@ -144,7 +144,7 @@ public class LightUtil
{
int length = 4 < to.length ? 4 : to.length;
VertexFormatElement element = formatFrom.getElement(e);
int vertexStart = v * formatFrom.getNextOffset() + formatFrom.func_181720_d(e);
int vertexStart = v * formatFrom.getNextOffset() + formatFrom.getOffset(e);
int count = element.getElementCount();
VertexFormatElement.EnumType type = element.getType();
int size = type.getSize();
@@ -198,7 +198,7 @@ public class LightUtil
public static void pack(float[] from, int[] to, VertexFormat formatTo, int v, int e)
{
VertexFormatElement element = formatTo.getElement(e);
int vertexStart = v * formatTo.getNextOffset() + formatTo.func_181720_d(e);
int vertexStart = v * formatTo.getNextOffset() + formatTo.getOffset(e);
int count = element.getElementCount();
VertexFormatElement.EnumType type = element.getType();
int size = type.getSize();
@@ -241,7 +241,7 @@ public class LightUtil
if(tessellator == null)
{
Tessellator tes = Tessellator.getInstance();
VertexBuffer wr = tes.getWorldRenderer();
VertexBuffer wr = tes.getBuffer();
tessellator = new VertexBufferConsumer(wr);
}
return tessellator;
@@ -261,7 +261,7 @@ public class LightUtil
public static void renderQuadColorSlow(VertexBuffer wr, BakedQuad quad, int auxColor)
{
ItemConsumer cons;
if(wr == Tessellator.getInstance().getWorldRenderer())
if(wr == Tessellator.getInstance().getBuffer())
{
cons = getItemConsumer();
}
@@ -203,7 +203,7 @@ public class VertexLighterFlat extends QuadGatheringTransformer
float e2 = 0.95f;
BlockPos pos = blockInfo.getBlockPos();
boolean full = blockInfo.getState().func_185917_h();
boolean full = blockInfo.getState().isFullCube();
if((full || y < -e1) && normal[1] < -e2) pos = pos.down();
if((full || y > e1) && normal[1] > e2) pos = pos.up();
@@ -212,7 +212,7 @@ public class VertexLighterFlat extends QuadGatheringTransformer
if((full || x < -e1) && normal[0] < -e2) pos = pos.west();
if((full || x > e1) && normal[0] > e2) pos = pos.east();
int brightness = blockInfo.getState().func_185889_a(blockInfo.getWorld(), pos);
int brightness = blockInfo.getState().getPackedLightmapCoords(blockInfo.getWorld(), pos);
lightmap[0] = ((float)((brightness >> 0x04) & 0xF) * 0x20) / 0xFFFF;
lightmap[1] = ((float)((brightness >> 0x14) & 0xF) * 0x20) / 0xFFFF;
@@ -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; }
}
@@ -366,7 +366,7 @@ public class ForgeEventFactory
{
for (EntityItem item : capturedDrops)
{
player.func_184816_a(item);
player.dropItemAndGetStack(item);
}
}
}
@@ -31,7 +31,7 @@ public class PlayerDropsEvent extends LivingDropsEvent
{
super(entity, source, drops,
(source.getEntity() instanceof EntityPlayer) ?
EnchantmentHelper.func_185283_h(((EntityPlayer)source.getEntity())) : 0,
EnchantmentHelper.getLootingModifier(((EntityPlayer)source.getEntity())) : 0,
recentlyHit);
this.entityPlayer = entity;
@@ -79,13 +79,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.field_185306_r, player.func_184614_ca()) > 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.silkTouch, player.getHeldItemMainhand()) > 0)) // If the block is being silk harvested, the exp dropped is 0
{
this.exp = 0;
}
else
{
int bonusLevel = EnchantmentHelper.getEnchantmentLevel(Enchantments.field_185308_t, player.func_184614_ca());
int bonusLevel = EnchantmentHelper.getEnchantmentLevel(Enchantments.fortune, player.getHeldItemMainhand());
this.exp = state.getBlock().getExpDrop(state, world, pos, bonusLevel);
}
}
@@ -134,7 +134,7 @@ public class BlockEvent extends Event
{
super(blockSnapshot.world, blockSnapshot.pos, blockSnapshot.getCurrentBlock());
this.player = player;
this.itemInHand = player.func_184614_ca();
this.itemInHand = player.getHeldItemMainhand();
this.blockSnapshot = blockSnapshot;
this.placedBlock = blockSnapshot.getCurrentBlock();
this.placedAgainst = placedAgainst;
@@ -212,7 +212,7 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock
return displacements.get(state.getBlock());
}
Material material = state.func_185904_a();
Material material = state.getMaterial();
if (material.blocksMovement() || material == Material.portal)
{
return false;
@@ -261,7 +261,7 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock
return false;
}
Material material = state.func_185904_a();
Material material = state.getMaterial();
if (material.blocksMovement() || material == Material.portal)
{
return false;
@@ -380,7 +380,7 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock
*/
@Override
public int func_185484_c(IBlockState state, IBlockAccess world, BlockPos pos)
public int getPackedLightmapCoords(IBlockState state, IBlockAccess world, BlockPos pos)
{
int lightThis = world.getCombinedLight(pos, 0);
int lightUp = world.getCombinedLight(pos.up(), 0);
@@ -403,7 +403,7 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock
public boolean shouldSideBeRendered(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side)
{
IBlockState neighbor = world.getBlockState(pos.offset(side));
if (neighbor.func_185904_a() == state.func_185904_a())
if (neighbor.getMaterial() == state.getMaterial())
{
return false;
}
@@ -487,7 +487,7 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock
public static double getFlowDirection(IBlockAccess world, BlockPos pos)
{
IBlockState state = world.getBlockState(pos);
if (!state.func_185904_a().isLiquid())
if (!state.getMaterial().isLiquid())
{
return -1000.0;
}
@@ -554,7 +554,7 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock
IBlockState up = world.getBlockState(pos.down(densityDir));
if (here.getBlock() == this)
{
if (up.func_185904_a().isLiquid() || up.getBlock() instanceof IFluidBlock)
if (up.getMaterial().isLiquid() || up.getBlock() instanceof IFluidBlock)
{
return 1;
}
@@ -564,7 +564,7 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock
return 0.875F;
}
}
return !here.func_185904_a().isSolid() && up.getBlock() == this ? 1 : this.getQuantaPercentage(world, pos) * 0.875F;
return !here.getMaterial().isSolid() && up.getBlock() == this ? 1 : this.getQuantaPercentage(world, pos) * 0.875F;
}
public Vec3d getFlowVector(IBlockAccess world, BlockPos pos)
@@ -589,7 +589,7 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock
int otherDecay = quantaPerBlock - getQuantaValue(world, pos2);
if (otherDecay >= quantaPerBlock)
{
if (!world.getBlockState(pos2).func_185904_a().blocksMovement())
if (!world.getBlockState(pos2).getMaterial().blocksMovement())
{
otherDecay = quantaPerBlock - getQuantaValue(world, pos2.down());
if (otherDecay >= 0)
@@ -289,7 +289,7 @@ public class BlockFluidClassic extends BlockFluidBase
return displacements.get(state.getBlock());
}
Material material = state.func_185904_a();
Material material = state.getMaterial();
if (material.blocksMovement() ||
material == Material.water ||
material == Material.lava ||
@@ -404,7 +404,7 @@ public class FluidUtil
{
if (world != null && pos != null)
{
world.func_184148_a(null, pos.getX(), pos.getY(), pos.getZ(), SoundEvents.field_187638_cR, SoundCategory.PLAYERS, 0.2F, ((world.rand.nextFloat() - world.rand.nextFloat()) * 0.7F + 1.0F) * 2.0F);
world.playSound(null, pos.getX(), pos.getY(), pos.getZ(), SoundEvents.entity_item_pickup, SoundCategory.PLAYERS, 0.2F, ((world.rand.nextFloat() - world.rand.nextFloat()) * 0.7F + 1.0F) * 2.0F);
}
return true;
}
@@ -129,7 +129,7 @@ public class UniversalBucket extends Item implements IFluidContainerItem
&& !player.capabilities.isCreativeMode)
{
// success!
player.triggerAchievement(StatList.func_188057_b(this));
player.addStat(StatList.func_188057_b(this));
itemstack.stackSize--;
ItemStack emptyStack = empty != null ? empty.copy() : new ItemStack(this);
@@ -162,7 +162,7 @@ public class UniversalBucket extends Item implements IFluidContainerItem
return false;
}
Material material = worldIn.getBlockState(pos).func_185904_a();
Material material = worldIn.getBlockState(pos).getMaterial();
boolean isSolid = material.isSolid();
// can only place in air or non-solid blocks
@@ -177,7 +177,7 @@ public class UniversalBucket extends Item implements IFluidContainerItem
int i = pos.getX();
int j = pos.getY();
int k = pos.getZ();
worldIn.func_184133_a(null, pos, SoundEvents.field_187646_bt, 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)
@@ -487,7 +487,7 @@ public class GuiModList extends GuiScreen
}
ITextComponent chat = ForgeHooks.newChatWithLinks(line, false);
ret.addAll(GuiUtilRenderComponents.func_178908_a(chat, this.listWidth-8, GuiModList.this.fontRendererObj, false, true));
ret.addAll(GuiUtilRenderComponents.splitText(chat, this.listWidth-8, GuiModList.this.fontRendererObj, false, true));
}
return ret;
}
@@ -524,13 +524,13 @@ public class GuiModList extends GuiScreen
{
GlStateManager.enableBlend();
GuiModList.this.mc.renderEngine.bindTexture(logoPath);
VertexBuffer wr = tess.getWorldRenderer();
VertexBuffer wr = tess.getBuffer();
int offset = (this.left + this.listWidth/2) - (logoDims.width / 2);
wr.begin(7, DefaultVertexFormats.POSITION_TEX);
wr.pos(offset, top + logoDims.height, zLevel).func_187315_a(0, 1).endVertex();
wr.pos(offset + logoDims.width, top + logoDims.height, zLevel).func_187315_a(1, 1).endVertex();
wr.pos(offset + logoDims.width, top, zLevel).func_187315_a(1, 0).endVertex();
wr.pos(offset, top, zLevel).func_187315_a(0, 0).endVertex();
wr.pos(offset, top + logoDims.height, zLevel).tex(0, 1).endVertex();
wr.pos(offset + logoDims.width, top + logoDims.height, zLevel).tex(1, 1).endVertex();
wr.pos(offset + logoDims.width, top, zLevel).tex(1, 0).endVertex();
wr.pos(offset, top, zLevel).tex(0, 0).endVertex();
tess.draw();
GlStateManager.disableBlend();
top += logoDims.height + 10;
@@ -263,7 +263,7 @@ public abstract class GuiScrollingList
this.applyScrollLimits();
Tessellator tess = Tessellator.getInstance();
VertexBuffer worldr = tess.getWorldRenderer();
VertexBuffer worldr = tess.getBuffer();
ScaledResolution res = new ScaledResolution(client);
double scaleW = client.displayWidth / res.getScaledWidth_double();
@@ -284,10 +284,10 @@ public abstract class GuiScrollingList
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
float scale = 32.0F;
worldr.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
worldr.pos(this.left, this.bottom, 0.0D).func_187315_a(this.left / scale, (this.bottom + (int)this.scrollDistance) / scale).color(0x20, 0x20, 0x20, 0xFF).endVertex();
worldr.pos(this.right, this.bottom, 0.0D).func_187315_a(this.right / scale, (this.bottom + (int)this.scrollDistance) / scale).color(0x20, 0x20, 0x20, 0xFF).endVertex();
worldr.pos(this.right, this.top, 0.0D).func_187315_a(this.right / scale, (this.top + (int)this.scrollDistance) / scale).color(0x20, 0x20, 0x20, 0xFF).endVertex();
worldr.pos(this.left, this.top, 0.0D).func_187315_a(this.left / scale, (this.top + (int)this.scrollDistance) / scale).color(0x20, 0x20, 0x20, 0xFF).endVertex();
worldr.pos(this.left, this.bottom, 0.0D).tex(this.left / scale, (this.bottom + (int)this.scrollDistance) / scale).color(0x20, 0x20, 0x20, 0xFF).endVertex();
worldr.pos(this.right, this.bottom, 0.0D).tex(this.right / scale, (this.bottom + (int)this.scrollDistance) / scale).color(0x20, 0x20, 0x20, 0xFF).endVertex();
worldr.pos(this.right, this.top, 0.0D).tex(this.right / scale, (this.top + (int)this.scrollDistance) / scale).color(0x20, 0x20, 0x20, 0xFF).endVertex();
worldr.pos(this.left, this.top, 0.0D).tex(this.left / scale, (this.top + (int)this.scrollDistance) / scale).color(0x20, 0x20, 0x20, 0xFF).endVertex();
tess.draw();
}
@@ -311,14 +311,14 @@ public abstract class GuiScrollingList
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
GlStateManager.disableTexture2D();
worldr.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
worldr.pos(min, slotTop + slotBuffer + 2, 0).func_187315_a(0, 1).color(0x80, 0x80, 0x80, 0xFF).endVertex();
worldr.pos(max, slotTop + slotBuffer + 2, 0).func_187315_a(1, 1).color(0x80, 0x80, 0x80, 0xFF).endVertex();
worldr.pos(max, slotTop - 2, 0).func_187315_a(1, 0).color(0x80, 0x80, 0x80, 0xFF).endVertex();
worldr.pos(min, slotTop - 2, 0).func_187315_a(0, 0).color(0x80, 0x80, 0x80, 0xFF).endVertex();
worldr.pos(min + 1, slotTop + slotBuffer + 1, 0).func_187315_a(0, 1).color(0x00, 0x00, 0x00, 0xFF).endVertex();
worldr.pos(max - 1, slotTop + slotBuffer + 1, 0).func_187315_a(1, 1).color(0x00, 0x00, 0x00, 0xFF).endVertex();
worldr.pos(max - 1, slotTop - 1, 0).func_187315_a(1, 0).color(0x00, 0x00, 0x00, 0xFF).endVertex();
worldr.pos(min + 1, slotTop - 1, 0).func_187315_a(0, 0).color(0x00, 0x00, 0x00, 0xFF).endVertex();
worldr.pos(min, slotTop + slotBuffer + 2, 0).tex(0, 1).color(0x80, 0x80, 0x80, 0xFF).endVertex();
worldr.pos(max, slotTop + slotBuffer + 2, 0).tex(1, 1).color(0x80, 0x80, 0x80, 0xFF).endVertex();
worldr.pos(max, slotTop - 2, 0).tex(1, 0).color(0x80, 0x80, 0x80, 0xFF).endVertex();
worldr.pos(min, slotTop - 2, 0).tex(0, 0).color(0x80, 0x80, 0x80, 0xFF).endVertex();
worldr.pos(min + 1, slotTop + slotBuffer + 1, 0).tex(0, 1).color(0x00, 0x00, 0x00, 0xFF).endVertex();
worldr.pos(max - 1, slotTop + slotBuffer + 1, 0).tex(1, 1).color(0x00, 0x00, 0x00, 0xFF).endVertex();
worldr.pos(max - 1, slotTop - 1, 0).tex(1, 0).color(0x00, 0x00, 0x00, 0xFF).endVertex();
worldr.pos(min + 1, slotTop - 1, 0).tex(0, 0).color(0x00, 0x00, 0x00, 0xFF).endVertex();
tess.draw();
GlStateManager.enableTexture2D();
}
@@ -347,22 +347,22 @@ public abstract class GuiScrollingList
GlStateManager.disableTexture2D();
worldr.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
worldr.pos(scrollBarLeft, this.bottom, 0.0D).func_187315_a(0.0D, 1.0D).color(0x00, 0x00, 0x00, 0xFF).endVertex();
worldr.pos(scrollBarRight, this.bottom, 0.0D).func_187315_a(1.0D, 1.0D).color(0x00, 0x00, 0x00, 0xFF).endVertex();
worldr.pos(scrollBarRight, this.top, 0.0D).func_187315_a(1.0D, 0.0D).color(0x00, 0x00, 0x00, 0xFF).endVertex();
worldr.pos(scrollBarLeft, this.top, 0.0D).func_187315_a(0.0D, 0.0D).color(0x00, 0x00, 0x00, 0xFF).endVertex();
worldr.pos(scrollBarLeft, this.bottom, 0.0D).tex(0.0D, 1.0D).color(0x00, 0x00, 0x00, 0xFF).endVertex();
worldr.pos(scrollBarRight, this.bottom, 0.0D).tex(1.0D, 1.0D).color(0x00, 0x00, 0x00, 0xFF).endVertex();
worldr.pos(scrollBarRight, this.top, 0.0D).tex(1.0D, 0.0D).color(0x00, 0x00, 0x00, 0xFF).endVertex();
worldr.pos(scrollBarLeft, this.top, 0.0D).tex(0.0D, 0.0D).color(0x00, 0x00, 0x00, 0xFF).endVertex();
tess.draw();
worldr.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
worldr.pos(scrollBarLeft, barTop + height, 0.0D).func_187315_a(0.0D, 1.0D).color(0x80, 0x80, 0x80, 0xFF).endVertex();
worldr.pos(scrollBarRight, barTop + height, 0.0D).func_187315_a(1.0D, 1.0D).color(0x80, 0x80, 0x80, 0xFF).endVertex();
worldr.pos(scrollBarRight, barTop, 0.0D).func_187315_a(1.0D, 0.0D).color(0x80, 0x80, 0x80, 0xFF).endVertex();
worldr.pos(scrollBarLeft, barTop, 0.0D).func_187315_a(0.0D, 0.0D).color(0x80, 0x80, 0x80, 0xFF).endVertex();
worldr.pos(scrollBarLeft, barTop + height, 0.0D).tex(0.0D, 1.0D).color(0x80, 0x80, 0x80, 0xFF).endVertex();
worldr.pos(scrollBarRight, barTop + height, 0.0D).tex(1.0D, 1.0D).color(0x80, 0x80, 0x80, 0xFF).endVertex();
worldr.pos(scrollBarRight, barTop, 0.0D).tex(1.0D, 0.0D).color(0x80, 0x80, 0x80, 0xFF).endVertex();
worldr.pos(scrollBarLeft, barTop, 0.0D).tex(0.0D, 0.0D).color(0x80, 0x80, 0x80, 0xFF).endVertex();
tess.draw();
worldr.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
worldr.pos(scrollBarLeft, barTop + height - 1, 0.0D).func_187315_a(0.0D, 1.0D).color(0xC0, 0xC0, 0xC0, 0xFF).endVertex();
worldr.pos(scrollBarRight - 1, barTop + height - 1, 0.0D).func_187315_a(1.0D, 1.0D).color(0xC0, 0xC0, 0xC0, 0xFF).endVertex();
worldr.pos(scrollBarRight - 1, barTop, 0.0D).func_187315_a(1.0D, 0.0D).color(0xC0, 0xC0, 0xC0, 0xFF).endVertex();
worldr.pos(scrollBarLeft, barTop, 0.0D).func_187315_a(0.0D, 0.0D).color(0xC0, 0xC0, 0xC0, 0xFF).endVertex();
worldr.pos(scrollBarLeft, barTop + height - 1, 0.0D).tex(0.0D, 1.0D).color(0xC0, 0xC0, 0xC0, 0xFF).endVertex();
worldr.pos(scrollBarRight - 1, barTop + height - 1, 0.0D).tex(1.0D, 1.0D).color(0xC0, 0xC0, 0xC0, 0xFF).endVertex();
worldr.pos(scrollBarRight - 1, barTop, 0.0D).tex(1.0D, 0.0D).color(0xC0, 0xC0, 0xC0, 0xFF).endVertex();
worldr.pos(scrollBarLeft, barTop, 0.0D).tex(0.0D, 0.0D).color(0xC0, 0xC0, 0xC0, 0xFF).endVertex();
tess.draw();
}
@@ -390,7 +390,7 @@ public abstract class GuiScrollingList
GlStateManager.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0);
GlStateManager.shadeModel(GL11.GL_SMOOTH);
Tessellator tessellator = Tessellator.getInstance();
VertexBuffer VertexBuffer = tessellator.getWorldRenderer();
VertexBuffer VertexBuffer = tessellator.getBuffer();
VertexBuffer.begin(7, DefaultVertexFormats.POSITION_COLOR);
VertexBuffer.pos(right, top, 0.0D).color(r1, g1, b1, a1).endVertex();
VertexBuffer.pos(left, top, 0.0D).color(r1, g1, b1, a1).endVertex();
@@ -503,8 +503,8 @@ public class SplashProgress
if (max_texture_size != -1) return max_texture_size;
for (int i = 0x4000; i > 0; i >>= 1)
{
GlStateManager.func_187419_a(GL11.GL_PROXY_TEXTURE_2D, 0, GL11.GL_RGBA, i, i, 0, GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE, (IntBuffer)null);
if (GlStateManager.func_187411_c(GL11.GL_PROXY_TEXTURE_2D, 0, GL11.GL_TEXTURE_WIDTH) != 0)
GlStateManager.glTexImage2D(GL11.GL_PROXY_TEXTURE_2D, 0, GL11.GL_RGBA, i, i, 0, GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE, (IntBuffer)null);
if (GlStateManager.glGetTexLevelParameteri(GL11.GL_PROXY_TEXTURE_2D, 0, GL11.GL_TEXTURE_WIDTH) != 0)
{
max_texture_size = i;
return i;
@@ -184,12 +184,12 @@ public class GuiUtils
float uScale = 1f / 0x100;
float vScale = 1f / 0x100;
Tessellator tessellator = Tessellator.getInstance();
VertexBuffer wr = tessellator.getWorldRenderer();
VertexBuffer wr = tessellator.getBuffer();
wr.begin(7, DefaultVertexFormats.POSITION_TEX);
wr.pos(x , y + height, zLevel).func_187315_a( u * uScale, ((v + height) * vScale)).endVertex();
wr.pos(x + width, y + height, zLevel).func_187315_a((u + width) * uScale, ((v + height) * vScale)).endVertex();
wr.pos(x + width, y , zLevel).func_187315_a((u + width) * uScale, ( v * vScale)).endVertex();
wr.pos(x , y , zLevel).func_187315_a( u * uScale, ( v * vScale)).endVertex();
wr.pos(x , y + height, zLevel).tex( u * uScale, ((v + height) * vScale)).endVertex();
wr.pos(x + width, y + height, zLevel).tex((u + width) * uScale, ((v + height) * vScale)).endVertex();
wr.pos(x + width, y , zLevel).tex((u + width) * uScale, ( v * vScale)).endVertex();
wr.pos(x , y , zLevel).tex( u * uScale, ( v * vScale)).endVertex();
tessellator.draw();
}
@@ -128,7 +128,7 @@ public class FMLOutboundHandler extends ChannelOutboundHandlerAdapter {
public List<NetworkDispatcher> selectNetworks(Object args, ChannelHandlerContext context, FMLProxyPacket packet)
{
ImmutableList.Builder<NetworkDispatcher> builder = ImmutableList.<NetworkDispatcher>builder();
for (EntityPlayerMP player : (List<EntityPlayerMP>)FMLCommonHandler.instance().getMinecraftServerInstance().func_184103_al().getPlayerList())
for (EntityPlayerMP player : (List<EntityPlayerMP>)FMLCommonHandler.instance().getMinecraftServerInstance().getPlayerList().getPlayerList())
{
NetworkDispatcher dispatcher = player.playerNetServerHandler.netManager.channel().attr(NetworkDispatcher.FML_DISPATCHER).get();
if (dispatcher != null) builder.add(dispatcher);
@@ -156,7 +156,7 @@ public class FMLOutboundHandler extends ChannelOutboundHandlerAdapter {
{
int dimension = (Integer)args;
ImmutableList.Builder<NetworkDispatcher> builder = ImmutableList.<NetworkDispatcher>builder();
for (EntityPlayerMP player : (List<EntityPlayerMP>)FMLCommonHandler.instance().getMinecraftServerInstance().func_184103_al().getPlayerList())
for (EntityPlayerMP player : (List<EntityPlayerMP>)FMLCommonHandler.instance().getMinecraftServerInstance().getPlayerList().getPlayerList())
{
if (dimension == player.dimension)
{
@@ -190,7 +190,7 @@ public class FMLOutboundHandler extends ChannelOutboundHandlerAdapter {
{
TargetPoint tp = (TargetPoint)args;
ImmutableList.Builder<NetworkDispatcher> builder = ImmutableList.<NetworkDispatcher>builder();
for (EntityPlayerMP player : (List<EntityPlayerMP>)FMLCommonHandler.instance().getMinecraftServerInstance().func_184103_al().getPlayerList())
for (EntityPlayerMP player : (List<EntityPlayerMP>)FMLCommonHandler.instance().getMinecraftServerInstance().getPlayerList().getPlayerList())
{
if (player.dimension == tp.dimension)
{
@@ -126,7 +126,7 @@ public class EntitySpawnHandler extends SimpleChannelInboundHandler<FMLMessage.E
if (spawnMsg.dataWatcherList != null)
{
entity.func_184212_Q().func_187218_a(spawnMsg.dataWatcherList);
entity.getDataManager().setEntryValues(spawnMsg.dataWatcherList);
}
if (spawnMsg.throwerId > 0)
@@ -193,7 +193,7 @@ public abstract class FMLMessage {
PacketBuffer pb = new PacketBuffer(tmpBuf);
try
{
entity.func_184212_Q().func_187216_a(pb);
entity.getDataManager().writeEntries(pb);
} catch (IOException e)
{
FMLLog.log(Level.FATAL,e,"Encountered fatal exception trying to send entity spawn data watchers");
@@ -247,7 +247,7 @@ public abstract class FMLMessage {
scaledHeadYaw = dat.readByte() * 360F / 256F;
try
{
dataWatcherList = EntityDataManager.func_187215_b(new PacketBuffer(dat));
dataWatcherList = EntityDataManager.readEntries(new PacketBuffer(dat));
} catch (IOException e)
{
FMLLog.log(Level.FATAL, e, "There was a critical error decoding the datawatcher stream for a mod entity.");
@@ -557,7 +557,7 @@ public class FMLControlledNamespacedRegistry<I> extends RegistryNamespacedDefaul
throw new IllegalArgumentException("The object to be added to the registry is not of the right type. Reflection/ASM hackery? Registry bug?");
}
underlyingIntegerMap.func_186814_a(thing, id); // obj <-> id
underlyingIntegerMap.put(thing, id); // obj <-> id
super.putObject(name, thing); // name <-> obj
availabilityMap.set(id);
if (addCallback != null)
@@ -759,7 +759,7 @@ public class FMLControlledNamespacedRegistry<I> extends RegistryNamespacedDefaul
for (I i : this.underlyingIntegerMap)
{
addCallback.onAdd(i, this.underlyingIntegerMap.func_186808_c(i));
addCallback.onAdd(i, this.underlyingIntegerMap.add(i));
}
}
@@ -157,8 +157,8 @@ public class ItemHandlerHelper
// play sound if something got picked up
if (remainder == null || remainder.stackSize != stack.stackSize)
{
world.func_184148_a(player, player.posX, player.posY, player.posZ,
SoundEvents.field_187638_cR, SoundCategory.PLAYERS, 0.2F, ((world.rand.nextFloat() - world.rand.nextFloat()) * 0.7F + 1.0F) * 2.0F);
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);
}
// drop remaining itemstack into the world
@@ -35,7 +35,7 @@ public class PlayerArmorInvWrapper extends InvWrapper
EntityEquipmentSlot equ = null;
for (EntityEquipmentSlot s : EntityEquipmentSlot.values())
{
if (s.func_188453_a() == EntityEquipmentSlot.Type.ARMOR && s.func_188454_b() == slot)
if (s.getSlotType() == EntityEquipmentSlot.Type.ARMOR && s.getIndex() == slot)
{
equ = s;
break;
@@ -36,7 +36,7 @@ public class ForgeCommand extends CommandBase {
return 2;
}
@Override
public void func_184881_a(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException
public void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException
{
if (args.length == 0)
{
@@ -65,7 +65,7 @@ public class ForgeCommand extends CommandBase {
}
@Override
public List<String> func_184883_a(MinecraftServer server, ICommandSender sender, String[] args, BlockPos pos)
public List<String> getTabCompletionOptions(MinecraftServer server, ICommandSender sender, String[] args, BlockPos pos)
{
if (args.length == 1)
{
@@ -47,7 +47,7 @@ public final class ConsoleCommandCompleter implements Completer
@Override
public List<String> call() throws Exception
{
return ConsoleCommandCompleter.this.server.func_184104_a(ConsoleCommandCompleter.this.server, input,
return ConsoleCommandCompleter.this.server.getTabCompletions(ConsoleCommandCompleter.this.server, input,
ConsoleCommandCompleter.this.server.getPosition(), false/* we're not a command block */);
}
});