-
Posts
21 -
Joined
-
Last visited
Converted
-
Gender
Undisclosed
-
Personal Text
I am new!
Burpingdog1's Achievements
Tree Puncher (2/8)
0
Reputation
-
Burpingdog1 changed their profile photo
-
yeah was referring to his code, prob shouldn't have posted it but I didn't want to just give him the code either
-
I have never used that before, but my best guess is you'd need to just make the itemstack you are returning from getContainerItem to be 1 less durability than the itemstack parameter... or else no durability loss will occur. Also is the if statement necessary? @Override public ItemStack getContainerItem(ItemStack itemStack) { if (!hasContainerItem(itemStack)) { return ItemStack.EMPTY; } return new ItemStack(getContainerItem()); } @Override public boolean hasContainerItem(ItemStack stack) { return hasContainerItem(); } I'd just have getContainerItem return the item -1 durability & hasContainerItem to true
-
oh, whats the difference between using Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register and ModelLoader.setCustomModelResourceLocation ?
-
I think the problem is in your moditems file, you forgot to give it the destination to your mod folder new ModelResourceLocation(Reference.MOD_ID+":"+item.getRegistryName(), "inventory")
-
creating stone layers using WorldGenerator 1.10.2
Burpingdog1 replied to Burpingdog1's topic in Modder Support
Alright, guess first time I read it forgot the offset part... so I offsetted the x/z values by 8 and it works great! Thanks, now what is the best way in making it gradually turning into the dense stone instead of just going straight to dense stone after y<=30 -
creating stone layers using WorldGenerator 1.10.2
Burpingdog1 replied to Burpingdog1's topic in Modder Support
when loading new chunks the game freezes making me have to force close.. this is my code I used public class WorldGen implements IWorldGenerator { private WorldGenerator genDenseStone; public WorldGen() { genDenseStone = new GenDenseStone(); } @Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider) { switch(world.provider.getDimension()) { case -1: netherGen(world, random, chunkX, chunkZ, chunkGenerator, chunkProvider); break; case 0: overworldGen(world, random, chunkX, chunkZ, chunkGenerator, chunkProvider); break; case 1: endGen(world, random, chunkX, chunkZ); break; } } private void overworldGen(World world, Random random, int chunkX, int chunkZ, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider) { genDenseStone.generate(world, random, new BlockPos(chunkX, 30, chunkZ)); } private void netherGen(World world, Random random, int blockX, int blockZ, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider) { } private void endGen(World world, Random random, int blockX, int blockZ) { } public class GenDenseStone extends WorldGenerator { @Override public boolean generate(World worldIn, Random rand, BlockPos pos) { int x = pos.getX()*16; int yMax = pos.getY(); int z = pos.getZ()*16; for(int a = 0; a < 16; a++) { for(int b = 0; b < 16; b++) { for(int c = 0; c <= yMax; c++) { if(worldIn.getBlockState(new BlockPos(a+x,c,b+z)).getBlock() == Blocks.STONE) { worldIn.setBlockState(new BlockPos(a+x, c, b+z), GCBlocks.denseStone.getDefaultState()); } } } } return true; } } -
creating stone layers using WorldGenerator 1.10.2
Burpingdog1 replied to Burpingdog1's topic in Modder Support
is there an example of how to use ChunkProviders/IChunkGenerators? Through my googling all I found was tutorials using WorldGenerator -
creating stone layers using WorldGenerator 1.10.2
Burpingdog1 replied to Burpingdog1's topic in Modder Support
Few questions, do you know any good tutorials that go in depth with world generation(Explains what chunkX/chunkZ is)? and can I use the ChunkProvider/IChunkGenerator variables in the generate method in the WorldGen class, or would I need to make a new ChunkProvider class? if so would I just use chunkProvider.getLoadedChunk(chunkX, chunkZ).setBlockState(pos, state); -
creating stone layers using WorldGenerator 1.10.2
Burpingdog1 replied to Burpingdog1's topic in Modder Support
any stone below y 50 would be replaced is what I would be doing -
[1.11.2] Having a Throwable Entity Bounce & Land
Burpingdog1 replied to Halpert's topic in Modder Support
look through the entityegg class it might help -
Lately I've been working with WorldGenerator trying to replace stone below a certain y level with a harder stone and I have been stuck for few days figuring out so decided to ask for help on here. public class WorldGen implements IWorldGenerator { private WorldGenerator genDenseStone; public WorldGen() { genDenseStone = new WorldGenDenseStone(); } @Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider) { switch(world.provider.getDimension()) { case -1: netherGen(world, random, chunkX, chunkZ); break; case 0: overworldGen(world, random, chunkX, chunkZ); break; case 1: endGen(world, random, chunkX, chunkZ); break; } } private void overworldGen(World world, Random random, int chunkX, int chunkZ) { } private void netherGen(World world, Random random, int blockX, int blockZ) { } private void endGen(World world, Random random, int blockX, int blockZ) { } } public class WorldGenDenseStone extends WorldGenerator { @Override public boolean generate(World worldIn, Random rand, BlockPos pos) { return false; } } the worldgen class for dense stone is default because I've been taking away code since it wasn't working guessing I don't really have a good idea how generating stuff works even at looking at some tutorials. I am bad at explaining, so hope you guys understand what i mean and can push me in the right direction
-
you probably hava a 32bit java installed, had this problem before install the 64bit
-
[Solved]metadata checking causes crash problem
Burpingdog1 replied to Burpingdog1's topic in Modder Support
Getting the pickblock, saving it to a variable, and checking if it is null? Like, how else? Yeah, forgot to take out the getDisplayName so kept crashing... Seems as if I had a long day lol -
[Solved]metadata checking causes crash problem
Burpingdog1 replied to Burpingdog1's topic in Modder Support
the getDisplayName().equals() one, how would I check if the block doesnt have a pickItem? -
[Solved]metadata checking causes crash problem
Burpingdog1 replied to Burpingdog1's topic in Modder Support
Ah thanks for the reminder of that, derpy old me public class LookGUI extends GuiScreen { public LookGUI(Minecraft mc, EntityPlayer player ) { if(mc.currentScreen == null ) { ScaledResolution scale = new ScaledResolution(mc); int width = scale.getScaledWidth(); int height = scale.getScaledHeight(); RayTraceResult coords = mc.getRenderViewEntity().rayTrace(5, 1); Block blockLookingAt = mc.theWorld.getBlockState(coords.getBlockPos()).getBlock() ; String name =""; if(!(blockLookingAt.equals(Blocks.AIR))) { if(blockLookingAt.getPickBlock(mc.theWorld.getBlockState(coords.getBlockPos()), coords, mc.theWorld, coords.getBlockPos(), player).getDisplayName().equals(null)) name=blockLookingAt.getLocalizedName(); else name = blockLookingAt.getPickBlock(mc.theWorld.getBlockState(coords.getBlockPos()), coords, mc.theWorld, coords.getBlockPos(), player).getDisplayName(); if(name != null)drawCenteredString(mc.fontRendererObj, name, width/2, 5, Integer.parseInt("FFAA00", 16)); } } } } line 44 is near the null checker I have the if(blockLookingAt.getPickBlock(mc.theWorld.getBlockState(coords.getBlockPos()), coords, mc.theWorld, coords.getBlockPos(), player).getDisplayName().equals(null))