mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-02-24 15:00:48 +00:00
Merge branch 'HbmMods:master' into bob
This commit is contained in:
commit
b4a7d5a197
16
.editorconfig
Normal file
16
.editorconfig
Normal file
@ -0,0 +1,16 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = crlf
|
||||
indent_style = tab
|
||||
indent_size = tab
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
max_line_length = off
|
||||
|
||||
[{*.info,*.json,*.mcmeta,*.md,*.cfg,*.yml,*.toml}]
|
||||
tab_width = 2
|
||||
|
||||
[{*.info,*.mcmeta,*.cfg}]
|
||||
end_of_line = lf
|
||||
33
.gitignore
vendored
33
.gitignore
vendored
@ -1,25 +1,28 @@
|
||||
# eclipse
|
||||
eclipse
|
||||
bin
|
||||
*.launch
|
||||
.settings
|
||||
.metadata
|
||||
.classpath
|
||||
.project
|
||||
/eclipse
|
||||
/bin
|
||||
/*.launch
|
||||
/.settings
|
||||
/.metadata
|
||||
/.classpath
|
||||
/.project
|
||||
|
||||
# idea
|
||||
out
|
||||
*.ipr
|
||||
*.iws
|
||||
*.iml
|
||||
.idea
|
||||
/out
|
||||
/*.ipr
|
||||
/*.iws
|
||||
/*.iml
|
||||
/.idea
|
||||
|
||||
# gradle
|
||||
build
|
||||
.gradle
|
||||
/build
|
||||
/.gradle
|
||||
|
||||
# vscode
|
||||
/.vscode
|
||||
|
||||
# other
|
||||
run
|
||||
/run
|
||||
|
||||
# CurseForge configuration
|
||||
/curseforge.properties
|
||||
|
||||
@ -30,11 +30,9 @@ This ties together with the previous point - there's no guarantees that your PR
|
||||
|
||||
## I want to help but don't know where to start
|
||||
|
||||
If you want to help the project, consider getting involved with the [wiki](ntm.fandom.com) first. Writing an article is the easiest and quickest way of helping, and requires no programming knowledge. If you do know Java and want to help, consider these places first:
|
||||
If you want to help the project, consider getting involved with the [wiki](https://nucleartech.wiki/) first. Writing an article is the easiest and quickest way of helping, and requires no programming knowledge. If you do know Java and want to help, consider these places first:
|
||||
|
||||
* Localization, i.e. translations in different language are always accepted.
|
||||
* `IConfigurableMachine`, an interface that allows machines to be added to the `hbmMachines.json` config, is still not used by many machines.
|
||||
* F1 Presentations, also known as "Stare" or "Jar Presentations", is a neat system of creating a short movie explaining functionality. All the relevant code can be found in `com.hbm.wiaj`.
|
||||
* Some guns still use the old "bow-style" systems and not `ItemGunBase`.
|
||||
* Many guns don't have any animations whatsoever, just adding a minor recoil would already improve them by a lot.
|
||||
* Adding tooltips to more machines, explaining some of the basics.
|
||||
|
||||
10
README.md
10
README.md
@ -6,6 +6,8 @@
|
||||
|
||||
[Official NTM Wiki](https://nucleartech.wiki/wiki/Main_Page)
|
||||
|
||||
[Bobcat's Blog (the blag)](https://hbmmods.github.io/), you can find lengthy yapping, upcoming features and some secrets here.
|
||||
|
||||
**This is for 1.7.10!** For 1.12, check out these projects:
|
||||
|
||||
* NTM Reloaded: https://github.com/TheOriginalGolem/Hbm-s-Nuclear-Tech-GIT/releases
|
||||
@ -93,12 +95,18 @@ If you want to make some changes to the mod, follow this guide:
|
||||
* Click **Add Standard VM**; in the JRE home, navigate to the directory where the JDK is installed, then click finish and select it.
|
||||
10. Code!
|
||||
|
||||
## Contributing animations
|
||||
Weapon animations in NTM are stored in JSON files, which are used alongside OBJ models to produce high quality animations with reasonable filesizes. Import/Export Blender addons are available for versions 2.79, 3.2, and 4.0 in `tools`, and they should function reasonably well in newer versions as well. See the comments in the header of the export scripts for usage instructions.
|
||||
|
||||
## Compatibility notice
|
||||
NTM has certain behaviors intended to fix vanilla code or to increase compatibility in certain cases where it otherwise would not be possible. These behaviors have the potential of not playing well with other mods, and while no such cases are currently known, here's a list of them.
|
||||
|
||||
### Thermos
|
||||
Thermos servers (along with its forks such as Crucible) have a "performance" feature that causes all tile entity ticking to slow down if there's no player present in the same chunk. For obvious reasons, this will heavily impact machines and cause phantom issues that, not having knowledge of this "performance" feature, are near impossible to diagnose. By default, NTM will crash on servers running the Thermos base code and print a lengthy message informing server owners about this "performance" feature as well as how to fix the issues it causes. The error message is printed in plain English on the top of the crash log, failure to read (as well as understand) it will leave the server inoperable.
|
||||
|
||||
### Shaders
|
||||
Shaders (loaded by either Optifine, Iris or otherwise) will in all likelihood break when a gun is held. This is because guns need to skip vanilla's first person item setup for the rendering, however shaders apparently use the setup step for setting certain GL states, and skipping that will break rendering. [Shader Fixer](https://modrinth.com/mod/shader-fixer) is a mod with various fixes, among which is explicit compatibility for NTM's guns.
|
||||
|
||||
### Optifine
|
||||
One of the most common "performance" mods on 1.7.10, Optifine, achieves an increase in performance by breaking small things in spots that are usually hard to notice, although this can cause severe issues with NTM. A short list of problems, along with some solutions, follows:
|
||||
* Get rid of Optifine and use one of the many [other, less intrusive performance mods](https://gist.github.com/makamys/7cb74cd71d93a4332d2891db2624e17c).
|
||||
@ -108,7 +116,7 @@ One of the most common "performance" mods on 1.7.10, Optifine, achieves an incre
|
||||
### Angelica
|
||||
In older versions, Angelica caused issues regarding model rendering, often times making 3D models transparent. Ever since the switch to VBOs, models work fine. Another issue was blocks with connected textures not rendering at all, but this too was fixed, meaning as of time of writing there are no major incompatibilities known with Angelica. However there a few minor issues that persist, but those can be fixed:
|
||||
* Often times when making a new world, all items appear as white squares. Somehow, scrolling though the NEI pages fixes this permanently
|
||||
* Reeds will render weirdly, this is an incompatibility with the "Compact Vertex Format" feature. Disabling it will make reeds look normal
|
||||
* Reeds will render weirdly, this is an incompatibility with the "Compact Vertex Format" feature. Disabling it will make reeds look normal. Alternatively, reed rendering can be disabled by using `/ntmclient set RENDER_REEDS false`, which works around the issue by not rendering the underwater portion of reeds at all.
|
||||
|
||||
### Skybox chainloader
|
||||
NTM adds a few small things to the skybox using a custom skybox renderer. Minecraft can only have a single skybox renderer loaded, so setting the skybox to the NTM custom one would break compatibility with other mods' skyboxes. To mend this, NTM employs a **chainloader**. This chainloader will detect if a different skybox is loaded, save a reference to that skybox and then use NTM's skybox, which when used will also make sure to run the previous modded skybox renderer. In the event that NTM's skybox were to cause trouble, it can be disabled with the config option `1.31_enableSkyboxes`.
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
## Changed
|
||||
* Changed the multi fluid ID recipe, they now use analog circuits instead of silicon based ones, no longer requiring plastic to make
|
||||
* Blast doors will now pulverize any block that gets in their way during closing
|
||||
* The nuclear and RTG furnaces will be retired, their recipes have been removed but they remain operational for now
|
||||
|
||||
## Fixed
|
||||
* Fixed pumpjack gauges not syncing properly
|
||||
* Fixed some concrete variants not being revertable into uncolored concrete
|
||||
* Fixed the CCGT's steam output breaking as soon as the steam buffer runs full
|
||||
* Fixed crash caused by mobs holding belt-fed guns
|
||||
* Fixed boiler heat input being way too low due to operation order (diffusion was applied AFTER the input heat was capped)
|
||||
@ -1,6 +1,6 @@
|
||||
mod_version=1.0.27
|
||||
# Empty build number makes a release type
|
||||
mod_build_number=5061
|
||||
mod_build_number=5224
|
||||
|
||||
credits=HbMinecraft,\
|
||||
\ rodolphito (explosion algorithms),\
|
||||
@ -11,15 +11,25 @@ credits=HbMinecraft,\
|
||||
\ Alcater (GUI textures, porting),\
|
||||
\ MellowArpeggiation (new animation system, turbine sounds, sound fixes, industrial lights, better particle diodes),\
|
||||
\ Pheo (textures, various machines, models, weapons),\
|
||||
\ Vær (gas centrifuges, better worldgen, ZIRNOX, CP-1 parts, starter guide, new cyclotron),\
|
||||
\ Vær (gas centrifuges, better worldgen, ZIRNOX, CP-1 parts, starter guide, new cyclotron, weapon animations),\
|
||||
\ LePeep (coilgun model, BDCL QC),\
|
||||
\ Adam29 (liquid petroleum, ethanol, electric furnace),\
|
||||
\ Pvndols (thorium fuel recipe, gas turbine),\
|
||||
\ JamesH2 (blood mechanics, nitric acid, particle emitter),\
|
||||
\ PastaBaguette (coal horse decal),\
|
||||
\ Doctor17 (russian localization)),\
|
||||
\ Pashtet (russian localization),\
|
||||
\ Bismarck (chinese localization),\
|
||||
\ Creeper-banner (chinese localization),\
|
||||
\ 5467864 (chinese localization),\
|
||||
\ eeeeee0a (chinese localization),\
|
||||
\ hz0909adc (chinese localization),\
|
||||
\ LSKLW (chinese localization),\
|
||||
\ R-Kaenbyou (chinese localization),\
|
||||
\ scp-000000000 (chinese localization),\
|
||||
\ UnnameTokiko (chinese localization),\
|
||||
\ Herobrine 457985 (chinese localization),\
|
||||
\ xxwinhere (chinese localization),\
|
||||
\ Maksymisio (polish localization)\
|
||||
\ el3ctro4ndre (italian localization),\
|
||||
\ Pu-238 (Tom impact effects),\
|
||||
@ -39,6 +49,7 @@ credits=HbMinecraft,\
|
||||
\ Voxelstice (OpenComputers integration, turbine spinup),\
|
||||
\ BallOfEnergy1 (OpenComputers integration),\
|
||||
\ sdddddf80 (recipe configs, chinese localization, custom machine holograms),\
|
||||
\ Abel1502 (optimization, crate upgrade recipes, strand caster improvements, varous tweaks),\
|
||||
\ SuperCraftAlex (tooltips)\
|
||||
\ Ice-Arrow (research reactor tweaks),\
|
||||
\ 245tt (anvil GUI improvements),\
|
||||
|
||||
Binary file not shown.
@ -1,7 +1,7 @@
|
||||
package api.hbm.energymk2;
|
||||
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
||||
import com.hbm.util.Compat;
|
||||
|
||||
import api.hbm.energymk2.Nodespace.PowerNode;
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
package api.hbm.energymk2;
|
||||
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
import com.hbm.interfaces.NotableComments;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
||||
import com.hbm.util.Compat;
|
||||
|
||||
import api.hbm.energymk2.Nodespace.PowerNode;
|
||||
@ -12,6 +13,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
/** If it receives energy, use this */
|
||||
@NotableComments
|
||||
public interface IEnergyReceiverMK2 extends IEnergyHandlerMK2 {
|
||||
|
||||
public default long transferPower(long power) {
|
||||
|
||||
@ -5,6 +5,7 @@ import java.util.HashSet;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
import com.hbm.interfaces.NotableComments;
|
||||
import com.hbm.util.fauxpointtwelve.BlockPos;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
@ -148,6 +149,7 @@ public class Nodespace {
|
||||
}
|
||||
}
|
||||
|
||||
@NotableComments
|
||||
public static class PowerNode {
|
||||
|
||||
public BlockPos[] positions;
|
||||
|
||||
16
src/main/java/api/hbm/entity/IResistanceProvider.java
Normal file
16
src/main/java/api/hbm/entity/IResistanceProvider.java
Normal file
@ -0,0 +1,16 @@
|
||||
package api.hbm.entity;
|
||||
|
||||
import net.minecraft.util.DamageSource;
|
||||
|
||||
/**
|
||||
* Allows custom entities to specify threshold and resistance values based on incoming damage, type and piercing values, along with whatever other internal stats
|
||||
* the entity has (like glyphid armor). Obviously only works for our own custom entities implementing this, everything else will have to work with the less powerful
|
||||
* (but still very useful) entity stats in the DamageResistanceHandler.
|
||||
*
|
||||
* @author hbm
|
||||
*/
|
||||
public interface IResistanceProvider {
|
||||
|
||||
public float[] getCurrentDTDR(DamageSource damage, float amount, float pierceDT, float pierce);
|
||||
public void onDamageDealt(DamageSource damage, float amount);
|
||||
}
|
||||
@ -1,8 +1,8 @@
|
||||
package api.hbm.fluid;
|
||||
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
||||
import com.hbm.util.Compat;
|
||||
|
||||
import api.hbm.tile.ILoadedTile;
|
||||
|
||||
@ -2,8 +2,8 @@ package api.hbm.fluid;
|
||||
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
||||
import com.hbm.util.Compat;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
|
||||
@ -1,12 +1,9 @@
|
||||
package api.hbm.fluid;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
|
||||
@ -138,6 +135,7 @@ public class PipeNet implements IPipeNet {
|
||||
tile.getWorldObj().markTileEntityChunkModified(tile.xCoord, tile.yCoord, tile.zCoord, tile);
|
||||
}
|
||||
|
||||
/* debug code
|
||||
if(trackingInstances != null) {
|
||||
for(int j = 0; j < trackingInstances.size(); j++) {
|
||||
PipeNet net = trackingInstances.get(j);
|
||||
@ -146,6 +144,7 @@ public class PipeNet implements IPipeNet {
|
||||
log(net, sdf.format(new Date(System.currentTimeMillis())) + " Sending " + given + "mB to " + conToString(con));
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,17 +0,0 @@
|
||||
package api.hbm.item;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IButtonReceiver {
|
||||
|
||||
/**
|
||||
* Called in ModEventHandlerClient for any keyboard input related to this item
|
||||
* @param stack
|
||||
* @param player
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void handleKeyboardInput(ItemStack stack, EntityPlayer player);
|
||||
}
|
||||
@ -1,20 +0,0 @@
|
||||
package api.hbm.item;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IClickReceiver {
|
||||
|
||||
/**
|
||||
* Called in ModEventHandlerClient for any mouse input related to this item
|
||||
* @param stack
|
||||
* @param player
|
||||
* @param button
|
||||
* @param state
|
||||
* @return true if the event should be canceled
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean handleMouseInput(ItemStack stack, EntityPlayer player, int button, boolean state);
|
||||
}
|
||||
@ -8,6 +8,7 @@ public interface IRORInteractive extends IRORInfo {
|
||||
public static String EX_NULL = "Exception: Null Command";
|
||||
public static String EX_NAME = "Exception: Multiple Name Separators";
|
||||
|
||||
/** Runs a function on the ROR component, usually causing the component to change or do something. Returns are optional. */
|
||||
public Object runRORFunction(String name, String[] params);
|
||||
|
||||
/** Extracts the command name from a full command string */
|
||||
|
||||
@ -2,5 +2,6 @@ package api.hbm.redstoneoverradio;
|
||||
|
||||
public interface IRORValueProvider extends IRORInfo {
|
||||
|
||||
/** Grabs the specified value from this ROR component, operations should not cause any changes with the component itself */
|
||||
public Object provideRORValue(String name);
|
||||
}
|
||||
|
||||
@ -6,17 +6,41 @@ package api.hbm.redstoneoverradio;
|
||||
|
||||
/*
|
||||
|
||||
__ __ __ _______ ________ __ __ __ __ ______ __
|
||||
/_/| /_/\ /_/| /______/\ /_______/| /_/| /_/| /_/|_____ /_/| /_____/| /_/|
|
||||
| || | \\ | || | ___ \\ | ______|/ | ||| || | |/_____| || |___ || | ||
|
||||
| || | \ \\ | || | | \ \\ | ||___ | |/| |/ | ______ || /__| || | ||__
|
||||
| || | |\ \\| || | | \ || | |/__/| \ // | |/_____| || | ___|/ | |/_/|
|
||||
| || | ||\ \| || | | | || | ____|/ > </\ |____ ____|/_ | |/__/| | __|/
|
||||
| || | || \ | || | | / || | ||_____ / _ \/| /_____| |______/| |______|/ | ||
|
||||
| || | || \ || | |___/ // | |/____/| | / \ || |________________|/ | ||
|
||||
|__|/ |__|/ \__|/ |________// |________|/ |__| |__|/ |__|/
|
||||
__ __ __ _________ ________ __ __ __ __ ______ __
|
||||
/_/| /_/\ /_/| /________/\ /_______/| /_/| /_/| /_/|_____ /_/| /_____/| /_/|
|
||||
| || | \\ | || | ___ \ \ | ______|/ | |\_| || | |/_____| || |___ || | ||
|
||||
| || | \ \\ | || | || \ \/ | ||___ | \/_/ |/ | ______ || /__| || | ||__
|
||||
| || | |\ \\| || | || \ || | |/__/| \ // | |/_____| || | ___|/ | |/_/|
|
||||
| || | ||\ \| || | || | || | ____|/ > </\ |____ ____|/_ | |/__/| | __|/
|
||||
| || | || \ | || | ||___/ |/ | ||_____ / __ \/| /_____| |______/| |______|/ | ||
|
||||
| || | || \ || | |/__/ / | |/____/| | /| \ || |________________|/ | ||
|
||||
|__|/ |__|/ \__|/ |_________/ |________|/ |__|/ |__|/ |__|/
|
||||
|
||||
(not AN index, INDEX is just the codename)
|
||||
(also no i did not use an ASCII font generator i spent like half an hour on this)
|
||||
|
||||
INDEX includes Redstone-over-Radio APIs for interacting with ROR torches in ways more complex than simple comparator output,
|
||||
simply put, certain ROR torches may run functions on the ROR component or read more complex values. This means that with the ROR
|
||||
system alone, one can make complex monitoring and logic systems controlling machines via redstone automation.
|
||||
|
||||
INDEX includes:
|
||||
- IRORInfo, an interface that provides a list of all valid functions. This interface should never be implemented directly because
|
||||
it is worthless on its own, rather it is extended by all other ROR API interfaces
|
||||
- IRORValueProvider, a simple interface that returns values based on names, serving as a simple getter. Get operations should never
|
||||
cause changes within the ROR component, and should be kept simple
|
||||
- IRORInteractive, an interface providing functions equivalent to java, usually performing a state change within the component and
|
||||
optionally returning a value
|
||||
|
||||
On the implementation side we can expect:
|
||||
- ROR readers, torches which have a list of named values which are read, as well as frequencies on which these values are broadcasted
|
||||
- ROR controllers, torches which have one frequency and can receive commands with parameters which will be executed on the component
|
||||
- ROR programmers, torches which have a list of frequencies and return frequencies which can receive commands with parameters and
|
||||
then send the return value on the return frequency
|
||||
- ROR logic receivers, torches which can turn signals into redstone based on various factors like arithmetic comparison and string
|
||||
operators like matches, matches not and substring (thanks to vær for taking care of that)
|
||||
|
||||
ROR programmers can indeed do everything that the readers and controllers can, but their added complexity requires more GUI elements
|
||||
which are more time-consuming to set up and limits the amount of command channels available, hence why readers and controllers exist
|
||||
when only a simple solution is required
|
||||
|
||||
*/
|
||||
@ -1,7 +1,6 @@
|
||||
package com.hbm.blocks;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.EnumCreatureType;
|
||||
|
||||
@ -1,14 +1,10 @@
|
||||
package com.hbm.blocks;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.handler.MultiblockHandlerXR;
|
||||
import com.hbm.handler.ThreeInts;
|
||||
import com.hbm.interfaces.ICopiable;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.IPersistentNBT;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -32,7 +28,11 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.DrawBlockHighlightEvent;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public abstract class BlockDummyable extends BlockContainer implements ICustomBlockHighlight {
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public abstract class BlockDummyable extends BlockContainer implements ICustomBlockHighlight, ICopiable {
|
||||
|
||||
public BlockDummyable(Material mat) {
|
||||
super(mat);
|
||||
@ -507,4 +507,31 @@ public abstract class BlockDummyable extends BlockContainer implements ICustomBl
|
||||
for(AxisAlignedBB aabb : this.bounding) event.context.drawOutlinedBoundingBox(getAABBRotationOffset(aabb.expand(exp, exp, exp), 0, 0, 0, ForgeDirection.getOrientation(meta - offset).getRotation(ForgeDirection.UP)).getOffsetBoundingBox(x - dX + 0.5, y - dY, z - dZ + 0.5), -1);
|
||||
ICustomBlockHighlight.cleanup();
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound getSettings(World world, int x, int y, int z) {
|
||||
int[] pos = findCore(world, x, y, z);
|
||||
TileEntity tile = world.getTileEntity(pos[0], pos[1], pos[2]);
|
||||
if (tile instanceof ICopiable)
|
||||
return ((ICopiable) tile).getSettings(world, pos[0], pos[1], pos[2]);
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void pasteSettings(NBTTagCompound nbt, int index, World world, EntityPlayer player, int x, int y, int z) {
|
||||
int[] pos = findCore(world, x, y, z);
|
||||
TileEntity tile = world.getTileEntity(pos[0], pos[1], pos[2]);
|
||||
if (tile instanceof ICopiable)
|
||||
((ICopiable) tile).pasteSettings(nbt, index, world, player, pos[0], pos[1], pos[2]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] infoForDisplay(World world, int x, int y, int z) {
|
||||
int[] pos = findCore(world, x, y, z);
|
||||
TileEntity tile = world.getTileEntity(pos[0], pos[1], pos[2]);
|
||||
if (tile instanceof ICopiable)
|
||||
return ((ICopiable) tile).infoForDisplay(world, x, y, z);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,9 +1,6 @@
|
||||
package com.hbm.blocks;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import com.hbm.util.EnumUtil;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
@ -11,6 +8,8 @@ import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
public class BlockEnumMulti extends BlockMulti {
|
||||
|
||||
public Class<? extends Enum> theEnum;
|
||||
|
||||
@ -1,9 +1,6 @@
|
||||
package com.hbm.blocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.entity.item.EntityFallingBlockNT;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
@ -14,6 +11,8 @@ import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockFallingNT extends Block {
|
||||
|
||||
public static boolean fallInstantly;
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
package com.hbm.blocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
@ -9,6 +7,8 @@ import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public abstract class BlockMulti extends BlockBase implements IBlockMulti {
|
||||
|
||||
public BlockMulti() {
|
||||
|
||||
@ -1,8 +1,5 @@
|
||||
package com.hbm.blocks;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
@ -12,6 +9,9 @@ import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockRemap extends Block implements ILookOverlay {
|
||||
|
||||
public Block remapBlock;
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package com.hbm.blocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IAnalyzable {
|
||||
|
||||
public List<String> getDebugInfo(World world, int x, int y, int z);
|
||||
|
||||
@ -1,12 +1,11 @@
|
||||
package com.hbm.blocks;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.DrawBlockHighlightEvent;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public interface ICustomBlockHighlight {
|
||||
|
||||
|
||||
@ -1,9 +1,5 @@
|
||||
package com.hbm.blocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
@ -11,6 +7,9 @@ import net.minecraft.client.gui.Gui;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ILookOverlay {
|
||||
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
package com.hbm.blocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IPersistentInfoProvider {
|
||||
|
||||
public void addInformation(ItemStack stack, NBTTagCompound persistentTag, EntityPlayer player, List list, boolean ext);
|
||||
|
||||
@ -1,16 +1,14 @@
|
||||
package com.hbm.blocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ITooltipProvider {
|
||||
|
||||
|
||||
@ -6,13 +6,21 @@ import com.hbm.blocks.fluid.*;
|
||||
import com.hbm.blocks.gas.*;
|
||||
import com.hbm.blocks.generic.*;
|
||||
import com.hbm.blocks.generic.BlockHazard.ExtDisplayEffect;
|
||||
import com.hbm.blocks.generic.BlockMotherOfAllOres.ItemRandomOreBlock;
|
||||
import com.hbm.blocks.machine.*;
|
||||
import com.hbm.blocks.machine.albion.BlockPABeamline;
|
||||
import com.hbm.blocks.machine.albion.BlockPADetector;
|
||||
import com.hbm.blocks.machine.albion.BlockPADipole;
|
||||
import com.hbm.blocks.machine.albion.BlockPAQuadrupole;
|
||||
import com.hbm.blocks.machine.albion.BlockPARFC;
|
||||
import com.hbm.blocks.machine.albion.BlockPASource;
|
||||
import com.hbm.blocks.machine.pile.*;
|
||||
import com.hbm.blocks.machine.rbmk.*;
|
||||
import com.hbm.blocks.network.*;
|
||||
import com.hbm.blocks.rail.*;
|
||||
import com.hbm.blocks.test.*;
|
||||
import com.hbm.blocks.test.TestCharge;
|
||||
import com.hbm.blocks.test.TestCore;
|
||||
import com.hbm.blocks.test.TestEventTester;
|
||||
import com.hbm.blocks.test.TestObjTester;
|
||||
import com.hbm.blocks.turret.*;
|
||||
import com.hbm.items.block.*;
|
||||
import com.hbm.items.bomb.ItemPrototypeBlock;
|
||||
@ -25,14 +33,17 @@ import com.hbm.tileentity.machine.storage.TileEntityFileCabinet;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockFalling;
|
||||
import net.minecraft.block.material.MapColor;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.material.MaterialLiquid;
|
||||
import net.minecraft.block.material.*;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class ModBlocks {
|
||||
|
||||
public static void mainRegistry()
|
||||
@ -67,7 +78,6 @@ public class ModBlocks {
|
||||
public static Block ore_coltan;
|
||||
public static Block ore_alexandrite;
|
||||
|
||||
public static Block ore_random;
|
||||
public static Block ore_bedrock;
|
||||
public static Block ore_volcano;
|
||||
|
||||
@ -109,6 +119,7 @@ public class ModBlocks {
|
||||
public static Block cluster_depth_tungsten;
|
||||
|
||||
public static Block stone_keyhole;
|
||||
public static Block stone_keyhole_meta;
|
||||
|
||||
public static Block stone_depth_nether;
|
||||
public static Block ore_depth_nether_neodymium;
|
||||
@ -143,8 +154,8 @@ public class ModBlocks {
|
||||
public static Block ore_bedrock_oil;
|
||||
public static Block ore_lignite;
|
||||
public static Block ore_asbestos;
|
||||
public static Block ore_coal_oil;
|
||||
public static Block ore_coal_oil_burning;
|
||||
@Deprecated public static Block ore_coal_oil;
|
||||
@Deprecated public static Block ore_coal_oil_burning;
|
||||
|
||||
public static Block ore_tikite;
|
||||
|
||||
@ -388,7 +399,6 @@ public class ModBlocks {
|
||||
public static Block brick_jungle_glyph;
|
||||
public static Block brick_jungle_circle;
|
||||
|
||||
public static Block brick_forgotten;
|
||||
public static Block brick_red;
|
||||
|
||||
public static Block deco_computer;
|
||||
@ -465,6 +475,12 @@ public class ModBlocks {
|
||||
public static Block plant_tall;
|
||||
public static Block plant_dead;
|
||||
public static Block reeds;
|
||||
public static Block vine_phosphor;
|
||||
public static final Material thick_foliage = new MaterialLogic(MapColor.foliageColor) {
|
||||
@Override public boolean getCanBurn() { return true; }
|
||||
@Override public boolean isToolNotRequired() { return false; }
|
||||
@Override public int getMaterialMobility() { return 1; }
|
||||
};
|
||||
|
||||
public static Block waste_earth;
|
||||
public static Block waste_mycelium;
|
||||
@ -600,6 +616,7 @@ public class ModBlocks {
|
||||
public static Block sat_dock;
|
||||
|
||||
public static Block soyuz_capsule;
|
||||
public static Block crate_supply;
|
||||
|
||||
public static Block crate_iron;
|
||||
public static Block crate_steel;
|
||||
@ -665,10 +682,10 @@ public class ModBlocks {
|
||||
public static Block machine_fel;
|
||||
public static Block machine_silex;
|
||||
|
||||
public static Block machine_rotary_furnace;
|
||||
public static Block machine_crystallizer;
|
||||
|
||||
public static Block machine_uf6_tank;
|
||||
|
||||
public static Block machine_puf6_tank;
|
||||
|
||||
public static Block machine_reactor_breeding;
|
||||
@ -713,6 +730,13 @@ public class ModBlocks {
|
||||
public static Block hadron_core;
|
||||
public static Block hadron_cooler;
|
||||
|
||||
public static Block pa_source;
|
||||
public static Block pa_beamline;
|
||||
public static Block pa_rfc;
|
||||
public static Block pa_quadrupole;
|
||||
public static Block pa_dipole;
|
||||
public static Block pa_detector;
|
||||
|
||||
public static Block machine_electric_furnace_off;
|
||||
public static Block machine_electric_furnace_on;
|
||||
|
||||
@ -841,12 +865,7 @@ public class ModBlocks {
|
||||
public static Block struct_icf_core;
|
||||
|
||||
public static Block factory_titanium_hull;
|
||||
@Deprecated public static Block factory_titanium_furnace;
|
||||
@Deprecated public static Block factory_titanium_conductor;
|
||||
|
||||
public static Block factory_advanced_hull;
|
||||
@Deprecated public static Block factory_advanced_furnace;
|
||||
@Deprecated public static Block factory_advanced_conductor;
|
||||
|
||||
public static Block cm_block;
|
||||
public static Block cm_sheet;
|
||||
@ -894,7 +913,6 @@ public class ModBlocks {
|
||||
public static Block watz_element;
|
||||
public static Block watz_cooler;
|
||||
public static Block watz_end;
|
||||
public static Block watz_conductor;
|
||||
|
||||
public static Block balefire;
|
||||
public static Block fire_digamma;
|
||||
@ -945,6 +963,7 @@ public class ModBlocks {
|
||||
public static Block machine_catalytic_reformer;
|
||||
public static Block machine_hydrotreater;
|
||||
public static Block machine_coker;
|
||||
public static Block machine_pyrooven;
|
||||
|
||||
public static Block machine_boiler_off;
|
||||
|
||||
@ -1005,11 +1024,13 @@ public class ModBlocks {
|
||||
|
||||
public static Block machine_turbofan;
|
||||
public static Block machine_turbinegas;
|
||||
public static Block machine_lpw2;
|
||||
|
||||
public static Block press_preheater;
|
||||
public static Block machine_press;
|
||||
public static Block machine_epress;
|
||||
public static Block machine_conveyor_press;
|
||||
public static Block machine_ammo_press;
|
||||
|
||||
public static Block machine_siren;
|
||||
|
||||
@ -1044,8 +1065,8 @@ public class ModBlocks {
|
||||
public static Block anvil_lead;
|
||||
public static Block anvil_steel;
|
||||
public static Block anvil_desh;
|
||||
public static Block anvil_saturnite;
|
||||
public static Block anvil_ferrouranium;
|
||||
public static Block anvil_saturnite;
|
||||
public static Block anvil_bismuth_bronze;
|
||||
public static Block anvil_arsenic_bronze;
|
||||
public static Block anvil_schrabidate;
|
||||
@ -1112,9 +1133,6 @@ public class ModBlocks {
|
||||
public static Block rail_large_switch;
|
||||
public static Block rail_large_switch_flipped;
|
||||
|
||||
public static Block statue_elb;
|
||||
public static Block statue_elb_g;
|
||||
public static Block statue_elb_w;
|
||||
public static Block statue_elb_f;
|
||||
|
||||
public static Block cheater_virus;
|
||||
@ -1195,8 +1213,6 @@ public class ModBlocks {
|
||||
|
||||
public static Block dummy_block_vault;
|
||||
public static Block dummy_block_blast;
|
||||
public static Block dummy_block_uf6;
|
||||
public static Block dummy_block_puf6;
|
||||
public static Block dummy_plate_compact_launcher;
|
||||
public static Block dummy_port_compact_launcher;
|
||||
public static Block dummy_plate_launch_table;
|
||||
@ -1284,8 +1300,8 @@ public class ModBlocks {
|
||||
ore_alexandrite = new BlockDepthOre().setBlockName("ore_alexandrite").setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":ore_alexandrite");
|
||||
|
||||
stone_keyhole = new BlockKeyhole().setBlockName("stone_keyhole").setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":stone_keyhole");
|
||||
stone_keyhole_meta = new BlockRedBrickKeyhole(Material.rock).setCreativeTab(null).setBlockName("stone_keyhole_meta").setResistance(10_000);
|
||||
|
||||
ore_random = new BlockMotherOfAllOres().setBlockName("ore_random").setCreativeTab(MainRegistry.blockTab);
|
||||
ore_bedrock = new BlockBedrockOreTE().setBlockName("ore_bedrock").setCreativeTab(null);
|
||||
ore_volcano = new BlockFissure().setBlockName("ore_volcano").setLightLevel(1F).setCreativeTab(MainRegistry.blockTab);
|
||||
|
||||
@ -1304,7 +1320,7 @@ public class ModBlocks {
|
||||
stalactite = new BlockStalagmite().setBlockName("stalactite").setCreativeTab(MainRegistry.blockTab).setHardness(0.5F).setResistance(2.0F);
|
||||
stone_biome = new BlockBiomeStone().setBlockName("stone_biome").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F);
|
||||
|
||||
basalt = new BlockGeneric(Material.rock).setBlockName("basalt").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":basalt");
|
||||
basalt = new BlockPillar(Material.rock, RefStrings.MODID + ":basalt_top").setBlockName("basalt").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":basalt");
|
||||
ore_basalt = new BlockOreBasalt().setBlockName("ore_basalt").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_basalt");
|
||||
basalt_smooth = new BlockGeneric(Material.rock).setBlockName("basalt_smooth").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":basalt_smooth");
|
||||
basalt_brick = new BlockGeneric(Material.rock).setBlockName("basalt_brick").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":basalt_brick");
|
||||
@ -1417,11 +1433,11 @@ public class ModBlocks {
|
||||
block_slag = new BlockSlag(Material.rock).setBlockName("block_slag").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeStone).setHardness(2.0F).setBlockTextureName(RefStrings.MODID + ":block_slag");
|
||||
|
||||
block_australium = new BlockBeaconable(Material.iron).setBlockName("block_australium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_australium");
|
||||
block_weidanium = new BlockBeaconable(Material.iron).setBlockName("block_weidanium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_weidanium");
|
||||
block_reiium = new BlockBeaconable(Material.iron).setBlockName("block_reiium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_reiium");
|
||||
block_unobtainium = new BlockBeaconable(Material.iron).setBlockName("block_unobtainium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_unobtainium");
|
||||
block_daffergon = new BlockBeaconable(Material.iron).setBlockName("block_daffergon").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_daffergon");
|
||||
block_verticium = new BlockBeaconable(Material.iron).setBlockName("block_verticium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_verticium");
|
||||
block_weidanium = new BlockBeaconable(Material.iron).setBlockName("block_weidanium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_deprecated");
|
||||
block_reiium = new BlockBeaconable(Material.iron).setBlockName("block_reiium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_deprecated");
|
||||
block_unobtainium = new BlockBeaconable(Material.iron).setBlockName("block_unobtainium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_deprecated");
|
||||
block_daffergon = new BlockBeaconable(Material.iron).setBlockName("block_daffergon").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_deprecated");
|
||||
block_verticium = new BlockBeaconable(Material.iron).setBlockName("block_verticium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_deprecated");
|
||||
|
||||
block_cap = new BlockCap().setBlockName("block_cap").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F);
|
||||
|
||||
@ -1562,7 +1578,6 @@ public class ModBlocks {
|
||||
brick_jungle_glyph = new BlockGlyph(Material.rock).setBlockName("brick_jungle_glyph").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(360.0F);
|
||||
brick_jungle_circle = new BlockBallsSpawner(Material.rock).setBlockName("brick_jungle_circle").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(360.0F).setBlockTextureName(RefStrings.MODID + ":brick_jungle_circle");
|
||||
|
||||
brick_forgotten = new BlockGeneric(Material.rock).setBlockName("brick_forgotten").setCreativeTab(MainRegistry.blockTab).setBlockUnbreakable().setResistance(1000000).setBlockTextureName(RefStrings.MODID + ":brick_forgotten");
|
||||
brick_red = new BlockRedBrick(Material.rock).setBlockName("brick_red").setResistance(10_000);
|
||||
|
||||
deco_computer = new BlockDecoModel(Material.iron, DecoComputerEnum.class, true, false).setBlockBoundsTo(.160749F, 0F, 0F, .839251F, .867849F, .622184F).setBlockName("deco_computer").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_computer");
|
||||
@ -1575,7 +1590,7 @@ public class ModBlocks {
|
||||
pole_top = new DecoPoleTop(Material.iron).setBlockName("pole_top").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":deco_pole_top");
|
||||
pole_satellite_receiver = new DecoPoleSatelliteReceiver(Material.iron).setBlockName("pole_satellite_receiver").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":deco_satellite_receiver");
|
||||
steel_wall = new DecoBlock(Material.iron).setBlockName("steel_wall").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":steel_wall");
|
||||
steel_corner = new DecoBlock(Material.iron).setBlockName("steel_corner").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":steel_corner");
|
||||
steel_corner = new DecoBlock(Material.iron).setBlockName("steel_corner").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":steel_wall");
|
||||
steel_roof = new DecoBlock(Material.iron).setBlockName("steel_roof").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":steel_roof");
|
||||
steel_beam = new DecoBlock(Material.iron).setBlockName("steel_beam").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":steel_beam");
|
||||
steel_scaffold = new BlockScaffold().setBlockName("steel_scaffold").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":deco_steel_orig");
|
||||
@ -1637,6 +1652,7 @@ public class ModBlocks {
|
||||
plant_tall = new BlockTallPlant().setBlockName("plant_tall").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeGrass).setHardness(0.0F);
|
||||
plant_dead = new BlockDeadPlant().setBlockName("plant_dead").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeGrass).setHardness(0.0F);
|
||||
reeds = new BlockReeds().setBlockName("plant_reeds").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeGrass).setHardness(0.0F);
|
||||
vine_phosphor = new BlockHangingVine(thick_foliage).setBlockName("vine_phosphor").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeGrass).setHardness(0.5F);
|
||||
|
||||
waste_earth = new WasteEarth(Material.ground, true).setBlockName("waste_earth").setStepSound(Block.soundTypeGrass).setCreativeTab(MainRegistry.blockTab).setHardness(0.6F).setBlockTextureName(RefStrings.MODID + ":waste_earth");
|
||||
waste_mycelium = new WasteEarth(Material.ground, true).setBlockName("waste_mycelium").setStepSound(Block.soundTypeGrass).setLightLevel(1F).setCreativeTab(MainRegistry.blockTab).setHardness(0.6F).setBlockTextureName(RefStrings.MODID + ":waste_mycelium_side");
|
||||
@ -1764,6 +1780,7 @@ public class ModBlocks {
|
||||
machine_gascent = new MachineGasCent(Material.iron).setBlockName("machine_gascent").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_fel = new MachineFEL(Material.iron).setBlockName("machine_fel").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_silex = new MachineSILEX(Material.iron).setBlockName("machine_silex").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_rotary_furnace = new MachineRotaryFurnace(Material.iron).setBlockName("machine_rotary_furnace").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":brick_fire");
|
||||
machine_crystallizer = new MachineCrystallizer(Material.iron).setBlockName("machine_crystallizer").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_crystallizer");
|
||||
|
||||
machine_uf6_tank = new MachineUF6Tank(Material.iron).setBlockName("machine_uf6_tank").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
@ -1774,9 +1791,9 @@ public class ModBlocks {
|
||||
|
||||
machine_furnace_brick_off = new MachineBrickFurnace(false).setBlockName("machine_furnace_brick_off").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
machine_furnace_brick_on = new MachineBrickFurnace(true).setBlockName("machine_furnace_brick_on").setHardness(5.0F).setLightLevel(1.0F).setResistance(10.0F);
|
||||
machine_nuke_furnace_off = new MachineNukeFurnace(false).setBlockName("machine_nuke_furnace_off").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
machine_nuke_furnace_off = new MachineNukeFurnace(false).setBlockName("machine_nuke_furnace_off").setHardness(5.0F).setResistance(10.0F);
|
||||
machine_nuke_furnace_on = new MachineNukeFurnace(true).setBlockName("machine_nuke_furnace_on").setHardness(5.0F).setLightLevel(1.0F).setResistance(10.0F);
|
||||
machine_rtg_furnace_off = new MachineRtgFurnace(false).setBlockName("machine_rtg_furnace_off").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
machine_rtg_furnace_off = new MachineRtgFurnace(false).setBlockName("machine_rtg_furnace_off").setHardness(5.0F).setResistance(10.0F);
|
||||
machine_rtg_furnace_on = new MachineRtgFurnace(true).setBlockName("machine_rtg_furnace_on").setHardness(5.0F).setLightLevel(1.0F).setResistance(10.0F);
|
||||
|
||||
machine_industrial_generator = new MachineIGenerator(Material.iron).setBlockName("machine_industrial_generator").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName("gold_block");
|
||||
@ -1812,6 +1829,13 @@ public class ModBlocks {
|
||||
hadron_core = new BlockHadronCore(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_core").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_core");
|
||||
hadron_cooler = new BlockHadronCooler(Material.iron).setBlockName("hadron_cooler").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F);
|
||||
|
||||
pa_source = new BlockPASource().setStepSound(Block.soundTypeMetal).setBlockName("pa_source").setHardness(5.0F).setResistance(10.0F);
|
||||
pa_beamline = new BlockPABeamline().setStepSound(Block.soundTypeMetal).setBlockName("pa_beamline").setHardness(5.0F).setResistance(10.0F);
|
||||
pa_rfc = new BlockPARFC().setStepSound(Block.soundTypeMetal).setBlockName("pa_rfc").setHardness(5.0F).setResistance(10.0F);
|
||||
pa_quadrupole = new BlockPAQuadrupole().setStepSound(Block.soundTypeMetal).setBlockName("pa_quadrupole").setHardness(5.0F).setResistance(10.0F);
|
||||
pa_dipole = new BlockPADipole().setStepSound(Block.soundTypeMetal).setBlockName("pa_dipole").setHardness(5.0F).setResistance(10.0F);
|
||||
pa_detector = new BlockPADetector().setStepSound(Block.soundTypeMetal).setBlockName("pa_detector").setHardness(5.0F).setResistance(10.0F);
|
||||
|
||||
machine_electric_furnace_off = new MachineElectricFurnace(false).setBlockName("machine_electric_furnace_off").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
machine_electric_furnace_on = new MachineElectricFurnace(true).setBlockName("machine_electric_furnace_on").setHardness(5.0F).setLightLevel(1.0F).setResistance(10.0F);
|
||||
machine_arc_furnace_off = new MachineArcFurnace(false).setBlockName("machine_arc_furnace_off").setHardness(5.0F).setResistance(10.0F);
|
||||
@ -1950,11 +1974,7 @@ public class ModBlocks {
|
||||
struct_icf_core = new BlockICFStruct(Material.iron).setBlockName("struct_icf_core").setLightLevel(1F).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":struct_icf_core");
|
||||
|
||||
factory_titanium_hull = new BlockGeneric(Material.iron).setBlockName("factory_titanium_hull").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":factory_titanium_hull");
|
||||
factory_titanium_furnace = new FactoryHatch(Material.iron).setBlockName("factory_titanium_furnace").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":factory_titanium_furnace");
|
||||
factory_titanium_conductor = new BlockPillar(Material.iron, RefStrings.MODID + ":factory_titanium_conductor").setBlockName("factory_titanium_conductor").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":factory_titanium_hull");
|
||||
factory_advanced_hull = new BlockGeneric(Material.iron).setBlockName("factory_advanced_hull").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":factory_advanced_hull");
|
||||
factory_advanced_furnace = new FactoryHatch(Material.iron).setBlockName("factory_advanced_furnace").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":factory_advanced_furnace");
|
||||
factory_advanced_conductor = new BlockPillar(Material.iron, RefStrings.MODID + ":factory_advanced_conductor").setBlockName("factory_advanced_conductor").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":factory_advanced_hull");
|
||||
|
||||
cm_block = new BlockCM(Material.iron, EnumCMMaterials.class, true, true).setBlockName("cm_block").setCreativeTab(MainRegistry.machineTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":cm_block");
|
||||
cm_sheet = new BlockCM(Material.iron, EnumCMMaterials.class, true, true).setBlockName("cm_sheet").setCreativeTab(MainRegistry.machineTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":cm_sheet");
|
||||
@ -1998,7 +2018,6 @@ public class ModBlocks {
|
||||
watz_element = new BlockPillar(Material.iron, RefStrings.MODID + ":watz_element_top").setBlockName("watz_element").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":watz_element_side");
|
||||
watz_cooler = new BlockPillar(Material.iron, RefStrings.MODID + ":watz_cooler_top").setBlockName("watz_cooler").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":watz_cooler_side");
|
||||
watz_end = new BlockToolConversion(Material.iron).addVariant("_bolted").setBlockName("watz_end").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":watz_casing");
|
||||
watz_conductor = new BlockCableConnect(Material.iron).setBlockName("watz_conductor").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":watz_conductor_top");
|
||||
watz = new Watz().setBlockName("watz").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
watz_pump = new WatzPump().setBlockName("watz_pump").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
|
||||
@ -2073,6 +2092,7 @@ public class ModBlocks {
|
||||
|
||||
sat_dock = new MachineSatDock(Material.iron).setBlockName("sat_dock").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":sat_dock");
|
||||
soyuz_capsule = new SoyuzCapsule(Material.iron).setBlockName("soyuz_capsule").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":soyuz_capsule");
|
||||
crate_supply = new BlockSupplyCrate(Material.wood).setBlockName("crate_supply").setStepSound(Block.soundTypeWood).setHardness(1.0F).setResistance(2.5F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":crate_can");
|
||||
|
||||
turret_chekhov = new TurretChekhov(Material.iron).setBlockName("turret_chekhov").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
turret_friendly = new TurretFriendly(Material.iron).setBlockName("turret_friendly").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
@ -2083,7 +2103,6 @@ public class ModBlocks {
|
||||
turret_howard_damaged = new TurretHowardDamaged(Material.iron).setBlockName("turret_howard_damaged").setHardness(5.0F).setResistance(600.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_rust");
|
||||
turret_maxwell = new TurretMaxwell(Material.iron).setBlockName("turret_maxwell").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
turret_fritz = new TurretFritz(Material.iron).setBlockName("turret_fritz").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
//turret_brandon = new TurretBrandon(Material.iron).setBlockName("turret_brandon").setHardness(5.0F).setResistance(600.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
turret_arty = new TurretArty(Material.iron).setBlockName("turret_arty").setHardness(5.0F).setResistance(600.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
turret_himars = new TurretHIMARS(Material.iron).setBlockName("turret_himars").setHardness(5.0F).setResistance(600.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
turret_sentry = new TurretSentry().setBlockName("turret_sentry").setHardness(5.0F).setResistance(5.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
@ -2167,6 +2186,7 @@ public class ModBlocks {
|
||||
machine_catalytic_reformer = new MachineCatalyticReformer(Material.iron).setBlockName("machine_catalytic_reformer").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_hydrotreater = new MachineHydrotreater(Material.iron).setBlockName("machine_hydrotreater").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_coker = new MachineCoker(Material.iron).setBlockName("machine_coker").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_pyrooven = new MachinePyroOven(Material.iron).setBlockName("machine_pyrooven").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
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");
|
||||
@ -2184,10 +2204,12 @@ public class ModBlocks {
|
||||
machine_orbus = new MachineOrbus(Material.iron).setBlockName("machine_orbus").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_turbofan = new MachineTurbofan(Material.iron).setBlockName("machine_turbofan").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_turbofan");
|
||||
machine_turbinegas = new MachineTurbineGas(Material.iron).setBlockName("machine_turbinegas").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_lpw2 = new MachineLPW2().setBlockName("machine_lpw2").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
press_preheater = new BlockBase(Material.iron).setBlockName("press_preheater").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":press_preheater");
|
||||
machine_press = new MachinePress(Material.iron).setBlockName("machine_press").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_press");
|
||||
machine_epress = new MachineEPress(Material.iron).setBlockName("machine_epress").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_epress");
|
||||
machine_conveyor_press = new MachineConveyorPress(Material.iron).setBlockName("machine_conveyor_press").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_ammo_press = new MachineAmmoPress().setBlockName("machine_ammo_press").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
reactor_research = new ReactorResearch(Material.iron).setBlockName("machine_reactor_small").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_reactor_small");
|
||||
reactor_zirnox = new ReactorZirnox(Material.iron).setBlockName("machine_zirnox").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
zirnox_destroyed = new ZirnoxDestroyed(Material.iron).setBlockName("zirnox_destroyed").setHardness(100.0F).setResistance(800.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
@ -2220,8 +2242,8 @@ public class ModBlocks {
|
||||
anvil_lead = new NTMAnvil(Material.iron, NTMAnvil.TIER_IRON).setBlockName("anvil_lead").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":anvil_lead");
|
||||
anvil_steel = new NTMAnvil(Material.iron, NTMAnvil.TIER_STEEL).setBlockName("anvil_steel").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":anvil_steel");
|
||||
anvil_desh = new NTMAnvil(Material.iron, NTMAnvil.TIER_OIL).setBlockName("anvil_desh").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":anvil_desh");
|
||||
anvil_saturnite = new NTMAnvil(Material.iron, NTMAnvil.TIER_OIL).setBlockName("anvil_saturnite").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":anvil_saturnite");
|
||||
anvil_ferrouranium = new NTMAnvil(Material.iron, NTMAnvil.TIER_NUCLEAR).setBlockName("anvil_ferrouranium").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":anvil_ferrouranium");
|
||||
anvil_saturnite = new NTMAnvil(Material.iron, NTMAnvil.TIER_RBMK).setBlockName("anvil_saturnite").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":anvil_saturnite");
|
||||
anvil_bismuth_bronze = new NTMAnvil(Material.iron, NTMAnvil.TIER_RBMK).setBlockName("anvil_bismuth_bronze").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":anvil_bismuth_bronze");
|
||||
anvil_arsenic_bronze = new NTMAnvil(Material.iron, NTMAnvil.TIER_RBMK).setBlockName("anvil_arsenic_bronze").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":anvil_arsenic_bronze");
|
||||
anvil_schrabidate = new NTMAnvil(Material.iron, NTMAnvil.TIER_FUSION).setBlockName("anvil_schrabidate").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":anvil_schrabidate");
|
||||
@ -2278,9 +2300,6 @@ public class ModBlocks {
|
||||
volcano_core = new BlockVolcano().setBlockName("volcano_core").setBlockUnbreakable().setResistance(10000.0F).setCreativeTab(MainRegistry.nukeTab).setBlockTextureName(RefStrings.MODID + ":volcano_core");
|
||||
volcano_rad_core = new BlockVolcano().setBlockName("volcano_rad_core").setBlockUnbreakable().setResistance(10000.0F).setCreativeTab(MainRegistry.nukeTab).setBlockTextureName(RefStrings.MODID + ":volcano_rad_core");
|
||||
|
||||
statue_elb = new DecoBlockAlt(Material.iron).setBlockName("#null").setHardness(Float.POSITIVE_INFINITY).setResistance(Float.POSITIVE_INFINITY);
|
||||
statue_elb_g = new DecoBlockAlt(Material.iron).setBlockName("#void").setHardness(Float.POSITIVE_INFINITY).setResistance(Float.POSITIVE_INFINITY);
|
||||
statue_elb_w = new DecoBlockAlt(Material.iron).setBlockName("#ngtv").setHardness(Float.POSITIVE_INFINITY).setResistance(Float.POSITIVE_INFINITY);
|
||||
statue_elb_f = new DecoBlockAlt(Material.iron).setBlockName("#undef").setHardness(Float.POSITIVE_INFINITY).setLightLevel(1.0F).setResistance(Float.POSITIVE_INFINITY);
|
||||
|
||||
mud_fluid = new MudFluid().setDensity(2500).setViscosity(3000).setLuminosity(5).setTemperature(2773).setUnlocalizedName("mud_fluid");
|
||||
@ -2320,8 +2339,6 @@ public class ModBlocks {
|
||||
|
||||
dummy_block_vault = new DummyBlockVault(Material.iron).setBlockName("dummy_block_vault").setHardness(10.0F).setResistance(10000.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
dummy_block_blast = new DummyBlockBlast(Material.iron).setBlockName("dummy_block_blast").setHardness(10.0F).setResistance(10000.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
dummy_block_uf6 = new DummyBlockMachine(Material.iron, machine_uf6_tank, false).setBlockName("dummy_block_uf6").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_titanium");
|
||||
dummy_block_puf6 = new DummyBlockMachine(Material.iron, machine_puf6_tank, false).setBlockName("dummy_block_puf6").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
dummy_plate_compact_launcher = new DummyBlockMachine(Material.iron, compact_launcher, false).setBounds(0, 16, 0, 16, 16, 16).setBlockName("dummy_plate_compact_launcher").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
dummy_port_compact_launcher = new DummyBlockMachine(Material.iron, compact_launcher, true).setBlockName("dummy_port_compact_launcher").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
dummy_plate_launch_table = new DummyBlockMachine(Material.iron, launch_table, false).setBounds(0, 16, 0, 16, 16, 16).setBlockName("dummy_plate_launch_table").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
@ -2430,15 +2447,13 @@ public class ModBlocks {
|
||||
//End Ores
|
||||
GameRegistry.registerBlock(ore_tikite, ore_tikite.getUnlocalizedName());
|
||||
|
||||
//It's a meme you dip
|
||||
GameRegistry.registerBlock(ore_random, ItemRandomOreBlock.class, ore_random.getUnlocalizedName());
|
||||
|
||||
//Bedrock ore
|
||||
register(ore_bedrock);
|
||||
register(ore_volcano);
|
||||
|
||||
//Secret
|
||||
register(stone_keyhole);
|
||||
register(stone_keyhole_meta);
|
||||
|
||||
//Resource-bearing Stones
|
||||
register(stone_resource);
|
||||
@ -2625,7 +2640,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(reinforced_ducrete, ItemBlockBlastInfo.class, reinforced_ducrete.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(concrete_smooth, ItemBlockBlastInfo.class, concrete_smooth.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(concrete_colored, ItemBlockColoredConcrete.class, concrete_colored.getUnlocalizedName());
|
||||
register(concrete_colored_ext);
|
||||
GameRegistry.registerBlock(concrete_colored_ext, ItemBlockBlastInfo.class, concrete_colored_ext.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(concrete, ItemBlockBlastInfo.class, concrete.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(concrete_asbestos, ItemBlockBlastInfo.class, concrete_asbestos.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(concrete_super, ItemBlockBlastInfo.class, concrete_super.getUnlocalizedName());
|
||||
@ -2719,7 +2734,6 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(brick_jungle_trap, ItemTrapBlock.class, brick_jungle_trap.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(brick_jungle_glyph, ItemGlyphBlock.class, brick_jungle_glyph.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(brick_jungle_circle, brick_jungle_circle.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(brick_forgotten, brick_forgotten.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(brick_red, brick_red.getUnlocalizedName());
|
||||
register(deco_computer);
|
||||
register(deco_crt);
|
||||
@ -2736,6 +2750,7 @@ public class ModBlocks {
|
||||
register(steel_scaffold);
|
||||
GameRegistry.registerBlock(steel_grate, steel_grate.getUnlocalizedName());
|
||||
register(steel_grate_wide);
|
||||
//register(scaffold_dynamic);
|
||||
GameRegistry.registerBlock(deco_pipe, ItemBlockBase.class, deco_pipe.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(deco_pipe_rusted, ItemBlockBase.class, deco_pipe_rusted.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(deco_pipe_green, ItemBlockBase.class, deco_pipe_green.getUnlocalizedName());
|
||||
@ -2764,6 +2779,7 @@ public class ModBlocks {
|
||||
register(plant_tall);
|
||||
register(plant_dead);
|
||||
register(reeds);
|
||||
register(vine_phosphor);
|
||||
GameRegistry.registerBlock(mush, mush.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(mush_block, mush_block.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(mush_block_stem, mush_block_stem.getUnlocalizedName());
|
||||
@ -2861,8 +2877,8 @@ public class ModBlocks {
|
||||
|
||||
//Mines
|
||||
GameRegistry.registerBlock(mine_ap, mine_ap.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(mine_he, mine_he.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(mine_shrap, mine_shrap.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(mine_he, mine_he.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(mine_fat, mine_fat.getUnlocalizedName());
|
||||
|
||||
//Block Bombs
|
||||
@ -2960,8 +2976,8 @@ public class ModBlocks {
|
||||
register(anvil_lead);
|
||||
register(anvil_steel);
|
||||
register(anvil_desh);
|
||||
register(anvil_saturnite);
|
||||
register(anvil_ferrouranium);
|
||||
register(anvil_saturnite);
|
||||
register(anvil_bismuth_bronze);
|
||||
register(anvil_arsenic_bronze);
|
||||
register(anvil_schrabidate);
|
||||
@ -2973,6 +2989,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(machine_press, machine_press.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_epress, machine_epress.getUnlocalizedName());
|
||||
register(machine_conveyor_press);
|
||||
register(machine_ammo_press);
|
||||
register(pump_steam);
|
||||
register(pump_electric);
|
||||
register(heater_firebox);
|
||||
@ -3010,6 +3027,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(machine_gascent, machine_gascent.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_fel, machine_fel.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_silex, machine_silex.getUnlocalizedName());
|
||||
register(machine_rotary_furnace);
|
||||
GameRegistry.registerBlock(machine_crystallizer, machine_crystallizer.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_uf6_tank, machine_uf6_tank.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_puf6_tank, machine_puf6_tank.getUnlocalizedName());
|
||||
@ -3067,6 +3085,13 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(hadron_core, hadron_core.getUnlocalizedName());
|
||||
register(hadron_cooler);
|
||||
|
||||
register(pa_source);
|
||||
register(pa_beamline);
|
||||
register(pa_rfc);
|
||||
register(pa_quadrupole);
|
||||
register(pa_dipole);
|
||||
register(pa_detector);
|
||||
|
||||
GameRegistry.registerBlock(rbmk_rod, rbmk_rod.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(rbmk_rod_mod, rbmk_rod_mod.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(rbmk_rod_reasim, rbmk_rod_reasim.getUnlocalizedName());
|
||||
@ -3231,6 +3256,7 @@ public class ModBlocks {
|
||||
register(machine_catalytic_reformer);
|
||||
register(machine_hydrotreater);
|
||||
register(machine_coker);
|
||||
register(machine_pyrooven);
|
||||
register(machine_autosaw);
|
||||
register(machine_excavator);
|
||||
register(machine_ore_slopper);
|
||||
@ -3238,6 +3264,7 @@ public class ModBlocks {
|
||||
register(barricade);
|
||||
register(machine_turbofan);
|
||||
register(machine_turbinegas);
|
||||
register(machine_lpw2);
|
||||
GameRegistry.registerBlock(machine_schrabidium_transmutator, machine_schrabidium_transmutator.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_teleporter, machine_teleporter.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(teleanchor, teleanchor.getUnlocalizedName());
|
||||
@ -3311,6 +3338,12 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(iter, iter.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(plasma_heater, plasma_heater.getUnlocalizedName());
|
||||
|
||||
register(watz_element);
|
||||
register(watz_cooler);
|
||||
register(watz_end);
|
||||
register(watz);
|
||||
register(watz_pump);
|
||||
|
||||
register(machine_icf_press);
|
||||
register(icf_laser_component);
|
||||
register(icf_controller);
|
||||
@ -3318,13 +3351,6 @@ public class ModBlocks {
|
||||
register(icf_component);
|
||||
register(icf);
|
||||
|
||||
GameRegistry.registerBlock(watz_element, watz_element.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(watz_cooler, watz_cooler.getUnlocalizedName());
|
||||
register(watz_end);
|
||||
GameRegistry.registerBlock(watz_conductor, watz_conductor.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(watz, watz.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(watz_pump, watz_pump.getUnlocalizedName());
|
||||
|
||||
//E
|
||||
GameRegistry.registerBlock(balefire, balefire.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(fire_digamma, fire_digamma.getUnlocalizedName());
|
||||
@ -3349,6 +3375,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(soyuz_launcher, soyuz_launcher.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(sat_dock, sat_dock.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(soyuz_capsule, soyuz_capsule.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(crate_supply, crate_supply.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_radar, machine_radar.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_radar_large, machine_radar_large.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(radar_screen, radar_screen.getUnlocalizedName());
|
||||
@ -3392,9 +3419,6 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(crate_jungle, crate_jungle.getUnlocalizedName());
|
||||
|
||||
//ElB
|
||||
GameRegistry.registerBlock(statue_elb, statue_elb.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(statue_elb_g, statue_elb_g.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(statue_elb_w, statue_elb_w.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(statue_elb_f, statue_elb_f.getUnlocalizedName());
|
||||
|
||||
//Fluids
|
||||
@ -3411,8 +3435,6 @@ public class ModBlocks {
|
||||
//Multiblock Dummy Blocks
|
||||
GameRegistry.registerBlock(dummy_block_vault, dummy_block_vault.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(dummy_block_blast, dummy_block_blast.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(dummy_block_uf6, dummy_block_uf6.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(dummy_block_puf6, dummy_block_puf6.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(dummy_plate_compact_launcher, dummy_plate_compact_launcher.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(dummy_port_compact_launcher, dummy_port_compact_launcher.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(dummy_plate_launch_table, dummy_plate_launch_table.getUnlocalizedName());
|
||||
@ -3464,4 +3486,20 @@ public class ModBlocks {
|
||||
Block remap = new BlockRemap(block, meta).setBlockName(unloc);
|
||||
register(remap, ItemBlockRemap.class);
|
||||
}
|
||||
|
||||
// Pretty much the default getDrops function but with no damage set on the item (fucks with recipes)
|
||||
// but setting the meta via damageDropped breaks creative middle-click and any WAILA-like overlays
|
||||
public static ArrayList<ItemStack> getDropsWithoutDamage(World world, Block block, int metadata, int fortune) {
|
||||
ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
|
||||
|
||||
int count = block.quantityDropped(metadata, fortune, world.rand);
|
||||
for(int i = 0; i < count; i++) {
|
||||
Item item = block.getItemDropped(metadata, world.rand, fortune);
|
||||
if(item != null) {
|
||||
ret.add(new ItemStack(item, 1, 0));
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,6 +5,9 @@ import java.util.List;
|
||||
import com.hbm.explosion.vanillant.ExplosionVNT;
|
||||
import com.hbm.explosion.vanillant.standard.BlockAllocatorStandard;
|
||||
import com.hbm.explosion.vanillant.standard.BlockProcessorStandard;
|
||||
import com.hbm.explosion.vanillant.standard.EntityProcessorStandard;
|
||||
import com.hbm.explosion.vanillant.standard.PlayerProcessorStandard;
|
||||
import com.hbm.particle.helper.ExplosionCreator;
|
||||
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -22,10 +25,13 @@ public class BlockChargeC4 extends BlockChargeBase {
|
||||
world.setBlockToAir(x, y, z);
|
||||
safe = false;
|
||||
|
||||
ExplosionVNT xnt = new ExplosionVNT(world, x + 0.5, y + 0.5, z + 0.5, 15F).makeStandard();
|
||||
ExplosionVNT xnt = new ExplosionVNT(world, x + 0.5, y + 0.5, z + 0.5, 15F);
|
||||
xnt.setBlockAllocator(new BlockAllocatorStandard(32));
|
||||
xnt.setBlockProcessor(new BlockProcessorStandard().setNoDrop());
|
||||
xnt.setEntityProcessor(new EntityProcessorStandard());
|
||||
xnt.setPlayerProcessor(new PlayerProcessorStandard());
|
||||
xnt.explode();
|
||||
ExplosionCreator.composeEffectSmall(world, x + 0.5, y + 1, z + 0.5);
|
||||
|
||||
return BombReturnCode.DETONATED;
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package com.hbm.blocks.bomb;
|
||||
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.explosion.ExplosionNT;
|
||||
import com.hbm.particle.helper.ExplosionSmallCreator;
|
||||
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import net.minecraft.world.World;
|
||||
@ -17,7 +17,7 @@ public class BlockChargeDynamite extends BlockChargeBase {
|
||||
safe = false;
|
||||
ExplosionNT exp = new ExplosionNT(world, null, x + 0.5, y + 0.5, z + 0.5, 4F);
|
||||
exp.explode();
|
||||
ExplosionLarge.spawnParticles(world, x + 0.5, y + 0.5, z + 0.5, 20);
|
||||
ExplosionSmallCreator.composeEffect(world, x + 0.5, y + 0.5, z + 0.5, 15, 3F, 1.25F);
|
||||
|
||||
return BombReturnCode.DETONATED;
|
||||
}
|
||||
|
||||
@ -2,9 +2,9 @@ package com.hbm.blocks.bomb;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.explosion.ExplosionNT;
|
||||
import com.hbm.explosion.ExplosionNT.ExAttrib;
|
||||
import com.hbm.particle.helper.ExplosionSmallCreator;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -23,7 +23,7 @@ public class BlockChargeMiner extends BlockChargeBase {
|
||||
ExplosionNT exp = new ExplosionNT(world, null, x + 0.5, y + 0.5, z + 0.5, 4F);
|
||||
exp.addAllAttrib(ExAttrib.NOHURT, ExAttrib.ALLDROP);
|
||||
exp.explode();
|
||||
ExplosionLarge.spawnParticles(world, x + 0.5, y + 0.5, z + 0.5, 20);
|
||||
ExplosionSmallCreator.composeEffect(world, x + 0.5, y + 0.5, z + 0.5, 15, 3F, 1.25F);
|
||||
|
||||
return BombReturnCode.DETONATED;
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@ import java.util.List;
|
||||
import com.hbm.explosion.vanillant.ExplosionVNT;
|
||||
import com.hbm.explosion.vanillant.standard.BlockAllocatorStandard;
|
||||
import com.hbm.explosion.vanillant.standard.BlockProcessorStandard;
|
||||
import com.hbm.explosion.vanillant.standard.ExplosionEffectStandard;
|
||||
import com.hbm.particle.helper.ExplosionCreator;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -27,8 +27,8 @@ public class BlockChargeSemtex extends BlockChargeBase {
|
||||
xnt.setBlockProcessor(new BlockProcessorStandard()
|
||||
.setAllDrop()
|
||||
.setFortune(3));
|
||||
xnt.setSFX(new ExplosionEffectStandard());
|
||||
xnt.explode();
|
||||
ExplosionCreator.composeEffectSmall(world, x + 0.5, y + 1, z + 0.5);
|
||||
|
||||
return BombReturnCode.DETONATED;
|
||||
}
|
||||
|
||||
@ -7,8 +7,8 @@ import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.logic.EntityBalefire;
|
||||
import com.hbm.interfaces.IBomb;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
||||
import com.hbm.tileentity.bomb.TileEntityCrashedBomb;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
|
||||
@ -9,8 +9,8 @@ import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.entity.projectile.EntityShrapnel;
|
||||
import com.hbm.explosion.ExplosionNT;
|
||||
import com.hbm.explosion.ExplosionNT.ExAttrib;
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
||||
@ -5,10 +5,10 @@ import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.effect.EntityNukeTorex;
|
||||
import com.hbm.entity.item.EntityTNTPrimedBase;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK5;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.explosion.ExplosionNT;
|
||||
import com.hbm.interfaces.IBomb;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.particle.helper.ExplosionCreator;
|
||||
|
||||
import net.minecraft.util.MathHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@ -65,7 +65,7 @@ public class ExplosiveCharge extends BlockDetonatable implements IBomb, IDetConn
|
||||
}
|
||||
if(this == ModBlocks.det_charge) {
|
||||
new ExplosionNT(world, null, x + 0.5, y + 0.5, z + 0.5, 15).overrideResolution(64).explode();
|
||||
ExplosionLarge.spawnParticles(world, x, y, z, ExplosionLarge.cloudFunction(15));
|
||||
ExplosionCreator.composeEffectStandard(world, x + 0.5, y + 1, z + 0.5);
|
||||
}
|
||||
if(this == ModBlocks.det_nuke) {
|
||||
world.spawnEntityInWorld(EntityNukeExplosionMK5.statFac(world, BombConfig.missileRadius, x + 0.5, y + 0.5, z + 0.5));
|
||||
|
||||
@ -5,6 +5,12 @@ import java.util.Random;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.explosion.ExplosionNukeSmall;
|
||||
import com.hbm.explosion.vanillant.ExplosionVNT;
|
||||
import com.hbm.explosion.vanillant.standard.BlockAllocatorStandard;
|
||||
import com.hbm.explosion.vanillant.standard.BlockProcessorStandard;
|
||||
import com.hbm.explosion.vanillant.standard.EntityProcessorCrossSmooth;
|
||||
import com.hbm.explosion.vanillant.standard.ExplosionEffectWeapon;
|
||||
import com.hbm.explosion.vanillant.standard.PlayerProcessorStandard;
|
||||
import com.hbm.interfaces.IBomb;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.tileentity.bomb.TileEntityLandmine;
|
||||
@ -31,7 +37,6 @@ public class Landmine extends BlockContainer implements IBomb {
|
||||
|
||||
public Landmine(Material mat, double range, double height) {
|
||||
super(mat);
|
||||
|
||||
this.range = range;
|
||||
this.height = height;
|
||||
}
|
||||
@ -41,20 +46,9 @@ public class Landmine extends BlockContainer implements IBomb {
|
||||
return new TileEntityLandmine();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
@Override public int getRenderType() { return -1; }
|
||||
@Override public boolean isOpaqueCube() { return false; }
|
||||
@Override public boolean renderAsNormalBlock() { return false; }
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int i, Random rand, int j) {
|
||||
@ -64,14 +58,10 @@ public class Landmine extends BlockContainer implements IBomb {
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
|
||||
float f = 0.0625F;
|
||||
if(this == ModBlocks.mine_ap)
|
||||
this.setBlockBounds(6 * f, 0.0F, 6 * f, 10 * f, 2 * f, 10 * f);
|
||||
if(this == ModBlocks.mine_he)
|
||||
this.setBlockBounds(4 * f, 0.0F, 4 * f, 12 * f, 2 * f, 12 * f);
|
||||
if(this == ModBlocks.mine_shrap)
|
||||
this.setBlockBounds(4 * f, 0.0F, 4 * f, 12 * f, 2 * f, 12 * f);
|
||||
if(this == ModBlocks.mine_fat)
|
||||
this.setBlockBounds(5 * f, 0.0F, 4 * f, 11 * f, 6 * f, 12 * f);
|
||||
if(this == ModBlocks.mine_ap) this.setBlockBounds(5 * f, 0.0F, 5 * f, 11 * f, 1 * f, 11 * f);
|
||||
if(this == ModBlocks.mine_he) this.setBlockBounds(4 * f, 0.0F, 4 * f, 12 * f, 2 * f, 12 * f);
|
||||
if(this == ModBlocks.mine_shrap) this.setBlockBounds(5 * f, 0.0F, 5 * f, 11 * f, 1 * f, 11 * f);
|
||||
if(this == ModBlocks.mine_fat) this.setBlockBounds(5 * f, 0.0F, 4 * f, 11 * f, 6 * f, 12 * f);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -147,12 +137,26 @@ public class Landmine extends BlockContainer implements IBomb {
|
||||
Landmine.safeMode = false;
|
||||
|
||||
if(this == ModBlocks.mine_ap) {
|
||||
world.newExplosion(null, x + 0.5, y + 0.5, z + 0.5, 2.5F, false, false);
|
||||
ExplosionVNT vnt = new ExplosionVNT(world, x + 0.5, y + 0.5, z + 0.5, 3F);
|
||||
vnt.setEntityProcessor(new EntityProcessorCrossSmooth(0.5, 10F).setupPiercing(5F, 0.2F));
|
||||
vnt.setPlayerProcessor(new PlayerProcessorStandard());
|
||||
vnt.setSFX(new ExplosionEffectWeapon(5, 1F, 0.5F));
|
||||
vnt.explode();
|
||||
} else if(this == ModBlocks.mine_he) {
|
||||
ExplosionLarge.explode(world, x + 0.5, y + 0.5, z + 0.5, 3F, true, false, false);
|
||||
world.newExplosion(null, x + 0.5, y + 2, z + 0.5, 15F, false, false);
|
||||
ExplosionVNT vnt = new ExplosionVNT(world, x + 0.5, y + 0.5, z + 0.5, 4F);
|
||||
vnt.setBlockAllocator(new BlockAllocatorStandard());
|
||||
vnt.setBlockProcessor(new BlockProcessorStandard());
|
||||
vnt.setEntityProcessor(new EntityProcessorCrossSmooth(1, 35).setupPiercing(15F, 0.2F));
|
||||
vnt.setPlayerProcessor(new PlayerProcessorStandard());
|
||||
vnt.setSFX(new ExplosionEffectWeapon(15, 3.5F, 1.25F));
|
||||
vnt.explode();
|
||||
} else if(this == ModBlocks.mine_shrap) {
|
||||
ExplosionLarge.explode(world, x + 0.5, y + 0.5, z + 0.5, 1, true, false, false);
|
||||
ExplosionVNT vnt = new ExplosionVNT(world, x + 0.5, y + 0.5, z + 0.5, 3F);
|
||||
vnt.setEntityProcessor(new EntityProcessorCrossSmooth(0.5, 7.5F));
|
||||
vnt.setPlayerProcessor(new PlayerProcessorStandard());
|
||||
vnt.setSFX(new ExplosionEffectWeapon(5, 1F, 0.5F));
|
||||
vnt.explode();
|
||||
|
||||
ExplosionLarge.spawnShrapnelShower(world, x + 0.5, y + 0.5, z + 0.5, 0, 1D, 0, 45, 0.2D);
|
||||
ExplosionLarge.spawnShrapnels(world, x + 0.5, y + 0.5, z + 0.5, 5);
|
||||
} else if(this == ModBlocks.mine_fat) {
|
||||
@ -162,5 +166,4 @@ public class Landmine extends BlockContainer implements IBomb {
|
||||
|
||||
return BombReturnCode.DETONATED;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -3,8 +3,8 @@ package com.hbm.blocks.generic;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.items.ItemAmmoEnums.*;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo;
|
||||
import com.hbm.lib.RefStrings;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@ -70,26 +70,21 @@ public class BlockAmmoCrate extends Block {
|
||||
ret.add(new ItemStack(ModItems.cap_nuka, 12 + rand.nextInt(21)));
|
||||
ret.add(new ItemStack(ModItems.syringe_metal_stimpak, 1 + rand.nextInt(3)));
|
||||
|
||||
if(rand.nextBoolean()) ret.add(new ItemStack(ModItems.ammo_22lr, 16 + rand.nextInt(17)));
|
||||
if(rand.nextBoolean()) ret.add(new ItemStack(ModItems.ammo_9mm, 6 + rand.nextInt(13)));
|
||||
if(rand.nextBoolean()) ret.add(new ItemStack(ModItems.ammo_12gauge, 6 + rand.nextInt(4)));
|
||||
if(rand.nextBoolean()) ret.add(new ItemStack(ModItems.ammo_20gauge, 3 + rand.nextInt(4)));
|
||||
if(rand.nextBoolean()) ret.add(new ItemStack(ModItems.ammo_357, 10 + rand.nextInt(11)));
|
||||
if(rand.nextBoolean()) ret.add(new ItemStack(ModItems.ammo_357, 12 + rand.nextInt(15), Ammo357Magnum.IRON.ordinal()));
|
||||
if(rand.nextBoolean()) ret.add(new ItemStack(ModItems.ammo_50bmg, 2 + rand.nextInt(7)));
|
||||
if(rand.nextBoolean()) ret.add(new ItemStack(ModItems.ammo_rocket, 1));
|
||||
if(rand.nextBoolean()) ret.add(new ItemStack(ModItems.ammo_grenade, 1 + rand.nextInt(2)));
|
||||
if(rand.nextBoolean()) ret.add(new ItemStack(ModItems.ammo_standard, 16 + rand.nextInt(17), EnumAmmo.P9_SP.ordinal()));
|
||||
if(rand.nextBoolean()) ret.add(new ItemStack(ModItems.ammo_standard, 16 + rand.nextInt(17), EnumAmmo.P9_FMJ.ordinal()));
|
||||
if(rand.nextBoolean()) ret.add(new ItemStack(ModItems.ammo_standard, 16 + rand.nextInt(17), EnumAmmo.M357_SP.ordinal()));
|
||||
if(rand.nextBoolean()) ret.add(new ItemStack(ModItems.ammo_standard, 16 + rand.nextInt(17), EnumAmmo.M357_FMJ.ordinal()));
|
||||
if(rand.nextBoolean()) ret.add(new ItemStack(ModItems.ammo_standard, 16 + rand.nextInt(17), EnumAmmo.M44_SP.ordinal()));
|
||||
if(rand.nextBoolean()) ret.add(new ItemStack(ModItems.ammo_standard, 16 + rand.nextInt(17), EnumAmmo.M44_FMJ.ordinal()));
|
||||
if(rand.nextBoolean()) ret.add(new ItemStack(ModItems.ammo_standard, 16 + rand.nextInt(17), EnumAmmo.R556_SP.ordinal()));
|
||||
if(rand.nextBoolean()) ret.add(new ItemStack(ModItems.ammo_standard, 16 + rand.nextInt(17), EnumAmmo.R556_FMJ.ordinal()));
|
||||
if(rand.nextBoolean()) ret.add(new ItemStack(ModItems.ammo_standard, 16 + rand.nextInt(17), EnumAmmo.R762_SP.ordinal()));
|
||||
if(rand.nextBoolean()) ret.add(new ItemStack(ModItems.ammo_standard, 16 + rand.nextInt(17), EnumAmmo.R762_FMJ.ordinal()));
|
||||
if(rand.nextBoolean()) ret.add(new ItemStack(ModItems.ammo_standard, 16 + rand.nextInt(17), EnumAmmo.G12.ordinal()));
|
||||
if(rand.nextBoolean()) ret.add(new ItemStack(ModItems.ammo_standard, 16 + rand.nextInt(17), EnumAmmo.G12_SLUG.ordinal()));
|
||||
if(rand.nextBoolean()) ret.add(new ItemStack(ModItems.ammo_standard, 2 + rand.nextInt(3), EnumAmmo.G40_HE.ordinal()));
|
||||
if(rand.nextBoolean()) ret.add(new ItemStack(ModItems.ammo_standard, 2 + rand.nextInt(3), EnumAmmo.ROCKET_HE.ordinal()));
|
||||
|
||||
if(rand.nextInt(10) == 0) ret.add(new ItemStack(ModItems.ammo_12gauge, 3, Ammo12Gauge.INCENDIARY.ordinal()));
|
||||
if(rand.nextInt(10) == 0) ret.add(new ItemStack(ModItems.ammo_20gauge, 3, Ammo20Gauge.INCENDIARY.ordinal()));
|
||||
if(rand.nextInt(10) == 0) ret.add(new ItemStack(ModItems.ammo_20gauge, 3, Ammo20Gauge.CAUSTIC.ordinal()));
|
||||
if(rand.nextInt(10) == 0) ret.add(new ItemStack(ModItems.ammo_20gauge, 3, Ammo20Gauge.FLECHETTE.ordinal()));
|
||||
if(rand.nextInt(10) == 0) ret.add(new ItemStack(ModItems.ammo_9mm, 7, Ammo9mm.AP.ordinal()));
|
||||
if(rand.nextInt(10) == 0) ret.add(new ItemStack(ModItems.ammo_rocket, 1, AmmoRocket.INCENDIARY.ordinal()));
|
||||
if(rand.nextInt(10) == 0) ret.add(new ItemStack(ModItems.ammo_rocket, 1, AmmoRocket.SLEEK.ordinal()));
|
||||
if(rand.nextInt(10) == 0) ret.add(new ItemStack(ModItems.ammo_grenade, 1, AmmoGrenade.HE.ordinal()));
|
||||
if(rand.nextInt(10) == 0) ret.add(new ItemStack(ModItems.ammo_grenade, 1, AmmoGrenade.INCENDIARY.ordinal()));
|
||||
if(rand.nextInt(10) == 0) ret.add(new ItemStack(ModItems.ammo_grenade, 1, AmmoGrenade.SLEEK.ordinal()));
|
||||
if(rand.nextInt(10) == 0) ret.add(new ItemStack(ModItems.syringe_metal_super, 2));
|
||||
|
||||
return ret;
|
||||
|
||||
@ -9,7 +9,6 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
@ -199,7 +198,7 @@ public class BlockBobble extends BlockContainer implements IGUIProvider {
|
||||
NOS( "Dr Nostalgia", "Dr Nostalgia", "SSG and Vortex models", "Take a picture, I'ma pose, paparazzi$I've been drinking, moving like a zombie", true, ScrapType.BOARD_TRANSISTOR),
|
||||
DRILLGON( "Drillgon200", "Drillgon200", "1.12 Port", null, false, ScrapType.CPU_LOGIC),
|
||||
CIRNO( "Cirno", "Cirno", "the only multi layered skin i had", "No brain. Head empty.", true, ScrapType.BOARD_BLANK),
|
||||
MICROWAVE( "Microwave", "Microwave", "OC Compatibility", "they call me the food heater", true, ScrapType.BOARD_CONVERTER),
|
||||
MICROWAVE( "Microwave", "Microwave", "OC Compatibility and massive RBMK/packet optimizations", "they call me the food heater$john optimization", true, ScrapType.BOARD_CONVERTER),
|
||||
PEEP( "Peep", "LePeeperSauvage", "Coilgun, Leadburster and Congo Lake models, BDCL QC", "Fluffy ears can't hide in ash, nor snow.", true, ScrapType.CARD_BOARD),
|
||||
MELLOW( "MELLOWARPEGGIATION", "Mellow", "Industrial lighting, animation tools", "Make something cool now, ask for permission later.", true, ScrapType.CARD_PROCESSOR);
|
||||
|
||||
@ -227,7 +226,7 @@ public class BlockBobble extends BlockContainer implements IGUIProvider {
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUIScreenBobble((TileEntityBobble) world.getTileEntity(x, y, z));
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,20 +3,12 @@ package com.hbm.blocks.generic;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.items.tool.ItemToolAbility;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemTool;
|
||||
import net.minecraft.item.Item.ToolMaterial;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.Explosion;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class BlockCoalOil extends Block {
|
||||
|
||||
@ -24,19 +16,6 @@ public class BlockCoalOil extends Block {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(World world, int x, int y, int z, Block b) {
|
||||
|
||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
||||
|
||||
Block n = world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ);
|
||||
|
||||
if(n == ModBlocks.ore_coal_oil_burning || n == ModBlocks.balefire || n == Blocks.fire || n.getMaterial() == Material.lava) {
|
||||
world.scheduleBlockUpdate(x, y, z, this, world.rand.nextInt(20) + 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTick(World world, int x, int y, int z, Random rand) {
|
||||
world.setBlock(x, y, z, ModBlocks.ore_coal_oil_burning);
|
||||
@ -51,58 +30,4 @@ public class BlockCoalOil extends Block {
|
||||
public int quantityDropped(Random rand) {
|
||||
return 2 + rand.nextInt(2);
|
||||
}
|
||||
|
||||
public void onBlockHarvested(World world, int x, int y, int z, int meta, EntityPlayer player) {
|
||||
|
||||
if(doesToolIgnite(player)) {
|
||||
if(world.rand.nextInt(10) == 0)
|
||||
world.setBlock(x, y, z, Blocks.fire);
|
||||
}
|
||||
}
|
||||
|
||||
public void onBlockClicked(World world, int x, int y, int z, EntityPlayer player) {
|
||||
|
||||
if(!world.isRemote)
|
||||
return;
|
||||
|
||||
if(doesToolIgnite(player)) {
|
||||
|
||||
Random rand = world.rand;
|
||||
for(int i = 0; i < 15; i++) {
|
||||
Vec3 vec = Vec3.createVectorHelper(1, 0, 0);
|
||||
vec.rotateAroundZ((float)(Math.PI * rand.nextDouble() * 2D));
|
||||
vec.rotateAroundY((float)(Math.PI * rand.nextDouble() * 2D));
|
||||
|
||||
double dX = vec.xCoord;
|
||||
double dY = vec.yCoord;
|
||||
double dZ = vec.zCoord;
|
||||
|
||||
if(Math.abs(dX) > 1)
|
||||
dX /= Math.abs(dX);
|
||||
if(Math.abs(dY) > 1)
|
||||
dY /= Math.abs(dY);
|
||||
if(Math.abs(dX) > 1)
|
||||
dZ /= Math.abs(dZ);
|
||||
|
||||
world.spawnParticle("flame", x + 0.5 + dX * 0.75, y + 0.5 + dY * 0.75, z + 0.5 + dZ * 0.75, 0.0, 0.0, 0.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onBlockDestroyedByExplosion(World world, int x, int y, int z, Explosion explosion) {
|
||||
world.setBlock(x, y, z, Blocks.fire);
|
||||
}
|
||||
|
||||
private boolean doesToolIgnite(EntityPlayer player) {
|
||||
|
||||
if(player.getHeldItem() == null)
|
||||
return false;
|
||||
|
||||
if(!(player.getHeldItem().getItem() instanceof ItemTool || player.getHeldItem().getItem() instanceof ItemToolAbility))
|
||||
return false;
|
||||
|
||||
ItemTool tool = (ItemTool) player.getHeldItem().getItem();
|
||||
|
||||
return tool.func_150913_i() != ToolMaterial.WOOD;
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@ import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.items.ItemAmmoEnums.Ammo44Magnum;
|
||||
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmoSecret;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.block.BlockFalling;
|
||||
@ -52,18 +52,6 @@ public class BlockCrate extends BlockFalling {
|
||||
// Supply Crate
|
||||
BlockCrate.addToListWithWeight(crateList, ModItems.syringe_metal_stimpak, 10);
|
||||
BlockCrate.addToListWithWeight(crateList, ModItems.syringe_antidote, 5);
|
||||
BlockCrate.addToListWithWeight(crateList, ModItems.clip_revolver_iron, 9);
|
||||
BlockCrate.addToListWithWeight(crateList, ModItems.clip_revolver, 7);
|
||||
BlockCrate.addToListWithWeight(crateList, ModItems.clip_revolver_gold, 4);
|
||||
BlockCrate.addToListWithWeight(crateList, ModItems.clip_revolver_lead, 6);
|
||||
BlockCrate.addToListWithWeight(crateList, ModItems.clip_revolver_cursed, 5);
|
||||
BlockCrate.addToListWithWeight(crateList, ModItems.clip_rpg, 5);
|
||||
BlockCrate.addToListWithWeight(crateList, ModItems.clip_fatman, 1);
|
||||
BlockCrate.addToListWithWeight(crateList, ModItems.clip_mp40, 7);
|
||||
BlockCrate.addToListWithWeight(crateList, ModItems.clip_uzi, 7);
|
||||
BlockCrate.addToListWithWeight(crateList, ModItems.clip_uboinik, 7);
|
||||
BlockCrate.addToListWithWeight(crateList, ModItems.clip_lever_action, 5);
|
||||
BlockCrate.addToListWithWeight(crateList, ModItems.clip_bolt_action, 5);
|
||||
BlockCrate.addToListWithWeight(crateList, ModItems.grenade_generic, 8);
|
||||
BlockCrate.addToListWithWeight(crateList, ModItems.grenade_strong, 6);
|
||||
BlockCrate.addToListWithWeight(crateList, ModItems.grenade_mk2, 4);
|
||||
@ -71,21 +59,13 @@ public class BlockCrate extends BlockFalling {
|
||||
BlockCrate.addToListWithWeight(crateList, ModItems.ammo_container, 2);
|
||||
|
||||
// Weapon Crate
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_revolver, 9);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_revolver_gold, 7);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_revolver_cursed, 7);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_calamity, 3);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_rpg, 7);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_karl, 4);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_panzerschreck, 6);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_hk69, 8);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_stinger, 7);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_mp40, 9);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_uzi, 6);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_uzi_silencer, 5);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_uboinik, 8);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_lever_action, 7);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_bolt_action, 7);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_light_revolver, 10);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_maresleg, 7);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_heavy_revolver, 5);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_greasegun, 5);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_liberator, 2);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_flaregun, 8);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_panzerschreck, 1);
|
||||
|
||||
// Lead Crate
|
||||
BlockCrate.addToListWithWeight(leadList, ModItems.ingot_uranium, 10);
|
||||
@ -144,12 +124,12 @@ public class BlockCrate extends BlockFalling {
|
||||
|
||||
// Red Crate
|
||||
BlockCrate.addToListWithWeight(redList, ModItems.mysteryshovel, 1);
|
||||
BlockCrate.addToListWithWeight(redList, ModItems.gun_revolver_pip, 1);
|
||||
BlockCrate.addToListWithWeight(redList, ModItems.gun_revolver_blackjack, 1);
|
||||
BlockCrate.addToListWithWeight(redList, ModItems.gun_revolver_silver, 1);
|
||||
BlockCrate.addToListWithWeight(redList, ModItems.ammo_44.stackFromEnum(Ammo44Magnum.PIP), 1);
|
||||
BlockCrate.addToListWithWeight(redList, ModItems.ammo_44.stackFromEnum(Ammo44Magnum.BJ), 1);
|
||||
BlockCrate.addToListWithWeight(redList, ModItems.ammo_44.stackFromEnum(Ammo44Magnum.SILVER), 1);
|
||||
BlockCrate.addToListWithWeight(redList, ModItems.gun_heavy_revolver_lilmac, 1);
|
||||
BlockCrate.addToListWithWeight(redList, ModItems.gun_autoshotgun_sexy, 1);
|
||||
BlockCrate.addToListWithWeight(redList, ModItems.gun_maresleg_broken, 1);
|
||||
BlockCrate.addToListWithWeight(redList, new ItemStack(ModItems.ammo_secret, 1, EnumAmmoSecret.M44_EQUESTRIAN.ordinal()), 1);
|
||||
BlockCrate.addToListWithWeight(redList, new ItemStack(ModItems.ammo_secret, 1, EnumAmmoSecret.G12_EQUESTRIAN.ordinal()), 1);
|
||||
BlockCrate.addToListWithWeight(redList, new ItemStack(ModItems.ammo_secret, 1, EnumAmmoSecret.BMG50_EQUESTRIAN.ordinal()), 1);
|
||||
BlockCrate.addToListWithWeight(redList, ModItems.battery_spark, 1);
|
||||
BlockCrate.addToListWithWeight(redList, ModItems.bottle_sparkle, 1);
|
||||
BlockCrate.addToListWithWeight(redList, ModItems.bottle_rad, 1);
|
||||
|
||||
@ -135,7 +135,7 @@ public class BlockDynamicSlag extends BlockContainer {
|
||||
TileEntitySlag self = (TileEntitySlag) s;
|
||||
|
||||
/* Flow down */
|
||||
if(world.getBlock(x, y - 1, z).isReplaceable(world, x, y - 1, z)) {
|
||||
if(world.getBlock(x, y - 1, z).isReplaceable(world, x, y - 1, z) && y > 0) {
|
||||
world.setBlock(x, y - 1, z, ModBlocks.slag);
|
||||
TileEntitySlag tile = (TileEntitySlag) Compat.getTileStandard(world, x, y - 1, z);
|
||||
tile.mat = self.mat;
|
||||
|
||||
@ -4,15 +4,15 @@ import java.awt.Color;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.ITooltipProvider;
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
import com.hbm.packet.NBTPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.tileentity.INBTPacketReceiver;
|
||||
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
||||
|
||||
import api.hbm.block.IToolable;
|
||||
import com.hbm.tileentity.TileEntityLoadedBase;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.BlockPistonBase;
|
||||
@ -103,7 +103,7 @@ public class BlockEmitter extends BlockContainer implements IToolable, ITooltipP
|
||||
return false;
|
||||
}
|
||||
|
||||
public static class TileEntityEmitter extends TileEntity implements INBTPacketReceiver {
|
||||
public static class TileEntityEmitter extends TileEntityLoadedBase {
|
||||
|
||||
public static final int range = 100;
|
||||
public int color;
|
||||
@ -176,12 +176,8 @@ public class BlockEmitter extends BlockContainer implements IToolable, ITooltipP
|
||||
}
|
||||
}
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setInteger("beam", this.beam);
|
||||
data.setInteger("color", this.color);
|
||||
data.setFloat("girth", this.girth);
|
||||
data.setInteger("effect", this.effect);
|
||||
PacketDispatcher.wrapper.sendToAllAround(new NBTPacket(data, xCoord, yCoord, zCoord), new TargetPoint(this.worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 150));
|
||||
networkPackNT(150);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -225,11 +221,19 @@ public class BlockEmitter extends BlockContainer implements IToolable, ITooltipP
|
||||
}
|
||||
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
this.beam = nbt.getInteger("beam");
|
||||
this.color = nbt.getInteger("color");
|
||||
this.girth = nbt.getFloat("girth");
|
||||
this.effect = nbt.getInteger("effect");
|
||||
public void serialize(ByteBuf buf) {
|
||||
buf.writeInt(this.beam);
|
||||
buf.writeInt(this.color);
|
||||
buf.writeFloat(this.girth);
|
||||
buf.writeInt(this.effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deserialize(ByteBuf buf) {
|
||||
this.beam = buf.readInt();
|
||||
this.color = buf.readInt();
|
||||
this.girth = buf.readFloat();
|
||||
this.effect = buf.readInt();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -22,6 +22,7 @@ public class BlockGlyphid extends Block implements IBlockMulti {
|
||||
|
||||
public IIcon[] iconsStandard = new IIcon[2];
|
||||
public IIcon[] iconsInfested = new IIcon[2];
|
||||
public IIcon[] iconsRad = new IIcon[2];
|
||||
|
||||
public BlockGlyphid(Material mat) {
|
||||
super(mat);
|
||||
@ -57,16 +58,19 @@ public class BlockGlyphid extends Block implements IBlockMulti {
|
||||
iconsStandard[1] = reg.registerIcon(RefStrings.MODID + ":glyphid_base_alt");
|
||||
iconsInfested[0] = reg.registerIcon(RefStrings.MODID + ":glyphid_base_infested");
|
||||
iconsInfested[1] = reg.registerIcon(RefStrings.MODID + ":glyphid_base_infested_alt");
|
||||
iconsRad[0] = reg.registerIcon(RefStrings.MODID + ":glyphid_base_rad");
|
||||
iconsRad[1] = reg.registerIcon(RefStrings.MODID + ":glyphid_base_rad_alt");
|
||||
}
|
||||
|
||||
protected IIcon[] getIconArray(int meta) {
|
||||
if(meta == 1) return this.iconsInfested;
|
||||
if(meta == 2) return this.iconsRad;
|
||||
return this.iconsStandard;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSubCount() {
|
||||
return 2;
|
||||
return 3;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -38,7 +38,7 @@ import net.minecraft.world.World;
|
||||
|
||||
public class BlockGlyphidSpawner extends BlockContainer implements IBlockMulti {
|
||||
|
||||
public IIcon[] icons = new IIcon[2];
|
||||
public IIcon[] icons = new IIcon[3];
|
||||
|
||||
public BlockGlyphidSpawner(Material mat) {
|
||||
super(mat);
|
||||
@ -61,11 +61,12 @@ public class BlockGlyphidSpawner extends BlockContainer implements IBlockMulti {
|
||||
public void registerBlockIcons(IIconRegister reg) {
|
||||
icons[0] = reg.registerIcon(RefStrings.MODID + ":glyphid_eggs_alt");
|
||||
icons[1] = reg.registerIcon(RefStrings.MODID + ":glyphid_eggs_infested");
|
||||
icons[2] = reg.registerIcon(RefStrings.MODID + ":glyphid_eggs_rad");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSubCount() {
|
||||
return 2;
|
||||
return 3;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -122,15 +123,16 @@ public class BlockGlyphidSpawner extends BlockContainer implements IBlockMulti {
|
||||
List<EntityGlyphid> list = worldObj.getEntitiesWithinAABB(EntityGlyphid.class, AxisAlignedBB.getBoundingBox(xCoord - 5, yCoord + 1, zCoord - 5, xCoord + 6, yCoord + 7, zCoord + 6));
|
||||
float soot = PollutionHandler.getPollution(worldObj, xCoord, yCoord, zCoord, PollutionType.SOOT);
|
||||
|
||||
if(list.size() <= 3) {
|
||||
int subtype = this.getBlockMetadata();
|
||||
if(list.size() <= 3 || subtype == EntityGlyphid.TYPE_RADIOACTIVE) {
|
||||
|
||||
ArrayList<EntityGlyphid> currentSwarm = createSwarm(soot, this.getBlockMetadata());
|
||||
ArrayList<EntityGlyphid> currentSwarm = createSwarm(soot, subtype);
|
||||
|
||||
for(EntityGlyphid glyphid : currentSwarm) {
|
||||
trySpawnEntity(glyphid);
|
||||
}
|
||||
|
||||
if(!initialSpawn && worldObj.rand.nextInt(MobConfig.scoutSwarmSpawnChance + 1) == 0 && soot >= MobConfig.scoutThreshold) {
|
||||
if(!initialSpawn && worldObj.rand.nextInt(MobConfig.scoutSwarmSpawnChance + 1) == 0 && soot >= MobConfig.scoutThreshold && subtype != EntityGlyphid.TYPE_RADIOACTIVE) {
|
||||
EntityGlyphidScout scout = new EntityGlyphidScout(worldObj);
|
||||
if(this.getBlockMetadata() == 1) scout.getDataWatcher().updateObject(EntityGlyphid.DW_SUBTYPE, (byte) EntityGlyphid.TYPE_INFECTED);
|
||||
trySpawnEntity(scout);
|
||||
@ -168,6 +170,7 @@ public class BlockGlyphidSpawner extends BlockContainer implements IBlockMulti {
|
||||
if(soot >= chance[2] && rand.nextInt(100) <= adjustedChance) {
|
||||
EntityGlyphid entity = glyphid.getKey().apply(worldObj);
|
||||
if(meta == 1) entity.getDataWatcher().updateObject(EntityGlyphid.DW_SUBTYPE, (byte) EntityGlyphid.TYPE_INFECTED);
|
||||
if(meta == 2) entity.getDataWatcher().updateObject(EntityGlyphid.DW_SUBTYPE, (byte) EntityGlyphid.TYPE_RADIOACTIVE);
|
||||
currentSpawns.add(entity);
|
||||
}
|
||||
}
|
||||
|
||||
127
src/main/java/com/hbm/blocks/generic/BlockHangingVine.java
Normal file
127
src/main/java/com/hbm/blocks/generic/BlockHangingVine.java
Normal file
@ -0,0 +1,127 @@
|
||||
package com.hbm.blocks.generic;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.IShearable;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class BlockHangingVine extends Block implements IShearable {
|
||||
|
||||
public BlockHangingVine(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity) {
|
||||
entity.motionX *= 0.5;
|
||||
entity.motionY *= 0.5;
|
||||
entity.motionZ *= 0.5;
|
||||
entity.fallDistance = 0F;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlaceBlockAt(World world, int x, int y, int z) {
|
||||
return this.canBlockStay(world, x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBlockStay(World world, int x, int y, int z) {
|
||||
Block b = world.getBlock(x, y + 1, z);
|
||||
return b.isSideSolid(world, x, y + 1, z, ForgeDirection.UP) || b == this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(World world, int x, int y, int z, Block block) {
|
||||
super.onNeighborBlockChange(world, x, y, z, block);
|
||||
this.checkAndDropBlock(world, x, y, z);
|
||||
}
|
||||
|
||||
protected void checkAndDropBlock(World world, int x, int y, int z) {
|
||||
if(!this.canBlockStay(world, x, y, z)) {
|
||||
world.setBlock(x, y, z, Blocks.air);
|
||||
}
|
||||
}
|
||||
|
||||
@Override protected boolean canSilkHarvest() { return true; }
|
||||
|
||||
@Override
|
||||
public boolean isShearable(ItemStack item, IBlockAccess world, int x, int y, int z) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<ItemStack> onSheared(ItemStack item, IBlockAccess world, int x, int y, int z, int fortune) {
|
||||
ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
|
||||
ret.add(new ItemStack(this)); //placeholder
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT) public IIcon iconItem;
|
||||
@SideOnly(Side.CLIENT) public IIcon iconGround; //when touching a solid face below
|
||||
@SideOnly(Side.CLIENT) public IIcon iconHang; //when hanging mid-air
|
||||
@SideOnly(Side.CLIENT) public IIcon iconGlow; //regular phosphor
|
||||
@SideOnly(Side.CLIENT) public IIcon iconHangGlow; //phosphor in different position when hanging for variety
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister reg) {
|
||||
this.iconItem = reg.registerIcon(RefStrings.MODID + ":vine_phosphor_item");
|
||||
this.blockIcon = reg.registerIcon(RefStrings.MODID + ":vine_phosphor");
|
||||
this.iconGround = reg.registerIcon(RefStrings.MODID + ":vine_phosphor_ground");
|
||||
this.iconHang = reg.registerIcon(RefStrings.MODID + ":vine_phosphor_hang");
|
||||
this.iconGlow = reg.registerIcon(RefStrings.MODID + ":vine_phosphor_spots");
|
||||
this.iconHangGlow = reg.registerIcon(RefStrings.MODID + ":vine_phosphor_spots_hang");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(IBlockAccess world, int x, int y, int z, boolean pass) {
|
||||
Block b = world.getBlock(x, y - 1, z);
|
||||
|
||||
if(!pass)
|
||||
return b.isSideSolid(world, x, y, z, ForgeDirection.UP) ? iconGround : b == this ? blockIcon : iconHang;
|
||||
else
|
||||
return b.isAir(world, x, y, z) ? iconHangGlow : iconGlow;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
return this.iconItem;
|
||||
}
|
||||
|
||||
public static int renderID = RenderingRegistry.getNextAvailableRenderId();
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return renderID;
|
||||
}
|
||||
}
|
||||
@ -108,6 +108,14 @@ public class BlockKeyhole extends BlockStone {
|
||||
}
|
||||
}
|
||||
|
||||
if(world.rand.nextInt(1) == 0) {
|
||||
int r = world.rand.nextInt(4);
|
||||
if(r == 0) world.setBlock(x + width, y + 2, z, ModBlocks.stone_keyhole_meta, 4, 3);
|
||||
if(r == 1) world.setBlock(x - width, y + 2, z, ModBlocks.stone_keyhole_meta, 5, 3);
|
||||
if(r == 2) world.setBlock(x, y + 2, z + width, ModBlocks.stone_keyhole_meta, 2, 3);
|
||||
if(r == 3) world.setBlock(x, y + 2, z - width, ModBlocks.stone_keyhole_meta, 3, 3);
|
||||
}
|
||||
|
||||
for(int i = -width + 1; i <= width - 1; i++) {
|
||||
for(int j = -width + 1; j <= width - 1; j++) {
|
||||
//Floor and ceiling
|
||||
|
||||
@ -1,319 +0,0 @@
|
||||
package com.hbm.blocks.generic;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.google.common.collect.HashBiMap;
|
||||
import com.hbm.blocks.IBlockMultiPass;
|
||||
import com.hbm.config.WorldConfig;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.block.RenderBlockMultipass;
|
||||
import com.hbm.util.ColorUtil;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.NetworkManager;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
public class BlockMotherOfAllOres extends BlockContainer implements IBlockMultiPass {
|
||||
|
||||
public static int override = -1;
|
||||
|
||||
public static void shuffleOverride(Random rand) {
|
||||
override = rand.nextInt(uniqueItems.size());
|
||||
}
|
||||
|
||||
public static void resetOverride() {
|
||||
override = -1;
|
||||
}
|
||||
|
||||
public BlockMotherOfAllOres() {
|
||||
super(Material.rock);
|
||||
this.setBlockTextureName("stone");
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileEntityRandomOre();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List list) {
|
||||
|
||||
for(int i = 0; i < uniqueItems.size(); i++)
|
||||
list.add(new ItemStack(item, 1, i));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) {
|
||||
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
|
||||
if(te instanceof TileEntityRandomOre) {
|
||||
TileEntityRandomOre ore = (TileEntityRandomOre) te;
|
||||
return new ItemStack(this, 1, ore.getStackId());
|
||||
}
|
||||
|
||||
return new ItemStack(ModItems.nothing);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
|
||||
ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
|
||||
|
||||
if(fortune == 0xFECE00) {
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
|
||||
if(te instanceof TileEntityRandomOre) {
|
||||
TileEntityRandomOre ore = (TileEntityRandomOre) te;
|
||||
ComparableStack item = ore.getCompStack();
|
||||
ret.add(item.toStack());
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
|
||||
this.dropBlockAsItemWithChance(world, x, y, z, meta, 1, 0xFECE00);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entity, ItemStack stack) {
|
||||
((TileEntityRandomOre)world.getTileEntity(x, y, z)).setItem(stack.getItemDamage());
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType(){
|
||||
return IBlockMultiPass.getRenderType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPasses() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
private IIcon[] overlays = new IIcon[10];
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister reg) {
|
||||
|
||||
this.blockIcon = reg.registerIcon("stone");
|
||||
for(int i = 0; i < overlays.length; i++) {
|
||||
overlays[i] = reg.registerIcon(RefStrings.MODID + ":ore_random_" + (i + 1));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) {
|
||||
|
||||
if(RenderBlockMultipass.currentPass == 0)
|
||||
return Blocks.stone.getIcon(0, 0);
|
||||
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
|
||||
if(te instanceof TileEntityRandomOre) {
|
||||
TileEntityRandomOre ore = (TileEntityRandomOre) te;
|
||||
int index = ore.getStackId() % overlays.length;
|
||||
return overlays[index];
|
||||
}
|
||||
|
||||
return Blocks.stone.getIcon(0, 0);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
|
||||
if(RenderBlockMultipass.currentPass == 0)
|
||||
return Blocks.stone.getIcon(0, 0);
|
||||
|
||||
int index = meta % overlays.length;
|
||||
return overlays[index];
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int colorMultiplier(IBlockAccess world, int x, int y, int z) {
|
||||
|
||||
if(RenderBlockMultipass.currentPass == 0)
|
||||
return 0xffffff;
|
||||
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
|
||||
if(te instanceof TileEntityRandomOre) {
|
||||
TileEntityRandomOre ore = (TileEntityRandomOre) te;
|
||||
ItemStack stack = ore.getStack();
|
||||
int color = ColorUtil.getAverageColorFromStack(stack);
|
||||
color = ColorUtil.amplifyColor(color);
|
||||
|
||||
Color col = new Color(color);
|
||||
int r = col.getRed();
|
||||
int g = col.getGreen();
|
||||
int b = col.getBlue();
|
||||
|
||||
float[] hsb = new Color(color).RGBtoHSB(r, g, b, new float[3]);
|
||||
|
||||
if(hsb[1] > 0F && hsb[1] < 0.75F)
|
||||
hsb[1] = 0.75F;
|
||||
|
||||
color = Color.HSBtoRGB(hsb[0], hsb[1], hsb[2]);
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
return super.colorMultiplier(world, x, y, z);
|
||||
}
|
||||
|
||||
public static class TileEntityRandomOre extends TileEntity {
|
||||
|
||||
private ComparableStack stack;
|
||||
|
||||
public TileEntityRandomOre() {
|
||||
if(override != -1) {
|
||||
setItem(override);
|
||||
}
|
||||
}
|
||||
|
||||
public void setItem(int id) {
|
||||
ComparableStack comp = itemMap.get(id);
|
||||
this.stack = comp != null ? ((ComparableStack) comp.copy()) : null;
|
||||
|
||||
if(this.worldObj != null)
|
||||
this.worldObj.markTileEntityChunkModified(this.xCoord, this.yCoord, this.zCoord, this);
|
||||
}
|
||||
|
||||
public int getStackId() {
|
||||
return itemMap.inverse().get(getCompStack());
|
||||
}
|
||||
|
||||
public ItemStack getStack() {
|
||||
return getCompStack().toStack();
|
||||
}
|
||||
|
||||
public ComparableStack getCompStack() {
|
||||
|
||||
if(stack == null) {
|
||||
int rand = worldObj.rand.nextInt(uniqueItems.size());
|
||||
stack = (ComparableStack) itemMap.get(rand).copy();
|
||||
this.worldObj.markTileEntityChunkModified(this.xCoord, this.yCoord, this.zCoord, this);
|
||||
}
|
||||
|
||||
return stack != null ? stack : new ComparableStack(ModItems.nothing);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canUpdate() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
int key = nbt.getInteger("item");
|
||||
this.setItem(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
|
||||
try {
|
||||
Integer key = itemMap.inverse().get(getCompStack());
|
||||
nbt.setInteger("item", key != null ? key : 0);
|
||||
} catch(Exception ex) { }
|
||||
}
|
||||
|
||||
@Override
|
||||
public Packet getDescriptionPacket() {
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
this.writeToNBT(nbt);
|
||||
return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 0, nbt);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) {
|
||||
this.readFromNBT(pkt.func_148857_g());
|
||||
}
|
||||
}
|
||||
|
||||
public static class ItemRandomOreBlock extends ItemBlock {
|
||||
|
||||
public ItemRandomOreBlock(Block block) {
|
||||
super(block);
|
||||
this.setHasSubtypes(true);
|
||||
this.setMaxDamage(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemStackDisplayName(ItemStack stack) {
|
||||
ComparableStack comp = itemMap.get(stack.getItemDamage());
|
||||
ItemStack name = comp != null ? comp.toStack() : new ItemStack(ModItems.nothing);
|
||||
if(name.getItemDamage() == OreDictionary.WILDCARD_VALUE) {
|
||||
name.setItemDamage(0);
|
||||
}
|
||||
return StatCollector.translateToLocalFormatted(this.getUnlocalizedName() + ".name", name.getItem().getItemStackDisplayName(name));
|
||||
}
|
||||
}
|
||||
|
||||
public static HashSet<ComparableStack> uniqueItems = new HashSet();
|
||||
public static HashBiMap<Integer, ComparableStack> itemMap = HashBiMap.create();
|
||||
|
||||
public static void init() {
|
||||
|
||||
if(WorldConfig.enableRandom) {
|
||||
for(Object b : Block.blockRegistry.getKeys()) {
|
||||
Block block = Block.getBlockFromName((String) b);
|
||||
if(block != null && Item.getItemFromBlock(block) != null)
|
||||
uniqueItems.add(new ComparableStack(block));
|
||||
}
|
||||
|
||||
for(Object i : Item.itemRegistry.getKeys()) {
|
||||
Item item = (Item) Item.itemRegistry.getObject((String) i);
|
||||
uniqueItems.add(new ComparableStack(item));
|
||||
}
|
||||
|
||||
for(String i : OreDictionary.getOreNames()) {
|
||||
for(ItemStack stack : OreDictionary.getOres(i)) {
|
||||
uniqueItems.add(new ComparableStack(stack));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
uniqueItems.add(new ComparableStack(ModItems.nothing));
|
||||
}
|
||||
|
||||
int i = 0;
|
||||
for(ComparableStack stack : uniqueItems) {
|
||||
itemMap.put(i++, stack);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,5 +1,6 @@
|
||||
package com.hbm.blocks.generic;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Locale;
|
||||
import java.util.Random;
|
||||
|
||||
@ -7,16 +8,22 @@ import com.hbm.blocks.BlockEnumMulti;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class BlockOreBasalt extends BlockEnumMulti {
|
||||
|
||||
protected IIcon[] topIcons;
|
||||
|
||||
public BlockOreBasalt() {
|
||||
super(Material.rock, EnumBasaltOreType.class, true, true);
|
||||
}
|
||||
@ -47,11 +54,6 @@ public class BlockOreBasalt extends BlockEnumMulti {
|
||||
return super.getItemDropped(meta, rand, fortune);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int meta) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntityWalking(World world, int x, int y, int z, Entity entity) {
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
@ -62,18 +64,38 @@ public class BlockOreBasalt extends BlockEnumMulti {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(World world, int x, int y, int z, Block block) {
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
if(meta == EnumBasaltOreType.ASBESTOS.ordinal()) for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
||||
if(world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ) == Blocks.air) {
|
||||
world.setBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, ModBlocks.gas_asbestos);
|
||||
}
|
||||
}
|
||||
}
|
||||
public void onNeighborBlockChange(World world, int x, int y, int z, Block block) { } //no more BUD outgassing for you, mister
|
||||
|
||||
@Override
|
||||
public void dropBlockAsItemWithChance(World world, int x, int y, int z, int meta, float chance, int fortune) {
|
||||
if(meta == EnumBasaltOreType.ASBESTOS.ordinal()) world.setBlock(x, y, z, ModBlocks.gas_asbestos);
|
||||
super.dropBlockAsItemWithChance(world, x, y, z, meta, chance, fortune);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
|
||||
return ModBlocks.getDropsWithoutDamage(world, this, metadata, fortune);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister reg) {
|
||||
super.registerBlockIcons(reg);
|
||||
|
||||
Enum[] enums = theEnum.getEnumConstants();
|
||||
this.topIcons = new IIcon[enums.length];
|
||||
|
||||
for(int i = 0; i < topIcons.length; i++) {
|
||||
Enum num = enums[i];
|
||||
this.topIcons[i] = reg.registerIcon(this.getTextureMultiName(num) + "_top");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
if(side <= 1) return this.topIcons[meta % this.topIcons.length];
|
||||
return super.getIcon(side, meta);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -103,7 +103,7 @@ public class BlockOutgas extends BlockOre {
|
||||
@Override
|
||||
public void onNeighborBlockChange(World world, int x, int y, int z, Block block) {
|
||||
|
||||
if(onNeighbour) {
|
||||
if(onNeighbour && world.rand.nextInt(3) == 0) {
|
||||
|
||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
||||
|
||||
|
||||
@ -1,6 +1,10 @@
|
||||
package com.hbm.blocks.generic;
|
||||
|
||||
import com.hbm.inventory.recipes.PedestalRecipes;
|
||||
import com.hbm.inventory.recipes.PedestalRecipes.PedestalRecipe;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.particle.helper.ExplosionSmallCreator;
|
||||
import com.hbm.util.Compat;
|
||||
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@ -20,6 +24,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class BlockPedestal extends BlockContainer {
|
||||
|
||||
@ -108,6 +113,73 @@ public class BlockPedestal extends BlockContainer {
|
||||
super.breakBlock(world, x, y, z, block, meta);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(World world, int x, int y, int z, Block b) {
|
||||
if(!world.isRemote) {
|
||||
if(world.isBlockIndirectlyGettingPowered(x, y, z)) {
|
||||
|
||||
TileEntityPedestal nw = castOrNull(Compat.getTileStandard(world, x + ForgeDirection.NORTH.offsetX * 2 + ForgeDirection.WEST.offsetX * 2, y, z + ForgeDirection.NORTH.offsetZ * 2 + ForgeDirection.WEST.offsetZ * 2));
|
||||
TileEntityPedestal n = castOrNull(Compat.getTileStandard(world, x + ForgeDirection.NORTH.offsetX * 3, y, z + ForgeDirection.NORTH.offsetZ * 3));
|
||||
TileEntityPedestal ne = castOrNull(Compat.getTileStandard(world, x + ForgeDirection.NORTH.offsetX * 2 + ForgeDirection.EAST.offsetX * 2, y, z + ForgeDirection.NORTH.offsetZ * 2 + ForgeDirection.EAST.offsetZ * 2));
|
||||
TileEntityPedestal w = castOrNull(Compat.getTileStandard(world, x + ForgeDirection.WEST.offsetX * 3, y, z + ForgeDirection.WEST.offsetZ * 3));
|
||||
TileEntityPedestal center = (TileEntityPedestal) world.getTileEntity(x, y, z);
|
||||
TileEntityPedestal e = castOrNull(Compat.getTileStandard(world, x + ForgeDirection.EAST.offsetX * 3, y, z + ForgeDirection.EAST.offsetZ * 3));
|
||||
TileEntityPedestal sw = castOrNull(Compat.getTileStandard(world, x + ForgeDirection.SOUTH.offsetX * 2 + ForgeDirection.WEST.offsetX * 2, y, z + ForgeDirection.SOUTH.offsetZ * 2 + ForgeDirection.WEST.offsetZ * 2));
|
||||
TileEntityPedestal s = castOrNull(Compat.getTileStandard(world, x + ForgeDirection.SOUTH.offsetX * 3, y, z + ForgeDirection.SOUTH.offsetZ * 3));
|
||||
TileEntityPedestal se = castOrNull(Compat.getTileStandard(world, x + ForgeDirection.SOUTH.offsetX * 2 + ForgeDirection.EAST.offsetX * 2, y, z + ForgeDirection.SOUTH.offsetZ * 2 + ForgeDirection.EAST.offsetZ * 2));
|
||||
|
||||
TileEntityPedestal[] tileArray = new TileEntityPedestal[] {nw, n, ne, w, center, e, sw, s, se};
|
||||
|
||||
outer: for(PedestalRecipe recipe : PedestalRecipes.recipes) {
|
||||
|
||||
if(recipe.extra == recipe.extra.FULL_MOON) {
|
||||
if(world.getCelestialAngle(0) < 0.35 || world.getCelestialAngle(0) > 0.65) continue;
|
||||
if(world.provider.getMoonPhase(world.getWorldInfo().getWorldTime()) != 0) continue;
|
||||
}
|
||||
|
||||
if(recipe.extra == recipe.extra.NEW_MOON) {
|
||||
if(world.getCelestialAngle(0) < 0.35 || world.getCelestialAngle(0) > 0.65) continue;
|
||||
if(world.provider.getMoonPhase(world.getWorldInfo().getWorldTime()) != 4) continue;
|
||||
}
|
||||
|
||||
if(recipe.extra == recipe.extra.SUN) {
|
||||
if(world.getCelestialAngle(0) > 0.15 && world.getCelestialAngle(0) < 0.85) continue;
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++) {
|
||||
ItemStack pedestal = tileArray[i] != null ? tileArray[i].item : null;
|
||||
if(pedestal == null && recipe.input[i] != null) continue outer;
|
||||
if(pedestal != null && recipe.input[i] == null) continue outer;
|
||||
if(pedestal == null && recipe.input[i] == null) continue;
|
||||
|
||||
if(!recipe.input[i].matchesRecipe(pedestal, true) || recipe.input[i].stacksize != pedestal.stackSize) continue outer;
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++) {
|
||||
if(i == 4) continue;
|
||||
ItemStack pedestal = tileArray[i] != null ? tileArray[i].item : null;
|
||||
if(pedestal == null && recipe.input[i] == null) continue;
|
||||
tileArray[i].item = null;
|
||||
tileArray[i].markDirty();
|
||||
world.markBlockForUpdate(tileArray[i].xCoord, tileArray[i].yCoord, tileArray[i].zCoord);
|
||||
}
|
||||
|
||||
center.item = recipe.output.copy();
|
||||
center.markDirty();
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
ExplosionSmallCreator.composeEffect(world, x + 0.5, y + 1.5, z + 0.5, 10, 2.5F, 1F);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static TileEntityPedestal castOrNull(TileEntity tile) {
|
||||
if(tile instanceof TileEntityPedestal) return (TileEntityPedestal) tile;
|
||||
return null;
|
||||
}
|
||||
|
||||
public static class TileEntityPedestal extends TileEntity {
|
||||
|
||||
public ItemStack item;
|
||||
|
||||
@ -142,7 +142,8 @@ public class BlockPlushie extends BlockContainer implements IBlockMulti, IToolti
|
||||
public static enum PlushieType {
|
||||
NONE( "NONE", null),
|
||||
YOMI( "Yomi", "Hi! Can I be your rabbit friend?"),
|
||||
NUMBERNINE( "Number Nine", "None of y'all deserve coal.");
|
||||
NUMBERNINE( "Number Nine", "None of y'all deserve coal."),
|
||||
POOH( "Winnie the Pooh", "Beloved children's character with no malicious intent.");
|
||||
|
||||
public String label;
|
||||
public String inscription;
|
||||
|
||||
161
src/main/java/com/hbm/blocks/generic/BlockRedBrickKeyhole.java
Normal file
161
src/main/java/com/hbm/blocks/generic/BlockRedBrickKeyhole.java
Normal file
@ -0,0 +1,161 @@
|
||||
package com.hbm.blocks.generic;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.generic.BlockPedestal.TileEntityPedestal;
|
||||
import com.hbm.itempool.ItemPool;
|
||||
import com.hbm.itempool.ItemPoolsRedRoom;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.tool.ItemModDoor;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockPistonBase;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.WeightedRandomChestContent;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class BlockRedBrickKeyhole extends Block {
|
||||
|
||||
protected IIcon iconFront;
|
||||
protected IIcon iconTop;
|
||||
|
||||
public BlockRedBrickKeyhole(Material material) {
|
||||
super(material);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.iconFront = iconRegister.registerIcon(RefStrings.MODID + ":stone_keyhole_meta");
|
||||
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":brick_red_top");
|
||||
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":brick_base");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
return side == meta ? (side == 0 || side == 1 ? this.iconTop : this.iconFront) : this.blockIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int i, Random rand, int j) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z, EntityPlayer player) {
|
||||
return new ItemStack(ModBlocks.brick_red);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack) {
|
||||
int l = BlockPistonBase.determineOrientation(world, x, y, z, player);
|
||||
world.setBlockMetadataWithNotify(x, y, z, l, 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
|
||||
if(player.getHeldItem() != null) {
|
||||
boolean cracked = player.getHeldItem().getItem() == ModItems.key_red_cracked;
|
||||
if((player.getHeldItem().getItem() == ModItems.key_red || cracked) && side != 0 && side != 1) {
|
||||
if(cracked) player.getHeldItem().stackSize--;
|
||||
if(world.isRemote) return true;
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(side);
|
||||
generateRoom(world, x - dir.offsetX * 4, y - 2, z - dir.offsetZ * 4, dir);
|
||||
int b = 0;
|
||||
if(side == 2) b = 1;
|
||||
if(side == 5) b = 2;
|
||||
if(side == 3) b = 3;
|
||||
if(side == 4) b = 0;
|
||||
ItemModDoor.placeDoorBlock(world, x, y - 1, z, b, ModBlocks.door_red);
|
||||
world.playSoundAtEntity(player, "hbm:block.lockOpen", 1.0F, 1.0F);
|
||||
player.triggerAchievement(MainRegistry.achRedRoom);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
protected static void generateRoom(World world, int x, int y, int z, ForgeDirection dir) {
|
||||
|
||||
int size = 9;
|
||||
int height = 5;
|
||||
int width = size / 2;
|
||||
|
||||
//Outer Edges, top and bottom
|
||||
for(int i = -width; i <= width; i++) {
|
||||
world.setBlock(x + i, y, z + width, ModBlocks.brick_red, 6, 3);
|
||||
world.setBlock(x + i, y, z - width, ModBlocks.brick_red, 6, 3);
|
||||
world.setBlock(x + width, y, z + i, ModBlocks.brick_red, 6, 3);
|
||||
world.setBlock(x - width, y, z + i, ModBlocks.brick_red, 6, 3);
|
||||
world.setBlock(x + i, y + height - 1, z + width, ModBlocks.brick_red, 6, 3);
|
||||
world.setBlock(x + i, y + height - 1, z - width, ModBlocks.brick_red, 6, 3);
|
||||
world.setBlock(x + width, y + height - 1, z + i, ModBlocks.brick_red, 6, 3);
|
||||
world.setBlock(x - width, y + height - 1, z + i, ModBlocks.brick_red, 6, 3);
|
||||
}
|
||||
|
||||
for(int i = 1; i <= height - 2; i++) {
|
||||
//Outer edges, sides
|
||||
world.setBlock(x + width, y + i, z + width, ModBlocks.brick_red, 6, 3);
|
||||
world.setBlock(x + width, y + i, z - width, ModBlocks.brick_red, 6, 3);
|
||||
world.setBlock(x - width, y + i, z + width, ModBlocks.brick_red, 6, 3);
|
||||
world.setBlock(x - width, y + i, z - width, ModBlocks.brick_red, 6, 3);
|
||||
|
||||
//Walls
|
||||
for(int j = -width + 1; j <= width - 1; j++) {
|
||||
if(dir != Library.POS_X) world.setBlock(x + width, y + i, z + j, ModBlocks.brick_red, 6, 3);
|
||||
if(dir != Library.NEG_X) world.setBlock(x - width, y + i, z + j, ModBlocks.brick_red, 6, 3);
|
||||
if(dir != Library.POS_Z) world.setBlock(x + j, y + i, z + width, ModBlocks.brick_red, 6, 3);
|
||||
if(dir != Library.NEG_Z) world.setBlock(x + j, y + i, z - width, ModBlocks.brick_red, 6, 3);
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = -width + 1; i <= width - 1; i++) {
|
||||
for(int j = -width + 1; j <= width - 1; j++) {
|
||||
//Floor and ceiling
|
||||
world.setBlock(x + i, y, z + j, ModBlocks.brick_red, 6, 3);
|
||||
world.setBlock(x + i, y + height - 1, z + j, ModBlocks.brick_red, 6, 3);
|
||||
|
||||
for(int k = 1; k <= height - 2; k++) {
|
||||
world.setBlock(x + i, y + k, z + j, Blocks.air);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
spawnPedestalItem(world, x, y + 1, z, ItemPool.getPool(ItemPoolsRedRoom.POOL_BLACK_SLAB));
|
||||
if(world.rand.nextBoolean()) spawnPedestalItem(world, x + 2, y + 1, z, ItemPool.getPool(ItemPoolsRedRoom.POOL_BLACK_PART));
|
||||
if(world.rand.nextBoolean()) spawnPedestalItem(world, x - 2, y + 1, z, ItemPool.getPool(ItemPoolsRedRoom.POOL_BLACK_PART));
|
||||
if(world.rand.nextBoolean()) spawnPedestalItem(world, x, y + 1, z + 2, ItemPool.getPool(ItemPoolsRedRoom.POOL_BLACK_PART));
|
||||
if(world.rand.nextBoolean()) spawnPedestalItem(world, x, y + 1, z - 2, ItemPool.getPool(ItemPoolsRedRoom.POOL_BLACK_PART));
|
||||
|
||||
//Clear dropped items
|
||||
List<EntityItem> items = world.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(x + 0.5, y, z + 0.5, x + 0.5, y + height, z + 0.5).expand(size / 2D, 0, size / 2D));
|
||||
for(EntityItem item : items) item.setDead();
|
||||
}
|
||||
|
||||
public static void spawnPedestalItem(World world, int x, int y, int z, WeightedRandomChestContent[] pool) {
|
||||
world.setBlock(x, y, z, ModBlocks.pedestal);
|
||||
TileEntityPedestal pedestal = (TileEntityPedestal) world.getTileEntity(x, y, z);
|
||||
pedestal.item = ItemPool.getStack(pool, world.rand).copy();
|
||||
}
|
||||
}
|
||||
@ -1,10 +1,16 @@
|
||||
package com.hbm.blocks.generic;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.hbm.blocks.BlockEnumMulti;
|
||||
import com.hbm.blocks.BlockEnums;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.inventory.OreDictManager.DictFrame;
|
||||
import com.hbm.items.ItemEnums.EnumChunkType;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockResourceStone extends BlockEnumMulti {
|
||||
@ -22,4 +28,16 @@ public class BlockResourceStone extends BlockEnumMulti {
|
||||
|
||||
super.dropBlockAsItemWithChance(world, x, y, z, meta, chance, fortune);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int meta, int fortune) {
|
||||
|
||||
if(meta == BlockEnums.EnumStoneType.MALACHITE.ordinal()) {
|
||||
ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
|
||||
ret.add(DictFrame.fromOne(ModItems.chunk_ore, EnumChunkType.MALACHITE, 3 + fortune + world.rand.nextInt(fortune + 2)));
|
||||
return ret;
|
||||
}
|
||||
|
||||
return super.getDrops(world, x, y, z, meta, fortune);
|
||||
}
|
||||
}
|
||||
|
||||
@ -16,6 +16,7 @@ import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class BlockScaffold extends BlockMulti {
|
||||
|
||||
@ -60,21 +61,33 @@ public class BlockScaffold extends BlockMulti {
|
||||
return this.icons[this.damageDropped(meta)];
|
||||
}
|
||||
|
||||
@Override
|
||||
public int onBlockPlaced(World world, int x, int y, int z, int side, float fx, float fy, float fz, int meta) {
|
||||
return side;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack) {
|
||||
int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
|
||||
ForgeDirection placed = ForgeDirection.getOrientation(world.getBlockMetadata(x, y, z));
|
||||
int meta = stack.getItemDamage();
|
||||
|
||||
if(i % 2 == 0) {
|
||||
if(placed == ForgeDirection.UP || placed == ForgeDirection.DOWN) {
|
||||
int rot = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
|
||||
if(rot % 2 == 0) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, meta, 2);
|
||||
} else {
|
||||
world.setBlockMetadataWithNotify(x, y, z, meta + 8, 2);
|
||||
}
|
||||
} else if(placed == ForgeDirection.NORTH || placed == ForgeDirection.SOUTH) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, meta + 4, 2);
|
||||
} else {
|
||||
world.setBlockMetadataWithNotify(x, y, z, meta + 12, 2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int meta) {
|
||||
return rectify(meta) & 7;
|
||||
return rectify(meta);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -83,27 +96,24 @@ public class BlockScaffold extends BlockMulti {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_) {
|
||||
int te = p_149719_1_.getBlockMetadata(p_149719_2_, p_149719_3_, p_149719_4_);
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
float f = 0.0625F;
|
||||
|
||||
if((te & 8) != 0)
|
||||
if(meta >= 12) {
|
||||
this.setBlockBounds(0.0F, 2 * f, 0.0F, 1.0F, 14 * f, 1.0F);
|
||||
} else if(meta >= 8) {
|
||||
this.setBlockBounds(2 * f, 0.0F, 0.0F, 14 * f, 1.0F, 1.0F);
|
||||
else
|
||||
} else if(meta >= 4) {
|
||||
this.setBlockBounds(0.0F, 2 * f, 0.0F, 1.0F, 14 * f, 1.0F);
|
||||
} else {
|
||||
this.setBlockBounds(0.0F, 0.0F, 2 * f, 1.0F, 1.0F, 14 * f);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
|
||||
|
||||
int te = world.getBlockMetadata(x, y, z);
|
||||
float f = 0.0625F;
|
||||
|
||||
if((te & 8) != 0)
|
||||
this.setBlockBounds(2 * f, 0.0F, 0.0F, 14 * f, 1.0F, 1.0F);
|
||||
else
|
||||
this.setBlockBounds(0.0F, 0.0F, 2 * f, 1.0F, 1.0F, 14 * f);
|
||||
|
||||
setBlockBoundsBasedOnState(world, x, y, z);
|
||||
return AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ, x + this.maxX, y + this.maxY, z + this.maxZ);
|
||||
}
|
||||
}
|
||||
|
||||
@ -12,7 +12,6 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
@ -193,7 +192,7 @@ public class BlockSnowglobe extends BlockContainer implements IGUIProvider {
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUIScreenSnowglobe((TileEntitySnowglobe) world.getTileEntity(x, y, z));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.hbm.blocks.generic;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.BlockEnumMulti;
|
||||
@ -10,6 +11,7 @@ import com.hbm.items.ModItems;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
@ -46,11 +48,6 @@ public class BlockStalagmite extends BlockEnumMulti {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int meta) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static int getMetaFromResource(int meta) {
|
||||
return meta;
|
||||
}
|
||||
@ -75,4 +72,10 @@ public class BlockStalagmite extends BlockEnumMulti {
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
|
||||
return ModBlocks.getDropsWithoutDamage(world, this, metadata, fortune);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
130
src/main/java/com/hbm/blocks/generic/BlockSupplyCrate.java
Normal file
130
src/main/java/com/hbm/blocks/generic/BlockSupplyCrate.java
Normal file
@ -0,0 +1,130 @@
|
||||
package com.hbm.blocks.generic;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockSupplyCrate extends BlockContainer {
|
||||
|
||||
public BlockSupplyCrate(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileEntitySupplyCrate();
|
||||
}
|
||||
|
||||
@Override public int getRenderType() { return BlockCanCrate.renderID; }
|
||||
@Override public boolean isOpaqueCube() { return false; }
|
||||
@Override public boolean renderAsNormalBlock() { return false; }
|
||||
|
||||
@Override public Item getItemDropped(int i, Random rand, int j) { return null; }
|
||||
|
||||
@Override
|
||||
public boolean removedByPlayer(World world, EntityPlayer player, int x, int y, int z, boolean willHarvest) {
|
||||
|
||||
if(!player.capabilities.isCreativeMode && !world.isRemote && willHarvest) {
|
||||
|
||||
ItemStack drop = new ItemStack(this);
|
||||
TileEntitySupplyCrate inv = (TileEntitySupplyCrate) world.getTileEntity(x, y, z);
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
|
||||
if(inv != null) {
|
||||
for(int i = 0; i < inv.items.size(); i++) {
|
||||
ItemStack stack = inv.items.get(i);
|
||||
if(stack == null) continue;
|
||||
NBTTagCompound slot = new NBTTagCompound();
|
||||
stack.writeToNBT(slot);
|
||||
nbt.setTag("slot" + i, slot);
|
||||
}
|
||||
nbt.setInteger("amount", inv.items.size());
|
||||
}
|
||||
|
||||
if(!nbt.hasNoTags()) drop.stackTagCompound = nbt;
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, drop));
|
||||
}
|
||||
return world.setBlockToAir(x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack) {
|
||||
|
||||
TileEntitySupplyCrate inv = (TileEntitySupplyCrate) world.getTileEntity(x, y, z);
|
||||
|
||||
if(inv != null && stack.hasTagCompound()) {
|
||||
int amount = stack.stackTagCompound.getInteger("amount");
|
||||
for(int i = 0; i < amount; i++) {
|
||||
inv.items.add(ItemStack.loadItemStackFromNBT(stack.stackTagCompound.getCompoundTag("slot" + i)));
|
||||
}
|
||||
}
|
||||
|
||||
super.onBlockPlacedBy(world, x, y, z, player, stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_) {
|
||||
if(player.getHeldItem() != null && player.getHeldItem().getItem().equals(ModItems.crowbar)) {
|
||||
if(!world.isRemote) {
|
||||
dropContents(world, x, y, z);
|
||||
world.func_147480_a(x, y, z, false);
|
||||
world.playSoundEffect(x, y, z, "hbm:block.crateBreak", 0.5F, 1.0F);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void dropContents(World world, int x, int y, int z) {
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
if(tile instanceof TileEntitySupplyCrate) {
|
||||
TileEntitySupplyCrate crate = (TileEntitySupplyCrate) tile;
|
||||
|
||||
for(ItemStack item : crate.items) {
|
||||
this.dropBlockAsItem(world, x, y, z, item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static class TileEntitySupplyCrate extends TileEntity {
|
||||
|
||||
public List<ItemStack> items = new ArrayList();
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
items.clear();
|
||||
NBTTagList list = nbt.getTagList("items", 10);
|
||||
for(int i = 0; i < list.tagCount(); i++) {
|
||||
NBTTagCompound nbt1 = list.getCompoundTagAt(i);
|
||||
items.add(ItemStack.loadItemStackFromNBT(nbt1));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
NBTTagList list = new NBTTagList();
|
||||
for(int i = 0; i < items.size(); i++) {
|
||||
NBTTagCompound nbt1 = new NBTTagCompound();
|
||||
items.get(i).writeToNBT(nbt1);
|
||||
list.appendTag(nbt1);
|
||||
}
|
||||
nbt.setTag("items", list);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,14 +1,21 @@
|
||||
package com.hbm.blocks.generic;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.tileentity.deco.TileEntityDecoBlock;
|
||||
|
||||
import api.hbm.block.IToolable;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@ -17,7 +24,7 @@ import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class DecoBlock extends BlockContainer {
|
||||
public class DecoBlock extends BlockContainer implements IToolable {
|
||||
|
||||
Random rand = new Random();
|
||||
|
||||
@ -25,19 +32,45 @@ public class DecoBlock extends BlockContainer {
|
||||
super(p_i45386_1_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onScrew(World world, EntityPlayer player, int x, int y, int z, int side, float fX, float fY, float fZ, ToolType tool) {
|
||||
if(tool != ToolType.SCREWDRIVER) return false;
|
||||
if(this != ModBlocks.steel_wall && this != ModBlocks.steel_corner) return false;
|
||||
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
|
||||
if(!player.isSneaking()) {
|
||||
if(meta == 3) world.setBlockMetadataWithNotify(x, y, z, 4, 3);
|
||||
else if(meta == 4) world.setBlockMetadataWithNotify(x, y, z, 2, 3);
|
||||
else if(meta == 2) world.setBlockMetadataWithNotify(x, y, z, 5, 3);
|
||||
else if(meta == 5) world.setBlockMetadataWithNotify(x, y, z, 3, 3);
|
||||
} else {
|
||||
if(meta == 3) world.setBlockMetadataWithNotify(x, y, z, 5, 3);
|
||||
else if(meta == 4) world.setBlockMetadataWithNotify(x, y, z, 3, 3);
|
||||
else if(meta == 2) world.setBlockMetadataWithNotify(x, y, z, 4, 3);
|
||||
else if(meta == 5) world.setBlockMetadataWithNotify(x, y, z, 2, 3);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override @SideOnly(Side.CLIENT) public boolean shouldSideBeRendered(IBlockAccess world, int x, int y, int z, int side) { return true; }
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
if(this == ModBlocks.steel_scaffold || this == ModBlocks.steel_beam) return null;
|
||||
if(this == ModBlocks.steel_scaffold || this == ModBlocks.steel_beam || this == ModBlocks.steel_wall || this == ModBlocks.steel_corner) return null;
|
||||
return new TileEntityDecoBlock();
|
||||
}
|
||||
|
||||
public static int renderIDBeam = RenderingRegistry.getNextAvailableRenderId();
|
||||
public static int renderIDWall = RenderingRegistry.getNextAvailableRenderId();
|
||||
public static int renderIDCorner = RenderingRegistry.getNextAvailableRenderId();
|
||||
|
||||
@Override
|
||||
public int getRenderType(){
|
||||
if(this == ModBlocks.steel_beam)
|
||||
return renderIDBeam;
|
||||
else
|
||||
if(this == ModBlocks.steel_wall) return renderIDWall;
|
||||
if(this == ModBlocks.steel_corner) return renderIDCorner;
|
||||
if(this == ModBlocks.steel_beam) return renderIDBeam;
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -60,95 +93,23 @@ public class DecoBlock extends BlockContainer {
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) {
|
||||
int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
|
||||
|
||||
if(i == 0) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 3, 2);
|
||||
}
|
||||
if(i == 1) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 4, 2);
|
||||
}
|
||||
if(i == 2) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 2, 2);
|
||||
}
|
||||
if(i == 3) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 5, 2);
|
||||
}
|
||||
if(i == 0) world.setBlockMetadataWithNotify(x, y, z, 3, 2);
|
||||
if(i == 1) world.setBlockMetadataWithNotify(x, y, z, 4, 2);
|
||||
if(i == 2) world.setBlockMetadataWithNotify(x, y, z, 2, 2);
|
||||
if(i == 3) world.setBlockMetadataWithNotify(x, y, z, 5, 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_) {
|
||||
int te = p_149719_1_.getBlockMetadata(p_149719_2_, p_149719_3_, p_149719_4_);
|
||||
float f = 0.0625F;
|
||||
|
||||
if(this == ModBlocks.steel_wall) {
|
||||
switch(te) {
|
||||
case 4:
|
||||
this.setBlockBounds(14 * f, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||
break;
|
||||
case 2:
|
||||
this.setBlockBounds(0.0F, 0.0F, 14 * f, 1.0F, 1.0F, 1.0F);
|
||||
break;
|
||||
case 5:
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 2 * f, 1.0F, 1.0F);
|
||||
break;
|
||||
case 3:
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 2 * f);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(this == ModBlocks.steel_corner) {
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
if(this == ModBlocks.steel_roof) {
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1 * f, 1.0F);
|
||||
}
|
||||
|
||||
if(this == ModBlocks.steel_beam) {
|
||||
this.setBlockBounds(7 * f, 0.0F, 7 * f, 9 * f, 1.0F, 9 * f);
|
||||
}
|
||||
|
||||
if(this == ModBlocks.steel_scaffold) {
|
||||
this.setBlockBounds(0.0F, 0.0F, 2 * f, 1.0F, 1.0F, 14 * f);
|
||||
switch(te) {
|
||||
case 4:
|
||||
this.setBlockBounds(2 * f, 0.0F, 0.0F, 14 * f, 1.0F, 1.0F);
|
||||
break;
|
||||
case 2:
|
||||
this.setBlockBounds(0.0F, 0.0F, 2 * f, 1.0F, 1.0F, 14 * f);
|
||||
break;
|
||||
case 5:
|
||||
this.setBlockBounds(2 * f, 0.0F, 0.0F, 14 * f, 1.0F, 1.0F);
|
||||
break;
|
||||
case 3:
|
||||
this.setBlockBounds(0.0F, 0.0F, 2 * f, 1.0F, 1.0F, 14 * f);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
|
||||
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
|
||||
int te = world.getBlockMetadata(x, y, z);
|
||||
float f = 0.0625F;
|
||||
|
||||
if(this == ModBlocks.steel_wall) {
|
||||
switch(te) {
|
||||
case 4:
|
||||
this.setBlockBounds(14 * f, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||
break;
|
||||
case 2:
|
||||
this.setBlockBounds(0.0F, 0.0F, 14 * f, 1.0F, 1.0F, 1.0F);
|
||||
break;
|
||||
case 5:
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 2 * f, 1.0F, 1.0F);
|
||||
break;
|
||||
case 3:
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 2 * f);
|
||||
break;
|
||||
case 4: this.setBlockBounds(14 * f, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); break;
|
||||
case 2: this.setBlockBounds(0.0F, 0.0F, 14 * f, 1.0F, 1.0F, 1.0F); break;
|
||||
case 5: this.setBlockBounds(0.0F, 0.0F, 0.0F, 2 * f, 1.0F, 1.0F); break;
|
||||
case 3: this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 2 * f); break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -167,21 +128,57 @@ public class DecoBlock extends BlockContainer {
|
||||
if(this == ModBlocks.steel_scaffold) {
|
||||
this.setBlockBounds(0.0F, 0.0F, 2 * f, 1.0F, 1.0F, 14 * f);
|
||||
switch(te) {
|
||||
case 4:
|
||||
this.setBlockBounds(2 * f, 0.0F, 0.0F, 14 * f, 1.0F, 1.0F);
|
||||
break;
|
||||
case 2:
|
||||
this.setBlockBounds(0.0F, 0.0F, 2 * f, 1.0F, 1.0F, 14 * f);
|
||||
break;
|
||||
case 5:
|
||||
this.setBlockBounds(2 * f, 0.0F, 0.0F, 14 * f, 1.0F, 1.0F);
|
||||
break;
|
||||
case 3:
|
||||
this.setBlockBounds(0.0F, 0.0F, 2 * f, 1.0F, 1.0F, 14 * f);
|
||||
break;
|
||||
case 4: this.setBlockBounds(2 * f, 0.0F, 0.0F, 14 * f, 1.0F, 1.0F); break;
|
||||
case 2: this.setBlockBounds(0.0F, 0.0F, 2 * f, 1.0F, 1.0F, 14 * f); break;
|
||||
case 5: this.setBlockBounds(2 * f, 0.0F, 0.0F, 14 * f, 1.0F, 1.0F); break;
|
||||
case 3: this.setBlockBounds(0.0F, 0.0F, 2 * f, 1.0F, 1.0F, 14 * f); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
|
||||
this.setBlockBoundsBasedOnState(world, x, y, z);
|
||||
return AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ, x + this.maxX, y + this.maxY, z + this.maxZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCollisionBoxesToList(World world, int x, int y, int z, AxisAlignedBB aabb, List list, Entity collider) {
|
||||
|
||||
if(this == ModBlocks.steel_corner) {
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
List<AxisAlignedBB> bbs = new ArrayList();
|
||||
|
||||
switch(meta) {
|
||||
case 2:
|
||||
bbs.add(AxisAlignedBB.getBoundingBox(x + 0.25D, y + 0D, z + 0.875D, x + 1D, y + 1D, z + 1D));
|
||||
bbs.add(AxisAlignedBB.getBoundingBox(x + 0D, y + 0D, z + 0.75D, x + 0.25D, y + 1D, z + 1D));
|
||||
bbs.add(AxisAlignedBB.getBoundingBox(x + 0D, y + 0D, z + 0D, x + 0.125D, y + 1D, z + 0.75D));
|
||||
break;
|
||||
case 3:
|
||||
bbs.add(AxisAlignedBB.getBoundingBox(x + 0D, y + 0D, z + 0D, x + 0.75D, y + 1D, z + 0.125D));
|
||||
bbs.add(AxisAlignedBB.getBoundingBox(x + 0.75D, y + 0D, z + 0D, x + 1D, y + 1D, z + 0.25D));
|
||||
bbs.add(AxisAlignedBB.getBoundingBox(x + 0.875D, y + 0D, z + 0.25D, x + 1D, y + 1D, z + 1D));
|
||||
break;
|
||||
case 4:
|
||||
bbs.add(AxisAlignedBB.getBoundingBox(x + 0.875D, y + 0D, z + 0D, x + 1D, y + 1D, z + 0.75D));
|
||||
bbs.add(AxisAlignedBB.getBoundingBox(x + 0.75D, y + 0D, z + 0.75D, x + 1D, y + 1D, z + 1D));
|
||||
bbs.add(AxisAlignedBB.getBoundingBox(x + 0D, y + 0D, z + 0.875D, x + 0.75D, y + 1D, z + 1D));
|
||||
break;
|
||||
case 5:
|
||||
bbs.add(AxisAlignedBB.getBoundingBox(x + 0D, y + 0D, z + 0.25D, x + 0.125D, y + 1D, z + 1D));
|
||||
bbs.add(AxisAlignedBB.getBoundingBox(x + 0D, y + 0D, z + 0D, x + 0.25D, y + 1D, z + 0.25D));
|
||||
bbs.add(AxisAlignedBB.getBoundingBox(x + 0.25D, y + 0D, z + 0D, x + 1D, y + 1D, z + 0.125D));
|
||||
break;
|
||||
}
|
||||
|
||||
for(AxisAlignedBB bb : bbs) {
|
||||
if(aabb.intersectsWith(bb)) {
|
||||
list.add(bb);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
super.addCollisionBoxesToList(world, x, y, z, aabb, list, collider);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,14 +1,9 @@
|
||||
package com.hbm.blocks.generic;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.deco.TileEntityDecoBlockAlt;
|
||||
import com.hbm.tileentity.deco.TileEntityDecoBlockAltF;
|
||||
import com.hbm.tileentity.deco.TileEntityDecoBlockAltG;
|
||||
import com.hbm.tileentity.deco.TileEntityDecoBlockAltW;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -17,7 +12,6 @@ import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
@ -34,29 +28,15 @@ public class DecoBlockAlt extends BlockContainer {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
//this.blockIcon = iconRegister.registerIcon("stone");
|
||||
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":code");
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
if(this == ModBlocks.statue_elb)
|
||||
return new TileEntityDecoBlockAlt();
|
||||
if(this == ModBlocks.statue_elb_g)
|
||||
return new TileEntityDecoBlockAltG();
|
||||
if(this == ModBlocks.statue_elb_w)
|
||||
return new TileEntityDecoBlockAltW();
|
||||
if(this == ModBlocks.statue_elb_f)
|
||||
return new TileEntityDecoBlockAltF();
|
||||
if(this == ModBlocks.statue_elb_f) return new TileEntityDecoBlockAltF();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
|
||||
{
|
||||
return Item.getItemFromBlock(ModBlocks.statue_elb);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType(){
|
||||
return -1;
|
||||
@ -76,91 +56,41 @@ public class DecoBlockAlt extends BlockContainer {
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) {
|
||||
int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
|
||||
|
||||
if(i == 0)
|
||||
{
|
||||
if(i == 0) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 2, 2);
|
||||
}
|
||||
if(i == 1)
|
||||
{
|
||||
if(i == 1) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 5, 2);
|
||||
}
|
||||
if(i == 2)
|
||||
{
|
||||
if(i == 2) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 3, 2);
|
||||
}
|
||||
if(i == 3)
|
||||
{
|
||||
if(i == 3) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 4, 2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if(world.isRemote)
|
||||
{
|
||||
if(world.isRemote) {
|
||||
return true;
|
||||
} else if(!player.isSneaking())
|
||||
{
|
||||
if(player.getCurrentEquippedItem() != null)
|
||||
{
|
||||
if(this == ModBlocks.statue_elb)
|
||||
{
|
||||
if(player.getCurrentEquippedItem().getItem() == ModItems.gun_revolver_cursed)
|
||||
{
|
||||
world.setBlock(x, y, z, ModBlocks.statue_elb_g, world.getBlockMetadata(x, y, z), 2);
|
||||
} else if(!player.isSneaking()) {
|
||||
|
||||
if (!player.capabilities.isCreativeMode)
|
||||
{
|
||||
--player.getCurrentEquippedItem().stackSize;
|
||||
}
|
||||
if(player.getCurrentEquippedItem() != null) {
|
||||
boolean cracked = player.getHeldItem().getItem() == ModItems.key_red_cracked;
|
||||
|
||||
if((player.getHeldItem().getItem() == ModItems.key_red || cracked)) {
|
||||
if(cracked) player.getHeldItem().stackSize--;
|
||||
world.func_147480_a(x, y, z, true);
|
||||
return true;
|
||||
}
|
||||
|
||||
if(player.getCurrentEquippedItem().getItem() == ModItems.watch)
|
||||
{
|
||||
world.setBlock(x, y, z, ModBlocks.statue_elb_w, world.getBlockMetadata(x, y, z), 2);
|
||||
|
||||
if (!player.capabilities.isCreativeMode)
|
||||
{
|
||||
--player.getCurrentEquippedItem().stackSize;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if(this == ModBlocks.statue_elb_g)
|
||||
{
|
||||
if(player.getCurrentEquippedItem().getItem() == ModItems.watch)
|
||||
{
|
||||
world.setBlock(x, y, z, ModBlocks.statue_elb_f, world.getBlockMetadata(x, y, z), 2);
|
||||
|
||||
if (!player.capabilities.isCreativeMode)
|
||||
{
|
||||
--player.getCurrentEquippedItem().stackSize;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if(this == ModBlocks.statue_elb_w)
|
||||
{
|
||||
if(player.getCurrentEquippedItem().getItem() == ModItems.gun_revolver_cursed)
|
||||
{
|
||||
world.setBlock(x, y, z, ModBlocks.statue_elb_f, world.getBlockMetadata(x, y, z), 2);
|
||||
|
||||
if (!player.capabilities.isCreativeMode)
|
||||
{
|
||||
--player.getCurrentEquippedItem().stackSize;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_)
|
||||
{
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_) {
|
||||
float f = 0.0625F;
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 8 * f, 1.0F);
|
||||
}
|
||||
@ -171,5 +101,4 @@ public class DecoBlockAlt extends BlockContainer {
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 8 * f, 1.0F);
|
||||
return AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ, x + this.maxX, y + this.maxY, z + this.maxZ);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -3,8 +3,8 @@ package com.hbm.blocks.generic;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.ITooltipProvider;
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
||||
import com.hbm.util.ParticleUtil;
|
||||
|
||||
import api.hbm.block.IToolable;
|
||||
|
||||
@ -11,7 +11,6 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
@ -65,7 +64,7 @@ public class BlockArmorTable extends Block implements IGUIProvider {
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUIArmorTable(player.inventory);
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,6 @@ package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.blocks.BlockEnumMulti;
|
||||
import com.hbm.lib.RefStrings;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
||||
@ -4,7 +4,6 @@ import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.machine.TileEntityDummy;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineAssembler;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@ -4,7 +4,6 @@ import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.machine.TileEntityDummy;
|
||||
import com.hbm.tileentity.machine.oil.TileEntityMachineRefinery;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@ -4,7 +4,6 @@ import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.machine.TileEntityDummy;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineTurbofan;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@ -1,65 +0,0 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class FactoryHatch extends Block {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
public FactoryHatch(Material p_i45394_1_) {
|
||||
super(p_i45394_1_);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.iconFront = iconRegister.registerIcon(RefStrings.MODID + (this == ModBlocks.factory_titanium_furnace ? ":factory_titanium_furnace" : ":factory_advanced_furnace"));
|
||||
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + (this == ModBlocks.factory_titanium_furnace ? ":factory_titanium_hull" : ":factory_advanced_hull"));
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
return metadata == 0 && side == 3 ? this.iconFront : (side == metadata ? this.iconFront : this.blockIcon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockAdded(World world, int x, int y, int z) {
|
||||
super.onBlockAdded(world, x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) {
|
||||
int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
|
||||
|
||||
if(i == 0)
|
||||
{
|
||||
world.setBlockMetadataWithNotify(x, y, z, 2, 2);
|
||||
}
|
||||
if(i == 1)
|
||||
{
|
||||
world.setBlockMetadataWithNotify(x, y, z, 5, 2);
|
||||
}
|
||||
if(i == 2)
|
||||
{
|
||||
world.setBlockMetadataWithNotify(x, y, z, 3, 2);
|
||||
}
|
||||
if(i == 3)
|
||||
{
|
||||
world.setBlockMetadataWithNotify(x, y, z, 4, 2);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,9 +1,7 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import api.hbm.block.ICrucibleAcceptor;
|
||||
import api.hbm.block.IToolable;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.inventory.material.Mats.MaterialStack;
|
||||
import com.hbm.items.ModItems;
|
||||
@ -12,9 +10,6 @@ import com.hbm.items.machine.ItemMold.Mold;
|
||||
import com.hbm.items.machine.ItemScraps;
|
||||
import com.hbm.tileentity.machine.TileEntityFoundryCastingBase;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import api.hbm.block.ICrucibleAcceptor;
|
||||
import api.hbm.block.IToolable;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
@ -30,6 +25,10 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public abstract class FoundryCastingBase extends BlockContainer implements ICrucibleAcceptor, IToolable, ILookOverlay {
|
||||
|
||||
protected FoundryCastingBase() {
|
||||
|
||||
@ -176,6 +176,7 @@ public class FoundryChannel extends BlockContainer implements ICrucibleAcceptor
|
||||
}
|
||||
cast.amount = 0;
|
||||
cast.type = null;
|
||||
cast.propagateMaterial(null);
|
||||
cast.markDirty();
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
}
|
||||
|
||||
@ -1,18 +1,17 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ITooltipProvider;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityFurnaceCombination;
|
||||
|
||||
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.world.World;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class FurnaceCombination extends BlockDummyable implements ITooltipProvider {
|
||||
|
||||
public FurnaceCombination() {
|
||||
|
||||
30
src/main/java/com/hbm/blocks/machine/MachineAmmoPress.java
Normal file
30
src/main/java/com/hbm/blocks/machine/MachineAmmoPress.java
Normal file
@ -0,0 +1,30 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineAmmoPress;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class MachineAmmoPress extends BlockDummyable {
|
||||
|
||||
public MachineAmmoPress() {
|
||||
super(Material.iron);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return meta >= 12 ? new TileEntityMachineAmmoPress() : new TileEntityProxyCombo().inventory();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
return this.standardOpenBehavior(world, x, y, z, player, 0);
|
||||
}
|
||||
|
||||
@Override public int[] getDimensions() { return new int[] {1, 0, 0, 0, 1, 1}; }
|
||||
@Override public int getOffset() { return 0; }
|
||||
}
|
||||
@ -7,7 +7,6 @@ import com.hbm.items.machine.ItemScraps;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineArcFurnaceLarge;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
|
||||
@ -1,11 +1,8 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineAutocrafter;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -22,6 +19,8 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class MachineAutocrafter extends BlockContainer {
|
||||
|
||||
@SideOnly(Side.CLIENT) private IIcon iconTop;
|
||||
|
||||
@ -280,6 +280,9 @@ public class MachineBattery extends BlockContainer implements ILookOverlay, IPer
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, NBTTagCompound persistentTag, EntityPlayer player, List list, boolean ext) {
|
||||
list.add(EnumChatFormatting.GOLD + "Stores up to "+ BobMathUtil.getShortNumber(this.maxPower) + "HE");
|
||||
list.add(EnumChatFormatting.GOLD + "Charge speed: "+ BobMathUtil.getShortNumber(this.maxPower / 200) + "HE");
|
||||
list.add(EnumChatFormatting.GOLD + "Discharge speed: "+ BobMathUtil.getShortNumber(this.maxPower / 600) + "HE");
|
||||
list.add(EnumChatFormatting.YELLOW + "" + BobMathUtil.getShortNumber(persistentTag.getLong("power")) + "/" + BobMathUtil.getShortNumber(this.maxPower) + "HE");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,8 +1,5 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.IPersistentInfoProvider;
|
||||
import com.hbm.handler.MultiblockHandlerXR;
|
||||
@ -14,7 +11,6 @@ import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.IPersistentNBT;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.storage.TileEntityMachineBAT9000;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -28,6 +24,9 @@ import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MachineBigAssTank9000 extends BlockDummyable implements IPersistentInfoProvider {
|
||||
|
||||
public MachineBigAssTank9000(Material mat) {
|
||||
|
||||
@ -1,13 +1,10 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.machine.TileEntityFurnaceBrick;
|
||||
import com.hbm.util.ItemStackUtil;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -24,6 +21,8 @@ import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class MachineBrickFurnace extends BlockContainer {
|
||||
|
||||
private final Random rand = new Random();
|
||||
|
||||
@ -10,9 +10,6 @@ import com.hbm.blocks.IPersistentInfoProvider;
|
||||
import com.hbm.blocks.ITooltipProvider;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.packet.BufPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.tileentity.IBufPacketReceiver;
|
||||
import com.hbm.tileentity.IPersistentNBT;
|
||||
import com.hbm.tileentity.TileEntityLoadedBase;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
@ -22,7 +19,6 @@ import com.hbm.util.fauxpointtwelve.BlockPos;
|
||||
import api.hbm.energymk2.IEnergyProviderMK2;
|
||||
import api.hbm.energymk2.IEnergyReceiverMK2;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
@ -109,6 +105,9 @@ public class MachineCapacitor extends BlockContainer implements ILookOverlay, IP
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, NBTTagCompound persistentTag, EntityPlayer player, List list, boolean ext) {
|
||||
list.add(EnumChatFormatting.GOLD + "Stores up to "+ BobMathUtil.getShortNumber(this.power) + "HE");
|
||||
list.add(EnumChatFormatting.GOLD + "Charge speed: "+ BobMathUtil.getShortNumber(this.power / 200) + "HE");
|
||||
list.add(EnumChatFormatting.GOLD + "Discharge speed: "+ BobMathUtil.getShortNumber(this.power / 600) + "HE");
|
||||
list.add(EnumChatFormatting.YELLOW + "" + BobMathUtil.getShortNumber(persistentTag.getLong("power")) + "/" + BobMathUtil.getShortNumber(persistentTag.getLong("maxPower")) + "HE");
|
||||
}
|
||||
|
||||
@ -150,7 +149,7 @@ public class MachineCapacitor extends BlockContainer implements ILookOverlay, IP
|
||||
player.addExhaustion(0.025F);
|
||||
}
|
||||
|
||||
public static class TileEntityCapacitor extends TileEntityLoadedBase implements IEnergyProviderMK2, IEnergyReceiverMK2, IBufPacketReceiver, IPersistentNBT {
|
||||
public static class TileEntityCapacitor extends TileEntityLoadedBase implements IEnergyProviderMK2, IEnergyReceiverMK2, IPersistentNBT {
|
||||
|
||||
public long power;
|
||||
protected long maxPower;
|
||||
@ -196,7 +195,7 @@ public class MachineCapacitor extends BlockContainer implements ILookOverlay, IP
|
||||
|
||||
this.trySubscribe(worldObj, xCoord + opp.offsetX, yCoord + opp.offsetY, zCoord + opp.offsetZ, opp);
|
||||
|
||||
PacketDispatcher.wrapper.sendToAllAround(new BufPacket(xCoord, yCoord, zCoord, this), new TargetPoint(this.worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 15));
|
||||
networkPackNT(15);
|
||||
|
||||
this.powerSent = 0;
|
||||
this.powerReceived = 0;
|
||||
@ -249,6 +248,14 @@ public class MachineCapacitor extends BlockContainer implements ILookOverlay, IP
|
||||
return maxPower;
|
||||
}
|
||||
|
||||
@Override public long getProviderSpeed() {
|
||||
return this.getMaxPower() / 300;
|
||||
}
|
||||
|
||||
@Override public long getReceiverSpeed() {
|
||||
return this.getMaxPower() / 100;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConnectionPriority getPriority() {
|
||||
return ConnectionPriority.LOW;
|
||||
|
||||
@ -1,11 +1,8 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import api.hbm.energymk2.IEnergyConnectorBlock;
|
||||
import com.hbm.blocks.ITooltipProvider;
|
||||
import com.hbm.lib.RefStrings;
|
||||
|
||||
import api.hbm.energymk2.IEnergyConnectorBlock;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
@ -20,6 +17,8 @@ import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class MachineCapacitorBus extends Block implements IEnergyConnectorBlock, ITooltipProvider {
|
||||
|
||||
@SideOnly(Side.CLIENT) private IIcon topIcon;
|
||||
|
||||
@ -1,8 +1,5 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.handler.MultiblockHandlerXR;
|
||||
@ -11,7 +8,6 @@ import com.hbm.items.machine.IItemFluidIdentifier;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.oil.TileEntityMachineCatalyticCracker;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@ -23,6 +19,9 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MachineCatalyticCracker extends BlockDummyable implements ILookOverlay {
|
||||
|
||||
public MachineCatalyticCracker(Material mat) {
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.IPersistentInfoProvider;
|
||||
import com.hbm.handler.MultiblockHandlerXR;
|
||||
@ -9,7 +7,6 @@ import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.oil.TileEntityMachineCatalyticReformer;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -19,6 +16,8 @@ import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class MachineCatalyticReformer extends BlockDummyable implements IPersistentInfoProvider {
|
||||
|
||||
public MachineCatalyticReformer(Material mat) {
|
||||
|
||||
@ -1,12 +1,9 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ITooltipProvider;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityChimneyBrick;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -14,6 +11,8 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class MachineChimneyBrick extends BlockDummyable implements ITooltipProvider {
|
||||
|
||||
public MachineChimneyBrick(Material mat) {
|
||||
|
||||
@ -1,12 +1,9 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ITooltipProvider;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityChimneyIndustrial;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -14,6 +11,8 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class MachineChimneyIndustrial extends BlockDummyable implements ITooltipProvider {
|
||||
|
||||
public MachineChimneyIndustrial(Material mat) {
|
||||
|
||||
@ -1,23 +1,31 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.blocks.ITooltipProvider;
|
||||
import com.hbm.handler.MultiblockHandlerXR;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.inventory.fluid.trait.FT_Coolable;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityChungus;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
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.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class MachineChungus extends BlockDummyable implements ITooltipProvider {
|
||||
public class MachineChungus extends BlockDummyable implements ITooltipProvider, ILookOverlay {
|
||||
|
||||
public MachineChungus(Material mat) {
|
||||
super(mat);
|
||||
@ -135,4 +143,33 @@ public class MachineChungus extends BlockDummyable implements ITooltipProvider {
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
this.addStandardInfo(stack, player, list, ext);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void printHook(Pre event, World world, int x, int y, int z) {
|
||||
int[] pos = this.findCore(world, x, y, z);
|
||||
if(pos == null) return;
|
||||
|
||||
TileEntity te = world.getTileEntity(pos[0], pos[1], pos[2]);
|
||||
if(!(te instanceof TileEntityChungus)) return;
|
||||
|
||||
TileEntityChungus chungus = (TileEntityChungus) te;
|
||||
List<String> text = new ArrayList();
|
||||
|
||||
FluidTank tankInput = chungus.tanks[0];
|
||||
FluidTank tankOutput = chungus.tanks[1];
|
||||
|
||||
FluidType inputType = tankInput.getTankType();
|
||||
FluidType outputType = Fluids.NONE;
|
||||
|
||||
if(inputType.hasTrait(FT_Coolable.class)) {
|
||||
outputType = inputType.getTrait(FT_Coolable.class).coolsTo;
|
||||
}
|
||||
|
||||
text.add(EnumChatFormatting.GREEN + "-> " + EnumChatFormatting.RESET + inputType.getLocalizedName() + ": " + tankInput.getFill() + "/" + tankInput.getMaxFill() + "mB");
|
||||
text.add(EnumChatFormatting.RED + "<- " + EnumChatFormatting.RESET + outputType.getLocalizedName() + ": " + tankOutput.getFill() + "/" + tankOutput.getMaxFill() + "mB");
|
||||
text.add(EnumChatFormatting.RED + "<- " + EnumChatFormatting.RESET + BobMathUtil.getShortNumber(chungus.power) + "/" + BobMathUtil.getShortNumber(chungus.getMaxPower()) + "HE");
|
||||
|
||||
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,7 +3,6 @@ package com.hbm.blocks.machine;
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineCombustionEngine;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
@ -1,15 +1,11 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityCondenserPowered;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
@ -17,6 +13,9 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MachineCondenserPowered extends BlockDummyable implements ILookOverlay {
|
||||
|
||||
public MachineCondenserPowered(Material mat) {
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import api.hbm.block.IToolable;
|
||||
import api.hbm.conveyor.IConveyorBelt;
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.blocks.ITooltipProvider;
|
||||
@ -10,9 +9,6 @@ import com.hbm.items.machine.ItemStamp;
|
||||
import com.hbm.tileentity.machine.TileEntityConveyorPress;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import api.hbm.block.IToolable;
|
||||
import api.hbm.conveyor.IConveyorBelt;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -25,6 +21,9 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MachineConveyorPress extends BlockDummyable implements IConveyorBelt, ILookOverlay, IToolable, ITooltipProvider {
|
||||
|
||||
public MachineConveyorPress(Material mat) {
|
||||
|
||||
@ -4,7 +4,6 @@ import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineCrystallizer;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@ -1,14 +1,10 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.TileEntityDeuteriumExtractor;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
@ -20,6 +16,9 @@ import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MachineDeuteriumExtractor extends BlockContainer implements ILookOverlay {
|
||||
|
||||
public MachineDeuteriumExtractor(Material mat) {
|
||||
|
||||
@ -6,7 +6,6 @@ import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityDiFurnace;
|
||||
import com.hbm.util.Compat;
|
||||
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
||||
@ -1,12 +1,9 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.machine.TileEntityDiFurnaceRTG;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -25,6 +22,8 @@ import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class MachineDiFurnaceRTG extends BlockContainer {
|
||||
|
||||
private final Random rand = new Random();
|
||||
|
||||
@ -1,12 +1,9 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineElectricFurnace;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -25,6 +22,8 @@ import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class MachineElectricFurnace extends BlockContainer {
|
||||
|
||||
private final Random field_149933_a = new Random();
|
||||
|
||||
@ -4,7 +4,6 @@ import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.handler.MultiblockHandlerXR;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityElectrolyser;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
@ -4,7 +4,6 @@ import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.handler.MultiblockHandlerXR;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineExposureChamber;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
@ -1,14 +1,13 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK3;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK3.ATEntry;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class MachineFieldDisturber extends Block {
|
||||
|
||||
public MachineFieldDisturber() {
|
||||
|
||||
@ -1,8 +1,5 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.IPersistentInfoProvider;
|
||||
import com.hbm.handler.MultiblockHandlerXR;
|
||||
@ -13,7 +10,6 @@ import com.hbm.tileentity.IPersistentNBT;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.oil.TileEntityMachineFrackingTower;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -24,6 +20,9 @@ import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MachineFrackingTower extends BlockDummyable implements IPersistentInfoProvider {
|
||||
|
||||
public MachineFrackingTower() {
|
||||
|
||||
@ -1,8 +1,5 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
@ -10,7 +7,6 @@ import com.hbm.items.machine.IItemFluidIdentifier;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.oil.TileEntityMachineFractionTower;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@ -22,6 +18,9 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MachineFractionTower extends BlockDummyable implements ILookOverlay {
|
||||
|
||||
public MachineFractionTower(Material mat) {
|
||||
|
||||
@ -1,9 +1,5 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.blocks.ITooltipProvider;
|
||||
@ -14,7 +10,6 @@ import com.hbm.items.machine.IItemFluidIdentifier;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityHeatBoilerIndustrial;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -27,6 +22,10 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
public class MachineHeatBoilerIndustrial extends BlockDummyable implements ILookOverlay, ITooltipProvider {
|
||||
|
||||
public MachineHeatBoilerIndustrial() {
|
||||
|
||||
@ -1,14 +1,11 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.IPersistentInfoProvider;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.oil.TileEntityMachineHydrotreater;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -18,6 +15,8 @@ import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class MachineHydrotreater extends BlockDummyable implements IPersistentInfoProvider {
|
||||
|
||||
public MachineHydrotreater(Material mat) {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user