mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-17 11:05:32 +00:00
Update buildscript & spotlessApply
This commit is contained in:
1 parent
e4329e2b8f
commit
8683a345c3
818 files changed
+51123
-49403
No files matched your search
@@ -16,59 +16,60 @@ import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class DefaultTreeGenerator implements ITreeGenerator {
|
||||
private ExtraTreeSpecies extraTreeSpecies;
|
||||
private ExtraTreeSpecies extraTreeSpecies;
|
||||
|
||||
public DefaultTreeGenerator(ExtraTreeSpecies extraTreeSpecies) {
|
||||
this.extraTreeSpecies = extraTreeSpecies;
|
||||
}
|
||||
public DefaultTreeGenerator(ExtraTreeSpecies extraTreeSpecies) {
|
||||
this.extraTreeSpecies = extraTreeSpecies;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLogBlock(ITreeGenome genome, World world, int x, int y, int z, ForgeDirection direction) {
|
||||
if (extraTreeSpecies.wood != null) {
|
||||
extraTreeSpecies.wood.placeBlock(world, x, y, z);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void setLogBlock(ITreeGenome genome, World world, int x, int y, int z, ForgeDirection direction) {
|
||||
if (extraTreeSpecies.wood != null) {
|
||||
extraTreeSpecies.wood.placeBlock(world, x, y, z);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLeaves(ITreeGenome genome, World world, GameProfile owner, int x, int y, int z, boolean decorative) {
|
||||
boolean placed = world.setBlock(x, y, z, PluginArboriculture.blocks.leaves, 0, Constants.FLAG_BLOCK_SYNCH_AND_UPDATE);
|
||||
if (!placed) {
|
||||
return;
|
||||
}
|
||||
@Override
|
||||
public void setLeaves(ITreeGenome genome, World world, GameProfile owner, int x, int y, int z, boolean decorative) {
|
||||
boolean placed =
|
||||
world.setBlock(x, y, z, PluginArboriculture.blocks.leaves, 0, Constants.FLAG_BLOCK_SYNCH_AND_UPDATE);
|
||||
if (!placed) {
|
||||
return;
|
||||
}
|
||||
|
||||
Block block = world.getBlock(x, y, z);
|
||||
if (PluginArboriculture.blocks.leaves != block) {
|
||||
world.setBlockToAir(x, y, z);
|
||||
return;
|
||||
}
|
||||
Block block = world.getBlock(x, y, z);
|
||||
if (PluginArboriculture.blocks.leaves != block) {
|
||||
world.setBlockToAir(x, y, z);
|
||||
return;
|
||||
}
|
||||
|
||||
TileLeaves tileLeaves = BlockForestryLeaves.getLeafTile(world, x, y, z);
|
||||
if (tileLeaves == null) {
|
||||
world.setBlockToAir(x, y, z);
|
||||
return;
|
||||
}
|
||||
TileLeaves tileLeaves = BlockForestryLeaves.getLeafTile(world, x, y, z);
|
||||
if (tileLeaves == null) {
|
||||
world.setBlockToAir(x, y, z);
|
||||
return;
|
||||
}
|
||||
|
||||
tileLeaves.setOwner(owner);
|
||||
if (decorative) {
|
||||
tileLeaves.setDecorative();
|
||||
}
|
||||
tileLeaves.setOwner(owner);
|
||||
if (decorative) {
|
||||
tileLeaves.setDecorative();
|
||||
}
|
||||
|
||||
tileLeaves.setTree(new Tree(genome));
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
}
|
||||
tileLeaves.setTree(new Tree(genome));
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLogBlock(World world, int x, int y, int z, ForgeDirection direction) {
|
||||
extraTreeSpecies.wood.placeBlock(world, x, y, z);
|
||||
}
|
||||
@Override
|
||||
public void setLogBlock(World world, int x, int y, int z, ForgeDirection direction) {
|
||||
extraTreeSpecies.wood.placeBlock(world, x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLeaves(World world, GameProfile player, int x, int y, int z, boolean arg5) {
|
||||
// ignored
|
||||
}
|
||||
@Override
|
||||
public void setLeaves(World world, GameProfile player, int x, int y, int z, boolean arg5) {
|
||||
// ignored
|
||||
}
|
||||
|
||||
@Override
|
||||
public WorldGenerator getWorldGenerator(ITreeGenData tree) {
|
||||
return extraTreeSpecies.getGenerator(tree);
|
||||
}
|
||||
@Override
|
||||
public WorldGenerator getWorldGenerator(ITreeGenData tree) {
|
||||
return extraTreeSpecies.getGenerator(tree);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user