mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-10-26 22:34:08 +00:00
Compare commits
32
Commits
v0.1-alpha
...
v0.2-alpha
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2ddf71d76f | ||
|
|
34fae04641 | ||
|
|
dc6af948d9 | ||
|
|
3fe2a0006c | ||
|
|
89dac440c8 | ||
|
|
5797d18d9b | ||
|
|
52cf3df27e | ||
|
|
b976ed5df1 | ||
|
|
e727cb7f2b | ||
|
|
8e6dc7c637 | ||
|
|
28249d1e33 | ||
|
|
b24585b13d | ||
|
|
86880bfd49 | ||
|
|
c8c50f9af0 | ||
|
|
0e301a4e33 | ||
|
|
10d095d656 | ||
|
|
9bf2e0c555 | ||
|
|
95118696ce | ||
|
|
ab4f6f6433 | ||
|
|
46c13be698 | ||
|
|
ad58fb1855 | ||
|
|
12ae7ed3d1 | ||
|
|
6cf82eb98d | ||
|
|
b10a642297 | ||
|
|
75ab210227 | ||
|
|
0b27d9d0b5 | ||
|
|
3c102bbc75 | ||
|
|
4e1065855e | ||
|
|
3eb67e3fea | ||
|
|
5d80b7d9ce | ||
|
|
f7e5054bf4 | ||
|
|
906fb74ec0 |
No files matched your search
+2
-9
@@ -11,6 +11,7 @@ Anyways, vanilla removed it from their method so we follow suit.
|
||||
* Magnet blacklist still uses metas instead of states because they need to support the short maxvalue wildcard.
|
||||
* Now includes a way for addons to pass the Botania loader the models they want to use to render their subtile with
|
||||
* IRelic changed to use UUIDs
|
||||
* Removed icon methods from SubTileSignature
|
||||
|
||||
-- Other --
|
||||
* Most things left untouched to make patches from upstream easier
|
||||
@@ -25,12 +26,4 @@ sorry :/ The systems needed to dynamically switch out the textures like that is
|
||||
* Quartz stair textures may be assigned incorrectly - resource pack authors check me
|
||||
* Glass pane inner faces are not getting culled (vanilla bug?)
|
||||
* Some item forms of technical/non-user blocks are removed
|
||||
* Full list: [all double slab items, all solid vine items]
|
||||
|
||||
-- Todo --
|
||||
* JSON models for everything (tedious/med-hard)
|
||||
* Migrate the PlayerRender events (baubles, etc.) to LayerRenderers (med)
|
||||
* For rendering arbitrary icons (that DO NOT HAVE AN ITEM) in a 3D style (manaResource icons, etc.)
|
||||
- Sub to texture stitch and bake our own model there to use?
|
||||
- This remains the largest portion of what is left
|
||||
- Where is the method to render an arbitrary baked model?
|
||||
* Full list: [all double slab items, all solid vine items]
|
||||
@@ -1,14 +0,0 @@
|
||||
altar
|
||||
up-down
|
||||
west-south-east-north
|
||||
|
||||
base textures pillar tex
|
||||
|
||||
|
||||
|
||||
northsouth face cup (1 always faces south)
|
||||
eastwest face cup (blue always faces east)
|
||||
cupbase 2
|
||||
cubbase
|
||||
|
||||
water-lava texture simply one level below top of cup
|
||||
@@ -21,6 +21,9 @@ repositories {
|
||||
name = "chickenbones"
|
||||
url = "http://chickenbones.net/maven/"
|
||||
}
|
||||
maven {
|
||||
url "http://dvs1.progwml6.com/files/maven"
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'net.minecraftforge.gradle.forge'
|
||||
@@ -46,6 +49,7 @@ minecraft {
|
||||
replace 'GRADLE:VERSION', config.version
|
||||
|
||||
replaceIn 'LibMisc.java' //I may have missed another file, though I can only find it in here.
|
||||
useDepAts = true
|
||||
}
|
||||
|
||||
//This here is for SCP
|
||||
@@ -67,6 +71,8 @@ dependencies {
|
||||
//compile "codechicken:NotEnoughItems:1.8-1.0.5.104:dev"
|
||||
//compile "codechicken:ForgeMultipart:1.7.10-1.1.1.320:dev"
|
||||
|
||||
deobfCompile "mezz.jei:jei_1.8.9:2.13.7.64"
|
||||
|
||||
//and a bit more for SCP
|
||||
sshAntTask "org.apache.ant:ant-jsch:1.7.1", "jsch:jsch:0.1.29"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
package vazkii.botania.api;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import net.minecraft.client.resources.model.ModelResourceLocation;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import vazkii.botania.api.subtile.SubTileEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Class for API calls that must be made clientside
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public final class BotaniaAPIClient {
|
||||
|
||||
public static final Map<String, ModelResourceLocation> queuedBlockModels = Maps.newHashMap();
|
||||
public static final Map<String, ModelResourceLocation> queuedItemModels = Maps.newHashMap();
|
||||
|
||||
/**
|
||||
* Register your model for the given subtile class here.
|
||||
* Call this DURING PREINIT. Calling it anytime after blockModels have already baked does not guarantee that your model will work.
|
||||
* Your model json must specify key "tintindex" in all the faces it wants tint applied.
|
||||
* Tint is applied whenever a player recolors the flower using floral dye
|
||||
* todo 1.8.8 move this elsewhere or otherwise make it fit better with the rest of the subtile registration process
|
||||
*
|
||||
* @param subTileName The String ID of the subtile
|
||||
* @param model A path to a blockstate json and variant to be used for this subtile
|
||||
* @param itemModel A path to a blockstate json and variant to be used for this subtile's item form
|
||||
*/
|
||||
public static void registerSubtileModel(String subTileName, ModelResourceLocation model, ModelResourceLocation itemModel) {
|
||||
queuedBlockModels.put(subTileName, model);
|
||||
queuedItemModels.put(subTileName, itemModel);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register your model for the given subtile class here.
|
||||
* Call this DURING PREINIT. Calling it anytime after blockModels have already baked does not guarantee that your model will work.
|
||||
* Your model json must specify key "tintindex" in all the faces it wants tint applied.
|
||||
* Tint is applied whenever a player recolors the flower using floral dye
|
||||
* todo 1.8.8 move this elsewhere or otherwise make it fit better with the rest of the subtile registration process
|
||||
*
|
||||
* @param subTileName The String ID of the subtile
|
||||
* @param model A path to a blockstate json and variant to be used the block. The item model will be drawn from the same blockstate json, from variant "inventory"
|
||||
*/
|
||||
public static void registerSubtileModel(String subTileName, ModelResourceLocation model) {
|
||||
registerSubtileModel(subTileName, model, new ModelResourceLocation(model.getResourceDomain() + ":" + model.getResourcePath(), "inventory"));
|
||||
}
|
||||
|
||||
// Convenience overloads for the above two calls
|
||||
public static void registerSubtileModel(Class<? extends SubTileEntity> clazz, ModelResourceLocation model) {
|
||||
registerSubtileModel(BotaniaAPI.getSubTileStringMapping(clazz), model);
|
||||
}
|
||||
|
||||
public static void registerSubtileModel(Class<? extends SubTileEntity> clazz, ModelResourceLocation model, ModelResourceLocation itemModel) {
|
||||
registerSubtileModel(BotaniaAPI.getSubTileStringMapping(clazz), model, itemModel);
|
||||
}
|
||||
|
||||
private BotaniaAPIClient() {}
|
||||
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
+2
-5
@@ -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.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
|
||||
@@ -162,5 +167,9 @@ public class BotaniaStateProps {
|
||||
// BlockStorage
|
||||
public static final PropertyEnum<StorageVariant> STORAGE_VARIANT = PropertyEnum.create("variant", StorageVariant.class);
|
||||
|
||||
// BlockTinyPotato
|
||||
public static final PropertyEnum<PotatoVariant> POTATO_VARIANT = PropertyEnum.create("variant", PotatoVariant.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);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* 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;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
public enum PotatoVariant implements IStringSerializable {
|
||||
DEFAULT,
|
||||
HALLOWEEN,
|
||||
GRAYSCALE;
|
||||
|
||||
@Override
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -10,15 +10,11 @@
|
||||
*/
|
||||
package vazkii.botania.api.subtile.signature;
|
||||
|
||||
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
@@ -38,16 +34,6 @@ public class BasicSignature extends SubTileSignature {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(TextureMap register) {
|
||||
BotaniaAPI.internalHandler.registerBasicSignatureIcons(name, register);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TextureAtlasSprite getIconForStack(ItemStack stack) {
|
||||
return BotaniaAPI.internalHandler.getSubTileIconForName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedNameForStack(ItemStack stack) {
|
||||
return unlocalizedName("");
|
||||
|
||||
@@ -24,16 +24,6 @@ public abstract class SubTileSignature {
|
||||
|
||||
public static final String SPECIAL_FLOWER_PREFIX = "flower.";
|
||||
|
||||
/**
|
||||
* Equivalent to Block.registerBlockIcons.
|
||||
*/
|
||||
public abstract void registerIcons(TextureMap map);
|
||||
// todo 1.8 evaluate need for these two
|
||||
/**
|
||||
* Gets the icon to display for the flower item.
|
||||
*/
|
||||
public abstract TextureAtlasSprite getIconForStack(ItemStack stack);
|
||||
|
||||
/**
|
||||
* Gets the display name for the flower item.
|
||||
*/
|
||||
|
||||
@@ -150,27 +150,27 @@ public class LightningHandler {
|
||||
int b = (color & 0xFF);
|
||||
int a = (int) (mainalpha * rendersegment.light * new Color(color).getAlpha());
|
||||
|
||||
tessellator.getWorldRenderer().pos(endvec.x - diff2.x, endvec.y - diff2.y, endvec.z - diff2.z).lightmap(0xF0, 0xF0).tex(0.5, 0).color(r, g, b, a).endVertex();
|
||||
tessellator.getWorldRenderer().pos(startvec.x - diff1.x, startvec.y - diff1.y, startvec.z - diff1.z).lightmap(0xF0, 0xF0).tex(0.5, 0).color(r, g, b, a).endVertex();
|
||||
tessellator.getWorldRenderer().pos(startvec.x + diff1.x, startvec.y + diff1.y, startvec.z + diff1.z).lightmap(0xF0, 0xF0).tex(0.5, 1).color(r, g, b, a).endVertex();
|
||||
tessellator.getWorldRenderer().pos(endvec.x + diff2.x, endvec.y + diff2.y, endvec.z + diff2.z).lightmap(0xF0, 0xF0).tex(0.5, 1).color(r, g, b, a).endVertex();
|
||||
tessellator.getWorldRenderer().pos(endvec.x - diff2.x, endvec.y - diff2.y, endvec.z - diff2.z).tex(0.5, 0).lightmap(0xF0, 0xF0).color(r, g, b, a).endVertex();
|
||||
tessellator.getWorldRenderer().pos(startvec.x - diff1.x, startvec.y - diff1.y, startvec.z - diff1.z).tex(0.5, 0).lightmap(0xF0, 0xF0).color(r, g, b, a).endVertex();
|
||||
tessellator.getWorldRenderer().pos(startvec.x + diff1.x, startvec.y + diff1.y, startvec.z + diff1.z).tex(0.5, 1).lightmap(0xF0, 0xF0).color(r, g, b, a).endVertex();
|
||||
tessellator.getWorldRenderer().pos(endvec.x + diff2.x, endvec.y + diff2.y, endvec.z + diff2.z).tex(0.5, 1).lightmap(0xF0, 0xF0).color(r, g, b, a).endVertex();
|
||||
|
||||
if(rendersegment.next == null) {
|
||||
Vector3 roundend = rendersegment.endpoint.point.copy().add(rendersegment.diff.copy().normalize().multiply(width));
|
||||
|
||||
tessellator.getWorldRenderer().pos(roundend.x - diff2.x, roundend.y - diff2.y, roundend.z - diff2.z).lightmap(0xF0, 0xF0).tex(0, 0).color(r, g, b, a).endVertex();
|
||||
tessellator.getWorldRenderer().pos(endvec.x - diff2.x, endvec.y - diff2.y, endvec.z - diff2.z).lightmap(0xF0, 0xF0).tex(0.5, 0).color(r, g, b, a).endVertex();
|
||||
tessellator.getWorldRenderer().pos(endvec.x + diff2.x, endvec.y + diff2.y, endvec.z + diff2.z).lightmap(0xF0, 0xF0).tex(0.5, 1).color(r, g, b, a).endVertex();
|
||||
tessellator.getWorldRenderer().pos(roundend.x + diff2.x, roundend.y + diff2.y, roundend.z + diff2.z).lightmap(0xF0, 0xF0).tex(0, 1).color(r, g, b, a).endVertex();
|
||||
tessellator.getWorldRenderer().pos(roundend.x - diff2.x, roundend.y - diff2.y, roundend.z - diff2.z).tex(0, 0).lightmap(0xF0, 0xF0).color(r, g, b, a).endVertex();
|
||||
tessellator.getWorldRenderer().pos(endvec.x - diff2.x, endvec.y - diff2.y, endvec.z - diff2.z).tex(0.5, 0).lightmap(0xF0, 0xF0).color(r, g, b, a).endVertex();
|
||||
tessellator.getWorldRenderer().pos(endvec.x + diff2.x, endvec.y + diff2.y, endvec.z + diff2.z).tex(0.5, 1).lightmap(0xF0, 0xF0).color(r, g, b, a).endVertex();
|
||||
tessellator.getWorldRenderer().pos(roundend.x + diff2.x, roundend.y + diff2.y, roundend.z + diff2.z).tex(0, 1).lightmap(0xF0, 0xF0).color(r, g, b, a).endVertex();
|
||||
}
|
||||
|
||||
if(rendersegment.prev == null) {
|
||||
Vector3 roundend = rendersegment.startpoint.point.copy().subtract(rendersegment.diff.copy().normalize().multiply(width));
|
||||
|
||||
tessellator.getWorldRenderer().pos(startvec.x - diff1.x, startvec.y - diff1.y, startvec.z - diff1.z).lightmap(0xF0, 0xF0).tex(0.5, 0).color(r, g, b, a).endVertex();
|
||||
tessellator.getWorldRenderer().pos(roundend.x - diff1.x, roundend.y - diff1.y, roundend.z - diff1.z).lightmap(0xF0, 0xF0).tex(0, 0).color(r, g, b, a).endVertex();
|
||||
tessellator.getWorldRenderer().pos(roundend.x + diff1.x, roundend.y + diff1.y, roundend.z + diff1.z).lightmap(0xF0, 0xF0).tex(0, 1).color(r, g, b, a).endVertex();
|
||||
tessellator.getWorldRenderer().pos(startvec.x + diff1.x, startvec.y + diff1.y, startvec.z + diff1.z).lightmap(0xF0, 0xF0).tex(0.5, 1).color(r, g, b, a).endVertex();
|
||||
tessellator.getWorldRenderer().pos(startvec.x - diff1.x, startvec.y - diff1.y, startvec.z - diff1.z).tex(0.5, 0).lightmap(0xF0, 0xF0).color(r, g, b, a).endVertex();
|
||||
tessellator.getWorldRenderer().pos(roundend.x - diff1.x, roundend.y - diff1.y, roundend.z - diff1.z).tex(0, 0).lightmap(0xF0, 0xF0).color(r, g, b, a).endVertex();
|
||||
tessellator.getWorldRenderer().pos(roundend.x + diff1.x, roundend.y + diff1.y, roundend.z + diff1.z).tex(0, 1).lightmap(0xF0, 0xF0).color(r, g, b, a).endVertex();
|
||||
tessellator.getWorldRenderer().pos(startvec.x + diff1.x, startvec.y + diff1.y, startvec.z + diff1.z).tex(0.5, 1).lightmap(0xF0, 0xF0).color(r, g, b, a).endVertex();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
/**
|
||||
* 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;
|
||||
import com.google.common.collect.Iterables;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockDoublePlant;
|
||||
import net.minecraft.block.BlockFlower;
|
||||
import net.minecraft.block.BlockRailPowered;
|
||||
import net.minecraft.block.BlockSlab;
|
||||
import net.minecraft.block.BlockWall;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
@@ -20,11 +26,13 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.ForgeHooksClient;
|
||||
import net.minecraftforge.client.model.ModelLoader;
|
||||
import net.minecraftforge.client.model.ModelLoaderRegistry;
|
||||
import net.minecraftforge.client.model.obj.OBJLoader;
|
||||
import net.minecraftforge.fml.common.registry.GameData;
|
||||
import vazkii.botania.api.render.SpecialFlowerModel;
|
||||
import vazkii.botania.api.BotaniaAPIClient;
|
||||
import vazkii.botania.client.render.SpecialFlowerModel;
|
||||
import vazkii.botania.api.state.BotaniaStateProps;
|
||||
import vazkii.botania.api.state.enums.AltGrassVariant;
|
||||
import vazkii.botania.api.state.enums.AltarVariant;
|
||||
@@ -38,9 +46,11 @@ import vazkii.botania.api.state.enums.FutureStoneVariant;
|
||||
import vazkii.botania.api.state.enums.LivingRockVariant;
|
||||
import vazkii.botania.api.state.enums.LivingWoodVariant;
|
||||
import vazkii.botania.api.state.enums.LuminizerVariant;
|
||||
import vazkii.botania.api.state.enums.PoolVariant;
|
||||
import vazkii.botania.api.state.enums.PrismarineVariant;
|
||||
import vazkii.botania.api.state.enums.PylonVariant;
|
||||
import vazkii.botania.api.state.enums.StorageVariant;
|
||||
import vazkii.botania.client.core.proxy.ClientProxy;
|
||||
import vazkii.botania.client.model.FloatingFlowerModel;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.block.ModFluffBlocks;
|
||||
@@ -87,6 +97,8 @@ import vazkii.botania.common.block.subtile.generating.SubTileNightshade;
|
||||
import vazkii.botania.common.block.subtile.generating.SubTileRafflowsia;
|
||||
import vazkii.botania.common.block.subtile.generating.SubTileSpectrolus;
|
||||
import vazkii.botania.common.block.subtile.generating.SubTileThermalily;
|
||||
import vazkii.botania.common.block.tile.corporea.TileCorporeaCrystalCube;
|
||||
import vazkii.botania.common.block.tile.corporea.TileCorporeaIndex;
|
||||
import vazkii.botania.common.item.ItemManaGun;
|
||||
import vazkii.botania.common.item.ItemSpawnerMover;
|
||||
import vazkii.botania.common.item.brew.ItemBrewBase;
|
||||
@@ -100,7 +112,6 @@ import vazkii.botania.common.lib.LibMisc;
|
||||
|
||||
import static vazkii.botania.common.item.ModItems.*;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
@@ -135,6 +146,7 @@ public final class ModelHandler {
|
||||
|
||||
/** Normal Items **/
|
||||
registerStandardItems();
|
||||
registerTESRItems();
|
||||
registerManaResources();
|
||||
registerRunes();
|
||||
registerBows();
|
||||
@@ -236,64 +248,112 @@ public final class ModelHandler {
|
||||
: new ModelResourceLocation("botania:magnetRingGreaterOff", "inventory");
|
||||
}
|
||||
});
|
||||
|
||||
ModelLoader.registerItemVariants(manaweaveBoots,
|
||||
new ModelResourceLocation("botania:manaweaveBoots", "inventory"),
|
||||
new ModelResourceLocation("botania:manaweaveBootsHoliday", "inventory"));
|
||||
|
||||
ModelLoader.setCustomMeshDefinition(manaweaveBoots, new ItemMeshDefinition() {
|
||||
@Override
|
||||
public ModelResourceLocation getModelLocation(ItemStack stack) {
|
||||
return ClientProxy.jingleTheBells ? new ModelResourceLocation("botania:manaweaveBootsHoliday", "inventory")
|
||||
: new ModelResourceLocation("botania:manaweaveBoots", "inventory");
|
||||
}
|
||||
});
|
||||
|
||||
ModelLoader.registerItemVariants(manaweaveChest,
|
||||
new ModelResourceLocation("botania:manaweaveChest", "inventory"),
|
||||
new ModelResourceLocation("botania:manaweaveChestHoliday", "inventory"));
|
||||
|
||||
ModelLoader.setCustomMeshDefinition(manaweaveChest, new ItemMeshDefinition() {
|
||||
@Override
|
||||
public ModelResourceLocation getModelLocation(ItemStack stack) {
|
||||
return ClientProxy.jingleTheBells ? new ModelResourceLocation("botania:manaweaveChestHoliday", "inventory")
|
||||
: new ModelResourceLocation("botania:manaweaveChest", "inventory");
|
||||
}
|
||||
});
|
||||
|
||||
ModelLoader.registerItemVariants(manaweaveHelm,
|
||||
new ModelResourceLocation("botania:manaweaveHelm", "inventory"),
|
||||
new ModelResourceLocation("botania:manaweaveHelmHoliday", "inventory"));
|
||||
|
||||
ModelLoader.setCustomMeshDefinition(manaweaveHelm, new ItemMeshDefinition() {
|
||||
@Override
|
||||
public ModelResourceLocation getModelLocation(ItemStack stack) {
|
||||
return ClientProxy.jingleTheBells ? new ModelResourceLocation("botania:manaweaveHelmHoliday", "inventory")
|
||||
: new ModelResourceLocation("botania:manaweaveHelm", "inventory");
|
||||
}
|
||||
});
|
||||
|
||||
ModelLoader.registerItemVariants(manaweaveLegs,
|
||||
new ModelResourceLocation("botania:manaweaveLegs", "inventory"),
|
||||
new ModelResourceLocation("botania:manaweaveLegsHoliday", "inventory"));
|
||||
|
||||
ModelLoader.setCustomMeshDefinition(manaweaveLegs, new ItemMeshDefinition() {
|
||||
@Override
|
||||
public ModelResourceLocation getModelLocation(ItemStack stack) {
|
||||
return ClientProxy.jingleTheBells ? new ModelResourceLocation("botania:manaweaveLegsHoliday", "inventory")
|
||||
: new ModelResourceLocation("botania:manaweaveLegs", "inventory");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private static void registerSubtiles() {
|
||||
SpecialFlowerModel.register(SubTileManastar.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_MANASTAR));
|
||||
SpecialFlowerModel.register(SubTilePureDaisy.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_PUREDAISY));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileManastar.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_MANASTAR));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTilePureDaisy.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_PUREDAISY));
|
||||
|
||||
SpecialFlowerModel.register(SubTileDaybloom.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_DAYBLOOM));
|
||||
SpecialFlowerModel.register(SubTileDecor.Daybloom.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_DAYBLOOM + "Decor"));
|
||||
SpecialFlowerModel.register(SubTileDaybloom.Prime.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_DAYBLOOM_PRIME));
|
||||
SpecialFlowerModel.register(SubTileEndoflame.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_ENDOFLAME));
|
||||
SpecialFlowerModel.register(SubTileHydroangeas.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_HYDROANGEAS));
|
||||
SpecialFlowerModel.register(SubTileDecor.Hydroangeas.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_HYDROANGEAS + "Decor"));
|
||||
SpecialFlowerModel.register(SubTileThermalily.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_THERMALILY));
|
||||
SpecialFlowerModel.register(SubTileNightshade.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_NIGHTSHADE));
|
||||
SpecialFlowerModel.register(SubTileDecor.Nightshade.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_NIGHTSHADE + "Decor"));
|
||||
SpecialFlowerModel.register(SubTileNightshade.Prime.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_NIGHTSHADE_PRIME));
|
||||
SpecialFlowerModel.register(SubTileArcaneRose.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_ARCANE_ROSE));
|
||||
SpecialFlowerModel.register(SubTileMunchdew.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_MUNCHDEW));
|
||||
SpecialFlowerModel.register(SubTileEntropinnyum.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_ENTROPINNYUM));
|
||||
SpecialFlowerModel.register(SubTileKekimurus.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_KEKIMURUS));
|
||||
SpecialFlowerModel.register(SubTileGourmaryllis.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_GOURMARYLLIS));
|
||||
SpecialFlowerModel.register(SubTileNarslimmus.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_NARSLIMMUS));
|
||||
SpecialFlowerModel.register(SubTileSpectrolus.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_SPECTROLUS));
|
||||
SpecialFlowerModel.register(SubTileDandelifeon.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_DANDELIFEON));
|
||||
SpecialFlowerModel.register(SubTileRafflowsia.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_RAFFLOWSIA));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileDaybloom.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_DAYBLOOM));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileDecor.Daybloom.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_DAYBLOOM + "Decor"));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileDaybloom.Prime.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_DAYBLOOM_PRIME));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileEndoflame.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_ENDOFLAME));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileHydroangeas.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_HYDROANGEAS));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileDecor.Hydroangeas.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_HYDROANGEAS + "Decor"));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileThermalily.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_THERMALILY));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileNightshade.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_NIGHTSHADE));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileDecor.Nightshade.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_NIGHTSHADE + "Decor"));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileNightshade.Prime.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_NIGHTSHADE_PRIME));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileArcaneRose.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_ARCANE_ROSE));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileMunchdew.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_MUNCHDEW));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileEntropinnyum.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_ENTROPINNYUM));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileKekimurus.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_KEKIMURUS));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileGourmaryllis.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_GOURMARYLLIS));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileNarslimmus.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_NARSLIMMUS));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileSpectrolus.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_SPECTROLUS));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileDandelifeon.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_DANDELIFEON));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileRafflowsia.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_RAFFLOWSIA));
|
||||
|
||||
SpecialFlowerModel.register(SubTileBellethorn.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_BELLETHORN));
|
||||
SpecialFlowerModel.register(SubTileBellethorn.Mini.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_BELLETHORN + "Chibi"));
|
||||
SpecialFlowerModel.register(SubTileDreadthorn.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_DREADTHORN));
|
||||
SpecialFlowerModel.register(SubTileHeiseiDream.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_HEISEI_DREAM));
|
||||
SpecialFlowerModel.register(SubTileTigerseye.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_TIGERSEYE));
|
||||
SpecialFlowerModel.register(SubTileJadedAmaranthus.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_JADED_AMARANTHUS));
|
||||
SpecialFlowerModel.register(SubTileOrechid.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_ORECHID));
|
||||
SpecialFlowerModel.register(SubTileOrechidIgnem.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_ORECHID_IGNEM));
|
||||
SpecialFlowerModel.register(SubTileFallenKanade.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_FALLEN_KANADE));
|
||||
SpecialFlowerModel.register(SubTileExoflame.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_EXOFLAME));
|
||||
SpecialFlowerModel.register(SubTileAgricarnation.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_AGRICARNATION));
|
||||
SpecialFlowerModel.register(SubTileAgricarnation.Mini.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_AGRICARNATION + "Chibi"));
|
||||
SpecialFlowerModel.register(SubTileHopperhock.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_HOPPERHOCK));
|
||||
SpecialFlowerModel.register(SubTileHopperhock.Mini.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_HOPPERHOCK + "Chibi"));
|
||||
SpecialFlowerModel.register(SubTileTangleberrie.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_TANGLEBERRIE));
|
||||
SpecialFlowerModel.register(SubTileJiyuulia.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_JIYUULIA));
|
||||
SpecialFlowerModel.register(SubTileRannuncarpus.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_RANNUNCARPUS));
|
||||
SpecialFlowerModel.register(SubTileRannuncarpus.Mini.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_RANNUNCARPUS + "Chibi"));
|
||||
SpecialFlowerModel.register(SubTileHyacidus.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_HYACIDUS));
|
||||
SpecialFlowerModel.register(SubTilePollidisiac.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_POLLIDISIAC));
|
||||
SpecialFlowerModel.register(SubTileClayconia.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_CLAYCONIA));
|
||||
SpecialFlowerModel.register(SubTileLoonuim.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_LOONIUM));
|
||||
SpecialFlowerModel.register(SubTileDaffomill.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_DAFFOMILL));
|
||||
SpecialFlowerModel.register(SubTileVinculotus.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_VINCULOTUS));
|
||||
SpecialFlowerModel.register(SubTileSpectranthemum.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_SPECTRANTHEMUM));
|
||||
SpecialFlowerModel.register(SubTileMedumone.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_MEDUMONE));
|
||||
SpecialFlowerModel.register(SubTileMarimorphosis.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_MARIMORPHOSIS));
|
||||
SpecialFlowerModel.register(SubTileMarimorphosis.Mini.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_MARIMORPHOSIS + "Chibi"));
|
||||
SpecialFlowerModel.register(SubTileBubbell.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_BUBBELL));
|
||||
SpecialFlowerModel.register(SubTileBubbell.Mini.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_BUBBELL + "Chibi"));
|
||||
SpecialFlowerModel.register(SubTileSolegnolia.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_SOLEGNOLIA));
|
||||
SpecialFlowerModel.register(SubTileSolegnolia.Mini.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_SOLEGNOLIA + "Chibi"));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileBellethorn.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_BELLETHORN));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileBellethorn.Mini.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_BELLETHORN + "Chibi"));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileDreadthorn.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_DREADTHORN));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileHeiseiDream.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_HEISEI_DREAM));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileTigerseye.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_TIGERSEYE));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileJadedAmaranthus.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_JADED_AMARANTHUS));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileOrechid.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_ORECHID));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileOrechidIgnem.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_ORECHID_IGNEM));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileFallenKanade.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_FALLEN_KANADE));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileExoflame.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_EXOFLAME));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileAgricarnation.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_AGRICARNATION));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileAgricarnation.Mini.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_AGRICARNATION + "Chibi"));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileHopperhock.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_HOPPERHOCK));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileHopperhock.Mini.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_HOPPERHOCK + "Chibi"));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileTangleberrie.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_TANGLEBERRIE));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileJiyuulia.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_JIYUULIA));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileRannuncarpus.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_RANNUNCARPUS));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileRannuncarpus.Mini.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_RANNUNCARPUS + "Chibi"));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileHyacidus.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_HYACIDUS));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTilePollidisiac.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_POLLIDISIAC));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileClayconia.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_CLAYCONIA));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileLoonuim.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_LOONIUM));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileDaffomill.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_DAFFOMILL));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileVinculotus.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_VINCULOTUS));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileSpectranthemum.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_SPECTRANTHEMUM));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileMedumone.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_MEDUMONE));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileMarimorphosis.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_MARIMORPHOSIS));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileMarimorphosis.Mini.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_MARIMORPHOSIS + "Chibi"));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileBubbell.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_BUBBELL));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileBubbell.Mini.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_BUBBELL + "Chibi"));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileSolegnolia.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_SOLEGNOLIA));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileSolegnolia.Mini.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_SOLEGNOLIA + "Chibi"));
|
||||
}
|
||||
|
||||
private static void registerStandardBlocks() {
|
||||
@@ -344,6 +404,7 @@ public final class ModelHandler {
|
||||
registerItemModel(ModBlocks.alfPortal);
|
||||
registerItemModel(ModBlocks.root);
|
||||
registerItemModel(ModBlocks.cacophonium);
|
||||
registerItemModel(ModBlocks.tinyPotato);
|
||||
|
||||
registerItemModelAllMeta(Item.getItemFromBlock(ModBlocks.floatingFlower), EnumDyeColor.values().length);
|
||||
|
||||
@@ -368,6 +429,7 @@ public final class ModelHandler {
|
||||
registerVariantsDefaulted(ModBlocks.openCrate, CrateVariant.class, "variant");
|
||||
registerVariantsDefaulted(ModBlocks.customBrick, CustomBrickVariant.class, "variant");
|
||||
registerVariantsDefaulted(ModBlocks.prismarine, PrismarineVariant.class, "variant");
|
||||
registerVariantsDefaulted(ModBlocks.pool, PoolVariant.class, "variant");
|
||||
}
|
||||
|
||||
private static void registerStandardItems() {
|
||||
@@ -378,6 +440,7 @@ public final class ModelHandler {
|
||||
registerItemModel(manaCookie);
|
||||
|
||||
registerItemModel(manasteelHelm);
|
||||
registerItemModel(manasteelHelmRevealing);
|
||||
registerItemModel(manasteelChest);
|
||||
registerItemModel(manasteelLegs);
|
||||
registerItemModel(manasteelBoots);
|
||||
@@ -388,6 +451,7 @@ public final class ModelHandler {
|
||||
registerItemModel(manasteelShears);
|
||||
|
||||
registerItemModel(elementiumHelm);
|
||||
registerItemModel(elementiumHelmRevealing);
|
||||
registerItemModel(elementiumChest);
|
||||
registerItemModel(elementiumLegs);
|
||||
registerItemModel(elementiumBoots);
|
||||
@@ -398,11 +462,6 @@ public final class ModelHandler {
|
||||
registerItemModel(elementiumShears);
|
||||
registerItemModel(elementiumSword);
|
||||
|
||||
registerItemModel(manaweaveHelm);
|
||||
registerItemModel(manaweaveChest);
|
||||
registerItemModel(manaweaveLegs);
|
||||
registerItemModel(manaweaveBoots);
|
||||
|
||||
registerItemModel(terrasteelHelm);
|
||||
registerItemModel(terrasteelHelmRevealing);
|
||||
registerItemModel(terrasteelChest);
|
||||
@@ -519,6 +578,14 @@ public final class ModelHandler {
|
||||
registerItemModelMetas(grassHorn, LibItemNames.GRASS_HORN, 3);
|
||||
}
|
||||
|
||||
// Only for models that absolutely can't be converted to JSON. Use VERY sparingly
|
||||
private static void registerTESRItems() {
|
||||
registerItemModel(ModBlocks.corporeaCrystalCube);
|
||||
registerItemModel(ModBlocks.corporeaIndex);
|
||||
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(ModBlocks.corporeaCrystalCube), 0, TileCorporeaCrystalCube.class);
|
||||
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(ModBlocks.corporeaIndex), 0, TileCorporeaIndex.class);
|
||||
}
|
||||
|
||||
private static void registerManaResources() {
|
||||
Item item = manaResource;
|
||||
for (int i = 0; i < LibItemNames.MANA_RESOURCE_NAMES.length; i++) {
|
||||
@@ -961,4 +1028,5 @@ public final class ModelHandler {
|
||||
}
|
||||
|
||||
private ModelHandler() {}
|
||||
|
||||
}
|
||||
@@ -34,16 +34,12 @@ import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldSettings.GameType;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
import net.minecraftforge.client.model.ModelLoaderRegistry;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import vazkii.botania.api.item.IExtendedPlayerController;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.api.lexicon.multiblock.IMultiblockRenderHook;
|
||||
import vazkii.botania.api.lexicon.multiblock.Multiblock;
|
||||
import vazkii.botania.api.lexicon.multiblock.MultiblockSet;
|
||||
import vazkii.botania.api.lexicon.multiblock.component.AnyComponent;
|
||||
import vazkii.botania.api.render.SpecialFlowerModel;
|
||||
import vazkii.botania.api.wiki.IWikiProvider;
|
||||
import vazkii.botania.api.wiki.WikiHooks;
|
||||
import vazkii.botania.client.challenge.ModChallenges;
|
||||
@@ -106,8 +102,6 @@ import vazkii.botania.client.render.tile.RenderTileTerraPlate;
|
||||
import vazkii.botania.client.render.tile.RenderTileTeruTeruBozu;
|
||||
import vazkii.botania.client.render.tile.RenderTileTinyPotato;
|
||||
import vazkii.botania.client.render.world.SkyblockRenderEvents;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.block.tile.TileAlfPortal;
|
||||
import vazkii.botania.common.block.tile.TileAltar;
|
||||
import vazkii.botania.common.block.tile.TileAvatar;
|
||||
@@ -116,7 +110,6 @@ import vazkii.botania.common.block.tile.TileCocoon;
|
||||
import vazkii.botania.common.block.tile.TileEnchanter;
|
||||
import vazkii.botania.common.block.tile.TileFloatingFlower;
|
||||
import vazkii.botania.common.block.tile.TileFloatingSpecialFlower;
|
||||
import vazkii.botania.common.block.tile.TileGaiaHead;
|
||||
import vazkii.botania.common.block.tile.TileHourglass;
|
||||
import vazkii.botania.common.block.tile.TileIncensePlate;
|
||||
import vazkii.botania.common.block.tile.TileLightRelay;
|
||||
@@ -160,7 +153,6 @@ import vazkii.botania.common.lexicon.LexiconData;
|
||||
import vazkii.botania.common.lib.LibObfuscation;
|
||||
import net.minecraftforge.fml.client.registry.ClientRegistry;
|
||||
import net.minecraftforge.fml.client.registry.RenderingRegistry;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
import net.minecraftforge.fml.common.FMLLog;
|
||||
import net.minecraftforge.fml.common.Optional;
|
||||
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
||||
@@ -474,7 +466,7 @@ public class ClientProxy extends CommonProxy {
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean noclipEnabled = true;
|
||||
private static boolean noclipEnabled = false;
|
||||
private static boolean corruptSparkle = false;
|
||||
|
||||
@Override
|
||||
|
||||
@@ -93,7 +93,7 @@ public class FXWisp extends EntityFX {
|
||||
|
||||
if(!queuedDepthIgnoringRenders.isEmpty()) {
|
||||
GlStateManager.disableDepth();
|
||||
tessellator.getWorldRenderer().begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_LMAP_COLOR);
|
||||
tessellator.getWorldRenderer().begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR);
|
||||
for(FXWisp wisp : queuedDepthIgnoringRenders)
|
||||
wisp.renderQueued(tessellator, false);
|
||||
tessellator.draw();
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
/**
|
||||
* 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.integration.jei;
|
||||
|
||||
import mezz.jei.api.IItemRegistry;
|
||||
import mezz.jei.api.IJeiHelpers;
|
||||
import mezz.jei.api.IModPlugin;
|
||||
import mezz.jei.api.IModRegistry;
|
||||
import mezz.jei.api.IRecipeRegistry;
|
||||
import mezz.jei.api.JEIPlugin;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.client.integration.jei.brewery.BreweryRecipeCategory;
|
||||
import vazkii.botania.client.integration.jei.brewery.BreweryRecipeHandler;
|
||||
import vazkii.botania.client.integration.jei.elventrade.ElvenTradeRecipeCategory;
|
||||
import vazkii.botania.client.integration.jei.elventrade.ElvenTradeRecipeHandler;
|
||||
import vazkii.botania.client.integration.jei.manapool.ManaPoolRecipeCategory;
|
||||
import vazkii.botania.client.integration.jei.manapool.ManaPoolRecipeHandler;
|
||||
import vazkii.botania.client.integration.jei.petalapothecary.PetalApothecaryRecipeCategory;
|
||||
import vazkii.botania.client.integration.jei.petalapothecary.PetalApothecaryRecipeHandler;
|
||||
import vazkii.botania.client.integration.jei.puredaisy.PureDaisyRecipeCategory;
|
||||
import vazkii.botania.client.integration.jei.puredaisy.PureDaisyRecipeHandler;
|
||||
import vazkii.botania.client.integration.jei.runicaltar.RunicAltarRecipeCategory;
|
||||
import vazkii.botania.client.integration.jei.runicaltar.RunicAltarRecipeHandler;
|
||||
|
||||
@JEIPlugin
|
||||
public class JEIBotaniaPlugin implements IModPlugin {
|
||||
|
||||
private IJeiHelpers jeiHelpers;
|
||||
|
||||
@Override
|
||||
public boolean isModLoaded() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onJeiHelpersAvailable(IJeiHelpers jeiHelpers) {
|
||||
this.jeiHelpers = jeiHelpers;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemRegistryAvailable(IItemRegistry itemRegistry) {}
|
||||
|
||||
@Override
|
||||
public void register(IModRegistry registry) {
|
||||
registry.addRecipeCategories(
|
||||
new BreweryRecipeCategory(jeiHelpers.getGuiHelper()),
|
||||
new PureDaisyRecipeCategory(jeiHelpers.getGuiHelper()),
|
||||
new PetalApothecaryRecipeCategory(jeiHelpers.getGuiHelper()),
|
||||
new ElvenTradeRecipeCategory(jeiHelpers.getGuiHelper()),
|
||||
new RunicAltarRecipeCategory(jeiHelpers.getGuiHelper()),
|
||||
new ManaPoolRecipeCategory(jeiHelpers.getGuiHelper())
|
||||
);
|
||||
|
||||
registry.addRecipeHandlers(
|
||||
new BreweryRecipeHandler(),
|
||||
new PureDaisyRecipeHandler(),
|
||||
new PetalApothecaryRecipeHandler(),
|
||||
new ElvenTradeRecipeHandler(),
|
||||
new RunicAltarRecipeHandler(),
|
||||
new ManaPoolRecipeHandler()
|
||||
);
|
||||
|
||||
registry.addRecipes(BotaniaAPI.brewRecipes);
|
||||
registry.addRecipes(BotaniaAPI.pureDaisyRecipes);
|
||||
registry.addRecipes(BotaniaAPI.petalRecipes);
|
||||
registry.addRecipes(BotaniaAPI.elvenTradeRecipes);
|
||||
registry.addRecipes(BotaniaAPI.runeAltarRecipes);
|
||||
registry.addRecipes(BotaniaAPI.manaInfusionRecipes);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRecipeRegistryAvailable(IRecipeRegistry recipeRegistry) {}
|
||||
|
||||
}
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
/**
|
||||
* 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.integration.jei.brewery;
|
||||
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IDrawable;
|
||||
import mezz.jei.api.gui.IDrawableStatic;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.recipe.IRecipeCategory;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
public class BreweryRecipeCategory implements IRecipeCategory {
|
||||
|
||||
private final IDrawableStatic background;
|
||||
private final String localizedName;
|
||||
|
||||
public BreweryRecipeCategory(IGuiHelper guiHelper) {
|
||||
ResourceLocation location = new ResourceLocation("botania", "textures/gui/neiBrewery.png");
|
||||
background = guiHelper.createDrawable(location, 0, 0, 166, 65, 0, 0, 0, 0);
|
||||
localizedName = StatCollector.translateToLocal("botania.nei.brewery");
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getUid() {
|
||||
return "botania.brewery";
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return localizedName;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IDrawable getBackground() {
|
||||
return background;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawExtras(Minecraft minecraft) {}
|
||||
|
||||
@Override
|
||||
public void drawAnimations(Minecraft minecraft) {}
|
||||
|
||||
@Override
|
||||
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper) {
|
||||
if (!(recipeWrapper instanceof BreweryRecipeWrapper))
|
||||
return;
|
||||
BreweryRecipeWrapper wrapper = ((BreweryRecipeWrapper) recipeWrapper);
|
||||
|
||||
List inputs = wrapper.getInputs();
|
||||
|
||||
recipeLayout.getItemStacks().init(0, true, 39, 41);
|
||||
if (inputs.get(0) instanceof ItemStack) {
|
||||
recipeLayout.getItemStacks().set(0, ((ItemStack) inputs.get(0)));
|
||||
} else {
|
||||
recipeLayout.getItemStacks().set(0, ((Collection<ItemStack>) inputs.get(0)));
|
||||
}
|
||||
|
||||
int index = 1, posX = 60;
|
||||
for (Object o : wrapper.getInputs()) {
|
||||
recipeLayout.getItemStacks().init(index, true, posX, 6);
|
||||
if (o instanceof ItemStack) {
|
||||
recipeLayout.getItemStacks().set(index, ((ItemStack) o));
|
||||
} else if (o instanceof Collection) {
|
||||
recipeLayout.getItemStacks().set(index, ((Collection<ItemStack>) o));
|
||||
}
|
||||
index++;
|
||||
posX += 18;
|
||||
}
|
||||
|
||||
recipeLayout.getItemStacks().init(7, false, 87, 41);
|
||||
recipeLayout.getItemStacks().set(7, wrapper.getOutputs().get(0));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* 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.integration.jei.brewery;
|
||||
|
||||
import mezz.jei.api.recipe.IRecipeHandler;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import vazkii.botania.api.recipe.RecipeBrew;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class BreweryRecipeHandler implements IRecipeHandler<RecipeBrew> {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public Class<RecipeBrew> getRecipeClass() {
|
||||
return RecipeBrew.class;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid() {
|
||||
return "botania.brewery";
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull RecipeBrew recipe) {
|
||||
return new BreweryRecipeWrapper(recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRecipeValid(@Nonnull RecipeBrew recipe) {
|
||||
return recipe.getInputs().size() <= 6;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
/**
|
||||
* 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.integration.jei.brewery;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import vazkii.botania.api.recipe.RecipeBrew;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.List;
|
||||
|
||||
public class BreweryRecipeWrapper implements IRecipeWrapper {
|
||||
|
||||
private final List input;
|
||||
private final ItemStack output;
|
||||
|
||||
public BreweryRecipeWrapper(RecipeBrew recipeBrew) {
|
||||
ImmutableList.Builder builder = ImmutableList.builder();
|
||||
builder.add(new ItemStack(ModItems.vial));
|
||||
for (Object o : recipeBrew.getInputs()) {
|
||||
if (o instanceof ItemStack) {
|
||||
builder.add(o);
|
||||
}
|
||||
if (o instanceof String) {
|
||||
builder.add(OreDictionary.getOres(((String) o)));
|
||||
}
|
||||
}
|
||||
|
||||
input = builder.build();
|
||||
output = recipeBrew.getOutput(new ItemStack(ModItems.vial)).copy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List getInputs() {
|
||||
return input;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getOutputs() {
|
||||
return ImmutableList.of(output);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidStack> getFluidInputs() { return ImmutableList.of(); }
|
||||
|
||||
@Override
|
||||
public List<FluidStack> getFluidOutputs() { return ImmutableList.of(); }
|
||||
|
||||
@Override
|
||||
public void drawInfo(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight) {}
|
||||
|
||||
@Override
|
||||
public void drawAnimations(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight) {}
|
||||
|
||||
}
|
||||
+111
@@ -0,0 +1,111 @@
|
||||
/**
|
||||
* 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.integration.jei.elventrade;
|
||||
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IDrawable;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.recipe.IRecipeCategory;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import vazkii.botania.client.core.handler.RenderEventHandler;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.Collection;
|
||||
|
||||
public class ElvenTradeRecipeCategory implements IRecipeCategory {
|
||||
|
||||
private final String localizedName;
|
||||
private final IDrawable background;
|
||||
private final IDrawable overlay;
|
||||
|
||||
public ElvenTradeRecipeCategory(IGuiHelper guiHelper) {
|
||||
localizedName = StatCollector.translateToLocal("botania.nei.elvenTrade");
|
||||
background = guiHelper.createBlankDrawable(145, 95);
|
||||
overlay = guiHelper.createDrawable(new ResourceLocation("botania", "textures/gui/elvenTradeOverlay.png"), 0, 15, 140, 90);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getUid() {
|
||||
return "botania.elvenTrade";
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return localizedName;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IDrawable getBackground() {
|
||||
return background;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawExtras(Minecraft minecraft) {
|
||||
GlStateManager.enableAlpha();
|
||||
GlStateManager.enableBlend();
|
||||
overlay.draw(minecraft, 0, 4);
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.disableAlpha();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawAnimations(Minecraft minecraft) {
|
||||
minecraft.renderEngine.bindTexture(TextureMap.locationBlocksTexture);
|
||||
TextureAtlasSprite sprite = RenderEventHandler.INSTANCE.alfPortalTex;
|
||||
Tessellator tess = Tessellator.getInstance();
|
||||
WorldRenderer wr = tess.getWorldRenderer();
|
||||
wr.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX);
|
||||
int startX = 22;
|
||||
int startY = 25;
|
||||
int stopX = 70;
|
||||
int stopY = 73;
|
||||
wr.pos(startX, startY, 0).tex(sprite.getMinU(), sprite.getMinV()).endVertex();
|
||||
wr.pos(startX, stopY, 0).tex(sprite.getMinU(), sprite.getMaxV()).endVertex();
|
||||
wr.pos(stopX, stopY, 0).tex(sprite.getMaxU(), sprite.getMaxV()).endVertex();
|
||||
wr.pos(stopX, startY, 0).tex(sprite.getMaxU(), sprite.getMinV()).endVertex();
|
||||
tess.draw();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper) {
|
||||
if (!(recipeWrapper instanceof ElvenTradeRecipeWrapper))
|
||||
return;
|
||||
ElvenTradeRecipeWrapper wrapper = ((ElvenTradeRecipeWrapper) recipeWrapper);
|
||||
|
||||
int index = 0, posX = 42;
|
||||
for (Object o : wrapper.getInputs()) {
|
||||
recipeLayout.getItemStacks().init(index, true, posX, 0);
|
||||
if (o instanceof Collection) {
|
||||
recipeLayout.getItemStacks().set(index, ((Collection<ItemStack>) o));
|
||||
} else {
|
||||
recipeLayout.getItemStacks().set(index, ((ItemStack) o));
|
||||
}
|
||||
index++;
|
||||
posX += 18;
|
||||
}
|
||||
|
||||
recipeLayout.getItemStacks().init(index, false, 93, 41);
|
||||
recipeLayout.getItemStacks().set(index, wrapper.getOutputs().get(0));
|
||||
}
|
||||
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* 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.integration.jei.elventrade;
|
||||
|
||||
import mezz.jei.api.recipe.IRecipeHandler;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import vazkii.botania.api.recipe.RecipeElvenTrade;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class ElvenTradeRecipeHandler implements IRecipeHandler<RecipeElvenTrade> {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public Class<RecipeElvenTrade> getRecipeClass() {
|
||||
return RecipeElvenTrade.class;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid() {
|
||||
return "botania.elvenTrade";
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull RecipeElvenTrade recipe) {
|
||||
return new ElvenTradeRecipeWrapper(recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRecipeValid(@Nonnull RecipeElvenTrade recipe) {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
/**
|
||||
* 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.integration.jei.elventrade;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import vazkii.botania.api.recipe.RecipeElvenTrade;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.List;
|
||||
|
||||
public class ElvenTradeRecipeWrapper implements IRecipeWrapper {
|
||||
|
||||
private final List input;
|
||||
private final ItemStack output;
|
||||
|
||||
public ElvenTradeRecipeWrapper(RecipeElvenTrade recipe) {
|
||||
ImmutableList.Builder builder = ImmutableList.builder();
|
||||
for (Object o : recipe.getInputs()) {
|
||||
if (o instanceof ItemStack) {
|
||||
builder.add(o);
|
||||
}
|
||||
if (o instanceof String) {
|
||||
builder.add(OreDictionary.getOres(((String) o)));
|
||||
}
|
||||
}
|
||||
input = builder.build();
|
||||
output = recipe.getOutput();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List getInputs() {
|
||||
return input;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getOutputs() {
|
||||
return ImmutableList.of(output);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidStack> getFluidInputs() {
|
||||
return ImmutableList.of();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidStack> getFluidOutputs() {
|
||||
return ImmutableList.of();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawInfo(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight) {}
|
||||
|
||||
@Override
|
||||
public void drawAnimations(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight) {}
|
||||
|
||||
}
|
||||
+105
@@ -0,0 +1,105 @@
|
||||
/**
|
||||
* 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.integration.jei.manapool;
|
||||
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IDrawable;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.recipe.IRecipeCategory;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.Collection;
|
||||
|
||||
public class ManaPoolRecipeCategory implements IRecipeCategory {
|
||||
|
||||
private final IDrawable background;
|
||||
private final String localizedName;
|
||||
private final IDrawable overlay;
|
||||
|
||||
public ManaPoolRecipeCategory(IGuiHelper guiHelper) {
|
||||
background = guiHelper.createBlankDrawable(168, 64);
|
||||
localizedName = StatCollector.translateToLocal("botania.nei.manaPool");
|
||||
overlay = guiHelper.createDrawable(new ResourceLocation("botania", "textures/gui/pureDaisyOverlay.png"),
|
||||
0, 0, 64, 46);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getUid() {
|
||||
return "botania.manaPool";
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return localizedName;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IDrawable getBackground() {
|
||||
return background;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawExtras(Minecraft minecraft) {
|
||||
GlStateManager.enableAlpha();
|
||||
GlStateManager.enableBlend();
|
||||
overlay.draw(minecraft, 48, 0);
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.disableAlpha();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawAnimations(Minecraft minecraft) {}
|
||||
|
||||
@Override
|
||||
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper) {
|
||||
if (!(recipeWrapper instanceof ManaPoolRecipeWrapper))
|
||||
return;
|
||||
|
||||
ManaPoolRecipeWrapper wrapper = ((ManaPoolRecipeWrapper) recipeWrapper);
|
||||
int index = 0;
|
||||
|
||||
recipeLayout.getItemStacks().init(index, true, 40, 12);
|
||||
if (wrapper.getInputs().get(0) instanceof Collection) {
|
||||
recipeLayout.getItemStacks().set(index, ((Collection<ItemStack>) wrapper.getInputs().get(0)));
|
||||
} else {
|
||||
recipeLayout.getItemStacks().set(index, ((ItemStack) wrapper.getInputs().get(0)));
|
||||
}
|
||||
|
||||
index++;
|
||||
|
||||
if (wrapper.getInputs().size() > 1) {
|
||||
// Has catalyst
|
||||
recipeLayout.getItemStacks().init(index, true, 20, 12);
|
||||
recipeLayout.getItemStacks().set(index, ((ItemStack) wrapper.getInputs().get(1)));
|
||||
index++;
|
||||
}
|
||||
|
||||
recipeLayout.getItemStacks().init(index, true, 70, 12);
|
||||
recipeLayout.getItemStacks().set(index, new ItemStack(ModBlocks.pool, 1, 0));
|
||||
index++;
|
||||
|
||||
recipeLayout.getItemStacks().init(index, false, 99, 12);
|
||||
if (wrapper.getOutputs().get(0) instanceof Collection) {
|
||||
recipeLayout.getItemStacks().set(index, ((Collection<ItemStack>) wrapper.getOutputs().get(0)));
|
||||
} else {
|
||||
recipeLayout.getItemStacks().set(index, ((ItemStack) wrapper.getOutputs().get(0)));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* 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.integration.jei.manapool;
|
||||
|
||||
import mezz.jei.api.recipe.IRecipeHandler;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import vazkii.botania.api.recipe.RecipeManaInfusion;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class ManaPoolRecipeHandler implements IRecipeHandler<RecipeManaInfusion> {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public Class<RecipeManaInfusion> getRecipeClass() {
|
||||
return RecipeManaInfusion.class;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid() {
|
||||
return "botania.manaPool";
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull RecipeManaInfusion recipe) {
|
||||
return new ManaPoolRecipeWrapper(recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRecipeValid(@Nonnull RecipeManaInfusion recipe) {
|
||||
return recipe.getManaToConsume() <= 100000;
|
||||
}
|
||||
|
||||
}
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
/**
|
||||
* 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.integration.jei.manapool;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import vazkii.botania.api.recipe.RecipeManaInfusion;
|
||||
import vazkii.botania.client.core.handler.HUDHandler;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.block.tile.mana.TilePool;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.List;
|
||||
|
||||
public class ManaPoolRecipeWrapper implements IRecipeWrapper {
|
||||
|
||||
private final List input;
|
||||
private final ItemStack output;
|
||||
private final int mana;
|
||||
|
||||
public ManaPoolRecipeWrapper(RecipeManaInfusion recipe) {
|
||||
ImmutableList.Builder builder = ImmutableList.builder();
|
||||
|
||||
if (recipe.getInput() instanceof ItemStack) {
|
||||
builder.add(recipe.getInput());
|
||||
} else if (recipe.getInput() instanceof String) {
|
||||
builder.add(OreDictionary.getOres(((String) recipe.getInput())));
|
||||
}
|
||||
|
||||
if (recipe.isAlchemy()) {
|
||||
builder.add(new ItemStack(ModBlocks.alchemyCatalyst));
|
||||
} else if (recipe.isConjuration()) {
|
||||
builder.add(new ItemStack(ModBlocks.conjurationCatalyst));
|
||||
}
|
||||
|
||||
input = builder.build();
|
||||
output = recipe.getOutput();
|
||||
mana = recipe.getManaToConsume();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List getInputs() {
|
||||
return input;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List getOutputs() {
|
||||
return ImmutableList.of(output);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidStack> getFluidInputs() {
|
||||
return ImmutableList.of();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidStack> getFluidOutputs() {
|
||||
return ImmutableList.of();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawInfo(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight) {
|
||||
GlStateManager.enableAlpha();
|
||||
HUDHandler.renderManaBar(28, 50, 0x0000FF, 0.75F, mana, TilePool.MAX_MANA / 10);
|
||||
GlStateManager.disableAlpha();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawAnimations(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight) {}
|
||||
|
||||
}
|
||||
+109
@@ -0,0 +1,109 @@
|
||||
/**
|
||||
* 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.integration.jei.petalapothecary;
|
||||
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IDrawable;
|
||||
import mezz.jei.api.gui.IDrawableStatic;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.recipe.IRecipeCategory;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.item.block.ItemBlockSpecialFlower;
|
||||
import vazkii.botania.common.lib.LibBlockNames;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.awt.*;
|
||||
import java.util.Collection;
|
||||
|
||||
public class PetalApothecaryRecipeCategory implements IRecipeCategory {
|
||||
|
||||
private final IDrawableStatic background;
|
||||
private final String localizedName;
|
||||
private final IDrawableStatic overlay;
|
||||
|
||||
public PetalApothecaryRecipeCategory(IGuiHelper guiHelper) {
|
||||
background = guiHelper.createBlankDrawable(150, 110);
|
||||
localizedName = StatCollector.translateToLocal("botania.nei.petalApothecary");
|
||||
overlay = guiHelper.createDrawable(new ResourceLocation("botania", "textures/gui/petalOverlay.png"),
|
||||
0, 0, 150, 110);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getUid() {
|
||||
return "botania.petals";
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return localizedName;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IDrawable getBackground() {
|
||||
return background;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawExtras(Minecraft minecraft) {
|
||||
GlStateManager.enableAlpha();
|
||||
GlStateManager.enableBlend();
|
||||
overlay.draw(minecraft);
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.disableAlpha();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawAnimations(Minecraft minecraft) {}
|
||||
|
||||
@Override
|
||||
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper) {
|
||||
if (!(recipeWrapper instanceof PetalApothecaryRecipeWrapper))
|
||||
return;
|
||||
PetalApothecaryRecipeWrapper wrapper = ((PetalApothecaryRecipeWrapper) recipeWrapper);
|
||||
|
||||
recipeLayout.getItemStacks().init(0, true, 64, 52);
|
||||
recipeLayout.getItemStacks().set(0, new ItemStack(ModBlocks.altar));
|
||||
|
||||
int index = 1;
|
||||
double angleBetweenEach = 360.0 / wrapper.getInputs().size();
|
||||
Point point = new Point(64, 20), center = new Point(64, 52);
|
||||
|
||||
for (Object o : wrapper.getInputs()) {
|
||||
recipeLayout.getItemStacks().init(index, true, point.x, point.y);
|
||||
if (o instanceof Collection) {
|
||||
recipeLayout.getItemStacks().set(index, ((Collection<ItemStack>) o));
|
||||
}
|
||||
if (o instanceof ItemStack) {
|
||||
recipeLayout.getItemStacks().set(index, ((ItemStack) o));
|
||||
}
|
||||
index += 1;
|
||||
point = rotatePointAbout(point, center, angleBetweenEach);
|
||||
}
|
||||
|
||||
recipeLayout.getItemStacks().init(index, false, 103, 17);
|
||||
recipeLayout.getItemStacks().set(index, wrapper.getOutputs().get(0));
|
||||
}
|
||||
|
||||
private Point rotatePointAbout(Point in, Point about, double degrees) {
|
||||
double rad = degrees * Math.PI / 180.0;
|
||||
double newX = Math.cos(rad) * (in.x - about.x) - Math.sin(rad) * (in.y - about.y) + about.x;
|
||||
double newY = Math.sin(rad) * (in.x - about.x) + Math.cos(rad) * (in.y - about.y) + about.y;
|
||||
return new Point(((int) newX), ((int) newY));
|
||||
}
|
||||
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* 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.integration.jei.petalapothecary;
|
||||
|
||||
import mezz.jei.api.recipe.IRecipeHandler;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import vazkii.botania.api.recipe.RecipePetals;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class PetalApothecaryRecipeHandler implements IRecipeHandler<RecipePetals> {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public Class<RecipePetals> getRecipeClass() {
|
||||
return RecipePetals.class;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid() {
|
||||
return "botania.petals";
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull RecipePetals recipe) {
|
||||
return new PetalApothecaryRecipeWrapper(recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRecipeValid(@Nonnull RecipePetals recipe) {
|
||||
return recipe.getInputs().size() <= 16;
|
||||
}
|
||||
|
||||
}
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
/**
|
||||
* 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.integration.jei.petalapothecary;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import vazkii.botania.api.recipe.RecipePetals;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.List;
|
||||
|
||||
public class PetalApothecaryRecipeWrapper implements IRecipeWrapper {
|
||||
|
||||
private final List input;
|
||||
private final ItemStack output;
|
||||
|
||||
public PetalApothecaryRecipeWrapper(RecipePetals recipe) {
|
||||
ImmutableList.Builder builder = ImmutableList.builder();
|
||||
for (Object o : recipe.getInputs()) {
|
||||
if (o instanceof ItemStack) {
|
||||
builder.add(o);
|
||||
}
|
||||
if (o instanceof String) {
|
||||
builder.add(OreDictionary.getOres(((String) o)));
|
||||
}
|
||||
}
|
||||
input = builder.build();
|
||||
output = recipe.getOutput();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List getInputs() {
|
||||
return input;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getOutputs() {
|
||||
return ImmutableList.of(output);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidStack> getFluidInputs() {
|
||||
return ImmutableList.of();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidStack> getFluidOutputs() {
|
||||
return ImmutableList.of();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawInfo(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight) {}
|
||||
|
||||
@Override
|
||||
public void drawAnimations(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight) {}
|
||||
|
||||
}
|
||||
+109
@@ -0,0 +1,109 @@
|
||||
/**
|
||||
* 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.integration.jei.puredaisy;
|
||||
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IDrawable;
|
||||
import mezz.jei.api.gui.IDrawableStatic;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.recipe.IRecipeCategory;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import vazkii.botania.common.item.block.ItemBlockSpecialFlower;
|
||||
import vazkii.botania.common.lib.LibBlockNames;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.Collection;
|
||||
|
||||
public class PureDaisyRecipeCategory implements IRecipeCategory {
|
||||
|
||||
private final IDrawable background;
|
||||
private final String localizedName;
|
||||
private final IDrawable overlay;
|
||||
|
||||
public PureDaisyRecipeCategory(IGuiHelper guiHelper) {
|
||||
background = guiHelper.createBlankDrawable(168, 64);
|
||||
localizedName = StatCollector.translateToLocal("botania.nei.pureDaisy");
|
||||
overlay = guiHelper.createDrawable(new ResourceLocation("botania", "textures/gui/pureDaisyOverlay.png"),
|
||||
0, 0, 64, 46);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getUid() {
|
||||
return "botania.pureDaisy";
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return localizedName;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IDrawable getBackground() {
|
||||
return background;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawExtras(Minecraft minecraft) {
|
||||
GlStateManager.enableAlpha();
|
||||
GlStateManager.enableBlend();
|
||||
overlay.draw(minecraft, 48, 0);
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.disableAlpha();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawAnimations(Minecraft minecraft) {}
|
||||
|
||||
@Override
|
||||
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper) {
|
||||
if (!(recipeWrapper instanceof PureDaisyRecipeWrapper))
|
||||
return;
|
||||
|
||||
PureDaisyRecipeWrapper wrapper = ((PureDaisyRecipeWrapper) recipeWrapper);
|
||||
boolean inputFluid = wrapper.getInputs().isEmpty();
|
||||
boolean outputFluid = wrapper.getOutputs().isEmpty();
|
||||
|
||||
|
||||
if (inputFluid) {
|
||||
recipeLayout.getFluidStacks().init(0, true, 40, 12, 16, 16, 1000, false, null);
|
||||
recipeLayout.getFluidStacks().set(0, wrapper.getFluidInputs().get(0));
|
||||
} else {
|
||||
recipeLayout.getItemStacks().init(0, true, 40, 12);
|
||||
if (wrapper.getInputs().get(0) instanceof Collection) {
|
||||
recipeLayout.getItemStacks().set(0, ((Collection<ItemStack>) wrapper.getInputs().get(0)));
|
||||
} else {
|
||||
recipeLayout.getItemStacks().set(0, ((ItemStack) wrapper.getInputs().get(0)));
|
||||
}
|
||||
}
|
||||
|
||||
recipeLayout.getItemStacks().init(1, true, 70, 12);
|
||||
recipeLayout.getItemStacks().set(1, ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_PUREDAISY));
|
||||
|
||||
if (outputFluid) {
|
||||
recipeLayout.getFluidStacks().init(2, false, 99, 12, 16, 16, 1000, false, null);
|
||||
recipeLayout.getFluidStacks().set(2, wrapper.getFluidOutputs().get(0));
|
||||
} else {
|
||||
recipeLayout.getItemStacks().init(2, false, 99, 12);
|
||||
if (wrapper.getOutputs().get(0) instanceof Collection) {
|
||||
recipeLayout.getItemStacks().set(2, ((Collection<ItemStack>) wrapper.getOutputs().get(0)));
|
||||
} else {
|
||||
recipeLayout.getItemStacks().set(2, ((ItemStack) wrapper.getOutputs().get(0)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* 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.integration.jei.puredaisy;
|
||||
|
||||
import mezz.jei.api.recipe.IRecipeHandler;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import vazkii.botania.api.recipe.RecipePureDaisy;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class PureDaisyRecipeHandler implements IRecipeHandler<RecipePureDaisy> {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public Class<RecipePureDaisy> getRecipeClass() {
|
||||
return RecipePureDaisy.class;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid() {
|
||||
return "botania.pureDaisy";
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull RecipePureDaisy recipe) {
|
||||
return new PureDaisyRecipeWrapper(recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRecipeValid(@Nonnull RecipePureDaisy recipe) {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
/**
|
||||
* 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.integration.jei.puredaisy;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import vazkii.botania.api.recipe.RecipePureDaisy;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.List;
|
||||
|
||||
public class PureDaisyRecipeWrapper implements IRecipeWrapper {
|
||||
|
||||
private List inputs = ImmutableList.of();
|
||||
private List outputs = ImmutableList.of();
|
||||
private List<FluidStack> fluidInputs = ImmutableList.of();
|
||||
private List<FluidStack> fluidOutputs = ImmutableList.of();
|
||||
|
||||
public PureDaisyRecipeWrapper(RecipePureDaisy recipe) {
|
||||
if (recipe.getInput() instanceof String) {
|
||||
inputs = ImmutableList.of(OreDictionary.getOres(((String) recipe.getInput())));
|
||||
} else if (recipe.getInput() instanceof Block) {
|
||||
Block b = ((Block) recipe.getInput());
|
||||
if (FluidRegistry.lookupFluidForBlock(b) != null) {
|
||||
fluidInputs = ImmutableList.of(new FluidStack(FluidRegistry.lookupFluidForBlock(b), 1000));
|
||||
} else {
|
||||
inputs = ImmutableList.of(new ItemStack(b, 1, b.getMetaFromState(b.getDefaultState())));
|
||||
}
|
||||
}
|
||||
|
||||
Block outBlock = recipe.getOutputState().getBlock();
|
||||
if (FluidRegistry.lookupFluidForBlock(outBlock) != null) {
|
||||
fluidOutputs = ImmutableList.of(new FluidStack(FluidRegistry.lookupFluidForBlock(outBlock), 1000));
|
||||
} else {
|
||||
outputs = ImmutableList.of(new ItemStack(outBlock, 1, outBlock.getMetaFromState(recipe.getOutputState())));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List getInputs() {
|
||||
return inputs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List getOutputs() {
|
||||
return outputs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidStack> getFluidInputs() {
|
||||
return fluidInputs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidStack> getFluidOutputs() {
|
||||
return fluidOutputs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawInfo(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight) {}
|
||||
|
||||
@Override
|
||||
public void drawAnimations(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight) {}
|
||||
|
||||
}
|
||||
+106
@@ -0,0 +1,106 @@
|
||||
/**
|
||||
* 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.integration.jei.runicaltar;
|
||||
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IDrawable;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.recipe.IRecipeCategory;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.awt.*;
|
||||
import java.util.Collection;
|
||||
|
||||
public class RunicAltarRecipeCategory implements IRecipeCategory {
|
||||
|
||||
private final IDrawable background;
|
||||
private final String localizedName;
|
||||
private final IDrawable overlay;
|
||||
|
||||
public RunicAltarRecipeCategory(IGuiHelper guiHelper) {
|
||||
background = guiHelper.createBlankDrawable(150, 110);
|
||||
localizedName = StatCollector.translateToLocal("botania.nei.runicAltar");
|
||||
overlay = guiHelper.createDrawable(new ResourceLocation("botania", "textures/gui/petalOverlay.png"),
|
||||
0, 0, 150, 110);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getUid() {
|
||||
return "botania.runicAltar";
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return localizedName;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IDrawable getBackground() {
|
||||
return background;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawExtras(Minecraft minecraft) {
|
||||
GlStateManager.enableAlpha();
|
||||
GlStateManager.enableBlend();
|
||||
overlay.draw(minecraft);
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.disableAlpha();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawAnimations(Minecraft minecraft) {}
|
||||
|
||||
@Override
|
||||
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper) {
|
||||
if (!(recipeWrapper instanceof RunicAltarRecipeWrapper))
|
||||
return;
|
||||
RunicAltarRecipeWrapper wrapper = ((RunicAltarRecipeWrapper) recipeWrapper);
|
||||
|
||||
recipeLayout.getItemStacks().init(0, true, 64, 52);
|
||||
recipeLayout.getItemStacks().set(0, new ItemStack(ModBlocks.runeAltar));
|
||||
|
||||
int index = 1;
|
||||
double angleBetweenEach = 360.0 / wrapper.getInputs().size();
|
||||
Point point = new Point(64, 20), center = new Point(64, 52);
|
||||
|
||||
for (Object o : wrapper.getInputs()) {
|
||||
recipeLayout.getItemStacks().init(index, true, point.x, point.y);
|
||||
if (o instanceof Collection) {
|
||||
recipeLayout.getItemStacks().set(index, ((Collection<ItemStack>) o));
|
||||
}
|
||||
if (o instanceof ItemStack) {
|
||||
recipeLayout.getItemStacks().set(index, ((ItemStack) o));
|
||||
}
|
||||
index += 1;
|
||||
point = rotatePointAbout(point, center, angleBetweenEach);
|
||||
}
|
||||
|
||||
recipeLayout.getItemStacks().init(index, false, 103, 17);
|
||||
recipeLayout.getItemStacks().set(index, wrapper.getOutputs().get(0));
|
||||
}
|
||||
|
||||
private Point rotatePointAbout(Point in, Point about, double degrees) {
|
||||
double rad = degrees * Math.PI / 180.0;
|
||||
double newX = Math.cos(rad) * (in.x - about.x) - Math.sin(rad) * (in.y - about.y) + about.x;
|
||||
double newY = Math.sin(rad) * (in.x - about.x) + Math.cos(rad) * (in.y - about.y) + about.y;
|
||||
return new Point(((int) newX), ((int) newY));
|
||||
}
|
||||
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* 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.integration.jei.runicaltar;
|
||||
|
||||
import mezz.jei.api.recipe.IRecipeHandler;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import vazkii.botania.api.recipe.RecipeRuneAltar;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class RunicAltarRecipeHandler implements IRecipeHandler<RecipeRuneAltar> {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public Class<RecipeRuneAltar> getRecipeClass() {
|
||||
return RecipeRuneAltar.class;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid() {
|
||||
return "botania.runicAltar";
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull RecipeRuneAltar recipe) {
|
||||
return new RunicAltarRecipeWrapper(recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRecipeValid(@Nonnull RecipeRuneAltar recipe) {
|
||||
return recipe.getInputs().size() <= 16;
|
||||
}
|
||||
|
||||
}
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
/**
|
||||
* 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.integration.jei.runicaltar;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import vazkii.botania.api.recipe.RecipeRuneAltar;
|
||||
import vazkii.botania.client.core.handler.HUDHandler;
|
||||
import vazkii.botania.common.block.tile.mana.TilePool;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.List;
|
||||
|
||||
public class RunicAltarRecipeWrapper implements IRecipeWrapper {
|
||||
|
||||
private final List input;
|
||||
private final ItemStack output;
|
||||
private final int manaUsage;
|
||||
|
||||
public RunicAltarRecipeWrapper(RecipeRuneAltar recipe) {
|
||||
ImmutableList.Builder builder = ImmutableList.builder();
|
||||
for (Object o : recipe.getInputs()) {
|
||||
if (o instanceof ItemStack) {
|
||||
builder.add(o);
|
||||
}
|
||||
if (o instanceof String) {
|
||||
builder.add(OreDictionary.getOres(((String) o)));
|
||||
}
|
||||
}
|
||||
input = builder.build();
|
||||
output = recipe.getOutput();
|
||||
manaUsage = recipe.getManaUsage();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List getInputs() {
|
||||
return input;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getOutputs() {
|
||||
return ImmutableList.of(output);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidStack> getFluidInputs() {
|
||||
return ImmutableList.of();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidStack> getFluidOutputs() {
|
||||
return ImmutableList.of();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawInfo(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight) {
|
||||
GlStateManager.enableAlpha();
|
||||
HUDHandler.renderManaBar(28, 113, 0x0000FF, 0.75F, manaUsage, TilePool.MAX_MANA / 10);
|
||||
GlStateManager.disableAlpha();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawAnimations(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight) {}
|
||||
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -211,21 +211,21 @@ public class ModelArmorElementium extends ModelBiped {
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
helm.showModel = slot == 0;
|
||||
body.showModel = slot == 1;
|
||||
armR.showModel = slot == 1;
|
||||
armL.showModel = slot == 1;
|
||||
legR.showModel = slot == 2;
|
||||
legL.showModel = slot == 2;
|
||||
bootL.showModel = slot == 3;
|
||||
bootR.showModel = slot == 3;
|
||||
helm.showModel = slot == 3; // 1.8: now reversed. Yay mojang.
|
||||
body.showModel = slot == 2;
|
||||
armR.showModel = slot == 2;
|
||||
armL.showModel = slot == 2;
|
||||
legR.showModel = slot == 1;
|
||||
legL.showModel = slot == 1;
|
||||
bootL.showModel = slot == 0;
|
||||
bootR.showModel = slot == 0;
|
||||
bipedHeadwear.showModel = false;
|
||||
|
||||
bipedHead = helm;
|
||||
bipedBody = body;
|
||||
bipedRightArm = armR;
|
||||
bipedLeftArm = armL;
|
||||
if(slot == 2) {
|
||||
if(slot == 1) {
|
||||
bipedRightLeg = legR;
|
||||
bipedLeftLeg = legL;
|
||||
} else {
|
||||
@@ -240,6 +240,7 @@ public class ModelArmorElementium extends ModelBiped {
|
||||
public void prepareForRender(Entity entity) {
|
||||
EntityLivingBase living = (EntityLivingBase) entity;
|
||||
isSneak = living != null ? living.isSneaking() : false;
|
||||
isChild = living != null ? living.isChild() : false;
|
||||
if(living != null && living instanceof EntityPlayer) {
|
||||
EntityPlayer player = (EntityPlayer) living;
|
||||
|
||||
|
||||
@@ -141,21 +141,21 @@ public class ModelArmorManasteel extends ModelBiped {
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
helm.showModel = slot == 0;
|
||||
body.showModel = slot == 1;
|
||||
armR.showModel = slot == 1;
|
||||
armL.showModel = slot == 1;
|
||||
legR.showModel = slot == 2;
|
||||
legL.showModel = slot == 2;
|
||||
bootL.showModel = slot == 3;
|
||||
bootR.showModel = slot == 3;
|
||||
helm.showModel = slot == 3; // 1.8: now reversed. yay mojang.
|
||||
body.showModel = slot == 2;
|
||||
armR.showModel = slot == 2;
|
||||
armL.showModel = slot == 2;
|
||||
legR.showModel = slot == 1;
|
||||
legL.showModel = slot == 1;
|
||||
bootL.showModel = slot == 0;
|
||||
bootR.showModel = slot == 0;
|
||||
bipedHeadwear.showModel = false;
|
||||
|
||||
bipedHead = helm;
|
||||
bipedBody = body;
|
||||
bipedRightArm = armR;
|
||||
bipedLeftArm = armL;
|
||||
if(slot == 2) {
|
||||
if(slot == 1) {
|
||||
bipedRightLeg = legR;
|
||||
bipedLeftLeg = legL;
|
||||
} else {
|
||||
@@ -170,6 +170,7 @@ public class ModelArmorManasteel extends ModelBiped {
|
||||
public void prepareForRender(Entity entity) {
|
||||
EntityLivingBase living = (EntityLivingBase) entity;
|
||||
isSneak = living != null ? living.isSneaking() : false;
|
||||
isChild = living != null ? living.isChild() : false;
|
||||
if(living != null && living instanceof EntityPlayer) {
|
||||
EntityPlayer player = (EntityPlayer) living;
|
||||
|
||||
|
||||
@@ -141,21 +141,21 @@ public class ModelArmorManaweave extends ModelBiped {
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
helm.showModel = slot == 0;
|
||||
body.showModel = slot == 1;
|
||||
armR.showModel = slot == 1;
|
||||
armL.showModel = slot == 1;
|
||||
legR.showModel = slot == 2;
|
||||
legL.showModel = slot == 2;
|
||||
bootL.showModel = slot == 3;
|
||||
bootR.showModel = slot == 3;
|
||||
helm.showModel = slot == 3; // 1.8: now reversed. yay mojang.
|
||||
body.showModel = slot == 2;
|
||||
armR.showModel = slot == 2;
|
||||
armL.showModel = slot == 2;
|
||||
legR.showModel = slot == 1;
|
||||
legL.showModel = slot == 1;
|
||||
bootL.showModel = slot == 0;
|
||||
bootR.showModel = slot == 0;
|
||||
bipedHeadwear.showModel = false;
|
||||
|
||||
bipedHead = helm;
|
||||
bipedBody = body;
|
||||
bipedRightArm = armR;
|
||||
bipedLeftArm = armL;
|
||||
if(slot == 2) {
|
||||
if(slot == 1) {
|
||||
bipedRightLeg = legR;
|
||||
bipedLeftLeg = legL;
|
||||
} else {
|
||||
@@ -170,6 +170,7 @@ public class ModelArmorManaweave extends ModelBiped {
|
||||
public void prepareForRender(Entity entity) {
|
||||
EntityLivingBase living = (EntityLivingBase) entity;
|
||||
isSneak = living != null ? living.isSneaking() : false;
|
||||
isChild = living != null ? living.isChild() : false;
|
||||
if(living != null && living instanceof EntityPlayer) {
|
||||
EntityPlayer player = (EntityPlayer) living;
|
||||
|
||||
|
||||
@@ -232,21 +232,21 @@ public class ModelArmorTerrasteel extends ModelBiped {
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
helm.showModel = slot == 0;
|
||||
body.showModel = slot == 1;
|
||||
armr.showModel = slot == 1;
|
||||
armL.showModel = slot == 1;
|
||||
legR.showModel = slot == 2;
|
||||
legL.showModel = slot == 2;
|
||||
bootL.showModel = slot == 3;
|
||||
bootR.showModel = slot == 3;
|
||||
helm.showModel = slot == 3; // 1.8: now reversed. yay mojang.
|
||||
body.showModel = slot == 2;
|
||||
armr.showModel = slot == 2;
|
||||
armL.showModel = slot == 2;
|
||||
legR.showModel = slot == 1;
|
||||
legL.showModel = slot == 1;
|
||||
bootL.showModel = slot == 0;
|
||||
bootR.showModel = slot == 0;
|
||||
bipedHeadwear.showModel = false;
|
||||
|
||||
bipedHead = helm;
|
||||
bipedBody = body;
|
||||
bipedRightArm = armr;
|
||||
bipedLeftArm = armL;
|
||||
if(slot == 2) {
|
||||
if(slot == 1) {
|
||||
bipedRightLeg = legR;
|
||||
bipedLeftLeg = legL;
|
||||
} else {
|
||||
@@ -261,6 +261,7 @@ public class ModelArmorTerrasteel extends ModelBiped {
|
||||
public void prepareForRender(Entity entity) {
|
||||
EntityLivingBase living = (EntityLivingBase) entity;
|
||||
isSneak = living != null ? living.isSneaking() : false;
|
||||
isChild = living != null ? living.isChild() : false;
|
||||
if(living != null && living instanceof EntityPlayer) {
|
||||
EntityPlayer player = (EntityPlayer) living;
|
||||
|
||||
|
||||
+15
-57
@@ -1,11 +1,18 @@
|
||||
package vazkii.botania.api.render;
|
||||
/**
|
||||
* 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.render;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
import com.google.common.base.Optional;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonParser;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
@@ -33,9 +40,8 @@ import net.minecraftforge.client.model.TRSRTransformation;
|
||||
import net.minecraftforge.common.property.IExtendedBlockState;
|
||||
import net.minecraftforge.fml.common.FMLLog;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.api.BotaniaAPIClient;
|
||||
import vazkii.botania.api.state.BotaniaStateProps;
|
||||
import vazkii.botania.api.subtile.SubTileEntity;
|
||||
import vazkii.botania.common.block.decor.IFloatingFlower;
|
||||
import vazkii.botania.common.item.block.ItemBlockSpecialFlower;
|
||||
|
||||
@@ -48,53 +54,8 @@ import java.util.Map;
|
||||
|
||||
public class SpecialFlowerModel implements IModelCustomData {
|
||||
|
||||
/**
|
||||
* Register your model for the given subtile class here.
|
||||
* Call this DURING PREINIT. Calling it anytime after blockModels have already baked does not guarantee that your model will work.
|
||||
* Your model json must specify key "tintindex" in all the faces it wants tint applied.
|
||||
* Tint is applied whenever a player recolors the flower using floral dye
|
||||
* todo 1.8.8 move this elsewhere or otherwise make it fit better with the rest of the subtile registration process
|
||||
*
|
||||
* @param subTileName The String ID of the subtile
|
||||
* @param model A path to a blockstate json and variant to be used for this subtile
|
||||
* @param itemModel A path to a blockstate json and variant to be used for this subtile's item form
|
||||
*/
|
||||
public static void register(String subTileName, ModelResourceLocation model, ModelResourceLocation itemModel) {
|
||||
queuedBlockModels.put(subTileName, model);
|
||||
queuedItemModels.put(subTileName, itemModel);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register your model for the given subtile class here.
|
||||
* Call this DURING PREINIT. Calling it anytime after blockModels have already baked does not guarantee that your model will work.
|
||||
* Your model json must specify key "tintindex" in all the faces it wants tint applied.
|
||||
* Tint is applied whenever a player recolors the flower using floral dye
|
||||
* todo 1.8.8 move this elsewhere or otherwise make it fit better with the rest of the subtile registration process
|
||||
*
|
||||
* @param subTileName The String ID of the subtile
|
||||
* @param model A path to a blockstate json and variant to be used the block. The item model will be drawn from the same blockstate json, from variant "inventory"
|
||||
*/
|
||||
public static void register(String subTileName, ModelResourceLocation model) {
|
||||
register(subTileName, model, new ModelResourceLocation(model.getResourceDomain() + ":" + model.getResourcePath(), "inventory"));
|
||||
}
|
||||
|
||||
public static void register(Class<? extends SubTileEntity> clazz, ModelResourceLocation model) {
|
||||
register(BotaniaAPI.getSubTileStringMapping(clazz), model);
|
||||
}
|
||||
|
||||
public static void register(Class<? extends SubTileEntity> clazz, ModelResourceLocation model, ModelResourceLocation itemModel) {
|
||||
register(BotaniaAPI.getSubTileStringMapping(clazz), model, itemModel);
|
||||
}
|
||||
|
||||
/**
|
||||
* Internal implementation
|
||||
**/
|
||||
// SpecialFlowerModel for when there are no blockModels registered for a subtile
|
||||
public static final SpecialFlowerModel INSTANCE = new SpecialFlowerModel(ImmutableMap.<Optional<String>, ModelResourceLocation>of(), ImmutableMap.<Optional<String>, ModelResourceLocation>of());
|
||||
// Models registered from the externel API thus far
|
||||
private static final Map<String, ModelResourceLocation> queuedBlockModels = Maps.newHashMap();
|
||||
private static final Map<String, ModelResourceLocation> queuedItemModels = Maps.newHashMap();
|
||||
|
||||
|
||||
private final ImmutableMap<Optional<String>, ModelResourceLocation> blockModels;
|
||||
private final ImmutableMap<Optional<String>, ModelResourceLocation> itemModels;
|
||||
@@ -111,7 +72,7 @@ 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
|
||||
for (IFloatingFlower.IslandType i : IFloatingFlower.IslandType.values()) {
|
||||
builder.add(new ModelResourceLocation("botania:miniIsland", "variant=" + i.name().toLowerCase(Locale.ROOT)));
|
||||
}
|
||||
@@ -147,10 +108,10 @@ public class SpecialFlowerModel implements IModelCustomData {
|
||||
}
|
||||
}
|
||||
|
||||
for (Map.Entry<String, ModelResourceLocation> e : queuedBlockModels.entrySet()) {
|
||||
for (Map.Entry<String, ModelResourceLocation> e : BotaniaAPIClient.queuedBlockModels.entrySet()) {
|
||||
blockBuilder.put(Optional.of(e.getKey()), e.getValue());
|
||||
}
|
||||
for (Map.Entry<String, ModelResourceLocation> e : queuedItemModels.entrySet()) {
|
||||
for (Map.Entry<String, ModelResourceLocation> e : BotaniaAPIClient.queuedItemModels.entrySet()) {
|
||||
itemBuilder.put(Optional.of(e.getKey()), e.getValue());
|
||||
}
|
||||
|
||||
@@ -214,6 +175,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 +289,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 +305,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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -42,15 +42,18 @@ public class RenderTileCorporeaCrystalCube extends TileEntitySpecialRenderer {
|
||||
public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float f, int digProgress) {
|
||||
TileCorporeaCrystalCube cube = (TileCorporeaCrystalCube) tileentity;
|
||||
|
||||
if(entity == null)
|
||||
entity = new EntityItem(cube.getWorld(), cube.getPos().getX(), cube.getPos().getY(), cube.getPos().getZ(), new ItemStack(Blocks.stone));
|
||||
ItemStack stack = null;
|
||||
if (cube != null) {
|
||||
if(entity == null)
|
||||
entity = new EntityItem(cube.getWorld(), cube.getPos().getX(), cube.getPos().getY(), cube.getPos().getZ(), new ItemStack(Blocks.stone));
|
||||
|
||||
ObfuscationReflectionHelper.setPrivateValue(EntityItem.class, entity, ClientTickHandler.ticksInGame, LibObfuscation.AGE);
|
||||
ItemStack stack = cube.getRequestTarget();
|
||||
entity.setEntityItemStack(stack);
|
||||
ObfuscationReflectionHelper.setPrivateValue(EntityItem.class, entity, ClientTickHandler.ticksInGame, LibObfuscation.AGE);
|
||||
stack = cube.getRequestTarget();
|
||||
entity.setEntityItemStack(stack);
|
||||
}
|
||||
|
||||
double time = ClientTickHandler.ticksInGame + f;
|
||||
double worldTicks = tileentity.getWorld() == null ? 0 : time;
|
||||
double worldTicks = tileentity == null || tileentity.getWorld() == null ? 0 : time;
|
||||
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
GlStateManager.pushMatrix();
|
||||
|
||||
@@ -32,6 +32,7 @@ public class RenderTileCorporeaIndex extends TileEntitySpecialRenderer {
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partticks, int digProgress) {
|
||||
TileCorporeaIndex index = (TileCorporeaIndex) tile;
|
||||
move = index != null;
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(x + 0.5, y, z + 0.5);
|
||||
@@ -44,7 +45,7 @@ public class RenderTileCorporeaIndex extends TileEntitySpecialRenderer {
|
||||
crystal.render(null, 0F, rotation, translation, 0F, 0F, 1F / 16F);
|
||||
GlStateManager.scale(1F / scale, 1F / scale, 1F / scale);
|
||||
|
||||
if(index.closeby > 0F) {
|
||||
if(index != null && index.closeby > 0F) {
|
||||
float starScale = 0.02F;
|
||||
float starRadius = (float) TileCorporeaIndex.RADIUS * index.closeby + (index.closeby == 1F ? 0F : index.hasCloseby ? partticks : -partticks) * 0.2F;
|
||||
double rads = (index.ticksWithCloseby + partticks) * 2 * Math.PI / 180;
|
||||
|
||||
@@ -87,13 +87,12 @@ public class RenderTileLightRelay extends TileEntitySpecialRenderer {
|
||||
float f5 = 0.5F;
|
||||
float f6 = 0.25F;
|
||||
|
||||
p_77026_1_.getWorldRenderer().begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX);
|
||||
//p_77026_1_.getWorldRenderer().putNormal(0.0F, 1.0F, 0.0F);
|
||||
p_77026_1_.getWorldRenderer().begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_NORMAL);
|
||||
//p_77026_1_.getWorldRenderer().setBrightness(240);
|
||||
p_77026_1_.getWorldRenderer().pos(0.0F - f5, 0.0F - f6, 0.0D).tex(f, f3).endVertex();
|
||||
p_77026_1_.getWorldRenderer().pos(f4 - f5, 0.0F - f6, 0.0D).tex(f1, f3).endVertex();
|
||||
p_77026_1_.getWorldRenderer().pos(f4 - f5, f4 - f6, 0.0D).tex(f1, f2).endVertex();
|
||||
p_77026_1_.getWorldRenderer().pos(0.0F - f5, f4 - f6, 0.0D).tex(f, f2).endVertex();
|
||||
p_77026_1_.getWorldRenderer().pos(0.0F - f5, 0.0F - f6, 0.0D).tex(f, f3).normal(0, 1, 0).endVertex();
|
||||
p_77026_1_.getWorldRenderer().pos(f4 - f5, 0.0F - f6, 0.0D).tex(f1, f3).normal(0, 1, 0).endVertex();
|
||||
p_77026_1_.getWorldRenderer().pos(f4 - f5, f4 - f6, 0.0D).tex(f1, f2).normal(0, 1, 0).endVertex();
|
||||
p_77026_1_.getWorldRenderer().pos(0.0F - f5, f4 - f6, 0.0D).tex(f, f2).normal(0, 1, 0).endVertex();
|
||||
p_77026_1_.draw();
|
||||
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
*/
|
||||
package vazkii.botania.client.render.tile;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.ItemRenderer;
|
||||
@@ -21,10 +22,12 @@ import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.client.resources.model.IBakedModel;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
@@ -33,6 +36,7 @@ import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import vazkii.botania.api.item.TinyPotatoRenderEvent;
|
||||
import vazkii.botania.api.state.BotaniaStateProps;
|
||||
import vazkii.botania.client.core.handler.ContributorFancinessHandler;
|
||||
import vazkii.botania.client.core.handler.RenderEventHandler;
|
||||
import vazkii.botania.client.core.helper.IconHelper;
|
||||
@@ -62,7 +66,7 @@ public class RenderTileTinyPotato extends TileEntitySpecialRenderer {
|
||||
GlStateManager.translate(d0, d1, d2);
|
||||
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
mc.renderEngine.bindTexture(ClientProxy.dootDoot ? textureHalloween : texture);
|
||||
mc.renderEngine.bindTexture(TextureMap.locationBlocksTexture);
|
||||
String name = potato.name.toLowerCase();
|
||||
|
||||
boolean usedShader = false;
|
||||
@@ -88,17 +92,11 @@ public class RenderTileTinyPotato extends TileEntitySpecialRenderer {
|
||||
usedShader = true;
|
||||
}
|
||||
|
||||
GlStateManager.translate(0.5F, 1.5F, 0.5F);
|
||||
GlStateManager.scale(1F, -1F, -1F);
|
||||
int meta = potato.getWorld() == null ? 3 : potato.getBlockMetadata();
|
||||
float rotY = meta * 90F - 180F;
|
||||
GlStateManager.rotate(rotY, 0F, 1F, 0F);
|
||||
|
||||
float jump = potato.jumpTicks;
|
||||
if(jump > 0)
|
||||
jump -= var8;
|
||||
|
||||
float up = (float) -Math.abs(Math.sin(jump / 10 * Math.PI)) * 0.2F;
|
||||
float up = (float) Math.abs(Math.sin(jump / 10 * Math.PI)) * 0.2F;
|
||||
float rotZ = (float) Math.sin(jump / 10 * Math.PI) * 2;
|
||||
|
||||
GlStateManager.translate(0F, up, 0F);
|
||||
@@ -107,22 +105,30 @@ public class RenderTileTinyPotato extends TileEntitySpecialRenderer {
|
||||
GlStateManager.pushMatrix();
|
||||
if(name.equals("pahimar")) {
|
||||
GlStateManager.scale(1F, 0.3F, 1F);
|
||||
GlStateManager.translate(0F, 3.5F, 0F);
|
||||
} else if(name.equals("kyle hyde"))
|
||||
mc.renderEngine.bindTexture(textureGrayscale);
|
||||
else if(name.equals("dinnerbone") || name.equals("grumm")) {
|
||||
//GlStateManager.translate(0F, 3.5F, 0F);
|
||||
} else if(name.equals("kyle hyde")) {
|
||||
// 1.8: handled using getActualState - mc.renderEngine.bindTexture(textureGrayscale);
|
||||
} else if(name.equals("dinnerbone") || name.equals("grumm")) {
|
||||
GlStateManager.rotate(180F, 0F, 0F, 1F);
|
||||
GlStateManager.translate(0F, -2.625F, 0F);
|
||||
//GlStateManager.translate(0F, -2.625F, 0F);
|
||||
} else if(name.equals("aureylian"))
|
||||
GlStateManager.color(1F, 0.5F, 1F);
|
||||
|
||||
IBlockState state = potato.getWorld().getBlockState(potato.getPos());
|
||||
state = state.getBlock().getActualState(state, potato.getWorld(), potato.getPos());
|
||||
IBakedModel bakedModel = mc.getBlockRendererDispatcher().getBlockModelShapes().getModelForState(state);
|
||||
|
||||
boolean render = !(name.equals("mami") || name.equals("soaryn") || name.equals("eloraam") && jump != 0);
|
||||
if(render)
|
||||
model.render();
|
||||
if(render) {
|
||||
GlStateManager.rotate(-90, 0, 1, 0);
|
||||
mc.getBlockRendererDispatcher().getBlockModelRenderer().renderModelBrightness(bakedModel, potato.getWorld().getBlockState(potato.getPos()), 1.0F, false);
|
||||
GlStateManager.rotate(90, 0, 1, 0);
|
||||
//model.render();
|
||||
}
|
||||
if(name.equals("kingdaddydmac")) {
|
||||
GlStateManager.translate(0.5F, 0F, 0F);
|
||||
model.render();
|
||||
GlStateManager.translate(-0.5F, 0F, 0F);
|
||||
mc.getBlockRendererDispatcher().getBlockModelRenderer().renderModelBrightness(bakedModel, potato.getWorld().getBlockState(potato.getPos()), 1.0F, false);
|
||||
//model.render();
|
||||
}
|
||||
|
||||
if(usedShader)
|
||||
@@ -336,14 +342,12 @@ public class RenderTileTinyPotato extends TileEntitySpecialRenderer {
|
||||
MinecraftForge.EVENT_BUS.post(new TinyPotatoRenderEvent(potato, potato.name, d0, d1, d2, var8));
|
||||
|
||||
GlStateManager.rotate(-rotZ, 0F, 0F, 1F);
|
||||
GlStateManager.rotate(-rotY, 0F, 1F, 0F);
|
||||
GlStateManager.color(1F, 1F, 1F);
|
||||
GlStateManager.scale(1F, -1F, -1F);
|
||||
|
||||
MovingObjectPosition pos = mc.objectMouseOver;
|
||||
if(!name.isEmpty() && pos != null && pos.getBlockPos().equals(potato.getPos())) {
|
||||
if(!name.isEmpty() && pos != null && potato.getPos().equals(pos.getBlockPos())) {
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(0F, -0.6F, 0F);
|
||||
GlStateManager.translate(0.5F, 0.75F, 0.5F);
|
||||
GlStateManager.rotate(-mc.getRenderManager().playerViewY, 0.0F, 1.0F, 0.0F);
|
||||
GlStateManager.rotate(mc.getRenderManager().playerViewX, 1.0F, 0.0F, 0.0F);
|
||||
float f = 1.6F;
|
||||
|
||||
@@ -31,7 +31,7 @@ import net.minecraftforge.fml.common.event.FMLServerAboutToStartEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLServerStartingEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLServerStoppingEvent;
|
||||
|
||||
@Mod(modid = LibMisc.MOD_ID, name = LibMisc.MOD_NAME, version = LibMisc.VERSION, dependencies = LibMisc.DEPENDENCIES, guiFactory = LibMisc.GUI_FACTORY, acceptedMinecraftVersions = "[1.8.8,1.8.9]")
|
||||
@Mod(modid = LibMisc.MOD_ID, name = LibMisc.MOD_NAME, version = LibMisc.VERSION, dependencies = LibMisc.DEPENDENCIES, guiFactory = LibMisc.GUI_FACTORY, acceptedMinecraftVersions = LibMisc.MC_VERSIONS)
|
||||
public class Botania {
|
||||
|
||||
public static boolean gardenOfGlassLoaded = false;
|
||||
|
||||
@@ -153,7 +153,7 @@ public class BlockAltar extends BlockModContainer implements ILexiconable {
|
||||
@Override
|
||||
public int getLightValue(IBlockAccess world, BlockPos pos) {
|
||||
TileAltar tile = (TileAltar) world.getTileEntity(pos);
|
||||
return tile.hasLava ? 15 : 0;
|
||||
return (tile != null && tile.hasLava) ? 15 : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -212,7 +212,7 @@ public abstract class BlockModDoubleFlower extends BlockDoublePlant implements I
|
||||
int b = (hex & 0xFF);
|
||||
|
||||
if(par5Random.nextDouble() < ConfigHandler.flowerParticleFrequency)
|
||||
Botania.proxy.sparkleFX(par1World, pos.getX() + 0.3 + par5Random.nextFloat() * 0.5, pos.getY() + 0.5 + par5Random.nextFloat() * 0.5, pos.getZ() + 0.3 + par5Random.nextFloat() * 0.5, r, g, b, par5Random.nextFloat(), 5);
|
||||
Botania.proxy.sparkleFX(par1World, pos.getX() + 0.3 + par5Random.nextFloat() * 0.5, pos.getY() + 0.5 + par5Random.nextFloat() * 0.5, pos.getZ() + 0.3 + par5Random.nextFloat() * 0.5, r / 255F, g / 255F, b / 255F, par5Random.nextFloat(), 5);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -115,13 +115,13 @@ public class BlockModFlower extends BlockFlower implements ILexiconable, IPickup
|
||||
|
||||
@Override
|
||||
public void randomDisplayTick(World par1World, BlockPos pos, IBlockState state, Random par5Random) {
|
||||
int hex = ((EnumDyeColor) state.getValue(BotaniaStateProps.COLOR)).getMapColor().colorValue;
|
||||
int hex = state.getValue(BotaniaStateProps.COLOR).getMapColor().colorValue;
|
||||
int r = (hex & 0xFF0000) >> 16;
|
||||
int g = (hex & 0xFF00) >> 8;
|
||||
int b = (hex & 0xFF);
|
||||
|
||||
if(par5Random.nextDouble() < ConfigHandler.flowerParticleFrequency)
|
||||
Botania.proxy.sparkleFX(par1World, pos.getX() + 0.3 + par5Random.nextFloat() * 0.5, pos.getY() + 0.5 + par5Random.nextFloat() * 0.5, pos.getZ() + 0.3 + par5Random.nextFloat() * 0.5, r, g, b, par5Random.nextFloat(), 5);
|
||||
Botania.proxy.sparkleFX(par1World, pos.getX() + 0.3 + par5Random.nextFloat() * 0.5, pos.getY() + 0.5 + par5Random.nextFloat() * 0.5, pos.getZ() + 0.3 + par5Random.nextFloat() * 0.5, r / 255F, g / 255F, b / 255F, par5Random.nextFloat(), 5);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -111,7 +111,12 @@ public class BlockPylon extends BlockModContainer implements ILexiconable, IInfu
|
||||
|
||||
@Override
|
||||
public float getEnchantPowerBonus(World world, BlockPos pos) {
|
||||
return world.getBlockState(pos).getValue(BotaniaStateProps.PYLON_VARIANT) == PylonVariant.MANA ? 8 : 15;
|
||||
IBlockState state = world.getBlockState(pos);
|
||||
if (state.getBlock() != this || state.getValue(BotaniaStateProps.PYLON_VARIANT) == PylonVariant.MANA) {
|
||||
return 8;
|
||||
} else {
|
||||
return 15;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -17,7 +17,6 @@ import java.util.List;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockFlower;
|
||||
import net.minecraft.block.ITileEntityProvider;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.IProperty;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
@@ -25,9 +24,6 @@ import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.client.particle.EffectRenderer;
|
||||
import net.minecraft.client.particle.EntityDiggingFX;
|
||||
import net.minecraft.client.renderer.block.statemap.DefaultStateMapper;
|
||||
import net.minecraft.client.resources.model.IBakedModel;
|
||||
import net.minecraft.client.resources.model.ModelResourceLocation;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -42,20 +38,14 @@ import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.RegistrySimple;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldServer;
|
||||
import net.minecraftforge.client.event.ModelBakeEvent;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.property.ExtendedBlockState;
|
||||
import net.minecraftforge.common.property.IExtendedBlockState;
|
||||
import net.minecraftforge.common.property.IUnlistedProperty;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.api.render.SpecialFlowerModel;
|
||||
import vazkii.botania.api.state.BotaniaStateProps;
|
||||
import vazkii.botania.api.lexicon.ILexiconable;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
@@ -63,7 +53,6 @@ import vazkii.botania.api.subtile.ISpecialFlower;
|
||||
import vazkii.botania.api.subtile.SubTileEntity;
|
||||
import vazkii.botania.api.wand.IWandHUD;
|
||||
import vazkii.botania.api.wand.IWandable;
|
||||
import vazkii.botania.common.block.subtile.generating.SubTileDaybloom;
|
||||
import vazkii.botania.common.block.tile.TileSpecialFlower;
|
||||
import vazkii.botania.common.core.BotaniaCreativeTab;
|
||||
import vazkii.botania.common.integration.coloredlights.LightHelper;
|
||||
|
||||
@@ -397,6 +397,13 @@ public final class ModBlocks {
|
||||
OreDictionary.registerOre("slabCobblestone", new ItemStack(Blocks.stone_slab, 1, 3));
|
||||
OreDictionary.registerOre("chestWood", Blocks.chest);
|
||||
OreDictionary.registerOre("craftingTableWood", Blocks.crafting_table);
|
||||
OreDictionary.registerOre(LibOreDict.PRISMARINE_BLOCK, new ItemStack(Blocks.prismarine, 1, OreDictionary.WILDCARD_VALUE));
|
||||
OreDictionary.registerOre(LibOreDict.STONE_18_VARIANTS[3], new ItemStack(Blocks.stone, 1, 1));
|
||||
OreDictionary.registerOre(LibOreDict.STONE_18_VARIANTS[2], new ItemStack(Blocks.stone, 1, 3));
|
||||
OreDictionary.registerOre(LibOreDict.STONE_18_VARIANTS[0], new ItemStack(Blocks.stone, 1, 5));
|
||||
OreDictionary.registerOre(LibOreDict.STONE_18_VARIANTS[7], new ItemStack(Blocks.stone, 1, 2));
|
||||
OreDictionary.registerOre(LibOreDict.STONE_18_VARIANTS[6], new ItemStack(Blocks.stone, 1, 4));
|
||||
OreDictionary.registerOre(LibOreDict.STONE_18_VARIANTS[4], new ItemStack(Blocks.stone, 1, 6));
|
||||
|
||||
BotaniaAPI.registerPaintableBlock(unstableBlock, BotaniaStateProps.COLOR);
|
||||
BotaniaAPI.registerPaintableBlock(manaBeacon, BotaniaStateProps.COLOR);
|
||||
|
||||
@@ -10,15 +10,26 @@
|
||||
*/
|
||||
package vazkii.botania.common.block.corporea;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.particle.EntityDiggingFX;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import vazkii.botania.api.lexicon.ILexiconable;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.api.state.BotaniaStateProps;
|
||||
import vazkii.botania.api.state.enums.StorageVariant;
|
||||
import vazkii.botania.client.lib.LibRenderIDs;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.block.tile.corporea.TileCorporeaBase;
|
||||
@@ -91,4 +102,40 @@ public class BlockCorporeaCrystalCube extends BlockCorporeaBase implements ILexi
|
||||
return ((TileCorporeaCrystalCube) world.getTileEntity(pos)).compValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addLandingEffects(net.minecraft.world.WorldServer worldObj, BlockPos blockPosition, IBlockState iblockstate, EntityLivingBase entity, int numberOfParticles )
|
||||
{
|
||||
float f = (float) MathHelper.ceiling_float_int(entity.fallDistance - 3.0F);
|
||||
double d0 = (double)Math.min(0.2F + f / 15.0F, 10.0F);
|
||||
if (d0 > 2.5D) {
|
||||
d0 = 2.5D;
|
||||
}
|
||||
int i = (int)(150.0D * d0);
|
||||
worldObj.spawnParticle(EnumParticleTypes.BLOCK_DUST, entity.posX, entity.posY, entity.posZ, i, 0.0D, 0.0D, 0.0D, 0.15000000596046448D, Block.getStateId(ModBlocks.storage.getDefaultState().withProperty(BotaniaStateProps.STORAGE_VARIANT, StorageVariant.ELEMENTIUM)));
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean addDestroyEffects(World world, BlockPos pos, net.minecraft.client.particle.EffectRenderer effectRenderer)
|
||||
{
|
||||
if (world.getBlockState(pos).getBlock() == this) {
|
||||
int i = 4;
|
||||
EntityDiggingFX.Factory factory = new EntityDiggingFX.Factory();
|
||||
for (int j = 0; j < i; ++j) {
|
||||
for (int k = 0; k < i; ++k) {
|
||||
for (int l = 0; l < i; ++l) {
|
||||
double d0 = (double)pos.getX() + ((double)j + 0.5D) / (double)i;
|
||||
double d1 = (double)pos.getY() + ((double)k + 0.5D) / (double)i;
|
||||
double d2 = (double)pos.getZ() + ((double)l + 0.5D) / (double)i;
|
||||
effectRenderer.addEffect(factory.getEntityFX(-1, world, d0, d1, d2, d0 - (double)pos.getX() - 0.5D, d1 - (double)pos.getY() - 0.5D, d2 - (double)pos.getZ() - 0.5D, Block.getStateId(ModBlocks.storage.getDefaultState().withProperty(BotaniaStateProps.STORAGE_VARIANT, StorageVariant.ELEMENTIUM))));
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -10,13 +10,23 @@
|
||||
*/
|
||||
package vazkii.botania.common.block.corporea;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.particle.EntityDiggingFX;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import vazkii.botania.api.lexicon.ILexiconable;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.api.state.BotaniaStateProps;
|
||||
import vazkii.botania.api.state.enums.StorageVariant;
|
||||
import vazkii.botania.client.lib.LibRenderIDs;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.block.tile.corporea.TileCorporeaBase;
|
||||
@@ -57,4 +67,40 @@ public class BlockCorporeaIndex extends BlockCorporeaBase implements ILexiconabl
|
||||
return LexiconData.corporeaIndex;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addLandingEffects(net.minecraft.world.WorldServer worldObj, BlockPos blockPosition, IBlockState iblockstate, EntityLivingBase entity, int numberOfParticles )
|
||||
{
|
||||
float f = (float) MathHelper.ceiling_float_int(entity.fallDistance - 3.0F);
|
||||
double d0 = (double)Math.min(0.2F + f / 15.0F, 10.0F);
|
||||
if (d0 > 2.5D) {
|
||||
d0 = 2.5D;
|
||||
}
|
||||
int i = (int)(150.0D * d0);
|
||||
worldObj.spawnParticle(EnumParticleTypes.BLOCK_DUST, entity.posX, entity.posY, entity.posZ, i, 0.0D, 0.0D, 0.0D, 0.15000000596046448D, Block.getStateId(ModBlocks.storage.getDefaultState().withProperty(BotaniaStateProps.STORAGE_VARIANT, StorageVariant.ELEMENTIUM)));
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean addDestroyEffects(World world, BlockPos pos, net.minecraft.client.particle.EffectRenderer effectRenderer)
|
||||
{
|
||||
if (world.getBlockState(pos).getBlock() == this) {
|
||||
int i = 4;
|
||||
EntityDiggingFX.Factory factory = new EntityDiggingFX.Factory();
|
||||
for (int j = 0; j < i; ++j) {
|
||||
for (int k = 0; k < i; ++k) {
|
||||
for (int l = 0; l < i; ++l) {
|
||||
double d0 = (double)pos.getX() + ((double)j + 0.5D) / (double)i;
|
||||
double d1 = (double)pos.getY() + ((double)k + 0.5D) / (double)i;
|
||||
double d2 = (double)pos.getZ() + ((double)l + 0.5D) / (double)i;
|
||||
effectRenderer.addEffect(factory.getEntityFX(-1, world, d0, d1, d2, d0 - (double)pos.getX() - 0.5D, d1 - (double)pos.getY() - 0.5D, d2 - (double)pos.getZ() - 0.5D, Block.getStateId(ModBlocks.storage.getDefaultState().withProperty(BotaniaStateProps.STORAGE_VARIANT, StorageVariant.ELEMENTIUM))));
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -52,7 +52,7 @@ public class BlockBuriedPetals extends BlockModFlower {
|
||||
int b = (hex & 0xFF);
|
||||
|
||||
Botania.proxy.setSparkleFXNoClip(true);
|
||||
Botania.proxy.sparkleFX(par1World, pos.getX() + 0.3 + par5Random.nextFloat() * 0.5, pos.getY() + 0.1 + par5Random.nextFloat() * 0.1, pos.getZ() + 0.3 + par5Random.nextFloat() * 0.5, r, g, b, par5Random.nextFloat(), 5);
|
||||
Botania.proxy.sparkleFX(par1World, pos.getX() + 0.3 + par5Random.nextFloat() * 0.5, pos.getY() + 0.1 + par5Random.nextFloat() * 0.1, pos.getZ() + 0.3 + par5Random.nextFloat() * 0.5, r / 255F, g / 255F, b / 255F, par5Random.nextFloat(), 5);
|
||||
|
||||
Botania.proxy.setSparkleFXNoClip(false);
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ public class BlockFloatingFlower extends BlockModContainer implements ILexiconab
|
||||
int b = (hex & 0xFF);
|
||||
|
||||
if(par5Random.nextDouble() < ConfigHandler.flowerParticleFrequency)
|
||||
Botania.proxy.sparkleFX(par1World, pos.getX() + 0.3 + par5Random.nextFloat() * 0.5, pos.getY() + 0.5 + par5Random.nextFloat() * 0.5, pos.getZ() + 0.3 + par5Random.nextFloat() * 0.5, r, g, b, par5Random.nextFloat(), 5);
|
||||
Botania.proxy.sparkleFX(par1World, pos.getX() + 0.3 + par5Random.nextFloat() * 0.5, pos.getY() + 0.5 + par5Random.nextFloat() * 0.5, pos.getZ() + 0.3 + par5Random.nextFloat() * 0.5, r / 255F, g / 255F, b / 255F, par5Random.nextFloat(), 5);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -133,7 +133,7 @@ public class BlockModMushroom extends BlockMushroom implements IInfusionStabilis
|
||||
int b = (hex & 0xFF);
|
||||
|
||||
if(par5Random.nextDouble() < ConfigHandler.flowerParticleFrequency * 0.25F)
|
||||
Botania.proxy.sparkleFX(par1World, pos.getX() + 0.3 + par5Random.nextFloat() * 0.5, pos.getY() + 0.5 + par5Random.nextFloat() * 0.5, pos.getZ() + 0.3 + par5Random.nextFloat() * 0.5, r, g, b, par5Random.nextFloat(), 5);
|
||||
Botania.proxy.sparkleFX(par1World, pos.getX() + 0.3 + par5Random.nextFloat() * 0.5, pos.getY() + 0.5 + par5Random.nextFloat() * 0.5, pos.getZ() + 0.3 + par5Random.nextFloat() * 0.5, r / 255F, g / 255F, b / 255F, par5Random.nextFloat(), 5);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -28,9 +28,14 @@ import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import vazkii.botania.api.lexicon.ILexiconable;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.api.state.BotaniaStateProps;
|
||||
import vazkii.botania.api.state.enums.PotatoVariant;
|
||||
import vazkii.botania.client.core.handler.ClientTickHandler;
|
||||
import vazkii.botania.client.core.proxy.ClientProxy;
|
||||
import vazkii.botania.client.lib.LibRenderIDs;
|
||||
import vazkii.botania.common.achievement.ModAchievements;
|
||||
import vazkii.botania.common.block.BlockModContainer;
|
||||
@@ -48,17 +53,20 @@ public class BlockTinyPotato extends BlockModContainer implements ILexiconable {
|
||||
setUnlocalizedName(LibBlockNames.TINY_POTATO);
|
||||
float f = 1F / 16F * 6F;
|
||||
setBlockBounds(f, 0, f, 1F - f, f, 1F - f);
|
||||
setDefaultState(blockState.getBaseState().withProperty(BotaniaStateProps.CARDINALS, EnumFacing.SOUTH));
|
||||
setDefaultState(blockState.getBaseState()
|
||||
.withProperty(BotaniaStateProps.CARDINALS, EnumFacing.SOUTH)
|
||||
.withProperty(BotaniaStateProps.POTATO_VARIANT, PotatoVariant.DEFAULT)
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState createBlockState() {
|
||||
return new BlockState(this, BotaniaStateProps.CARDINALS);
|
||||
return new BlockState(this, BotaniaStateProps.CARDINALS, BotaniaStateProps.POTATO_VARIANT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetaFromState(IBlockState state) {
|
||||
switch (((EnumFacing) state.getValue(BotaniaStateProps.CARDINALS))) {
|
||||
switch (state.getValue(BotaniaStateProps.CARDINALS)) {
|
||||
case NORTH: return 0;
|
||||
case WEST: return 3;
|
||||
case EAST: return 1;
|
||||
@@ -82,6 +90,19 @@ public class BlockTinyPotato extends BlockModContainer implements ILexiconable {
|
||||
return getDefaultState().withProperty(BotaniaStateProps.CARDINALS, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IBlockState getActualState(IBlockState state, IBlockAccess world, BlockPos pos) {
|
||||
if (ClientProxy.dootDoot) {
|
||||
return state.withProperty(BotaniaStateProps.POTATO_VARIANT, PotatoVariant.HALLOWEEN);
|
||||
} else if (world.getTileEntity(pos) instanceof TileTinyPotato) {
|
||||
if (((TileTinyPotato) world.getTileEntity(pos)).name.toLowerCase().equals("kyle hyde")) {
|
||||
return state.withProperty(BotaniaStateProps.POTATO_VARIANT, PotatoVariant.GRAYSCALE);
|
||||
}
|
||||
}
|
||||
return state.withProperty(BotaniaStateProps.POTATO_VARIANT, PotatoVariant.DEFAULT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Block setUnlocalizedName(String par1Str) {
|
||||
GameRegistry.registerBlock(this, ItemBlockTinyPotato.class, par1Str);
|
||||
@@ -145,7 +166,7 @@ public class BlockTinyPotato extends BlockModContainer implements ILexiconable {
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return LibRenderIDs.idTinyPotato;
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,11 +18,13 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.fml.common.ObfuscationReflectionHelper;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.api.subtile.RadiusDescriptor;
|
||||
import vazkii.botania.api.subtile.SubTileFunctional;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
import vazkii.botania.common.lib.LibObfuscation;
|
||||
|
||||
public class SubTileDaffomill extends SubTileFunctional {
|
||||
|
||||
@@ -51,7 +53,7 @@ public class SubTileDaffomill extends SubTileFunctional {
|
||||
List<EntityItem> items = supertile.getWorld().getEntitiesWithinAABB(EntityItem.class, axis);
|
||||
int slowdown = getSlowdownFactor();
|
||||
for(EntityItem item : items)
|
||||
if(!item.isDead && item.getAge() >= slowdown) {
|
||||
if(!item.isDead && ((Integer) ObfuscationReflectionHelper.getPrivateValue(EntityItem.class, item, LibObfuscation.AGE)) >= slowdown) {
|
||||
item.motionX += orientation.getFrontOffsetX() * 0.05;
|
||||
item.motionY += orientation.getFrontOffsetY() * 0.05;
|
||||
item.motionZ += orientation.getFrontOffsetZ() * 0.05;
|
||||
|
||||
@@ -33,6 +33,7 @@ import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import net.minecraftforge.fml.common.ObfuscationReflectionHelper;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import scala.reflect.internal.util.WeakHashSet;
|
||||
@@ -43,6 +44,7 @@ import vazkii.botania.api.subtile.SubTileFunctional;
|
||||
import vazkii.botania.common.core.helper.InventoryHelper;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
import vazkii.botania.common.lib.LibMisc;
|
||||
import vazkii.botania.common.lib.LibObfuscation;
|
||||
|
||||
public class SubTileHopperhock extends SubTileFunctional {
|
||||
|
||||
@@ -73,7 +75,8 @@ public class SubTileHopperhock extends SubTileFunctional {
|
||||
int slowdown = getSlowdownFactor();
|
||||
|
||||
for(EntityItem item : items) {
|
||||
if(item.getAge() < (60 + slowdown) || item.getAge() >= 105 && item.getAge() < 110 || item.isDead)
|
||||
int age = ObfuscationReflectionHelper.getPrivateValue(EntityItem.class, item, LibObfuscation.AGE);
|
||||
if(age < (60 + slowdown) || age >= 105 && age < 110 || item.isDead)
|
||||
continue;
|
||||
|
||||
ItemStack stack = item.getEntityItem();
|
||||
|
||||
+2
-1
@@ -16,6 +16,7 @@ import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.passive.EntityAnimal;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraftforge.fml.common.ObfuscationReflectionHelper;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.api.subtile.RadiusDescriptor;
|
||||
import vazkii.botania.api.subtile.SubTileFunctional;
|
||||
@@ -45,7 +46,7 @@ public class SubTilePollidisiac extends SubTileFunctional {
|
||||
int love = ReflectionHelper.getPrivateValue(EntityAnimal.class, animal, LibObfuscation.IN_LOVE);
|
||||
if(animal.getGrowingAge() == 0 && love <= 0) {
|
||||
for(EntityItem item : items) {
|
||||
if(item.getAge() < (60 + slowdown) || item.isDead)
|
||||
if(((Integer) ObfuscationReflectionHelper.getPrivateValue(EntityItem.class, item, LibObfuscation.AGE)) < (60 + slowdown) || item.isDead)
|
||||
continue;
|
||||
|
||||
ItemStack stack = item.getEntityItem();
|
||||
|
||||
+2
-1
@@ -31,6 +31,7 @@ import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import net.minecraftforge.fml.common.ObfuscationReflectionHelper;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import vazkii.botania.api.item.IFlowerPlaceable;
|
||||
@@ -79,7 +80,7 @@ public class SubTileRannuncarpus extends SubTileFunctional {
|
||||
List<EntityItem> items = supertile.getWorld().getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(supertile.getPos().add(-RANGE, -RANGE_Y, -RANGE), supertile.getPos().add(RANGE + 1, RANGE_Y + 1, RANGE + 1)));
|
||||
int slowdown = getSlowdownFactor();
|
||||
for(EntityItem item : items) {
|
||||
if(item.getAge() < (60 + slowdown) || item.isDead)
|
||||
if(((Integer) ObfuscationReflectionHelper.getPrivateValue(EntityItem.class, item, LibObfuscation.AGE)) < (60 + slowdown) || item.isDead)
|
||||
continue;
|
||||
|
||||
ItemStack stack = item.getEntityItem();
|
||||
|
||||
+3
-1
@@ -20,6 +20,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraftforge.fml.common.ObfuscationReflectionHelper;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.api.mana.IManaItem;
|
||||
import vazkii.botania.api.subtile.RadiusDescriptor;
|
||||
@@ -28,6 +29,7 @@ import vazkii.botania.common.core.helper.MathHelper;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import vazkii.botania.common.lib.LibObfuscation;
|
||||
|
||||
public class SubTileSpectranthemum extends SubTileFunctional {
|
||||
|
||||
@@ -56,7 +58,7 @@ public class SubTileSpectranthemum extends SubTileFunctional {
|
||||
int slowdown = getSlowdownFactor();
|
||||
|
||||
for(EntityItem item : items) {
|
||||
if(item.getAge() < (60 + slowdown) || item.isDead || item.getEntityData().getBoolean(TAG_TELEPORTED))
|
||||
if(((Integer) ObfuscationReflectionHelper.getPrivateValue(EntityItem.class, item, LibObfuscation.AGE)) < (60 + slowdown) || item.isDead || item.getEntityData().getBoolean(TAG_TELEPORTED))
|
||||
continue;
|
||||
|
||||
ItemStack stack = item.getEntityItem();
|
||||
|
||||
@@ -19,12 +19,14 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntityFurnace;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraftforge.fml.common.ObfuscationReflectionHelper;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.api.subtile.RadiusDescriptor;
|
||||
import vazkii.botania.api.subtile.SubTileGenerating;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
import vazkii.botania.common.lib.LibObfuscation;
|
||||
|
||||
public class SubTileEndoflame extends SubTileGenerating {
|
||||
|
||||
@@ -47,7 +49,7 @@ public class SubTileEndoflame extends SubTileGenerating {
|
||||
|
||||
List<EntityItem> items = supertile.getWorld().getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(supertile.getPos().add(-RANGE, -RANGE, -RANGE), supertile.getPos().add(RANGE + 1, RANGE + 1, RANGE + 1)));
|
||||
for(EntityItem item : items) {
|
||||
if(item.getAge() >= (59 + slowdown) && !item.isDead) {
|
||||
if(((Integer) ObfuscationReflectionHelper.getPrivateValue(EntityItem.class, item, LibObfuscation.AGE)) >= (59 + slowdown) && !item.isDead) {
|
||||
ItemStack stack = item.getEntityItem();
|
||||
if(stack.getItem().hasContainerItem(stack))
|
||||
continue;
|
||||
|
||||
+3
-1
@@ -19,10 +19,12 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraftforge.fml.common.ObfuscationReflectionHelper;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.api.subtile.RadiusDescriptor;
|
||||
import vazkii.botania.api.subtile.SubTileGenerating;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
import vazkii.botania.common.lib.LibObfuscation;
|
||||
|
||||
public class SubTileGourmaryllis extends SubTileGenerating {
|
||||
|
||||
@@ -51,7 +53,7 @@ public class SubTileGourmaryllis extends SubTileGenerating {
|
||||
|
||||
for(EntityItem item : items) {
|
||||
ItemStack stack = item.getEntityItem();
|
||||
if(stack != null && stack.getItem() instanceof ItemFood && !item.isDead && item.getAge() >= slowdown) {
|
||||
if(stack != null && stack.getItem() instanceof ItemFood && !item.isDead && ((Integer) ObfuscationReflectionHelper.getPrivateValue(EntityItem.class, item, LibObfuscation.AGE)) >= slowdown) {
|
||||
if(cooldown == 0) {
|
||||
if(!remote) {
|
||||
int val = ((ItemFood) stack.getItem()).getHealAmount(stack);
|
||||
|
||||
@@ -26,12 +26,14 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
|
||||
import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraftforge.fml.common.ObfuscationReflectionHelper;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.api.subtile.RadiusDescriptor;
|
||||
import vazkii.botania.api.subtile.SubTileGenerating;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
import vazkii.botania.common.lib.LibObfuscation;
|
||||
|
||||
public class SubTileSpectrolus extends SubTileGenerating {
|
||||
|
||||
@@ -53,7 +55,7 @@ public class SubTileSpectrolus extends SubTileGenerating {
|
||||
|
||||
for(EntityItem item : items) {
|
||||
ItemStack stack = item.getEntityItem();
|
||||
if(stack != null && stack.getItem() == wool && !item.isDead && item.getAge() >= slowdown) {
|
||||
if(stack != null && stack.getItem() == wool && !item.isDead && ((Integer) ObfuscationReflectionHelper.getPrivateValue(EntityItem.class, item, LibObfuscation.AGE)) >= slowdown) {
|
||||
int meta = stack.getItemDamage();
|
||||
if(meta == nextColor) {
|
||||
if(!remote) {
|
||||
|
||||
@@ -124,11 +124,12 @@ public class TileAlfPortal extends TileMod implements ITickable {
|
||||
|
||||
@Override
|
||||
public void update() {
|
||||
AlfPortalState state = ((AlfPortalState) worldObj.getBlockState(getPos()).getValue(BotaniaStateProps.ALFPORTAL_STATE));
|
||||
if(state == AlfPortalState.OFF) {
|
||||
IBlockState iBlockState = worldObj.getBlockState(getPos());
|
||||
if(iBlockState.getBlock() != ModBlocks.alfPortal || iBlockState.getValue(BotaniaStateProps.ALFPORTAL_STATE) == AlfPortalState.OFF) {
|
||||
ticksOpen = 0;
|
||||
return;
|
||||
}
|
||||
AlfPortalState state = iBlockState.getValue(BotaniaStateProps.ALFPORTAL_STATE);
|
||||
AlfPortalState newState = getValidState();
|
||||
|
||||
if(!hasUnloadedParts) {
|
||||
|
||||
@@ -35,10 +35,10 @@ public class TileManaBeacon extends TileMod implements ITickable {
|
||||
int b = (hex & 0xFF);
|
||||
|
||||
Botania.proxy.setWispFXDistanceLimit(false);
|
||||
Botania.proxy.wispFX(worldObj, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, r, g, b, (float) Math.random() * 5 + 1F, (float) (Math.random() - 0.5F), 10F * (float) Math.sqrt(256F / (256F - pos.getY())), (float) (Math.random() - 0.5F));
|
||||
Botania.proxy.wispFX(worldObj, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, r / 255F, g / 255F, b / 255F, (float) Math.random() * 5 + 1F, (float) (Math.random() - 0.5F), 10F * (float) Math.sqrt(256F / (256F - pos.getY())), (float) (Math.random() - 0.5F));
|
||||
|
||||
for(int i = 0; i < 2; i++)
|
||||
Botania.proxy.wispFX(worldObj, pos.getX() + 0.5, 256, pos.getZ() + 0.5, r, g, b, (float) Math.random() * 15 + 8F, (float) (Math.random() - 0.5F) * 8F, 0F, (float) (Math.random() - 0.5F) * 8F);
|
||||
Botania.proxy.wispFX(worldObj, pos.getX() + 0.5, 256, pos.getZ() + 0.5, r / 255F, g / 255F, b / 255F, (float) Math.random() * 15 + 8F, (float) (Math.random() - 0.5F) * 8F, 0F, (float) (Math.random() - 0.5F) * 8F);
|
||||
Botania.proxy.setWispFXDistanceLimit(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,11 +76,11 @@ public class TilePylon extends TileEntity implements ITickable {
|
||||
int b = (hex & 0xFF);
|
||||
|
||||
if(worldObj.rand.nextInt(4) == 0)
|
||||
Botania.proxy.sparkleFX(worldObj, centerBlock.x + (Math.random() - 0.5) * 0.5, centerBlock.y, centerBlock.z + (Math.random() - 0.5) * 0.5, r, g, b, (float) Math.random(), 8);
|
||||
Botania.proxy.sparkleFX(worldObj, centerBlock.x + (Math.random() - 0.5) * 0.5, centerBlock.y, centerBlock.z + (Math.random() - 0.5) * 0.5, r / 255F, g / 255F, b / 255F, (float) Math.random(), 8);
|
||||
|
||||
Botania.proxy.wispFX(worldObj, pos.getX() + 0.5 + (Math.random() - 0.5) * 0.25, pos.getY() - 0.5, pos.getZ() + 0.5 + (Math.random() - 0.5) * 0.25, r, g, b, (float) Math.random() / 3F, -0.04F);
|
||||
Botania.proxy.wispFX(worldObj, pos.getX() + 0.5 + (Math.random() - 0.5) * 0.125, pos.getY() + 1.5, pos.getZ() + 0.5 + (Math.random() - 0.5) * 0.125, r, g, b, (float) Math.random() / 5F, -0.001F);
|
||||
Botania.proxy.wispFX(worldObj, pos.getX() + 0.5 + (Math.random() - 0.5) * 0.25, pos.getY() + 1.5, pos.getZ() + 0.5 + (Math.random() - 0.5) * 0.25, r, g, b, (float) Math.random() / 8F, (float) movementVector.x, (float) movementVector.y, (float) movementVector.z);
|
||||
Botania.proxy.wispFX(worldObj, pos.getX() + 0.5 + (Math.random() - 0.5) * 0.25, pos.getY() - 0.5, pos.getZ() + 0.5 + (Math.random() - 0.5) * 0.25, r / 255F, g / 255F, b / 255F, (float) Math.random() / 3F, -0.04F);
|
||||
Botania.proxy.wispFX(worldObj, pos.getX() + 0.5 + (Math.random() - 0.5) * 0.125, pos.getY() + 1.5, pos.getZ() + 0.5 + (Math.random() - 0.5) * 0.125, r / 255F, g / 255F, b / 255F, (float) Math.random() / 5F, -0.001F);
|
||||
Botania.proxy.wispFX(worldObj, pos.getX() + 0.5 + (Math.random() - 0.5) * 0.25, pos.getY() + 1.5, pos.getZ() + 0.5 + (Math.random() - 0.5) * 0.25, r / 255F, g / 255F, b / 255F, (float) Math.random() / 8F, (float) movementVector.x, (float) movementVector.y, (float) movementVector.z);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,7 +142,8 @@ public class TilePool extends TileMod implements IManaPool, IDyablePool, IKeyLoc
|
||||
item.setDead();
|
||||
}
|
||||
|
||||
if(item.getAge() > 100 && item.getAge() < 130 || !catalystsRegistered)
|
||||
int age = ObfuscationReflectionHelper.getPrivateValue(EntityItem.class, item, LibObfuscation.AGE);
|
||||
if(age > 100 && age < 130 || !catalystsRegistered)
|
||||
return false;
|
||||
|
||||
for(RecipeManaInfusion recipe : BotaniaAPI.manaInfusionRecipes) {
|
||||
|
||||
@@ -71,8 +71,8 @@ public class ModBrewRecipes {
|
||||
}
|
||||
|
||||
public static void initTC() {
|
||||
Item resource = Item.itemRegistry.getObject(new ResourceLocation("Thaumcraft", "ItemResource"));
|
||||
Item bathSalts = Item.itemRegistry.getObject(new ResourceLocation("Thaumcraft", "ItemBathSalts"));
|
||||
Item resource = Item.itemRegistry.getObject(new ResourceLocation("thaumcraft", "salis_mundus"));
|
||||
Item bathSalts = Item.itemRegistry.getObject(new ResourceLocation("thaumcraft", "bath_salts"));
|
||||
|
||||
warpWardBrew = BotaniaAPI.registerBrewRecipe(ModBrews.warpWard, new ItemStack(Items.nether_wart), new ItemStack(resource, 1, 14), new ItemStack(bathSalts), new ItemStack(resource, 1, 6));
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.api.state.enums.FutureStoneVariant;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.block.ModFluffBlocks;
|
||||
@@ -163,10 +164,6 @@ public final class ModCraftingRecipes {
|
||||
public static IRecipe recipeVineBall;
|
||||
public static IRecipe recipeSlingshot;
|
||||
public static IRecipe recipeMossStone;
|
||||
public static IRecipe recipePrismarine;
|
||||
public static IRecipe recipePrismarineBrick;
|
||||
public static IRecipe recipeDarkPrismarine;
|
||||
public static IRecipe recipeSeaLamp;
|
||||
public static IRecipe recipeLensInfluence;
|
||||
public static IRecipe recipeLensWeight;
|
||||
public static IRecipe recipeLensPaint;
|
||||
@@ -264,7 +261,6 @@ public final class ModCraftingRecipes {
|
||||
public static List<IRecipe> recipesPetalsDouble;
|
||||
public static IRecipe recipeKeepIvy;
|
||||
public static IRecipe recipeBlackHoleTalisman;
|
||||
public static List<IRecipe> recipe18StonePolish;
|
||||
public static List<IRecipe> recipe18StoneBrick;
|
||||
public static List<IRecipe> recipe18StoneChisel;
|
||||
public static IRecipe recipeBlazeBlock;
|
||||
@@ -323,6 +319,22 @@ public final class ModCraftingRecipes {
|
||||
public static void init() {
|
||||
int recipeListSize = CraftingManager.getInstance().getRecipeList().size();
|
||||
|
||||
// The future is now (botania -> vanilla recipes for future added items and blocks)
|
||||
addShapelessOreDictRecipe(new ItemStack(Items.prismarine_shard), new ItemStack(ModItems.manaResource, 1, 10));
|
||||
|
||||
addShapelessOreDictRecipe(new ItemStack(Blocks.prismarine, 1, 0), new ItemStack(ModBlocks.prismarine, 1, 0));
|
||||
addShapelessOreDictRecipe(new ItemStack(Blocks.prismarine, 1, 1), new ItemStack(ModBlocks.prismarine, 1, 1));
|
||||
addShapelessOreDictRecipe(new ItemStack(Blocks.prismarine, 1, 2), new ItemStack(ModBlocks.prismarine, 1, 2));
|
||||
|
||||
addShapelessOreDictRecipe(new ItemStack(Blocks.sea_lantern), new ItemStack(ModBlocks.seaLamp));
|
||||
|
||||
addShapelessOreDictRecipe(new ItemStack(Blocks.stone, 1, 1), new ItemStack(ModFluffBlocks.stone, 1, FutureStoneVariant.GRANITE.ordinal()));
|
||||
addShapelessOreDictRecipe(new ItemStack(Blocks.stone, 1, 2), new ItemStack(ModFluffBlocks.stone, 1, FutureStoneVariant.POLISHED_GRANITE.ordinal()));
|
||||
addShapelessOreDictRecipe(new ItemStack(Blocks.stone, 1, 3), new ItemStack(ModFluffBlocks.stone, 1, FutureStoneVariant.DIORITE.ordinal()));
|
||||
addShapelessOreDictRecipe(new ItemStack(Blocks.stone, 1, 4), new ItemStack(ModFluffBlocks.stone, 1, FutureStoneVariant.POLISHED_DIORITE.ordinal()));
|
||||
addShapelessOreDictRecipe(new ItemStack(Blocks.stone, 1, 5), new ItemStack(ModFluffBlocks.stone, 1, FutureStoneVariant.ANDESITE.ordinal()));
|
||||
addShapelessOreDictRecipe(new ItemStack(Blocks.stone, 1, 6), new ItemStack(ModFluffBlocks.stone, 1, FutureStoneVariant.POLISHED_ANDESITE.ordinal()));
|
||||
|
||||
// Lexicon Recipe
|
||||
addShapelessOreDictRecipe(new ItemStack(ModItems.lexicon), "treeSapling", Items.book);
|
||||
recipeLexicon = BotaniaAPI.getLatestAddedRecipe();
|
||||
@@ -1104,34 +1116,6 @@ public final class ModCraftingRecipes {
|
||||
addShapelessOreDictRecipe(new ItemStack(Blocks.mossy_cobblestone), "cobblestone", new ItemStack(ModItems.vineBall));
|
||||
recipeMossStone = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
// Prismarine Recipe
|
||||
addOreDictRecipe(new ItemStack(ModBlocks.prismarine, 1, 0),
|
||||
" S ", "SBS", " S ",
|
||||
'S', LibOreDict.PRISMARINE_SHARD,
|
||||
'B', "cobblestone");
|
||||
recipePrismarine = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
// Prismarine Brick Recipe
|
||||
addOreDictRecipe(new ItemStack(ModBlocks.prismarine, 1, 1),
|
||||
" S ", "SBS", " S ",
|
||||
'S', LibOreDict.PRISMARINE_SHARD,
|
||||
'B', new ItemStack(Blocks.stonebrick));
|
||||
recipePrismarineBrick = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
// Dark Prismarine Recipe
|
||||
addOreDictRecipe(new ItemStack(ModBlocks.prismarine, 1, 2),
|
||||
" S ", "SBS", " S ",
|
||||
'S', LibOreDict.PRISMARINE_SHARD,
|
||||
'B', new ItemStack(Blocks.nether_brick));
|
||||
recipeDarkPrismarine = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
// Sea Lantern Recipe
|
||||
addOreDictRecipe(new ItemStack(ModBlocks.seaLamp),
|
||||
" S ", "SBS", " S ",
|
||||
'S', LibOreDict.PRISMARINE_SHARD,
|
||||
'B', "glowstone");
|
||||
recipeSeaLamp = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
// Influence Lens Recipe
|
||||
addOreDictRecipe(new ItemStack(ModItems.lens, 1, 12),
|
||||
"PRP", "PLP", "PPP",
|
||||
@@ -1245,7 +1229,7 @@ public final class ModCraftingRecipes {
|
||||
"BSB", "PMP", "PEP",
|
||||
'B', new ItemStack(Items.blaze_rod),
|
||||
'S', LibOreDict.ELEMENTIUM,
|
||||
'P', new ItemStack(ModBlocks.prismarine, 1, 2),
|
||||
'P', new ItemStack(Blocks.prismarine, 1, 2),
|
||||
'M', new ItemStack(ModBlocks.storage),
|
||||
'E', LibOreDict.ENDER_AIR_BOTTLE);
|
||||
recipeSpawnerClaw = BotaniaAPI.getLatestAddedRecipe();
|
||||
@@ -1801,15 +1785,9 @@ public final class ModCraftingRecipes {
|
||||
recipeBlackHoleTalisman = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
// 1.8 Stone Recipes
|
||||
recipe18StonePolish = new ArrayList();
|
||||
recipe18StoneBrick = new ArrayList();
|
||||
recipe18StoneChisel = new ArrayList();
|
||||
for(int i = 0; i < 4; i++) {
|
||||
addOreDictRecipe(new ItemStack(ModFluffBlocks.stone, 8, i + 4),
|
||||
"SSS", "S S", "SSS",
|
||||
'S', LibOreDict.STONE_18_VARIANTS[i]);
|
||||
recipe18StonePolish.add(BotaniaAPI.getLatestAddedRecipe());
|
||||
|
||||
addOreDictRecipe(new ItemStack(ModFluffBlocks.stone, 4, i + 8),
|
||||
"SS", "SS",
|
||||
'S', LibOreDict.STONE_18_VARIANTS[i]);
|
||||
@@ -2169,7 +2147,7 @@ public final class ModCraftingRecipes {
|
||||
|
||||
// Revealing Helmet Recipes
|
||||
if(Botania.thaumcraftLoaded) {
|
||||
Item goggles = Item.itemRegistry.getObject(new ResourceLocation("Thaumcraft:ItemGoggles"));
|
||||
Item goggles = Item.itemRegistry.getObject(new ResourceLocation("thaumcraft", "goggles"));
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.manasteelHelmRevealing), new ItemStack(ModItems.manasteelHelm), goggles);
|
||||
recipeHelmetOfRevealing = BotaniaAPI.getLatestAddedRecipe(); //We want manasteel to show in the Lexicon
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.terrasteelHelmRevealing), new ItemStack(ModItems.terrasteelHelm), goggles);
|
||||
@@ -2183,6 +2161,9 @@ public final class ModCraftingRecipes {
|
||||
addStairsAndSlabs(ModBlocks.livingrock, 1, ModFluffBlocks.livingrockBrickStairs, ModFluffBlocks.livingrockBrickSlab);
|
||||
addStairsAndSlabs(ModBlocks.dreamwood, 0, ModFluffBlocks.dreamwoodStairs, ModFluffBlocks.dreamwoodSlab);
|
||||
addStairsAndSlabs(ModBlocks.dreamwood, 1, ModFluffBlocks.dreamwoodPlankStairs, ModFluffBlocks.dreamwoodPlankSlab);
|
||||
addStairsAndSlabs(Blocks.prismarine, 0, ModFluffBlocks.prismarineStairs, ModFluffBlocks.prismarineSlab);
|
||||
addStairsAndSlabs(Blocks.prismarine, 1, ModFluffBlocks.prismarineBrickStairs, ModFluffBlocks.prismarineBrickSlab);
|
||||
addStairsAndSlabs(Blocks.prismarine, 2, ModFluffBlocks.darkPrismarineStairs, ModFluffBlocks.darkPrismarineSlab);
|
||||
addStairsAndSlabs(ModBlocks.prismarine, 0, ModFluffBlocks.prismarineStairs, ModFluffBlocks.prismarineSlab);
|
||||
addStairsAndSlabs(ModBlocks.prismarine, 1, ModFluffBlocks.prismarineBrickStairs, ModFluffBlocks.prismarineBrickSlab);
|
||||
addStairsAndSlabs(ModBlocks.prismarine, 2, ModFluffBlocks.darkPrismarineStairs, ModFluffBlocks.darkPrismarineSlab);
|
||||
@@ -2200,12 +2181,19 @@ public final class ModCraftingRecipes {
|
||||
addWall(ModBlocks.livingrock, 0, ModFluffBlocks.livingrockWall, 0);
|
||||
addWall(ModBlocks.livingwood, 0, ModFluffBlocks.livingwoodWall, 0);
|
||||
addWall(ModBlocks.dreamwood, 0, ModFluffBlocks.dreamwoodWall, 0);
|
||||
addWall(Blocks.prismarine, 0, ModFluffBlocks.prismarineWall, 0);
|
||||
addWall(ModBlocks.prismarine, 0, ModFluffBlocks.prismarineWall, 0);
|
||||
addWall(ModBlocks.reedBlock, 0, ModFluffBlocks.reedWall, 0);
|
||||
for(int i = 0; i < 8; i++)
|
||||
addWall(ModFluffBlocks.biomeStoneA, i + 8, ModFluffBlocks.biomeStoneWall, i);
|
||||
for(int i = 0; i < 4; i++)
|
||||
addWall(ModFluffBlocks.stone, i, ModFluffBlocks.stoneWall, i);
|
||||
|
||||
addWall(ModFluffBlocks.stone, 0, ModFluffBlocks.stoneWall, 0); // Andesite todo 1.8 convert to OreDict?
|
||||
addWall(Blocks.stone, 5, ModFluffBlocks.stoneWall, 0);
|
||||
addWall(ModFluffBlocks.stone, 1, ModFluffBlocks.stoneWall, 1); // Basalt
|
||||
addWall(ModFluffBlocks.stone, 2, ModFluffBlocks.stoneWall, 2); // Diorite
|
||||
addWall(Blocks.stone, 3, ModFluffBlocks.stoneWall, 2); // Diorite
|
||||
addWall(ModFluffBlocks.stone, 3, ModFluffBlocks.stoneWall, 3); // Granite
|
||||
addWall(Blocks.stone, 1, ModFluffBlocks.stoneWall, 3); // Granite
|
||||
|
||||
// Pane Recipes
|
||||
addPane(ModBlocks.manaGlass, ModFluffBlocks.managlassPane);
|
||||
@@ -2222,11 +2210,23 @@ public final class ModCraftingRecipes {
|
||||
addStairsAndSlabs(ModFluffBlocks.biomeStoneB, i, ModFluffBlocks.biomeStoneStairs[i + 16], ModFluffBlocks.biomeStoneSlabs[i + 16]);
|
||||
}
|
||||
|
||||
// 1.8 Block Stone Stairs & Slabs
|
||||
for(int i = 0; i < 4; i++) {
|
||||
addStairsAndSlabs(ModFluffBlocks.stone, i, ModFluffBlocks.stoneStairs[i], ModFluffBlocks.stoneSlabs[i]);
|
||||
addStairsAndSlabs(ModFluffBlocks.stone, i + 8, ModFluffBlocks.stoneStairs[i + 4], ModFluffBlocks.stoneSlabs[i + 4]);
|
||||
}
|
||||
// Andesite Basalt Diorite Granite Stair/Slab todo 1.8 convert to oredict?
|
||||
addStairsAndSlabs(ModFluffBlocks.stone, 0, ModFluffBlocks.stoneStairs[0], ModFluffBlocks.stoneSlabs[0]);
|
||||
addStairsAndSlabs(Blocks.stone, 5, ModFluffBlocks.stoneStairs[0], ModFluffBlocks.stoneSlabs[0]);
|
||||
|
||||
addStairsAndSlabs(ModFluffBlocks.stone, 1, ModFluffBlocks.stoneStairs[1], ModFluffBlocks.stoneSlabs[1]);
|
||||
|
||||
addStairsAndSlabs(ModFluffBlocks.stone, 2, ModFluffBlocks.stoneStairs[2], ModFluffBlocks.stoneSlabs[2]);
|
||||
addStairsAndSlabs(Blocks.stone, 3, ModFluffBlocks.stoneStairs[2], ModFluffBlocks.stoneSlabs[2]);
|
||||
|
||||
addStairsAndSlabs(ModFluffBlocks.stone, 3, ModFluffBlocks.stoneStairs[3], ModFluffBlocks.stoneSlabs[3]);
|
||||
addStairsAndSlabs(Blocks.stone, 1, ModFluffBlocks.stoneStairs[3], ModFluffBlocks.stoneSlabs[3]);
|
||||
|
||||
// Andesite Basalt Diorite Granite Bricks Stair/Slab
|
||||
addStairsAndSlabs(ModFluffBlocks.stone, 8, ModFluffBlocks.stoneStairs[4], ModFluffBlocks.stoneSlabs[4]);
|
||||
addStairsAndSlabs(ModFluffBlocks.stone, 9, ModFluffBlocks.stoneStairs[5], ModFluffBlocks.stoneSlabs[5]);
|
||||
addStairsAndSlabs(ModFluffBlocks.stone, 10, ModFluffBlocks.stoneStairs[6], ModFluffBlocks.stoneSlabs[6]);
|
||||
addStairsAndSlabs(ModFluffBlocks.stone, 11, ModFluffBlocks.stoneStairs[7], ModFluffBlocks.stoneSlabs[7]);
|
||||
|
||||
// Pavement Stairsm & Stairs
|
||||
for(int i = 0; i < ModFluffBlocks.pavementStairs.length; i++)
|
||||
|
||||
@@ -129,13 +129,14 @@ public final class ModManaAlchemyRecipes {
|
||||
|
||||
coarseDirtRecipe = BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.dirt, 1, 1), new ItemStack(Blocks.dirt), 120);
|
||||
|
||||
prismarineRecipe = BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(ModItems.manaResource, 1, 10), new ItemStack(Items.quartz), 200);
|
||||
prismarineRecipe = BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Items.prismarine_shard), new ItemStack(Items.quartz), 200);
|
||||
|
||||
if(ConfigHandler.stones18Enabled) {
|
||||
stoneRecipes = new ArrayList();
|
||||
stoneRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(ModFluffBlocks.stone), "stone", 200));
|
||||
for(int i = 0; i < 4; i++)
|
||||
stoneRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(ModFluffBlocks.stone, 1, i), new ItemStack(ModFluffBlocks.stone, 1, i == 0 ? 3 : i - 1), 200));
|
||||
stoneRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.stone, 1, 5), "stone", 200)); // Stone->Andesite todo 1.8.8 might want to un-OD this?
|
||||
stoneRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.stone, 1, 3), new ItemStack(Blocks.stone, 1, 5), 200)); // Andesite->Diorite
|
||||
stoneRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.stone, 1, 1), new ItemStack(Blocks.stone, 1, 3), 200)); // Diorite->Granite
|
||||
stoneRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.stone, 1, 5), new ItemStack(Blocks.stone, 1, 1), 200)); // Granite->Andesite
|
||||
}
|
||||
|
||||
tallgrassRecipes = new ArrayList();
|
||||
|
||||
@@ -75,7 +75,7 @@ public final class ModManaInfusionRecipes {
|
||||
tinyPotatoRecipe = BotaniaAPI.registerManaInfusionRecipe(new ItemStack(ModBlocks.tinyPotato), new ItemStack(Items.potato), 1337);
|
||||
|
||||
if(Botania.thaumcraftLoaded) {
|
||||
Item inkwell = Item.itemRegistry.getObject(new ResourceLocation("Thaumcraft:ItemInkwell"));
|
||||
Item inkwell = Item.itemRegistry.getObject(new ResourceLocation("thaumcraft", "scribing_tools"));
|
||||
manaInkwellRecipe = BotaniaAPI.registerManaInfusionRecipe(new ItemStack(ModItems.manaInkwell), new ItemStack(inkwell), 35000);
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ public class HelmRevealingRecipe implements IRecipe {
|
||||
|
||||
@Override
|
||||
public boolean matches(InventoryCrafting var1, World var2) {
|
||||
Item goggles = Item.itemRegistry.getObject(new ResourceLocation("Thaumcraft", "ItemGoggles"));
|
||||
Item goggles = Item.itemRegistry.getObject(new ResourceLocation("thaumcraft", "goggles"));
|
||||
if(goggles == null)
|
||||
return false; // NO TC loaded
|
||||
|
||||
|
||||
@@ -52,10 +52,10 @@ public class EntitySignalFlare extends Entity {
|
||||
|
||||
Botania.proxy.setWispFXDistanceLimit(false);
|
||||
for(int i = 0; i < 3; i++)
|
||||
Botania.proxy.wispFX(worldObj, posX, posY, posZ + 0.5, r, g, b, (float) Math.random() * 5 + 1F, (float) (Math.random() - 0.5F), 10F * (float) Math.sqrt(256F / (256F - (float) posY)), (float) (Math.random() - 0.5F));
|
||||
Botania.proxy.wispFX(worldObj, posX, posY, posZ + 0.5, r / 255F, g / 255F, b / 255F, (float) Math.random() * 5 + 1F, (float) (Math.random() - 0.5F), 10F * (float) Math.sqrt(256F / (256F - (float) posY)), (float) (Math.random() - 0.5F));
|
||||
|
||||
for(int i = 0; i < 4; i++)
|
||||
Botania.proxy.wispFX(worldObj, posX + 0.5, 256, posZ + 0.5, r, g, b, (float) Math.random() * 15 + 8F, (float) (Math.random() - 0.5F) * 8F, 0F, (float) (Math.random() - 0.5F) * 8F);
|
||||
Botania.proxy.wispFX(worldObj, posX + 0.5, 256, posZ + 0.5, r / 255F, g / 255F, b / 255F, (float) Math.random() * 15 + 8F, (float) (Math.random() - 0.5F) * 8F, 0F, (float) (Math.random() - 0.5F) * 8F);
|
||||
Botania.proxy.setWispFXDistanceLimit(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,12 +10,19 @@
|
||||
*/
|
||||
package vazkii.botania.common.item.block;
|
||||
|
||||
import java.awt.*;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import vazkii.botania.api.state.enums.PoolVariant;
|
||||
import vazkii.botania.client.core.handler.ClientTickHandler;
|
||||
|
||||
public class ItemBlockPool extends ItemBlockWithMetadataAndName {
|
||||
|
||||
@@ -30,4 +37,15 @@ public class ItemBlockPool extends ItemBlockWithMetadataAndName {
|
||||
par3List.add(StatCollector.translateToLocal("botaniamisc.creativePool" + i));
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getColorFromItemStack(ItemStack stack, int renderPass) {
|
||||
if (stack.getItemDamage() == PoolVariant.FABULOUS.ordinal() && renderPass == 0) {
|
||||
float time = ClientTickHandler.ticksInGame + ClientTickHandler.partialTicks;
|
||||
return Color.getHSBColor(time * 0.005F, 0.6F, 1F).hashCode();
|
||||
} else {
|
||||
return 16777215;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+1
@@ -117,6 +117,7 @@ public class ItemManasteelArmor extends ItemArmor implements ISpecialArmor, IMan
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) {
|
||||
if(ConfigHandler.enableArmorModels) {
|
||||
armorSlot--; // 1.8: mojang is dumb and made armorSlot 1-4 instead of 0-3.
|
||||
ModelBiped model = getArmorModelForSlot(entityLiving, itemStack, armorSlot);
|
||||
if(model == null)
|
||||
model = provideArmorModelForSlot(itemStack, armorSlot);
|
||||
|
||||
Loaded 100 of 125 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user