cheese, RBMK guide book

This commit is contained in:
Bob 2021-05-16 15:19:32 +02:00
parent df55b5e5f6
commit e7148fe317
16 changed files with 2986 additions and 21 deletions

View File

@ -3,13 +3,17 @@ package com.hbm.blocks.machine.rbmk;
import com.hbm.blocks.BlockDummyable;
import com.hbm.blocks.ModBlocks;
import com.hbm.handler.MultiblockHandlerXR;
import com.hbm.items.ModItems;
import com.hbm.items.tool.ItemGuideBook.BookType;
import com.hbm.main.MainRegistry;
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKConsole;
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
@ -60,6 +64,30 @@ public class RBMKConsole extends BlockDummyable {
TileEntityRBMKConsole entity = (TileEntityRBMKConsole) world.getTileEntity(pos[0], pos[1], pos[2]);
if(entity != null) {
if(side == 1) {
Vec3 vec = Vec3.createVectorHelper(1.375D, 0, 0.75D);
switch(entity.getBlockMetadata() - this.offset) {
case 2: vec.rotateAroundY((float)Math.toRadians(90)); break;
case 3: vec.rotateAroundY((float)Math.toRadians(270)); break;
case 4: vec.rotateAroundY((float)Math.toRadians(180)); break;
case 5: vec.rotateAroundY((float)Math.toRadians(0)); break;
}
float hX = x + hitX;
float hZ = z + hitZ;
double rX = entity.xCoord + 0.5D + vec.xCoord;
double rZ = entity.zCoord + 0.5D + vec.zCoord;
double size = 0.1875D;
if(Math.abs(hX - rX) < size && Math.abs(hZ - rZ) < size && !player.inventory.hasItemStack(new ItemStack(ModItems.book_guide, 1, BookType.RBMK.ordinal()))) {
player.inventory.addItemStackToInventory(new ItemStack(ModItems.book_guide, 1, BookType.RBMK.ordinal()));
player.inventoryContainer.detectAndSendChanges();
return true;
}
}
FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_rbmk_console, world, pos[0], pos[1], pos[2]);
}
return true;

View File

