Everything posted by Dipo
-
Log Block not Rendering
Not sure but try to remove the space "axis=z, variant=baobab" to "axis=z,variant=baobab"
-
[1.12.2] Custom inventory name when using capabilities [Solved]
I know how to tell client about change, but i mean how to retrieve the name of it on the server side. I want to do exactly what is in chest. When u rename chest block in anvil and place it, then open it, the name of the item chest is shown above the inventory. But I don't know how to "move" the name of the ItemStack to the tileentity. But I've figured it out by overriding onBlockPlacedBy in my block class: @Override public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) { TileEntity atm = world.getTileEntity(pos); if (atm instanceof TileEntityATM) ((TileEntityATM) atm).setCustomName(stack.getDisplayName()); } But thanks anyway
-
Log Block not Rendering
What's the name of your blockstate file and the path to it ? It looks like it can't find it... Caused by: java.io.FileNotFoundException: nntm:blockstates/log.json
-
[1.12.2] Custom inventory name when using capabilities [Solved]
Minecraft version: 1.12.2 Forge version: 1.12.2-14.23.5.2824 Java version: Version 8 Update 211 (build 1.8.0_211-b12) When there was IInventory and ISidedInventory, inventory names were simple to use (getInventoryName, hasCustomInventoryName), but now there are capabilities and they don't have anything like inventory name. How Am I supposed to change name of inventory of TileEntity in GuiContainer ? I want to display in GUI the name of block renamed in anvil. I know how to save it in NBT, I just want to know if there is some way to retrieve it.
-
[1.14.3] SOLVED onPlayerDestroy playing twice + how to send msg in chat
So you need to get the entity of your player, but the method onPlayerDestroy does not come with this parameter. You can get the player only using world and get entities... but it is not accurate. You should use other method, try to override method called removedByPlayer, it comes with PlayerEntity as parameter. Keep in mind though, that you need to call the super method when overriding this, or your block will not be set to air. So sending the message should look like this: player.sendMessage(new StringTextComponent("your message"));
-
[1.14.3] SOLVED onPlayerDestroy playing twice + how to send msg in chat
It's called twice (once on server, once on client). If u want to run some code only once, you have to decide which side. If you want to send a message to a player, you need to run it on server side. To restrict code only to server side use world.isRemote check. It returns true for client worlds and false for server. And for sending messages to a player, I'm not sure if it wasn't changed in 1.14, but in previous versions it was EntityPlayer#sendMessage(ITextComponent).
-
[1.14.2] Registering TileEntites
Can u show full error log ?
-
mcmod.info not working?
So you have to change this @Mod(modid = AutoPvP.MODID, version = AutoPvP.VERSION) to this @Mod(modid = Main.MODID, version = Main.VERSION)
-
mcmod.info not working?
Wait, you have a link in your main class to AutoPvP... @Mod(modid = AutoPvP.MODID, version = AutoPvP.VERSION) So i thought that you have this class in your project. Don't you?
-
mcmod.info not working?
And the autopvp class ?
-
mcmod.info not working?
I mean forge version, not just minecraft But u didn't post the autopvp class... And also post build.gradle file.
-
mcmod.info not working?
Class names should always start with a capital letter. And can u post the autopvp class ? And which forge version are u using ?
-
[1.12.2] GuiContainer not showing item names when hovering [Solved]
It works, thanks a lot
-
[1.12.2] GuiContainer not showing item names when hovering [Solved]
Minecraft version: 1.12.2 Forge version: 1.12.2-14.23.5.2824 Java version: Version 8 Update 211 (build 1.8.0_211-b12) Project on GitHub My GUI is working properly except one thing. It doesn't show item names when hovering over them. GuiWallet: Image:
-
[1.12.2] Fluid Texture Location?
You are welcome, I'm glad I could help you.
-
[1.12.2] Fluid Texture Location?
ResourceLocation for fluids should point to assets/modid/textures/fluids. So you should do this: new ResourceLocation(MODID, "fluids/fluidname_still/flow")
-
[1.12.2] How to change fluid particles
I have fully working fluid and I need to change its "bubble" particles. I need to change this particles to something more darker: And the second question is how to change the background color when you are underwater? I need this to be darker:
-
[1.12.2] Stop generating on SuperFlat [Solved]
Okay, thanks a lot, i didn't know, that World contains something like WorldType
-
[1.12.2] Stop generating on SuperFlat [Solved]
How to stop generating my lakes and trees on Superflat World Type ?
-
[1.12.2] Metadata from IBlockState [Solved]
I just passed twice null to a method, because these two parameters are never used in vanilla blocks
-
[1.12.2] Metadata from IBlockState [Solved]
I said that i did it using Block#getPickBlock, so i did not use any metadata
-
[1.12.2] Metadata from IBlockState [Solved]
I know, but its a mod that is just for me to simplify something, and it does not matter if it crashes once a time
-
[1.12.2] Metadata from IBlockState [Solved]
I have done it using Block#getPickBlock Like this ItemStack stack = block.getBlock().getPickBlock(block, null, sender.getEntityWorld(), null, (EntityPlayer) sender);
-
[1.12.2] Metadata from IBlockState [Solved]
OK, thanks a lot, it works fine
-
[1.12.2] Metadata from IBlockState [Solved]
As I said I need i to print a name of Block with some meta, So i need metadata to create ItemStack with custom metadata and get its localized name.
IPS spam blocked by CleanTalk.