Jump to content

[Solved] [1.16.5] FakePlayer and AnimalEntity#getLoveCause leading to NPE


IceMetalPunk

Recommended Posts

I hate having to ask so many questions here in such a short time, but I tried to figure this one out on my own and hit a wall.

I have a FakePlayer that I create in the FMLServerStartingEvent, and I have a block that breeds animals using the FakePlayer as their "love cause" via AnimalEntity#setInLove. This is all working, and the animals are breeding fine. However, when a baby is born, I'm hooking into the BabyEntitySpawnEvent and trying to check whether either of the parents was bred by this FakePlayer, and if so, do some stuff (specifically, spawn a clone of the baby).

This wasn't working; at first, no errors, it just wouldn't spawn the extra baby. So I started debugging with some System.out.printlns, and boom, it started crashing with an NPE when trying to work with the event's getCausedByPlayer() value.

I dug in some more, and after some breakpoints and debugging, I found that while the UUID of the FakePlayer is properly being set as the animal's loveCause value, the getInLoveCause() method is returning null anyway because apparently the FakePlayer is not actually in the world's players list; when I test with just me in a singleplayer world, there is only one player on the list with a different UUID than the fake player (which, I have to assume, is me). Since a player with a matching UUID can't be found on the list, it returns null instead of the correct FakePlayer entity.

I thought the FakePlayer would be added to the world automatically on construction, since the world is passed to the constructor, but no big deal, right? I just added a world.addNewPlayer call in the FMLServerStartingEvent, right after constructing it, to add the FakePlayer to the world list. Except... now, Curios (which my mod supports) crashes with an NPE because apparently it's getting an EntityJoinWorld event for this fake player that doesn't have all the connection fields it's expecting (at least, it's something like that from what I can tell).

So I guess what I'm asking is, "What is the correct way to create a FakePlayer such that it's actually added to the server player list so things like AnimalEntity#getInLoveCause work properly with it?"

