aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/plugin/villagers/tile/MobSpawnerCustomLogic.java
diff options
context:
space:
mode:
authoriouter <62897714+iouter@users.noreply.github.com>2022-01-07 12:36:06 +0800
committerGitHub <noreply@github.com>2022-01-07 12:36:06 +0800
commit0834d4b8b45a881f36ed5b295ac0fb38df49fa9a (patch)
tree6fb4a45cf17dd22748148417bc7bb0efb850cea3 /src/Java/gtPlusPlus/plugin/villagers/tile/MobSpawnerCustomLogic.java
parentea1439a4195c8f77c45625ea2593a232bf19984e (diff)
parent9b2e050151ad93170e84321d067d1e9d4ded4ba5 (diff)
downloadGT5-Unofficial-0834d4b8b45a881f36ed5b295ac0fb38df49fa9a.tar.gz
GT5-Unofficial-0834d4b8b45a881f36ed5b295ac0fb38df49fa9a.tar.bz2
GT5-Unofficial-0834d4b8b45a881f36ed5b295ac0fb38df49fa9a.zip
Merge branch 'GTNewHorizons:master' into master
Diffstat (limited to 'src/Java/gtPlusPlus/plugin/villagers/tile/MobSpawnerCustomLogic.java')
-rw-r--r--src/Java/gtPlusPlus/plugin/villagers/tile/MobSpawnerCustomLogic.java69
1 files changed, 0 insertions, 69 deletions
diff --git a/src/Java/gtPlusPlus/plugin/villagers/tile/MobSpawnerCustomLogic.java b/src/Java/gtPlusPlus/plugin/villagers/tile/MobSpawnerCustomLogic.java
deleted file mode 100644
index 28416793f5..0000000000
--- a/src/Java/gtPlusPlus/plugin/villagers/tile/MobSpawnerCustomLogic.java
+++ /dev/null
@@ -1,69 +0,0 @@
-package gtPlusPlus.plugin.villagers.tile;
-
-import cpw.mods.fml.common.registry.EntityRegistry;
-import cpw.mods.fml.common.registry.EntityRegistry.EntityRegistration;
-import gtPlusPlus.core.block.ModBlocks;
-import net.minecraft.entity.Entity;
-import net.minecraft.tileentity.MobSpawnerBaseLogic;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
-
-public class MobSpawnerCustomLogic extends MobSpawnerBaseLogic {
-
- private TileEntityGenericSpawner mTile;
-
- public MobSpawnerCustomLogic(TileEntityGenericSpawner tile) {
- if (tile != null) {
- mTile = tile;
- }
-
- if (TileEntityGenericSpawner.mSpawners.get(mTile.getID()) != null) {
- Class<Entity> c = TileEntityGenericSpawner.mSpawners.get(mTile.getID());
- EntityRegistration x = EntityRegistry.instance().lookupModSpawn(c, false);
- if (x != null) {
- this.setEntityName(x.getEntityName());
- }
- }
-
- }
-
- @Override
- public void func_98267_a(int eventID) {
- if (mTile != null) mTile.getWorldObj().addBlockEvent(mTile.xCoord, mTile.yCoord, mTile.zCoord, ModBlocks.blockCustomMobSpawner, eventID, 0);
- }
-
- @Override
- public World getSpawnerWorld() {
- if (mTile != null) return mTile.getWorldObj();
- return null;
- }
-
- @Override
- public int getSpawnerX() {
- if (mTile != null) return mTile.xCoord;
- return 0;
- }
-
- @Override
- public int getSpawnerY() {
- if (mTile != null) return mTile.yCoord;
- return 0;
- }
-
- @Override
- public int getSpawnerZ() {
- if (mTile != null) return mTile.zCoord;
- return 0;
- }
-
- @Override
- public void setRandomEntity(MobSpawnerBaseLogic.WeightedRandomMinecart p_98277_1_) {
- super.setRandomEntity(p_98277_1_);
- if (mTile != null) {
- if (this.getSpawnerWorld() != null) {
- this.getSpawnerWorld().markBlockForUpdate(mTile.xCoord, mTile.yCoord, mTile.zCoord);
- }
- }
- }
-
-}