mirror of
https://github.com/GTNewHorizons/Electro-Magic-Tools.git
synced 2026-11-21 04:22:09 +00:00
Refractored Code
+added Solar Factory -removed unnessecary solar and essentia generator classes +started gtnh researches +added tooltip clearance on solars (maximal output) Signed-off-by: bartimaeusnek <[email protected]>
This commit is contained in:
1 parent
980df8516a
commit
0fecf28b65
397 files changed
+8693
-9288
No files matched your search
@@ -1,9 +1,5 @@
|
||||
package emt.proxy;
|
||||
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderSnowMan;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import emt.client.EMTKeys;
|
||||
import emt.client.renderer.RenderLaser;
|
||||
@@ -12,33 +8,37 @@ import emt.entity.EntityArcher;
|
||||
import emt.entity.EntityEnergyBall;
|
||||
import emt.entity.EntityLaser;
|
||||
import emt.entity.EntityShield;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderSnowMan;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class ClientProxy extends CommonProxy {
|
||||
|
||||
@Override
|
||||
public void load() {
|
||||
registerRenders();
|
||||
EMTKeys.registerKeys();
|
||||
}
|
||||
@Override
|
||||
public void load() {
|
||||
registerRenders();
|
||||
EMTKeys.registerKeys();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerRenders() {
|
||||
Render empty = new Render() {
|
||||
@Override
|
||||
public void registerRenders() {
|
||||
Render empty = new Render() {
|
||||
|
||||
@Override
|
||||
public void doRender(Entity e, double x, double y, double z, float f1, float f2) {
|
||||
}
|
||||
@Override
|
||||
public void doRender(Entity e, double x, double y, double z, float f1, float f2) {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(Entity e) {
|
||||
return null;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityLaser.class, new RenderLaser());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityArcher.class, new RenderSnowMan());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityShield.class, new RenderShield());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityEnergyBall.class, empty);
|
||||
}
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(Entity e) {
|
||||
return null;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityLaser.class, new RenderLaser());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityArcher.class, new RenderSnowMan());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityShield.class, new RenderShield());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityEnergyBall.class, empty);
|
||||
}
|
||||
}
|
||||
@@ -19,59 +19,55 @@ import net.minecraft.world.World;
|
||||
|
||||
public class CommonProxy implements IGuiHandler {
|
||||
|
||||
public void load() {
|
||||
registerRenders();
|
||||
}
|
||||
public void load() {
|
||||
registerRenders();
|
||||
}
|
||||
|
||||
public void registerRenders() {
|
||||
/* Empty in base proxy */
|
||||
}
|
||||
public void registerRenders() {
|
||||
/* Empty in base proxy */
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
TileEntity entity = world.getTileEntity(x, y, z);
|
||||
@Override
|
||||
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
TileEntity entity = world.getTileEntity(x, y, z);
|
||||
|
||||
switch (ID) {
|
||||
case 0:
|
||||
if (entity != null && entity instanceof TileEntityIndustrialWandRecharge) {
|
||||
return new ContainerIndustrialWandRecharge(player.inventory, (TileEntityIndustrialWandRecharge) entity);
|
||||
}
|
||||
case 1:
|
||||
if (entity != null && entity instanceof TileEntityEtherealMacerator) {
|
||||
return new ContainerEtheralMacerator(player.inventory, (TileEntityEtherealMacerator) entity);
|
||||
}
|
||||
else if (entity != null && entity instanceof TileEntityBaseGenerator) {
|
||||
return new ConainerGenerator(player.inventory, (TileEntityBaseGenerator) entity);
|
||||
}
|
||||
else if (entity != null && entity instanceof TileEntitySolarBase) {
|
||||
return new ContainerSolars(player.inventory, (TileEntitySolarBase) entity);
|
||||
}
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
switch (ID) {
|
||||
case 0:
|
||||
if (entity != null && entity instanceof TileEntityIndustrialWandRecharge) {
|
||||
return new ContainerIndustrialWandRecharge(player.inventory, (TileEntityIndustrialWandRecharge) entity);
|
||||
}
|
||||
case 1:
|
||||
if (entity != null && entity instanceof TileEntityEtherealMacerator) {
|
||||
return new ContainerEtheralMacerator(player.inventory, (TileEntityEtherealMacerator) entity);
|
||||
} else if (entity != null && entity instanceof TileEntityBaseGenerator) {
|
||||
return new ConainerGenerator(player.inventory, (TileEntityBaseGenerator) entity);
|
||||
} else if (entity != null && entity instanceof TileEntitySolarBase) {
|
||||
return new ContainerSolars(player.inventory, (TileEntitySolarBase) entity);
|
||||
}
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
TileEntity entity = world.getTileEntity(x, y, z);
|
||||
@Override
|
||||
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
TileEntity entity = world.getTileEntity(x, y, z);
|
||||
|
||||
switch (ID) {
|
||||
case 0:
|
||||
if (entity != null && entity instanceof TileEntityIndustrialWandRecharge) {
|
||||
return new GuiIndustrialWandRecharger(player.inventory, (TileEntityIndustrialWandRecharge) entity);
|
||||
}
|
||||
case 1:
|
||||
if (entity != null && entity instanceof TileEntityEtherealMacerator) {
|
||||
return new GuiEtherealMacerator(player.inventory, (TileEntityEtherealMacerator) entity);
|
||||
}
|
||||
else if (entity != null && entity instanceof TileEntityBaseGenerator) {
|
||||
return new GuiGenerator(player.inventory, (TileEntityBaseGenerator) entity);
|
||||
}
|
||||
else if (entity != null && entity instanceof TileEntitySolarBase) {
|
||||
return new GuiSolar(player.inventory, (TileEntitySolarBase) entity);
|
||||
}
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
switch (ID) {
|
||||
case 0:
|
||||
if (entity != null && entity instanceof TileEntityIndustrialWandRecharge) {
|
||||
return new GuiIndustrialWandRecharger(player.inventory, (TileEntityIndustrialWandRecharge) entity);
|
||||
}
|
||||
case 1:
|
||||
if (entity != null && entity instanceof TileEntityEtherealMacerator) {
|
||||
return new GuiEtherealMacerator(player.inventory, (TileEntityEtherealMacerator) entity);
|
||||
} else if (entity != null && entity instanceof TileEntityBaseGenerator) {
|
||||
return new GuiGenerator(player.inventory, (TileEntityBaseGenerator) entity);
|
||||
} else if (entity != null && entity instanceof TileEntitySolarBase) {
|
||||
return new GuiSolar(player.inventory, (TileEntitySolarBase) entity);
|
||||
}
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user