Here's how I'm currently creating the FakePlayers (FAKE_PLAYERS is a static hashmap of worlds to hashmaps of strings to FakePlayers, so I can look up specific players to indicate different blocks have triggered the breeding; I'm creating a set of FakePlayers per world because I believe that's necessary if I want to be able to handle this FakePlayer breeding in every dimension, but correct me if I'm wrong about that):

@SubscribeEvent
public void onServerStarting(FMLServerStartingEvent event) {
	AtomicReference<Integer> i = new AtomicReference<>(0);
	event.getServer().getAllLevels().forEach(world -> {
		int index = i.getAndAccumulate(0, (c, v) -> c + 1);
		HashMap<String, FakePlayer> playerMap = new HashMap<>();
		playerMap.put("Breeder_0", new FakePlayer(world, new GameProfile(UUID.randomUUID(), "Breeder_0_" + index)));
		playerMap.put("Breeder_1", new FakePlayer(world, new GameProfile(UUID.randomUUID(), "Breeder_1_" + index)));
		playerMap.put("Breeder_2", new FakePlayer(world, new GameProfile(UUID.randomUUID(), "Breeder_2_" + index)));
		playerMap.put("Breeder_3", new FakePlayer(world, new GameProfile(UUID.randomUUID(), "Breeder_3_" + index)));
		playerMap.put("Breeder_4", new FakePlayer(world, new GameProfile(UUID.randomUUID(), "Breeder_4_" + index)));
		FAKE_PLAYERS.put(world, playerMap);

		for (FakePlayer player : playerMap.values()) {
			world.addNewPlayer(player);
		}
	});
}

I saw the FakePlayerFactory class, but from what I can tell all that adds is automatic recordkeeping of the fake players created, and it wouldn't help me here, right?

Edited by IceMetalPunk
Solved!

Whatever Minecraft needs, it is most likely not yet another tool tier.

Link to comment
Share on other sites

1 hour ago, diesieben07 said:

It would be a bad idea for a fake player to actually exist in the world I think. It's not designed to be in the world.

You should access the loveCause UUID using reflection and then check if it is one of your fake player IDs (probably best to use a fixed set for those instead of creating a random one every time).

Taking your advice, I refactored it all. I made a FakePlayerHelper class that keeps track of all the fake players, constructing the UUIDs based on the name rather than being random, reusing GameProfiles for the same names when constructing different FakePlayers for different worlds, etc. Then I used reflection in the event handler to pull the UUID from the private field in AnimalEntity directly and look that up via the helper's maps. That solved the NPEs... but now, when a baby sheep is born and triggers the BabyEntitySpawnEvent handler code, the whole game slowly locks up. As in, all entities freeze except the player, no new entities can spawn, and then eventually the player locks up, too, and I have to force quit. No errors thrown, just freezing.

Here's the new code, including all the debug output.

FakePlayerHelper class:

package com.icemetalpunk.psychicaltars.helpers;

import java.util.HashMap;
import java.util.Optional;
import java.util.UUID;

import org.apache.commons.lang3.tuple.Pair;

import com.mojang.authlib.GameProfile;

import net.minecraft.world.server.ServerWorld;
import net.minecraftforge.common.util.FakePlayer;

public class FakePlayerHelper {
	private static HashMap<Pair<ServerWorld, String>, FakePlayer> FAKE_PLAYERS = new HashMap<>();
	private static HashMap<UUID, GameProfile> UUID_PROFILE_MAP = new HashMap<>();
	private static HashMap<Pair<ServerWorld, UUID>, FakePlayer> UUID_PLAYER_MAP = new HashMap<>();

	public static FakePlayer getOrCreate(ServerWorld world, String name) {
		if (FAKE_PLAYERS.containsKey(Pair.of(world, name))) {
			return FAKE_PLAYERS.get(Pair.of(world, name));
		}
		UUID uuid = UUID.nameUUIDFromBytes(name.getBytes());
		GameProfile profile = getGameProfileFromUUID(uuid).orElseGet(() -> {
			return new GameProfile(uuid, name);
		});
		FakePlayer player = new FakePlayer(world, profile);
		FAKE_PLAYERS.put(Pair.of(world, name), player);
		UUID_PROFILE_MAP.put(uuid, profile);
		UUID_PLAYER_MAP.put(Pair.of(world, uuid), player);
		return player;
	}

	// Below is just an alias for better semantics when you don't want to store the result
	public static FakePlayer create(ServerWorld world, String name) {
		return getOrCreate(world, name);
	}

	private static Optional<GameProfile> getGameProfileFromUUID(UUID uuid) {
		return Optional.ofNullable(UUID_PROFILE_MAP.get(uuid));
	}

	public static Optional<FakePlayer> getByUUID(ServerWorld world, UUID uuid) {
		return Optional.ofNullable(UUID_PLAYER_MAP.get(Pair.of(world, uuid)));
	}
}

FMLServerStarting event handler:

@SubscribeEvent
public void onServerStarting(FMLServerStartingEvent event) {
	event.getServer().getAllLevels().forEach(world -> {
		FakePlayerHelper.create(world, "Breeder 0");
		FakePlayerHelper.create(world, "Breeder 1");
		FakePlayerHelper.create(world, "Breeder 2");
		FakePlayerHelper.create(world, "Breeder 3");
		FakePlayerHelper.create(world, "Breeder 4");
	});
}

Event handler class:

package com.icemetalpunk.psychicaltars.events;

import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.util.Optional;
import java.util.UUID;

import com.icemetalpunk.psychicaltars.helpers.FakePlayerHelper;

import net.minecraft.entity.EntityType;
import net.minecraft.entity.MobEntity;
import net.minecraft.entity.passive.AnimalEntity;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.world.World;
import net.minecraft.world.server.ServerWorld;
import net.minecraftforge.common.util.FakePlayer;
import net.minecraftforge.event.entity.living.BabyEntitySpawnEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.ObfuscationReflectionHelper;

public class PAEventHandler {
	private static Field loveCauseField = ObfuscationReflectionHelper.findField(AnimalEntity.class, "loveCause");

	@SubscribeEvent
	public void babySpawnHandler(final BabyEntitySpawnEvent event) {
		System.out.println("In handler!");
		MobEntity parentA = event.getParentA();
		MobEntity parentB = event.getParentB();
		MobEntity child = event.getChild();
		if (!(parentA instanceof AnimalEntity) || !(parentB instanceof AnimalEntity)
				|| !(child instanceof AnimalEntity)) {
			return;
		}
		AnimalEntity animalParentA = (AnimalEntity) parentA;
		AnimalEntity animalParentB = (AnimalEntity) parentB;
		AnimalEntity animalChild = (AnimalEntity) child;
		ServerWorld world = animalParentA.getServer().overworld();
		FakePlayer nullBreeder = FakePlayerHelper.getOrCreate(world, "Breeder 0");
		System.out.println("Is Animal in world " + world);
		UUID loveUUID;
		try {
			loveUUID = (UUID) loveCauseField.get(animalParentA);
		} catch (IllegalArgumentException | IllegalAccessException e) {
			e.printStackTrace();
			return;
		}
		System.out.println("UUID: " + loveUUID);
		Optional<FakePlayer> optionalPlayer = FakePlayerHelper.getByUUID(world, loveUUID);
		if (!optionalPlayer.isPresent()) {
			System.out.println("Not present");
			return;
		}
		FakePlayer player = optionalPlayer.get();
		System.out.println("Player: " + player.getName());
		CompoundNBT nbtTag = new CompoundNBT();
		animalChild.save(nbtTag);
		nbtTag.remove("UUID");
		EntityType<?> type = animalChild.getType();
		for (int i = 1; i <= 4; ++i) {
			if (player == FakePlayerHelper.getOrCreate(world, "Breeder " + i)) {
				System.out.println("Is Breeder " + i);
				animalParentA.setInLove(nullBreeder);
				animalParentA.resetLove();
				animalParentB.setInLove(nullBreeder);
				animalParentB.resetLove();
				for (int j = 0; j < i; ++i) {
					AnimalEntity babyClone;
					try {
						babyClone = animalChild.getClass().getConstructor(EntityType.class, World.class)
								.newInstance(type, world);
						babyClone.load(nbtTag.copy());
						world.addFreshEntity(babyClone);
					} catch (InstantiationException | IllegalAccessException | IllegalArgumentException
							| InvocationTargetException | NoSuchMethodException | SecurityException e) {
						e.printStackTrace();
						return;
					}
				}
				break;
			}
		}
	}
}

The output I'm getting properly recognizes and reaches "Breeder 1" (the first println within the outer 'for' loop in the event handler), but then I get no more output and everything starts locking up. Am I not cloning the baby animal correctly?

Edited by IceMetalPunk
Add clarifying comment to code

Whatever Minecraft needs, it is most likely not yet another tool tier.

Link to comment
Share on other sites

58 minutes ago, diesieben07 said:

Yes, you are. Use the EntityType to create the entity, don't try to use its constructor (it might not even exist). Also, that exception "handling" is not at all appropriate.

 

You should make loveCauseField final, which will improve the reflection performance. Additionally you need to use the SRG name here or your code will not run outside the development environment.

 

Your FakePlayerHelper also has a memory leak. It holds hard references to all worlds, which makes it so that they can never be garbage collected. You have to use a WeakHashMap and ideally you don't want to pre-allocate all those FakePlayers. Instead only allocate them when needed and maybe cache them for a while.

Yeah, I'm aware the error handling is terrible; this code is very much the prototyping, "just trying to make it work first, then I'll go back and clean it up later" kind of code.

I made all of the changes you mentioned, except using the SRG name; how would I find that? I used to use MCPBot, but it seems that hasn't updated past 1.15 and loveCause isn't in those mappings. I checked in the .gradle folder and eventually found joined.tsrg, but that doesn't contain the deobfuscated names, so I'm not sure how to locate this particular field's SRG name in it.

More importantly, I switched over to using EntityType.create instead of calling the entity constructor directly, and it didn't help: the game still locks up as soon as it tries to create the entity. This is the new code in the event handler (I'm fully aware there are one or two now-unused variables); I've tried it with and without the world.addFreshEntity line, and both still lock up (I get the feeling it's freezing on creation of the new entity, before it even gets to that line anyway, but I could be wrong).

