
EmperorZelos
Members-
Posts
148 -
Joined
-
Last visited
Everything posted by EmperorZelos
-
[Solved][1.7.10] Server and client gets out of sync
EmperorZelos replied to EmperorZelos's topic in Modder Support
I have acctually done huge progress so most of it is solved, the issue seems to be more metadata related now. Anotehr example I worked throughout the day is a pressure gauge pipe that generates a redstone signal who's strength depends on the pressure inside, the metadata of the pipe changes and as such generates more redstone power but the redstone connected doesn't react to the new strength, when I remove the closest redstone and replace it it goes as far as it should though. -
[Solved][1.7.10] Server and client gets out of sync
EmperorZelos replied to EmperorZelos's topic in Modder Support
Tileentity alone? or what else would you like to see? -
[Solved][1.7.10] Server and client gets out of sync
EmperorZelos replied to EmperorZelos's topic in Modder Support
Alright, I have managed to solve it but I have the issue of metadata of a block (which changes as the steam pressure increases) starts at 0 when the world is loaded and remains at 0 until it changes from it's data point (let's say the pressure is 2 for the sake of arguement) and then when ti changes to 3, the client gets the change and shows correct but until then it does not. How would I fix that? -
[Solved][1.7.10] Server and client gets out of sync
EmperorZelos replied to EmperorZelos's topic in Modder Support
hmmmm what happens if server side and client side tries to process different data for the same tile entity? Will that cause trouble? -
[Solved][1.7.10] Server and client gets out of sync
EmperorZelos replied to EmperorZelos's topic in Modder Support
it probably does but what could cause them to go so much out of sync? -
Hello, I am doing my mod where I have steam being generated, I know the differens between server/client and .isRemote and such but the server and client get's out of sync where one side has more or less steam than the other, shouldn't it be equal? Is there a way to make them update more or? This especially occures for tileentity data that is saved onto the server but then not loaded into the client (I have checked the data, they are close to identical when it starts, I save and quit and then reopen and the client side has low data while the server data is where it should be, having been saved) Kind Regards
-
It worked, thanks!
-
I have it ogg, which format should it be?
-
Hello, I try to play a sound when ablock is activated and nothing happens. I hear nothing and I get this errorcode Error in class 'LibraryLWJGLOpenAL' Sound buffer null in method 'loadSound' Error in class 'LibraryLWJGLOpenAL' Source '6234ecc8-b453-46d5-8d3f-e459ba6b4e45' was not created because an error occurred while loading aerosteam:sounds/activatetransaltituder.ogg Error in class 'LibraryLWJGLOpenAL' Source '6234ecc8-b453-46d5-8d3f-e459ba6b4e45' not found in method 'play' and in sounds.json I have { "activatetransaltituder": {"category": "master","sounds": [{"name": "activatetransaltituder","stream": false}]} } and the block code of relevans is if (playerX < x+addX+1 && playerX > x+addX-1 && playerZ < z+addZ+1 && playerZ > z+addZ-1){ System.out.println("Within"); player.setPositionAndUpdate(playerX, height +1 , playerZ); world.playSoundAtEntity(player, "aerosteam:activatetransaltituder", 1, 1); } I have checked it is located in my \forge\src\main\java\assets\aerosteam\sounds folder, what am I doing wrong?
-
Hiya! I am trying to make pipes contained within blanks which requires some minor modification of appearence depending on the source plank being used GameRegistry.addShapelessRecipe(new ItemStack(BlocksPipes.pipeBirchPlankStraight),new Object[]{Blocks.planks}); I am trying to use this but I know that planks different appearence depends on the metadata and I am not certain how to change the recipe depending on the input plank, I could change the thing so it acquires the metadata aswell and works the same way planks do, BUT I am not certain how to transfer the metadata there aswell, could I get some suggestions or direction that could make htis possible so I can move forward? I like trying things but now, I am stumped.
-
[Solved] [1.7.10] alpha transperency not working
EmperorZelos replied to EmperorZelos's topic in Modder Support
I have photoshop and it is transperent, but it doesn't show up as transparent. canRenderInPass(pass) should _not_ always return true -- you only want it to be able to render in pass 1 (not pass 0). Use this: @Override public boolean canRenderInPass(int pass) { return pass == 1; } This pisses me off, mostly that it was so simple =_= It worked, thank you! -
[Solved] [1.7.10] alpha transperency not working
EmperorZelos replied to EmperorZelos's topic in Modder Support
I have locked there acctually care to define what "IBSRH" is? But both of those functions are overriden and canRenderInPass = true constantly and getRenderBlockPass = 1 aswell which is what confuses me -
I am trying to render transparent gas but the blocks are either not transparent or fully tansparent, not inbetween like I want As you can see here, the block is not transparent but the item has the half transparency in it. package aerosteam.gases; import java.util.Random; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import aerosteam.AeroSteam; import aerosteam.blocks.BlocksAS; import aerosteam.proxy.ClientProxy; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.DamageSource; import net.minecraft.util.IIcon; import net.minecraft.util.Vec3; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.BlockFluidClassic; import net.minecraftforge.fluids.FluidStack; public class Gases extends Block { protected float density=100; protected float viscosity=1000; protected int tickRate=10; protected boolean stuck = false; protected boolean toxic = false; protected int toxLevel = 100; protected boolean lethal = false; protected boolean harm = false; protected boolean decay = true; protected boolean flammable = false; protected boolean burning = false; protected boolean source = false; protected boolean corrosive = false; protected String texture = "Gas"; protected int harmLevel = 1; protected int decayRate = 0; public Gases() { super(Material.iron); this.setCreativeTab(AeroSteam.aeroTab); System.out.println("gas added"); this.setTickRandomly(true); this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); } public Gases setDensity(float density) { this.density = density; if (this.density<0) this.density = 0; if (this.density>200) this.density = 200; return this; } public float getDensity() { return this.density; } public Gases setViscosity(float viscosity) { this.viscosity = viscosity; if (this.viscosity<100) this.viscosity = 100; if (this.viscosity>10000) this.viscosity = 10000; return this; } public Gases setTexture(String text) { this.texture = text; return this; } public float getViscosity() { return this.viscosity; } public Gases setToxicityLevel(int level) { this.toxLevel = level; if (this.toxLevel<1) this.toxLevel = 1; if (this.toxLevel>20) this.toxLevel = 20; return this; } public int getToxicLevel() { return this.toxLevel; } public Gases setHarmLevel(int level) { this.harmLevel = level; if (this.harmLevel<1) this.harmLevel = 1; if (this.harmLevel>20) this.harmLevel = 20; return this; } public int getHarmLevel() { return this.harmLevel; } public Gases setDecayRate(int rate) { this.decayRate = rate; if (this.decayRate<0) this.decayRate = 0; if (this.decayRate>10) this.decayRate = 10; return this; } public int getDecayRate() { return this.decayRate; } public Gases setToxic(boolean bool) { this.toxic = bool; return this; } public boolean getToxicity() { return this.toxic; } public Gases setDecay(boolean bool) { this.decay = bool; return this; } public boolean getDecay() { return this.decay; } public Gases setFlammable(boolean bool) { this.flammable = bool; return this; } public boolean getFlammable() { return this.flammable; } public Gases setLethal(boolean bool) { this.lethal = bool; return this; } public boolean getLethality() { return this.lethal; } public Gases setHarm(boolean bool) { this.harm = bool; return this; } public boolean getHarmfull() { return this.harm; } public Gases setBurn(boolean bool) { this.burning = bool; return this; } public boolean getBurn() { return this.burning; } @Override public boolean isFlammable(IBlockAccess world, int x, int y, int z, ForgeDirection face) { return true; } @Override public void onBlockAdded(World world, int x, int y, int z) { //world.setBlockMetadataWithNotify(x, y, z, RndInt(0,15), 2); world.scheduleBlockUpdate(x, y, z, this, (int) (this.viscosity/10)); } @Override public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entityplayer,ItemStack itemstack){ world.setBlockMetadataWithNotify(x, y, z, 15, 2); world.scheduleBlockUpdate(x, y, z, this, (int) (this.viscosity/10)); } public int RndInt(int min, int max){ Random generator = new Random(); int rnd = generator.nextInt(max-min+1) + min; return rnd; } //will react hwen player is in the block public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity) { //System.out.println("collide"); if(this.harm){ entity.attackEntityFrom(DamageSource.generic, this.harmLevel); } if(this.toxic){ if (entity instanceof EntityPlayer){ EntityPlayer player = (EntityPlayer) entity; if (this.lethal){ player.addPotionEffect(new PotionEffect(Potion.wither.getId(),this.getToxicLevel())); }else{ player.addPotionEffect(new PotionEffect(Potion.poison.getId(),this.getToxicLevel())); } }else{ entity.attackEntityFrom(DamageSource.wither, this.toxLevel); } } } //Makes block pass through public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int i, int j, int k) { return null; } //makes block impossible to hit public boolean canCollideCheck(int meta, boolean fullHit) { return fullHit && meta == 0; } @Override public void onNeighborBlockChange(World world, int x, int y, int z, Block block) { System.out.println("neighbour changed" + block.tickRate(world)); world.scheduleBlockUpdate(x, y, z, this, (int) (this.viscosity/10)); //this.stuck=world.getBlock(x, y+1, z) != Blocks.air; //block.updateTick(world, x, y, z, world.rand); } @Override public void updateTick(World world, int x, int y, int z, Random random) { System.out.println("update tick"); if (canMove(world,x,y,z)){ ForgeDirection dir = rndMove(); if (dirFree(world,x,y,z,dir)){ int meta = world.getBlockMetadata(x, y, z); int newmeta=meta-boolToInt(this.decay); //this.stuck=true; if(y < 250){ Block target = world.getBlock(x+dir.offsetX, y+dir.offsetY, z+dir.offsetZ); if (target == this){ int tmeta = world.getBlockMetadata(x+dir.offsetX, y+dir.offsetY, z+dir.offsetZ); int smeta = world.getBlockMetadata(x, y, z); if (smeta>(15-tmeta)) smeta=15-tmeta; int addmeta=RndInt(0,smeta); if (addmeta!=smeta){ world.setBlockMetadataWithNotify(x+dir.offsetX, y+dir.offsetY, z+dir.offsetZ, tmeta+addmeta, 2); world.setBlockMetadataWithNotify(x, y, z, smeta-addmeta, 2); world.scheduleBlockUpdate(x, y, z, this, (int) (this.viscosity/10)); world.scheduleBlockUpdate(x+dir.offsetX, y+dir.offsetY, z+dir.offsetZ, this, (int) (this.viscosity/10)); }else{ world.setBlockMetadataWithNotify(x+dir.offsetX, y+dir.offsetY, z+dir.offsetZ, tmeta+smeta, 2); world.setBlock(x, y, z, Blocks.air); world.scheduleBlockUpdate(x+dir.offsetX, y+dir.offsetY, z+dir.offsetZ, this, (int) (this.viscosity/10)); } }else if (target==Blocks.air){ Block source = world.getBlock(x, y, z); if (meta>1){ int halfmeta=meta/2+meta%2; System.out.println("meta: " + meta); System.out.println("halfmeta: " + halfmeta); world.setBlock(x+dir.offsetX, y+dir.offsetY, z+dir.offsetZ, source, halfmeta, 2); world.setBlockMetadataWithNotify(x, y, z, halfmeta, 2); world.scheduleBlockUpdate(x, y, z, this, (int) (this.viscosity/10)); }else{ if (meta==1){ world.setBlock(x+dir.offsetX, y+dir.offsetY, z+dir.offsetZ, source, 0, 2); world.setBlock(x, y, z, Blocks.air); }else{ if (RndInt(1,10)<=this.decayRate){ world.setBlock(x, y, z, Blocks.air); }else{ world.setBlock(x+dir.offsetX, y+dir.offsetY, z+dir.offsetZ, source, 0, 2); world.setBlock(x, y, z, Blocks.air); } } } } world.scheduleBlockUpdate(x, y, z, this, (int) (this.viscosity/10)); }else{ world.setBlock(x, y, z, Blocks.air); } }else world.scheduleBlockUpdate(x, y, z, this, (int) (this.viscosity)); } } //Can the block move in any direction? private boolean canMove(World world, int x, int y, int z){ for (ForgeDirection dir: ForgeDirection.VALID_DIRECTIONS){ Block check = world.getBlock(x+dir.offsetX, y+dir.offsetY, z+dir.offsetZ); if (check == Blocks.air){ return true; }else if (check==this){ int meta = world.getBlockMetadata(x+dir.offsetX, y+dir.offsetY, z+dir.offsetZ); if (meta < 15) return true; } } return false; } //Is the direction free to move into somehow? private boolean dirFree(World world, int x, int y, int z, ForgeDirection dir){ Block block = world.getBlock(x+dir.offsetX, y+dir.offsetY, z+dir.offsetZ); if (block==Blocks.air){ return true; }else if(block==this){ int meta = world.getBlockMetadata(x+dir.offsetX, y+dir.offsetY, z+dir.offsetZ); if (meta < 15) return true; } return false; } private int boolToInt(boolean bool){ return bool?1:0; } //generate random direction based on density private ForgeDirection rndMove(){ int rnd = RndInt(0,100); int relDens = (int) (this.density-100); int rndUp = 84+relDens*16/100; int rndDown = 16+relDens*83/100; if (rnd>rndUp){ return ForgeDirection.UP; }else if (rnd < rndDown){ return ForgeDirection.DOWN; }else{ return ForgeDirection.getOrientation(RndInt(2,5)); } } //Rendering stuff @Override public boolean renderAsNormalBlock() { return false; } @Override public boolean isOpaqueCube() { return false; } @Override public int getRenderType() { return ClientProxy.gasRenderType; } @Override public boolean canRenderInPass(int pass) { //Set the static var in the client proxy ClientProxy.renderPass = pass; //the block can render in both passes, so return true always return true; } @Override public boolean shouldSideBeRendered(IBlockAccess world, int x, int y, int z, int side) { Block block = world.getBlock(x, y, z); return block == Blocks.air; } @Override public int getRenderBlockPass() { return 1; } @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int metadata) { return this.blockIcon; } @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister icon) { this.blockIcon = icon.registerIcon(AeroSteam.MODID + ":" + this.texture); } private boolean isFlameSource(Block block){ if (block==BlocksAS.deviceTorch) return true; return false; } /* @Override public void velocityToAddToEntity(World world, int x, int y, int z, Entity entity, Vec3 vec) { if (densityDir > 0) return; Vec3 vec_flow = this.getFlowVector(world, x, y, z); vec.xCoord += vec_flow.xCoord * (quantaPerBlock * 4); vec.yCoord += vec_flow.yCoord * (quantaPerBlock * 4); vec.zCoord += vec_flow.zCoord * (quantaPerBlock * 4); }*/ } and block render code package aerosteam.gases; import aerosteam.proxy.ClientProxy; import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; import net.minecraft.block.Block; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.Tessellator; import net.minecraft.init.Blocks; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.BlockFluidBase; public class RenderBlockGases implements ISimpleBlockRenderingHandler{ public static RenderBlockGases instance = new RenderBlockGases(); @Override public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) { //System.out.println("Blockrender Reached"); if (!(block instanceof Gases)) { return false; } if(!shouldRender(world,x,y,z,block)){ return false; } Tessellator tessellator = Tessellator.instance; Gases gas = (Gases) block; int meta = world.getBlockMetadata(x, y, z)+1; float height = (meta / 16.0F); float density = gas.getDensity() ; float bottom = 0; float top = 1; if (density > 100F){ top = height; }else if (density < 100F){ bottom = 1-height; }else { //System.out.println("equal"); top=1-(1-height)/2; bottom=(1-height)/2; //System.out.println("top:"); //System.out.println("bottom:"); } top=1F; bottom=0F; block.setBlockBounds(0.0F, bottom, 0.0F, 1.0F, top, 1.0F); renderer.renderFaceYNeg(block, x, y, z, block.getIcon(0, 0)); renderer.renderStandardBlock(block, x, y, z); return true; } private boolean renderDir(IBlockAccess world,int x, int y, int z, Block block){ return !(block == world.getBlock(x, y, z)); } private boolean shouldRender(IBlockAccess world,int x, int y, int z, Block block){ for (ForgeDirection dir: ForgeDirection.VALID_DIRECTIONS){ Block check = world.getBlock(x+dir.offsetX, y+dir.offsetY, z+dir.offsetZ); int meta = world.getBlockMetadata(x+dir.offsetX, y+dir.offsetY, z+dir.offsetZ); if (check == Blocks.air || (check == block && meta < 15)) return true; } return false; } @Override public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) { // TODO Auto-generated method stub } @Override public boolean shouldRender3DInInventory(int modelId) { // TODO Auto-generated method stub return false; } @Override public int getRenderId() { return ClientProxy.gasRenderType; } } This is the code I have and public int getRenderBlockPass() { return 1; } I know this si supposed to be 1 if you want alpha, unless I am mistaken, where am I being an idiot?
-
[1.7.10]How do I make a block suck in entities?
EmperorZelos replied to roket333's topic in Modder Support
from my experience it is wise to avoid using sin/cos at all costs if possible as they are heavy on processing, you might wanna read up some on linear algebra to help you aswell -
[Solved!] [1.7.10] Player view distortion
EmperorZelos replied to EmperorZelos's topic in Modder Support
Added if clause to the colour part same as the one below -
[Solved!] [1.7.10] Player view distortion
EmperorZelos replied to EmperorZelos's topic in Modder Support
Nevermind Solved it! -
[Solved!] [1.7.10] Player view distortion
EmperorZelos replied to EmperorZelos's topic in Modder Support
I am getting this strange horizon effect now and this is my handler, not quite sure what is causing it otehr than obviously fog being the cause, how do I get rid of it while keeping it happen when they are inside the blocks? package aerosteam.handler; import aerosteam.AeroSteam; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraftforge.client.event.EntityViewRenderEvent.FogColors; import net.minecraftforge.client.event.EntityViewRenderEvent.FogDensity; import net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent; import cpw.mods.fml.common.eventhandler.EventPriority; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class VisualGasHandler { @SideOnly(Side.CLIENT) @SubscribeEvent(priority=EventPriority.NORMAL, receiveCanceled=true) public void onEvent(FogColors event) { //System.out.println("Fogged"); event.red = (float) 0.0F; event.blue = (float) 0.0F; event.green = (float) 0.0F; } @SideOnly(Side.CLIENT) @SubscribeEvent(priority=EventPriority.NORMAL, receiveCanceled=true) public void onEvent(FogDensity event) { //System.out.println("Fogged"); if (event.entity instanceof EntityPlayer){ int x = (int) event.entity.posX; int y = (int) event.entity.posY; int z = (int) event.entity.posZ; Block block = event.entity.worldObj.getBlock(x, y, z); //System.out.println("Is Player-" + x + "," + y + "," + z); if (block == AeroSteam.phlogium){ System.out.println("Inside Block"); event.density = (float) 0.3F; }else event.density = (float) 0.0F; }else event.density = (float) 0.0F; event.setCanceled(true); // must be canceled to affect the fog density } @SubscribeEvent(priority=EventPriority.HIGHEST, receiveCanceled=true) public void onEvent(LivingJumpEvent event) { // DEBUG if (event.entity instanceof EntityPlayer) { System.out.println("Boing"); } } } -
[Solved!] [1.7.10] Player view distortion
EmperorZelos replied to EmperorZelos's topic in Modder Support
Dear Lord That shit works! I gotta figure out how to detect the player in the gases but thank you! that was exacly what I wnated -
I am working on creating gases at which I want the players view to change when the player is inside the gas, just like hwen it is in water. I am currently searching through the fluid water stuff to get some ideas how to but I am currently at a loss, how would I change colours, distory the general rendering and such like in water and stuff?
-
oohh Not Java 8!
-
You mean this? http://www.minecraftforge.net/forum/index.php/topic,20.0.html What in it are you specificly aiming at?
-
I just found it and posted it sorry!
-
Hello, I am trying to load minecraft forge 1.7.10 and I have tried several versions, some which have worked on my computer before. But now when I press "Play" the launcher closes and....nothing happens, it just goes into nothingness, what could be causing this? I have reinstaleld both minecraft and forge. [14:17:07] [main/INFO] [FML/]: Forge Mod Loader version 7.10.25.1208 for Minecraft 1.7.10 loading [14:17:07] [main/INFO] [FML/]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_20, running on Windows 7:amd64:6.1, installed at C:\Program Files\Java\jre1.8.0_20 [14:17:07] [main/DEBUG] [FML/]: Java classpath at launch is C:\Users\Ägare\AppData\Roaming\.minecraft\libraries\net\minecraftforge\forge\1.7.10-10.13.0.1208\forge-1.7.10-10.13.0.1208.jar;C:\Users\Ägare\AppData\Roaming\.minecraft\libraries\net\minecraft\launchwrapper\1.9\launchwrapper-1.9.jar;C:\Users\Ägare\AppData\Roaming\.minecraft\libraries\org\ow2\asm\asm-all\4.1\asm-all-4.1.jar;C:\Users\Ägare\AppData\Roaming\.minecraft\libraries\com\typesafe\akka\akka-actor_2.11\2.3.3\akka-actor_2.11-2.3.3.jar;C:\Users\Ägare\AppData\Roaming\.minecraft\libraries\com\typesafe\config\1.2.1\config-1.2.1.jar;C:\Users\Ägare\AppData\Roaming\.minecraft\libraries\org\scala-lang\scala-actors-migration_2.11\1.1.0\scala-actors-migration_2.11-1.1.0.jar;C:\Users\Ägare\AppData\Roaming\.minecraft\libraries\org\scala-lang\scala-compiler\2.11.1\scala-compiler-2.11.1.jar;C:\Users\Ägare\AppData\Roaming\.minecraft\libraries\org\scala-lang\plugins\scala-continuations-library_2.11\1.0.2\scala-continuations-library_2.11-1.0.2.jar;C:\Users\Ägare\AppData\Roaming\.minecraft\libraries\org\scala-lang\plugins\scala-continuations-plugin_2.11.1\1.0.2\scala-continuations-plugin_2.11.1-1.0.2.jar;C:\Users\Ägare\AppData\Roaming\.minecraft\libraries\org\scala-lang\scala-library\2.11.1\scala-library-2.11.1.jar;C:\Users\Ägare\AppData\Roaming\.minecraft\libraries\org\scala-lang\scala-parser-combinators_2.11\1.0.1\scala-parser-combinators_2.11-1.0.1.jar;C:\Users\Ägare\AppData\Roaming\.minecraft\libraries\org\scala-lang\scala-reflect\2.11.1\scala-reflect-2.11.1.jar;C:\Users\Ägare\AppData\Roaming\.minecraft\libraries\org\scala-lang\scala-swing_2.11\1.0.1\scala-swing_2.11-1.0.1.jar;C:\Users\Ägare\AppData\Roaming\.minecraft\libraries\org\scala-lang\scala-xml_2.11\1.0.2\scala-xml_2.11-1.0.2.jar;C:\Users\Ägare\AppData\Roaming\.minecraft\libraries\net\sf\jopt-simple\jopt-simple\4.5\jopt-simple-4.5.jar;C:\Users\Ägare\AppData\Roaming\.minecraft\libraries\lzma\lzma\0.0.1\lzma-0.0.1.jar;C:\Users\Ägare\AppData\Roaming\.minecraft\libraries\com\mojang\realms\1.3.1\realms-1.3.1.jar;C:\Users\Ägare\AppData\Roaming\.minecraft\libraries\org\apache\commons\commons-compress\1.8.1\commons-compress-1.8.1.jar;C:\Users\Ägare\AppData\Roaming\.minecraft\libraries\org\apache\httpcomponents\httpclient\4.3.3\httpclient-4.3.3.jar;C:\Users\Ägare\AppData\Roaming\.minecraft\libraries\commons-logging\commons-logging\1.1.3\commons-logging-1.1.3.jar;C:\Users\Ägare\AppData\Roaming\.minecraft\libraries\org\apache\httpcomponents\httpcore\4.3.2\httpcore-4.3.2.jar;C:\Users\Ägare\AppData\Roaming\.minecraft\libraries\java3d\vecmath\1.3.1\vecmath-1.3.1.jar;C:\Users\Ägare\AppData\Roaming\.minecraft\libraries\net\sf\trove4j\trove4j\3.0.3\trove4j-3.0.3.jar;C:\Users\Ägare\AppData\Roaming\.minecraft\libraries\com\ibm\icu\icu4j-core-mojang\51.2\icu4j-core-mojang-51.2.jar;C:\Users\Ägare\AppData\Roaming\.minecraft\libraries\com\paulscode\codecjorbis\20101023\codecjorbis-20101023.jar;C:\Users\Ägare\AppData\Roaming\.minecraft\libraries\com\paulscode\codecwav\20101023\codecwav-20101023.jar;C:\Users\Ägare\AppData\Roaming\.minecraft\libraries\com\paulscode\libraryjavasound\20101123\libraryjavasound-20101123.jar;C:\Users\Ägare\AppData\Roaming\.minecraft\libraries\com\paulscode\librarylwjglopenal\20100824\librarylwjglopenal-20100824.jar;C:\Users\Ägare\AppData\Roaming\.minecraft\libraries\com\paulscode\soundsystem\20120107\soundsystem-20120107.jar;C:\Users\Ägare\AppData\Roaming\.minecraft\libraries\io\netty\netty-all\4.0.10.Final\netty-all-4.0.10.Final.jar;C:\Users\Ägare\AppData\Roaming\.minecraft\libraries\com\google\guava\guava\16.0\guava-16.0.jar;C:\Users\Ägare\AppData\Roaming\.minecraft\libraries\org\apache\commons\commons-lang3\3.2.1\commons-lang3-3.2.1.jar;C:\Users\Ägare\AppData\Roaming\.minecraft\libraries\commons-io\commons-io\2.4\commons-io-2.4.jar;C:\Users\Ägare\AppData\Roaming\.minecraft\libraries\commons-codec\commons-codec\1.9\commons-codec-1.9.jar;C:\Users\Ägare\AppData\Roaming\.minecraft\libraries\net\java\jinput\jinput\2.0.5\jinput-2.0.5.jar;C:\Users\Ägare\AppData\Roaming\.minecraft\libraries\net\java\jutils\jutils\1.0.0\jutils-1.0.0.jar;C:\Users\Ägare\AppData\Roaming\.minecraft\libraries\com\google\code\gson\gson\2.2.4\gson-2.2.4.jar;C:\Users\Ägare\AppData\Roaming\.minecraft\libraries\com\mojang\authlib\1.5.16\authlib-1.5.16.jar;C:\Users\Ägare\AppData\Roaming\.minecraft\libraries\org\apache\logging\log4j\log4j-api\2.0-beta9\log4j-api-2.0-beta9.jar;C:\Users\Ägare\AppData\Roaming\.minecraft\libraries\org\apache\logging\log4j\log4j-core\2.0-beta9\log4j-core-2.0-beta9.jar;C:\Users\Ägare\AppData\Roaming\.minecraft\libraries\org\lwjgl\lwjgl\lwjgl\2.9.1\lwjgl-2.9.1.jar;C:\Users\Ägare\AppData\Roaming\.minecraft\libraries\org\lwjgl\lwjgl\lwjgl_util\2.9.1\lwjgl_util-2.9.1.jar;C:\Users\Ägare\AppData\Roaming\.minecraft\libraries\tv\twitch\twitch\5.16\twitch-5.16.jar;C:\Users\Ägare\AppData\Roaming\.minecraft\versions\1.7.10-Forge10.13.0.1208\1.7.10-Forge10.13.0.1208.jar [14:17:07] [main/DEBUG] [FML/]: Java library path at launch is C:\Users\Ägare\AppData\Roaming\.minecraft\versions\1.7.10-Forge10.13.0.1208\1.7.10-Forge10.13.0.1208-natives-4445484264459 [14:17:07] [main/DEBUG] [FML/]: Enabling runtime deobfuscation [14:17:07] [main/DEBUG] [FML/]: Instantiating coremod class FMLCorePlugin [14:17:07] [main/DEBUG] [FML/]: Added access transformer class cpw.mods.fml.common.asm.transformers.AccessTransformer to enqueued access transformers [14:17:07] [main/DEBUG] [FML/]: Enqueued coremod FMLCorePlugin [14:17:07] [main/DEBUG] [FML/]: Instantiating coremod class FMLForgePlugin [14:17:07] [main/DEBUG] [FML/]: Added access transformer class net.minecraftforge.transformers.ForgeAccessTransformer to enqueued access transformers [14:17:07] [main/DEBUG] [FML/]: Enqueued coremod FMLForgePlugin [14:17:07] [main/DEBUG] [FML/]: All fundamental core mods are successfully located [14:17:07] [main/DEBUG] [FML/]: Discovering coremods [14:17:07] [main/INFO] [LaunchWrapper/]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [14:17:07] [main/INFO] [LaunchWrapper/]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker [14:17:07] [main/INFO] [LaunchWrapper/]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [14:17:07] [main/ERROR] [LaunchWrapper/]: Unable to launch java.util.ConcurrentModificationException at java.util.ArrayList$Itr.checkForComodification(Unknown Source) ~[?:1.8.0_20] at java.util.ArrayList$Itr.remove(Unknown Source) ~[?:1.8.0_20] at net.minecraft.launchwrapper.Launch.launch(Launch.java:117) [launchwrapper-1.9.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?] The error log
-
public class AnvilSlots extends SlotCrafting{ public AnvilSlots(EntityPlayer p_i1823_1_, IInventory p_i1823_2_, IInventory p_i1823_3_, int p_i1823_4_, int p_i1823_5_, int p_i1823_6_) { super(p_i1823_1_, p_i1823_2_, p_i1823_3_, p_i1823_4_, p_i1823_5_, p_i1823_6_); // TODO Auto-generated constructor stub } @Override public void onPickupFromSlot(EntityPlayer player, ItemStack p_82870_2_) { System.out.println("slot changed"); this.onSlotChanged(); } } I tried this and I get it to work to the extent it reacts whenever something happens to the slot in question, the crafting slot one where the result appears, works marveously. But....I am uncertain how to get it to act on the other slots. public ContainerAnvil(InventoryPlayer inventory,TileEntityAnvil tileentity, World world, int x, int y, int z){ this.anvil=tileentity; craftMatrix = new InventoryCrafting(this, 2,3); craftResult = new InventoryCraftResult(); worldObj=world; this.posX=x; this.posY=y; this.posZ=z; //Hammer slot this.addSlotToContainer(new Slot(tileentity,0,116,13)); for (int i = 0; i<2;i++){ for (int j = 0; j<3;j++){ this.addSlotToContainer(new Slot(craftMatrix,(i*3+j),21+18*j,33+18*i)); } } this.addSlotToContainer(new AnvilSlots(inventory.player, craftMatrix,craftResult, 1,136,42)); for(int i=0; i<3;i++){ for(int j=0; j<9;j++){ this.addSlotToContainer(new Slot(inventory,j+i*9+9,7+18*j+1,83+18*i+1 )); } } for(int i=0;i<9;i++){ this.addSlotToContainer(new Slot(inventory,i,8+18*i,142)); } onCraftMatrixChanged(craftMatrix); } public void onCraftMatrixChanged(IInventory inventory){ //System.out.println("Craft Change"); Slot slot = (Slot)this.inventorySlots.get(0); if (slot != null && slot.getHasStack()){ Item item = slot.getStack().getItem(); if (slot.getStack().getItem() != null){ if (slot.getStack().getItem() == ItemsAS.hammerBronze){ //System.out.println("has hammer"); craftResult.setInventorySlotContents(7, AnvilSmithManager.getInstance().findMatchingRecipe(craftMatrix,worldObj)); } } } //System.out.println("Done matching"); } The part I have changed is the one where the result is shown, perhaps I need to change all of them? Either how this is a great leap forward for me, what I want it to affect when the slot changes is slot 0 that is first generated, how would I access it from the slothchanged function?