Mettre à jour une dimension
-
Ok merci
-
Salut
J’ai plus ou moins régler le problème. Maintenant, la dimension marche avec mon biome.
Mais ce qui bug, c’est que presque à chaque fois, je spawn soit dans des blocks, soit dans l’eau, soit sur un arbre, mais presque jamais sur la terre ferme (ce qui, entre nous, est très embêtant, surtout quand t’es dans un block en survie).J’ai regardé dans la classe du biome, mais ça peut pas être dedans.
Voilà les classes que j’ai édité + le biome :ChunkProviderFrightful :
package This_is_Halloween.Frightful; import static net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.CAVE; import static net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.MINESHAFT; import static net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.OCEAN_MONUMENT; import static net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.RAVINE; import static net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.SCATTERED_FEATURE; import static net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.STRONGHOLD; import static net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.VILLAGE; import static net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.ANIMALS; import static net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.DUNGEON; import static net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.ICE; import static net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.LAKE; import static net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.LAVA; import java.util.Iterator; import java.util.List; import java.util.Random; import com.google.common.collect.Lists; import net.minecraft.block.Block; import net.minecraft.block.BlockFalling; import net.minecraft.block.state.IBlockState; import net.minecraft.client.multiplayer.ChunkProviderClient; import net.minecraft.entity.EnumCreatureType; import net.minecraft.init.Blocks; import net.minecraft.util.BlockPos; import net.minecraft.util.IProgressUpdate; import net.minecraft.util.MathHelper; import net.minecraft.world.ChunkCoordIntPair; import net.minecraft.world.SpawnerAnimals; import net.minecraft.world.World; import net.minecraft.world.WorldType; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.biome.BiomeGenPlains; import net.minecraft.world.chunk.Chunk; import net.minecraft.world.chunk.ChunkPrimer; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.ChunkProviderEnd; import net.minecraft.world.gen.ChunkProviderGenerate; import net.minecraft.world.gen.ChunkProviderSettings; import net.minecraft.world.gen.MapGenBase; import net.minecraft.world.gen.MapGenCaves; import net.minecraft.world.gen.MapGenRavine; import net.minecraft.world.gen.NoiseGenerator; import net.minecraft.world.gen.NoiseGeneratorOctaves; import net.minecraft.world.gen.NoiseGeneratorPerlin; import net.minecraft.world.gen.feature.WorldGenDungeons; import net.minecraft.world.gen.feature.WorldGenLakes; import net.minecraft.world.gen.structure.MapGenMineshaft; import net.minecraft.world.gen.structure.MapGenScatteredFeature; import net.minecraft.world.gen.structure.MapGenStronghold; import net.minecraft.world.gen.structure.MapGenStructure; import net.minecraft.world.gen.structure.MapGenVillage; import net.minecraft.world.gen.structure.StructureOceanMonument; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.terraingen.ChunkProviderEvent; import net.minecraftforge.event.terraingen.PopulateChunkEvent; import net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate; import net.minecraftforge.event.terraingen.TerrainGen; import net.minecraftforge.fml.common.eventhandler.Event.Result; public class ChunkProviderFrightful implements IChunkProvider { private Random rand; private NoiseGeneratorOctaves noiseGen1; private NoiseGeneratorOctaves noiseGen2; private NoiseGeneratorOctaves noiseGen3; private NoiseGeneratorPerlin noiseGen4; public NoiseGeneratorOctaves noiseGen5; public NoiseGeneratorOctaves noiseGen6; public NoiseGeneratorOctaves mobSpawnerNoise; private World worldObj; private Block block; private ChunkProviderSettings settings; private WorldType worldType; private final double[] noiseArray; private float[] parabolicField; // private final double[] field_147434_q; private MapGenBase caveGenerator; private MapGenMineshaft mineshaftGenerator; private MapGenBase ravineGenerator; private boolean mapFeaturesEnabled; private MapGenScatteredFeature scatteredFeatureGenerator = new MapGenScatteredFeature(); private double[] stoneNoise = new double[256]; private BiomeGenBase[] biomesForGeneration; double[] noiseData1; double[] noiseData2; double[] noiseData3; double[] noiseData4; private final List structureGenerators = Lists.newArrayList(); private final IBlockState[] cachedBlockIDs = new IBlockState[256]; { caveGenerator = TerrainGen.getModdedMapGen(caveGenerator, CAVE); mineshaftGenerator = (MapGenMineshaft)TerrainGen.getModdedMapGen(mineshaftGenerator, MINESHAFT); scatteredFeatureGenerator = (MapGenScatteredFeature)TerrainGen.getModdedMapGen(scatteredFeatureGenerator, SCATTERED_FEATURE); ravineGenerator = TerrainGen.getModdedMapGen(ravineGenerator, RAVINE); } public ChunkProviderFrightful(World world, long seed, boolean features, String p_i45636_5_) { this.block = Blocks.water; this.worldObj = world; this.mapFeaturesEnabled = features; this.stoneNoise = new double[256]; this.worldType = world.getWorldInfo().getTerrainType(); this.rand = new Random(seed); this.noiseGen1 = new NoiseGeneratorOctaves(this.rand, 16); this.noiseGen2 = new NoiseGeneratorOctaves(this.rand, 16); this.noiseGen3 = new NoiseGeneratorOctaves(this.rand, 8); this.noiseGen4 = new NoiseGeneratorPerlin(this.rand, 4); this.noiseGen5 = new NoiseGeneratorOctaves(this.rand, 10); this.noiseGen6 = new NoiseGeneratorOctaves(this.rand, 16); this.mobSpawnerNoise = new NoiseGeneratorOctaves(this.rand, 8); this.noiseArray = new double[825]; this.parabolicField = new float[25]; this.caveGenerator = new MapGenCaves(); this.mineshaftGenerator = new MapGenMineshaft(); this.scatteredFeatureGenerator = new MapGenScatteredFeature(); this.ravineGenerator = new MapGenRavine(); for(int j = -2; j <= 2; ++j) { for(int k = -2; k <= 2; ++k) { float f = 10.0F / MathHelper.sqrt_float((float)(j * j + k * k) + 0.2F); this.parabolicField[j + 2 + (k + 2) * 5] = f; } } NoiseGenerator[] noiseGens = {noiseGen1, noiseGen2, noiseGen3, noiseGen4, noiseGen5, noiseGen6, mobSpawnerNoise}; noiseGens = TerrainGen.getModdedNoiseGenerators(world, this.rand, noiseGens); this.noiseGen1 = (NoiseGeneratorOctaves)noiseGens[0]; this.noiseGen2 = (NoiseGeneratorOctaves)noiseGens[1]; this.noiseGen3 = (NoiseGeneratorOctaves)noiseGens[2]; this.noiseGen4 = (NoiseGeneratorPerlin)noiseGens[3]; this.noiseGen5 = (NoiseGeneratorOctaves)noiseGens[4]; this.noiseGen6 = (NoiseGeneratorOctaves)noiseGens[5]; this.mobSpawnerNoise = (NoiseGeneratorOctaves)noiseGens[6]; } public Chunk provideChunk(int x, int z) { this.rand.setSeed((long)x * 341873128712L + (long)z * 132897987541L); ChunkPrimer chunkprimer = new ChunkPrimer(); this.setBlocksInChunk(x, z, chunkprimer); this.biomesForGeneration = this.worldObj.getWorldChunkManager().loadBlockGeneratorData(this.biomesForGeneration, x * 16, z * 16, 16, 16); this.replaceBlockForBiome(x, z, chunkprimer, this.biomesForGeneration); this.caveGenerator.func_175792_a(this, this.worldObj, x, z, chunkprimer); this.ravineGenerator.func_175792_a(this, this.worldObj, x, z, chunkprimer); if(this.mapFeaturesEnabled) { this.scatteredFeatureGenerator.func_175792_a(this, this.worldObj, x, z, chunkprimer); } Chunk chunk = new Chunk(this.worldObj, chunkprimer, x, z); byte[] abyte = chunk.getBiomeArray(); for(int k = 0; k < abyte.length; ++k) { abyte[k] = (byte)this.biomesForGeneration[k].biomeID; } chunk.generateSkylightMap(); return chunk; } public void setBlocksInChunk(int p_180518_1_, int p_180518_2_, ChunkPrimer p_180518_3_) { this.biomesForGeneration = this.worldObj.getWorldChunkManager().getBiomesForGeneration(this.biomesForGeneration, p_180518_1_ * 4 - 2, p_180518_2_ * 4 - 2, 10, 10); this.func_147423_a(p_180518_1_ * 4, 0, p_180518_2_ * 4); for(int k = 0; k < 4; ++k) { int l = k * 5; int i1 = (k + 1) * 5; for(int j1 = 0; j1 < 4; ++j1) { int k1 = (l + j1) * 33; int l1 = (l + j1 + 1) * 33; int i2 = (i1 + j1) * 33; int j2 = (i1 + j1 + 1) * 33; for(int k2 = 0; k2 < 32; ++k2) { double d0 = 0.125D; double d1 = this.noiseArray[k1 + k2]; double d2 = this.noiseArray[l1 + k2]; double d3 = this.noiseArray[i2 + k2]; double d4 = this.noiseArray[j2 + k2]; double d5 = (this.noiseArray[k1 + k2 + 1] - d1) * d0; double d6 = (this.noiseArray[l1 + k2 + 1] - d2) * d0; double d7 = (this.noiseArray[i2 + k2 + 1] - d3) * d0; double d8 = (this.noiseArray[j2 + k2 + 1] - d4) * d0; for(int l2 = 0; l2 < 8; ++l2) { double d9 = 0.25D; double d10 = d1; double d11 = d2; double d12 = (d3 - d1) * d9; double d13 = (d4 - d2) * d9; for(int i3 = 0; i3 < 4; ++i3) { double d14 = 0.25D; double d16 = (d11 - d10) * d14; double d15 = d10 - d16; for(int j3 = 0; j3 < 4; ++j3) { if((d15 += d16) > 0.0D) { p_180518_3_.setBlockState(k * 4 + i3, k2 * 8 + l2, j1 * 4 + j3, Blocks.stone.getDefaultState()); } else if(k2 * 8 + l2 < 64) { p_180518_3_.setBlockState(k * 4 + i3, k2 * 8 + l2, j1 * 4 + j3, this.block.getDefaultState()); } } d10 += d12; d11 += d13; } d1 += d5; d2 += d6; d3 += d7; d4 += d8; } } } } } public boolean func_177460_a(IChunkProvider p_177460_1_, Chunk p_177460_2_, int p_177460_3_, int p_177460_4_) { return false; } private void func_147423_a(int x, int y, int z) { double d0 = 684.412D; double d1 = 684.412D; double d2 = 512.0D; double d3 = 512.0D; this.noiseData4 = this.noiseGen6.generateNoiseOctaves(this.noiseData4, x, z, 5, 5, 200.0D, 200.0D, 0.5D); this.noiseData1 = this.noiseGen3.generateNoiseOctaves(this.noiseData1, x, y, z, 5, 33, 5, 8.555150000000001D, 4.277575000000001D, 8.555150000000001D); this.noiseData2 = this.noiseGen1.generateNoiseOctaves(this.noiseData2, x, y, z, 5, 33, 5, 684.412D, 684.412D, 684.412D); this.noiseData3 = this.noiseGen2.generateNoiseOctaves(this.noiseData3, x, y, z, 5, 33, 5, 684.412D, 684.412D, 684.412D); boolean flag1 = false; boolean flag = false; int l = 0; int i1 = 0; double d4 = 8.5D; for(int j1 = 0; j1 < 5; ++j1) { for(int k1 = 0; k1 < 5; ++k1) { float f = 0.0F; float f1 = 0.0F; float f2 = 0.0F; byte b0 = 2; BiomeGenBase biomegenbase = this.biomesForGeneration[j1 + 2 + (k1 + 2) * 10]; for(int l1 = -b0; l1 <= b0; ++l1) { for(int i2 = -b0; i2 <= b0; ++i2) { BiomeGenBase biomegenbase1 = this.biomesForGeneration[j1 + l1 + 2 + (k1 + i2 + 2) * 10]; float f3 = biomegenbase1.minHeight; float f4 = biomegenbase1.maxHeight; float f5 = this.parabolicField[l1 + 2 + (i2 + 2) * 5] / (f3 + 2.0F); if(biomegenbase1.minHeight > biomegenbase.minHeight) { f5 /= 2.0F; } f += f4 * f5; f1 += f3 * f5; f2 += f5; } } f /= f2; f1 /= f2; f = f * 0.9F + 0.1F; f1 = (f1 * 4.0F - 1.0F) / 8.0F; double d13 = this.noiseData4[i1] / 8000.0D; if(d13 < 0.0D) { d13 = -d13 * 0.3D; } d13 = d13 * 3.0D - 2.0D; if(d13 < 0.0D) { d13 /= 2.0D; if(d13 < -1.0D) { d13 = -1.0D; } d13 /= 1.4D; d13 /= 2.0D; } else { if(d13 > 1.0D) { d13 = 1.0D; } d13 /= 8.0D; } ++i1; double d12 = (double)f1; double d14 = (double)f; d12 += d13 * 0.2D; d12 = d12 * 8.5D / 8.0D; double d5 = 8.5D + d13 * 4.0D; for(int j2 = 0; j2 < 33; ++j2) { double d6 = ((double)j2 - d5) * 12.0D * 128.0D / 256.0D / d14; if(d6 < 0.0D) { d6 *= 4.0D; } double d7 = this.noiseData2[l] / 512.0D; double d8 = this.noiseData3[l] / 512.0D; double d9 = (this.noiseData1[l] / 10.0D + 1.0D) / 2.0D; double d10 = MathHelper.denormalizeClamp(d7, d8, d9) - d6; if(j2 > 29) { double d11 = (double)((float)(j2 - 29) / 3.0F); d10 = d10 * (1.0D - d11) + -10.0D * d11; } this.noiseArray[l] = d10; ++l; } } } } public boolean chunkExists(int par1, int par2) { return true; } public void populate(IChunkProvider chunk, int x, int z) { BlockFalling.fallInstantly = true; int k = x * 16; int l = z * 16; BlockPos blockpos = new BlockPos(k, 0, l); BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(blockpos.add(16, 0, 16)); this.rand.setSeed(this.worldObj.getSeed()); long i1 = this.rand.nextLong() / 2L * 2L + 1L; long j1 = this.rand.nextLong() / 2L * 2L + 1L; this.rand.setSeed((long)x * i1 + (long)z * j1 ^ this.worldObj.getSeed()); boolean flag = false; ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(x, z); MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Pre(chunk, worldObj, rand, x, z, flag)); if(this.mapFeaturesEnabled) { this.scatteredFeatureGenerator.func_175794_a(this.worldObj, this.rand, chunkcoordintpair); } int k1; int l1; int i2; /* if(this.settings.useDungeons) { boolean doGen = TerrainGen.populate(chunk, worldObj, rand, x, z, flag, DUNGEON); for(k1 = 0; doGen && k1 < this.settings.dungeonChance; ++k1) { l1 = this.rand.nextInt(16) + 8; i2 = this.rand.nextInt(256); int j2 = this.rand.nextInt(16) + 8; (new WorldGenDungeons()).generate(this.worldObj, this.rand, blockpos.add(l1, i2, j2)); } }*/ biomegenbase.decorate(this.worldObj, this.rand, new BlockPos(k, 0, l)); if(TerrainGen.populate(chunk, worldObj, rand, x, z, flag, ANIMALS)) { SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, k + 8, l + 8, 16, 16, this.rand); } blockpos = blockpos.add(8, 0, 8); boolean doGen1 = TerrainGen.populate(chunk, worldObj, rand, x, z, flag, ICE); for(k1 = 0; doGen1 && k1 < 16; ++k1) { for(l1 = 0; l1 < 16; ++l1) { BlockPos blockpos1 = this.worldObj.getPrecipitationHeight(blockpos.add(k1, 0, l1)); BlockPos blockpos2 = blockpos1.down(); if(this.worldObj.func_175675_v(blockpos2)) { this.worldObj.setBlockState(blockpos2, Blocks.ice.getDefaultState(), 2); } if(this.worldObj.canSnowAt(blockpos1, true)) { this.worldObj.setBlockState(blockpos1, Blocks.snow_layer.getDefaultState(), 2); } } } MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Post(chunk, worldObj, rand, x, z, flag)); BlockFalling.fallInstantly = false; } public boolean saveChunks(boolean par1, IProgressUpdate par2IProgressUpdate) { return true; } public void saveExtraData() { } public boolean unloadQueuedChunks() { return false; } public boolean canSave() { return true; } public String makeString() { return "RandomLevelSource"; } public List func_177458_a(EnumCreatureType p_177458_1_, BlockPos p_177458_2_) { BiomeGenEvilland biomegenevilland = (BiomeGenEvilland) this.worldObj.getBiomeGenForCoords(p_177458_2_); return biomegenevilland.getSpawnableList(p_177458_1_); } public int getLoadedChunkCount() { return 0; } @Override public Chunk provideChunk(BlockPos blockPosIn) { return this.provideChunk(blockPosIn.getX() >> 4, blockPosIn.getZ() >> 4); } @Override public BlockPos getStrongholdGen(World worldIn, String p_180513_2_, BlockPos p_180513_3_) { return null; } @Override public void recreateStructures(Chunk p_180514_1_, int p_180514_2_, int p_180514_3_) { Iterator iterator = this.structureGenerators.iterator(); while(iterator.hasNext()) { MapGenStructure mapgenstructure = (MapGenStructure)iterator.next(); mapgenstructure.func_175792_a(this, this.worldObj, p_180514_2_, p_180514_3_, (ChunkPrimer)null); } } public void replaceBlockForBiome(int p_180517_1_, int p_180517_2_, ChunkPrimer p_180517_3_, BiomeGenBase[] p_180517_4_) { ChunkProviderEvent.ReplaceBiomeBlocks event = new ChunkProviderEvent.ReplaceBiomeBlocks(this, p_180517_1_, p_180517_2_, p_180517_3_, this.worldObj); MinecraftForge.EVENT_BUS.post(event); if(event.getResult() == Result.DENY) return; double d0 = 0.03125D; this.stoneNoise = this.noiseGen4.func_151599_a(this.stoneNoise, (double)(p_180517_1_ * 16), (double)(p_180517_2_ * 16), 16, 16, d0 * 2.0D, d0 * 2.0D, 1.0D); for(int k = 0; k < 16; ++k) { for(int l = 0; l < 16; ++l) { BiomeGenEvilland biomegenevilland = (BiomeGenEvilland) p_180517_4_[l + k * 16]; biomegenevilland.genTerrainBlocks(this.worldObj, this.rand, p_180517_3_, p_180517_1_ * 16 + k, p_180517_2_ * 16 + l, this.stoneNoise[l + k * 16]); } } } }
WorldChunkManager
package This_is_Halloween.Frightful; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Random; import com.google.common.collect.Lists; import net.minecraft.crash.CrashReport; import net.minecraft.crash.CrashReportCategory; import net.minecraft.util.BlockPos; import net.minecraft.util.ReportedException; import net.minecraft.world.World; import net.minecraft.world.WorldType; import net.minecraft.world.biome.BiomeCache; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.biome.WorldChunkManager; import net.minecraft.world.gen.layer.GenLayer; import net.minecraft.world.gen.layer.IntCache; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.terraingen.WorldTypeEvent; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class WorldChunkManagerFrightful extends WorldChunkManager { private GenLayer GenBiomes; private GenLayer BiomeIndexLayer; private BiomeCache BiomeCache; private List <biomegenbase>BiomesToSpawnIn; public WorldChunkManagerFrightful() { this.BiomeCache = new BiomeCache(this); this.BiomesToSpawnIn = new ArrayList<biomegenbase>(); this.BiomesToSpawnIn.add(This_is_Halloween.This_is_Halloween.Evilland); } public WorldChunkManagerFrightful(long seed, WorldType worldtype, long height) { this(); GenLayer[] agenlayer = GenLayerFrightful.makeTheWorld(seed); this.GenBiomes = agenlayer[0]; this.BiomeIndexLayer = agenlayer[1]; } public WorldChunkManagerFrightful(World world) { this(world.getSeed(), world.getWorldInfo().getTerrainType(), world.getActualHeight()); } public List <biomegenbase>getBiomesToSpawnIn() { return this.BiomesToSpawnIn; } public BiomeGenBase getBiomeGenAt(int x, int z, BiomeGenBase biome) { this.BiomeCache.func_180284_a(x, z, biome); if(biome == null) { return This_is_Halloween.This_is_Halloween.Evilland; } return biome; } public float[] getRainfall(float[] listToReuse, int x, int z, int width, int length) { if(listToReuse == null || listToReuse.length < width * length) { listToReuse = new float[width * length]; } Arrays.fill(listToReuse, 0, width * length, 0.0F); return listToReuse; } @SideOnly(Side.CLIENT) public float getTemperatureAtHeight(float par1, int par2) { return par1; } public BiomeGenBase[] getBiomesForGeneration(BiomeGenBase[] par1ArrayOfBiomeGenBase, int par2, int par3, int par4, int par5) { IntCache.resetIntCache(); if(par1ArrayOfBiomeGenBase == null || par1ArrayOfBiomeGenBase.length < par4 * par5) { par1ArrayOfBiomeGenBase = new BiomeGenBase[par4 * par5]; } int[] aint = this.GenBiomes.getInts(par2, par3, par4, par5); for(int i = 0; i < par4 * par5; ++i) { if(aint* >= 0) { par1ArrayOfBiomeGenBase* = BiomeGenBase.getBiome(aint*); } else { par1ArrayOfBiomeGenBase* = This_is_Halloween.This_is_Halloween.Evilland; } } return par1ArrayOfBiomeGenBase; } public BiomeGenBase[] loadBlockGeneratorData(BiomeGenBase[] oldBiomeList, int x, int z, int width, int depth) { return this.getBiomeGenAt(oldBiomeList, x, z, width, depth, true); } public BiomeGenBase[] getBiomeGenAt(BiomeGenBase[] listToReuse, int x, int z, int width, int length, boolean cacheFlag) { IntCache.resetIntCache(); if (listToReuse == null || listToReuse.length < width * length) { listToReuse = new BiomeGenBase[width * length]; } if (cacheFlag && width == 16 && length == 16 && (x & 15) == 0 && (z & 15) == 0) { BiomeGenBase[] abiomegenbase1 = this.BiomeCache.getCachedBiomes(x, z); System.arraycopy(abiomegenbase1, 0, listToReuse, 0, width * length); return listToReuse; } else { int[] aint = this.BiomeIndexLayer.getInts(x, z, width, length); for(int i1 = 0; i1 < width * length; ++i1) { if(aint[i1] >= 0) { listToReuse[i1] = BiomeGenBase.getBiome(aint[i1]); } else { listToReuse[i1] = This_is_Halloween.This_is_Halloween.Evilland; } } return listToReuse; } } public boolean areBiomesViable(int par1, int par2, int par3, List par4List) { IntCache.resetIntCache(); int l = par1 - par3 >> 2; int i1 = par2 - par3 >> 2; int j1 = par1 + par3 >> 2; int k1 = par2 + par3 >> 2; int l1 = j1 - l + 1; int i2 = k1 - i1 + 1; int[] aint = this.GenBiomes.getInts(l, i1, l1, i2); for(int j2 = 0; j2 < l1 * i2; ++j2) { BiomeGenBase biomegenbase = BiomeGenBase.getBiome(aint[j2]); if(!par4List.contains(biomegenbase)) { return false; } } return true; } public BlockPos findBiomePosition(int x, int z, int range, List list, Random random) { IntCache.resetIntCache(); int l = x - range >> 2; int i1 = z - range >> 2; int j1 = x + range >> 2; int k1 = z + range >> 2; int l1 = j1 - l + 1; int i2 = k1 - i1 + 1; int[] aint = this.GenBiomes.getInts(l, i1, l1, i2); BlockPos blockpos = null; int j2 = 0; for(int k2 = 0; k2 < l1 * i2; ++k2) { int l2 = l + k2 % l1 << 2; int i3 = i1 + k2 / l1 << 2; BiomeGenBase biomegenbase = BiomeGenBase.getBiome(aint[k2]); if(((List<biomegenbase>)BiomeCache).contains(biomegenbase) && (blockpos == null || random.nextInt(j2 + 1) == 0)) { blockpos = new BlockPos(l2, 0, i3); ++j2; } } return blockpos; } public void cleanupCache() { this.BiomeCache.cleanupCache(); } }
WorldProviderFrightful (d’ailleurs, avez-vous une méthode pour modifier la couleur du ciel, le code de la 1.7 ne marchant plus, ?):
package This_is_Halloween.Frightful; import This_is_Halloween.This_is_Halloween; import net.minecraft.entity.Entity; import net.minecraft.init.Blocks; import net.minecraft.util.BlockPos; import net.minecraft.util.MathHelper; import net.minecraft.util.Vec3; import net.minecraft.world.World; import net.minecraft.world.WorldProvider; import net.minecraft.world.WorldProviderHell; import net.minecraft.world.WorldProviderSurface; import net.minecraft.world.WorldType; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.chunk.IChunkProvider; import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.Side; public class WorldProviderFrightful extends WorldProvider{ private WorldType terrainType; private String generatorSettings; public void registerWorldChunkManager() { this.worldChunkMgr = new WorldChunkManagerFrightful(worldObj.getSeed(), terrainType, dimensionId); this.hasNoSky = false; this.dimensionId = This_is_Halloween.dimensionID; this.isHellWorld = false; } public IChunkProvider createChunkGenerator() { return new ChunkProviderFrightful(this.worldObj, this.worldObj.getSeed(), false, generatorSettings); } public String getDimensionName() { return This_is_Halloween.dimensionName; } public String getSaveFolder() { return this.getDimensionName(); } public boolean isSurfaceWorld() { return false; } public boolean canRespawnHere() { return false; } public boolean getWorldHasVoidParticles() { return true; } public int getHeight() { return 256; } protected void generateLightBrightnessTable() { float f = 0.2F; for(int i = 0; i <= 15; ++i) { float f1 = 1.0F - (float)i / 15.0F; this.lightBrightnessTable* = (1.0F - f1) / (f1 * 3.0F + 1.0F) * (1.0F - f) + f; } } // Moon's and Sun's Angle public float calculateCelestialAngle(long par1, float par2) { int j = (int)(par1 % 24000L); float f1 = ((float)j + par2) / 24000.0F - 0.25F; if(f1 < 0.0F) { ++f1; } if(f1 > 1.0F) { –f1; } float f2 = f1; f1 = 1.0F - (float)((Math.cos((double)f1 * Math.PI) + 1.0D) / 2.0D); f1 = f2 + (f1 - f2) / 3.0F; return f1; } public int getMoonPhase(long par1) { return (int)(par1 / 24000L % 8L + 8L) % 8; } @SideOnly(Side.CLIENT) public boolean isSkyColored() { return false; } /**@Override public Vec3 getSkyColor(Entity cameraEntity, float partialTicks) { return Vec3.createVectorHelper(10, 0, 20); }**/ @Override public String getInternalNameSuffix() { return this.getSaveFolder(); } public boolean canCoordinateBeSpawn(BlockPos pos) { int par1 = pos.getX(); int par2 = pos.getZ(); return this.worldObj.getTopSolidOrLiquidBlock(new BlockPos(par1, 0, par2)).equals(Blocks.grass); } }
BiomeGenEvilland (le biome)
package This_is_Halloween.Frightful; import java.util.Random; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.gen.feature.WorldGenTrees; import net.minecraft.world.gen.feature.WorldGenerator; import This_is_Halloween.Entity.EntityEvilChicken; import This_is_Halloween.Entity.EntityEvilCow; import This_is_Halloween.Entity.EntityEvilPig; import This_is_Halloween.Entity.EntityEvilSheep; import This_is_Halloween.Entity.EntityGhost; import This_is_Halloween.Entity.EntityMummy; import This_is_Halloween.Entity.EntityVampire; public class BiomeGenEvilland extends BiomeGenBase{ public BiomeGenEvilland(int par1) { super(par1); this.spawnableCreatureList.clear(); this.spawnableCaveCreatureList.clear(); this.spawnableMonsterList.clear(); this.spawnableWaterCreatureList.clear(); this.spawnableMonsterList.add(new SpawnListEntry(EntityEvilPig.class, 40, 8, 10)); this.spawnableMonsterList.add(new SpawnListEntry(EntityEvilSheep.class, 40, 8, 10)); this.spawnableMonsterList.add(new SpawnListEntry(EntityEvilChicken.class, 40, 8, 10)); this.spawnableMonsterList.add(new SpawnListEntry(EntityEvilCow.class, 40, 8, 10)); this.spawnableMonsterList.add(new SpawnListEntry(EntityMummy.class, 50, 1, 4)); this.spawnableMonsterList.add(new SpawnListEntry(EntityVampire.class, 50, 1, 4)); this.spawnableMonsterList.add(new SpawnListEntry(EntityGhost.class, 50, 1, 4)); this.topBlock = Blocks.grass.getDefaultState(); this.fillerBlock = Blocks.dirt.getDefaultState(); this.theBiomeDecorator.treesPerChunk = 5; this.theBiomeDecorator.generateLakes = true; this.theBiomeDecorator.grassPerChunk = 5; this.theBiomeDecorator.flowersPerChunk = 4; this.theBiomeDecorator.mushroomsPerChunk = 2; this.theBiomeDecorator.reedsPerChunk = 2; } public WorldGenerator getRandomWorldGenForTrees(Random par1Random) { return (WorldGenerator)(par1Random.nextInt(10) == 0 ? this.worldGeneratorBigTree : new WorldGenTrees(false, 4, 0, 0, false)); } }
Voilà
Merci d’avanceEDIT : je viens de trouver un autre problème, mais cette fois c’est avec le portal : si on reste dedans (ou qu’on en ressorte, c’est pareil), ça me reTP, et c’est comme ça en boucle. Même quand je met en pause, ca me remet en jeu pour TP. J’ai aussi un peut trouvé un bout de solution pour le 1er problème du portail : ça me TP dans Frightful à la couche du portail dans l’Overworld. C’est pas plus mal, ça peut corser un peu plus. Mais ça me met toujours dans des blocks,
Voilà donc ma classe du teleporter (à mon avis, c’est dedans) :
package This_is_Halloween.Frightful; import com.google.common.collect.Lists; import This_is_Halloween.CreateBlocks; import This_is_Halloween.Block.BlockPortalFrightful; import java.util.Iterator; import java.util.List; import java.util.Random; import net.minecraft.block.BlockPortal; import net.minecraft.block.BlockPumpkin; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.init.Blocks; import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraft.util.LongHashMap; import net.minecraft.util.MathHelper; import net.minecraft.world.ChunkCoordIntPair; import net.minecraft.world.Teleporter; import net.minecraft.world.WorldServer; public class TeleporterFrightful extends Teleporter { private final WorldServer worldServerInstance; /** A private Random() function in Teleporter */ private final Random random; /** Stores successful portal placement locations for rapid lookup. */ private final LongHashMap destinationCoordinateCache = new LongHashMap(); /** * A list of valid keys for the destinationCoordainteCache. These are based on the X & Z of the players initial * location. */ private final List destinationCoordinateKeys = Lists.newArrayList(); public TeleporterFrightful(WorldServer worldServer) { super(worldServer); this.worldServerInstance = worldServer; this.random = new Random(worldServer.getSeed()); } public void placeInPortal(Entity entityIn, float rotationYaw) { if (this.worldServerInstance.provider.getDimensionId() != 1) { if (!this.placeInExistingPortal(entityIn, rotationYaw)) { this.makePortal(entityIn); this.placeInExistingPortal(entityIn, rotationYaw); } } else { int i = MathHelper.floor_double(entityIn.posX); int j = MathHelper.floor_double(entityIn.posY) - 1; int k = MathHelper.floor_double(entityIn.posZ); byte b0 = 1; byte b1 = 0; for (int l = -2; l <= 2; ++l) { for (int i1 = -2; i1 <= 2; ++i1) { for (int j1 = -1; j1 < 3; ++j1) { int k1 = i + i1 * b0 + l * b1; int l1 = j + j1; int i2 = k + i1 * b1 - l * b0; boolean flag = j1 < 0; this.worldServerInstance.setBlockState(new BlockPos(k1, l1, i2), flag ? Blocks.pumpkin.getDefaultState() : Blocks.air.getDefaultState().withProperty(BlockPumpkin.FACING, EnumFacing.NORTH)); } } } entityIn.setLocationAndAngles((double)i, (double)j, (double)k, entityIn.rotationYaw, 0.0F); entityIn.motionX = entityIn.motionY = entityIn.motionZ = 0.0D; } } public boolean placeInExistingPortal(Entity entityIn, float p_180620_2_) { boolean flag = true; double d0 = -1.0D; int i = MathHelper.floor_double(entityIn.posX); int j = MathHelper.floor_double(entityIn.posZ); boolean flag1 = true; Object object = BlockPos.ORIGIN; long k = ChunkCoordIntPair.chunkXZ2Int(i, j); if (this.destinationCoordinateCache.containsItem(k)) { TeleporterFrightful.PortalPosition portalposition = (TeleporterFrightful.PortalPosition)this.destinationCoordinateCache.getValueByKey(k); d0 = 0.0D; object = portalposition; portalposition.lastUpdateTime = this.worldServerInstance.getTotalWorldTime(); flag1 = false; } else { BlockPos blockpos4 = new BlockPos(entityIn); for (int l = -128; l <= 128; ++l) { BlockPos blockpos1; for (int i1 = -128; i1 <= 128; ++i1) { for (BlockPos blockpos = blockpos4.add(l, this.worldServerInstance.getActualHeight() - 1 - blockpos4.getY(), i1); blockpos.getY() >= 0; blockpos = blockpos1) { blockpos1 = blockpos.down(); if (this.worldServerInstance.getBlockState(blockpos).getBlock() == CreateBlocks.PortalFrightful) { while (this.worldServerInstance.getBlockState(blockpos1 = blockpos.down()).getBlock() == CreateBlocks.PortalFrightful) { blockpos = blockpos1; } double d1 = blockpos.distanceSq(blockpos4); if (d0 < 0.0D || d1 < d0) { d0 = d1; object = blockpos; } } } } } } if (d0 >= 0.0D) { if (flag1) { this.destinationCoordinateCache.add(k, new TeleporterFrightful.PortalPosition((BlockPos)object, this.worldServerInstance.getTotalWorldTime())); this.destinationCoordinateKeys.add(Long.valueOf(k)); } double d4 = (double)((BlockPos)object).getX() + 0.5D; double d5 = (double)((BlockPos)object).getY() + 0.5D; double d6 = (double)((BlockPos)object).getZ() + 0.5D; EnumFacing enumfacing = null; if (this.worldServerInstance.getBlockState(((BlockPos)object).west()).getBlock() == CreateBlocks.PortalFrightful) { enumfacing = EnumFacing.NORTH; } if (this.worldServerInstance.getBlockState(((BlockPos)object).east()).getBlock() == CreateBlocks.PortalFrightful) { enumfacing = EnumFacing.SOUTH; } if (this.worldServerInstance.getBlockState(((BlockPos)object).north()).getBlock() == CreateBlocks.PortalFrightful) { enumfacing = EnumFacing.EAST; } if (this.worldServerInstance.getBlockState(((BlockPos)object).south()).getBlock() == CreateBlocks.PortalFrightful) { enumfacing = EnumFacing.WEST; } EnumFacing enumfacing1 = EnumFacing.getHorizontal(entityIn.getTeleportDirection()); if (enumfacing != null) { EnumFacing enumfacing2 = enumfacing.rotateYCCW(); BlockPos blockpos2 = ((BlockPos)object).offset(enumfacing); boolean flag2 = this.func_180265_a(blockpos2); boolean flag3 = this.func_180265_a(blockpos2.offset(enumfacing2)); if (flag3 && flag2) { object = ((BlockPos)object).offset(enumfacing2); enumfacing = enumfacing.getOpposite(); enumfacing2 = enumfacing2.getOpposite(); BlockPos blockpos3 = ((BlockPos)object).offset(enumfacing); flag2 = this.func_180265_a(blockpos3); flag3 = this.func_180265_a(blockpos3.offset(enumfacing2)); } float f6 = 0.5F; float f1 = 0.5F; if (!flag3 && flag2) { f6 = 1.0F; } else if (flag3 && !flag2) { f6 = 0.0F; } else if (flag3) { f1 = 0.0F; } d4 = (double)((BlockPos)object).getX() + 0.5D; d5 = (double)((BlockPos)object).getY() + 0.5D; d6 = (double)((BlockPos)object).getZ() + 0.5D; d4 += (double)((float)enumfacing2.getFrontOffsetX() * f6 + (float)enumfacing.getFrontOffsetX() * f1); d6 += (double)((float)enumfacing2.getFrontOffsetZ() * f6 + (float)enumfacing.getFrontOffsetZ() * f1); float f2 = 0.0F; float f3 = 0.0F; float f4 = 0.0F; float f5 = 0.0F; if (enumfacing == enumfacing1) { f2 = 1.0F; f3 = 1.0F; } else if (enumfacing == enumfacing1.getOpposite()) { f2 = -1.0F; f3 = -1.0F; } else if (enumfacing == enumfacing1.rotateY()) { f4 = 1.0F; f5 = -1.0F; } else { f4 = -1.0F; f5 = 1.0F; } double d2 = entityIn.motionX; double d3 = entityIn.motionZ; entityIn.motionX = d2 * (double)f2 + d3 * (double)f5; entityIn.motionZ = d2 * (double)f4 + d3 * (double)f3; entityIn.rotationYaw = p_180620_2_ - (float)(enumfacing1.getHorizontalIndex() * 90) + (float)(enumfacing.getHorizontalIndex() * 90); } else { entityIn.motionX = entityIn.motionY = entityIn.motionZ = 0.0D; } entityIn.setLocationAndAngles(d4, d5, d6, entityIn.rotationYaw, entityIn.rotationPitch); return true; } else { return false; } } private boolean func_180265_a(BlockPos p_180265_1_) { return !this.worldServerInstance.isAirBlock(p_180265_1_) || !this.worldServerInstance.isAirBlock(p_180265_1_.up()); } public boolean makePortal(Entity p_85188_1_) { byte b0 = 16; double d0 = -1.0D; int i = MathHelper.floor_double(p_85188_1_.posX); int j = MathHelper.floor_double(p_85188_1_.posY); int k = MathHelper.floor_double(p_85188_1_.posZ); int l = i; int i1 = j; int j1 = k; int k1 = 0; int l1 = this.random.nextInt(4); int i2; double d1; int k2; double d2; int i3; int j3; int k3; int l3; int i4; int j4; int k4; int l4; int i5; double d3; double d4; for (i2 = i - b0; i2 <= i + b0; ++i2) { d1 = (double)i2 + 0.5D - p_85188_1_.posX; for (k2 = k - b0; k2 <= k + b0; ++k2) { d2 = (double)k2 + 0.5D - p_85188_1_.posZ; label271: for (i3 = this.worldServerInstance.getActualHeight() - 1; i3 >= 0; --i3) { if (this.worldServerInstance.isAirBlock(new BlockPos(i2, i3, k2))) { while (i3 > 0 && this.worldServerInstance.isAirBlock(new BlockPos(i2, i3 - 1, k2))) { --i3; } for (j3 = l1; j3 < l1 + 4; ++j3) { k3 = j3 % 2; l3 = 1 - k3; if (j3 % 4 >= 2) { k3 = -k3; l3 = -l3; } for (i4 = 0; i4 < 3; ++i4) { for (j4 = 0; j4 < 4; ++j4) { for (k4 = -1; k4 < 4; ++k4) { l4 = i2 + (j4 - 1) * k3 + i4 * l3; i5 = i3 + k4; int j5 = k2 + (j4 - 1) * l3 - i4 * k3; if (k4 < 0 && !this.worldServerInstance.getBlockState(new BlockPos(l4, i5, j5)).getBlock().getMaterial().isSolid() || k4 >= 0 && !this.worldServerInstance.isAirBlock(new BlockPos(l4, i5, j5))) { continue label271; } } } } d3 = (double)i3 + 0.5D - p_85188_1_.posY; d4 = d1 * d1 + d3 * d3 + d2 * d2; if (d0 < 0.0D || d4 < d0) { d0 = d4; l = i2; i1 = i3; j1 = k2; k1 = j3 % 4; } } } } } } if (d0 < 0.0D) { for (i2 = i - b0; i2 <= i + b0; ++i2) { d1 = (double)i2 + 0.5D - p_85188_1_.posX; for (k2 = k - b0; k2 <= k + b0; ++k2) { d2 = (double)k2 + 0.5D - p_85188_1_.posZ; label219: for (i3 = this.worldServerInstance.getActualHeight() - 1; i3 >= 0; --i3) { if (this.worldServerInstance.isAirBlock(new BlockPos(i2, i3, k2))) { while (i3 > 0 && this.worldServerInstance.isAirBlock(new BlockPos(i2, i3 - 1, k2))) { --i3; } for (j3 = l1; j3 < l1 + 2; ++j3) { k3 = j3 % 2; l3 = 1 - k3; for (i4 = 0; i4 < 4; ++i4) { for (j4 = -1; j4 < 4; ++j4) { k4 = i2 + (i4 - 1) * k3; l4 = i3 + j4; i5 = k2 + (i4 - 1) * l3; if (j4 < 0 && !this.worldServerInstance.getBlockState(new BlockPos(k4, l4, i5)).getBlock().getMaterial().isSolid() || j4 >= 0 && !this.worldServerInstance.isAirBlock(new BlockPos(k4, l4, i5))) { continue label219; } } } d3 = (double)i3 + 0.5D - p_85188_1_.posY; d4 = d1 * d1 + d3 * d3 + d2 * d2; if (d0 < 0.0D || d4 < d0) { d0 = d4; l = i2; i1 = i3; j1 = k2; k1 = j3 % 2; } } } } } } } int k5 = l; int j2 = i1; k2 = j1; int l5 = k1 % 2; int l2 = 1 - l5; if (k1 % 4 >= 2) { l5 = -l5; l2 = -l2; } if (d0 < 0.0D) { i1 = MathHelper.clamp_int(i1, 70, this.worldServerInstance.getActualHeight() - 10); j2 = i1; for (i3 = -1; i3 <= 1; ++i3) { for (j3 = 1; j3 < 3; ++j3) { for (k3 = -1; k3 < 3; ++k3) { l3 = k5 + (j3 - 1) * l5 + i3 * l2; i4 = j2 + k3; j4 = k2 + (j3 - 1) * l2 - i3 * l5; boolean flag = k3 < 0; this.worldServerInstance.setBlockState(new BlockPos(l3, i4, j4), flag ? Blocks.pumpkin.getDefaultState() : Blocks.air.getDefaultState().withProperty(BlockPumpkin.FACING, EnumFacing.NORTH)); } } } } IBlockState iblockstate = CreateBlocks.PortalFrightful.getDefaultState().withProperty(BlockPortalFrightful.AXIS, l5 != 0 ? EnumFacing.Axis.X : EnumFacing.Axis.Z); for (j3 = 0; j3 < 4; ++j3) { for (k3 = 0; k3 < 4; ++k3) { for (l3 = -1; l3 < 4; ++l3) { i4 = k5 + (k3 - 1) * l5; j4 = j2 + l3; k4 = k2 + (k3 - 1) * l2; boolean flag1 = k3 == 0 || k3 == 3 || l3 == -1 || l3 == 3; this.worldServerInstance.setBlockState(new BlockPos(i4, j4, k4), flag1 ? Blocks.pumpkin.getDefaultState().withProperty(BlockPumpkin.FACING, EnumFacing.NORTH) : iblockstate, 2); } } for (k3 = 0; k3 < 4; ++k3) { for (l3 = -1; l3 < 4; ++l3) { i4 = k5 + (k3 - 1) * l5; j4 = j2 + l3; k4 = k2 + (k3 - 1) * l2; this.worldServerInstance.notifyNeighborsOfStateChange(new BlockPos(i4, j4, k4), this.worldServerInstance.getBlockState(new BlockPos(i4, j4, k4)).getBlock()); } } } return true; } /** * called periodically to remove out-of-date portal locations from the cache list. Argument par1 is a * WorldServer.getTotalWorldTime() value. */ public void removeStalePortalLocations(long p_85189_1_) { if (p_85189_1_ % 100L == 0L) { Iterator iterator = this.destinationCoordinateKeys.iterator(); long j = p_85189_1_ - 600L; while (iterator.hasNext()) { Long olong = (Long)iterator.next(); TeleporterFrightful.PortalPosition portalposition = (TeleporterFrightful.PortalPosition)this.destinationCoordinateCache.getValueByKey(olong.longValue()); if (portalposition == null || portalposition.lastUpdateTime < j) { iterator.remove(); this.destinationCoordinateCache.remove(olong.longValue()); } } } } public class PortalPosition extends BlockPos { /** The worldtime at which this PortalPosition was last verified */ public long lastUpdateTime; public PortalPosition(BlockPos pos, long p_i45747_3_) { super(pos.getX(), pos.getY(), pos.getZ()); this.lastUpdateTime = p_i45747_3_; } } } ```</biomegenbase></biomegenbase></biomegenbase></biomegenbase>
-
Salut
J’ai regardé précisément dans toutes les classes qui concerne plus ou moins loin le monde (à part le biome, qui n’à absolument rien à voir avec mes problèmes), mais je n’ai rien trouvé. J’ai re-regardé mes classes en comparant avec ceux vanilla pour voir si il manquait du code, mais non.En espérant que quelqu’un puisse m’aider…
PS : je continue tout de même à chercher
-
Change
java TeleporterFrightful
par ```java
Teleporter -
Ca me fais toujours les mêmes bugs. Mais je n’ai pas compris pourquoi changer de nom la classe. Pourrais-tu m’expliquer stp ?
-
Non pas changer le nom de classe mais par exemple ceci ```java
TeleporterFrightful.PortalPosition portalposition = (TeleporterFrightful.PortalPosition)this.destinationCoordinateCache.getValueByKey(k);en ```java Teleporter.PortalPosition portalposition = (Teleporter.PortalPosition)this.destinationCoordinateCache.getValueByKey(k);
Désolé j’ai pas préciser ^^
-
Salut
Ca ne marche malheureusement pas. Mais je ne comprend pas pourquoi ça ne marche pas. C’est censé faire comme le Nether (me faire spawner sur des blocks et dans de l’air). -
@‘Axaurus’:
Salut
Ca ne marche malheureusement pas. Mais je ne comprend pas pourquoi ça ne marche pas. C’est censé faire comme le Nether (me faire spawner sur des blocks et dans de l’air).Quand tu rentre dans la dimension est-ce que le portail ce créer entièrement ? Donc est-ce qu’il y a la structure et le portail à l’intérieur , sinon le portail n’apparaît pas ca vient de la …
-
Non, le portail ne se créer jamais entièrement. Il y a seulement les citrouilles, jamais le portail. Que les citrouilles soient dans la bonne direction ou dans les mauvaises (il faut qu’elles soient orientées vers le Nord), c’est pareil. De plus, quand je créer le portail moi-même, il n’a pas de temps d’attente entre chaque TP.
-
moi je sais pas pourquoi mais je dit que t’ai problème sont normaux… Regarde comment est fait le teleporter de mc. Je pense que ça devrais suffir tu comprendra pas toi même.
-
Salut
J’ai testé plein de truc, mais aucun n’ont marché. J’ai d’ailleurs découvert que les bugs ne viennent de la classe teleporter, mais de la classe block du portail. J’ai tout de même régler un bug : celui du délai qui était trop court. En fait, il suffisait d’augementer le nombre dans :%(#6a3e3e)[[size=small]player].%(#0000c0)[[size=small]timeUntilPortal] = 50;
ce qui, d’ailleurs, est très logique quand on y pense.
Voilà
Si vous savez comment faire pour les autres bug, n’hésitez pasPS : je ne l’ai pas préciser, mais parfois le spawn marche bien : je spawn dans l’eau ou à coter du portail (éteint), mais cela reste très rare.
-
Le fait que tu spawn pas forcepent dehors c est normal… regarde ton code
Envoyé de mon GT-S7390G