Add missing Override annotations

This commit is contained in:
mezz 2017-06-17 18:24:17 -07:00
parent c2845967cc
commit e3777f4559
59 changed files with 263 additions and 42 deletions

View File

@ -45,12 +45,14 @@ public class ItemModelMesherForge extends ItemModelMesher
super(manager); super(manager);
} }
@Override
protected IBakedModel getItemModel(Item item, int meta) protected IBakedModel getItemModel(Item item, int meta)
{ {
TIntObjectHashMap<IBakedModel> map = models.get(item); TIntObjectHashMap<IBakedModel> map = models.get(item);
return map == null ? null : map.get(meta); return map == null ? null : map.get(meta);
} }
@Override
public void register(Item item, int meta, ModelResourceLocation location) public void register(Item item, int meta, ModelResourceLocation location)
{ {
TIntObjectHashMap<ModelResourceLocation> locs = locations.get(item); TIntObjectHashMap<ModelResourceLocation> locs = locations.get(item);
@ -69,6 +71,7 @@ public class ItemModelMesherForge extends ItemModelMesher
mods.put(meta, getModelManager().getModel(location)); mods.put(meta, getModelManager().getModel(location));
} }
@Override
public void rebuildCache() public void rebuildCache()
{ {
final ModelManager manager = this.getModelManager(); final ModelManager manager = this.getModelManager();

View File

@ -104,6 +104,7 @@ public class MinecraftForgeClient
.expireAfterAccess(1, TimeUnit.SECONDS) .expireAfterAccess(1, TimeUnit.SECONDS)
.build(new CacheLoader<Pair<World, BlockPos>, ChunkCache>() .build(new CacheLoader<Pair<World, BlockPos>, ChunkCache>()
{ {
@Override
public ChunkCache load(Pair<World, BlockPos> key) throws Exception public ChunkCache load(Pair<World, BlockPos> key) throws Exception
{ {
return new ChunkCache(key.getLeft(), key.getRight().add(-1, -1, -1), key.getRight().add(16, 16, 16), 1); return new ChunkCache(key.getLeft(), key.getRight().add(-1, -1, -1), key.getRight().add(16, 16, 16), 1);

View File

@ -36,6 +36,7 @@ final class FancyMissingModel implements IModel
private static final TRSRTransformation smallTransformation = TRSRTransformation.blockCenterToCorner(new TRSRTransformation(null, null, new Vector3f(.25f, .25f, .25f), null)); private static final TRSRTransformation smallTransformation = TRSRTransformation.blockCenterToCorner(new TRSRTransformation(null, null, new Vector3f(.25f, .25f, .25f), null));
private static final LoadingCache<VertexFormat, SimpleModelFontRenderer> fontCache = CacheBuilder.newBuilder().maximumSize(3).build(new CacheLoader<VertexFormat, SimpleModelFontRenderer>() private static final LoadingCache<VertexFormat, SimpleModelFontRenderer> fontCache = CacheBuilder.newBuilder().maximumSize(3).build(new CacheLoader<VertexFormat, SimpleModelFontRenderer>()
{ {
@Override
public SimpleModelFontRenderer load(VertexFormat format) throws Exception public SimpleModelFontRenderer load(VertexFormat format) throws Exception
{ {
Matrix4f m = new Matrix4f(); Matrix4f m = new Matrix4f();

View File

@ -772,6 +772,7 @@ public class ForgeBlockStateV1 extends Marker
{ {
public static final TRSRDeserializer INSTANCE = new TRSRDeserializer(); public static final TRSRDeserializer INSTANCE = new TRSRDeserializer();
@Override
public TRSRTransformation deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException public TRSRTransformation deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException
{ {
if (json.isJsonPrimitive() && json.getAsJsonPrimitive().isString()) if (json.isJsonPrimitive() && json.getAsJsonPrimitive().isString())

View File

@ -110,14 +110,14 @@ public interface IPerspectiveAwareModel extends IBakedModel
return Pair.of(model, null); return Pair.of(model, null);
} }
public boolean isAmbientOcclusion() { return parent.isAmbientOcclusion(); } @Override public boolean isAmbientOcclusion() { return parent.isAmbientOcclusion(); }
public boolean isGui3d() { return parent.isGui3d(); } @Override public boolean isGui3d() { return parent.isGui3d(); }
public boolean isBuiltInRenderer() { return parent.isBuiltInRenderer(); } @Override public boolean isBuiltInRenderer() { return parent.isBuiltInRenderer(); }
public TextureAtlasSprite getParticleTexture() { return parent.getParticleTexture(); } @Override public TextureAtlasSprite getParticleTexture() { return parent.getParticleTexture(); }
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
public ItemCameraTransforms getItemCameraTransforms() { return parent.getItemCameraTransforms(); } @Override public ItemCameraTransforms getItemCameraTransforms() { return parent.getItemCameraTransforms(); }
public List<BakedQuad> getQuads(IBlockState state, EnumFacing side, long rand) { return parent.getQuads(state, side, rand); } @Override public List<BakedQuad> getQuads(IBlockState state, EnumFacing side, long rand) { return parent.getQuads(state, side, rand); }
public ItemOverrideList getOverrides() { return parent.getOverrides(); } @Override public ItemOverrideList getOverrides() { return parent.getOverrides(); }
@Override @Override
public Pair<? extends IBakedModel, Matrix4f> handlePerspective(TransformType cameraTransformType) public Pair<? extends IBakedModel, Matrix4f> handlePerspective(TransformType cameraTransformType)

View File

@ -86,21 +86,25 @@ public final class ItemLayerModel implements IRetexturableModel
return builder.build(); return builder.build();
} }
@Override
public Collection<ResourceLocation> getDependencies() public Collection<ResourceLocation> getDependencies()
{ {
return ImmutableList.of(); return ImmutableList.of();
} }
@Override
public Collection<ResourceLocation> getTextures() public Collection<ResourceLocation> getTextures()
{ {
return textures; return textures;
} }
@Override
public IModelState getDefaultState() public IModelState getDefaultState()
{ {
return TRSRTransformation.identity(); return TRSRTransformation.identity();
} }
@Override
public ItemLayerModel retexture(ImmutableMap<String, String> textures) public ItemLayerModel retexture(ImmutableMap<String, String> textures)
{ {
ImmutableList.Builder<ResourceLocation> builder = ImmutableList.builder(); ImmutableList.Builder<ResourceLocation> builder = ImmutableList.builder();
@ -118,6 +122,7 @@ public final class ItemLayerModel implements IRetexturableModel
return new ItemLayerModel(builder.build(), overrides); return new ItemLayerModel(builder.build(), overrides);
} }
@Override
public IBakedModel bake(IModelState state, final VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter) public IBakedModel bake(IModelState state, final VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter)
{ {
ImmutableList.Builder<BakedQuad> builder = ImmutableList.builder(); ImmutableList.Builder<BakedQuad> builder = ImmutableList.builder();
@ -167,18 +172,20 @@ public final class ItemLayerModel implements IRetexturableModel
} }
} }
public boolean isAmbientOcclusion() { return true; } @Override public boolean isAmbientOcclusion() { return true; }
public boolean isGui3d() { return false; } @Override public boolean isGui3d() { return false; }
public boolean isBuiltInRenderer() { return false; } @Override public boolean isBuiltInRenderer() { return false; }
public TextureAtlasSprite getParticleTexture() { return particle; } @Override public TextureAtlasSprite getParticleTexture() { return particle; }
public ItemCameraTransforms getItemCameraTransforms() { return ItemCameraTransforms.DEFAULT; } @Override public ItemCameraTransforms getItemCameraTransforms() { return ItemCameraTransforms.DEFAULT; }
public ItemOverrideList getOverrides() { return overrides; } @Override public ItemOverrideList getOverrides() { return overrides; }
@Override
public List<BakedQuad> getQuads(IBlockState state, EnumFacing side, long rand) public List<BakedQuad> getQuads(IBlockState state, EnumFacing side, long rand)
{ {
if(side == null) return quads; if(side == null) return quads;
return ImmutableList.of(); return ImmutableList.of();
} }
@Override
public Pair<? extends IBakedModel, Matrix4f> handlePerspective(TransformType type) public Pair<? extends IBakedModel, Matrix4f> handlePerspective(TransformType type)
{ {
Pair<? extends IBakedModel, Matrix4f> pair = IPerspectiveAwareModel.MapWrapper.handlePerspective(this, transforms, type); Pair<? extends IBakedModel, Matrix4f> pair = IPerspectiveAwareModel.MapWrapper.handlePerspective(this, transforms, type);
@ -423,8 +430,10 @@ public final class ItemLayerModel implements IRetexturableModel
{ {
INSTANCE; INSTANCE;
@Override
public void onResourceManagerReload(IResourceManager resourceManager) {} public void onResourceManagerReload(IResourceManager resourceManager) {}
@Override
public boolean accepts(ResourceLocation modelLocation) public boolean accepts(ResourceLocation modelLocation)
{ {
return modelLocation.getResourceDomain().equals(ForgeVersion.MOD_ID) && ( return modelLocation.getResourceDomain().equals(ForgeVersion.MOD_ID) && (
@ -433,6 +442,7 @@ public final class ItemLayerModel implements IRetexturableModel
modelLocation.getResourcePath().equals("models/item/item-layer")); modelLocation.getResourcePath().equals("models/item/item-layer"));
} }
@Override
public IModel loadModel(ResourceLocation modelLocation) public IModel loadModel(ResourceLocation modelLocation)
{ {
return ItemLayerModel.INSTANCE; return ItemLayerModel.INSTANCE;

View File

@ -54,6 +54,7 @@ public class MapModelState implements IModelState
this.def = def; this.def = def;
} }
@Override
public Optional<TRSRTransformation> apply(Optional<? extends IModelPart> part) public Optional<TRSRTransformation> apply(Optional<? extends IModelPart> part)
{ {
if(!part.isPresent() || !map.containsKey(part.get())) return def.apply(part); if(!part.isPresent() || !map.containsKey(part.get())) return def.apply(part);

View File

@ -282,6 +282,7 @@ public final class ModelDynBucket implements IModel, IModelCustomData, IRetextur
Function<ResourceLocation, TextureAtlasSprite> textureGetter; Function<ResourceLocation, TextureAtlasSprite> textureGetter;
textureGetter = new Function<ResourceLocation, TextureAtlasSprite>() textureGetter = new Function<ResourceLocation, TextureAtlasSprite>()
{ {
@Override
public TextureAtlasSprite apply(ResourceLocation location) public TextureAtlasSprite apply(ResourceLocation location)
{ {
return Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite(location.toString()); return Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite(location.toString());
@ -340,10 +341,10 @@ public final class ModelDynBucket implements IModel, IModelCustomData, IRetextur
return ImmutableList.of(); return ImmutableList.of();
} }
public boolean isAmbientOcclusion() { return true; } @Override public boolean isAmbientOcclusion() { return true; }
public boolean isGui3d() { return false; } @Override public boolean isGui3d() { return false; }
public boolean isBuiltInRenderer() { return false; } @Override public boolean isBuiltInRenderer() { return false; }
public TextureAtlasSprite getParticleTexture() { return particle; } @Override public TextureAtlasSprite getParticleTexture() { return particle; }
public ItemCameraTransforms getItemCameraTransforms() { return ItemCameraTransforms.DEFAULT; } @Override public ItemCameraTransforms getItemCameraTransforms() { return ItemCameraTransforms.DEFAULT; }
} }
} }

View File

@ -76,22 +76,26 @@ public final class ModelFluid implements IModelCustomData
this.fluid = fluid; this.fluid = fluid;
} }
@Override
public Collection<ResourceLocation> getDependencies() public Collection<ResourceLocation> getDependencies()
{ {
return Collections.emptySet(); return Collections.emptySet();
} }
@Override
public Collection<ResourceLocation> getTextures() public Collection<ResourceLocation> getTextures()
{ {
return ImmutableSet.of(fluid.getStill(), fluid.getFlowing()); return ImmutableSet.of(fluid.getStill(), fluid.getFlowing());
} }
@Override
public IBakedModel bake(IModelState state, VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter) public IBakedModel bake(IModelState state, VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter)
{ {
ImmutableMap<TransformType, TRSRTransformation> map = IPerspectiveAwareModel.MapWrapper.getTransforms(state); ImmutableMap<TransformType, TRSRTransformation> map = IPerspectiveAwareModel.MapWrapper.getTransforms(state);
return new BakedFluid(state.apply(Optional.<IModelPart>absent()), map, format, fluid.getColor(), bakedTextureGetter.apply(fluid.getStill()), bakedTextureGetter.apply(fluid.getFlowing()), fluid.isGaseous(), Optional.<IExtendedBlockState>absent()); return new BakedFluid(state.apply(Optional.<IModelPart>absent()), map, format, fluid.getColor(), bakedTextureGetter.apply(fluid.getStill()), bakedTextureGetter.apply(fluid.getFlowing()), fluid.isGaseous(), Optional.<IExtendedBlockState>absent());
} }
@Override
public IModelState getDefaultState() public IModelState getDefaultState()
{ {
return ModelRotation.X0_Y0; return ModelRotation.X0_Y0;
@ -101,8 +105,10 @@ public final class ModelFluid implements IModelCustomData
{ {
INSTANCE; INSTANCE;
@Override
public void onResourceManagerReload(IResourceManager resourceManager) {} public void onResourceManagerReload(IResourceManager resourceManager) {}
@Override
public boolean accepts(ResourceLocation modelLocation) public boolean accepts(ResourceLocation modelLocation)
{ {
return modelLocation.getResourceDomain().equals(ForgeVersion.MOD_ID) && ( return modelLocation.getResourceDomain().equals(ForgeVersion.MOD_ID) && (
@ -111,6 +117,7 @@ public final class ModelFluid implements IModelCustomData
modelLocation.getResourcePath().equals("models/item/fluid")); modelLocation.getResourcePath().equals("models/item/fluid"));
} }
@Override
public IModel loadModel(ResourceLocation modelLocation) public IModel loadModel(ResourceLocation modelLocation)
{ {
return WATER; return WATER;
@ -125,6 +132,7 @@ public final class ModelFluid implements IModelCustomData
private final LoadingCache<Long, BakedFluid> modelCache = CacheBuilder.newBuilder().maximumSize(200).build(new CacheLoader<Long, BakedFluid>() private final LoadingCache<Long, BakedFluid> modelCache = CacheBuilder.newBuilder().maximumSize(200).build(new CacheLoader<Long, BakedFluid>()
{ {
@Override
public BakedFluid load(Long key) throws Exception public BakedFluid load(Long key) throws Exception
{ {
boolean statePresent = (key & 1) != 0; boolean statePresent = (key & 1) != 0;
@ -349,31 +357,37 @@ public final class ModelFluid implements IModelCustomData
} }
} }
@Override
public boolean isAmbientOcclusion() public boolean isAmbientOcclusion()
{ {
return true; return true;
} }
@Override
public boolean isGui3d() public boolean isGui3d()
{ {
return false; return false;
} }
@Override
public boolean isBuiltInRenderer() public boolean isBuiltInRenderer()
{ {
return false; return false;
} }
@Override
public TextureAtlasSprite getParticleTexture() public TextureAtlasSprite getParticleTexture()
{ {
return still; return still;
} }
@Override
public ItemCameraTransforms getItemCameraTransforms() public ItemCameraTransforms getItemCameraTransforms()
{ {
return ItemCameraTransforms.DEFAULT; return ItemCameraTransforms.DEFAULT;
} }
@Override
public List<BakedQuad> getQuads(IBlockState state, EnumFacing side, long rand) public List<BakedQuad> getQuads(IBlockState state, EnumFacing side, long rand)
{ {
BakedFluid model = this; BakedFluid model = this;
@ -396,6 +410,7 @@ public final class ModelFluid implements IModelCustomData
return model.faceQuads.get(side); return model.faceQuads.get(side);
} }
@Override
public ItemOverrideList getOverrides() public ItemOverrideList getOverrides()
{ {
return ItemOverrideList.NONE; return ItemOverrideList.NONE;

View File

@ -165,15 +165,12 @@ public final class ModelLoader extends ModelBakery
textures.remove(TextureMap.LOCATION_MISSING_TEXTURE); textures.remove(TextureMap.LOCATION_MISSING_TEXTURE);
textures.addAll(LOCATIONS_BUILTIN_TEXTURES); textures.addAll(LOCATIONS_BUILTIN_TEXTURES);
textureMap.loadSprites(resourceManager, new ITextureMapPopulator() textureMap.loadSprites(resourceManager, map ->
{
public void registerSprites(TextureMap map)
{ {
for (ResourceLocation t : textures) for (ResourceLocation t : textures)
{ {
map.registerSprite(t); map.registerSprite(t);
} }
}
}); });
IBakedModel missingBaked = missingModel.bake(missingModel.getDefaultState(), DefaultVertexFormats.ITEM, DefaultTextureGetter.INSTANCE); IBakedModel missingBaked = missingModel.bake(missingModel.getDefaultState(), DefaultVertexFormats.ITEM, DefaultTextureGetter.INSTANCE);
@ -226,20 +223,8 @@ public final class ModelLoader extends ModelBakery
@Override @Override
protected void loadBlocks() protected void loadBlocks()
{ {
List<Block> blocks = Lists.newArrayList(Iterables.filter(Block.REGISTRY, new Predicate<Block>() List<Block> blocks = Lists.newArrayList(Iterables.filter(Block.REGISTRY, block -> block.getRegistryName() != null));
{ blocks.sort(Comparator.comparing(b -> b.getRegistryName().toString()));
public boolean apply(Block block)
{
return block.getRegistryName() != null;
}
}));
Collections.sort(blocks, new Comparator<Block>()
{
public int compare(Block b1, Block b2)
{
return b1.getRegistryName().toString().compareTo(b2.getRegistryName().toString());
}
});
ProgressBar blockBar = ProgressManager.push("ModelLoader: blocks", blocks.size()); ProgressBar blockBar = ProgressManager.push("ModelLoader: blocks", blocks.size());
BlockStateMapper mapper = this.blockModelShapes.getBlockStateMapper(); BlockStateMapper mapper = this.blockModelShapes.getBlockStateMapper();
@ -312,6 +297,7 @@ public final class ModelLoader extends ModelBakery
List<Item> items = Lists.newArrayList(Iterables.filter(Item.REGISTRY, new Predicate<Item>() List<Item> items = Lists.newArrayList(Iterables.filter(Item.REGISTRY, new Predicate<Item>()
{ {
@Override
public boolean apply(Item item) public boolean apply(Item item)
{ {
return item.getRegistryName() != null; return item.getRegistryName() != null;
@ -319,6 +305,7 @@ public final class ModelLoader extends ModelBakery
})); }));
Collections.sort(items, new Comparator<Item>() Collections.sort(items, new Comparator<Item>()
{ {
@Override
public int compare(Item i1, Item i2) public int compare(Item i1, Item i2)
{ {
return i1.getRegistryName().toString().compareTo(i2.getRegistryName().toString()); return i1.getRegistryName().toString().compareTo(i2.getRegistryName().toString());
@ -469,6 +456,7 @@ public final class ModelLoader extends ModelBakery
this.animation = animation; this.animation = animation;
} }
@Override
public Collection<ResourceLocation> getDependencies() public Collection<ResourceLocation> getDependencies()
{ {
Set<ResourceLocation> set = Sets.newHashSet(); Set<ResourceLocation> set = Sets.newHashSet();
@ -488,6 +476,7 @@ public final class ModelLoader extends ModelBakery
return ImmutableSet.copyOf(set); return ImmutableSet.copyOf(set);
} }
@Override
public Collection<ResourceLocation> getTextures() public Collection<ResourceLocation> getTextures()
{ {
// setting parent here to make textures resolve properly // setting parent here to make textures resolve properly
@ -535,6 +524,7 @@ public final class ModelLoader extends ModelBakery
return builder.build(); return builder.build();
} }
@Override
public IBakedModel bake(IModelState state, VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter) public IBakedModel bake(IModelState state, VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter)
{ {
return VanillaLoader.INSTANCE.modelCache.getUnchecked(new BakedModelCacheKey(this, state, format, bakedTextureGetter)); return VanillaLoader.INSTANCE.modelCache.getUnchecked(new BakedModelCacheKey(this, state, format, bakedTextureGetter));
@ -707,6 +697,7 @@ public final class ModelLoader extends ModelBakery
return Optional.absent(); return Optional.absent();
} }
@Override
public IModelState getDefaultState() public IModelState getDefaultState()
{ {
return ModelRotation.X0_Y0; return ModelRotation.X0_Y0;
@ -805,16 +796,19 @@ public final class ModelLoader extends ModelBakery
defaultState = new MultiModelState(builder.build()); defaultState = new MultiModelState(builder.build());
} }
@Override
public Collection<ResourceLocation> getDependencies() public Collection<ResourceLocation> getDependencies()
{ {
return ImmutableList.copyOf(locations); return ImmutableList.copyOf(locations);
} }
@Override
public Collection<ResourceLocation> getTextures() public Collection<ResourceLocation> getTextures()
{ {
return ImmutableSet.copyOf(textures); return ImmutableSet.copyOf(textures);
} }
@Override
public IBakedModel bake(IModelState state, VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter) public IBakedModel bake(IModelState state, VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter)
{ {
if(!Attributes.moreSpecific(format, Attributes.DEFAULT_BAKED_FORMAT)) if(!Attributes.moreSpecific(format, Attributes.DEFAULT_BAKED_FORMAT))
@ -835,6 +829,7 @@ public final class ModelLoader extends ModelBakery
return builder.build(); return builder.build();
} }
@Override
public IModelState getDefaultState() public IModelState getDefaultState()
{ {
return defaultState; return defaultState;
@ -918,13 +913,16 @@ public final class ModelLoader extends ModelBakery
} }
// NOOP, handled in loader // NOOP, handled in loader
@Override
public void onResourceManagerReload(IResourceManager resourceManager) {} public void onResourceManagerReload(IResourceManager resourceManager) {}
@Override
public boolean accepts(ResourceLocation modelLocation) public boolean accepts(ResourceLocation modelLocation)
{ {
return true; return true;
} }
@Override
public IModel loadModel(ResourceLocation modelLocation) throws Exception public IModel loadModel(ResourceLocation modelLocation) throws Exception
{ {
if(modelLocation.equals(MODEL_MISSING) && loader.missingModel != null) if(modelLocation.equals(MODEL_MISSING) && loader.missingModel != null)
@ -1212,6 +1210,7 @@ public final class ModelLoader extends ModelBakery
{ {
INSTANCE; INSTANCE;
@Override
public TextureAtlasSprite apply(ResourceLocation location) public TextureAtlasSprite apply(ResourceLocation location)
{ {
return Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite(location.toString()); return Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite(location.toString());

View File

@ -37,6 +37,7 @@ public class ModelStateComposition implements IModelState
this.second = second; this.second = second;
} }
@Override
public Optional<TRSRTransformation> apply(Optional<? extends IModelPart> part) public Optional<TRSRTransformation> apply(Optional<? extends IModelPart> part)
{ {
Optional<TRSRTransformation> f = first.apply(part), s = second.apply(part); Optional<TRSRTransformation> f = first.apply(part), s = second.apply(part);

View File

@ -247,8 +247,10 @@ public final class MultiLayerModel implements IModelCustomData
{ {
INSTANCE; INSTANCE;
@Override
public void onResourceManagerReload(IResourceManager resourceManager) {} public void onResourceManagerReload(IResourceManager resourceManager) {}
@Override
public boolean accepts(ResourceLocation modelLocation) public boolean accepts(ResourceLocation modelLocation)
{ {
return modelLocation.getResourceDomain().equals(ForgeVersion.MOD_ID) && ( return modelLocation.getResourceDomain().equals(ForgeVersion.MOD_ID) && (
@ -257,6 +259,7 @@ public final class MultiLayerModel implements IModelCustomData
modelLocation.getResourcePath().equals("models/item/multi-layer")); modelLocation.getResourcePath().equals("models/item/multi-layer"));
} }
@Override
public IModel loadModel(ResourceLocation modelLocation) public IModel loadModel(ResourceLocation modelLocation)
{ {
return MultiLayerModel.INSTANCE; return MultiLayerModel.INSTANCE;

View File

@ -54,6 +54,7 @@ public final class MultiModelState implements IModelState
return state; return state;
} }
@Override
public Optional<TRSRTransformation> apply(Optional<? extends IModelPart> part) public Optional<TRSRTransformation> apply(Optional<? extends IModelPart> part)
{ {
if(part.isPresent()) if(part.isPresent())
@ -92,6 +93,7 @@ public final class MultiModelState implements IModelState
this.index = index; this.index = index;
} }
@Override
public Optional<TRSRTransformation> apply(Optional<? extends IModelPart> part) public Optional<TRSRTransformation> apply(Optional<? extends IModelPart> part)
{ {
Optional<TRSRTransformation> normal = state.apply(part); Optional<TRSRTransformation> normal = state.apply(part);

View File

@ -45,6 +45,7 @@ public final class SimpleModelState implements IModelState
this.def = def; this.def = def;
} }
@Override
public Optional<TRSRTransformation> apply(Optional<? extends IModelPart> part) public Optional<TRSRTransformation> apply(Optional<? extends IModelPart> part)
{ {
if(!part.isPresent()) if(!part.isPresent())

View File

@ -130,5 +130,6 @@ public class AnimationModelBase<T extends Entity> extends ModelBase implements I
RenderHelper.enableStandardItemLighting(); RenderHelper.enableStandardItemLighting();
} }
@Override
public void handleEvents(T instance, float time, Iterable<Event> pastEvents) {} public void handleEvents(T instance, float time, Iterable<Event> pastEvents) {}
} }

View File

@ -47,6 +47,7 @@ public class AnimationTESR<T extends TileEntity> extends FastTESR<T> implements
{ {
protected static BlockRendererDispatcher blockRenderer; protected static BlockRendererDispatcher blockRenderer;
@Override
public void renderTileEntityFast(@Nonnull T te, double x, double y, double z, float partialTick, int breakStage, float partial, @Nonnull BufferBuilder renderer) public void renderTileEntityFast(@Nonnull T te, double x, double y, double z, float partialTick, int breakStage, float partial, @Nonnull BufferBuilder renderer)
{ {
if(!te.hasCapability(CapabilityAnimation.ANIMATION_CAPABILITY, null)) if(!te.hasCapability(CapabilityAnimation.ANIMATION_CAPABILITY, null))
@ -85,5 +86,6 @@ public class AnimationTESR<T extends TileEntity> extends FastTESR<T> implements
} }
} }
@Override
public void handleEvents(T te, float time, Iterable<Event> pastEvents) {} public void handleEvents(T te, float time, Iterable<Event> pastEvents) {}
} }

View File

@ -199,6 +199,7 @@ public class ModelBlockAnimation
initialize(); initialize();
return new Iterable<Event>() return new Iterable<Event>()
{ {
@Override
public Iterator<Event> iterator() public Iterator<Event> iterator()
{ {
return new UnmodifiableIterator<Event>() return new UnmodifiableIterator<Event>()
@ -257,6 +258,7 @@ public class ModelBlockAnimation
} }
} }
@Override
public boolean hasNext() public boolean hasNext()
{ {
return curKey != null; return curKey != null;
@ -321,6 +323,7 @@ public class ModelBlockAnimation
} }
} }
@Override
public TRSRTransformation apply(float time) public TRSRTransformation apply(float time)
{ {
time -= Math.floor(time); time -= Math.floor(time);
@ -435,11 +438,13 @@ public class ModelBlockAnimation
} }
} }
@Override
public TRSRTransformation getInvBindPose() public TRSRTransformation getInvBindPose()
{ {
return invBindPose; return invBindPose;
} }
@Override
public Optional<? extends IJoint> getParent() public Optional<? extends IJoint> getParent()
{ {
return Optional.absent(); return Optional.absent();

View File

@ -36,6 +36,7 @@ public enum B3DClip implements IClip
{ {
INSTANCE; INSTANCE;
@Override
public IJointClip apply(final IJoint joint) public IJointClip apply(final IJoint joint)
{ {
if(!(joint instanceof NodeJoint)) if(!(joint instanceof NodeJoint))
@ -45,6 +46,7 @@ public enum B3DClip implements IClip
return new NodeClip(((NodeJoint)joint).getNode()); return new NodeClip(((NodeJoint)joint).getNode());
} }
@Override
public Iterable<Event> pastEvents(float lastPollTime, float time) public Iterable<Event> pastEvents(float lastPollTime, float time)
{ {
return ImmutableSet.<Event>of(); return ImmutableSet.<Event>of();
@ -59,6 +61,7 @@ public enum B3DClip implements IClip
this.node = node; this.node = node;
} }
@Override
public TRSRTransformation apply(float time) public TRSRTransformation apply(float time)
{ {
TRSRTransformation ret = TRSRTransformation.identity(); TRSRTransformation ret = TRSRTransformation.identity();

View File

@ -112,17 +112,20 @@ public enum B3DLoader implements ICustomModelLoader
enabledDomains.add(domain.toLowerCase()); enabledDomains.add(domain.toLowerCase());
} }
@Override
public void onResourceManagerReload(IResourceManager manager) public void onResourceManagerReload(IResourceManager manager)
{ {
this.manager = manager; this.manager = manager;
cache.clear(); cache.clear();
} }
@Override
public boolean accepts(ResourceLocation modelLocation) public boolean accepts(ResourceLocation modelLocation)
{ {
return enabledDomains.contains(modelLocation.getResourceDomain()) && modelLocation.getResourcePath().endsWith(".b3d"); return enabledDomains.contains(modelLocation.getResourceDomain()) && modelLocation.getResourcePath().endsWith(".b3d");
} }
@Override
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public IModel loadModel(ResourceLocation modelLocation) throws Exception public IModel loadModel(ResourceLocation modelLocation) throws Exception
{ {
@ -230,6 +233,7 @@ public enum B3DLoader implements ICustomModelLoader
return parent; return parent;
} }
@Override
public Optional<TRSRTransformation> apply(Optional<? extends IModelPart> part) public Optional<TRSRTransformation> apply(Optional<? extends IModelPart> part)
{ {
// TODO make more use of Optional // TODO make more use of Optional
@ -272,6 +276,7 @@ public enum B3DLoader implements ICustomModelLoader
.expireAfterAccess(2, TimeUnit.MINUTES) .expireAfterAccess(2, TimeUnit.MINUTES)
.build(new CacheLoader<Triple<Animation, Node<?>, Integer>, TRSRTransformation>() .build(new CacheLoader<Triple<Animation, Node<?>, Integer>, TRSRTransformation>()
{ {
@Override
public TRSRTransformation load(Triple<Animation, Node<?>, Integer> key) throws Exception public TRSRTransformation load(Triple<Animation, Node<?>, Integer> key) throws Exception
{ {
return getNodeMatrix(key.getLeft(), key.getMiddle(), key.getRight()); return getNodeMatrix(key.getLeft(), key.getMiddle(), key.getRight());
@ -352,6 +357,7 @@ public enum B3DLoader implements ICustomModelLoader
this.node = node; this.node = node;
} }
@Override
public TRSRTransformation getInvBindPose() public TRSRTransformation getInvBindPose()
{ {
Matrix4f m = new TRSRTransformation(node.getPos(), node.getRot(), node.getScale(), null).getMatrix(); Matrix4f m = new TRSRTransformation(node.getPos(), node.getRot(), node.getScale(), null).getMatrix();
@ -366,6 +372,7 @@ public enum B3DLoader implements ICustomModelLoader
return pose; return pose;
} }
@Override
public Optional<NodeJoint> getParent() public Optional<NodeJoint> getParent()
{ {
// FIXME cache? // FIXME cache?
@ -402,21 +409,25 @@ public enum B3DLoader implements ICustomModelLoader
public static enum B3DFrameProperty implements IUnlistedProperty<B3DState> public static enum B3DFrameProperty implements IUnlistedProperty<B3DState>
{ {
INSTANCE; INSTANCE;
@Override
public String getName() public String getName()
{ {
return "B3DFrame"; return "B3DFrame";
} }
@Override
public boolean isValid(B3DState value) public boolean isValid(B3DState value)
{ {
return value instanceof B3DState; return value instanceof B3DState;
} }
@Override
public Class<B3DState> getType() public Class<B3DState> getType()
{ {
return B3DState.class; return B3DState.class;
} }
@Override
public String valueToString(B3DState value) public String valueToString(B3DState value)
{ {
return value.toString(); return value.toString();
@ -480,6 +491,7 @@ public enum B3DLoader implements ICustomModelLoader
{ {
return Collections2.filter(textures.values(), new Predicate<ResourceLocation>() return Collections2.filter(textures.values(), new Predicate<ResourceLocation>()
{ {
@Override
public boolean apply(ResourceLocation loc) public boolean apply(ResourceLocation loc)
{ {
return !loc.getResourcePath().startsWith("#"); return !loc.getResourcePath().startsWith("#");
@ -579,6 +591,7 @@ public enum B3DLoader implements ICustomModelLoader
return this; return this;
} }
@Override
public Optional<IClip> getClip(String name) public Optional<IClip> getClip(String name)
{ {
if(name.equals("main")) if(name.equals("main"))
@ -588,6 +601,7 @@ public enum B3DLoader implements ICustomModelLoader
return Optional.absent(); return Optional.absent();
} }
@Override
public IModelState getDefaultState() public IModelState getDefaultState()
{ {
return new B3DState(model.getRoot().getAnimation(), defaultKey, defaultKey, 0); return new B3DState(model.getRoot().getAnimation(), defaultKey, defaultKey, 0);
@ -632,8 +646,9 @@ public enum B3DLoader implements ICustomModelLoader
this(node, state, smooth, gui3d, format, meshes, textures, CacheBuilder.newBuilder() this(node, state, smooth, gui3d, format, meshes, textures, CacheBuilder.newBuilder()
.maximumSize(128) .maximumSize(128)
.expireAfterAccess(2, TimeUnit.MINUTES) .expireAfterAccess(2, TimeUnit.MINUTES)
.<Integer, B3DState>build(new CacheLoader<Integer, B3DState>() .build(new CacheLoader<Integer, B3DState>()
{ {
@Override
public B3DState load(Integer frame) throws Exception public B3DState load(Integer frame) throws Exception
{ {
IModelState parent = state; IModelState parent = state;
@ -747,12 +762,14 @@ public enum B3DLoader implements ICustomModelLoader
.maximumSize(32) .maximumSize(32)
.build(new CacheLoader<Node<?>, TRSRTransformation>() .build(new CacheLoader<Node<?>, TRSRTransformation>()
{ {
@Override
public TRSRTransformation load(Node<?> node) throws Exception public TRSRTransformation load(Node<?> node) throws Exception
{ {
return state.apply(Optional.of(new NodeJoint(node))).or(TRSRTransformation.identity()); return state.apply(Optional.of(new NodeJoint(node))).or(TRSRTransformation.identity());
} }
}); });
@Override
public Matrix4f apply(Node<?> node) public Matrix4f apply(Node<?> node)
{ {
return global.compose(localCache.getUnchecked(node)).getMatrix(); return global.compose(localCache.getUnchecked(node)).getMatrix();
@ -831,37 +848,44 @@ public enum B3DLoader implements ICustomModelLoader
} }
} }
@Override
public boolean isAmbientOcclusion() public boolean isAmbientOcclusion()
{ {
return smooth; return smooth;
} }
@Override
public boolean isGui3d() public boolean isGui3d()
{ {
return gui3d; return gui3d;
} }
@Override
public boolean isBuiltInRenderer() public boolean isBuiltInRenderer()
{ {
return false; return false;
} }
@Override
public TextureAtlasSprite getParticleTexture() public TextureAtlasSprite getParticleTexture()
{ {
// FIXME somehow specify particle texture in the model // FIXME somehow specify particle texture in the model
return textures.values().asList().get(0); return textures.values().asList().get(0);
} }
@Override
public ItemCameraTransforms getItemCameraTransforms() public ItemCameraTransforms getItemCameraTransforms()
{ {
return ItemCameraTransforms.DEFAULT; return ItemCameraTransforms.DEFAULT;
} }
@Override
public Pair<? extends IBakedModel, Matrix4f> handlePerspective(TransformType cameraTransformType) public Pair<? extends IBakedModel, Matrix4f> handlePerspective(TransformType cameraTransformType)
{ {
return IPerspectiveAwareModel.MapWrapper.handlePerspective(this, state, cameraTransformType); return IPerspectiveAwareModel.MapWrapper.handlePerspective(this, state, cameraTransformType);
} }
@Override
public ItemOverrideList getOverrides() public ItemOverrideList getOverrides()
{ {
// TODO handle items // TODO handle items

View File

@ -997,11 +997,13 @@ public class B3DModel
{ {
private Node<Pivot> parent; private Node<Pivot> parent;
@Override
public void setParent(Node<Pivot> parent) public void setParent(Node<Pivot> parent)
{ {
this.parent = parent; this.parent = parent;
} }
@Override
public Node<Pivot> getParent() public Node<Pivot> getParent()
{ {
return parent; return parent;
@ -1064,6 +1066,7 @@ public class B3DModel
return String.format("Mesh [pivot=%s, brush=%s, data=...]", super.toString(), brush); return String.format("Mesh [pivot=%s, brush=%s, data=...]", super.toString(), brush);
} }
@Override
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public void setParent(Node<Mesh> parent) public void setParent(Node<Mesh> parent)
{ {
@ -1089,6 +1092,7 @@ public class B3DModel
weightMap = builder.build(); weightMap = builder.build();
} }
@Override
public Node<Mesh> getParent() public Node<Mesh> getParent()
{ {
return parent; return parent;
@ -1116,11 +1120,13 @@ public class B3DModel
return String.format("Bone [data=%s]", data); return String.format("Bone [data=%s]", data);
}*/ }*/
@Override
public void setParent(Node<Bone> parent) public void setParent(Node<Bone> parent)
{ {
this.parent = parent; this.parent = parent;
} }
@Override
public Node<Bone> getParent() public Node<Bone> getParent()
{ {
return parent; return parent;

View File

@ -54,6 +54,7 @@ public enum OBJLoader implements ICustomModelLoader {
FMLLog.log(Level.INFO, "OBJLoader: Domain %s has been added.", domain.toLowerCase()); FMLLog.log(Level.INFO, "OBJLoader: Domain %s has been added.", domain.toLowerCase());
} }
@Override
public void onResourceManagerReload(IResourceManager resourceManager) public void onResourceManagerReload(IResourceManager resourceManager)
{ {
this.manager = resourceManager; this.manager = resourceManager;
@ -61,11 +62,13 @@ public enum OBJLoader implements ICustomModelLoader {
errors.clear(); errors.clear();
} }
@Override
public boolean accepts(ResourceLocation modelLocation) public boolean accepts(ResourceLocation modelLocation)
{ {
return enabledDomains.contains(modelLocation.getResourceDomain()) && modelLocation.getResourcePath().endsWith(".obj"); return enabledDomains.contains(modelLocation.getResourceDomain()) && modelLocation.getResourcePath().endsWith(".obj");
} }
@Override
public IModel loadModel(ResourceLocation modelLocation) throws Exception public IModel loadModel(ResourceLocation modelLocation) throws Exception
{ {
ResourceLocation file = new ResourceLocation(modelLocation.getResourceDomain(), modelLocation.getResourcePath()); ResourceLocation file = new ResourceLocation(modelLocation.getResourceDomain(), modelLocation.getResourcePath());

View File

@ -1138,6 +1138,7 @@ public class OBJModel implements IRetexturableModel, IModelCustomData
return parent; return parent;
} }
@Override
public Optional<TRSRTransformation> apply(Optional<? extends IModelPart> part) public Optional<TRSRTransformation> apply(Optional<? extends IModelPart> part)
{ {
if (parent != null) return parent.apply(part); if (parent != null) return parent.apply(part);
@ -1256,6 +1257,7 @@ public class OBJModel implements IRetexturableModel, IModelCustomData
public enum OBJProperty implements IUnlistedProperty<OBJState> public enum OBJProperty implements IUnlistedProperty<OBJState>
{ {
INSTANCE; INSTANCE;
@Override
public String getName() public String getName()
{ {
return "OBJProperty"; return "OBJProperty";
@ -1548,6 +1550,7 @@ public class OBJModel implements IRetexturableModel, IModelCustomData
private final LoadingCache<IModelState, OBJBakedModel> cache = CacheBuilder.newBuilder().maximumSize(20).build(new CacheLoader<IModelState, OBJBakedModel>() private final LoadingCache<IModelState, OBJBakedModel> cache = CacheBuilder.newBuilder().maximumSize(20).build(new CacheLoader<IModelState, OBJBakedModel>()
{ {
@Override
public OBJBakedModel load(IModelState state) throws Exception public OBJBakedModel load(IModelState state) throws Exception
{ {
return new OBJBakedModel(model, state, format, textures); return new OBJBakedModel(model, state, format, textures);

View File

@ -94,6 +94,7 @@ public class LightUtil
.maximumSize(10) .maximumSize(10)
.build(new CacheLoader<Pair<VertexFormat, VertexFormat>, int[]>() .build(new CacheLoader<Pair<VertexFormat, VertexFormat>, int[]>()
{ {
@Override
public int[] load(Pair<VertexFormat, VertexFormat> pair) public int[] load(Pair<VertexFormat, VertexFormat> pair)
{ {
return mapFormats(pair.getLeft(), pair.getRight()); return mapFormats(pair.getLeft(), pair.getRight());
@ -317,6 +318,7 @@ public class LightUtil
System.arraycopy(auxColor, 0, this.auxColor, 0, this.auxColor.length); System.arraycopy(auxColor, 0, this.auxColor, 0, this.auxColor.length);
} }
@Override
public void put(int element, float... data) public void put(int element, float... data)
{ {
if(getVertexFormat().getElement(element).getUsage() == EnumUsage.COLOR) if(getVertexFormat().getElement(element).getUsage() == EnumUsage.COLOR)

View File

@ -105,6 +105,7 @@ public class UnpackedBakedQuad extends BakedQuad
unpackedData = new float[4][format.getElementCount()][4]; unpackedData = new float[4][format.getElementCount()][4];
} }
@Override
public VertexFormat getVertexFormat() public VertexFormat getVertexFormat()
{ {
return format; return format;
@ -114,27 +115,32 @@ public class UnpackedBakedQuad extends BakedQuad
{ {
this.contractUVs = value; this.contractUVs = value;
} }
@Override
public void setQuadTint(int tint) public void setQuadTint(int tint)
{ {
this.tint = tint; this.tint = tint;
} }
@Override
public void setQuadOrientation(EnumFacing orientation) public void setQuadOrientation(EnumFacing orientation)
{ {
this.orientation = orientation; this.orientation = orientation;
} }
// FIXME: move (or at least add) into constructor // FIXME: move (or at least add) into constructor
@Override
public void setTexture(TextureAtlasSprite texture) public void setTexture(TextureAtlasSprite texture)
{ {
this.texture = texture; this.texture = texture;
} }
@Override
public void setApplyDiffuseLighting(boolean diffuse) public void setApplyDiffuseLighting(boolean diffuse)
{ {
this.applyDiffuseLighting = diffuse; this.applyDiffuseLighting = diffuse;
} }
@Override
public void put(int element, float... data) public void put(int element, float... data)
{ {
for(int i = 0; i < 4; i++) for(int i = 0; i < 4; i++)

View File

@ -44,11 +44,13 @@ public class VertexBufferConsumer implements IVertexConsumer
quadData = new int[renderer.getVertexFormat().getNextOffset()/* / 4 * 4 */]; quadData = new int[renderer.getVertexFormat().getNextOffset()/* / 4 * 4 */];
} }
@Override
public VertexFormat getVertexFormat() public VertexFormat getVertexFormat()
{ {
return renderer.getVertexFormat(); return renderer.getVertexFormat();
} }
@Override
public void put(int e, float... data) public void put(int e, float... data)
{ {
VertexFormat format = getVertexFormat(); VertexFormat format = getVertexFormat();
@ -75,8 +77,12 @@ public class VertexBufferConsumer implements IVertexConsumer
this.offset = new BlockPos(offset); this.offset = new BlockPos(offset);
} }
@Override
public void setQuadTint(int tint) {} public void setQuadTint(int tint) {}
@Override
public void setQuadOrientation(EnumFacing orientation) {} public void setQuadOrientation(EnumFacing orientation) {}
@Override
public void setApplyDiffuseLighting(boolean diffuse) {} public void setApplyDiffuseLighting(boolean diffuse) {}
@Override
public void setTexture(TextureAtlasSprite texture ) {} public void setTexture(TextureAtlasSprite texture ) {}
} }

View File

@ -260,13 +260,17 @@ public class VertexLighterFlat extends QuadGatheringTransformer
} }
} }
@Override
public void setQuadTint(int tint) public void setQuadTint(int tint)
{ {
this.tint = tint; this.tint = tint;
} }
@Override
public void setQuadOrientation(EnumFacing orientation) {} public void setQuadOrientation(EnumFacing orientation) {}
public void setQuadCulled() {} public void setQuadCulled() {}
@Override
public void setTexture(TextureAtlasSprite texture) {} public void setTexture(TextureAtlasSprite texture) {}
@Override
public void setApplyDiffuseLighting(boolean diffuse) public void setApplyDiffuseLighting(boolean diffuse)
{ {
this.diffuse = diffuse; this.diffuse = diffuse;

View File

@ -32,31 +32,37 @@ public class VertexTransformer implements IVertexConsumer
this.parent = parent; this.parent = parent;
} }
@Override
public VertexFormat getVertexFormat() public VertexFormat getVertexFormat()
{ {
return parent.getVertexFormat(); return parent.getVertexFormat();
} }
@Override
public void setQuadTint(int tint) public void setQuadTint(int tint)
{ {
parent.setQuadTint(tint); parent.setQuadTint(tint);
} }
@Override
public void setTexture(TextureAtlasSprite texture) public void setTexture(TextureAtlasSprite texture)
{ {
parent.setTexture(texture); parent.setTexture(texture);
} }
@Override
public void setQuadOrientation(EnumFacing orientation) public void setQuadOrientation(EnumFacing orientation)
{ {
parent.setQuadOrientation(orientation); parent.setQuadOrientation(orientation);
} }
@Override
public void setApplyDiffuseLighting(boolean diffuse) public void setApplyDiffuseLighting(boolean diffuse)
{ {
parent.setApplyDiffuseLighting(diffuse); parent.setApplyDiffuseLighting(diffuse);
} }
@Override
public void put(int element, float... data) public void put(int element, float... data)
{ {
parent.put(element, data); parent.put(element, data);

View File

@ -52,6 +52,7 @@ public final class Event implements Comparable<Event>
return offset; return offset;
} }
@Override
public int compareTo(Event event) public int compareTo(Event event)
{ {
return new Float(offset).compareTo(event.offset); return new Float(offset).compareTo(event.offset);

View File

@ -46,11 +46,13 @@ public final class TimeValues
{ {
INSTANCE; INSTANCE;
@Override
public float apply(float input) public float apply(float input)
{ {
return input; return input;
} }
@Override
public String getName() public String getName()
{ {
return "identity"; return "identity";
@ -66,6 +68,7 @@ public final class TimeValues
this.output = output; this.output = output;
} }
@Override
public float apply(float input) public float apply(float input)
{ {
return output; return output;
@ -108,6 +111,7 @@ public final class TimeValues
this.output = newValue; this.output = newValue;
} }
@Override
public float apply(float input) public float apply(float input)
{ {
return output; return output;
@ -146,6 +150,7 @@ public final class TimeValues
this.args = args; this.args = args;
} }
@Override
public float apply(float input) public float apply(float input)
{ {
float ret = input; float ret = input;
@ -201,6 +206,7 @@ public final class TimeValues
this.f = f; this.f = f;
} }
@Override
public float apply(float input) public float apply(float input)
{ {
return g.apply(f.apply(input)); return g.apply(f.apply(input));
@ -238,6 +244,7 @@ public final class TimeValues
this.valueResolver = valueResolver; this.valueResolver = valueResolver;
} }
@Override
public String getName() public String getName()
{ {
return parameterName; return parameterName;
@ -258,6 +265,7 @@ public final class TimeValues
} }
} }
@Override
public float apply(float input) public float apply(float input)
{ {
resolve(); resolve();
@ -298,6 +306,7 @@ public final class TimeValues
this.valueResolver.set(valueResolver); this.valueResolver.set(valueResolver);
} }
@Override
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@Nullable @Nullable
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type)
@ -309,6 +318,7 @@ public final class TimeValues
return (TypeAdapter<T>)new TypeAdapter<ITimeValue>() return (TypeAdapter<T>)new TypeAdapter<ITimeValue>()
{ {
@Override
public void write(JsonWriter out, ITimeValue parameter) throws IOException public void write(JsonWriter out, ITimeValue parameter) throws IOException
{ {
if(parameter instanceof ConstValue) if(parameter instanceof ConstValue)
@ -341,6 +351,7 @@ public final class TimeValues
} }
} }
@Override
public ITimeValue read(JsonReader in) throws IOException public ITimeValue read(JsonReader in) throws IOException
{ {
switch(in.peek()) switch(in.peek())

View File

@ -293,6 +293,7 @@ public abstract class FieldWrapper implements IFieldWrapper
} }
} }
@Override
public void setupConfiguration(Configuration cfg, String desc, String langKey, boolean reqMCRestart, boolean reqWorldRestart) public void setupConfiguration(Configuration cfg, String desc, String langKey, boolean reqMCRestart, boolean reqWorldRestart)
{ {
super.setupConfiguration(cfg, desc, langKey, reqMCRestart, reqWorldRestart); super.setupConfiguration(cfg, desc, langKey, reqMCRestart, reqWorldRestart);

View File

@ -98,6 +98,7 @@ class TypeAdapters
} }
}; };
static ITypeAdapter Bool = new ITypeAdapter() { static ITypeAdapter Bool = new ITypeAdapter() {
@Override
public Object getValue(Property prop) { public Object getValue(Property prop) {
return Boolean.valueOf(prop.getBoolean()); return Boolean.valueOf(prop.getBoolean());
} }
@ -467,6 +468,7 @@ class TypeAdapters
}; };
static ITypeAdapter chr = new ITypeAdapter() { static ITypeAdapter chr = new ITypeAdapter() {
@Override
public Object getValue(Property prop) { public Object getValue(Property prop) {
return (char)prop.getInt(); return (char)prop.getInt();
} }
@ -500,6 +502,7 @@ class TypeAdapters
return ret; return ret;
} }
@Override
public Object getValue(Property prop) { public Object getValue(Property prop) {
int[] v = prop.getIntList(); int[] v = prop.getIntList();
char[] ret = new char[v.length]; char[] ret = new char[v.length];
@ -532,6 +535,7 @@ class TypeAdapters
}; };
static ITypeAdapter Chr = new ITypeAdapter() { static ITypeAdapter Chr = new ITypeAdapter() {
@Override
public Object getValue(Property prop) { public Object getValue(Property prop) {
return Character.valueOf((char)prop.getInt()); return Character.valueOf((char)prop.getInt());
} }
@ -565,6 +569,7 @@ class TypeAdapters
return ret; return ret;
} }
@Override
public Object getValue(Property prop) { public Object getValue(Property prop) {
int[] v = prop.getIntList(); int[] v = prop.getIntList();
Character[] ret = new Character[v.length]; Character[] ret = new Character[v.length];

View File

@ -61,7 +61,7 @@ public class CompoundIngredient extends Ingredient
return this.itemIds; return this.itemIds;
} }
@Override
public boolean apply(@Nullable ItemStack target) public boolean apply(@Nullable ItemStack target)
{ {
if (target == null) if (target == null)
@ -74,6 +74,7 @@ public class CompoundIngredient extends Ingredient
return false; return false;
} }
@Override
protected void invalidate() protected void invalidate()
{ {
this.itemIds = null; this.itemIds = null;

View File

@ -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())); return new net.minecraft.client.renderer.block.model.ItemTransformVec3f(toLwjgl(toXYZDegrees(getLeftRot())), toLwjgl(getTranslation()), toLwjgl(getScale()));
} }
@Override
public Matrix4f getMatrix() public Matrix4f getMatrix()
{ {
return (Matrix4f)matrix.clone(); return (Matrix4f)matrix.clone();
@ -557,6 +558,7 @@ public final class TRSRTransformation implements IModelState, ITransformation
return (Quat4f)rightRot.clone(); return (Quat4f)rightRot.clone();
} }
@Override
public Optional<TRSRTransformation> apply(Optional<? extends IModelPart> part) public Optional<TRSRTransformation> apply(Optional<? extends IModelPart> part)
{ {
if(part.isPresent()) if(part.isPresent())
@ -566,6 +568,7 @@ public final class TRSRTransformation implements IModelState, ITransformation
return Optional.of(this); return Optional.of(this);
} }
@Override
public EnumFacing rotate(EnumFacing facing) public EnumFacing rotate(EnumFacing facing)
{ {
return rotate(matrix, facing); return rotate(matrix, facing);
@ -597,6 +600,7 @@ public final class TRSRTransformation implements IModelState, ITransformation
return true; return true;
} }
@Override
public int rotate(EnumFacing facing, int vertexIndex) public int rotate(EnumFacing facing, int vertexIndex)
{ {
// FIXME check if this is good enough // FIXME check if this is good enough

View File

@ -78,6 +78,7 @@ public final class AnimationStateMachine implements IAnimationStateMachine
.expireAfterWrite(100, TimeUnit.MILLISECONDS) .expireAfterWrite(100, TimeUnit.MILLISECONDS)
.build(new CacheLoader<Triple<? extends IClip, Float, Float>, Pair<IModelState, Iterable<Event>>>() .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 public Pair<IModelState, Iterable<Event>> load(Triple<? extends IClip, Float, Float> key) throws Exception
{ {
return Clips.apply(key.getLeft(), key.getMiddle(), key.getRight()); 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>>() this(parameters, clips, states, ImmutableMultimap.copyOf(Multimaps.newSetMultimap(Maps.transformValues(transitions, new Function<String, Collection<String>>()
{ {
@Override
public Collection<String> apply(String input) public Collection<String> apply(String input)
{ {
return ImmutableSet.of(input); return ImmutableSet.of(input);
} }
}), new Supplier<Set<String>>() }), new Supplier<Set<String>>()
{ {
@Override
public Set<String> get() public Set<String> get()
{ {
return Sets.newHashSet(); return Sets.newHashSet();
@ -144,6 +147,7 @@ public final class AnimationStateMachine implements IAnimationStateMachine
currentState = state; currentState = state;
} }
@Override
public Pair<IModelState, Iterable<Event>> apply(float time) public Pair<IModelState, Iterable<Event>> apply(float time)
{ {
if(lastPollTime == Float.NEGATIVE_INFINITY) 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>() return Pair.of(pair.getLeft(), Iterables.filter(pair.getRight(), new Predicate<Event>()
{ {
@Override
public boolean apply(Event event) public boolean apply(Event event)
{ {
return !event.event().startsWith("!"); return !event.event().startsWith("!");
@ -185,6 +190,7 @@ public final class AnimationStateMachine implements IAnimationStateMachine
})); }));
} }
@Override
public void transition(String newState) public void transition(String newState)
{ {
IClip nc = clips.get(newState); IClip nc = clips.get(newState);
@ -200,11 +206,13 @@ public final class AnimationStateMachine implements IAnimationStateMachine
currentState = nc; currentState = nc;
} }
@Override
public String currentState() public String currentState()
{ {
return currentStateName; return currentStateName;
} }
@Override
public void shouldHandleSpecialEvents(boolean value) public void shouldHandleSpecialEvents(boolean value)
{ {
shouldHandleSpecialEvents = true; shouldHandleSpecialEvents = true;
@ -269,6 +277,7 @@ public final class AnimationStateMachine implements IAnimationStateMachine
{ {
private AnimationStateMachine asm; private AnimationStateMachine asm;
@Override
public IClip apply(String name) public IClip apply(String name)
{ {
return asm.clips.get(name); return asm.clips.get(name);
@ -285,6 +294,7 @@ public final class AnimationStateMachine implements IAnimationStateMachine
this.customParameters = customParameters; this.customParameters = customParameters;
} }
@Override
public ITimeValue apply(String name) public ITimeValue apply(String name)
{ {
if(asm.parameters.containsKey(name)) if(asm.parameters.containsKey(name))
@ -311,6 +321,7 @@ public final class AnimationStateMachine implements IAnimationStateMachine
{ {
INSTANCE; INSTANCE;
@Override
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@Nullable @Nullable
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type)

View File

@ -40,14 +40,17 @@ public class CapabilityAnimation
{ {
CapabilityManager.INSTANCE.register(IAnimationStateMachine.class, new Capability.IStorage<IAnimationStateMachine>() CapabilityManager.INSTANCE.register(IAnimationStateMachine.class, new Capability.IStorage<IAnimationStateMachine>()
{ {
@Override
public NBTBase writeNBT(Capability<IAnimationStateMachine> capability, IAnimationStateMachine instance, EnumFacing side) public NBTBase writeNBT(Capability<IAnimationStateMachine> capability, IAnimationStateMachine instance, EnumFacing side)
{ {
return null; return null;
} }
@Override
public void readNBT(Capability<IAnimationStateMachine> capability, IAnimationStateMachine instance, EnumFacing side, NBTBase nbt) {} public void readNBT(Capability<IAnimationStateMachine> capability, IAnimationStateMachine instance, EnumFacing side, NBTBase nbt) {}
}, new Callable<IAnimationStateMachine>() }, new Callable<IAnimationStateMachine>()
{ {
@Override
public IAnimationStateMachine call() throws Exception public IAnimationStateMachine call() throws Exception
{ {
return AnimationStateMachine.getMissing(); return AnimationStateMachine.getMissing();

View File

@ -67,16 +67,19 @@ public final class Clips
{ {
INSTANCE; INSTANCE;
@Override
public IJointClip apply(IJoint joint) public IJointClip apply(IJoint joint)
{ {
return JointClips.IdentityJointClip.INSTANCE; return JointClips.IdentityJointClip.INSTANCE;
} }
@Override
public Iterable<Event> pastEvents(float lastPollTime, float time) public Iterable<Event> pastEvents(float lastPollTime, float time)
{ {
return ImmutableSet.<Event>of(); return ImmutableSet.<Event>of();
} }
@Override
public String getName() public String getName()
{ {
return "identity"; return "identity";
@ -119,11 +122,13 @@ public final class Clips
this.clipName = clipName; this.clipName = clipName;
} }
@Override
public IJointClip apply(IJoint joint) public IJointClip apply(IJoint joint)
{ {
return childClip.apply(joint); return childClip.apply(joint);
} }
@Override
public Iterable<Event> pastEvents(float lastPollTime, float time) public Iterable<Event> pastEvents(float lastPollTime, float time)
{ {
return childClip.pastEvents(lastPollTime, time); return childClip.pastEvents(lastPollTime, time);
@ -163,11 +168,13 @@ public final class Clips
this.time = time; this.time = time;
} }
@Override
public IJointClip apply(final IJoint joint) public IJointClip apply(final IJoint joint)
{ {
return new IJointClip() return new IJointClip()
{ {
private final IJointClip parent = childClip.apply(joint); private final IJointClip parent = childClip.apply(joint);
@Override
public TRSRTransformation apply(float time) public TRSRTransformation apply(float time)
{ {
return parent.apply(TimeClip.this.time.apply(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) public Iterable<Event> pastEvents(float lastPollTime, float time)
{ {
return childClip.pastEvents(this.time.apply(lastPollTime), this.time.apply(time)); return childClip.pastEvents(this.time.apply(lastPollTime), this.time.apply(time));
@ -218,6 +226,7 @@ public final class Clips
this.progress = progress; this.progress = progress;
} }
@Override
public IJointClip apply(IJoint joint) public IJointClip apply(IJoint joint)
{ {
IJointClip fromClip = from.apply(joint); IJointClip fromClip = from.apply(joint);
@ -225,6 +234,7 @@ public final class Clips
return blendClips(joint, fromClip, toClip, input, progress); return blendClips(joint, fromClip, toClip, input, progress);
} }
@Override
public Iterable<Event> pastEvents(float lastPollTime, float time) public Iterable<Event> pastEvents(float lastPollTime, float time)
{ {
float clipLastPollTime = input.apply(lastPollTime); float clipLastPollTime = input.apply(lastPollTime);
@ -281,6 +291,7 @@ public final class Clips
{ {
return new IJointClip() return new IJointClip()
{ {
@Override
public TRSRTransformation apply(float time) public TRSRTransformation apply(float time)
{ {
float clipTime = input.apply(time); float clipTime = input.apply(time);
@ -296,6 +307,7 @@ public final class Clips
{ {
return Pair.<IModelState, Iterable<Event>>of(new IModelState() return Pair.<IModelState, Iterable<Event>>of(new IModelState()
{ {
@Override
public Optional<TRSRTransformation> apply(Optional<? extends IModelPart> part) public Optional<TRSRTransformation> apply(Optional<? extends IModelPart> part)
{ {
if(!part.isPresent() || !(part.get() instanceof IJoint)) if(!part.isPresent() || !(part.get() instanceof IJoint))
@ -333,11 +345,13 @@ public final class Clips
this.event = event; this.event = event;
} }
@Override
public IJointClip apply(IJoint joint) public IJointClip apply(IJoint joint)
{ {
return clip.apply(joint); return clip.apply(joint);
} }
@Override
public Iterable<Event> pastEvents(float lastPollTime, float time) public Iterable<Event> pastEvents(float lastPollTime, float time)
{ {
if(parameter.apply(lastPollTime) < 0 && parameter.apply(time) >= 0) if(parameter.apply(lastPollTime) < 0 && parameter.apply(time) >= 0)
@ -382,18 +396,21 @@ public final class Clips
} }
} }
@Override
public IJointClip apply(final IJoint joint) public IJointClip apply(final IJoint joint)
{ {
resolve(); resolve();
return clip.apply(joint); return clip.apply(joint);
} }
@Override
public Iterable<Event> pastEvents(float lastPollTime, float time) public Iterable<Event> pastEvents(float lastPollTime, float time)
{ {
resolve(); resolve();
return clip.pastEvents(lastPollTime, time); return clip.pastEvents(lastPollTime, time);
} }
@Override
public String getName() public String getName()
{ {
return clipName; return clipName;
@ -433,6 +450,7 @@ public final class Clips
this.clipResolver.set(clipResolver); this.clipResolver.set(clipResolver);
} }
@Override
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@Nullable @Nullable
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type)
@ -446,6 +464,7 @@ public final class Clips
return (TypeAdapter<T>)new TypeAdapter<IClip>() return (TypeAdapter<T>)new TypeAdapter<IClip>()
{ {
@Override
public void write(JsonWriter out, IClip clip) throws IOException public void write(JsonWriter out, IClip clip) throws IOException
{ {
// IdentityClip + ClipReference // IdentityClip + ClipReference
@ -497,6 +516,7 @@ public final class Clips
throw new NotImplementedException("unknown Clip to json: " + clip); throw new NotImplementedException("unknown Clip to json: " + clip);
} }
@Override
public IClip read(JsonReader in) throws IOException public IClip read(JsonReader in) throws IOException
{ {
switch(in.peek()) switch(in.peek())

View File

@ -30,6 +30,7 @@ public final class JointClips
{ {
INSTANCE; INSTANCE;
@Override
public TRSRTransformation apply(float time) public TRSRTransformation apply(float time)
{ {
return TRSRTransformation.identity(); return TRSRTransformation.identity();
@ -47,6 +48,7 @@ public final class JointClips
this.clip = clip; this.clip = clip;
} }
@Override
public TRSRTransformation apply(float time) public TRSRTransformation apply(float time)
{ {
return clip.apply(child).apply(time); return clip.apply(child).apply(time);

View File

@ -122,6 +122,7 @@ public class ExtendedBlockState extends BlockStateContainer
} }
} }
@Override
public <V> IExtendedBlockState withProperty(IUnlistedProperty<V> property, V value) public <V> IExtendedBlockState withProperty(IUnlistedProperty<V> property, V value)
{ {
if(!this.unlistedProperties.containsKey(property)) 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); return new ExtendedStateImplementation(getBlock(), getProperties(), ImmutableMap.copyOf(newMap), propertyValueTable).setMap(this.normalMap);
} }
@Override
public Collection<IUnlistedProperty<?>> getUnlistedNames() public Collection<IUnlistedProperty<?>> getUnlistedNames()
{ {
return Collections.unmodifiableCollection(unlistedProperties.keySet()); return Collections.unmodifiableCollection(unlistedProperties.keySet());
} }
@Override
public <V>V getValue(IUnlistedProperty<V> property) public <V>V getValue(IUnlistedProperty<V> property)
{ {
if(!this.unlistedProperties.containsKey(property)) if(!this.unlistedProperties.containsKey(property))
@ -155,6 +158,7 @@ public class ExtendedBlockState extends BlockStateContainer
return property.getType().cast(this.unlistedProperties.get(property).orNull()); return property.getType().cast(this.unlistedProperties.get(property).orNull());
} }
@Override
public ImmutableMap<IUnlistedProperty<?>, Optional<?>> getUnlistedProperties() public ImmutableMap<IUnlistedProperty<?>, Optional<?>> getUnlistedProperties()
{ {
return unlistedProperties; return unlistedProperties;
@ -173,6 +177,7 @@ public class ExtendedBlockState extends BlockStateContainer
return this; return this;
} }
@Override
public IBlockState getClean() public IBlockState getClean()
{ {
return this.normalMap.get(getProperties()); return this.normalMap.get(getProperties());

View File

@ -35,9 +35,13 @@ public class Properties
*/ */
public static final IUnlistedProperty<IModelState> AnimationProperty = new IUnlistedProperty<IModelState>() public static final IUnlistedProperty<IModelState> AnimationProperty = new IUnlistedProperty<IModelState>()
{ {
@Override
public String getName() { return "forge_animation"; } public String getName() { return "forge_animation"; }
@Override
public boolean isValid(IModelState state) { return true; } public boolean isValid(IModelState state) { return true; }
@Override
public Class<IModelState> getType() { return IModelState.class; } public Class<IModelState> getType() { return IModelState.class; }
@Override
public String valueToString(IModelState state) { return state.toString(); } public String valueToString(IModelState state) { return state.toString(); }
}; };
@ -55,21 +59,25 @@ public class Properties
this.parent = parent; this.parent = parent;
} }
@Override
public String getName() public String getName()
{ {
return parent.getName(); return parent.getName();
} }
@Override
public boolean isValid(V value) public boolean isValid(V value)
{ {
return parent.getAllowedValues().contains(value); return parent.getAllowedValues().contains(value);
} }
@Override
public Class<V> getType() public Class<V> getType()
{ {
return parent.getValueClass(); return parent.getValueClass();
} }
@Override
public String valueToString(V value) public String valueToString(V value)
{ {
return parent.getName(value); return parent.getName(value);

View File

@ -38,21 +38,25 @@ public class PropertyFloat implements IUnlistedProperty<Float>
this.validator = validator; this.validator = validator;
} }
@Override
public String getName() public String getName()
{ {
return name; return name;
} }
@Override
public boolean isValid(Float value) public boolean isValid(Float value)
{ {
return validator.apply(value); return validator.apply(value);
} }
@Override
public Class<Float> getType() public Class<Float> getType()
{ {
return Float.class; return Float.class;
} }
@Override
public String valueToString(Float value) public String valueToString(Float value)
{ {
return value.toString(); return value.toString();

View File

@ -34,6 +34,7 @@ public class ChunkCoordComparator implements java.util.Comparator<ChunkPos>
z = (int) entityplayer.posZ >> 4; z = (int) entityplayer.posZ >> 4;
} }
@Override
public int compare(ChunkPos a, ChunkPos b) public int compare(ChunkPos a, ChunkPos b)
{ {
if (a.equals(b)) if (a.equals(b))

View File

@ -42,6 +42,7 @@ public class JsonUtils
{ {
INSTANCE; INSTANCE;
@Override
public ImmutableList<?> deserialize(JsonElement json, Type type, JsonDeserializationContext context) throws JsonParseException public ImmutableList<?> deserialize(JsonElement json, Type type, JsonDeserializationContext context) throws JsonParseException
{ {
final Type[] typeArguments = ((ParameterizedType) type).getActualTypeArguments(); final Type[] typeArguments = ((ParameterizedType) type).getActualTypeArguments();
@ -50,6 +51,7 @@ public class JsonUtils
return ImmutableList.copyOf(list); return ImmutableList.copyOf(list);
} }
@Override
public JsonElement serialize(ImmutableList<?> src, Type type, JsonSerializationContext context) public JsonElement serialize(ImmutableList<?> src, Type type, JsonSerializationContext context)
{ {
final Type[] typeArguments = ((ParameterizedType) type).getActualTypeArguments(); final Type[] typeArguments = ((ParameterizedType) type).getActualTypeArguments();
@ -68,6 +70,7 @@ public class JsonUtils
{ {
INSTANCE; INSTANCE;
@Override
public ImmutableMap<String, ?> deserialize(JsonElement json, Type type, JsonDeserializationContext context) throws JsonParseException public ImmutableMap<String, ?> deserialize(JsonElement json, Type type, JsonDeserializationContext context) throws JsonParseException
{ {
final Type[] typeArguments = ((ParameterizedType) type).getActualTypeArguments(); final Type[] typeArguments = ((ParameterizedType) type).getActualTypeArguments();
@ -76,6 +79,7 @@ public class JsonUtils
return ImmutableMap.copyOf(map); return ImmutableMap.copyOf(map);
} }
@Override
public JsonElement serialize(ImmutableMap<String, ?> src, Type type, JsonSerializationContext context) public JsonElement serialize(ImmutableMap<String, ?> src, Type type, JsonSerializationContext context)
{ {
final Type[] typeArguments = ((ParameterizedType) type).getActualTypeArguments(); final Type[] typeArguments = ((ParameterizedType) type).getActualTypeArguments();

View File

@ -72,6 +72,7 @@ public class InitNoiseGensEvent<T extends InitNoiseGensEvent.Context> extends Wo
public void getScale (NoiseGeneratorOctaves value) { this.scale = value; } public void getScale (NoiseGeneratorOctaves value) { this.scale = value; }
public void getDepth (NoiseGeneratorOctaves value) { this.depth = value; } public void getDepth (NoiseGeneratorOctaves value) { this.depth = value; }
@Override
public Context clone(){ return new Context(lperlin1, lperlin2, perlin, scale, depth); } public Context clone(){ return new Context(lperlin1, lperlin2, perlin, scale, depth); }
} }
@ -87,6 +88,7 @@ public class InitNoiseGensEvent<T extends InitNoiseGensEvent.Context> extends Wo
this.height = height; this.height = height;
this.forest = forest; this.forest = forest;
} }
@Override
public ContextOverworld clone() { return new ContextOverworld(getLPerlin1(), getLPerlin2(), getPerlin(), height, getScale(), getDepth(), forest); } public ContextOverworld clone() { return new ContextOverworld(getLPerlin1(), getLPerlin2(), getPerlin(), height, getScale(), getDepth(), forest); }
public NoiseGeneratorPerlin getHeight() { return height; } public NoiseGeneratorPerlin getHeight() { return height; }
public NoiseGeneratorOctaves getForest() { return forest; } public NoiseGeneratorOctaves getForest() { return forest; }
@ -104,6 +106,7 @@ public class InitNoiseGensEvent<T extends InitNoiseGensEvent.Context> extends Wo
super(lperlin1, lperlin2, perlin, scale, depth); super(lperlin1, lperlin2, perlin, scale, depth);
this.island = island; this.island = island;
} }
@Override
public ContextEnd clone() { return new ContextEnd(getLPerlin1(), getLPerlin2(), getPerlin(), getScale(), getDepth(), island); } public ContextEnd clone() { return new ContextEnd(getLPerlin1(), getLPerlin2(), getPerlin(), getScale(), getDepth(), island); }
public NoiseGeneratorSimplex getIsland() { return island; } public NoiseGeneratorSimplex getIsland() { return island; }
public void getIsland (NoiseGeneratorSimplex value) { this.island = value; } public void getIsland (NoiseGeneratorSimplex value) { this.island = value; }
@ -122,6 +125,7 @@ public class InitNoiseGensEvent<T extends InitNoiseGensEvent.Context> extends Wo
this.perlin2 = perlin2; this.perlin2 = perlin2;
this.perlin3 = perlin3; this.perlin3 = perlin3;
} }
@Override
public ContextHell clone() { return new ContextHell(getLPerlin1(), getLPerlin2(), getPerlin(), perlin2, perlin3, getScale(), getDepth()); } public ContextHell clone() { return new ContextHell(getLPerlin1(), getLPerlin2(), getPerlin(), perlin2, perlin3, getScale(), getDepth()); }
public NoiseGeneratorOctaves getPerlin2() { return perlin2; } public NoiseGeneratorOctaves getPerlin2() { return perlin2; }
public NoiseGeneratorOctaves getPerlin3() { return perlin3; } public NoiseGeneratorOctaves getPerlin3() { return perlin3; }

View File

@ -47,6 +47,7 @@ public class DispenseFluidContainer extends BehaviorDefaultDispenseItem
private final BehaviorDefaultDispenseItem dispenseBehavior = new BehaviorDefaultDispenseItem(); private final BehaviorDefaultDispenseItem dispenseBehavior = new BehaviorDefaultDispenseItem();
@Override
@Nonnull @Nonnull
public ItemStack dispenseStack(@Nonnull IBlockSource source, @Nonnull ItemStack stack) public ItemStack dispenseStack(@Nonnull IBlockSource source, @Nonnull ItemStack stack)
{ {

View File

@ -556,6 +556,7 @@ public class GuiModList extends GuiScreen
} }
@Override
protected void drawHeader(int entryRight, int relativeY, Tessellator tess) protected void drawHeader(int entryRight, int relativeY, Tessellator tess)
{ {
int top = relativeY; int top = relativeY;

View File

@ -215,6 +215,7 @@ public class SplashProgress
// getting debug info out of the way, while we still can // getting debug info out of the way, while we still can
FMLCommonHandler.instance().registerCrashCallable(new ICrashCallable() FMLCommonHandler.instance().registerCrashCallable(new ICrashCallable()
{ {
@Override
public String call() throws Exception public String call() throws Exception
{ {
return "' Vendor: '" + glGetString(GL_VENDOR) + return "' Vendor: '" + glGetString(GL_VENDOR) +
@ -223,6 +224,7 @@ public class SplashProgress
"'"; "'";
} }
@Override
public String getLabel() public String getLabel()
{ {
return "GL info"; return "GL info";
@ -257,6 +259,7 @@ public class SplashProgress
private final int barOffset = 55; private final int barOffset = 55;
private long updateTiming; private long updateTiming;
private long framecount; private long framecount;
@Override
public void run() public void run()
{ {
setGL(); setGL();
@ -575,6 +578,7 @@ public class SplashProgress
}); });
thread.setUncaughtExceptionHandler(new UncaughtExceptionHandler() thread.setUncaughtExceptionHandler(new UncaughtExceptionHandler()
{ {
@Override
public void uncaughtException(Thread t, Throwable e) public void uncaughtException(Thread t, Throwable e)
{ {
FMLLog.log(Level.ERROR, e, "Splash thread Exception"); FMLLog.log(Level.ERROR, e, "Splash thread Exception");

View File

@ -360,6 +360,7 @@ public class GuiConfig extends GuiScreen
} }
} }
@Override
public void handleMouseInput() throws IOException public void handleMouseInput() throws IOException
{ {
super.handleMouseInput(); super.handleMouseInput();

View File

@ -144,6 +144,7 @@ public class GuiEditArray extends GuiScreen
} }
} }
@Override
public void handleMouseInput() throws IOException public void handleMouseInput() throws IOException
{ {
super.handleMouseInput(); super.handleMouseInput();

View File

@ -144,6 +144,7 @@ public class GuiSelectString extends GuiScreen
} }
} }
@Override
public void handleMouseInput() throws IOException public void handleMouseInput() throws IOException
{ {
super.handleMouseInput(); super.handleMouseInput();

View File

@ -77,6 +77,7 @@ public abstract class EnhancedRuntimeException extends RuntimeException
}); });
super.printStackTrace(s); super.printStackTrace(s);
} }
@Override
public void printStackTrace(final PrintStream s) public void printStackTrace(final PrintStream s)
{ {
printStackTrace(new WrappedPrintStream() printStackTrace(new WrappedPrintStream()

View File

@ -124,6 +124,7 @@ public class FMLCommonHandler
{ {
registerCrashCallable(new ICrashCallable() registerCrashCallable(new ICrashCallable()
{ {
@Override
public String call() throws Exception public String call() throws Exception
{ {
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
@ -135,6 +136,7 @@ public class FMLCommonHandler
return builder.toString(); return builder.toString();
} }
@Override
public String getLabel() public String getLabel()
{ {
return "Loaded coremods (and transformers)"; return "Loaded coremods (and transformers)";

View File

@ -59,6 +59,7 @@ public class ASMTransformerWrapper
.weakValues() .weakValues()
.build(new CacheLoader<String, byte[]>() .build(new CacheLoader<String, byte[]>()
{ {
@Override
public byte[] load(String file) throws Exception public byte[] load(String file) throws Exception
{ {
return makeWrapper(file); return makeWrapper(file);
@ -82,6 +83,7 @@ public class ASMTransformerWrapper
private static class ASMGenHandler extends URLStreamHandler private static class ASMGenHandler extends URLStreamHandler
{ {
@Override
@Nullable @Nullable
protected URLConnection openConnection(URL url) throws IOException protected URLConnection openConnection(URL url) throws IOException
{ {
@ -90,6 +92,7 @@ public class ASMTransformerWrapper
{ {
return new URLConnection(url) return new URLConnection(url)
{ {
@Override
public void connect() throws IOException public void connect() throws IOException
{ {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
@ -116,6 +119,7 @@ public class ASMTransformerWrapper
this.file = file; this.file = file;
} }
@Override
public void connect() throws IOException public void connect() throws IOException
{ {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
@ -246,6 +250,7 @@ public class ASMTransformerWrapper
} }
} }
@Override
public byte[] transform(String name, String transformedName, byte[] basicClass) public byte[] transform(String name, String transformedName, byte[] basicClass)
{ {
try try

View File

@ -58,6 +58,7 @@ public class EntitySpawnHandler extends SimpleChannelInboundHandler<FMLMessage.E
{ {
thread.addScheduledTask(new Runnable() thread.addScheduledTask(new Runnable()
{ {
@Override
public void run() public void run()
{ {
EntitySpawnHandler.this.process(msg); EntitySpawnHandler.this.process(msg);

View File

@ -44,6 +44,7 @@ public class OpenGuiHandler extends SimpleChannelInboundHandler<FMLMessage.OpenG
{ {
thread.addScheduledTask(new Runnable() thread.addScheduledTask(new Runnable()
{ {
@Override
public void run() public void run()
{ {
OpenGuiHandler.this.process(msg); OpenGuiHandler.this.process(msg);

View File

@ -840,6 +840,7 @@ public class FMLControlledNamespacedRegistry<I extends IForgeRegistryEntry<I>> e
add(-1, key, value); add(-1, key, value);
} }
@Override
public void registerAll(I... values) public void registerAll(I... values)
{ {
for (I value: values) for (I value: values)

View File

@ -90,8 +90,10 @@ public interface IForgeRegistryEntry<V>
} }
//Helper functions //Helper functions
@Override
public final T setRegistryName(ResourceLocation name){ return setRegistryName(name.toString()); } public final T setRegistryName(ResourceLocation name){ return setRegistryName(name.toString()); }
public final T setRegistryName(String modID, String name){ return setRegistryName(modID + ":" + name); } public final T setRegistryName(String modID, String name){ return setRegistryName(modID + ":" + name); }
@Override
@Nullable @Nullable
public final ResourceLocation getRegistryName() public final ResourceLocation getRegistryName()
{ {

View File

@ -32,6 +32,7 @@ public class LegacyNamespacedRegistry<V> extends RegistryNamespaced<ResourceLoca
{ {
private Map<ResourceLocation, ResourceLocation> legacy_names = Maps.newHashMap(); private Map<ResourceLocation, ResourceLocation> legacy_names = Maps.newHashMap();
@Override
@Nullable @Nullable
public V getObject(@Nullable ResourceLocation name) public V getObject(@Nullable ResourceLocation name)
{ {

View File

@ -118,6 +118,7 @@ public class ItemStackHandler implements IItemHandler, IItemHandlerModifiable, I
return reachedLimit ? ItemHandlerHelper.copyStackWithSize(stack, stack.getCount()- limit) : ItemStack.EMPTY; return reachedLimit ? ItemHandlerHelper.copyStackWithSize(stack, stack.getCount()- limit) : ItemStack.EMPTY;
} }
@Override
@Nonnull @Nonnull
public ItemStack extractItem(int slot, int amount, boolean simulate) public ItemStack extractItem(int slot, int amount, boolean simulate)
{ {

View File

@ -71,6 +71,7 @@ public class OreIngredient extends Ingredient
} }
@Override
public boolean apply(@Nullable ItemStack input) public boolean apply(@Nullable ItemStack input)
{ {
if (input == null) if (input == null)
@ -83,6 +84,7 @@ public class OreIngredient extends Ingredient
return false; return false;
} }
@Override
protected void invalidate() protected void invalidate()
{ {
this.itemIds = null; this.itemIds = null;