Some formatting cleanups. Add copyleft header to all new classes

This commit is contained in:
Vincent Lee committed 2016-01-02 23:21:55 -06:00
1 parent 3eb67e3fea
commit 4e1065855e
30 files changed
+234 -15

No files matched your search

@@ -185,4 +185,5 @@ public class Multiblock {
public MultiblockComponent getComponentForLocation(BlockPos pos) {
return locationCache.get(pos);
}
}
@@ -35,4 +35,5 @@ public class MultiblockSet {
public Multiblock getForFacing(EnumFacing facing) {
return mbs.get(facing);
}
}
@@ -24,13 +24,10 @@ import vazkii.botania.api.BotaniaAPI;
*/
public class ColorSwitchingComponent extends MultiblockComponent {
private final PropertyEnum colorProp;
private final PropertyEnum<EnumDyeColor> colorProp;
public ColorSwitchingComponent(BlockPos relPos, Block block, PropertyEnum colorProp) {
public ColorSwitchingComponent(BlockPos relPos, Block block, PropertyEnum<EnumDyeColor> colorProp) {
super(relPos, block.getDefaultState());
if (colorProp.getValueClass() != EnumDyeColor.class) {
throw new IllegalArgumentException("Must be EnumDyeColor");
}
this.colorProp = colorProp;
}
@@ -88,4 +88,5 @@ public class MultiblockComponent {
public boolean shouldDoFancyRender() {
return doFancyRender;
}
}
@@ -1,3 +1,11 @@
/**
* This class was created by <williewillus>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.php
*/
package vazkii.botania.api.render;
import com.google.common.base.Function;
@@ -111,7 +119,8 @@ public class SpecialFlowerModel implements IModelCustomData {
builder.addAll(blockModels.values());
builder.addAll(itemModels.values());
// Force mini island model to be loaded and baked, for use elsewhere. See <TODO>
// Force mini island model to be loaded and baked, for use elsewhere. See FloatingFlowerModel
// TODO 1.8.8!!!! IslandType is not in the API, will crash when botania is not present!! Must relocate this elsewhere!
for (IFloatingFlower.IslandType i : IFloatingFlower.IslandType.values()) {
builder.add(new ModelResourceLocation("botania:miniIsland", "variant=" + i.name().toLowerCase(Locale.ROOT)));
}
@@ -214,6 +223,7 @@ public class SpecialFlowerModel implements IModelCustomData {
private void refreshBakedModels() {
if (baseModel == null) {
// If not done already, steal all the real baked models and cache them
ModelManager manager = Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelShapes().getModelManager();
baseModel = getBlockModel(manager, Optional.<String>absent());
@@ -327,9 +337,6 @@ public class SpecialFlowerModel implements IModelCustomData {
refreshBakedModels();
IExtendedBlockState extendedState = ((IExtendedBlockState) state);
IBakedModel ret = bakedBlockModels.get(extendedState.getValue(BotaniaStateProps.SUBTILE_ID));
if (ret == null) {
System.out.println("Warning: no flower model for subtile: " + extendedState.getValue(BotaniaStateProps.SUBTILE_ID));
}
return ret == null ? Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelShapes().getModelManager().getMissingModel() : ret;
}
@@ -346,14 +353,13 @@ public class SpecialFlowerModel implements IModelCustomData {
@Override
public IBakedModel handleItemState(ItemStack stack) {
refreshBakedModels();
//System.out.println("calling smart item");
IBakedModel item = bakedItemModels.get(ItemBlockSpecialFlower.getType(stack));
if (item == null) {
System.out.println("Missing item model, selecting block model");
item = bakedBlockModels.get(ItemBlockSpecialFlower.getType(stack));
}
return item == null ? Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelShapes().getModelManager().getMissingModel() : item;
}
}
}
@@ -1,3 +1,11 @@
/**
* This class was created by <williewillus>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.php
*/
package vazkii.botania.api.state;
import com.google.common.base.Predicate;
@@ -11,9 +19,6 @@ import net.minecraft.block.properties.PropertyInteger;
import net.minecraft.item.EnumDyeColor;
import net.minecraft.util.EnumFacing;
import vazkii.botania.api.state.enums.*;
import vazkii.botania.common.block.decor.IFloatingFlower;
import javax.annotation.Nullable;
/**
* Holds all Botania block state properties. Use these to set botania blockstates
@@ -163,4 +168,5 @@ public class BotaniaStateProps {
public static final PropertyEnum<StorageVariant> STORAGE_VARIANT = PropertyEnum.create("variant", StorageVariant.class);
private BotaniaStateProps() {}
}
@@ -1,7 +1,14 @@
/**
* This class was created by <williewillus>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.php
*/
package vazkii.botania.api.state;
import net.minecraftforge.common.property.IUnlistedProperty;
import vazkii.botania.api.subtile.SubTileEntity;
public class PropertyString implements IUnlistedProperty<String> {
@@ -1,3 +1,11 @@
/**
* This class was created by <williewillus>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.php
*/
package vazkii.botania.api.state.enums;
import net.minecraft.util.IStringSerializable;
@@ -13,4 +21,5 @@ public enum AlfPortalState implements IStringSerializable {
public String getName() {
return name().toLowerCase(Locale.ROOT);
}
}
@@ -1,3 +1,11 @@
/**
* This class was created by <williewillus>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.php
*/
package vazkii.botania.api.state.enums;
import net.minecraft.util.IStringSerializable;
@@ -16,4 +24,5 @@ public enum AltGrassVariant implements IStringSerializable {
public String getName() {
return this.name().toLowerCase(Locale.ROOT);
}
}
@@ -1,3 +1,11 @@
/**
* This class was created by <williewillus>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.php
*/
package vazkii.botania.api.state.enums;
import net.minecraft.util.IStringSerializable;
@@ -20,4 +28,5 @@ public enum AltarVariant implements IStringSerializable {
public String getName() {
return name().toLowerCase(Locale.ROOT);
}
}
@@ -1,3 +1,11 @@
/**
* This class was created by <williewillus>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.php
*/
package vazkii.botania.api.state.enums;
import net.minecraft.util.IStringSerializable;
@@ -26,4 +34,5 @@ public enum BiomeBrickVariant implements IStringSerializable {
public String getName() {
return name().toLowerCase(Locale.ROOT);
}
}
@@ -1,3 +1,11 @@
/**
* This class was created by <williewillus>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.php
*/
package vazkii.botania.api.state.enums;
import net.minecraft.util.IStringSerializable;
@@ -26,4 +34,5 @@ public enum BiomeStoneVariant implements IStringSerializable {
public String getName() {
return name().toLowerCase(Locale.ROOT);
}
}
@@ -1,3 +1,11 @@
/**
* This class was created by <williewillus>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.php
*/
package vazkii.botania.api.state.enums;
import net.minecraft.util.IStringSerializable;
@@ -12,4 +20,5 @@ public enum CrateVariant implements IStringSerializable {
public String getName() {
return name().toLowerCase(Locale.ROOT);
}
}
@@ -1,3 +1,11 @@
/**
* This class was created by <williewillus>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.php
*/
package vazkii.botania.api.state.enums;
import net.minecraft.util.IStringSerializable;
@@ -26,4 +34,5 @@ public enum CustomBrickVariant implements IStringSerializable {
public String getName() {
return name().toLowerCase(Locale.ROOT);
}
}
@@ -1,3 +1,11 @@
/**
* This class was created by <williewillus>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.php
*/
package vazkii.botania.api.state.enums;
import net.minecraft.util.IStringSerializable;
@@ -13,4 +21,5 @@ public enum DrumVariant implements IStringSerializable {
public String getName() {
return name().toLowerCase(Locale.ROOT);
}
}
@@ -1,3 +1,11 @@
/**
* This class was created by <williewillus>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.php
*/
package vazkii.botania.api.state.enums;
import net.minecraft.util.IStringSerializable;
@@ -14,4 +22,5 @@ public enum EndBrickVariant implements IStringSerializable {
public String getName() {
return name().toLowerCase(Locale.ROOT);
}
}
@@ -1,3 +1,11 @@
/**
* This class was created by <williewillus>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.php
*/
package vazkii.botania.api.state.enums;
import net.minecraft.util.IStringSerializable;
@@ -26,4 +34,5 @@ public enum FutureStoneVariant implements IStringSerializable {
public String getName() {
return name().toLowerCase(Locale.ROOT);
}
}
@@ -1,3 +1,11 @@
/**
* This class was created by <williewillus>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.php
*/
package vazkii.botania.api.state.enums;
import net.minecraft.util.IStringSerializable;
@@ -15,4 +23,5 @@ public enum LivingRockVariant implements IStringSerializable {
public String getName() {
return name().toLowerCase(Locale.ROOT);
}
}
@@ -1,3 +1,11 @@
/**
* This class was created by <williewillus>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.php
*/
package vazkii.botania.api.state.enums;
import net.minecraft.util.IStringSerializable;
@@ -16,4 +24,5 @@ public enum LivingWoodVariant implements IStringSerializable {
public String getName() {
return name().toLowerCase(Locale.ROOT);
}
}
@@ -1,3 +1,11 @@
/**
* This class was created by <williewillus>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.php
*/
package vazkii.botania.api.state.enums;
import net.minecraft.util.IStringSerializable;
@@ -12,4 +20,5 @@ public enum LuminizerVariant implements IStringSerializable {
public String getName() {
return name().toLowerCase(Locale.ROOT);
}
}
@@ -1,3 +1,11 @@
/**
* This class was created by <williewillus>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.php
*/
package vazkii.botania.api.state.enums;
import net.minecraft.util.IStringSerializable;
@@ -13,4 +21,5 @@ public enum PlatformVariant implements IStringSerializable {
public String getName() {
return name().toLowerCase(Locale.ROOT);
}
}
@@ -1,3 +1,11 @@
/**
* This class was created by <williewillus>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.php
*/
package vazkii.botania.api.state.enums;
import net.minecraft.util.IStringSerializable;
@@ -14,4 +22,5 @@ public enum PoolVariant implements IStringSerializable {
public String getName() {
return name().toLowerCase(Locale.ROOT);
}
}
@@ -1,3 +1,11 @@
/**
* This class was created by <williewillus>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.php
*/
package vazkii.botania.api.state.enums;
import net.minecraft.util.IStringSerializable;
@@ -13,4 +21,5 @@ public enum PrismarineVariant implements IStringSerializable {
public String getName() {
return name().toLowerCase(Locale.ROOT);
}
}
@@ -1,3 +1,11 @@
/**
* This class was created by <williewillus>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.php
*/
package vazkii.botania.api.state.enums;
import net.minecraft.util.IStringSerializable;
@@ -13,4 +21,5 @@ public enum PylonVariant implements IStringSerializable {
public String getName() {
return name().toLowerCase(Locale.ROOT);
}
}
@@ -1,3 +1,11 @@
/**
* This class was created by <williewillus>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.php
*/
package vazkii.botania.api.state.enums;
import net.minecraft.util.IStringSerializable;
@@ -15,4 +23,5 @@ public enum QuartzVariant implements IStringSerializable {
public String getName() {
return name().toLowerCase(Locale.ROOT);
}
}
@@ -1,3 +1,11 @@
/**
* This class was created by <williewillus>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.php
*/
package vazkii.botania.api.state.enums;
import net.minecraft.util.IStringSerializable;
@@ -14,4 +22,5 @@ public enum SpreaderVariant implements IStringSerializable {
public String getName() {
return name().toLowerCase(Locale.ROOT);
}
}
@@ -1,3 +1,11 @@
/**
* This class was created by <williewillus>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.php
*/
package vazkii.botania.api.state.enums;
import net.minecraft.util.IStringSerializable;
@@ -15,4 +23,5 @@ public enum StorageVariant implements IStringSerializable {
public String getName() {
return name().toLowerCase(Locale.ROOT);
}
}
@@ -1,3 +1,11 @@
/**
* This class was created by <williewillus>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.php
*/
package vazkii.botania.client.core.handler;
import com.google.common.collect.ImmutableList;
@@ -1018,4 +1026,5 @@ public final class ModelHandler {
}
private ModelHandler() {}
}
@@ -1,3 +1,11 @@
/**
* This class was created by <williewillus>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.php
*/
package vazkii.botania.client.model;
import com.google.common.base.Function;
@@ -42,6 +50,7 @@ import java.util.List;
import java.util.Map;
public class FloatingFlowerModel implements ISmartItemModel, ISmartBlockModel, IResourceManagerReloadListener {
public static final FloatingFlowerModel INSTANCE = new FloatingFlowerModel();
private static Table<IFloatingFlower.IslandType, String, CompositeBakedModel> CACHE = HashBasedTable.create();
@@ -222,4 +231,5 @@ public class FloatingFlowerModel implements ISmartItemModel, ISmartBlockModel, I
@Override
public ItemCameraTransforms getItemCameraTransforms() { return ItemCameraTransforms.DEFAULT; }
}
@@ -141,4 +141,5 @@ public class ModelPylon implements IPylonModel {
for (BakedQuad bakedquad : quads)
LightUtil.renderQuadColor(renderer, bakedquad, color);
}
}