-
Notifications
You must be signed in to change notification settings - Fork 12
Ender Locus #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Ender Locus #62
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
ef320ea
QED base
FourIsTheNumber e1d8e89
Semi-functional QED
FourIsTheNumber 23681cc
Fix crystal syncing
FourIsTheNumber dce0c6d
Merge branch 'refs/heads/master' into QED
FourIsTheNumber 039058a
Address comments
FourIsTheNumber 7bced75
Merge branch 'master' into QED
FourIsTheNumber aa779d3
Spotless apply for branch QED for #62 (#67)
github-actions[bot] 644ec11
Merge branch 'refs/heads/master' into QED
FourIsTheNumber e18ed9c
Merge
FourIsTheNumber 28b631f
Merge branch 'master' into QED
FourIsTheNumber 12c62c4
Merge branch 'master' into QED
FourIsTheNumber a0e220b
Make updateEntity serverside
FourIsTheNumber 5fc08be
NBT typo
FourIsTheNumber 1c07168
Add hardness
FourIsTheNumber d0a42f2
Fix bad mui nonsense
FourIsTheNumber f7a8117
Switch back to on place/break scanning
FourIsTheNumber 10bce29
Add flux strength lang
FourIsTheNumber a85c240
Try and fail to fix NEI handler
FourIsTheNumber 406b834
Bless you koolkrafter
FourIsTheNumber 9212c77
Add actual recipes
FourIsTheNumber 0dd1895
Fix wildcard match error in recipes
FourIsTheNumber 0879639
Star import
FourIsTheNumber d176f42
Change energy for recipes for exu parity
FourIsTheNumber 8429f4e
Add postea transformers
FourIsTheNumber 95ce117
Optimising images contained in QED for #62 (#172)
github-actions[bot] e00b323
Add info page
FourIsTheNumber 21b5a6b
Merge remote-tracking branch 'origin/QED' into QED
FourIsTheNumber 47c28e5
New jextures (june textures)
FourIsTheNumber d625441
Make blocks not pushable
FourIsTheNumber d363994
Optimising images contained in QED for #62 (#174)
github-actions[bot] d61ed10
Didn't need to set this for TE
FourIsTheNumber 4cde989
Merge remote-tracking branch 'origin/QED' into QED
FourIsTheNumber d618d9e
Flux Crystal model
FourIsTheNumber dd5ba0d
Merge branch 'master' into QED
FourIsTheNumber c7b767b
Rename
FourIsTheNumber 117afe3
Nerf crystals for parity
FourIsTheNumber 37473c2
Merge branch 'master' into QED
FourIsTheNumber File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
...ain/java/com/fouristhenumber/utilitiesinexcess/common/blocks/BlockConvergenceCrystal.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| package com.fouristhenumber.utilitiesinexcess.common.blocks; | ||
|
|
||
| import static com.fouristhenumber.utilitiesinexcess.utils.UIEUtils.scanForBlock; | ||
|
|
||
| import java.util.Set; | ||
|
|
||
| import net.minecraft.block.Block; | ||
| import net.minecraft.block.material.Material; | ||
| import net.minecraft.world.World; | ||
|
|
||
| import com.fouristhenumber.utilitiesinexcess.ModBlocks; | ||
| import com.fouristhenumber.utilitiesinexcess.common.tileentities.TileEntityEnderLocus; | ||
| import com.gtnewhorizon.gtnhlib.blockpos.BlockPos; | ||
| import com.gtnewhorizon.gtnhlib.client.model.ModelISBRH; | ||
|
|
||
| public class BlockConvergenceCrystal extends Block { | ||
|
|
||
| public BlockConvergenceCrystal() { | ||
| super(Material.iron); | ||
| setBlockName("convergence_crystal"); | ||
| setBlockTextureName("utilitiesinexcess:convergence_crystal"); | ||
| setHardness(5.0F); | ||
| } | ||
|
|
||
| @Override | ||
| public int getMobilityFlag() { | ||
| return 2; | ||
| } | ||
|
|
||
| @Override | ||
| public boolean isOpaqueCube() { | ||
| return false; | ||
| } | ||
|
|
||
| @Override | ||
| public boolean renderAsNormalBlock() { | ||
| return false; | ||
| } | ||
|
|
||
| @Override | ||
| public int getRenderType() { | ||
| return ModelISBRH.JSON_ISBRH_ID; | ||
| } | ||
|
|
||
| @Override | ||
| public int onBlockPlaced(World worldIn, int x, int y, int z, int side, float subX, float subY, float subZ, | ||
| int meta) { | ||
| if (!worldIn.isRemote) { | ||
| Set<BlockPos> positions = scanForBlock(worldIn, x, y, z, 9, ModBlocks.ENDER_LOCUS.get()); | ||
| for (BlockPos pos : positions) { | ||
| TileEntityEnderLocus enderLocus = (TileEntityEnderLocus) worldIn.getTileEntity(pos.x, pos.y, pos.z); | ||
| enderLocus.addCrystal(); | ||
| } | ||
| } | ||
|
|
||
| return super.onBlockPlaced(worldIn, x, y, z, side, subX, subY, subZ, meta); | ||
| } | ||
|
|
||
| @Override | ||
| public void onBlockPreDestroy(World worldIn, int x, int y, int z, int meta) { | ||
| if (!worldIn.isRemote) { | ||
| Set<BlockPos> positions = scanForBlock(worldIn, x, y, z, 9, ModBlocks.ENDER_LOCUS.get()); | ||
| for (BlockPos pos : positions) { | ||
| TileEntityEnderLocus enderLocus = (TileEntityEnderLocus) worldIn.getTileEntity(pos.x, pos.y, pos.z); | ||
| enderLocus.removeCrystal(); | ||
| } | ||
| } | ||
|
|
||
| super.onBlockPreDestroy(worldIn, x, y, z, meta); | ||
| } | ||
| } | ||
85 changes: 85 additions & 0 deletions
85
src/main/java/com/fouristhenumber/utilitiesinexcess/common/blocks/BlockEnderLocus.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| package com.fouristhenumber.utilitiesinexcess.common.blocks; | ||
|
|
||
| import static com.fouristhenumber.utilitiesinexcess.utils.UIEUtils.dropItemsFromIInventory; | ||
|
|
||
| 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.entity.player.EntityPlayer; | ||
| import net.minecraft.inventory.IInventory; | ||
| import net.minecraft.tileentity.TileEntity; | ||
| import net.minecraft.util.IIcon; | ||
| import net.minecraft.world.IBlockAccess; | ||
| import net.minecraft.world.World; | ||
|
|
||
| import com.cleanroommc.modularui.factory.GuiFactories; | ||
| import com.fouristhenumber.utilitiesinexcess.common.tileentities.TileEntityEnderLocus; | ||
|
|
||
| import cpw.mods.fml.relauncher.Side; | ||
| import cpw.mods.fml.relauncher.SideOnly; | ||
|
|
||
| public class BlockEnderLocus extends BlockContainer { | ||
|
|
||
| public BlockEnderLocus() { | ||
| super(Material.iron); | ||
| setBlockName("ender_locus"); | ||
| setBlockTextureName("utilitiesinexcess:ender_locus"); | ||
| setHardness(5.0F); | ||
| } | ||
|
|
||
| @Override | ||
| public TileEntity createNewTileEntity(World worldIn, int meta) { | ||
| return new TileEntityEnderLocus(); | ||
| } | ||
|
|
||
| @Override | ||
| public void onBlockAdded(World worldIn, int x, int y, int z) { | ||
| if (!worldIn.isRemote) { | ||
| TileEntityEnderLocus locus = (TileEntityEnderLocus) worldIn.getTileEntity(x, y, z); | ||
| locus.scan(); | ||
| } | ||
| super.onBlockAdded(worldIn, x, y, z); | ||
| } | ||
|
|
||
| @Override | ||
| public boolean onBlockActivated(World worldIn, int x, int y, int z, EntityPlayer player, int side, float subX, | ||
| float subY, float subZ) { | ||
| if (!worldIn.isRemote) { | ||
| GuiFactories.tileEntity() | ||
| .open(player, x, y, z); | ||
| } | ||
| return true; | ||
| } | ||
|
|
||
| public IIcon sideTexture; | ||
| public IIcon bottomTexture; | ||
|
|
||
| @SideOnly(Side.CLIENT) | ||
| @Override | ||
| public void registerBlockIcons(IIconRegister reg) { | ||
| this.blockIcon = reg.registerIcon(this.getTextureName() + "_top"); | ||
| this.sideTexture = reg.registerIcon(this.getTextureName() + "_side"); | ||
| this.bottomTexture = reg.registerIcon(this.getTextureName() + "_bottom"); | ||
| } | ||
|
|
||
| @SideOnly(Side.CLIENT) | ||
| public IIcon getIcon(int side, int meta) { | ||
| return side == 1 ? this.blockIcon : (side == 0 ? bottomTexture : this.sideTexture); | ||
| } | ||
|
|
||
| @SideOnly(Side.CLIENT) | ||
| @Override | ||
| public IIcon getIcon(IBlockAccess worldIn, int x, int y, int z, int side) { | ||
| return getIcon(side, 0); | ||
| } | ||
|
|
||
| @Override | ||
| public void breakBlock(World worldIn, int x, int y, int z, Block blockBroken, int meta) { | ||
| TileEntity te = worldIn.getTileEntity(x, y, z); | ||
| if (te instanceof IInventory inv) { | ||
| dropItemsFromIInventory(0, inv, worldIn, te.xCoord, te.yCoord, te.zCoord); | ||
| } | ||
| super.breakBlock(worldIn, x, y, z, blockBroken, meta); | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.