package com.icemetalpunk.psychicaltars.events;

import java.lang.reflect.Field;
import java.util.Optional;
import java.util.UUID;

import com.icemetalpunk.psychicaltars.helpers.FakePlayerHelper;

import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.MobEntity;
import net.minecraft.entity.passive.AnimalEntity;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.world.server.ServerWorld;
import net.minecraftforge.common.util.FakePlayer;
import net.minecraftforge.event.entity.living.BabyEntitySpawnEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.ObfuscationReflectionHelper;

public class PAEventHandler {
	private static final Field loveCauseField = ObfuscationReflectionHelper.findField(AnimalEntity.class, "loveCause");

	@SubscribeEvent
	public void babySpawnHandler(final BabyEntitySpawnEvent event) {
		System.out.println("In handler!");
		MobEntity parentA = event.getParentA();
		MobEntity parentB = event.getParentB();
		MobEntity child = event.getChild();
		if (!(parentA instanceof AnimalEntity) || !(parentB instanceof AnimalEntity)
				|| !(child instanceof AnimalEntity)) {
			return;
		}
		AnimalEntity animalParentA = (AnimalEntity) parentA;
		AnimalEntity animalParentB = (AnimalEntity) parentB;
		AnimalEntity animalChild = (AnimalEntity) child;
		ServerWorld world = animalParentA.getServer().overworld();
		FakePlayer nullBreeder = FakePlayerHelper.getOrCreate(world, "Breeder 0");
		System.out.println("Is Animal in world " + world);
		UUID loveUUID;
		try {
			loveUUID = (UUID) loveCauseField.get(animalParentA);
		} catch (IllegalArgumentException | IllegalAccessException e) {
			e.printStackTrace();
			return;
		}
		System.out.println("UUID: " + loveUUID);
		Optional<FakePlayer> optionalPlayer = FakePlayerHelper.getByUUID(world, loveUUID);
		if (!optionalPlayer.isPresent()) {
			System.out.println("Not present");
			return;
		}
		FakePlayer player = optionalPlayer.get();
		System.out.println("Player: " + player.getName());
		CompoundNBT nbtTag = new CompoundNBT();
		animalChild.save(nbtTag);
		nbtTag.remove("UUID");
		EntityType<?> type = animalChild.getType();
		for (int i = 1; i <= 4; ++i) {
			if (player == FakePlayerHelper.getOrCreate(world, "Breeder " + i)) {
				System.out.println("Is Breeder " + i);
				animalParentA.setInLove(nullBreeder);
				animalParentA.resetLove();
				animalParentB.setInLove(nullBreeder);
				animalParentB.resetLove();
				for (int j = 0; j < i; ++i) {
					Optional<Entity> babyClone = EntityType.create(nbtTag.copy(), world);
					babyClone.ifPresent(baby -> world.addFreshEntity(baby));
				}
				break;
			}
		}
	}
}

 

Whatever Minecraft needs, it is most likely not yet another tool tier.

Link to comment
Share on other sites

13 hours ago, diesieben07 said:

forge-bot on the Forge discord.

Thank you! That will be very useful! I've updated the reflection name to the SRG name and that part seems to still be working.

13 hours ago, diesieben07 said:

Please post a Git repo so I can debug this locally.

OK, I've just pushed up a repo: https://github.com/IceMetalPunk/psychic-altars

When testing, you'll need to create a "telepathic altar" to trigger the breeding code; which is a multiblock listed in the Patchouli handbook already. It's a Telepathic Altar block on top of any inventory, with the inventory surrounded by 8 omen-matched blocks (that is, omenstone or one of the upgrade omen types). At least one of the cardinal direction omens should be an Efficiency omen, as that's what initiates the cloning behavior. Then put a couple sheep within 1 block of the central altar block, fill the inventory with wheat, and wait for it to breed. You can right-click the altar block to validate the multiblock faster (it'll turn red when it's active). I'd suggest the other 3 upgrade omens should be speed omens, as the base speed is intentionally a slow 60 seconds per operation; with 3 speed omens, you should only need to wait about 15 seconds for it to trigger. The freezing happens once the animals breed from the altar and try to spawn a baby.

Edited by IceMetalPunk

Whatever Minecraft needs, it is most likely not yet another tool tier.

Link to comment
Share on other sites

9 minutes ago, diesieben07 said:

I got the thing to work, but the altar never finds any animals, I don't know why, your AABB code seems to be wrong (at least the AABB never has any entities within it).

Also note that you store a lot of mutable data in your block class. You cannot do this. There is only one instance of your block class and it is shared even between client and server in single player. If you need to store complex mutable data you must use a tile entity.

