diff options
| author | Ethryan <dborrfors@gmail.com> | 2017-07-23 14:13:19 +0200 |
|---|---|---|
| committer | Ethryan <dborrfors@gmail.com> | 2017-07-23 14:13:19 +0200 |
| commit | 9698f77fd04e8ad04c462fe6e6f76a7ebd25e0fa (patch) | |
| tree | f3f718112f5049e137f505598ec6b81dea8675e9 /src/main/java/com | |
| parent | 6b5540c9a943eab1803857c3c83912cebac5fa37 (diff) | |
| download | GT5-Unofficial-9698f77fd04e8ad04c462fe6e6f76a7ebd25e0fa.tar.gz GT5-Unofficial-9698f77fd04e8ad04c462fe6e6f76a7ebd25e0fa.tar.bz2 GT5-Unofficial-9698f77fd04e8ad04c462fe6e6f76a7ebd25e0fa.zip | |
Only keep the Scanners
Diffstat (limited to 'src/main/java/com')
49 files changed, 21 insertions, 5805 deletions
diff --git a/src/main/java/com/detrav/DetravScannerMod.java b/src/main/java/com/detrav/DetravScannerMod.java index 6b8736034c..5119a7114a 100644 --- a/src/main/java/com/detrav/DetravScannerMod.java +++ b/src/main/java/com/detrav/DetravScannerMod.java @@ -1,7 +1,6 @@ package com.detrav; import com.detrav.commands.DetravBiomeScannerCommand; -import com.detrav.commands.DetravLevelUpCommand; import com.detrav.events.DetravLoginEventHandler; import com.detrav.proxies.CommonProxy; import com.detrav.utils.DetravCreativeTab; @@ -22,7 +21,7 @@ import net.minecraftforge.common.config.Configuration; public class DetravScannerMod { public static final String MODID = "detravscannermod"; - public static final String VERSION = "0.5"; + public static final String VERSION = "0.6"; public static final CreativeTabs TAB_DETRAV = new DetravCreativeTab(); @@ -73,8 +72,6 @@ public class DetravScannerMod @EventHandler public void serverLoad(FMLServerStartingEvent event) { - //event.registerServerCommand(new DetravScannerCommand()); event.registerServerCommand(new DetravBiomeScannerCommand()); - //event.registerServerCommand(new DetravLevelUpCommand()); } } diff --git a/src/main/java/com/detrav/Detrav_AfterGTPreload_Loader.java b/src/main/java/com/detrav/Detrav_AfterGTPreload_Loader.java index 76b25b6672..cd4836c86a 100644 --- a/src/main/java/com/detrav/Detrav_AfterGTPreload_Loader.java +++ b/src/main/java/com/detrav/Detrav_AfterGTPreload_Loader.java @@ -1,14 +1,8 @@ package com.detrav; import com.detrav.enums.DetravItemList; -import com.detrav.items.DetravMetaGeneratedItem01; import com.detrav.items.DetravMetaGeneratedTool01; import com.detrav.items.processing.*; -import com.detrav.tileentities.Detrav_MetaTileEntity_AdvMiner2; -import com.detrav.tileentities.Detrav_MetaTileEntity_Boiler_Solar_High; -import com.detrav.tileentities.Detrav_MetaTileEntity_Boiler_Solar_Low; -import com.detrav.tileentities.Detrav_MetaTileEntity_Boiler_Solar_Medium; -import com.detrav.utils.DetravRepairRecipe; import cpw.mods.fml.common.registry.GameRegistry; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; @@ -22,30 +16,10 @@ public class Detrav_AfterGTPreload_Loader implements Runnable { public void run() { //items - new DetravMetaGeneratedItem01(); new DetravMetaGeneratedTool01(); //recipes and etc new ProcessingDetravToolProPick(); - new ProcessingDetravShaping(); - new ProcessingDetravPortableCharger(); - new ProcessingDetravSmartPlunger(); - //new Detrav_MetaGenerated_Tool_01(); - //new ProcessingDetravToolProPick(); - - - //GT_ModHandler.addCraftingRecipe(DetravMetaGeneratedTool01.INSTANCE.getToolWithStats(2, 1, Materials.Iron, Materials._NULL,null) - //, GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"IBI", " I ", "III", Character.valueOf('I'), OrePrefixes.ingot.get(Materials.Iron), Character.valueOf('B'), OrePrefixes.block.get(Materials.Iron)}); - - //ItemList.Machine_Bronze_Boiler_Solar.set(new GT_MetaTileEntity_Boiler_Solar(105, "boiler.solar", "Simple Solar Boiler").getStackForm(1L)); - //DetravItemList.Solar_Boiler_Low.set(new Detrav_MetaTileEntity_Boiler_Solar_Low(2051,"boiler.bronze.solar", "Bronze Solar Boiler").getStackForm(1L)); - DetravItemList.Solar_Boiler_Medium.set(new Detrav_MetaTileEntity_Boiler_Solar_Medium(2052,"boiler.steel.solar", "Steel Solar Boiler").getStackForm(1L)); - DetravItemList.Solar_Boiler_High.set(new Detrav_MetaTileEntity_Boiler_Solar_High(2053,"boiler.stainless.steel.solar", "Stainless Steel Solar Boiler").getStackForm(1L)); - DetravItemList.DetravAdvancedMiner2.set(new Detrav_MetaTileEntity_AdvMiner2(2054, "multimachine.advminer2.detrav", "Ore Drilling Plant V").getStackForm(1)); - - //DetravItemList.Anvil.set() - - // GameRegistry.addRecipe(new DetravRepairRecipe()); } } diff --git a/src/main/java/com/detrav/commands/DetravLevelUpCommand.java b/src/main/java/com/detrav/commands/DetravLevelUpCommand.java deleted file mode 100644 index 432aac54fe..0000000000 --- a/src/main/java/com/detrav/commands/DetravLevelUpCommand.java +++ /dev/null @@ -1,97 +0,0 @@ -package com.detrav.commands; - -import com.google.common.collect.HashMultimap; -import net.minecraft.command.ICommand; -import net.minecraft.command.ICommandSender; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.attributes.AttributeModifier; -import net.minecraft.entity.ai.attributes.BaseAttributeMap; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ChatComponentText; - -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; - -/** - * Created by Detrav on 26.03.2017. - */ -public class DetravLevelUpCommand implements ICommand { - - private List aliases; - - public DetravLevelUpCommand() - { - this.aliases = new ArrayList<String>(); - this.aliases.add("DetravLevelUp"); - this.aliases.add("dlup"); - } - - @Override - public String getCommandName() { - return "DetravLevelUp"; - } - - @Override - public String getCommandUsage(ICommandSender p_71518_1_) { - return "DetravLevelUp"; - } - - @Override - public List getCommandAliases() { - return aliases; - } - - static int level = 0; - - static UUID id = UUID.randomUUID(); - - @Override - public void processCommand(ICommandSender player, String[] p_71515_2_) { - if(player instanceof EntityPlayerMP) - { - - level++; - AttributeModifier mod = new AttributeModifier(id,"detravlevelup",level,0); - ((EntityPlayerMP) player).getEntityAttribute( - SharedMonsterAttributes.maxHealth - ).removeModifier(mod); - ((EntityPlayerMP) player).getEntityAttribute( - SharedMonsterAttributes.maxHealth - ).applyModifier(mod); - - - - /*BaseAttributeMap attrMap = ((EntityPlayerMP) player).getAttributeMap(); - HashMultimap map = HashMultimap.create(); - map.put() - attrMap.applyAttributeModifiers(map);*/ - } - } - - private void sendHelpMessage(ICommandSender sender) - { - sender.addChatMessage(new ChatComponentText(getCommandUsage(sender))); - } - - @Override - public boolean canCommandSenderUseCommand(ICommandSender p_71519_1_) { - return true; - } - - @Override - public List addTabCompletionOptions(ICommandSender p_71516_1_, String[] p_71516_2_) { - return null; - } - - @Override - public boolean isUsernameIndex(String[] p_82358_1_, int p_82358_2_) { - return false; - } - - @Override - public int compareTo(Object o) { - return 0; - } -} diff --git a/src/main/java/com/detrav/enums/DetravSimpleItems.java b/src/main/java/com/detrav/enums/DetravSimpleItems.java deleted file mode 100644 index 5db1977650..0000000000 --- a/src/main/java/com/detrav/enums/DetravSimpleItems.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.detrav.enums; - -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import net.minecraft.item.ItemStack; - -/** - * Created by wital_000 on 19.03.2016. - */ -public enum DetravSimpleItems { - toolHeadProPick(OrePrefixes.toolHeadPickaxe,"Prospector's Pick Heads",""," Prospector's Pick Head",0); - - static { - - - } - - private final String mLocalName; - private final OrePrefixes parent; - private final String mPrefix; - private final String mPostFix; - public ItemStack mContainerItem; - public int mDefaultStackSize = 64; - public boolean mIsUnificatable = false; - public int mTextureIndex; - - - DetravSimpleItems(OrePrefixes orePrefixes, String s,String aPrefix, String aPostfix, int aTextureIndex) { - parent = orePrefixes; - mLocalName = s; - mPrefix = aPrefix; - mPostFix = aPostfix; - mTextureIndex = aTextureIndex; - } - - public OrePrefixes getOrePrefixes() - { - return parent; - } - - public String getDefaultLocalNameForItem(Materials aMaterial) { - String result = mPrefix + aMaterial.toString() + mPostFix; - return result; - } - - public Object get(Materials tMaterial) { - Object result = toString()+tMaterial.toString(); - return result; - } -} diff --git a/src/main/java/com/detrav/enums/DetravToolDictNames.java b/src/main/java/com/detrav/enums/DetravToolDictNames.java index 50cfc9c882..21c4396720 100644 --- a/src/main/java/com/detrav/enums/DetravToolDictNames.java +++ b/src/main/java/com/detrav/enums/DetravToolDictNames.java @@ -4,11 +4,5 @@ package com.detrav.enums; * Created by wital_000 on 19.03.2016. */ public enum DetravToolDictNames { - craftingToolProPick, craftingToolElectricProPick, - craftingToolPortableCharger, - //craftingToolPortableAnvil, - craftingToolSmartPlunger, - craftingToolSmartTreeTap, - craftingToolCictuitConfigurator; } diff --git a/src/main/java/com/detrav/enums/Textures01.java b/src/main/java/com/detrav/enums/Textures01.java index a65f181456..742a7f9756 100644 --- a/src/main/java/com/detrav/enums/Textures01.java +++ b/src/main/java/com/detrav/enums/Textures01.java @@ -13,14 +13,8 @@ import net.minecraft.util.ResourceLocation; public class Textures01 { public static final IIconContainer[] mTextures = new IIconContainer[] { - new Textures.ItemIcons.CustomIcon("gt.detrav.metaitem.01/PRO_PICK_HEAD"), new Textures.ItemIcons.CustomIcon("gt.detrav.metatool.01/ELECTRIC_LV_PRO_PICK_HEAD"), new Textures.ItemIcons.CustomIcon("gt.detrav.metatool.01/ELECTRIC_MV_PRO_PICK_HEAD"), new Textures.ItemIcons.CustomIcon("gt.detrav.metatool.01/ELECTRIC_HV_PRO_PICK_HEAD"), - new Textures.ItemIcons.CustomIcon("gt.detrav.metatool.01/PORTABE_CHARGER"), - new Textures.ItemIcons.CustomIcon("gt.detrav.metatool.01/PORTABE_CHARGER_BORDER"), - new Textures.ItemIcons.CustomIcon("gt.detrav.metatool.01/ANVIL_TOOL"), - new Textures.ItemIcons.CustomIcon("gt.detrav.metatool.01/TOOL_TREE_TAP"), - new Textures.ItemIcons.CustomIcon("gt.detrav.metatool.01/CONFIGURATOR") }; }
\ No newline at end of file diff --git a/src/main/java/com/detrav/events/DetravCraftingEventHandler.java b/src/main/java/com/detrav/events/DetravCraftingEventHandler.java deleted file mode 100644 index 0350b9b7b7..0000000000 --- a/src/main/java/com/detrav/events/DetravCraftingEventHandler.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.detrav.events; - -import com.detrav.utils.DetravRepairRecipe; -import cpw.mods.fml.common.FMLCommonHandler; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import cpw.mods.fml.common.gameevent.PlayerEvent; -import gregtech.api.util.GT_Utility; -import net.minecraft.inventory.InventoryCrafting; -import net.minecraft.item.ItemStack; -import net.minecraftforge.common.MinecraftForge; - -/** - * Created by Detrav on 02.10.2016. - */ -public class DetravCraftingEventHandler { - @SubscribeEvent - public void onCrafting(PlayerEvent.ItemCraftedEvent e) { - if(DetravRepairRecipe.INSTANCE == null) return; - if(!(e.craftMatrix instanceof InventoryCrafting)) return; - if(DetravRepairRecipe.INSTANCE.matches((InventoryCrafting) e.craftMatrix,null)) - { - if(!GT_Utility.areStacksEqual(e.crafting, e.craftMatrix.getStackInSlot(4),true)) return; - for(int i =0; i<e.craftMatrix.getSizeInventory(); i++) { - ItemStack stack = e.craftMatrix.getStackInSlot(i); - if(stack == null) continue; - if (stack.stackSize < 2) - e.craftMatrix.setInventorySlotContents(i, null); - else { - //stack.stackSize -= 1; - //e.craftMatrix.setInventorySlotContents(i,stack); - } - } - } - } - - static boolean inited = false; - - public static void register() { - if (!inited) { - inited = true; - DetravCraftingEventHandler handler = new DetravCraftingEventHandler(); - MinecraftForge.EVENT_BUS.register(handler); - FMLCommonHandler.instance().bus().register(handler); - } - } -} diff --git a/src/main/java/com/detrav/events/DetravDrawBlockHighlightEventHandler.java b/src/main/java/com/detrav/events/DetravDrawBlockHighlightEventHandler.java deleted file mode 100644 index 25b29c8e96..0000000000 --- a/src/main/java/com/detrav/events/DetravDrawBlockHighlightEventHandler.java +++ /dev/null @@ -1,268 +0,0 @@ -package com.detrav.events; - -import cpw.mods.fml.common.FMLCommonHandler; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import net.minecraft.block.Block; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.MovingObjectPosition; -import net.minecraftforge.client.event.DrawBlockHighlightEvent; -import net.minecraftforge.common.MinecraftForge; -import org.lwjgl.opengl.GL11; - -import static org.lwjgl.opengl.GL11.GL_TRIANGLES; -//import net.minecraftforge.client.event.RenderWorldLastEvent; - -/** - * Created by wital_000 on 18.04.2016. - */ -public class DetravDrawBlockHighlightEventHandler { - - public static long modeBlockBreak = 0L; - public static boolean disableDepthBuffer = false; - public static float thickness = 4F; - public static float offset = 0.01F; - public static float red = 1F;//0.1F; - public static float green = 1F; - public static float blue = 1F;//0.1F; - public static float alpha = 0.1F; - - @SubscribeEvent - public void onDrawBlockHighlight(DrawBlockHighlightEvent e) { - if (drawMoreSelectionBox(e.player, e.target, 0, e.currentItem, e.partialTicks)) - e.setCanceled(true); - } - - public static boolean drawMoreSelectionBox(EntityPlayer player, MovingObjectPosition mouseHit, int par3, ItemStack par4ItemStack, float par5) { - switch ((int) modeBlockBreak) { - //case 0: Просто рисуем без экспанда - case 0: - //drawSelectionBox(player, mouseHit.typeOfHit, mouseHit.blockX , mouseHit.blockY, mouseHit.blockZ , par3, par4ItemStack, par5); - return false; - case 1: - switch (mouseHit.sideHit) {//Рисуеи по моусхиту - case 0: - case 1://x,z - for (int i = -1; i <= 1; i++) - for (int j = -1; j <= 1; j++) - drawSelectionBox(player, mouseHit.typeOfHit, mouseHit.blockX + i, mouseHit.blockY, mouseHit.blockZ + j, par3, par4ItemStack, par5); - break; - case 2: - case 3://x,y - for (int i = -1; i <= 1; i++) - for (int j = -1; j <= 1; j++) - drawSelectionBox(player, mouseHit.typeOfHit, mouseHit.blockX + i, mouseHit.blockY + j, mouseHit.blockZ, par3, par4ItemStack, par5); - break; - case 4: - case 5://y,z - for (int i = -1; i <= 1; i++) - for (int j = -1; j <= 1; j++) - drawSelectionBox(player, mouseHit.typeOfHit, mouseHit.blockX, mouseHit.blockY + i, mouseHit.blockZ + j, par3, par4ItemStack, par5); - break; - } - break; - case 2://x,z - for (int i = -1; i <= 1; i++) - for (int j = -1; j <= 1; j++) - drawSelectionBox(player, mouseHit.typeOfHit, mouseHit.blockX + i, mouseHit.blockY, mouseHit.blockZ + j, par3, par4ItemStack, par5); - break; - case 3: - float rotationYaw = player.rotationYaw; - while (rotationYaw > 0) rotationYaw -= 360F; - while (rotationYaw < -360) rotationYaw += 360F; - if ((-135 <= rotationYaw && rotationYaw <= -45) || (-315 <= rotationYaw && rotationYaw <= -225)) { - //y,z - for (int i = -1; i <= 1; i++) - for (int j = -1; j <= 1; j++) - drawSelectionBox(player, mouseHit.typeOfHit, mouseHit.blockX, mouseHit.blockY + i, mouseHit.blockZ + j, par3, par4ItemStack, par5); - } else if ((-225 <= rotationYaw && rotationYaw <= -135) || -45 <= rotationYaw || rotationYaw <= -315) { - //x,y - for (int i = -1; i <= 1; i++) - for (int j = -1; j <= 1; j++) - drawSelectionBox(player, mouseHit.typeOfHit, mouseHit.blockX + i, mouseHit.blockY + j, mouseHit.blockZ, par3, par4ItemStack, par5); - } - break; - case 4: - //x,y,z - for (int i = -1; i <= 1; i++) - for (int j = -1; j <= 1; j++) - for (int k = -1; k <= 1; k++) - drawSelectionBox(player, mouseHit.typeOfHit, mouseHit.blockX + i, mouseHit.blockY + j, mouseHit.blockZ + k, par3, par4ItemStack, par5); - break; - } - return false; - } - - public static void drawSelectionBox(EntityPlayer player,MovingObjectPosition.MovingObjectType typeOfHit, int blockX,int blockY, int blockZ, int par3, ItemStack par4ItemStack, float par5) { - if ((par3 == 0) && (typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)) { - //float breakProgress = getBlockDamage(player, block); - if (disableDepthBuffer) { - GL11.glDisable(2929); - } - GL11.glEnable(3042); - GL11.glBlendFunc(770, 771); - GL11.glLineWidth(thickness); - GL11.glDisable(3553); - GL11.glDepthMask(false); - float f1 = offset; - - Minecraft mc = Minecraft.getMinecraft(); - Block b = mc.theWorld.getBlock(blockX, blockY, blockZ); - if (b != Blocks.air && b!= null) { - b.setBlockBoundsBasedOnState(mc.theWorld, blockX, blockY, blockZ); - - double xOffset = player.lastTickPosX + (player.posX - player.lastTickPosX) * par5; - double yOffset = player.lastTickPosY + (player.posY - player.lastTickPosY) * par5; - double zOffset = player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * par5; - - float xExpand = 0F; - float yExpand = 0F; - float zExpand = 0F; - - - - try { - AxisAlignedBB bb = b.getSelectedBoundingBoxFromPool(mc.theWorld, blockX, blockY, blockZ).expand(xExpand + f1, yExpand + f1, zExpand + f1).getOffsetBoundingBox(-xOffset, -yOffset, -zOffset); - GL11.glColor4f(red, green, blue, alpha); - //drawOutlinedBoundingBox(bb); - drawBlock(bb); - }catch(Exception e) { - - } - - } - GL11.glDepthMask(true); - GL11.glEnable(3553); - GL11.glDisable(3042); - if (disableDepthBuffer) { - GL11.glEnable(2929); - } - } - } - - private static void drawBlock(AxisAlignedBB par1AxisAlignedBB) { - //Tessellator tessellator = Tessellator.instance; - if(alpha > 0.0F) { - - - renderDown(par1AxisAlignedBB); - renderUp(par1AxisAlignedBB); - renderNorth(par1AxisAlignedBB); - renderSouth(par1AxisAlignedBB); - renderWest(par1AxisAlignedBB); - renderEast(par1AxisAlignedBB); - } - - } - - - public static void renderUp(AxisAlignedBB par1AxisAlignedBB) { - Tessellator tessellator = Tessellator.instance; - tessellator.startDrawingQuads(); - tessellator.addVertex(par1AxisAlignedBB.minX, par1AxisAlignedBB.minY, par1AxisAlignedBB.minZ); - tessellator.addVertex(par1AxisAlignedBB.maxX, par1AxisAlignedBB.minY, par1AxisAlignedBB.minZ); - tessellator.addVertex(par1AxisAlignedBB.maxX, par1AxisAlignedBB.minY, par1AxisAlignedBB.maxZ); - tessellator.addVertex(par1AxisAlignedBB.minX, par1AxisAlignedBB.minY, par1AxisAlignedBB.maxZ); - tessellator.addVertex(par1AxisAlignedBB.minX, par1AxisAlignedBB.minY, par1AxisAlignedBB.minZ); - tessellator.draw(); - |
