mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-24 22:14:45 +00:00
More work on the multiblock render framework. Still very WIP.
This commit is contained in:
1 parent
d2789a2541
commit
1c554fcc12
9 files changed
+201
-19
No files matched your search
@@ -0,0 +1,41 @@
|
||||
/**
|
||||
* 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;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
/**
|
||||
* A set of Multiblock objects for various rotations.
|
||||
*/
|
||||
public class MultiblockSet {
|
||||
|
||||
private final Multiblock[] mbs;
|
||||
|
||||
public MultiblockSet(Multiblock[] mbs) {
|
||||
this.mbs = mbs;
|
||||
}
|
||||
|
||||
public MultiblockSet(Multiblock mb) {
|
||||
this(mb.createRotations());
|
||||
}
|
||||
|
||||
public Multiblock getForEntity(Entity e) {
|
||||
return getForRotation(e.rotationPitch);
|
||||
}
|
||||
|
||||
public Multiblock getForRotation(double rotation) {
|
||||
return getForIndex(0);
|
||||
}
|
||||
|
||||
public Multiblock getForIndex(int index) {
|
||||
return mbs[index];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user