I fully understand how blocks work. This mod started as an exercise in making functional blocks without adding tile entities. It may look like the block is storing mutable state, but it's not *really* doing that; any variables that seem like they could differ between blocks in the world are only ever used by the same piece of code that sets them, and they're always reset/re-evaluated at the beginning of any such code. I understand that internally, this means the same instance is overwriting its values for every block that evaluates them, but as that was the motivation for making this mod, I'm happy with it as long as it works. I know that it's an unusual way to handle things, and I'm okay with that.

4 minutes ago, diesieben07 said:

Your AABB code is wrong, you should be using inflate, not expandTowards.

Fixed it and then found your infinite loop: https://github.com/IceMetalPunk/psychic-altars/blob/949a1d0757e9e0cb306da9079c6bcd24816c2bf4/src/main/java/com/icemetalpunk/psychicaltars/events/PAEventHandler.java#L65. i keeps increasing, j always stays at 0. Hence j will always be lower than i and the loop never finishes.

...of course it *would* be a single-character copypasta typo at the root of all this 😂 Thank you so much! And thank you for mentioning inflate; I remember thinking the method name was a bit strange, but I couldn't find one called "expand" which I thought would be the name for the opposite of the "contract" method, and "expandTowards" was the closest, so I went with that (and it did seem to work for me in my tests somehow; I must have coincidentally set things up in the perfect position for the numbers to work out 😂).

After fixing the i -> j typo, the game no longer locks up, which is good, but... it still also doesn't work :( It *says* it's successfully cloning the baby sheep, but I only see one. However, if I use a command like /say or /kill, it reports the total number of sheep correctly, including clones. I though maybe there was a client/server sync piece I was missing, so I looked into how the SummonCommand works to spawn entities, and saw it's done very differently from how I was doing it. So I reworked the spawning bit using the same method SummonCommand does (where applicable), and now... same result: no visible clones, but /say and /kill report the correct number of sheep including clones.

I've pushed up the changes to the repo, but here's the new event handler if you don't feel like functionally testing it; I hope you can spot what I'm doing wrong that makes SummonCommand work but my spawning fail:

package com.icemetalpunk.psychicaltars.events;

import java.lang.reflect.Field;
import java.util.Optional;
import java.util.UUID;

import com.icemetalpunk.psychicaltars.helpers.FakePlayerHelper;

import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.MobEntity;
import net.minecraft.entity.SpawnReason;
import net.minecraft.entity.passive.AnimalEntity;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.world.DifficultyInstance;
import net.minecraft.world.server.ServerWorld;
import net.minecraftforge.common.util.FakePlayer;
import net.minecraftforge.event.entity.living.BabyEntitySpawnEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.ObfuscationReflectionHelper;

public class PAEventHandler {
	private static final Field loveCauseField = ObfuscationReflectionHelper.findField(AnimalEntity.class,
			"field_146084_br");

	@SubscribeEvent
	public void babySpawnHandler(final BabyEntitySpawnEvent event) {
		MobEntity parentA = event.getParentA();
		MobEntity parentB = event.getParentB();
		MobEntity child = event.getChild();
		if (!(parentA instanceof AnimalEntity) || !(parentB instanceof AnimalEntity)
				|| !(child instanceof AnimalEntity)) {
			return;
		}
		AnimalEntity animalParentA = (AnimalEntity) parentA;
		AnimalEntity animalParentB = (AnimalEntity) parentB;
		AnimalEntity animalChild = (AnimalEntity) child;
		ServerWorld server = animalParentA.getServer().overworld();
		FakePlayer nullBreeder = FakePlayerHelper.getOrCreate(server, "Breeder 0");
		UUID loveUUID;
		try {
			loveUUID = (UUID) loveCauseField.get(animalParentA);
		} catch (IllegalArgumentException | IllegalAccessException e) {
			e.printStackTrace();
			return;
		}
		Optional<FakePlayer> optionalPlayer = FakePlayerHelper.getByUUID(server, loveUUID);
		if (!optionalPlayer.isPresent()) {
			return;
		}
		FakePlayer player = optionalPlayer.get();
		CompoundNBT nbtTag = new CompoundNBT();
		animalChild.save(nbtTag);
		nbtTag.remove("UUID");
		for (int i = 1; i <= 4; ++i) {
			if (player == FakePlayerHelper.getOrCreate(server, "Breeder " + i)) {
				animalParentA.setInLove(nullBreeder);
				animalParentA.resetLove();
				animalParentB.setInLove(nullBreeder);
				animalParentB.resetLove();
				for (int j = 0; j < i; ++j) {
					Entity babyClone = EntityType.loadEntityRecursive(nbtTag, server, (baby) -> {
						return baby;
					});
					if (babyClone != null) {
						DifficultyInstance diff = server.getCurrentDifficultyAt(animalChild.blockPosition());
						((AnimalEntity) babyClone).finalizeSpawn(server, diff, SpawnReason.BREEDING, null, null);
						if (server.tryAddFreshEntityWithPassengers(babyClone)) {
							System.out.println("Spawned clone " + j + "!");
						} else {
							System.out.println("Failed to tryAdd clone " + j + "!");
						}
					} else {
						System.out.println("Failed to spawn clone " + j + "!");
					}
				}
				break;
			}
		}
	}
}

 

Whatever Minecraft needs, it is most likely not yet another tool tier.

Link to comment
Share on other sites

7 hours ago, IceMetalPunk said:

any variables that seem like they could differ between blocks in the world are only ever used by the same piece of code that sets them, and they're always reset/re-evaluated at the beginning of any such code.

