mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
balancing
This commit is contained in:
parent
81ac980529
commit
3415f4949e
@ -1475,8 +1475,8 @@ public class CraftingManager {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.plate_dineutronium, 4), new Object[] { "PIP", "IDI", "PIP", 'P', ModItems.powder_spark_mix, 'I', "ingotDineutronium", 'D', "ingotDesh" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.plate_desh, 4), new Object[] { "PIP", "IDI", "PIP", 'P', ModItems.powder_polymer, 'I', "ingotDesh", 'D', "ingotDuraSteel" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.piston_selenium, 1), new Object[] { "SSS", "STS", " D ", 'S', "plateSteel", 'T', "ingotTungsten", 'D', ModItems.bolt_dura_steel }));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.meteor_remote), new Object[] { "nuggetSchrabidium", ModItems.fragment_meteorite, ModItems.crate_caller }));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.crate_caller), new Object[] { "nuggetSchrabidium", ModItems.crowbar, ModItems.detonator }));
|
||||
//GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.meteor_remote), new Object[] { "nuggetSchrabidium", ModItems.fragment_meteorite, ModItems.crate_caller }));
|
||||
//GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.crate_caller), new Object[] { "nuggetSchrabidium", ModItems.crowbar, ModItems.detonator }));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.catalyst_clay), new Object[] { "dustIron", Items.clay_ball }));
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.singularity_spark, 1), new Object[] { "XAX", "BCB", "XAX", 'X', ModItems.plate_dineutronium, 'A', ModItems.singularity_counter_resonant, 'B', ModItems.singularity_super_heated, 'C', ModItems.black_hole });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.singularity_spark, 1), new Object[] { "XBX", "ACA", "XBX", 'X', ModItems.plate_dineutronium, 'A', ModItems.singularity_counter_resonant, 'B', ModItems.singularity_super_heated, 'C', ModItems.black_hole });
|
||||
|
||||
@ -1,6 +1,10 @@
|
||||
package com.hbm.main;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Base64;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
@ -26,6 +30,7 @@ import cpw.mods.fml.common.gameevent.TickEvent.WorldTickEvent;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.monster.EntityCreeper;
|
||||
import net.minecraft.entity.monster.EntitySkeleton;
|
||||
import net.minecraft.entity.monster.EntityZombie;
|
||||
@ -34,10 +39,12 @@ import net.minecraft.entity.passive.EntityMooshroom;
|
||||
import net.minecraft.entity.passive.EntityVillager;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.tileentity.TileEntitySign;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
@ -46,6 +53,9 @@ import net.minecraftforge.event.entity.EntityEvent.EnteringChunk;
|
||||
import net.minecraftforge.event.entity.living.LivingDeathEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingSpawnEvent;
|
||||
import net.minecraftforge.event.entity.player.PlayerDropsEvent;
|
||||
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
|
||||
import net.minecraftforge.event.entity.player.PlayerInteractEvent.Action;
|
||||
import scala.actors.threadpool.Arrays;
|
||||
|
||||
public class ModEventHandler
|
||||
{
|
||||
@ -374,6 +384,57 @@ public class ModEventHandler
|
||||
}
|
||||
}
|
||||
|
||||
String[] hashes = new String[] {
|
||||
"da07ea0f3b13c2b3357511a7cb6121a7beaab120d0b9d745bb3637a1ff0e4d07",
|
||||
"1aed2593fe54480eb240d110444131469757429dc7f9dd9ce5768aa4ae8c99c7",
|
||||
"7bc4ada27654650ebc4a499d7ebd66f6f9fbb0d93b9091aadbe3afd155cc3547",
|
||||
"3eec01bdbdfb1b9cb6eb66956f2049eac6e257a24e1e84b90da1ee3337c80385"
|
||||
|
||||
};
|
||||
|
||||
@SubscribeEvent
|
||||
public void onClickSign(PlayerInteractEvent event) {
|
||||
|
||||
int x = event.x;
|
||||
int y = event.y;
|
||||
int z = event.z;
|
||||
World world = event.world;
|
||||
|
||||
if(!world.isRemote && event.action == Action.RIGHT_CLICK_BLOCK && world.getBlock(x, y, z) == Blocks.standing_sign) {
|
||||
|
||||
TileEntitySign sign = (TileEntitySign)world.getTileEntity(x, y, z);
|
||||
|
||||
for(int i = 0; i < 4; i++) {
|
||||
if(!hashes[i].equals(getHash(sign.signText[i]))) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
world.func_147480_a(x, y, z, false);
|
||||
EntityItem entityitem = new EntityItem(world, x, y, z, new ItemStack(ModItems.bobmazon_hidden));
|
||||
entityitem.delayBeforeCanPickup = 10;
|
||||
world.spawnEntityInWorld(entityitem);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private String getHash(String inp) {
|
||||
|
||||
try {
|
||||
MessageDigest sha256 = MessageDigest.getInstance("SHA-256");
|
||||
byte[] bytes = sha256.digest(inp.getBytes());
|
||||
String str = "";
|
||||
|
||||
for(int b : bytes)
|
||||
str = str + Integer.toString((b & 0xFF) + 256, 16).substring(1);
|
||||
|
||||
return str;
|
||||
|
||||
} catch (NoSuchAlgorithmException e) { }
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
/*@SubscribeEvent
|
||||
public void itemCollected(PlayerEvent.ItemPickupEvent e) {
|
||||
if(e.pickedUp.getEntityItem().equals(ModItems.nothing)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user