MFMods
Members-
Posts
370 -
Joined
-
Days Won
13
Everything posted by MFMods
-
try with half of those mods. binary search.
-
you have a big picture. good for you. now you need to divide it into small solvable problems. those, we might help you with.
-
Are There Alternatives to Using Depreciated Methods?
MFMods replied to Tablock_'s topic in Modder Support
override those methods freely. you should and for many blocks you need to. they are not about to be removed. in this case the "deprecated" notice is used wrongly and someone should have introduced a new one. -
do not keep client-only code in your main mod class or any class that has anything else in it. it needs to be a separate class with client things (ItemBlockRenderTypes.setRenderLayer call etc.) and nothing else. on a dedicated server, it needs to stay unloaded. to subscribe to an event, use the annotation (preferred way) or the line i gave you above. do not call addListener unconditionally.
-
your client setup method looks fine. did you add it as a listener in main mod class constructor? DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> FMLJavaModLoadingContext.get().getModEventBus().addListener(ClientEvents::clientSetup)); (replace clientevents with how you called that class)
-
you already have it. you set RenderType.cutout() in FMLClientSetupEvent. find out why that code doesn't execute.
-
1.20.1 1.20.1 Can someone help me about the model of new entity.
MFMods replied to 弗洛 徐's topic in Modder Support
your renderer extends EntityRenderer which doesn't do much. extend LivingEntityRenderer. -
make a handler for ChunkDataEvent.Load event. get pixel colors for your map and add to your data structure. do not worry about that chunk getting unloaded 5 minutes later. you will have to update map later if player builds a big fort, but that can be done in EnteringSection event.
-
1.19.1 - how do I add an effect to the player?
MFMods replied to Choccy Biscuit's topic in Modder Support
addEffect should be run on server-side (level.isClientSide==false). playSound on client-side (isClientSIde==true). -
well you can load a chunk, but i feel you shouldn't. i don't know what you are doing but the game is structured so that parts of the world where no player has been for a while are "frozen", kinda. machines from good-quality mods stop working when in unloaded parts of the world. plants from good-quality mods stop growing. all those modders could have forced part of the world to stay loaded (at a price paid by the player). but they didn't. they didn't say "i don't care how the game is intended to run and that players expect all mods to behave uniformly, because my block is just that important!". when mods keep chunks loaded it's often because the young modder was too lazy to make their block just unavailable at the moment.
-
https://forge.gemwire.uk/wiki/Saved_Data just make one method (save) that stores your thing into CompoundNBT and another (constructor in 1.18+, separate load method in 1.16) that rebuilds your list/map/whatever from NBT. you can attach everything to overworld (unless the world is part of your data in which case split and attach separate data to each world).
-
stupid microsoft convinced so many people that file managers aren't a thing. search the net for "double commander". then install "imagine" as a plugin to quickly view image files.
-
[1.19.2] how do I add the light level property on a double plant block
MFMods replied to XsistOrder's topic in Modder Support
when you override a method, you usually want to call the inherited code with your own being an addition. separate issue, why "lit"? that's a furnace on/off property. don't you want an integer property? -
if you are porting from a super-old version, go to https://discord.neoforged.net/, and then to bot-commands channel. you can use bot there to find out the mojang name of the old function, and then to find the new name. let's not get into details of me giving you a link to a discord channel of a forge fork. it's the only place i know of that can translate between obfuscated names, mojang names and mcp names.
-
My mod when i updated it to 1.20.1 now does not work
MFMods replied to nintendoboi2's topic in General Discussion
https://forge.gemwire.uk/wiki/Registration -
in your block class, override getFireSpreadSpeed and getFlammability. try just returning 5 and 20 and see how it works for you.
-
event.getEntity(). tick event (every instance of it) exists so that you can do things when the entity (your projectile) gets one tick older. just subscribe to the tick event (LivingUpdateEvent). use the logger (or just system.out.printLine) and print out important things in event object.
-
Get the block/entity a player is looking at
MFMods replied to NutronStar45's topic in Modder Support
...and see how that item class does what it does. -
all entities tick all the time, including projectile entities. respond to entity tick event, check the side (client), check total world ticks (you don't want particles 20x per second so you'll ask if total time modulo 20 is 7 or something like that), check that the entity is your projectile, check that it isn't dead/removed, check that it is moving (entities remember previous position). then pop a particle.
-
Get the block/entity a player is looking at
MFMods replied to NutronStar45's topic in Modder Support
so, what vanilla item has that? lilypad. type Items.LILY_PAD, follow inside, that takes you to PlaceOnWaterBlockItem. -
[1.19] Overriding vanilla block and replace block states
MFMods replied to NutronStar45's topic in Modder Support
try commenting out 1st and 3rd registration and leave only the 2nd. i never did what you're trying but start with that. -
that would be difficult. and there is a ton of ways an item could end up in a chest - maybe i tossed it and a conveyor belt brought it to a chest and placed it in? or i threw it onto a hopper? no way you can detect all that. what do you want, really? perhaps you can react to ItemEntity creation and have your item be one thing while in inventories and another when spinning on the ground? if it finds its way back into player's inventory, you can "feel" it there (things can tick in player's inventory) and do a switcharoo?
-
[1.19/1.20] How can we display GUI/Texture when we ride an entity
MFMods replied to Feroov's topic in Modder Support
so, what happens when you put a pumpkin on your head?