False:
https://github.com/IceMetalPunk/psychic-altars/blob/949a1d0757e9e0cb306da9079c6bcd24816c2bf4/src/main/java/com/icemetalpunk/psychicaltars/blocks/altar/PAAltarBlock.java#L216
https://github.com/IceMetalPunk/psychic-altars/blob/949a1d0757e9e0cb306da9079c6bcd24816c2bf4/src/main/java/com/icemetalpunk/psychicaltars/blocks/altar/PAAltarBlock.java#L218
https://github.com/IceMetalPunk/psychic-altars/blob/949a1d0757e9e0cb306da9079c6bcd24816c2bf4/src/main/java/com/icemetalpunk/psychicaltars/blocks/altar/PAAltarBlock.java#L160

 

Unrelated, this is just bad code design.
https://github.com/IceMetalPunk/psychic-altars/blob/949a1d0757e9e0cb306da9079c6bcd24816c2bf4/src/main/java/com/icemetalpunk/psychicaltars/blocks/PACraftContainerBlock.java#L52-L57
https://github.com/IceMetalPunk/psychic-altars/blob/949a1d0757e9e0cb306da9079c6bcd24816c2bf4/src/main/java/com/icemetalpunk/psychicaltars/blocks/PABlock.java
1) that default getRenderLayer is terrible because it's objectively wrong. That should never return null.
2) you shouldn't be using the Registry events any more and this loop through thing is dumb. instead of calling myBlock.register(event) you could just do event.register(myBlock) and not need these methods at all. Ditto your items.
3) block items should be aware of their blocks. Blocks should not be aware of their block items. Items are registered after blocks for a reason.

The fuck is this used for and why.
https://github.com/IceMetalPunk/psychic-altars/blob/949a1d0757e9e0cb306da9079c6bcd24816c2bf4/src/main/java/com/icemetalpunk/psychicaltars/blocks/OmenBlock.java#L12

 

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

3 hours ago, Draco18s said:

False:
https://github.com/IceMetalPunk/psychic-altars/blob/949a1d0757e9e0cb306da9079c6bcd24816c2bf4/src/main/java/com/icemetalpunk/psychicaltars/blocks/altar/PAAltarBlock.java#L216
https://github.com/IceMetalPunk/psychic-altars/blob/949a1d0757e9e0cb306da9079c6bcd24816c2bf4/src/main/java/com/icemetalpunk/psychicaltars/blocks/altar/PAAltarBlock.java#L218
https://github.com/IceMetalPunk/psychic-altars/blob/949a1d0757e9e0cb306da9079c6bcd24816c2bf4/src/main/java/com/icemetalpunk/psychicaltars/blocks/altar/PAAltarBlock.java#L160

 

Unrelated, this is just bad code design.
https://github.com/IceMetalPunk/psychic-altars/blob/949a1d0757e9e0cb306da9079c6bcd24816c2bf4/src/main/java/com/icemetalpunk/psychicaltars/blocks/PACraftContainerBlock.java#L52-L57
https://github.com/IceMetalPunk/psychic-altars/blob/949a1d0757e9e0cb306da9079c6bcd24816c2bf4/src/main/java/com/icemetalpunk/psychicaltars/blocks/PABlock.java
1) that default getRenderLayer is terrible because it's objectively wrong. That should never return null.
2) you shouldn't be using the Registry events any more and this loop through thing is dumb. instead of calling myBlock.register(event) you could just do event.register(myBlock) and not need these methods at all. Ditto your items.
3) block items should be aware of their blocks. Blocks should not be aware of their block items. Items are registered after blocks for a reason.

The fuck is this used for and why.
https://github.com/IceMetalPunk/psychic-altars/blob/949a1d0757e9e0cb306da9079c6bcd24816c2bf4/src/main/java/com/icemetalpunk/psychicaltars/blocks/OmenBlock.java#L12

 

this.isValid and this.tier are (re)set in the validate() method, which is called right before they're used, so they're both definitely re-evaluated immediately before use. getRangeBB is only being used by operate() method overrides, which is called also in the code immediately following a (re)set in validate(). None of those variables are ever being used without first being re-evaluated :)

getRenderLayer is only meant to indicate when a block doesn't use the default layer so it can be set accordingly. Is RenderType.SOLID the default? If so, I can make that the default return value instead.

You're right about the block registry; I thought I was going to have those PABlock#register methods do a bit more when I first structured it, but then ended up not, so it's an artifact of that. I can easily change that over to remove that method, thanks.

The thing about BlockItems, though, is that I designed the system so I could just add blocks and they'd automatically add their own BlockItems without me having to do twice as much work for every block I add. I suppose I can refactor such that the ItemBlock is created locally in the block's registerBlockItem method instead of stored in a class field, but that's nearly the same code -- what exactly is the benefit of rejecting any reference to the ItemBlock in the block class and manually doubling the amount of new classes I make?

The allOmens list in OmenBlock is used for the Patchouli rendering of the multiblock structures. Since each omen is a separate block rather than a block state property variant (which was a choice that I'm not passionate about nor passionate against), to have the render cycle among all the omen types I needed a way to get a list of all those omen blocks, so I just created that list.

I hope this answers your questions :)

Whatever Minecraft needs, it is most likely not yet another tool tier.

Link to comment
Share on other sites

4 hours ago, diesieben07 said:

They really shouldn't be fields in the block class then and instead method parameters.

 

The reason your cloned children immediately get removed is because you spawn them at 0, 0, 0. When BabyEntitySpawnEvent is triggered the baby animal is not at the correct position yet.

I suppose I could have the validate() method return either a triple or an optional pair to indicate isValid, tier, and range, rather than storing it in the block class's fields. That's definitely something I'll look into, thanks for the suggestion!

