Some import renames and compile error fixes, killed ~800.
This commit is contained in:
parent
1f80eb17df
commit
ac7c4d2f6c
|
@ -8,6 +8,6 @@
|
|||
+ public boolean isReplaceable(World world, BlockPos pos)
|
||||
+ {
|
||||
+ net.minecraft.block.state.IBlockState state = world.getBlockState(pos);
|
||||
+ return state.getBlock().isAir(world, pos) || state.getBlock().isLeaves(world, pos) || state.getBlock().isWood(world, pos) || func_150523_a(state.getBlock());
|
||||
+ return state.getBlock().isAir(state, world, pos) || state.getBlock().isLeaves(state, world, pos) || state.getBlock().isWood(world, pos) || func_150523_a(state.getBlock());
|
||||
+ }
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
- Block block = this.world.getBlockState(this.basePos.down()).getBlock();
|
||||
+ BlockPos down = this.basePos.down();
|
||||
+ net.minecraft.block.state.IBlockState state = this.world.getBlockState(down);
|
||||
+ boolean isSoil = state.getBlock().canSustainPlant(this.world, down, net.minecraft.util.EnumFacing.UP, ((net.minecraft.block.BlockSapling)Blocks.sapling));
|
||||
+ boolean isSoil = state.getBlock().canSustainPlant(state, this.world, down, net.minecraft.util.EnumFacing.UP, ((net.minecraft.block.BlockSapling)Blocks.sapling));
|
||||
|
||||
- if (block != Blocks.dirt && block != Blocks.grass && block != Blocks.farmland)
|
||||
+ if (!isSoil)
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
BlockPos blockpos = position.down();
|
||||
- Block block = worldIn.getBlockState(blockpos).getBlock();
|
||||
+ net.minecraft.block.state.IBlockState state = worldIn.getBlockState(blockpos);
|
||||
+ boolean isSoil = state.getBlock().canSustainPlant(worldIn, blockpos, net.minecraft.util.EnumFacing.UP, ((net.minecraft.block.BlockSapling)Blocks.sapling));
|
||||
+ boolean isSoil = state.getBlock().canSustainPlant(state, worldIn, blockpos, net.minecraft.util.EnumFacing.UP, ((net.minecraft.block.BlockSapling)Blocks.sapling));
|
||||
|
||||
- if (block != Blocks.grass && block != Blocks.dirt)
|
||||
+ if (!(isSoil && position.getY() < 256 - i - 1))
|
||||
|
|
|
@ -9,11 +9,13 @@
|
|||
{
|
||||
flag = false;
|
||||
}
|
||||
@@ -79,13 +79,14 @@
|
||||
@@ -78,14 +78,15 @@
|
||||
private boolean func_175927_a(BlockPos p_175927_1_, World worldIn)
|
||||
{
|
||||
BlockPos blockpos = p_175927_1_.down();
|
||||
Block block = worldIn.getBlockState(blockpos).getBlock();
|
||||
+ boolean isSoil = block.canSustainPlant(worldIn, blockpos, net.minecraft.util.EnumFacing.UP, ((net.minecraft.block.BlockSapling)Blocks.sapling));
|
||||
- Block block = worldIn.getBlockState(blockpos).getBlock();
|
||||
+ IBlockState state = worldIn.getBlockState(blockpos);
|
||||
+ boolean isSoil = state.getBlock().canSustainPlant(state, worldIn, blockpos, net.minecraft.util.EnumFacing.UP, ((net.minecraft.block.BlockSapling)Blocks.sapling));
|
||||
|
||||
- if ((block == Blocks.grass || block == Blocks.dirt) && p_175927_1_.getY() >= 2)
|
||||
+ if (isSoil && p_175927_1_.getY() >= 2)
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
+ //Helper macro
|
||||
+ private boolean isAirLeaves(World world, BlockPos pos)
|
||||
+ {
|
||||
+ net.minecraft.block.Block block = world.getBlockState(pos).getBlock();
|
||||
+ return block.isAir(world, pos) || block.isLeaves(world, pos);
|
||||
+ IBlockState state = world.getBlockState(pos);
|
||||
+ return state.getBlock().isAir(state, world, pos) || state.getBlock().isLeaves(state, world, pos);
|
||||
+ }
|
||||
}
|
||||
|
|
|
@ -15,14 +15,14 @@
|
|||
{
|
||||
- Block block = worldIn.getBlockState(position.down()).getBlock();
|
||||
+ BlockPos down = position.down();
|
||||
+ Block block = worldIn.getBlockState(down).getBlock();
|
||||
+ boolean isSoil = block.canSustainPlant(worldIn, down, net.minecraft.util.EnumFacing.UP, ((net.minecraft.block.BlockSapling)Blocks.sapling));
|
||||
+ IBlockState state = worldIn.getBlockState(down);
|
||||
+ boolean isSoil = state.getBlock().canSustainPlant(state, worldIn, down, net.minecraft.util.EnumFacing.UP, ((net.minecraft.block.BlockSapling)Blocks.sapling));
|
||||
|
||||
- if ((block == Blocks.grass || block == Blocks.dirt) && position.getY() < 256 - i - 1)
|
||||
+ if (isSoil && position.getY() < 256 - i - 1)
|
||||
{
|
||||
- this.func_175921_a(worldIn, position.down());
|
||||
+ block.onPlantGrow(worldIn, down, position);
|
||||
+ state.getBlock().onPlantGrow(worldIn, down, position);
|
||||
EnumFacing enumfacing = EnumFacing.Plane.HORIZONTAL.random(rand);
|
||||
int k2 = i - rand.nextInt(4) - 1;
|
||||
int l2 = 3 - rand.nextInt(3);
|
||||
|
|
|
@ -6,14 +6,14 @@
|
|||
{
|
||||
- Block block1 = worldIn.getBlockState(position.down()).getBlock();
|
||||
+ BlockPos down = position.down();
|
||||
+ Block block1 = worldIn.getBlockState(down).getBlock();
|
||||
+ boolean isSoil = block1.canSustainPlant(worldIn, down, net.minecraft.util.EnumFacing.UP, ((net.minecraft.block.BlockSapling)Blocks.sapling));
|
||||
+ IBlockState state = worldIn.getBlockState(down);
|
||||
+ boolean isSoil = state.getBlock().canSustainPlant(state, worldIn, down, net.minecraft.util.EnumFacing.UP, ((net.minecraft.block.BlockSapling)Blocks.sapling));
|
||||
|
||||
- if ((block1 == Blocks.grass || block1 == Blocks.dirt) && position.getY() < 256 - i - 1)
|
||||
+ if (isSoil && position.getY() < 256 - i - 1)
|
||||
{
|
||||
- this.func_175921_a(worldIn, position.down());
|
||||
+ block1.onPlantGrow(worldIn, position.down(),position);
|
||||
+ state.getBlock().onPlantGrow(worldIn, position.down(),position);
|
||||
|
||||
for (int k1 = position.getY() - 3 + i; k1 <= position.getY() + i; ++k1)
|
||||
{
|
||||
|
|
|
@ -15,14 +15,14 @@
|
|||
{
|
||||
- Block block = worldIn.getBlockState(position.down()).getBlock();
|
||||
+ BlockPos down = position.down();
|
||||
+ Block block = worldIn.getBlockState(down).getBlock();
|
||||
+ boolean isSoil = block.canSustainPlant(worldIn, down, net.minecraft.util.EnumFacing.UP, (net.minecraft.block.BlockSapling)Blocks.sapling);
|
||||
+ IBlockState state = worldIn.getBlockState(down);
|
||||
+ boolean isSoil = state.getBlock().canSustainPlant(state, worldIn, down, net.minecraft.util.EnumFacing.UP, (net.minecraft.block.BlockSapling)Blocks.sapling);
|
||||
|
||||
- if ((block == Blocks.grass || block == Blocks.dirt) && position.getY() < 256 - i - 1)
|
||||
+ if (isSoil && position.getY() < 256 - i - 1)
|
||||
{
|
||||
- this.func_175921_a(worldIn, position.down());
|
||||
+ block.onPlantGrow(worldIn, down, position);
|
||||
+ state.getBlock().onPlantGrow(worldIn, down, position);
|
||||
int k2 = 0;
|
||||
|
||||
for (int l2 = position.getY() + i; l2 >= position.getY() + j; --l2)
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
+ static
|
||||
+ {
|
||||
+ net.minecraftforge.common.ChestGenHooks.init(net.minecraftforge.common.ChestGenHooks.MINESHAFT_CORRIDOR, CHEST_CONTENT_WEIGHT_LIST, 8, 8);
|
||||
+ net.minecraftforge.common.ChestGenHooks.addItem(net.minecraftforge.common.ChestGenHooks.MINESHAFT_CORRIDOR, new WeightedRandomChestContent(new net.minecraft.item.ItemStack(Items.enchanted_book, 1, 0), 1, 1, 1));
|
||||
+ net.minecraftforge.common.ChestGenHooks.addItem(net.minecraftforge.common.ChestGenHooks.MINESHAFT_CORRIDOR, new WeightedRandomChestContent(new net.minecraft.item.ItemStack(net.minecraft.init.Items.enchanted_book, 1, 0), 1, 1, 1));
|
||||
+ }
|
||||
+
|
||||
private static StructureComponent func_175892_a(List<StructureComponent> listIn, Random rand, int x, int y, int z, EnumFacing facing, int type)
|
||||
|
|
|
@ -9,12 +9,13 @@ import net.minecraft.command.CommandHandler;
|
|||
import net.minecraft.command.ICommand;
|
||||
import net.minecraft.command.ICommandSender;
|
||||
import net.minecraft.command.WrongUsageException;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.CommandEvent;
|
||||
import net.minecraftforge.fml.client.FMLClientHandler;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import static net.minecraft.util.EnumChatFormatting.*;
|
||||
import net.minecraft.util.text.TextComponentTranslation;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import static net.minecraft.util.text.TextFormatting.*;
|
||||
|
||||
/**
|
||||
* The class that handles client-side chat commands. You should register any
|
||||
|
@ -57,7 +58,7 @@ public class ClientCommandHandler extends CommandHandler
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (icommand.canCommandSenderUseCommand(sender))
|
||||
if (icommand.func_184882_a(this.func_184879_a(), sender))
|
||||
{
|
||||
CommandEvent event = new CommandEvent(icommand, sender, args);
|
||||
if (MinecraftForge.EVENT_BUS.post(event))
|
||||
|
@ -69,7 +70,7 @@ public class ClientCommandHandler extends CommandHandler
|
|||
return 0;
|
||||
}
|
||||
|
||||
icommand.processCommand(sender, args);
|
||||
this.tryExecute(sender, args, icommand, message);
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
|
@ -95,9 +96,9 @@ public class ClientCommandHandler extends CommandHandler
|
|||
}
|
||||
|
||||
//Couple of helpers because the mcp names are stupid and long...
|
||||
private ChatComponentTranslation format(EnumChatFormatting color, String str, Object... args)
|
||||
private TextComponentTranslation format(TextFormatting color, String str, Object... args)
|
||||
{
|
||||
ChatComponentTranslation ret = new ChatComponentTranslation(str, args);
|
||||
TextComponentTranslation ret = new TextComponentTranslation(str, args);
|
||||
ret.getChatStyle().setColor(color);
|
||||
return ret;
|
||||
}
|
||||
|
@ -136,4 +137,9 @@ public class ClientCommandHandler extends CommandHandler
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected MinecraftServer func_184879_a() {
|
||||
return Minecraft.getMinecraft().getIntegratedServer();
|
||||
}
|
||||
}
|
|
@ -17,7 +17,6 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.ISound;
|
||||
import net.minecraft.client.audio.SoundEventAccessorComposite;
|
||||
import net.minecraft.client.audio.SoundManager;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.GuiMainMenu;
|
||||
|
@ -27,10 +26,14 @@ import net.minecraft.client.renderer.EntityRenderer;
|
|||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.RenderGlobal;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
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;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||
|
@ -39,11 +42,6 @@ import net.minecraft.client.renderer.vertex.VertexFormat;
|
|||
import net.minecraft.client.renderer.vertex.VertexFormatElement;
|
||||
import net.minecraft.client.renderer.vertex.VertexFormatElement.EnumUsage;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.client.resources.model.IBakedModel;
|
||||
import net.minecraft.client.resources.model.ModelBakery;
|
||||
import net.minecraft.client.resources.model.ModelManager;
|
||||
import net.minecraft.client.resources.model.ModelResourceLocation;
|
||||
import net.minecraft.client.resources.model.ModelRotation;
|
||||
import net.minecraft.client.settings.GameSettings;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
@ -52,6 +50,10 @@ import net.minecraft.item.Item;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.util.registry.IRegistry;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
|
@ -113,7 +115,7 @@ public class ForgeHooksClient
|
|||
}
|
||||
}
|
||||
|
||||
public static boolean onDrawBlockHighlight(RenderGlobal context, EntityPlayer player, MovingObjectPosition target, int subID, ItemStack currentItem, float partialTicks)
|
||||
public static boolean onDrawBlockHighlight(RenderGlobal context, EntityPlayer player, RayTraceResult target, int subID, ItemStack currentItem, float partialTicks)
|
||||
{
|
||||
return MinecraftForge.EVENT_BUS.post(new DrawBlockHighlightEvent(context, player, target, subID, currentItem, partialTicks));
|
||||
}
|
||||
|
@ -145,15 +147,15 @@ public class ForgeHooksClient
|
|||
renderPass = pass;
|
||||
}
|
||||
|
||||
static final ThreadLocal<EnumWorldBlockLayer> renderLayer = new ThreadLocal<EnumWorldBlockLayer>()
|
||||
static final ThreadLocal<BlockRenderLayer> renderLayer = new ThreadLocal<BlockRenderLayer>()
|
||||
{
|
||||
protected EnumWorldBlockLayer initialValue()
|
||||
protected BlockRenderLayer initialValue()
|
||||
{
|
||||
return EnumWorldBlockLayer.SOLID;
|
||||
return BlockRenderLayer.SOLID;
|
||||
}
|
||||
};
|
||||
|
||||
public static void setRenderLayer(EnumWorldBlockLayer layer)
|
||||
public static void setRenderLayer(BlockRenderLayer layer)
|
||||
{
|
||||
renderLayer.set(layer);
|
||||
}
|
||||
|
@ -265,7 +267,7 @@ public class ForgeHooksClient
|
|||
if (status == BETA || status == BETA_OUTDATED)
|
||||
{
|
||||
// render a warning at the top of the screen,
|
||||
String line = I18n.format("forge.update.beta.1", EnumChatFormatting.RED, EnumChatFormatting.RESET);
|
||||
String line = I18n.format("forge.update.beta.1", TextFormatting.RED, TextFormatting.RESET);
|
||||
gui.drawString(font, line, (width - font.getStringWidth(line)) / 2, 4 + (0 * (font.FONT_HEIGHT + 1)), -1);
|
||||
line = I18n.format("forge.update.beta.2");
|
||||
gui.drawString(font, line, (width - font.getStringWidth(line)) / 2, 4 + (1 * (font.FONT_HEIGHT + 1)), -1);
|
||||
|
@ -297,7 +299,7 @@ public class ForgeHooksClient
|
|||
return e.result;
|
||||
}
|
||||
|
||||
//static RenderBlocks worldRendererRB;
|
||||
//static RenderBlocks VertexBufferRB;
|
||||
static int worldRenderPass;
|
||||
|
||||
public static int getWorldRenderPass()
|
||||
|
@ -325,25 +327,25 @@ public class ForgeHooksClient
|
|||
}
|
||||
|
||||
/*
|
||||
public static void setWorldRendererRB(RenderBlocks renderBlocks)
|
||||
public static void setVertexBufferRB(RenderBlocks renderBlocks)
|
||||
{
|
||||
worldRendererRB = renderBlocks;
|
||||
VertexBufferRB = renderBlocks;
|
||||
}
|
||||
|
||||
public static void onPreRenderWorld(WorldRenderer worldRenderer, int pass)
|
||||
public static void onPreRenderWorld(VertexBuffer VertexBuffer, int pass)
|
||||
{
|
||||
if(worldRendererRB != null)
|
||||
if(VertexBufferRB != null)
|
||||
{
|
||||
worldRenderPass = pass;
|
||||
MinecraftForge.EVENT_BUS.post(new RenderWorldEvent.Pre(worldRenderer, (ChunkCache)worldRendererRB.blockAccess, worldRendererRB, pass));
|
||||
MinecraftForge.EVENT_BUS.post(new RenderWorldEvent.Pre(VertexBuffer, (ChunkCache)VertexBufferRB.blockAccess, VertexBufferRB, pass));
|
||||
}
|
||||
}
|
||||
|
||||
public static void onPostRenderWorld(WorldRenderer worldRenderer, int pass)
|
||||
public static void onPostRenderWorld(VertexBuffer VertexBuffer, int pass)
|
||||
{
|
||||
if(worldRendererRB != null)
|
||||
if(VertexBufferRB != null)
|
||||
{
|
||||
MinecraftForge.EVENT_BUS.post(new RenderWorldEvent.Post(worldRenderer, (ChunkCache)worldRendererRB.blockAccess, worldRendererRB, pass));
|
||||
MinecraftForge.EVENT_BUS.post(new RenderWorldEvent.Post(VertexBuffer, (ChunkCache)VertexBufferRB.blockAccess, VertexBufferRB, pass));
|
||||
worldRenderPass = -1;
|
||||
}
|
||||
}
|
||||
|
@ -501,7 +503,7 @@ public class ForgeHooksClient
|
|||
return ret;
|
||||
}
|
||||
|
||||
public static void putQuadColor(WorldRenderer renderer, BakedQuad quad, int color)
|
||||
public static void putQuadColor(VertexBuffer renderer, BakedQuad quad, int color)
|
||||
{
|
||||
float cr = color & 0xFF;
|
||||
float cg = (color >>> 8) & 0xFF;
|
||||
|
|
|
@ -29,11 +29,11 @@ import net.minecraft.potion.Potion;
|
|||
import net.minecraft.scoreboard.ScoreObjective;
|
||||
import net.minecraft.scoreboard.ScorePlayerTeam;
|
||||
import net.minecraft.scoreboard.Scoreboard;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.FoodStats;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StringUtils;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
|
@ -596,7 +596,7 @@ public class GuiIngameForge extends GuiIngame
|
|||
{
|
||||
String name = this.highlightingItemStack.getDisplayName();
|
||||
if (this.highlightingItemStack.hasDisplayName())
|
||||
name = EnumChatFormatting.ITALIC + name;
|
||||
name = TextFormatting.ITALIC + name;
|
||||
|
||||
name = this.highlightingItemStack.getItem().getHighlightTip(this.highlightingItemStack, name);
|
||||
|
||||
|
|
|
@ -8,9 +8,9 @@ import com.google.common.collect.Maps;
|
|||
import gnu.trove.map.hash.TIntObjectHashMap;
|
||||
import gnu.trove.procedure.TIntObjectProcedure;
|
||||
import net.minecraft.client.renderer.ItemModelMesher;
|
||||
import net.minecraft.client.resources.model.IBakedModel;
|
||||
import net.minecraft.client.resources.model.ModelManager;
|
||||
import net.minecraft.client.resources.model.ModelResourceLocation;
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.block.model.ModelManager;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
/**
|
||||
|
|
|
@ -9,8 +9,8 @@ import java.util.BitSet;
|
|||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import net.minecraft.client.renderer.RegionRenderCache;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
@ -26,7 +26,7 @@ public class MinecraftForgeClient
|
|||
return ForgeHooksClient.renderPass;
|
||||
}
|
||||
|
||||
public static EnumWorldBlockLayer getRenderLayer()
|
||||
public static BlockRenderLayer getRenderLayer()
|
||||
{
|
||||
return ForgeHooksClient.renderLayer.get();
|
||||
}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package net.minecraftforge.client.event;
|
||||
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
|
||||
@Cancelable
|
||||
public class ClientChatReceivedEvent extends Event
|
||||
{
|
||||
public IChatComponent message;
|
||||
public ITextComponent message;
|
||||
/**
|
||||
* Introduced in 1.8:
|
||||
* 0 : Standard Text Message
|
||||
|
@ -15,7 +15,7 @@ public class ClientChatReceivedEvent extends Event
|
|||
* 2 : 'Status' message, displayed above action bar, where song notifications are.
|
||||
*/
|
||||
public final byte type;
|
||||
public ClientChatReceivedEvent(byte type, IChatComponent message)
|
||||
public ClientChatReceivedEvent(byte type, ITextComponent message)
|
||||
{
|
||||
this.type = type;
|
||||
this.message = message;
|
||||
|
|
|
@ -4,7 +4,7 @@ import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
|||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.client.renderer.RenderGlobal;
|
||||
|
||||
@Cancelable
|
||||
|
@ -12,12 +12,12 @@ public class DrawBlockHighlightEvent extends Event
|
|||
{
|
||||
public final RenderGlobal context;
|
||||
public final EntityPlayer player;
|
||||
public final MovingObjectPosition target;
|
||||
public final RayTraceResult target;
|
||||
public final int subID;
|
||||
public final ItemStack currentItem;
|
||||
public final float partialTicks;
|
||||
|
||||
public DrawBlockHighlightEvent(RenderGlobal context, EntityPlayer player, MovingObjectPosition target, int subID, ItemStack currentItem, float partialTicks)
|
||||
public DrawBlockHighlightEvent(RenderGlobal context, EntityPlayer player, RayTraceResult target, int subID, ItemStack currentItem, float partialTicks)
|
||||
{
|
||||
this.context = context;
|
||||
this.player = player;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package net.minecraftforge.client.event;
|
||||
|
||||
import net.minecraft.client.resources.model.IBakedModel;
|
||||
import net.minecraft.client.resources.model.ModelBakery;
|
||||
import net.minecraft.client.resources.model.ModelManager;
|
||||
import net.minecraft.client.resources.model.ModelResourceLocation;
|
||||
import net.minecraft.util.IRegistry;
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
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.util.registry.IRegistry;
|
||||
import net.minecraftforge.client.model.ModelLoader;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ package net.minecraftforge.client.event;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
|
||||
|
|
|
@ -2,18 +2,18 @@ package net.minecraftforge.client.event;
|
|||
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
import net.minecraft.client.renderer.entity.RendererLivingEntity;
|
||||
import net.minecraft.client.renderer.entity.RenderLivingBase;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
||||
public abstract class RenderLivingEvent<T extends EntityLivingBase> extends Event
|
||||
{
|
||||
public final EntityLivingBase entity;
|
||||
public final RendererLivingEntity<T> renderer;
|
||||
public final RenderLivingBase<T> renderer;
|
||||
public final double x;
|
||||
public final double y;
|
||||
public final double z;
|
||||
|
||||
public RenderLivingEvent(EntityLivingBase entity, RendererLivingEntity<T> renderer, double x, double y, double z)
|
||||
public RenderLivingEvent(EntityLivingBase entity, RenderLivingBase<T> renderer, double x, double y, double z)
|
||||
{
|
||||
this.entity = entity;
|
||||
this.renderer = renderer;
|
||||
|
@ -25,25 +25,25 @@ public abstract class RenderLivingEvent<T extends EntityLivingBase> extends Even
|
|||
@Cancelable
|
||||
public static class Pre<T extends EntityLivingBase> extends RenderLivingEvent<T>
|
||||
{
|
||||
public Pre(EntityLivingBase entity, RendererLivingEntity<T> renderer, double x, double y, double z){ super(entity, renderer, x, y, z); }
|
||||
public Pre(EntityLivingBase entity, RenderLivingBase<T> renderer, double x, double y, double z){ super(entity, renderer, x, y, z); }
|
||||
}
|
||||
public static class Post<T extends EntityLivingBase> extends RenderLivingEvent<T>
|
||||
{
|
||||
public Post(EntityLivingBase entity, RendererLivingEntity<T> renderer, double x, double y, double z){ super(entity, renderer, x, y, z); }
|
||||
public Post(EntityLivingBase entity, RenderLivingBase<T> renderer, double x, double y, double z){ super(entity, renderer, x, y, z); }
|
||||
}
|
||||
|
||||
public abstract static class Specials<T extends EntityLivingBase> extends RenderLivingEvent<T>
|
||||
{
|
||||
public Specials(EntityLivingBase entity, RendererLivingEntity<T> renderer, double x, double y, double z){ super(entity, renderer, x, y, z); }
|
||||
public Specials(EntityLivingBase entity, RenderLivingBase<T> renderer, double x, double y, double z){ super(entity, renderer, x, y, z); }
|
||||
|
||||
@Cancelable
|
||||
public static class Pre<T extends EntityLivingBase> extends Specials<T>
|
||||
{
|
||||
public Pre(EntityLivingBase entity, RendererLivingEntity<T> renderer, double x, double y, double z){ super(entity, renderer, x, y, z); }
|
||||
public Pre(EntityLivingBase entity, RenderLivingBase<T> renderer, double x, double y, double z){ super(entity, renderer, x, y, z); }
|
||||
}
|
||||
public static class Post<T extends EntityLivingBase> extends Specials<T>
|
||||
{
|
||||
public Post(EntityLivingBase entity, RendererLivingEntity<T> renderer, double x, double y, double z){ super(entity, renderer, x, y, z); }
|
||||
public Post(EntityLivingBase entity, RenderLivingBase<T> renderer, double x, double y, double z){ super(entity, renderer, x, y, z); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,17 +2,17 @@ package net.minecraftforge.client.event;
|
|||
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
//import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.world.ChunkCache;
|
||||
|
||||
public abstract class RenderWorldEvent extends Event
|
||||
{
|
||||
public final WorldRenderer renderer;
|
||||
public final VertexBuffer renderer;
|
||||
public final ChunkCache chunkCache;
|
||||
//public final RenderBlocks renderBlocks;
|
||||
public final int pass;
|
||||
|
||||
public RenderWorldEvent(WorldRenderer renderer, ChunkCache chunkCache, /*RenderBlocks renderBlocks,*/ int pass)
|
||||
public RenderWorldEvent(VertexBuffer renderer, ChunkCache chunkCache, /*RenderBlocks renderBlocks,*/ int pass)
|
||||
{
|
||||
this.renderer = renderer;
|
||||
this.chunkCache = chunkCache;
|
||||
|
@ -26,7 +26,7 @@ public abstract class RenderWorldEvent extends Event
|
|||
*/
|
||||
public static class Pre extends RenderWorldEvent
|
||||
{
|
||||
public Pre(WorldRenderer renderer, ChunkCache chunkCache, /*RenderBlocks renderBlocks,*/ int pass){ super(renderer, chunkCache, /*renderBlocks,*/ pass); }
|
||||
public Pre(VertexBuffer renderer, ChunkCache chunkCache, /*RenderBlocks renderBlocks,*/ int pass){ super(renderer, chunkCache, /*renderBlocks,*/ pass); }
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -34,6 +34,6 @@ public abstract class RenderWorldEvent extends Event
|
|||
*/
|
||||
public static class Post extends RenderWorldEvent
|
||||
{
|
||||
public Post(WorldRenderer renderer, ChunkCache chunkCache, /*RenderBlocks renderBlocks,*/ int pass){ super(renderer, chunkCache, /*renderBlocks,*/ pass); }
|
||||
public Post(VertexBuffer renderer, ChunkCache chunkCache, /*RenderBlocks renderBlocks,*/ int pass){ super(renderer, chunkCache, /*renderBlocks,*/ pass); }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ import java.util.List;
|
|||
import java.util.Map.Entry;
|
||||
|
||||
import net.minecraft.client.renderer.block.model.ModelBlockDefinition;
|
||||
import net.minecraft.client.resources.model.ModelRotation;
|
||||
import net.minecraft.client.renderer.block.model.ModelRotation;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.common.FMLLog;
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ import javax.vecmath.Quat4f;
|
|||
import javax.vecmath.Vector3f;
|
||||
|
||||
import net.minecraft.client.renderer.block.model.ItemCameraTransforms.TransformType;
|
||||
import net.minecraft.client.resources.model.ModelRotation;
|
||||
import net.minecraft.client.renderer.block.model.ModelRotation;
|
||||
import net.minecraft.util.JsonUtils;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.model.BlockStateLoader.Marker;
|
||||
|
|
|
@ -6,7 +6,7 @@ import net.minecraft.client.renderer.block.model.BakedQuad;
|
|||
import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.vertex.VertexFormat;
|
||||
import net.minecraft.client.resources.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
/*
|
||||
|
|
|
@ -10,7 +10,7 @@ import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
|
|||
import net.minecraft.client.renderer.block.model.ItemCameraTransforms.TransformType;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.vertex.VertexFormat;
|
||||
import net.minecraft.client.resources.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package net.minecraftforge.client.model;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.client.resources.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
|
||||
public interface ISmartItemModel extends IBakedModel
|
||||
{
|
||||
|
|
|
@ -13,8 +13,8 @@ import net.minecraft.client.renderer.block.model.ItemCameraTransforms.TransformT
|
|||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.vertex.VertexFormat;
|
||||
import net.minecraft.client.resources.IResourceManager;
|
||||
import net.minecraft.client.resources.model.IBakedModel;
|
||||
import net.minecraft.client.resources.model.ModelResourceLocation;
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
|
|
@ -15,8 +15,8 @@ import net.minecraft.client.renderer.block.model.ItemCameraTransforms.TransformT
|
|||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.vertex.VertexFormat;
|
||||
import net.minecraft.client.resources.IResourceManager;
|
||||
import net.minecraft.client.resources.model.IBakedModel;
|
||||
import net.minecraft.client.resources.model.ModelRotation;
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.block.model.ModelRotation;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
|
|
@ -41,13 +41,13 @@ import net.minecraft.client.renderer.texture.TextureMap;
|
|||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.client.renderer.vertex.VertexFormat;
|
||||
import net.minecraft.client.resources.IResourceManager;
|
||||
import net.minecraft.client.resources.model.BuiltInModel;
|
||||
import net.minecraft.client.resources.model.IBakedModel;
|
||||
import net.minecraft.client.resources.model.ModelBakery;
|
||||
import net.minecraft.client.resources.model.ModelResourceLocation;
|
||||
import net.minecraft.client.resources.model.ModelRotation;
|
||||
import net.minecraft.client.resources.model.SimpleBakedModel;
|
||||
import net.minecraft.client.resources.model.WeightedBakedModel;
|
||||
import net.minecraft.client.renderer.block.model.BuiltInModel;
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.block.model.ModelBakery;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.client.renderer.block.model.ModelRotation;
|
||||
import net.minecraft.client.renderer.block.model.SimpleBakedModel;
|
||||
import net.minecraft.client.renderer.block.model.WeightedBakedModel;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
|
|
@ -10,7 +10,7 @@ import net.minecraft.client.Minecraft;
|
|||
import net.minecraft.client.resources.IReloadableResourceManager;
|
||||
import net.minecraft.client.resources.IResourceManager;
|
||||
import net.minecraft.client.resources.IResourceManagerReloadListener;
|
||||
import net.minecraft.client.resources.model.ModelResourceLocation;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.model.ModelLoader.VanillaLoader;
|
||||
import net.minecraftforge.client.model.b3d.B3DLoader;
|
||||
|
|
|
@ -14,10 +14,10 @@ import net.minecraft.client.renderer.block.model.ItemCameraTransforms.TransformT
|
|||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.vertex.VertexFormat;
|
||||
import net.minecraft.client.resources.IResourceManager;
|
||||
import net.minecraft.client.resources.model.IBakedModel;
|
||||
import net.minecraft.client.resources.model.ModelResourceLocation;
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
import net.minecraftforge.fml.common.FMLLog;
|
||||
|
@ -34,11 +34,11 @@ import com.google.gson.JsonParser;
|
|||
|
||||
public class MultiLayerModel implements IModelCustomData<MultiLayerModel>
|
||||
{
|
||||
public static final MultiLayerModel instance = new MultiLayerModel(ImmutableMap.<Optional<EnumWorldBlockLayer>, ModelResourceLocation>of());
|
||||
public static final MultiLayerModel instance = new MultiLayerModel(ImmutableMap.<Optional<BlockRenderLayer>, ModelResourceLocation>of());
|
||||
|
||||
private final ImmutableMap<Optional<EnumWorldBlockLayer>, ModelResourceLocation> models;
|
||||
private final ImmutableMap<Optional<BlockRenderLayer>, ModelResourceLocation> models;
|
||||
|
||||
public MultiLayerModel(ImmutableMap<Optional<EnumWorldBlockLayer>, ModelResourceLocation> models)
|
||||
public MultiLayerModel(ImmutableMap<Optional<BlockRenderLayer>, ModelResourceLocation> models)
|
||||
{
|
||||
this.models = models;
|
||||
}
|
||||
|
@ -55,10 +55,10 @@ public class MultiLayerModel implements IModelCustomData<MultiLayerModel>
|
|||
return ImmutableList.of();
|
||||
}
|
||||
|
||||
private static ImmutableMap<Optional<EnumWorldBlockLayer>, IFlexibleBakedModel> buildModels(ImmutableMap<Optional<EnumWorldBlockLayer>, ModelResourceLocation> models, IModelState state, VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter)
|
||||
private static ImmutableMap<Optional<BlockRenderLayer>, IFlexibleBakedModel> buildModels(ImmutableMap<Optional<BlockRenderLayer>, ModelResourceLocation> models, IModelState state, VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter)
|
||||
{
|
||||
ImmutableMap.Builder<Optional<EnumWorldBlockLayer>, IFlexibleBakedModel> builder = ImmutableMap.builder();
|
||||
for(Optional<EnumWorldBlockLayer> key : models.keySet())
|
||||
ImmutableMap.Builder<Optional<BlockRenderLayer>, IFlexibleBakedModel> builder = ImmutableMap.builder();
|
||||
for(Optional<BlockRenderLayer> key : models.keySet())
|
||||
{
|
||||
IModel model;
|
||||
try
|
||||
|
@ -96,14 +96,14 @@ public class MultiLayerModel implements IModelCustomData<MultiLayerModel>
|
|||
@Override
|
||||
public IModel process(ImmutableMap<String, String> customData)
|
||||
{
|
||||
ImmutableMap.Builder<Optional<EnumWorldBlockLayer>, ModelResourceLocation> builder = ImmutableMap.builder();
|
||||
ImmutableMap.Builder<Optional<BlockRenderLayer>, ModelResourceLocation> builder = ImmutableMap.builder();
|
||||
for(String key : customData.keySet())
|
||||
{
|
||||
if("base".equals(key))
|
||||
{
|
||||
builder.put(Optional.<EnumWorldBlockLayer>absent(), getLocation(customData.get(key)));
|
||||
builder.put(Optional.<BlockRenderLayer>absent(), getLocation(customData.get(key)));
|
||||
}
|
||||
for(EnumWorldBlockLayer layer : EnumWorldBlockLayer.values())
|
||||
for(BlockRenderLayer layer : BlockRenderLayer.values())
|
||||
{
|
||||
if(layer.toString().equals(key))
|
||||
{
|
||||
|
@ -111,7 +111,7 @@ public class MultiLayerModel implements IModelCustomData<MultiLayerModel>
|
|||
}
|
||||
}
|
||||
}
|
||||
ImmutableMap<Optional<EnumWorldBlockLayer>, ModelResourceLocation> models = builder.build();
|
||||
ImmutableMap<Optional<BlockRenderLayer>, ModelResourceLocation> models = builder.build();
|
||||
if(models.isEmpty()) return instance;
|
||||
return new MultiLayerModel(models);
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ public class MultiLayerModel implements IModelCustomData<MultiLayerModel>
|
|||
|
||||
public static class MultiLayerBakedModel implements IFlexibleBakedModel, ISmartBlockModel, IPerspectiveAwareModel
|
||||
{
|
||||
private final ImmutableMap<Optional<EnumWorldBlockLayer>, IFlexibleBakedModel> models;
|
||||
private final ImmutableMap<Optional<BlockRenderLayer>, IFlexibleBakedModel> models;
|
||||
private final VertexFormat format;
|
||||
private final ImmutableMap<TransformType, TRSRTransformation> cameraTransforms;;
|
||||
private final IFlexibleBakedModel base;
|
||||
|
@ -145,7 +145,7 @@ public class MultiLayerModel implements IModelCustomData<MultiLayerModel>
|
|||
};
|
||||
|
||||
@Deprecated // remove 1.9
|
||||
public MultiLayerBakedModel(ImmutableMap<Optional<EnumWorldBlockLayer>, ModelResourceLocation> models, VertexFormat format, ImmutableMap<TransformType, TRSRTransformation> cameraTransforms)
|
||||
public MultiLayerBakedModel(ImmutableMap<Optional<BlockRenderLayer>, ModelResourceLocation> models, VertexFormat format, ImmutableMap<TransformType, TRSRTransformation> cameraTransforms)
|
||||
{
|
||||
this(
|
||||
buildModels(models, TRSRTransformation.identity(), format, defaultTextureGetter),
|
||||
|
@ -155,7 +155,7 @@ public class MultiLayerModel implements IModelCustomData<MultiLayerModel>
|
|||
);
|
||||
}
|
||||
|
||||
public MultiLayerBakedModel(ImmutableMap<Optional<EnumWorldBlockLayer>, IFlexibleBakedModel> models, IFlexibleBakedModel missing, VertexFormat format, ImmutableMap<TransformType, TRSRTransformation> cameraTransforms)
|
||||
public MultiLayerBakedModel(ImmutableMap<Optional<BlockRenderLayer>, IFlexibleBakedModel> models, IFlexibleBakedModel missing, VertexFormat format, ImmutableMap<TransformType, TRSRTransformation> cameraTransforms)
|
||||
{
|
||||
this.models = models;
|
||||
this.format = format;
|
||||
|
@ -178,7 +178,7 @@ public class MultiLayerModel implements IModelCustomData<MultiLayerModel>
|
|||
quads = quadBuilder.build();
|
||||
}
|
||||
|
||||
private static ImmutableList<BakedQuad> buildQuads(ImmutableMap<Optional<EnumWorldBlockLayer>, IFlexibleBakedModel> models, Optional<EnumFacing> side)
|
||||
private static ImmutableList<BakedQuad> buildQuads(ImmutableMap<Optional<BlockRenderLayer>, IFlexibleBakedModel> models, Optional<EnumFacing> side)
|
||||
{
|
||||
ImmutableList.Builder<BakedQuad> builder = ImmutableList.builder();
|
||||
for(IBakedModel model : models.values())
|
||||
|
@ -240,7 +240,7 @@ public class MultiLayerModel implements IModelCustomData<MultiLayerModel>
|
|||
@Override
|
||||
public IBakedModel handleBlockState(IBlockState state)
|
||||
{
|
||||
Optional<EnumWorldBlockLayer> layer = Optional.of(MinecraftForgeClient.getRenderLayer());
|
||||
Optional<BlockRenderLayer> layer = Optional.of(MinecraftForgeClient.getRenderLayer());
|
||||
if(!models.containsKey(layer))
|
||||
{
|
||||
return missing;
|
||||
|
|
|
@ -9,7 +9,7 @@ import javax.vecmath.Vector3f;
|
|||
import javax.vecmath.Vector4f;
|
||||
|
||||
import net.minecraft.client.renderer.block.model.ItemTransformVec3f;
|
||||
import net.minecraft.client.resources.model.ModelRotation;
|
||||
import net.minecraft.client.renderer.block.model.ModelRotation;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.Vec3i;
|
||||
|
||||
|
|
|
@ -6,19 +6,19 @@ import net.minecraft.client.model.ModelBase;
|
|||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.block.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.client.resources.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.client.model.IModel;
|
||||
import net.minecraftforge.client.model.IModelState;
|
||||
import net.minecraftforge.client.model.ModelLoader;
|
||||
import net.minecraftforge.client.model.pipeline.VertexLighterFlat;
|
||||
import net.minecraftforge.client.model.pipeline.WorldRendererConsumer;
|
||||
import net.minecraftforge.client.model.pipeline.VertexBufferConsumer;
|
||||
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
@ -58,11 +58,11 @@ public class AnimationModelBase<T extends Entity & IAnimationProvider> extends M
|
|||
GlStateManager.pushMatrix();
|
||||
GlStateManager.rotate(180, 0, 0, 1);
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
WorldRenderer worldRenderer = tessellator.getWorldRenderer();
|
||||
worldRenderer.begin(GL11.GL_QUADS, DefaultVertexFormats.BLOCK);
|
||||
worldRenderer.setTranslation(-0.5, -1.5, -0.5);
|
||||
VertexBuffer VertexBuffer = tessellator.getVertexBuffer();
|
||||
VertexBuffer.begin(GL11.GL_QUADS, DefaultVertexFormats.BLOCK);
|
||||
VertexBuffer.setTranslation(-0.5, -1.5, -0.5);
|
||||
|
||||
lighter.setParent(new WorldRendererConsumer(worldRenderer));
|
||||
lighter.setParent(new VertexBufferConsumer(VertexBuffer));
|
||||
lighter.setWorld(entity.worldObj);
|
||||
lighter.setBlock(Blocks.air);
|
||||
lighter.setBlockPos(pos);
|
||||
|
@ -92,12 +92,12 @@ public class AnimationModelBase<T extends Entity & IAnimationProvider> extends M
|
|||
}
|
||||
|
||||
// debug quad
|
||||
/*worldRenderer.pos(0, 1, 0).color(0xFF, 0xFF, 0xFF, 0xFF).tex(0, 0).lightmap(240, 0).endVertex();
|
||||
worldRenderer.pos(0, 1, 1).color(0xFF, 0xFF, 0xFF, 0xFF).tex(0, 1).lightmap(240, 0).endVertex();
|
||||
worldRenderer.pos(1, 1, 1).color(0xFF, 0xFF, 0xFF, 0xFF).tex(1, 1).lightmap(240, 0).endVertex();
|
||||
worldRenderer.pos(1, 1, 0).color(0xFF, 0xFF, 0xFF, 0xFF).tex(1, 0).lightmap(240, 0).endVertex();*/
|
||||
/*VertexBuffer.pos(0, 1, 0).color(0xFF, 0xFF, 0xFF, 0xFF).tex(0, 0).lightmap(240, 0).endVertex();
|
||||
VertexBuffer.pos(0, 1, 1).color(0xFF, 0xFF, 0xFF, 0xFF).tex(0, 1).lightmap(240, 0).endVertex();
|
||||
VertexBuffer.pos(1, 1, 1).color(0xFF, 0xFF, 0xFF, 0xFF).tex(1, 1).lightmap(240, 0).endVertex();
|
||||
VertexBuffer.pos(1, 1, 0).color(0xFF, 0xFF, 0xFF, 0xFF).tex(1, 0).lightmap(240, 0).endVertex();*/
|
||||
|
||||
worldRenderer.setTranslation(0, 0, 0);
|
||||
VertexBuffer.setTranslation(0, 0, 0);
|
||||
|
||||
tessellator.draw();
|
||||
GlStateManager.popMatrix();
|
||||
|
|
|
@ -5,10 +5,10 @@ import java.util.concurrent.TimeUnit;
|
|||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.BlockRendererDispatcher;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.resources.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
import net.minecraftforge.client.model.IModelState;
|
||||
|
@ -47,7 +47,7 @@ public class AnimationTESR<T extends TileEntity & IAnimationProvider> extends Fa
|
|||
return modelCache.getUnchecked(Pair.of(state, modelState));
|
||||
}
|
||||
|
||||
public void renderTileEntityFast(T te, double x, double y, double z, float partialTick, int breakStage, WorldRenderer renderer)
|
||||
public void renderTileEntityFast(T te, double x, double y, double z, float partialTick, int breakStage, VertexBuffer renderer)
|
||||
{
|
||||
if(blockRenderer == null) blockRenderer = Minecraft.getMinecraft().getBlockRendererDispatcher();
|
||||
BlockPos pos = te.getPos();
|
||||
|
|
|
@ -2,7 +2,7 @@ package net.minecraftforge.client.model.animation;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.client.resources.model.ModelResourceLocation;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
|
|
@ -6,7 +6,7 @@ import net.minecraft.client.Minecraft;
|
|||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
|
@ -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();
|
||||
WorldRenderer worldRenderer = tessellator.getWorldRenderer();
|
||||
VertexBuffer VertexBuffer = tessellator.getVertexBuffer();
|
||||
this.bindTexture(TextureMap.locationBlocksTexture);
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
@ -34,10 +34,10 @@ public abstract class FastTESR<T extends TileEntity> extends TileEntitySpecialRe
|
|||
GlStateManager.shadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
|
||||
worldRenderer.begin(GL11.GL_QUADS, DefaultVertexFormats.BLOCK);
|
||||
VertexBuffer.begin(GL11.GL_QUADS, DefaultVertexFormats.BLOCK);
|
||||
|
||||
renderTileEntityFast(te, x, y, z, partialTicks, destroyStage, worldRenderer);
|
||||
worldRenderer.setTranslation(0, 0, 0);
|
||||
renderTileEntityFast(te, x, y, z, partialTicks, destroyStage, VertexBuffer);
|
||||
VertexBuffer.setTranslation(0, 0, 0);
|
||||
|
||||
tessellator.draw();
|
||||
|
||||
|
@ -45,5 +45,5 @@ public abstract class FastTESR<T extends TileEntity> extends TileEntitySpecialRe
|
|||
}
|
||||
|
||||
@Override
|
||||
public abstract void renderTileEntityFast(T te, double x, double y, double z, float partialTicks, int destroyStage, WorldRenderer worldRenderer);
|
||||
public abstract void renderTileEntityFast(T te, double x, double y, double z, float partialTicks, int destroyStage, VertexBuffer VertexBuffer);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
|||
import net.minecraft.client.renderer.vertex.VertexFormat;
|
||||
import net.minecraft.client.resources.IResource;
|
||||
import net.minecraft.client.resources.IResourceManager;
|
||||
import net.minecraft.client.resources.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
|
|
@ -2,7 +2,7 @@ package net.minecraftforge.client.model.pipeline;
|
|||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.Block.EnumOffsetType;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
|
|
@ -4,10 +4,10 @@ import java.util.List;
|
|||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.BlockModelRenderer;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.block.model.BakedQuad;
|
||||
import net.minecraft.client.resources.model.IBakedModel;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraftforge.common.ForgeModContainer;
|
||||
|
@ -32,20 +32,20 @@ public class ForgeBlockModelRenderer extends BlockModelRenderer
|
|||
}
|
||||
};
|
||||
|
||||
private final ThreadLocal<WorldRendererConsumer> wrFlat = new ThreadLocal<WorldRendererConsumer>();
|
||||
private final ThreadLocal<WorldRendererConsumer> wrSmooth = new ThreadLocal<WorldRendererConsumer>();
|
||||
private final ThreadLocal<WorldRenderer> lastRendererFlat = new ThreadLocal<WorldRenderer>();
|
||||
private final ThreadLocal<WorldRenderer> lastRendererSmooth = new ThreadLocal<WorldRenderer>();
|
||||
private final ThreadLocal<VertexBufferConsumer> wrFlat = new ThreadLocal<VertexBufferConsumer>();
|
||||
private final ThreadLocal<VertexBufferConsumer> wrSmooth = new ThreadLocal<VertexBufferConsumer>();
|
||||
private final ThreadLocal<VertexBuffer> lastRendererFlat = new ThreadLocal<VertexBuffer>();
|
||||
private final ThreadLocal<VertexBuffer> lastRendererSmooth = new ThreadLocal<VertexBuffer>();
|
||||
|
||||
@Override
|
||||
public boolean renderModelStandard(IBlockAccess world, IBakedModel model, Block block, BlockPos pos, WorldRenderer wr, boolean checkSides)
|
||||
public boolean renderModelStandard(IBlockAccess world, IBakedModel model, Block block, BlockPos pos, VertexBuffer wr, boolean checkSides)
|
||||
{
|
||||
if(ForgeModContainer.forgeLightPipelineEnabled)
|
||||
{
|
||||
if(wr != lastRendererFlat.get())
|
||||
{
|
||||
lastRendererFlat.set(wr);
|
||||
WorldRendererConsumer newCons = new WorldRendererConsumer(wr);
|
||||
VertexBufferConsumer newCons = new VertexBufferConsumer(wr);
|
||||
wrFlat.set(newCons);
|
||||
lighterFlat.get().setParent(newCons);
|
||||
}
|
||||
|
@ -59,14 +59,14 @@ public class ForgeBlockModelRenderer extends BlockModelRenderer
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean renderModelAmbientOcclusion(IBlockAccess world, IBakedModel model, Block block, BlockPos pos, WorldRenderer wr, boolean checkSides)
|
||||
public boolean renderModelAmbientOcclusion(IBlockAccess world, IBakedModel model, Block block, BlockPos pos, VertexBuffer wr, boolean checkSides)
|
||||
{
|
||||
if(ForgeModContainer.forgeLightPipelineEnabled)
|
||||
{
|
||||
if(wr != lastRendererSmooth.get())
|
||||
{
|
||||
lastRendererSmooth.set(wr);
|
||||
WorldRendererConsumer newCons = new WorldRendererConsumer(wr);
|
||||
VertexBufferConsumer newCons = new VertexBufferConsumer(wr);
|
||||
wrSmooth.set(newCons);
|
||||
lighterSmooth.get().setParent(newCons);
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ public class ForgeBlockModelRenderer extends BlockModelRenderer
|
|||
}
|
||||
}
|
||||
|
||||
public static boolean render(VertexLighterFlat lighter, IBlockAccess world, IBakedModel model, Block block, BlockPos pos, WorldRenderer wr, boolean checkSides)
|
||||
public static boolean render(VertexLighterFlat lighter, IBlockAccess world, IBakedModel model, Block block, BlockPos pos, VertexBuffer wr, boolean checkSides)
|
||||
{
|
||||
lighter.setWorld(world);
|
||||
lighter.setBlock(block);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package net.minecraftforge.client.model.pipeline;
|
||||
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.block.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.client.renderer.vertex.VertexFormat;
|
||||
|
@ -240,8 +240,8 @@ public class LightUtil
|
|||
if(tessellator == null)
|
||||
{
|
||||
Tessellator tes = Tessellator.getInstance();
|
||||
WorldRenderer wr = tes.getWorldRenderer();
|
||||
tessellator = new WorldRendererConsumer(wr);
|
||||
VertexBuffer wr = tes.getVertexBuffer();
|
||||
tessellator = new VertexBufferConsumer(wr);
|
||||
}
|
||||
return tessellator;
|
||||
}
|
||||
|
@ -257,16 +257,16 @@ public class LightUtil
|
|||
}
|
||||
|
||||
// renders quad in any Vertex Format, but is slower
|
||||
public static void renderQuadColorSlow(WorldRenderer wr, BakedQuad quad, int auxColor)
|
||||
public static void renderQuadColorSlow(VertexBuffer wr, BakedQuad quad, int auxColor)
|
||||
{
|
||||
ItemConsumer cons;
|
||||
if(wr == Tessellator.getInstance().getWorldRenderer())
|
||||
if(wr == Tessellator.getInstance().getVertexBuffer())
|
||||
{
|
||||
cons = getItemConsumer();
|
||||
}
|
||||
else
|
||||
{
|
||||
cons = new ItemConsumer(new WorldRendererConsumer(wr));
|
||||
cons = new ItemConsumer(new VertexBufferConsumer(wr));
|
||||
}
|
||||
float b = (float)(auxColor & 0xFF) / 0xFF;
|
||||
float g = (float)((auxColor >>> 8) & 0xFF) / 0xFF;
|
||||
|
@ -277,7 +277,7 @@ public class LightUtil
|
|||
quad.pipe(cons);
|
||||
}
|
||||
|
||||
public static void renderQuadColor(WorldRenderer wr, BakedQuad quad, int auxColor)
|
||||
public static void renderQuadColor(VertexBuffer wr, BakedQuad quad, int auxColor)
|
||||
{
|
||||
wr.addVertexData(quad.getVertexData());
|
||||
if(quad instanceof IColoredBakedQuad)
|
||||
|
|
|
@ -8,7 +8,7 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.client.renderer.EntityRenderer;
|
||||
import net.minecraft.client.renderer.vertex.VertexFormat;
|
||||
import net.minecraft.client.renderer.vertex.VertexFormatElement;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
|
@ -154,7 +154,7 @@ public class VertexLighterFlat extends QuadGatheringTransformer
|
|||
switch(element.getUsage())
|
||||
{
|
||||
case POSITION:
|
||||
// position adding moved to WorldRendererConsumer due to x and z not fitting completely into a float
|
||||
// position adding moved to VertexBufferConsumer due to x and z not fitting completely into a float
|
||||
/*float[] pos = new float[4];
|
||||
System.arraycopy(position[v], 0, pos, 0, position[v].length);
|
||||
pos[0] += blockInfo.getBlockPos().getX();
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
package net.minecraftforge.client.model.pipeline;
|
||||
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.vertex.VertexFormat;
|
||||
import net.minecraft.client.renderer.vertex.VertexFormatElement.EnumUsage;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
/**
|
||||
* Assumes VertexFormatElement is present in the WorlRenderer's vertex format.
|
||||
*/
|
||||
public class WorldRendererConsumer implements IVertexConsumer
|
||||
public class VertexBufferConsumer implements IVertexConsumer
|
||||
{
|
||||
private static final float[] dummyColor = new float[]{ 1, 1, 1, 1 };
|
||||
private final WorldRenderer renderer;
|
||||
private final VertexBuffer renderer;
|
||||
private final int[] quadData;
|
||||
private int v = 0;
|
||||
private BlockPos offset = BlockPos.ORIGIN;
|
||||
|
||||
public WorldRendererConsumer(WorldRenderer renderer)
|
||||
public VertexBufferConsumer(VertexBuffer renderer)
|
||||
{
|
||||
super();
|
||||
this.renderer = renderer;
|
||||
|
|
|
@ -557,13 +557,13 @@ public class ForgeHooks
|
|||
"((?:[a-z0-9]{2,}:\\/\\/)?(?:(?:[0-9]{1,3}\\.){3}[0-9]{1,3}|(?:[-\\w_\\.]{1,}\\.[a-z]{2,}?))(?::[0-9]{1,5})?.*?(?=[!\"\u00A7 \n]|$))",
|
||||
Pattern.CASE_INSENSITIVE);
|
||||
|
||||
public static IChatComponent newChatWithLinks(String string){ return newChatWithLinks(string, true); }
|
||||
public static IChatComponent newChatWithLinks(String string, boolean allowMissingHeader)
|
||||
public static ITextComponent newChatWithLinks(String string){ return newChatWithLinks(string, true); }
|
||||
public static ITextComponent newChatWithLinks(String string, boolean allowMissingHeader)
|
||||
{
|
||||
// Includes ipv4 and domain pattern
|
||||
// Matches an ip (xx.xxx.xx.xxx) or a domain (something.com) with or
|
||||
// without a protocol or path.
|
||||
IChatComponent ichat = null;
|
||||
ITextComponent ichat = null;
|
||||
Matcher matcher = URL_PATTERN.matcher(string);
|
||||
int lastEnd = 0;
|
||||
|
||||
|
@ -578,13 +578,13 @@ public class ForgeHooks
|
|||
if (part.length() > 0)
|
||||
{
|
||||
if (ichat == null)
|
||||
ichat = new ChatComponentText(part);
|
||||
ichat = new TextComponentString(part);
|
||||
else
|
||||
ichat.appendText(part);
|
||||
}
|
||||
lastEnd = end;
|
||||
String url = string.substring(start, end);
|
||||
IChatComponent link = new ChatComponentText(url);
|
||||
ITextComponent link = new TextComponentString(url);
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -594,7 +594,7 @@ public class ForgeHooks
|
|||
if (!allowMissingHeader)
|
||||
{
|
||||
if (ichat == null)
|
||||
ichat = new ChatComponentText(url);
|
||||
ichat = new TextComponentString(url);
|
||||
else
|
||||
ichat.appendText(url);
|
||||
continue;
|
||||
|
@ -605,7 +605,7 @@ public class ForgeHooks
|
|||
catch (URISyntaxException e)
|
||||
{
|
||||
// Bad syntax bail out!
|
||||
if (ichat == null) ichat = new ChatComponentText(url);
|
||||
if (ichat == null) ichat = new TextComponentString(url);
|
||||
else ichat.appendText(url);
|
||||
continue;
|
||||
}
|
||||
|
@ -624,7 +624,7 @@ public class ForgeHooks
|
|||
// Append the rest of the message.
|
||||
String end = string.substring(lastEnd);
|
||||
if (ichat == null)
|
||||
ichat = new ChatComponentText(end);
|
||||
ichat = new TextComponentString(end);
|
||||
else if (end.length() > 0)
|
||||
ichat.appendText(string.substring(lastEnd));
|
||||
return ichat;
|
||||
|
|
|
@ -7,7 +7,7 @@ import java.util.Map;
|
|||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.properties.IProperty;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
|
@ -18,7 +18,7 @@ import com.google.common.collect.ImmutableTable;
|
|||
import com.google.common.collect.Iterables;
|
||||
import com.google.common.collect.Maps;
|
||||
|
||||
public class ExtendedBlockState extends BlockState
|
||||
public class ExtendedBlockState extends BlockStateContainer
|
||||
{
|
||||
private final ImmutableSet<IUnlistedProperty<?>> unlistedProperties;
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import java.io.Serializable;
|
|||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.DimensionManager;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
|
|
|
@ -9,7 +9,7 @@ import net.minecraft.network.play.client.C15PacketClientSettings;
|
|||
import net.minecraft.server.management.ItemInWorldManager;
|
||||
import net.minecraft.stats.StatBase;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldServer;
|
||||
|
@ -24,7 +24,7 @@ public class FakePlayer extends EntityPlayerMP
|
|||
|
||||
@Override public Vec3 getPositionVector(){ return new Vec3(0, 0, 0); }
|
||||
@Override public boolean canCommandSenderUseCommand(int i, String s){ return false; }
|
||||
@Override public void addChatComponentMessage(IChatComponent chatmessagecomponent){}
|
||||
@Override public void addChatComponentMessage(ITextComponent chatmessagecomponent){}
|
||||
@Override public void addStat(StatBase par1StatBase, int par2){}
|
||||
@Override public void openGui(Object mod, int modGuiId, World world, int x, int y, int z){}
|
||||
@Override public boolean isEntityInvulnerable(DamageSource source){ return true; }
|
||||
|
|
|
@ -263,7 +263,7 @@ public class ForgeEventFactory
|
|||
MinecraftForge.EVENT_BUS.post(new PlayerEvent.LoadFromFile(player, dir, uuidString));
|
||||
}
|
||||
|
||||
public static IChatComponent onClientChat(byte type, IChatComponent message)
|
||||
public static ITextComponent onClientChat(byte type, ITextComponent message)
|
||||
{
|
||||
ClientChatReceivedEvent event = new ClientChatReceivedEvent(type, message);
|
||||
return MinecraftForge.EVENT_BUS.post(event) ? null : event.message;
|
||||
|
|
|
@ -4,7 +4,7 @@ import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
|||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
|
||||
/**
|
||||
* ServerChatEvent is fired whenever a C01PacketChatMessage is processed. <br>
|
||||
|
@ -39,7 +39,7 @@ public class ServerChatEvent extends Event
|
|||
this.component = component;
|
||||
}
|
||||
|
||||
public void setComponent(IChatComponent e)
|
||||
public void setComponent(ITextComponent e)
|
||||
{
|
||||
if (e instanceof ChatComponentTranslation)
|
||||
this.component = (ChatComponentTranslation)e;
|
||||
|
@ -47,7 +47,7 @@ public class ServerChatEvent extends Event
|
|||
this.component = new ChatComponentTranslation("%s", e);
|
||||
}
|
||||
|
||||
public IChatComponent getComponent()
|
||||
public ITextComponent getComponent()
|
||||
{
|
||||
return this.component;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package net.minecraftforge.event.entity.minecart;
|
||||
|
||||
import net.minecraft.entity.item.EntityMinecart;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
/**
|
||||
* MinecartUpdateEvent is fired when a minecart is updated.<br>
|
||||
|
|
|
@ -4,7 +4,7 @@ import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
|||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@Cancelable
|
||||
|
|
|
@ -6,7 +6,7 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.event.entity.living.LivingEvent;
|
||||
|
||||
/**
|
||||
|
|
|
@ -3,9 +3,9 @@ package net.minecraftforge.event.entity.player;
|
|||
import static net.minecraftforge.fml.common.eventhandler.Event.Result.DEFAULT;
|
||||
import static net.minecraftforge.fml.common.eventhandler.Event.Result.DENY;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
|
||||
|
@ -46,7 +46,7 @@ public class PlayerInteractEvent extends PlayerEvent
|
|||
public final World world;
|
||||
public final BlockPos pos;
|
||||
public final EnumFacing face; // Can be null if unknown
|
||||
public final Vec3 localPos; // Can be null if unknown
|
||||
public final Vec3d localPos; // Can be null if unknown
|
||||
|
||||
public Result useBlock = DEFAULT;
|
||||
public Result useItem = DEFAULT;
|
||||
|
@ -57,7 +57,7 @@ public class PlayerInteractEvent extends PlayerEvent
|
|||
this(player, action, pos, face, world, null);
|
||||
}
|
||||
|
||||
public PlayerInteractEvent(EntityPlayer player, Action action, BlockPos pos, EnumFacing face, World world, Vec3 localPos)
|
||||
public PlayerInteractEvent(EntityPlayer player, Action action, BlockPos pos, EnumFacing face, World world, Vec3d localPos)
|
||||
{
|
||||
super(player);
|
||||
this.action = action;
|
||||
|
|
|
@ -2,7 +2,7 @@ package net.minecraftforge.event.entity.player;
|
|||
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
@Cancelable
|
||||
public class PlayerSetSpawnEvent extends PlayerEvent
|
||||
|
|
|
@ -2,7 +2,7 @@ package net.minecraftforge.event.entity.player;
|
|||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayer.EnumStatus;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
/**
|
||||
* PlayerSleepInBedEvent is fired when a player sleeps in a bed.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package net.minecraftforge.event.entity.player;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event.HasResult;
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,7 +2,7 @@ package net.minecraftforge.event.entity.player;
|
|||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package net.minecraftforge.event.terraingen;
|
||||
|
||||
import java.util.Random;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeDecorator;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
|
|
|
@ -5,7 +5,7 @@ import java.util.List;
|
|||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.Explosion;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.EnumCreatureType;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldSettings;
|
||||
import net.minecraft.world.biome.BiomeGenBase.SpawnListEntry;
|
||||
|
|
|
@ -13,9 +13,9 @@ import net.minecraft.entity.Entity;
|
|||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
@ -113,7 +113,7 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock
|
|||
protected int temperature = 295;
|
||||
|
||||
protected int tickRate = 20;
|
||||
protected EnumWorldBlockLayer renderLayer = EnumWorldBlockLayer.TRANSLUCENT;
|
||||
protected BlockRenderLayer renderLayer = BlockRenderLayer.TRANSLUCENT;
|
||||
protected int maxScaledLight = 0;
|
||||
|
||||
protected final String fluidName;
|
||||
|
@ -185,7 +185,7 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock
|
|||
return this;
|
||||
}
|
||||
|
||||
public BlockFluidBase setRenderLayer(EnumWorldBlockLayer renderLayer)
|
||||
public BlockFluidBase setRenderLayer(BlockRenderLayer renderLayer)
|
||||
{
|
||||
this.renderLayer = renderLayer;
|
||||
return this;
|
||||
|
@ -404,7 +404,7 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public EnumWorldBlockLayer getBlockLayer()
|
||||
public BlockRenderLayer getBlockLayer()
|
||||
{
|
||||
return this.renderLayer;
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import java.util.Random;
|
|||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
|
|
@ -2,7 +2,7 @@ package net.minecraftforge.fluids;
|
|||
|
||||
import java.util.Locale;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
package net.minecraftforge.fluids;
|
||||
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
|
|
|
@ -8,7 +8,7 @@ import net.minecraft.entity.player.InventoryPlayer;
|
|||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.ReportedException;
|
||||
import net.minecraft.world.World;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package net.minecraftforge.fluids;
|
||||
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
|
|
|
@ -11,7 +11,7 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.stats.StatList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
|
|
@ -34,14 +34,14 @@ import net.minecraft.client.gui.GuiTextField;
|
|||
import net.minecraft.client.gui.GuiUtilRenderComponents;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.texture.DynamicTexture;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.client.resources.IResourcePack;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraft.util.TextComponentString;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StringUtils;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
|
@ -451,7 +451,7 @@ public class GuiModList extends GuiScreen
|
|||
{
|
||||
private ResourceLocation logoPath;
|
||||
private Dimension logoDims;
|
||||
private List<IChatComponent> lines = null;
|
||||
private List<ITextComponent> lines = null;
|
||||
|
||||
public Info(int width, List<String> lines, ResourceLocation logoPath, Dimension logoDims)
|
||||
{
|
||||
|
@ -475,9 +475,9 @@ public class GuiModList extends GuiScreen
|
|||
@Override protected void drawBackground() {}
|
||||
@Override protected void drawSlot(int slotIdx, int entryRight, int slotTop, int slotBuffer, Tessellator tess) { }
|
||||
|
||||
private List<IChatComponent> resizeContent(List<String> lines)
|
||||
private List<ITextComponent> resizeContent(List<String> lines)
|
||||
{
|
||||
List<IChatComponent> ret = new ArrayList<IChatComponent>();
|
||||
List<ITextComponent> ret = new ArrayList<ITextComponent>();
|
||||
for (String line : lines)
|
||||
{
|
||||
if (line == null)
|
||||
|
@ -486,7 +486,7 @@ public class GuiModList extends GuiScreen
|
|||
continue;
|
||||
}
|
||||
|
||||
IChatComponent chat = ForgeHooks.newChatWithLinks(line, false);
|
||||
ITextComponent chat = ForgeHooks.newChatWithLinks(line, false);
|
||||
ret.addAll(GuiUtilRenderComponents.func_178908_a(chat, this.listWidth-8, GuiModList.this.fontRendererObj, false, true));
|
||||
}
|
||||
return ret;
|
||||
|
@ -524,7 +524,7 @@ public class GuiModList extends GuiScreen
|
|||
{
|
||||
GlStateManager.enableBlend();
|
||||
GuiModList.this.mc.renderEngine.bindTexture(logoPath);
|
||||
WorldRenderer wr = tess.getWorldRenderer();
|
||||
VertexBuffer wr = tess.getVertexBuffer();
|
||||
int offset = (this.left + this.listWidth/2) - (logoDims.width / 2);
|
||||
wr.begin(7, DefaultVertexFormats.POSITION_TEX);
|
||||
wr.pos(offset, top + logoDims.height, zLevel).tex(0, 1).endVertex();
|
||||
|
@ -536,7 +536,7 @@ public class GuiModList extends GuiScreen
|
|||
top += logoDims.height + 10;
|
||||
}
|
||||
|
||||
for (IChatComponent line : lines)
|
||||
for (ITextComponent line : lines)
|
||||
{
|
||||
if (line != null)
|
||||
{
|
||||
|
@ -563,14 +563,14 @@ public class GuiModList extends GuiScreen
|
|||
if (lineIdx >= lines.size())
|
||||
return;
|
||||
|
||||
IChatComponent line = lines.get(lineIdx);
|
||||
ITextComponent line = lines.get(lineIdx);
|
||||
if (line != null)
|
||||
{
|
||||
int k = -4;
|
||||
for (IChatComponent part : (Iterable<IChatComponent>)line) {
|
||||
if (!(part instanceof ChatComponentText))
|
||||
for (ITextComponent part : (Iterable<ITextComponent>)line) {
|
||||
if (!(part instanceof TextComponentString))
|
||||
continue;
|
||||
k += GuiModList.this.fontRendererObj.getStringWidth(((ChatComponentText)part).getChatComponentText_TextValue());
|
||||
k += GuiModList.this.fontRendererObj.getStringWidth(((TextComponentString)part).getTextComponentString_TextValue());
|
||||
if (k >= x)
|
||||
{
|
||||
GuiModList.this.handleComponentClick(part);
|
||||
|
|
|
@ -20,7 +20,7 @@ import net.minecraft.client.gui.GuiButton;
|
|||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
|
@ -263,7 +263,7 @@ public abstract class GuiScrollingList
|
|||
this.applyScrollLimits();
|
||||
|
||||
Tessellator tess = Tessellator.getInstance();
|
||||
WorldRenderer worldr = tess.getWorldRenderer();
|
||||
VertexBuffer worldr = tess.getVertexBuffer();
|
||||
|
||||
ScaledResolution res = new ScaledResolution(client);
|
||||
double scaleW = client.displayWidth / res.getScaledWidth_double();
|
||||
|
@ -390,12 +390,12 @@ 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();
|
||||
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
||||
worldrenderer.begin(7, DefaultVertexFormats.POSITION_COLOR);
|
||||
worldrenderer.pos(right, top, 0.0D).color(r1, g1, b1, a1).endVertex();
|
||||
worldrenderer.pos(left, top, 0.0D).color(r1, g1, b1, a1).endVertex();
|
||||
worldrenderer.pos(left, bottom, 0.0D).color(r2, g2, b2, a2).endVertex();
|
||||
worldrenderer.pos(right, bottom, 0.0D).color(r2, g2, b2, a2).endVertex();
|
||||
VertexBuffer VertexBuffer = tessellator.getVertexBuffer();
|
||||
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();
|
||||
VertexBuffer.pos(left, bottom, 0.0D).color(r2, g2, b2, a2).endVertex();
|
||||
VertexBuffer.pos(right, bottom, 0.0D).color(r2, g2, b2, a2).endVertex();
|
||||
tessellator.draw();
|
||||
GlStateManager.shadeModel(GL11.GL_FLAT);
|
||||
GlStateManager.disableBlend();
|
||||
|
|
|
@ -23,7 +23,7 @@ import net.minecraft.client.Minecraft;
|
|||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.TextComponentString;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.client.config.GuiConfigEntries.IConfigEntry;
|
||||
import net.minecraftforge.fml.client.event.ConfigChangedEvent;
|
||||
|
@ -247,7 +247,7 @@ public class GuiConfig extends GuiScreen
|
|||
{
|
||||
flag = false;
|
||||
mc.displayGuiScreen(new GuiMessageDialog(parentScreen, "fml.configgui.gameRestartTitle",
|
||||
new ChatComponentText(I18n.format("fml.configgui.gameRestartRequired")), "fml.configgui.confirmRestartMessage"));
|
||||
new TextComponentString(I18n.format("fml.configgui.gameRestartRequired")), "fml.configgui.confirmRestartMessage"));
|
||||
}
|
||||
|
||||
if (this.parentScreen instanceof GuiConfig)
|
||||
|
|
|
@ -4,13 +4,13 @@ import net.minecraft.client.gui.GuiDisconnected;
|
|||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
|
||||
public class GuiMessageDialog extends GuiDisconnected
|
||||
{
|
||||
protected String buttonText;
|
||||
|
||||
public GuiMessageDialog(GuiScreen nextScreen, String title, IChatComponent message, String buttonText)
|
||||
public GuiMessageDialog(GuiScreen nextScreen, String title, ITextComponent message, String buttonText)
|
||||
{
|
||||
super(nextScreen, title, message);
|
||||
this.buttonText = buttonText;
|
||||
|
|
|
@ -15,7 +15,7 @@ package net.minecraftforge.fml.client.config;
|
|||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
|
@ -184,7 +184,7 @@ public class GuiUtils
|
|||
float uScale = 1f / 0x100;
|
||||
float vScale = 1f / 0x100;
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
WorldRenderer wr = tessellator.getWorldRenderer();
|
||||
VertexBuffer wr = tessellator.getVertexBuffer();
|
||||
wr.begin(7, DefaultVertexFormats.POSITION_TEX);
|
||||
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();
|
||||
|
|
|
@ -42,7 +42,7 @@ import net.minecraft.network.NetworkManager;
|
|||
import net.minecraft.network.handshake.client.C00Handshake;
|
||||
import net.minecraft.network.login.server.S00PacketDisconnect;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.TextComponentString;
|
||||
import net.minecraft.util.IThreadListener;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.storage.SaveHandler;
|
||||
|
@ -609,7 +609,7 @@ public class FMLCommonHandler
|
|||
{
|
||||
if (!shouldAllowPlayerLogins())
|
||||
{
|
||||
ChatComponentText text = new ChatComponentText("Server is still starting! Please wait before reconnecting.");
|
||||
TextComponentString text = new TextComponentString("Server is still starting! Please wait before reconnecting.");
|
||||
FMLLog.info("Disconnecting Player: " + text.getUnformattedText());
|
||||
manager.sendPacket(new S00PacketDisconnect(text));
|
||||
manager.closeChannel(text);
|
||||
|
@ -619,7 +619,7 @@ public class FMLCommonHandler
|
|||
if (packet.getRequestedState() == EnumConnectionState.LOGIN && (!NetworkRegistry.INSTANCE.isVanillaAccepted(Side.CLIENT) && !packet.hasFMLMarker()))
|
||||
{
|
||||
manager.setConnectionState(EnumConnectionState.LOGIN);
|
||||
ChatComponentText text = new ChatComponentText("This server requires FML/Forge to be installed. Contact your server admin for more details.");
|
||||
TextComponentString text = new TextComponentString("This server requires FML/Forge to be installed. Contact your server admin for more details.");
|
||||
FMLLog.info("Disconnecting Player: " + text.getUnformattedText());
|
||||
manager.sendPacket(new S00PacketDisconnect(text));
|
||||
manager.closeChannel(text);
|
||||
|
|
|
@ -32,7 +32,7 @@ import net.minecraft.network.play.server.S01PacketJoinGame;
|
|||
import net.minecraft.network.play.server.S3FPacketCustomPayload;
|
||||
import net.minecraft.network.play.server.S40PacketDisconnect;
|
||||
import net.minecraft.server.management.ServerConfigurationManager;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.TextComponentString;
|
||||
import net.minecraftforge.common.DimensionManager;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
|
@ -235,7 +235,7 @@ public class NetworkDispatcher extends SimpleChannelInboundHandler<Packet> imple
|
|||
this.state = ConnectionState.CONNECTED;
|
||||
MinecraftForge.EVENT_BUS.post(new FMLNetworkEvent.ServerConnectionFromClientEvent(manager));
|
||||
if (DEBUG_HANDSHAKE)
|
||||
manager.closeChannel(new ChatComponentText("Handshake Complete review log file for details."));
|
||||
manager.closeChannel(new TextComponentString("Handshake Complete review log file for details."));
|
||||
scm.initializeConnectionToPlayer(manager, player, serverHandler);
|
||||
}
|
||||
|
||||
|
@ -306,19 +306,19 @@ public class NetworkDispatcher extends SimpleChannelInboundHandler<Packet> imple
|
|||
@SuppressWarnings("unchecked")
|
||||
private void kickWithMessage(String message)
|
||||
{
|
||||
final ChatComponentText chatcomponenttext = new ChatComponentText(message);
|
||||
final TextComponentString TextComponentString = new TextComponentString(message);
|
||||
if (side == Side.CLIENT)
|
||||
{
|
||||
manager.closeChannel(chatcomponenttext);
|
||||
manager.closeChannel(TextComponentString);
|
||||
}
|
||||
else
|
||||
{
|
||||
manager.sendPacket(new S40PacketDisconnect(chatcomponenttext), new GenericFutureListener<Future<? super Void>>()
|
||||
manager.sendPacket(new S40PacketDisconnect(TextComponentString), new GenericFutureListener<Future<? super Void>>()
|
||||
{
|
||||
@Override
|
||||
public void operationComplete(Future<? super Void> result)
|
||||
{
|
||||
manager.closeChannel(chatcomponenttext);
|
||||
manager.closeChannel(TextComponentString);
|
||||
}
|
||||
}, new GenericFutureListener[0]);
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityChest;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import net.minecraft.command.CommandException;
|
|||
import net.minecraft.command.ICommandSender;
|
||||
import net.minecraft.command.WrongUsageException;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraftforge.common.DimensionManager;
|
||||
import net.minecraftforge.server.ForgeTimeTracker;
|
||||
|
|
|
@ -141,12 +141,12 @@ public net.minecraft.client.renderer.block.model.ModelBlock field_178322_i # amb
|
|||
# EnumFacing
|
||||
public net.minecraft.util.EnumFacing field_82609_l # VALUES
|
||||
public net.minecraft.util.EnumFacing field_176754_o # HORIZONTALS
|
||||
#public net.minecraft.client.renderer.WorldRenderer func_78909_a(I)I # getColorIndex
|
||||
#public net.minecraft.client.renderer.WorldRenderer func_178972_a(IIIII)V # putColorRGBA
|
||||
#public net.minecraft.client.renderer.VertexBuffer func_78909_a(I)I # getColorIndex
|
||||
#public net.minecraft.client.renderer.VertexBuffer func_178972_a(IIIII)V # putColorRGBA
|
||||
# ModelBlock Constructor
|
||||
#public net.minecraft.client.renderer.block.model.ModelBlock <init>(Lnet/minecraft/util/ResourceLocation;Ljava/util/List;Ljava/util/Map;ZZLnet/minecraft/client/renderer/block/model/ItemCameraTransforms;)V
|
||||
# RenderLivingEntity
|
||||
#public net.minecraft.client.renderer.entity.RendererLivingEntity func_177094_a(Lnet/minecraft/client/renderer/entity/layers/LayerRenderer;)Z # addLayer
|
||||
#public net.minecraft.client.renderer.entity.RenderLivingBase func_177094_a(Lnet/minecraft/client/renderer/entity/layers/LayerRenderer;)Z # addLayer
|
||||
|
||||
# S00PacketServerInfo
|
||||
#public net.minecraft.network.status.server.S00PacketServerInfo field_149297_a # GSON
|
||||
|
|
|
@ -4,8 +4,8 @@ import net.minecraft.block.BlockContainer;
|
|||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.renderer.ItemMeshDefinition;
|
||||
import net.minecraft.client.resources.model.ModelBakery;
|
||||
import net.minecraft.client.resources.model.ModelResourceLocation;
|
||||
import net.minecraft.client.renderer.block.model.ModelBakery;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
|
@ -14,10 +14,10 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.NetworkManager;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||
import net.minecraft.network.play.server.SPacketUpdateTileEntity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
|
@ -212,7 +212,7 @@ public class DynBucketTest
|
|||
IFluidHandler tank = (IFluidHandler) te;
|
||||
side = side.getOpposite();
|
||||
|
||||
ItemStack stack = playerIn.getHeldItem();
|
||||
ItemStack stack = playerIn.inventory.getCurrentItem();
|
||||
if (stack == null)
|
||||
{
|
||||
sendText(playerIn, tank, side);
|
||||
|
@ -245,7 +245,7 @@ public class DynBucketTest
|
|||
{
|
||||
text = "empty";
|
||||
}
|
||||
player.addChatMessage(new ChatComponentText(text));
|
||||
player.addChatMessage(new TextComponentString(text));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -318,11 +318,11 @@ public class DynBucketTest
|
|||
public Packet getDescriptionPacket() {
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
writeToNBT(tag);
|
||||
return new S35PacketUpdateTileEntity(this.getPos(), this.getBlockMetadata(), tag);
|
||||
return new SPacketUpdateTileEntity(this.getPos(), this.getBlockMetadata(), tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) {
|
||||
public void onDataPacket(NetworkManager net, SPacketUpdateTileEntity pkt) {
|
||||
super.onDataPacket(net, pkt);
|
||||
readFromNBT(pkt.getNbtCompound());
|
||||
}
|
||||
|
|
|
@ -7,11 +7,11 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.block.BlockWall;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.PropertyEnum;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.renderer.block.statemap.IStateMapper;
|
||||
import net.minecraft.client.renderer.block.statemap.StateMap;
|
||||
import net.minecraft.client.resources.model.ModelResourceLocation;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
|
@ -102,8 +102,8 @@ public class ForgeBlockStatesLoaderDebug {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected BlockState createBlockState() {
|
||||
return new BlockState(this, VARIANT);
|
||||
protected BlockStateContainer createBlockState() {
|
||||
return new BlockStateContainer(this, VARIANT);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package net.minecraftforge.debug;
|
||||
|
||||
import net.minecraft.client.resources.model.ModelResourceLocation;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraftforge.client.model.ModelLoader;
|
||||
|
|
|
@ -4,7 +4,7 @@ import net.minecraft.block.BlockContainer;
|
|||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.client.resources.model.ModelResourceLocation;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
|
|
@ -14,12 +14,12 @@ import net.minecraft.client.renderer.block.model.BakedQuad;
|
|||
import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.vertex.VertexFormat;
|
||||
import net.minecraft.client.resources.model.IBakedModel;
|
||||
import net.minecraft.client.resources.model.ModelResourceLocation;
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraftforge.client.event.ModelBakeEvent;
|
||||
import net.minecraftforge.client.model.IFlexibleBakedModel;
|
||||
import net.minecraftforge.client.model.ISmartBlockModel;
|
||||
|
@ -133,9 +133,9 @@ public class LayerBreakingTest
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canRenderInLayer(EnumWorldBlockLayer layer)
|
||||
public boolean canRenderInLayer(BlockRenderLayer layer)
|
||||
{
|
||||
return layer == EnumWorldBlockLayer.SOLID || layer == EnumWorldBlockLayer.TRANSLUCENT;
|
||||
return layer == BlockRenderLayer.SOLID || layer == BlockRenderLayer.TRANSLUCENT;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -196,7 +196,7 @@ public class LayerBreakingTest
|
|||
solid = new TestBakedModel(models.getModelForState(Blocks.cobblestone.getDefaultState()).getParticleTexture(), false);
|
||||
}
|
||||
|
||||
if (net.minecraftforge.client.MinecraftForgeClient.getRenderLayer() == EnumWorldBlockLayer.SOLID)
|
||||
if (net.minecraftforge.client.MinecraftForgeClient.getRenderLayer() == BlockRenderLayer.SOLID)
|
||||
{
|
||||
return solid;
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ import net.minecraft.client.renderer.entity.Render;
|
|||
import net.minecraft.client.renderer.entity.RenderLiving;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.client.resources.model.ModelResourceLocation;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
@ -20,7 +20,7 @@ import net.minecraft.entity.SharedMonsterAttributes;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
|
|
@ -9,20 +9,22 @@ import net.minecraft.block.material.Material;
|
|||
import net.minecraft.block.properties.IProperty;
|
||||
import net.minecraft.block.properties.PropertyInteger;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.block.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.renderer.block.statemap.StateMapperBase;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.resources.model.IBakedModel;
|
||||
import net.minecraft.client.resources.model.ModelResourceLocation;
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
@ -158,7 +160,7 @@ public class ModelBakeEventDebug
|
|||
if(te instanceof CustomTileEntity)
|
||||
{
|
||||
CustomTileEntity cte = (CustomTileEntity) te;
|
||||
Vec3 vec = revRotate(new Vec3(hitX - .5, hitY - .5, hitZ - .5), side).addVector(.5, .5, .5);
|
||||
Vec3d vec = revRotate(new Vec3d(hitX - .5, hitY - .5, hitZ - .5), side).addVector(.5, .5, .5);
|
||||
IUnlistedProperty<Integer> property = properties[side.ordinal()];
|
||||
Integer value = cte.getState().getValue(property);
|
||||
if(value == null) value = 0;
|
||||
|
@ -182,7 +184,7 @@ public class ModelBakeEventDebug
|
|||
}
|
||||
|
||||
@Override
|
||||
protected BlockState createBlockState()
|
||||
protected BlockStateContainer createBlockState()
|
||||
{
|
||||
return new ExtendedBlockState(this, new IProperty[0], properties);
|
||||
}
|
||||
|
@ -247,10 +249,10 @@ public class ModelBakeEventDebug
|
|||
|
||||
private BakedQuad createSidedBakedQuad(float x1, float x2, float z1, float z2, float y, TextureAtlasSprite texture, EnumFacing side)
|
||||
{
|
||||
Vec3 v1 = rotate(new Vec3(x1 - .5, y - .5, z1 - .5), side).addVector(.5, .5, .5);
|
||||
Vec3 v2 = rotate(new Vec3(x1 - .5, y - .5, z2 - .5), side).addVector(.5, .5, .5);
|
||||
Vec3 v3 = rotate(new Vec3(x2 - .5, y - .5, z2 - .5), side).addVector(.5, .5, .5);
|
||||
Vec3 v4 = rotate(new Vec3(x2 - .5, y - .5, z1 - .5), side).addVector(.5, .5, .5);
|
||||
Vec3d v1 = rotate(new Vec3d(x1 - .5, y - .5, z1 - .5), side).addVector(.5, .5, .5);
|
||||
Vec3d v2 = rotate(new Vec3d(x1 - .5, y - .5, z2 - .5), side).addVector(.5, .5, .5);
|
||||
Vec3d v3 = rotate(new Vec3d(x2 - .5, y - .5, z2 - .5), side).addVector(.5, .5, .5);
|
||||
Vec3d v4 = rotate(new Vec3d(x2 - .5, y - .5, z1 - .5), side).addVector(.5, .5, .5);
|
||||
return new BakedQuad(Ints.concat(
|
||||
vertexToInts((float)v1.xCoord, (float)v1.yCoord, (float)v1.zCoord, -1, texture, 0, 0),
|
||||
vertexToInts((float)v2.xCoord, (float)v2.yCoord, (float)v2.zCoord, -1, texture, 0, 16),
|
||||
|
@ -317,30 +319,30 @@ public class ModelBakeEventDebug
|
|||
}
|
||||
}
|
||||
|
||||
private static Vec3 rotate(Vec3 vec, EnumFacing side)
|
||||
private static Vec3d rotate(Vec3d vec, EnumFacing side)
|
||||
{
|
||||
switch(side)
|
||||
{
|
||||
case DOWN: return new Vec3( vec.xCoord, -vec.yCoord, -vec.zCoord);
|
||||
case UP: return new Vec3( vec.xCoord, vec.yCoord, vec.zCoord);
|
||||
case NORTH: return new Vec3( vec.xCoord, vec.zCoord, -vec.yCoord);
|
||||
case SOUTH: return new Vec3( vec.xCoord, -vec.zCoord, vec.yCoord);
|
||||
case WEST: return new Vec3(-vec.yCoord, vec.xCoord, vec.zCoord);
|
||||
case EAST: return new Vec3( vec.yCoord, -vec.xCoord, vec.zCoord);
|
||||
case DOWN: return new Vec3d( vec.xCoord, -vec.yCoord, -vec.zCoord);
|
||||
case UP: return new Vec3d( vec.xCoord, vec.yCoord, vec.zCoord);
|
||||
case NORTH: return new Vec3d( vec.xCoord, vec.zCoord, -vec.yCoord);
|
||||
case SOUTH: return new Vec3d( vec.xCoord, -vec.zCoord, vec.yCoord);
|
||||
case WEST: return new Vec3d(-vec.yCoord, vec.xCoord, vec.zCoord);
|
||||
case EAST: return new Vec3d( vec.yCoord, -vec.xCoord, vec.zCoord);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static Vec3 revRotate(Vec3 vec, EnumFacing side)
|
||||
private static Vec3d revRotate(Vec3d vec, EnumFacing side)
|
||||
{
|
||||
switch(side)
|
||||
{
|
||||
case DOWN: return new Vec3( vec.xCoord, -vec.yCoord, -vec.zCoord);
|
||||
case UP: return new Vec3( vec.xCoord, vec.yCoord, vec.zCoord);
|
||||
case NORTH: return new Vec3( vec.xCoord, -vec.zCoord, vec.yCoord);
|
||||
case SOUTH: return new Vec3( vec.xCoord, vec.zCoord, -vec.yCoord);
|
||||
case WEST: return new Vec3( vec.yCoord, -vec.xCoord, vec.zCoord);
|
||||
case EAST: return new Vec3(-vec.yCoord, vec.xCoord, vec.zCoord);
|
||||
case DOWN: return new Vec3d( vec.xCoord, -vec.yCoord, -vec.zCoord);
|
||||
case UP: return new Vec3d( vec.xCoord, vec.yCoord, vec.zCoord);
|
||||
case NORTH: return new Vec3d( vec.xCoord, -vec.zCoord, vec.yCoord);
|
||||
case SOUTH: return new Vec3d( vec.xCoord, vec.zCoord, -vec.yCoord);
|
||||
case WEST: return new Vec3d( vec.yCoord, -vec.xCoord, vec.zCoord);
|
||||
case EAST: return new Vec3d(-vec.yCoord, vec.xCoord, vec.zCoord);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -4,8 +4,8 @@ import net.minecraft.block.material.Material;
|
|||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.renderer.ItemMeshDefinition;
|
||||
import net.minecraft.client.renderer.block.statemap.StateMapperBase;
|
||||
import net.minecraft.client.resources.model.ModelBakery;
|
||||
import net.minecraft.client.resources.model.ModelResourceLocation;
|
||||
import net.minecraft.client.renderer.block.model.ModelBakery;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
|
|
@ -17,21 +17,21 @@ import net.minecraft.block.material.Material;
|
|||
import net.minecraft.block.properties.IProperty;
|
||||
import net.minecraft.block.properties.PropertyBool;
|
||||
import net.minecraft.block.properties.PropertyDirection;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.model.IBakedModel;
|
||||
import net.minecraft.client.resources.model.ModelResourceLocation;
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.ITickable;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
@ -127,10 +127,10 @@ public class ModelLoaderRegistryDebug
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() { return false; }
|
||||
public boolean isOpaqueCube(IBlockState state) { return false; }
|
||||
|
||||
@Override
|
||||
public boolean isFullCube() { return false; }
|
||||
public boolean isFullCube(IBlockState state) { return false; }
|
||||
|
||||
@Override
|
||||
public boolean isVisuallyOpaque() { return false; }
|
||||
|
@ -176,7 +176,7 @@ public class ModelLoaderRegistryDebug
|
|||
}
|
||||
|
||||
@Override
|
||||
public BlockState createBlockState()
|
||||
public BlockStateContainer createBlockState()
|
||||
{
|
||||
return new ExtendedBlockState(this, new IProperty[]{FACING}, new IUnlistedProperty[]{B3DLoader.B3DFrameProperty.instance});
|
||||
}
|
||||
|
@ -232,10 +232,10 @@ public class ModelLoaderRegistryDebug
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() { return false; }
|
||||
public boolean isOpaqueCube(IBlockState state) { return false; }
|
||||
|
||||
@Override
|
||||
public boolean isFullCube() { return false; }
|
||||
public boolean isFullCube(IBlockState state) { return false; }
|
||||
|
||||
@Override
|
||||
public boolean isVisuallyOpaque() { return false; }
|
||||
|
@ -313,7 +313,7 @@ public class ModelLoaderRegistryDebug
|
|||
}
|
||||
this.counter++;
|
||||
this.visible.add(Integer.toString(this.counter));
|
||||
ChatComponentText text = new ChatComponentText("" + this.counter);
|
||||
TextComponentString text = new TextComponentString("" + this.counter);
|
||||
if (this.worldObj.isRemote) Minecraft.getMinecraft().ingameGUI.getChatGUI().printChatMessage(text);
|
||||
}
|
||||
|
||||
|
@ -327,7 +327,7 @@ public class ModelLoaderRegistryDebug
|
|||
}
|
||||
this.visible.remove(Integer.toString(this.counter));
|
||||
this.counter--;
|
||||
ChatComponentText text = new ChatComponentText("" + this.counter);
|
||||
TextComponentString text = new TextComponentString("" + this.counter);
|
||||
if (this.worldObj.isRemote) Minecraft.getMinecraft().ingameGUI.getChatGUI().printChatMessage(text);
|
||||
}
|
||||
|
||||
|
@ -378,10 +378,10 @@ public class ModelLoaderRegistryDebug
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() { return false; }
|
||||
public boolean isOpaqueCube(IBlockState state) { return false; }
|
||||
|
||||
@Override
|
||||
public boolean isFullCube() { return false; }
|
||||
public boolean isFullCube(IBlockState state) { return false; }
|
||||
|
||||
@Override
|
||||
public boolean isVisuallyOpaque() { return false; }
|
||||
|
@ -436,16 +436,16 @@ public class ModelLoaderRegistryDebug
|
|||
}
|
||||
|
||||
@Override
|
||||
public BlockState createBlockState()
|
||||
public BlockStateContainer createBlockState()
|
||||
{
|
||||
return new ExtendedBlockState(this, new IProperty[] {FACING}, new IUnlistedProperty[] {OBJModel.OBJProperty.instance});
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() { return false; }
|
||||
public boolean isOpaqueCube(IBlockState state) { return false; }
|
||||
|
||||
@Override
|
||||
public boolean isFullCube() { return false; }
|
||||
public boolean isFullCube(IBlockState state) { return false; }
|
||||
|
||||
@Override
|
||||
public boolean isVisuallyOpaque() { return false; }
|
||||
|
@ -599,10 +599,10 @@ public class ModelLoaderRegistryDebug
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() { return false; }
|
||||
public boolean isOpaqueCube(IBlockState state) { return false; }
|
||||
|
||||
@Override
|
||||
public boolean isFullCube() { return false; }
|
||||
public boolean isFullCube(IBlockState state) { return false; }
|
||||
|
||||
@Override
|
||||
public boolean isVisuallyOpaque() { return false; }
|
||||
|
@ -636,7 +636,7 @@ public class ModelLoaderRegistryDebug
|
|||
}
|
||||
|
||||
@Override
|
||||
public BlockState createBlockState()
|
||||
public BlockStateContainer createBlockState()
|
||||
{
|
||||
return new ExtendedBlockState(this, new IProperty[]{FACING}, new IUnlistedProperty[]{OBJModel.OBJProperty.instance});
|
||||
}
|
||||
|
@ -686,13 +686,13 @@ public class ModelLoaderRegistryDebug
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube()
|
||||
public boolean isOpaqueCube(IBlockState state)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFullCube()
|
||||
public boolean isFullCube(IBlockState state)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -716,9 +716,9 @@ public class ModelLoaderRegistryDebug
|
|||
}
|
||||
|
||||
@Override
|
||||
public BlockState createBlockState()
|
||||
public BlockStateContainer createBlockState()
|
||||
{
|
||||
return new BlockState(this, new IProperty[]{NORTH, SOUTH, WEST, EAST});
|
||||
return new BlockStateContainer(this, new IProperty[]{NORTH, SOUTH, WEST, EAST});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -747,13 +747,13 @@ public class ModelLoaderRegistryDebug
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube()
|
||||
public boolean isOpaqueCube(IBlockState state)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFullCube()
|
||||
public boolean isFullCube(IBlockState state)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -779,7 +779,7 @@ public class ModelLoaderRegistryDebug
|
|||
}
|
||||
|
||||
@Override
|
||||
public BlockState createBlockState()
|
||||
public BlockStateContainer createBlockState()
|
||||
{
|
||||
return new ExtendedBlockState(this, new IProperty[0], new IUnlistedProperty[] {OBJModel.OBJProperty.instance});
|
||||
}
|
||||
|
|
|
@ -2,10 +2,10 @@ package net.minecraftforge.debug;
|
|||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.resources.model.ModelResourceLocation;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraftforge.client.model.ModelLoader;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.Mod.EventHandler;
|
||||
|
@ -42,9 +42,9 @@ public class MultiLayerModelDebug
|
|||
public boolean isFullCube() { return false; }
|
||||
|
||||
@Override
|
||||
public boolean canRenderInLayer(EnumWorldBlockLayer layer)
|
||||
public boolean canRenderInLayer(BlockRenderLayer layer)
|
||||
{
|
||||
return layer == EnumWorldBlockLayer.SOLID || layer == EnumWorldBlockLayer.TRANSLUCENT;
|
||||
return layer == BlockRenderLayer.SOLID || layer == BlockRenderLayer.TRANSLUCENT;
|
||||
}
|
||||
}, blockName);
|
||||
}
|
||||
|
|
|
@ -69,13 +69,13 @@ public class PotionRegistryDebug {
|
|||
int height = width;
|
||||
/*
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
||||
worldrenderer.startDrawingQuads();
|
||||
worldrenderer.setColorOpaque_I(potion.getLiquidColor());
|
||||
worldrenderer.addVertexWithUV((double) x, (double) (y + height), 0.0D, sprite.getMinU(), sprite.getMaxV());
|
||||
worldrenderer.addVertexWithUV((double)(x + width), (double)(y + height), 0.0D, sprite.getMaxU(), sprite.getMaxV());
|
||||
worldrenderer.addVertexWithUV((double)(x + width), (double)y, 0.0D, sprite.getMaxU(), sprite.getMinV());
|
||||
worldrenderer.addVertexWithUV((double)x, (double)y, 0.0D, sprite.getMinU(), sprite.getMinV());
|
||||
VertexBuffer VertexBuffer = tessellator.getVertexBuffer();
|
||||
VertexBuffer.startDrawingQuads();
|
||||
VertexBuffer.setColorOpaque_I(potion.getLiquidColor());
|
||||
VertexBuffer.addVertexWithUV((double) x, (double) (y + height), 0.0D, sprite.getMinU(), sprite.getMaxV());
|
||||
VertexBuffer.addVertexWithUV((double)(x + width), (double)(y + height), 0.0D, sprite.getMaxU(), sprite.getMaxV());
|
||||
VertexBuffer.addVertexWithUV((double)(x + width), (double)y, 0.0D, sprite.getMaxU(), sprite.getMinV());
|
||||
VertexBuffer.addVertexWithUV((double)x, (double)y, 0.0D, sprite.getMinU(), sprite.getMinV());
|
||||
tessellator.draw();*/
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,8 +6,9 @@ import java.util.List;
|
|||
import net.minecraft.command.CommandBase;
|
||||
import net.minecraft.command.CommandException;
|
||||
import net.minecraft.command.ICommandSender;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraftforge.client.ClientCommandHandler;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.Mod.EventHandler;
|
||||
|
@ -53,15 +54,15 @@ public class ClientCommandTest {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void processCommand(ICommandSender sender, String[] args) throws CommandException
|
||||
public void func_184881_a( MinecraftServer server, ICommandSender sender, String[] args) throws CommandException
|
||||
{
|
||||
if (args.length > 0)
|
||||
{
|
||||
sender.addChatMessage(new ChatComponentText("Input: " + Arrays.toString(args)));
|
||||
sender.addChatMessage(new TextComponentString("Input: " + Arrays.toString(args)));
|
||||
}
|
||||
else
|
||||
{
|
||||
sender.addChatMessage(new ChatComponentText("No arguments."));
|
||||
sender.addChatMessage(new TextComponentString("No arguments."));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,8 +4,8 @@ import net.minecraft.init.Blocks;
|
|||
import net.minecraft.init.Items;
|
||||
import net.minecraft.nbt.NBTBase;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
|
@ -45,8 +45,8 @@ public class TestCapabilityMod
|
|||
public void onInteract(PlayerInteractEvent event)
|
||||
{
|
||||
if (event.action != PlayerInteractEvent.Action.LEFT_CLICK_BLOCK) return;
|
||||
if (event.entityPlayer.getHeldItem() == null) return;
|
||||
if (event.entityPlayer.getHeldItem().getItem() != Items.stick) return;
|
||||
if (event.entityPlayer.inventory.getCurrentItem() == null) return;
|
||||
if (event.entityPlayer.inventory.getCurrentItem().getItem() != Items.stick) return;
|
||||
|
||||
// This is just a example of how to interact with the TE, note the strong type binding that getCapability has
|
||||
TileEntity te = event.world.getTileEntity(event.pos);
|
||||
|
@ -58,7 +58,7 @@ public class TestCapabilityMod
|
|||
}
|
||||
if (event.world.getBlockState(event.pos).getBlock() == Blocks.dirt)
|
||||
{
|
||||
event.entityPlayer.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "" + EnumChatFormatting.ITALIC + "TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST"));
|
||||
event.entityPlayer.addChatMessage(new TextComponentString(TextFormatting.RED + "" + TextFormatting.ITALIC + "TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST"));
|
||||
event.setCanceled(true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ package net.minecraftforge.test;
|
|||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.renderer.entity.RendererLivingEntity;
|
||||
import net.minecraft.client.renderer.entity.RenderLivingBase;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityArmorStand;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
@ -66,7 +66,7 @@ public class WRNormalMod
|
|||
}
|
||||
}
|
||||
|
||||
public static class RenderScaleTest extends RendererLivingEntity<EntityScaleTest>
|
||||
public static class RenderScaleTest extends RenderLivingBase<EntityScaleTest>
|
||||
{
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation("textures/blocks/stone.png");
|
||||
|
||||
|
|
Loading…
Reference in New Issue