-
Posts
13 -
Joined
-
Last visited
Posts posted by Trhod177
-
-
you need to use
RenderSystem.setShaderColor
and
RenderSystem.setShaderTexture
-
I'm blind, I'm been trying to figure this out for 4 days. Thank you so much.
-
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:
Source:
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:
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:
-
I want to make it so the different tools give different drops and i saw other people saying to do it this way.
-
Woops i dont know why that happened but the link is corrected Link
-
I am trying to change what items are dropped by certain blocks when i tested it, it crashed with an error about a ticking entity.
My EventHandlerClass(link updated)if necessary
-
9 hours ago, Animefan8888 said:
I believe you can just get rid of this here super call.
Thanks that fix it..
-
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
Spoilerpublic 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; } }
-
Ok then how do distinguish between sand and redsand
-
what do you mean by
35 minutes ago, Cadiboo said:Block != IBlockState. ever
-
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); } } } }
[1.18.1] how to add a texture to a gui
in Modder Support
Posted
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/