
EmperorZelos
Members-
Posts
148 -
Joined
-
Last visited
Everything posted by EmperorZelos
-
but it doesn't seem to always occure, why would it give me both of htem? Shouldn't both be the server version really?
-
Hello, I have done some work and when I try to bug check my stuff, even though it only has 1 of the tile entities in the world it seems to give me 2 outputs, is there anything that could cause more htan 1 tile entity to spawn or is it just an illussion by system printout?
-
I tried renaming it all "activatetransaltituder" and still same message
-
I am trying to play a sound at an event, My sounds.json file is in the assets folder nad looks like { "activate-TA": {"category": "master","sounds": [{"name": "activate-TA","stream": false}]} } activate-TA.ogg is the sound file in the assets/sounds folder and I have in my block java file world.playSoundAtEntity(player, "aerosteam:activate-TA", 1, 1); and what I get back from it is with no sound being played, where am I being stupid?
-
player.setPositionAndUpdate(x, y, z);
-
THANK! YOU! that solved it....why did the others fail?
-
I am trying to create a thing that verticly moves a player up to another platform that's above it, I have managed to get it to detect if there is a platform and get there and everything public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ){ if (!world.isRemote){ if (player.getHeldItem() != null){ if (player.getHeldItem().getItem() == AeroSteam.toolWrench){ int meta = world.getBlockMetadata(x, y, z); if (meta > 4){ int height = findHeight(world, x, y, z); if (isValid(world,x,y,z,meta,height)){ System.out.println("is valid with height "+ height + " by " + player.getCommandSenderName()); player.setPosition(x, height+20, z); player.setLocationAndAngles(x+0.5F, y+20, z+0.5F, player.rotationYaw, player.rotationPitch); player.setPositionAndRotation2(x, height+20, z, player.rotationYaw, player.rotationPitch, 1); } } System.out.println("Meta is " + meta); } } } return true; } The issue is that it won't move the player, I have tried all 3 methods of moving a player and have I tried on an item with success of movign the player, but here for some reason it does not move the player, me, when I activate it, i get all the messages from within the inner most if clause but no player moving. That is I do get the ""is valid with height "+ height + " by " + player.getCommandSenderName()" message popping up which is what confuse me as it reaches where I want it to but no movement
-
[1.7.10] Compiling the mod but no textures
EmperorZelos replied to EmperorZelos's topic in Modder Support
Now it worked! Thanks! -
http://www.wuppy29.com/minecraft/modding-tutorials/wuppys-minecraft-forge-modding-tutorials-for-1-7-releasing-your-mod-standard-setup/#comment-12070 Following this guide I have managed to compile my mod for people to try, except there are no textures, no images, nothing gets with it, all the functions within the mod works though but not the textures, GUIs etc. I figure the placement of the textures is wrong somehow but I have no clue WHERE they go for gradlew to find them properly. Kind Regards
-
[Solved] [1.7.10] Changing block size when game loads
EmperorZelos replied to EmperorZelos's topic in Modder Support
Nvm I have solved it -
[Solved] [1.7.10] Changing block size when game loads
EmperorZelos replied to EmperorZelos's topic in Modder Support
I didn't ignore it but merely looked for what I wanted which after further testing has shown to be even worse of a situation, I will use tile entity for the steam stuff but for now I wish to resolve this issue, I realised after placing down another pipe in a different direction all the previously placed ones changes aswell in their block size (but not pointing direction) package aerosteam.steam; import cpw.mods.fml.common.network.internal.FMLNetworkHandler; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import aerosteam.AeroSteam; import aerosteam.tileentitty.TileEntityBoiler; import aerosteam.tileentitty.TileEntitySteamPipeStraight; import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.ITileEntityProvider; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ChatComponentText; import net.minecraft.util.IChatComponent; import net.minecraft.util.MathHelper; import net.minecraft.world.World; public class DeviceSteamPipe extends BlockContainer implements ITileEntityProvider{ public DeviceSteamPipe(int connection) { super(Material.iron); this.setHardness(2.0F); this.setResistance(5.0F); this.setCreativeTab(AeroSteam.aeroTab); } public void onBlockAdded(World world, int x, int y, int z) { super.onBlockAdded(world, x, y, z); this.setDefaultOrientation(world, x, y, z); System.out.println("MetaAdded:" + world.getBlockMetadata(x, y, z)); } //TO DO // Gotta fix so the orientation of the block size remains changed public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entityplayer,ItemStack itemstack){ int l = MathHelper.floor_double((double)(entityplayer.rotationYaw * 4.0F/360.F)+0.5D) & 3 ; int t = MathHelper.floor_double((double)(entityplayer.rotationPitch * 4.0F/360.F)+0.5D) & 3; // TileEntitySteamPipeStraight tile = (TileEntitySteamPipeStraight) world.getTileEntity(x, y, z); if (t==0){ if (l==1 || l==3){ tile.orientation=1; world.setBlockMetadataWithNotify(x, y, z, 1, 2); this.setBlockBounds(0.0F, 0.34375F, 0.34375F, 1F, 0.65625F, 0.65625F); }else if(l==0 || l==2){ tile.orientation=3; world.setBlockMetadataWithNotify(x, y, z, 3, 2); this.setBlockBounds(0.34375F, 0.34375F, 0.0F, 0.65625F, 0.65625F, 1F); } }else{ tile.orientation=2; world.setBlockMetadataWithNotify(x, y, z, 2, 2); this.setBlockBounds(0.34375F, 0.0F, 0.34375F, 0.65625F, 1F, 0.65625F); } } private void setDefaultOrientation(World world, int x, int y, int z){ if(!world.isRemote){ }; } public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ){ if (!world.isRemote){ TileEntitySteamPipeStraight tile = (TileEntitySteamPipeStraight) world.getTileEntity(x, y, z); player.addChatMessage(new ChatComponentText("Metadata:" + tile.orientation)); } return true; } public int getRenderType(){ return -1; } public boolean isOpaqueCube(){ return false; } public boolean renderAsNormalBlock(){ return false; } @Override public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { return new TileEntitySteamPipeStraight(); } @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister iconregister){ this.blockIcon = iconregister.registerIcon(AeroSteam.MODID + ":" + "SteamPipeStraight"); } } -
[Solved] [1.7.10] Changing block size when game loads
EmperorZelos replied to EmperorZelos's topic in Modder Support
Yes it is the block size, when it reloads the block size is as any ordinary block which looks ugly consideirng it is smaller than an ordinary block, I wish the size to be there hwich I can derive from the metadata with ease, what I really want to is to know if there is something that loads the moment the block is loaded into the world upon loading the chunk, if that can be found the rest is piece of cake. -
Hello, I am working on pipes, I have managed to get the game to utilize the metadata thing to point in a certain direction and even when placed the block size of when I look at them/select changes, but only when placed. When I quit the game and then come back it is the size of a normal sized block but it points in the right direction. I am pretty certain I can get it to work myself if I knew if there was a command that initiated the moment the block was summoned by the game, is there such a command or void I can utilize?
-
Alright I got it working, thank you!
-
I am not too familiar with what to replace to make it 1.7 compatible, what needs to be replaced exacly?
-
No, that is the issue, I place it there to see IF there is an error...it never happens. Where exacly? Here is my code for the block class itself with the stuff, I still get nothing, even with the division by zero it never crashes telling me it doesn't even REACH those parts. package aerosteam.devices; import cpw.mods.fml.common.network.internal.FMLNetworkHandler; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import aerosteam.AeroSteam; import aerosteam.tileentitty.TileEntityBoiler; import aerosteam.tileentitty.TileEntitySteamPipe; import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.ITileEntityProvider; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ChatComponentText; import net.minecraft.util.IChatComponent; import net.minecraft.util.MathHelper; import net.minecraft.world.World; public class DeviceSteamPipe extends BlockContainer implements ITileEntityProvider{ public DeviceSteamPipe(int connection) { super(Material.iron); this.setHardness(2.0F); this.setResistance(5.0F); this.setCreativeTab(AeroSteam.aeroTab); } public void onBlockAdded(World world, int x, int y, int z) { super.onBlockAdded(world, x, y, z); this.setDefaultOrientation(world, x, y, z); } public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entityplayer,ItemStack itemstack){ int l = MathHelper.floor_double((double)(entityplayer.rotationYaw * 4.0F/360.F)+0.5D) & 3 ; int t = MathHelper.floor_double((double)(entityplayer.rotationPitch * 4.0F/360.F)+0.5D) & 3; // TileEntitySteamPipe tile = (TileEntitySteamPipe) world.getTileEntity(x, y, z); if (t==0){ if (l==1 || l==3){ tile.orientation=1; }else if(l==0 || l==2){ tile.orientation=3; } }else{ tile.orientation=2; } } private void setDefaultOrientation(World world, int x, int y, int z){ if(!world.isRemote){ }; } public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ){ if (!world.isRemote){ TileEntitySteamPipe tile = (TileEntitySteamPipe) world.getTileEntity(x, y, z); player.addChatMessage(new ChatComponentText("Metadata:" + tile.orientation)); } return true; } public int getRenderType(){ return -1; } public boolean isOpaqueCube(){ return false; } public boolean renderAsNormalBlock(){ return false; } @Override public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { return new TileEntitySteamPipe(); } @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister iconregister){ this.blockIcon = iconregister.registerIcon(AeroSteam.MODID + ":" + "SteamPipeStraight"); } }
-
I am trying to store the orientation of a certain object, I have gotten it being able to store individual orientations and have them point in various directions but when I try to save it for next time it never happens, this is the code that I have used which works in other blocks I have (it currently does nothing), why does it not work? package aerosteam.tileentitty; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; public class TileEntitySteamPipe extends TileEntity { public int orientation; public TileEntitySteamPipe(){ } public void readFromNBT(NBTTagCompound nbt){ super.readFromNBT(nbt); this.orientation=(int)nbt.getShort("Orientation"); int q=1/0; } public void writeToNBT(NBTTagCompound nbt){ super.writeToNBT(nbt); int q=1/0; nbt.setShort("Orientation",(short)this.orientation); } }
-
Most of the things were not wisenose so no worries I am not interested in the waterbucket persay only that you right click WITH a waterbucket on my block, which is a boiler, and water gets added to it. This is a wee bti wisenosey but I have looked about at fluids and such to the best of my ability which might not contain ALL the possibilities, I am looking into the bucket more Looking around some it seems possible to use the bucket stuff but I am not too certain how to expand it I must have been unclear and I apologise, the idea is that I got a bucket of water, rightclick on my boiler and in goes the water with a bucket replacing it.
-
I am working on my own little simple mod, well simple for now. I have programming experience but not minecraft in great quantities. I am attempting to create a block that is supposed to be fillable with water and I want it to be so that I right click on the block with a water bucket and it fills up (if there is room availiable). My issue is that I feel there oughta be some command within the minecraft code that deals with filling with fluid, I have tried looking through forge but to no avail, I might have simply missed it or am just stupid. What would the command be? Is there one? If not suggestions how to implement it simply?