-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
58924c3
commit dc78a44
Showing
19 changed files
with
1,313 additions
and
94 deletions.
There are no files selected for viewing
This file contains 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 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 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 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
23 changes: 23 additions & 0 deletions
23
...ain/java/com/github/elenterius/biomancy/client/render/block/mawhopper/MawHopperModel.java
This file contains 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,23 @@ | ||
package com.github.elenterius.biomancy.client.render.block.mawhopper; | ||
|
||
import com.github.elenterius.biomancy.BiomancyMod; | ||
import com.github.elenterius.biomancy.world.block.mawhopper.MawHopperBlockEntity; | ||
import net.minecraft.resources.ResourceLocation; | ||
import software.bernie.geckolib3.model.AnimatedGeoModel; | ||
|
||
public class MawHopperModel extends AnimatedGeoModel<MawHopperBlockEntity> { | ||
@Override | ||
public ResourceLocation getModelResource(MawHopperBlockEntity blockEntity) { | ||
return BiomancyMod.createRL("geo/block/maw_hopper.geo.json"); | ||
} | ||
|
||
@Override | ||
public ResourceLocation getTextureResource(MawHopperBlockEntity blockEntity) { | ||
return BiomancyMod.createRL("textures/block/maw_hopper.png"); | ||
} | ||
|
||
@Override | ||
public ResourceLocation getAnimationResource(MawHopperBlockEntity blockEntity) { | ||
return BiomancyMod.createRL("animations/block/maw_hopper.animation.json"); | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
.../java/com/github/elenterius/biomancy/client/render/block/mawhopper/MawHopperRenderer.java
This file contains 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,21 @@ | ||
package com.github.elenterius.biomancy.client.render.block.mawhopper; | ||
|
||
import com.github.elenterius.biomancy.client.render.block.CustomGeoBlockRenderer; | ||
import com.github.elenterius.biomancy.world.block.mawhopper.MawHopperBlockEntity; | ||
import com.mojang.blaze3d.vertex.PoseStack; | ||
import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; | ||
import net.minecraft.core.Direction; | ||
|
||
public class MawHopperRenderer extends CustomGeoBlockRenderer<MawHopperBlockEntity> { | ||
public MawHopperRenderer(BlockEntityRendererProvider.Context context) { | ||
super(context, new MawHopperModel()); | ||
} | ||
|
||
@Override | ||
protected void rotateBlock(Direction facing, PoseStack poseStack) { | ||
poseStack.translate(0, 0.5, 0); | ||
poseStack.mulPose(facing.getRotation()); | ||
poseStack.translate(0, -0.5, 0); | ||
} | ||
|
||
} |
This file contains 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
Oops, something went wrong.