Everything posted by Sessional
-
Searching tutorials for Minecraft 1.8
As an addition: Wuppy29 has some basic tutorials set up for 1.8 conversion from 1.7.
-
Extremely Slow Chunk Generation
Got it working mostly. The solution: ChunkPrimer. The chunk primer is a container that can generate a chunk and ignore all the events and updates that need to be fired. Alternately: my perlin noise generator is slower than the previous one I worked with, just a secondary issue on top of it.
-
Extremely Slow Chunk Generation
Where does this flag get set? I can't seem to find an option for a flag inside the chunk.setBlockState() method EDIT: If it matters this is working with forge for 1.8
-
Extremely Slow Chunk Generation
I'm attempting to work with world generation, currently I am simply doing nothing but generating a layer of bedrock at y=1 and a layer of dirt at y=63. Looking below, it takes almost a full minute to generate the spawn area - I must be doing something wrong for that to be the case when it's just 32 blocks per chunk, where as it only takes 10 seconds for the default world generator to do it. [21:10:40] [server thread/INFO]: Preparing start region for level 0 [21:10:42] [server thread/INFO]: Preparing spawn area: 13% [21:10:43] [server thread/INFO]: Preparing spawn area: 14% [21:10:44] [server thread/INFO]: Preparing spawn area: 16% [21:10:45] [server thread/INFO]: Preparing spawn area: 18% [21:10:46] [server thread/INFO]: Preparing spawn area: 19% [21:10:47] [server thread/INFO]: Preparing spawn area: 21% [21:10:48] [server thread/INFO]: Preparing spawn area: 23% [21:10:49] [server thread/INFO]: Preparing spawn area: 25% [21:10:50] [server thread/INFO]: Preparing spawn area: 26% [21:10:51] [server thread/INFO]: Preparing spawn area: 28% [21:10:53] [server thread/INFO]: Preparing spawn area: 29% [21:10:54] [server thread/INFO]: Preparing spawn area: 31% [21:10:55] [server thread/INFO]: Preparing spawn area: 33% [21:10:56] [server thread/INFO]: Preparing spawn area: 35% [21:10:57] [server thread/INFO]: Preparing spawn area: 37% [21:10:58] [server thread/INFO]: Preparing spawn area: 38% [21:10:59] [server thread/INFO]: Preparing spawn area: 40% [21:11:00] [server thread/INFO]: Preparing spawn area: 42% [21:11:01] [server thread/INFO]: Preparing spawn area: 43% [21:11:03] [server thread/INFO]: Preparing spawn area: 46% [21:11:04] [server thread/INFO]: Preparing spawn area: 48% [21:11:05] [server thread/INFO]: Preparing spawn area: 49% [21:11:06] [server thread/INFO]: Preparing spawn area: 50% [21:11:07] [server thread/INFO]: Preparing spawn area: 52% [21:11:08] [server thread/INFO]: Preparing spawn area: 53% [21:11:09] [server thread/INFO]: Preparing spawn area: 55% [21:11:10] [server thread/INFO]: Preparing spawn area: 56% [21:11:12] [server thread/INFO]: Preparing spawn area: 58% [21:11:13] [server thread/INFO]: Preparing spawn area: 59% [21:11:14] [server thread/INFO]: Preparing spawn area: 61% [21:11:15] [server thread/INFO]: Preparing spawn area: 62% [21:11:16] [server thread/INFO]: Preparing spawn area: 63% [21:11:17] [server thread/INFO]: Preparing spawn area: 65% [21:11:18] [server thread/INFO]: Preparing spawn area: 66% [21:11:19] [server thread/INFO]: Preparing spawn area: 68% [21:11:20] [server thread/INFO]: Preparing spawn area: 70% [21:11:21] [server thread/INFO]: Preparing spawn area: 71% [21:11:22] [server thread/INFO]: Preparing spawn area: 73% [21:11:23] [server thread/INFO]: Preparing spawn area: 74% [21:11:25] [server thread/INFO]: Preparing spawn area: 76% [21:11:26] [server thread/INFO]: Preparing spawn area: 78% [21:11:27] [server thread/INFO]: Preparing spawn area: 79% [21:11:28] [server thread/INFO]: Preparing spawn area: 81% [21:11:29] [server thread/INFO]: Preparing spawn area: 82% [21:11:30] [server thread/INFO]: Preparing spawn area: 83% [21:11:31] [server thread/INFO]: Preparing spawn area: 86% [21:11:32] [server thread/INFO]: Preparing spawn area: 87% [21:11:33] [server thread/INFO]: Preparing spawn area: 89% [21:11:34] [server thread/INFO]: Preparing spawn area: 90% [21:11:35] [server thread/INFO]: Preparing spawn area: 92% [21:11:36] [server thread/INFO]: Preparing spawn area: 94% [21:11:37] [server thread/INFO]: Preparing spawn area: 96% [21:11:38] [server thread/INFO]: Preparing spawn area: 98% [21:11:39] [server thread/INFO]: Changing view distance to 12, from 10 The default generation is shown below: [21:14:32] [server thread/INFO]: Preparing start region for level 0 [21:14:33] [server thread/INFO]: Preparing spawn area: 6% [21:14:34] [server thread/INFO]: Preparing spawn area: 16% [21:14:35] [server thread/INFO]: Preparing spawn area: 27% [21:14:36] [server thread/INFO]: Preparing spawn area: 40% [21:14:37] [server thread/INFO]: Preparing spawn area: 52% [21:14:38] [server thread/INFO]: Preparing spawn area: 64% [21:14:39] [server thread/INFO]: Preparing spawn area: 77% [21:14:40] [server thread/INFO]: Preparing spawn area: 89% [21:14:41] [server thread/INFO]: Preparing spawn area: 98% [21:14:42] [server thread/INFO]: Changing view distance to 12, from 10 My code is as follows: The world type: public class TestWorldType extends WorldType implements ICustomWorldGenerator { public TestWorldType() { super("Fantasy"); } @Override public WorldChunkManager getChunkManager(World world) { return new TestWorldChunkManager(world); } @Override public IChunkProvider getChunkGenerator(World world, String generatorOptions) { //creates the terrain return new TestWorldChunkProvider(world); } @Override public int getMinimumSpawnHeight(World world) { return 64; } @Override public double getHorizon(World world) { return 63; } @Override public double voidFadeMagnitude() { return 0D; } } The chunk manager: public class TestWorldChunkManager extends WorldChunkManager implements ICustomChunkManager { protected World world; protected List biomesToSpawnIn; public TestWorldChunkManager(World world) { biomesToSpawnIn = new ArrayList(); biomesToSpawnIn.add(BiomeGenBase.plains); } @Override public List getBiomesToSpawnIn() { return biomesToSpawnIn; } public BiomeGenBase[] getBiomeGenAt(BiomeGenBase[] listToReuse, int xPos, int zPos, int chunkWidth, int chunkLength, boolean cacheFlag) { //Looks for all the biomes inside a chunk. BiomeGenBase[] biomes = new BiomeGenBase[chunkWidth * chunkLength]; for (int i = 0; i < biomes.length; i++) { biomes[i] = BiomeGenBase.beach; } return biomes; } public float[] getRainfall(float[] listToReuse, int x, int z, int width, int length) { float[] rainfall = new float[width * length]; for (int i = 0; i < rainfall.length; i++) { rainfall[i] = 0; } return rainfall; } public boolean areBiomesViable(int x, int z, int radius, List allowed) { return true; } public BlockPos findBiomePosition(int x, int z, int range, List biomes, Random random) { return new BlockPos(7, 0, 7); } } The chunk provider: public class TestWorldChunkProvider implements IChunkProvider { private Random random; private World world; public TestWorldChunkProvider(World world) { random = new Random(); this.world = world; } @Override public boolean chunkExists(int x, int z) { return true; } @Override public Chunk provideChunk(int x, int z) { random.setSeed((long)x * 341873128712L + (long)z * 132897987541L); Chunk chunk = new Chunk(world, x, z); // Generate 16x16 square of grass blocks at y value of 63. for (int curX=0; curX<16; curX++) { for (int curZ=0; curZ<16; curZ++) { for (int curY = 1; curY < 2; curY++) { chunk.setBlockState(new BlockPos(curX, curY, curZ), Blocks.bedrock.getDefaultState()); } chunk.setBlockState(new BlockPos(curX, 63, curZ), Blocks.dirt.getDefaultState()); } } return chunk; } @Override public Chunk provideChunk(BlockPos blockPosIn) { return provideChunk(blockPosIn.getX() >> 4, blockPosIn.getZ() >> 4); } @Override public void populate(IChunkProvider p_73153_1_, int p_73153_2_, int p_73153_3_) { //add ores in here } @Override public boolean func_177460_a(IChunkProvider p_177460_1_, Chunk p_177460_2_, int p_177460_3_, int p_177460_4_) { return false; } @Override public boolean saveChunks(boolean p_73151_1_, IProgressUpdate p_73151_2_) { return true; } @Override public boolean unloadQueuedChunks() { return false; } @Override public boolean canSave() { return false; } @Override public String makeString() { return null; } @Override public List func_177458_a(EnumCreatureType p_177458_1_, BlockPos p_177458_2_) { return null; } @Override public BlockPos getStrongholdGen(World worldIn, String p_180513_2_, BlockPos p_180513_3_) { return null; } @Override public int getLoadedChunkCount() { return 0; } @Override public void recreateStructures(Chunk p_180514_1_, int p_180514_2_, int p_180514_3_) { } @Override public void saveExtraData() { } } Any insight as to what is so slow about this would be helpful - I would think it shouldn't take that long for it to generate with the 16x16 loop (even with that stupid loop that originally generated multiple layers of bedrock...)...
-
[Solved] Where's the deobfuscated Minecraft files?
The format is: the name minecraft has=Your name here for example: tile.testblock.name=Test Block Would rename the testblock to Test Block. Honestly no idea about building it yet - when you hit run in the eclipse workspace it loads up the assets no problem, so I'm assuming if you build the way intended it'll auto handle packaging the assets for you.
-
[Solved] Where's the deobfuscated Minecraft files?
There is a "lang" folder inside of the assets on 1.7.2 "src\main\resources\assets\modid\lang\en_US.lang"
-
[1.7.2] Block not appearing in CreativeTabs.tabBlock
Alrighty. Looked at your post: What version of 1.7.2 are you using? This method seems to have been renamed in my Block.class. Did it return the "unlocalized name"? If you tell me what it's purpose was I can track it down. brokenObsidianBlock.func_149739_a() Thanks for the response.
-
[1.6.4] Help With Adding a Custom Helmet
What's the error message it's giving you?
-
[1.7.2] Block not appearing in CreativeTabs.tabBlock
Apparently to get it to show up inside the creative inventory you need an ItemBlock instance instead of just having a "Block". I have no idea what the difference is between GameData.itemRegistry and Item.itemRegistry or any other variables. I honestly have no idea if forge manages the item ids or not. This is my first day tinkering with forge and it's got an interesting learning curve if you start on 1.7.2 - things are way different than the tutorials say. testBlock = new BlockStone().setBlockName("testblock").setBlockTextureName("testmod:BlockTut"); GameData.blockRegistry.add(500, "testblock", testBlock); ItemBlock itemBlock = (ItemBlock) new ItemBlock(testBlock).setUnlocalizedName("testBlock").setCreativeTab(CreativeTabs.tabBlock).setTextureName("testmod:BlockTut"); GameData.itemRegistry.add(502, "testblockitem", itemBlock);
-
[1.7.2] Block not appearing in CreativeTabs.tabBlock
@EventHandler public void preInit(FMLPreInitializationEvent event) { testBlock = new BlockStone().setBlockName("testblock").setBlockTextureName("testmod:BlockTut"); Block.blockRegistry.addObject(500, "testblock", testBlock); Item testitem = new TestItem(); Item.itemRegistry.addObject(501, "testitem", testitem); } In 1.7 there is no setUnlocalizedName method (at least that I saw...) There is a setBlockName which I'm assuming is the same thing as the previous method. The id (as far as I can tell should be registering at 500.
-
[1.7.2] Block not appearing in CreativeTabs.tabBlock
I'm working in 1.7.2 forge right now. I am currently running 1027 and can not seem to get a block to appear in the game. I've followed several different tutorials and have not been able to get any of them to work. The ones for 1.6.4 were a little off but usually had some follow up text to change to 1.7.2. Currently I have it in CreativeTabs.tabFood because the list is shorter, but I have not been able to get it to appear in any tab. There is not a single error in the start up output (except something about an rt.jar or something) and there is no problems until I try to find it in the creative inventory or use /give player 500 1, which in theory should give me my block. I get a red message saying "No item with id 500" or something similar. I have managed to get an item to appear in the food tab without a single problem using almost identical code. This code is in the preinitialization event: Block testblock = new TestBlock(); Block.blockRegistry.addObject(500, "testblock", testblock); This class extends net.minecraft.block.Block: public TestBlock() { super(Material.ground); setCreativeTab(CreativeTabs.tabFood); setBlockTextureName("testmod:BlockTut"); }
IPS spam blocked by CleanTalk.