mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
ough
This commit is contained in:
parent
308e559229
commit
2430fec8c6
@ -25,6 +25,8 @@
|
||||
* Chance output stacks no longer do an RNG call to determine if the whole stack is provided or none, rather, each single item of the stack has its own RNG call
|
||||
* Hiperf bedrock ore processing of heavy metals now yields tantalium
|
||||
* Bedrock coltan is no longer a dedicated bedrock ore type
|
||||
* Alt fire is now available for 10ga double barrel shotguns, allowing only a single barrel to be fired at once
|
||||
* The custom mapping function on RoR torches now supports up to 32 characters instead of 15
|
||||
|
||||
## Fixed
|
||||
* Fixed gamebreaking issue causing crashes and world corruption where the multi detonator had its tooltip misspelled
|
||||
|
||||
@ -1009,6 +1009,7 @@ public class ModBlocks {
|
||||
|
||||
public static Block machine_excavator;
|
||||
public static Block machine_ore_slopper;
|
||||
public static Block machine_annihilator;
|
||||
public static Block machine_autosaw;
|
||||
|
||||
public static Block machine_mining_laser;
|
||||
@ -2252,6 +2253,7 @@ public class ModBlocks {
|
||||
machine_autosaw = new MachineAutosaw().setBlockName("machine_autosaw").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_excavator = new MachineExcavator().setBlockName("machine_excavator").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_ore_slopper = new MachineOreSlopper().setBlockName("machine_ore_slopper").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_annihilator = new MachineAnnihilator().setBlockName("machine_annihilator").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_mining_laser = new MachineMiningLaser(Material.iron).setBlockName("machine_mining_laser").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_mining_laser");
|
||||
barricade = new BlockNoDrop(Material.sand).setBlockName("barricade").setHardness(1.0F).setResistance(2.5F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":barricade");
|
||||
machine_assembler = new MachineAssembler(Material.iron).setBlockName("machine_assembler").setHardness(5.0F).setResistance(30.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":machine_assembler");
|
||||
@ -3374,6 +3376,7 @@ public class ModBlocks {
|
||||
register(machine_autosaw);
|
||||
register(machine_excavator);
|
||||
register(machine_ore_slopper);
|
||||
register(machine_annihilator);
|
||||
register(machine_mining_laser);
|
||||
register(barricade);
|
||||
register(machine_turbofan);
|
||||
|
||||
31
src/main/java/com/hbm/blocks/machine/MachineAnnihilator.java
Normal file
31
src/main/java/com/hbm/blocks/machine/MachineAnnihilator.java
Normal file
@ -0,0 +1,31 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineAnnihilator;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class MachineAnnihilator extends BlockDummyable {
|
||||
|
||||
public MachineAnnihilator() {
|
||||
super(Material.iron);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
if(meta >= 12) return new TileEntityMachineAnnihilator();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] {0, 0, 0, 0, 0, 0};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOffset() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -71,7 +71,7 @@ public class GUIScreenRadioTorch extends GuiScreen {
|
||||
this.remap[i].setTextColor(0x00ff00);
|
||||
this.remap[i].setDisabledTextColour(0x00ff00);
|
||||
this.remap[i].setEnableBackgroundDrawing(false);
|
||||
this.remap[i].setMaxStringLength(15);
|
||||
this.remap[i].setMaxStringLength(32);
|
||||
this.remap[i].setText(radio.mapping[i] == null ? "" : radio.mapping[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -11,6 +11,7 @@ import com.hbm.items.weapon.sedna.Crosshair;
|
||||
import com.hbm.items.weapon.sedna.GunConfig;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.items.weapon.sedna.Receiver;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT.GunState;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT.LambdaContext;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT.WeaponQuality;
|
||||
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo;
|
||||
@ -22,6 +23,8 @@ import com.hbm.render.anim.BusAnimation;
|
||||
import com.hbm.render.anim.BusAnimationSequence;
|
||||
import com.hbm.render.anim.BusAnimationKeyframe.IType;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
|
||||
@ -54,7 +57,7 @@ public class XFactory10ga {
|
||||
.mag(new MagazineFullReload(0, 2).addConfigs(g10, g10_shrapnel, g10_du, g10_slug, g10_explosive))
|
||||
.offset(0.75, -0.0625, -0.1875)
|
||||
.setupStandardFire().recoil(LAMBDA_RECOIL_DOUBLE_BARREL))
|
||||
.setupStandardConfiguration()
|
||||
.setupStandardConfiguration().ps(LAMBDA_DOUBLE_SECONDARY)
|
||||
.anim(LAMBDA_DOUBLE_BARREL_ANIMS).orchestra(Orchestras.ORCHESTRA_DOUBLE_BARREL)
|
||||
).setDefaultAmmo(EnumAmmo.G10, 6).setUnlocalizedName("gun_double_barrel");
|
||||
ModItems.gun_double_barrel_sacred_dragon = new ItemGunBaseNT(WeaponQuality.B_SIDE, new GunConfig()
|
||||
@ -64,7 +67,7 @@ public class XFactory10ga {
|
||||
.mag(new MagazineFullReload(0, 2).addConfigs(g10, g10_shrapnel, g10_du, g10_slug, g10_explosive))
|
||||
.offset(0.75, -0.0625, -0.1875)
|
||||
.setupStandardFire().recoil(LAMBDA_RECOIL_DOUBLE_BARREL))
|
||||
.setupStandardConfiguration()
|
||||
.setupStandardConfiguration().ps(LAMBDA_DOUBLE_SECONDARY)
|
||||
.anim(LAMBDA_DOUBLE_BARREL_ANIMS).orchestra(Orchestras.ORCHESTRA_DOUBLE_BARREL)
|
||||
).setDefaultAmmo(EnumAmmo.G10_DU, 6).setUnlocalizedName("gun_double_barrel_sacred_dragon");
|
||||
|
||||
@ -84,6 +87,39 @@ public class XFactory10ga {
|
||||
ItemGunBaseNT.setupRecoil(10, (float) (ctx.getPlayer().getRNG().nextGaussian() * 1.5));
|
||||
};
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_DOUBLE_SECONDARY = (stack, ctx) -> {
|
||||
|
||||
EntityLivingBase entity = ctx.entity;
|
||||
EntityPlayer player = ctx.getPlayer();
|
||||
Receiver rec = ctx.config.getReceivers(stack)[0];
|
||||
int index = ctx.configIndex;
|
||||
GunState state = ItemGunBaseNT.getState(stack, index);
|
||||
|
||||
if(state == GunState.IDLE) {
|
||||
|
||||
if(rec.getCanFire(stack).apply(stack, ctx)) {
|
||||
rec.getOnFire(stack).accept(stack, ctx);
|
||||
|
||||
if(rec.getFireSound(stack) != null)
|
||||
entity.worldObj.playSoundEffect(entity.posX, entity.posY, entity.posZ, rec.getFireSound(stack), rec.getFireVolume(stack), rec.getFirePitch(stack));
|
||||
|
||||
ItemGunBaseNT.setState(stack, index, GunState.COOLDOWN);
|
||||
ItemGunBaseNT.setTimer(stack, index, rec.getDelayAfterFire(stack));
|
||||
} else {
|
||||
|
||||
if(rec.getDoesDryFire(stack)) {
|
||||
ItemGunBaseNT.playAnimation(player, stack, GunAnimation.CYCLE_DRY, index);
|
||||
ItemGunBaseNT.setState(stack, index, rec.getRefireAfterDry(stack) ? GunState.COOLDOWN : GunState.DRAWING);
|
||||
ItemGunBaseNT.setTimer(stack, index, rec.getDelayAfterDryFire(stack));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(state == GunState.RELOADING) {
|
||||
ItemGunBaseNT.setReloadCancel(stack, true);
|
||||
}
|
||||
};
|
||||
|
||||
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_DOUBLE_BARREL_ANIMS = (stack, type) -> {
|
||||
switch(type) {
|
||||
case EQUIP: return new BusAnimation()
|
||||
|
||||
@ -108,6 +108,7 @@ public class TileMappings {
|
||||
put(TileEntityMachineRTG.class, "tileentity_machine_rtg");
|
||||
put(TileEntityMachineExcavator.class, "tileentity_ntm_excavator");
|
||||
put(TileEntityMachineOreSlopper.class, "tileentity_ore_slopper");
|
||||
put(TileEntityMachineAnnihilator.class, "tileentity_annihilator");
|
||||
put(TileEntityMachineDrain.class, "tileentity_fluid_drain");
|
||||
put(TileEntityMachineFluidTank.class, "tileentity_fluid_tank");
|
||||
put(TileEntityMachineTurbofan.class, "tileentity_machine_turbofan");
|
||||
|
||||
@ -0,0 +1,21 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
|
||||
public class TileEntityMachineAnnihilator extends TileEntityMachineBase {
|
||||
|
||||
public TileEntityMachineAnnihilator() {
|
||||
super(8);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "container.annihilator";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
Loading…
x
Reference in New Issue
Block a user