mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-24 22:14:45 +00:00
updateBuildScript & spotlessApply
This commit is contained in:
1 parent
21ce111286
commit
9bf784e82c
927 files changed
+67478
-62885
No files matched your search
@@ -2,10 +2,10 @@
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the Botania Mod. Get the Source Code in github:
|
||||
* https://github.com/Vazkii/Botania
|
||||
*
|
||||
*
|
||||
* Botania is Open Source and distributed under the
|
||||
* Botania License: http://botaniamod.net/license.php
|
||||
*
|
||||
*
|
||||
* File Created @ [Jun 27, 2015, 7:31:58 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.api.lexicon.multiblock;
|
||||
@@ -18,26 +18,26 @@ import net.minecraft.util.MathHelper;
|
||||
*/
|
||||
public class MultiblockSet {
|
||||
|
||||
private final Multiblock[] mbs;
|
||||
private final Multiblock[] mbs;
|
||||
|
||||
public MultiblockSet(Multiblock[] mbs) {
|
||||
this.mbs = mbs;
|
||||
}
|
||||
public MultiblockSet(Multiblock[] mbs) {
|
||||
this.mbs = mbs;
|
||||
}
|
||||
|
||||
public MultiblockSet(Multiblock mb) {
|
||||
this(mb.createRotations());
|
||||
}
|
||||
public MultiblockSet(Multiblock mb) {
|
||||
this(mb.createRotations());
|
||||
}
|
||||
|
||||
public Multiblock getForEntity(Entity e) {
|
||||
return getForRotation(e.rotationYaw);
|
||||
}
|
||||
public Multiblock getForEntity(Entity e) {
|
||||
return getForRotation(e.rotationYaw);
|
||||
}
|
||||
|
||||
public Multiblock getForRotation(double rotation) {
|
||||
int facing = MathHelper.floor_double(rotation * 4.0 / 360.0 + 0.5) & 3;
|
||||
return getForIndex(facing);
|
||||
}
|
||||
public Multiblock getForRotation(double rotation) {
|
||||
int facing = MathHelper.floor_double(rotation * 4.0 / 360.0 + 0.5) & 3;
|
||||
return getForIndex(facing);
|
||||
}
|
||||
|
||||
public Multiblock getForIndex(int index) {
|
||||
return mbs[Math.min(mbs.length - 1, index)];
|
||||
}
|
||||
public Multiblock getForIndex(int index) {
|
||||
return mbs[Math.min(mbs.length - 1, index)];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user