mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-10-26 14:24:22 +00:00
Barely runs
This commit is contained in:
1 parent
d37518c9f4
commit
3e79893a35
14 files changed
+71
-65
No files matched your search
+1
-1
@@ -2,7 +2,7 @@
|
||||
#Sat Mar 12 17:00:04 CST 2016
|
||||
version=r1.8
|
||||
dir_output=../Build Output/Botania/
|
||||
forge_version=12.16.0.1767-1.9
|
||||
forge_version=12.16.0.1797-1.9
|
||||
mc_version=1.9
|
||||
dir_repo=./
|
||||
build_number=300
|
||||
|
||||
@@ -76,7 +76,7 @@ public final class BotaniaStateProps {
|
||||
public static final PropertyEnum<FutureStoneVariant> FUTURESTONE_VARIANT = PropertyEnum.create("variant", FutureStoneVariant.class);
|
||||
|
||||
// Block18StoneWall
|
||||
public static final PropertyEnum<FutureStoneVariant> FUTURESTONEWALL_VARIANT = PropertyEnum.create("variant", FutureStoneVariant.class, new Predicate<FutureStoneVariant>() {
|
||||
public static final PropertyEnum<FutureStoneVariant> FUTURESTONEWALL_VARIANT = PropertyEnum.create("fswall_variant", FutureStoneVariant.class, new Predicate<FutureStoneVariant>() {
|
||||
@Override
|
||||
public boolean apply(FutureStoneVariant variant) {
|
||||
// Just the four kinds (no polished, chiseled, etc.)
|
||||
@@ -100,7 +100,7 @@ public final class BotaniaStateProps {
|
||||
public static final PropertyEnum<BiomeBrickVariant> BIOMEBRICK_VARIANT = PropertyEnum.create("variant", BiomeBrickVariant.class);
|
||||
|
||||
// BlockBiomeStoneWall
|
||||
public static final PropertyEnum<BiomeStoneVariant> BIOMESTONEWALL_VARIANT = PropertyEnum.create("variant", BiomeStoneVariant.class, new Predicate<BiomeStoneVariant>() {
|
||||
public static final PropertyEnum<BiomeStoneVariant> BIOMESTONEWALL_VARIANT = PropertyEnum.create("bswall_variant", BiomeStoneVariant.class, new Predicate<BiomeStoneVariant>() {
|
||||
@Override
|
||||
public boolean apply(BiomeStoneVariant input) {
|
||||
return input.getName().contains("cobble");
|
||||
@@ -132,7 +132,7 @@ public final class BotaniaStateProps {
|
||||
public static final PropertyEnum<LivingRockVariant> LIVINGROCK_VARIANT = PropertyEnum.create("variant", LivingRockVariant.class);
|
||||
|
||||
// BlockModDoubleFlower (white to gray)
|
||||
public static final PropertyEnum<EnumDyeColor> DOUBLEFLOWER_VARIANT_1 = PropertyEnum.create("variant", EnumDyeColor.class, new Predicate<EnumDyeColor>() {
|
||||
public static final PropertyEnum<EnumDyeColor> DOUBLEFLOWER_VARIANT_1 = PropertyEnum.create("df_variant", EnumDyeColor.class, new Predicate<EnumDyeColor>() {
|
||||
@Override
|
||||
public boolean apply(EnumDyeColor input) {
|
||||
return input.ordinal() >= 0 && input.ordinal() <= 7;
|
||||
@@ -140,7 +140,7 @@ public final class BotaniaStateProps {
|
||||
});
|
||||
|
||||
// (silver to black)
|
||||
public static final PropertyEnum<EnumDyeColor> DOUBLEFLOWER_VARIANT_2 = PropertyEnum.create("variant", EnumDyeColor.class, new Predicate<EnumDyeColor>() {
|
||||
public static final PropertyEnum<EnumDyeColor> DOUBLEFLOWER_VARIANT_2 = PropertyEnum.create("df_variant", EnumDyeColor.class, new Predicate<EnumDyeColor>() {
|
||||
@Override
|
||||
public boolean apply(EnumDyeColor input) {
|
||||
return input.ordinal() >= 8 && input.ordinal() <= 15;
|
||||
|
||||
@@ -137,7 +137,7 @@ public final class ModelHandler {
|
||||
// todo reorganize, alphabetize
|
||||
public static void registerModels() {
|
||||
ModelLoaderRegistry.registerLoader(SpecialFlowerModel.Loader.INSTANCE);
|
||||
OBJLoader.instance.addDomain(LibMisc.MOD_ID.toLowerCase(Locale.ROOT));
|
||||
OBJLoader.INSTANCE.addDomain(LibMisc.MOD_ID.toLowerCase(Locale.ROOT));
|
||||
((IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager()).registerReloadListener(FloatingFlowerModel.INSTANCE);
|
||||
|
||||
/** Subtile block models **/
|
||||
@@ -814,19 +814,19 @@ public final class ModelHandler {
|
||||
ModelLoader.setCustomModelResourceLocation(item, color.getMetadata(), new ModelResourceLocation(name, "inventory_" + color.getName()));
|
||||
}
|
||||
|
||||
item = Item.getItemFromBlock(ModBlocks.doubleFlower1);
|
||||
for (EnumDyeColor color : BotaniaStateProps.DOUBLEFLOWER_VARIANT_1.getAllowedValues()) {
|
||||
String name = GameData.getBlockRegistry().getNameForObject(ModBlocks.doubleFlower1).toString();
|
||||
String variant = "inventory_" + color.getName();
|
||||
ModelLoader.setCustomModelResourceLocation(item, color.getMetadata(), new ModelResourceLocation(name, variant));
|
||||
}
|
||||
|
||||
item = Item.getItemFromBlock(ModBlocks.doubleFlower2);
|
||||
for (EnumDyeColor color : BotaniaStateProps.DOUBLEFLOWER_VARIANT_2.getAllowedValues()) {
|
||||
String name = GameData.getBlockRegistry().getNameForObject(ModBlocks.doubleFlower2).toString();
|
||||
String variant = "inventory_" + color.getName();
|
||||
ModelLoader.setCustomModelResourceLocation(item, color.getMetadata() - 8, new ModelResourceLocation(name, variant));
|
||||
}
|
||||
// item = Item.getItemFromBlock(ModBlocks.doubleFlower1);
|
||||
// for (EnumDyeColor color : BotaniaStateProps.DOUBLEFLOWER_VARIANT_1.getAllowedValues()) {
|
||||
// String name = GameData.getBlockRegistry().getNameForObject(ModBlocks.doubleFlower1).toString();
|
||||
// String variant = "inventory_" + color.getName();
|
||||
// ModelLoader.setCustomModelResourceLocation(item, color.getMetadata(), new ModelResourceLocation(name, variant));
|
||||
// }
|
||||
//
|
||||
// item = Item.getItemFromBlock(ModBlocks.doubleFlower2);
|
||||
// for (EnumDyeColor color : BotaniaStateProps.DOUBLEFLOWER_VARIANT_2.getAllowedValues()) {
|
||||
// String name = GameData.getBlockRegistry().getNameForObject(ModBlocks.doubleFlower2).toString();
|
||||
// String variant = "inventory_" + color.getName();
|
||||
// ModelLoader.setCustomModelResourceLocation(item, color.getMetadata() - 8, new ModelResourceLocation(name, variant));
|
||||
// }
|
||||
}
|
||||
|
||||
private static void registerPavement() {
|
||||
|
||||
@@ -183,14 +183,13 @@ public class ClientProxy extends CommonProxy {
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(MiscellaneousIcons.INSTANCE);
|
||||
ModelHandler.registerModels();
|
||||
ColorHandler.init();
|
||||
initRenderers();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(FMLInitializationEvent event) {
|
||||
super.init(event);
|
||||
|
||||
ColorHandler.init();
|
||||
initAuxiliaryRender();
|
||||
|
||||
ModChallenges.init();
|
||||
@@ -277,18 +276,13 @@ public class ClientProxy extends CommonProxy {
|
||||
private void initAuxiliaryRender() {
|
||||
Map<String, RenderPlayer> skinMap = Minecraft.getMinecraft().getRenderManager().getSkinMap();
|
||||
RenderPlayer render;
|
||||
render = skinMap.get("default");
|
||||
render.addLayer(new ContributorFancinessHandler());
|
||||
render.addLayer(new BaubleRenderHandler());
|
||||
|
||||
try { // todo 1.9 get Forge to AT this back -.-
|
||||
Method m = ReflectionHelper.findMethod(RenderPlayer.class, null, LibObfuscation.ADD_LAYER);
|
||||
|
||||
render = skinMap.get("default");
|
||||
m.invoke(render, new ContributorFancinessHandler());
|
||||
m.invoke(render, new BaubleRenderHandler());
|
||||
|
||||
render = skinMap.get("slim");
|
||||
m.invoke(render, new ContributorFancinessHandler());
|
||||
m.invoke(render, new BaubleRenderHandler());
|
||||
} catch (ReflectiveOperationException ignored) {}
|
||||
render = skinMap.get("slim");
|
||||
render.addLayer(new ContributorFancinessHandler());
|
||||
render.addLayer(new BaubleRenderHandler());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -29,7 +29,7 @@ import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.TRSRTransformation;
|
||||
import net.minecraftforge.common.model.TRSRTransformation;
|
||||
import net.minecraftforge.client.model.pipeline.IVertexConsumer;
|
||||
import net.minecraftforge.client.model.pipeline.UnpackedBakedQuad;
|
||||
import net.minecraftforge.client.model.pipeline.VertexTransformer;
|
||||
|
||||
@@ -50,7 +50,7 @@ public class ModelPylon implements IPylonModel {
|
||||
public ModelPylon() {
|
||||
try {
|
||||
// Load the OBJ
|
||||
OBJModel model = ((OBJModel) OBJLoader.instance.loadModel(new ResourceLocation("botania:models/block/pylon.obj")));
|
||||
OBJModel model = ((OBJModel) OBJLoader.INSTANCE.loadModel(new ResourceLocation("botania:models/block/pylon.obj")));
|
||||
|
||||
// Apply the texture and flip the v's of the model
|
||||
IModel manaModel = ((OBJModel) model.retexture(ImmutableMap.of("#pylon", "botania:model/pylon"))).process(ImmutableMap.of("flip-v", "true"));
|
||||
|
||||
@@ -26,7 +26,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.Attributes;
|
||||
import net.minecraftforge.client.model.IModel;
|
||||
import net.minecraftforge.client.model.IPerspectiveAwareModel;
|
||||
import net.minecraftforge.client.model.TRSRTransformation;
|
||||
import net.minecraftforge.common.model.TRSRTransformation;
|
||||
import net.minecraftforge.client.model.obj.OBJLoader;
|
||||
import net.minecraftforge.client.model.obj.OBJModel;
|
||||
import net.minecraftforge.fml.common.FMLLog;
|
||||
@@ -69,7 +69,7 @@ public class PylonItemModel implements IBakedModel {
|
||||
// Load the OBJ
|
||||
OBJModel model = null;
|
||||
try {
|
||||
model = ((OBJModel) OBJLoader.instance.loadModel(new ResourceLocation("botania:models/block/pylon.obj")));
|
||||
model = ((OBJModel) OBJLoader.INSTANCE.loadModel(new ResourceLocation("botania:models/block/pylon.obj")));
|
||||
} catch(Exception e) {
|
||||
FMLLog.log(Level.ERROR, "[Botania]: Error loading pylon item model, substituting missing model");
|
||||
mana = Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelShapes().getModelManager().getMissingModel();
|
||||
|
||||
@@ -34,9 +34,9 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.ICustomModelLoader;
|
||||
import net.minecraftforge.client.model.IModel;
|
||||
import net.minecraftforge.client.model.IModelCustomData;
|
||||
import net.minecraftforge.client.model.IModelState;
|
||||
import net.minecraftforge.common.model.IModelState;
|
||||
import net.minecraftforge.client.model.IPerspectiveAwareModel;
|
||||
import net.minecraftforge.client.model.TRSRTransformation;
|
||||
import net.minecraftforge.common.model.TRSRTransformation;
|
||||
import net.minecraftforge.common.property.IExtendedBlockState;
|
||||
import net.minecraftforge.fml.common.FMLLog;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
@@ -30,9 +30,9 @@ import net.minecraft.util.math.BlockPos;
|
||||
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
import net.minecraftforge.client.model.IModelState;
|
||||
import net.minecraftforge.client.model.animation.Animation;
|
||||
import net.minecraftforge.client.model.animation.Event;
|
||||
import net.minecraftforge.common.animation.Event;
|
||||
import net.minecraftforge.common.model.IModelState;
|
||||
import net.minecraftforge.common.property.IExtendedBlockState;
|
||||
import net.minecraftforge.common.property.Properties;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
@@ -170,7 +170,9 @@ public class RenderTileCorporeaCrystalCube extends TileEntitySpecialRenderer<Til
|
||||
if(exState.getUnlistedNames().contains(Properties.AnimationProperty))
|
||||
{
|
||||
float time = Animation.getWorldTime(getWorld(), partialTick);
|
||||
Pair<IModelState, Iterable<Event>> pair = te.asm().apply(time);
|
||||
// todo 1.9
|
||||
if (true) return;
|
||||
Pair<IModelState, Iterable<Event>> pair = null;
|
||||
// handleEvents(te, time, pair.getRight());
|
||||
|
||||
IBakedModel model = blockRenderer.getBlockModelShapes().getModelForState(exState.getClean());
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package vazkii.botania.common.block.decor.slabs;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.BlockSlab;
|
||||
@@ -120,7 +121,7 @@ public abstract class BlockModSlab extends BlockSlab implements ILexiconable {
|
||||
SINGLETON {
|
||||
@Override
|
||||
public String getName() {
|
||||
return name();
|
||||
return name().toLowerCase(Locale.ROOT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+6
-7
@@ -18,7 +18,6 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.model.animation.Animation;
|
||||
import net.minecraftforge.client.model.animation.IAnimationProvider;
|
||||
import net.minecraftforge.common.model.animation.IAnimationStateMachine;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
@@ -27,7 +26,7 @@ import vazkii.botania.api.corporea.ICorporeaRequestor;
|
||||
import vazkii.botania.api.corporea.ICorporeaSpark;
|
||||
import vazkii.botania.api.internal.VanillaPacketDispatcher;
|
||||
|
||||
public class TileCorporeaCrystalCube extends TileCorporeaBase implements ICorporeaRequestor, IAnimationProvider {
|
||||
public class TileCorporeaCrystalCube extends TileCorporeaBase implements ICorporeaRequestor {
|
||||
|
||||
private static final String TAG_REQUEST_TARGET = "requestTarget";
|
||||
private static final String TAG_ITEM_COUNT = "itemCount";
|
||||
@@ -39,13 +38,13 @@ public class TileCorporeaCrystalCube extends TileCorporeaBase implements ICorpor
|
||||
int ticks = 0;
|
||||
public int compValue = 0;
|
||||
|
||||
private final IAnimationStateMachine asm;
|
||||
//private final IAnimationStateMachine asm;
|
||||
|
||||
public TileCorporeaCrystalCube() {
|
||||
if (FMLCommonHandler.instance().getSide() == Side.CLIENT) {
|
||||
asm = Animation.INSTANCE.load(new ResourceLocation("botania", "asms/block/crystalcube_cube.json"), ImmutableMap.of());
|
||||
//asm = Animation.INSTANCE.load(new ResourceLocation("botania", "asms/block/crystalcube_cube.json"), ImmutableMap.of());
|
||||
} else {
|
||||
asm = null;
|
||||
//asm = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -166,9 +165,9 @@ public class TileCorporeaCrystalCube extends TileCorporeaBase implements ICorpor
|
||||
onUpdateCount();
|
||||
}
|
||||
}
|
||||
|
||||
/* todo 1.9
|
||||
@Override
|
||||
public IAnimationStateMachine asm() {
|
||||
return asm;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
@@ -16,15 +16,14 @@ import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.model.animation.Animation;
|
||||
import net.minecraftforge.client.model.animation.IAnimationProvider;
|
||||
import net.minecraftforge.client.model.animation.TimeValues;
|
||||
import net.minecraftforge.common.animation.TimeValues;
|
||||
import net.minecraftforge.common.model.animation.IAnimationStateMachine;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import vazkii.botania.api.internal.VanillaPacketDispatcher;
|
||||
import vazkii.botania.common.block.tile.TileMod;
|
||||
|
||||
public class TilePump extends TileMod implements IAnimationProvider {
|
||||
public class TilePump extends TileMod {
|
||||
|
||||
private static final String TAG_ACTIVE = "active";
|
||||
|
||||
@@ -39,15 +38,15 @@ public class TilePump extends TileMod implements IAnimationProvider {
|
||||
int lastComparator = 0;
|
||||
|
||||
private final TimeValues.VariableValue move;
|
||||
private final IAnimationStateMachine asm;
|
||||
//private final IAnimationStateMachine asm;
|
||||
|
||||
public TilePump() {
|
||||
if (FMLCommonHandler.instance().getSide() == Side.CLIENT) {
|
||||
move = new TimeValues.VariableValue(0);
|
||||
asm = Animation.INSTANCE.load(new ResourceLocation("botania", "asms/block/pump.json"), ImmutableMap.of("move", move));
|
||||
move = new TimeValues.VariableValue(0); //todo 1.9
|
||||
//asm = Animation.INSTANCE.load(new ResourceLocation("botania", "asms/block/pump.json"), ImmutableMap.of("move", move));
|
||||
} else {
|
||||
move = null;
|
||||
asm = null;
|
||||
//asm = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,7 +113,7 @@ public class TilePump extends TileMod implements IAnimationProvider {
|
||||
active = cmp.getBoolean(TAG_ACTIVE);
|
||||
if(worldObj != null && worldObj.isRemote)
|
||||
if(prevActive != active)
|
||||
asm.transition(active ? "moving" : "default");
|
||||
;//asm.transition(active ? "moving" : "default");
|
||||
}
|
||||
|
||||
public void setActive(boolean active) {
|
||||
@@ -126,8 +125,8 @@ public class TilePump extends TileMod implements IAnimationProvider {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IAnimationStateMachine asm() {
|
||||
return asm;
|
||||
}
|
||||
// @Override
|
||||
// public IAnimationStateMachine asm() {
|
||||
// return asm;
|
||||
// }
|
||||
}
|
||||
@@ -113,8 +113,10 @@ public class ItemLivingwoodBow extends ItemBow implements IManaUsingItem {
|
||||
if(f > 1.0F)
|
||||
f = 1.0F;
|
||||
|
||||
ItemStack ammo = shooter instanceof EntityPlayer ? PlayerHelper.getAmmo(((EntityPlayer) shooter), AMMO_FUNC) : new ItemStack(Items.arrow);
|
||||
EntityArrow entityarrow = ((ItemArrow) (ammo == null ? Items.arrow : ammo.getItem())).createArrow(world, ammo, shooter);
|
||||
ItemStack ammo = shooter instanceof EntityPlayer ? PlayerHelper.getAmmo(((EntityPlayer) shooter), AMMO_FUNC) : null;
|
||||
if(ammo == null)
|
||||
ammo = new ItemStack(Items.arrow);
|
||||
EntityArrow entityarrow = ((ItemArrow) ammo.getItem()).createArrow(world, ammo, shooter);
|
||||
|
||||
if(f == 1.0F)
|
||||
entityarrow.setIsCritical(true);
|
||||
|
||||
+11
-2
@@ -10,8 +10,10 @@
|
||||
*/
|
||||
package vazkii.botania.common.item.equipment.tool.manasteel;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.Entity;
|
||||
@@ -21,6 +23,7 @@ import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemAxe;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemTool;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
@@ -38,7 +41,7 @@ import vazkii.botania.common.item.equipment.tool.ToolCommons;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
|
||||
public class ItemManasteelAxe extends ItemAxe implements IManaUsingItem, ISortableTool {
|
||||
public class ItemManasteelAxe extends ItemTool implements IManaUsingItem, ISortableTool {
|
||||
|
||||
private static final Pattern SAPLING_PATTERN = Pattern.compile("(?:(?:(?:[A-Z-_.:]|^)sapling)|(?:(?:[a-z-_.:]|^)Sapling))(?:[A-Z-_.:]|$)");
|
||||
|
||||
@@ -49,11 +52,17 @@ public class ItemManasteelAxe extends ItemAxe implements IManaUsingItem, ISortab
|
||||
}
|
||||
|
||||
public ItemManasteelAxe(ToolMaterial mat, String name) {
|
||||
super(mat);
|
||||
super(mat, ImmutableSet.of());
|
||||
// todo attack speed and set
|
||||
setCreativeTab(BotaniaCreativeTab.INSTANCE);
|
||||
setUnlocalizedName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<String> getToolClasses(ItemStack stack) {
|
||||
return ImmutableSet.of("axe");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item setUnlocalizedName(String par1Str) {
|
||||
GameRegistry.registerItem(this, par1Str);
|
||||
|
||||
Reference in new issue
Block a user