Jump to content

james090500

Members
  • Posts

    29
  • Joined

  • Last visited

Everything posted by james090500

  1. this is what I have so far public class ClientProxy implements CommonProxy { //Calling ONLY on client side @Override public void init() { BetterMCItems.registerRenders(); BetterMCBlocks.registerRenders(); BetterMCTools.registerRenders(); Minecraft.getMinecraft().getBlockColors().registerBlockColorHandler(new IBlockColor() { @Override public int colorMultiplier(IBlockState state, IBlockAccess worldIn, BlockPos pos, int tintIndex) { return worldIn.getBiomeGenForCoords(pos).getFoliageColorAtPos(pos); } }, BetterMCBlocks.FenceLeaves); } It is still however showing the texture as the grey leaves. Would I need to update anything with my json? I'm a little stumped
  2. And where would I register it? The block class? PreInit, init?
  3. BlockLeaves contains nothing for colourizing. I did try including this just after my block registration but that didn't seem to work. registerBlock(FenceLeaves); BlockColors bc = new BlockColors(); bc.registerBlockColorHandler(new IBlockColor() { @Override public int colorMultiplier(IBlockState state, IBlockAccess worldIn, BlockPos pos, int tintIndex) { return worldIn != null && pos != null ? BiomeColorHelper.getFoliageColorAtPos(worldIn, pos) : ColorizerFoliage.getFoliageColorBasic(); } }, new Block[] { BetterMCBlocks.FenceLeaves });
  4. Hello, I've searched far and wide but i am at a lost. I am making a new block which uses the leaf texture. How would I got about adjusting the color so it's not grey and is the color of leaves in the surrounding biome? So far i've tried @Override public boolean recolorBlock(World world, BlockPos pos, EnumFacing side, EnumDyeColor color) { return super.recolorBlock(world, pos, side, color.GREEN); } And that's not working, I can't find any other methods though.
  5. Even with no super, the collisionbox is now 1 block bigger than it should be. @Override public void addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> collidingBoxes, Entity entityIn) { collidingBoxes.add(BOUNDING_BOX); } Fixed. I just returned Bounding_BOX instead of adding it, @Override public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, World worldIn, BlockPos pos) { return BOUNDING_BOX; }
  6. I was wrong, but still kicking me out when ever i try walk into the place where there should be no collision
  7. No, I've found the issue. AxisAlignedBB wont work out math, so doing eg; 0.5 * 2 would mess up the collision box. Instead put the answer in there
  8. I'm affraid that didn't work, @Override public void addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> collidingBoxes, Entity entityIn) { collidingBoxes.add(BOUNDING_BOX); super.addCollisionBoxToList(pos, entityBox, collidingBoxes, BOUNDING_BOX); } All it did was make the hitbox larger, so now it's 1 block bigger than it was previously.
  9. I'm not entirely sure what you mean? Do you mean put this: super.addCollisionBoxToList(pos, entityBox, collidingBoxes, new AxisAlignedBB(0, 0, 0, 0.0625 * 8, 1, 1)); instead?
  10. Hello, So basically my custom block is still thinking it's a full block. If i try walk into the empty side it lets me in a little bit then pushes me out again. Some pictures
  11. Hello! I'm extremely stuck, I've been testing and trying for 8 hours but I'm going no where. I need my mod to read a json file which contains information about players. I need it to be able to do this.... JSON "Player1": [ "status": "offline", "mode": "null", "server": "null" ] "Player2": [ "status": "online", "mode": "single", "server": "null" ] "Player3": [ "status": "online", "mode": "mp", "server": "mc.Example.net" ] JSON json = new JSON(new FileReader("file.json")); List<String> names = new ArrayList<String>(); String line = json.getTitles(); <-- Get Player1, Player2, Player3 while(line !=null) results.add(line); } --- AND --- JSON json = new JSON(new FileReader("file.json")); List<String> names = new ArrayList<String>(); String line = json.getOptions("status"); <-- Get Offline, Online, online (Stay in order like above) while(line !=null) results.add(line); } is this possible?
  12. I'm using translate as other wise the character is turned upside down, but 2 blocks above. -- edit -- Removed translate still got the issue.....
  13. So I'm trying to rotate my player (like dinnerbone) and it's working ok (the rotation part) But when a player looks at a rotated player and jump, they jump as well, if a person flys, the roated person flys up, like the floor is reversed. I've tried using GL to rotate translate etc, but nothing seems to work. The Steve model is the only one moving, the alex model is stationary.
  14. I decided to go with a simpler approach. I replace the default Elytra ResourceLocation final ResourceLocation rl = new ResourceLocation("textures/entity/elytra.png"); With a transparent texture.
  15. No, because the texture is per player. However, please help me with my question. How can I disable to original elytra layer?
  16. So, In one of my mods I want to give players custom elytra textures. I've done this by creating a new Elytra Layer and assigning it to the player, however, it shows the default elytra layer as well. I've tried doing render.removeLayer(); but that won't remove the texture. for(RenderPlayer render : Minecraft.getMinecraft().getRenderManager().getSkinMap().values()) { //Get Skin Types render.addLayer(new LayerElytra(render)); //Add Elytra Textures. render.addLayer(new Deadmau5(render)); //Assign ears to ALL skins render.removeLayer(new net.minecraft.client.renderer.entity.layers.LayerElytra(render)); //try to remove layer }
  17. With this, the character rotates fine, but again other entitys with it, i'll try your other suggestions now
  18. Hello, me again I'm trying to render the player and other players upside down if they have a certain username. and i am initialising like this: However, this turns ALL entitys upside down sadly. like this -
  19. Ok, i've done this, seems to be working - thanks for your help!
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.