Merge branch 'master' of https://github.com/TechReborn/TechReborn
This commit is contained in:
commit
0f4dcdb5d1
4 changed files with 25 additions and 74 deletions
|
@ -4,12 +4,15 @@
|
|||
|
||||
package techreborn.partSystem.QLib;
|
||||
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import techreborn.lib.Location;
|
||||
import techreborn.lib.vecmath.Vecs3d;
|
||||
import techreborn.lib.vecmath.Vecs3dCube;
|
||||
import techreborn.partSystem.ModPart;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import uk.co.qmunity.lib.client.render.RenderHelper;
|
||||
import uk.co.qmunity.lib.part.IPart;
|
||||
import uk.co.qmunity.lib.part.IPartCollidable;
|
||||
import uk.co.qmunity.lib.part.IPartRenderPlacement;
|
||||
|
@ -22,6 +25,7 @@ import uk.co.qmunity.lib.raytrace.QMovingObjectPosition;
|
|||
import uk.co.qmunity.lib.raytrace.RayTracer;
|
||||
import uk.co.qmunity.lib.vec.Vec3d;
|
||||
import uk.co.qmunity.lib.vec.Vec3dCube;
|
||||
import uk.co.qmunity.lib.vec.Vec3i;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -66,6 +70,11 @@ public class QModPart extends PartBase implements IPartCollidable, IPartSelectab
|
|||
iModPart.renderDynamic(ModLib2QLib.convert(translation), delta);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderStatic(Vec3i translation, RenderHelper renderer, RenderBlocks renderBlocks, int pass) {
|
||||
return iModPart.renderStatic(new Vecs3d(translation.getX(), translation.getY(), translation.getZ()),renderBlocks , pass);
|
||||
}
|
||||
|
||||
@Override
|
||||
public QMovingObjectPosition rayTrace(Vec3d start, Vec3d end) {
|
||||
return RayTracer.instance().rayTraceCubes(this, start, end);
|
||||
|
|
|
@ -5,18 +5,12 @@ import ic2.api.energy.event.EnergyTileUnloadEvent;
|
|||
import ic2.api.energy.tile.IEnergyConductor;
|
||||
import ic2.api.energy.tile.IEnergyTile;
|
||||
import ic2.core.IC2;
|
||||
import ic2.core.Ic2Items;
|
||||
import ic2.core.block.wiring.RenderBlockCable;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldSettings;
|
||||
import net.minecraft.world.WorldType;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import techreborn.lib.Functions;
|
||||
|
@ -108,14 +102,9 @@ public class CablePart extends ModPart implements IEnergyConductor {
|
|||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean renderStatic(Vecs3d translation, RenderBlocks renderBlocks, int pass) {
|
||||
if(worldObj!= null){
|
||||
FakeCableWorld fakeCableWorld = new FakeCableWorld();
|
||||
RenderBlockCable renderBlockCable = new RenderBlockCable();
|
||||
return renderBlockCable.renderWorldBlock(fakeCableWorld, getX(), getY(), getZ(), Block.getBlockFromItem(Ic2Items.copperCableBlock.getItem()) , 0, RenderBlocks.getInstance());
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,53 +0,0 @@
|
|||
package techreborn.partSystem.parts;
|
||||
|
||||
import ic2.core.block.wiring.TileEntityCable;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.multiplayer.WorldClient;
|
||||
import net.minecraft.client.network.NetHandlerPlayClient;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.network.NetworkManager;
|
||||
import net.minecraft.profiler.Profiler;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.EnumDifficulty;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldProvider;
|
||||
import net.minecraft.world.WorldSettings;
|
||||
import net.minecraft.world.WorldType;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
import net.minecraft.world.storage.ISaveHandler;
|
||||
|
||||
|
||||
public class FakeCableWorld extends WorldClient {
|
||||
|
||||
public FakeCableWorld() {
|
||||
super(new NetHandlerPlayClient(Minecraft.getMinecraft(), null, new NetworkManager(true)), new WorldSettings(0, WorldSettings.GameType.NOT_SET,
|
||||
false, false, WorldType.DEFAULT), 0, EnumDifficulty.PEACEFUL, Minecraft.getMinecraft().theWorld.theProfiler);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected IChunkProvider createChunkProvider() {
|
||||
return Minecraft.getMinecraft().thePlayer.worldObj.getChunkProvider();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int func_152379_p() {
|
||||
return Minecraft.getMinecraft().gameSettings.renderDistanceChunks;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Entity getEntityByID(int p_73045_1_) {
|
||||
return Minecraft.getMinecraft().theWorld.getEntityByID(p_73045_1_);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public TileEntity getTileEntity(int x, int y, int z) {
|
||||
return new TileEntityCable();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Chunk getChunkFromBlockCoords(int p_72938_1_, int p_72938_2_) {
|
||||
return Minecraft.getMinecraft().theWorld.getChunkFromBlockCoords(p_72938_1_, p_72938_2_);
|
||||
}
|
||||
}
|
|
@ -89,7 +89,7 @@ item.techreborn.dust.Phosphor.name=Phosphor Dust
|
|||
item.techreborn.dust.Platinum.name=Platinum Dust
|
||||
item.techreborn.dust.Pyrite.name=Pyrite Dust
|
||||
item.techreborn.dust.Pyrope.name=Pyrope Dust
|
||||
item.techreborn.dust.RedGarnet.name=RedGarnet Dust
|
||||
item.techreborn.dust.RedGarnet.name=Red Garnet Dust
|
||||
item.techreborn.dust.Redrock.name=Redrock Dust
|
||||
item.techreborn.dust.Ruby.name=Ruby Dust
|
||||
item.techreborn.dust.Saltpeter.name=Saltpeter Dust
|
||||
|
@ -105,12 +105,12 @@ item.techreborn.dust.Titanium.name=Titanium Dust
|
|||
item.techreborn.dust.Tungsten.name=Tungsten Dust
|
||||
item.techreborn.dust.Uranium.name=Uranium Dust
|
||||
item.techreborn.dust.Uvarovite.name=Uvarovite Dust
|
||||
item.techreborn.dust.YellowGarnet.name=YellowGarnet Dust
|
||||
item.techreborn.dust.YellowGarnet.name=Yellow Garnet Dust
|
||||
item.techreborn.dust.Zinc.name=Zinc Dust
|
||||
item.techreborn.dust.Cobalt.name=Cobalt Dust
|
||||
item.techreborn.dust.Ardite.name=Ardite Dust
|
||||
item.techreborn.dust.Manyullyn.name=Manyullyn Dust
|
||||
item.techreborn.dust.AlBrass.name=AluminiumBrass Dust
|
||||
item.techreborn.dust.AlBrass.name=Aluminium Brass Dust
|
||||
item.techreborn.dust.Alumite.name=Alumite Dust
|
||||
|
||||
#SmallDusts
|
||||
|
@ -154,7 +154,7 @@ item.techreborn.dustsmall.Phosphor.name=Small Pile of Phosphor Dust
|
|||
item.techreborn.dustsmall.Platinum.name=Small Pile of Platinum Dust
|
||||
item.techreborn.dustsmall.Pyrite.name=Small Pile of Pyrite Dust
|
||||
item.techreborn.dustsmall.Pyrope.name=Small Pile of Pyrope Dust
|
||||
item.techreborn.dustsmall.RedGarnet.name=Small Pile of RedGarnet Dust
|
||||
item.techreborn.dustsmall.RedGarnet.name=Small Pile of Red Garnet Dust
|
||||
item.techreborn.dustsmall.Redrock.name=Small Pile of Redrock Dust
|
||||
item.techreborn.dustsmall.Ruby.name=Small Pile of Ruby Dust
|
||||
item.techreborn.dustsmall.Saltpeter.name=Small Pile of Saltpeter Dust
|
||||
|
@ -170,12 +170,12 @@ item.techreborn.dustsmall.Titanium.name=Small Pile of Titanium Dust
|
|||
item.techreborn.dustsmall.Tungsten.name=Small Pile of Tungsten Dust
|
||||
item.techreborn.dustsmall.Uranium.name=Small Pile of Uranium Dust
|
||||
item.techreborn.dustsmall.Uvarovite.name=Small Pile of Uvarovite Dust
|
||||
item.techreborn.dustsmall.YellowGarnet.name=Small Pile of YellowGarnet Dust
|
||||
item.techreborn.dustsmall.YellowGarnet.name=Small Pile of Yellow Garnet Dust
|
||||
item.techreborn.dustsmall.Zinc.name=Small Pile of Zinc Dust
|
||||
item.techreborn.dustsmall.Cobalt.name=Small Pile of Cobalt Dust
|
||||
item.techreborn.dustsmall.Ardite.name=Small Pile of Ardite Dust
|
||||
item.techreborn.dustsmall.Manyullyn.name=Small Pile of Manyullyn Dust
|
||||
item.techreborn.dustsmall.AlBrass.name=Small Pile of AluminiumBrass Dust
|
||||
item.techreborn.dustsmall.AlBrass.name=Small Pile of Aluminium Brass Dust
|
||||
item.techreborn.dustsmall.Alumite.name=Small Pile of Alumite Dust
|
||||
|
||||
#Cells
|
||||
|
@ -198,13 +198,13 @@ item.techreborn.cell.lithium.name=Lithium Cell
|
|||
item.techreborn.cell.mercury.name=Mercury Cell
|
||||
item.techreborn.cell.methane.name=Methane Cell
|
||||
item.techreborn.cell.nitrocarbon.name=Nitrocarbon Cell
|
||||
item.techreborn.cell.nitroCoalfuel.name=Nitro Coal fuel Cell
|
||||
item.techreborn.cell.nitroCoalfuel.name=Nitro Coal Fuel Cell
|
||||
item.techreborn.cell.nitroDiesel.name=Nitro Diesel Cell
|
||||
item.techreborn.cell.nitrogen.name=Nitrogen Cell
|
||||
item.techreborn.cell.nitrogenDioxide.name=Nitrogen Dioxide Cell
|
||||
item.techreborn.cell.oil.name=Oil Cell
|
||||
item.techreborn.cell.potassium.name=Potassium Cell
|
||||
item.techreborn.cell.seedOil.name=SeedOil Cell
|
||||
item.techreborn.cell.seedOil.name=Seed Oil Cell
|
||||
item.techreborn.cell.silicon.name=Silicon Cell
|
||||
item.techreborn.cell.sodium.name=Sodium Cell
|
||||
item.techreborn.cell.sodiumPersulfate.name=Sodium Persulfate Cell
|
||||
|
@ -270,7 +270,7 @@ item.techreborn.part.BrassMachineHull.name=Brass Machine Hull
|
|||
|
||||
#Tools
|
||||
item.techreborn.rockcutter.name=Rockcutter
|
||||
item.techreborn.lithiumbatpack.name=lithium Batpack
|
||||
item.techreborn.lithiumbatpack.name=Lithium Batpack
|
||||
item.techreborn.lapotronpack.name=Lapotron Pack
|
||||
item.techreborn.omniTool.name=Omni tool
|
||||
item.techreborn.advancedDrill.name=Advanced Drill
|
||||
|
@ -278,4 +278,10 @@ item.techreborn.advancedDrill.name=Advanced Drill
|
|||
#Configs
|
||||
config.techreborn.allow.galenaOre=Allow GalenaOre
|
||||
|
||||
#ConfigGui
|
||||
config.techreborn.category.general=General Configs
|
||||
config.techreborn.category.world=World Configs
|
||||
config.techreborn.category.power=Power Configs
|
||||
config.techreborn.category.crafting=Crafting Configs
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue