Everything posted by Glistre
-
[1.7.10] biome replaced with mushroom island shore
I cannot explain it Problem was created when I tried adding a config for the biomes like this: package com.glistre.glistremod.biome; import net.minecraft.world.biome.BiomeGenBase; import net.minecraftforge.common.BiomeDictionary; import net.minecraftforge.common.BiomeManager; import net.minecraftforge.common.BiomeManager.BiomeEntry; import net.minecraftforge.common.BiomeManager.BiomeType; import net.minecraftforge.common.BiomeDictionary.Type; public class BiomeRegistry { public static void GlistreMod(){ initializeBiome(); registerBiome(); } public static BiomeGenBase biomeGlistre; public static BiomeGenBase biomeFreon; public static int biomeGlistreID = 155; public static int biomeFreonID = 154; public static void initializeBiome(){ // 1.7.10 valid biome IDs use 0-39, 129-167, neg one unallocated biomeGlistre = new GlistreBiome(biomeGlistreID).setBiomeName("Glistering Biome"); biomeFreon = new FreonBiome(biomeFreonID).setBiomeName("Freon Biome"); } public static void registerBiome(){ BiomeDictionary.registerBiomeType(biomeGlistre, Type.FOREST); BiomeDictionary.registerBiomeType(biomeFreon, Type.COLD); //change the next line to make biome more frequent, 50 is 50% probability of spawning, change to 10 later // BiomeManager.addSpawnBiome(biomeGlistre); BiomeEntry glistreBiomeEntry = new BiomeEntry(biomeGlistre, 50); BiomeEntry freonBiomeEntry = new BiomeEntry(biomeFreon, 20); //need to try with .COOL it did not seem to work BiomeManager.addBiome(BiomeType.WARM, glistreBiomeEntry); BiomeManager.addBiome(BiomeType.WARM, freonBiomeEntry); }[/code] When I put this "public static int = biomeGlistreID" in my custom config file: [/code] package com.glistre.glistremod.lib; import com.glistre.glistremod.GlistreMod; import cpw.mods.fml.common.FMLCommonHandler; import net.minecraftforge.common.config.Configuration; public class ConfigurationGlistre { public static boolean cheapRecipe; //ore attempt public static boolean enableWorldGeneration; // //ID attempt public static int biomeGlistreID; public static int biomeFreonID; // public static int dimensionId; public static final boolean CHEAPRECIPE_DEFAULT = false; public static final String CHEAPRECIPE_NAME = "Enables the cheap recipe for the Silver Sword and Glistering Bread"; public static final boolean WORLDSETTINGS_DEFAULT = true; public static final String WORLD_SETTINGS = "Allows custom ore to generate in the world."; public static final String CATEGORY_BIOME = "Change the ID of the Biomes"; // public static final String CATEGORY_DIMENSION = "Change the ID of the Dimension"; public static void loadConfig(){ FMLCommonHandler.instance().bus().register(GlistreMod.instance); // recipes final String RECIPES = GlistreMod.config.CATEGORY_GENERAL + GlistreMod.config.CATEGORY_SPLITTER + "Recipes"; GlistreMod.config.addCustomCategoryComment(RECIPES, "Enable or disable recipes"); cheapRecipe = GlistreMod.config.get(RECIPES, CHEAPRECIPE_NAME, CHEAPRECIPE_DEFAULT).getBoolean(CHEAPRECIPE_DEFAULT); // world settings final String WORLDGEN = GlistreMod.config.CATEGORY_GENERAL + GlistreMod.config.CATEGORY_SPLITTER + "World Settings"; GlistreMod.config.addCustomCategoryComment(WORLDGEN, "Enable or disable world settings"); enableWorldGeneration = GlistreMod.config.get(WORLDGEN, WORLD_SETTINGS, WORLDSETTINGS_DEFAULT).getBoolean(WORLDSETTINGS_DEFAULT); final String CATEGORY_BIOME = GlistreMod.config.CATEGORY_GENERAL + GlistreMod.config.CATEGORY_SPLITTER + "Biomes"; GlistreMod.config.addCustomCategoryComment(CATEGORY_BIOME, "ID of the Biomes"); biomeGlistreID = GlistreMod.config.get(Configuration.CATEGORY_GENERAL, "Glistering Biome ID", 155).getInt(); biomeFreonID = GlistreMod.config.get(Configuration.CATEGORY_GENERAL, "Freon Biome ID", 154).getInt(); /* final String CATEGORY_DIMENSION = GlistreMod.config.CATEGORY_GENERAL + GlistreMod.config.CATEGORY_SPLITTER + "Dimensions"; GlistreMod.config.addCustomCategoryComment(CATEGORY_DIMENSION, "ID of the Dimension"); dimensionId = GlistreMod.config.get(Configuration.CATEGORY_GENERAL, "dimensionFreonId", .getInt(); */ // genLapisInExtremeHills= config.get(Configuration.CATEGORY_GENERAL, "Generate Lapis in Extreme Hills Biome only", false).getBoolean(false); if(GlistreMod.config.hasChanged()){ GlistreMod.config.save(); } } } [/code] Not really sure why but I had public static int biomeGlistreID ... instead of public static int biomeGlistreID = 155; It's all working now ..or so it seems I still have a problem in that my config file settings when I change them after launching minecraft they do not save into the config file correctly.. . ie, I have to actually edit the config file manually to change the config setting
-
[1.7.10] biome replaced with mushroom island shore
Not sure what happened, my custom biome is now always replaced with mushroom island shore....tried changing the ID, deleting the config file, restarting eclipse, deleting world,,, no matter what I do it 's mushroom island shore now ... Any ideas?
-
[1.7.10] inventory shadow - ?
http://s23.postimg.org/4qm2pekij/2015_12_27_11_45_58.png[/img] Using the latest version of 1.7.10 there is a shadow effect (appears to be the actual gui/inventory.png) showing. I see this in all versions of 1.7.10 but not in 1.6.4 or 1.8. Not in Vanilla 1.7.10 either. The shadow background/black background only shows when you click on an item when in your inventory (not a stack of items). Does not show when clicking on blocks or spawn eggs. Is there a patch for this? I am wondering is this most likely a forge bug? Nothing crashes, just the odd shadow effect. Please let me know if any additional information is needed
-
[1.7.10] inventory shadow - ?
It is the latest 1.7.10 I will report Does not do it in 1.8 I only had two things left to do on my 1.7.10 mod before moving on Thanks
-
[1.7.10] inventory shadow - ?
I see this effect now even in a clean install of Forge 1.7.10. Whenever you click on an item with potion displaying , you can see the inventory gui in the background Happens with no mod installed whatsoever No effect of shadow or inventory gui displays when in Vanilla Minecraft 1.7.10. And not with earlier Forge versions. Does not have the same problem in 1.8 either Any ideas what causes this? Possibly this thread should be moved to forge bugs but since it is not the most recent Forge version not sure it matters http://s21.postimg.org/xr08a9lon/2015_12_27_11_45_58.png[/img]
-
[Unsolved][1.7.10] Potion icon shadow effect what is this?
bump is this possibly a bug? it does the same thing with vanilla potions even with no items, no blocks, nothing modding, just the basic install and setup for Forge modding with eclipse does not do this in vanilla minecraft 1.7.10 Can anyone confirm or deny the shadow effect in their mod? If no one else has this I will post my main mod file and see what is wrong with my setup thanks
-
[Unsolved][1.7.10] Potion icon shadow effect what is this?
I ran another version of Forge 1.7.10 with NO custom potion at all. Now I realize that the potion shadow effect is there on all potions even with no mod at all. I doubt this is a forge bug there must be something I have done that would cause this shadow effect behind potion icons but I have no idea where to look. .. Anybody know what could cause this ... check out the shadow effect around the icon when you click on an item ... http://s2.postimg.org/7265u8ph5/2015_12_21_16_30_01.png[/img] I used renderInventoryEffect to create custom potion icon and I get this shadow effect when I click on items . . . Also, whenever I use my potion it wipes out other potion effects but not vice versa. package com.glistre.glistremod.effects; import java.util.ArrayList; import java.util.List; import org.lwjgl.opengl.GL11; import com.glistre.glistremod.GlistreMod; import com.glistre.glistremod.items.ItemRegistry; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.texture.ITextureObject; import net.minecraft.entity.EntityLivingBase; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.ResourceLocation; public class PoisonProtectEffect extends Potion { //substring goes over to the right how ever many you specify, //and sets that as the new start. so 1 in this case... AKA if you don't put the slash at the beginning //and just make it modid + "textures/folder/icon.png" substring isn't required... or it may even require a colon to specify the domain so modid + ":" + "textures/folder/icon.png" public static final ResourceLocation icon = new ResourceLocation("glistremod:textures/gui/potionicon.png"); /** ID value of the potion this effect matches. */ private int potionID; /** The duration of the potion effect */ private int duration; /** The amplifier of the potion effect */ private int amplifier; /** Whether the potion is a splash potion */ private List<ItemStack> curativeItems; private int width; private int height; private int u; private int v; public PoisonProtectEffect(int potionID, boolean bad, int potionColor) { super(potionID, bad, potionColor); } //this will put Minecraft Icons for potions use renderInventoryEffect don't use this /* @Override public Potion setIconIndex(int x, int y) { super.setIconIndex(x, y); return this; }*/ @Override public boolean hasStatusIcon() { return false; } @Override public void performEffect(EntityLivingBase entity, int strength) { super.performEffect(entity, strength); entity.removePotionEffect(Potion.poison.id); entity.getActivePotionEffect(GlistreMod.poisonProtectPotion).getDuration(), 6)); } @Override public boolean isReady(int ticksLeft, int amplifier){ int k = (5 >> amplifier); return k < 1 || ticksLeft % k == 0; } @Override // @SideOnly(Side.CLIENT) public void renderInventoryEffect(int x, int y, PotionEffect effect, net.minecraft.client.Minecraft mc){ if (effect.getPotionID() == 31){ GL11.glEnable(GL11.GL_BLEND); mc.renderEngine.bindTexture(icon); // drawTextureModalRect(xscreen, yscreen, utexture, vtexture, width, height) mc.currentScreen.drawTexturedModalRect(x + 6, y + 7, u + 9, v + 9, 18, 18); GL11.glDisable(GL11.GL_BLEND); } } public int getStatusIconIndex(){ // ITextureObject texture = Minecraft.getMinecraft().renderEngine.getTexture(icon); Minecraft.getMinecraft().renderEngine.bindTexture(icon); return super.getStatusIconIndex(); } public boolean isBadEffect(){ return false; } public int getPotionID() { return this.potionID; } }
-
[Unsolved][1.7.10] need ideas Custom potion icon weird background effect
No ideas left what to look at, any suggestions?: I am getting a black background effect behind my custom potion icon when I select an item in inventory while the player is under the custom potion effect. I used renderInventory method. The size of the black space corresponds the the width and height parameters in the drawTexturedModalRect method. Any thoughts on what could be happening? It does not occur when selecting blocks. Also tried the setIcOnIndex hack for my custom potion icon and it does exactly the same thing. I noticed the effect does not occur if I select a full stack of my potion in inventory , only if I select one. Also, the effect does not occur if I select blocks Wish I knew what was going on ...should I be creating custom gui overlay and making it an event to ensure that I am not having the gui opened twice ? Any thoughts appreciated I noticed the effect does not occur if I select a full stack of my potion in inventory , only if I select one. Also, the effect does not occur if I select blocks Wish I knew what was going on ...should I be creating custom gui overlay and making it an event to ensure that I am not having the gui opened twice ? Any thoughts appreciated and now my icon is perfect but still see some black behind the potion effects rectangle Now my code looks like this: private static int Width = 18; private static int Height = 18; public void renderInventoryEffect(int x, int y, PotionEffect effect, net.minecraft.client.Minecraft mc){ GL11.glEnable(GL11.GL_BLEND); Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation("glistremod","textures/gui/inventory.png")); mc.currentScreen.drawTexturedModalRect(x + 6, y + 7, u + 9, v + 9, Width, Height); } I am probably doing this all wrong possibly need events to render anything with gui The effect does not occur when selecting blocks. What seems to be happened is when I click on an item, my icon renders but an additional icon renders. The u & v icons control the placing of this second icon on the screen and the x & y control the placing of the initial icon. What I want to happen is that the initial icon that is rendering just stays as is and nothing else shows up. Could someone explain to me how this method is working I am sure I could fix it if I understood it? Are there any tutorials on this or other posts? Thanks in advance
-
[1.7.10] Custom block not generating in Savannah Biome
Would this work for Mystcraft etc? @Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { switch(world.provider.dimensionId) { //case -1 = Nether case -1: generateSurface(world, random, chunkX*16,chunkZ*16); break; //case 0 = Overworld case 0: generateSurface(world, random, chunkX*16,chunkZ*16); break; //case 1 = End case 1: generateSurface(world, random, chunkX*16,chunkZ*16); break; //default case e.g. Mystcraft ..others default: generateSurface(world, random, chunkX*16,chunkZ*16); break; } }
-
[1.7.10] Custom block not generating in Savannah Biome
So maybe add something like case Glistreland.DIMENSIONID ... make a custom dimension?
-
[1.7.10] Custom block not generating in Savannah Biome
Because I'm a dumbass I changed it to this : package com.glistre.glistremod.blocks; import java.util.Random; import com.glistre.glistremod.blocks.BlockRegistry; import net.minecraft.init.Blocks; import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.biome.BiomeGenSavanna; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.feature.WorldGenMinable; import net.minecraft.world.gen.feature.WorldGenerator; import cpw.mods.fml.common.IWorldGenerator; public class BlockGenSavanna implements IWorldGenerator { @Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { switch(world.provider.dimensionId) { //case 0 = Overworld case 0: generateSurface(world, random, chunkX*16,chunkZ*16); break; //case -1 = Nether case -1: generateSurface(world, random, chunkX*16,chunkZ*16); break; //case 1 = End case 1: generateSurface(world, random, chunkX*16,chunkZ*16); break; } } private void generateSurface(World world, Random random, int chunkX, int chunkZ) { BiomeGenBase b = world.getBiomeGenForCoords(chunkX, chunkZ); if (b == BiomeGenBase.savanna || b == BiomeGenBase.savannaPlateau) for(int i =0; i<20; i++){ int Xcoord = chunkX + random.nextInt(16); int Zcoord = chunkZ + random.nextInt(16); // int Ycoord = random.nextInt(256); int Ycoord = world.getHeightValue(Xcoord, Zcoord); (new WorldGenMinable(BlockRegistry.MyBlock_3, 22)).generate(world, random, Xcoord, Ycoord, Zcoord); //this below just tells me if its generating or not System.out.println("Generating Glistre Blocks in Savanna and Savanna Plateau"); } } }
-
[1.7.10] Custom block not generating in Savannah Biome
Not real sure if I am doing this right it seems to work. ...am I doing the Height part and any of this correct? It works but I would appreciate your input if you have a sec to look at it package com.glistre.glistremod.blocks; import java.util.Random; import com.glistre.glistremod.blocks.BlockRegistry; import net.minecraft.init.Blocks; import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.biome.BiomeGenSavanna; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.feature.WorldGenMinable; import net.minecraft.world.gen.feature.WorldGenerator; import cpw.mods.fml.common.IWorldGenerator; public class BlockGenSavanna implements IWorldGenerator { @Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { switch(world.provider.dimensionId) { //case 0 = Overworld case 0: generateSurface(world, random, chunkX*16,chunkZ*16); break; //case 0 = Nether case -1: generateSurface(world, random, chunkX*16,chunkZ*16); break; //case 0 = End case 1: generateSurface(world, random, chunkX*16,chunkZ*16); break; } } BiomeGenBase.Height height_LowPlains = new BiomeGenBase.Height(0.125F, 0.05F); BiomeGenBase.Height height_HighPlateaus = new BiomeGenBase.Height(1.5F, 0.025F); private void generateSurface(World world, Random random, int chunkX, int chunkZ) { BiomeGenBase savanna = new BiomeGenSavanna(35).setColor(12431967).setBiomeName("Savanna").setTemperatureRainfall(1.2F, 0.0F).setDisableRain(); BiomeGenBase savannaPlateau = new BiomeGenSavanna(36).setColor(10984804).setBiomeName("Savanna Plateau").setTemperatureRainfall(1.0F, 0.0F).setDisableRain(); BiomeGenBase b = world.getBiomeGenForCoords(chunkX, chunkZ); if (b == savanna) for(int i =0; i<20; i++){ int Xcoord = chunkX + random.nextInt(16); int Zcoord = chunkZ + random.nextInt(16); // int Ycoord = random.nextInt(256); int Ycoord = world.getHeightValue(Xcoord, Zcoord); (new WorldGenMinable(BlockRegistry.MyBlock_3, 22)).generate(world, random, Xcoord, Ycoord, Zcoord); //this below just tells me if its generating or not System.out.println("Generating Glistre Blocks in Savanna"); } else if (b == savannaPlateau) for(int i =0; i<10; i++){ int Xcoord = chunkX + random.nextInt(16); int Zcoord = chunkZ + random.nextInt(16); // int Ycoord = random.nextInt(256); int Ycoord = world.getHeightValue(Xcoord, Zcoord); (new WorldGenMinable(BlockRegistry.MyBlock_3, 22)).generate(world, random, Xcoord, Ycoord, Zcoord); //this below just tells me if its generating or not System.out.println("Generating Glistre Blocks in Savanna Plateau"); } } }
-
[1.7.10] Custom block not generating in Savannah Biome
I am flocking blind thank you for the suggestions and the eyes I will change it I was noticing a bit of "warning: clientsidechunkingticking took ..." error and lag hope that gets rid of it
-
[1.7.10] Custom block not generating in Savannah Biome
For some reason I am unable to generate custom ore/blocks in Savannah biomes. All other biomes I have tried no problems. I am trying to generate the "Block_3" on the surface of the Savannah. I recall reading somewhere that you can only replace certain blocks? The surface of Savannah is usually stone is there a way to change this code to replace the grass or stone on the surface of the Savannah? package com.glistre.glistremod.biome; import com.glistre.glistremod.BlockRegistry; import java.util.Random; import net.minecraft.init.Blocks; import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.feature.WorldGenMinable; import net.minecraft.world.gen.feature.WorldGenerator; import cpw.mods.fml.common.IWorldGenerator; public class BlockGenGlistre implements IWorldGenerator { @Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { switch(world.provider.dimensionId) { //case 0 = Overworld case 0: generateSurface(world, random, chunkX*16,chunkZ*16); } } private void generateSurface(World world, Random random, int chunkX, int chunkZ) { BiomeGenBase b = world.getBiomeGenForCoords(chunkX, chunkZ); if (b.biomeName.equals("Savannah")) for(int i =0; i<10; i++){ int Xcoord = chunkX + random.nextInt(16); int Zcoord = chunkZ + random.nextInt(16); // int Ycoord = random.nextInt(256); int Ycoord = world.getHeightValue(Xcoord, Zcoord); (new WorldGenMinable(BlockRegistry.Block_3, 22)).generate(world, random, Xcoord, Ycoord, Zcoord); //this below just tells me if its generating or not System.out.println("Generating Glistre Blocks in Savannah"); } else if (b.biomeName.equals("Savannah Plateau")) for(int i =0; i<10; i++){ int Xcoord = chunkX + random.nextInt(16); int Zcoord = chunkZ + random.nextInt(16); // int Ycoord = random.nextInt(256); int Ycoord = world.getHeightValue(Xcoord, Zcoord); (new WorldGenMinable(BlockRegistry.Block_3, 22)).generate(world, random, Xcoord, Ycoord, Zcoord); //this below just tells me if its generating or not System.out.println("Generating Glistre Blocks in Savannah Plateau"); } else if (b.biomeName.equals("Birch Forest")) for(int i =0; i<100; i++){ int Xcoord = chunkX + random.nextInt(16); int Zcoord = chunkZ + random.nextInt(16); // int Ycoord = random.nextInt(256); int Ycoord = world.getHeightValue(Xcoord, Zcoord); (new WorldGenMinable(BlockRegistry.Block_2, 22)).generate(world, random, Xcoord, Ycoord, Zcoord); //this below just tells me if its generating or not System.out.println("Generating Silver Blocks in Birch Forest"); } else if (b.biomeName.equals("Extreme Hills")) for(int i =0; i<10; i++){ int Xcoord = chunkX + random.nextInt(16); int Zcoord = chunkZ + random.nextInt(16); int Ycoord = random.nextInt(256); // int Ycoord = world.getHeightValue(Xcoord, Zcoord); (new WorldGenMinable(BlockRegistry.Block_1, 20)).generate(world, random, Xcoord, Ycoord, Zcoord); //this below just tells me if its generating or not System.out.println("Generating Silver Ore in Extreme Hills"); } } }
-
[1.7.10] generate seaweed underwater instead of clay using BiomeDecorator
I changed public WorldGenerator getRandomWorldGenForGrass(Random random){ return random.nextInt(2) == 0 ? new WaterGeneration(BlockRegistry.blockSeaweed, 1) : new WorldGenTallGrass(BlockRegistry.blockSeaweed, 2); to public WorldGenerator getRandomWorldGenForGrass(Random random){ return random.nextInt(2) == 0 ? new WaterGeneration(BlockRegistry.blockSeaweed, 2) : new WorldGenSeaweed(3); and it did generate a small amount of seaweed but only like five blocks. I am not sure why. . . it looks like it was already working but just very, very, very small amount of seaweed . So, I know I do not need to add a "SEAWEED" event and the CLAY event might be okay. . I still need way more seaweed though UPDATE: increased the frequency of the seaweed substantially --changed the "number of blocks of my WaterGen class from 10 to 2000 : my code now looks like this : public WorldGenerator getRandomWorldGenForGrass(Random random){ return random.nextInt(2) == 0 ? new WorldGenSeaweed(3) : new WorldGenSeaweed(10); } public WorldGenerator getRandomWorldGenForTrees(Random par1Random){ return(WorldGenerator)(par1Random.nextInt(1) == 0 ? this.worldGeneratorBigTree : (par1Random.nextInt(6) == 0 ? this.worldGeneratorSwamp : par1Random.nextInt(20) == 0 ? this.worldGeneratorTrees : this.worldGeneratorTrees)); } public void generateSurface (World world, Random random, int i, int j){ for(int f = 0; f <200; f++);{ int x = i + random.nextInt(16); int y = random.nextInt(128); int z = j + random.nextInt(16); new WaterGeneration(BlockRegistry.blockSeaweed, 2000).generate(world, random, x, y, z); } } I still don't have this right though I have not connected all the dots on how its working
-
Eclipse Wont open the project
Have you checked your workspace file path? You can change that in Switch workspace make sure it goes to the eclipse folder or the folder where your project is located
-
[1.7.10] generate seaweed underwater instead of clay using BiomeDecorator
Trying to make my custom seaweedgenerate in place of the clay block in my custom Glistering biome. I created a new WorldGenSeaweed class for seaweed modeled after WorldGenClay class. I created a new BiomeDecorator class called BiomeDecoratorGlistre, and trying to generate my Seaweed block instead of Blocks.clay. Cannot seem to get it to work WorldGenSeaweed: package com.glistre.glistremod.biome; import java.util.Random; import com.glistre.glistremod.BlockRegistry; import com.glistre.glistremod.MyBlock; import com.glistre.glistremod.atlantis.BlockSeaweed; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.init.Blocks; import net.minecraft.world.World; import net.minecraft.world.gen.feature.WorldGenClay; import net.minecraft.world.gen.feature.WorldGenerator; public class WorldGenSeaweed extends WorldGenClay { public BlockSeaweed fieldseaweed; /** The number of blocks to generate. */ private int numberOfBlocks; // private static final String __OBFID = "CL_00000405"; public WorldGenSeaweed(int p_i2011_1_) { super(p_i2011_1_); this.fieldseaweed = (BlockSeaweed) BlockRegistry.blockSeaweed; this.numberOfBlocks = p_i2011_1_; // this.numberOfBlocks = 16; } public boolean generate(World world, Random random, int par2, int par3, int par4) { if (world.getBlock(par2, par3, par4).getMaterial() != Material.water) { return false; } else { int l = random.nextInt(this.numberOfBlocks - 2) + 2; byte b0 = 1; for (int i1 = par2 - l; i1 <= par2 + l; ++i1) { for (int j1 = par4 - l; j1 <= par4 + l; ++j1) { int k1 = i1 - par2; int l1 = j1 - par4; if (k1 * k1 + l1 * l1 <= l * l) { for (int i2 = par3 - b0; i2 <= par3 + b0; ++i2) { Block block = world.getBlock(i1, i2, j1); if (block == Blocks.dirt || block == Blocks.sand || block == Blocks.gravel || block == Blocks.clay) { world.setBlock(i1, i2, j1, this.fieldseaweed, 0, 2); } } } } } return true; } } } BiomeDecoratorGlistre: package com.glistre.glistremod.biome; import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.CLAY; import java.util.Random; import com.glistre.glistremod.BlockRegistry; import com.glistre.glistremod.GlistreBiome; import net.minecraft.init.Blocks; import net.minecraft.world.World; import net.minecraft.world.biome.BiomeDecorator; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.gen.feature.WorldGenClay; import net.minecraft.world.gen.feature.WorldGenLiquids; import net.minecraft.world.gen.feature.WorldGenerator; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.terraingen.DecorateBiomeEvent; import net.minecraftforge.event.terraingen.TerrainGen; public class BiomeDecoratorGlistre extends BiomeDecorator { /** The world the BiomeDecorator is currently decorating */ public World currentWorld; /** The Biome Decorator's random number generator. */ public Random randomGenerator; /** The X-coordinate of the chunk currently being decorated */ public int chunk_X; /** The Z-coordinate of the chunk currently being decorated */ public int chunk_Z; public int seaweedPerChunk; /** The clay/seaweed generator. */ // public WorldGenerator clayGen = new WorldGenClay(4); //added next two lines no idea if will work public WorldGenerator seaweedGen = new WorldGenSeaweed(2); public BiomeDecoratorGlistre() { super(); // seaweedPerChunk = new WorldGenSeaweed(16); seaweedGen = new WorldGenSeaweed(2); this.seaweedPerChunk = 1600; } @Override public void decorateChunk(World p_150512_1_, Random p_150512_2_, BiomeGenBase p_150512_3_, int p_150512_4_, int p_150512_5_) { super.decorateChunk(p_150512_1_, p_150512_2_, p_150512_3_, p_150512_4_, p_150512_5_); if (this.currentWorld != null) { throw new RuntimeException("Already decorating!!"); } else { this.currentWorld = p_150512_1_; this.randomGenerator = p_150512_2_; this.chunk_X = p_150512_4_; this.chunk_Z = p_150512_5_; this.genDecorations(p_150512_3_); this.currentWorld = null; this.randomGenerator = null; } } @Override protected void genDecorations(BiomeGenBase p_150513_1_) { super.genDecorations(p_150513_1_); MinecraftForge.EVENT_BUS.post(new DecorateBiomeEvent.Pre(currentWorld, randomGenerator, chunk_X, chunk_Z)); this.generateOres(); int i; int j; int k; int i1; int l; // boolean doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, SAND); boolean doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, CLAY); for (j = 0; doGen && j < this.seaweedPerChunk; ++j) // for (j = 0; doGen && j < this.deadBushPerChunk; ++j) { k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; i1 = this.nextInt(this.currentWorld.getHeightValue(k, l) * 2); // (new WorldGenSeaweed()).generate(this.currentWorld, this.randomGenerator, k, l, i1); (new WorldGenSeaweed(2)).generate(this.currentWorld, this.randomGenerator, k, i1, l); // this.seaweedGen.generate(this.currentWorld, this.randomGenerator, j, this.currentWorld.getTopSolidOrLiquidBlock(k, i1), l); MinecraftForge.EVENT_BUS.post(new DecorateBiomeEvent.Post(currentWorld, randomGenerator, chunk_X, chunk_Z)); } } private int nextInt(int i) { if (i <= 1) return 0; return this.randomGenerator.nextInt(i); } } CustomBiome glistering Biome: package com.glistre.glistremod; import java.util.Random; import com.glistre.glistremod.biome.BiomeDecoratorGlistre; import com.glistre.glistremod.biome.WaterGeneration; import com.glistre.glistremod.biome.WorldGenSeaweed; import com.glistre.glistremod.entities.EntityTobieSkel; import net.minecraft.block.Block; import net.minecraft.entity.monster.EntitySkeleton; import net.minecraft.entity.monster.EntityZombie; import net.minecraft.entity.passive.EntityHorse; import net.minecraft.entity.passive.EntityOcelot; import net.minecraft.entity.passive.EntityPig; import net.minecraft.init.Blocks; import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.gen.feature.WorldGenClay; import net.minecraft.world.gen.feature.WorldGenHugeTrees; import net.minecraft.world.gen.feature.WorldGenMinable; import net.minecraft.world.gen.feature.WorldGenTaiga2; import net.minecraft.world.gen.feature.WorldGenTallGrass; import net.minecraft.world.gen.feature.WorldGenerator; public class GlistreBiome extends BiomeGenBase { BiomeDecoratorGlistre customBiomeDecorator; public GlistreBiome(int id) { super(id); this.setBiomeName("Glistering Biome"); this.topBlock = Blocks.grass; this.fillerBlock = Blocks.dirt; this.theBiomeDecorator = new BiomeDecoratorGlistre(); customBiomeDecorator = new BiomeDecoratorGlistre(); customBiomeDecorator =(BiomeDecoratorGlistre)theBiomeDecorator; this.theBiomeDecorator = this.createBiomeDecorator(); this.customBiomeDecorator.seaweedPerChunk = 1600; this.customBiomeDecorator.seaweedGen = new WorldGenSeaweed(2); this.theBiomeDecorator.clayPerChunk = 2; // customBiomeDecorator.seaweedGen = 2; /* this.theBiomeDecorator.treesPerChunk = 2; this.theBiomeDecorator.waterlilyPerChunk = 300; this.theBiomeDecorator.bigMushroomsPerChunk = 1; this.theBiomeDecorator.reedsPerChunk = 10; this.theBiomeDecorator.grassPerChunk = 10;*/ // this.customBiomeDecorator.seaweedGen = new WorldGenSeaweed(16); this.spawnableCreatureList.add(new SpawnListEntry(EntityOcelot.class, 2, 1, 1)); this.spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 2, 5, 7)); this.spawnableCreatureList.add(new SpawnListEntry(EntityPig.class, 1, 2, 7)); this.spawnableMonsterList.add(new SpawnListEntry(EntitySkeleton.class, 1, 1, 1)); this.spawnableMonsterList.add(new SpawnListEntry(EntityZombie.class, 2, 1, 2)); this.spawnableCreatureList.add(new SpawnListEntry(EntityGlistreWolf.class, 1, 1, 5)); this.spawnableCreatureList.add(new SpawnListEntry(EntityTobieSkel.class, 10, 3, 7)); this.spawnableCreatureList.clear(); this.spawnableWaterCreatureList.clear(); this.spawnableMonsterList.clear(); //this.spawnableMonsterList.add(new SpawnListEntry(EntityWitch.class, 200, 1, 1)); this.addFlower(Blocks.red_flower, 4, 3); this.addFlower(Blocks.pumpkin, 7, 20); // this.addFlower(Blocks.red_flower, 5, 3); // this.addFlower(Blocks.red_flower, 7, 3); // this.addFlower(Blocks.red_flower, 0, 20); // this.addFlower(Blocks.yellow_flower, 0, 30); // this.setColor(0x7F007F); // this.setColor(0x443333); this.setColor(0x003000); this.setEnableSnow(); this.setMinMaxHeight(0.7F, 1.1F); this.setTemperatureRainfall(0.75F, .25F); } /* public void genTerrainBlocks(World p_150573_1_, Random p_150573_2_, Block[] p_150573_3_, byte[] p_150573_4_, int p_150573_5_, int p_150573_6_, double p_150573_7_) { super.genTerrainBlocks(p_150573_1_, p_150573_2_, p_150573_3_, p_150573_4_, p_150573_5_, p_150573_6_, p_150573_7_); } */ /* @Override public BiomeGenBase.TempCategory getTempCategory() { return TempCategory.COLD; }*/ private void setMinMaxHeight(float f, float g) { } // @SideOnly(Side.CLIENT) /* public int getBiomeGrassColor() { return 0x443333; } // @SideOnly(Side.CLIENT) public int getBiomeFoliageColor() { return 0x443333; }*/ // @SideOnly(Side.CLIENT) public int getSkyColorByTemp(float par1) { return 0x443333; } /** * Gets a WorldGen appropriate for this biome. */ /*this is supposed to have WorldGenTallGrass not Water Generation block.seaweed{ BiomeGenBase b = world.getBiomeGenForCoords(i, j); if(b.biomeName.equals("biomeGlistre")) {*/ public WorldGenerator getRandomWorldGenForGrass(Random random){ return random.nextInt(2) == 0 ? new WaterGeneration(BlockRegistry.blockSeaweed, 1) : new WorldGenTallGrass(BlockRegistry.blockSeaweed, 2); } public WorldGenerator getRandomWorldGenForTrees(Random par1Random){ return(WorldGenerator)(par1Random.nextInt(1) == 0 ? this.worldGeneratorBigTree : (par1Random.nextInt(6) == 0 ? this.worldGeneratorSwamp : par1Random.nextInt(20) == 0 ? this.worldGeneratorTrees : this.worldGeneratorTrees)); } public void generateSurface (World world, Random random, int i, int j){ for(int f = 0; f <20; f++);{ int x = i + random.nextInt(16); int y = random.nextInt(128); int z = j + random.nextInt(16); new WaterGeneration(BlockRegistry.blockSeaweed, 20).generate(world, random, x, y, z); } } } /** Adds Huge Trees to your Biome */ /* public WorldGenerator getRandomWorldGenForTrees(Random random) { return (WorldGenerator) new WorldGenHugeTrees(false, 20 + random.nextInt(10), 1, 3, 3); } /* Wood/Leaf Metadata: 0=Oak, 1=Spruce, 2=Birch, 3=Jungle Wood */ Any ideas? Would I have to create a new event instead of using the CLAY event? Or is there something really obvious I am missing?
-
[SOLVED] Minecraft not launching using runServer in Eclipse
Yay! Got it to allow me to join from the development environment .... thank you Not clear why but it has to have the email address not UserName I am using 1.7.10 any VM arguments I should add or other things that would be important? I noticed it always picks up _JAVA_OPTIONS at -XMX512M even though I have changed them to -Xmx1024M in environmental variables the development environment seems to be forcing -512M
-
[SOLVED] Minecraft not launching using runServer in Eclipse
Thanks for pointing me into the right direction!
-
[SOLVED] Minecraft not launching using runServer in Eclipse
Probably not necessary to post the console log . I think I am just confused how the run configurations work I thought the Minecraft client would automatically launch when you were testing or launching the server which it did not So, I "clicked" on the default run configuration "run client " after launching the server with both a new run configuration "minecraft" and "gradle start" but still I cannot join the server. The server seems to be working fine though Everything on the server looks like its all working either I just need to compile and export my mod and then join the server as localhost I will try to solve this If I cannot I will post the console and ask for additional help thanks
-
[SOLVED] Minecraft not launching using runServer in Eclipse
Sorry, diesen you're talking over my head, as usual but I really appreciate your comments because you are one of the few persons that even cares enough to bother. I will therefore try to clarify: I am using the eclipse setting I built a workspace with forge. I have a minecraft project folder. I made a mod in that folder. In Eclipse, when I click on the green arrow for "run" there is a choice of "client" or "server." When I click run client, everything is fine. When I click run server, the console launches and everything appears to have no errors. However, Minecraft does not launch.
-
[SOLVED] Minecraft not launching using runServer in Eclipse
C'mon, 185 views and not one reply yet? First, can someone tell me that my assumption that when you launch runServer in Eclipse that the server launches, you see it all in the console, and then Minecraft is supposed to launch, correct? Minecraft does not launch for me ...could someone do a test and click to the runServer green arrow and tell me if their Minecraft launches. I always assumed it would since how else could you test your Mod in server mode?
-
[SOLVED] Minecraft not launching using runServer in Eclipse
Having a problem for a while, I built a mod using Forge and Eclipse. Everything seems to work fine on the client side. Also, when I runServer in Eclipse by clicking the green arrow for run Server the console launches and everything seems to run just fine . ..except Minecraft never launches at all the server keeps on running but Minecraft never launches. Anyone know what could be wrong or what I am doing wrong?
-
[Solved][1.7.10] custom arrow texture not found
fixed finally with this: private static final ResourceLocation blastTextures = new ResourceLocation("glistremod","/textures/entities/blasterboltentity_1.png"); @Override protected ResourceLocation getEntityTexture(Entity entity) { return blastTextures; } Also tried diesieben07 solution for comparison and it works too!
-
[Solved][1.7.10] custom arrow texture not found
yep failed to load texture "[22:07:22] [Client thread/WARN]: Failed to load texture: minecraft:glistremod/textures/entities/blasterboltentity_1.png java.io.FileNotFoundException: minecraft:glistremod/textures/entities/blasterboltentity_1.png at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:65) ~[FallbackResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:67) ~[simpleReloadableResourceManager.class:?] at net.minecraft.client.renderer.texture.SimpleTexture.loadTexture(SimpleTexture.java:35) ~[simpleTexture.class:?] at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89) [TextureManager.class:?] at net.minecraft.client.renderer.texture.TextureManager.bindTexture(TextureManager.java:45) [TextureManager.class:?] at net.minecraft.client.renderer.entity.Render.bindTexture(Render.java:60) [Render.class:?] at net.minecraft.client.renderer.entity.Render.bindEntityTexture(Render.java:55) [Render.class:?] at com.glistre.glistremod.projectiles.blaster.RendreBlast.doRender(RendreBlast.java:32) [RendreBlast.class:?] at com.glistre.glistremod.projectiles.blaster.RendreBlast.doRender(RendreBlast.java:100) [RendreBlast.class:?] at net.minecraft.client.renderer.entity.RenderManager.func_147939_a(RenderManager.java:300) [RenderManager.class:?] at net.minecraft.client.renderer.entity.RenderManager.renderEntityStatic(RenderManager.java:278) [RenderManager.class:?] at net.minecraft.client.renderer.entity.RenderManager.renderEntitySimple(RenderManager.java:251) [RenderManager.class:?] at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:527) [RenderGlobal.class:?] at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1300) [EntityRenderer.class:?] at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1087) [EntityRenderer.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1057) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:951) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_79] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_79] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_79] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_79] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:85) [start/:?] at GradleStart.main(GradleStart.java:45) [start/:?]"
IPS spam blocked by CleanTalk.