Skip to content

Commit

Permalink
Finish 1.18.2 port
Browse files Browse the repository at this point in the history
  • Loading branch information
emilyploszaj committed Mar 2, 2022
1 parent 90e9a1d commit 366f808
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 18 deletions.
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx2G

minecraft_version=1.18.2-rc1
yarn_mappings=1.18.2-rc1+build.2
minecraft_version=1.18.2
yarn_mappings=1.18.2+build.1
loader_version=0.13.3

mod_version = 3.2.0-florens
mod_version = 3.3.0
maven_group = dev.emi
archives_base_name = trinkets

Expand Down
9 changes: 4 additions & 5 deletions src/main/java/dev/emi/trinkets/data/EntitySlotLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,17 @@
import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking;
import net.fabricmc.fabric.api.resource.IdentifiableResourceReloadListener;
import net.fabricmc.fabric.api.resource.ResourceReloadListenerKeys;
import net.fabricmc.loader.api.FabricLoader;
import net.minecraft.entity.EntityType;
import net.minecraft.nbt.NbtCompound;
import net.minecraft.network.PacketByteBuf;
import net.minecraft.resource.Resource;
import net.minecraft.resource.ResourceManager;
import net.minecraft.resource.SinglePreparationResourceReloader;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.tag.TagKey;
import net.minecraft.util.Identifier;
import net.minecraft.util.JsonHelper;
import net.minecraft.util.profiler.Profiler;
import net.minecraft.util.registry.Registry;
import net.minecraft.util.registry.RegistryEntry;

public class EntitySlotLoader extends SinglePreparationResourceReloader<Map<String, Map<String, Set<String>>>> implements IdentifiableResourceReloadListener {

Expand Down Expand Up @@ -137,15 +134,17 @@ protected void apply(Map<String, Map<String, Set<String>>> loader, ResourceManag

try {
if (entityName.startsWith("#")) {
// FIXME: registry tags not populated yet, might need to make this lazy
// TODO rewrite this to work with the new tag system
TrinketsMain.LOGGER.error("[trinkets] Attempted to assign entity entry to tag");
/*
TagKey<EntityType<?>> tag = TagKey.of(Registry.ENTITY_TYPE_KEY, new Identifier(entityName.substring(1)));
List<? extends EntityType<?>> entityTypes = Registry.ENTITY_TYPE.getEntryList(tag)
.orElseThrow(() -> new IllegalArgumentException("Unknown entity tag '" + entityName + "'"))
.stream()
.map(RegistryEntry::value)
.toList();
types.addAll(entityTypes);
types.addAll(entityTypes);*/
} else {
types.add(Registry.ENTITY_TYPE.getOrEmpty(new Identifier(entityName))
.orElseThrow(() -> new IllegalArgumentException("Unknown entity '" + entityName + "'")));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import net.minecraft.network.packet.s2c.play.PlayerRespawnS2CPacket;
import net.minecraft.util.registry.RegistryEntry;
import net.minecraft.util.registry.RegistryKey;
import net.minecraft.world.dimension.DimensionType;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"entities": ["player", "#some_entities,"],
"entities": ["player"],
"slots": [
"hand/glove",
"hand/ring",
Expand Down

0 comments on commit 366f808

Please sign in to comment.