Everything posted by poopoodice
-
How do I make translucent text?
Probably by adjusting the alpha value might work?
-
[1.16.3] Help with network message
https://mcforge.readthedocs.io/en/latest/networking/simpleimpl/#sending-to-clients
-
[1.16.3] Test is item is on certain block
That's because your block is not in the list of valid blocks for vanilla hopper tileentity when it is registered. Check net.minecraft.tileentity.TileEntityType And your block does not have boolean property ENABLED Therefore it won't respond to your own hopper. Inherit from existing resource instead of copy and pasting, then override the things you want to modify with.
-
[1.16.3] Test is item is on certain block
So....is there a hopper tileentity at that position?
-
[1.16.3] Test is item is on certain block
Check onEntityCollision in net.minecraft.block.HopperBlock
-
[1.15] performEffect does not work
I'm not sure why you still have this ClientPlayerEntity player = Minecraft.getInstance().player; //getInstance().playerをplayerにぶち込む LazyOptional<PlayerMentalInterface> cap = player.getCapability(PlayerMentalCapabilityRegistry.PLAYER_MENTAL_CAPABILITY); //playerからキャパビリティを取得してplayerMentalInterfaceにぶち込む int currentMental = cap.orElseThrow(IllegalArgumentException::new).getMental(); You have the value that has passed in to the contructor, just store it there, and use it when needed.
-
[1.16.x] Packet Invalid Message
What's the reason of you sending another packet in PacketUpdateContainer.handle ? Also in encode you've written a int array into the buffer, but then you read two ints out of the buffer which won't work because the first int will be the length of the array.
-
Learning minecraft mod code
You should probably upload all the code, not only that file.
-
[1.16.x] Packet Invalid Message
I believe this is sending the packet to everyone PacketDistributor.ALL.noArg() You can simply use SimpleChannel#sendToServer()
-
[1.15] performEffect does not work
In you encode you are writing data from the instance of the packet class to the buffer that is going to be send to the client/server. In decode you are reading the data of the buffer, and pass it into the instance of the packet class which is what handle() will receive and proceed with it.
-
[1.16.3] Tile Entity Won't Break
Remove .func_235859_g_() This is preventing yuor block getting destroyed.
-
[1.16.3] Getting unique block information
https://mcforge.readthedocs.io/en/latest/blocks/states/ Lots of blocks has similar attributes to what you want, e.g.composter and crops.
-
CLOSED:How to get Private Value?
I feel we are repeating everything in the last exact same topic you posted... Answers are all in there, please at least try and have a research on some of those suggestions, then ask if there's something you don't understnad.
-
[1.16.3] Tile Entity Won't Break
Why do you have this? .func_235859_g_()
-
[1.15] performEffect does not work
You shouldn't just cast it to player entity, use instanceof check first.
-
Texture and lang are not applied. What should I do?
It should be resources/assets/urmodid/...
-
[1.16.1] Voxel Shapes Broken
Show the whole class.
-
[1.16.1] Voxel Shapes Broken
Override getShape() (check blocks like torch, button, doors...etc), and return different voxel shape according to the blockstate.
-
Filtering container items
Use ItemStackHandler instead of IInventory https://forums.minecraftforge.net/topic/61757-common-issues-and-recommendations/?do=findComment&comment=289566
-
[1.16.3] Edit Vanilla Items
Although I've never done one before, but if you register with your mod id it won't work.
-
[1.16.x] Unable to Set Capability
Make sure the listener is static (L5 https://pastebin.com/rHWc6H6k)
-
[1.16.x] Unable to Set Capability
Can you show all the updated code?
-
[1.16.x] Unable to Set Capability
That is still on the mod event bus, the default bus value of annotation @Mod.EventBusSubscriber is forge bus already, so what you need to do is remove bus = Bus.MOD here. And maybe add some loggings to make sure it is triggered. Edit: by using @Mod.EventBusSubscriber or MinecraftForge.EVENT_BUS.register the listener must be static
-
[1.16.x] Unable to Set Capability
Iirc attach capability event is fired on forge bus.
-
Mobs reacting to Judebox
There's no such thing afaik. But you can try to find them yourself, for example you want to know how does Parrots handle jukeboxes, you may want to look into ParrotEntity, if you want to know how chicken drops egg, you look into ChickenEntity, it is usually pretty straight forward.
IPS spam blocked by CleanTalk.