I didn't realize the BabyEntitySpawnEvent fired before the baby was moved to the correct position, but looking at the breeding method now with that in mind, I see it. After adding a moveTo for the clones in the event handler, everything is working perfectly now!

Thank you for all your help with everything! ❤️

Whatever Minecraft needs, it is most likely not yet another tool tier.

Link to comment
Share on other sites

15 minutes ago, IceMetalPunk said:

this.isValid and this.tier are (re)set in the validate() method, which is called right before they're used, so they're both definitely re-evaluated immediately before use.

Learn about the out keyword.

15 minutes ago, IceMetalPunk said:

Is RenderType.SOLID the default? 

Yes. I still don't think you really need this method/interface, but not a huge deal. 

  

15 minutes ago, IceMetalPunk said:

and they'd automatically add their own BlockItems without me having to do twice as much work for every block I add.

foreach(Block block : MyBlocks) {
    BlockItem bi = new BlockItem(block)
    event.register(bi);
}

If you want a custom block item, you'll have to treat it special anyway.

Edited by Draco18s

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

  • IceMetalPunk changed the title to [Solved] [1.16.5] FakePlayer and AnimalEntity#getLoveCause leading to NPE
Just now, Choonster said:

I think you're mixing up C# and Java.

Touche. You can simulate it with the ref keyword, or by returning a Tuple.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

2 minutes ago, Draco18s said:

Touche. You can simulate it with the ref keyword, or by returning a Tuple.

Java doesn't have ref either, but does have tuples (from Minecraft and Apache Commons Lang).

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

I swear I've done ref things in my modding work before.

