Fix runtime errors

This commit is contained in:
Zoe Gidiere
2024-10-09 16:41:04 -06:00
parent 2ccf8a8805
commit be7e10c30c
4 changed files with 9 additions and 12 deletions
@@ -76,6 +76,6 @@ public class MinecraftWorldHandle implements WorldHandle {
if(!id.contains(":")) throw new IllegalArgumentException("Invalid entity identifier " + id);
Identifier identifier = Identifier.tryParse(id);
if(identifier == null) identifier = Identifier.tryParse(id);
return (EntityType) Registries.ENTITY_TYPE.getEntry(identifier).orElseThrow();
return (EntityType) Registries.ENTITY_TYPE.getEntry(identifier).orElseThrow().value();
}
}
@@ -9,6 +9,7 @@ import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import java.util.Collection;
import java.util.List;
import com.dfsek.terra.api.block.state.properties.Property;
@@ -24,7 +25,7 @@ public abstract class PropertyMixin<T> {
private String name;
@Shadow
public abstract Collection<T> getValues();
public abstract List<T> getValues();
@Intrinsic
public Collection<T> terra$values() {
@@ -49,9 +49,6 @@ public abstract class WorldChunkMixin {
@Nullable
public abstract net.minecraft.block.BlockState setBlockState(BlockPos pos, net.minecraft.block.BlockState state, boolean moved);
@Shadow
public abstract TickSchedulers getTickSchedulers();
public void terra$setBlock(int x, int y, int z, BlockState data, boolean physics) {
BlockPos blockPos = new BlockPos(x, y, z);
setBlockState(blockPos, (net.minecraft.block.BlockState) data, false);