mirror of
https://github.com/nimsolated/Nims-Random-BS.git
synced 2026-04-02 10:20:42 -07:00
update: 1.4.0
This commit is contained in:
@@ -2,6 +2,6 @@
|
|||||||
"_fv": 73,
|
"_fv": 73,
|
||||||
"_type": "procedure",
|
"_type": "procedure",
|
||||||
"definition": {
|
"definition": {
|
||||||
"procedurexml": "<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"event_trigger\" deletable=\"false\" x=\"40\" y=\"40\"><field name=\"trigger\">no_ext_trigger</field><next><block type=\"controls_if\"><value name=\"IF0\"><block type=\"logic_binary_ops\" inline=\"false\"><field name=\"OP\">AND</field><value name=\"A\"><block type=\"compare_mcitems\" inline=\"false\"><value name=\"a\"><block type=\"gui_get_item_inslot\"><value name=\"slotid\"><block type=\"math_number\"><field name=\"NUM\">0</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"b\"><block type=\"mcitem_all\"><field name=\"value\">CUSTOM:ShippingLabel</field></block></value></block></value><value name=\"B\"><block type=\"logic_binary_ops\" inline=\"false\"><field name=\"OP\">AND</field><value name=\"A\"><block type=\"math_binary_ops\"><field name=\"OP\">GT</field><value name=\"A\"><block type=\"gui_get_amount_inslot\"><value name=\"slotid\"><block type=\"math_number\"><field name=\"NUM\">1</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">0</field></block></value></block></value><value name=\"B\"><block type=\"math_binary_ops\"><field name=\"OP\">GT</field><value name=\"A\"><block type=\"gui_get_amount_inslot\"><value name=\"slotid\"><block type=\"math_number\"><field name=\"NUM\">2</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">0</field></block></value></block></value></block></value></block></value><statement name=\"DO0\"><block type=\"gui_set_items\" inline=\"false\"><value name=\"amount\"><block type=\"math_dual_ops\"><field name=\"OP\">MINUS</field><value name=\"A\"><block type=\"gui_get_amount_inslot\"><value name=\"slotid\"><block type=\"math_number\"><field name=\"NUM\">1</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">1</field></block></value></block></value><value name=\"item\"><block type=\"gui_get_item_inslot\"><value name=\"slotid\"><block type=\"math_number\"><field name=\"NUM\">1</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"slotid\"><block type=\"math_number\"><field name=\"NUM\">1</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><next><block type=\"gui_set_items\" inline=\"false\"><value name=\"amount\"><block type=\"math_dual_ops\"><field name=\"OP\">MINUS</field><value name=\"A\"><block type=\"gui_get_amount_inslot\"><value name=\"slotid\"><block type=\"math_number\"><field name=\"NUM\">2</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">1</field></block></value></block></value><value name=\"item\"><block type=\"gui_get_item_inslot\"><value name=\"slotid\"><block type=\"math_number\"><field name=\"NUM\">2</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"slotid\"><block type=\"math_number\"><field name=\"NUM\">2</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><next><block type=\"gui_set_items\" inline=\"false\"><value name=\"amount\"><block type=\"math_dual_ops\"><field name=\"OP\">ADD</field><value name=\"A\"><block type=\"gui_get_amount_inslot\"><value name=\"slotid\"><block type=\"math_number\"><field name=\"NUM\">3</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">1</field></block></value></block></value><value name=\"item\"><block type=\"gui_get_item_inslot\"><value name=\"slotid\"><block type=\"math_number\"><field name=\"NUM\">0</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"slotid\"><block type=\"math_number\"><field name=\"NUM\">3</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></next></block></next></block></statement></block></next></block></xml>"
|
"procedurexml": "<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"event_trigger\" deletable=\"false\" x=\"40\" y=\"40\"><field name=\"trigger\">no_ext_trigger</field><next><block type=\"controls_if\"><value name=\"IF0\"><block type=\"logic_negate\"><value name=\"BOOL\"><block type=\"world_data_isremote\"></block></value></block></value><statement name=\"DO0\"><block type=\"controls_if\"><value name=\"IF0\"><block type=\"logic_binary_ops\" inline=\"false\"><field name=\"OP\">AND</field><value name=\"A\"><block type=\"compare_mcitems\" inline=\"false\"><value name=\"a\"><block type=\"gui_get_item_inslot\"><value name=\"slotid\"><block type=\"math_number\"><field name=\"NUM\">0</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"b\"><block type=\"mcitem_all\"><field name=\"value\">CUSTOM:ShippingLabel</field></block></value></block></value><value name=\"B\"><block type=\"logic_binary_ops\" inline=\"false\"><field name=\"OP\">AND</field><value name=\"A\"><block type=\"math_binary_ops\"><field name=\"OP\">GT</field><value name=\"A\"><block type=\"gui_get_amount_inslot\"><value name=\"slotid\"><block type=\"math_number\"><field name=\"NUM\">1</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">0</field></block></value></block></value><value name=\"B\"><block type=\"math_binary_ops\"><field name=\"OP\">GT</field><value name=\"A\"><block type=\"gui_get_amount_inslot\"><value name=\"slotid\"><block type=\"math_number\"><field name=\"NUM\">2</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">0</field></block></value></block></value></block></value></block></value><statement name=\"DO0\"><block type=\"gui_set_items\" inline=\"false\"><value name=\"amount\"><block type=\"math_dual_ops\"><field name=\"OP\">MINUS</field><value name=\"A\"><block type=\"gui_get_amount_inslot\"><value name=\"slotid\"><block type=\"math_number\"><field name=\"NUM\">1</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">1</field></block></value></block></value><value name=\"item\"><block type=\"gui_get_item_inslot\"><value name=\"slotid\"><block type=\"math_number\"><field name=\"NUM\">1</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"slotid\"><block type=\"math_number\"><field name=\"NUM\">1</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><next><block type=\"gui_set_items\" inline=\"false\"><value name=\"amount\"><block type=\"math_dual_ops\"><field name=\"OP\">MINUS</field><value name=\"A\"><block type=\"gui_get_amount_inslot\"><value name=\"slotid\"><block type=\"math_number\"><field name=\"NUM\">2</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">1</field></block></value></block></value><value name=\"item\"><block type=\"gui_get_item_inslot\"><value name=\"slotid\"><block type=\"math_number\"><field name=\"NUM\">2</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"slotid\"><block type=\"math_number\"><field name=\"NUM\">2</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><next><block type=\"gui_set_items\" inline=\"false\"><value name=\"amount\"><block type=\"math_dual_ops\"><field name=\"OP\">ADD</field><value name=\"A\"><block type=\"gui_get_amount_inslot\"><value name=\"slotid\"><block type=\"math_number\"><field name=\"NUM\">3</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">1</field></block></value></block></value><value name=\"item\"><block type=\"gui_get_item_inslot\"><value name=\"slotid\"><block type=\"math_number\"><field name=\"NUM\">0</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"slotid\"><block type=\"math_number\"><field name=\"NUM\">3</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></next></block></next></block></statement></block></statement></block></next></block></xml>"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -22,7 +22,41 @@
|
|||||||
"fixedValue": 1.25
|
"fixedValue": 1.25
|
||||||
},
|
},
|
||||||
"modelLayers": [],
|
"modelLayers": [],
|
||||||
"animations": [],
|
"animations": [
|
||||||
|
{
|
||||||
|
"animation": {
|
||||||
|
"value": "CUSTOM:tuxModelAnimation.walking"
|
||||||
|
},
|
||||||
|
"speed": 1.0,
|
||||||
|
"condition": {
|
||||||
|
"name": "TuxPlaybackConditionWalking"
|
||||||
|
},
|
||||||
|
"walking": true,
|
||||||
|
"amplitude": 1.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"animation": {
|
||||||
|
"value": "CUSTOM:tuxModelAnimation.jumpUp"
|
||||||
|
},
|
||||||
|
"speed": 1.0,
|
||||||
|
"condition": {
|
||||||
|
"name": "TuxPlaybackConditionJumpUp"
|
||||||
|
},
|
||||||
|
"walking": false,
|
||||||
|
"amplitude": 1.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"animation": {
|
||||||
|
"value": "CUSTOM:tuxModelAnimation.JumpDown"
|
||||||
|
},
|
||||||
|
"speed": 1.0,
|
||||||
|
"condition": {
|
||||||
|
"name": "TuxPlaybackConditionFalling"
|
||||||
|
},
|
||||||
|
"walking": false,
|
||||||
|
"amplitude": 1.0
|
||||||
|
}
|
||||||
|
],
|
||||||
"modelWidth": 0.6,
|
"modelWidth": 0.6,
|
||||||
"modelHeight": 1.8,
|
"modelHeight": 1.8,
|
||||||
"modelShadowSize": 0.5,
|
"modelShadowSize": 0.5,
|
||||||
|
|||||||
7
elements/TuxPlaybackConditionFalling.mod.json
Normal file
7
elements/TuxPlaybackConditionFalling.mod.json
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"_fv": 73,
|
||||||
|
"_type": "procedure",
|
||||||
|
"definition": {
|
||||||
|
"procedurexml": "<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"event_trigger\" deletable=\"false\" x=\"40\" y=\"40\"><field name=\"trigger\">no_ext_trigger</field><next><block type=\"controls_if\"><value name=\"IF0\"><block type=\"math_binary_ops\"><field name=\"OP\">LT</field><value name=\"A\"><block type=\"entity_vel_y\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">0</field></block></value></block></value><statement name=\"DO0\"><block type=\"return_logic\"><value name=\"return\"><block type=\"logic_boolean\"><field name=\"BOOL\">TRUE</field></block></value></block></statement><next><block type=\"return_logic\"><value name=\"return\"><block type=\"logic_boolean\"><field name=\"BOOL\">FALSE</field></block></value></block></next></block></next></block></xml>"
|
||||||
|
}
|
||||||
|
}
|
||||||
7
elements/TuxPlaybackConditionJumpUp.mod.json
Normal file
7
elements/TuxPlaybackConditionJumpUp.mod.json
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"_fv": 73,
|
||||||
|
"_type": "procedure",
|
||||||
|
"definition": {
|
||||||
|
"procedurexml": "<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"event_trigger\" deletable=\"false\" x=\"317\" y=\"158\"><field name=\"trigger\">no_ext_trigger</field><next><block type=\"controls_if\"><value name=\"IF0\"><block type=\"math_binary_ops\"><field name=\"OP\">GT</field><value name=\"A\"><block type=\"entity_vel_y\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">0</field></block></value></block></value><statement name=\"DO0\"><block type=\"return_logic\"><value name=\"return\"><block type=\"logic_boolean\"><field name=\"BOOL\">TRUE</field></block></value></block></statement><next><block type=\"return_logic\"><value name=\"return\"><block type=\"logic_boolean\"><field name=\"BOOL\">FALSE</field></block></value></block></next></block></next></block></xml>"
|
||||||
|
}
|
||||||
|
}
|
||||||
7
elements/TuxPlaybackConditionWalking.mod.json
Normal file
7
elements/TuxPlaybackConditionWalking.mod.json
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"_fv": 73,
|
||||||
|
"_type": "procedure",
|
||||||
|
"definition": {
|
||||||
|
"procedurexml": "<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"event_trigger\" deletable=\"false\" x=\"159\" y=\"136\"><field name=\"trigger\">no_ext_trigger</field><next><block type=\"controls_if\"><value name=\"IF0\"><block type=\"logic_binary_ops\" inline=\"false\"><field name=\"OP\">OR</field><value name=\"A\"><block type=\"math_binary_ops\"><field name=\"OP\">GT</field><value name=\"A\"><block type=\"entity_vel_x\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">0</field></block></value></block></value><value name=\"B\"><block type=\"math_binary_ops\"><field name=\"OP\">GT</field><value name=\"A\"><block type=\"entity_vel_z\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">0</field></block></value></block></value></block></value><statement name=\"DO0\"><block type=\"return_logic\"><value name=\"return\"><block type=\"logic_boolean\"><field name=\"BOOL\">TRUE</field></block></value></block></statement><next><block type=\"return_logic\"><value name=\"return\"><block type=\"logic_boolean\"><field name=\"BOOL\">FALSE</field></block></value></block></next></block></next></block></xml>"
|
||||||
|
}
|
||||||
|
}
|
||||||
104
models/animations/tuxModelAnimation.java
Normal file
104
models/animations/tuxModelAnimation.java
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
// Save this class in your mod and generate all required imports
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Made with Blockbench 5.0.7 Exported for Minecraft version 1.19 or later with
|
||||||
|
* Mojang mappings
|
||||||
|
*
|
||||||
|
* @author Author
|
||||||
|
*/
|
||||||
|
public class tuxModelAnimation {
|
||||||
|
public static final AnimationDefinition walking = AnimationDefinition.Builder.withLength(1.0F).looping()
|
||||||
|
.addAnimation("LeftLeg",
|
||||||
|
new AnimationChannel(AnimationChannel.Targets.ROTATION,
|
||||||
|
new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F),
|
||||||
|
AnimationChannel.Interpolations.LINEAR),
|
||||||
|
new Keyframe(0.75F, KeyframeAnimations.degreeVec(0.0F, -5.0F, 0.0F),
|
||||||
|
AnimationChannel.Interpolations.LINEAR),
|
||||||
|
new Keyframe(1.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F),
|
||||||
|
AnimationChannel.Interpolations.LINEAR)))
|
||||||
|
.addAnimation("RightLeg",
|
||||||
|
new AnimationChannel(AnimationChannel.Targets.ROTATION,
|
||||||
|
new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F),
|
||||||
|
AnimationChannel.Interpolations.LINEAR),
|
||||||
|
new Keyframe(0.25F, KeyframeAnimations.degreeVec(0.0F, 7.5F, 0.0F),
|
||||||
|
AnimationChannel.Interpolations.LINEAR),
|
||||||
|
new Keyframe(0.5F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F),
|
||||||
|
AnimationChannel.Interpolations.LINEAR)))
|
||||||
|
.addAnimation("RightArm",
|
||||||
|
new AnimationChannel(AnimationChannel.Targets.ROTATION,
|
||||||
|
new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F),
|
||||||
|
AnimationChannel.Interpolations.LINEAR),
|
||||||
|
new Keyframe(0.25F, KeyframeAnimations.degreeVec(-27.5F, 0.0F, 0.0F),
|
||||||
|
AnimationChannel.Interpolations.LINEAR),
|
||||||
|
new Keyframe(0.5F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F),
|
||||||
|
AnimationChannel.Interpolations.LINEAR),
|
||||||
|
new Keyframe(0.75F, KeyframeAnimations.degreeVec(-27.5F, 0.0F, 0.0F),
|
||||||
|
AnimationChannel.Interpolations.LINEAR),
|
||||||
|
new Keyframe(1.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F),
|
||||||
|
AnimationChannel.Interpolations.LINEAR)))
|
||||||
|
.addAnimation("LeftArm",
|
||||||
|
new AnimationChannel(AnimationChannel.Targets.ROTATION,
|
||||||
|
new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F),
|
||||||
|
AnimationChannel.Interpolations.LINEAR),
|
||||||
|
new Keyframe(0.25F, KeyframeAnimations.degreeVec(22.5F, 0.0F, 0.0F),
|
||||||
|
AnimationChannel.Interpolations.LINEAR),
|
||||||
|
new Keyframe(0.5F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F),
|
||||||
|
AnimationChannel.Interpolations.LINEAR),
|
||||||
|
new Keyframe(0.75F, KeyframeAnimations.degreeVec(22.5F, 0.0F, 0.0F),
|
||||||
|
AnimationChannel.Interpolations.LINEAR),
|
||||||
|
new Keyframe(1.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F),
|
||||||
|
AnimationChannel.Interpolations.LINEAR)))
|
||||||
|
.addAnimation("BodySegment",
|
||||||
|
new AnimationChannel(AnimationChannel.Targets.ROTATION,
|
||||||
|
new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F),
|
||||||
|
AnimationChannel.Interpolations.LINEAR),
|
||||||
|
new Keyframe(0.25F, KeyframeAnimations.degreeVec(0.0F, 12.5F, 0.0F),
|
||||||
|
AnimationChannel.Interpolations.LINEAR),
|
||||||
|
new Keyframe(0.75F, KeyframeAnimations.degreeVec(0.0F, -12.5F, 0.0F),
|
||||||
|
AnimationChannel.Interpolations.LINEAR),
|
||||||
|
new Keyframe(1.0F, KeyframeAnimations.degreeVec(0.0F, 0.83F, 0.0F),
|
||||||
|
AnimationChannel.Interpolations.LINEAR)))
|
||||||
|
.build();
|
||||||
|
|
||||||
|
public static final AnimationDefinition jumpUp = AnimationDefinition.Builder.withLength(0.25F)
|
||||||
|
.addAnimation("root",
|
||||||
|
new AnimationChannel(AnimationChannel.Targets.POSITION,
|
||||||
|
new Keyframe(0.0F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F),
|
||||||
|
AnimationChannel.Interpolations.LINEAR),
|
||||||
|
new Keyframe(0.25F, KeyframeAnimations.posVec(0.0F, 5.0F, 0.0F),
|
||||||
|
AnimationChannel.Interpolations.LINEAR)))
|
||||||
|
.addAnimation("RightArm",
|
||||||
|
new AnimationChannel(AnimationChannel.Targets.ROTATION,
|
||||||
|
new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F),
|
||||||
|
AnimationChannel.Interpolations.LINEAR),
|
||||||
|
new Keyframe(0.25F, KeyframeAnimations.degreeVec(-67.5F, 0.0F, 0.0F),
|
||||||
|
AnimationChannel.Interpolations.LINEAR)))
|
||||||
|
.addAnimation("LeftArm",
|
||||||
|
new AnimationChannel(AnimationChannel.Targets.ROTATION,
|
||||||
|
new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F),
|
||||||
|
AnimationChannel.Interpolations.LINEAR),
|
||||||
|
new Keyframe(0.25F, KeyframeAnimations.degreeVec(65.0F, 0.0F, 0.0F),
|
||||||
|
AnimationChannel.Interpolations.LINEAR)))
|
||||||
|
.build();
|
||||||
|
|
||||||
|
public static final AnimationDefinition JumpDown = AnimationDefinition.Builder.withLength(0.25F)
|
||||||
|
.addAnimation("root",
|
||||||
|
new AnimationChannel(AnimationChannel.Targets.POSITION,
|
||||||
|
new Keyframe(0.0F, KeyframeAnimations.posVec(0.0F, 5.0F, 0.0F),
|
||||||
|
AnimationChannel.Interpolations.LINEAR),
|
||||||
|
new Keyframe(0.25F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F),
|
||||||
|
AnimationChannel.Interpolations.LINEAR)))
|
||||||
|
.addAnimation("RightArm",
|
||||||
|
new AnimationChannel(AnimationChannel.Targets.ROTATION,
|
||||||
|
new Keyframe(0.0F, KeyframeAnimations.degreeVec(-67.5F, 0.0F, 0.0F),
|
||||||
|
AnimationChannel.Interpolations.LINEAR),
|
||||||
|
new Keyframe(0.25F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F),
|
||||||
|
AnimationChannel.Interpolations.LINEAR)))
|
||||||
|
.addAnimation("LeftArm",
|
||||||
|
new AnimationChannel(AnimationChannel.Targets.ROTATION,
|
||||||
|
new Keyframe(0.0F, KeyframeAnimations.degreeVec(65.0F, 0.0F, 0.0F),
|
||||||
|
AnimationChannel.Interpolations.LINEAR),
|
||||||
|
new Keyframe(0.25F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F),
|
||||||
|
AnimationChannel.Interpolations.LINEAR)))
|
||||||
|
.build();
|
||||||
|
}
|
||||||
@@ -74,11 +74,5 @@ public class Modelpeguin<T extends Entity> extends EntityModel<T> {
|
|||||||
|
|
||||||
public void setupAnim(T entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw,
|
public void setupAnim(T entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw,
|
||||||
float headPitch) {
|
float headPitch) {
|
||||||
this.LeftLeg.xRot = Mth.cos(limbSwing * 1.0F) * -1.0F * limbSwingAmount;
|
|
||||||
this.RightArm.xRot = Mth.cos(limbSwing * 0.6662F + (float) Math.PI) * limbSwingAmount;
|
|
||||||
this.Head.yRot = netHeadYaw / (180F / (float) Math.PI);
|
|
||||||
this.Head.xRot = headPitch / (180F / (float) Math.PI);
|
|
||||||
this.RightLeg.xRot = Mth.cos(limbSwing * 1.0F) * 1.0F * limbSwingAmount;
|
|
||||||
this.LeftArm.xRot = Mth.cos(limbSwing * 0.6662F) * limbSwingAmount;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1785,6 +1785,10 @@
|
|||||||
{
|
{
|
||||||
"name": "entity",
|
"name": "entity",
|
||||||
"type": "entity"
|
"type": "entity"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "world",
|
||||||
|
"type": "world"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -1869,6 +1873,66 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"path": "~/Mailbox"
|
"path": "~/Mailbox"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "TuxPlaybackConditionJumpUp",
|
||||||
|
"type": "procedure",
|
||||||
|
"compiles": true,
|
||||||
|
"locked_code": false,
|
||||||
|
"registry_name": "tux_playback_condition_jump_up",
|
||||||
|
"metadata": {
|
||||||
|
"return_type": "logic",
|
||||||
|
"files": [
|
||||||
|
"src/main/java/net/mcreator/nimsrandombullshit/procedures/TuxPlaybackConditionJumpUpProcedure.java"
|
||||||
|
],
|
||||||
|
"dependencies": [
|
||||||
|
{
|
||||||
|
"name": "entity",
|
||||||
|
"type": "entity"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"path": "~/Tux"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "TuxPlaybackConditionFalling",
|
||||||
|
"type": "procedure",
|
||||||
|
"compiles": true,
|
||||||
|
"locked_code": false,
|
||||||
|
"registry_name": "tux_playback_condition_falling",
|
||||||
|
"metadata": {
|
||||||
|
"return_type": "logic",
|
||||||
|
"files": [
|
||||||
|
"src/main/java/net/mcreator/nimsrandombullshit/procedures/TuxPlaybackConditionFallingProcedure.java"
|
||||||
|
],
|
||||||
|
"dependencies": [
|
||||||
|
{
|
||||||
|
"name": "entity",
|
||||||
|
"type": "entity"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"path": "~/Mailbox"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "TuxPlaybackConditionWalking",
|
||||||
|
"type": "procedure",
|
||||||
|
"compiles": true,
|
||||||
|
"locked_code": false,
|
||||||
|
"registry_name": "tux_playback_condition_walking",
|
||||||
|
"metadata": {
|
||||||
|
"return_type": "logic",
|
||||||
|
"files": [
|
||||||
|
"src/main/java/net/mcreator/nimsrandombullshit/procedures/TuxPlaybackConditionWalkingProcedure.java"
|
||||||
|
],
|
||||||
|
"dependencies": [
|
||||||
|
{
|
||||||
|
"name": "entity",
|
||||||
|
"type": "entity"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"path": "~/Tux"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"variable_elements": [],
|
"variable_elements": [],
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package net.mcreator.nimsrandombullshit.client.model;
|
package net.mcreator.nimsrandombullshit.client.model;
|
||||||
|
|
||||||
import net.minecraft.world.entity.Entity;
|
import net.minecraft.world.entity.Entity;
|
||||||
import net.minecraft.util.Mth;
|
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.client.model.geom.builders.PartDefinition;
|
import net.minecraft.client.model.geom.builders.PartDefinition;
|
||||||
import net.minecraft.client.model.geom.builders.MeshDefinition;
|
import net.minecraft.client.model.geom.builders.MeshDefinition;
|
||||||
@@ -65,11 +64,5 @@ public class Modelpeguin<T extends Entity> extends EntityModel<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setupAnim(T entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) {
|
public void setupAnim(T entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) {
|
||||||
this.LeftLeg.xRot = Mth.cos(limbSwing * 1.0F) * -1.0F * limbSwingAmount;
|
|
||||||
this.RightArm.xRot = Mth.cos(limbSwing * 0.6662F + (float) Math.PI) * limbSwingAmount;
|
|
||||||
this.Head.yRot = netHeadYaw / (180F / (float) Math.PI);
|
|
||||||
this.Head.xRot = headPitch / (180F / (float) Math.PI);
|
|
||||||
this.RightLeg.xRot = Mth.cos(limbSwing * 1.0F) * 1.0F * limbSwingAmount;
|
|
||||||
this.LeftArm.xRot = Mth.cos(limbSwing * 0.6662F) * limbSwingAmount;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,56 @@
|
|||||||
|
package net.mcreator.nimsrandombullshit.client.model.animations;
|
||||||
|
|
||||||
|
import net.minecraft.client.animation.KeyframeAnimations;
|
||||||
|
import net.minecraft.client.animation.Keyframe;
|
||||||
|
import net.minecraft.client.animation.AnimationDefinition;
|
||||||
|
import net.minecraft.client.animation.AnimationChannel;
|
||||||
|
|
||||||
|
// Save this class in your mod and generate all required imports
|
||||||
|
/**
|
||||||
|
* Made with Blockbench 5.0.7 Exported for Minecraft version 1.19 or later with
|
||||||
|
* Mojang mappings
|
||||||
|
*
|
||||||
|
* @author Author
|
||||||
|
*/
|
||||||
|
public class tuxModelAnimation {
|
||||||
|
public static final AnimationDefinition walking = AnimationDefinition.Builder.withLength(1.0F).looping()
|
||||||
|
.addAnimation("LeftLeg",
|
||||||
|
new AnimationChannel(AnimationChannel.Targets.ROTATION, new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR),
|
||||||
|
new Keyframe(0.75F, KeyframeAnimations.degreeVec(0.0F, -5.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), new Keyframe(1.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR)))
|
||||||
|
.addAnimation("RightLeg",
|
||||||
|
new AnimationChannel(AnimationChannel.Targets.ROTATION, new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR),
|
||||||
|
new Keyframe(0.25F, KeyframeAnimations.degreeVec(0.0F, 7.5F, 0.0F), AnimationChannel.Interpolations.LINEAR), new Keyframe(0.5F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR)))
|
||||||
|
.addAnimation("RightArm",
|
||||||
|
new AnimationChannel(AnimationChannel.Targets.ROTATION, new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR),
|
||||||
|
new Keyframe(0.25F, KeyframeAnimations.degreeVec(-27.5F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), new Keyframe(0.5F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR),
|
||||||
|
new Keyframe(0.75F, KeyframeAnimations.degreeVec(-27.5F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), new Keyframe(1.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR)))
|
||||||
|
.addAnimation("LeftArm",
|
||||||
|
new AnimationChannel(AnimationChannel.Targets.ROTATION, new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR),
|
||||||
|
new Keyframe(0.25F, KeyframeAnimations.degreeVec(22.5F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), new Keyframe(0.5F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR),
|
||||||
|
new Keyframe(0.75F, KeyframeAnimations.degreeVec(22.5F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), new Keyframe(1.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR)))
|
||||||
|
.addAnimation("BodySegment",
|
||||||
|
new AnimationChannel(AnimationChannel.Targets.ROTATION, new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR),
|
||||||
|
new Keyframe(0.25F, KeyframeAnimations.degreeVec(0.0F, 12.5F, 0.0F), AnimationChannel.Interpolations.LINEAR), new Keyframe(0.75F, KeyframeAnimations.degreeVec(0.0F, -12.5F, 0.0F), AnimationChannel.Interpolations.LINEAR),
|
||||||
|
new Keyframe(1.0F, KeyframeAnimations.degreeVec(0.0F, 0.83F, 0.0F), AnimationChannel.Interpolations.LINEAR)))
|
||||||
|
.build();
|
||||||
|
public static final AnimationDefinition jumpUp = AnimationDefinition.Builder.withLength(0.25F)
|
||||||
|
.addAnimation("root",
|
||||||
|
new AnimationChannel(AnimationChannel.Targets.POSITION, new Keyframe(0.0F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR),
|
||||||
|
new Keyframe(0.25F, KeyframeAnimations.posVec(0.0F, 5.0F, 0.0F), AnimationChannel.Interpolations.LINEAR)))
|
||||||
|
.addAnimation("RightArm",
|
||||||
|
new AnimationChannel(AnimationChannel.Targets.ROTATION, new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR),
|
||||||
|
new Keyframe(0.25F, KeyframeAnimations.degreeVec(-67.5F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR)))
|
||||||
|
.addAnimation("LeftArm", new AnimationChannel(AnimationChannel.Targets.ROTATION, new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR),
|
||||||
|
new Keyframe(0.25F, KeyframeAnimations.degreeVec(65.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR)))
|
||||||
|
.build();
|
||||||
|
public static final AnimationDefinition JumpDown = AnimationDefinition.Builder.withLength(0.25F)
|
||||||
|
.addAnimation("root",
|
||||||
|
new AnimationChannel(AnimationChannel.Targets.POSITION, new Keyframe(0.0F, KeyframeAnimations.posVec(0.0F, 5.0F, 0.0F), AnimationChannel.Interpolations.LINEAR),
|
||||||
|
new Keyframe(0.25F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR)))
|
||||||
|
.addAnimation("RightArm",
|
||||||
|
new AnimationChannel(AnimationChannel.Targets.ROTATION, new Keyframe(0.0F, KeyframeAnimations.degreeVec(-67.5F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR),
|
||||||
|
new Keyframe(0.25F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR)))
|
||||||
|
.addAnimation("LeftArm", new AnimationChannel(AnimationChannel.Targets.ROTATION, new Keyframe(0.0F, KeyframeAnimations.degreeVec(65.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR),
|
||||||
|
new Keyframe(0.25F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR)))
|
||||||
|
.build();
|
||||||
|
}
|
||||||
@@ -4,15 +4,19 @@ package net.mcreator.nimsrandombullshit.client.renderer;
|
|||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.client.renderer.entity.MobRenderer;
|
import net.minecraft.client.renderer.entity.MobRenderer;
|
||||||
import net.minecraft.client.renderer.entity.EntityRendererProvider;
|
import net.minecraft.client.renderer.entity.EntityRendererProvider;
|
||||||
|
import net.minecraft.client.model.geom.ModelPart;
|
||||||
|
import net.minecraft.client.model.HierarchicalModel;
|
||||||
|
|
||||||
|
import net.mcreator.nimsrandombullshit.procedures.TuxPlaybackConditionWalkingProcedure;
|
||||||
import net.mcreator.nimsrandombullshit.entity.TuxEntity;
|
import net.mcreator.nimsrandombullshit.entity.TuxEntity;
|
||||||
|
import net.mcreator.nimsrandombullshit.client.model.animations.tuxModelAnimation;
|
||||||
import net.mcreator.nimsrandombullshit.client.model.Modelpeguin;
|
import net.mcreator.nimsrandombullshit.client.model.Modelpeguin;
|
||||||
|
|
||||||
import com.mojang.blaze3d.vertex.PoseStack;
|
import com.mojang.blaze3d.vertex.PoseStack;
|
||||||
|
|
||||||
public class TuxRenderer extends MobRenderer<TuxEntity, Modelpeguin<TuxEntity>> {
|
public class TuxRenderer extends MobRenderer<TuxEntity, Modelpeguin<TuxEntity>> {
|
||||||
public TuxRenderer(EntityRendererProvider.Context context) {
|
public TuxRenderer(EntityRendererProvider.Context context) {
|
||||||
super(context, new Modelpeguin<TuxEntity>(context.bakeLayer(Modelpeguin.LAYER_LOCATION)), 0.5f);
|
super(context, new AnimatedModel(context.bakeLayer(Modelpeguin.LAYER_LOCATION)), 0.5f);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -24,4 +28,34 @@ public class TuxRenderer extends MobRenderer<TuxEntity, Modelpeguin<TuxEntity>>
|
|||||||
public ResourceLocation getTextureLocation(TuxEntity entity) {
|
public ResourceLocation getTextureLocation(TuxEntity entity) {
|
||||||
return new ResourceLocation("nims_random_bullshit:textures/entities/tux.png");
|
return new ResourceLocation("nims_random_bullshit:textures/entities/tux.png");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static final class AnimatedModel extends Modelpeguin<TuxEntity> {
|
||||||
|
private final ModelPart root;
|
||||||
|
private final HierarchicalModel animator = new HierarchicalModel<TuxEntity>() {
|
||||||
|
@Override
|
||||||
|
public ModelPart root() {
|
||||||
|
return root;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setupAnim(TuxEntity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) {
|
||||||
|
this.root().getAllParts().forEach(ModelPart::resetPose);
|
||||||
|
if (TuxPlaybackConditionWalkingProcedure.execute(entity))
|
||||||
|
this.animateWalk(tuxModelAnimation.walking, limbSwing, limbSwingAmount, 1f, 1f);
|
||||||
|
this.animate(entity.animationState1, tuxModelAnimation.jumpUp, ageInTicks, 1f);
|
||||||
|
this.animate(entity.animationState2, tuxModelAnimation.JumpDown, ageInTicks, 1f);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
public AnimatedModel(ModelPart root) {
|
||||||
|
super(root);
|
||||||
|
this.root = root;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setupAnim(TuxEntity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) {
|
||||||
|
animator.setupAnim(entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch);
|
||||||
|
super.setupAnim(entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ import net.minecraft.world.entity.LivingEntity;
|
|||||||
import net.minecraft.world.entity.EntityType;
|
import net.minecraft.world.entity.EntityType;
|
||||||
import net.minecraft.world.entity.EntityDimensions;
|
import net.minecraft.world.entity.EntityDimensions;
|
||||||
import net.minecraft.world.entity.AreaEffectCloud;
|
import net.minecraft.world.entity.AreaEffectCloud;
|
||||||
|
import net.minecraft.world.entity.AnimationState;
|
||||||
import net.minecraft.world.damagesource.DamageTypes;
|
import net.minecraft.world.damagesource.DamageTypes;
|
||||||
import net.minecraft.world.damagesource.DamageSource;
|
import net.minecraft.world.damagesource.DamageSource;
|
||||||
import net.minecraft.sounds.SoundEvent;
|
import net.minecraft.sounds.SoundEvent;
|
||||||
@@ -33,9 +34,13 @@ import net.minecraft.network.protocol.game.ClientGamePacketListener;
|
|||||||
import net.minecraft.network.protocol.Packet;
|
import net.minecraft.network.protocol.Packet;
|
||||||
import net.minecraft.network.chat.Component;
|
import net.minecraft.network.chat.Component;
|
||||||
|
|
||||||
|
import net.mcreator.nimsrandombullshit.procedures.TuxPlaybackConditionJumpUpProcedure;
|
||||||
|
import net.mcreator.nimsrandombullshit.procedures.TuxPlaybackConditionFallingProcedure;
|
||||||
import net.mcreator.nimsrandombullshit.init.NimsRandomBullshitModEntities;
|
import net.mcreator.nimsrandombullshit.init.NimsRandomBullshitModEntities;
|
||||||
|
|
||||||
public class TuxEntity extends Monster {
|
public class TuxEntity extends Monster {
|
||||||
|
public final AnimationState animationState1 = new AnimationState();
|
||||||
|
public final AnimationState animationState2 = new AnimationState();
|
||||||
private final ServerBossEvent bossInfo = new ServerBossEvent(this.getDisplayName(), ServerBossEvent.BossBarColor.BLUE, ServerBossEvent.BossBarOverlay.PROGRESS);
|
private final ServerBossEvent bossInfo = new ServerBossEvent(this.getDisplayName(), ServerBossEvent.BossBarColor.BLUE, ServerBossEvent.BossBarOverlay.PROGRESS);
|
||||||
|
|
||||||
public TuxEntity(PlayMessages.SpawnEntity packet, Level world) {
|
public TuxEntity(PlayMessages.SpawnEntity packet, Level world) {
|
||||||
@@ -108,6 +113,15 @@ public class TuxEntity extends Monster {
|
|||||||
return super.hurt(damagesource, amount);
|
return super.hurt(damagesource, amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void tick() {
|
||||||
|
super.tick();
|
||||||
|
if (this.level().isClientSide()) {
|
||||||
|
this.animationState1.animateWhen(TuxPlaybackConditionJumpUpProcedure.execute(this), this.tickCount);
|
||||||
|
this.animationState2.animateWhen(TuxPlaybackConditionFallingProcedure.execute(this), this.tickCount);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canChangeDimensions() {
|
public boolean canChangeDimensions() {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ public class LabelCopyMachineGUIButtonMessage {
|
|||||||
return;
|
return;
|
||||||
if (buttonID == 0) {
|
if (buttonID == 0) {
|
||||||
|
|
||||||
LabelCopyMachineCopyButtonPressedProcedure.execute(entity);
|
LabelCopyMachineCopyButtonPressedProcedure.execute(world, entity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package net.mcreator.nimsrandombullshit.procedures;
|
package net.mcreator.nimsrandombullshit.procedures;
|
||||||
|
|
||||||
|
import net.minecraft.world.level.LevelAccessor;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
import net.minecraft.world.inventory.Slot;
|
import net.minecraft.world.inventory.Slot;
|
||||||
import net.minecraft.world.entity.player.Player;
|
import net.minecraft.world.entity.player.Player;
|
||||||
@@ -11,11 +12,12 @@ import java.util.function.Supplier;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
public class LabelCopyMachineCopyButtonPressedProcedure {
|
public class LabelCopyMachineCopyButtonPressedProcedure {
|
||||||
public static void execute(Entity entity) {
|
public static void execute(LevelAccessor world, Entity entity) {
|
||||||
if (entity == null)
|
if (entity == null)
|
||||||
return;
|
return;
|
||||||
if ((entity instanceof Player _plrSlotItem && _plrSlotItem.containerMenu instanceof Supplier _splr && _splr.get() instanceof Map _slt ? ((Slot) _slt.get(0)).getItem() : ItemStack.EMPTY).getItem() == NimsRandomBullshitModItems.SHIPPING_LABEL
|
if (!world.isClientSide()) {
|
||||||
.get() && new Object() {
|
if ((entity instanceof Player _plrSlotItem && _plrSlotItem.containerMenu instanceof Supplier _splr && _splr.get() instanceof Map _slt ? ((Slot) _slt.get(0)).getItem() : ItemStack.EMPTY)
|
||||||
|
.getItem() == NimsRandomBullshitModItems.SHIPPING_LABEL.get() && new Object() {
|
||||||
public int getAmount(int sltid) {
|
public int getAmount(int sltid) {
|
||||||
if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) {
|
if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) {
|
||||||
ItemStack stack = ((Slot) _slots.get(sltid)).getItem();
|
ItemStack stack = ((Slot) _slots.get(sltid)).getItem();
|
||||||
@@ -82,3 +84,4 @@ public class LabelCopyMachineCopyButtonPressedProcedure {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package net.mcreator.nimsrandombullshit.procedures;
|
||||||
|
|
||||||
|
import net.minecraft.world.entity.Entity;
|
||||||
|
|
||||||
|
public class TuxPlaybackConditionFallingProcedure {
|
||||||
|
public static boolean execute(Entity entity) {
|
||||||
|
if (entity == null)
|
||||||
|
return false;
|
||||||
|
if (entity.getDeltaMovement().y() < 0) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package net.mcreator.nimsrandombullshit.procedures;
|
||||||
|
|
||||||
|
import net.minecraft.world.entity.Entity;
|
||||||
|
|
||||||
|
public class TuxPlaybackConditionJumpUpProcedure {
|
||||||
|
public static boolean execute(Entity entity) {
|
||||||
|
if (entity == null)
|
||||||
|
return false;
|
||||||
|
if (entity.getDeltaMovement().y() > 0) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package net.mcreator.nimsrandombullshit.procedures;
|
||||||
|
|
||||||
|
import net.minecraft.world.entity.Entity;
|
||||||
|
|
||||||
|
public class TuxPlaybackConditionWalkingProcedure {
|
||||||
|
public static boolean execute(Entity entity) {
|
||||||
|
if (entity == null)
|
||||||
|
return false;
|
||||||
|
if (entity.getDeltaMovement().x() > 0 || entity.getDeltaMovement().z() > 0) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user