mirror of
https://github.com/GTNewHorizons/Hardcore-Ender-Expansion.git
synced 2026-10-26 14:24:03 +00:00
spotless
This commit is contained in:
1 parent
a19b50c3b4
commit
7b4db462d2
5 files changed
+15
-8
No files matched your search
@@ -37,6 +37,7 @@ public class BlockEnderGoo extends BlockFluidClassic {
|
||||
zOff = new byte[] { 0, 0, 0, 0, -1, 1 };
|
||||
|
||||
public EventHandler handler;
|
||||
|
||||
public BlockEnderGoo() {
|
||||
super(fluid, enderGoo);
|
||||
disableStats();
|
||||
@@ -131,10 +132,12 @@ public class BlockEnderGoo extends BlockFluidClassic {
|
||||
fluid.setIcons(blockIcon);
|
||||
}
|
||||
|
||||
public class EventHandler{
|
||||
public class EventHandler {
|
||||
|
||||
@SubscribeEvent
|
||||
public void onBucketFill(FillBucketEvent e) {
|
||||
if (BlockPosM.tmp(e.target.blockX, e.target.blockY, e.target.blockZ).getBlock(e.world) == BlockEnderGoo.this) {
|
||||
if (BlockPosM.tmp(e.target.blockX, e.target.blockY, e.target.blockZ).getBlock(e.world)
|
||||
== BlockEnderGoo.this) {
|
||||
BlockPosM.tmp(e.target.blockX, e.target.blockY, e.target.blockZ).setAir(e.world);
|
||||
e.result = new ItemStack(ItemList.bucket_ender_goo);
|
||||
e.setResult(Result.ALLOW);
|
||||
|
||||
@@ -497,7 +497,7 @@ public final class BlockList {
|
||||
OreDictionary.registerOre("oreHeeIgneousRock", BlockList.igneous_rock_ore);
|
||||
OreDictionary.registerOre("oreHeeInstabilityOrb", BlockList.instability_orb_ore);
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(((BlockEnderGoo)BlockList.ender_goo).handler);
|
||||
MinecraftForge.EVENT_BUS.register(((BlockEnderGoo) BlockList.ender_goo).handler);
|
||||
}
|
||||
|
||||
public static void registerTileEntities() {
|
||||
|
||||
@@ -364,8 +364,8 @@ public final class ItemList {
|
||||
public static void configureItems() {
|
||||
OreDictionary.registerOre("ingotHeeEndium", ItemList.endium_ingot);
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(((ItemEndermanHead)ItemList.enderman_head).handler);
|
||||
MinecraftForge.EVENT_BUS.register(((ItemScorchingPickaxe)ItemList.scorching_pickaxe).handler);
|
||||
MinecraftForge.EVENT_BUS.register(((ItemEndermanHead) ItemList.enderman_head).handler);
|
||||
MinecraftForge.EVENT_BUS.register(((ItemScorchingPickaxe) ItemList.scorching_pickaxe).handler);
|
||||
GameRegistry.registerFuelHandler((IFuelHandler) ItemList.igneous_rock);
|
||||
|
||||
FluidContainerRegistry.registerFluidContainer(
|
||||
|
||||
@@ -23,7 +23,8 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
public class ItemEndermanHead extends Item {
|
||||
|
||||
public EventHandler handler;
|
||||
public ItemEndermanHead(){
|
||||
|
||||
public ItemEndermanHead() {
|
||||
super();
|
||||
handler = new EventHandler();
|
||||
}
|
||||
@@ -81,6 +82,7 @@ public class ItemEndermanHead extends Item {
|
||||
"hardcoreenderexpansion:textures/armor/enderman_head.png");
|
||||
|
||||
public class EventHandler {
|
||||
|
||||
@SubscribeEvent
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void onArmorModelSet(RenderPlayerEvent.SetArmorModel e) {
|
||||
|
||||
@@ -37,6 +37,7 @@ public class ItemScorchingPickaxe extends Item {
|
||||
private static final List<Block> cachedOres = new ArrayList<>();
|
||||
private static final Random cacheRand = new Random(0);
|
||||
public EventHandler handler;
|
||||
|
||||
public ItemScorchingPickaxe() {
|
||||
super();
|
||||
handler = new EventHandler();
|
||||
@@ -125,6 +126,7 @@ public class ItemScorchingPickaxe extends Item {
|
||||
}
|
||||
|
||||
public class EventHandler {
|
||||
|
||||
@SubscribeEvent(priority = EventPriority.LOWEST)
|
||||
public void onBlockDropItems(HarvestDropsEvent e) {
|
||||
if (e.harvester == null) return;
|
||||
@@ -167,8 +169,8 @@ public class ItemScorchingPickaxe extends Item {
|
||||
e.drops.add(result);
|
||||
} else {
|
||||
int fortune = 0;
|
||||
for (int a = 0; a < 4; a++)
|
||||
fortune += e.block.quantityDropped(e.blockMetadata, 3 + rand.nextInt(3) - rand.nextInt(2), rand);
|
||||
for (int a = 0; a < 4; a++) fortune += e.block
|
||||
.quantityDropped(e.blockMetadata, 3 + rand.nextInt(3) - rand.nextInt(2), rand);
|
||||
for (int a = 0; a < 4; a++) fortune += e.block.quantityDropped(e.blockMetadata, 0, rand);
|
||||
fortune = 1 + MathUtil.floor(
|
||||
(fortune + e.block.getExpDrop(e.world, e.blockMetadata, 0) / 2D)
|
||||
|
||||
Reference in new issue
Block a user