@ -63,7 +63,10 @@ public class EntityQuackos extends EntityDuck implements IBossDisplayData {
/**
* BOW
*/
public void setDead() { } //prank'd
public void setDead() {
if(worldObj.isRemote)
super.setDead();
} //prank'd
/**
* BOW

View File

@ -3,6 +3,7 @@ package com.hbm.inventory.gui;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang3.math.NumberUtils;
import org.lwjgl.opengl.GL11;
import com.hbm.items.tool.ItemGuideBook.BookType;
@ -45,12 +46,14 @@ public class GUIScreenGuide extends GuiScreen {
this.ySize = 182;
}
@Override
public void initGui() {
super.initGui();
this.guiLeft = (this.width - this.xSize) / 2;
this.guiTop = (this.height - this.ySize) / 2;
}
@Override
public void drawScreen(int mouseX, int mouseY, float f) {
this.drawDefaultBackground();
this.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
@ -158,10 +161,12 @@ public class GUIScreenGuide extends GuiScreen {
}
}
float titleScale = getOverrideScale(page.titleScale, page.title + ".scale");
GL11.glPushMatrix();
GL11.glScalef(1F/scale, 1F/scale, 1F);
float topOffset = page.title == null ? 0 : 6 / page.titleScale;
float topOffset = page.title == null ? 0 : 6 / titleScale;
for(int l = 0; l < lines.size(); l++) {
this.fontRendererObj.drawString(lines.get(l), (int)((guiLeft + 20 + i * sideOffset) * scale), (int)((guiTop + 30 + topOffset) * scale + (12 * l)), 4210752);
@ -171,7 +176,7 @@ public class GUIScreenGuide extends GuiScreen {
if(page.title != null) {
float tScale = page.titleScale;
float tScale = titleScale;
String titleLoc = I18nUtil.resolveKey(page.title);
GL11.glPushMatrix();
@ -198,7 +203,19 @@ public class GUIScreenGuide extends GuiScreen {
}
}
}
private float getOverrideScale(float def, String tag) {
String scale = I18nUtil.resolveKey(tag);
if(NumberUtils.isNumber(scale)) {
return 1F / NumberUtils.toFloat(scale);
}
return def;
}
@Override
protected void mouseClicked(int i, int j, int k) {
if(page < 0) {
@ -220,4 +237,11 @@ public class GUIScreenGuide extends GuiScreen {
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
}
}
@Override
protected void keyTyped(char p_73869_1_, int p_73869_2_) {
if(p_73869_2_ == 1 || p_73869_2_ == Minecraft.getMinecraft().gameSettings.keyBindInventory.getKeyCode()) {
Minecraft.getMinecraft().thePlayer.closeScreen();
}
}
}

View File

@ -1566,6 +1566,7 @@ public class ModItems {
public static Item nugget;
public static Item peas;
public static Item marshmallow;
public static Item cheese;
public static Item med_ipecac;
public static Item med_ptsd;
@ -3845,6 +3846,7 @@ public class ModItems {
nugget = new ItemLemon(200, 200, false).setUnlocalizedName("nugget").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":nugget");
peas = new ItemPeas().setUnlocalizedName("peas").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":peas");
marshmallow = new Item().setUnlocalizedName("marshmallow").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":marshmallow");
cheese = new ItemLemon(5, 10, false).setUnlocalizedName("cheese").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":cheese");
defuser = new Item().setUnlocalizedName("defuser").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":defuser");
reacher = new Item().setUnlocalizedName("reacher").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":reacher");
@ -4736,7 +4738,7 @@ public class ModItems {
record_vc = new ItemModRecord("vc").setUnlocalizedName("record_vc").setCreativeTab(CreativeTabs.tabMisc).setTextureName(RefStrings.MODID + ":record_vc");
record_glass = new ItemModRecord("glass").setUnlocalizedName("record_glass").setCreativeTab(null).setTextureName(RefStrings.MODID + ":record_glass");
book_guide = new ItemGuideBook().setUnlocalizedName("book_guide").setCreativeTab(null).setTextureName(RefStrings.MODID + ":book_guide");
book_guide = new ItemGuideBook().setUnlocalizedName("book_guide").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":book_guide");
polaroid = new ItemPolaroid().setUnlocalizedName("polaroid").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":polaroid_" + MainRegistry.polaroidID);
glitch = new ItemGlitch().setUnlocalizedName("glitch").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":glitch_" + MainRegistry.polaroidID);
@ -6663,6 +6665,7 @@ public class ModItems {
GameRegistry.registerItem(nugget, nugget.getUnlocalizedName());
GameRegistry.registerItem(peas, peas.getUnlocalizedName());
GameRegistry.registerItem(marshmallow, marshmallow.getUnlocalizedName());
GameRegistry.registerItem(cheese, cheese.getUnlocalizedName());
GameRegistry.registerItem(med_ipecac, med_ipecac.getUnlocalizedName());
GameRegistry.registerItem(med_ptsd, med_ptsd.getUnlocalizedName());
GameRegistry.registerItem(canteen_13, canteen_13.getUnlocalizedName());

View File

@ -4,6 +4,7 @@ import java.util.List;
import java.util.Random;
import com.hbm.config.VersatileConfig;
import com.hbm.explosion.ExplosionLarge;
import com.hbm.handler.ArmorModHandler;
import com.hbm.handler.FluidTypeHandler.FluidType;
import com.hbm.interfaces.IPartiallyFillable;
@ -15,6 +16,7 @@ import com.hbm.potion.HbmPotion;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.passive.EntityCow;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
@ -400,17 +402,24 @@ public class ItemSyringe extends Item {
if(this == ModItems.syringe_awesome && !VersatileConfig.hasPotionSickness(entity)) {
if(!world.isRemote) {
entity.addPotionEffect(new PotionEffect(Potion.regeneration.id, 50 * 20, 9));
entity.addPotionEffect(new PotionEffect(Potion.resistance.id, 50 * 20, 9));
entity.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 50 * 20, 0));
entity.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50 * 20, 24));
entity.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 50 * 20, 9));
entity.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 50 * 20, 6));
entity.addPotionEffect(new PotionEffect(Potion.jump.id, 50 * 20, 9));
entity.addPotionEffect(new PotionEffect(Potion.field_76434_w.id, 50 * 20, 9));
entity.addPotionEffect(new PotionEffect(Potion.field_76444_x.id, 50 * 20, 4));
entity.addPotionEffect(new PotionEffect(Potion.confusion.id, 5 * 20, 4));
VersatileConfig.applyPotionSickness(entity, 50);
if(entity instanceof EntityCow) {
entity.addPotionEffect(new PotionEffect(HbmPotion.bang.id, 40, 0));
} else {
entity.addPotionEffect(new PotionEffect(Potion.regeneration.id, 50 * 20, 9));
entity.addPotionEffect(new PotionEffect(Potion.resistance.id, 50 * 20, 9));
entity.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 50 * 20, 0));
entity.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50 * 20, 24));
entity.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 50 * 20, 9));
entity.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 50 * 20, 6));
entity.addPotionEffect(new PotionEffect(Potion.jump.id, 50 * 20, 9));
entity.addPotionEffect(new PotionEffect(Potion.field_76434_w.id, 50 * 20, 9));
entity.addPotionEffect(new PotionEffect(Potion.field_76444_x.id, 50 * 20, 4));
entity.addPotionEffect(new PotionEffect(Potion.confusion.id, 5 * 20, 4));
VersatileConfig.applyPotionSickness(entity, 50);
}
stack.stackSize--;
world.playSoundAtEntity(entity, "hbm:item.syringe", 1.0F, 1.0F);

View File

@ -4,7 +4,6 @@ import java.util.ArrayList;
import java.util.List;
import com.hbm.items.ModItems;
import com.hbm.items.tool.ItemGuideBook.BookType;
import com.hbm.lib.RefStrings;
import com.hbm.main.MainRegistry;
import com.hbm.util.I18nUtil;
@ -37,7 +36,7 @@ public class ItemGuideBook extends Item {
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tab, List list) {
for(int i = 0; i < BookType.values().length; i++)
for(int i = 1; i < BookType.values().length; i++)
list.add(new ItemStack(item, 1, i));
}
@ -82,7 +81,7 @@ public class ItemGuideBook extends Item {
public static List<GuidePage> statFacRBMK() {
List<GuidePage> pages = new ArrayList();
pages.add(new GuidePage("book.rbmk.page1").setScale(2).addTitle("book.rbmk.title1", 0x800000, 1F)
pages.add(new GuidePage("book.rbmk.page1").setScale(2F).addTitle("book.rbmk.title1", 0x800000, 1F)
.addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/rbmk1.png"), 90, 80, 60));
pages.add(new GuidePage("book.rbmk.page2").setScale(2F).addTitle("book.rbmk.title2", 0x800000, 1F)
.addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/rbmk2.png"), 95, 52, 52));
@ -104,6 +103,15 @@ public class ItemGuideBook extends Item {
.addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/rbmk10.png"), 95, 88, 52));
pages.add(new GuidePage("book.rbmk.page11").setScale(2F).addTitle("book.rbmk.title11", 0x800000, 1F)
.addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/rbmk11.png"), 75, 85, 72));
pages.add(new GuidePage("book.rbmk.page12").setScale(2F).addTitle("book.rbmk.title12", 0x800000, 1F)
.addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/rbmk12.png"), 90, 80, 60));
pages.add(new GuidePage("book.rbmk.page13").setScale(2F).addTitle("book.rbmk.title13", 0x800000, 1F));
pages.add(new GuidePage("book.rbmk.page14").setScale(2F)
.addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/rbmk13.png"), 70, 103, 78));
pages.add(new GuidePage("book.rbmk.page15").setScale(2F).addTitle("book.rbmk.title15", 0x800000, 1F)
.addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/rbmk15.png"), 100, 48, 48));
pages.add(new GuidePage("book.rbmk.page16").setScale(2F).addTitle("book.rbmk.title16", 0x800000, 1F)
.addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/rbmk16.png"), 50, 70, 100));
return pages;
}

View File

@ -10,6 +10,7 @@ import com.hbm.entity.mob.EntityTaintCrab;
import com.hbm.entity.mob.EntityTaintedCreeper;
import com.hbm.explosion.ExplosionLarge;
import com.hbm.extprop.HbmLivingProps;
import com.hbm.items.ModItems;
import com.hbm.lib.ModDamageSource;
import com.hbm.util.ContaminationUtil;
import com.hbm.util.ContaminationUtil.ContaminationType;
@ -20,7 +21,9 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.passive.EntityCow;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.util.ResourceLocation;
@ -132,6 +135,12 @@ public class HbmPotion extends Potion {
entity.worldObj.playSoundEffect(entity.posX, entity.posY, entity.posZ, "hbm:weapon.laserBang", 100.0F, 1.0F);
ExplosionLarge.spawnParticles(entity.worldObj, entity.posX, entity.posY, entity.posZ, 10);
if(entity instanceof EntityCow) {
EntityCow cow = (EntityCow) entity;
int toDrop = cow.isChild() ? 10 : 3;
cow.entityDropItem(new ItemStack(ModItems.cheese, toDrop), 1.0F);
}
}
if(this == lead) {

View File

@ -1,7 +1,21 @@
package com.hbm.tileentity.machine;
import net.minecraft.tileentity.TileEntity;
import com.hbm.tileentity.TileEntityMachineBase;
public class TileEntityDeaerator extends TileEntity {
public class TileEntityDeaerator extends TileEntityMachineBase {
public TileEntityDeaerator() {
super(0);
}
@Override
public String getName() {
return "container.deaerator";
}
@Override
public void updateEntity() {
}
}

View File

@ -733,6 +733,7 @@ item.bolt_dura_steel.name=Schnellarbeitsstahlbolzen
item.bolt_tungsten.name=Wolframbolzen
item.bomb_caller.name=Luftschlag Zielmarker
item.bomb_waffle.name=Massenvernichtungswaffel
item.guide_book.name=Handbuch
item.book_of_.name=Das Buch der Güterwagons
item.book_secret.name=3-596-50802-9
item.bottle2_empty.name=Leere Glasflasche
@ -855,6 +856,7 @@ item.centri_stick.name=Zentrifuge am Spieß
item.centrifuge_element.name=Zentrifugenelement
item.centrifuge_tower.name=Zentrifugenturm
item.chainsaw.name=Kettensäge
item.cheese.name=Käse
item.chemistry_template.name=Chemievorlage:
item.chernobylsign.name=Tschernobyl-Warnschild-Streitaxt
item.chlorine_pinwheel.name=Chlorgas-Konverter

View File

@ -118,6 +118,15 @@ book.rbmk.title10=Graphite Moderator
book.rbmk.page10=The §lgraphite moderator§r will convert fast neutrons passing through it into slow neutrons. Most fuels fission into fast neutrons while needing slow neutrons to split, so using moderators is strongly recommended.
book.rbmk.title11=Structural Column
book.rbmk.page11=The §lstructural column§r will not interfere with neutrons, nor does it have special uses. It is recommended to fill the reactor with structural columns where no other parts will be, because structural columns are capable of transporting heat.
book.rbmk.title12=Console
book.rbmk.page12=The §lRBMK console§r lets you control the reactor from afar. Using the §lRBMK§r §lconsole linking device§r on an RBMK part and then the console will link the reactor to the console. The console can only manage 15x15 parts, for larger reactors you might want to use multiple consoles.
book.rbmk.title13=Console Usage
book.rbmk.page13=Clicking on the parts will select and deselect them. Using the colored buttons, you can quickly select all control rods of that color group. Button 'A' will select all control rods, 'X' will deselect all.
book.rbmk.page14=Entering a number 0-100 in the green box and then hitting the button next to it will set all selected control rods to this position. Button 'AZ-5' will cause all control rods to fully insert.
book.rbmk.title15=Fuel
book.rbmk.page15=The §lfuel§r's reactivity is based on multiple factors. The main ones are the §lenrichment§r, §lxenon poison§r and the amount of incoming §lneutrons§r. Xenon builds up when the fuel receives few neutrons and burns away during normal operation. The effectivity of neutrons depends on the type, most fuels §lsplit best with slow neutrons§r.
book.rbmk.title16=Meltdown
book.rbmk.page16=§4§lAvoid.
chem.ASPHALT=Asphalt Production
chem.BALEFIRE=BF Rocket Fuel Mixing
@ -757,6 +766,7 @@ item.bolt_dura_steel.name=High-Speed Steel Bolt
item.bolt_tungsten.name=Tungsten Bolt
item.bomb_caller.name=Airstrike Designator
item.bomb_waffle.name=Waffle of Mass Destruction
item.book_guide.name=Guide Book
item.book_of_.name=The Book of Boxcars
item.book_secret.name=3-596-50802-9
item.bottle2_empty.name=Empty Bottle
@ -879,6 +889,7 @@ item.centri_stick.name=Centrifuge on a Stick
item.centrifuge_element.name=Centrifuge Element
item.centrifuge_tower.name=Centrifuge Tower
item.chainsaw.name=Chainsaw
item.cheese.name=Cheese
item.chemistry_template.name=Chemistry Template:
item.chernobylsign.name=Chernobyl Warning Sign Battle Axe
item.chlorine_pinwheel.name=Chlorine Pinwheel
@ -891,7 +902,7 @@ item.chopper_head.name=Hunter Chopper Cockpit
item.chopper_tail.name=Hunter Chopper Tail
item.chopper_torso.name=Hunter Chopper Body
item.chopper_wing.name=Hunter Chopper Wing
item.cinnebar.name=Cinnebar
item.cinnebar.name=Cinnibar
item.circuit_aluminium.name=Basic Circuit
item.circuit_copper.name=Enhanced Circuit
item.circuit_gold.name=Overclocked Circuit

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 505 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 351 B