Merge pull request #1266 from 9Valjew/master

Radar and Deathray linkage
This commit is contained in:
HbmMods 2023-12-29 22:01:54 +01:00 committed by GitHub
commit 6c0a8d10dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 45 additions and 2 deletions

View File

@ -127,7 +127,8 @@ public class ToolRecipes {
CraftingManager.addRecipeAuto(new ItemStack(ModItems.reacher, 1), new Object[] { "BIB", "P P", "B B", 'B', ModItems.bolt_tungsten, 'I', W.ingot(), 'P', ANY_RUBBER.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.bismuth_tool, 1), new Object[] { "TBT", "SRS", "SCS", 'T', TA.nugget(), 'B', ModItems.nugget_bismuth, 'S', ANY_RESISTANTALLOY.ingot(), 'R', ModItems.reacher, 'C', ModItems.circuit_aluminium });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.sat_designator, 1), new Object[] { "RRD", "PIC", " P", 'P', GOLD.plate(), 'R', Items.redstone, 'C', ModItems.circuit_gold, 'D', ModItems.sat_chip, 'I', GOLD.ingot() });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.sat_relay), new Object[] { ModItems.sat_chip, ModItems.ducttape, ModItems.radar_linker });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mirror_tool), new Object[] { " A ", " IA", "I ", 'A', AL.ingot(), 'I', IRON.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.rbmk_tool), new Object[] { " A ", " IA", "I ", 'A', PB.ingot(), 'I', IRON.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.power_net_tool), new Object[] { "WRW", " I ", " B ", 'W', ModItems.wire_red_copper, 'R', REDSTONE.dust(), 'I', IRON.ingot(), 'B', ModItems.battery_su });

View File

@ -1493,7 +1493,8 @@ public class ModItems {
public static Item sat_interface;
public static Item sat_coord;
public static Item sat_designator;
public static Item sat_relay;
public static ItemEnumMulti ammo_misc;
public static ItemEnumMulti ammo_12gauge;
public static ItemEnumMulti ammo_20gauge;
@ -3958,6 +3959,7 @@ public class ModItems {
sat_interface = new ItemSatInterface().setUnlocalizedName("sat_interface").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":sat_interface");
sat_coord = new ItemSatInterface().setUnlocalizedName("sat_coord").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":sat_coord");
sat_designator = new ItemSatDesignator().setUnlocalizedName("sat_designator").setFull3D().setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":sat_designator");
sat_relay = new ItemSatRelay().setUnlocalizedName("sat_relay").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":sat_relay");
mp_thruster_10_kerosene = new ItemMissile().makeThruster(FuelType.KEROSENE, 1F, 1.5F, PartSize.SIZE_10).setHealth(10F) .setUnlocalizedName("mp_thruster_10_kerosene");
mp_thruster_10_kerosene_tec = new ItemMissile().makeThruster(FuelType.KEROSENE, 1F, 1.5F, PartSize.SIZE_10).setHealth(15F).setRarity(Rarity.COMMON).setUnlocalizedName("mp_thruster_10_kerosene_tec");
@ -7020,6 +7022,7 @@ public class ModItems {
GameRegistry.registerItem(sat_interface, sat_interface.getUnlocalizedName());
GameRegistry.registerItem(sat_coord, sat_coord.getUnlocalizedName());
GameRegistry.registerItem(sat_designator, sat_designator.getUnlocalizedName());
GameRegistry.registerItem(sat_relay, sat_relay.getUnlocalizedName());
//Guns
GameRegistry.registerItem(gun_revolver, gun_revolver.getUnlocalizedName());

View File

@ -0,0 +1,19 @@
package com.hbm.items.tool;
import com.hbm.items.machine.ItemSatChip;
import com.hbm.lib.Library;
import com.hbm.saveddata.SatelliteSavedData;
import com.hbm.saveddata.satellites.Satellite;
import com.hbm.saveddata.satellites.Satellite.Interfaces;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class ItemSatRelay extends ItemSatChip {
//Schrabby doesn't fucking know how this works so I HOPE it will create a new item that works without fucking everything up
}

View File

@ -14,10 +14,15 @@ import com.hbm.interfaces.IControlReceiver;
import com.hbm.inventory.container.ContainerMachineRadarNT;
import com.hbm.inventory.gui.GUIMachineRadarNT;
import com.hbm.inventory.gui.GUIMachineRadarNTSlots;
import com.hbm.items.ISatChip;
import com.hbm.items.ModItems;
import com.hbm.items.tool.ItemCoordinateBase;
import com.hbm.lib.Library;
import com.hbm.main.MainRegistry;
import com.hbm.saveddata.SatelliteSavedData;
import com.hbm.saveddata.satellites.Satellite;
import com.hbm.saveddata.satellites.Satellite.Interfaces;
import com.hbm.saveddata.satellites.SatelliteLaser;
import com.hbm.tileentity.IConfigurableMachine;
import com.hbm.tileentity.IGUIProvider;
import com.hbm.tileentity.IRadarCommandReceiver;
@ -412,6 +417,20 @@ public class TileEntityMachineRadarNT extends TileEntityMachineBase implements I
int id = data.getInteger("link");
ItemStack link = slots[id];
if(link != null && link.getItem() == ModItems.sat_relay) {
World world = player.getEntityWorld();
Satellite sat = SatelliteSavedData.getData(world).getSatFromFreq(ISatChip.getFreqS(link));
if(sat instanceof SatelliteLaser) {
if(data.hasKey("launchPosX")) {
int x = data.getInteger("launchPosX");
int z = data.getInteger("launchPosZ");
worldObj.playSoundAtEntity(player, "hbm:item.techBleep", 1.0F, 1.0F);
sat.onClick(world, x, z);
}
}
}
if(link != null && link.getItem() == ModItems.radar_linker) {
BlockPos pos = ItemCoordinateBase.getPosition(link);

View File

@ -4009,6 +4009,7 @@ item.sat_base.name=Satellite Base
item.sat_chip.name=Satellite ID-Chip
item.sat_coord.name=Satellite Designator
item.sat_designator.name=Satellite Laser Designator
item.sat_relay.name=Satellite Radar Relay
item.sat_foeq.name=PEAF - Mk.I FOEQ Duna Probe with experimental Nuclear Propulsion
item.sat_gerald.name=Gerald The Construction Android
item.sat_head_laser.name=Death Ray

Binary file not shown.

After

Width:  |  Height:  |  Size: 486 B