Jump to content

Trhod177

Members
  • Posts

    13
  • Joined

  • Last visited

Posts posted by Trhod177

  1. RenderSystem.setShaderColor(1.0f, 1.0f, 1.0f, 1.0f);

    and

    RenderSystem.setShaderTexture(0, Texture);

    and to register

    MenuScreens.register(containerRegistrationClass.container.get(), screenclass::new);

    also mojang dont name they variables that why its a byproduct of obfuscation i would recommend you use parchment mappings to give them all names

    https://github.com/ParchmentMC/Librarian/blob/dev/docs/FORGEGRADLE.md
    https://parchmentmc.org

    https://discord.parchmentmc.org/

  2. Im currently developing a mod and when i try to join a server it shows this error on the client

    Internal Exception: io.netty.handler.codec.DecoderException: io.netty.handler,codec.Encoder.Exception: java.io.UTFDataFormatException: malformed input around byte 4

    Log Files:

    Client Debug Log (Gist)

    Client Latest Log (Gist)

    Server Debug Log (Gist)

    Server Latest Log (Gist)

     

    Source:

    Geomancy Source Code Github

     

    From the googling i have done, The few people i could find who had similar issues, there issues seem to have been fixed by making sure fromNetwork and toNetwork methods in custom recipes are identical. I have checked my recipes and as far as i can see there are no issues with either and they send and receive the same issue.

    Recipe classes:

    DippingRecipe.java github

    InfusingRecipe.java github

     

    And if someone could perhaps help my figure out what i did wrong with the tank in my blockentity it would also be appreciated.

    BlockEntity Class:

    DipperBlockEntity.java github

  3. i have a block that a want to multiple items (which it does) but i cant figure out how to get it to stop dropping itself

     

    Code

    Spoiler
    
    public class CowCarcassBlock extends CustomBlock {
          
        public CowCarcassBlock(String name) {
            super(Material.ROCK, name);
            setHardness(10f);
            setResistance(6000f);
            this.setHarvestLevel("pickaxe", 0);
            
            
        }
        
        @Override
        public Item getItemDropped(IBlockState state, Random rand, int fortune) {
            return super.getItemDropped(state, rand, fortune);
        }
        
        @Override
        public void getDrops(NonNullList<ItemStack> drops, IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
    
        {
            Random rand = new Random();
            
         int n = rand.nextInt(3) + 1;
         int a = rand.nextInt(3) + 1;
         int b = rand.nextInt(3) + 1;
         int c = rand.nextInt(3) + 1;
    
        super.getDrops(drops, world, pos, state, fortune);
    
        drops.add(new ItemStack(ItemInit.cowbelly, n));
        drops.add(new ItemStack(ItemInit.cowleg, a));
        drops.add(new ItemStack(ItemInit.cowshoulder, b));
        drops.add(new ItemStack(ItemInit.cowrump, c));
        
        
    
        }
    
        
    
    
        @SideOnly(Side.CLIENT)
        public BlockRenderLayer getBlockLayer()
        {
            return BlockRenderLayer.CUTOUT;
        }
    
        @Override
        public boolean isFullCube(IBlockState state)
        {
            return false;
        }
        
        @Override
        public boolean isOpaqueCube(IBlockState state) {
            return false;
        }
        
    
        @Override
        public CowCarcassBlock setCreativeTab(CreativeTabs tab) {
            super.setCreativeTab(ButcheryMod.BMCT);
            return this;
        }
        
        
    
    }

     

     

  4. I've been trying to change the onHarvestBlock event to change what sand and red sand drops when you mine it, normal sand works fine but i cant get red sand to drop the proper item.

     

    Here is my code

    
    @Mod.EventBusSubscriber
    public class PocketSandEventHandler {
    	
        
         
    	@SubscribeEvent
    	public void onHarvestBlock(BlockEvent.HarvestDropsEvent event)
    	{
    		final EntityPlayer PLAYER = event.getHarvester();
    		if(null == PLAYER || null == PLAYER.getHeldItemMainhand()) return;
    
    		if(ConfigHandler.overridesanddrops == true) {
    		
    		if(event.getState().getBlock() == Blocks.SAND)
    		{
    			event.getDrops().add(new ItemStack(ItemInit.sandpile, 4));
    			event.getDrops().remove(0);
    			
                
    			
    		}
    
    		}
    		
    		if(ConfigHandler.overrideredsanddrops == true) {
    			
    			   if(event.getState().getBlock() == Blocks.SAND.getStateFromMeta(1)) {
    					
    					event.getDrops().add(new ItemStack(ItemInit.redsandpile, 4));
    					event.getDrops().remove(1);
    				}
    		}
    		
    		
    	}
    	}
    	

     

×
×
  • Create New...

Important Information

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