Fixes 2.0.3 + tags + Diamonds + Crafting Recipes
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"parent": "minecraft:recipes/root",
|
||||
"criteria": {
|
||||
"has_bone": {
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": "minecraft:bone"
|
||||
}
|
||||
]
|
||||
},
|
||||
"trigger": "minecraft:inventory_changed"
|
||||
},
|
||||
"has_the_recipe": {
|
||||
"conditions": {
|
||||
"recipe": "acesbs:berserkers_pauldron"
|
||||
},
|
||||
"trigger": "minecraft:recipe_unlocked"
|
||||
}
|
||||
},
|
||||
"requirements": [
|
||||
[
|
||||
"has_the_recipe",
|
||||
"has_bone"
|
||||
]
|
||||
],
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"acesbs:berserkers_pauldron"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"parent": "minecraft:recipes/root",
|
||||
"criteria": {
|
||||
"has_prisma_steel": {
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": "acesbs:prisma_steel"
|
||||
}
|
||||
]
|
||||
},
|
||||
"trigger": "minecraft:inventory_changed"
|
||||
},
|
||||
"has_the_recipe": {
|
||||
"conditions": {
|
||||
"recipe": "acesbs:sovs_plate_carrier"
|
||||
},
|
||||
"trigger": "minecraft:recipe_unlocked"
|
||||
}
|
||||
},
|
||||
"requirements": [
|
||||
[
|
||||
"has_the_recipe",
|
||||
"has_prisma_steel"
|
||||
]
|
||||
],
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"acesbs:sovs_plate_carrier"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"parent": "minecraft:recipes/root",
|
||||
"criteria": {
|
||||
"has_infernal_ashes": {
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": "acesbs:infernal_ashes"
|
||||
}
|
||||
]
|
||||
},
|
||||
"trigger": "minecraft:inventory_changed"
|
||||
},
|
||||
"has_the_recipe": {
|
||||
"conditions": {
|
||||
"recipe": "acesbs:wildfire_boots"
|
||||
},
|
||||
"trigger": "minecraft:recipe_unlocked"
|
||||
}
|
||||
},
|
||||
"requirements": [
|
||||
[
|
||||
"has_the_recipe",
|
||||
"has_infernal_ashes"
|
||||
]
|
||||
],
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"acesbs:wildfire_boots"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"category": "equipment",
|
||||
"key": {
|
||||
"B": "minecraft:bone",
|
||||
"C": "minecraft:leather_chestplate",
|
||||
"E": "acesbs:stable_entropy",
|
||||
"I": "#c:ingots/iron",
|
||||
"S": "minecraft:string"
|
||||
},
|
||||
"pattern": [
|
||||
"ISB",
|
||||
"ICS",
|
||||
"EEE"
|
||||
],
|
||||
"result": {
|
||||
"count": 1,
|
||||
"id": "acesbs:berserkers_pauldron"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"category": "equipment",
|
||||
"key": {
|
||||
"C": "minecraft:iron_chestplate",
|
||||
"S": "acesbs:prisma_steel"
|
||||
},
|
||||
"pattern": [
|
||||
" S ",
|
||||
"SCS",
|
||||
" S "
|
||||
],
|
||||
"result": {
|
||||
"count": 1,
|
||||
"id": "acesbs:sovs_plate_carrier"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"category": "equipment",
|
||||
"key": {
|
||||
"A": "acesbs:infernal_ashes",
|
||||
"B": "minecraft:iron_boots"
|
||||
},
|
||||
"pattern": [
|
||||
" ",
|
||||
"A A",
|
||||
"ABA"
|
||||
],
|
||||
"result": {
|
||||
"count": 1,
|
||||
"id": "acesbs:wildfire_boots"
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"values": []
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"values": [
|
||||
"acesbs:prisma_steel_helmet",
|
||||
"acesbs:prisma_steel_chestplate",
|
||||
"acesbs:prisma_steel_leggings",
|
||||
"acesbs:prisma_steel_boots",
|
||||
"acesbs:ashen_steel_helmet",
|
||||
"acesbs:prisma_steel_chestplate",
|
||||
"acesbs:ashen_steel_leggings",
|
||||
"acesbs:ashen_steel_boots",
|
||||
"acesbs:berserkers_pauldron",
|
||||
"acesbs:wildfire_boots"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"values": [
|
||||
"acesbs:prisma_steel_helmet",
|
||||
"acesbs:prisma_steel_chestplate",
|
||||
"acesbs:prisma_steel_leggings",
|
||||
"acesbs:prisma_steel_boots",
|
||||
"acesbs:ashen_steel_helmet",
|
||||
"acesbs:prisma_steel_chestplate",
|
||||
"acesbs:ashen_steel_leggings",
|
||||
"acesbs:ashen_steel_boots",
|
||||
"acesbs:berserkers_pauldron",
|
||||
"acesbs:wildfire_boots"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"values": [
|
||||
"acesbs:prisma_steel_chestplate",
|
||||
"acesbs:prisma_steel_chestplate",
|
||||
"acesbs:berserkers_pauldron"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"values": [
|
||||
"acesbs:prisma_steel_boots",
|
||||
"acesbs:ashen_steel_boots",
|
||||
"acesbs:wildfire_boots"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"values": [
|
||||
"acesbs:prisma_steel_helmet",
|
||||
"acesbs:ashen_steel_helmet"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"values": [
|
||||
"acesbs:prisma_steel_leggings",
|
||||
"acesbs:ashen_steel_leggings"
|
||||
]
|
||||
}
|
||||
@@ -1,16 +1,6 @@
|
||||
Command Core textures broken
|
||||
Command Core Broken
|
||||
|
||||
Particles not on server???
|
||||
|
||||
Combustible LEmon will not render
|
||||
|
||||
Crafting for the Plate Cariier, Beserkers Pauldron, Wildfire boots
|
||||
|
||||
Enchanting for Armor
|
||||
|
||||
Thot-begone - Double it and give it to the next guy
|
||||
|
||||
Rebalence Ashen and Prisma tools
|
||||
|
||||
Mining Values
|
||||
@@ -77,10 +77,6 @@ public class ModBlockTagProvider extends FabricTagProvider.BlockTagProvider {
|
||||
valueLookupBuilder(BlockTags.LEAVES)
|
||||
.add(ModBlocks.LEMONWOOD_LEAVES);
|
||||
|
||||
valueLookupBuilder(ModTags.Blocks.NEEDS_PRISMA_STEEL_TOOL);
|
||||
// Currently Broken
|
||||
// .addTag(BlockTags.NEEDS_IRON_TOOL);
|
||||
|
||||
valueLookupBuilder(BlockTags.LOGS_THAT_BURN)
|
||||
.add(ModBlocks.LEMONWOOD_LOG)
|
||||
.add(ModBlocks.LEMONWOOD_WOOD)
|
||||
|
||||
@@ -84,6 +84,37 @@ public class ModItemTagProvider extends FabricTagProvider.ItemTagProvider {
|
||||
.add(ModItems.WILDFIRE_BOOTS)
|
||||
.add(ModItems.SOVS_PLATE_CARRIER);
|
||||
|
||||
valueLookupBuilder(ItemTags.ARMOR_ENCHANTABLE)
|
||||
.add(PrismaSteelItems.PRISMA_STEEL_HELMET)
|
||||
.add(PrismaSteelItems.PRISMA_STEEL_CHESTPLATE)
|
||||
.add(PrismaSteelItems.PRISMA_STEEL_LEGGINGS)
|
||||
.add(PrismaSteelItems.PRISMA_STEEL_BOOTS)
|
||||
.add(AshenSteelItems.ASHEN_STEEL_HELMET)
|
||||
.add(PrismaSteelItems.PRISMA_STEEL_CHESTPLATE)
|
||||
.add(AshenSteelItems.ASHEN_STEEL_LEGGINGS)
|
||||
.add(AshenSteelItems.ASHEN_STEEL_BOOTS)
|
||||
.add(ModItems.BERSERKERS_PAULDRON)
|
||||
.add(ModItems.WILDFIRE_BOOTS);
|
||||
|
||||
valueLookupBuilder(ItemTags.HEAD_ARMOR_ENCHANTABLE)
|
||||
.add(PrismaSteelItems.PRISMA_STEEL_HELMET)
|
||||
.add(AshenSteelItems.ASHEN_STEEL_HELMET);
|
||||
|
||||
valueLookupBuilder(ItemTags.CHEST_ARMOR_ENCHANTABLE)
|
||||
.add(PrismaSteelItems.PRISMA_STEEL_CHESTPLATE)
|
||||
.add(PrismaSteelItems.PRISMA_STEEL_CHESTPLATE)
|
||||
.add(ModItems.BERSERKERS_PAULDRON);
|
||||
|
||||
valueLookupBuilder(ItemTags.LEG_ARMOR_ENCHANTABLE)
|
||||
.add(PrismaSteelItems.PRISMA_STEEL_LEGGINGS)
|
||||
.add(AshenSteelItems.ASHEN_STEEL_LEGGINGS);
|
||||
|
||||
valueLookupBuilder(ItemTags.FOOT_ARMOR_ENCHANTABLE)
|
||||
.add(PrismaSteelItems.PRISMA_STEEL_BOOTS)
|
||||
.add(AshenSteelItems.ASHEN_STEEL_BOOTS)
|
||||
.add(ModItems.WILDFIRE_BOOTS);
|
||||
|
||||
|
||||
valueLookupBuilder(ItemTags.TRIM_MATERIALS)
|
||||
.add(PrismaSteelItems.PRISMA_STEEL)
|
||||
.add(AshenSteelItems.ASHEN_STEEL);
|
||||
@@ -153,5 +184,17 @@ public class ModItemTagProvider extends FabricTagProvider.ItemTagProvider {
|
||||
|
||||
valueLookupBuilder(ConventionalItemTags.MUSIC_DISCS)
|
||||
.add(ModItems.CRAB_RAVE_MUSIC_DISC);
|
||||
|
||||
valueLookupBuilder(ConventionalItemTags.ENCHANTABLES)
|
||||
.add(PrismaSteelItems.PRISMA_STEEL_HELMET)
|
||||
.add(PrismaSteelItems.PRISMA_STEEL_CHESTPLATE)
|
||||
.add(PrismaSteelItems.PRISMA_STEEL_LEGGINGS)
|
||||
.add(PrismaSteelItems.PRISMA_STEEL_BOOTS)
|
||||
.add(AshenSteelItems.ASHEN_STEEL_HELMET)
|
||||
.add(PrismaSteelItems.PRISMA_STEEL_CHESTPLATE)
|
||||
.add(AshenSteelItems.ASHEN_STEEL_LEGGINGS)
|
||||
.add(AshenSteelItems.ASHEN_STEEL_BOOTS)
|
||||
.add(ModItems.BERSERKERS_PAULDRON)
|
||||
.add(ModItems.WILDFIRE_BOOTS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.acethewildfire.acesbs.trim.ModTrimPatterns;
|
||||
import com.acethewildfire.acesbs.util.ModTags;
|
||||
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
|
||||
import net.fabricmc.fabric.api.datagen.v1.provider.FabricRecipeProvider;
|
||||
import net.fabricmc.fabric.api.tag.convention.v2.ConventionalItemTags;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.data.recipe.RecipeExporter;
|
||||
import net.minecraft.data.recipe.RecipeGenerator;
|
||||
@@ -73,6 +74,36 @@ public class ModRecipeProvider extends FabricRecipeProvider {
|
||||
.criterion(hasItem(Items.STICK), conditionsFromItem(Items.STICK))
|
||||
.offerTo(recipeExporter);
|
||||
|
||||
createShaped(RecipeCategory.COMBAT, ModItems.BERSERKERS_PAULDRON, 1)
|
||||
.pattern("ISB")
|
||||
.pattern("ICS")
|
||||
.pattern("EEE")
|
||||
.input('I', ConventionalItemTags.IRON_INGOTS)
|
||||
.input('S', Items.STRING)
|
||||
.input('B', Items.BONE)
|
||||
.input('C', Items.LEATHER_CHESTPLATE)
|
||||
.input('E', ModItems.STABLE_ENTROPY)
|
||||
.criterion(hasItem(Items.BONE), conditionsFromItem(Items.BONE))
|
||||
.offerTo(recipeExporter);
|
||||
|
||||
createShaped(RecipeCategory.COMBAT, ModItems.SOVS_PLATE_CARRIER, 1)
|
||||
.pattern(" S ")
|
||||
.pattern("SCS")
|
||||
.pattern(" S ")
|
||||
.input('S', PrismaSteelItems.PRISMA_STEEL)
|
||||
.input('C', Items.IRON_CHESTPLATE)
|
||||
.criterion(hasItem(PrismaSteelItems.PRISMA_STEEL), conditionsFromItem(PrismaSteelItems.PRISMA_STEEL))
|
||||
.offerTo(recipeExporter);
|
||||
|
||||
createShaped(RecipeCategory.COMBAT, ModItems.WILDFIRE_BOOTS, 1)
|
||||
.pattern(" ")
|
||||
.pattern("A A")
|
||||
.pattern("ABA")
|
||||
.input('A', ModItems.INFERNAL_ASHES)
|
||||
.input('B', Items.IRON_BOOTS)
|
||||
.criterion(hasItem(ModItems.INFERNAL_ASHES), conditionsFromItem(ModItems.INFERNAL_ASHES))
|
||||
.offerTo(recipeExporter);
|
||||
|
||||
createShapeless(RecipeCategory.FOOD, ModItems.BRICKED_UP, 1)
|
||||
.input(Items.BRICK, 1)
|
||||
.input(ModItems.STABLE_ENDTROPY, 1)
|
||||
|
||||
@@ -9,6 +9,7 @@ import net.minecraft.entity.effect.StatusEffectCategory;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
import net.minecraft.sound.SoundCategory;
|
||||
import net.minecraft.sound.SoundEvents;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -17,6 +18,11 @@ public class BrickedUpEffect extends StatusEffect {
|
||||
super(category, color);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Text getName() {
|
||||
return Text.translatable(this.getTranslationKey());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applyUpdateEffect(ServerWorld world, LivingEntity entity, int amplifier) {
|
||||
|
||||
|
||||
@@ -5,12 +5,18 @@ import net.minecraft.entity.effect.StatusEffect;
|
||||
import net.minecraft.entity.effect.StatusEffectCategory;
|
||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
import net.minecraft.text.Text;
|
||||
|
||||
public class CigaretteEffect extends StatusEffect {
|
||||
public CigaretteEffect(StatusEffectCategory category, int color) {
|
||||
super(category, color);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Text getName() {
|
||||
return Text.translatable(this.getTranslationKey());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applyUpdateEffect(ServerWorld world, LivingEntity entity, int amplifier) {
|
||||
StatusEffectInstance effect = entity.getStatusEffect(ModEffects.CIGARETTE);
|
||||
|
||||
@@ -5,6 +5,7 @@ import net.minecraft.entity.effect.StatusEffect;
|
||||
import net.minecraft.entity.effect.StatusEffectCategory;
|
||||
import net.minecraft.particle.ParticleTypes;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.Random;
|
||||
@@ -14,6 +15,11 @@ public class InfernalFireEffect extends StatusEffect {
|
||||
super(category, color);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Text getName() {
|
||||
return Text.translatable(this.getTranslationKey());
|
||||
}
|
||||
|
||||
Random r = new Random();
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package com.acethewildfire.acesbs.effect;
|
||||
|
||||
import com.acethewildfire.acesbs.AcesBS;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.entity.effect.StatusEffect;
|
||||
import net.minecraft.entity.effect.StatusEffectCategory;
|
||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
import net.minecraft.text.Text;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
@@ -20,6 +22,11 @@ public class JitteryEffect extends StatusEffect {
|
||||
int maxDelay = 20;
|
||||
int times = 2;
|
||||
|
||||
@Override
|
||||
public Text getName() {
|
||||
return Text.translatable(this.getTranslationKey());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applyUpdateEffect(ServerWorld world, LivingEntity entity, int amplifier) {
|
||||
StatusEffectInstance effect = entity.getStatusEffect(ModEffects.JITTERY);
|
||||
@@ -33,9 +40,11 @@ public class JitteryEffect extends StatusEffect {
|
||||
times = r.nextInt(2,5);
|
||||
} else if (delay >= maxDelay) {
|
||||
// Dance
|
||||
double randomVelocityX = r.nextDouble(-0.3, 0.3);
|
||||
double randomVelocityZ = r.nextDouble(-0.3, 0.3);
|
||||
entity.addVelocity(randomVelocityX, 0, randomVelocityZ);
|
||||
AcesBS.LOGGER.info("DANCE!");
|
||||
double randomVelocityX = r.nextDouble(-0.5 * (amplifier + 1), 0.5 * (amplifier + 1));
|
||||
double randomVelocityZ = r.nextDouble(-0.5 * (amplifier + 1), 0.5 * (amplifier + 1));
|
||||
entity.addVelocity(randomVelocityX, 0.3, randomVelocityZ);
|
||||
entity.velocityModified = true;
|
||||
|
||||
//Decrement times
|
||||
times--;
|
||||
|
||||
@@ -4,12 +4,18 @@ import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.entity.effect.StatusEffect;
|
||||
import net.minecraft.entity.effect.StatusEffectCategory;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
import net.minecraft.text.Text;
|
||||
|
||||
public class LemonEffect extends StatusEffect {
|
||||
public LemonEffect(StatusEffectCategory category, int color) {
|
||||
super(category, color);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Text getName() {
|
||||
return Text.translatable(this.getTranslationKey());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applyUpdateEffect(ServerWorld world, LivingEntity entity, int amplifier) {
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ public class ModEffects {
|
||||
public static final RegistryEntry<StatusEffect> CIGARETTE = registerStatusEffect("cigarette",
|
||||
new CigaretteEffect(StatusEffectCategory.BENEFICIAL, 0xE6A74F)
|
||||
.addAttributeModifier(EntityAttributes.MOVEMENT_SPEED, Identifier.of(AcesBS.MOD_ID, "cigarette"),
|
||||
1F, EntityAttributeModifier.Operation.ADD_MULTIPLIED_TOTAL));
|
||||
0.50F, EntityAttributeModifier.Operation.ADD_MULTIPLIED_TOTAL));
|
||||
|
||||
public static final RegistryEntry<StatusEffect> WITHDRAWAL = registerStatusEffect("withdrawal",
|
||||
new WithdrawalEffect(StatusEffectCategory.HARMFUL, 0x4A412A)
|
||||
|
||||
@@ -4,12 +4,18 @@ import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.entity.effect.StatusEffect;
|
||||
import net.minecraft.entity.effect.StatusEffectCategory;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
import net.minecraft.text.Text;
|
||||
|
||||
public class WithdrawalEffect extends StatusEffect {
|
||||
protected WithdrawalEffect(StatusEffectCategory category, int color) {
|
||||
super(category, color);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Text getName() {
|
||||
return Text.translatable(this.getTranslationKey());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applyUpdateEffect(ServerWorld world, LivingEntity entity, int amplifier) {
|
||||
return true;
|
||||
|
||||
+11
-18
@@ -17,7 +17,8 @@ import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.math.RotationAxis;
|
||||
|
||||
public class CombustibleLemonRenderer extends EntityRenderer<CombustibleLemonEntity, EntityRenderState> {
|
||||
protected CombustibleLemonModel model;
|
||||
|
||||
private final CombustibleLemonModel model;
|
||||
|
||||
public CombustibleLemonRenderer(EntityRendererFactory.Context ctx) {
|
||||
super(ctx);
|
||||
@@ -30,24 +31,16 @@ public class CombustibleLemonRenderer extends EntityRenderer<CombustibleLemonEnt
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(EntityRenderState renderState, MatrixStack matrices, OrderedRenderCommandQueue queue, CameraRenderState cameraState) {
|
||||
// matrices.push();
|
||||
public void updateRenderState(CombustibleLemonEntity entity, EntityRenderState state, float tickDelta) {
|
||||
super.updateRenderState(entity, state, tickDelta);
|
||||
// You can store custom values here if needed
|
||||
}
|
||||
|
||||
// if(!entity.isGrounded()) {
|
||||
// matrices.multiply(RotationAxis.POSITIVE_Y.rotationDegrees(MathHelper.lerp(tickDelta, entity.prevYaw, entity.getYaw())));
|
||||
// matrices.multiply(RotationAxis.POSITIVE_X.rotationDegrees(entity.getRenderingRotation() * 5f));
|
||||
// matrices.translate(0, -1.0f, 0);
|
||||
// } else {
|
||||
//// matrices.multiply(RotationAxis.POSITIVE_Y.rotationDegrees(entity.groundedOffset.getY()));
|
||||
//// matrices.multiply(RotationAxis.POSITIVE_X.rotationDegrees(entity.groundedOffset.getX()));
|
||||
// matrices.translate(0, -1.0f, 0);
|
||||
// }
|
||||
@Override
|
||||
public void render(EntityRenderState state, MatrixStack matrices,
|
||||
OrderedRenderCommandQueue queue,
|
||||
CameraRenderState cameraState) {
|
||||
|
||||
// VertexConsumer vertexconsumer = ItemRenderer.getItemGlintConsumer(queue,
|
||||
// this.model.getLayer(Identifier.of(AcesBS.MOD_ID, "textures/entity/combustible_lemon/combustible_lemon.png")), false, false);
|
||||
// this.model.render(matrices, vertexconsumer, light, OverlayTexture.DEFAULT_UV);
|
||||
|
||||
// matrices.pop();
|
||||
super.render(renderState, matrices, queue, cameraState);
|
||||
super.render(state, matrices, queue, cameraState);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ public class AshenSteelItems {
|
||||
public static final Item ASHEN_STEEL_PICKAXE = ModItems.registerItem("ashen_steel_pickaxe",
|
||||
setting -> new Item(setting.pickaxe(ModToolMaterials.ASHEN_STEEL, 1.0F, -2.8F)));
|
||||
public static final Item ASHEN_STEEL_HAMMER = ModItems.registerItem("ashen_steel_hammer",
|
||||
setting -> new HammerItem(ModToolMaterials.ASHEN_STEEL, 7.0F, -3.4F, setting));
|
||||
setting -> new HammerItem(ModToolMaterials.ASHEN_STEEL, 9.0F, -3.4F, setting));
|
||||
public static final Item ASHEN_STEEL_AXE = ModItems.registerItem("ashen_steel_axe",
|
||||
setting -> new AxeItem(ModToolMaterials.ASHEN_STEEL, 6.0F, -3.1F, setting));
|
||||
public static final Item ASHEN_STEEL_HOE = ModItems.registerItem("ashen_steel_hoe",
|
||||
|
||||
@@ -5,15 +5,16 @@ import com.google.common.base.Suppliers;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ToolMaterial;
|
||||
import net.minecraft.recipe.Ingredient;
|
||||
import net.minecraft.registry.tag.BlockTags;
|
||||
import net.minecraft.registry.tag.TagKey;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public class ModToolMaterials {
|
||||
|
||||
public static ToolMaterial PRISMA_STEEL = new ToolMaterial(ModTags.Blocks.INCORRECT_FOR_PRISMA_STEEL_TOOL,
|
||||
750, 8.0F, 2.0F, 22, ModTags.Items.PRISMA_REPAIR);
|
||||
public static ToolMaterial ASHEN_STEEL = new ToolMaterial(ModTags.Blocks.INCORRECT_FOR_ASHEN_STEEL_TOOL,
|
||||
750, 8.0F, 2.0F, 22, ModTags.Items.ASHEN_REPAIR);
|
||||
public static ToolMaterial PRISMA_STEEL = new ToolMaterial(BlockTags.INCORRECT_FOR_IRON_TOOL,
|
||||
1561, 8.0F, 3.0F, 22, ModTags.Items.PRISMA_REPAIR);
|
||||
public static ToolMaterial ASHEN_STEEL = new ToolMaterial(BlockTags.INCORRECT_FOR_IRON_TOOL,
|
||||
1561, 8.0F, 3.0F, 22, ModTags.Items.ASHEN_REPAIR);
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ public class PrismaSteelItems {
|
||||
public static final Item PRISMA_STEEL_PICKAXE = ModItems.registerItem("prisma_steel_pickaxe",
|
||||
setting -> new Item(setting.pickaxe(ModToolMaterials.PRISMA_STEEL, 1.0F, -2.8F)));
|
||||
public static final Item PRISMA_STEEL_HAMMER = ModItems.registerItem("prisma_steel_hammer",
|
||||
setting -> new HammerItem(ModToolMaterials.PRISMA_STEEL, 7.0F, -3.4F, setting));
|
||||
setting -> new HammerItem(ModToolMaterials.PRISMA_STEEL, 9.0F, -3.4F, setting));
|
||||
public static final Item PRISMA_STEEL_AXE = ModItems.registerItem("prisma_steel_axe",
|
||||
setting -> new AxeItem(ModToolMaterials.PRISMA_STEEL, 6.0F, -3.1F, setting));
|
||||
public static final Item PRISMA_STEEL_HOE = ModItems.registerItem("prisma_steel_hoe",
|
||||
|
||||
@@ -2,8 +2,11 @@ package com.acethewildfire.acesbs.item.custom;
|
||||
|
||||
import com.acethewildfire.acesbs.item.ModArmorMaterials;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import net.fabricmc.fabric.api.item.v1.EnchantingContext;
|
||||
import net.minecraft.component.DataComponentTypes;
|
||||
import net.minecraft.component.type.EquippableComponent;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.Enchantments;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EquipmentSlot;
|
||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
||||
@@ -13,6 +16,8 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.equipment.ArmorMaterial;
|
||||
import net.minecraft.item.equipment.EquipmentType;
|
||||
import net.minecraft.registry.entry.RegistryEntry;
|
||||
import net.minecraft.registry.tag.TagKey;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
import net.minecraft.world.World;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -26,6 +31,8 @@ public class ModArmorItem extends Item {
|
||||
.put(ModArmorMaterials.PRISMA_STEEL_ARMOR_MATERIAL,
|
||||
List.of(new StatusEffectInstance(StatusEffects.SPEED, 400, 1, false, false),
|
||||
new StatusEffectInstance(StatusEffects.JUMP_BOOST, 400, 0, false, false)))
|
||||
.put(ModArmorMaterials.WILDFIRE_ARMOR_MATERIAL,
|
||||
List.of(new StatusEffectInstance(StatusEffects.FIRE_RESISTANCE, 400, 0, false, false)))
|
||||
// For more materials just add more puts
|
||||
// .put(ModArmorMaterials.PRISMA_STEEL_ARMOR_MATERIAL,
|
||||
// List.of(new StatusEffectInstance(StatusEffects.SPEED, 400, 2, false, false),
|
||||
@@ -42,11 +49,9 @@ public class ModArmorItem extends Item {
|
||||
|
||||
if(!world.isClient()) {
|
||||
if(entity instanceof PlayerEntity player) {
|
||||
if(hasFullSuitOfArmorOn(player)) {
|
||||
evaluateArmorEffects(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
super.inventoryTick(stack, world, entity, slot);
|
||||
}
|
||||
@@ -79,17 +84,18 @@ public class ModArmorItem extends Item {
|
||||
EquippableComponent equippableComponentBreastplate = player.getEquippedStack(EquipmentSlot.CHEST).getItem().getComponents().get(DataComponentTypes.EQUIPPABLE);
|
||||
EquippableComponent equippableComponentHelmet = player.getEquippedStack(EquipmentSlot.HEAD).getItem().getComponents().get(DataComponentTypes.EQUIPPABLE);
|
||||
|
||||
ArmorMaterial prismaSteelArmorMaterial = ModArmorMaterials.PRISMA_STEEL_ARMOR_MATERIAL;
|
||||
ArmorMaterial wildfireArmorMaterial = ModArmorMaterials.WILDFIRE_ARMOR_MATERIAL;
|
||||
|
||||
if (material == prismaSteelArmorMaterial){
|
||||
// Check whole armor
|
||||
return (equippableComponentBoots != null && equippableComponentBoots.assetId().get().equals(material.assetId())) && (equippableComponentLeggings != null && equippableComponentLeggings.assetId().get().equals(material.assetId())) &&
|
||||
(equippableComponentBreastplate != null && equippableComponentBreastplate.assetId().get().equals(material.assetId())) && (equippableComponentHelmet != null && equippableComponentHelmet.assetId().get().equals(material.assetId()));
|
||||
} else if (material == wildfireArmorMaterial) {
|
||||
// Just check boots
|
||||
return (equippableComponentBoots != null && equippableComponentBoots.assetId().get().equals(material.assetId()));
|
||||
}
|
||||
|
||||
private boolean hasFullSuitOfArmorOn(PlayerEntity player) {
|
||||
ItemStack boots = player.getEquippedStack(EquipmentSlot.FEET);
|
||||
ItemStack leggings = player.getEquippedStack(EquipmentSlot.LEGS);
|
||||
ItemStack breastplate = player.getEquippedStack(EquipmentSlot.CHEST);
|
||||
ItemStack helmet = player.getEquippedStack(EquipmentSlot.HEAD);
|
||||
|
||||
return !helmet.isEmpty() && !breastplate.isEmpty()
|
||||
&& !leggings.isEmpty() && !boots.isEmpty();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user