Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 1.1.0 #4

Merged
merged 7 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ yarn_mappings=1.21.1+build.3
loader_version=0.16.5

# Mod Properties
mod_version=1.0.0
mod_version=1.1.0
maven_group=com.kayhennig.vanplusplus
archives_base_name=vanilla-plus-plus

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
package com.kayhennig.vanplusplus;

import com.kayhennig.vanplusplus.thrown.DynamiteEntity;

import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.render.OverlayTexture;
import net.minecraft.client.render.VertexConsumerProvider;
import net.minecraft.client.render.entity.EntityRenderer;
import net.minecraft.client.render.entity.EntityRendererFactory;
import net.minecraft.client.render.item.ItemRenderer;
import net.minecraft.client.render.model.json.ModelTransformationMode;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.Identifier;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.RotationAxis;

@Environment(EnvType.CLIENT)
public class DynamiteEntityRenderer extends EntityRenderer<DynamiteEntity> {
private final ItemRenderer itemRenderer;

public DynamiteEntityRenderer(EntityRendererFactory.Context context) {
super(context);
this.itemRenderer = context.getItemRenderer();
}

public void render(DynamiteEntity dynamiteEntity, float f, float g, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i) {
matrixStack.push();
matrixStack.multiply(RotationAxis.POSITIVE_Y.rotationDegrees(MathHelper.lerp(g, dynamiteEntity.prevYaw, dynamiteEntity.getYaw()) + 90F));
matrixStack.multiply(RotationAxis.POSITIVE_Z.rotationDegrees(MathHelper.lerp(g, dynamiteEntity.prevPitch, dynamiteEntity.getPitch()) + 90F));
matrixStack.translate(0.0D, 0.2D, 0.0D);

this.itemRenderer.renderItem(
dynamiteEntity.getStack(),
ModelTransformationMode.GROUND,
i,
OverlayTexture.DEFAULT_UV,
matrixStack,
vertexConsumerProvider,
dynamiteEntity.getWorld(),
dynamiteEntity.getId()
);
matrixStack.pop();
super.render(dynamiteEntity, f, g, matrixStack, vertexConsumerProvider, i);
}

@Override
public Identifier getTexture(DynamiteEntity entity) {
return Identifier.of(Vanillaplusplus.MOD_ID, "textures/item/dynamite.png");
}

}
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package com.kayhennig.vanplusplus;

import com.kayhennig.vanplusplus.entity.ModBlockEntityType;
import com.kayhennig.vanplusplus.entity.ModEntityType;

import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap;
import net.fabricmc.fabric.api.client.rendering.v1.EntityRendererRegistry;
import net.minecraft.client.render.RenderLayer;
import net.minecraft.client.render.block.entity.BlockEntityRendererFactories;

Expand Down Expand Up @@ -34,5 +36,6 @@ public void onInitializeClient() {
BlockRenderLayerMap.INSTANCE.putBlock(ModBlocks.RED_STAINED_GLASS_HORIZONTAL_PANE, RenderLayer.getTranslucent());
BlockRenderLayerMap.INSTANCE.putBlock(ModBlocks.BLACK_STAINED_GLASS_HORIZONTAL_PANE, RenderLayer.getTranslucent());
BlockEntityRendererFactories.register(ModBlockEntityType.SHELF, ShelfBlockEntityRenderer::new);
EntityRendererRegistry.register(ModEntityType.DYNAMITE, DynamiteEntityRenderer::new);
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// 1.21.1 2024-11-23T19:09:57.7614373 vanilla-plus-plus/Tags for minecraft:block
787c0b0f7a75348ec8728d98548af1e17d4462ca data\minecraft\tags\block\wall_post_override.json
// 1.21.1 2024-11-25T18:13:00.3800394 vanilla-plus-plus/Tags for minecraft:block
3abe2b0d7c8d68efd16d964a22b0bf2fad5f5f15 data\minecraft\tags\block\mineable\pickaxe.json
f495264194aac7257e23e208f04e54972c768a68 data\vanilla-plus-plus\tags\block\glass_slabs.json
787c0b0f7a75348ec8728d98548af1e17d4462ca data\minecraft\tags\block\wall_post_override.json
c55a5e50dbf14137e77a2351b3aca677d305a85b data\minecraft\tags\block\slabs.json
f495264194aac7257e23e208f04e54972c768a68 data\vanilla-plus-plus\tags\block\glass_slabs.json
4378ce7a43ef36879513f084115ea14710a3e54e data\vanilla-plus-plus\tags\block\vertical_slabs.json
787c0b0f7a75348ec8728d98548af1e17d4462ca data\minecraft\tags\block\pressure_plates.json
f495264194aac7257e23e208f04e54972c768a68 data\minecraft\tags\block\impermeable.json
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 1.21.1 2024-11-23T19:09:57.7774786 vanilla-plus-plus/Block Loot Tables
// 1.21.1 2024-11-25T18:13:00.3947194 vanilla-plus-plus/Block Loot Tables
1d31caebd7e2b3c522b3c3f12b2f835b0da48d03 data\vanilla-plus-plus\loot_table\blocks\crimson_shelf.json
579a65b40ddb6291e293e7891f14a47a47beee75 data\vanilla-plus-plus\loot_table\blocks\stripped_spruce_log_slab.json
9c455301b6698e045b6f0a2d36d702790ec749cf data\vanilla-plus-plus\loot_table\blocks\birch_log_slab.json
Expand Down Expand Up @@ -96,8 +96,8 @@ c45aad54f82942bfd55fed9eb4f385a22a378813 data\vanilla-plus-plus\loot_table\block
f6af7c9893874dd507920bb9960ca8f6abd1b01c data\vanilla-plus-plus\loot_table\blocks\mossy_stone_brick_vertical_slab.json
135d3625e7693c09480033b571622230f90b1ba0 data\vanilla-plus-plus\loot_table\blocks\tuff_brick_vertical_slab.json
74d8fd8ba8420892268d7da9ecf7df4242f1fac4 data\vanilla-plus-plus\loot_table\blocks\stripped_oak_log_slab.json
744987525d94151f3ac591d8b06312e7cbebcc63 data\vanilla-plus-plus\loot_table\blocks\warped_stem_slab.json
ff95f1c5a753f5fb15e2799359067a048207a2bd data\vanilla-plus-plus\loot_table\blocks\mangrove_log_vertical_slab.json
744987525d94151f3ac591d8b06312e7cbebcc63 data\vanilla-plus-plus\loot_table\blocks\warped_stem_slab.json
b3d4d5978293cb6ba1c1c856e01c74935b61d781 data\vanilla-plus-plus\loot_table\blocks\spruce_log_vertical_slab.json
de4c12d6a4a0f6b38bacf1d326dd3fde08b0cfce data\vanilla-plus-plus\loot_table\blocks\nether_brick_pressure_plate.json
589b3a54e673f282826129734b3a9eec2a9532d0 data\vanilla-plus-plus\loot_table\blocks\cobblestone_vertical_slab.json
Expand Down
Loading