1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-11-18 22:25:12 +00:00

Merge branch 'master' into mc-1.14.x

Unfortunately we can't apply the config changes due to backwards
compatibility. This'll be something we may need to PR into Forge.

CraftTweaker support still needs to be added.
This commit is contained in:
SquidDev
2019-12-23 22:34:28 +00:00
101 changed files with 1569 additions and 1173 deletions

View File

@@ -7,6 +7,7 @@
package dan200.computercraft.shared.turtle.upgrades;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
public class TurtleAxe extends TurtleTool
@@ -21,6 +22,11 @@ public class TurtleAxe extends TurtleTool
super( id, item );
}
public TurtleAxe( ResourceLocation id, ItemStack craftItem, ItemStack toolItem )
{
super( id, craftItem, toolItem );
}
@Override
protected float getDamageMultiplier()
{

View File

@@ -35,6 +35,11 @@ public class TurtleHoe extends TurtleTool
super( id, item );
}
public TurtleHoe( ResourceLocation id, ItemStack craftItem, ItemStack toolItem )
{
super( id, craftItem, toolItem );
}
@Override
protected boolean canBreakBlock( BlockState state, World world, BlockPos pos, TurtlePlayer player )
{

View File

@@ -35,6 +35,11 @@ public class TurtleShovel extends TurtleTool
super( id, item );
}
public TurtleShovel( ResourceLocation id, ItemStack craftItem, ItemStack toolItem )
{
super( id, craftItem, toolItem );
}
@Override
protected boolean canBreakBlock( BlockState state, World world, BlockPos pos, TurtlePlayer player )
{

View File

@@ -10,6 +10,7 @@ import dan200.computercraft.shared.turtle.core.TurtlePlayer;
import net.minecraft.block.BlockState;
import net.minecraft.block.material.Material;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
@@ -26,6 +27,11 @@ public class TurtleSword extends TurtleTool
super( id, item );
}
public TurtleSword( ResourceLocation id, ItemStack craftItem, ItemStack toolItem )
{
super( id, craftItem, toolItem );
}
@Override
protected boolean canBreakBlock( BlockState state, World world, BlockPos pos, TurtlePlayer player )
{

View File

@@ -63,6 +63,12 @@ public class TurtleTool extends AbstractTurtleUpgrade
this.item = new ItemStack( item );
}
public TurtleTool( ResourceLocation id, ItemStack craftItem, ItemStack toolItem )
{
super( id, -1, TurtleUpgradeType.Tool, craftItem );
this.item = toolItem;
}
@Nonnull
@Override
@OnlyIn( Dist.CLIENT )
@@ -77,7 +83,7 @@ public class TurtleTool extends AbstractTurtleUpgrade
);
Minecraft mc = Minecraft.getInstance();
return Pair.of(
mc.getItemRenderer().getItemModelMesher().getItemModel( item ),
mc.getItemRenderer().getItemModelMesher().getItemModel( getCraftingItem() ),
transform
);
}