[ci skip] spotlessApply with the new settings

This commit is contained in:
Jason Mitchell committed 2023-01-28 20:08:15 -08:00
1 parent 79fe543ef8
commit da6558839a
284 files changed
+4465 -4782

No files matched your search

@@ -1,16 +1,16 @@
package makeo.gadomancy.api;
import java.util.Random;
import net.minecraft.entity.Entity;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.world.World;
import thaumcraft.api.aspects.Aspect;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by HellFirePvP @ 17.11.2015 14:36
*/
@@ -19,11 +19,11 @@ public abstract class AuraEffect {
/**
* Return the EffectType you want to use here.
*
* EffectType.ENTITY_EFFECT selects entities within {@link AuraEffect#getRange()}
* range and fires the Entity-related methods
* EffectType.ENTITY_EFFECT selects entities within {@link AuraEffect#getRange()} range and fires the Entity-related
* methods
*
* EffectType.BLOCK_EFFECT selects random locations within {@link #getRange()}
* range and fires {@link #doBlockEffect(net.minecraft.util.ChunkCoordinates, net.minecraft.util.ChunkCoordinates, net.minecraft.world.World)}
* EffectType.BLOCK_EFFECT selects random locations within {@link #getRange()} range and fires
* {@link #doBlockEffect(net.minecraft.util.ChunkCoordinates, net.minecraft.util.ChunkCoordinates, net.minecraft.world.World)}
*
* Returning null will cause BOTH effects to happen and thus, both should be implemented.
*/
@@ -33,7 +33,8 @@ public abstract class AuraEffect {
* Only fired when {@link #getEffectType()} returns {@link makeo.gadomancy.api.AuraEffect.EffectType#ENTITY_EFFECT}
*
* @param e an entity to check if it should be handled.
* @return if the entity should be handled with {@link #doEntityEffect(net.minecraft.util.ChunkCoordinates, net.minecraft.entity.Entity)}
* @return if the entity should be handled with
* {@link #doEntityEffect(net.minecraft.util.ChunkCoordinates, net.minecraft.entity.Entity)}
*/
public abstract boolean isEntityApplicable(Entity e);
@@ -42,7 +43,7 @@ public abstract class AuraEffect {
* Do the actual effect on the Entity here.
*
* @param originTile where the master tile of the aura pylon is.
* @param e an entity where {@link #isEntityApplicable(net.minecraft.entity.Entity)} returned true
* @param e an entity where {@link #isEntityApplicable(net.minecraft.entity.Entity)} returned true
*/
public abstract void doEntityEffect(ChunkCoordinates originTile, Entity e);
@@ -58,9 +59,9 @@ public abstract class AuraEffect {
* Only fired when {@link #getEffectType()} returns {@link makeo.gadomancy.api.AuraEffect.EffectType#BLOCK_EFFECT}
* Do the actual effect on a block here.
*
* @param originTile where the master tile of the aura pylon is.
* @param originTile where the master tile of the aura pylon is.
* @param selectedBlock a selected block
* @param world world of the tile and the block
* @param world world of the tile and the block
*/
public abstract void doBlockEffect(ChunkCoordinates originTile, ChunkCoordinates selectedBlock, World world);
@@ -74,10 +75,8 @@ public abstract class AuraEffect {
/**
* Get the range of the aura pylon's effect
*
* Defines
* - the range where entities are collected around the pylon.
* - the range where blocks are collected around the pylon.
* - how close the player has to be to get the aura's research
* Defines - the range where entities are collected around the pylon. - the range where blocks are collected around
* the pylon. - how close the player has to be to get the aura's research
*/
public double getRange() {
return 8;
@@ -4,14 +4,13 @@ import net.minecraft.block.Block;
import net.minecraft.world.World;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by makeo @ 11.10.2015 12:09
*/
public abstract class ClickBehavior {
protected World world;
protected Block block;
protected int x, y, z, metadata;
@@ -1,23 +1,25 @@
package makeo.gadomancy.api;
import java.util.List;
import makeo.gadomancy.api.golems.AdditionalGolemType;
import makeo.gadomancy.api.golems.cores.AdditionalGolemCore;
import makeo.gadomancy.api.internal.IApiHandler;
import net.minecraft.item.ItemStack;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.common.entities.golems.EntityGolemBase;
import thaumcraft.common.entities.golems.EnumGolemType;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by makeo @ 26.07.2015 19:00
*/
public abstract class GadomancyApi {
private static IApiHandler handler;
public static void setInstance(IApiHandler handler) {
@@ -5,17 +5,17 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.util.ResourceLocation;
import thaumcraft.common.entities.golems.EnumGolemType;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by makeo @ 26.07.2015 20:55
*/
public abstract class AdditionalGolemType {
private EnumGolemType enumEntry;
private Item placerItem;
private String modId;
@@ -29,15 +29,8 @@ public abstract class AdditionalGolemType {
public final int regenDelay;
public final int strength;
public AdditionalGolemType(
int maxHealth,
int armor,
float movementSpeed,
boolean fireResist,
int upgradeAmount,
int carryLimit,
int regenDelay,
int strength) {
public AdditionalGolemType(int maxHealth, int armor, float movementSpeed, boolean fireResist, int upgradeAmount,
int carryLimit, int regenDelay, int strength) {
this.maxHealth = maxHealth;
this.armor = armor;
this.movementSpeed = movementSpeed;
@@ -2,27 +2,28 @@ package makeo.gadomancy.api.golems.cores;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import thaumcraft.common.entities.golems.EntityGolemBase;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by makeo @ 11.08.2015 14:10
*/
public abstract class AdditionalGolemCore {
private String name;
/**
* Init your AI stuff here
*
* @param golem the golem entity
*/
public abstract void setupGolem(EntityGolemBase golem);
/**
* @return If the golem has a gui
* @return If the golem has a gui
*/
public abstract boolean hasGui();
@@ -34,10 +35,10 @@ public abstract class AdditionalGolemCore {
}
/**
* Open custom a gui here
* Only called if hasGui is true
* Open custom a gui here Only called if hasGui is true
*
* @param player player entity
* @param golem golem entity
* @param golem golem entity
* @return false -> open default gui true -> no gui
*/
public boolean openGui(EntityPlayer player, EntityGolemBase golem) {
@@ -1,19 +1,19 @@
package makeo.gadomancy.api.golems.events;
import cpw.mods.fml.common.eventhandler.Event;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import thaumcraft.common.entities.golems.EntityGolemBase;
import cpw.mods.fml.common.eventhandler.Event;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by makeo @ 14.10.2015 14:09
*/
public class GolemDropPlacerEvent extends Event {
public final EntityPlayer player;
public final EntityItem placer;
public final EntityGolemBase golem;
@@ -1,19 +1,19 @@
package makeo.gadomancy.api.golems.events;
import cpw.mods.fml.common.eventhandler.Event;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import thaumcraft.common.entities.golems.EntityGolemBase;
import cpw.mods.fml.common.eventhandler.Event;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by makeo @ 14.10.2015 14:09
*/
public class PlacerCreateGolemEvent extends Event {
public final EntityPlayer player;
public final ItemStack placer;
public final EntityGolemBase golem;
@@ -1,23 +1,25 @@
package makeo.gadomancy.api.internal;
import java.util.List;
import makeo.gadomancy.api.AuraEffect;
import makeo.gadomancy.api.ClickBehavior;
import makeo.gadomancy.api.golems.AdditionalGolemType;
import makeo.gadomancy.api.golems.cores.AdditionalGolemCore;
import net.minecraft.item.ItemStack;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.common.entities.golems.EntityGolemBase;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by makeo @ 14.10.2015 14:28
*/
public interface IApiHandler {
boolean registerAdditionalGolemType(String name, String modId, AdditionalGolemType newType);
AdditionalGolemType getAdditionalGolemType(String name);
@@ -1,13 +1,9 @@
package makeo.gadomancy.client;
import cpw.mods.fml.client.registry.ClientRegistry;
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.FMLLog;
import java.util.ArrayDeque;
import java.util.List;
import java.util.Queue;
import makeo.gadomancy.client.effect.EffectHandler;
import makeo.gadomancy.client.events.ClientHandler;
import makeo.gadomancy.client.events.RenderEventHandler;
@@ -29,6 +25,7 @@ import makeo.gadomancy.common.entities.EntityPermNoClipItem;
import makeo.gadomancy.common.registration.RegisteredBlocks;
import makeo.gadomancy.common.registration.RegisteredItems;
import makeo.gadomancy.common.utils.Injector;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.client.resources.IResourceManager;
@@ -41,6 +38,7 @@ import net.minecraft.world.World;
import net.minecraftforge.client.MinecraftForgeClient;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.util.ForgeDirection;
import thaumcraft.client.gui.GuiGolem;
import thaumcraft.client.renderers.entity.RenderGolemBase;
import thaumcraft.client.renderers.entity.RenderSpecialItem;
@@ -50,16 +48,20 @@ import thaumcraft.common.entities.golems.EntityGolemBase;
import thaumcraft.common.tiles.TileEldritchAltar;
import thaumcraft.common.tiles.TileEldritchCap;
import thaumcraft.common.tiles.TileEldritchObelisk;
import cpw.mods.fml.client.registry.ClientRegistry;
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.FMLLog;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by makeo @ 29.11.2014 14:15
*/
public class ClientProxy extends CommonProxy {
@Override
public void preInitalize() {
super.preInitalize();
@@ -95,14 +97,16 @@ public class ClientProxy extends CommonProxy {
RenderTileManipulationFocus renderTileManipulationFocus = new RenderTileManipulationFocus();
ClientRegistry.bindTileEntitySpecialRenderer(TileManipulationFocus.class, renderTileManipulationFocus);
ClientRegistry.bindTileEntitySpecialRenderer(
TileAdditionalEldritchPortal.class, new TileEldritchPortalRenderer());
ClientRegistry
.bindTileEntitySpecialRenderer(TileAdditionalEldritchPortal.class, new TileEldritchPortalRenderer());
ClientRegistry.bindTileEntitySpecialRenderer(TileEldritchObelisk.class, new RenderTileObelisk());
ClientRegistry.bindTileEntitySpecialRenderer(
TileEldritchAltar.class, new RenderTileCapEldritch("textures/models/obelisk_cap_altar.png"));
TileEldritchAltar.class,
new RenderTileCapEldritch("textures/models/obelisk_cap_altar.png"));
ClientRegistry.bindTileEntitySpecialRenderer(
TileEldritchCap.class, new RenderTileCapEldritch("textures/models/obelisk_cap.png"));
TileEldritchCap.class,
new RenderTileCapEldritch("textures/models/obelisk_cap.png"));
RenderTileEssentiaCompressor renderTileEssentiaCompressor = new RenderTileEssentiaCompressor();
ClientRegistry.bindTileEntitySpecialRenderer(TileEssentiaCompressor.class, renderTileEssentiaCompressor);
@@ -135,27 +139,31 @@ public class ClientProxy extends CommonProxy {
MinecraftForgeClient.registerItemRenderer(
Item.getItemFromBlock(RegisteredBlocks.blockEssentiaCompressor),
new ItemRenderTileEntity<TileEssentiaCompressor>(
renderTileEssentiaCompressor, new TileEssentiaCompressor()));
renderTileEssentiaCompressor,
new TileEssentiaCompressor()));
MinecraftForgeClient
.registerItemRenderer(Item.getItemFromBlock(ConfigBlocks.blockAiry), new ItemExNodeRenderer());
MinecraftForgeClient.registerItemRenderer(
Item.getItemFromBlock(ConfigBlocks.blockAiry), new ItemExNodeRenderer());
MinecraftForgeClient.registerItemRenderer(
Item.getItemFromBlock(RegisteredBlocks.blockKnowledgeBook), new ItemRenderTEKnowledgeBook(bookRender));
Item.getItemFromBlock(RegisteredBlocks.blockKnowledgeBook),
new ItemRenderTEKnowledgeBook(bookRender));
ItemRenderTileEntityMulti multi = new ItemRenderTileEntityMulti(
new ItemRenderTileEntityMulti.RenderSet(renderTileAuraPylon, new TileAuraPylon(), 0),
new ItemRenderTileEntityMulti.RenderSet(renderTileAuraPylon, new TileAuraPylonTop(), 1));
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(RegisteredBlocks.blockAuraPylon), multi);
MinecraftForgeClient
.registerItemRenderer(RegisteredItems.itemExtendedNodeJar, new ItemJarExtendedNodeRenderer());
MinecraftForgeClient.registerItemRenderer(
RegisteredItems.itemExtendedNodeJar, new ItemJarExtendedNodeRenderer());
MinecraftForgeClient.registerItemRenderer(
Item.getItemFromBlock(RegisteredBlocks.blockRemoteJar), new ItemRenderRemoteJar(renderTileRemoteJar));
Item.getItemFromBlock(RegisteredBlocks.blockRemoteJar),
new ItemRenderRemoteJar(renderTileRemoteJar));
ItemRenderStoneMachine itemRenderStoneMachine = new ItemRenderStoneMachine();
MinecraftForgeClient.registerItemRenderer(
Item.getItemFromBlock(RegisteredBlocks.blockStoneMachine), itemRenderStoneMachine);
Item.getItemFromBlock(RegisteredBlocks.blockStoneMachine),
itemRenderStoneMachine);
itemRenderStoneMachine.registerRenderer(0, new TileManipulationFocus(), renderTileManipulationFocus);
TileManipulationFocus tileManipulationFocus = new TileManipulationFocus();
tileManipulationFocus.blockMetadata = 3;
@@ -204,7 +212,12 @@ public class ClientProxy extends CommonProxy {
@Override
public void spawnBubbles(World world, float posX, float posY, float posZ, float rangeAroundItem) {
MultiTickEffectDispatcher.BubbleFXInfo bubbles = new MultiTickEffectDispatcher.BubbleFXInfo(
Minecraft.getMinecraft().theWorld.provider.dimensionId, posX, posY, posZ, 10, rangeAroundItem);
Minecraft.getMinecraft().theWorld.provider.dimensionId,
posX,
posY,
posZ,
10,
rangeAroundItem);
MultiTickEffectDispatcher.registerBubbles(bubbles);
}
@@ -213,7 +226,7 @@ public class ClientProxy extends CommonProxy {
switch (ID) {
case 0:
return new GuiGolem(player, (EntityGolemBase) world.getEntityByID(x));
// return new AdditionalGolemGui(player, (EntityGolemBase)world.getEntityByID(x));
// return new AdditionalGolemGui(player, (EntityGolemBase)world.getEntityByID(x));
case 1:
return new InfusionClawGui(player.inventory, (IInventory) world.getTileEntity(x, y, z));
case 2:
@@ -6,6 +6,7 @@ import java.util.Iterator;
import java.util.Set;
class CheckpointingSet<E> implements Iterable<E> {
private final Set<E> main = new HashSet<>();
private final Set<E> toAdd = Collections.synchronizedSet(new HashSet<>());
private final Set<E> toRemove = Collections.synchronizedSet(new HashSet<>());
@@ -42,6 +43,7 @@ class CheckpointingSet<E> implements Iterable<E> {
@Override
public Iterator<E> iterator() {
return new Iterator<E>() {
private final Iterator<E> backing = main.iterator();
private boolean initialized = false;
private E cur = null;
@@ -1,19 +1,19 @@
package makeo.gadomancy.client.effect;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import makeo.gadomancy.client.effect.fx.FXFlow;
import makeo.gadomancy.client.effect.fx.FXVortex;
import makeo.gadomancy.client.effect.fx.Orbital;
import makeo.gadomancy.common.utils.Vector3;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.world.World;
import net.minecraftforge.client.event.RenderWorldLastEvent;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
* <p>
* Created by HellFirePvP @ 17.11.2015 18:39
*/
@@ -2,31 +2,25 @@ package makeo.gadomancy.client.effect.fx;
import java.awt.*;
import java.util.Random;
import makeo.gadomancy.common.utils.Vector3;
import net.minecraft.client.Minecraft;
import net.minecraft.world.World;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
* <p/>
* Created by HellFirePvP @ 17.11.2015 18:42
*/
public abstract class EntityFXFlowPolicy {
public abstract void doSubParticles(
FXFlow fxFlow,
int policyCounter,
double posX,
double posY,
double posZ,
double lastPosX,
double lastPosY,
double lastPosZ);
public abstract void doSubParticles(FXFlow fxFlow, int policyCounter, double posX, double posY, double posZ,
double lastPosX, double lastPosY, double lastPosZ);
public enum Policies {
NO_OP(null),
CIRCLE_MIX(new CircularMixPolicy()),
CIRCLE(new CircularPolicy()),
@@ -46,25 +40,16 @@ public abstract class EntityFXFlowPolicy {
static class DefaultPolicy extends EntityFXFlowPolicy {
@Override
public void doSubParticles(
FXFlow fxFlow,
int policyCounter,
double posX,
double posY,
double posZ,
double lastPosX,
double lastPosY,
double lastPosZ) {
this.doParticles(
fxFlow, policyCounter, posX, posY, posZ, fxFlow.getRand().nextInt(3) + 1);
public void doSubParticles(FXFlow fxFlow, int policyCounter, double posX, double posY, double posZ,
double lastPosX, double lastPosY, double lastPosZ) {
this.doParticles(fxFlow, policyCounter, posX, posY, posZ, fxFlow.getRand().nextInt(3) + 1);
}
public void doParticles(FXFlow fxFlow, int policyCounter, double posX, double posY, double posZ, int count) {
Random rand = fxFlow.getOriginWorld().rand;
for (int i = 0; i < count; i++) {
Vector3 subOffset = this.genSubOffset(rand, fxFlow.getSurroundingDistance());
Color c = (fxFlow.getFadingColor() != null && rand.nextBoolean())
? fxFlow.getFadingColor()
Color c = (fxFlow.getFadingColor() != null && rand.nextBoolean()) ? fxFlow.getFadingColor()
: fxFlow.getColor();
FXFlow.FXFlowBase flow = new FXFlow.FXFlowBase(
fxFlow.getOriginWorld(),
@@ -92,24 +77,17 @@ public abstract class EntityFXFlowPolicy {
public static final int TICKS_PER_FULL_TURN = 40;
@Override
public void doSubParticles(
FXFlow fxFlow,
int policyCounter,
double posX,
double posY,
double posZ,
double lastPosX,
double lastPosY,
double lastPosZ) {
public void doSubParticles(FXFlow fxFlow, int policyCounter, double posX, double posY, double posZ,
double lastPosX, double lastPosY, double lastPosZ) {
Vector3 rotationAxis = fxFlow.getMovementVector();
Vector3 perpendicular =
rotationAxis.clone().perpendicular().normalize().multiply(fxFlow.getSurroundingDistance());
Vector3 perpendicular = rotationAxis.clone().perpendicular().normalize()
.multiply(fxFlow.getSurroundingDistance());
Vector3 counterSide = perpendicular.clone().rotate(Math.toRadians(180), rotationAxis);
int currentDividedPolicyTick = policyCounter % CircularPolicy.TICKS_PER_FULL_TURN;
float currentDegree =
360F * (((float) currentDividedPolicyTick) / ((float) CircularPolicy.TICKS_PER_FULL_TURN));
float currentDegree = 360F
* (((float) currentDividedPolicyTick) / ((float) CircularPolicy.TICKS_PER_FULL_TURN));
double currentRad = Math.toRadians(currentDegree);
perpendicular = perpendicular.rotate(currentRad, rotationAxis);
@@ -143,25 +121,12 @@ public abstract class EntityFXFlowPolicy {
static class CircularMixPolicy extends CircularPolicy {
@Override
public void doSubParticles(
FXFlow fxFlow,
int policyCounter,
double posX,
double posY,
double posZ,
double lastPosX,
double lastPosY,
double lastPosZ) {
public void doSubParticles(FXFlow fxFlow, int policyCounter, double posX, double posY, double posZ,
double lastPosX, double lastPosY, double lastPosZ) {
super.doSubParticles(fxFlow, policyCounter, posX, posY, posZ, lastPosX, lastPosY, lastPosZ);
((DefaultPolicy) Policies.DEFAULT.getPolicy())
.doParticles(
fxFlow,
policyCounter,
posX,
posY,
posZ,
fxFlow.getRand().nextInt(2));
.doParticles(fxFlow, policyCounter, posX, posY, posZ, fxFlow.getRand().nextInt(2));
}
}
}
@@ -4,23 +4,24 @@ import java.awt.*;
import java.util.ArrayDeque;
import java.util.Queue;
import java.util.Random;
import makeo.gadomancy.client.effect.EffectHandler;
import makeo.gadomancy.common.data.config.ModConfig;
import makeo.gadomancy.common.utils.MiscUtils;
import makeo.gadomancy.common.utils.SimpleResourceLocation;
import makeo.gadomancy.common.utils.Vector3;
import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import org.lwjgl.opengl.GL11;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
* <p/>
* Created by HellFirePvP @ 17.11.2015 18:45
*/
@@ -166,19 +167,39 @@ public class FXFlow {
return;
}
FXFlowBase flow =
new FXFlowBase(this.origin, this.posX, this.posY, this.posZ, this.color, this.mainParticleSize, 9, 240);
FXFlowBase flow = new FXFlowBase(
this.origin,
this.posX,
this.posY,
this.posZ,
this.color,
this.mainParticleSize,
9,
240);
Minecraft.getMinecraft().effectRenderer.addEffect(flow); // Initial position.
double lastPosX = this.posX - (this.posX - this.lastTickPosX) / 2.0D;
double lastPosY = this.posY - (this.posY - this.lastTickPosY) / 2.0D;
double lastPosZ = this.posZ - (this.posZ - this.lastTickPosZ) / 2.0D;
FXFlowBase flow2 = new FXFlowBase(
this.origin, lastPosX, lastPosY, lastPosZ, this.color, (float) (this.mainParticleSize * 0.8), 8, 240);
this.origin,
lastPosX,
lastPosY,
lastPosZ,
this.color,
(float) (this.mainParticleSize * 0.8),
8,
240);
Minecraft.getMinecraft().effectRenderer.addEffect(flow2); // Consistency to last position
if (this.policy != null)
this.policy.doSubParticles(
this, this.policyCounter, this.posX, this.posY, this.posZ, lastPosX, lastPosY, lastPosZ);
if (this.policy != null) this.policy.doSubParticles(
this,
this.policyCounter,
this.posX,
this.posY,
this.posZ,
lastPosX,
lastPosY,
lastPosZ);
}
public Color getColor() {
@@ -346,8 +367,8 @@ public class FXFlow {
private ResourceLocation texture = new SimpleResourceLocation("fx/flow_large.png");
private float buffHalfLife, buffParticleScale;
public FXFlowBase(
World world, double x, double y, double z, Color color, float size, int multiplier, int brightness) {
public FXFlowBase(World world, double x, double y, double z, Color color, float size, int multiplier,
int brightness) {
super(world, x, y, z);
if (color != null) {
this.partBlue = color.getBlue() / 255F;
@@ -439,17 +460,11 @@ public class FXFlow {
}
@Override
public void renderParticle(
Tessellator tessellator,
float partialTicks,
float par3,
float par4,
float par5,
float par6,
float par7) {
public void renderParticle(Tessellator tessellator, float partialTicks, float par3, float par4, float par5,
float par6, float par7) {
if (MiscUtils.getPositionVector(Minecraft.getMinecraft().renderViewEntity)
.distance(new Vector3(this.posX, this.posY, this.posZ))
> ModConfig.renderParticleDistance) return;
.distance(new Vector3(this.posX, this.posY, this.posZ)) > ModConfig.renderParticleDistance)
return;
this.partialTicks = partialTicks;
this.rendArg1 = par3;
@@ -1,31 +1,33 @@
package makeo.gadomancy.client.effect.fx;
import java.util.Random;
import makeo.gadomancy.client.effect.EffectHandler;
import makeo.gadomancy.client.events.ClientHandler;
import makeo.gadomancy.common.blocks.tiles.TileEssentiaCompressor;
import makeo.gadomancy.common.utils.MiscUtils;
import makeo.gadomancy.common.utils.Vector3;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.ActiveRenderInfo;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.Vec3;
import org.lwjgl.opengl.GL11;
import thaumcraft.client.lib.QuadHelper;
import thaumcraft.client.lib.UtilsFX;
/**
* HellFirePvP@Admin
* Date: 24.04.2016 / 00:45
* on Gadomancy
* FXVortex
* HellFirePvP@Admin Date: 24.04.2016 / 00:45 on Gadomancy FXVortex
*/
public class FXVortex {
private static final Random RAND = new Random();
public static final ResourceLocation TC_VORTEX_TEXTURE =
new ResourceLocation("thaumcraft", "textures/misc/vortex.png");
public static final ResourceLocation TC_VORTEX_TEXTURE = new ResourceLocation(
"thaumcraft",
"textures/misc/vortex.png");
private static final float RAD = (float) (Math.PI * 2);
private TileEssentiaCompressor parent;
@@ -4,18 +4,18 @@ import java.awt.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import makeo.gadomancy.client.effect.EffectHandler;
import makeo.gadomancy.common.data.config.ModConfig;
import makeo.gadomancy.common.utils.MiscUtils;
import makeo.gadomancy.common.utils.Vector3;
import net.minecraft.client.Minecraft;
import net.minecraft.world.World;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by HellFirePvP @ 17.11.2015 18:41
*/
@@ -54,9 +54,9 @@ public final class Orbital {
}
public void doRender(float partialTicks) {
if (MiscUtils.getPositionVector(Minecraft.getMinecraft().renderViewEntity)
.distance(this.center)
> ModConfig.renderParticleDistance) return;
if (MiscUtils.getPositionVector(Minecraft.getMinecraft().renderViewEntity).distance(this.center)
> ModConfig.renderParticleDistance)
return;
if (Minecraft.getMinecraft().isGamePaused()) return;
for (OrbitalRenderProperties orbitalNode : this.orbitals) {
@@ -64,17 +64,12 @@ public final class Orbital {
int counterOffset = orbitalNode.getOffsetTicks() % orbitalNode.getTicksForFullCircle();
int currentDividedPolicyTick = (this.orbitalCounter + counterOffset) % orbitalNode.getTicksForFullCircle();
float currentDegree =
360F * (((float) currentDividedPolicyTick) / ((float) orbitalNode.getTicksForFullCircle()));
float currentDegree = 360F
* (((float) currentDividedPolicyTick) / ((float) orbitalNode.getTicksForFullCircle()));
double currentRad = Math.toRadians(currentDegree);
Vector3 point = axis.getAxis()
.clone()
.perpendicular()
.normalize()
.multiply(orbitalNode.getOffset())
.rotate(currentRad, axis.getAxis())
.add(this.center);
Vector3 point = axis.getAxis().clone().perpendicular().normalize().multiply(orbitalNode.getOffset())
.rotate(currentRad, axis.getAxis()).add(this.center);
if (orbitalNode.getRunnable() != null) {
orbitalNode.getRunnable().onRender(this.world, point, orbitalNode, this.orbitalCounter, partialTicks);
@@ -138,17 +133,12 @@ public final class Orbital {
int counterOffset = property.getOffsetTicks() % property.getTicksForFullCircle();
int currentDividedPolicyTick = (this.orbitalCounter + counterOffset) % property.getTicksForFullCircle();
float currentDegree =
360F * (((float) currentDividedPolicyTick) / ((float) property.getTicksForFullCircle()));
float currentDegree = 360F
* (((float) currentDividedPolicyTick) / ((float) property.getTicksForFullCircle()));
double currentRad = Math.toRadians(currentDegree);
arr[i] = axis.getAxis()
.clone()
.perpendicular()
.normalize()
.multiply(property.getOffset())
.rotate(currentRad, axis.getAxis())
.add(this.center);
arr[i] = axis.getAxis().clone().perpendicular().normalize().multiply(property.getOffset())
.rotate(currentRad, axis.getAxis()).add(this.center);
}
return arr;
}
@@ -173,6 +163,7 @@ public final class Orbital {
public static class OrbitalRenderProperties {
private static final OrbitalSubSizeRunnable subSizeRunnableStatic = new OrbitalSubSizeRunnable() {
@Override
public float getSubParticleSize(Random rand, int orbitalExisted) {
return 0.1F + (rand.nextBoolean() ? 0.0F : 0.1F);
@@ -295,16 +286,14 @@ public final class Orbital {
}
public abstract static class OrbitalSubSizeRunnable {
public abstract float getSubParticleSize(Random rand, int orbitalExisted);
}
public abstract static class OrbitalRenderRunnable {
public abstract void onRender(
World world,
Vector3 selectedPosition,
OrbitalRenderProperties properties,
int orbitalExisted,
float partialTicks);
public abstract void onRender(World world, Vector3 selectedPosition, OrbitalRenderProperties properties,
int orbitalExisted, float partialTicks);
}
public static class Axis {
@@ -1,21 +1,22 @@
package makeo.gadomancy.client.events;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.TickEvent;
import cpw.mods.fml.common.network.FMLNetworkEvent;
import java.util.Queue;
import makeo.gadomancy.client.ClientProxy;
import makeo.gadomancy.client.effect.EffectHandler;
import makeo.gadomancy.client.renderers.tile.RenderTileEssentiaCompressor;
import makeo.gadomancy.client.util.FamiliarHandlerClient;
import makeo.gadomancy.common.Gadomancy;
import net.minecraft.client.Minecraft;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.TickEvent;
import cpw.mods.fml.common.network.FMLNetworkEvent;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by HellFirePvP @ 01.11.2015 10:41
*/
@@ -1,22 +1,23 @@
package makeo.gadomancy.client.events;
import java.util.ArrayList;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import thaumcraft.api.BlockCoordinates;
import thaumcraft.api.IArchitect;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by makeo @ 13.10.2015 20:34
*/
public class FakeArchitectItem extends Item implements IArchitect {
private ArrayList<BlockCoordinates> coords;
public void setCoords(ArrayList<BlockCoordinates> coords) {
@@ -24,17 +25,13 @@ public class FakeArchitectItem extends Item implements IArchitect {
}
@Override
public ArrayList<BlockCoordinates> getArchitectBlocks(
ItemStack stack, World world, int x, int y, int z, int side, EntityPlayer player) {
public ArrayList<BlockCoordinates> getArchitectBlocks(ItemStack stack, World world, int x, int y, int z, int side,
EntityPlayer player) {
return this.coords;
}
@Override
public boolean showAxis(
ItemStack paramItemStack,
World paramWorld,
EntityPlayer paramEntityPlayer,
int paramInt,
public boolean showAxis(ItemStack paramItemStack, World paramWorld, EntityPlayer paramEntityPlayer, int paramInt,
EnumAxis paramEnumAxis) {
return false;
}
@@ -1,10 +1,9 @@
package makeo.gadomancy.client.events;
import cpw.mods.fml.common.eventhandler.EventPriority;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.zip.GZIPInputStream;
import makeo.gadomancy.api.GadomancyApi;
import makeo.gadomancy.api.golems.cores.AdditionalGolemCore;
import makeo.gadomancy.client.gui.GuiResearchRecipeAuraEffects;
@@ -22,6 +21,7 @@ import makeo.gadomancy.common.utils.Injector;
import makeo.gadomancy.common.utils.MiscUtils;
import makeo.gadomancy.common.utils.NBTHelper;
import makeo.gadomancy.common.utils.Vector3;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GLAllocation;
@@ -37,7 +37,9 @@ import net.minecraftforge.client.event.*;
import net.minecraftforge.client.model.IModelCustom;
import net.minecraftforge.client.model.obj.WavefrontObject;
import net.minecraftforge.common.util.ForgeDirection;
import org.lwjgl.opengl.GL11;
import thaumcraft.api.BlockCoordinates;
import thaumcraft.api.IArchitect;
import thaumcraft.api.research.ResearchItem;
@@ -48,16 +50,17 @@ import thaumcraft.client.lib.REHWandHandler;
import thaumcraft.common.entities.golems.EntityGolemBase;
import thaumcraft.common.items.relics.ItemThaumometer;
import thaumcraft.common.items.wands.ItemWandCasting;
import cpw.mods.fml.common.eventhandler.EventPriority;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by makeo @ 13.10.2015 16:11
*/
public class RenderEventHandler {
private static final REHWandHandler WAND_HANDLER = new REHWandHandler();
private static final FakeArchitectItem ARCHITECT_ITEM = new FakeArchitectItem();
@@ -75,8 +78,8 @@ public class RenderEventHandler {
this.blurbId = core.getBaseCore();
String key = "golemblurb." + this.blurbId + ".text";
this.oldGolemblurb = ResourceReloadListener.languageList.get(key);
ResourceReloadListener.languageList.put(
key, StatCollector.translateToLocal(core.getUnlocalizedGuiText()));
ResourceReloadListener.languageList
.put(key, StatCollector.translateToLocal(core.getUnlocalizedGuiText()));
}
}
}
@@ -106,23 +109,28 @@ public class RenderEventHandler {
for (int x = -1; x < 2; x++) {
for (int y = -1; y < 2; y++) {
for (int z = -1; z < 2; z++) {
coords.add(new BlockCoordinates(
e.target.blockX + 2 * dir.offsetX + x,
e.target.blockY + 2 * dir.offsetY + y,
e.target.blockZ + 2 * dir.offsetZ + z));
coords.add(
new BlockCoordinates(
e.target.blockX + 2 * dir.offsetX + x,
e.target.blockY + 2 * dir.offsetY + y,
e.target.blockZ + 2 * dir.offsetZ + z));
}
}
}
coords.add(new BlockCoordinates(
e.target.blockX + dir.offsetX,
e.target.blockY + dir.offsetY,
e.target.blockZ + dir.offsetZ));
coords.add(
new BlockCoordinates(
e.target.blockX + dir.offsetX,
e.target.blockY + dir.offsetY,
e.target.blockZ + dir.offsetZ));
RenderEventHandler.ARCHITECT_ITEM.setCoords(coords);
GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
RenderEventHandler.WAND_HANDLER.handleArchitectOverlay(
new ItemStack(RenderEventHandler.ARCHITECT_ITEM), e, e.player.ticksExisted, e.target);
new ItemStack(RenderEventHandler.ARCHITECT_ITEM),
e,
e.player.ticksExisted,
e.target);
GL11.glPopAttrib();
}
}
@@ -136,13 +144,13 @@ public class RenderEventHandler {
if (tile instanceof TileExtendedNode) {
TileExtendedNode node = (TileExtendedNode) tile;
if (node.getExtendedNodeType() == null) return;
ExtendedTypeDisplayManager.notifyDisplayTick(
node.getId(), node.getNodeType(), node.getExtendedNodeType());
ExtendedTypeDisplayManager
.notifyDisplayTick(node.getId(), node.getNodeType(), node.getExtendedNodeType());
} else if (tile instanceof TileExtendedNodeJar) {
TileExtendedNodeJar nodeJar = (TileExtendedNodeJar) tile;
if (nodeJar.getExtendedNodeType() == null) return;
ExtendedTypeDisplayManager.notifyDisplayTick(
nodeJar.getId(), nodeJar.getNodeType(), nodeJar.getExtendedNodeType());
ExtendedTypeDisplayManager
.notifyDisplayTick(nodeJar.getId(), nodeJar.getNodeType(), nodeJar.getExtendedNodeType());
}
}
}
@@ -230,21 +238,17 @@ public class RenderEventHandler {
}
static {
ResourceLocation mod = new ResourceLocation(Gadomancy.MODID.toLowerCase()
+ new String(
new byte[] {
58, 116, 101, 120, 116, 117, 114, 101, 115, 47, 109, 111, 100, 101, 108, 115, 47, 109, 111,
100, 101, 108, 65, 115, 115, 101, 99, 46, 111, 98, 106
},
ResourceLocation mod = new ResourceLocation(
Gadomancy.MODID.toLowerCase() + new String(
new byte[] { 58, 116, 101, 120, 116, 117, 114, 101, 115, 47, 109, 111, 100, 101, 108, 115, 47,
109, 111, 100, 101, 108, 65, 115, 115, 101, 99, 46, 111, 98, 106 },
StandardCharsets.UTF_8));
IModelCustom buf;
try {
buf = new WavefrontObject(
"gadomancy:wRender",
new GZIPInputStream(Minecraft.getMinecraft()
.getResourceManager()
.getResource(mod)
.getInputStream()));
new GZIPInputStream(
Minecraft.getMinecraft().getResourceManager().getResource(mod).getInputStream()));
} catch (Exception exc) {
// shush.
buf = null;
@@ -253,12 +257,11 @@ public class RenderEventHandler {
}
private static final IModelCustom obj;
private static final ResourceLocation tex = new ResourceLocation(new String(
new byte[] {
103, 97, 100, 111, 109, 97, 110, 99, 121, 58, 116, 101, 120, 116, 117, 114, 101, 115, 47, 109, 105, 115,
99, 47, 116, 101, 120, 87, 46, 112, 110, 103
},
StandardCharsets.UTF_8));
private static final ResourceLocation tex = new ResourceLocation(
new String(
new byte[] { 103, 97, 100, 111, 109, 97, 110, 99, 121, 58, 116, 101, 120, 116, 117, 114, 101, 115,
47, 109, 105, 115, 99, 47, 116, 101, 120, 87, 46, 112, 110, 103 },
StandardCharsets.UTF_8));
private static int dList = -1;
@SubscribeEvent
@@ -274,14 +277,8 @@ public class RenderEventHandler {
Minecraft.getMinecraft().renderEngine.bindTexture(RenderEventHandler.tex);
boolean f = event.entityPlayer.capabilities.isFlying;
double ma = f ? 15 : 5;
double r = (ma * (Math.abs((ClientHandler.ticks % 80) - 40) / 40D))
+ ((65 - ma)
* Math.max(
0,
Math.min(
1,
new Vector3(event.entityPlayer.motionX, 0, event.entityPlayer.motionZ)
.length())));
double r = (ma * (Math.abs((ClientHandler.ticks % 80) - 40) / 40D)) + ((65 - ma) * Math
.max(0, Math.min(1, new Vector3(event.entityPlayer.motionX, 0, event.entityPlayer.motionZ).length())));
GL11.glScaled(0.07, 0.07, 0.07);
GL11.glRotatef(180, 0, 0, 1);
GL11.glTranslated(0, -12.7, 0.7 - (((float) (r / ma)) * (f ? 0.5D : 0.2D)));
@@ -1,11 +1,13 @@
package makeo.gadomancy.client.events;
import java.util.Map;
import makeo.gadomancy.api.GadomancyApi;
import makeo.gadomancy.api.golems.AdditionalGolemType;
import makeo.gadomancy.client.textures.GolemGuiTexture;
import makeo.gadomancy.common.Gadomancy;
import makeo.gadomancy.common.utils.Injector;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.IResourceManager;
import net.minecraft.client.resources.IResourceManagerReloadListener;
@@ -14,10 +16,8 @@ import net.minecraft.util.StatCollector;
import net.minecraft.util.StringTranslate;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by makeo @ 03.10.2015 12:09
*/
@@ -47,6 +47,7 @@ public class ResourceReloadListener implements IResourceManagerReloadListener {
this.manipulateLanguageFile();
Gadomancy.proxy.runDelayedClientSide(new Runnable() {
@Override
public void run() {
ResourceReloadListener.this.registerTextureOverride();
@@ -64,14 +65,13 @@ public class ResourceReloadListener implements IResourceManagerReloadListener {
}
}
private static final ResourceLocation TC_GOLEM_GUI_TEXTURE =
new ResourceLocation("thaumcraft", "textures/gui/guigolem.png");
private static final ResourceLocation TC_GOLEM_GUI_TEXTURE = new ResourceLocation(
"thaumcraft",
"textures/gui/guigolem.png");
private void registerTextureOverride() {
Minecraft.getMinecraft()
.renderEngine
.loadTexture(
ResourceReloadListener.TC_GOLEM_GUI_TEXTURE,
new GolemGuiTexture(ResourceReloadListener.TC_GOLEM_GUI_TEXTURE));
Minecraft.getMinecraft().renderEngine.loadTexture(
ResourceReloadListener.TC_GOLEM_GUI_TEXTURE,
new GolemGuiTexture(ResourceReloadListener.TC_GOLEM_GUI_TEXTURE));
}
}
@@ -1,27 +1,29 @@
package makeo.gadomancy.client.gui;
import java.awt.*;
import makeo.gadomancy.common.blocks.tiles.TileArcanePackager;
import makeo.gadomancy.common.containers.ContainerArcanePackager;
import makeo.gadomancy.common.utils.ColorHelper;
import makeo.gadomancy.common.utils.SimpleResourceLocation;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StatCollector;
import org.lwjgl.opengl.GL11;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
* <p/>
* Created by makeo @ 14.11.2015 01:17
*/
public class ArcanePackagerGui extends GuiContainer {
private static final ResourceLocation TEXTURE = new SimpleResourceLocation("gui/gui_packager.png");
private final TileArcanePackager tile;
@@ -78,10 +80,16 @@ public class ArcanePackagerGui extends GuiContainer {
this.drawTexturedModalRect(var5, var6, 0, 0, this.xSize, this.ySize);
this.drawString(
100, 98, "gadomancy.info.ArcanePackager.useEssentia", this.tile.useEssentia ? Color.WHITE : Color.GRAY);
100,
98,
"gadomancy.info.ArcanePackager.useEssentia",
this.tile.useEssentia ? Color.WHITE : Color.GRAY);
this.drawString(
100, 111, "gadomancy.info.ArcanePackager.autoStart", this.tile.autoStart ? Color.WHITE : Color.GRAY);
100,
111,
"gadomancy.info.ArcanePackager.autoStart",
this.tile.autoStart ? Color.WHITE : Color.GRAY);
this.drawString(
100,
@@ -4,16 +4,20 @@ import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import makeo.gadomancy.common.Gadomancy;
import makeo.gadomancy.common.aura.AuraResearchManager;
import makeo.gadomancy.common.aura.ResearchPageAuraAspects;
import makeo.gadomancy.common.utils.Injector;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.item.ItemStack;
import net.minecraft.util.MathHelper;
import net.minecraft.util.StatCollector;
import org.lwjgl.opengl.GL11;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
import thaumcraft.api.research.ResearchItem;
@@ -26,10 +30,8 @@ import thaumcraft.common.lib.crafting.ThaumcraftCraftingManager;
import thaumcraft.common.lib.utils.InventoryUtils;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by HellFirePvP @ 30.11.2015 12:24
*/
@@ -42,8 +44,8 @@ public class GuiResearchRecipeAuraEffects extends GuiResearchRecipe {
Injector inj = new Injector(this, GuiResearchRecipe.class);
ResearchPage[] additionalPages =
ResearchPageAuraAspects.createAllAuraPagesFor(Minecraft.getMinecraft().thePlayer);
ResearchPage[] additionalPages = ResearchPageAuraAspects
.createAllAuraPagesFor(Minecraft.getMinecraft().thePlayer);
ResearchPage[] pages = inj.getField("pages");
ResearchPage[] newPages = new ResearchPage[pages.length + additionalPages.length];
System.arraycopy(pages, 0, newPages, 0, pages.length);
@@ -51,8 +53,7 @@ public class GuiResearchRecipeAuraEffects extends GuiResearchRecipe {
inj.setField("pages", newPages);
inj.setField("maxPages", newPages.length);
List<String> list = Thaumcraft.proxy
.getScannedObjects()
List<String> list = Thaumcraft.proxy.getScannedObjects()
.get(Minecraft.getMinecraft().thePlayer.getCommandSenderName());
if ((list != null) && (list.size() > 0)) {
for (String s : list) {
@@ -75,8 +76,7 @@ public class GuiResearchRecipeAuraEffects extends GuiResearchRecipe {
}
}
}
} catch (NumberFormatException e) {
}
} catch (NumberFormatException e) {}
}
}
}
@@ -216,7 +216,12 @@ public class GuiResearchRecipeAuraEffects extends GuiResearchRecipe {
}
GL11.glScalef(2.0F, 2.0F, 2.0F);
UtilsFX.drawTag(
(x + start) / 2, (y + count * 50) / 2, aspect, aspects.getAmount(aspect), 0, this.zLevel);
(x + start) / 2,
(y + count * 50) / 2,
aspect,
aspects.getAmount(aspect),
0,
this.zLevel);
GL11.glPopMatrix();
String text = aspect.getName();
int offset = fr.getStringWidth(text) / 2;
@@ -1,12 +1,12 @@
package makeo.gadomancy.client.gui;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.awt.*;
import makeo.gadomancy.common.blocks.tiles.TileInfusionClaw;
import makeo.gadomancy.common.containers.ContainerInfusionClaw;
import makeo.gadomancy.common.utils.ColorHelper;
import makeo.gadomancy.common.utils.SimpleResourceLocation;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.entity.player.InventoryPlayer;
@@ -14,18 +14,21 @@ import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StatCollector;
import org.lwjgl.opengl.GL11;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by makeo @ 09.10.2015 20:21
*/
@SideOnly(Side.CLIENT)
public class InfusionClawGui extends GuiContainer {
private static final ResourceLocation BACKGROUND = new SimpleResourceLocation("/gui/gui_infusion_claw.png");
private ContainerInfusionClaw container;
@@ -43,10 +46,8 @@ public class InfusionClawGui extends GuiContainer {
}
ItemStack cursorStack = this.container.playerInv.getItemStack();
if (((TileInfusionClaw) this.container.clawInv).isRunning()
|| (cursorStack != null
&& cursorStack.stackSize > 0
&& !this.container.clawInv.isItemValidForSlot(0, cursorStack))) {
if (((TileInfusionClaw) this.container.clawInv).isRunning() || (cursorStack != null && cursorStack.stackSize > 0
&& !this.container.clawInv.isItemValidForSlot(0, cursorStack))) {
GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
GL11.glEnable(GL11.GL_BLEND);
@@ -5,15 +5,14 @@ import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by makeo @ 30.09.2015 17:04
* using Techne: http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-tools/1261123
* Created by makeo @ 30.09.2015 17:04 using Techne:
* http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-tools/1261123
*/
public class ModelArcaneDropper extends ModelBase {
// fields
ModelRenderer shape1;
ModelRenderer shape2;
@@ -5,14 +5,13 @@ import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
* <p/>
* Created by makeo @ 28.11.2015 19:04
*/
public class ModelArcanePackager extends ModelBase {
ModelRenderer shape1;
ModelRenderer shape2;
ModelRenderer shape3;
@@ -5,6 +5,7 @@ import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelAuraPylon extends ModelBase {
// fields
ModelRenderer outerpylon;
ModelRenderer lowerconduit;
@@ -5,6 +5,7 @@ import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelAuraPylonBottom extends ModelBase {
// fields
ModelRenderer outerpylon;
ModelRenderer lowerconduit;
@@ -5,6 +5,7 @@ import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelAuraPylonTop extends ModelBase {
// fields
ModelRenderer outerpylon;
ModelRenderer lowerconduit;
@@ -5,14 +5,13 @@ import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
* <p/>
* Created by makeo @ 11.11.2015 17:15
*/
public class ModelBlockProtector extends ModelBase {
// fields
ModelRenderer Shape1;
ModelRenderer Shape2;
@@ -5,10 +5,7 @@ import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
/**
* HellFirePvP@Admin
* Date: 22.04.2016 / 21:36
* on Gadomancy
* ModelEssentiaCompressor
* HellFirePvP@Admin Date: 22.04.2016 / 21:36 on Gadomancy ModelEssentiaCompressor
*/
public class ModelEssentiaCompressor extends ModelBase {
@@ -5,14 +5,13 @@ import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
* <p/>
* Created by makeo @ 09.11.2015 23:08
*/
public class ModelFocusPortalPart extends ModelBase {
// fields
ModelRenderer shape1;
ModelRenderer shape2;
@@ -5,14 +5,13 @@ import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by makeo @ 08.10.2015 16:14
*/
public class ModelInfusionClawPart extends ModelBase {
// fields
ModelRenderer shape1;
@@ -5,14 +5,13 @@ import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
* <p/>
* Created by makeo @ 23.10.2015 23:13
*/
public class ModelJarPot extends ModelBase {
// fields
ModelRenderer shape1;
ModelRenderer shape2;
@@ -5,14 +5,13 @@ import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
* <p/>
* Created by makeo @ 28.10.2015 12:31
*/
public class ModelManipulatorPart extends ModelBase {
// fields
ModelRenderer shape2;
ModelRenderer shape3;
@@ -5,14 +5,13 @@ import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
* <p/>
* Created by makeo @ 29.11.2015 12:36
*/
public class ModelPackagerPiston extends ModelBase {
ModelRenderer shape1;
ModelRenderer shape2;
@@ -5,10 +5,7 @@ import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
/**
* HellFirePvP@Admin
* Date: 22.04.2016 / 22:59
* on Gadomancy
* ModelPackedCompressorBlock
* HellFirePvP@Admin Date: 22.04.2016 / 22:59 on Gadomancy ModelPackedCompressorBlock
*/
public class ModelPackedCompressorBlock extends ModelBase {
@@ -5,14 +5,13 @@ import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
* <p/>
* Created by makeo @ 27.10.2015 23:40
*/
public class ModelSmallCube extends ModelBase {
// fields
ModelRenderer shape1;
@@ -1,6 +1,7 @@
package makeo.gadomancy.client.models;
import java.awt.*;
import net.minecraft.client.Minecraft;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.client.renderer.ItemRenderer;
@@ -14,7 +15,9 @@ import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.util.MathHelper;
import org.lwjgl.opengl.GL11;
import thaumcraft.client.lib.UtilsFX;
import thaumcraft.client.renderers.block.BlockRenderer;
import thaumcraft.client.renderers.models.gear.ModelWand;
@@ -22,14 +25,14 @@ import thaumcraft.common.Thaumcraft;
import thaumcraft.common.items.wands.ItemWandCasting;
/**
* This class is NOT part of the Gadomancy Mod
* This file is copied from Azanors thaumcraft.client.renderers.models.gear.ModelWand.java and contains small modifications
* Thaumcraft: http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1292130
* This class is NOT part of the Gadomancy Mod This file is copied from Azanors
* thaumcraft.client.renderers.models.gear.ModelWand.java and contains small modifications Thaumcraft:
* http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1292130
*
* Created by Azanor
* Modified by makeo @ 10.10.2015 17:28
* Created by Azanor Modified by makeo @ 10.10.2015 17:28
*/
public class ModelWandPart extends ModelWand {
ModelRenderer Rod;
ModelRenderer Focus;
ModelRenderer Cap;
@@ -157,15 +160,15 @@ public class ModelWandPart extends ModelWand {
GL11.glPushMatrix();
GL11.glTranslatef(-0.25F, -0.1F, 0.0275F);
GL11.glScaled(0.5D, 0.5D, 0.5D);
ItemRenderer.renderItemIn2D(
tessellator, f1, f2, f3, f4, icon.getIconWidth(), icon.getIconHeight(), 0.1F);
ItemRenderer
.renderItemIn2D(tessellator, f1, f2, f3, f4, icon.getIconWidth(), icon.getIconHeight(), 0.1F);
GL11.glPopMatrix();
GL11.glPushMatrix();
GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
GL11.glTranslatef(-0.25F, -0.1F, 0.0275F);
GL11.glScaled(0.5D, 0.5D, 0.5D);
ItemRenderer.renderItemIn2D(
tessellator, f1, f2, f3, f4, icon.getIconWidth(), icon.getIconHeight(), 0.1F);
ItemRenderer
.renderItemIn2D(tessellator, f1, f2, f3, f4, icon.getIconWidth(), icon.getIconHeight(), 0.1F);
GL11.glPopMatrix();
GL11.glPopMatrix();
}
@@ -182,7 +185,10 @@ public class ModelWandPart extends ModelWand {
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationItemsTexture);
this.renderBlocks.setRenderBoundsFromBlock(Blocks.stone);
BlockRenderer.drawFaces(
this.renderBlocks, null, wand.getFocus(wandStack).getFocusDepthLayerIcon(focusStack), false);
this.renderBlocks,
null,
wand.getFocus(wandStack).getFocusDepthLayerIcon(focusStack),
false);
GL11.glPopMatrix();
alpha = 0.6F;
}
@@ -1,7 +1,7 @@
package makeo.gadomancy.client.renderers.block;
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
import makeo.gadomancy.common.registration.RegisteredBlocks;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.EntityRenderer;
@@ -10,19 +10,19 @@ import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import org.lwjgl.opengl.GL11;
import thaumcraft.common.blocks.BlockJar;
import thaumcraft.common.config.ConfigBlocks;
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
/**
* This class is NOT part of the Gadomancy Mod
* This file is copied from Azanors thaumcraft.client.renderers.block.BlockRenderer.java and
* thaumcraft.client.renderers.block.BlockJarRenderer.java
* This class is NOT part of the Gadomancy Mod This file is copied from Azanors
* thaumcraft.client.renderers.block.BlockRenderer.java and thaumcraft.client.renderers.block.BlockJarRenderer.java
* Thaumcraft: http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1292130
*
* Created by Azanor
* Modified to create compatibility with ExtendedNodes
* Modified by HellFirePvP @ 26.10.2015 00:29
* Created by Azanor Modified to create compatibility with ExtendedNodes Modified by HellFirePvP @ 26.10.2015 00:29
*/
public class BlockExtendedNodeJarRenderer implements ISimpleBlockRenderingHandler {
@@ -58,8 +58,8 @@ public class BlockExtendedNodeJarRenderer implements ISimpleBlockRenderingHandle
BlockExtendedNodeJarRenderer.W12,
BlockExtendedNodeJarRenderer.W13);
renderer.setRenderBoundsFromBlock(block);
BlockExtendedNodeJarRenderer.drawFaces(
renderer, block, ((BlockJar) ConfigBlocks.blockJar).iconJarBottom, i1, i2, i2, i2, i2, true);
BlockExtendedNodeJarRenderer
.drawFaces(renderer, block, ((BlockJar) ConfigBlocks.blockJar).iconJarBottom, i1, i2, i2, i2, i2, true);
block.setBlockBounds(
BlockExtendedNodeJarRenderer.W5,
BlockExtendedNodeJarRenderer.W12,
@@ -68,14 +68,14 @@ public class BlockExtendedNodeJarRenderer implements ISimpleBlockRenderingHandle
BlockExtendedNodeJarRenderer.W14,
BlockExtendedNodeJarRenderer.W11);
renderer.setRenderBoundsFromBlock(block);
BlockExtendedNodeJarRenderer.drawFaces(
renderer, block, ((BlockJar) ConfigBlocks.blockJar).iconJarBottom, i1, i2, i2, i2, i2, true);
BlockExtendedNodeJarRenderer
.drawFaces(renderer, block, ((BlockJar) ConfigBlocks.blockJar).iconJarBottom, i1, i2, i2, i2, i2, true);
GL11.glPopMatrix();
}
@Override
public boolean renderWorldBlock(
IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId,
RenderBlocks renderer) {
int bb = this.setBrightness(world, x, y, z, block);
int metadata = world.getBlockMetadata(x, y, z);
block.setBlockBounds(
@@ -103,16 +103,8 @@ public class BlockExtendedNodeJarRenderer implements ISimpleBlockRenderingHandle
return true;
}
public static void drawFaces(
RenderBlocks renderblocks,
Block block,
IIcon i1,
IIcon i2,
IIcon i3,
IIcon i4,
IIcon i5,
IIcon i6,
boolean solidtop) {
public static void drawFaces(RenderBlocks renderblocks, Block block, IIcon i1, IIcon i2, IIcon i3, IIcon i4,
IIcon i5, IIcon i6, boolean solidtop) {
Tessellator tessellator = Tessellator.instance;
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
tessellator.startDrawingQuads();
@@ -1,20 +1,20 @@
package makeo.gadomancy.client.renderers.block;
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.util.IIcon;
import net.minecraftforge.common.util.ForgeDirection;
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by makeo @ 29.09.2015 21:18
*/
public abstract class BlockRenderingHandler implements ISimpleBlockRenderingHandler {
protected void renderAllFaces(RenderBlocks renderer, Block block, int x, int y, int z, IIcon icon) {
renderer.renderFaceYNeg(block, x, y, z, icon);
renderer.renderFaceYPos(block, x, y, z, icon);
@@ -47,18 +47,15 @@ public abstract class BlockRenderingHandler implements ISimpleBlockRenderingHand
}
}
protected void renderFace(
ForgeDirection side, RenderBlocks renderer, Block block, int x, int y, int z, IIcon icon) {
protected void renderFace(ForgeDirection side, RenderBlocks renderer, Block block, int x, int y, int z,
IIcon icon) {
this.renderFace(side.ordinal(), renderer, block, x, y, z, icon);
}
/*protected void renderFaceHollow(int side, RenderBlocks renderer, Block block, int x, int y, int z, IIcon icon,
int startX, int startY, int startZ, int endX, int endY, int endZ) {
}
protected void renderFacePartially(int side, RenderBlocks renderer, Block block, int x, int y, int z, IIcon icon,
int startX, int startY, int startZ, int endX, int endY, int endZ) {
}*/
/*
* protected void renderFaceHollow(int side, RenderBlocks renderer, Block block, int x, int y, int z, IIcon icon,
* int startX, int startY, int startZ, int endX, int endY, int endZ) { } protected void renderFacePartially(int
* side, RenderBlocks renderer, Block block, int x, int y, int z, IIcon icon, int startX, int startY, int startZ,
* int endX, int endY, int endZ) { }
*/
}
@@ -1,23 +1,24 @@
package makeo.gadomancy.client.renderers.block;
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
import makeo.gadomancy.common.blocks.BlockStoneMachine;
import makeo.gadomancy.common.registration.RegisteredBlocks;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.world.IBlockAccess;
import thaumcraft.client.renderers.block.BlockStoneDeviceRenderer;
import thaumcraft.common.blocks.BlockStoneDevice;
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
* <p/>
* Created by makeo @ 03.11.2015 22:09
*/
public class RenderBlockStoneMachine implements ISimpleBlockRenderingHandler {
private static final BlockStoneDeviceRenderer DEVICE_RENDERER = new BlockStoneDeviceRenderer();
private static final BlockStoneDevice DEVICE_BLOCK = new BlockStoneDevice();
@@ -27,14 +28,14 @@ public class RenderBlockStoneMachine implements ISimpleBlockRenderingHandler {
BlockStoneMachine blockStoneMachine = (BlockStoneMachine) block;
RenderBlockStoneMachine.DEVICE_BLOCK.iconPedestal[0] = blockStoneMachine.pedestalSideIcon;
RenderBlockStoneMachine.DEVICE_BLOCK.iconPedestal[1] = blockStoneMachine.pedestalTopIcon;
RenderBlockStoneMachine.DEVICE_RENDERER.renderInventoryBlock(
RenderBlockStoneMachine.DEVICE_BLOCK, 1, modelId, renderer);
RenderBlockStoneMachine.DEVICE_RENDERER
.renderInventoryBlock(RenderBlockStoneMachine.DEVICE_BLOCK, 1, modelId, renderer);
}
}
@Override
public boolean renderWorldBlock(
IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId,
RenderBlocks renderer) {
int metadata = world.getBlockMetadata(x, y, z);
if (metadata == 1) {
RenderBlockStoneMachine.DEVICE_RENDERER.renderWorldBlock(world, x, y, z, block, modelId, renderer);
@@ -2,25 +2,25 @@ package makeo.gadomancy.client.renderers.block;
import makeo.gadomancy.common.blocks.IBlockTransparent;
import makeo.gadomancy.common.registration.RegisteredBlocks;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.world.IBlockAccess;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by makeo @ 29.09.2015 20:53
*/
public class RenderBlockTransparent extends BlockRenderingHandler {
@Override
public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) {}
@Override
public boolean renderWorldBlock(
IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId,
RenderBlocks renderer) {
if (block instanceof IBlockTransparent) {
this.renderAllFaces(renderer, block, x, y, z, ((IBlockTransparent) block).getTransparentIcon());
}
@@ -5,14 +5,13 @@ import net.minecraft.client.renderer.EntityRenderer;
import net.minecraft.entity.player.EntityPlayer;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
* <p/>
* Created by makeo @ 09.07.2015 02:34
*/
public class PlayerCameraRenderer extends EntityRenderer {
private final Minecraft minecraft;
private boolean isMarkedForRemoval;
@@ -49,8 +48,7 @@ public class PlayerCameraRenderer extends EntityRenderer {
}
private boolean canChangeView() {
return !this.isMarkedForRemoval
&& this.minecraft.thePlayer != null
return !this.isMarkedForRemoval && this.minecraft.thePlayer != null
&& !this.minecraft.thePlayer.isRiding()
&& !this.minecraft.thePlayer.isPlayerSleeping();
}
@@ -3,23 +3,24 @@ package makeo.gadomancy.client.renderers.entity;
import makeo.gadomancy.api.GadomancyApi;
import makeo.gadomancy.api.golems.AdditionalGolemType;
import makeo.gadomancy.api.golems.cores.AdditionalGolemCore;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import thaumcraft.client.renderers.entity.RenderGolemBase;
import thaumcraft.client.renderers.models.entities.ModelGolem;
import thaumcraft.common.entities.golems.EntityGolemBase;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by makeo @ 12.03.2015 15:57
*/
public class RenderAdditionalGolemBase extends RenderGolemBase {
private ItemStack toolItem;
public RenderAdditionalGolemBase() {
@@ -1,3 +1,4 @@
package makeo.gadomancy.client.renderers.entity;
public class RenderEffectHelper {}
public class RenderEffectHelper {
}
@@ -2,13 +2,12 @@ package makeo.gadomancy.client.renderers.entity;
import makeo.gadomancy.common.entities.EntityAuraCore;
import makeo.gadomancy.common.utils.MiscUtils;
import net.minecraft.entity.Entity;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by HellFirePvP @ 01.12.2015 13:55
*/
@@ -9,10 +9,8 @@ import net.minecraft.entity.item.EntityItem;
import net.minecraft.util.ResourceLocation;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by HellFirePvP @ 29.11.2015 19:13
*/
@@ -1,7 +1,9 @@
package makeo.gadomancy.client.renderers.entity;
import java.awt.*;
import makeo.gadomancy.api.golems.cores.AdditionalGolemCore;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.model.ModelBase;
@@ -15,19 +17,20 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import org.lwjgl.opengl.GL11;
import thaumcraft.client.renderers.models.entities.ModelGolem;
import thaumcraft.common.entities.golems.EntityGolemBase;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by makeo @ 07.10.2015 13:18
*/
public class RenderGolemHelper {
private RenderGolemHelper() {}
public static void renderCore(EntityGolemBase golem, AdditionalGolemCore core) {
@@ -45,8 +48,8 @@ public class RenderGolemHelper {
float f3 = icon.getMinU();
float f4 = icon.getMaxV();
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationItemsTexture);
ItemRenderer.renderItemIn2D(
Tessellator.instance, f1, f2, f3, f4, icon.getIconWidth(), icon.getIconHeight(), 0.2F);
ItemRenderer
.renderItemIn2D(Tessellator.instance, f1, f2, f3, f4, icon.getIconWidth(), icon.getIconHeight(), 0.2F);
GL11.glPopMatrix();
}
@@ -92,8 +95,8 @@ public class RenderGolemHelper {
GL11.glPopMatrix();
}
public static void renderToolItem(
EntityGolemBase golem, ItemStack itemstack, ModelBase mainModel, RenderManager renderManager) {
public static void renderToolItem(EntityGolemBase golem, ItemStack itemstack, ModelBase mainModel,
RenderManager renderManager) {
GL11.glPushMatrix();
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
@@ -109,22 +112,18 @@ public class RenderGolemHelper {
float fs = 0.66F;
GL11.glScalef(fs, fs, fs);
net.minecraftforge.client.IItemRenderer customRenderer =
net.minecraftforge.client.MinecraftForgeClient.getItemRenderer(
itemstack, net.minecraftforge.client.IItemRenderer.ItemRenderType.EQUIPPED);
boolean is3D = (customRenderer != null
&& customRenderer.shouldUseRenderHelper(
net.minecraftforge.client.IItemRenderer.ItemRenderType.EQUIPPED,
itemstack,
net.minecraftforge.client.IItemRenderer.ItemRendererHelper.BLOCK_3D));
net.minecraftforge.client.IItemRenderer customRenderer = net.minecraftforge.client.MinecraftForgeClient
.getItemRenderer(itemstack, net.minecraftforge.client.IItemRenderer.ItemRenderType.EQUIPPED);
boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(
net.minecraftforge.client.IItemRenderer.ItemRenderType.EQUIPPED,
itemstack,
net.minecraftforge.client.IItemRenderer.ItemRendererHelper.BLOCK_3D));
Item item = itemstack.getItem();
float f1;
if (item instanceof ItemBlock
&& (is3D
|| RenderBlocks.renderItemIn3d(
Block.getBlockFromItem(item).getRenderType()))) {
&& (is3D || RenderBlocks.renderItemIn3d(Block.getBlockFromItem(item).getRenderType()))) {
f1 = 0.5F;
GL11.glTranslatef(0.0F, 0.1875F, -0.3125F);
f1 *= 0.75F;
@@ -1,25 +1,23 @@
package makeo.gadomancy.client.renderers.item;
import makeo.gadomancy.common.registration.RegisteredItems;
import net.minecraft.item.ItemStack;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
import thaumcraft.api.nodes.NodeType;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
* <p/>
* Created by makeo @ 04.11.2015 20:41
*/
public class ItemCreativeNodeRenderer extends ItemExNodeRenderer {
private static final AspectList ASPECTS = new AspectList()
.add(Aspect.AIR, 50)
.add(Aspect.FIRE, 50)
.add(Aspect.EARTH, 50)
.add(Aspect.WATER, 50);
private static final AspectList ASPECTS = new AspectList().add(Aspect.AIR, 50).add(Aspect.FIRE, 50)
.add(Aspect.EARTH, 50).add(Aspect.WATER, 50);
@Override
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
@@ -29,6 +27,11 @@ public class ItemCreativeNodeRenderer extends ItemExNodeRenderer {
@Override
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
makeo.gadomancy.client.renderers.item.ItemNodeRenderer.renderNodeItem(
type, item, ItemCreativeNodeRenderer.ASPECTS, NodeType.values()[item.getItemDamage()], null, data);
type,
item,
ItemCreativeNodeRenderer.ASPECTS,
NodeType.values()[item.getItemDamage()],
null,
data);
}
}
@@ -1,15 +1,15 @@
package makeo.gadomancy.client.renderers.item;
import makeo.gadomancy.common.registration.RegisteredBlocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import thaumcraft.client.renderers.tile.ItemNodeRenderer;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by HellFirePvP @ 22.10.2015 20:11
*/
@@ -17,8 +17,7 @@ public class ItemExNodeRenderer extends ItemNodeRenderer {
@Override
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
return (item != null)
&& (item.getItem() == Item.getItemFromBlock(RegisteredBlocks.blockNode))
return (item != null) && (item.getItem() == Item.getItemFromBlock(RegisteredBlocks.blockNode))
&& ((item.getItemDamage() == 0) || item.getItemDamage() == 5);
}
@@ -3,6 +3,7 @@ package makeo.gadomancy.client.renderers.item;
import makeo.gadomancy.common.items.ItemExtendedNodeJar;
import makeo.gadomancy.common.registration.RegisteredBlocks;
import makeo.gadomancy.common.registration.RegisteredItems;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.texture.TextureMap;
@@ -10,19 +11,20 @@ import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraftforge.client.IItemRenderer;
import org.lwjgl.opengl.GL11;
import thaumcraft.api.aspects.AspectList;
import thaumcraft.common.config.ConfigBlocks;
import thaumcraft.common.tiles.TileJar;
import thaumcraft.common.tiles.TileJarNode;
/**
* This class is NOT part of the Gadomancy Mod
* This file is copied from Azanors thaumcraft.client.renderers.tile.ItemJarNodeRenderer.java and contains small modifications
* Thaumcraft: http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1292130
* This class is NOT part of the Gadomancy Mod This file is copied from Azanors
* thaumcraft.client.renderers.tile.ItemJarNodeRenderer.java and contains small modifications Thaumcraft:
* http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1292130
*
* Created by Azanor
* Modified by HellFirePvP @ 26.10.2015 00:06
* Created by Azanor Modified by HellFirePvP @ 26.10.2015 00:06
*/
public class ItemJarExtendedNodeRenderer implements IItemRenderer {
@@ -32,8 +34,8 @@ public class ItemJarExtendedNodeRenderer implements IItemRenderer {
return (item != null) && (item.getItem() == RegisteredItems.itemExtendedNodeJar);
}
public boolean shouldUseRenderHelper(
IItemRenderer.ItemRenderType type, ItemStack item, IItemRenderer.ItemRendererHelper helper) {
public boolean shouldUseRenderHelper(IItemRenderer.ItemRenderType type, ItemStack item,
IItemRenderer.ItemRendererHelper helper) {
return helper != ItemRendererHelper.EQUIPPED_BLOCK;
}
@@ -7,7 +7,9 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.MathHelper;
import net.minecraftforge.client.IItemRenderer;
import org.lwjgl.opengl.GL11;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
import thaumcraft.api.nodes.INode;
@@ -19,23 +21,21 @@ import thaumcraft.common.config.ConfigBlocks;
import thaumcraft.common.tiles.TileNode;
/**
* This class is NOT part of the Gadomancy Mod
* This file is copied from Azanors thaumcraft.client.renderers.tile.ItemNodeRenderer.java and contains small modifications
* Thaumcraft: http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1292130
* This class is NOT part of the Gadomancy Mod This file is copied from Azanors
* thaumcraft.client.renderers.tile.ItemNodeRenderer.java and contains small modifications Thaumcraft:
* http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1292130
*
* Created by Azanor
* Modified by HellFirePvP @ 24.10.2015 17:19
* Created by Azanor Modified by HellFirePvP @ 24.10.2015 17:19
*/
public class ItemNodeRenderer implements IItemRenderer {
public boolean handleRenderType(ItemStack item, IItemRenderer.ItemRenderType type) {
return (item != null)
&& (item.getItem() == Item.getItemFromBlock(ConfigBlocks.blockAiry))
return (item != null) && (item.getItem() == Item.getItemFromBlock(ConfigBlocks.blockAiry))
&& ((item.getItemDamage() == 0) || (item.getItemDamage() == 5));
}
public boolean shouldUseRenderHelper(
IItemRenderer.ItemRenderType type, ItemStack item, IItemRenderer.ItemRendererHelper helper) {
public boolean shouldUseRenderHelper(IItemRenderer.ItemRenderType type, ItemStack item,
IItemRenderer.ItemRendererHelper helper) {
return helper != ItemRendererHelper.EQUIPPED_BLOCK;
}
@@ -46,13 +46,8 @@ public class ItemNodeRenderer implements IItemRenderer {
}
// Gadomancy: Renamed to access it static from another class and added aspects, nodeType and nodeModifier as params
public static void renderNodeItem(
IItemRenderer.ItemRenderType type,
ItemStack item,
AspectList aspects,
NodeType nodeType,
NodeModifier nodeModifier,
Object... data) {
public static void renderNodeItem(IItemRenderer.ItemRenderType type, ItemStack item, AspectList aspects,
NodeType nodeType, NodeModifier nodeModifier, Object... data) {
if (type == IItemRenderer.ItemRenderType.ENTITY) {
GL11.glTranslatef(-0.5F, -0.25F, -0.5F);
} else if ((type == IItemRenderer.ItemRenderType.EQUIPPED) && ((data[1] instanceof EntityPlayer))) {
@@ -79,10 +74,7 @@ public class ItemNodeRenderer implements IItemRenderer {
ItemNodeRenderer.renderNodeItem(type, item, ItemNodeRenderer.aspects, NodeType.NORMAL, null, data);
}
private static AspectList aspects = new AspectList()
.add(Aspect.AIR, 40)
.add(Aspect.FIRE, 40)
.add(Aspect.EARTH, 40)
private static AspectList aspects = new AspectList().add(Aspect.AIR, 40).add(Aspect.FIRE, 40).add(Aspect.EARTH, 40)
.add(Aspect.WATER, 40);
public static void renderItemNode(INode node) {
@@ -131,7 +123,13 @@ public class ItemNodeRenderer implements IItemRenderer {
scale = MathHelper.sin(viewer.ticksExisted / (14.0F - count)) * bscale + bscale * 2.0F;
scale = 0.2F + scale * (node.getAspects().getAmount(aspect) / 50.0F);
UtilsFX.renderAnimatedQuadStrip(
scale, alpha / node.getAspects().size(), frames, 0, i, 0.0F, aspect.getColor());
scale,
alpha / node.getAspects().size(),
frames,
0,
i,
0.0F,
aspect.getColor());
GL11.glDisable(3042);
GL11.glPopMatrix();
count++;
@@ -2,10 +2,12 @@ package makeo.gadomancy.client.renderers.item;
import java.awt.*;
import java.util.Random;
import makeo.gadomancy.client.util.FamiliarHandlerClient;
import makeo.gadomancy.common.items.baubles.ItemEtherealFamiliar;
import makeo.gadomancy.common.utils.MiscUtils;
import makeo.gadomancy.common.utils.world.fake.FakeWorld;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.ActiveRenderInfo;
import net.minecraft.client.renderer.Tessellator;
@@ -14,7 +16,9 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import net.minecraftforge.client.IItemRenderer;
import org.lwjgl.opengl.GL11;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.client.fx.ParticleEngine;
import thaumcraft.client.lib.UtilsFX;
@@ -22,10 +26,8 @@ import thaumcraft.common.Thaumcraft;
import thaumcraft.common.entities.monster.EntityWisp;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
* <p/>
* Created by HellFirePvP @ 01.11.2015 12:55
*/
@@ -62,10 +64,8 @@ public class ItemRenderFamiliar implements IItemRenderer {
if (ItemEtherealFamiliar.hasFamiliarAspect(item)) {
if (ItemRenderFamiliar.ENTITY_WISP == null)
ItemRenderFamiliar.ENTITY_WISP = new EntityWisp(new FakeWorld());
ItemRenderFamiliar.ENTITY_WISP.ticksExisted =
FamiliarHandlerClient.PartialEntityFamiliar.DUMMY_FAMILIAR.ticksExisted;
ItemRenderFamiliar.ENTITY_WISP.setType(
ItemEtherealFamiliar.getFamiliarAspect(item).getTag());
ItemRenderFamiliar.ENTITY_WISP.ticksExisted = FamiliarHandlerClient.PartialEntityFamiliar.DUMMY_FAMILIAR.ticksExisted;
ItemRenderFamiliar.ENTITY_WISP.setType(ItemEtherealFamiliar.getFamiliarAspect(item).getTag());
ItemRenderFamiliar.renderEntityWispFor(null, ItemRenderFamiliar.ENTITY_WISP, 0, 0, 0, 0, 0);
}
} finally {
@@ -122,8 +122,8 @@ public class ItemRenderFamiliar implements IItemRenderer {
private static int size1;
public static void renderEntityWispFor(
EntityPlayer owner, EntityWisp wisp, double x, double y, double z, float fq, float pticks) {
public static void renderEntityWispFor(EntityPlayer owner, EntityWisp wisp, double x, double y, double z, float fq,
float pticks) {
if (ItemRenderFamiliar.size1 == 0) {
ItemRenderFamiliar.size1 = UtilsFX.getTextureSize("textures/misc/wisp.png", 64);
}
@@ -1,27 +1,29 @@
package makeo.gadomancy.client.renderers.item;
import cpw.mods.fml.client.registry.RenderingRegistry;
import makeo.gadomancy.client.renderers.tile.RenderTileRemoteJar;
import makeo.gadomancy.common.blocks.tiles.TileRemoteJar;
import makeo.gadomancy.common.registration.RegisteredBlocks;
import makeo.gadomancy.common.utils.NBTHelper;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.item.ItemStack;
import net.minecraftforge.client.IItemRenderer;
import org.lwjgl.opengl.GL11;
import thaumcraft.api.aspects.AspectList;
import thaumcraft.common.blocks.ItemJarFilled;
import thaumcraft.common.config.ConfigItems;
import cpw.mods.fml.client.registry.RenderingRegistry;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by makeo @ 17.10.2015 01:44
*/
public class ItemRenderRemoteJar extends ItemRenderTileEntity<TileRemoteJar> {
public ItemRenderRemoteJar(RenderTileRemoteJar render) {
super(render, new TileRemoteJar());
}
@@ -48,12 +50,11 @@ public class ItemRenderRemoteJar extends ItemRenderTileEntity<TileRemoteJar> {
GL11.glPushMatrix();
GL11.glTranslatef(0.5f, 0.5f, 0.5f);
RenderingRegistry.instance()
.renderInventoryBlock(
RenderBlocks.getInstance(),
RegisteredBlocks.blockRemoteJar,
0,
RegisteredBlocks.blockRemoteJar.getRenderType());
RenderingRegistry.instance().renderInventoryBlock(
RenderBlocks.getInstance(),
RegisteredBlocks.blockRemoteJar,
0,
RegisteredBlocks.blockRemoteJar.getRenderType());
GL11.glPopMatrix();
}
}
@@ -2,25 +2,27 @@ package makeo.gadomancy.client.renderers.item;
import java.util.HashMap;
import java.util.Map;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import org.lwjgl.opengl.GL11;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
* <p/>
* Created by makeo @ 28.10.2015 23:27
*/
public class ItemRenderStoneMachine extends ItemRenderTileEntity<TileEntity> {
private final Map<Integer, RenderInfo> renderers = new HashMap<Integer, RenderInfo>();
public ItemRenderStoneMachine() {}
private static class RenderInfo {
private TileEntity tile;
private TileEntitySpecialRenderer renderer;
}
@@ -2,14 +2,13 @@ package makeo.gadomancy.client.renderers.item;
import makeo.gadomancy.client.renderers.tile.RenderTileKnowledgeBook;
import makeo.gadomancy.common.blocks.tiles.TileKnowledgeBook;
import net.minecraft.item.ItemStack;
import org.lwjgl.opengl.GL11;
/**
* HellFirePvP@Admin
* Date: 19.04.2016 / 16:02
* on Gadomancy
* ItemRenderTEKnowledgeBook
* HellFirePvP@Admin Date: 19.04.2016 / 16:02 on Gadomancy ItemRenderTEKnowledgeBook
*/
public class ItemRenderTEKnowledgeBook extends ItemRenderTileEntity<TileKnowledgeBook> {
@@ -2,22 +2,23 @@ package makeo.gadomancy.client.renderers.item;
import makeo.gadomancy.common.blocks.tiles.TileManipulationFocus;
import makeo.gadomancy.common.utils.world.fake.FakeWorld;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraftforge.client.IItemRenderer;
import org.lwjgl.opengl.GL11;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by makeo @ 29.09.2015 18:29
*/
public class ItemRenderTileEntity<T extends TileEntity> implements IItemRenderer {
protected static final World FAKE_WORLD = new FakeWorld();
protected TileEntitySpecialRenderer renderer;
@@ -2,17 +2,17 @@ package makeo.gadomancy.client.renderers.item;
import java.util.HashMap;
import java.util.Map;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.client.IItemRenderer;
import org.lwjgl.opengl.GL11;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by HellFirePvP @ 13.11.2015 00:33
*/
@@ -1,21 +1,22 @@
package makeo.gadomancy.client.renderers.tile;
import java.util.Random;
import makeo.gadomancy.client.effect.EffectHandler;
import makeo.gadomancy.client.effect.fx.Orbital;
import makeo.gadomancy.common.blocks.tiles.TileAIShutdown;
import makeo.gadomancy.common.utils.Vector3;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import thaumcraft.client.fx.ParticleEngine;
import thaumcraft.client.fx.particles.FXWisp;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
* <p/>
* Created by HellFirePvP @ 09.06.2016 / 12:56
*/
@@ -60,13 +61,10 @@ public class RenderTileAIShutdown extends TileEntitySpecialRenderer {
prop.setTicksForFullCircle(50).setOffsetTicks(0);
prop.setParticleSize(0F);
prop.setRenderRunnable(new Orbital.OrbitalRenderRunnable() {
@Override
public void onRender(
World world,
Vector3 pos,
Orbital.OrbitalRenderProperties properties,
int orbitalExisted,
float partialTicks) {
public void onRender(World world, Vector3 pos, Orbital.OrbitalRenderProperties properties,
int orbitalExisted, float partialTicks) {
if (RenderTileAIShutdown.rand.nextInt(3) == 0) {
FXWisp ef = new FXWisp(
world,
@@ -86,13 +84,10 @@ public class RenderTileAIShutdown extends TileEntitySpecialRenderer {
prop.setTicksForFullCircle(50).setOffsetTicks(25);
prop.setParticleSize(0F);
prop.setRenderRunnable(new Orbital.OrbitalRenderRunnable() {
@Override
public void onRender(
World world,
Vector3 pos,
Orbital.OrbitalRenderProperties properties,
int orbitalExisted,
float partialTicks) {
public void onRender(World world, Vector3 pos, Orbital.OrbitalRenderProperties properties,
int orbitalExisted, float partialTicks) {
if (RenderTileAIShutdown.rand.nextInt(3) == 0) {
FXWisp ef = new FXWisp(
world,
@@ -112,13 +107,10 @@ public class RenderTileAIShutdown extends TileEntitySpecialRenderer {
prop.setTicksForFullCircle(90).setOffsetTicks(0);
prop.setParticleSize(0F);
prop.setRenderRunnable(new Orbital.OrbitalRenderRunnable() {
@Override
public void onRender(
World world,
Vector3 pos,
Orbital.OrbitalRenderProperties properties,
int orbitalExisted,
float partialTicks) {
public void onRender(World world, Vector3 pos, Orbital.OrbitalRenderProperties properties,
int orbitalExisted, float partialTicks) {
if (RenderTileAIShutdown.rand.nextBoolean()) {
FXWisp ef = new FXWisp(
world,
@@ -138,13 +130,10 @@ public class RenderTileAIShutdown extends TileEntitySpecialRenderer {
prop.setTicksForFullCircle(90).setOffsetTicks(30);
prop.setParticleSize(0F);
prop.setRenderRunnable(new Orbital.OrbitalRenderRunnable() {
@Override
public void onRender(
World world,
Vector3 pos,
Orbital.OrbitalRenderProperties properties,
int orbitalExisted,
float partialTicks) {
public void onRender(World world, Vector3 pos, Orbital.OrbitalRenderProperties properties,
int orbitalExisted, float partialTicks) {
if (RenderTileAIShutdown.rand.nextBoolean()) {
FXWisp ef = new FXWisp(
world,
@@ -164,13 +153,10 @@ public class RenderTileAIShutdown extends TileEntitySpecialRenderer {
prop.setTicksForFullCircle(90).setOffsetTicks(60);
prop.setParticleSize(0F);
prop.setRenderRunnable(new Orbital.OrbitalRenderRunnable() {
@Override
public void onRender(
World world,
Vector3 pos,
Orbital.OrbitalRenderProperties properties,
int orbitalExisted,
float partialTicks) {
public void onRender(World world, Vector3 pos, Orbital.OrbitalRenderProperties properties,
int orbitalExisted, float partialTicks) {
if (RenderTileAIShutdown.rand.nextBoolean()) {
FXWisp ef = new FXWisp(
world,
@@ -2,24 +2,26 @@ package makeo.gadomancy.client.renderers.tile;
import makeo.gadomancy.client.models.ModelArcaneDropper;
import makeo.gadomancy.common.utils.SimpleResourceLocation;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.util.ForgeDirection;
import org.lwjgl.opengl.GL11;
import thaumcraft.client.renderers.tile.TileBellowsRenderer;
import thaumcraft.common.tiles.TileBellows;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by makeo @ 28.09.2015 20:00
*/
public class RenderTileArcaneDropper extends TileEntitySpecialRenderer {
private static final ResourceLocation RESOURCE = new SimpleResourceLocation("models/arcane_dropper.png");
private static final ModelBase MODEL = new ModelArcaneDropper();
@@ -4,21 +4,23 @@ import makeo.gadomancy.client.models.ModelArcanePackager;
import makeo.gadomancy.client.models.ModelPackagerPiston;
import makeo.gadomancy.common.blocks.tiles.TileArcanePackager;
import makeo.gadomancy.common.utils.SimpleResourceLocation;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import thaumcraft.common.tiles.TileJarFillable;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
* <p/>
* Created by makeo @ 28.11.2015 19:08
*/
public class RenderTileArcanePackager extends TileEntitySpecialRenderer {
private static final ResourceLocation TEXTURE = new SimpleResourceLocation("/models/arcane_packager.png");
private static final ModelArcanePackager MODEL = new ModelArcanePackager();
@@ -2,6 +2,7 @@ package makeo.gadomancy.client.renderers.tile;
import java.awt.*;
import java.util.Random;
import makeo.gadomancy.client.effect.EffectHandler;
import makeo.gadomancy.client.effect.fx.Orbital;
import makeo.gadomancy.client.models.ModelAuraPylon;
@@ -11,21 +12,22 @@ import makeo.gadomancy.common.blocks.tiles.TileAuraPylon;
import makeo.gadomancy.common.blocks.tiles.TileAuraPylonTop;
import makeo.gadomancy.common.utils.SimpleResourceLocation;
import makeo.gadomancy.common.utils.Vector3;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import org.lwjgl.opengl.GL11;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.client.fx.ParticleEngine;
import thaumcraft.client.fx.particles.FXWisp;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
* <p/>
* Created by HellFirePvP @ 12.11.2015 21:33
*/
@@ -34,11 +36,11 @@ public class RenderTileAuraPylon extends TileEntitySpecialRenderer {
public static final ModelBase MODEL_AURA_PYLON = new ModelAuraPylon();
public static final ModelBase MODEL_AURA_PYLON_TOP = new ModelAuraPylonTop();
public static final ModelBase MODEL_AURA_PYLON_BOTTOM = new ModelAuraPylonBottom();
public static final SimpleResourceLocation PYLON_TEXTURE_TOP =
new SimpleResourceLocation("models/aura_pylon_peak.png");
public static final SimpleResourceLocation PYLON_TEXTURE_TOP = new SimpleResourceLocation(
"models/aura_pylon_peak.png");
public static final SimpleResourceLocation PYLON_TEXTURE = new SimpleResourceLocation("models/aura_pylon.png");
public static final SimpleResourceLocation PYLON_TEXTURE_BOTTOM =
new SimpleResourceLocation("models/aura_pylon_base.png");
public static final SimpleResourceLocation PYLON_TEXTURE_BOTTOM = new SimpleResourceLocation(
"models/aura_pylon_base.png");
public void renderTileEntity(TileEntity tile, double x, double y, double z, float partTicks) {
GL11.glPushMatrix();
@@ -85,7 +87,8 @@ public class RenderTileAuraPylon extends TileEntitySpecialRenderer {
TileAuraPylonTop ta = (TileAuraPylonTop) tile;
if (ta.orbital == null && tile.getWorldObj() != null) {
ta.orbital = new Orbital(
new Vector3(tile.xCoord + 0.5, tile.yCoord + 0.7, tile.zCoord + 0.5), tile.getWorldObj());
new Vector3(tile.xCoord + 0.5, tile.yCoord + 0.7, tile.zCoord + 0.5),
tile.getWorldObj());
}
if (ta.orbital != null && !ta.orbital.registered) {
@@ -137,8 +140,9 @@ public class RenderTileAuraPylon extends TileEntitySpecialRenderer {
}
private void addNewOrbitalPoint(Orbital orbital, Random rand, Color color) {
Orbital.OrbitalRenderProperties properties =
new Orbital.OrbitalRenderProperties(Orbital.Axis.persisentRandomAxis(), rand.nextDouble() + 2D);
Orbital.OrbitalRenderProperties properties = new Orbital.OrbitalRenderProperties(
Orbital.Axis.persisentRandomAxis(),
rand.nextDouble() + 2D);
properties.setColor(color).setTicksForFullCircle(60 + rand.nextInt(40)).setOffsetTicks(rand.nextInt(80));
properties.setSubParticleColor(color.brighter().brighter());
orbital.addOrbitalPoint(properties);
@@ -3,21 +3,23 @@ package makeo.gadomancy.client.renderers.tile;
import makeo.gadomancy.client.models.ModelBlockProtector;
import makeo.gadomancy.common.blocks.tiles.TileBlockProtector;
import makeo.gadomancy.common.utils.SimpleResourceLocation;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import thaumcraft.client.renderers.models.ModelJar;
import thaumcraft.client.renderers.tile.TileJarRenderer;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
* <p/>
* Created by makeo @ 11.11.2015 16:28
*/
public class RenderTileBlockProtector extends TileJarRenderer {
private static final ResourceLocation TEXTURE_OFF = new SimpleResourceLocation("models/block_protector_off.png");
private static final ResourceLocation TEXTURE_ON = new SimpleResourceLocation("models/block_protector_on.png");
@@ -1,15 +1,15 @@
package makeo.gadomancy.client.renderers.tile;
import makeo.gadomancy.common.data.config.ModConfig;
import net.minecraft.tileentity.TileEntity;
import thaumcraft.client.renderers.tile.TileEldritchCapRenderer;
import thaumcraft.common.config.Config;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
* <p/>
* Created by HellFirePvP @ 10.11.2015 22:20
*/
@@ -2,6 +2,7 @@ package makeo.gadomancy.client.renderers.tile;
import java.util.HashMap;
import java.util.Map;
import makeo.gadomancy.client.effect.EffectHandler;
import makeo.gadomancy.client.effect.fx.FXVortex;
import makeo.gadomancy.client.models.ModelEssentiaCompressor;
@@ -9,26 +10,25 @@ import makeo.gadomancy.client.models.ModelPackedCompressorBlock;
import makeo.gadomancy.common.blocks.tiles.TileEssentiaCompressor;
import makeo.gadomancy.common.utils.SimpleResourceLocation;
import makeo.gadomancy.common.utils.world.fake.FakeWorld;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ChunkCoordinates;
import org.lwjgl.opengl.GL11;
/**
* HellFirePvP@Admin
* Date: 22.04.2016 / 21:39
* on Gadomancy
* RenderTileEssentiaCompressor
* HellFirePvP@Admin Date: 22.04.2016 / 21:39 on Gadomancy RenderTileEssentiaCompressor
*/
public class RenderTileEssentiaCompressor extends TileEntitySpecialRenderer {
public static final ModelBase MODEL_ESSENTIA_COMPRESSOR = new ModelEssentiaCompressor();
public static final ModelBase MODEL_PACKED_COMPRESSOR = new ModelPackedCompressorBlock();
public static final SimpleResourceLocation COMPRESSOR_TEXTURE =
new SimpleResourceLocation("models/essentia_compressor.png");
public static final SimpleResourceLocation PACKED_COMPRESSOR_TEXTURE =
new SimpleResourceLocation("blocks/block_packed_compressor.png");
public static final SimpleResourceLocation COMPRESSOR_TEXTURE = new SimpleResourceLocation(
"models/essentia_compressor.png");
public static final SimpleResourceLocation PACKED_COMPRESSOR_TEXTURE = new SimpleResourceLocation(
"blocks/block_packed_compressor.png");
@Override
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTicks) {
@@ -57,8 +57,7 @@ public class RenderTileEssentiaCompressor extends TileEntitySpecialRenderer {
tileEntity.xCoord + 0.5,
tileEntity.yCoord + 0.5,
tileEntity.zCoord + 0.5,
(TileEssentiaCompressor) tileEntity
.getWorldObj()
(TileEssentiaCompressor) tileEntity.getWorldObj()
.getTileEntity(tileEntity.xCoord, tileEntity.yCoord - 1, tileEntity.zCoord));
}
GL11.glPopMatrix();
@@ -2,14 +2,13 @@ package makeo.gadomancy.client.renderers.tile;
import makeo.gadomancy.common.blocks.tiles.TileExtendedNode;
import makeo.gadomancy.common.node.ExtendedNodeType;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by HellFirePvP @ 22.10.2015 19:44
*/
@@ -3,11 +3,10 @@ package makeo.gadomancy.client.renderers.tile;
import thaumcraft.client.renderers.tile.TileJarRenderer;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
* <p/>
* Created by HellFirePvP @ 26.10.2015 00:00
*/
public class RenderTileExtendedNodeJar extends TileJarRenderer {}
public class RenderTileExtendedNodeJar extends TileJarRenderer {
}
@@ -1,11 +1,13 @@
package makeo.gadomancy.client.renderers.tile;
import java.util.Random;
import makeo.gadomancy.client.models.ModelInfusionClawPart;
import makeo.gadomancy.client.models.ModelWandPart;
import makeo.gadomancy.common.blocks.tiles.TileInfusionClaw;
import makeo.gadomancy.common.utils.Injector;
import makeo.gadomancy.common.utils.SimpleResourceLocation;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
@@ -16,7 +18,9 @@ import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import net.minecraftforge.client.IItemRenderer;
import net.minecraftforge.common.util.ForgeDirection;
import org.lwjgl.opengl.GL11;
import thaumcraft.client.renderers.entity.RenderPrimalOrb;
import thaumcraft.client.renderers.item.ItemWandRenderer;
import thaumcraft.common.Thaumcraft;
@@ -25,14 +29,13 @@ import thaumcraft.common.entities.projectile.EntityPrimalOrb;
import thaumcraft.common.items.wands.ItemWandCasting;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by makeo @ 05.10.2015 21:39
*/
public class RenderTileInfusionClaw extends TileEntitySpecialRenderer {
private static final ResourceLocation RESOURCE = new SimpleResourceLocation("models/infusion_claw.png");
private static final ModelInfusionClawPart[] MODELS;
private static final Random RANDOM = new Random();
@@ -212,8 +215,8 @@ public class RenderTileInfusionClaw extends TileEntitySpecialRenderer {
}
}
private void createZap(
TileEntity tile, float startX, float startY, float startZ, float endX, float endY, float endZ) {
private void createZap(TileEntity tile, float startX, float startY, float startZ, float endX, float endY,
float endZ) {
Thaumcraft.proxy.nodeBolt(
Thaumcraft.proxy.getClientWorld(),
tile.xCoord + startX,
@@ -225,16 +228,14 @@ public class RenderTileInfusionClaw extends TileEntitySpecialRenderer {
}
private void playZapSound(float x, float y, float z) {
Thaumcraft.proxy
.getClientWorld()
.playSound(
x,
y,
z,
"thaumcraft:zap",
0.1F,
1.0F + Thaumcraft.proxy.getClientWorld().rand.nextFloat() * 0.2F,
false);
Thaumcraft.proxy.getClientWorld().playSound(
x,
y,
z,
"thaumcraft:zap",
0.1F,
1.0F + Thaumcraft.proxy.getClientWorld().rand.nextFloat() * 0.2F,
false);
}
private void renderSides(TileInfusionClaw tile, World world, int x, int y, int z, float elapsed) {
@@ -1,23 +1,23 @@
package makeo.gadomancy.client.renderers.tile;
import makeo.gadomancy.common.blocks.tiles.TileKnowledgeBook;
import net.minecraft.client.model.ModelBook;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MathHelper;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
/**
* HellFirePvP@Admin
* Date: 19.04.2016 / 14:57
* on Gadomancy
* RenderTileKnowledgeBook
* HellFirePvP@Admin Date: 19.04.2016 / 14:57 on Gadomancy RenderTileKnowledgeBook
*/
public class RenderTileKnowledgeBook extends TileEntitySpecialRenderer {
private static final ResourceLocation bookTexture =
new ResourceLocation("minecraft", "textures/entity/enchanting_table_book.png");
private static final ResourceLocation bookTexture = new ResourceLocation(
"minecraft",
"textures/entity/enchanting_table_book.png");
private static final ModelBook modelBook = new ModelBook();
@Override
@@ -36,9 +36,8 @@ public class RenderTileKnowledgeBook extends TileEntitySpecialRenderer {
GL11.glTranslatef(0.0F, 0.1F + MathHelper.sin(f1 * 0.1F) * 0.03F, 0.0F);
float f2;
for (f2 = attributes.field_145928_o - attributes.field_145925_p;
f2 >= (float) Math.PI;
f2 -= ((float) Math.PI * 2F)) {}
for (f2 = attributes.field_145928_o - attributes.field_145925_p; f2
>= (float) Math.PI; f2 -= ((float) Math.PI * 2F)) {}
while (f2 < -(float) Math.PI) {
f2 += ((float) Math.PI * 2F);
@@ -48,11 +47,9 @@ public class RenderTileKnowledgeBook extends TileEntitySpecialRenderer {
GL11.glRotatef(-f3 * 180.0F / (float) Math.PI, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(80.0F, 0.0F, 0.0F, 1.0F);
this.bindTexture(RenderTileKnowledgeBook.bookTexture);
float f4 = attributes.field_145931_j
+ (attributes.field_145933_i - attributes.field_145931_j) * partialTicks
float f4 = attributes.field_145931_j + (attributes.field_145933_i - attributes.field_145931_j) * partialTicks
+ 0.25F;
float f5 = attributes.field_145931_j
+ (attributes.field_145933_i - attributes.field_145931_j) * partialTicks
float f5 = attributes.field_145931_j + (attributes.field_145933_i - attributes.field_145931_j) * partialTicks
+ 0.75F;
f4 = (f4 - (float) MathHelper.truncateDoubleToInt(f4)) * 1.6F - 0.3F;
f5 = (f5 - (float) MathHelper.truncateDoubleToInt(f5)) * 1.6F - 0.3F;
@@ -4,19 +4,20 @@ import makeo.gadomancy.client.models.ModelFocusPortalPart;
import makeo.gadomancy.client.models.ModelManipulatorPart;
import makeo.gadomancy.common.blocks.tiles.TileManipulationFocus;
import makeo.gadomancy.common.utils.SimpleResourceLocation;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import org.lwjgl.opengl.GL11;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
* <p/>
* Created by makeo @ 28.10.2015 18:00
*/
public class RenderTileManipulationFocus extends TileEntitySpecialRenderer {
private static final ModelManipulatorPart RANDOM_FOCUS = new ModelManipulatorPart();
private static final ModelFocusPortalPart PORTAL_FOCUS = new ModelFocusPortalPart();
@@ -1,33 +1,35 @@
package makeo.gadomancy.client.renderers.tile;
import java.util.Map;
import makeo.gadomancy.common.utils.Injector;
import makeo.gadomancy.common.utils.SimpleResourceLocation;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import thaumcraft.client.lib.UtilsFX;
import thaumcraft.client.renderers.tile.TileInfusionPillarRenderer;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
* <p/>
* Created by makeo @ 27.10.2015 13:23
*/
public class RenderTileManipulatorPillar extends TileInfusionPillarRenderer {
private static final String TC_TEXTURE = "textures/models/pillar.png";
private static final ResourceLocation TEXTURE = new SimpleResourceLocation("models/manipulator_pillar.png");
private static final Map<String, ResourceLocation> BOUND_TEXTURES =
new Injector(UtilsFX.class).getField("boundTextures");
private static final Map<String, ResourceLocation> BOUND_TEXTURES = new Injector(UtilsFX.class)
.getField("boundTextures");
@Override
public void renderTileEntityAt(TileEntity par1TileEntity, double par2, double par4, double par6, float par8) {
ResourceLocation originalTexture =
RenderTileManipulatorPillar.BOUND_TEXTURES.get(RenderTileManipulatorPillar.TC_TEXTURE);
RenderTileManipulatorPillar.BOUND_TEXTURES.put(
RenderTileManipulatorPillar.TC_TEXTURE, RenderTileManipulatorPillar.TEXTURE);
ResourceLocation originalTexture = RenderTileManipulatorPillar.BOUND_TEXTURES
.get(RenderTileManipulatorPillar.TC_TEXTURE);
RenderTileManipulatorPillar.BOUND_TEXTURES
.put(RenderTileManipulatorPillar.TC_TEXTURE, RenderTileManipulatorPillar.TEXTURE);
super.renderTileEntityAt(par1TileEntity, par2, par4, par6, par8);
if (originalTexture != null) {
@@ -1,6 +1,7 @@
package makeo.gadomancy.client.renderers.tile;
import makeo.gadomancy.common.events.EventHandlerRedirect;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
@@ -10,7 +11,9 @@ import net.minecraft.util.MathHelper;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.Vec3;
import org.lwjgl.opengl.GL11;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
import thaumcraft.api.nodes.INode;
@@ -23,41 +26,26 @@ import thaumcraft.common.tiles.TileJarNode;
import thaumcraft.common.tiles.TileNode;
/**
* This class is NOT part of the Gadomancy Mod
* This file is copied from Azanors thaumcraft.client.renderers.tile.TileNodeRenderer.java and contains small modifications
* Thaumcraft: http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1292130
* This class is NOT part of the Gadomancy Mod This file is copied from Azanors
* thaumcraft.client.renderers.tile.TileNodeRenderer.java and contains small modifications Thaumcraft:
* http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1292130
*
* Created by Azanor
* Modified by HellFirePvP @ 23.10.2015 20:04
* Created by Azanor Modified by HellFirePvP @ 23.10.2015 20:04
*/
public class RenderTileNodeBasic {
/*
Changes overview:
(Note: Changes are visible by "Gadomancy START" to "Gadomancy END" or by a comment in the end of the line!)
- Where a node is rendered is now defined of the parameters of renderTileEntityAt() and no longer of the node-tile itself
- Node rendering takes doubles as params and no longer int values.
- Redirected renderTileEntityAt to a renderTileEntityAt where a size of the node can be specified
Changes made by HellFirePvP
* Changes overview: (Note: Changes are visible by "Gadomancy START" to "Gadomancy END" or by a comment in the end
* of the line!) - Where a node is rendered is now defined of the parameters of renderTileEntityAt() and no longer
* of the node-tile itself - Node rendering takes doubles as params and no longer int values. - Redirected
* renderTileEntityAt to a renderTileEntityAt where a size of the node can be specified Changes made by HellFirePvP
*/
public static final ResourceLocation nodetex = new ResourceLocation("thaumcraft", "textures/misc/nodes.png");
// Gadomancy: changed params x, y, z from int to double
public static void renderNode(
EntityLivingBase viewer,
double viewDistance,
boolean visible,
boolean depthIgnore,
float size,
double x,
double y,
double z,
float partialTicks,
AspectList aspects,
NodeType type,
public static void renderNode(EntityLivingBase viewer, double viewDistance, boolean visible, boolean depthIgnore,
float size, double x, double y, double z, float partialTicks, AspectList aspects, NodeType type,
NodeModifier mod) {
long nt = System.nanoTime();
@@ -208,8 +196,8 @@ public class RenderTileNodeBasic {
// Gadomancy END
// Gadomancy: Added dynamic size
public static void renderTileEntityAt(
TileEntity tile, double x, double y, double z, float partialTicks, float size) {
public static void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTicks,
float size) {
// Gadomancy Added event hook
EventHandlerRedirect.preNodeRender(tile);
@@ -226,27 +214,25 @@ public class RenderTileNodeBasic {
if ((viewer instanceof EntityPlayer)) {
if ((tile != null) && ((tile instanceof TileJarNode))) {
condition = true;
size = (float) ((size * 7D)
/ 10D); // Gadomancy: Node size is 70% of the default size in standart TC. calculating the same
size = (float) ((size * 7D) / 10D); // Gadomancy: Node size is 70% of the default size in standart TC.
// calculating the same
// here.
} else if ((((EntityPlayer) viewer).inventory.armorItemInSlot(3) != null)
&& ((((EntityPlayer) viewer).inventory.armorItemInSlot(3).getItem() instanceof IRevealer))
&& (((IRevealer) ((EntityPlayer) viewer)
.inventory
.armorItemInSlot(3)
.getItem())
&& (((IRevealer) ((EntityPlayer) viewer).inventory.armorItemInSlot(3).getItem())
.showNodes(((EntityPlayer) viewer).inventory.armorItemInSlot(3), viewer))) {
condition = true;
depthIgnore = true;
} else if ((((EntityPlayer) viewer).inventory.getCurrentItem() != null)
&& ((((EntityPlayer) viewer).inventory.getCurrentItem().getItem() instanceof ItemThaumometer))) {
// Gadomancy: Changed from tile.xCoord, ... to x, y, z to make it dependent from params
if (UtilsFX.isVisibleTo(0.44F, viewer, x, y, z)) {
condition = true;
depthIgnore = true;
viewDistance = 48.0D;
}
}
condition = true;
depthIgnore = true;
} else
if ((((EntityPlayer) viewer).inventory.getCurrentItem() != null) && ((((EntityPlayer) viewer).inventory
.getCurrentItem().getItem() instanceof ItemThaumometer))) {
// Gadomancy: Changed from tile.xCoord, ... to x, y, z to make it dependent from params
if (UtilsFX.isVisibleTo(0.44F, viewer, x, y, z)) {
condition = true;
depthIgnore = true;
viewDistance = 48.0D;
}
}
}
// Gadomancy: Changed from tile.xCoord, ... to x, y, z to make it dependent from params
RenderTileNodeBasic.renderNode(
@@ -262,8 +248,7 @@ public class RenderTileNodeBasic {
((INode) tile).getAspects(),
((INode) tile).getNodeType(),
((INode) tile).getNodeModifier());
if (((tile instanceof TileNode))
&& (((TileNode) tile).drainEntity != null)
if (((tile instanceof TileNode)) && (((TileNode) tile).drainEntity != null)
&& (((TileNode) tile).drainCollision != null)) {
Entity drainEntity = ((TileNode) tile).drainEntity;
if (((drainEntity instanceof EntityPlayer)) && (!((EntityPlayer) drainEntity).isUsingItem())) {
@@ -283,14 +268,14 @@ public class RenderTileNodeBasic {
f10 = MathHelper.sin(iiud / 10.0F) * 10.0F;
}
Vec3 vec3 = Vec3.createVectorHelper(-0.1D, -0.1D, 0.5D);
vec3.rotateAroundX(-(drainEntity.prevRotationPitch
+ (drainEntity.rotationPitch - drainEntity.prevRotationPitch) * partialTicks)
* 3.141593F
/ 180.0F);
vec3.rotateAroundY(-(drainEntity.prevRotationYaw
+ (drainEntity.rotationYaw - drainEntity.prevRotationYaw) * partialTicks)
* 3.141593F
/ 180.0F);
vec3.rotateAroundX(
-(drainEntity.prevRotationPitch
+ (drainEntity.rotationPitch - drainEntity.prevRotationPitch) * partialTicks) * 3.141593F
/ 180.0F);
vec3.rotateAroundY(
-(drainEntity.prevRotationYaw
+ (drainEntity.rotationYaw - drainEntity.prevRotationYaw) * partialTicks) * 3.141593F
/ 180.0F);
vec3.rotateAroundY(-f10 * 0.01F);
vec3.rotateAroundX(-f10 * 0.015F);
double d3 = drainEntity.prevPosX + (drainEntity.posX - drainEntity.prevPosX) * partialTicks + vec3.xCoord;
@@ -2,21 +2,23 @@ package makeo.gadomancy.client.renderers.tile;
import makeo.gadomancy.client.models.ModelSmallCube;
import makeo.gadomancy.common.utils.SimpleResourceLocation;
import net.minecraft.client.Minecraft;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
import org.lwjgl.opengl.GL11;
import thaumcraft.client.renderers.tile.TileWandPedestalRenderer;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
* <p/>
* Created by makeo @ 27.10.2015 15:19
*/
public class RenderTileNodeManipulator extends TileWandPedestalRenderer {
private static final ModelSmallCube MODEL = new ModelSmallCube();
private static final SimpleResourceLocation TEXTURE = new SimpleResourceLocation("models/small_cube.png");
@@ -1,19 +1,20 @@
package makeo.gadomancy.client.renderers.tile;
import makeo.gadomancy.common.data.config.ModConfig;
import net.minecraft.tileentity.TileEntity;
import thaumcraft.client.renderers.tile.TileEldritchObeliskRenderer;
import thaumcraft.common.config.Config;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
* <p/>
* Created by makeo @ 10.11.2015 21:59
*/
public class RenderTileObelisk extends TileEldritchObeliskRenderer {
@Override
public void renderTileEntityAt(TileEntity te, double x, double y, double z, float f) {
if (te.getWorldObj().provider.dimensionId == ModConfig.dimOuterId) {
@@ -4,24 +4,26 @@ import makeo.gadomancy.client.models.ModelJarPot;
import makeo.gadomancy.common.blocks.BlockRemoteJar;
import makeo.gadomancy.common.utils.SimpleResourceLocation;
import makeo.gadomancy.common.utils.world.fake.FakeWorld;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import thaumcraft.client.renderers.tile.TileJarRenderer;
import thaumcraft.client.renderers.tile.TileMirrorRenderer;
import thaumcraft.common.tiles.TileMirrorEssentia;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by makeo @ 14.10.2015 16:01
*/
public class RenderTileRemoteJar extends TileJarRenderer {
private static final ModelJarPot MODEL_JAR_POT = new ModelJarPot();
private static final ResourceLocation OVERLAY_TEXTURE = new SimpleResourceLocation("models/jar_pot.png");
@@ -1,6 +1,7 @@
package makeo.gadomancy.client.renderers.tile;
import makeo.gadomancy.common.blocks.tiles.TileStickyJar;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
@@ -10,18 +11,19 @@ import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import org.lwjgl.opengl.GL11;
import thaumcraft.common.tiles.TileJarFillable;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by makeo @ 14.07.2015 21:05
*/
public class RenderTileStickyJar extends TileEntitySpecialRenderer {
private static final RenderBlocks RENDER_BLOCKS = new RenderBlocks();
@Override
@@ -63,7 +65,9 @@ public class RenderTileStickyJar extends TileEntitySpecialRenderer {
tess.startDrawingQuads();
tess.setNormal(
0, -stickyJar.placedOn.offsetY, -Math.abs(stickyJar.placedOn.offsetZ + stickyJar.placedOn.offsetX));
0,
-stickyJar.placedOn.offsetY,
-Math.abs(stickyJar.placedOn.offsetZ + stickyJar.placedOn.offsetX));
tess.setTranslation(-tile.xCoord, -tile.yCoord, -tile.zCoord);
@@ -3,21 +3,22 @@ package makeo.gadomancy.client.textures;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.io.InputStream;
import javax.imageio.ImageIO;
import net.minecraft.client.renderer.texture.SimpleTexture;
import net.minecraft.client.resources.IResource;
import net.minecraft.client.resources.IResourceManager;
import net.minecraft.util.ResourceLocation;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by makeo @ 04.10.2015 17:56
*/
public abstract class BaseTexture extends SimpleTexture {
public BaseTexture(ResourceLocation resourceLocation) {
super(resourceLocation);
}
@@ -5,27 +5,31 @@ import java.awt.image.BufferedImage;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;
import javax.imageio.ImageIO;
import makeo.gadomancy.api.GadomancyApi;
import makeo.gadomancy.api.golems.AdditionalGolemType;
import net.minecraft.client.renderer.texture.TextureUtil;
import net.minecraft.client.resources.IResource;
import net.minecraft.client.resources.IResourceManager;
import net.minecraft.client.resources.data.TextureMetadataSection;
import net.minecraft.util.ResourceLocation;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import thaumcraft.common.entities.golems.EnumGolemType;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by makeo @ 07.09.2015 18:11
*/
public class GolemGuiTexture extends BaseTexture {
private static final Logger LOGGER = LogManager.getLogger();
@Override
@@ -52,16 +56,16 @@ public class GolemGuiTexture extends BaseTexture {
if (iresource.hasMetadata()) {
try {
TextureMetadataSection texturemetadatasection =
(TextureMetadataSection) iresource.getMetadata("texture");
TextureMetadataSection texturemetadatasection = (TextureMetadataSection) iresource
.getMetadata("texture");
if (texturemetadatasection != null) {
flag = texturemetadatasection.getTextureBlur();
flag1 = texturemetadatasection.getTextureClamp();
}
} catch (RuntimeException runtimeexception) {
GolemGuiTexture.LOGGER.warn(
"Failed reading metadata of: " + this.textureLocation, runtimeexception);
GolemGuiTexture.LOGGER
.warn("Failed reading metadata of: " + this.textureLocation, runtimeexception);
}
}
@@ -80,7 +84,9 @@ public class GolemGuiTexture extends BaseTexture {
int newHeight = (24 * scale) * (this.getMaxOrdinal() + 1);
BufferedImage newImg = new BufferedImage(
image.getWidth(), newHeight < image.getHeight() ? image.getHeight() : newHeight, image.getType());
image.getWidth(),
newHeight < image.getHeight() ? image.getHeight() : newHeight,
image.getType());
for (int x = 0; x < image.getWidth(); x++) {
for (int y = 0; y < image.getHeight(); y++) {
@@ -2,18 +2,18 @@ package makeo.gadomancy.client.transformation;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import thaumcraft.common.entities.golems.EntityGolemBase;
import thaumcraft.common.entities.golems.EnumGolemType;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
* <p/>
* Created by makeo @ 05.07.2015 15:47
*/
public class FakeEntityGolemBase extends EntityGolemBase {
private EntityGolemBase golem;
private EntityPlayer player;
@@ -1,34 +1,37 @@
package makeo.gadomancy.client.transformation;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import makeo.gadomancy.client.renderers.entity.PlayerCameraRenderer;
import makeo.gadomancy.common.network.PacketHandler;
import makeo.gadomancy.common.network.packets.PacketAbortTransform;
import makeo.gadomancy.common.registration.RegisteredIntegrations;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.EntityRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import thaumcraft.common.entities.golems.EntityGolemBase;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
* <p/>
* Created by makeo @ 04.07.2015 02:38
*/
@SideOnly(Side.CLIENT)
public class TransformationHelper {
private static final FakeEntityGolemBase DEFAULT_GOLEM;
static {
EntityGolemBase golem = new EntityGolemBase(null) {
@Override
public byte getCore() {
return (byte) 4;
@@ -47,16 +50,14 @@ public class TransformationHelper {
public static boolean isTransformable() {
Minecraft mc = Minecraft.getMinecraft();
return mc.thePlayer.equals(mc.renderViewEntity)
&& !RegisteredIntegrations.morph.isMorphed()
return mc.thePlayer.equals(mc.renderViewEntity) && !RegisteredIntegrations.morph.isMorphed()
&& mc.entityRenderer.getClass().equals(EntityRenderer.class)
&& (TransformationHelper.renderer == null || TransformationHelper.renderer.isRemoved());
}
public static boolean isForeignTransformed() {
Minecraft mc = Minecraft.getMinecraft();
return !mc.renderViewEntity.equals(mc.thePlayer)
|| RegisteredIntegrations.morph.isMorphed()
return !mc.renderViewEntity.equals(mc.thePlayer) || RegisteredIntegrations.morph.isMorphed()
|| (!mc.entityRenderer.getClass().equals(EntityRenderer.class)
&& !(mc.entityRenderer instanceof PlayerCameraRenderer));
}
@@ -116,8 +117,7 @@ public class TransformationHelper {
public static void cancelTransformation(PacketAbortTransform.AbortReason reason) {
if (TransformationHelper.isTransformed()) {
PacketHandler.INSTANCE.sendToServer(new PacketAbortTransform(reason));
TransformationHelper.onAbortTransformation(
Minecraft.getMinecraft().thePlayer.getEntityId());
TransformationHelper.onAbortTransformation(Minecraft.getMinecraft().thePlayer.getEntityId());
}
}
@@ -2,14 +2,14 @@ package makeo.gadomancy.client.util;
import makeo.gadomancy.client.events.ResourceReloadListener;
import makeo.gadomancy.common.node.ExtendedNodeType;
import net.minecraft.util.StatCollector;
import thaumcraft.api.nodes.NodeType;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by HellFirePvP @ 23.10.2015 22:53
*/
@@ -35,8 +35,8 @@ public class ExtendedTypeDisplayManager {
private static void resetLanguageFile() {
ExtendedTypeDisplayManager.currentNodeId = null;
ResourceReloadListener.languageList.put(
ExtendedTypeDisplayManager.changedEntry, ExtendedTypeDisplayManager.oldName);
ResourceReloadListener.languageList
.put(ExtendedTypeDisplayManager.changedEntry, ExtendedTypeDisplayManager.oldName);
ExtendedTypeDisplayManager.changedLanguageFile = false;
}
@@ -1,15 +1,15 @@
package makeo.gadomancy.client.util;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.lang.ref.WeakReference;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import makeo.gadomancy.client.renderers.item.ItemRenderFamiliar;
import makeo.gadomancy.common.data.DataFamiliar;
import makeo.gadomancy.common.network.packets.PacketFamiliarBolt;
import makeo.gadomancy.common.utils.world.fake.FakeWorld;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.entity.Entity;
@@ -17,17 +17,19 @@ import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import org.lwjgl.opengl.GL11;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.client.fx.bolt.FXLightningBolt;
import thaumcraft.client.renderers.entity.RenderWisp;
import thaumcraft.common.entities.monster.EntityWisp;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by HellFirePvP @ 31.10.2015 12:13
*/
@@ -103,7 +105,13 @@ public class FamiliarHandlerClient {
}
ItemRenderFamiliar.renderEntityWispFor(
fam.owner.get(), FamiliarHandlerClient.ENTITY_WISP, diffX, diffY, diffZ, 0, partialTicks);
fam.owner.get(),
FamiliarHandlerClient.ENTITY_WISP,
diffX,
diffY,
diffZ,
0,
partialTicks);
GL11.glPopMatrix();
}
@@ -124,7 +132,8 @@ public class FamiliarHandlerClient {
public static void handleAdditions(List<DataFamiliar.FamiliarData> toAdd) {
for (DataFamiliar.FamiliarData data : toAdd) {
PartialEntityFamiliar familiar = new PartialEntityFamiliar(
Minecraft.getMinecraft().theWorld.getPlayerEntityByName(data.owner), data.owner);
Minecraft.getMinecraft().theWorld.getPlayerEntityByName(data.owner),
data.owner);
ExFamiliarData exData = new ExFamiliarData(data, familiar);
FamiliarHandlerClient.clientFamiliars.put(data.owner, exData);
}
@@ -208,8 +217,8 @@ public class FamiliarHandlerClient {
if (this.owner.get() == null) {
if (this.potentialOwnerName != null) {
EntityPlayer player =
Minecraft.getMinecraft().theWorld.getPlayerEntityByName(this.potentialOwnerName);
EntityPlayer player = Minecraft.getMinecraft().theWorld
.getPlayerEntityByName(this.potentialOwnerName);
if (player != null) {
this.owner = new WeakReference<EntityPlayer>(player);
} else {
@@ -4,20 +4,20 @@ import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.locks.ReentrantLock;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.world.World;
import thaumcraft.client.fx.ParticleEngine;
import thaumcraft.client.fx.particles.FXBubble;
import thaumcraft.client.lib.UtilsFX;
import thaumcraft.common.Thaumcraft;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by HellFirePvP @ 25.10.2015 18:54
*/
@@ -167,16 +167,8 @@ public class MultiTickEffectDispatcher {
private int colorAsInt;
private int randomOffset = -1;
public FloatyLineInfo(
int dimId,
double pedestalX,
double pedestalY,
double pedestalZ,
double originX,
double originY,
double originZ,
int tickCap,
int colorAsInt) {
public FloatyLineInfo(int dimId, double pedestalX, double pedestalY, double pedestalZ, double originX,
double originY, double originZ, int tickCap, int colorAsInt) {
this.dimId = dimId;
this.pedestalX = pedestalX;
this.pedestalY = pedestalY;
@@ -216,16 +208,7 @@ public class MultiTickEffectDispatcher {
private int renderTicks;
private int tickCap;
public VortexDigInfo(
int dimId,
int oX,
int oY,
int oZ,
int tX,
int tY,
int tZ,
Block blockInstance,
int meta,
public VortexDigInfo(int dimId, int oX, int oY, int oZ, int tX, int tY, int tZ, Block blockInstance, int meta,
int tickDuration) {
this.dimId = dimId;
this.oX = oX;
@@ -2,37 +2,30 @@ package makeo.gadomancy.client.util;
import java.awt.*;
import java.util.Random;
import makeo.gadomancy.common.utils.MiscUtils;
import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.EntitySmokeFX;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.world.World;
import thaumcraft.common.Thaumcraft;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by HellFirePvP @ 30.10.2015 20:08
*/
public class UtilsFX {
private static final Color[] RUNE_COLORS_RED = {
new Color(0xB60707),
new Color(0xEE3782),
new Color(0xF37B20),
new Color(0xFF6722),
new Color(0xFF6D30),
new Color(0xFF0000)
};
private static final Color[] RUNE_COLORS_GREEN = {
new Color(0x015629), new Color(0x0E9C00), new Color(0x010000), new Color(0x01FF00), new Color(0x014C3E)
};
private static final Color[] RUNE_COLORS_BLUE = {
new Color(0x060956), new Color(0x012578), new Color(0x0C1556), new Color(0x0100FF), new Color(0x01018C)
};
private static final Color[] RUNE_COLORS_RED = { new Color(0xB60707), new Color(0xEE3782), new Color(0xF37B20),
new Color(0xFF6722), new Color(0xFF6D30), new Color(0xFF0000) };
private static final Color[] RUNE_COLORS_GREEN = { new Color(0x015629), new Color(0x0E9C00), new Color(0x010000),
new Color(0x01FF00), new Color(0x014C3E) };
private static final Color[] RUNE_COLORS_BLUE = { new Color(0x060956), new Color(0x012578), new Color(0x0C1556),
new Color(0x0100FF), new Color(0x01018C) };
public static void doRuneEffects(World world, int x, int y, int z, int colorFlag) {
if (world.isRemote) {
@@ -81,9 +74,8 @@ public class UtilsFX {
public static void doSmokeEffects(World world, int x, int y, int z, float size) {
int count = world.rand.nextInt(6) + 2;
for (int i = 0; i < count; i++) {
Minecraft.getMinecraft()
.effectRenderer
.addEffect(new EntitySmokeFX(
Minecraft.getMinecraft().effectRenderer.addEffect(
new EntitySmokeFX(
world,
x + 0.5 + UtilsFX.randEffectOffset(world.rand),
y + 0.5 + UtilsFX.randEffectOffset(world.rand),
@@ -1,12 +1,9 @@
package makeo.gadomancy.common;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.network.IGuiHandler;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.relauncher.Side;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import makeo.gadomancy.client.ClientProxy;
import makeo.gadomancy.common.aura.AuraEffects;
import makeo.gadomancy.common.containers.ContainerArcanePackager;
@@ -22,21 +19,25 @@ import makeo.gadomancy.common.network.packets.PacketStartAnimation;
import makeo.gadomancy.common.registration.*;
import makeo.gadomancy.common.utils.Injector;
import makeo.gadomancy.common.utils.world.WorldProviderTCEldrich;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.world.World;
import net.minecraftforge.common.DimensionManager;
import net.minecraftforge.common.MinecraftForge;
import thaumcraft.api.wands.WandTriggerRegistry;
import thaumcraft.common.entities.golems.ContainerGolem;
import thaumcraft.common.entities.golems.EntityGolemBase;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.network.IGuiHandler;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.relauncher.Side;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by makeo @ 29.11.2014 14:18
*/
@@ -113,7 +114,8 @@ public class CommonProxy implements IGuiHandler {
Float.floatToIntBits(posZ),
Float.floatToIntBits(rangeAroundItem));
PacketHandler.INSTANCE.sendToAllAround(
pkt, new NetworkRegistry.TargetPoint(world.provider.dimensionId, posX, posY, posZ, 32));
pkt,
new NetworkRegistry.TargetPoint(world.provider.dimensionId, posX, posY, posZ, 32));
}
@Override
@@ -1,21 +1,21 @@
package makeo.gadomancy.common;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.*;
import makeo.gadomancy.api.GadomancyApi;
import makeo.gadomancy.common.api.DefaultApiHandler;
import makeo.gadomancy.common.data.config.ModConfig;
import makeo.gadomancy.common.data.config.ModData;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import thaumcraft.common.Thaumcraft;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.*;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by makeo @ 29.11.2014 14:07
*/
@@ -25,6 +25,7 @@ import thaumcraft.common.Thaumcraft;
version = Gadomancy.VERSION,
dependencies = "required-after:Thaumcraft@[4.1.1.11,);after:Waila;after:Automagy")
public class Gadomancy {
public static final String MODID = "gadomancy";
public static final String NAME = "Gadomancy";
@@ -1,10 +1,10 @@
package makeo.gadomancy.common.api;
import cpw.mods.fml.common.registry.GameRegistry;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import makeo.gadomancy.api.AuraEffect;
import makeo.gadomancy.api.ClickBehavior;
import makeo.gadomancy.api.golems.AdditionalGolemType;
@@ -19,18 +19,20 @@ import makeo.gadomancy.common.registration.RegisteredBlocks;
import makeo.gadomancy.common.utils.GolemEnumHelper;
import makeo.gadomancy.common.utils.NBTHelper;
import makeo.gadomancy.common.utils.StringHelper;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.common.entities.golems.EntityGolemBase;
import cpw.mods.fml.common.registry.GameRegistry;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by makeo @ 14.10.2015 14:38
*/
@@ -47,8 +49,8 @@ public class DefaultApiHandler implements IApiHandler {
GolemEnumHelper.addGolemType(uniqueName, newType);
ItemAdditionalGolemPlacer placerItem = new ItemAdditionalGolemPlacer(newType);
GameRegistry.registerItem(
placerItem, "item" + StringHelper.firstToUpper(name.toLowerCase()) + "GolemPlacer");
GameRegistry
.registerItem(placerItem, "item" + StringHelper.firstToUpper(name.toLowerCase()) + "GolemPlacer");
newType.setModId(modId);
newType.setPlacerItem(placerItem);
@@ -1,19 +1,20 @@
package makeo.gadomancy.common.aura;
import java.util.*;
import makeo.gadomancy.api.AuraEffect;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.world.World;
import thaumcraft.api.aspects.Aspect;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by HellFirePvP @ 17.11.2015 14:06
*/
@@ -22,9 +23,9 @@ public class AuraEffectHandler {
public static Map<Aspect, AuraEffect> registeredEffects = new HashMap<Aspect, AuraEffect>();
public static void distributeEffects(Aspect aspect, World worldObj, double x, double y, double z, int tick) {
if (!AuraEffectHandler.registeredEffects.containsKey(aspect)
|| worldObj.isRemote
|| AuraResearchManager.isBlacklisted(aspect)) return;
if (!AuraEffectHandler.registeredEffects.containsKey(aspect) || worldObj.isRemote
|| AuraResearchManager.isBlacklisted(aspect))
return;
AuraEffect effect = AuraEffectHandler.registeredEffects.get(aspect);
if ((tick % effect.getTickInterval()) != 0) return;
@@ -4,12 +4,14 @@ import static makeo.gadomancy.common.utils.MiscUtils.ticksForMinutes;
import static makeo.gadomancy.common.utils.MiscUtils.ticksForSeconds;
import java.util.Random;
import makeo.gadomancy.api.AuraEffect;
import makeo.gadomancy.common.events.EventHandlerEntity;
import makeo.gadomancy.common.integration.IntegrationThaumicTinkerer;
import makeo.gadomancy.common.registration.RegisteredIntegrations;
import makeo.gadomancy.common.registration.RegisteredPotions;
import makeo.gadomancy.common.utils.MiscUtils;
import net.minecraft.block.Block;
import net.minecraft.entity.*;
import net.minecraft.entity.effect.EntityLightningBolt;
@@ -32,6 +34,7 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.world.EnumDifficulty;
import net.minecraft.world.World;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
import thaumcraft.common.Thaumcraft;
@@ -47,88 +50,115 @@ import thaumcraft.common.lib.utils.Utils;
import thaumcraft.common.lib.world.ThaumcraftWorldGenerator;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by HellFirePvP @ 29.11.2015 19:09
*/
public class AuraEffects {
private static final ItemStack[][] ITEMS_SOUL = {
{
new ItemStack(Items.bow),
new ItemStack(Items.wooden_sword),
new ItemStack(Items.stone_sword),
new ItemStack(Items.iron_sword),
new ItemStack(Items.stone_axe),
new ItemStack(Items.iron_axe)
},
{new ItemStack(Items.leather_boots), new ItemStack(Items.chainmail_boots), new ItemStack(Items.iron_boots)},
{
new ItemStack(Items.leather_leggings),
new ItemStack(Items.chainmail_leggings),
new ItemStack(Items.iron_leggings)
},
{
new ItemStack(Items.leather_chestplate),
new ItemStack(Items.chainmail_chestplate),
new ItemStack(Items.iron_chestplate)
},
{new ItemStack(Blocks.lit_pumpkin), new ItemStack(Blocks.pumpkin)}
};
{ new ItemStack(Items.bow), new ItemStack(Items.wooden_sword), new ItemStack(Items.stone_sword),
new ItemStack(Items.iron_sword), new ItemStack(Items.stone_axe), new ItemStack(Items.iron_axe) },
{ new ItemStack(Items.leather_boots), new ItemStack(Items.chainmail_boots),
new ItemStack(Items.iron_boots) },
{ new ItemStack(Items.leather_leggings), new ItemStack(Items.chainmail_leggings),
new ItemStack(Items.iron_leggings) },
{ new ItemStack(Items.leather_chestplate), new ItemStack(Items.chainmail_chestplate),
new ItemStack(Items.iron_chestplate) },
{ new ItemStack(Blocks.lit_pumpkin), new ItemStack(Blocks.pumpkin) } };
// Potion amplifiers start with 0 == lvl 1!
// Std. potion effects
public static final AuraEffect AER =
new PotionDistributionEffect(Potion.moveSpeed, 4, 6, ticksForMinutes(6), 1).register(Aspect.AIR);
public static final AuraEffect AQUA =
new PotionDistributionEffect(Potion.waterBreathing, 4, 10, ticksForMinutes(10), 0).register(Aspect.WATER);
public static final AuraEffect TERRA =
new PotionDistributionEffect(Potion.resistance, 4, 8, ticksForMinutes(5), 0).register(Aspect.EARTH);
public static final AuraEffect ORDO =
new PotionDistributionEffect(Potion.regeneration, 4, 6, ticksForMinutes(3), 0).register(Aspect.ORDER);
public static final AuraEffect PERDITIO =
new PotionDistributionEffect(Potion.weakness, 4, 8, ticksForMinutes(3), 0).register(Aspect.ENTROPY);
public static final AuraEffect TELUM =
new PotionDistributionEffect(Potion.damageBoost, 4, 6, ticksForMinutes(6), 2).register(Aspect.WEAPON);
public static final AuraEffect TUTAMEN =
new PotionDistributionEffect(Potion.resistance, 4, 6, ticksForMinutes(6), 1).register(Aspect.ARMOR);
public static final AuraEffect AER = new PotionDistributionEffect(Potion.moveSpeed, 4, 6, ticksForMinutes(6), 1)
.register(Aspect.AIR);
public static final AuraEffect AQUA = new PotionDistributionEffect(
Potion.waterBreathing,
4,
10,
ticksForMinutes(10),
0).register(Aspect.WATER);
public static final AuraEffect TERRA = new PotionDistributionEffect(Potion.resistance, 4, 8, ticksForMinutes(5), 0)
.register(Aspect.EARTH);
public static final AuraEffect ORDO = new PotionDistributionEffect(Potion.regeneration, 4, 6, ticksForMinutes(3), 0)
.register(Aspect.ORDER);
public static final AuraEffect PERDITIO = new PotionDistributionEffect(Potion.weakness, 4, 8, ticksForMinutes(3), 0)
.register(Aspect.ENTROPY);
public static final AuraEffect TELUM = new PotionDistributionEffect(Potion.damageBoost, 4, 6, ticksForMinutes(6), 2)
.register(Aspect.WEAPON);
public static final AuraEffect TUTAMEN = new PotionDistributionEffect(
Potion.resistance,
4,
6,
ticksForMinutes(6),
1).register(Aspect.ARMOR);
public static final AuraEffect MOTUS = new PotionDistributionEffect(Potion.moveSpeed, 4, 6, ticksForMinutes(2), 2)
.register(Aspect.MOTION); // Fast speed for short duration, long charge time
public static final AuraEffect ITER = new PotionDistributionEffect(Potion.moveSpeed, 2, 10, ticksForMinutes(15), 0)
.register(Aspect.TRAVEL); // Slower speed for long duration, fast charge time
public static final AuraEffect FAMES =
new PotionDistributionEffect(Potion.hunger, 4, 6, ticksForMinutes(2), 0).register(Aspect.HUNGER);
public static final AuraEffect SENSUS =
new PotionDistributionEffect(Potion.nightVision, 2, 8, ticksForMinutes(8), 0).register(Aspect.SENSES);
public static final AuraEffect VOLATUS =
new PotionDistributionEffect(Potion.jump, 2, 5, ticksForMinutes(4), 0).register(Aspect.FLIGHT);
public static final AuraEffect POTENTIA =
new PotionDistributionEffect(Potion.damageBoost, 4, 6, ticksForMinutes(4), 0).register(Aspect.ENERGY);
public static final AuraEffect TENEBRAE =
new PotionDistributionEffect(Potion.blindness, 4, 6, ticksForMinutes(1), 0).register(Aspect.DARKNESS);
public static final AuraEffect SANO =
new PotionDistributionEffect(Potion.regeneration, 8, 10, ticksForMinutes(5), 1).register(Aspect.HEAL);
public static final AuraEffect MORTUUS =
new PotionDistributionEffect(Potion.wither, 4, 6, ticksForMinutes(3), 1).register(Aspect.DEATH);
public static final AuraEffect HUMANUS =
new PotionDistributionEffect(Potion.field_76434_w, 2, 5, ticksForMinutes(4), 1).register(Aspect.MAN);
public static final AuraEffect INSTRUMENTUM =
new PotionDistributionEffect(Potion.digSpeed, 2, 7, ticksForMinutes(6), 0).register(Aspect.TOOL);
public static final AuraEffect PERFODIO =
new PotionDistributionEffect(Potion.digSpeed, 2, 7, ticksForMinutes(5), 2).register(Aspect.MINE);
public static final AuraEffect VENENUM =
new PotionDistributionEffect(Potion.poison, 2, 6, ticksForMinutes(1), 0).register(Aspect.POISON);
public static final AuraEffect VINCULUM =
new PotionDistributionEffect(Potion.moveSlowdown, 4, 6, ticksForMinutes(3), 0).register(Aspect.TRAP);
public static final AuraEffect FAMES = new PotionDistributionEffect(Potion.hunger, 4, 6, ticksForMinutes(2), 0)
.register(Aspect.HUNGER);
public static final AuraEffect SENSUS = new PotionDistributionEffect(
Potion.nightVision,
2,
8,
ticksForMinutes(8),
0).register(Aspect.SENSES);
public static final AuraEffect VOLATUS = new PotionDistributionEffect(Potion.jump, 2, 5, ticksForMinutes(4), 0)
.register(Aspect.FLIGHT);
public static final AuraEffect POTENTIA = new PotionDistributionEffect(
Potion.damageBoost,
4,
6,
ticksForMinutes(4),
0).register(Aspect.ENERGY);
public static final AuraEffect TENEBRAE = new PotionDistributionEffect(
Potion.blindness,
4,
6,
ticksForMinutes(1),
0).register(Aspect.DARKNESS);
public static final AuraEffect SANO = new PotionDistributionEffect(
Potion.regeneration,
8,
10,
ticksForMinutes(5),
1).register(Aspect.HEAL);
public static final AuraEffect MORTUUS = new PotionDistributionEffect(Potion.wither, 4, 6, ticksForMinutes(3), 1)
.register(Aspect.DEATH);
public static final AuraEffect HUMANUS = new PotionDistributionEffect(
Potion.field_76434_w,
2,
5,
ticksForMinutes(4),
1).register(Aspect.MAN);
public static final AuraEffect INSTRUMENTUM = new PotionDistributionEffect(
Potion.digSpeed,
2,
7,
ticksForMinutes(6),
0).register(Aspect.TOOL);
public static final AuraEffect PERFODIO = new PotionDistributionEffect(Potion.digSpeed, 2, 7, ticksForMinutes(5), 2)
.register(Aspect.MINE);
public static final AuraEffect VENENUM = new PotionDistributionEffect(Potion.poison, 2, 6, ticksForMinutes(1), 0)
.register(Aspect.POISON);
public static final AuraEffect VINCULUM = new PotionDistributionEffect(
Potion.moveSlowdown,
4,
6,
ticksForMinutes(3),
0).register(Aspect.TRAP);
// Special effects..
public static final AuraEffect LUCRUM = new PotionDistributionEffect(
RegisteredPotions.POTION_LUCK, 4, 6, ticksForMinutes(5), 1)
.register(Aspect.GREED); // Mining luck (Adding fortune)
RegisteredPotions.POTION_LUCK,
4,
6,
ticksForMinutes(5),
1).register(Aspect.GREED); // Mining luck (Adding fortune)
public static final AuraEffect VICTUS = new AuraEffect.EntityAuraEffect() {
@Override
public boolean isEntityApplicable(Entity e) {
return e instanceof EntityAgeable && ((EntityAgeable) e).getGrowingAge() < 0;
@@ -142,6 +172,7 @@ public class AuraEffects {
}
}.register(Aspect.LIFE);
public static final AuraEffect PANNUS = new AuraEffect.EntityAuraEffect() {
@Override
public boolean isEntityApplicable(Entity e) {
return e instanceof EntitySheep && ((EntitySheep) e).getSheared();
@@ -159,6 +190,7 @@ public class AuraEffects {
}
}.register(Aspect.CLOTH);
public static final AuraEffect LUX = new AuraEffect.EntityAuraEffect() {
@Override
public boolean isEntityApplicable(Entity e) {
return true;
@@ -181,6 +213,7 @@ public class AuraEffects {
}
}.register(Aspect.LIGHT);
public static final AuraEffect TEMPESTAS = new AuraEffect.BlockAuraEffect() {
@Override
public int getBlockCount(Random random) {
return random.nextInt(10) == 0 ? 1 : 0;
@@ -189,12 +222,16 @@ public class AuraEffects {
@Override
public void doBlockEffect(ChunkCoordinates originTile, ChunkCoordinates selectedBlock, World world) {
int highestY = world.getTopSolidOrLiquidBlock(selectedBlock.posX, selectedBlock.posZ);
EntityLightningBolt entityLightning =
new EntityLightningBolt(world, selectedBlock.posX + 0.5, highestY, selectedBlock.posZ + 0.5);
EntityLightningBolt entityLightning = new EntityLightningBolt(
world,
selectedBlock.posX + 0.5,
highestY,
selectedBlock.posZ + 0.5);
world.addWeatherEffect(entityLightning);
}
}.register(Aspect.WEATHER);
public static final AuraEffect VITIUM = new AuraEffect() {
@Override
public EffectType getEffectType() {
return null;
@@ -238,6 +275,7 @@ public class AuraEffects {
}
}.register(Aspect.TAINT);
public static final AuraEffect GELUM = new AuraEffect() {
@Override
public EffectType getEffectType() {
return null;
@@ -283,6 +321,7 @@ public class AuraEffects {
}
}.register(Aspect.COLD);
public static final AuraEffect EXAMINIS = new AuraEffect() {
@Override
public EffectType getEffectType() {
return null;
@@ -296,11 +335,21 @@ public class AuraEffects {
@Override
public void doEntityEffect(ChunkCoordinates originTile, Entity e) {
AuraEffects.addOrExtendPotionEffect(
Potion.damageBoost, (EntityLivingBase) e, ticksForMinutes(3), 30, 1, false);
Potion.damageBoost,
(EntityLivingBase) e,
ticksForMinutes(3),
30,
1,
false);
AuraEffects
.addOrExtendPotionEffect(Potion.moveSpeed, (EntityLivingBase) e, ticksForMinutes(3), 30, 0, false);
AuraEffects.addOrExtendPotionEffect(
Potion.moveSpeed, (EntityLivingBase) e, ticksForMinutes(3), 30, 0, false);
AuraEffects.addOrExtendPotionEffect(
Potion.regeneration, (EntityLivingBase) e, ticksForMinutes(3), 30, 0, false);
Potion.regeneration,
(EntityLivingBase) e,
ticksForMinutes(3),
30,
0,
false);
}
@Override
@@ -332,6 +381,7 @@ public class AuraEffects {
}
}.register(Aspect.UNDEAD);
public static final AuraEffect AURAM = new AuraEffect.EntityAuraEffect() {
@Override
public boolean isEntityApplicable(Entity e) {
return e instanceof EntityPlayer;
@@ -341,8 +391,7 @@ public class AuraEffects {
public void doEntityEffect(ChunkCoordinates originTile, Entity e) {
EntityPlayer player = (EntityPlayer) e;
if (player.getHeldItem() != null
&& player.getHeldItem().getItem() != null
if (player.getHeldItem() != null && player.getHeldItem().getItem() != null
&& player.getHeldItem().getItem() instanceof ItemWandCasting) {
ItemStack wand = player.getHeldItem();
ItemWandCasting wandCasting = (ItemWandCasting) wand.getItem();
@@ -359,6 +408,7 @@ public class AuraEffects {
}
}.register(Aspect.AURA);
public static final AuraEffect COGNITIO = new AuraEffect.EntityAuraEffect() {
@Override
public boolean isEntityApplicable(Entity e) {
return e instanceof EntityPlayer;
@@ -385,6 +435,7 @@ public class AuraEffects {
}
}.register(Aspect.MIND);
public static final AuraEffect FABRICO = new AuraEffect() {
@Override
public EffectType getEffectType() {
return null;
@@ -413,6 +464,7 @@ public class AuraEffects {
}
}.register(Aspect.CRAFT);
public static final AuraEffect HERBA = new AuraEffect.BlockAuraEffect() {
@Override
public int getBlockCount(Random random) {
return 180;
@@ -429,6 +481,7 @@ public class AuraEffects {
}
}.register(Aspect.PLANT);
public static final AuraEffect ARBOR = new AuraEffect.BlockAuraEffect() {
@Override
public int getBlockCount(Random random) {
return 120;
@@ -445,6 +498,7 @@ public class AuraEffects {
}
}.register(Aspect.TREE);
public static final AuraEffect IGNIS = new AuraEffect.EntityAuraEffect() {
@Override
public boolean isEntityApplicable(Entity e) {
return e instanceof EntityLivingBase;
@@ -458,14 +512,13 @@ public class AuraEffects {
}
}.register(Aspect.FIRE);
public static final AuraEffect ELDRITCH = new AuraEffect.EntityAuraEffect() {
@Override
public boolean isEntityApplicable(Entity e) {
if (e instanceof EntityMob) {
EntityMob mob = (EntityMob) e;
if (mob.getEntityAttribute(EntityUtils.CHAMPION_MOD).getAttributeValue() < 0
&& mob.getEntityAttribute(SharedMonsterAttributes.maxHealth)
.getBaseValue()
>= 10.0D) {
&& mob.getEntityAttribute(SharedMonsterAttributes.maxHealth).getBaseValue() >= 10.0D) {
boolean whitelisted = false;
for (Class clazz : ConfigEntities.championModWhitelist.keySet()) {
if (clazz.isAssignableFrom(e.getClass())) {
@@ -493,15 +546,17 @@ public class AuraEffects {
EntityUtils.makeChampion(mob, false);
mob.removePotionEffect(RegisteredPotions.ELDRITCH.getId());
} else {
mob.addPotionEffect(new PotionEffect(
RegisteredPotions.ELDRITCH.getId(),
MiscUtils.ticksForMinutes(1),
effect == null ? 1 : effect.getAmplifier() + 1));
mob.addPotionEffect(
new PotionEffect(
RegisteredPotions.ELDRITCH.getId(),
MiscUtils.ticksForMinutes(1),
effect == null ? 1 : effect.getAmplifier() + 1));
}
}
}
}.register(Aspect.ELDRITCH);
public static final AuraEffect SOUL = new AuraEffect.BlockAuraEffect() {
@Override
public int getBlockCount(Random random) {
return random.nextInt(60) == 0 ? 1 : 0;
@@ -524,8 +579,7 @@ public class AuraEffects {
int timeout = 40;
int totalCount = (world.rand.nextInt(3) == 0 ? 1 : 0) + 2;
do {
int slot = mob.getEquipmentInSlot(0) == null
? 0
int slot = mob.getEquipmentInSlot(0) == null ? 0
: (mob.getEquipmentInSlot(4) == null ? 4 : (world.rand.nextInt(3) + 1));
if (mob.getEquipmentInSlot(slot) == null) {
ItemStack[] items = AuraEffects.ITEMS_SOUL[slot];
@@ -540,8 +594,12 @@ public class AuraEffects {
} while (totalCount > 0 && timeout > 0);
if (timeout > 0) {
mob.addPotionEffect(new PotionEffect(
Potion.invisibility.getId(), MiscUtils.ticksForMinutes(60 * 24 * 365), 1, true));
mob.addPotionEffect(
new PotionEffect(
Potion.invisibility.getId(),
MiscUtils.ticksForMinutes(60 * 24 * 365),
1,
true));
ChunkCoordinates pos = new ChunkCoordinates((int) mob.posX, (int) mob.posY, (int) mob.posZ);
pos = AuraEffects.iterateDown(pos, world);
@@ -552,9 +610,13 @@ public class AuraEffects {
}
}.register(Aspect.SOUL);
public static final AuraEffect PRAECANTATIO = new PotionDistributionEffect(
RegisteredPotions.VIS_DISCOUNT, 4, 6, ticksForMinutes(5), 1)
.register(Aspect.MAGIC);
RegisteredPotions.VIS_DISCOUNT,
4,
6,
ticksForMinutes(5),
1).register(Aspect.MAGIC);
public static final AuraEffect LIMUS = new AuraEffect.BlockAuraEffect() {
@Override
public int getBlockCount(Random random) {
return random.nextInt(40) == 0 ? 1 : 0;
@@ -584,8 +646,8 @@ public class AuraEffects {
}.register(Aspect.SLIME);
public static final AuraEffect BESTIA = new AuraEffect.BlockAuraEffect() {
private final Class[] animalClasses = {EntitySheep.class, EntityCow.class, EntityChicken.class, EntityPig.class
};
private final Class[] animalClasses = { EntitySheep.class, EntityCow.class, EntityChicken.class,
EntityPig.class };
@Override
public int getBlockCount(Random random) {
@@ -597,8 +659,7 @@ public class AuraEffects {
Class animalClass = this.animalClasses[world.rand.nextInt(this.animalClasses.length)];
EntityLivingBase animal;
try {
animal = (EntityLivingBase)
animalClass.getConstructor(World.class).newInstance(world);
animal = (EntityLivingBase) animalClass.getConstructor(World.class).newInstance(world);
} catch (Exception e) {
return;
}
@@ -617,21 +678,26 @@ public class AuraEffects {
}
}.register(Aspect.BEAST);
public static final AuraEffect VITREUS =
new PotionDistributionEffect(RegisteredPotions.ACHROMATIC, 4, 6, ticksForMinutes(5), 0) {
@Override
public boolean isEntityApplicable(Entity e) {
return e instanceof EntityPlayer;
}
}.register(Aspect.CRYSTAL);
public static final AuraEffect VITREUS = new PotionDistributionEffect(
RegisteredPotions.ACHROMATIC,
4,
6,
ticksForMinutes(5),
0) {
@Override
public boolean isEntityApplicable(Entity e) {
return e instanceof EntityPlayer;
}
}.register(Aspect.CRYSTAL);
public static class PotionDistributionEffect extends AuraEffect.EntityAuraEffect {
private Potion potion;
private int tickInterval, addedDuration, durationCap, amplifier;
public PotionDistributionEffect(
Potion potion, int tickInterval, int addedDuration, int durationCap, int amplifier) {
public PotionDistributionEffect(Potion potion, int tickInterval, int addedDuration, int durationCap,
int amplifier) {
this.potion = potion;
this.tickInterval = tickInterval;
this.addedDuration = addedDuration;
@@ -649,8 +715,8 @@ public class AuraEffects {
if (e == null || !(e instanceof EntityLivingBase)) return;
EntityLivingBase living = (EntityLivingBase) e;
AuraEffects.addOrExtendPotionEffect(
this.potion, living, this.durationCap, this.addedDuration, this.amplifier);
AuraEffects
.addOrExtendPotionEffect(this.potion, living, this.durationCap, this.addedDuration, this.amplifier);
}
@Override
@@ -663,7 +729,11 @@ public class AuraEffects {
Block block = world.getBlock(coordinates.posX, coordinates.posY, coordinates.posZ);
if (block.getTickRandomly()) {
world.scheduleBlockUpdate(
coordinates.posX, coordinates.posY, coordinates.posZ, block, world.rand.nextInt(8) + 2);
coordinates.posX,
coordinates.posY,
coordinates.posZ,
block,
world.rand.nextInt(8) + 2);
}
if (IntegrationThaumicTinkerer.isCropBlock(block)) {
TileEntity te = world.getTileEntity(coordinates.posX, coordinates.posY, coordinates.posZ);
@@ -675,8 +745,8 @@ public class AuraEffects {
}
}
private static void addOrExtendPotionEffect(
Potion potion, EntityLivingBase entityLiving, int cap, int durToAdd, int amplifier, boolean ambient) {
private static void addOrExtendPotionEffect(Potion potion, EntityLivingBase entityLiving, int cap, int durToAdd,
int amplifier, boolean ambient) {
int activeDuration = 0;
if (entityLiving.isPotionActive(potion)) {
PotionEffect effect = entityLiving.getActivePotionEffect(potion);
@@ -685,13 +755,13 @@ public class AuraEffects {
boolean canAdd = (cap - activeDuration) >= durToAdd;
if (canAdd) {
entityLiving.addPotionEffect(
new PotionEffect(potion.getId(), activeDuration + durToAdd, amplifier, ambient));
entityLiving
.addPotionEffect(new PotionEffect(potion.getId(), activeDuration + durToAdd, amplifier, ambient));
}
}
private static void addOrExtendPotionEffect(
Potion potion, EntityLivingBase entityLiving, int cap, int durToAdd, int amplifier) {
private static void addOrExtendPotionEffect(Potion potion, EntityLivingBase entityLiving, int cap, int durToAdd,
int amplifier) {
AuraEffects.addOrExtendPotionEffect(potion, entityLiving, cap, durToAdd, amplifier, true);
}
@@ -707,8 +777,8 @@ public class AuraEffects {
// the entity there.
// Call with mayVary == true to search in 1 block radius, call with mayVary == false for only checking the current
// block.
private static boolean setAndCheckPosition(
EntityLivingBase entity, ChunkCoordinates cc, World world, boolean mayVary) {
private static boolean setAndCheckPosition(EntityLivingBase entity, ChunkCoordinates cc, World world,
boolean mayVary) {
if (!world.isAirBlock(cc.posX, cc.posY, cc.posZ)) {
if (!mayVary) return false;
ChunkCoordinates up = new ChunkCoordinates(cc.posX, cc.posY + 1, cc.posZ);
@@ -2,23 +2,24 @@ package makeo.gadomancy.common.aura;
import java.util.ArrayList;
import java.util.List;
import makeo.gadomancy.common.Gadomancy;
import makeo.gadomancy.common.data.config.ModConfig;
import makeo.gadomancy.common.network.PacketHandler;
import makeo.gadomancy.common.network.packets.PacketTCNotificationText;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.util.StatCollector;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.research.ResearchItem;
import thaumcraft.common.Thaumcraft;
import thaumcraft.common.lib.research.ResearchManager;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by HellFirePvP @ 29.11.2015 18:14
*/
@@ -30,8 +31,9 @@ public class AuraResearchManager {
if (!AuraEffectHandler.registeredEffects.containsKey(aspect)) return;
if (AuraResearchManager.isBlacklisted(aspect)) return;
if (!ResearchManager.isResearchComplete(
player.getCommandSenderName(), Gadomancy.MODID.toUpperCase() + ".AURA_EFFECTS")) return;
if (!ResearchManager
.isResearchComplete(player.getCommandSenderName(), Gadomancy.MODID.toUpperCase() + ".AURA_EFFECTS"))
return;
if (!Thaumcraft.proxy.getPlayerKnowledge().hasDiscoveredAspect(player.getCommandSenderName(), aspect)) return;
String res = String.format(AuraResearchManager.TC_AURA_RESEARCH_STR, aspect.getTag());
@@ -3,19 +3,20 @@ package makeo.gadomancy.common.aura;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import makeo.gadomancy.common.utils.SimpleResourceLocation;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StatCollector;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
import thaumcraft.api.research.ResearchPage;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by HellFirePvP @ 29.11.2015 23:57
*/
@@ -50,9 +51,9 @@ public class ResearchPageAuraAspects extends ResearchPage {
if (knowledge.size() <= 0) return new ArrayList<String>();
Collections.sort(knowledge);
int startIndex = pageIndex << 2;
if (knowledge.size() <= startIndex)
return new ArrayList<
String>(); // Should not happen, because getAdditionalPages should only return indexes within range
if (knowledge.size() <= startIndex) return new ArrayList<String>(); // Should not happen, because
// getAdditionalPages should only return
// indexes within range
return knowledge.subList(startIndex, (startIndex + 4 > knowledge.size()) ? knowledge.size() : startIndex + 4);
}
@@ -70,8 +71,13 @@ public class ResearchPageAuraAspects extends ResearchPage {
if (original == null) return null;
String fakeTemp = "GADOMANCY_TEMP_" + tag;
Aspect fake =
new FakeAspect(fakeTemp, original.getColor(), null, original.getImage(), original.getBlend(), true);
Aspect fake = new FakeAspect(
fakeTemp,
original.getColor(),
null,
original.getImage(),
original.getBlend(),
true);
fake.setTag(original.getTag());
return fake;
}
@@ -80,8 +86,8 @@ public class ResearchPageAuraAspects extends ResearchPage {
private boolean headAspect;
public FakeAspect(
String tag, int color, Aspect[] components, ResourceLocation image, int blend, boolean isHead) {
public FakeAspect(String tag, int color, Aspect[] components, ResourceLocation image, int blend,
boolean isHead) {
super(tag, color, components, image, blend);
Aspect.aspects.remove(tag);
this.headAspect = isHead;
@@ -2,17 +2,17 @@ package makeo.gadomancy.common.blocks;
import makeo.gadomancy.common.blocks.tiles.TileAdditionalEldritchPortal;
import makeo.gadomancy.common.registration.RegisteredItems;
import net.minecraft.block.Block;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import thaumcraft.common.blocks.BlockEldritchPortal;
import thaumcraft.common.config.ConfigBlocks;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
* <p/>
* Created by makeo @ 06.11.2015 23:23
*/
@@ -1,8 +1,10 @@
package makeo.gadomancy.common.blocks;
import java.util.List;
import makeo.gadomancy.common.blocks.tiles.TileArcaneDropper;
import makeo.gadomancy.common.registration.RegisteredItems;
import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
@@ -16,14 +18,13 @@ import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by makeo @ 28.09.2015 20:15
*/
public class BlockArcaneDropper extends BlockTransparent {
public BlockArcaneDropper() {
super(Material.rock);
this.setHardness(3.5f);
@@ -63,16 +64,15 @@ public class BlockArcaneDropper extends BlockTransparent {
}
ForgeDirection rotated = direction.getRotation(
flipped
? ForgeDirection.getOrientation((direction.ordinal() + 4) % 6)
flipped ? ForgeDirection.getOrientation((direction.ordinal() + 4) % 6)
: ForgeDirection.getOrientation((direction.ordinal() + 2) % 6));
return direction != side && rotated != side && rotated.getOpposite() != side;
}
@Override
public int onBlockPlaced(
World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int metadata) {
public int onBlockPlaced(World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ,
int metadata) {
return side;
}
@@ -85,17 +85,16 @@ public class BlockArcaneDropper extends BlockTransparent {
super.maxZ = box.maxZ;
}
private static final AxisAlignedBB[] COLLISION_BOXES = {
AxisAlignedBB.getBoundingBox(0, 0, 0, 1, 0.3125f, 1), // down
AxisAlignedBB.getBoundingBox(0, 0.6875f, 0, 1, 1, 1), // up
AxisAlignedBB.getBoundingBox(0, 0, 0, 1, 1, 0.3125f), // north
AxisAlignedBB.getBoundingBox(0, 0, 0.6875f, 1, 1, 1), // south
AxisAlignedBB.getBoundingBox(0, 0, 0, 0.3125f, 1, 1), // west
AxisAlignedBB.getBoundingBox(0.6875f, 0, 0, 1, 1, 1), // east
private static final AxisAlignedBB[] COLLISION_BOXES = { AxisAlignedBB.getBoundingBox(0, 0, 0, 1, 0.3125f, 1), // down
AxisAlignedBB.getBoundingBox(0, 0.6875f, 0, 1, 1, 1), // up
AxisAlignedBB.getBoundingBox(0, 0, 0, 1, 1, 0.3125f), // north
AxisAlignedBB.getBoundingBox(0, 0, 0.6875f, 1, 1, 1), // south
AxisAlignedBB.getBoundingBox(0, 0, 0, 0.3125f, 1, 1), // west
AxisAlignedBB.getBoundingBox(0.6875f, 0, 0, 1, 1, 1), // east
};
public void addCollisionBoxesToList(
World world, int x, int y, int z, AxisAlignedBB boundingBox, List list, Entity entity) {
public void addCollisionBoxesToList(World world, int x, int y, int z, AxisAlignedBB boundingBox, List list,
Entity entity) {
ForgeDirection side = ForgeDirection.getOrientation(world.getBlockMetadata(x, y, z) & 7);
for (int i = 0; i < BlockArcaneDropper.COLLISION_BOXES.length; i++) {
@@ -109,7 +108,12 @@ public class BlockArcaneDropper extends BlockTransparent {
this.setBlockBounds(side.offsetX * -0.125f, side.offsetY * -0.125f, side.offsetZ * -0.125f, 1f, 1f, 1f);
} else {
this.setBlockBounds(
0f, 0f, 0f, 1 - side.offsetX * 0.125f, 1 - side.offsetY * 0.125f, 1 - side.offsetZ * 0.125f);
0f,
0f,
0f,
1 - side.offsetX * 0.125f,
1 - side.offsetY * 0.125f,
1 - side.offsetZ * 0.125f);
}
super.addCollisionBoxesToList(world, x, y, z, boundingBox, list, entity);
@@ -1,7 +1,7 @@
package makeo.gadomancy.common.blocks;
import cpw.mods.fml.common.network.NetworkRegistry;
import java.util.List;
import makeo.gadomancy.common.Gadomancy;
import makeo.gadomancy.common.blocks.tiles.TileAuraPylon;
import makeo.gadomancy.common.blocks.tiles.TileAuraPylonTop;
@@ -12,6 +12,7 @@ import makeo.gadomancy.common.registration.RegisteredItems;
import makeo.gadomancy.common.registration.RegisteredMultiblocks;
import makeo.gadomancy.common.registration.RegisteredRecipes;
import makeo.gadomancy.common.utils.MultiblockHelper;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
@@ -24,15 +25,15 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import thaumcraft.api.ThaumcraftApiHelper;
import thaumcraft.common.items.wands.ItemWandCasting;
import thaumcraft.common.lib.research.ResearchManager;
import cpw.mods.fml.common.network.NetworkRegistry;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by HellFirePvP @ 12.11.2015 22:26
*/
@@ -83,10 +84,8 @@ public class BlockAuraPylon extends BlockContainer implements IBlockTransparent
@Override
public boolean canReplace(World world, int x, int y, int z, int side, ItemStack stack) {
int damage = stack.getItemDamage();
if (damage == 1
&& (y < 1
|| world.getBlock(x, y - 1, z) != RegisteredBlocks.blockAuraPylon
|| world.getBlockMetadata(x, y - 1, z) != 0)) {
if (damage == 1 && (y < 1 || world.getBlock(x, y - 1, z) != RegisteredBlocks.blockAuraPylon
|| world.getBlockMetadata(x, y - 1, z) != 0)) {
return false;
}
return super.canReplace(world, x, y, z, side, stack);
@@ -102,19 +101,19 @@ public class BlockAuraPylon extends BlockContainer implements IBlockTransparent
}
@Override
public boolean onBlockActivated(
World world, int x, int y, int z, EntityPlayer player, int side, float par7, float par8, float par9) {
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float par7,
float par8, float par9) {
if (world.getBlockMetadata(x, y, z) != 1) {
Block up = world.getBlock(x, y + 1, z);
return up instanceof BlockAuraPylon
&& up.onBlockActivated(world, x, y + 1, z, player, side, par7, par8, par9);
}
ItemStack heldItem = player.getHeldItem();
if (!world.isRemote
&& heldItem != null
if (!world.isRemote && heldItem != null
&& heldItem.getItem() instanceof ItemWandCasting
&& ResearchManager.isResearchComplete(
player.getCommandSenderName(), Gadomancy.MODID.toUpperCase() + ".AURA_PYLON")) {
player.getCommandSenderName(),
Gadomancy.MODID.toUpperCase() + ".AURA_PYLON")) {
TileAuraPylon tileAuraPylon = (TileAuraPylon) world.getTileEntity(x, y - 1, z);
if (MultiblockHelper.isMultiblockPresent(world, x, y, z, RegisteredMultiblocks.auraPylonPattern)
&& !tileAuraPylon.isPartOfMultiblock()
@@ -124,8 +123,12 @@ public class BlockAuraPylon extends BlockContainer implements IBlockTransparent
RegisteredRecipes.costsAuraPylonMultiblock,
true)) {
PacketStartAnimation pkt = new PacketStartAnimation(PacketStartAnimation.ID_SPARKLE_SPREAD, x, y, z);
NetworkRegistry.TargetPoint point =
new NetworkRegistry.TargetPoint(world.provider.dimensionId, x, y, z, 32);
NetworkRegistry.TargetPoint point = new NetworkRegistry.TargetPoint(
world.provider.dimensionId,
x,
y,
z,
32);
PacketHandler.INSTANCE.sendToAllAround(pkt, point);
TileAuraPylon ta = (TileAuraPylon) world.getTileEntity(x, y - 1, z);
ta.setTileInformation(true, false);
@@ -1,6 +1,5 @@
package makeo.gadomancy.common.blocks;
import cpw.mods.fml.common.network.NetworkRegistry;
import makeo.gadomancy.common.Gadomancy;
import makeo.gadomancy.common.blocks.tiles.TileEssentiaCompressor;
import makeo.gadomancy.common.network.PacketHandler;
@@ -10,6 +9,7 @@ import makeo.gadomancy.common.registration.RegisteredItems;
import makeo.gadomancy.common.registration.RegisteredRecipes;
import makeo.gadomancy.common.research.SimpleResearchItem;
import makeo.gadomancy.common.utils.ExplosionHelper;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
@@ -21,16 +21,15 @@ import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import thaumcraft.api.ThaumcraftApiHelper;
import thaumcraft.api.aspects.AspectList;
import thaumcraft.common.items.wands.ItemWandCasting;
import thaumcraft.common.lib.research.ResearchManager;
import cpw.mods.fml.common.network.NetworkRegistry;
/**
* HellFirePvP@Admin
* Date: 22.04.2016 / 21:42
* on Gadomancy
* BlockEssentiaCompressor
* HellFirePvP@Admin Date: 22.04.2016 / 21:42 on Gadomancy BlockEssentiaCompressor
*/
public class BlockEssentiaCompressor extends BlockContainer implements IBlockTransparent {
@@ -118,63 +117,75 @@ public class BlockEssentiaCompressor extends BlockContainer implements IBlockTra
}
@Override
public boolean onBlockActivated(
World world,
int x,
int y,
int z,
EntityPlayer player,
int these,
float are,
float some,
float variables) { // LUL side, hitx, hity, hitz
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int these, float are,
float some, float variables) { // LUL side, hitx, hity, hitz
if (world.isRemote) return false;
TileEntity te = world.getTileEntity(x, y, z);
if (te == null || !(te instanceof TileEssentiaCompressor)) return false;
if (((TileEssentiaCompressor) te).isMultiblockFormed()) {
if (!((TileEssentiaCompressor) te).isMasterTile()) {
int yOffset = ((TileEssentiaCompressor) te).getMultiblockYIndex();
return RegisteredBlocks.blockEssentiaCompressor.onBlockActivated(
world, x, y - yOffset, z, player, these, are, some, variables);
return RegisteredBlocks.blockEssentiaCompressor
.onBlockActivated(world, x, y - yOffset, z, player, these, are, some, variables);
}
} else {
ItemStack heldItem = player.getHeldItem();
if (heldItem != null
&& heldItem.getItem() instanceof ItemWandCasting
if (heldItem != null && heldItem.getItem() instanceof ItemWandCasting
&& ResearchManager.isResearchComplete(
player.getCommandSenderName(), SimpleResearchItem.getFullName("ESSENTIA_COMPRESSOR"))) {
player.getCommandSenderName(),
SimpleResearchItem.getFullName("ESSENTIA_COMPRESSOR"))) {
ChunkCoordinates lowest = this.findLowestCompressorBlock(world, x, y, z);
boolean canForm = lowest != null && this.isMuliblockPossible(world, lowest);
if (canForm
&& ThaumcraftApiHelper.consumeVisFromWandCrafting(
player.getCurrentEquippedItem(),
player,
RegisteredRecipes.costsCompressorMultiblock,
true)) {
if (canForm && ThaumcraftApiHelper.consumeVisFromWandCrafting(
player.getCurrentEquippedItem(),
player,
RegisteredRecipes.costsCompressorMultiblock,
true)) {
int multiblockID = TileEssentiaCompressor.getAndIncrementNewMultiblockId();
TileEssentiaCompressor compressor =
(TileEssentiaCompressor) world.getTileEntity(lowest.posX, lowest.posY, lowest.posZ);
TileEssentiaCompressor compressor = (TileEssentiaCompressor) world
.getTileEntity(lowest.posX, lowest.posY, lowest.posZ);
compressor.setInMultiblock(true, 0, multiblockID);
PacketStartAnimation pkt = new PacketStartAnimation(
PacketStartAnimation.ID_SPARKLE_SPREAD, lowest.posX, lowest.posY, lowest.posZ);
PacketStartAnimation.ID_SPARKLE_SPREAD,
lowest.posX,
lowest.posY,
lowest.posZ);
NetworkRegistry.TargetPoint point = new NetworkRegistry.TargetPoint(
world.provider.dimensionId, lowest.posX, lowest.posY, lowest.posZ, 32);
world.provider.dimensionId,
lowest.posX,
lowest.posY,
lowest.posZ,
32);
PacketHandler.INSTANCE.sendToAllAround(pkt, point);
compressor =
(TileEssentiaCompressor) world.getTileEntity(lowest.posX, lowest.posY + 1, lowest.posZ);
compressor = (TileEssentiaCompressor) world
.getTileEntity(lowest.posX, lowest.posY + 1, lowest.posZ);
compressor.setInMultiblock(false, 1, multiblockID);
pkt = new PacketStartAnimation(
PacketStartAnimation.ID_SPARKLE_SPREAD, lowest.posX, lowest.posY + 1, lowest.posZ);
PacketStartAnimation.ID_SPARKLE_SPREAD,
lowest.posX,
lowest.posY + 1,
lowest.posZ);
point = new NetworkRegistry.TargetPoint(
world.provider.dimensionId, lowest.posX, lowest.posY + 1, lowest.posZ, 32);
world.provider.dimensionId,
lowest.posX,
lowest.posY + 1,
lowest.posZ,
32);
PacketHandler.INSTANCE.sendToAllAround(pkt, point);
compressor =
(TileEssentiaCompressor) world.getTileEntity(lowest.posX, lowest.posY + 2, lowest.posZ);
compressor = (TileEssentiaCompressor) world
.getTileEntity(lowest.posX, lowest.posY + 2, lowest.posZ);
compressor.setInMultiblock(false, 2, multiblockID);
pkt = new PacketStartAnimation(
PacketStartAnimation.ID_SPARKLE_SPREAD, lowest.posX, lowest.posY + 2, lowest.posZ);
PacketStartAnimation.ID_SPARKLE_SPREAD,
lowest.posX,
lowest.posY + 2,
lowest.posZ);
point = new NetworkRegistry.TargetPoint(
world.provider.dimensionId, lowest.posX, lowest.posY + 2, lowest.posZ, 32);
world.provider.dimensionId,
lowest.posX,
lowest.posY + 2,
lowest.posZ,
32);
PacketHandler.INSTANCE.sendToAllAround(pkt, point);
}
}
@@ -183,8 +194,7 @@ public class BlockEssentiaCompressor extends BlockContainer implements IBlockTra
}
private boolean isMuliblockPossible(World world, ChunkCoordinates lowest) {
return lowest != null
&& this.isMultiblockable(world, lowest.posX, lowest.posY, lowest.posZ)
return lowest != null && this.isMultiblockable(world, lowest.posX, lowest.posY, lowest.posZ)
&& this.isMultiblockable(world, lowest.posX, lowest.posY + 1, lowest.posZ)
&& this.isMultiblockable(world, lowest.posX, lowest.posY + 2, lowest.posZ);
}
@@ -1,13 +1,13 @@
package makeo.gadomancy.common.blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.ArrayList;
import java.util.List;
import makeo.gadomancy.common.blocks.tiles.TileExtendedNodeJar;
import makeo.gadomancy.common.items.ItemExtendedNodeJar;
import makeo.gadomancy.common.registration.RegisteredBlocks;
import makeo.gadomancy.common.registration.RegisteredItems;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.particle.EffectRenderer;
@@ -20,19 +20,19 @@ import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import thaumcraft.common.blocks.BlockJar;
import thaumcraft.common.blocks.CustomStepSound;
import thaumcraft.common.config.ConfigBlocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Original created by Azanor@Thaumcraft: thaumcraft.common.blocks.BlockJar
* Modified to create compatibility with ExtendedNodes
* Created by HellFirePvP @ 25.10.2015 22:02
* Original created by Azanor@Thaumcraft: thaumcraft.common.blocks.BlockJar Modified to create compatibility with
* ExtendedNodes Created by HellFirePvP @ 25.10.2015 22:02
*/
public class BlockExtendedNodeJar extends BlockContainer {
@@ -75,8 +75,8 @@ public class BlockExtendedNodeJar extends BlockContainer {
return RegisteredBlocks.rendererExtendedNodeJarBlock;
}
public void onBlockHarvested(
World par1World, int par2, int par3, int par4, int par5, EntityPlayer par6EntityPlayer) {
public void onBlockHarvested(World par1World, int par2, int par3, int par4, int par5,
EntityPlayer par6EntityPlayer) {
this.dropBlockAsItem(par1World, par2, par3, par4, par5, 0);
super.onBlockHarvested(par1World, par2, par3, par4, par5, par6EntityPlayer);
}
@@ -84,20 +84,17 @@ public class BlockExtendedNodeJar extends BlockContainer {
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
ArrayList<ItemStack> drops = new ArrayList<ItemStack>();
TileEntity te = world.getTileEntity(x, y, z);
if ((te != null)
&& ((te instanceof TileExtendedNodeJar))
if ((te != null) && ((te instanceof TileExtendedNodeJar))
&& (((TileExtendedNodeJar) te).drop)
&& (((TileExtendedNodeJar) te).getAspects() != null)) {
ItemStack drop = new ItemStack(RegisteredItems.itemExtendedNodeJar);
((ItemExtendedNodeJar) drop.getItem())
.setAspects(drop, ((TileExtendedNodeJar) te).getAspects().copy());
((ItemExtendedNodeJar) drop.getItem())
.setNodeAttributes(
drop,
((TileExtendedNodeJar) te).getNodeType(),
((TileExtendedNodeJar) te).getNodeModifier(),
((TileExtendedNodeJar) te).getExtendedNodeType(),
((TileExtendedNodeJar) te).getId());
((ItemExtendedNodeJar) drop.getItem()).setAspects(drop, ((TileExtendedNodeJar) te).getAspects().copy());
((ItemExtendedNodeJar) drop.getItem()).setNodeAttributes(
drop,
((TileExtendedNodeJar) te).getNodeType(),
((TileExtendedNodeJar) te).getNodeModifier(),
((TileExtendedNodeJar) te).getExtendedNodeType(),
((TileExtendedNodeJar) te).getId());
((ItemExtendedNodeJar) drop.getItem())
.setBehaviorSnapshot(drop, ((TileExtendedNodeJar) te).getBehaviorSnapshot());
drops.add(drop);
@@ -115,8 +112,8 @@ public class BlockExtendedNodeJar extends BlockContainer {
super.setBlockBoundsBasedOnState(world, i, j, k);
}
public void addCollisionBoxesToList(
World world, int i, int j, int k, AxisAlignedBB axisalignedbb, List arraylist, Entity par7Entity) {
public void addCollisionBoxesToList(World world, int i, int j, int k, AxisAlignedBB axisalignedbb, List arraylist,
Entity par7Entity) {
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
super.addCollisionBoxesToList(world, i, j, k, axisalignedbb, arraylist, par7Entity);
}
@@ -6,6 +6,7 @@ import makeo.gadomancy.common.blocks.tiles.TileInfusionClaw;
import makeo.gadomancy.common.registration.RegisteredBlocks;
import makeo.gadomancy.common.registration.RegisteredItems;
import makeo.gadomancy.common.utils.ItemUtils;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.EntityLivingBase;
@@ -17,14 +18,13 @@ import net.minecraft.util.ChatComponentTranslation;
import net.minecraft.world.World;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by makeo @ 05.10.2015 21:38
*/
public class BlockInfusionClaw extends BlockTransparent {
public BlockInfusionClaw() {
super(Material.rock);
this.setHardness(3.5f);
@@ -69,16 +69,8 @@ public class BlockInfusionClaw extends BlockTransparent {
}
@Override
public boolean onBlockActivated(
World world,
int x,
int y,
int z,
EntityPlayer player,
int p_149727_6_,
float p_149727_7_,
float p_149727_8_,
float p_149727_9_) {
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int p_149727_6_,
float p_149727_7_, float p_149727_8_, float p_149727_9_) {
if (!world.isRemote) {
TileInfusionClaw tile = (TileInfusionClaw) world.getTileEntity(x, y, z);
if (tile.hasOwner()) {
@@ -1,10 +1,12 @@
package makeo.gadomancy.common.blocks;
import java.util.ArrayList;
import makeo.gadomancy.common.Gadomancy;
import makeo.gadomancy.common.blocks.tiles.TileKnowledgeBook;
import makeo.gadomancy.common.registration.RegisteredBlocks;
import makeo.gadomancy.common.registration.RegisteredItems;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
@@ -16,14 +18,12 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import thaumcraft.common.config.ConfigBlocks;
import thaumcraft.common.config.ConfigItems;
/**
* HellFirePvP@Admin
* Date: 19.04.2016 / 14:52
* on Gadomancy
* BlockKnowledgeBook
* HellFirePvP@Admin Date: 19.04.2016 / 14:52 on Gadomancy BlockKnowledgeBook
*/
public class BlockKnowledgeBook extends BlockContainer
implements IBlockTransparent, TileKnowledgeBook.IKnowledgeProvider {
@@ -54,26 +54,18 @@ public class BlockKnowledgeBook extends BlockContainer
}
@Override
public boolean onBlockActivated(
World world,
int x,
int y,
int z,
EntityPlayer player,
int p_149727_6_,
float p_149727_7_,
float p_149727_8_,
float p_149727_9_) {
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int p_149727_6_,
float p_149727_7_, float p_149727_8_, float p_149727_9_) {
ItemStack thaumonomicon = new ItemStack(ConfigItems.itemThaumonomicon);
ConfigItems.itemThaumonomicon.onItemRightClick(thaumonomicon, world, player);
/*if(world.isRemote) {
try {
player.openGui(Thaumcraft.instance, 12, world, x, y, z);
Minecraft.getMinecraft().theWorld.playSound(Minecraft.getMinecraft().thePlayer.posX, Minecraft.getMinecraft().thePlayer.posY, Minecraft.getMinecraft().thePlayer.posZ, "thaumcraft:page", 0.66F, 1.0F, false);
} catch (Throwable tr) {
Gadomancy.log.warn("Error on opening Thaumcraft Thaumonomicon via KnowledgeBook at world " + world.getWorldInfo().getWorldName() + ", x=" + x + ", y=" + y + ", z=" + z);
}
}*/
/*
* if(world.isRemote) { try { player.openGui(Thaumcraft.instance, 12, world, x, y, z);
* Minecraft.getMinecraft().theWorld.playSound(Minecraft.getMinecraft().thePlayer.posX,
* Minecraft.getMinecraft().thePlayer.posY, Minecraft.getMinecraft().thePlayer.posZ, "thaumcraft:page", 0.66F,
* 1.0F, false); } catch (Throwable tr) {
* Gadomancy.log.warn("Error on opening Thaumcraft Thaumonomicon via KnowledgeBook at world " +
* world.getWorldInfo().getWorldName() + ", x=" + x + ", y=" + y + ", z=" + z); } }
*/
return true;
}
@@ -1,14 +1,13 @@
package makeo.gadomancy.common.blocks;
import makeo.gadomancy.common.blocks.tiles.TileExtendedNode;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by HellFirePvP @ 22.10.2015 19:47
*/
@@ -1,9 +1,11 @@
package makeo.gadomancy.common.blocks;
import java.util.List;
import makeo.gadomancy.common.Gadomancy;
import makeo.gadomancy.common.blocks.tiles.TileNodeManipulator;
import makeo.gadomancy.common.registration.RegisteredItems;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
@@ -11,16 +13,15 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import thaumcraft.api.ThaumcraftApiHelper;
import thaumcraft.common.blocks.BlockStoneDevice;
import thaumcraft.common.items.wands.ItemWandCasting;
import thaumcraft.common.lib.research.ResearchManager;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
* <p/>
* Created by HellFirePvP @ 26.10.2015 19:23
*/
@@ -71,8 +72,8 @@ public class BlockNodeManipulator extends BlockStoneDevice {
}
@Override
public boolean onBlockActivated(
World world, int x, int y, int z, EntityPlayer player, int side, float par7, float par8, float par9) {
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float par7,
float par8, float par9) {
TileNodeManipulator tile = (TileNodeManipulator) world.getTileEntity(x, y, z);
ItemStack heldItem = player.getHeldItem();
if (tile.isInMultiblock()) {
@@ -2,11 +2,13 @@ package makeo.gadomancy.common.blocks;
import java.util.ArrayList;
import java.util.List;
import makeo.gadomancy.common.Gadomancy;
import makeo.gadomancy.common.blocks.tiles.TileRemoteJar;
import makeo.gadomancy.common.blocks.tiles.TileStickyJar;
import makeo.gadomancy.common.registration.RegisteredItems;
import makeo.gadomancy.common.utils.NBTHelper;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
@@ -14,19 +16,19 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import thaumcraft.common.blocks.BlockJar;
import thaumcraft.common.config.ConfigItems;
import thaumcraft.common.tiles.TileJarFillable;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* This class is part of the Gadomancy Mod Gadomancy is Open Source and distributed under the GNU LESSER GENERAL PUBLIC
* LICENSE for more read the LICENSE file
*
* Created by makeo @ 14.10.2015 14:56
*/
public class BlockRemoteJar extends BlockJar {
public BlockRemoteJar() {
this.setCreativeTab(RegisteredItems.creativeTab);
}
@@ -68,13 +70,13 @@ public class BlockRemoteJar extends BlockJar {
}
@Override
public boolean onBlockActivated(
World world, int x, int y, int z, EntityPlayer player, int side, float these, float are, float variables) {
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float these,
float are, float variables) {
ItemStack heldItem = player.getHeldItem();
if (heldItem != null && heldItem.getItem() == ConfigItems.itemEssence) {
if (!world.isRemote) {
BlockStickyJar.handlePhial(
world, x, y, z, player, heldItem, (TileJarFillable) world.getTileEntity(x, y, z));
BlockStickyJar
.handlePhial(world, x, y, z, player, heldItem, (TileJarFillable) world.getTileEntity(x, y, z));
}
return true;
}
Loaded 100 of 284 files, more files were not shown because too many files have changed in this diff. Show more