22w16b with massive Component changes

This commit is contained in:
gnembon committed 2022-04-21 00:26:39 +02:00
1 parent 8101abb431
commit 746c8548e9
31 files changed
+153 -162

No files matched your search

+4 -4
View File
@@ -5,7 +5,7 @@ import java.util.List;
import java.util.Map;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Registry;
import net.minecraft.network.chat.BaseComponent;
import net.minecraft.network.chat.Component;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.MobSpawnType;
@@ -221,7 +221,7 @@ public class BlockInfo
entry(Material.POWDER_SNOW , "powder_snow")
);
public static List<BaseComponent> blockInfo(BlockPos pos, ServerLevel world)
public static List<Component> blockInfo(BlockPos pos, ServerLevel world)
{
BlockState state = world.getBlockState(pos);
Material material = state.getMaterial();
@@ -231,7 +231,7 @@ public class BlockInfo
{
metastring += ", "+iproperty.getName() + '='+state.getValue(iproperty);
}
List<BaseComponent> lst = new ArrayList<>();
List<Component> lst = new ArrayList<>();
lst.add(Messenger.s(""));
lst.add(Messenger.s("====================================="));
lst.add(Messenger.s(String.format("Block info for %s%s (id %d%s):",Registry.BLOCK.getKey(block),metastring, Registry.BLOCK.getId(block), metastring )));
@@ -272,7 +272,7 @@ public class BlockInfo
return lst;
}
private static BaseComponent wander_chances(BlockPos pos, ServerLevel worldIn)
private static Component wander_chances(BlockPos pos, ServerLevel worldIn)
{
PathfinderMob creature = new ZombifiedPiglin(EntityType.ZOMBIFIED_PIGLIN, worldIn);
creature.finalizeSpawn(worldIn, worldIn.getCurrentDifficultyAt(pos), MobSpawnType.NATURAL, null, null);