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
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user