document a bunch of stuff

This commit is contained in:
dfsek
2021-12-23 14:43:43 -07:00
parent f353d1686c
commit a092dfdc3b
21 changed files with 272 additions and 58 deletions

View File

@@ -3,6 +3,10 @@ package com.dfsek.terra.fabric.mixin.implementations.block.state;
import com.dfsek.terra.api.block.state.properties.Property;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Implements;
import org.spongepowered.asm.mixin.Interface;
import org.spongepowered.asm.mixin.Interface.Remap;
import org.spongepowered.asm.mixin.Intrinsic;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
@@ -10,7 +14,8 @@ import java.util.Collection;
@Mixin(net.minecraft.state.property.Property.class)
public abstract class PropertyMixin<T> implements Property<T> {
@Implements(@Interface(iface = Property.class, prefix = "terra$", remap = Remap.NONE))
public abstract class PropertyMixin<T> {
@Shadow
@Final
private Class<T> type;
@@ -22,18 +27,18 @@ public abstract class PropertyMixin<T> implements Property<T> {
@Final
private String name;
@Override
public Collection<T> values() {
@Intrinsic
public Collection<T> terra$values() {
return getValues();
}
@Override
public Class<T> getType() {
@Intrinsic
public Class<T> terra$getType() {
return type;
}
@Override
public String getName() {
@Intrinsic
public String terra$getID() {
return name;
}
}