Eh. Oh well. 

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Hello. I've been having a problem when launching minecraft forge. It just doesn't open the game, and leaves me with this "(exit code 1)" error. Both regular and optifine versions of minecraft launch just fine, tried both with 1.18.2 and 1.20.1. I can assure that my drivers are updated so that can't be it, and i've tried using Java 17, 18 and 21 to no avail. Even with no mods installed, the thing won't launch. I'll leave the log here, although it's in spanish: https://jmp.sh/s/FPqGBSi30fzKJDt2M1gc My specs are this: Ryzen 3 4100 || Radeon R9 280x || 16gb ram || Windows 10 I'd appreciate any help, thank you in advance.
    • Hey, Me and my friends decided to start up a Server with "a few" mods, the last few days everything went well we used all the items we wanted. Now our Game crashes the moment we touch a Lava Bucket inside our Inventory. It just instantly closes and gives me an "Alc Cleanup"  Crash screen (Using GDLauncher). I honestly dont have a clue how to resolve this error. If anyone could help id really appreciate it, I speak German and Englisch so you can choose whatever you speak more fluently. Thanks in Advance. Plus I dont know how to link my Crash Report help for that would be nice too whoops
    • I hosted a minecraft server and I modded it, and there is always an error on the console which closes the server. If someone knows how to repair it, it would be amazing. Thank you. I paste the crash report down here: ---- Minecraft Crash Report ---- WARNING: coremods are present:   llibrary (llibrary-core-1.0.11-1.12.2.jar)   WolfArmorCore (WolfArmorAndStorage-1.12.2-3.8.0-universal-signed.jar)   AstralCore (astralsorcery-1.12.2-1.10.27.jar)   CreativePatchingLoader (CreativeCore_v1.10.71_mc1.12.2.jar)   SecurityCraftLoadingPlugin ([1.12.2] SecurityCraft v1.9.8.jar)   ForgelinPlugin (Forgelin-1.8.4.jar)   midnight (themidnight-0.3.5.jar)   FutureMC (Future-MC-0.2.19.jar)   SpartanWeaponry-MixinLoader (SpartanWeaponry-1.12.2-1.5.3.jar)   Backpacked (backpacked-1.4.3-1.12.2.jar)   LoadingPlugin (Reskillable-1.12.2-1.13.0.jar)   LoadingPlugin (Bloodmoon-MC1.12.2-1.5.3.jar) Contact their authors BEFORE contacting forge // There are four lights! Time: 3/28/24 12:17 PM Description: Exception in server tick loop net.minecraftforge.fml.common.LoaderException: java.lang.NoClassDefFoundError: net/minecraft/client/multiplayer/WorldClient     at net.minecraftforge.fml.common.AutomaticEventSubscriber.inject(AutomaticEventSubscriber.java:89)     at net.minecraftforge.fml.common.FMLModContainer.constructMod(FMLModContainer.java:612)     at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:498)     at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)     at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)     at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)     at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)     at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)     at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)     at com.google.common.eventbus.EventBus.post(EventBus.java:217)     at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:219)     at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:197)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:498)     at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)     at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)     at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)     at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)     at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)     at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)     at com.google.common.eventbus.EventBus.post(EventBus.java:217)     at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:136)     at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:595)     at net.minecraftforge.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:98)     at net.minecraftforge.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:333)     at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:125)     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:486)     at java.lang.Thread.run(Thread.java:750) Caused by: java.lang.NoClassDefFoundError: net/minecraft/client/multiplayer/WorldClient     at java.lang.Class.getDeclaredMethods0(Native Method)     at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)     at java.lang.Class.privateGetPublicMethods(Class.java:2902)     at java.lang.Class.getMethods(Class.java:1615)     at net.minecraftforge.fml.common.eventhandler.EventBus.register(EventBus.java:82)     at net.minecraftforge.fml.common.AutomaticEventSubscriber.inject(AutomaticEventSubscriber.java:82)     ... 31 more Caused by: java.lang.ClassNotFoundException: net.minecraft.client.multiplayer.WorldClient     at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)     at java.lang.ClassLoader.loadClass(ClassLoader.java:418)     at java.lang.ClassLoader.loadClass(ClassLoader.java:351)     ... 37 more Caused by: net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerException: Exception in class transformer net.minecraftforge.fml.common.asm.transformers.SideTransformer@4e558728 from coremod FMLCorePlugin     at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:260)     at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279)     at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176)     ... 39 more Caused by: java.lang.RuntimeException: Attempted to load class bsb for invalid side SERVER     at net.minecraftforge.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:62)     at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:256)     ... 41 more A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- System Details -- Details:     Minecraft Version: 1.12.2     Operating System: Linux (amd64) version 5.10.0-28-cloud-amd64     Java Version: 1.8.0_382, Temurin     Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Temurin     Memory: 948745536 bytes (904 MB) / 1564999680 bytes (1492 MB) up to 7635730432 bytes (7282 MB)     JVM Flags: 2 total; -Xmx8192M -Xms256M     IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0     FML: MCP 9.42 Powered by Forge 14.23.5.2860 63 mods loaded, 63 mods active     States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored     | State | ID                 | Version                 | Source                                                | Signature                                |     |:----- |:------------------ |:----------------------- |:----------------------------------------------------- |:---------------------------------------- |     | LC    | minecraft          | 1.12.2                  | minecraft.jar                                         | None                                     |     | LC    | mcp                | 9.42                    | minecraft.jar                                         | None                                     |     | LC    | FML                | 8.0.99.99               | forge-1.12.2-14.23.5.2860.jar                         | e3c3d50c7c986df74c645c0ac54639741c90a557 |     | LC    | forge              | 14.23.5.2860            | forge-1.12.2-14.23.5.2860.jar                         | e3c3d50c7c986df74c645c0ac54639741c90a557 |     | LC    | creativecoredummy  | 1.0.0                   | minecraft.jar                                         | None                                     |     | LC    | backpacked         | 1.4.2                   | backpacked-1.4.3-1.12.2.jar                           | None                                     |     | LC    | itemblacklist      | 1.4.3                   | ItemBlacklist-1.4.3.jar                               | None                                     |     | LC    | securitycraft      | v1.9.8                  | [1.12.2] SecurityCraft v1.9.8.jar                     | None                                     |     | LC    | aiimprovements     | 0.0.1.3                 | AIImprovements-1.12-0.0.1b3.jar                       | None                                     |     | LC    | jei                | 4.16.1.301              | jei_1.12.2-4.16.1.301.jar                             | None                                     |     | LC    | appleskin          | 1.0.14                  | AppleSkin-mc1.12-1.0.14.jar                           | None                                     |     | LC    | baubles            | 1.5.2                   | Baubles-1.12-1.5.2.jar                                | None                                     |     | LC    | astralsorcery      | 1.10.27                 | astralsorcery-1.12.2-1.10.27.jar                      | a0f0b759d895c15ceb3e3bcb5f3c2db7c582edf0 |     | LC    | attributefix       | 1.0.12                  | AttributeFix-Forge-1.12.2-1.0.12.jar                  | None                                     |     | LC    | atum               | 2.0.20                  | Atum-1.12.2-2.0.20.jar                                | None                                     |     | LC    | bloodmoon          | 1.5.3                   | Bloodmoon-MC1.12.2-1.5.3.jar                          | d72e0dd57935b3e9476212aea0c0df352dd76291 |     | LC    | forgelin           | 1.8.4                   | Forgelin-1.8.4.jar                                    | None                                     |     | LC    | bountiful          | 2.2.2                   | Bountiful-2.2.2.jar                                   | None                                     |     | LC    | camera             | 1.0.10                  | camera-1.0.10.jar                                     | None                                     |     | LC    | chisel             | MC1.12.2-1.0.2.45       | Chisel-MC1.12.2-1.0.2.45.jar                          | None                                     |     | LC    | collective         | 3.0                     | collective-1.12.2-3.0.jar                             | None                                     |     | LC    | reskillable        | 1.12.2-1.13.0           | Reskillable-1.12.2-1.13.0.jar                         | None                                     |     | LC    | compatskills       | 1.12.2-1.17.0           | CompatSkills-1.12.2-1.17.0.jar                        | None                                     |     | LC    | creativecore       | 1.10.0                  | CreativeCore_v1.10.71_mc1.12.2.jar                    | None                                     |     | LC    | customnpcs         | 1.12                    | CustomNPCs_1.12.2-(05Jul20).jar                       | None                                     |     | LC    | darknesslib        | 1.1.2                   | DarknessLib-1.12.2-1.1.2.jar                          | 220f10d3a93b3ff5fbaa7434cc629d863d6751b9 |     | LC    | dungeonsmod        | @VERSION@               | DungeonsMod-1.12.2-1.0.8.jar                          | None                                     |     | LC    | enhancedvisuals    | 1.3.0                   | EnhancedVisuals_v1.4.4_mc1.12.2.jar                   | None                                     |     | LC    | extrautils2        | 1.0                     | extrautils2-1.12-1.9.9.jar                            | None                                     |     | LC    | futuremc           | 0.2.6                   | Future-MC-0.2.19.jar                                  | None                                     |     | LC    | geckolib3          | 3.0.30                  | geckolib-forge-1.12.2-3.0.31.jar                      | None                                     |     | LC    | gottschcore        | 1.15.1                  | GottschCore-mc1.12.2-f14.23.5.2859-v1.15.1.jar        | None                                     |     | LC    | hardcorerevival    | 1.2.0                   | HardcoreRevival_1.12.2-1.2.0.jar                      | None                                     |     | LC    | waila              | 1.8.26                  | Hwyla-1.8.26-B41_1.12.2.jar                           | None                                     |     | LE    | imsm               | 1.12                    | Instant Massive Structures Mod 1.12.2.jar             | None                                     |     | L     | journeymap         | 1.12.2-5.7.1p2          | journeymap-1.12.2-5.7.1p2.jar                         | None                                     |     | L     | mobsunscreen       | @version@               | mobsunscreen-1.12.2-3.1.5.jar                         | None                                     |     | L     | morpheus           | 1.12.2-3.5.106          | Morpheus-1.12.2-3.5.106.jar                           | None                                     |     | L     | llibrary           | 1.7.20                  | llibrary-1.7.20-1.12.2.jar                            | None                                     |     | L     | mowziesmobs        | 1.5.8                   | mowziesmobs-1.5.8.jar                                 | None                                     |     | L     | nocubessrparmory   | 3.0.0                   | NoCubes_SRP_Combat_Addon_3.0.0.jar                    | None                                     |     | L     | nocubessrpnests    | 3.0.0                   | NoCubes_SRP_Nests_Addon_3.0.0.jar                     | None                                     |     | L     | nocubessrpsurvival | 3.0.0                   | NoCubes_SRP_Survival_Addon_3.0.0.jar                  | None                                     |     | L     | nocubesrptweaks    | V4.1                    | nocubesrptweaks-V4.1.jar                              | None                                     |     | L     | patchouli          | 1.0-23.6                | Patchouli-1.0-23.6.jar                                | None                                     |     | L     | artifacts          | 1.1.2                   | RLArtifacts-1.1.2.jar                                 | None                                     |     | L     | rsgauges           | 1.2.8                   | rsgauges-1.12.2-1.2.8.jar                             | None                                     |     | L     | rustic             | 1.1.7                   | rustic-1.1.7.jar                                      | None                                     |     | L     | silentlib          | 3.0.13                  | SilentLib-1.12.2-3.0.14+168.jar                       | None                                     |     | L     | scalinghealth      | 1.3.37                  | ScalingHealth-1.12.2-1.3.42+147.jar                   | None                                     |     | L     | lteleporters       | 1.12.2-3.0.2            | simpleteleporters-1.12.2-3.0.2.jar                    | None                                     |     | L     | spartanshields     | 1.5.5                   | SpartanShields-1.12.2-1.5.5.jar                       | None                                     |     | L     | spartanweaponry    | 1.5.3                   | SpartanWeaponry-1.12.2-1.5.3.jar                      | None                                     |     | L     | srparasites        | 1.9.18                  | SRParasites-1.12.2v1.9.18.jar                         | None                                     |     | L     | treasure2          | 2.2.0                   | Treasure2-mc1.12.2-f14.23.5.2859-v2.2.1.jar           | None                                     |     | L     | treeharvester      | 4.0                     | treeharvester_1.12.2-4.0.jar                          | None                                     |     | L     | twilightforest     | 3.11.1021               | twilightforest-1.12.2-3.11.1021-universal.jar         | None                                     |     | L     | variedcommodities  | 1.12.2                  | VariedCommodities_1.12.2-(31Mar23).jar                | None                                     |     | L     | voicechat          | 1.12.2-2.4.32           | voicechat-forge-1.12.2-2.4.32.jar                     | None                                     |     | L     | wolfarmor          | 3.8.0                   | WolfArmorAndStorage-1.12.2-3.8.0-universal-signed.jar | None                                     |     | L     | worldborder        | 2.3                     | worldborder_1.12.2-2.3.jar                            | None                                     |     | L     | midnight           | 0.3.5                   | themidnight-0.3.5.jar                                 | None                                     |     | L     | structurize        | 1.12.2-0.10.277-RELEASE | structurize-1.12.2-0.10.277-RELEASE.jar               | None                                     |     Loaded coremods (and transformers):  llibrary (llibrary-core-1.0.11-1.12.2.jar)   net.ilexiconn.llibrary.server.core.plugin.LLibraryTransformer   net.ilexiconn.llibrary.server.core.patcher.LLibraryRuntimePatcher WolfArmorCore (WolfArmorAndStorage-1.12.2-3.8.0-universal-signed.jar)    AstralCore (astralsorcery-1.12.2-1.10.27.jar)    CreativePatchingLoader (CreativeCore_v1.10.71_mc1.12.2.jar)    SecurityCraftLoadingPlugin ([1.12.2] SecurityCraft v1.9.8.jar)    ForgelinPlugin (Forgelin-1.8.4.jar)    midnight (themidnight-0.3.5.jar)   com.mushroom.midnight.core.transformer.MidnightClassTransformer FutureMC (Future-MC-0.2.19.jar)   thedarkcolour.futuremc.asm.CoreTransformer SpartanWeaponry-MixinLoader (SpartanWeaponry-1.12.2-1.5.3.jar)    Backpacked (backpacked-1.4.3-1.12.2.jar)   com.mrcrayfish.backpacked.asm.BackpackedTransformer LoadingPlugin (Reskillable-1.12.2-1.13.0.jar)   codersafterdark.reskillable.base.asm.ClassTransformer LoadingPlugin (Bloodmoon-MC1.12.2-1.5.3.jar)   lumien.bloodmoon.asm.ClassTransformer     Profiler Position: N/A (disabled)     Is Modded: Definitely; Server brand changed to 'fml,forge'     Type: Dedicated Server (map_server.txt)
    • When i add mods like falling leaves, visuality and kappas shaders, even if i restart Minecraft they dont show up in the mods menu and they dont work
    • Delete the forge-client.toml file in your config folder  
  • Topics

×
×
  • Create New...

Important Information

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