More stuff ingame and showing up.
This commit is contained in:
@@ -22,8 +22,6 @@ package appeng.client;
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
|
||||
import appeng.client.render.tesr.InscriberTESR;
|
||||
import appeng.client.render.textures.ParticleTextures;
|
||||
import com.mojang.blaze3d.platform.GlStateManager;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.settings.KeyBinding;
|
||||
@@ -46,12 +44,7 @@ import appeng.api.util.AEColor;
|
||||
import appeng.block.AEBaseBlock;
|
||||
import appeng.core.AELog;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketAssemblerAnimation;
|
||||
import appeng.core.sync.packets.PacketValueConfig;
|
||||
import appeng.helpers.IMouseWheelItem;
|
||||
import appeng.hooks.TickHandler;
|
||||
import appeng.hooks.TickHandler.PlayerColor;
|
||||
import appeng.server.ServerHelper;
|
||||
import appeng.util.Platform;
|
||||
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
|
||||
@@ -213,22 +206,21 @@ public class ClientHelper extends ServerHelper
|
||||
|
||||
private void postPlayerRender( final RenderLivingEvent.Pre p )
|
||||
{
|
||||
final PlayerColor player = TickHandler.INSTANCE.getPlayerColors().get( p.getEntity().getEntityId() );
|
||||
if( player != null )
|
||||
{
|
||||
final AEColor col = player.myColor;
|
||||
|
||||
final float r = 0xff & ( col.mediumVariant >> 16 );
|
||||
final float g = 0xff & ( col.mediumVariant >> 8 );
|
||||
final float b = 0xff & ( col.mediumVariant );
|
||||
// FIXME: This is most certainly not going to work!
|
||||
GlStateManager.color4f( r / 255.0f, g / 255.0f, b / 255.0f, 1.0f );
|
||||
}
|
||||
// FIXME final PlayerColor player = TickHandler.INSTANCE.getPlayerColors().get( p.getEntity().getEntityId() );
|
||||
// FIXME if( player != null )
|
||||
// FIXME {
|
||||
// FIXME final AEColor col = player.myColor;
|
||||
// FIXME final float r = 0xff & ( col.mediumVariant >> 16 );
|
||||
// FIXME final float g = 0xff & ( col.mediumVariant >> 8 );
|
||||
// FIXME final float b = 0xff & ( col.mediumVariant );
|
||||
// FIXME // FIXME: This is most certainly not going to work!
|
||||
// FIXME GlStateManager.color4f( r / 255.0f, g / 255.0f, b / 255.0f, 1.0f );
|
||||
// FIXME }
|
||||
}
|
||||
|
||||
private void spawnAssembler( final World world, final double posX, final double posY, final double posZ, final Object o )
|
||||
{
|
||||
final PacketAssemblerAnimation paa = (PacketAssemblerAnimation) o;
|
||||
// FIXME final PacketAssemblerAnimation paa = (PacketAssemblerAnimation) o;
|
||||
|
||||
// FIXME final AssemblerFX fx = new AssemblerFX( world, posX, posY, posZ, 0.0D, 0.0D, 0.0D, paa.rate, paa.is );
|
||||
// FIXME Minecraft.getInstance().particles.addEffect( fx );
|
||||
@@ -305,15 +297,15 @@ public class ClientHelper extends ServerHelper
|
||||
|
||||
if( mainHand || offHand )
|
||||
{
|
||||
try
|
||||
{
|
||||
NetworkHandler.instance().sendToServer( new PacketValueConfig( "Item", me.getScrollDelta() > 0 ? "WheelUp" : "WheelDown" ) );
|
||||
me.setCanceled( true );
|
||||
}
|
||||
catch( final IOException e )
|
||||
{
|
||||
AELog.debug( e );
|
||||
}
|
||||
// FIXME try
|
||||
// FIXME {
|
||||
// FIXME NetworkHandler.instance().sendToServer( new PacketValueConfig( "Item", me.getScrollDelta() > 0 ? "WheelUp" : "WheelDown" ) );
|
||||
// FIXME me.setCanceled( true );
|
||||
// FIXME }
|
||||
// FIXME catch( final IOException e )
|
||||
// FIXME {
|
||||
// FIXME AELog.debug( e );
|
||||
// FIXME }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -321,8 +313,8 @@ public class ClientHelper extends ServerHelper
|
||||
@SubscribeEvent
|
||||
public void onTextureStitch( final TextureStitchEvent.Pre event )
|
||||
{
|
||||
ParticleTextures.registerSprite( event );
|
||||
InscriberTESR.registerTexture( event );
|
||||
// FIXME ParticleTextures.registerSprite( event );
|
||||
// FIXME InscriberTESR.registerTexture( event );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -331,7 +331,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||
return false;
|
||||
}
|
||||
|
||||
final CompoundNBT encodedValue = itemStack.getTagCompound();
|
||||
final CompoundNBT encodedValue = itemStack.getTag();
|
||||
|
||||
if( encodedValue == null )
|
||||
{
|
||||
|
||||
@@ -95,7 +95,7 @@ public class FacadeDispatcherBakedModel extends DelegateBakedModel
|
||||
|
||||
ItemStack textureItem = itemFacade.getTextureItem( stack );
|
||||
|
||||
int hash = Objects.hash( textureItem.getItem().getRegistryName(), textureItem.getMetadata(), textureItem.getTagCompound() );
|
||||
int hash = Objects.hash( textureItem.getItem().getRegistryName(), textureItem.getMetadata(), textureItem.getTag() );
|
||||
FacadeBakedItemModel model = FacadeDispatcherBakedModel.this.cache.get( hash );
|
||||
if( model == null )
|
||||
{
|
||||
|
||||
@@ -19,18 +19,32 @@
|
||||
package appeng.client.render.effects;
|
||||
|
||||
|
||||
import appeng.core.AppEng;
|
||||
import net.minecraft.client.particle.IAnimatedSprite;
|
||||
import net.minecraft.client.particle.IParticleFactory;
|
||||
import net.minecraft.client.particle.Particle;
|
||||
import net.minecraft.client.particle.RedstoneParticle;
|
||||
import net.minecraft.particles.BasicParticleType;
|
||||
import net.minecraft.particles.RedstoneParticleData;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public class ChargedOreFX extends RedstoneParticle
|
||||
{
|
||||
public static final BasicParticleType TYPE = new BasicParticleType(false);
|
||||
|
||||
public ChargedOreFX( final World w, final double x, final double y, final double z, final float r, final float g, final float b )
|
||||
{
|
||||
super( w, x, y, z, 0.21f, 0.61f, 1.0f );
|
||||
static {
|
||||
TYPE.setRegistryName(AppEng.MOD_ID, "charged_ore_fx");
|
||||
}
|
||||
|
||||
private static final RedstoneParticleData PARTICLE_DATA = new RedstoneParticleData(0.21f, 0.61f, 1.0f, 1.0f);
|
||||
|
||||
private ChargedOreFX(World worldIn, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed, IAnimatedSprite spriteSet) {
|
||||
super(worldIn, x, y, z, xSpeed, ySpeed, zSpeed, PARTICLE_DATA, spriteSet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBrightnessForRender( final float par1 )
|
||||
{
|
||||
@@ -43,4 +57,17 @@ public class ChargedOreFX extends RedstoneParticle
|
||||
}
|
||||
return j1 << 20 | j1 << 4;
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public static class Factory implements IParticleFactory<BasicParticleType> {
|
||||
private final IAnimatedSprite spriteSet;
|
||||
|
||||
public Factory(IAnimatedSprite p_i50477_1_) {
|
||||
this.spriteSet = p_i50477_1_;
|
||||
}
|
||||
|
||||
public Particle makeParticle(BasicParticleType typeIn, World worldIn, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) {
|
||||
return new ChargedOreFX(worldIn, x, y, z, xSpeed, ySpeed, zSpeed, this.spriteSet);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,9 +21,7 @@ package appeng.client.render.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.vecmath.Vector3f;
|
||||
import javax.vecmath.Vector4f;
|
||||
import java.util.Random;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.cache.CacheBuilder;
|
||||
@@ -32,9 +30,7 @@ import com.google.common.cache.LoadingCache;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.renderer.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.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.vertex.VertexFormat;
|
||||
import net.minecraft.client.renderer.vertex.VertexFormatElement;
|
||||
@@ -42,8 +38,6 @@ import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.Vec3i;
|
||||
import net.minecraftforge.client.model.pipeline.IVertexConsumer;
|
||||
import net.minecraftforge.client.model.pipeline.QuadGatheringTransformer;
|
||||
import net.minecraftforge.client.model.pipeline.UnpackedBakedQuad;
|
||||
import net.minecraftforge.common.property.IExtendedBlockState;
|
||||
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
import appeng.client.render.FacingToRotation;
|
||||
@@ -143,7 +137,7 @@ public class AutoRotatingModel implements IBakedModel
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BakedQuad> getQuads( BlockState state, Direction side, long rand )
|
||||
public List<BakedQuad> getQuads( BlockState state, Direction side, Random rand )
|
||||
{
|
||||
if( !( state instanceof IExtendedBlockState ) )
|
||||
{
|
||||
|
||||
@@ -23,24 +23,24 @@ import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
|
||||
import net.minecraft.client.renderer.model.IUnbakedModel;
|
||||
import net.minecraft.resources.IResourceManager;
|
||||
import net.minecraft.resources.IResourceManagerReloadListener;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.model.ICustomModelLoader;
|
||||
import net.minecraftforge.client.model.IModel;
|
||||
|
||||
import appeng.core.AppEng;
|
||||
import net.minecraftforge.client.model.IModelLoader;
|
||||
|
||||
|
||||
/**
|
||||
* Manages built-in models.
|
||||
*/
|
||||
public class BuiltInModelLoader implements ICustomModelLoader
|
||||
public class BuiltInModelLoader implements IModelLoader
|
||||
{
|
||||
|
||||
private final Map<String, IModel> builtInModels;
|
||||
private final Map<String, IUnbakedModel> builtInModels;
|
||||
|
||||
public BuiltInModelLoader( Map<String, IModel> builtInModels )
|
||||
public BuiltInModelLoader( Map<String, IUnbakedModel> builtInModels )
|
||||
{
|
||||
this.builtInModels = ImmutableMap.copyOf( builtInModels );
|
||||
}
|
||||
@@ -48,7 +48,7 @@ public class BuiltInModelLoader implements ICustomModelLoader
|
||||
@Override
|
||||
public boolean accepts( ResourceLocation modelLocation )
|
||||
{
|
||||
if( !modelLocation.getResourceDomain().equals( AppEng.MOD_ID ) )
|
||||
if( !modelLocation.getNamespace().equals( AppEng.MOD_ID ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -32,17 +32,13 @@ import com.google.common.base.Strings;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.renderer.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.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.vertex.VertexFormat;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraftforge.client.model.pipeline.UnpackedBakedQuad;
|
||||
import net.minecraftforge.common.property.IExtendedBlockState;
|
||||
|
||||
import appeng.decorative.solid.BlockQuartzGlass;
|
||||
import appeng.decorative.solid.GlassState;
|
||||
|
||||
Reference in New Issue
Block a user