mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-24 22:14:32 +00:00
Add missing Override annotations
This commit is contained in:
1 parent
c2845967cc
commit
e3777f4559
59 files changed
+263
-42
No files matched your search
@@ -52,6 +52,7 @@ public final class Event implements Comparable<Event>
|
||||
return offset;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(Event event)
|
||||
{
|
||||
return new Float(offset).compareTo(event.offset);
|
||||
|
||||
@@ -46,11 +46,13 @@ public final class TimeValues
|
||||
{
|
||||
INSTANCE;
|
||||
|
||||
@Override
|
||||
public float apply(float input)
|
||||
{
|
||||
return input;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName()
|
||||
{
|
||||
return "identity";
|
||||
@@ -66,6 +68,7 @@ public final class TimeValues
|
||||
this.output = output;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float apply(float input)
|
||||
{
|
||||
return output;
|
||||
@@ -108,6 +111,7 @@ public final class TimeValues
|
||||
this.output = newValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float apply(float input)
|
||||
{
|
||||
return output;
|
||||
@@ -146,6 +150,7 @@ public final class TimeValues
|
||||
this.args = args;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float apply(float input)
|
||||
{
|
||||
float ret = input;
|
||||
@@ -201,6 +206,7 @@ public final class TimeValues
|
||||
this.f = f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float apply(float input)
|
||||
{
|
||||
return g.apply(f.apply(input));
|
||||
@@ -238,6 +244,7 @@ public final class TimeValues
|
||||
this.valueResolver = valueResolver;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName()
|
||||
{
|
||||
return parameterName;
|
||||
@@ -258,6 +265,7 @@ public final class TimeValues
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public float apply(float input)
|
||||
{
|
||||
resolve();
|
||||
@@ -298,6 +306,7 @@ public final class TimeValues
|
||||
this.valueResolver.set(valueResolver);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
@Nullable
|
||||
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type)
|
||||
@@ -309,6 +318,7 @@ public final class TimeValues
|
||||
|
||||
return (TypeAdapter<T>)new TypeAdapter<ITimeValue>()
|
||||
{
|
||||
@Override
|
||||
public void write(JsonWriter out, ITimeValue parameter) throws IOException
|
||||
{
|
||||
if(parameter instanceof ConstValue)
|
||||
@@ -341,6 +351,7 @@ public final class TimeValues
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ITimeValue read(JsonReader in) throws IOException
|
||||
{
|
||||
switch(in.peek())
|
||||
|
||||
@@ -293,6 +293,7 @@ public abstract class FieldWrapper implements IFieldWrapper
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setupConfiguration(Configuration cfg, String desc, String langKey, boolean reqMCRestart, boolean reqWorldRestart)
|
||||
{
|
||||
super.setupConfiguration(cfg, desc, langKey, reqMCRestart, reqWorldRestart);
|
||||
|
||||
@@ -98,6 +98,7 @@ class TypeAdapters
|
||||
}
|
||||
};
|
||||
static ITypeAdapter Bool = new ITypeAdapter() {
|
||||
@Override
|
||||
public Object getValue(Property prop) {
|
||||
return Boolean.valueOf(prop.getBoolean());
|
||||
}
|
||||
@@ -467,6 +468,7 @@ class TypeAdapters
|
||||
};
|
||||
static ITypeAdapter chr = new ITypeAdapter() {
|
||||
|
||||
@Override
|
||||
public Object getValue(Property prop) {
|
||||
return (char)prop.getInt();
|
||||
}
|
||||
@@ -500,6 +502,7 @@ class TypeAdapters
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getValue(Property prop) {
|
||||
int[] v = prop.getIntList();
|
||||
char[] ret = new char[v.length];
|
||||
@@ -532,6 +535,7 @@ class TypeAdapters
|
||||
};
|
||||
static ITypeAdapter Chr = new ITypeAdapter() {
|
||||
|
||||
@Override
|
||||
public Object getValue(Property prop) {
|
||||
return Character.valueOf((char)prop.getInt());
|
||||
}
|
||||
@@ -565,6 +569,7 @@ class TypeAdapters
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getValue(Property prop) {
|
||||
int[] v = prop.getIntList();
|
||||
Character[] ret = new Character[v.length];
|
||||
|
||||
@@ -61,7 +61,7 @@ public class CompoundIngredient extends Ingredient
|
||||
return this.itemIds;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean apply(@Nullable ItemStack target)
|
||||
{
|
||||
if (target == null)
|
||||
@@ -74,6 +74,7 @@ public class CompoundIngredient extends Ingredient
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void invalidate()
|
||||
{
|
||||
this.itemIds = null;
|
||||
|
||||
@@ -528,6 +528,7 @@ public final class TRSRTransformation implements IModelState, ITransformation
|
||||
return new net.minecraft.client.renderer.block.model.ItemTransformVec3f(toLwjgl(toXYZDegrees(getLeftRot())), toLwjgl(getTranslation()), toLwjgl(getScale()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Matrix4f getMatrix()
|
||||
{
|
||||
return (Matrix4f)matrix.clone();
|
||||
@@ -557,6 +558,7 @@ public final class TRSRTransformation implements IModelState, ITransformation
|
||||
return (Quat4f)rightRot.clone();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<TRSRTransformation> apply(Optional<? extends IModelPart> part)
|
||||
{
|
||||
if(part.isPresent())
|
||||
@@ -566,6 +568,7 @@ public final class TRSRTransformation implements IModelState, ITransformation
|
||||
return Optional.of(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumFacing rotate(EnumFacing facing)
|
||||
{
|
||||
return rotate(matrix, facing);
|
||||
@@ -597,6 +600,7 @@ public final class TRSRTransformation implements IModelState, ITransformation
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int rotate(EnumFacing facing, int vertexIndex)
|
||||
{
|
||||
// FIXME check if this is good enough
|
||||
|
||||
@@ -78,6 +78,7 @@ public final class AnimationStateMachine implements IAnimationStateMachine
|
||||
.expireAfterWrite(100, TimeUnit.MILLISECONDS)
|
||||
.build(new CacheLoader<Triple<? extends IClip, Float, Float>, Pair<IModelState, Iterable<Event>>>()
|
||||
{
|
||||
@Override
|
||||
public Pair<IModelState, Iterable<Event>> load(Triple<? extends IClip, Float, Float> key) throws Exception
|
||||
{
|
||||
return Clips.apply(key.getLeft(), key.getMiddle(), key.getRight());
|
||||
@@ -89,12 +90,14 @@ public final class AnimationStateMachine implements IAnimationStateMachine
|
||||
{
|
||||
this(parameters, clips, states, ImmutableMultimap.copyOf(Multimaps.newSetMultimap(Maps.transformValues(transitions, new Function<String, Collection<String>>()
|
||||
{
|
||||
@Override
|
||||
public Collection<String> apply(String input)
|
||||
{
|
||||
return ImmutableSet.of(input);
|
||||
}
|
||||
}), new Supplier<Set<String>>()
|
||||
{
|
||||
@Override
|
||||
public Set<String> get()
|
||||
{
|
||||
return Sets.newHashSet();
|
||||
@@ -144,6 +147,7 @@ public final class AnimationStateMachine implements IAnimationStateMachine
|
||||
currentState = state;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Pair<IModelState, Iterable<Event>> apply(float time)
|
||||
{
|
||||
if(lastPollTime == Float.NEGATIVE_INFINITY)
|
||||
@@ -178,6 +182,7 @@ public final class AnimationStateMachine implements IAnimationStateMachine
|
||||
}
|
||||
return Pair.of(pair.getLeft(), Iterables.filter(pair.getRight(), new Predicate<Event>()
|
||||
{
|
||||
@Override
|
||||
public boolean apply(Event event)
|
||||
{
|
||||
return !event.event().startsWith("!");
|
||||
@@ -185,6 +190,7 @@ public final class AnimationStateMachine implements IAnimationStateMachine
|
||||
}));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void transition(String newState)
|
||||
{
|
||||
IClip nc = clips.get(newState);
|
||||
@@ -200,11 +206,13 @@ public final class AnimationStateMachine implements IAnimationStateMachine
|
||||
currentState = nc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String currentState()
|
||||
{
|
||||
return currentStateName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void shouldHandleSpecialEvents(boolean value)
|
||||
{
|
||||
shouldHandleSpecialEvents = true;
|
||||
@@ -269,6 +277,7 @@ public final class AnimationStateMachine implements IAnimationStateMachine
|
||||
{
|
||||
private AnimationStateMachine asm;
|
||||
|
||||
@Override
|
||||
public IClip apply(String name)
|
||||
{
|
||||
return asm.clips.get(name);
|
||||
@@ -285,6 +294,7 @@ public final class AnimationStateMachine implements IAnimationStateMachine
|
||||
this.customParameters = customParameters;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ITimeValue apply(String name)
|
||||
{
|
||||
if(asm.parameters.containsKey(name))
|
||||
@@ -311,6 +321,7 @@ public final class AnimationStateMachine implements IAnimationStateMachine
|
||||
{
|
||||
INSTANCE;
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
@Nullable
|
||||
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type)
|
||||
|
||||
@@ -40,14 +40,17 @@ public class CapabilityAnimation
|
||||
{
|
||||
CapabilityManager.INSTANCE.register(IAnimationStateMachine.class, new Capability.IStorage<IAnimationStateMachine>()
|
||||
{
|
||||
@Override
|
||||
public NBTBase writeNBT(Capability<IAnimationStateMachine> capability, IAnimationStateMachine instance, EnumFacing side)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readNBT(Capability<IAnimationStateMachine> capability, IAnimationStateMachine instance, EnumFacing side, NBTBase nbt) {}
|
||||
}, new Callable<IAnimationStateMachine>()
|
||||
{
|
||||
@Override
|
||||
public IAnimationStateMachine call() throws Exception
|
||||
{
|
||||
return AnimationStateMachine.getMissing();
|
||||
|
||||
@@ -67,16 +67,19 @@ public final class Clips
|
||||
{
|
||||
INSTANCE;
|
||||
|
||||
@Override
|
||||
public IJointClip apply(IJoint joint)
|
||||
{
|
||||
return JointClips.IdentityJointClip.INSTANCE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Event> pastEvents(float lastPollTime, float time)
|
||||
{
|
||||
return ImmutableSet.<Event>of();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName()
|
||||
{
|
||||
return "identity";
|
||||
@@ -119,11 +122,13 @@ public final class Clips
|
||||
this.clipName = clipName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IJointClip apply(IJoint joint)
|
||||
{
|
||||
return childClip.apply(joint);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Event> pastEvents(float lastPollTime, float time)
|
||||
{
|
||||
return childClip.pastEvents(lastPollTime, time);
|
||||
@@ -163,11 +168,13 @@ public final class Clips
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IJointClip apply(final IJoint joint)
|
||||
{
|
||||
return new IJointClip()
|
||||
{
|
||||
private final IJointClip parent = childClip.apply(joint);
|
||||
@Override
|
||||
public TRSRTransformation apply(float time)
|
||||
{
|
||||
return parent.apply(TimeClip.this.time.apply(time));
|
||||
@@ -175,6 +182,7 @@ public final class Clips
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Event> pastEvents(float lastPollTime, float time)
|
||||
{
|
||||
return childClip.pastEvents(this.time.apply(lastPollTime), this.time.apply(time));
|
||||
@@ -218,6 +226,7 @@ public final class Clips
|
||||
this.progress = progress;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IJointClip apply(IJoint joint)
|
||||
{
|
||||
IJointClip fromClip = from.apply(joint);
|
||||
@@ -225,6 +234,7 @@ public final class Clips
|
||||
return blendClips(joint, fromClip, toClip, input, progress);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Event> pastEvents(float lastPollTime, float time)
|
||||
{
|
||||
float clipLastPollTime = input.apply(lastPollTime);
|
||||
@@ -281,6 +291,7 @@ public final class Clips
|
||||
{
|
||||
return new IJointClip()
|
||||
{
|
||||
@Override
|
||||
public TRSRTransformation apply(float time)
|
||||
{
|
||||
float clipTime = input.apply(time);
|
||||
@@ -296,6 +307,7 @@ public final class Clips
|
||||
{
|
||||
return Pair.<IModelState, Iterable<Event>>of(new IModelState()
|
||||
{
|
||||
@Override
|
||||
public Optional<TRSRTransformation> apply(Optional<? extends IModelPart> part)
|
||||
{
|
||||
if(!part.isPresent() || !(part.get() instanceof IJoint))
|
||||
@@ -333,11 +345,13 @@ public final class Clips
|
||||
this.event = event;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IJointClip apply(IJoint joint)
|
||||
{
|
||||
return clip.apply(joint);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Event> pastEvents(float lastPollTime, float time)
|
||||
{
|
||||
if(parameter.apply(lastPollTime) < 0 && parameter.apply(time) >= 0)
|
||||
@@ -382,18 +396,21 @@ public final class Clips
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IJointClip apply(final IJoint joint)
|
||||
{
|
||||
resolve();
|
||||
return clip.apply(joint);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Event> pastEvents(float lastPollTime, float time)
|
||||
{
|
||||
resolve();
|
||||
return clip.pastEvents(lastPollTime, time);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName()
|
||||
{
|
||||
return clipName;
|
||||
@@ -433,6 +450,7 @@ public final class Clips
|
||||
this.clipResolver.set(clipResolver);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
@Nullable
|
||||
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type)
|
||||
@@ -446,6 +464,7 @@ public final class Clips
|
||||
|
||||
return (TypeAdapter<T>)new TypeAdapter<IClip>()
|
||||
{
|
||||
@Override
|
||||
public void write(JsonWriter out, IClip clip) throws IOException
|
||||
{
|
||||
// IdentityClip + ClipReference
|
||||
@@ -497,6 +516,7 @@ public final class Clips
|
||||
throw new NotImplementedException("unknown Clip to json: " + clip);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IClip read(JsonReader in) throws IOException
|
||||
{
|
||||
switch(in.peek())
|
||||
|
||||
@@ -30,6 +30,7 @@ public final class JointClips
|
||||
{
|
||||
INSTANCE;
|
||||
|
||||
@Override
|
||||
public TRSRTransformation apply(float time)
|
||||
{
|
||||
return TRSRTransformation.identity();
|
||||
@@ -47,6 +48,7 @@ public final class JointClips
|
||||
this.clip = clip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TRSRTransformation apply(float time)
|
||||
{
|
||||
return clip.apply(child).apply(time);
|
||||
|
||||
@@ -122,6 +122,7 @@ public class ExtendedBlockState extends BlockStateContainer
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public <V> IExtendedBlockState withProperty(IUnlistedProperty<V> property, V value)
|
||||
{
|
||||
if(!this.unlistedProperties.containsKey(property))
|
||||
@@ -141,11 +142,13 @@ public class ExtendedBlockState extends BlockStateContainer
|
||||
return new ExtendedStateImplementation(getBlock(), getProperties(), ImmutableMap.copyOf(newMap), propertyValueTable).setMap(this.normalMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<IUnlistedProperty<?>> getUnlistedNames()
|
||||
{
|
||||
return Collections.unmodifiableCollection(unlistedProperties.keySet());
|
||||
}
|
||||
|
||||
@Override
|
||||
public <V>V getValue(IUnlistedProperty<V> property)
|
||||
{
|
||||
if(!this.unlistedProperties.containsKey(property))
|
||||
@@ -155,6 +158,7 @@ public class ExtendedBlockState extends BlockStateContainer
|
||||
return property.getType().cast(this.unlistedProperties.get(property).orNull());
|
||||
}
|
||||
|
||||
@Override
|
||||
public ImmutableMap<IUnlistedProperty<?>, Optional<?>> getUnlistedProperties()
|
||||
{
|
||||
return unlistedProperties;
|
||||
@@ -173,6 +177,7 @@ public class ExtendedBlockState extends BlockStateContainer
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getClean()
|
||||
{
|
||||
return this.normalMap.get(getProperties());
|
||||
|
||||
@@ -35,9 +35,13 @@ public class Properties
|
||||
*/
|
||||
public static final IUnlistedProperty<IModelState> AnimationProperty = new IUnlistedProperty<IModelState>()
|
||||
{
|
||||
@Override
|
||||
public String getName() { return "forge_animation"; }
|
||||
@Override
|
||||
public boolean isValid(IModelState state) { return true; }
|
||||
@Override
|
||||
public Class<IModelState> getType() { return IModelState.class; }
|
||||
@Override
|
||||
public String valueToString(IModelState state) { return state.toString(); }
|
||||
};
|
||||
|
||||
@@ -55,21 +59,25 @@ public class Properties
|
||||
this.parent = parent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName()
|
||||
{
|
||||
return parent.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValid(V value)
|
||||
{
|
||||
return parent.getAllowedValues().contains(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<V> getType()
|
||||
{
|
||||
return parent.getValueClass();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String valueToString(V value)
|
||||
{
|
||||
return parent.getName(value);
|
||||
|
||||
@@ -38,21 +38,25 @@ public class PropertyFloat implements IUnlistedProperty<Float>
|
||||
this.validator = validator;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValid(Float value)
|
||||
{
|
||||
return validator.apply(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<Float> getType()
|
||||
{
|
||||
return Float.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String valueToString(Float value)
|
||||
{
|
||||
return value.toString();
|
||||
|
||||
@@ -34,6 +34,7 @@ public class ChunkCoordComparator implements java.util.Comparator<ChunkPos>
|
||||
z = (int) entityplayer.posZ >> 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compare(ChunkPos a, ChunkPos b)
|
||||
{
|
||||
if (a.equals(b))
|
||||
|
||||
@@ -42,6 +42,7 @@ public class JsonUtils
|
||||
{
|
||||
INSTANCE;
|
||||
|
||||
@Override
|
||||
public ImmutableList<?> deserialize(JsonElement json, Type type, JsonDeserializationContext context) throws JsonParseException
|
||||
{
|
||||
final Type[] typeArguments = ((ParameterizedType) type).getActualTypeArguments();
|
||||
@@ -50,6 +51,7 @@ public class JsonUtils
|
||||
return ImmutableList.copyOf(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JsonElement serialize(ImmutableList<?> src, Type type, JsonSerializationContext context)
|
||||
{
|
||||
final Type[] typeArguments = ((ParameterizedType) type).getActualTypeArguments();
|
||||
@@ -68,6 +70,7 @@ public class JsonUtils
|
||||
{
|
||||
INSTANCE;
|
||||
|
||||
@Override
|
||||
public ImmutableMap<String, ?> deserialize(JsonElement json, Type type, JsonDeserializationContext context) throws JsonParseException
|
||||
{
|
||||
final Type[] typeArguments = ((ParameterizedType) type).getActualTypeArguments();
|
||||
@@ -76,6 +79,7 @@ public class JsonUtils
|
||||
return ImmutableMap.copyOf(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JsonElement serialize(ImmutableMap<String, ?> src, Type type, JsonSerializationContext context)
|
||||
{
|
||||
final Type[] typeArguments = ((ParameterizedType) type).getActualTypeArguments();
|
||||
|
||||
Reference in new issue
Block a user