This commit is contained in:
modmuss50 2020-06-01 22:37:43 +01:00
parent 17453d7edd
commit ae1a26156a
5 changed files with 41 additions and 40 deletions

View file

@ -69,12 +69,12 @@ license {
group = 'TechReborn'
dependencies {
minecraft "com.mojang:minecraft:20w21a"
mappings "net.fabricmc:yarn:20w21a+build.10:v2"
modImplementation "net.fabricmc:fabric-loader:0.8.4+build.198"
minecraft "com.mojang:minecraft:20w22a"
mappings "net.fabricmc:yarn:20w22a+build.6:v2"
modImplementation "net.fabricmc:fabric-loader:0.8.5+build.199"
//Fabric api
modImplementation "net.fabricmc.fabric-api:fabric-api:0.10.10+build.347-1.16"
modImplementation "net.fabricmc.fabric-api:fabric-api:0.11.2+build.351-1.16"
optionalDependency ("me.shedaniel:RoughlyEnoughItems:4.3.7-unstable")
disabledOptionalDependency ('io.github.cottonmc:LibCD:2.3.0+1.15.2')

View file

@ -30,7 +30,7 @@ import net.minecraft.item.ItemConvertible;
import net.minecraft.loot.LootPool;
import net.minecraft.loot.UniformLootTableRange;
import net.minecraft.loot.entry.ItemEntry;
import net.minecraft.loot.entry.LootEntry;
import net.minecraft.loot.entry.LootPoolEntry;
import net.minecraft.loot.function.SetCountLootFunction;
import techreborn.config.TechRebornConfig;
import techreborn.init.TRContent.Ingots;
@ -40,35 +40,35 @@ public class ModLoot {
public static void init() {
LootEntry copperIngot = makeEntry(Ingots.COPPER);
LootEntry tinIngot = makeEntry(Ingots.TIN);
LootEntry leadIngot = makeEntry(Ingots.LEAD);
LootEntry silverIngot = makeEntry(Ingots.SILVER);
LootEntry refinedronIngot = makeEntry(Ingots.REFINED_IRON);
LootEntry advancedalloyIngot = makeEntry(Ingots.ADVANCED_ALLOY);
LootEntry basicFrame = makeEntry(TRContent.MachineBlocks.BASIC.frame.asItem());
LootEntry basicCircuit = makeEntry(Parts.ELECTRONIC_CIRCUIT);
LootEntry rubberSapling = makeEntry(TRContent.RUBBER_SAPLING, 25);
LootPoolEntry copperIngot = makeEntry(Ingots.COPPER);
LootPoolEntry tinIngot = makeEntry(Ingots.TIN);
LootPoolEntry leadIngot = makeEntry(Ingots.LEAD);
LootPoolEntry silverIngot = makeEntry(Ingots.SILVER);
LootPoolEntry refinedronIngot = makeEntry(Ingots.REFINED_IRON);
LootPoolEntry advancedalloyIngot = makeEntry(Ingots.ADVANCED_ALLOY);
LootPoolEntry basicFrame = makeEntry(TRContent.MachineBlocks.BASIC.frame.asItem());
LootPoolEntry basicCircuit = makeEntry(Parts.ELECTRONIC_CIRCUIT);
LootPoolEntry rubberSapling = makeEntry(TRContent.RUBBER_SAPLING, 25);
LootEntry aluminumIngot = makeEntry(Ingots.ALUMINUM);
LootEntry electrumIngot = makeEntry(Ingots.ELECTRUM);
LootEntry invarIngot = makeEntry(Ingots.INVAR);
LootEntry nickelIngot = makeEntry(Ingots.NICKEL);
LootEntry steelIngot = makeEntry(Ingots.STEEL);
LootEntry zincIngot = makeEntry(Ingots.ZINC);
LootEntry advancedFrame = makeEntry(TRContent.MachineBlocks.ADVANCED.frame.asItem());
LootEntry advancedCircuit = makeEntry(Parts.ADVANCED_CIRCUIT);
LootEntry dataStorageChip = makeEntry(Parts.DATA_STORAGE_CHIP);
LootPoolEntry aluminumIngot = makeEntry(Ingots.ALUMINUM);
LootPoolEntry electrumIngot = makeEntry(Ingots.ELECTRUM);
LootPoolEntry invarIngot = makeEntry(Ingots.INVAR);
LootPoolEntry nickelIngot = makeEntry(Ingots.NICKEL);
LootPoolEntry steelIngot = makeEntry(Ingots.STEEL);
LootPoolEntry zincIngot = makeEntry(Ingots.ZINC);
LootPoolEntry advancedFrame = makeEntry(TRContent.MachineBlocks.ADVANCED.frame.asItem());
LootPoolEntry advancedCircuit = makeEntry(Parts.ADVANCED_CIRCUIT);
LootPoolEntry dataStorageChip = makeEntry(Parts.DATA_STORAGE_CHIP);
LootEntry chromeIngot = makeEntry(Ingots.CHROME);
LootEntry iridiumIngot = makeEntry(Ingots.IRIDIUM);
LootEntry platinumIngot = makeEntry(Ingots.PLATINUM);
LootEntry titaniumIngot = makeEntry(Ingots.TITANIUM);
LootEntry tungstenIngot = makeEntry(Ingots.TUNGSTEN);
LootEntry tungstensteelIngot = makeEntry(Ingots.TUNGSTENSTEEL);
LootEntry industrialFrame = makeEntry(TRContent.MachineBlocks.INDUSTRIAL.frame.asItem());
LootEntry industrialCircuit = makeEntry(Parts.INDUSTRIAL_CIRCUIT);
LootEntry energyFlowChip = makeEntry(Parts.ENERGY_FLOW_CHIP);
LootPoolEntry chromeIngot = makeEntry(Ingots.CHROME);
LootPoolEntry iridiumIngot = makeEntry(Ingots.IRIDIUM);
LootPoolEntry platinumIngot = makeEntry(Ingots.PLATINUM);
LootPoolEntry titaniumIngot = makeEntry(Ingots.TITANIUM);
LootPoolEntry tungstenIngot = makeEntry(Ingots.TUNGSTEN);
LootPoolEntry tungstensteelIngot = makeEntry(Ingots.TUNGSTENSTEEL);
LootPoolEntry industrialFrame = makeEntry(TRContent.MachineBlocks.INDUSTRIAL.frame.asItem());
LootPoolEntry industrialCircuit = makeEntry(Parts.INDUSTRIAL_CIRCUIT);
LootPoolEntry energyFlowChip = makeEntry(Parts.ENERGY_FLOW_CHIP);
@ -137,7 +137,7 @@ public class ModLoot {
* @param item Item to include into LootEntry
* @return LootEntry for item provided
*/
private static LootEntry makeEntry(ItemConvertible item) {
private static LootPoolEntry makeEntry(ItemConvertible item) {
return makeEntry(item, 5);
}
@ -148,7 +148,7 @@ public class ModLoot {
* @param weight Weight of that item
* @return LootEntry for item and weight provided
*/
private static LootEntry makeEntry(ItemConvertible item, int weight){
private static LootPoolEntry makeEntry(ItemConvertible item, int weight){
return ItemEntry.builder(item).weight(weight)
.apply(SetCountLootFunction.builder(UniformLootTableRange.between(1.0f, 2.0f))).build();
}

View file

@ -129,7 +129,7 @@ public class FrequencyTransmitterItem extends Item {
});
}
private static Identifier getDimName(RegistryKey<DimensionType> dimensionRegistryKey){
private static Identifier getDimName(RegistryKey<World> dimensionRegistryKey){
return dimensionRegistryKey.getValue();
}

View file

@ -174,8 +174,8 @@ public class NanosaberItem extends SwordItem implements EnergyHolder, ItemDurabi
attributes.removeAll(EntityAttributes.GENERIC_ATTACK_SPEED);
if (slot== EquipmentSlot.MAINHAND && ItemUtils.isActive(stack)) {
attributes.put(EntityAttributes.GENERIC_ATTACK_DAMAGE, new EntityAttributeModifier(ATTACK_DAMAGE_MODIFIER_UUID, "Weapon modifier", TechRebornConfig.nanosaberDamage, EntityAttributeModifier.Operation.ADDITION));
attributes.put(EntityAttributes.GENERIC_ATTACK_SPEED, new EntityAttributeModifier(ATTACK_SPEED_MODIFIER_UUID, "Weapon modifier", 3, EntityAttributeModifier.Operation.ADDITION));
attributes.put(EntityAttributes.GENERIC_ATTACK_DAMAGE, new EntityAttributeModifier(ATTACK_DAMAGE_MODIFIER_ID, "Weapon modifier", TechRebornConfig.nanosaberDamage, EntityAttributeModifier.Operation.ADDITION));
attributes.put(EntityAttributes.GENERIC_ATTACK_SPEED, new EntityAttributeModifier(ATTACK_SPEED_MODIFIER_ID, "Weapon modifier", 3, EntityAttributeModifier.Operation.ADDITION));
}
}
}

View file

@ -26,6 +26,7 @@ package techreborn.world;
import com.mojang.serialization.Codec;
import net.minecraft.block.BlockState;
import net.minecraft.util.math.BlockBox;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.ModifiableTestableWorld;
@ -55,8 +56,8 @@ public class RubberTreeFeature extends TreeFeature {
}
@Override
protected void generate(ModifiableTestableWorld world, Random random, TreeFeatureConfig config, int trunkHeight, TreeNode treeNode, int foliageHeight, int radius, Set<BlockPos> leaves, int i) {
super.generate(world, random, config, trunkHeight, treeNode, foliageHeight, radius, leaves, i);
protected void generate(ModifiableTestableWorld world, Random random, TreeFeatureConfig config, int trunkHeight, TreeNode treeNode, int foliageHeight, int radius, Set<BlockPos> leaves, int i, BlockBox blockBox) {
super.generate(world, random, config, trunkHeight, treeNode, foliageHeight, radius, leaves, i, blockBox);
spawnSpike(world, treeNode.getCenter());
}