-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
20 changed files
with
396 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
{ | ||
"_fv": 43, | ||
"_type": "livingentity", | ||
"definition": { | ||
"mobName": "Alchemy Craft Block Entity", | ||
"mobLabel": "", | ||
"mobModelName": "Slime", | ||
"mobModelTexture": "toumei.png", | ||
"mobModelGlowTexture": "", | ||
"solidBoundingBox": { | ||
"fixedValue": false | ||
}, | ||
"modelWidth": 0.1, | ||
"modelHeight": 0.1, | ||
"modelShadowSize": 0.1, | ||
"mountedYOffset": 0.0, | ||
"hasSpawnEgg": false, | ||
"spawnEggBaseColor": { | ||
"value": -1, | ||
"falpha": 0.0 | ||
}, | ||
"spawnEggDotColor": { | ||
"value": -1, | ||
"falpha": 0.0 | ||
}, | ||
"creativeTab": { | ||
"value": "CUSTOM:Yopkeinamono" | ||
}, | ||
"isBoss": false, | ||
"bossBarColor": "PINK", | ||
"bossBarType": "PROGRESS", | ||
"equipmentMainHand": { | ||
"value": "" | ||
}, | ||
"equipmentOffHand": { | ||
"value": "" | ||
}, | ||
"equipmentHelmet": { | ||
"value": "" | ||
}, | ||
"equipmentBody": { | ||
"value": "" | ||
}, | ||
"equipmentLeggings": { | ||
"value": "" | ||
}, | ||
"equipmentBoots": { | ||
"value": "" | ||
}, | ||
"mobBehaviourType": "Mob", | ||
"mobCreatureType": "UNDEFINED", | ||
"attackStrength": 3, | ||
"attackKnockback": 0.0, | ||
"knockbackResistance": 0.0, | ||
"movementSpeed": 0.3, | ||
"stepHeight": 0.6, | ||
"armorBaseValue": 0.0, | ||
"trackingRange": 64, | ||
"followRange": 16, | ||
"health": 10, | ||
"xpAmount": 0, | ||
"waterMob": false, | ||
"flyingMob": false, | ||
"guiBoundTo": "<NONE>", | ||
"inventorySize": 9, | ||
"inventoryStackSize": 64, | ||
"disableCollisions": false, | ||
"ridable": false, | ||
"canControlForward": false, | ||
"canControlStrafe": false, | ||
"immuneToFire": false, | ||
"immuneToArrows": false, | ||
"immuneToFallDamage": false, | ||
"immuneToCactus": false, | ||
"immuneToDrowning": false, | ||
"immuneToLightning": false, | ||
"immuneToPotions": false, | ||
"immuneToPlayer": false, | ||
"immuneToExplosion": false, | ||
"immuneToTrident": false, | ||
"immuneToAnvil": false, | ||
"immuneToWither": false, | ||
"immuneToDragonBreath": false, | ||
"mobDrop": { | ||
"value": "" | ||
}, | ||
"livingSound": { | ||
"value": "" | ||
}, | ||
"hurtSound": { | ||
"value": "entity.generic.hurt" | ||
}, | ||
"deathSound": { | ||
"value": "entity.generic.death" | ||
}, | ||
"stepSound": { | ||
"value": "" | ||
}, | ||
"onMobTickUpdate": { | ||
"name": "AlchemyCraftBlockEntityOnEntityTickUpdate" | ||
}, | ||
"hasAI": true, | ||
"aiBase": "(none)", | ||
"aixml": "<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"aitasks_container\" deletable=\"false\" x=\"40\" y=\"40\"></block><block type=\"attack_on_collide\" x=\"217\" y=\"178\"><field name=\"speed\">1.2</field><field name=\"longmemory\">FALSE</field><field name=\"condition\">null,null</field><next><block type=\"wander\"><field name=\"speed\">1</field><field name=\"condition\">null,null</field><next><block type=\"attack_action\"><field name=\"callhelp\">FALSE</field><field name=\"condition\">null,null</field><next><block type=\"look_around\"><field name=\"condition\">null,null</field><next><block type=\"swim_in_water\"><field name=\"condition\">null,null</field></block></next></block></next></block></next></block></next></block></xml>", | ||
"breedable": false, | ||
"tameable": false, | ||
"breedTriggerItems": [], | ||
"ranged": false, | ||
"rangedAttackItem": { | ||
"value": "" | ||
}, | ||
"rangedItemType": "Default item", | ||
"rangedAttackInterval": 20, | ||
"rangedAttackRadius": 10.0, | ||
"spawnThisMob": false, | ||
"doesDespawnWhenIdle": false, | ||
"spawningProbability": 20, | ||
"mobSpawningType": "monster", | ||
"minNumberOfMobsPerGroup": 4, | ||
"maxNumberOfMobsPerGroup": 4, | ||
"restrictionBiomes": [], | ||
"spawnInDungeons": false | ||
} | ||
} |
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,7 @@ | ||
{ | ||
"_fv": 43, | ||
"_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=\"entity_execute_command\"><value name=\"command\"><block type=\"text\"><field name=\"TEXT\">tp @s ~ ~ ~ ~-.5 ~</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><next><block type=\"run_function\"><value name=\"function\"><block type=\"text\"><field name=\"TEXT\">minecraft_armor_weapon:alchemymod1</field></block></value><value name=\"x\"><block type=\"coord_x\"></block></value><value name=\"y\"><block type=\"math_dual_ops\"><field name=\"OP\">ADD</field><value name=\"A\"><block type=\"coord_y\"></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">0.5</field></block></value></block></value><value name=\"z\"><block type=\"coord_z\"></block></value></block></next></block></next></block></xml>" | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
elements/AlchemyCraftBlockEntityRightClickedOnEntity.mod.json
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,7 @@ | ||
{ | ||
"_fv": 43, | ||
"_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=\"compare_mcitems\"><value name=\"a\"><block type=\"entity_iteminhand\"><value name=\"entity\"><block type=\"source_entity_from_deps\"></block></value></block></value><value name=\"b\"><block type=\"mcitem_all\"><field name=\"value\">CUSTOM:DespornKenti</field></block></value></block></value><statement name=\"DO0\"><block type=\"entity_despawn\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></statement></block></next></block></xml>" | ||
} | ||
} |
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
21 changes: 21 additions & 0 deletions
21
src/main/java/minecraftarmorweapon/client/renderer/AlchemyCraftBlockEntityRenderer.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 minecraftarmorweapon.client.renderer; | ||
|
||
import net.minecraft.resources.ResourceLocation; | ||
import net.minecraft.client.renderer.entity.MobRenderer; | ||
import net.minecraft.client.renderer.entity.EntityRendererProvider; | ||
import net.minecraft.client.model.geom.ModelLayers; | ||
import net.minecraft.client.model.SlimeModel; | ||
|
||
import minecraftarmorweapon.entity.AlchemyCraftBlockEntityEntity; | ||
|
||
public class AlchemyCraftBlockEntityRenderer extends MobRenderer<AlchemyCraftBlockEntityEntity, SlimeModel<AlchemyCraftBlockEntityEntity>> { | ||
public AlchemyCraftBlockEntityRenderer(EntityRendererProvider.Context context) { | ||
super(context, new SlimeModel(context.bakeLayer(ModelLayers.SLIME)), 0.1f); | ||
} | ||
|
||
@Override | ||
public ResourceLocation getTextureLocation(AlchemyCraftBlockEntityEntity entity) { | ||
return new ResourceLocation("minecraft_armor_weapon:textures/entities/toumei.png"); | ||
} | ||
} |
86 changes: 86 additions & 0 deletions
86
src/main/java/minecraftarmorweapon/entity/AlchemyCraftBlockEntityEntity.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,86 @@ | ||
|
||
package minecraftarmorweapon.entity; | ||
|
||
import net.minecraftforge.registries.ForgeRegistries; | ||
import net.minecraftforge.network.PlayMessages; | ||
import net.minecraftforge.network.NetworkHooks; | ||
|
||
import net.minecraft.world.level.Level; | ||
import net.minecraft.world.entity.monster.Monster; | ||
import net.minecraft.world.entity.ai.attributes.Attributes; | ||
import net.minecraft.world.entity.ai.attributes.AttributeSupplier; | ||
import net.minecraft.world.entity.MobType; | ||
import net.minecraft.world.entity.Mob; | ||
import net.minecraft.world.entity.EntityType; | ||
import net.minecraft.world.damagesource.DamageSource; | ||
import net.minecraft.sounds.SoundEvent; | ||
import net.minecraft.resources.ResourceLocation; | ||
import net.minecraft.network.protocol.Packet; | ||
|
||
import minecraftarmorweapon.procedures.AlchemyCraftBlockEntityOnEntityTickUpdateProcedure; | ||
|
||
import minecraftarmorweapon.init.MinecraftArmorWeaponModEntities; | ||
|
||
public class AlchemyCraftBlockEntityEntity extends Monster { | ||
public AlchemyCraftBlockEntityEntity(PlayMessages.SpawnEntity packet, Level world) { | ||
this(MinecraftArmorWeaponModEntities.ALCHEMY_CRAFT_BLOCK_ENTITY.get(), world); | ||
} | ||
|
||
public AlchemyCraftBlockEntityEntity(EntityType<AlchemyCraftBlockEntityEntity> type, Level world) { | ||
super(type, world); | ||
maxUpStep = 0.6f; | ||
xpReward = 0; | ||
setNoAi(false); | ||
setPersistenceRequired(); | ||
} | ||
|
||
@Override | ||
public Packet<?> getAddEntityPacket() { | ||
return NetworkHooks.getEntitySpawningPacket(this); | ||
} | ||
|
||
@Override | ||
protected void registerGoals() { | ||
super.registerGoals(); | ||
|
||
} | ||
|
||
@Override | ||
public MobType getMobType() { | ||
return MobType.UNDEFINED; | ||
} | ||
|
||
@Override | ||
public boolean removeWhenFarAway(double distanceToClosestPlayer) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public SoundEvent getHurtSound(DamageSource ds) { | ||
return ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("entity.generic.hurt")); | ||
} | ||
|
||
@Override | ||
public SoundEvent getDeathSound() { | ||
return ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("entity.generic.death")); | ||
} | ||
|
||
@Override | ||
public void baseTick() { | ||
super.baseTick(); | ||
AlchemyCraftBlockEntityOnEntityTickUpdateProcedure.execute(this.level, this.getX(), this.getY(), this.getZ(), this); | ||
} | ||
|
||
public static void init() { | ||
} | ||
|
||
public static AttributeSupplier.Builder createAttributes() { | ||
AttributeSupplier.Builder builder = Mob.createMobAttributes(); | ||
builder = builder.add(Attributes.MOVEMENT_SPEED, 0.3); | ||
builder = builder.add(Attributes.MAX_HEALTH, 10); | ||
builder = builder.add(Attributes.ARMOR, 0); | ||
builder = builder.add(Attributes.ATTACK_DAMAGE, 3); | ||
builder = builder.add(Attributes.FOLLOW_RANGE, 16); | ||
return builder; | ||
} | ||
} |
Oops, something went wrong.