First update pass (1/3) - ~1400 -> 82 errors
This is first update pass, which is mainly import reorganization, name fixes, etc... Although some parts of second were done where changes aren't important. Errors: ~1400 -> 82.
This commit is contained in:
@@ -33,19 +33,20 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.ItemMeshDefinition;
|
||||
import net.minecraft.client.renderer.ItemModelMesher;
|
||||
import net.minecraft.client.renderer.block.model.ModelBakery;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.client.renderer.block.statemap.DefaultStateMapper;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.resources.model.ModelBakery;
|
||||
import net.minecraft.client.resources.model.ModelResourceLocation;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.inventory.EntityEquipmentSlot;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.ModelBakeEvent;
|
||||
import net.minecraftforge.client.event.MouseEvent;
|
||||
@@ -55,7 +56,6 @@ import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.client.registry.ClientRegistry;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry.UniqueIdentifier;
|
||||
|
||||
import appeng.api.parts.CableRenderMode;
|
||||
import appeng.api.parts.IPartItem;
|
||||
@@ -200,7 +200,7 @@ public class ClientHelper extends ServerHelper
|
||||
this.spawnLightning( worldObj, posX, posY, posZ );
|
||||
return;
|
||||
case LightningArc:
|
||||
this.spawnLightningArc( worldObj, posX, posY, posZ, (Vec3) o );
|
||||
this.spawnLightningArc( worldObj, posX, posY, posZ, (Vec3d) o );
|
||||
return;
|
||||
default:
|
||||
}
|
||||
@@ -223,7 +223,7 @@ public class ClientHelper extends ServerHelper
|
||||
}
|
||||
|
||||
@Override
|
||||
public MovingObjectPosition getMOP()
|
||||
public RayTraceResult getRTR()
|
||||
{
|
||||
return Minecraft.getMinecraft().objectMouseOver;
|
||||
}
|
||||
@@ -311,7 +311,7 @@ public class ClientHelper extends ServerHelper
|
||||
final String MODID = AppEng.MOD_ID + ":";
|
||||
for( final List<IconReg> reg : this.iconRegistrations.values() )
|
||||
{
|
||||
final String[] names = new String[reg.size()];
|
||||
final ResourceLocation[] names = new ResourceLocation[reg.size()];
|
||||
|
||||
Item it = null;
|
||||
|
||||
@@ -325,10 +325,10 @@ public class ClientHelper extends ServerHelper
|
||||
mesher.register( (Item) r.item, r.meta, r.loc );
|
||||
}
|
||||
|
||||
names[offset++] = MODID + r.name;
|
||||
names[offset++] = new ResourceLocation( MODID, r.name );
|
||||
}
|
||||
|
||||
ModelBakery.addVariantName( it, names );
|
||||
ModelBakery.registerItemVariants( it, names );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -409,7 +409,7 @@ public class ClientHelper extends ServerHelper
|
||||
@SubscribeEvent
|
||||
public void postPlayerRender( final RenderLivingEvent.Pre p )
|
||||
{
|
||||
final PlayerColor player = TickHandler.INSTANCE.getPlayerColors().get( p.entity.getEntityId() );
|
||||
final PlayerColor player = TickHandler.INSTANCE.getPlayerColors().get( p.getEntity().getEntityId() );
|
||||
if( player != null )
|
||||
{
|
||||
final AEColor col = player.myColor;
|
||||
@@ -448,11 +448,11 @@ public class ClientHelper extends ServerHelper
|
||||
final float y = (float) ( ( ( Platform.getRandomInt() % 100 ) * 0.01 ) - 0.5 ) * 0.7f;
|
||||
final float z = (float) ( ( ( Platform.getRandomInt() % 100 ) * 0.01 ) - 0.5 ) * 0.7f;
|
||||
|
||||
final CraftingFx fx = new CraftingFx( w, posX + x, posY + y, posZ + z, Items.diamond );
|
||||
final CraftingFx fx = new CraftingFx( w, posX + x, posY + y, posZ + z, Items.DIAMOND );
|
||||
|
||||
fx.motionX = -x * 0.2;
|
||||
fx.motionY = -y * 0.2;
|
||||
fx.motionZ = -z * 0.2;
|
||||
fx.setMotionX( -x * 0.2f );
|
||||
fx.setMotionY( -y * 0.2f );
|
||||
fx.setMotionZ( -z * 0.2f );
|
||||
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
|
||||
}
|
||||
@@ -463,11 +463,11 @@ public class ClientHelper extends ServerHelper
|
||||
final float y = (float) ( ( ( Platform.getRandomInt() % 100 ) * 0.01 ) - 0.5 ) * 0.7f;
|
||||
final float z = (float) ( ( ( Platform.getRandomInt() % 100 ) * 0.01 ) - 0.5 ) * 0.7f;
|
||||
|
||||
final EnergyFx fx = new EnergyFx( w, posX + x, posY + y, posZ + z, Items.diamond );
|
||||
final EnergyFx fx = new EnergyFx( w, posX + x, posY + y, posZ + z, Items.DIAMOND );
|
||||
|
||||
fx.motionX = -x * 0.1;
|
||||
fx.motionY = -y * 0.1;
|
||||
fx.motionZ = -z * 0.1;
|
||||
fx.setMotionX( -x * 0.1f );
|
||||
fx.setMotionY( -y * 0.1f );
|
||||
fx.setMotionZ( -z * 0.1f );
|
||||
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
|
||||
}
|
||||
@@ -478,7 +478,7 @@ public class ClientHelper extends ServerHelper
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
|
||||
}
|
||||
|
||||
private void spawnLightningArc( final World worldObj, final double posX, final double posY, final double posZ, final Vec3 second )
|
||||
private void spawnLightningArc( final World worldObj, final double posX, final double posY, final double posZ, final Vec3d second )
|
||||
{
|
||||
final LightningFX fx = new LightningArcFX( worldObj, posX, posY, posZ, second.xCoord, second.yCoord, second.zCoord, 0.0f, 0.0f, 0.0f );
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
|
||||
@@ -489,14 +489,15 @@ public class ClientHelper extends ServerHelper
|
||||
{
|
||||
// inventory renderer
|
||||
final SmartModel buses = new SmartModel( new BlockRenderInfo( ( new RendererCableBus() ) ) );
|
||||
event.modelRegistry.putObject( this.partRenderer, buses );
|
||||
event.getModelRegistry().putObject( this.partRenderer, buses );
|
||||
|
||||
for( final IconReg reg : this.iconTmp )
|
||||
{
|
||||
if( reg.item instanceof IPartItem || reg.item instanceof IFacadeItem )
|
||||
{
|
||||
//TODO 1.9.4 - UniqueIdentifier => ?
|
||||
final UniqueIdentifier i = GameRegistry.findUniqueIdentifierFor( (Item) reg.item );
|
||||
event.modelRegistry.putObject( new ModelResourceLocation( new ResourceLocation( i.modId, i.name ), "inventory" ), buses );
|
||||
event.getModelRegistry().putObject( new ModelResourceLocation( new ResourceLocation( i.modId, i.name ), "inventory" ), buses );
|
||||
}
|
||||
|
||||
if( reg.item instanceof AEBaseBlock )
|
||||
@@ -508,13 +509,13 @@ public class ClientHelper extends ServerHelper
|
||||
}
|
||||
|
||||
final SmartModel sm = new SmartModel( renderer );
|
||||
event.modelRegistry.putObject( renderer.getRendererInstance().getResourcePath(), sm );
|
||||
event.getModelRegistry().putObject( renderer.getRendererInstance().getResourcePath(), sm );
|
||||
|
||||
final Map data = new DefaultStateMapper().putStateModelLocations( (Block) reg.item );
|
||||
for( final Object Loc : data.values() )
|
||||
{
|
||||
final ModelResourceLocation res = (ModelResourceLocation) Loc;
|
||||
event.modelRegistry.putObject( res, sm );
|
||||
event.getModelRegistry().putObject( res, sm );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -523,20 +524,21 @@ public class ClientHelper extends ServerHelper
|
||||
@SubscribeEvent
|
||||
public void wheelEvent( final MouseEvent me )
|
||||
{
|
||||
if( me.isCanceled() || me.dwheel == 0 )
|
||||
if( me.isCanceled() || me.getDwheel() == 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final Minecraft mc = Minecraft.getMinecraft();
|
||||
final EntityPlayer player = mc.thePlayer;
|
||||
final ItemStack is = player.getHeldItem();
|
||||
//TODO 1.9.4 - 2 hands. Just do something!
|
||||
final ItemStack is = player.getItemStackFromSlot( EntityEquipmentSlot.MAINHAND );
|
||||
|
||||
if( is != null && is.getItem() instanceof IMouseWheelItem && player.isSneaking() )
|
||||
{
|
||||
try
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "Item", me.dwheel > 0 ? "WheelUp" : "WheelDown" ) );
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "Item", me.getDwheel() > 0 ? "WheelUp" : "WheelDown" ) );
|
||||
me.setCanceled( true );
|
||||
}
|
||||
catch( final IOException e )
|
||||
@@ -553,7 +555,7 @@ public class ClientHelper extends ServerHelper
|
||||
{
|
||||
if( reg.item instanceof AEBaseItem )
|
||||
{
|
||||
( (AEBaseItem) reg.item ).registerCustomIcon( ev.map );
|
||||
( (AEBaseItem) reg.item ).registerCustomIcon( ev.getMap() );
|
||||
}
|
||||
else if( reg.item instanceof AEBaseBlock )
|
||||
{
|
||||
@@ -563,17 +565,17 @@ public class ClientHelper extends ServerHelper
|
||||
continue;
|
||||
}
|
||||
|
||||
( (AEBaseBlock) reg.item ).registerBlockIcons( ev.map, reg.name );
|
||||
( (AEBaseBlock) reg.item ).registerBlockIcons( ev.getMap(), reg.name );
|
||||
}
|
||||
}
|
||||
|
||||
this.extraIcons.forEach( ev.map::registerSprite );
|
||||
this.extraIcons.forEach( ev.getMap()::registerSprite );
|
||||
|
||||
// if( ev.map.getTextureType() == ITEM_RENDERER )
|
||||
{
|
||||
for( final ExtraItemTextures et : ExtraItemTextures.values() )
|
||||
{
|
||||
et.registerIcon( ev.map );
|
||||
et.registerIcon( ev.getMap() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -581,12 +583,12 @@ public class ClientHelper extends ServerHelper
|
||||
{
|
||||
for( final ExtraBlockTextures et : ExtraBlockTextures.values() )
|
||||
{
|
||||
et.registerIcon( ev.map );
|
||||
et.registerIcon( ev.getMap() );
|
||||
}
|
||||
|
||||
for( final CableBusTextures cb : CableBusTextures.values() )
|
||||
{
|
||||
cb.registerIcon( ev.map );
|
||||
cb.registerIcon( ev.getMap() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,20 +2,23 @@
|
||||
package appeng.client;
|
||||
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
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.ItemOverrideList;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.resources.model.IBakedModel;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraftforge.client.model.ISmartBlockModel;
|
||||
import net.minecraftforge.client.model.ISmartItemModel;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.property.IExtendedBlockState;
|
||||
|
||||
import appeng.api.util.AEPartLocation;
|
||||
@@ -27,7 +30,7 @@ import appeng.client.texture.MissingIcon;
|
||||
|
||||
|
||||
// net.minecraft.client.renderer.tileentity.TileEntityItemStackRenderer
|
||||
public class SmartModel implements IBakedModel, ISmartBlockModel, ISmartItemModel
|
||||
public class SmartModel implements IBakedModel
|
||||
{
|
||||
|
||||
private final BlockRenderInfo aeRenderer;
|
||||
@@ -37,18 +40,6 @@ public class SmartModel implements IBakedModel, ISmartBlockModel, ISmartItemMode
|
||||
this.aeRenderer = rendererInstance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List getFaceQuads( final EnumFacing p_177551_1_ )
|
||||
{
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List getGeneralQuads()
|
||||
{
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAmbientOcclusion()
|
||||
{
|
||||
@@ -80,18 +71,7 @@ public class SmartModel implements IBakedModel, ISmartBlockModel, ISmartItemMode
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBakedModel handleItemState( final ItemStack stack )
|
||||
{
|
||||
final ModelGenerator helper = new BakingModelGenerator();
|
||||
final Block blk = Block.getBlockFromItem( stack.getItem() );
|
||||
helper.setRenderBoundsFromBlock( blk );
|
||||
this.aeRenderer.getRendererInstance().renderInventory( blk instanceof AEBaseBlock ? (AEBaseBlock) blk : null, stack, helper, ItemRenderType.INVENTORY, null );
|
||||
helper.finalizeModel( true );
|
||||
return helper.getOutput();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBakedModel handleBlockState( final IBlockState state )
|
||||
public List<BakedQuad> getQuads( IBlockState state, EnumFacing side, long rand )
|
||||
{
|
||||
final ModelGenerator helper = new BakingModelGenerator();
|
||||
final Block blk = state.getBlock();
|
||||
@@ -102,7 +82,26 @@ public class SmartModel implements IBakedModel, ISmartBlockModel, ISmartItemMode
|
||||
helper.setBlockAccess( world );
|
||||
this.aeRenderer.getRendererInstance().renderInWorld( blk instanceof AEBaseBlock ? (AEBaseBlock) blk : null, world, pos, helper );
|
||||
helper.finalizeModel( false );
|
||||
return helper.getOutput();
|
||||
return helper.getOutput().getQuads( state, side, rand );
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemOverrideList getOverrides()
|
||||
{
|
||||
return new ItemOverrideList( Lists.newArrayList() ){
|
||||
|
||||
@Override
|
||||
public IBakedModel handleItemState( IBakedModel originalModel, ItemStack stack, World world, EntityLivingBase entity )
|
||||
{
|
||||
final ModelGenerator helper = new BakingModelGenerator();
|
||||
final Block blk = Block.getBlockFromItem( stack.getItem() );
|
||||
helper.setRenderBoundsFromBlock( blk );
|
||||
aeRenderer.getRendererInstance().renderInventory( blk instanceof AEBaseBlock ? (AEBaseBlock) blk : null, stack, helper, ItemRenderType.INVENTORY, null );
|
||||
helper.finalizeModel( true );
|
||||
return helper.getOutput();
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -42,11 +42,12 @@ import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.RenderItem;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ClickType;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -380,14 +381,15 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
}
|
||||
}
|
||||
|
||||
//TODO 1.9.4 - Whole ClickType thing and 1.8.9 conversion, to be checked
|
||||
@Override
|
||||
protected void handleMouseClick( final Slot slot, final int slotIdx, final int ctrlDown, final int key )
|
||||
protected void handleMouseClick( final Slot slot, final int slotIdx, final int key, final ClickType clickType )
|
||||
{
|
||||
final EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
|
||||
if( slot instanceof SlotFake )
|
||||
{
|
||||
final InventoryAction action = ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN;
|
||||
final InventoryAction action = isCtrlKeyDown() ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN;
|
||||
|
||||
if( this.drag_click.size() > 1 )
|
||||
{
|
||||
@@ -430,7 +432,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
}
|
||||
else
|
||||
{
|
||||
action = ctrlDown == 1 ? InventoryAction.CRAFT_STACK : InventoryAction.CRAFT_ITEM;
|
||||
action = isCtrlKeyDown() ? InventoryAction.CRAFT_STACK : InventoryAction.CRAFT_ITEM;
|
||||
}
|
||||
|
||||
final PacketInventoryAction p = new PacketInventoryAction( action, slotIdx, 0 );
|
||||
@@ -470,10 +472,10 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
switch( key )
|
||||
{
|
||||
case 0: // pickup / set-down.
|
||||
action = ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN;
|
||||
action = isCtrlKeyDown() ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN;
|
||||
break;
|
||||
case 1:
|
||||
action = ctrlDown == 1 ? InventoryAction.PICKUP_SINGLE : InventoryAction.SHIFT_CLICK;
|
||||
action = isCtrlKeyDown() ? InventoryAction.PICKUP_SINGLE : InventoryAction.SHIFT_CLICK;
|
||||
break;
|
||||
|
||||
case 3: // creative dupe:
|
||||
@@ -507,7 +509,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
switch( key )
|
||||
{
|
||||
case 0: // pickup / set-down.
|
||||
action = ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN;
|
||||
action = isCtrlKeyDown() ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN;
|
||||
stack = ( (SlotME) slot ).getAEStack();
|
||||
|
||||
if( stack != null && action == InventoryAction.PICKUP_OR_SET_DOWN && stack.getStackSize() == 0 && player.inventory.getItemStack() == null )
|
||||
@@ -517,7 +519,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
|
||||
break;
|
||||
case 1:
|
||||
action = ctrlDown == 1 ? InventoryAction.PICKUP_SINGLE : InventoryAction.SHIFT_CLICK;
|
||||
action = isCtrlKeyDown() ? InventoryAction.PICKUP_SINGLE : InventoryAction.SHIFT_CLICK;
|
||||
stack = ( (SlotME) slot ).getAEStack();
|
||||
break;
|
||||
|
||||
@@ -580,7 +582,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
{
|
||||
if( inventorySlot != null && inventorySlot.canTakeStack( this.mc.thePlayer ) && inventorySlot.getHasStack() && inventorySlot.inventory == slot.inventory && Container.canAddItemToSlot( inventorySlot, this.dbl_whichItem, true ) )
|
||||
{
|
||||
this.handleMouseClick( inventorySlot, inventorySlot.slotNumber, ctrlDown, 1 );
|
||||
this.handleMouseClick( inventorySlot, inventorySlot.slotNumber, 1, clickType );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -588,7 +590,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
this.disableShiftClick = false;
|
||||
}
|
||||
|
||||
super.handleMouseClick( slot, slotIdx, ctrlDown, key );
|
||||
super.handleMouseClick( slot, slotIdx, key, clickType );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -625,7 +627,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
|
||||
if( theSlot.getSlotStackLimit() == 64 )
|
||||
{
|
||||
this.handleMouseClick( theSlot, theSlot.slotNumber, j, 2 );
|
||||
this.handleMouseClick( theSlot, theSlot.slotNumber, j, ClickType.SWAP );
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@@ -816,18 +818,18 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
final float par4 = uv_y * 16;
|
||||
|
||||
final Tessellator tessellator = Tessellator.getInstance();
|
||||
final WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
||||
final VertexBuffer VertexBuffer = tessellator.getBuffer();
|
||||
|
||||
worldrenderer.begin( GL11.GL_QUADS, DefaultVertexFormats.ITEM );
|
||||
VertexBuffer.begin( GL11.GL_QUADS, DefaultVertexFormats.ITEM );
|
||||
;
|
||||
final float f1 = 0.00390625F;
|
||||
final float f = 0.00390625F;
|
||||
final float par6 = 16;
|
||||
worldrenderer.color( 1.0f, 1.0f, 1.0f, aes.getOpacityOfIcon() ).pos( par1 + 0, par2 + par6, this.zLevel ).tex( ( par3 + 0 ) * f, ( par4 + par6 ) * f1 ).endVertex();
|
||||
VertexBuffer.color( 1.0f, 1.0f, 1.0f, aes.getOpacityOfIcon() ).pos( par1 + 0, par2 + par6, this.zLevel ).tex( ( par3 + 0 ) * f, ( par4 + par6 ) * f1 ).endVertex();
|
||||
final float par5 = 16;
|
||||
worldrenderer.color( 1.0f, 1.0f, 1.0f, aes.getOpacityOfIcon() ).pos( par1 + par5, par2 + par6, this.zLevel ).tex( ( par3 + par5 ) * f, ( par4 + par6 ) * f1 ).endVertex();
|
||||
worldrenderer.color( 1.0f, 1.0f, 1.0f, aes.getOpacityOfIcon() ).pos( par1 + par5, par2 + 0, this.zLevel ).tex( ( par3 + par5 ) * f, ( par4 + 0 ) * f1 ).endVertex();
|
||||
worldrenderer.color( 1.0f, 1.0f, 1.0f, aes.getOpacityOfIcon() ).pos( par1 + 0, par2 + 0, this.zLevel ).tex( ( par3 + 0 ) * f, ( par4 + 0 ) * f1 ).endVertex();
|
||||
VertexBuffer.color( 1.0f, 1.0f, 1.0f, aes.getOpacityOfIcon() ).pos( par1 + par5, par2 + par6, this.zLevel ).tex( ( par3 + par5 ) * f, ( par4 + par6 ) * f1 ).endVertex();
|
||||
VertexBuffer.color( 1.0f, 1.0f, 1.0f, aes.getOpacityOfIcon() ).pos( par1 + par5, par2 + 0, this.zLevel ).tex( ( par3 + par5 ) * f, ( par4 + 0 ) * f1 ).endVertex();
|
||||
VertexBuffer.color( 1.0f, 1.0f, 1.0f, aes.getOpacityOfIcon() ).pos( par1 + 0, par2 + 0, this.zLevel ).tex( ( par3 + 0 ) * f, ( par4 + 0 ) * f1 ).endVertex();
|
||||
tessellator.draw();
|
||||
}
|
||||
catch( final Exception err )
|
||||
|
||||
@@ -55,7 +55,7 @@ import appeng.util.Platform;
|
||||
import appeng.util.ReadableNumberConverter;
|
||||
|
||||
|
||||
public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
public class GuICraftingCPU extends AEBaseGui implements ISortSource
|
||||
{
|
||||
private static final int GUI_HEIGHT = 184;
|
||||
private static final int GUI_WIDTH = 238;
|
||||
@@ -92,12 +92,12 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
private GuiButton cancel;
|
||||
private int tooltip = -1;
|
||||
|
||||
public GuiCraftingCPU( final InventoryPlayer inventoryPlayer, final Object te )
|
||||
public GuICraftingCPU( final InventoryPlayer inventoryPlayer, final Object te )
|
||||
{
|
||||
this( new ContainerCraftingCPU( inventoryPlayer, te ) );
|
||||
}
|
||||
|
||||
protected GuiCraftingCPU( final ContainerCraftingCPU container )
|
||||
protected GuICraftingCPU( final ContainerCraftingCPU container )
|
||||
{
|
||||
super( container );
|
||||
this.craftingCpu = container;
|
||||
|
||||
@@ -49,7 +49,7 @@ import appeng.parts.reporting.PartPatternTerminal;
|
||||
import appeng.parts.reporting.PartTerminal;
|
||||
|
||||
|
||||
public class GuiCraftingStatus extends GuiCraftingCPU
|
||||
public class GuIContainerListenerStatus extends GuICraftingCPU
|
||||
{
|
||||
|
||||
private final ContainerCraftingStatus status;
|
||||
@@ -59,7 +59,7 @@ public class GuiCraftingStatus extends GuiCraftingCPU
|
||||
private GuiBridge originalGui;
|
||||
private ItemStack myIcon = null;
|
||||
|
||||
public GuiCraftingStatus( final InventoryPlayer inventoryPlayer, final ITerminalHost te )
|
||||
public GuIContainerListenerStatus( final InventoryPlayer inventoryPlayer, final ITerminalHost te )
|
||||
{
|
||||
super( new ContainerCraftingStatus( inventoryPlayer, te ) );
|
||||
|
||||
|
||||
@@ -36,12 +36,12 @@ import appeng.core.sync.packets.PacketInventoryAction;
|
||||
import appeng.helpers.InventoryAction;
|
||||
|
||||
|
||||
public class GuiCraftingTerm extends GuiMEMonitorable
|
||||
public class GuIContainerListenerTerm extends GuiMEMonitorable
|
||||
{
|
||||
|
||||
private GuiImgButton clearBtn;
|
||||
|
||||
public GuiCraftingTerm( final InventoryPlayer inventoryPlayer, final ITerminalHost te )
|
||||
public GuIContainerListenerTerm( final InventoryPlayer inventoryPlayer, final ITerminalHost te )
|
||||
{
|
||||
super( inventoryPlayer, te, new ContainerCraftingTerm( inventoryPlayer, te ) );
|
||||
this.setReservedSpace( 73 );
|
||||
|
||||
@@ -104,10 +104,10 @@ public class GuiPatternTerm extends GuiMEMonitorable
|
||||
{
|
||||
super.initGui();
|
||||
|
||||
this.tabCraftButton = new GuiTabButton( this.guiLeft + 173, this.guiTop + this.ySize - 177, new ItemStack( Blocks.crafting_table ), GuiText.CraftingPattern.getLocal(), this.itemRender );
|
||||
this.tabCraftButton = new GuiTabButton( this.guiLeft + 173, this.guiTop + this.ySize - 177, new ItemStack( Blocks.CRAFTING_TABLE ), GuiText.CraftingPattern.getLocal(), this.itemRender );
|
||||
this.buttonList.add( this.tabCraftButton );
|
||||
|
||||
this.tabProcessButton = new GuiTabButton( this.guiLeft + 173, this.guiTop + this.ySize - 177, new ItemStack( Blocks.furnace ), GuiText.ProcessingPattern.getLocal(), this.itemRender );
|
||||
this.tabProcessButton = new GuiTabButton( this.guiLeft + 173, this.guiTop + this.ySize - 177, new ItemStack( Blocks.FURNACE ), GuiText.ProcessingPattern.getLocal(), this.itemRender );
|
||||
this.buttonList.add( this.tabProcessButton );
|
||||
|
||||
this.substitutionsEnabledBtn = new GuiImgButton( this.guiLeft + 84, this.guiTop + this.ySize - 163, Settings.ACTIONS, ItemSubstitution.ENABLED );
|
||||
|
||||
@@ -27,7 +27,7 @@ import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.util.text.translation.I18n;
|
||||
|
||||
import appeng.api.config.AccessRestriction;
|
||||
import appeng.api.config.ActionItems;
|
||||
@@ -289,8 +289,8 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||
|
||||
if( displayName != null )
|
||||
{
|
||||
String name = StatCollector.translateToLocal( displayName );
|
||||
String value = StatCollector.translateToLocal( displayValue );
|
||||
String name = I18n.translateToLocal( displayName );
|
||||
String value = I18n.translateToLocal( displayValue );
|
||||
|
||||
if( name == null || name.isEmpty() )
|
||||
{
|
||||
|
||||
@@ -25,7 +25,7 @@ import org.lwjgl.opengl.GL12;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.RenderItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import appeng.client.texture.ExtraBlockTextures;
|
||||
|
||||
@@ -25,7 +25,7 @@ import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.util.text.translation.I18n;
|
||||
|
||||
import appeng.client.texture.ExtraBlockTextures;
|
||||
|
||||
@@ -89,8 +89,8 @@ public class GuiToggleButton extends GuiButton implements ITooltip
|
||||
{
|
||||
if( this.displayName != null )
|
||||
{
|
||||
String name = StatCollector.translateToLocal( this.displayName );
|
||||
String value = StatCollector.translateToLocal( this.displayHint );
|
||||
String name = I18n.translateToLocal( this.displayName );
|
||||
String value = I18n.translateToLocal( this.displayHint );
|
||||
|
||||
if( name == null || name.isEmpty() )
|
||||
{
|
||||
|
||||
@@ -21,7 +21,7 @@ package appeng.client.me;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.util.text.translation.I18n;
|
||||
|
||||
import appeng.tile.inventory.AppEngInternalInventory;
|
||||
import appeng.util.ItemSorters;
|
||||
@@ -46,10 +46,10 @@ public class ClientDCInternalInv implements Comparable<ClientDCInternalInv>
|
||||
|
||||
public String getName()
|
||||
{
|
||||
final String s = StatCollector.translateToLocal( this.unlocalizedName + ".name" );
|
||||
final String s = I18n.translateToLocal( this.unlocalizedName + ".name" );
|
||||
if( s.equals( this.unlocalizedName + ".name" ) )
|
||||
{
|
||||
return StatCollector.translateToLocal( this.unlocalizedName );
|
||||
return I18n.translateToLocal( this.unlocalizedName );
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
@@ -24,12 +24,13 @@ import javax.annotation.Nonnull;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.renderer.RenderItem;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.block.model.ModelManager;
|
||||
import net.minecraft.client.renderer.color.ItemColors;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.client.resources.model.ModelManager;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
@@ -48,9 +49,9 @@ import appeng.util.ReadableNumberConverter;
|
||||
*/
|
||||
public class AppEngRenderItem extends RenderItem
|
||||
{
|
||||
public AppEngRenderItem( final TextureManager textureManager, final ModelManager modelManager )
|
||||
public AppEngRenderItem( final TextureManager textureManager, final ModelManager modelManager, final ItemColors itemColors )
|
||||
{
|
||||
super( textureManager, modelManager );
|
||||
super( textureManager, modelManager, itemColors );
|
||||
}
|
||||
|
||||
private static final ISlimReadableNumberConverter SLIM_CONVERTER = ReadableNumberConverter.INSTANCE;
|
||||
@@ -81,7 +82,7 @@ public class AppEngRenderItem extends RenderItem
|
||||
GL11.glDisable( GL11.GL_ALPHA_TEST );
|
||||
GL11.glDisable( GL11.GL_BLEND );
|
||||
final Tessellator tessellator = Tessellator.getInstance();
|
||||
final WorldRenderer wr = tessellator.getWorldRenderer();
|
||||
final VertexBuffer wr = tessellator.getBuffer();
|
||||
final int l = 255 - k << 16 | k << 8;
|
||||
final int i1 = ( 255 - k ) / 4 << 16 | 16128;
|
||||
this.renderQuad( tessellator, xPos + 2, yPos + 13, 13, 2, 0 );
|
||||
@@ -132,7 +133,7 @@ public class AppEngRenderItem extends RenderItem
|
||||
|
||||
private void renderQuad( final Tessellator par1Tessellator, final int par2, final int par3, final int par4, final int par5, final int par6 )
|
||||
{
|
||||
final WorldRenderer wr = par1Tessellator.getWorldRenderer();
|
||||
final VertexBuffer wr = par1Tessellator.getBuffer();
|
||||
|
||||
wr.begin( GL11.GL_QUADS, DefaultVertexFormats.ITEM );
|
||||
|
||||
|
||||
@@ -14,18 +14,18 @@ import net.minecraft.client.renderer.block.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.block.model.BlockFaceUV;
|
||||
import net.minecraft.client.renderer.block.model.BlockPartFace;
|
||||
import net.minecraft.client.renderer.block.model.FaceBakery;
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.renderer.block.model.ItemOverrideList;
|
||||
import net.minecraft.client.renderer.block.model.ModelRotation;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.resources.model.IBakedModel;
|
||||
import net.minecraft.client.resources.model.ModelRotation;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
import net.minecraftforge.client.model.IColoredBakedQuad;
|
||||
|
||||
import appeng.api.util.IAESprite;
|
||||
import appeng.api.util.ModelGenerator;
|
||||
@@ -35,17 +35,15 @@ import appeng.client.texture.MissingIcon;
|
||||
import appeng.items.AEBaseItem;
|
||||
import appeng.items.parts.ItemMultiPart;
|
||||
|
||||
|
||||
//TODO 1.9.4 - Just all
|
||||
public class BakingModelGenerator implements ModelGenerator
|
||||
{
|
||||
private static final class CachedModel implements IBakedModel
|
||||
{
|
||||
private final List<BakedQuad>[] faces = new List[6];
|
||||
private final List<BakedQuad> general;
|
||||
|
||||
public CachedModel()
|
||||
{
|
||||
this.general = new ArrayList<BakedQuad>();
|
||||
for( final EnumFacing f : EnumFacing.VALUES )
|
||||
{
|
||||
this.faces[f.ordinal()] = new ArrayList<BakedQuad>();
|
||||
@@ -83,15 +81,15 @@ public class BakingModelGenerator implements ModelGenerator
|
||||
}
|
||||
|
||||
@Override
|
||||
public List getGeneralQuads()
|
||||
public List<BakedQuad> getQuads( IBlockState state, EnumFacing side, long rand )
|
||||
{
|
||||
return this.general;
|
||||
return this.faces[side.ordinal()];
|
||||
}
|
||||
|
||||
@Override
|
||||
public List getFaceQuads( final EnumFacing p_177551_1_ )
|
||||
public ItemOverrideList getOverrides()
|
||||
{
|
||||
return this.faces[p_177551_1_.ordinal()];
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -364,7 +362,7 @@ public class BakingModelGenerator implements ModelGenerator
|
||||
|
||||
public boolean isAlphaPass()
|
||||
{
|
||||
return MinecraftForgeClient.getRenderLayer() == EnumWorldBlockLayer.TRANSLUCENT;
|
||||
return MinecraftForgeClient.getRenderLayer() == BlockRenderLayer.TRANSLUCENT;
|
||||
}
|
||||
|
||||
private float[] getFaceUvs( final EnumFacing face, final Vector3f to_16, final Vector3f from_16 )
|
||||
|
||||
@@ -21,6 +21,7 @@ package appeng.client.render;
|
||||
|
||||
import java.nio.FloatBuffer;
|
||||
import java.util.EnumSet;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import org.lwjgl.BufferUtils;
|
||||
@@ -28,15 +29,15 @@ import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.client.resources.model.ModelResourceLocation;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
@@ -666,7 +667,7 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
|
||||
return ( 16.0 - uv ) / 16.0;
|
||||
}
|
||||
|
||||
public void renderTile( final B block, final T tile, final WorldRenderer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderer )
|
||||
public void renderTile( final B block, final T tile, final VertexBuffer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderer )
|
||||
{
|
||||
|
||||
renderer.setUvRotateBottom( renderer.setUvRotateTop( renderer.setUvRotateEast( renderer.setUvRotateWest( renderer.setUvRotateNorth( renderer.setUvRotateSouth( 0 ) ) ) ) ) );
|
||||
@@ -675,7 +676,7 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
|
||||
final AEPartLocation forward = AEPartLocation.SOUTH;
|
||||
this.applyTESRRotation( x, y, z, forward.getFacing(), up.getFacing() );
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture( TextureMap.locationBlocksTexture );
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture( TextureMap.LOCATION_BLOCKS_TEXTURE );
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
|
||||
if( Minecraft.isAmbientOcclusionEnabled() )
|
||||
@@ -753,7 +754,7 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
|
||||
GL11.glTranslatef( 0, -0.14F, 0 );
|
||||
|
||||
// RenderItem.renderInFrame = true;
|
||||
Minecraft.getMinecraft().getRenderManager().renderEntityWithPosYaw( entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F );
|
||||
Minecraft.getMinecraft().getRenderManager().doRenderEntity( entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F, true );
|
||||
// RenderItem.renderInFrame = false;
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
@@ -20,14 +20,15 @@ package appeng.client.render;
|
||||
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
@@ -24,9 +24,9 @@ import java.util.List;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
|
||||
import appeng.api.parts.IFacadeContainer;
|
||||
@@ -60,7 +60,7 @@ public class CableRenderHelper
|
||||
}
|
||||
else
|
||||
{
|
||||
BusRenderHelper.INSTANCE.setPass( MinecraftForgeClient.getRenderLayer() == EnumWorldBlockLayer.TRANSLUCENT ? 1 : 0 );
|
||||
BusRenderHelper.INSTANCE.setPass( MinecraftForgeClient.getRenderLayer() == BlockRenderLayer.TRANSLUCENT ? 1 : 0 );
|
||||
}
|
||||
|
||||
if( renderer.getBlockAccess() == null )
|
||||
|
||||
@@ -3,7 +3,7 @@ package appeng.client.render;
|
||||
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.util.ModelGenerator;
|
||||
|
||||
@@ -29,7 +29,7 @@ import net.minecraft.client.renderer.GLAllocation;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
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.vertex.DefaultVertexFormats;
|
||||
import net.minecraftforge.client.IRenderHandler;
|
||||
|
||||
@@ -77,7 +77,7 @@ public class SpatialSkyRender extends IRenderHandler
|
||||
GL11.glDepthMask( false );
|
||||
GL11.glColor4f( 0.0f, 0.0f, 0.0f, 1.0f );
|
||||
final Tessellator tessellator = Tessellator.getInstance();
|
||||
final WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
||||
final VertexBuffer VertexBuffer = tessellator.getBuffer();
|
||||
|
||||
for( int i = 0; i < 6; ++i )
|
||||
{
|
||||
@@ -108,11 +108,11 @@ public class SpatialSkyRender extends IRenderHandler
|
||||
GL11.glRotatef( -90.0F, 0.0F, 0.0F, 1.0F );
|
||||
}
|
||||
|
||||
worldrenderer.begin( GL11.GL_QUADS, DefaultVertexFormats.ITEM );
|
||||
worldrenderer.color( 0f, 0f, 0f, 1f ).pos( -100.0D, -100.0D, -100.0D ).tex( 0.0D, 0.0D ).endVertex();
|
||||
worldrenderer.color( 0f, 0f, 0f, 1f ).pos( -100.0D, -100.0D, 100.0D ).tex( 0.0D, 16.0D ).endVertex();
|
||||
worldrenderer.color( 0f, 0f, 0f, 1f ).pos( 100.0D, -100.0D, 100.0D ).tex( 16.0D, 16.0D ).endVertex();
|
||||
worldrenderer.color( 0f, 0f, 0f, 1f ).pos( 100.0D, -100.0D, -100.0D ).tex( 16.0D, 0.0D ).endVertex();
|
||||
VertexBuffer.begin( GL11.GL_QUADS, DefaultVertexFormats.ITEM );
|
||||
VertexBuffer.color( 0f, 0f, 0f, 1f ).pos( -100.0D, -100.0D, -100.0D ).tex( 0.0D, 0.0D ).endVertex();
|
||||
VertexBuffer.color( 0f, 0f, 0f, 1f ).pos( -100.0D, -100.0D, 100.0D ).tex( 0.0D, 16.0D ).endVertex();
|
||||
VertexBuffer.color( 0f, 0f, 0f, 1f ).pos( 100.0D, -100.0D, 100.0D ).tex( 16.0D, 16.0D ).endVertex();
|
||||
VertexBuffer.color( 0f, 0f, 0f, 1f ).pos( 100.0D, -100.0D, -100.0D ).tex( 16.0D, 0.0D ).endVertex();
|
||||
tessellator.draw();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
@@ -145,8 +145,8 @@ public class SpatialSkyRender extends IRenderHandler
|
||||
private void renderTwinkles()
|
||||
{
|
||||
final Tessellator tessellator = Tessellator.getInstance();
|
||||
final WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
||||
worldrenderer.begin( GL11.GL_QUADS, DefaultVertexFormats.ITEM );
|
||||
final VertexBuffer VertexBuffer = tessellator.getBuffer();
|
||||
VertexBuffer.begin( GL11.GL_QUADS, DefaultVertexFormats.ITEM );
|
||||
|
||||
for( int i = 0; i < 50; ++i )
|
||||
{
|
||||
@@ -186,7 +186,7 @@ public class SpatialSkyRender extends IRenderHandler
|
||||
final double d23 = d17 * d12 - d20 * d13;
|
||||
final double d24 = d23 * d9 - d21 * d10;
|
||||
final double d25 = d21 * d9 + d23 * d10;
|
||||
worldrenderer.pos( x + d24, y + d22, z + d25 ).endVertex();
|
||||
VertexBuffer.pos( x + d24, y + d22, z + d25 ).endVertex();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ public class TESRWrapper extends TileEntitySpecialRenderer
|
||||
GL11.glPushMatrix();
|
||||
|
||||
this.renderBlocksInstance.setBlockAccess( te.getWorld() );
|
||||
this.blkRender.renderTile( (AEBaseBlock) b, (AEBaseTile) te, tess.getWorldRenderer(), x, y, z, f, this.renderBlocksInstance );
|
||||
this.blkRender.renderTile( (AEBaseBlock) b, (AEBaseTile) te, tess.getBuffer(), x, y, z, f, this.renderBlocksInstance );
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.util.HashMap;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -23,8 +23,8 @@ import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.networking.IGridHost;
|
||||
|
||||
@@ -26,10 +26,10 @@ import org.lwjgl.opengl.GL12;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.util.AEPartLocation;
|
||||
@@ -122,7 +122,7 @@ public class RenderBlockCharger extends BaseBlockRender<BlockCharger, TileCharge
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderTile( final BlockCharger block, final TileCharger tile, final WorldRenderer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderer )
|
||||
public void renderTile( final BlockCharger block, final TileCharger tile, final VertexBuffer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderer )
|
||||
{
|
||||
final ItemStack sis = tile.getStackInSlot( 0 );
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@ package appeng.client.render.blocks;
|
||||
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.util.ModelGenerator;
|
||||
|
||||
@@ -23,9 +23,9 @@ import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
|
||||
@@ -104,7 +104,7 @@ public class RenderBlockCraftingCPU<B extends BlockCraftingUnit, T extends TileC
|
||||
final BusRenderHelper i = BusRenderHelper.INSTANCE;
|
||||
|
||||
renderer.setBlockAccess( w );
|
||||
i.setPass( MinecraftForgeClient.getRenderLayer() == EnumWorldBlockLayer.TRANSLUCENT ? 1 : 0 );
|
||||
i.setPass( MinecraftForgeClient.getRenderLayer() == BlockRenderLayer.TRANSLUCENT ? 1 : 0 );
|
||||
i.setOrientation( EnumFacing.EAST, EnumFacing.UP, EnumFacing.SOUTH );
|
||||
|
||||
final float highX = this.isConnected( w, pos, EnumFacing.EAST ) ? 16 : 13.01f;
|
||||
|
||||
@@ -26,7 +26,7 @@ import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.renderer.GLAllocation;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
@@ -57,7 +57,7 @@ public class RenderBlockCraftingCPUMonitor extends RenderBlockCraftingCPU<BlockC
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderTile( final BlockCraftingMonitor block, final TileCraftingMonitorTile tile, final WorldRenderer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderer )
|
||||
public void renderTile( final BlockCraftingMonitor block, final TileCraftingMonitorTile tile, final VertexBuffer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderer )
|
||||
{
|
||||
if( tile != null )
|
||||
{
|
||||
@@ -91,7 +91,7 @@ public class RenderBlockCraftingCPUMonitor extends RenderBlockCraftingCPU<BlockC
|
||||
}
|
||||
}
|
||||
|
||||
private void tesrRenderScreen( final WorldRenderer tess, final TileCraftingMonitorTile cmt, final IAEItemStack ais )
|
||||
private void tesrRenderScreen( final VertexBuffer tess, final TileCraftingMonitorTile cmt, final IAEItemStack ais )
|
||||
{
|
||||
final EnumFacing side = cmt.getForward();
|
||||
|
||||
|
||||
@@ -23,12 +23,12 @@ import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.RenderItem;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.client.resources.model.IBakedModel;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.util.ModelGenerator;
|
||||
@@ -67,14 +67,14 @@ public class RenderBlockCrank extends BaseBlockRender<BlockCrank, TileCrank>
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderTile( final BlockCrank blk, final TileCrank tile, final WorldRenderer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderBlocks )
|
||||
public void renderTile( final BlockCrank blk, final TileCrank tile, final VertexBuffer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderBlocks )
|
||||
{
|
||||
if( tile.getUp() == null )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture( TextureMap.locationBlocksTexture );
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture( TextureMap.LOCATION_BLOCKS_TEXTURE );
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
|
||||
if( Minecraft.isAmbientOcclusionEnabled() )
|
||||
|
||||
@@ -20,7 +20,7 @@ package appeng.client.render.blocks;
|
||||
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.implementations.items.IAEItemPowerStorage;
|
||||
|
||||
@@ -28,12 +28,12 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
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.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.features.IInscriberRecipe;
|
||||
@@ -149,7 +149,7 @@ public class RenderBlockInscriber extends BaseBlockRender<BlockInscriber, TileIn
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderTile( final BlockInscriber block, final TileInscriber tile, final WorldRenderer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderer )
|
||||
public void renderTile( final BlockInscriber block, final TileInscriber tile, final VertexBuffer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderer )
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
this.applyTESRRotation( x, y, z, tile.getForward(), tile.getUp() );
|
||||
@@ -160,7 +160,7 @@ public class RenderBlockInscriber extends BaseBlockRender<BlockInscriber, TileIn
|
||||
GL11.glCullFace( GL11.GL_FRONT );
|
||||
|
||||
final Minecraft mc = Minecraft.getMinecraft();
|
||||
mc.renderEngine.bindTexture( TextureMap.locationBlocksTexture );
|
||||
mc.renderEngine.bindTexture( TextureMap.LOCATION_BLOCKS_TEXTURE );
|
||||
|
||||
// << 20 | light << 4;
|
||||
final int br = tile.getWorld().getCombinedLight( tile.getPos(), 0 );
|
||||
@@ -263,7 +263,7 @@ public class RenderBlockInscriber extends BaseBlockRender<BlockInscriber, TileIn
|
||||
}
|
||||
}
|
||||
|
||||
private void renderItem( ItemStack sis, final float o, final AEBaseBlock block, final AEBaseTile tile, final WorldRenderer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderer )
|
||||
private void renderItem( ItemStack sis, final float o, final AEBaseBlock block, final AEBaseTile tile, final VertexBuffer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderer )
|
||||
{
|
||||
if( sis != null )
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.client.render.blocks;
|
||||
|
||||
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.util.IAESprite;
|
||||
|
||||
@@ -22,8 +22,8 @@ package appeng.client.render.blocks;
|
||||
import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.util.IAESprite;
|
||||
@@ -64,7 +64,7 @@ public class RenderBlockPaint extends BaseBlockRender<BlockPaint, TilePaint>
|
||||
|
||||
final IAESprite[] icoSet = { imb.getIcon( EnumFacing.UP, imb.getDefaultState() ), ExtraBlockTextures.BlockPaint2.getIcon(), ExtraBlockTextures.BlockPaint3.getIcon() };
|
||||
|
||||
final int brightness = imb.getMixedBrightnessForBlock( world, pos );
|
||||
final int brightness = imb.getLightValue( world.getBlockState( pos ), world, pos );
|
||||
|
||||
final EnumSet<EnumFacing> validSides = EnumSet.noneOf( EnumFacing.class );
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ package appeng.client.render.blocks;
|
||||
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.util.IAESprite;
|
||||
|
||||
@@ -25,10 +25,10 @@ import org.lwjgl.opengl.GL12;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.model.ModelChest;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.util.ModelGenerator;
|
||||
@@ -84,7 +84,7 @@ public class RenderBlockSkyChest extends BaseBlockRender<BlockSkyChest, TileSkyC
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderTile( final BlockSkyChest block, final TileSkyChest skyChest, final WorldRenderer tess, final double x, final double y, final double z, final float partialTick, final ModelGenerator renderer )
|
||||
public void renderTile( final BlockSkyChest block, final TileSkyChest skyChest, final VertexBuffer tess, final double x, final double y, final double z, final float partialTick, final ModelGenerator renderer )
|
||||
{
|
||||
if( skyChest == null )
|
||||
{
|
||||
|
||||
@@ -23,11 +23,11 @@ import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.util.ModelGenerator;
|
||||
@@ -178,7 +178,7 @@ public class RenderBlockSkyCompass extends BaseBlockRender<BlockSkyCompass, Tile
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderTile( final BlockSkyCompass block, final TileSkyCompass skyCompass, final WorldRenderer tess, final double x, final double y, final double z, final float partialTick, final ModelGenerator renderer )
|
||||
public void renderTile( final BlockSkyCompass block, final TileSkyCompass skyCompass, final VertexBuffer tess, final double x, final double y, final double z, final float partialTick, final ModelGenerator renderer )
|
||||
{
|
||||
if( skyCompass == null )
|
||||
{
|
||||
|
||||
@@ -22,8 +22,8 @@ package appeng.client.render.blocks;
|
||||
import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.util.AEColor;
|
||||
|
||||
@@ -22,8 +22,8 @@ package appeng.client.render.blocks;
|
||||
import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.util.AEPartLocation;
|
||||
|
||||
@@ -22,8 +22,8 @@ package appeng.client.render.blocks;
|
||||
import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
|
||||
@@ -20,7 +20,7 @@ package appeng.client.render.blocks;
|
||||
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.util.ModelGenerator;
|
||||
|
||||
@@ -25,8 +25,8 @@ import java.util.EnumSet;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
|
||||
@@ -22,7 +22,7 @@ package appeng.client.render.blocks;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
|
||||
@@ -20,7 +20,7 @@ package appeng.client.render.blocks;
|
||||
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.util.ModelGenerator;
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.util.AEPartLocation;
|
||||
@@ -68,7 +68,7 @@ public class RenderQuartzTorch extends BaseBlockRender<AEBaseBlock, AEBaseTile>
|
||||
|
||||
this.renderInvBlock( EnumSet.allOf( AEPartLocation.class ), blk, is, 0xffffff, renderer );
|
||||
|
||||
blk.getRendererInstance().setTemporaryRenderIcon( renderer.getIcon( Blocks.hopper.getDefaultState() )[0] );
|
||||
blk.getRendererInstance().setTemporaryRenderIcon( renderer.getIcon( Blocks.HOPPER.getDefaultState() )[0] );
|
||||
renderer.setRenderAllFaces( true );
|
||||
|
||||
final float top = 8.0f / 16.0f;
|
||||
@@ -135,7 +135,7 @@ public class RenderQuartzTorch extends BaseBlockRender<AEBaseBlock, AEBaseTile>
|
||||
super.renderInWorld( block, world, pos, renderer );
|
||||
}
|
||||
|
||||
block.getRendererInstance().setTemporaryRenderIcon( renderer.getIcon( Blocks.hopper.getDefaultState() )[0] );
|
||||
block.getRendererInstance().setTemporaryRenderIcon( renderer.getIcon( Blocks.HOPPER.getDefaultState() )[0] );
|
||||
|
||||
final float top = 8.0f / 16.0f;
|
||||
final float bottom = 7.0f / 16.0f;
|
||||
|
||||
@@ -20,8 +20,8 @@ package appeng.client.render.blocks;
|
||||
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.util.AEPartLocation;
|
||||
|
||||
@@ -22,7 +22,7 @@ package appeng.client.render.blocks;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.util.ModelGenerator;
|
||||
@@ -44,7 +44,7 @@ public class RenderTinyTNT extends BaseBlockRender<BlockTinyTNT, AEBaseTile>
|
||||
@Override
|
||||
public void renderInventory( final BlockTinyTNT block, final ItemStack is, final ModelGenerator renderer, final ItemRenderType type, final Object[] obj )
|
||||
{
|
||||
renderer.setOverrideBlockTexture( new FullIcon( Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelShapes().getTexture( Blocks.tnt.getDefaultState() ) ) );
|
||||
renderer.setOverrideBlockTexture( new FullIcon( Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelShapes().getTexture( Blocks.TNT.getDefaultState() ) ) );
|
||||
renderer.setRenderBounds( 0.25f, 0.0f, 0.25f, 0.75f, 0.5f, 0.75f );
|
||||
super.renderInventory( block, is, renderer, type, obj );
|
||||
}
|
||||
@@ -52,7 +52,7 @@ public class RenderTinyTNT extends BaseBlockRender<BlockTinyTNT, AEBaseTile>
|
||||
@Override
|
||||
public boolean renderInWorld( final BlockTinyTNT imb, final IBlockAccess world, final BlockPos pos, final ModelGenerator renderer )
|
||||
{
|
||||
renderer.setOverrideBlockTexture( new FullIcon( Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelShapes().getTexture( Blocks.tnt.getDefaultState() ) ) );
|
||||
renderer.setOverrideBlockTexture( new FullIcon( Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelShapes().getTexture( Blocks.TNT.getDefaultState() ) ) );
|
||||
renderer.setRenderAllFaces( true );
|
||||
renderer.setRenderBounds( 0.25f, 0.0f, 0.25f, 0.75f, 0.5f, 0.75f );
|
||||
final boolean out = super.renderInWorld( imb, world, pos, renderer );
|
||||
|
||||
@@ -22,11 +22,11 @@ package appeng.client.render.blocks;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.parts.IFacadePart;
|
||||
@@ -137,7 +137,7 @@ public class RendererCableBus extends BaseBlockRender<BlockCableBus, TileCableBu
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderTile( final BlockCableBus block, final TileCableBus cableBus, final WorldRenderer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderer )
|
||||
public void renderTile( final BlockCableBus block, final TileCableBus cableBus, final VertexBuffer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderer )
|
||||
{
|
||||
if( cableBus != null )
|
||||
{
|
||||
|
||||
@@ -22,8 +22,8 @@ package appeng.client.render.blocks;
|
||||
import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.util.AEColor;
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
package appeng.client.render.effects;
|
||||
|
||||
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.particle.Particle;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -30,7 +30,7 @@ import appeng.core.CommonHelper;
|
||||
import appeng.entity.EntityFloatingItem;
|
||||
|
||||
|
||||
public class AssemblerFX extends EntityFX
|
||||
public class AssemblerFX extends Particle
|
||||
{
|
||||
|
||||
private final EntityFloatingItem fi;
|
||||
@@ -47,6 +47,7 @@ public class AssemblerFX extends EntityFX
|
||||
this.fi = new EntityFloatingItem( this, w, x, y, z, is.getItemStack() );
|
||||
w.spawnEntityInWorld( this.fi );
|
||||
this.particleMaxAge = (int) Math.ceil( Math.max( 1, 100.0f / speed ) ) + 2;
|
||||
//TODO 1.9.4 - noClip => ?
|
||||
this.noClip = true;
|
||||
}
|
||||
|
||||
@@ -62,7 +63,7 @@ public class AssemblerFX extends EntityFX
|
||||
{
|
||||
super.onUpdate();
|
||||
|
||||
if( this.isDead )
|
||||
if( this.isExpired )
|
||||
{
|
||||
this.fi.setDead();
|
||||
}
|
||||
@@ -74,7 +75,7 @@ public class AssemblerFX extends EntityFX
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderParticle( final WorldRenderer par1Tessellator, final Entity p_180434_2_, final float l, final float rX, final float rY, final float rZ, final float rYZ, final float rXY )
|
||||
public void renderParticle( final VertexBuffer par1Tessellator, final Entity p_180434_2_, final float l, final float rX, final float rY, final float rZ, final float rYZ, final float rXY )
|
||||
{
|
||||
this.time += l;
|
||||
if( this.time > 4.0 )
|
||||
|
||||
@@ -19,11 +19,11 @@
|
||||
package appeng.client.render.effects;
|
||||
|
||||
|
||||
import net.minecraft.client.particle.EntityReddustFX;
|
||||
import net.minecraft.client.particle.ParticleRedstone;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
||||
public class ChargedOreFX extends EntityReddustFX
|
||||
public class ChargedOreFX extends ParticleRedstone
|
||||
{
|
||||
|
||||
public ChargedOreFX( final World w, final double x, final double y, final double z, final float r, final float g, final float b )
|
||||
|
||||
@@ -19,12 +19,12 @@
|
||||
package appeng.client.render.effects;
|
||||
|
||||
|
||||
import net.minecraft.client.particle.EntityBreakingFX;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.particle.ParticleBreaking;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
@@ -34,7 +34,7 @@ import appeng.client.texture.ExtraBlockTextures;
|
||||
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
public class CraftingFx extends EntityBreakingFX
|
||||
public class CraftingFx extends ParticleBreaking
|
||||
{
|
||||
|
||||
private final TextureAtlasSprite particleTextureIndex;
|
||||
@@ -59,6 +59,7 @@ public class CraftingFx extends EntityBreakingFX
|
||||
this.startBlkY = MathHelper.floor_double( this.posY );
|
||||
this.startBlkZ = MathHelper.floor_double( this.posZ );
|
||||
|
||||
//TODO 1.9.4 - noClip => ?
|
||||
this.noClip = true;
|
||||
}
|
||||
|
||||
@@ -69,7 +70,7 @@ public class CraftingFx extends EntityBreakingFX
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderParticle( final WorldRenderer par1Tessellator, final Entity p_180434_2_, final float partialTick, final float x, final float y, final float z, final float rx, final float rz )
|
||||
public void renderParticle( final VertexBuffer par1Tessellator, final Entity p_180434_2_, final float partialTick, final float x, final float y, final float z, final float rx, final float rz )
|
||||
{
|
||||
if( partialTick < 0 || partialTick > 1 )
|
||||
{
|
||||
@@ -119,4 +120,19 @@ public class CraftingFx extends EntityBreakingFX
|
||||
this.particleScale *= 0.51f;
|
||||
this.particleAlpha *= 0.51f;
|
||||
}
|
||||
|
||||
public void setMotionX( float motionX )
|
||||
{
|
||||
this.motionX = motionX;
|
||||
}
|
||||
|
||||
public void setMotionY( float motionY )
|
||||
{
|
||||
this.motionY = motionY;
|
||||
}
|
||||
|
||||
public void setMotionZ( float motionZ )
|
||||
{
|
||||
this.motionZ = motionZ;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,12 +19,12 @@
|
||||
package appeng.client.render.effects;
|
||||
|
||||
|
||||
import net.minecraft.client.particle.EntityBreakingFX;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.particle.ParticleBreaking;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
@@ -34,7 +34,7 @@ import appeng.client.texture.ExtraBlockTextures;
|
||||
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
public class EnergyFx extends EntityBreakingFX
|
||||
public class EnergyFx extends ParticleBreaking
|
||||
{
|
||||
|
||||
private final TextureAtlasSprite particleTextureIndex;
|
||||
@@ -58,6 +58,7 @@ public class EnergyFx extends EntityBreakingFX
|
||||
this.startBlkY = MathHelper.floor_double( this.posY );
|
||||
this.startBlkZ = MathHelper.floor_double( this.posZ );
|
||||
|
||||
//TODO 1.9.4 - noClip => ?
|
||||
this.noClip = true;
|
||||
}
|
||||
|
||||
@@ -68,7 +69,7 @@ public class EnergyFx extends EntityBreakingFX
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderParticle( final WorldRenderer par1Tessellator, final Entity p_180434_2_, final float par2, final float par3, final float par4, final float par5, final float par6, final float par7 )
|
||||
public void renderParticle( final VertexBuffer par1Tessellator, final Entity p_180434_2_, final float par2, final float par3, final float par4, final float par5, final float par6, final float par7 )
|
||||
{
|
||||
final float f6 = this.particleTextureIndex.getMinU();
|
||||
final float f7 = this.particleTextureIndex.getMaxU();
|
||||
@@ -109,4 +110,19 @@ public class EnergyFx extends EntityBreakingFX
|
||||
this.particleScale *= 0.89f;
|
||||
this.particleAlpha *= 0.89f;
|
||||
}
|
||||
|
||||
public void setMotionX( float motionX )
|
||||
{
|
||||
this.motionX = motionX;
|
||||
}
|
||||
|
||||
public void setMotionY( float motionY )
|
||||
{
|
||||
this.motionY = motionY;
|
||||
}
|
||||
|
||||
public void setMotionZ( float motionZ )
|
||||
{
|
||||
this.motionZ = motionZ;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ public class LightningArcFX extends LightningFX
|
||||
public LightningArcFX( final World w, final double x, final double y, final double z, final double ex, final double ey, final double ez, final double r, final double g, final double b )
|
||||
{
|
||||
super( w, x, y, z, r, g, b, 6 );
|
||||
//TODO 1.9.4 - noClip => ?
|
||||
this.noClip = true;
|
||||
|
||||
this.rx = ex - x;
|
||||
|
||||
@@ -22,15 +22,15 @@ package appeng.client.render.effects;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.particle.Particle;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
||||
public class LightningFX extends EntityFX
|
||||
public class LightningFX extends Particle
|
||||
{
|
||||
|
||||
private static final Random RANDOM_GENERATOR = new Random();
|
||||
@@ -55,6 +55,7 @@ public class LightningFX extends EntityFX
|
||||
this.motionY = 0;
|
||||
this.motionZ = 0;
|
||||
this.particleMaxAge = maxAge;
|
||||
//TODO 1.9.4 - noClip => ?
|
||||
this.noClip = true;
|
||||
}
|
||||
|
||||
@@ -84,7 +85,7 @@ public class LightningFX extends EntityFX
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderParticle( final WorldRenderer tess, final Entity p_180434_2_, final float l, final float rX, final float rY, final float rZ, final float rYZ, final float rXY )
|
||||
public void renderParticle( final VertexBuffer tess, final Entity p_180434_2_, final float l, final float rX, final float rY, final float rZ, final float rYZ, final float rXY )
|
||||
{
|
||||
final float j = 1.0f;
|
||||
float red = this.particleRed * j * 0.9f;
|
||||
@@ -210,7 +211,7 @@ public class LightningFX extends EntityFX
|
||||
this.hasData = false;
|
||||
}
|
||||
|
||||
private void draw( float red, float green, float blue, final WorldRenderer tess, final double[] a, final double[] b, final double f6, final double f8 )
|
||||
private void draw( float red, float green, float blue, final VertexBuffer tess, final double[] a, final double[] b, final double f6, final double f8 )
|
||||
{
|
||||
if( this.hasData )
|
||||
{
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
package appeng.client.render.effects;
|
||||
|
||||
|
||||
import net.minecraft.client.particle.EntityBreakingFX;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.particle.ParticleBreaking;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.Item;
|
||||
@@ -30,7 +30,7 @@ import appeng.api.util.AEPartLocation;
|
||||
import appeng.client.texture.ExtraBlockTextures;
|
||||
|
||||
|
||||
public class MatterCannonFX extends EntityBreakingFX
|
||||
public class MatterCannonFX extends ParticleBreaking
|
||||
{
|
||||
|
||||
private final TextureAtlasSprite particleTextureIndex;
|
||||
@@ -48,6 +48,7 @@ public class MatterCannonFX extends EntityBreakingFX
|
||||
this.motionY = 0.0f;
|
||||
this.motionZ = 0.0f;
|
||||
this.particleTextureIndex = ExtraBlockTextures.BlockMatterCannonParticle.getIcon().getAtlas();
|
||||
//TODO 1.9.4 - noClip => ?
|
||||
this.noClip = true;
|
||||
}
|
||||
|
||||
@@ -71,7 +72,7 @@ public class MatterCannonFX extends EntityBreakingFX
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderParticle( final WorldRenderer par1Tessellator, final Entity p_180434_2_, final float par2, final float par3, final float par4, final float par5, final float par6, final float par7 )
|
||||
public void renderParticle( final VertexBuffer par1Tessellator, final Entity p_180434_2_, final float par2, final float par3, final float par4, final float par5, final float par6, final float par7 )
|
||||
{
|
||||
final float f6 = this.particleTextureIndex.getMinU();
|
||||
final float f7 = this.particleTextureIndex.getMaxU();
|
||||
|
||||
@@ -19,14 +19,14 @@
|
||||
package appeng.client.render.effects;
|
||||
|
||||
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.particle.Particle;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
public class VibrantFX extends EntityFX
|
||||
public class VibrantFX extends Particle
|
||||
{
|
||||
|
||||
public VibrantFX( final World par1World, final double x, final double y, final double z, final double par8, final double par10, final double par12 )
|
||||
@@ -46,13 +46,14 @@ public class VibrantFX extends EntityFX
|
||||
this.prevPosY = this.posY;
|
||||
this.prevPosZ = this.posZ;
|
||||
this.particleMaxAge = (int) ( 20.0D / ( Math.random() * 0.8D + 0.1D ) );
|
||||
//TODO 1.9.4 - noClip => ?
|
||||
this.noClip = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getBrightness( final float par1 )
|
||||
public int getBrightnessForRender( final float par1 )
|
||||
{
|
||||
return 1.0f;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -69,7 +70,7 @@ public class VibrantFX extends EntityFX
|
||||
|
||||
if( this.particleMaxAge <= 0 || this.particleScale < 0.1 )
|
||||
{
|
||||
this.setDead();
|
||||
this.setExpired();
|
||||
}
|
||||
this.particleMaxAge--;
|
||||
}
|
||||
|
||||
@@ -190,7 +190,7 @@ public enum CableBusTextures
|
||||
@SideOnly( Side.CLIENT )
|
||||
public static TextureAtlasSprite getMissing()
|
||||
{
|
||||
return ( (TextureMap) Minecraft.getMinecraft().getTextureManager().getTexture( TextureMap.locationBlocksTexture ) ).getAtlasSprite( "missingno" );
|
||||
return ( (TextureMap) Minecraft.getMinecraft().getTextureManager().getTexture( TextureMap.LOCATION_BLOCKS_TEXTURE ) ).getAtlasSprite( "missingno" );
|
||||
}
|
||||
|
||||
public String getName()
|
||||
|
||||
@@ -158,7 +158,7 @@ public enum ExtraBlockTextures
|
||||
@SideOnly( Side.CLIENT )
|
||||
public static IAESprite getMissing()
|
||||
{
|
||||
return new BaseIcon( ( (TextureMap) Minecraft.getMinecraft().getTextureManager().getTexture( TextureMap.locationBlocksTexture ) ).getAtlasSprite( "missingno" ) );
|
||||
return new BaseIcon( ( (TextureMap) Minecraft.getMinecraft().getTextureManager().getTexture( TextureMap.LOCATION_BLOCKS_TEXTURE ) ).getAtlasSprite( "missingno" ) );
|
||||
}
|
||||
|
||||
public String getName()
|
||||
|
||||
@@ -45,7 +45,7 @@ public class MissingIcon implements IAESprite
|
||||
@SideOnly( Side.CLIENT )
|
||||
public static TextureAtlasSprite getMissing()
|
||||
{
|
||||
return ( (TextureMap) Minecraft.getMinecraft().getTextureManager().getTexture( TextureMap.locationBlocksTexture ) ).getAtlasSprite( "missingno" );
|
||||
return ( (TextureMap) Minecraft.getMinecraft().getTextureManager().getTexture( TextureMap.LOCATION_BLOCKS_TEXTURE ) ).getAtlasSprite( "missingno" );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user