Implemented previous fixes in the 1.12.2 branch in 1.7.10.

This commit is contained in:
bconlon 2020-06-02 20:10:48 -07:00
parent 67c5443007
commit 5d05ee5117
10 changed files with 45 additions and 6 deletions

View file

@ -28,6 +28,9 @@ public class BlockAetherGrass extends Block implements IGrowable {
@SideOnly(Side.CLIENT)
private IIcon blockIconTop;
@SideOnly(Side.CLIENT)
private IIcon blockIconSnowy;
public BlockAetherGrass() {
super(Material.grass);
@ -75,6 +78,7 @@ public class BlockAetherGrass extends Block implements IGrowable {
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister registry) {
this.blockIcon = registry.registerIcon("aether_legacy:aether_grass_side");
this.blockIconSnowy = registry.registerIcon("aether_legacy:aether_grass_side_snowy");
this.blockIconTop = registry.registerIcon("aether_legacy:aether_grass_top");
}
@ -87,13 +91,19 @@ public class BlockAetherGrass extends Block implements IGrowable {
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) {
if (side == 1) {
if (side == 1)
{
return this.blockIconTop;
} else if (side == 0) {
}
else if (side == 0)
{
return BlocksAether.aether_dirt.getBlockTextureFromSide(side);
}
return this.blockIcon;
else
{
Material material = world.getBlock(x, y + 1, z).getMaterial();
return material != Material.snow && material != Material.craftedSnow ? this.blockIcon : this.blockIconSnowy;
}
}
@Override

View file

@ -4,6 +4,8 @@ import java.util.ArrayList;
import java.util.Random;
import net.minecraft.block.BlockLeaves;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
@ -22,6 +24,12 @@ import cpw.mods.fml.relauncher.SideOnly;
public class BlockAetherLeaves extends BlockLeaves {
@SideOnly(Side.CLIENT)
private IIcon fastIcon;
@SideOnly(Side.CLIENT)
private IIcon fancyIcon;
public BlockAetherLeaves() {
super();
}
@ -54,7 +62,6 @@ public class BlockAetherLeaves extends BlockLeaves {
@SideOnly(Side.CLIENT)
public void randomDisplayTick(World world, int x, int y, int z, Random rand) {
super.randomDisplayTick(world, x, y, z, rand);
if (!world.isRemote) {
return;
}
@ -126,10 +133,25 @@ public class BlockAetherLeaves extends BlockLeaves {
return drops;
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister p_149651_1_)
{
this.fancyIcon = p_149651_1_.registerIcon(this.getTextureName());
this.fastIcon = p_149651_1_.registerIcon(this.getTextureName() + "_opaque");
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta) {
return super.blockIcon;
if (Minecraft.getMinecraft().gameSettings.fancyGraphics)
{
return fancyIcon;
}
else
{
return fastIcon;
}
}
@Override

View file

@ -51,4 +51,11 @@ public class GuiSunAltar extends GuiScreen {
return false;
}
protected void keyTyped(char p_73869_1_, int p_73869_2_)
{
if (p_73869_2_ == 1 || p_73869_2_ == this.mc.gameSettings.keyBindInventory.getKeyCode())
{
this.mc.thePlayer.closeScreen();
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB