mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-10 03:53:12 +01:00
Tuber Tube Tidy-up
- Set recovery chance for unenchanted Potato Cannons to 0 - Power enchantment on Potato Cannons now scales the damage of the projectile type instead of adding to it - Changed Potato Cannon crafting recipe to better fit the new model
This commit is contained in:
parent
802f8337fb
commit
bc456a76cd
4 changed files with 19 additions and 20 deletions
|
@ -3383,7 +3383,7 @@ c2e15ac0c9109bad3face6d13efc32d7116b4c25 data/create/recipes/limestone_pillar_fr
|
|||
14e322d4de8fae35d952274376497740bb3d5962 data/create/recipes/mechanical_crafting/extendo_grip.json
|
||||
de7fea84434753873dfa2b929d9b5f5f86ac6a5c data/create/recipes/mechanical_crafting/flywheel.json
|
||||
e491fd8a8873308270f9dc2a57ac8f2c70431dcc data/create/recipes/mechanical_crafting/furnace_engine.json
|
||||
6ebd36ff54059038badefad239284ec1724fdf1d data/create/recipes/mechanical_crafting/potato_cannon.json
|
||||
8e5224d22b228f69473ca48ca0d874b34660b573 data/create/recipes/mechanical_crafting/potato_cannon.json
|
||||
98f877bf8f3f8a686fc6cf7479a0fba5744248ce data/create/recipes/milling/allium.json
|
||||
8c7e1cbc87c7ca7df2bf949957e89422fef8ad94 data/create/recipes/milling/aluminum_ore.json
|
||||
bcff4d30ae09a0729bce8b2dbde4ddd6719a998b data/create/recipes/milling/andesite.json
|
||||
|
|
|
@ -1,11 +1,8 @@
|
|||
{
|
||||
"type": "create:mechanical_crafting",
|
||||
"pattern": [
|
||||
"L",
|
||||
"R",
|
||||
"S",
|
||||
"S",
|
||||
"S"
|
||||
"LRSSS",
|
||||
"CC "
|
||||
],
|
||||
"key": {
|
||||
"L": {
|
||||
|
@ -15,6 +12,9 @@
|
|||
"item": "create:precision_mechanism"
|
||||
},
|
||||
"S": {
|
||||
"item": "create:fluid_pipe"
|
||||
},
|
||||
"C": {
|
||||
"tag": "forge:ingots/copper"
|
||||
}
|
||||
},
|
||||
|
|
|
@ -30,6 +30,7 @@ import net.minecraft.util.IndirectEntityDamageSource;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.BlockRayTraceResult;
|
||||
import net.minecraft.util.math.EntityRayTraceResult;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.math.vector.Vector3d;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.common.registry.IEntityAdditionalSpawnData;
|
||||
|
@ -46,9 +47,9 @@ public class PotatoProjectileEntity extends DamagingProjectileEntity implements
|
|||
PotatoProjectileRenderMode stuckRenderer;
|
||||
double stuckFallSpeed;
|
||||
|
||||
float additionalDamage = 0;
|
||||
float additionalDamageMult = 0;
|
||||
float additionalKnockback = 0;
|
||||
float recoveryChance = .125f;
|
||||
float recoveryChance = 0;
|
||||
|
||||
public PotatoProjectileEntity(EntityType<? extends DamagingProjectileEntity> type, World world) {
|
||||
super(type, world);
|
||||
|
@ -76,7 +77,7 @@ public class PotatoProjectileEntity extends DamagingProjectileEntity implements
|
|||
int recovery = EnchantmentHelper.getEnchantmentLevel(AllEnchantments.POTATO_RECOVERY.get(), cannon);
|
||||
|
||||
if (power > 0)
|
||||
additionalDamage = power * 2;
|
||||
additionalDamageMult = 1 + power * .2f;
|
||||
if (punch > 0)
|
||||
additionalKnockback = punch * .5f;
|
||||
if (flame > 0)
|
||||
|
@ -88,7 +89,7 @@ public class PotatoProjectileEntity extends DamagingProjectileEntity implements
|
|||
@Override
|
||||
public void readAdditional(CompoundNBT nbt) {
|
||||
stack = ItemStack.read(nbt.getCompound("Item"));
|
||||
additionalDamage = nbt.getFloat("AdditionalDamage");
|
||||
additionalDamageMult = nbt.getFloat("AdditionalDamage");
|
||||
additionalKnockback = nbt.getFloat("AdditionalKnockback");
|
||||
recoveryChance = nbt.getFloat("Recovery");
|
||||
super.readAdditional(nbt);
|
||||
|
@ -97,7 +98,7 @@ public class PotatoProjectileEntity extends DamagingProjectileEntity implements
|
|||
@Override
|
||||
public void writeAdditional(CompoundNBT nbt) {
|
||||
nbt.put("Item", stack.serializeNBT());
|
||||
nbt.putFloat("AdditionalDamage", additionalDamage);
|
||||
nbt.putFloat("AdditionalDamage", additionalDamageMult);
|
||||
nbt.putFloat("AdditionalKnockback", additionalKnockback);
|
||||
nbt.putFloat("Recovery", recoveryChance);
|
||||
super.writeAdditional(nbt);
|
||||
|
@ -174,7 +175,7 @@ public class PotatoProjectileEntity extends DamagingProjectileEntity implements
|
|||
Vector3d hit = ray.getHitVec();
|
||||
Entity target = ray.getEntity();
|
||||
PotatoCannonProjectileTypes projectileType = getProjectileType();
|
||||
float damage = projectileType.getDamage() + additionalDamage;
|
||||
float damage = MathHelper.floor(projectileType.getDamage() * additionalDamageMult);
|
||||
float knockback = projectileType.getKnockback() + additionalKnockback;
|
||||
Entity owner = this.getOwner();
|
||||
|
||||
|
@ -193,7 +194,7 @@ public class PotatoProjectileEntity extends DamagingProjectileEntity implements
|
|||
target.setFire(5);
|
||||
|
||||
boolean onServer = !world.isRemote;
|
||||
if (onServer && !target.attackEntityFrom(causePotatoDamage(), (float) damage)) {
|
||||
if (onServer && !target.attackEntityFrom(causePotatoDamage(), damage)) {
|
||||
target.setFireTicks(k);
|
||||
remove();
|
||||
return;
|
||||
|
|
|
@ -39,16 +39,14 @@ public class MechanicalCraftingRecipeGen extends CreateRecipeProvider {
|
|||
.patternLine("SSS")
|
||||
.patternLine("SSS")
|
||||
.patternLine(" H ")),
|
||||
|
||||
|
||||
POTATO_CANNON = create(AllItems.POTATO_CANNON::get).returns(1)
|
||||
.recipe(b -> b.key('L', I.andesite())
|
||||
.key('R', I.precisionMechanism())
|
||||
.key('S', Ingredient.fromTag(I.copper()))
|
||||
.patternLine("L")
|
||||
.patternLine("R")
|
||||
.patternLine("S")
|
||||
.patternLine("S")
|
||||
.patternLine("S")),
|
||||
.key('S', AllBlocks.FLUID_PIPE.get())
|
||||
.key('C', Ingredient.fromTag(I.copper()))
|
||||
.patternLine("LRSSS")
|
||||
.patternLine("CC ")),
|
||||
|
||||
FURNACE_ENGINE = create(AllBlocks.FURNACE_ENGINE::get).returns(1)
|
||||
.recipe(b -> b.key('P', Ingredient.fromTag(I.brassSheet()))
|
||||
|
|
Loading…
Reference in a new issue