-
Posts
852 -
Joined
-
Last visited
Everything posted by Bektor
-
Ok, this will not work, too. The download is still stopping after some time... (http://proxylist.hidemyass.com/search-1362942#listable from there I got the proxy's with that I tested it)
-
My problem is that I can't find a option to enable proxy things, I can only find it in the Windows global internet settings under LAN-Settings...
-
Well, but I can't find there the same options as for LAN, I can't find there the options with the proxy thing.
-
Ok, I found a few tutorials, but they are not working for me, because they are for LAN and I have WLAN.
-
Ok, but how can I use a proxy that the gradlew.bat file can download all needed files from the files.minecraftforge.net servers without getting a timeout? EDIT: By downloading the forge src with help from free-proxyserver.com the download is working and really fast, click and finished Now I need only to know how to do this with the things that the gradlwe.bat needs to download or if I need to download them manually where I need then to put this files that the gradlew.bat finds them and can work with them.
-
Ok, I asked my ISP and well, they are saying they fixed the problem, but its still unfixed, so after the fourth try to get them on fixing the issue I gave up. So is there a way to download the files manually, that I can pause the download and then resume it, because thats the only way that is working for me and I want not to wait 2 month to hope that the new provider I have in 2 month is better then the old one.
-
Ok, figured it out: seems to be that I'm getting from Germany to the Servers of files.minecraftforge.net a read time out exception on 3 unknown points... (So my route trace isn't full) Any idea how to fix it?
-
Anyone?
-
Hm, thats interisting: The pic in English (only in my opinion important parts of the pic): And my internet connection: http://www.speedtest.net/my-result/3893398563 Here the speed test of the files.minecraftforge.net website: And @Th3Br1x the problem is not from Telekom Germany because I'm by Versanet (Germany) and I have the same problem. (and versanet itself wasn't able to find a problem in my connection) Any idea?
-
The picture in the error is exact the same error I got the first time where I tried it. (Currently it won't give the error, the task manager says nothing is happening with the network, but gradle won't give me the error anymore, it tries to download it for over 5 hours with no progress change ) So anyone who can help here? EDIT: Ok, I tried now to restart the Router/FritzBox, didn't help and I tried it now again with different browers: Firefox: Download failed (DE: Download fehlgeschlagen) Google Chrome: Unknown Network Error (DE: Unbekannter Netzwerkfehler) Internet Explorer: Over 10 hours remaining with 0% progress after 1 hour (DE: über 10 Stunden verbleiben mit 0% Fortschritt nach 1 Stunde) So anyone who can help?
-
I know how to use adfly! You need to wait 5 seconds and then click on the Skip button. And the direct links won't work, too. Same problem: Download failed.
-
Hello. I have a big problem: Since about 3 weeks now, I'm not able to download forge. So to describe it a bit better, I tried to download the latest Forge 1.5.2 version, the latest 1.6.4 version, the latest 1.7.2 version and the latest 1.7.10 version. Nothing will work. I tried to download the installer for playing with mods in Minecraft and the src to create forge mods, but nothing is working. I tried to run the gradlew.bat from that files I have downloaded before the problem appeared, but there nothing is happening, after about 30 minutes only around 11Kb's where downloaded and after 5 hours it's still saying the same. I tried to download the files with and without an anti-virus tool, I tried it on a different Pc...Not working. Oh and I asked my internet provider if its a problem with them, but they can't find a problem. I tried it the download in Firefox, Google Chrome and Internet Explorer (without addons). And now I'm out of ideas and my friends are out of ideas, too. But for some reason my friends are able to download it, but I'm not. Here an example of what happens with forge 1.7.10: And here my internet connection: http://www.speedtest.net/my-result/3884028504 The download is starting and after around 30 minutes its failing and if I'm setting up the gradle workspace then its stopping after around 30 minutes and doing nothing then.... And in that 30 minutes its downloading around 15KB's... I hope someone can help me, I want to download Forge!!!!! Bektor
-
[1.7.10] [UNSOLVED] Particle not spawning or need rightclick to spawn them
Bektor replied to Bektor's topic in Modder Support
Ok, I changed it a bit, the output of every three values is still false: TileEntity /** The number of ticks that the camp fire will keep burning */ public int burnTime; /** The number of ticks that a fresh copy of the currently-burning item would keep the camp fire burning for */ public int currentItemBurnTime; /** The number of ticks that the current item has been cooking for */ public int cookTime; /** Can the campfire burn or not */ public boolean canBurn; @Override public void writeToNBT(NBTTagCompound nbtTagCompound) { super.writeToNBT(nbtTagCompound); nbtTagCompound.setBoolean("isBurning", (boolean)this.canBurn); nbtTagCompound.setShort("BurnTime", (short)this.burnTime); nbtTagCompound.setShort("CookTime", (short)this.cookTime); nbtTagCompound.setShort("CurrentBurnTime", (short)this.currentItemBurnTime); NBTTagList list = new NBTTagList(); for(int i = 0; i < this.slots.length; i++) if(this.slots[i] != null) { NBTTagCompound compound = new NBTTagCompound(); compound.setByte("Slot", (byte)i); this.slots[i].writeToNBT(compound); list.appendTag(compound); } nbtTagCompound.setTag("Items", list); if(this.hasCustomInventoryName()) nbtTagCompound.setString("CustomName", this.localizedName); } @Override public void readFromNBT(NBTTagCompound nbtTagCompound) { super.readFromNBT(nbtTagCompound); NBTTagList list = nbtTagCompound.getTagList("Items", 10); this.slots = new ItemStack[this.getSizeInventory()]; for(int i = 0; i < list.tagCount(); i++) { NBTTagCompound compound = list.getCompoundTagAt(i); byte b = compound.getByte("Slot"); if(b >= 0 && b < this.slots.length) this.slots[b] = ItemStack.loadItemStackFromNBT(compound); } setBurning(nbtTagCompound.getBoolean("isBurning")); this.burnTime = nbtTagCompound.getShort("BurnTime"); this.cookTime = nbtTagCompound.getShort("CookTime"); this.currentItemBurnTime = nbtTagCompound.getShort("CurrentBurnTime"); if(nbtTagCompound.hasKey("CustomName", ) this.localizedName = nbtTagCompound.getString("CustomName"); } /** * Do not make give this method the name canInteractWith because it clashes with Container * * Can the inventory of this block be used by a player? */ @Override public boolean isUseableByPlayer(EntityPlayer player) { if(this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord) == this) if(player.getDistanceSq((double) this.xCoord + 0.5D, (double) this.yCoord + 0.5D, (double) this.zCoord + 0.5D) <= 14.0D) if(player.getCurrentEquippedItem() == null || !player.getCurrentEquippedItem().getItem().equals(Items.flint_and_steel)) return true; return false; //return this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : (player.getDistanceSq((double) this.xCoord + 0.5D, (double) this.yCoord + 0.5D, (double) this.zCoord + 0.5D) <= 14.0D && player.getCurrentEquippedItem().getItem() != Items.flint_and_steel); } @Override public void openInventory() { } @Override public void closeInventory() { } /** * Camp Fire isBurning */ public boolean isBurning() { return this.burnTime > 0; } /** * Can the camp fire burn * * @Par am world The World the camp fire is in * @Par am x The xCoord of the camp fire * @Par am y The yCoord of the camp fire * @Par am z The zCoord of the camp fire * @Par am lastArgNeeded needs the camp fire to be activated with a 'flint and steel' item of not * * @return true if the camp fire can burn, false if not */ public boolean canBurn(World world, int x, int y, int z, boolean lastArgNeeded) { if(!(world.isRaining() || world.isThundering())) // TODO: && world.getBiomeGenForCoords(x, y) != BiomeGenBase.desert { if(!world.canBlockSeeTheSky(x, y, z)) { if(lastArgNeeded) return canBurn; else return true; } else return false; } else if(lastArgNeeded) return canBurn; else return true; } @Override public void updateEntity() { boolean flag = false; if(this.isBurning() && canBurn(worldObj, xCoord, yCoord, zCoord, true)) this.burnTime--; if(!this.worldObj.isRemote) { if(this.burnTime != 0 || this.slots[1] != null && canBurn(worldObj, xCoord, yCoord, zCoord, false)) { if(this.burnTime == 0) { this.currentItemBurnTime = this.burnTime = getItemBurnTime(this.slots[1]); if(this.isBurning()) { flag = true; if(this.slots[1] != null) this.slots[1].stackSize--; if(this.slots[1].stackSize == 0) this.slots[1] = this.slots[1].getItem().getContainerItem(this.slots[1]); } } if(this.isBurning() && this.canSmelt()) { this.cookTime++; if(this.cookTime == this.campFireSpeed) { this.cookTime = 0; this.smeltItem(); flag = true; } } else this.cookTime = 0; } } if(flag) this.markDirty(); } Block /** * Ticks the block if it's been scheduled */ public void updateTick(World world, int x, int y, int z, Random random) { if(world.isRemote) return; TileEntityCampFire tileentityCampfire = (TileEntityCampFire)world.getTileEntity(x, y, z); if(tileentityCampfire != null) { if(tileentityCampfire.canBurn(world, x, y, z, false)) if(world.isRaining() || world.isThundering()) if(world.canBlockSeeTheSky(x, y, z)) tileentityCampfire.setBurning(false); } } /** * Called upon block activation (right click on the block.) */ @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float px, float py, float pz) { TileEntityCampFire tileentityCampfire = (TileEntityCampFire)world.getTileEntity(x, y, z); if(tileentityCampfire != null) { if(world.isRemote) return false; if(!player.isSneaking()) if(player.getCurrentEquippedItem() != null && player.getCurrentEquippedItem().getItem() == Items.flint_and_steel) if(!world.isRaining() && !world.isThundering() && tileentityCampfire.slots[1] != null) tileentityCampfire.setBurning(true); player.openGui(PrimevalForest.instance, 1, world, x, y, z); return true; } return false; } /** * Spawns flame particle over the camp fire */ @Override @Side Only(Side.CLIENT) public void randomDisplayTick(World world, int x, int y, int z, Random random) { TileEntityCampFire tileentityCampfire = (TileEntityCampFire) world.getTileEntity(x, y, z); System.out.println("Tile:" + tileentityCampfire); if(tileentityCampfire != null) { System.out.println("BurnTime:" + tileentityCampfire.isBurning()); System.out.println("Weatherstuff: " + tileentityCampfire.canBurn(world, x, y, z, false)); System.out.println("Boolean: " + tileentityCampfire.canBurn); if(tileentityCampfire.isBurning() && tileentityCampfire.canBurn(world, x, y, z, true)) { for(int i = 0; i < 3; i++) { float motionY = (random.nextFloat() / 40F) + 0.025F; double particleX = ((x + 0.5F) - 0.15F) + (random.nextInt(30) / 100F); double particleY = y + 0.1F + (random.nextInt(15) / 100F); double particleZ = ((z + 0.5F) - 0.15F) + (random.nextInt(30) / 100F); PrimevalForest.proxy.spawnFlame(world, particleX, particleY, particleZ, 0.0F, motionY, 0.0F, 16); world.spawnParticle("smoke", particleX, particleY, particleZ, 0.0D, 0.05D, 0.0D); } } } } And for some reason you can break one burning campfire and the next campfire you place is burning after you put wood in it, no need to activate it, like it should be... So I tried it now for so long and posted in different forum and so on, if its now getting not be fixed I will remove it! -
Hm, then I have no idea whats wrong, every other site is working and my speed test is like every other day, too: http://www.speedtest.net/my-result/3844024872 EDIT: I tested it now again and disabled the Anti-Virus tool for testing -> same results. Download is failing...
-
[1.7.10] [UNSOLVED] Particle not spawning or need rightclick to spawn them
Bektor replied to Bektor's topic in Modder Support
Ok, I found out why its returning false, but after I changed it its still returning false.... :'( public boolean burning(World world, int x, int y, int z, boolean lastArgNeeded) { if(world.isRaining() || world.isThundering()) { if(!world.canBlockSeeTheSky(x, y, z)) { if(lastArgNeeded) return burning; else return true; } else return false; } else if(lastArgNeeded) return burning; else return true; } So if its raining and the block can't see the sky its returning burning or true. If the block can see the sky its returning false. If its not raining its returing burning or true. So why is it returning false.... And why can the block burn without a rightclick. If one block was burning I need only to break it while its burning and place a new one. There I need then only to put log or wood into it and it starts burning, but thats wrong, it should only burn if there is fuel (log or wood) in it and if I did a right click on it. Please help! -
[1.7.10] [UNSOLVED] Particle not spawning or need rightclick to spawn them
Bektor replied to Bektor's topic in Modder Support
Ok. Here is the output: public void randomDisplayTick(World world, int x, int y, int z, Random random) { TileEntityCampFire tileentityCampfire = (TileEntityCampFire) world.getTileEntity(x, y, z); System.out.println("Tile:" + tileentityCampfire); if(tileentityCampfire != null) { System.out.println("BurnTime:" + tileentityCampfire.isBurning()); System.out.println("Wheaterstuff: " + tileentityCampfire.burning(world, x, y, z, true)); System.out.println("Boolean: " + tileentityCampfire.burning); if(tileentityCampfire.isBurning() && tileentityCampfire.burning(world, x, y, z, true)) { But I have no idea why the last two values are false. Its not raining and the campfire is burning (if its not burning: tileentityCampfire.burning = false) And I opened the GUI, its burning... -
I tried to download the latest 1.7.10 build (src) and I tried it with an 1.5.2 src build (because a friend is in a modding team and had problems to setup 1.5.2). Last week everything was ok, but since a few days I have this problems and since today the site http://files.minecraftforge.net/ is loading really slow (and the rest of the forum as fast as ever).
-
Hello, I created a Campfire, that should ony spawn particles when its burning (because its a bit like a furnace), but it will not spawn them after I re-wrote some stuff. Before I re-wrote it, there where particles but after some time they disappeared and then I must open the GUI of the Campfire that the particles are coming back... But now the particles disappeared forever! BlockPFCampFire.java /** * Spawns flame particle over the camp fire */ @Override @SideOnly(Side.CLIENT) public void randomDisplayTick(World world, int x, int y, int z, Random random) { TileEntityCampFire tileentityCampfire = (TileEntityCampFire) world.getTileEntity(x, y, z); if(tileentityCampfire != null) { if(tileentityCampfire.isBurning() && tileentityCampfire.burning(world, x, y, z, true)) { for(int i = 0; i < 3; i++) { float motionY = (random.nextFloat() / 40F) + 0.025F; double particleX = ((x + 0.5F) - 0.15F) + (random.nextInt(30) / 100F); double particleY = y + 0.1F + (random.nextInt(15) / 100F); double particleZ = ((z + 0.5F) - 0.15F) + (random.nextInt(30) / 100F); PrimevalForest.proxy.spawnFlame(world, particleX, particleY, particleZ, 0.0F, motionY, 0.0F, 16); world.spawnParticle("smoke", particleX, particleY, particleZ, 0.0D, 0.05D, 0.0D); } } } } /** * Ticks the block if it's been scheduled */ public void updateTick(World world, int x, int y, int z, Random random) { if(world.isRemote) return; TileEntityCampFire tileentityCampfire = (TileEntityCampFire)world.getTileEntity(x, y, z); if(tileentityCampfire != null) { if(tileentityCampfire.burning(world, x, y, z, false)) if(world.isRaining() || world.isThundering()) if(world.canBlockSeeTheSky(x, y, z)) tileentityCampfire.setBurning(false); } } /** * Called upon block activation (right click on the block.) */ @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float px, float py, float pz) { TileEntityCampFire tileentityCampfire = (TileEntityCampFire)world.getTileEntity(x, y, z); if(tileentityCampfire != null) { if(world.isRemote) return false; if(!player.isSneaking()) if(player.getCurrentEquippedItem() != null && player.getCurrentEquippedItem().getItem() == Items.flint_and_steel) if(!world.isRaining() && !world.isThundering() && tileentityCampfire.slots[1] != null) tileentityCampfire.setBurning(true); player.openGui(PrimevalForest.instance, 1, world, x, y, z); return true; } return false; } TileEntityCampFire.java /** Can the campfire burn or not */ public boolean burning; @Override public void writeToNBT(NBTTagCompound nbtTagCompound) { super.writeToNBT(nbtTagCompound); nbtTagCompound.setBoolean("isBurning", (boolean)this.burning); nbtTagCompound.setShort("BurnTime", (short)this.burnTime); nbtTagCompound.setShort("CookTime", (short)this.cookTime); nbtTagCompound.setShort("CurrentBurnTime", (short)this.currentItemBurnTime); NBTTagList list = new NBTTagList(); for(int i = 0; i < this.slots.length; i++) if(this.slots[i] != null) { NBTTagCompound compound = new NBTTagCompound(); compound.setByte("Slot", (byte)i); this.slots[i].writeToNBT(compound); list.appendTag(compound); } nbtTagCompound.setTag("Items", list); if(this.hasCustomInventoryName()) nbtTagCompound.setString("CustomName", this.localizedName); } @Override public void readFromNBT(NBTTagCompound nbtTagCompound) { super.readFromNBT(nbtTagCompound); NBTTagList list = nbtTagCompound.getTagList("Items", 10); this.slots = new ItemStack[this.getSizeInventory()]; for(int i = 0; i < list.tagCount(); i++) { NBTTagCompound compound = list.getCompoundTagAt(i); byte b = compound.getByte("Slot"); if(b >= 0 && b < this.slots.length) this.slots[b] = ItemStack.loadItemStackFromNBT(compound); } setBurning(nbtTagCompound.getBoolean("isBurning")); this.burnTime = nbtTagCompound.getShort("BurnTime"); this.cookTime = nbtTagCompound.getShort("CookTime"); this.currentItemBurnTime = nbtTagCompound.getShort("CurrentBurnTime"); if(nbtTagCompound.hasKey("CustomName", ) this.localizedName = nbtTagCompound.getString("CustomName"); } /** * Camp Fire isBurning */ public boolean isBurning() { return this.burnTime > 0; } public boolean burning(World world, int x, int y, int z, boolean lastArgNeeded) { return !(world.isRaining() || world.isThundering()) || !world.canBlockSeeTheSky(x, y, z) && lastArgNeeded ? burning : true; } @Override public void updateEntity() { boolean flag = false; if(this.isBurning() && burning(worldObj, xCoord, yCoord, zCoord, true)) this.burnTime--; if(!this.worldObj.isRemote) { if(this.burnTime != 0 || this.slots[1] != null && burning(worldObj, xCoord, yCoord, zCoord, false)) { if(this.burnTime == 0) { this.currentItemBurnTime = this.burnTime = getItemBurnTime(this.slots[1]); if(this.isBurning()) { flag = true; if(this.slots[1] != null) this.slots[1].stackSize--; if(this.slots[1].stackSize == 0) this.slots[1] = this.slots[1].getItem().getContainerItem(this.slots[1]); } } if(this.isBurning() && this.canSmelt()) { this.cookTime++; if(this.cookTime == this.campFireSpeed) { this.cookTime = 0; this.smeltItem(); flag = true; } } else this.cookTime = 0; } } if(flag) this.markDirty(); } I hope someone can help me with this. Bektor EDIT: This is not the complete code, but every single line that is using the methods I used for the particle spawn to check if it should spawn or not.
-
Thanks. I changed everything to non-static and forgot the boolean itself...
-
Hello, I tried to update my Forge src but Gradle wasn't able to download it and then I tried it manually. It said that the download will take 4 hours, but after 1 minute it failed, then I tried it again, there it said it would take 7h and failed again. So the problem could be my internet connection, but I have a 6k internet connection and every other downloads are working, I can look videos, do other stuff while its downloading without any problems. If I'm only downloading it and don't make any other things in the internet at the same time -> no difference. Sometimes I have luck and its working after the third try... I hope someone can help me with this, because I want not to ask everytime my friends if they can send me the files with skype. Bektor
-
Well, I didn't post the complete code. Why should I post methods that are not using the lines of code from that the problem is coming. Didn't fix the issue and I found a new one: If you create a new world then every campfire that you are placing is burning and after some time it stops burning. If you put then fuel into it, every placed Campfire will start burning! TileEntityCampFire /** Can the campfire burn or not */ public static boolean burning; @Override public void writeToNBT(NBTTagCompound nbtTagCompound) { super.writeToNBT(nbtTagCompound); nbtTagCompound.setBoolean("isBurning", (boolean)burning); nbtTagCompound.setShort("BurnTime", (short)TileEntityCampFire.burnTime); nbtTagCompound.setShort("CookTime", (short)this.cookTime); nbtTagCompound.setShort("CurrentBurnTime", (short)this.currentItemBurnTime); NBTTagList list = new NBTTagList(); for(int i = 0; i < this.slots.length; i++) if(this.slots[i] != null) { NBTTagCompound compound = new NBTTagCompound(); compound.setByte("Slot", (byte)i); this.slots[i].writeToNBT(compound); list.appendTag(compound); } nbtTagCompound.setTag("Items", list); if(this.hasCustomInventoryName()) nbtTagCompound.setString("CustomName", this.localizedName); } @Override public void readFromNBT(NBTTagCompound nbtTagCompound) { super.readFromNBT(nbtTagCompound); NBTTagList list = nbtTagCompound.getTagList("Items", 10); this.slots = new ItemStack[this.getSizeInventory()]; for(int i = 0; i < list.tagCount(); i++) { NBTTagCompound compound = list.getCompoundTagAt(i); byte b = compound.getByte("Slot"); if(b >= 0 && b < this.slots.length) this.slots[b] = ItemStack.loadItemStackFromNBT(compound); } setBurning(nbtTagCompound.getBoolean("isBurning")); TileEntityCampFire.burnTime = nbtTagCompound.getShort("BurnTime"); this.cookTime = nbtTagCompound.getShort("CookTime"); this.currentItemBurnTime = nbtTagCompound.getShort("CurrentBurnTime"); if(nbtTagCompound.hasKey("CustomName", ) this.localizedName = nbtTagCompound.getString("CustomName"); } /** * Camp Fire isBurning */ public boolean isBurning() { return TileEntityCampFire.burnTime > 0; } public boolean burning(World world, int x, int y, int z, boolean lastArgNeeded) { return (world.isRaining() || world.isThundering()) && world.canBlockSeeTheSky(x, y, z) && lastArgNeeded ? burning : true; } @Override public void updateEntity() { boolean flag = false; if(this.isBurning() && burning(worldObj, xCoord, yCoord, zCoord, true)) TileEntityCampFire.burnTime--; if(!this.worldObj.isRemote) { if(TileEntityCampFire.burnTime == 0 && burning(worldObj, xCoord, yCoord, zCoord, false)) { this.currentItemBurnTime = TileEntityCampFire.burnTime = getItemBurnTime(this.slots[1]); if(this.isBurning()) { flag = true; if(this.slots[1] != null) this.slots[1].stackSize--; if(this.slots[1].stackSize == 0) this.slots[1] = this.slots[1].getItem().getContainerItem(this.slots[1]); } } else if(!burning(worldObj, xCoord, yCoord, zCoord, true) || !isBurning()) this.currentItemBurnTime = TileEntityCampFire.burnTime = 0; if(this.isBurning() && this.canSmelt() && burning(worldObj, xCoord, yCoord, zCoord, true)) { this.cookTime++; if(this.cookTime == this.campFireSpeed) { this.cookTime = 0; this.smeltItem(); flag = true; } } else this.cookTime = 0; } if(flag) this.markDirty(); } /** * @param burning is the camp fire burning */ public void setBurning(boolean burning) { TileEntityCampFire.burning = burning; } BlockPFCampFire /** * Ticks the block if it's been scheduled */ public void updateTick(World world, int x, int y, int z, Random random) { if(world.isRemote) return; TileEntityCampFire tileentityCampfire = (TileEntityCampFire)world.getTileEntity(x, y, z); if(tileentityCampfire != null) { if(tileentityCampfire.burning(world, x, y, z, false)) if(world.isRaining() || world.isThundering()) if(world.canBlockSeeTheSky(x, y, z)) tileentityCampfire.setBurning(false); } } /** * Called upon block activation (right click on the block.) */ @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float px, float py, float pz) { TileEntityCampFire tileentityCampfire = (TileEntityCampFire)world.getTileEntity(x, y, z); if(tileentityCampfire != null) { if(world.isRemote) return false; if(!player.isSneaking()) if(player.getCurrentEquippedItem() != null && player.getCurrentEquippedItem().getItem() == Items.flint_and_steel) if(!world.isRaining() && !world.isThundering()) tileentityCampfire.setBurning(true); player.openGui(PrimevalForest.instance, 1, world, x, y, z); return true; } return false; } /** * Spawns flame particle over the camp fire */ @Override @SideOnly(Side.CLIENT) public void randomDisplayTick(World world, int x, int y, int z, Random random) { TileEntityCampFire tileentityCampfire = (TileEntityCampFire) world.getTileEntity(x, y, z); if(tileentityCampfire != null && tileentityCampfire.burning(world, x, y, z, true) && tileentityCampfire.isBurning()) { for(int i = 0; i < 3; i++) { float motionY = (random.nextFloat() / 40F) + 0.025F; double particleX = ((x + 0.5F) - 0.15F) + (random.nextInt(30) / 100F); double particleY = y + 0.1F + (random.nextInt(15) / 100F); double particleZ = ((z + 0.5F) - 0.15F) + (random.nextInt(30) / 100F); PrimevalForest.proxy.spawnFlame(world, particleX, particleY, particleZ, 0.0F, motionY, 0.0F, 16); world.spawnParticle("smoke", particleX, particleY, particleZ, 0.0D, 0.05D, 0.0D); } } } /** * Triggered whenever an entity collides with this block (enters into the block). Args: world, x, y, z, entity */ @Override public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity) { super.onEntityCollidedWithBlock(world, x, y, z, entity); TileEntityCampFire tileentityCampfire = (TileEntityCampFire)world.getTileEntity(x, y, z); if(tileentityCampfire != null) { if(tileentityCampfire.burning(world, x, y, z, true)) { entity.attackEntityFrom(DamageSource.inFire, 1.0F); entity.setFire(; } } } So anyone who has an idea on how to fix this two issues?
-
Hello, I've created a campfire that should work like a furnace with a difference: The Campfire should only burn if the weather is clear or the weather is raining and the campfire block can't see the sky. The second requirement should be that you need to right click with a flient and steel to set it on fire. Now I have the following problem: Is one campfire is burning then every other campfire begins to burn, too. So you need only to activate one campfire to activate every campfire that is placed and that will be placed. If you remove them and place them a new campfire it starts automatically to burn. But I want it like the furnace with the two different/new requirements that I posted over this few lines. So here is my code: BlockPFCampFire TileEntityCampFire I used the method isBurning in the render class and the GUI class, too. I hope someone knows how to fix this big issue. Bektor
-
Ok, fixed it now by adding player.getCurrentEquippedItem() == null ||
-
Hello, I've created with Forge 1.7.10-10.13.1.1224 a custom "furnace", but now I have one problem: Everytime if I'm right clicking on it, the Game is crashing: So the "furnace" should only be burning if there is wood in it and if you did a right click with an flient and steel. The block code: The TileEntity-Code: I hope someone can help me to fix this problem... The line of code that makes problems is the only line in the isUseableByPlayer method that I posted a few lines over this here. Bektor
-
[1.7.10] [UNSOLVED] Structure Components not working
Bektor replied to Bektor's topic in Modder Support
Ok. I added now a few debug messages (one in the constructor of the structure and one under the method were the blocks are placed...). Well, all debug messages are called, at first the generating code from IWorldGenerator, then the Constructor or the Corridor and then the addComponentParts method from the Corridor where the blocks should be placed with the methods fillWithAir and fillWithBlocks... (both are methods from the class Structure Component that is by Mojang and this methods are used for the village components, too). So the methods are called, but the blocks won't be placed.