mirror of
https://github.com/GTNewHorizons/Mantle.git
synced 2026-11-19 19:49:41 +00:00
More work on updating Mantle to 1.13.2.
Pulsar now functions!
This commit is contained in:
1 parent
e65a173890
commit
de4423f18b
76 files changed
+694
-575
No files matched your search
@@ -1,18 +1,20 @@
|
||||
package slimeknights.mantle.client.model;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.renderer.block.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.renderer.block.model.ItemOverrideList;
|
||||
import net.minecraft.client.renderer.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.renderer.model.ItemOverrideList;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import javax.vecmath.Matrix4f;
|
||||
|
||||
import slimeknights.mantle.client.ModelHelper;
|
||||
@@ -33,10 +35,10 @@ public class BlockItemModelWrapper implements IBakedModel {
|
||||
Matrix4f matrix = null;
|
||||
// fix transformation in hand
|
||||
if(cameraTransformType == ItemCameraTransforms.TransformType.THIRD_PERSON_RIGHT_HAND) {
|
||||
matrix = ModelHelper.BLOCK_THIRD_PERSON_RIGHT.getMatrix();
|
||||
matrix = ModelHelper.BLOCK_THIRD_PERSON_RIGHT.getMatrixVec();
|
||||
}
|
||||
else if(cameraTransformType == ItemCameraTransforms.TransformType.THIRD_PERSON_LEFT_HAND) {
|
||||
matrix = ModelHelper.BLOCK_THIRD_PERSON_LEFT.getMatrix();
|
||||
matrix = ModelHelper.BLOCK_THIRD_PERSON_LEFT.getMatrixVec();
|
||||
}
|
||||
|
||||
return Pair.of(this, matrix);
|
||||
@@ -44,7 +46,7 @@ public class BlockItemModelWrapper implements IBakedModel {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public List<BakedQuad> getQuads(IBlockState state, EnumFacing side, long rand) {
|
||||
public List<BakedQuad> getQuads(@Nullable IBlockState state, @Nullable EnumFacing side, Random rand) {
|
||||
return parent.getQuads(state, side, rand);
|
||||
}
|
||||
|
||||
@@ -78,6 +80,6 @@ public class BlockItemModelWrapper implements IBakedModel {
|
||||
@Nonnull
|
||||
@Override
|
||||
public ItemOverrideList getOverrides() {
|
||||
return ItemOverrideList.NONE;
|
||||
return ItemOverrideList.EMPTY;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user