Jump to content

SaltStation

Members
  • Posts

    42
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by SaltStation

  1. Minecraft thinks your block is not see-through and doesn't bother to render the surrounding blocks. To change this you have to tell minecraft your block is not opaque. Just add this method: public boolean isOpaqueCube(IBlockState state) { return false; }
  2. Hello everyone. I want to make a custom particle with a custom texture. To get the TextureAtlasSprite I want I have used an EventSubscriber to get the TextureStitchEvent.Pre and saved the AtlasSprite in my particle class: @Mod.EventBusSubscriber(Side.CLIENT) public class PartikelHandeler { @SubscribeEvent public void registerSprite(TextureStitchEvent.Pre event){ System.out.println("stitch event+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-++-+-+-+-++-+-+-+-+--++-+--++-+-+-+-+-+-+-+-++-+-++-+-+-+-"); //CustomFire.test = event; CustomFire.test2 = event.getMap().registerSprite(new ResourceLocation("mod:particles/ember1")); } } this.setParticleTexture(test2); The problem I have is instead of my custom texture the standard lava texture is loaded. I suspect, that I made getting the event and the lava texture is just the default in this case. Thanks in advance.
  3. I think I am doing something wrong. I subscribed to the EventBus in my class and tryed to get the AtlasSprite with this method: @SubscribeEvent public TextureAtlasSprite registerSprite(ResourceLocation location){ return TextureMap.registerSprite(location); } But .registerSprite is still used in a static context.
  4. This might be a bit frustrating, but I dont know how to get to the TextureMap after I have subscribed to the EventBus.
  5. Ok my compiler tells me I cannot use .registerSprite(LOCATION) in a static context.
  6. Ok I still dont know how use the TextureStitchEvent.Pre how do you use it properly?
  7. If this is not the proper way to get a TextureAtlasSprite, do you know how to get one pointing at a custom location.
  8. Hello everyone. I have been trying to set a custom texture for my particle, but I don't know how to get the TextureAtlasSprite required for setParticleTexture(). After some research I read that TextureMap.registerSprite() is supposed to return a TextureAtlasSprite but you have to use it in a TextureStitchEvent.Pre. Dose anyone know how this works or if there is a different way to get a TextureAtlasSprite Object? Thanks in advance.
  9. Thank you for being patient with me. I finally found isOpaqueCube after using a better search program and it seams to work fine. Should I be worried about it being Depricated though?
  10. I read about that but my Compiler tells me isOpaqueCube does not exist in my super. So it did not work. Can you send me the code to return false?
  11. Hello everyone, I have been making a block with a custom model and have run into a problem. Surrounding blocks become see-throu like an x-ray effect. I have read a forum post that this might be caused by wrongly set Opacity, but the method which is supposed to be overwritten no longer exists. Thank you in advance.
  12. Thank you detDrops works just fine. I must have overlooked it earlyer.
  13. Hello everyone. I have been working on an ore which is supposed to have a chance of dropping additional items with varying amount. I found a method wich seams to be depricated and does not work any more. @Deprecated public ArrayList<ItemStack> onBlockDestroyedByPlayer(World world, int x, int y, int z, int metadata, int fortune){ ArrayList<ItemStack> drops = new ArrayList<ItemStack>(); drops.add(new ItemStack(Items.COAL, world.rand.nextInt(100) + 1)); drops.add(new ItemStack(Items.APPLE, world.rand.nextInt(10) + 1)); if (world.rand.nextFloat() < 0.5F) drops.add(new ItemStack(Items.DIAMOND)); return drops; } Are there any similar methods or did I make some stupid mistake? Thank you in advance.
×
×
  • Create New...

Important Information

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